/*! *Last modified: 2022-06-19 00:22:31 *Filename: ax.js *Description: Global JS *Version: v2.0.0Beta *Website:www.axui.cn or ax.hobly.cn *Contact:3217728223@qq.com *Author:Michael */ /*! * Cookie v3.0.1 from https://github.com/js-cookie | AXUI未做任何修改 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var i=e.Cookies,s=e.Cookies=t();s.noConflict=function(){return e.Cookies=i,s}}())}(this,(function(){"use strict";function e(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,s=new Array(t);i0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=new Map,s=Math.pow(10,t);return{get:function(t){var n=t.match(_).length;if(i.has(n))return i.get(n);var a=1/Math.pow(n,.5*e),o=parseFloat(Math.round(a*s)/s);return i.set(n,o),o},clear:function(){i.clear()}}}var k=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.getFn,n=void 0===i?A.getFn:i,a=t.fieldNormWeight,o=void 0===a?A.fieldNormWeight:a;s(this,e),this.norm=I(o,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}return a(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,i){e._keysMap[t.id]=i}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,m(this.docs[0])?this.docs.forEach((function(t,i){e._addString(t,i)})):this.docs.forEach((function(t,i){e._addObject(t,i)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();m(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,i=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},s=i.getFn,n=void 0===s?A.getFn:s,a=i.fieldNormWeight,o=void 0===a?A.fieldNormWeight:a,r=new k({getFn:n,fieldNormWeight:o});return r.setKeys(e.map(D)),r.setSources(t),r.create(),r}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.errors,s=void 0===i?0:i,n=t.currentLocation,a=void 0===n?0:n,o=t.expectedLocation,r=void 0===o?0:o,l=t.distance,c=void 0===l?A.distance:l,d=t.ignoreLocation,h=void 0===d?A.ignoreLocation:d,u=s/e.length;if(h)return u;var p=Math.abs(r-a);return c?u+p/c:p?1:u}function j(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.minMatchCharLength,i=[],s=-1,n=-1,a=0,o=e.length;a=t&&i.push([s,n]),s=-1)}return e[a-1]&&a-s>=t&&i.push([s,a-1]),i}function $(e){for(var t={},i=0,s=e.length;i1&&void 0!==arguments[1]?arguments[1]:{},a=n.location,o=void 0===a?A.location:a,r=n.threshold,l=void 0===r?A.threshold:r,c=n.distance,d=void 0===c?A.distance:c,h=n.includeMatches,u=void 0===h?A.includeMatches:h,p=n.findAllMatches,m=void 0===p?A.findAllMatches:p,f=n.minMatchCharLength,g=void 0===f?A.minMatchCharLength:f,v=n.isCaseSensitive,x=void 0===v?A.isCaseSensitive:v,y=n.ignoreLocation,b=void 0===y?A.ignoreLocation:y;if(s(this,e),this.options={location:o,threshold:l,distance:d,includeMatches:u,findAllMatches:m,minMatchCharLength:g,isCaseSensitive:x,ignoreLocation:b},this.pattern=x?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var w=function(e,t){i.chunks.push({pattern:e,alphabet:$(e),startIndex:t})},M=this.pattern.length;if(M>32){for(var E=0,S=M%32,D=M-S;E3&&void 0!==arguments[3]?arguments[3]:{},n=s.location,a=void 0===n?A.location:n,o=s.distance,r=void 0===o?A.distance:o,l=s.threshold,c=void 0===l?A.threshold:l,d=s.findAllMatches,h=void 0===d?A.findAllMatches:d,u=s.minMatchCharLength,p=void 0===u?A.minMatchCharLength:u,m=s.includeMatches,f=void 0===m?A.includeMatches:m,g=s.ignoreLocation,v=void 0===g?A.ignoreLocation:g;if(t.length>32)throw new Error(M(32));for(var x,y=t.length,b=e.length,w=Math.max(0,Math.min(a,b)),E=c,S=w,D=p>1||f,T=D?Array(b):[];(x=e.indexOf(t,S))>-1;){var C=O(t,{currentLocation:x,expectedLocation:w,distance:r,ignoreLocation:v});if(E=Math.min(C,E),S=x+y,D)for(var L=0;L=q;F-=1){var R=F-1,V=i[e.charAt(R)];if(D&&(T[R]=+!!V),H[F]=(H[F+1]<<1|1)&V,$&&(H[F]|=(_[F+1]|_[F])<<1|1|_[F+1]),H[F]&N&&(I=O(t,{errors:$,currentLocation:R,expectedLocation:w,distance:r,ignoreLocation:v}))<=E){if(E=I,(S=R)<=w)break;q=Math.max(1,2*w-S)}}var G=O(t,{errors:$+1,currentLocation:w,expectedLocation:w,distance:r,ignoreLocation:v});if(G>E)break;_=H}var U={isMatch:S>=0,score:Math.max(.001,I)};if(D){var W=j(T,p);W.length?f&&(U.indices=W):U.isMatch=!1}return U}(e,i,n,{location:o+a,distance:r,threshold:l,findAllMatches:c,minMatchCharLength:d,includeMatches:s,ignoreLocation:u}),v=g.isMatch,x=g.score,y=g.indices;v&&(f=!0),m+=x,v&&y&&(p=[].concat(h(p),h(y)))}));var g={isMatch:f,score:f?m/this.chunks.length:1};return f&&s&&(g.indices=p),g}}]),e}(),z=function(){function e(t){s(this,e),this.pattern=t}return a(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return Y(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return Y(e,this.singleRegex)}}]),e}();function Y(e,t){var i=e.match(t);return i?i[1]:null}var q=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(z),B=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(z),H=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(z),F=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(z),R=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(z),V=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(z),G=function(e){r(i,e);var t=d(i);function i(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.location,r=void 0===o?A.location:o,l=a.threshold,c=void 0===l?A.threshold:l,d=a.distance,h=void 0===d?A.distance:d,u=a.includeMatches,p=void 0===u?A.includeMatches:u,m=a.findAllMatches,f=void 0===m?A.findAllMatches:m,g=a.minMatchCharLength,v=void 0===g?A.minMatchCharLength:g,x=a.isCaseSensitive,y=void 0===x?A.isCaseSensitive:x,b=a.ignoreLocation,w=void 0===b?A.ignoreLocation:b;return s(this,i),(n=t.call(this,e))._bitapSearch=new P(e,{location:r,threshold:c,distance:h,includeMatches:p,findAllMatches:f,minMatchCharLength:v,isCaseSensitive:y,ignoreLocation:w}),n}return a(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(z),U=function(e){r(i,e);var t=d(i);function i(e){return s(this,i),t.call(this,e)}return a(i,[{key:"search",value:function(e){for(var t,i=0,s=[],n=this.pattern.length;(t=e.indexOf(this.pattern,i))>-1;)i=t+n,s.push([t,i-1]);var a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(z),W=[q,U,H,F,V,R,B,G],X=W.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var i=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),s=[],n=0,a=i.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=i.isCaseSensitive,a=void 0===n?A.isCaseSensitive:n,o=i.includeMatches,r=void 0===o?A.includeMatches:o,l=i.minMatchCharLength,c=void 0===l?A.minMatchCharLength:l,d=i.ignoreLocation,h=void 0===d?A.ignoreLocation:d,u=i.findAllMatches,p=void 0===u?A.findAllMatches:u,m=i.location,f=void 0===m?A.location:m,g=i.threshold,v=void 0===g?A.threshold:g,x=i.distance,y=void 0===x?A.distance:x;s(this,e),this.query=null,this.options={isCaseSensitive:a,includeMatches:r,minMatchCharLength:c,findAllMatches:p,ignoreLocation:h,location:f,threshold:v,distance:y},this.pattern=a?t:t.toLowerCase(),this.query=K(this.pattern,this.options)}return a(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var i=this.options,s=i.includeMatches;e=i.isCaseSensitive?e:e.toLowerCase();for(var n=0,a=[],o=0,r=0,l=t.length;r2&&void 0!==arguments[2]?arguments[2]:{},s=i.auto,n=void 0===s||s,a=function e(i){var s=Object.keys(i),a=se(i);if(!a&&s.length>1&&!ie(i))return e(ae(i));if(ne(i)){var o=a?i.$path:s[0],r=a?i.$val:i[o];if(!m(r))throw new Error(w(o));var l={keyId:C(o),pattern:r};return n&&(l.searcher=te(r,t)),l}var c={children:[],operator:s[0]};return s.forEach((function(t){var s=i[t];p(s)&&s.forEach((function(t){c.children.push(e(t))}))})),c};return ie(e)||(e=ae(e)),a(e)}function re(e,t){var i=t.ignoreFieldNorm,s=void 0===i?A.ignoreFieldNorm:i;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var i=e.key,n=e.norm,a=e.score,o=i?i.weight:null;t*=Math.pow(0===a&&o?Number.EPSILON:a,(o||1)*(s?1:n))})),e.score=t}))}function le(e,t){var i=e.matches;t.matches=[],x(i)&&i.forEach((function(e){if(x(e.indices)&&e.indices.length){var i={indices:e.indices,value:e.value};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}}))}function ce(e,t){t.score=e.score}function de(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i.includeMatches,n=void 0===s?A.includeMatches:s,a=i.includeScore,o=void 0===a?A.includeScore:a,r=[];return n&&r.push(le),o&&r.push(ce),e.map((function(e){var i=e.idx,s={item:t[i],refIndex:i};return r.length&&r.forEach((function(t){t(e,s)})),s}))}var he=function(){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;s(this,e),this.options=t(t({},A),n),this.options.useExtendedSearch,this._keyStore=new S(this.options.keys),this.setCollection(i,a)}return a(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect 'index' type");this._myIndex=t||N(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){x(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],i=0,s=this._docs.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=t.limit,s=void 0===i?-1:i,n=this.options,a=n.includeMatches,o=n.includeScore,r=n.shouldSort,l=n.sortFn,c=n.ignoreFieldNorm,d=m(e)?m(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return re(d,{ignoreFieldNorm:c}),r&&d.sort(l),f(s)&&s>-1&&(d=d.slice(0,s)),de(d,this._docs,{includeMatches:a,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=te(e,this.options),i=this._myIndex.records,s=[];return i.forEach((function(e){var i=e.v,n=e.i,a=e.n;if(x(i)){var o=t.searchIn(i),r=o.isMatch,l=o.score,c=o.indices;r&&s.push({item:i,idx:n,matches:[{score:l,value:i,norm:a,indices:c}]})}})),s}},{key:"_searchLogical",value:function(e){var t=this,i=oe(e,this.options),s=this._myIndex.records,n={},a=[];return s.forEach((function(e){var s=e.$,o=e.i;if(x(s)){var r=function e(i,s,n){if(!i.children){var a=i.keyId,o=i.searcher,r=t._findMatches({key:t._keyStore.get(a),value:t._myIndex.getValueForItemAtKeyId(s,a),searcher:o});return r&&r.length?[{idx:n,item:s,matches:r}]:[]}for(var l=[],c=0,d=i.children.length;c1&&void 0!==arguments[1]?arguments[1]:{},i=t.getFn,s=void 0===i?A.getFn:i,n=t.fieldNormWeight,a=void 0===n?A.fieldNormWeight:n,o=e.keys,r=e.records,l=new k({getFn:s,fieldNormWeight:a});return l.setKeys(o),l.setIndexRecords(r),l},he.config=A,he.parseQuery=oe,function(){ee.push.apply(ee,arguments)}(Z),he})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e,t){var i=e.getBoundingClientRect();return{width:i.width/1,height:i.height/1,top:i.top/1,right:i.right/1,bottom:i.bottom/1,left:i.left/1,x:i.left/1,y:i.top/1}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function s(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function n(e){return e instanceof i(e).Element||e instanceof Element}function a(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function r(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(l(e)).left+s(e).scrollLeft}function d(e){return i(e).getComputedStyle(e)}function h(e){var t=d(e),i=t.overflow,s=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+s)}function u(e,n,o){void 0===o&&(o=!1);var d=a(n);a(n)&&function(e){var t=e.getBoundingClientRect(),i=t.width/e.offsetWidth||1,s=t.height/e.offsetHeight||1}(n);var u,p,m=l(n),f=t(e),g={scrollLeft:0,scrollTop:0},v={x:0,y:0};return(d||!d&&!o)&&(("body"!==r(n)||h(m))&&(g=(u=n)!==i(u)&&a(u)?{scrollLeft:(p=u).scrollLeft,scrollTop:p.scrollTop}:s(u)),a(n)?((v=t(n)).x+=n.clientLeft,v.y+=n.clientTop):m&&(v.x=c(m))),{x:f.left+g.scrollLeft-v.x,y:f.top+g.scrollTop-v.y,width:f.width,height:f.height}}function p(e){var i=t(e),s=e.offsetWidth,n=e.offsetHeight;return Math.abs(i.width-s)<=1&&(s=i.width),Math.abs(i.height-n)<=1&&(n=i.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:n}}function m(e){return"html"===r(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||l(e)}function f(e,t){var s;void 0===t&&(t=[]);var n=function e(t){return["html","body","#document"].indexOf(r(t))>=0?t.ownerDocument.body:a(t)&&h(t)?t:e(m(t))}(e),o=n===(null==(s=e.ownerDocument)?void 0:s.body),l=i(n),c=o?[l].concat(l.visualViewport||[],h(n)?n:[]):n,d=t.concat(c);return o?d:d.concat(f(m(c)))}function g(e){return["table","td","th"].indexOf(r(e))>=0}function v(e){return a(e)&&"fixed"!==d(e).position?e.offsetParent:null}function x(e){for(var t=i(e),s=v(e);s&&g(s)&&"static"===d(s).position;)s=v(s);return s&&("html"===r(s)||"body"===r(s)&&"static"===d(s).position)?t:s||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(e)&&"fixed"===d(e).position)return null;for(var i=m(e);a(i)&&["html","body"].indexOf(r(i))<0;){var s=d(i);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||t&&"filter"===s.willChange||t&&s.filter&&"none"!==s.filter)return i;i=i.parentNode}return null}(e)||t}var y="top",b="bottom",w="right",M="left",E=[y,b,w,M],S=E.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),D=[].concat(E,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),T=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function C(e){var t=new Map,i=new Set,s=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||function e(n){i.add(n.name),[].concat(n.requires||[],n.requiresIfExists||[]).forEach((function(s){if(!i.has(s)){var n=t.get(s);n&&e(n)}})),s.push(n)}(e)})),s}function L(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s=0&&a(e)?x(e):e;return n(i)?t.filter((function(e){return n(e)&&j(e,i)&&"body"!==r(e)})):[]}(e):[].concat(t),o=[].concat(s,[i]),l=o[0],c=o.reduce((function(t,i){var s=P(e,i);return t.top=k(s.top,t.top),t.right=N(s.right,t.right),t.bottom=N(s.bottom,t.bottom),t.left=k(s.left,t.left),t}),P(e,l));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Y(e){return e.split("-")[1]}function q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function B(e){var t,i=e.reference,s=e.element,n=e.placement,a=n?I(n):null,o=n?Y(n):null,r=i.x+i.width/2-s.width/2,l=i.y+i.height/2-s.height/2;switch(a){case y:t={x:r,y:i.y-s.height};break;case b:t={x:r,y:i.y+i.height};break;case w:t={x:i.x+i.width,y:l};break;case M:t={x:i.x-s.width,y:l};break;default:t={x:i.x,y:i.y}}var c=a?q(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case"start":t[c]=t[c]-(i[d]/2-s[d]/2);break;case"end":t[c]=t[c]+(i[d]/2-s[d]/2)}}return t}function H(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function F(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}function R(e,i){void 0===i&&(i={});var s=i,a=s.placement,o=void 0===a?e.placement:a,r=s.boundary,c=void 0===r?"clippingParents":r,d=s.rootBoundary,h=void 0===d?"viewport":d,u=s.elementContext,p=void 0===u?"popper":u,m=s.altBoundary,f=void 0!==m&&m,g=s.padding,v=void 0===g?0:g,x=H("number"!=typeof v?v:F(v,E)),M="popper"===p?"reference":"popper",S=e.rects.popper,D=e.elements[f?M:p],T=z(n(D)?D:D.contextElement||l(e.elements.popper),c,h),C=t(e.elements.reference),L=B({reference:C,element:S,strategy:"absolute",placement:o}),A=$(Object.assign({},S,L)),_="popper"===p?A:C,I={top:T.top-_.top+x.top,bottom:_.bottom-T.bottom+x.bottom,left:T.left-_.left+x.left,right:_.right-T.right+x.right},k=e.modifiersData.offset;if("popper"===p&&k){var N=k[o];Object.keys(I).forEach((function(e){var t=[w,b].indexOf(e)>=0?1:-1,i=[y,b].indexOf(e)>=0?"y":"x";I[e]+=N[i]*t}))}return I}var V="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",G={placement:"bottom",modifiers:[],strategy:"absolute",fixDistance:24};function U(){for(var e=arguments.length,t=new Array(e),i=0;i100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==l.reset){var a=l.orderedModifiers[n],o=a.fn,r=a.options,c=void 0===r?{}:r,d=a.name;"function"==typeof o&&(l=o({state:l,options:c,name:d,instance:m})||l)}else l.reset=!1,n=-1}}else console.error(V)}},update:(a=function(){return new Promise((function(e){m.forceUpdate(),e(l)}))},function(){return r||(r=new Promise((function(e){Promise.resolve().then((function(){r=void 0,e(a())}))}))),r}),destroy:function(){g(),h=!0}};if(!U(e,t))return console.error(V),m;function g(){c.forEach((function(e){return e()})),c=[]}return m.setOptions(i).then((function(e){!h&&i.onFirstUpdate&&i.onFirstUpdate(e)})),m}}var X={passive:!0};var Q={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,s=e.instance,n=e.options,a=n.scroll,o=void 0===a||a,r=n.resize,l=void 0===r||r,c=i(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach((function(e){e.addEventListener("scroll",s.update,X)})),l&&c.addEventListener("resize",s.update,X),function(){o&&d.forEach((function(e){e.removeEventListener("scroll",s.update,X)})),l&&c.removeEventListener("resize",s.update,X)}},data:{}};var K={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=B({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},J={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z(e){var t,s=e.popper,n=e.popperRect,a=e.placement,o=e.variation,r=e.offsets,c=e.position,h=e.gpuAcceleration,u=e.adaptive,p=e.roundOffsets,m=!0===p?function(e){var t=e.x,i=e.y,s=window.devicePixelRatio||1;return{x:O(O(t*s)/s)||0,y:O(O(i*s)/s)||0}}(r):"function"==typeof p?p(r):r,f=m.x,g=void 0===f?0:f,v=m.y,E=void 0===v?0:v,S=r.hasOwnProperty("x"),D=r.hasOwnProperty("y"),T=M,C=y,L=window;if(u){var A=x(s),_="clientHeight",I="clientWidth";A===i(s)&&"static"!==d(A=l(s)).position&&"absolute"===c&&(_="scrollHeight",I="scrollWidth"),A=A,a!==y&&(a!==M&&a!==w||"end"!==o)||(C=b,E-=A[_]-n.height,E*=h?1:-1),a!==M&&(a!==y&&a!==b||"end"!==o)||(T=w,g-=A[I]-n.width,g*=h?1:-1)}var k,N=Object.assign({position:c},u&&J);return h?Object.assign({},N,((k={})[C]=D?"0":"",k[T]=S?"0":"",k.transform=(L.devicePixelRatio||1)<=1?"translate("+g+"px, "+E+"px)":"translate3d("+g+"px, "+E+"px, 0)",k)):Object.assign({},N,((t={})[C]=D?E+"px":"",t[T]=S?g+"px":"",t.transform="",t))}var ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,s=i.gpuAcceleration,n=void 0===s||s,a=i.adaptive,o=void 0===a||a,r=i.roundOffsets,l=void 0===r||r,c=d(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var h={placement:I(t.placement),variation:Y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Z(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Z(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-placement":t.placement})},data:{}};var te={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},n=t.elements[e];a(n)&&r(n)&&(Object.assign(n.style,i),Object.keys(s).forEach((function(e){var t=s[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var s=t.elements[e],n=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});a(s)&&r(s)&&(Object.assign(s.style,o),Object.keys(n).forEach((function(e){s.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,s=e.name,n=i.offset,a=void 0===n?[0,0]:n,o=D.reduce((function(e,i){return e[i]=function(e,t,i){var s=I(e),n=[M,y].indexOf(s)>=0?-1:1,a="function"==typeof i?i(Object.assign({},t,{placement:e})):i,o=a[0],r=a[1];return o=o||0,r=(r||0)*n,[M,w].indexOf(s)>=0?{x:r,y:o}:{x:o,y:r}}(i,t.rects,a),e}),{}),r=o[t.placement],l=r.x,c=r.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[s]=o}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ne(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ae={start:"end",end:"start"};function oe(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function re(e,t){void 0===t&&(t={});var i=t,s=i.placement,n=i.boundary,a=i.rootBoundary,o=i.padding,r=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,d=Y(s),h=d?r?S:S.filter((function(e){return Y(e)===d})):E,u=h.filter((function(e){return c.indexOf(e)>=0}));0===u.length&&(u=h,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=u.reduce((function(t,i){return t[i]=R(e,{placement:i,boundary:n,rootBoundary:a,padding:o})[I(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var n=i.mainAxis,a=void 0===n||n,o=i.altAxis,r=void 0===o||o,l=i.fallbackPlacements,c=i.padding,d=i.boundary,h=i.rootBoundary,u=i.altBoundary,p=i.flipVariations,m=void 0===p||p,f=i.allowedAutoPlacements,g=t.options.placement,v=I(g),x=l||(v!==g&&m?function(e){if("auto"===I(e))return[];var t=ne(e);return[oe(e),t,oe(t)]}(g):[ne(g)]),E=[g].concat(x).reduce((function(e,i){return e.concat("auto"===I(i)?re(t,{placement:i,boundary:d,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:f}):i)}),[]),S=t.rects.reference,D=t.rects.popper,T=new Map,C=!0,L=E[0],A=0;A=0,j=O?"width":"height",$=R(t,{placement:_,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),P=O?N?w:M:N?b:y;S[j]>D[j]&&(P=ne(P));var z=ne(P),q=[];if(a&&q.push($[k]<=0),r&&q.push($[P]<=0,$[z]<=0),q.every((function(e){return e}))){L=_,C=!1;break}T.set(_,q)}if(C)for(var B=function(e){var t=E.find((function(t){var i=T.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},H=m?3:1;H>0;H--){if("break"===B(H))break}t.placement!==L&&(t.modifiersData[s]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ce(e,t,i){return k(e,N(t,i))}var de={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,s=e.name,n=i.mainAxis,a=void 0===n||n,o=i.altAxis,r=void 0!==o&&o,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,h=i.padding,u=i.tether,m=void 0===u||u,f=i.tetherOffset,g=void 0===f?0:f,v=R(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),E=I(t.placement),S=Y(t.placement),D=!S,T=q(E),C="x"===T?"y":"x",L=t.modifiersData.popperOffsets,A=t.rects.reference,_=t.rects.popper,O="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,j={x:0,y:0};if(L){if(a||r){var $="y"===T?y:M,P="y"===T?b:w,z="y"===T?"height":"width",B=L[T],H=L[T]+v[$],F=L[T]-v[P],V=m?-_[z]/2:0,G="start"===S?A[z]:_[z],U="start"===S?-_[z]:-A[z],W=t.elements.arrow,X=m&&W?p(W):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=Q[$],J=Q[P],Z=ce(0,A[z],X[z]),ee=D?A[z]/2-V-Z-K-O:G-Z-K-O,te=D?-A[z]/2+V+Z+J+O:U+Z+J+O,ie=t.elements.arrow&&x(t.elements.arrow),se=ie?"y"===T?ie.clientTop||0:ie.clientLeft||0:0,ne=t.modifiersData.offset?t.modifiersData.offset[t.placement][T]:0,ae=L[T]+ee-ne-se,oe=L[T]+te-ne;if(a){var re=ce(m?N(H,ae):H,B,m?k(F,oe):F);L[T]=re,j[T]=re-B}if(r){var le="x"===T?y:M,de="x"===T?b:w,he=L[C],ue=he+v[le],pe=he-v[de],me=ce(m?N(ue,ae):ue,he,m?k(pe,oe):pe);L[C]=me,j[C]=me-he}}t.modifiersData[s]=j}},requiresIfExists:["offset"]};var he={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,s=e.name,n=e.options,a=i.elements.arrow,o=i.modifiersData.popperOffsets,r=I(i.placement),l=q(r),c=[M,w].indexOf(r)>=0?"height":"width";if(a&&o){var d,h=function(e,t){return H("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:F(e,E))}(n.padding,i),u=p(a),m="y"===l?y:M,f="y"===l?b:w,g=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],v=o[l]-i.rects.reference[l],S=x(a),D=S?"y"===l?S.clientHeight||0:S.clientWidth||0:0,T=g/2-v/2,C=h[m],L=D-u[c]-h[f],A=i.rects.popper.width=0}))}var me={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,s=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,o=R(t,{elementContext:"reference"}),r=R(t,{altBoundary:!0}),l=ue(o,s),c=ue(r,n,a),d=pe(l),h=pe(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-reference-hidden":d,"data-escaped":h})}},fe=W({defaultModifiers:[Q,K,ee,te]}),ge=[Q,K,ee,te,ie,le,de,he,me],ve=W({defaultModifiers:ge});e.applyStyles=te,e.arrow=he,e.computeStyles=ee,e.createPopper=ve,e.createPopperLite=fe,e.defaultModifiers=ge,e.detectOverflow=R,e.eventListeners=Q,e.flip=le,e.hide=me,e.offset=ie,e.popperGenerator=W,e.popperOffsets=K,e.preventOverflow=de,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=window||e||self).Redux={})}(this,(function(e){"use strict";var t="function"==typeof Symbol&&Symbol.observable||"@@observable",i=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function n(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function a(e){return function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var i=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(i){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return i}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)}function o(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function r(e,t){return function(){return t(e.apply(this,arguments))}}function l(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function d(e){for(var t=1;t0?"Unexpected "+(c.length>1?"keys":"key")+' "'+c.join('", "')+'" found in '+l+'. Expected to find one of the known reducer keys instead: "'+r.join('", "')+'". Unexpected keys will be ignored.':void 0}(e,i,t,c);r&&o(r);for(var l=!1,u={},p=0;po&&(s=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",l.push(n.format(s,{count:o}))),l.length>0?t.message||l:void 0):t.message||this.notValid||"has an incorrect length"}},numericality:function(e,t,i,s,a){if(n.isDefined(e)){var o,r,l=[],c={greaterThan:function(e,t){return e>t},greaterThanOrEqualTo:function(e,t){return e>=t},equalTo:function(e,t){return e===t},lessThan:function(e,t){return eo&&(i=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",i=n.format(i,{date:this.format(o,t),value:this.format(e,t)}),s.push(i)),s.length?n.unique(s):void 0)}}),{parse:null,format:null}),date:function(e,t){return t=n.extend({},t,{dateOnly:!0}),n.validators.datetime.call(n.validators.datetime,e,t)},format:function(e,t){(n.isString(t)||t instanceof RegExp)&&(t={pattern:t});var i,s=(t=n.extend({},this.options,t)).message||this.message||"is invalid",a=t.pattern;if(n.isDefined(e))return n.isString(e)?(n.isString(a)&&(a=new RegExp(t.pattern,t.flags)),(i=a.exec(e))&&i[0].length==e.length?void 0:s):s},inclusion:function(e,t){if(n.isDefined(e)&&(n.isArray(t)&&(t={within:t}),t=n.extend({},this.options,t),!n.contains(t.within,e))){var i=t.message||this.message||"^%{value} is not included in the list";return n.format(i,{value:e})}},exclusion:function(e,t){if(n.isDefined(e)&&(n.isArray(t)&&(t={within:t}),t=n.extend({},this.options,t),n.contains(t.within,e))){var i=t.message||this.message||"^%{value} is restricted";return n.isString(t.within[e])&&(e=t.within[e]),n.format(i,{value:e})}},email:n.extend((function(e,t){var i=(t=n.extend({},this.options,t)).message||this.message||"is not a valid email";if(n.isDefined(e))return n.isString(e)&&this.PATTERN.exec(e)?void 0:i}),{PATTERN:/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(e,t,i,s,a){if(n.isDefined(e)){n.isString(t)&&(t={attribute:t});var o=(t=n.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(n.isEmpty(t.attribute)||!n.isString(t.attribute))throw new Error("The attribute must be a non empty string");var r=n.getDeepObjectValue(s,t.attribute),l=t.comparator||function(e,t){return e===t},c=t.prettify||a&&a.prettify||n.prettify;return l(e,r,t,i,s)?void 0:n.format(o,{attribute:c(t.attribute)})}},url:function(e,t){if(n.isDefined(e)){var i=(t=n.extend({},this.options,t)).message||this.message||"不是一个有效的网址",s=t.schemes||this.schemes||["http","https"],a=t.allowLocal||this.allowLocal||!1,o=t.allowDataUrl||this.allowDataUrl||!1;if(!n.isString(e))return i;var r="^(?:(?:"+s.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",l="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";return a?l+="?":r+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",r+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+l+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",o&&(r="(?:"+r+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"),new RegExp(r,"i").exec(e)?void 0:i}},type:n.extend((function(e,t,i,s,a){if(n.isString(t)&&(t={type:t}),n.isDefined(e)){var o,r=n.extend({},this.options,t),l=r.type;if(!n.isDefined(l))throw new Error("No type was specified");if(o=n.isFunction(l)?l:this.types[l],!n.isFunction(o))throw new Error("validate.validators.type.types."+l+" must be a function.");if(!o(e,r,i,s,a)){var c=t.message||this.messages[l]||this.message||r.message||(n.isFunction(l)?"must be of the correct type":"must be of type %{type}");return n.isFunction(c)&&(c=c(e,t,i,s,a)),n.format(c,{attribute:n.prettify(i),type:l})}}}),{types:{object:function(e){return n.isObject(e)&&!n.isArray(e)},array:n.isArray,integer:n.isInteger,number:n.isNumber,string:n.isString,date:n.isDate,boolean:n.isBoolean},messages:{}})},s.formatters={detailed:function(e){return e},flat:n.flattenErrorsToArray,grouped:function(e){var t;for(t in e=n.groupErrorsByAttribute(e))e[t]=n.flattenErrorsToArray(e[t]);return e},constraint:function(e){var t;for(t in e=n.groupErrorsByAttribute(e))e[t]=e[t].map((function(e){return e.validator})).sort();return e}},s.exposeModule(s,this,e,t,i)}.call(this,"undefined"!=typeof exports?exports:null,"undefined"!=typeof module?module:null,"undefined"!=typeof define?define:null); /*! * 全局变量,至于ax.js头部,可全站使用 */ const axIsMobi=()=>{let e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];for(let i=0;i0},axClient=()=>{let e=window.screen.width;return e<500?"phone":e>500&&e<900?"pad":e>900&&e<1200?"padflip":e>1200&&e<1500?"padpro":"pc"},axIsEmpty=e=>"function"==typeof e?"{}"==e.toString().replace(/\s+/g,"").match(/{.*}/g)[0]:!e||(e instanceof Array?""==e.join(""):"object"==typeof e&&0===Object.keys(e).length),axPreventDefault=e=>{e.preventDefault?e.preventDefault():e.returnValue=!1},axStrToDom=e=>{let t=document.createElement("div");return"string"==typeof e&&(t.innerHTML=e.trim()),t.firstElementChild},axFalseReturn=(e,t)=>{if(!e)return t?console.error(t):console.error("The program cannot be executed because the object does not exist!"),!1},axIdToDom=e=>e?"string"==typeof e?document.querySelector(e):e:void console.error("No selector or No HTML DOM!"),axArrToDom=(e,t)=>{let i=e.split(","),s=[],n=/^[0-9]*$/,a="";return a="string"==typeof t?document.querySelector(t):t,i.forEach(e=>{if(!n.test(e.substr(0,1)))if(-1!=e.indexOf("."))s=a?s.concat([...a.querySelectorAll(e)]):s.concat([...document.querySelectorAll(e)]);else if(-1!=e.indexOf("#"))s.push(document.querySelector(e));else{if(!e)return s;document.querySelectorAll(e)&&(s=a?s.concat([...a.querySelectorAll(e)]):s.concat([...document.querySelectorAll(e)]))}}),s},axIsVisible=e=>{let t=axIdToDom(e),i=!0,s="none"!=getComputedStyle(t).display&&"hidden"!=getComputedStyle(t).visibility;for(;i&&s;)t=t.parentNode,t&&t!=document.body?s="none"!=getComputedStyle(t).display&&"hidden"!=getComputedStyle(t).visibility:i=!1;return s},axPreventScroll=(e,t)=>{let i=e?axIdToDom(e):null,s=t?axIdToDom(t):null;return navigator.userAgent.indexOf("Firefox")>0?(i.addEventListener("DOMMouseScroll",e=>{e.preventDefault()},!1),s?s&&s.scrollHeight>s.clientHeight&&s.addEventListener("DOMMouseScroll",e=>{s.scrollTop+=e.detail>0?60:-60},!1):e&&e.scrollHeight>e.clientHeight&&e.addEventListener("DOMMouseScroll",t=>{e.scrollTop+=t.detail>0?60:-60},!1)):(i.addEventListener("mousewheel",e=>{(e=e||window.event).returnValue=!1},!1),s?s&&s.scrollHeight>s.clientHeight&&s.addEventListener("mousewheel",e=>{s.scrollTop+=e.wheelDelta>0?-60:60},!1):e&&e.scrollHeight>e.clientHeight&&e.addEventListener("mousewheel",t=>{e.scrollTop+=t.wheelDelta>0?-60:60},!1)),this},axCreateId=(e,t,i)=>{let s=i?axIdToDom(i):null,n=(new Date).getTime(),a=i?s.id.replace(/(:|\.|\[|\]|,)/g,""):null;return t?isNaN(t)?a&&"id"==t?e+"-"+a:e+"-"+n:e+"-"+(e=>{e=e||32;let t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",i=t.length,s="";for(let n=0;nnull!=t&&Object.prototype.toString.call(t).slice(8,-1)===e,axType=e=>Object.prototype.toString.call(e).slice(8,-1),axUlToArr=e=>{axFalseReturn(e);let t=axIdToDom(e),i=(e,t)=>{let s="",n={},a=e.firstElementChild.textContent.trim();return e.firstElementChild.getAttribute("value")?(s=e.firstElementChild.getAttribute("value").trim(),n={id:t,name:a,value:s}):n={id:t,value:a},e.querySelector("ul")&&[...e.querySelector("ul").children].forEach((e,t)=>{n.children||(n.children=[]),n.children.push(i(e,t))}),n};return(()=>{let e=[];return axChildren(t,"li").forEach((t,s)=>{e.push(i(t,s))}),e})()},axSelectToArr=e=>{axFalseReturn(e);let t=axIdToDom(e),i=(e,t)=>{let s="",n="",a={};return"OPTGROUP"==e.nodeName?(n=e.getAttribute("label").trim(),s=n):(n=e.textContent.trim(),e.getAttribute("value")&&(s=e.getAttribute("value").trim())),a={id:t,name:n,value:s},e.querySelector("option")&&[...e.children].forEach((e,t)=>{a.children||(a.children=[]),a.children.push(i(e,t))}),a};return(()=>{let e=[];return[...t.children].forEach((t,s)=>{e.push(i(t,s))}),e})()},axListToArr=e=>{axFalseReturn(e);let t=axIdToDom(e),i=(e,t)=>{let i="",s="",n={};return s=e.textContent.trim(),e.getAttribute("value")&&(i=e.getAttribute("value").trim()),n={name:s,value:i},axIsEmpty(e.dataset)||Object.assign(n,e.dataset),n};return(()=>{let e=[];return[...t.children].forEach((t,s)=>{e.push(i(t,s))}),e})()},axIsOutside=(e,t,i,s)=>{if(!t)return!0;let n=axIdToDom(t);if(!n)return!0;let a,o,r,l,c=e.clientX,d=e.clientY;return a=i||n.getBoundingClientRect().left,o=s||n.getBoundingClientRect().top,r=a+n.offsetWidth,l=o+n.offsetHeight,cr||dl},axStyle=(e,t)=>{axFalseReturn(e);let i=axIdToDom(e);return document.defaultView.getComputedStyle(i,t)},axInstance=(e,t)=>(axIsEmpty(e)&&console.error("Instance is destroyed!"),e.filter(e=>e.name==t)[0].instance),axTplEngine=(e,t)=>{axFalseReturn(e,"No html!");let i,s=/<%([^%>]+)?%>/g,n=/(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g,a="let r=[];\n",o=0,r=(e,t)=>(a+=t?e.match(n)?e+"\n":"r.push("+e+");\n":""!=e?'r.push("'+e.replace(/"/g,'\\"')+'");\n':"",r);for(;i=s.exec(e);)r(e.slice(o,i.index))(i[1],!0),o=i.index+i[0].length;return r(e.substr(o,e.length-o)),a+='return r.join("");',new Function(a.replace(/[\r\t\n]/g,"")).apply(t)},axClone=e=>{if(null===e)return null;if("object"!=typeof e)return e;if(e.constructor===Date)return new Date(e);{let t={};for(let i in e)if(null==e[i])t[i]=null;else if("object"!=typeof e[i]||e[i].nodeType)t[i]=e[i];else if(t[i]=axClone(e[i]),e[i]instanceof Array){let s=[];for(let t of e[i])s.push(axClone(t));t[i]=s}return t}},axMerge=(e,t)=>{if("object"!=typeof e||"object"!=typeof t)return t;if(!t)return e;for(let i in t)t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&"Array"!=axType(t[i])?e[i]=axMerge(e[i],t[i]):e[i]=t[i];return e},axStrToArr=(e,t,i)=>{let s=[],n={};return axIsEmpty(t)||t.forEach((e,t)=>{n[e]=axIsEmpty(i)?"":i[t]}),"["==e.substr(0,1)&&"]"==e.substr(-1)?s=JSON.parse(e):-1!=e.replace(/\s*/g,"").indexOf("},{")?s=JSON.parse("["+e+"]"):"{"==e.replace(/\s*/g,"").substr(0,1)&&"}"==e.replace(/\s*/g,"").substr(-1)?s=JSON.parse("["+e+"]"):(s=e.split(","),s.forEach((e,i)=>{if("string"==typeof e&&!axIsEmpty(t)){let n={};t.forEach((t,i)=>{n[t]=0==i?e:""}),s.splice(i,1,n)}})),s.forEach(e=>{if(!axIsEmpty(n))for(let t in n)e.hasOwnProperty(t)?e.hasOwnProperty(t)&&!e[t]&&(e[t]=n[t]):e[t]=n[t]?n[t]:""}),s},axTplToArr=(e,t,i,s,n)=>{let a=axIdToDom(e),o=[];if(s){a.querySelectorAll(s).forEach(e=>{let s={};t.forEach((t,a)=>{let o=e.querySelector("["+t+"]");s[i[a]]=o?o.getAttribute(t)?o.getAttribute(t).trim():o.innerHTML.trim():n[a]||""}),o.push(s)})}else{let e={};t.forEach((t,s)=>{let o=a.querySelector("["+t+"]");e[i[s]]=o?o.getAttribute(t)?o.getAttribute(t).trim():o.innerHTML.trim():n[s]||""}),o.push(e)}return o},axDataset=(e,t)=>{let i=e?axIdToDom(e):null,s=/^\d+(\.\d+)?$/,n=/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;if(i){let e=[...i.attributes].filter(e=>0==e.name.indexOf("data-"));if(!axIsEmpty(e)){let i=axClone(t),a=e=>{for(let t in e){let i=t.toLowerCase();e[i]=e[t],axTypeIs("Object",e[t])&&a(e[t]),i!=t&&delete e[t]}};a(i);for(let t=0;t{for(let i in e){let s=i.toLowerCase();axTypeIs("Object",e[i])?o(e[i],t[s]):e[i]=t[s]}};o(t,i)}}return t},axExtend=(e,t,i)=>{axFalseReturn(e);let s=i?axIdToDom(i):null;return axMerge(e,t),axDataset(s,e),e},axAddPlan=(e,t,i)=>{e in i.handlers||(i.handlers[e]=[]);let s=t.toString().replace(/\s/g,"").replace(/\;/g,"").match(/{(\S*)}/)[1];!(i.handlers[e].toString().replace(/\s/g,"").replace(/\;/g,"").indexOf(s)>-1)&&i.handlers[e].push(t)},axExePlan=(e,t,...i)=>{if(!(e in t.handlers))return console.error("The event is not registered!");t.handlers[e].forEach(e=>{e.call(t,...i)})},axDelPlan=(e,t,i)=>{if(!(e in i.handlers))return console.error("Invalid event!");if(t){let s=i.handlers[e].findIndex(e=>e===t);if(void 0===s)return console.error("This event is not bound!");i.handlers[e].splice(s,1),0===i.handlers[e].length&&delete i.handlers[e]}else delete i.handlers[e]},axAddElem=(e,t,i)=>{e.toLowerCase();let s=document.createElement(e);if(t)for(k in t)s.setAttribute(k,t[k]);return i&&(s.innerHTML=i),s},axAddWrap=(e,t,i,s,n)=>{axFalseReturn(e);let a=axIdToDom(e),o="";return t?o=axIdToDom(t):!o&&i&&(o=axAddElem(i,s,n)),a.nextSibling?a.parentNode!==o&&a.parentNode.insertBefore(o,a.nextSibling):a.parentNode!==o&&a.parentNode.appendChild(o),o.appendChild(a)},axRangeReplace=(e,t,i,s,n)=>{"string"!=typeof e&&(e=JSON.stringify(e)),"string"!=typeof t&&(e=JSON.stringify(t));let a="";return a=i||s?s?i?e.substring(0,i)+t+e.substring(s):n?e.substring(s-n)+t+e.substring(0,i):t+e.substring(s):n?e.substring(0,i)+t+e.substring(i+n):e.substring(0,i)+t:t,a},axArrange=(e,t,i=0,s=[],n=[])=>{let a=e.length;if(!(i+t>a)){for(let o=i;o"string"!=typeof e?e:e.replace(/&/g,"&").replace(/>/g,"&rt;").replace(/{let s=axIdToDom(e),n=i?axIdToDom(i):null,a={};if(n){let t=[];axParents2(i,e,!0,!0).forEach(e=>{let i=window.getComputedStyle(e).display,s=e.style.cssText;"none"==i&&(e.style.cssText="display:block;visibility:hidden;position:fixed"),t.push(s)}),a={height:n.offsetHeight,width:n.offsetWidth,offsetLeft:n.offsetLeft,offsetTop:n.offsetTop},axParents2(i,e,!0,!0).forEach((e,i)=>{t[i]?e.style.cssText=t[i]:e.removeAttribute("style")})}else{let e=window.getComputedStyle(s).display,t=s.style.cssText;"none"==e&&(s.style.cssText="display:block;visibility:hidden;position:fixed"),a={height:s.offsetHeight,width:s.offsetWidth,offsetLeft:s.offsetLeft,offsetTop:s.offsetTop},t?s.style.cssText=t:s.removeAttribute("style")}return a[t]},axAjax=(e,t)=>{axFalseReturn(e,"No options");let i=axAddElem("SPAN",{"aria-label":"loading"}),s=t?axIdToDom(t):null;s&&s.appendChild(i);let n={url:"",selector:"",type:"get",async:!0,before:e=>{s&&(i.innerHTML=e,s.setAttribute("aria-ajax","before"))},success:(e,t)=>{s&&(s.innerHTML=e&&s.setAttribute("aria-ajax","success"))},error:(e,t)=>{s?(i.innerHTML=`发生了一个错误!:${t}`,s.setAttribute("aria-ajax","error")):console.error(`发生了一个错误!:${t}`)},data:{},delay:6e4,timeout:()=>{s?(i.innerHTML='请求超时了!',s.setAttribute("aria-ajax","timeout")):console.error("请求超时了!")},loading:''};for(k in e)n[k]=e[k];let a="";for(k in n.data)a+="&"+k+"="+n.data[k];let o="";o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");let r=setTimeout((function(){o.abort(),n.timeout.call(this)}),n.delay);o.onreadystatechange=function(){if(o.readyState<4)n.before.call(this,n.loading,o.readyState,s);else if(clearTimeout(r),o.status>=200&&o.status<300||304==o.status){let e=document.createElement("div"),t="";e.innerHTML=o.responseText,n.selector&&e.querySelector(n.selector)?t=e.querySelector(n.selector).innerHTML:n.selector&&!e.querySelector(n.selector)?(console.error(`The node of "${n.selector}" is not exist!`),t=o.responseText):t="{"==o.responseText.trim().substr(0,1)||"["==o.responseText.trim().substr(0,1)?JSON.parse(o.responseText.trim()):o.responseText,n.success.call(this,t,o.readyState,s)}else n.error.call(this,o.responseText,o.readyState,s)};let l=n.url+"?now="+(new Date).getTime();"get"==n.type.toLowerCase()?(l+=a,o.open("get",l+"?"+a,!0),o.send()):"post"==n.type.toLowerCase()&&(o.open("post",l,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(a))},axOffset=e=>{axFalseReturn(e);let t,i,s=axIdToDom(e);return t=s.getBoundingClientRect().left+document.documentElement.scrollLeft,i=s.getBoundingClientRect().top+document.documentElement.scrollTop,{left:t,top:i}},axWidth=(e,t)=>{axFalseReturn(e);let i=axIdToDom(e),{width:s,paddingLeft:n,paddingRight:a,marginLeft:o,marginRight:r,borderLeftWidth:l,borderRightWidth:c}=getComputedStyle(i);return s=parseInt(s,10),n=parseInt(n,10),a=parseInt(a,10),o=parseInt(o,10),r=parseInt(r,10),borderLeft=parseInt(l,10),borderRight=parseInt(c,10),"inner"==t?s+n+a:"outer"==t?s+n+a+o+r+borderLeft+borderRight:s},axHeight=(e,t)=>{axFalseReturn(e);let i=axIdToDom(e),{height:s,paddingTop:n,paddingBottom:a,marginTop:o,marginBottom:r,borderTopWidth:l,borderBottomWidth:c}=getComputedStyle(i);return s=parseInt(s,10),n=parseInt(n,10),a=parseInt(a,10),o=parseInt(o,10),r=parseInt(r,10),borderTop=parseInt(l,10),borderBottom=parseInt(c,10),"inner"==t?s+n+a:"outer"==t?s+n+a+o+r+borderTop+borderBottom:s},axArrHeight=e=>{axFalseReturn(e);let t=axIdToDom(e),{height:i,paddingTop:s,paddingBottom:n,marginTop:a,marginBottom:o,borderTopWidth:r,borderBottomWidth:l}=getComputedStyle(t);return i=parseInt(i,10),s=parseInt(s,10),n=parseInt(n,10),a=parseInt(a,10),o=parseInt(o,10),borderTop=parseInt(r,10),borderBottom=parseInt(l,10),{height:i,paddingTop:s,paddingBottom:n,marginTop:a,marginBottom:o,borderTop:borderTop,borderBottom:borderBottom}},axSelector=(e,t)=>{axFalseReturn(e);let i=axIdToDom(e),s=!0;if(t){t=String(t).replace(/\s+/g,""),t=String(t).split(",");for(let e=0;e{axFalseReturn(e);let i=axIdToDom(e),s=!0;if(t){t=String(t).replace(/\s+/g,""),t=String(t).split(",");for(let e=0;e{axFalseReturn(e);let n=axIdToDom(e);return[...n.parentNode.children].filter(e=>t?axSelector(e,i)&&!axNot(e,s):e!==n&&axSelector(e,i)&&!axNot(e,s))},axChildren=(e,t,i)=>(axFalseReturn(e),[...axIdToDom(e).children].filter(e=>axSelector(e,t)&&!axNot(e,i))),axParents=(e,t,i,s,n=[])=>{axFalseReturn(e,"No node to start!");let a=axIdToDom(e),o=t?axIdToDom(t):null;return"BODY"!==a.parentElement.nodeName?(i&&n.indexOf(a)<0&&n.push(a),o?(s&&n.indexOf(o)<0&&n.push(o),a.parentElement!==o?(n.push(a.parentElement),axParents(a.parentElement,o,i,s,n)):n):(n.push(a.parentElement),axParents(a.parentElement,o,i,s,n))):n},axCurves={linear:e=>e,easeIn:e=>e*e*e,easeOut:e=>(e-1)*(e-1)*(e-1)+1,easeInOut:e=>e<.5?2*e*e:-2(e-1)*(e-1)+1,easeOutIn:e=>e<.5?Math.sqrt(.5*e):1-Math.sqrt(.5*(1-e))},axSlideDown=(e,t,i,s="easeOut")=>{axFalseReturn(e);let n=axIdToDom(e);if("none"===window.getComputedStyle(n).display){n.setAttribute("style","display: block;");const{height:e,paddingTop:a,paddingBottom:o,marginTop:r,marginBottom:l}=axArrHeight(n);let c;c=void 0!==i&&"number"==typeof i?i:(e=>e/3+250)(e),n.setAttribute("style","display: block; padding-top: 0; padding-bottom: 0;margin-top: 0; margin-bottom: 0;");const d=(new Date).getTime(),h=()=>{const i=(new Date).getTime()-d,u=i/c,p=axCurves[s](u),m=0+e*p,f=0+a*p,g=0+o*p,v=0+r*p,x=0+l*p;i<=c&&Math.ceil(m)=e||!e)&&(cancelAnimationFrame(y),t&&t())};h()}return n},axHeightDown=(e,t,i,s,n="easeOut")=>{axFalseReturn(e);let a=axIdToDom(e);const o=t&&t.height?t.height:axArrHeight(a).height,r=t&&t.paddingTop?t.paddingTop:axArrHeight(a).paddingTop,l=t&&t.paddingBottom?t.paddingBottom:axArrHeight(a).paddingBottom,c=t&&t.marginTop?t.marginTop:axArrHeight(a).marginTop,d=t&&t.marginBottom?t.marginBottom:axArrHeight(a).marginBottom;let h;h=void 0!==s&&"number"==typeof s?s:(e=>e/3+250)(o),a.style.overflow="hidden",a.style.height=0,r&&(a.style.paddingTop=0),l&&(a.style.paddingBottom=0),c&&(a.style.marginTop=0),d&&(a.style.marginBottom=0);const u=(new Date).getTime(),p=()=>{const e=(new Date).getTime()-u,t=e/h,s=axCurves[n](t),m=0+o*s,f=0+r*s,g=0+l*s,v=0+c*s,x=0+d*s;e<=h&&Math.ceil(m)=o||!o)&&(cancelAnimationFrame(y),i&&i())};return p(),a},axSlideUp=(e,t,i,s="easeOut")=>{axFalseReturn(e);let n=axIdToDom(e);if("none"!==window.getComputedStyle(n).display){const{height:e,paddingTop:a,paddingBottom:o,marginTop:r,marginBottom:l}=axArrHeight(n);let c;c=void 0!==i&&"number"==typeof i?i:(e=>e/3+250)(e),n.setAttribute("style","display: block; padding-top: 0; padding-bottom: 0;margin-top: 0; margin-bottom: 0;");const d=(new Date).getTime(),h=()=>{const i=(new Date).getTime()-d,u=i/c,p=axCurves[s](u),m=e+-e*p,f=a+-a*p,g=o+-o*p,v=r+-r*p,x=l+-l*p;i<=c&&Math.floor(m)>0?n.setAttribute("style",`overflow:hidden;display: block; padding-top: ${f}px; padding-bottom: ${g}px;margin-top: ${v}px; margin-bottom: ${x}px; height: ${m}px`):n.setAttribute("style","display: none");const y=requestAnimationFrame(h);(Math.floor(m)<=0||!e)&&(cancelAnimationFrame(y),t&&t())};h()}return n},axHeightUp=(e,t,i,s,n="easeOut")=>{axFalseReturn(e);let a=axIdToDom(e);const o=t&&t.height?t.height:axArrHeight(a).height,r=t&&t.paddingTop?t.paddingTop:axArrHeight(a).paddingTop,l=t&&t.paddingBottom?t.paddingBottom:axArrHeight(a).paddingBottom,c=t&&t.marginTop?t.marginTop:axArrHeight(a).marginTop,d=t&&t.marginBottom?t.marginBottom:axArrHeight(a).marginBottom;let h;h=void 0!==s&&"number"==typeof s?s:(e=>e/3+250)(o),a.style.overflow="hidden";const u=(new Date).getTime(),p=()=>{const e=(new Date).getTime()-u,t=e/h,s=axCurves[n](t),m=o+-o*s,f=r+-r*s,g=l+-l*s,v=c+-c*s,x=d+-d*s;e<=h&&Math.floor(m)>0?(a.style.height=m+"px",r&&(a.style.paddingTop=f+"px"),l&&(a.style.paddingBottom=g+"px"),c&&(a.style.marginTop=v+"px"),d&&(a.style.marginBottom=x+"px")):(a.style.height=0,r&&(a.style.paddingTop=0),l&&(a.style.paddingBottom=0),c&&(a.style.marginTop=0),d&&(a.style.marginBottom=0));const y=requestAnimationFrame(p);(Math.floor(m)<=0||!o)&&(cancelAnimationFrame(y),i&&i())};return p(),a},axSlideToggle=(e,t,i,s,n="easeOut")=>{axFalseReturn(e);let a=axIdToDom(e);return"none"===window.getComputedStyle(a).display?axSlideDown(a,t,s,n):axSlideUp(a,i,s,n),a},axFadeIn=(e,t=200,i="linear")=>{axFalseReturn(e);let s=axIdToDom(e);if(s){let e=window.getComputedStyle(s).display,n=window.getComputedStyle(s).opacity;if("none"===e){s.style.display="block",s.style.opacity=0;let e=(new Date).getTime(),n=()=>{let a=(new Date).getTime()-e,o=a/t,r=axCurves[i](o);a<=t&&r<=1?(s.style.display="block",s.style.opacity=r):(s.style.display="block",s.style.opacity=1);let l=requestAnimationFrame(n);r>=1&&cancelAnimationFrame(l)};n()}else if("none"!==e&&1!==Number(n)){let a=(new Date).getTime(),o=()=>{let r=(new Date).getTime()-a,l=r/t,c=axCurves[i](l)+Number(n);r<=t&&c<=1?(s.style.display=e,s.style.opacity=c):(s.style.display=e,s.style.opacity=1);let d=requestAnimationFrame(o);c>=1&&cancelAnimationFrame(d)};o()}}return s},axFadeOut=(e,t=200,i="linear")=>{axFalseReturn(e);let s=axIdToDom(e);if(s){let e=window.getComputedStyle(s).display,n=window.getComputedStyle(s).opacity;if("none"!==e||0!==Number(n)){s.style.opacity=n;let e=(new Date).getTime(),a=()=>{let o=(new Date).getTime()-e,r=o/t,l=Number(n)-axCurves[i](r);o<=t&&l>0?s.style.opacity=l:(s.style.opacity=0,s.style.display="none");let c=requestAnimationFrame(a);l<=0&&cancelAnimationFrame(c)};a()}}return s},axFadeToggle=(e,t=200,i="linear")=>{axFalseReturn(e);let s=axIdToDom(e);if(s){let e=window.getComputedStyle(s).display,n=window.getComputedStyle(s).opacity;"none"===e?axFadeIn(s,t,i):Number(n)<=.5?axFadeIn(s,t,i):(Number(n),axFadeOut(s,t,i))}return s},axShow=(e,t,i)=>{axFalseReturn(e);let s=axIdToDom(e);"visible"==t?s.style.visibility="visible":s.style.display=t||"block",i&&i()},axHide=(e,t,i)=>{axFalseReturn(e);let s=axIdToDom(e);"hidden"==t?s.style.visibility="hidden":s.style.display="none",i&&i()},axToggle=(e,t,i)=>{axFalseReturn(e);let s=axIdToDom(e);axIsVisible(s)?axHide(s,i):axShow(s,t)},axScrollTo=(e,t,i="easeOut")=>{let s=document.documentElement.scrollTop,n=(new Date).getTime(),a=e?axIdToDom(e).getBoundingClientRect().top:-s;t&&"number"==typeof t||(t=Math.abs(a)/4+1e3);let o=()=>{let e=(new Date).getTime()-n,r=e/t,l=s+a*axCurves[i](r);window.scrollTo(0,l),o.timer=requestAnimationFrame(o),e>=t&&(window.scrollTo(0,l),cancelAnimationFrame(o.timer))};return o(),e},axIcon={font:{success:'',error:'',warning:'',info:'',question:'',successFill:'',errorFill:'',warningFill:'',infoFill:'',questionFill:''},svg:{success:'',error:'',warning:'',info:'',question:''}},axImage={loadSvg:getComputedStyle(document.documentElement).getPropertyValue("--load-svg").trim().split('"')[1],loadSvgW:getComputedStyle(document.documentElement).getPropertyValue("--load-svg-w").trim().split('"')[1],loadGif:getComputedStyle(document.documentElement).getPropertyValue("--load-gif").trim().split('"')[1],imgAvatar:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTYwcHgiIGhlaWdodD0iMTYwcHgiIHZpZXdCb3g9IjAgMCAxNjAgMTYwIj4NCjxyZWN0IHk9IjAiIGZpbGw9IiNGRkZGRkYiIHdpZHRoPSI4MCIgaGVpZ2h0PSIxNjAiLz4NCjxyZWN0IHg9IjgwIiBmaWxsPSIjRjRGNEY0IiB3aWR0aD0iODAiIGhlaWdodD0iMTYwIi8+DQo8cGF0aCBmaWxsPSIjQjJCMkIyIiBkPSJNOTguOTE2LDk3LjI1MmMxMC4zOTMtNi4zODIsMTcuMzQtMTcuODUxLDE3LjM0LTMwLjkxNmMwLTE5Ljk5Mi0xNi4yNjYtMzYuMjU1LTM2LjI1Ny0zNi4yNTUNCgljLTE5Ljk5MiwwLTM2LjI1NSwxNi4yNjMtMzYuMjU1LDM2LjI1NWMwLDEzLjA2NCw2Ljk0NiwyNC41MzQsMTcuMzM4LDMwLjkxNkMzNC4xMTQsMTA1LjM3MSwxNC40NjcsMTMwLjM4NywxNC40NjcsMTYwaDEzMS4wNjYNCglDMTQ1LjUzMywxMzAuMzg3LDEyNS44ODUsMTA1LjM3MSw5OC45MTYsOTcuMjUyeiIvPg0KPC9zdmc+DQo=",imgNone:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2MHB4IiBoZWlnaHQ9IjE2MHB4IiB2aWV3Qm94PSIwIDAgMTYwIDE2MCI+DQo8cmVjdCBmaWxsPSIjRkZGRkZGIiB3aWR0aD0iMTYwIiBoZWlnaHQ9IjE2MCIvPg0KPGc+DQoJPGc+DQoJCTxnPg0KCQkJPHBhdGggZmlsbD0iI0M5Q0FDQSIgZD0iTTc5LjA4Nyw4Ny44Nkg2MS45ODNjLTEuNzE3LDAtMy4xMDgtMS4yMjMtMy4xMDktMi43M3YtMi4xMTFsOS4xNjMtNi45NThsMy4yODQsMi44NDENCgkJCQljMS43MDgsMS40ODYsNC40MjIsMS41ODUsNi4yNjIsMC4yMjhMOTMuMDcsNjcuNjI1bDYuMjI2LDUuNDc5YzAuNjI4LDAuNTkxLDAuODkyLDAuODU4LDEuNTgsMC44NTgNCgkJCQljMC40OTMsMCwwLjkwNC0wLjI0NCwxLjIxOS0wLjU4N2MwLjMzMy0wLjM2MywwLjMxMS0xLjIzOCwwLjMxMS0xLjY3MlY1Ny44MWMwLTMuMDE4LTIuNzgzLTUuNDY1LTYuMjE4LTUuNDY1SDYxLjk4Mw0KCQkJCWMtMy40MzUsMC02LjIxOCwyLjQ0Ny02LjIxOCw1LjQ2NXYyNy4zMmMwLDEuNDQ4LDAuNjU1LDIuODM5LDEuODIxLDMuODYzYzEuMTY3LDEuMDIzLDIuNzQ5LDEuNjAxLDQuMzk3LDEuNjAxaDE3LjA3MQ0KCQkJCWMwLjc5NSwwLDEuNTI1LTAuNTY3LDEuNTgyLTEuMjY1YzAuMDY1LTAuOC0wLjY1My0xLjQ2Ny0xLjU0Ny0xLjQ2N0w3OS4wODcsODcuODZ6IE01OC44NzUsNTcuODENCgkJCQljMC0xLjUwOSwxLjM5Mi0yLjczMiwzLjEwOS0yLjczMmgzNC4yMDNjMS43MTgsMCwzLjEwOSwxLjIyMywzLjEwOSwyLjczMnYxMS40MzRsLTQuMTIzLTMuNjI5DQoJCQkJYy0xLjE1Mi0wLjg1Ny0yLjg0LTAuODYtMy45OTYtMC4wMDhMNzUuNTg3LDc3LjAyOWMtMC42MTMsMC40NDktMS41MTMsMC40MTctMi4wODItMC4wNzVsLTMuMjg3LTIuODQNCgkJCQljLTEuMTU5LTAuOTkzLTIuOTg5LTEuMDQ0LTQuMjE2LTAuMTIxbC03LjEyNyw1LjQyTDU4Ljg3NSw1Ny44MUw1OC44NzUsNTcuODF6IE02Ny4wMDQsNjQuMjE1YzAsMS42NTgsMC45OTksMy4xNTMsMi41MywzLjc4Nw0KCQkJCWMxLjUzMiwwLjYzNSwzLjI5NSwwLjI4NSw0LjQ2Ny0wLjg4OGMxLjE3My0xLjE3MiwxLjUyMi0yLjkzNSwwLjg4OS00LjQ2NmMtMC42MzUtMS41MzEtMi4xMjktMi41MzEtMy43ODctMi41MzENCgkJCQljLTEuMDg3LDAtMi4xMywwLjQzMi0yLjg5OCwxLjJDNjcuNDM2LDYyLjA4Niw2Ny4wMDQsNjMuMTI3LDY3LjAwNCw2NC4yMTVMNjcuMDA0LDY0LjIxNXogTTEwMi4zMzgsNzkuNzM3DQoJCQkJYzMuNzM3LDMuNzMzLDMuNzM3LDkuNzg2LDAsMTMuNTJjLTMuNzM1LDMuNzM1LTkuNzg5LDMuNzM2LTEzLjUyMywwYy0zLjY4Mi0zLjc0NC0zLjY1NS05Ljc1NCwwLjA1Ny0xMy40NjMNCgkJCQlDOTIuNTgzLDc2LjA4Miw5OC41OTUsNzYuMDU2LDEwMi4zMzgsNzkuNzM3TDEwMi4zMzgsNzkuNzM3eiBNOTAuNzQ1LDkxLjMyNWMyLjI5NSwyLjI5NCw1Ljg4NiwyLjY1Nyw4LjU5MywwLjg2OWwtOS40NjItOS40NjQNCgkJCQljLTEuNzg3LDIuNzA2LTEuNDI0LDYuMjk4LDAuODY5LDguNTkyVjkxLjMyNXogTTEwMS4yNzIsOTAuMjU5YzEuNzgyLTIuNzA4LDEuNDE2LTYuMjk1LTAuODc1LTguNTg1DQoJCQkJYy0yLjI5My0yLjI5LTUuODc5LTIuNjU3LTguNTg3LTAuODc1TDEwMS4yNzIsOTAuMjU5eiBNMTAxLjI3Miw5MC4yNTkiLz4NCgkJPC9nPg0KCTwvZz4NCgk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIDU0LjgyMzcgMTEwLjU1MDgpIiBmaWxsPSIjQzlDQUNBIiBmb250LWZhbWlseT0iJ01pY3Jvc29mdFlhSGVpJyIgZm9udC1zaXplPSIxMi41ODc3Ij7mmoLml6Dlm77niYc8L3RleHQ+DQo8L2c+DQo8L3N2Zz4NCg==",empty:"data:image/svg+xml;base64,PHN2ZyB0PSIxNTg5ODk5NTI1MTA0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwLWlkPSIyNTI5IiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTExOC44MjY5NzEgMTM4LjQwOTE0M2E3Ljk2ODA0MSA3Ljk2ODA0MSAwIDAgMCA3LjkyMDYxMi03LjkyMDYxMlYxMTEuMzUxMDAzYTcuOTIwNjEyIDcuOTIwNjEyIDAgMSAwLTE1Ljg0MTIyNSAwdjE5LjE3MzA5OWE3Ljk2ODA0MSA3Ljk2ODA0MSAwIDAgMCA3LjkyMDYxMyA3LjkyMDYxM3ogbTE0LjU5NjIxOCAxNC41OTYyMThoMTkuMTg0OTU2YTcuOTIwNjEyIDcuOTIwNjEyIDAgMSAwIDAtMTUuODQxMjI0SDEzMy40MzUwNDZhNy45MjA2MTIgNy45MjA2MTIgMCAxIDAgMCAxNS44NDEyMjR6IG0tMjkuMTkyNDM3LTE1Ljc4MTkzOEg4NS4wNTc2NTNhNy45MjA2MTIgNy45MjA2MTIgMCAwIDAgMCAxNS44NDEyMjRoMTkuMTczMDk5YTcuOTIwNjEyIDcuOTIwNjEyIDAgMCAwIDAtMTUuODQxMjI0eiBtMTQuNTk2MjE5IDE0LjU4NDM2MWE3Ljk2ODA0MSA3Ljk2ODA0MSAwIDAgMC03LjkyMDYxMyA3LjkyMDYxMnYxOS4xNzMwOTlhNy45MjA2MTIgNy45MjA2MTIgMCAwIDAgMTUuODQxMjI1IDB2LTE5LjE0OTM4NWE3Ljk2ODA0MSA3Ljk2ODA0MSAwIDAgMC03LjkyMDYxMi03LjkyMDYxMnogbTc4OC41MDQwNyAxMTguMjc1NjFhMzguNzI1NjI4IDM4LjcyNTYyOCAwIDEgMCAzOC43MjU2MjggMzguNzI1NjI5IDM4LjY3ODIgMzguNjc4MiAwIDAgMC0zOC43NjEyLTM4Ljc4NDkxNXogbTAgNjEuNDkxNDZhMjIuODg0NDA0IDIyLjg4NDQwNCAwIDEgMSAyMi44ODQ0MDMtMjIuODg0NDAzIDIyLjkxOTk3NSAyMi45MTk5NzUgMCAwIDEtMjIuODg0NDAzIDIyLjg4NDQwM3pNNjkyLjUyNTkzMiA0Ny44NzkzOWEyMy41MDA5NzggMjMuNTAwOTc4IDAgMSAwLTIzLjUwMDk3OS0yMy41MDA5NzggMjMuNTAwOTc4IDIzLjUwMDk3OCAwIDAgMCAyMy41MDA5NzkgMjMuNTAwOTc4eiBtMC0zMS4zMDMwMTlhNy42NzE2MTEgNy42NzE2MTEgMCAxIDEtNy42NzE2MTEgNy42NzE2MTEgNy43MDcxODMgNy43MDcxODMgMCAwIDEgNy42NzE2MTEtNy42NzE2MTF6IG0wIDAiIGZpbGw9IiNlNmU2ZTYiIHAtaWQ9IjI1MzAiPjwvcGF0aD48cGF0aCBkPSJNMjc1Ljc2ODkyMyA5OTIuODE1NTUzYzAgMTEuMTQ1NzcyIDM4LjE1NjQ4MyAyMS4zNDI5NjcgOTkuODQ5NTE2IDI2Ljk2MzI4MmExMTk3LjE4NjMyMyAxMTk3LjE4NjMyMyAwIDAgMCAxOTkuOTEyNDYgMGM2MS45MDY0NjItNS41NzI4ODYgOTkuODQ5NTE1LTE1LjgxNzUxIDk5Ljg0OTUxNi0yNi45NjMyODJzLTM4LjE1NjQ4My0yMS4zNDI5NjctOTkuODQ5NTE2LTI2Ljk2MzI4MmExMTk3LjAyMDMyMiAxMTk3LjAyMDMyMiAwIDAgMC0xOTkuOTEyNDYgMGMtNjEuNjU3NDYxIDUuNTcyODg2LTk5Ljg0OTUxNSAxNS44MTc1MS05OS44NDk1MTYgMjYuOTYzMjgyeiBtMCAwIiBmaWxsPSIjZjBmMGYwIiBwLWlkPSIyNTMxIj48L3BhdGg+PHBhdGggZD0iTTU3MS4wMjUxNjIgNDgyLjg5NjQ5M2E3Ljc2NjQ2OSA3Ljc2NjQ2OSAwIDAgMC0xMS4xMzM5MTUgMGwtMTEuOTk5NDkgMTEuOTk5NDktMTEuOTk5NDkxLTExLjk5OTQ5YTcuODczMTgzIDcuODczMTgzIDAgMSAwLTExLjEzMzkxNCAxMS4xMzM5MTRsMTEuOTk5NDkgMTEuOTk5NDkxLTExLjk5OTQ5IDExLjk5OTQ5YTcuOTU2MTg0IDcuOTU2MTg0IDAgMSAwIDExLjI1MjQ4NiAxMS4yNTI0ODdsMTEuOTk5NDkxLTExLjk5OTQ5MSAxMS45OTk0OSAxMS45OTk0OTFhNy43NzgzMjYgNy43NzgzMjYgMCAwIDAgNS41NzI4ODYgMi4zNzE0NDEgNy41NzY3NTMgNy41NzY3NTMgMCAwIDAgNS41NzI4ODYtMi4zNzE0NDEgNy43NjY0NjkgNy43NjY0NjkgMCAwIDAgMC0xMS4xMzM5MTVsLTExLjk5OTQ5LTExLjk5OTQ5IDExLjk5OTQ5LTExLjk5OTQ5MWE4LjExMDMyOCA4LjExMDMyOCAwIDAgMC0wLjExODU3Mi0xMS4yNTI0ODZ6IG0tMTU0LjkwMjUxNCA0Ni4zOTcyMzlhNy44NzMxODMgNy44NzMxODMgMCAwIDAgNS41NzI4ODYgMi4zNzE0NDEgNy44NzMxODMgNy44NzMxODMgMCAwIDAgNS41NzI4ODYtMTMuNDgxNjQxbC0xMS45OTk0OTEtMTEuOTk5NDkxIDExLjk5OTQ5MS0xMS45OTk0OWE3Ljc2NjQ2OSA3Ljc2NjQ2OSAwIDAgMCAwLTExLjEzMzkxNSA3Ljk5MTc1NiA3Ljk5MTc1NiAwIDAgMC0xMS4yNjQzNDQgMGwtMTEuOTk5NDkxIDExLjk5OTQ5MS0xMS45OTk0OS0xMS45OTk0OTFhNy45OTE3NTYgNy45OTE3NTYgMCAwIDAtMTEuMjY0MzQ0IDAgNy43NjY0NjkgNy43NjY0NjkgMCAwIDAgMCAxMS4xMzM5MTVsMTEuOTk5NDkxIDExLjk5OTQ5LTExLjk5OTQ5MSAxMS45OTk0OTFhNy43NjY0NjkgNy43NjY0NjkgMCAwIDAgMCAxMS4xMzM5MTUgNy43NzgzMjYgNy43NzgzMjYgMCAwIDAgNS41NzI4ODYgMi4zNzE0NCA3LjU3Njc1MyA3LjU3Njc1MyAwIDAgMCA1LjU3Mjg4Ni0yLjM3MTQ0bDExLjk5OTQ5LTExLjk5OTQ5MXogbTU5Ljg3ODg4IDgzLjM5MTcxNmExMDcuMzkwNjk3IDEwNy4zOTA2OTcgMCAwIDAtNzcuNDUxMjU2IDMyLjY1NDc0IDcuOTU2MTg0IDcuOTU2MTg0IDAgMCAwIDAuMTE4NTcyIDExLjEzMzkxNSA3LjgzNzYxMiA3LjgzNzYxMiAwIDAgMCAxMS4xMzM5MTQtMC4xMTg1NzIgOTIuNjE2NjIxIDkyLjYxNjYyMSAwIDAgMSAxMzIuMzg1Njg0IDAgOC4xNTc3NTYgOC4xNTc3NTYgMCAwIDAgNS42OTE0NTcgMi4zNzE0NDEgNy44MjU3NTUgNy44MjU3NTUgMCAwIDAgNy4zMDQwMzgtNC44MjU4ODIgOC4wMTU0NyA4LjAxNTQ3IDAgMCAwLTEuNjEyNTgtOC42NTU3NTkgMTA3Ljc1ODI3MSAxMDcuNzU4MjcxIDAgMCAwLTc3LjU2OTgyOS0zMi41MzYxNjh6IG0wIDAiIGZpbGw9IiNkYmRiZGIiIHAtaWQ9IjI1MzIiPjwvcGF0aD48cGF0aCBkPSJNNzY4LjYwMTc1MyAzMTMuODcyMDQ5bC04Mi4xNDY3MS05MS42Nzk5MDJhOTQuMjI5MjAxIDk0LjIyOTIwMSAwIDAgMC03MC4xNDcyMTktMzEuMzAzMDE5SDI0Ni41MDUzNDRhODUuOTA1NDQzIDg1LjkwNTQ0MyAwIDAgMC04NS44NTgwMTUgODUuODU4MDE1djU2NC42NTE5MTRhODUuOTA1NDQzIDg1LjkwNTQ0MyAwIDAgMCA4NS44NTgwMTUgODUuODU4MDE1aDQ1OS40OTAzNzJhODUuOTA1NDQzIDg1LjkwNTQ0MyAwIDAgMCA4NS44NTgwMTQtODUuODU4MDE1VjM3NC42MTY1MDVhOTEuMDYzMzI3IDkxLjA2MzMyNyAwIDAgMC0yMy4yNjM4MzQtNjAuNzQ0NDU2eiBtLTk0LjAyNzYyOC04MS4xNjI1NjJsODIuMTQ2NzEgOTEuNjc5OTAyYTc3LjQyNzU0MyA3Ny40Mjc1NDMgMCAwIDEgMTQuMjI4NjQ1IDIzLjI2MzgzNGgtODUuNDkwNDQyYTM4Ljk2Mjc3MyAzOC45NjI3NzMgMCAwIDEtMzguOTc0NjMtMzguOTc0NjN2LTk1Ljg3NzM1MmE3Ny4yODUyNTYgNzcuMjg1MjU2IDAgMCAxIDI4LjA4OTcxNyAxOS45MjAxMDN6IG0xMDEuNDUwMjM4IDYwOC43MDE0MjhhNzAuMTIzNTA1IDcwLjEyMzUwNSAwIDAgMS03MC4wMjg2NDcgNzAuMDI4NjQ3SDI0Ni41MDUzNDRhNzAuMTIzNTA1IDcwLjEyMzUwNSAwIDAgMS03MC4wMjg2NDctNzAuMDI4NjQ3VjI3Ni43NDcxNDNhNzAuMTIzNTA1IDcwLjEyMzUwNSAwIDAgMSA3MC4wMjg2NDctNzAuMDI4NjQ3aDM2OS44MDI0OGE3OS40NDMyNjcgNzkuNDQzMjY3IDAgMCAxIDE0LjM0NzIxNyAxLjM2MzU3OHYxMDAuNTg0NjYyYTU0LjkxMDcxMiA1NC45MTA3MTIgMCAwIDAgNTQuODAzOTk3IDU0LjgwMzk5N2g4OS42OTk3NDlhODQuMzUyMTUgODQuMzUyMTUgMCAwIDEgMC44NjU1NzYgMTEuMTMzOTE1djQ2Ni43OTQ0MDl6IG0wIDAiIGZpbGw9IiNkYmRiZGIiIHAtaWQ9IjI1MzMiPjwvcGF0aD48L3N2Zz4="},axResult=(e,t)=>{axFalseReturn(e);let i=axIdToDom(e),s="";switch(t){case"success":s='\n ',i.querySelector("svg").classList.add("svg-success");break;case"error":s='\n \n ',i.querySelector("svg").classList.add("svg-error");break;case"question":s='\n \n ',i.querySelector("svg").classList.add("svg-question");break;case"info":s='\n \n ',i.querySelector("svg").classList.add("svg-info")}i.classList.add("ax-result-show"),-1==i.querySelector("svg").innerHTML.indexOf("svg-in-1")&&i.querySelector("svg").insertAdjacentHTML("beforeend",s)},axCreateContent=(e,t,i)=>{let s=e.content;if("html"==e.type&&"string"==typeof e.content&&"#"==e.content.substr(0,1))e.content=document.querySelector(e.content).innerHTML;else if("html"==e.type&&"function"==typeof e.content)e.content=e.content.call(t);else if("async"==e.type&&e.url)if(e.url.indexOf("#")>-1){let s=e.url.match(/(\S*)\#/)[1],n="#"+e.url.match(/\#(\S*)/)[1],a=e.content;axAjax({url:s,selector:n,before:t=>{e.content=t},success:s=>{e.content=s,t.content.innerHTML="function"==typeof a?a(s):s,i&&i()}})}else{let s=e.content;axAjax({url:e.url,before:t=>{e.content=t},success:n=>{e.content=n,t.content.innerHTML="function"==typeof s?s(n):n,i&&i()}})}else"iframe"==e.type&&e.url?(e.content=``,e.footerShow=!1):e.content?e.content=e.content:e.content="没有任何内容!";return"picture"==e.type&&e.url?e.content=`\n
\n
${e.name}
\n ${s}\n `:"video"==e.type&&e.url?e.content=`\n
\n
${e.name}
\n ${s}\n `:"audio"==e.type&&e.url&&(e.content=`\n
\n
${e.name}
\n ${s}\n `),e.content},axFooterBtns=(e,t)=>{let i=e.footerBreak?'
':"",s="";if(e.note&&(e.note=`
${e.note}
`),e.footerShow)if("right"==e.footerType){let t="",n="",a="";e.confirm.text&&(n=`${e.confirm.icon}${e.confirm.text}`),e.cancel.text&&(t=`${e.cancel.icon}${e.cancel.text}`),e.diy.text&&e.diy.callback?a=`${e.diy.icon}${e.diy.text}`:e.diy.text&&!e.diy.callback&&(a=`${e.diy.icon}${e.diy.text}`),s=`\n ${i}\n
\n
\n
\n ${e.note}\n
\n
${a}${t}${n}
\n
\n
\n `}else if("line"==e.footerType){let t="",i="",n="";e.confirm.text&&(i=`${e.confirm.icon}${e.confirm.text}`),e.cancel.text&&(t=`${e.cancel.icon}${e.cancel.text}`),e.diy.text&&e.diy.callback?n=`${e.diy.icon}${e.diy.text}`:e.diy.text&&!e.diy.callback&&(n=`${e.diy.icon}${e.diy.text}`),s=`\n
\n
${n}${t}${i}
${e.note}\n `}else{let t="",n="",a="";e.confirm.text&&(n=`${e.confirm.icon}${e.confirm.text}`),e.cancel.text&&(t=`${e.cancel.icon}${e.cancel.text}`),e.diy.text&&e.diy.callback?a=`${e.diy.icon}${e.diy.text}`:e.diy.text&&!e.diy.callback&&(a=`${e.diy.icon}${e.diy.text}`),s=`\n ${i}\n
${a}${t}${n}
\n
${e.note}\n `}else s="";return s},axLocalTime=(e,t)=>{let i,s,n,a,o;if(e){if(e=e.trim(),s=new Date(e),n=s instanceof Date&&!isNaN(s.getTime()),!n)return console.error('Date format must be "YYYY-MM-DD" or "YYYY/MM/DD"');i=e.replace(/-/g,"/"),a=new Date(i).getTime(),o=-1!==i.indexOf(":")?0:6e4*new Date(i).getTimezoneOffset()}else a=(new Date).getTime(),o=0;return t?a-o:a},axCreateData=(e,t=["src","cover","caption","type"],i="figure",s=["media","cover","caption","type"],n=["","","","image"],a)=>{let o=[],r="";return axTypeIs("String",e)&&"#"==e.substr(0,1)?o=axTplToArr(e,t,s,i,n):(axTypeIs("Array",e)||axTypeIs("Object",e)?r=JSON.stringify(e):axTypeIs("String",e)&&(r=e),o=axStrToArr(r,s,n)),a&&a(o),o} /*! * 插件:定义效果更好Hover操作;使用方法:new axHover('#id',{参数}) */;class axHover{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({timeout:50,interval:80,sensitivity:7,enter:()=>{},leave:()=>{},hold:""},t);let i=this;this.curX,this.curY,this.preX,this.preY,this.countTimer,this.leaveTimer,this.isActive=!1,this.options.hold?this.hold=axIdToDom(this.options.hold):this.hold="",this.track=e=>{i.curX=e.pageX,i.curY=e.pageY},this.compare=(e,t)=>{let s=i.preX-i.curX,n=i.preY-i.curY;Math.sqrt(s*s+n*n){i.compare(e,t)},i.options.interval))},this.init()}init(){let e=this;this.targetDom.addEventListener("mousemove",this.track),this.targetDom.addEventListener("mouseenter",(function(t){let i=this;e.preX=t.pageX,e.preY=t.pageY,e.isActive?clearTimeout(e.leaveTimer):e.countTimer=setTimeout((function(){e.compare(i,t)}),e.options.interval)})),this.targetDom.addEventListener("mouseleave",(function(t){let i=this;clearTimeout(e.countTimer),e.isActive&&(e.leaveTimer=setTimeout((function(){e.options.leave.call(e,i,t),e.isActive=!1}),e.options.timeout))})),this.hold&&(this.hold.onmouseenter=function(t){e.leaveTimer&&clearTimeout(e.leaveTimer),e.options.enter.call(e,e.targetDom,t)},this.hold.onmouseleave=function(t){clearTimeout(e.countTimer),e.leaveTimer=setTimeout((function(){e.options.leave.call(e,e.targetDom,t),e.isActive=!1}),e.options.timeout)})}} /*! * 插件:查看更多;使用方法:new axMore('#id',{参数}) */const axMores=[];class axMore{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({length:60,textFold:"展开",textUnfold:"收起",classFold:"ax-color-primary",classUnfold:"ax-color-primary"},t,this.targetDom),this.handlers={},this.html=this.targetDom.innerHTML,this.pureHtml=this.targetDom.textContent;let i=this,s=!0;this.event=function(){s?(i.targetDom.removeChild(this.previousSibling),this.innerHTML=i.options.textUnfold,this.setAttribute("class",i.options.classUnfold),this.insertAdjacentHTML("beforeBegin",i.text),s=!1,"unfold"in i.handlers&&i.emit("unfold","")):(i.targetDom.removeChild(this.previousSibling),this.innerHTML=i.options.textFold,this.setAttribute("class",i.options.classFold),this.insertAdjacentHTML("beforeBegin",i.ell),s=!0,"fold"in i.handlers&&i.emit("fold",""))},this.targetDom.getAttribute("axMore")?this.referName=this.targetDom.getAttribute("axMore"):this.referName="",this.init()}init(){this.text=this.pureHtml.trim().replace(/<[^>]+>/g,"").replace(/ +/g," "),this.ell=this.text.substring(0,this.options.length)+"...";let e=[...this.text].length,t=`${this.options.textFold}`;return e>this.options.length&&(this.targetDom.innerHTML=this.ell+t),this.targetDom.lastChild.onclick=this.event,this.referName&&(axIsEmpty(axMores)?axMores.push({name:this.referName,instance:this}):axMores.some(e=>e.name==this.referName)||axMores.push({name:this.referName,instance:this})),"load"in this.handlers&&this.emit("load",""),this}destroy(e){this.targetDom.lastChild.removeEventListener("click",this.event,!1),this.targetDom.innerHTML=this.html,e&&e.call(this)}updateContent(e,t){return e="string"==typeof e?"#"==e.substr(0,1)?document.querySelector(e).textContent:e:e.textContent,this.pureHtml=e,this.init(),"updated"in this.handlers&&this.emit("updated",""),t&&t.call(this),this}update(e,t){return this.options=axExtend(this.options,e),this.init(),"updated"in this.handlers&&this.emit("updated",""),t&&t.call(this),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axMore]").forEach(e=>{new axMore(e)}); /*! * 插件:手风琴折叠;使用方法:new axAccordion('#id',{参数}) */ const axAccordions=[];class axAccordion{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({index:"",cookie:"",active:"",disabled:"",multiple:!1,collapse:!0,trigger:"click"},t,this.targetDom);let i=this;this.handlers={},this.event=function(e){let t=this.parentElement.querySelector(".ax-panel-body"),s=i.elements.indexOf(this.parentElement);"none"===window.getComputedStyle(this.nextElementSibling).display?("show"in i.handlers&&i.emit("show",s),this.parentElement.classList.add("ax-show"),axSlideDown(t,(function(){"shown"in i.handlers&&i.emit("shown",s)})),i.options.cookie&&Cookies.set(i.options.cookie,s,{expires:365e3,path:"/"}),0==i.options.multiple&&axSiblings(this.parentElement,"",".ax-item").forEach(e=>{axSlideUp(e.querySelector(".ax-panel-body")),e.classList.remove("ax-show")})):("hide"in i.handlers&&i.emit("hide",s),this.parentElement.classList.remove("ax-show"),axSlideUp(t,(function(){"hidden"in i.handlers&&i.emit("hidden",s)})),i.options.cookie&&Cookies.set(i.options.cookie,"",{expires:365e3,path:"/"})),e.stopPropagation()},this.targetDom.getAttribute("axAccordion")?this.referName=this.targetDom.getAttribute("axAccordion"):this.referName="",this.init()}init(){let e=[],t=[];this.options.active&&(e=e.concat(axArrToDom(this.options.active)));let i=[...this.targetDom.children].filter(e=>e.classList.contains("ax-show"));i&&(e=e.concat(i)),this.options.disabled&&(t=t.concat(axArrToDom(this.options.disabled)));let s=[...this.targetDom.children].filter(e=>e.hasAttribute("disabled")||"true"==e.getAttribute("disabled"));if(s&&(t=t.concat(s)),this.elements=[...this.targetDom.children].filter(e=>e.classList.contains("ax-item")&&t.indexOf(e)<0),this.options.index&&(this.elements[this.options.index].classList.add("ax-show"),axSlideDown(this.elements[this.options.index].querySelector(".ax-panel-body"))),!this.options.collapse)for(let e=0;e-1&&(s.classList.add("ax-show"),axSlideDown(a)),t.indexOf(s)<0?n.addEventListener(this.options.trigger,this.event,!1):n.removeEventListener(this.options.trigger,this.event,!1);let o=n.querySelectorAll("a");for(let e=0;ee.name==this.referName)||axAccordions.push({name:this.referName,instance:this})),"load"in this.handlers&&this.emit("load","")}destroy(e){[...this.targetDom.children].filter(e=>e.classList.contains("ax-item")).forEach(e=>{e.querySelector(".ax-panel-header").removeEventListener(this.options.trigger,this.event,!1)}),e&&e.call(this)}update(e,t){return this.options=axExtend(this.options,e),this.init(),"updated"in this.handlers&&this.emit("updated",""),t&&t.call(this),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axAccordion]").forEach(e=>{new axAccordion(e)}); /*! * 插件:页签切换;使用方法:axTab('#id',{参数}) */ const axTabs=[];class axTab{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({index:"",cookie:"",trigger:"click",disabled:"",active:"ax-active",nav:".ax-tab-nav",content:".ax-tab-content"},t,this.targetDom);let i=this;this.handlers={},this.event=function(){let e=[...i.nav.children].indexOf(this);i.options.cookie&&Cookies.set(i.options.cookie,e,{expires:365e3,path:"/"});for(let e=0;e-1)for(let t=0;te.name==this.referName)||axTabs.push({name:this.referName,instance:this})),"load"in this.handlers&&this.emit("load","")}update(e,t){return this.options=axExtend(this.options,e),this.init(),"update"in this.handlers&&this.emit("update",""),t&&t.call(this),this}destroy(e){for(let e=0;e{new axTab(e)}); /*! * 插件:抽屉侧边窗;使用方法:new axDrawer({参数},'#id');#id是可选参数,可以从该dom获取参数值 */ const axDrawers=[];class axDrawer{constructor(e,t){this.options=axExtend({title:"",titleBreak:!0,overlay:!0,overlayClose:!0,placement:"right",size:"sm",padding:"ax-padding",offset:"100px",content:"",type:"html",url:"",close:!0,footerType:"center",footerShow:!0,footerBreak:!1,note:"",confirm:{text:"确定",classname:"",icon:"",callback:""},cancel:{text:"关闭",classname:"",icon:"",callback:""},diy:{text:"",classname:"",icon:"",url:"",target:"",callback:""}},e,t);this.handlers={},t&&t.getAttribute("axDrawer")?this.referName=t.getAttribute("axDrawer"):this.referName="",this.init()}init(){let e=this;return this.renderDom(),this.setAttribute(),1==this.options.content.nodeType?(this.content.innerHTML="",this.content.appendChild(this.options.content)):this.content.innerHTML=axCreateContent(this.options,this,(function(){axPreventScroll(e.wrapper,e.body)})),this.footer.innerHTML=axFooterBtns(this.options,this),this.targetDom.querySelectorAll("[confirm]").forEach(t=>{t.addEventListener("click",(function(){e.options.confirm.callback?e.options.confirm.callback.call(e):e.targetDom.querySelector("form")&&e.targetDom.querySelector("form").submit()}),!1)}),this.targetDom.querySelectorAll("[diy]").forEach(t=>{t.addEventListener("click",(function(){e.options.diy.callback&&e.options.diy.callback.call(e)}),!1)}),this.targetDom.querySelectorAll("[cancel]").forEach(t=>{t.addEventListener("click",(function(){e.options.cancel.callback?e.options.cancel.callback.call(e):e.hide()}),!1)}),this.targetDom.querySelectorAll("[close]").forEach(t=>{t.addEventListener("click",(function(){e.hide()}),!1)}),document.body.appendChild(this.targetDom),axPreventScroll(this.wrapper,this.body),axDrawers.push({name:this.referName,instance:this}),this}createTemplate(){return`\n
\n <% if(this.overlay){ %>
close<% } %>>
<% } %>\n
\n <% if(this.close){ %> <% } %>\n <% if(this.title){ %>
<% this.title %>
<% } %>\n <% if(this.title && this.titleBreak){ %>
<% } %>\n
\n <% if(this.padding){ %>
style="height:100%;"<% } %>> <% } %>\n
style="height:100%;"<% } %>><% this.content %>
\n <% if(this.padding){ %>
<% } %>\n
\n \n
\n
\n `}renderDom(){this.template=axTplEngine(this.createTemplate(),this.options),this.targetDom=axStrToDom(this.template),this.wrapper=this.targetDom.querySelector(".ax-drawer-wrapper"),this.targetDom.querySelector(".ax-drawer-overlay")&&(this.overlay=this.targetDom.querySelector(".ax-drawer-overlay")),this.content=this.targetDom.querySelector(".ax-drawer-content"),this.body=this.targetDom.querySelector(".ax-drawer-body"),this.targetDom.querySelector(".ax-drawer-footer")&&(this.footer=this.targetDom.querySelector(".ax-drawer-footer")),this.width=window.getComputedStyle(this.wrapper).width,this.height=window.getComputedStyle(this.wrapper).height,this.left=window.getComputedStyle(this.wrapper).left,this.right=window.getComputedStyle(this.wrapper).right,this.top=window.getComputedStyle(this.wrapper).top,this.bottom=window.getComputedStyle(this.wrapper).bottom}setAttribute(){if("left"==this.options.placement)this.targetDom.setAttribute("data-placement","left");else if("right"==this.options.placement)this.targetDom.setAttribute("data-placement","right");else if("top"==this.options.placement)this.targetDom.setAttribute("data-placement","top");else{if("bottom"!=this.options.placement)return;this.targetDom.setAttribute("data-placement","bottom")}if("sm"==this.options.size)this.targetDom.setAttribute("data-size","sm");else if("md"==this.options.size)this.targetDom.setAttribute("data-size","md");else{if("lg"!=this.options.size)return;this.targetDom.setAttribute("data-size","lg")}}show(e){"show"in this.handlers&&this.emit("show",""),this.delete&&console.error("Instance is destroyed!");return axDrawers.forEach(e=>{if(e.instance.targetDom.classList.contains("ax-drawer-show")&&e.instance.options.placement==this.options.placement){let t=e.instance.targetDom.querySelector(".ax-drawer-wrapper");switch(this.options.placement){case"left":t.style.left?t.style.left=parseInt(t.style.left)+parseInt(this.options.offset)+"px":t.style.left=this.options.offset;break;case"right":t.style.right?t.style.right=parseInt(t.style.right)+parseInt(this.options.offset)+"px":t.style.right=this.options.offset;break;case"top":t.style.top?t.style.top=parseInt(t.style.top)+parseInt(this.options.offset)+"px":t.style.top=this.options.offset;break;case"bottom":t.style.bottom?t.style.bottom=parseInt(t.style.bottom)+parseInt(this.options.offset)+"px":t.style.bottom=this.options.offset}}}),this.targetDom.classList.add("ax-drawer-show"),e&&e.call(this),"shown"in this.handlers&&this.emit("shown",""),this}hide(e){"hide"in this.handlers&&this.emit("hide","");return function(e){let t=e.targetDom.querySelector(".ax-drawer-overlay"),i=e.targetDom.querySelector(".ax-drawer-wrapper");switch(t.style.opacity=0,e.options.placement){case"left":i.style.left="-"+getComputedStyle(i).width;break;case"right":i.style.right="-"+getComputedStyle(i).width;break;case"top":i.style.top="-"+getComputedStyle(i).height;break;case"bottom":i.style.bottom="-"+getComputedStyle(i).height}setTimeout((function(){e.targetDom.classList.remove("ax-drawer-show"),t.removeAttribute("style"),i.removeAttribute("style")}),1e3*parseFloat(axStyle(i).animationDuration))}(this),axDrawers.forEach(e=>{if(e.instance.targetDom.classList.contains("ax-drawer-show")&&e.instance.options.placement==this.options.placement){let t=e.instance.targetDom.querySelector(".ax-drawer-wrapper");switch(this.options.placement){case"left":t.style.left=parseInt(t.style.left)-parseInt(this.options.offset)+"px";break;case"right":t.style.right=parseInt(t.style.right)-parseInt(this.options.offset)+"px";break;case"top":t.style.top=parseInt(t.style.top)-parseInt(this.options.offset)+"px";break;case"bottom":t.style.bottom=parseInt(t.style.bottom)-parseInt(this.options.offset)+"px"}}}),this.targetDom.querySelectorAll("video,audio").forEach(e=>{e.pause()}),e&&e.call(this),"hidden"in this.handlers&&this.emit("hidden",""),this}destroy(e){this.targetDom.remove(),e&&e.call(this)}update(e,t){"update"in this.handlers&&this.emit("update","");let i=this.targetDom,s=axClone(this.options),n=axExtend(this.options,e),a=!1;return e&&JSON.stringify(n)!=JSON.stringify(s)?(this.options=n,this.init(),i.remove(),a=!0):a=!1,t&&t.call(this,a,s,n),"updated"in this.handlers&&this.emit("updated",""),this}updateContent(e,t){"update"in this.handlers&&this.emit("update","");let i=this.content.innerHTML,s=!1;return"#"==e.substr(0,1)?document.querySelector(e)?this.content.innerHTML=document.querySelector(e).innerHTML:this.content.innerHTML:this.content.innerHTML=e,s=this.content.innerHTML!=i,t&&t.call(this,s,i,this.content.innerHTML,this.options.content),"updated"in this.handlers&&this.emit("updated",""),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}!function e(t,i){t.forEach(t=>{let s=new axDrawer("",t);i&&(s.targetDom.style.zIndex=parseInt(getComputedStyle(i.targetDom).zIndex)+1),t.onclick=()=>s.show(),e(s.targetDom.querySelectorAll("[axDrawer]"),s)})}([...document.querySelectorAll("[axDrawer]")].filter(e=>axIsVisible(e))); /*! * 插件:对话弹窗;使用方法:new axDialog({参数},'#id');#id是可选参数,可以从该dom获取参数值 */ const axDialogs=[];class axDialog{constructor(e,t){this.options=axExtend({title:"",titleBreak:!1,overlay:!0,overlayClose:!0,duration:"",in:"springIn",out:"scaleOut",multiple:!0,size:"md",padding:"ax-padding",drag:!1,content:"",type:"html",url:"",btnClass:"ax-dialog-open",name:"",width:"",height:"",close:!0,closePlace:"inside",footerShow:!0,footerType:"center",footerBreak:!1,note:"",confirm:{text:"确定",classname:"",icon:"",callback:""},cancel:{text:"关闭",classname:"",icon:"",callback:""},diy:{text:"",classname:"",icon:"",url:"",target:"",callback:""}},e,t),this.wrapper="",this.content="",this.overlay="",this.handlers={},this.wrapPosition="",this.wrapLeft="",this.wrapTop="",this.referName="",t&&(this.button=axIdToDom(t),this.button&&this.button.getAttribute("axDialog")&&(this.referName=this.button.getAttribute("axDialog"))),this.init()}init(){let e=this;return this.renderDom(),this.setAttribute(),1==this.options.content.nodeType?(this.content.innerHTML="",this.content.appendChild(this.options.content)):this.content.innerHTML=axCreateContent(this.options,this,(function(){axPreventScroll(e.wrapper,e.body)})),this.footer.innerHTML=axFooterBtns(this.options,this),this.options.drag&&this.drag(),this.targetDom.querySelectorAll("[confirm]").forEach(t=>{t.addEventListener("click",(function(){e.options.confirm.callback?e.options.confirm.callback.call(e):e.targetDom.querySelector("form")&&e.targetDom.querySelector("form").submit()}),!1)}),this.targetDom.querySelectorAll("[diy]").forEach(t=>{t.addEventListener("click",(function(){e.options.diy.callback&&e.options.diy.callback.call(e)}),!1)}),this.targetDom.querySelectorAll("[cancel]").forEach(t=>{t.addEventListener("click",(function(){e.options.cancel.callback?e.options.cancel.callback.call(e):e.hide()}),!1)}),this.targetDom.querySelectorAll("[close]").forEach(t=>{t.addEventListener("click",(function(){e.hide()}),!1)}),document.body.appendChild(this.targetDom),axPreventScroll(this.wrapper,this.body),this.referName&&(axIsEmpty(axDialogs)?axDialogs.push({name:this.referName,instance:this}):axDialogs.some(e=>e.name==this.referName)||axDialogs.push({name:this.referName,instance:this})),this.wrapperHeight=axArrHeight(this.wrapper).height,this}createTemplate(){return`\n
\n <% if(this.overlay){ %>
close<% } %>>
<% } %>\n
\n <% if(this.close){ %><% } %>\n <% if(this.title){ %>
<% this.title %>
<% } %>\n <% if(this.titleBreak){ %>
<% } %>\n
\n <% if(typeof this.padding == 'string'){ %>
<% }else if(this.padding){ %>
<% } %>\n
<% this.content %>
\n <% if(this.padding){ %>
<% } %>\n
\n \n
\n
\n `}renderDom(){this.template=axTplEngine(this.createTemplate(),this.options),this.targetDom=axStrToDom(this.template),this.wrapper=this.targetDom.querySelector(".ax-dialog-wrapper"),this.header=this.targetDom.querySelector(".ax-dialog-header"),this.content=this.targetDom.querySelector(".ax-dialog-content"),this.body=this.targetDom.querySelector(".ax-dialog-body"),this.overlay=this.targetDom.querySelector(".ax-dialog-overlay"),this.footer=this.targetDom.querySelector(".ax-dialog-footer")}setAttribute(){this.options.size&&this.targetDom.setAttribute("data-size",this.options.size),this.options.footerType&&this.targetDom.setAttribute("data-footerType",this.options.footerType),this.options.height&&(this.content.style.height=this.options.height),this.oldStyle=this.options.width?`width:${this.options.width};`:null,this.options.type&&this.targetDom.setAttribute("data-type",this.options.type),!this.options.overlay&&this.targetDom.setAttribute("data-overlay","false"),!this.options.title&&this.options.close?"lg"==this.options.size?this.targetDom.setAttribute("data-closePlace","bottom"):this.options.title||"inside"!=this.options.closePlace?this.targetDom.setAttribute("data-closePlace",this.options.closePlace):this.targetDom.setAttribute("data-closePlace","outside"):this.options.closePlace&&this.options.close&&this.targetDom.setAttribute("data-closePlace",this.options.closePlace)}drag(e){if(!this.options.title)return!1;{let t=this,i=this.targetDom.querySelector(".ax-dialog-header");this.targetDom.setAttribute("data-drag",this.options.drag),i.onmousedown=function(e){"drag"in t.handlers&&t.emit("drag",""),this.style.cursor="move";let i=this.parentNode;i.style.cssText+="position:fixed ;",t.wrapPosition="fixed";let s=e.clientX-i.offsetLeft,n=e.clientY-i.offsetTop;document.onmousemove=function(e){let a=e.clientX-s,o=e.clientY-n,r=document.documentElement.clientWidth-i.clientWidth,l=document.documentElement.clientHeight-i.clientHeight;a<0&&(a=0),a>r&&(a=r),o<0&&(o=0),o>l&&(o=l),i.style.left=a+"px",i.style.top=o+"px",t.wrapLeft=i.style.left,t.wrapTop=i.style.top}},i.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,"dragged"in t.handlers&&t.emit("dragged","")},i.ondragstart=function(e){axPreventDefault(e)},i.ondragend=function(e){axPreventDefault(e)},e&&e.call(this)}return this}update(e,t){let i=this.targetDom,s=axClone(this.options),n=axExtend(this.options,e),a=!1;return e&&JSON.stringify(n)!=JSON.stringify(s)?(this.options=n,this.init(),i.remove(),a=!0):a=!1,t&&t.call(this,a,s,n),this}updateContent(e,t){let i=this.content.innerHTML,s=!1;return"#"==e.substr(0,1)?document.querySelector(e)?this.content.innerHTML=document.querySelector(e).innerHTML:this.content.innerHTML:this.content.innerHTML=e,s=this.content.innerHTML!=i,t&&t.call(this,s,i,this.content.innerHTML,this.options.content),"updated"in this.handlers&&this.emit("updated",""),this}destroy(e){this.targetDom.remove(),e&&e.call(this)}show(e){this.delete&&console.error("Instance is destroyed!");let t=this;t.options.multiple||axDialogs.forEach(e=>{e.instance!=t&&e.instance.targetDom.classList.contains("ax-dialog-show")&&e.instance.hide()}),"show"in this.handlers&&this.emit("show",""),this.targetDom.classList.remove("ax-dialog-hide"),this.targetDom.classList.add("ax-dialog-show"),this.button&&this.button.classList.add(this.options.btnClass),this.options.duration&&(this.wrapper.style.animationDuration=this.options.duration);let i="";return this.wrapPosition&&(i=`position:${this.wrapPosition};left:${this.wrapLeft};top:${this.wrapTop};`),"slideDown"==this.options.in?axHeightDown(t.wrapper,{height:this.wrapperHeight},"",t.options.duration?parseFloat(t.options.duration):""):this.options.in&&(this.wrapper.style.cssText=`animation-name: ${this.options.in};${i};${this.oldStyle}`),e&&e.call(this),"shown"in this.handlers&&this.emit("shown",""),this}hide(e){"hide"in this.handlers&&this.emit("hide","");let t=this;this.button&&this.button.classList.remove("ax-dialog-open"),this.options.duration&&(this.targetDom.style.animationDuration=this.options.duration),this.targetDom.classList.add("ax-dialog-hide");let i="";return this.wrapPosition&&(i=`position:${this.wrapPosition};left:${this.wrapLeft};top:${this.wrapTop};`),"slideUp"==this.options.out?axHeightUp(t.wrapper,{height:this.wrapperHeight},"",t.options.duration?parseFloat(t.options.duration):""):this.options.out&&(this.wrapper.style.cssText=`animation-name: ${this.options.out};${i};${this.oldStyle}`),setTimeout((function(){t.targetDom.classList.remove("ax-dialog-show"),t.wrapper.style.cssText=t.oldStyle}),t.options.duration?parseFloat(t.options.duration):1e3*parseFloat(axStyle(t.wrapper).animationDuration)),this.targetDom.querySelectorAll("video,audio").forEach(e=>{e.pause()}),e&&e.call(this),"hidden"in this.handlers&&this.emit("hidden",""),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}!function e(t,i){t.forEach(t=>{let s=new axDialog("",t);i&&(s.targetDom.style.zIndex=parseInt(getComputedStyle(i.targetDom).zIndex)+1),t.onclick=()=>s.show(),e(s.targetDom.querySelectorAll("[axDialog]"),s)})}([...document.querySelectorAll("[axDialog]")].filter(e=>axIsVisible(e))); /*! * 插件:气泡弹窗;使用方法:new axHover('#id',{参数}) */ const axPopups=[];class axPopup{constructor(e,t){this.options=axExtend({title:"",titleBreak:!1,placement:"top",arrow:!0,trigger:"click",pageClose:!0,size:"",duration:"",in:"fadeIn",out:"fadeOut",multiple:!1,offsetShow:!0,rel:"",theme:"",stay:!1,fixDistance:24,name:"",size:"md",width:"",height:"",padding:"ax-padding",content:"",type:"html",url:"",btnClass:"ax-popup-open",close:!0,footerShow:!0,footerType:"line",footerBreak:!1,note:"",confirm:{text:"确定",classname:"",icon:"",callback:""},cancel:{text:"关闭",classname:"",icon:"",callback:""},diy:{text:"",classname:"",icon:"",url:"",target:"",callback:""}},t,e);this.handlers={},this.button=axIdToDom(e),this.button&&this.button.getAttribute("axPopup")?this.referName=this.button.getAttribute("axPopup"):this.referName="",this.init(),this.showEvent()}init(){let e=this;this.renderDom(),this.setAttribute(),1==this.options.content.nodeType?(this.content.innerHTML="",this.content.appendChild(this.options.content)):this.content.innerHTML=axCreateContent(this.options,this,()=>{axPreventScroll(e.wrapper,e.body)}),this.footer.innerHTML=axFooterBtns(this.options,this),this.createPopup(),this.targetDom.querySelectorAll("[confirm]").forEach(t=>{t.addEventListener("click",()=>{e.options.confirm.callback?e.options.confirm.callback.call(e):e.targetDom.querySelector("form")&&e.targetDom.querySelector("form").submit()},!1)}),this.targetDom.querySelectorAll("[diy]").forEach(t=>{t.addEventListener("click",()=>{e.options.diy.callback&&e.options.diy.callback.call(e)},!1)}),this.targetDom.querySelectorAll("[cancel]").forEach(t=>{t.addEventListener("click",()=>{e.options.cancel.callback?e.options.cancel.callback.call(e):e.hide()},!1)}),this.targetDom.querySelectorAll("[close]").forEach(t=>{t.addEventListener("click",()=>{e.hide()},!1)}),document.body.appendChild(this.targetDom),axPreventScroll(this.wrapper,this.body),axPopups.push({name:this.referName,button:this.button,instance:this}),this.wrapperHeight=axArrHeight(this.wrapper).height}createTemplate(){return`\n
\n
\n <% if(this.close){ %><% } %>\n <% if(this.title){ %>
<% this.title %>
<% } %>\n <% if(this.titleBreak){ %>
<% } %>\n
\n <% if(typeof this.padding == 'string'){ %>
<% }else if(this.padding){ %>
<% } %>\n <% this.media %>\n
<% this.content %>
\n <% if(this.padding){ %>
<% } %>\n
\n \n
\n <% if(this.arrow && this.placement!=='center' && !axIsMobi()){ %><% } %>\n
\n `}renderDom(){this.template=axTplEngine(this.createTemplate(),this.options),this.targetDom=axStrToDom(this.template),this.wrapper=this.targetDom.querySelector(".ax-popup-wrapper"),this.content=this.targetDom.querySelector(".ax-popup-content"),this.body=this.targetDom.querySelector(".ax-popup-body"),this.targetDom.querySelector(".ax-popup-header")&&(this.header=this.targetDom.querySelector(".ax-popup-header")),this.footer=this.targetDom.querySelector(".ax-popup-footer")}setAttribute(){this.options.size&&this.targetDom.setAttribute("data-size",this.options.size),!this.options.arrow&&this.targetDom.setAttribute("data-arrow","false"),this.options.type&&this.targetDom.setAttribute("data-type",this.options.type),this.options.footerType&&this.targetDom.setAttribute("data-footerType",this.options.footerType),this.options.height&&(this.content.style.height=this.options.height),this.options.theme&&this.targetDom.setAttribute("data-theme",this.options.theme)}createPopup(){let e=this;"center"==this.options.placement||axIsMobi()?this.popper=new Popper.createPopper(this.button,this.targetDom,{strategy:"fixed",modifiers:[{name:"computeStyles",fn:e=>{e.state.styles.popper=Object.assign(e.state.styles.popper,{left:"50%",top:"50%",marginLeft:-parseFloat(axStyle(e.state.elements.popper).width)/2+"px",marginTop:-parseFloat(axStyle(e.state.elements.popper).height)/2+"px"})}}]}):this.popper=new Popper.createPopper(this.button,this.targetDom,{fixDistance:this.options.fixDistance,placement:this.options.placement,modifiers:[{name:"offset",options:{offset:[0,e.options.offsetShow?e.options.arrow?8:4:0]}},{name:"computeStyles",options:{gpuAcceleration:!1}}]}),this.oldStyle=this.options.width?`width:${this.options.width};`:""}showEvent(){let e=this,t=()=>{if(e.targetDom.classList.contains("ax-show"))e.hide();else if(e.show(),!e.options.multiple){axPopups.map(e=>e.instance).filter(t=>t!==e&&t.targetDom.classList.contains("ax-show")).forEach(e=>{e.hide()})}};"click"==this.options.trigger?(this.button.addEventListener(this.options.trigger,()=>{t()},!1),this.options.rel&&this.options.rel instanceof Array?this.options.rel.forEach(e=>{document.querySelector(e).addEventListener(this.options.trigger,()=>{t()},!1)}):this.options.rel&&axIdToDom(this.options.rel).addEventListener(this.options.trigger,()=>{t()},!1)):"hover"==this.options.trigger?new axHover(e.button,{enter:()=>{e.show()},leave:()=>{e.hide()},hold:e.targetDom}):"input"==this.options.trigger&&this.button.addEventListener("input",()=>{e.button.value?e.show():e.hide()},!1),this.options.pageClose&&!e.options.multiple&&document.addEventListener("click",t=>{let i;if(e.options.rel instanceof Array)for(let t=0;t{t.targetDom.classList.remove("ax-show"),"hidden"in t.handlers&&t.emit("hidden","")},t.options.duration?parseFloat(t.options.duration):1e3*parseFloat(axStyle(t.targetDom).animationDuration)),"slideUp"==this.options.out?axHeightUp(t.wrapper,{height:this.wrapperHeight},"",t.options.duration?parseFloat(t.options.duration):""):this.options.out&&(this.targetDom.style.animationName=this.options.out),this.targetDom.style.cssText+=`;${this.oldStyle}`,this.targetDom.querySelectorAll("video,audio").forEach(e=>{e.pause()}),e&&e.call(this)}return this}destroy(e){this.targetDom.remove(),this.popper="",e&&e.call(this)}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}!function e(t,i){t.forEach(t=>{let s=new axPopup(t,"");i&&(s.targetDom.style.zIndex=parseInt(getComputedStyle(i.targetDom).zIndex)+1),e(s.targetDom.querySelectorAll("[axPopup]"),s)})}([...document.querySelectorAll("[axPopup]")].filter(e=>axIsVisible(e))); /*! * 插件:即时消息/警告小窗;使用方法:new axMessage({参数}) */ const axMessages=[];class axMessage{constructor(e){this.options=axExtend({className:"",placement:"center-top",content:"",result:"info",delay:3e3,progress:!0,title:{warning:"操作警告!",success:"操作成功!",error:"操作失败!",question:"操作疑问!",info:"信息提示!"},close:!1,iconShow:!1,style:"simple",icon:""},e),this.handlers={},this.init()}init(){let e=this;if("simple"!=this.options.style&&this.options.style){if("complex"==this.options.style)switch(this.options.result){case"success":this.options.icon=axIcon.svg.success;break;case"error":this.options.icon=axIcon.svg.error;break;case"question":this.options.icon=axIcon.svg.question;break;case"warning":this.options.icon=axIcon.svg.warning;break;default:this.options.icon=axIcon.svg.info}}else switch(this.options.result){case"success":this.options.icon=axIcon.font.success,!this.options.content&&(this.options.content=this.options.title.success);break;case"error":this.options.icon=axIcon.font.error,!this.options.content&&(this.options.content=this.options.title.error);break;case"question":this.options.icon=axIcon.font.question,!this.options.content&&(this.options.content=this.options.title.question);break;case"warning":this.options.icon=axIcon.font.warning,!this.options.content&&(this.options.content=this.options.title.warning);break;default:this.options.icon=axIcon.font.info,!this.options.content&&(this.options.content=this.options.title.info)}switch("simple"!=this.options.style&&this.options.style?"complex"==this.options.style&&(this.template=axTplEngine('\n
\n
\n
\n <% if(this.iconShow){ %><% this.icon %><% } %>\n <% if(this.result == \'success\'){ %> <% this.title.success %> <% }else if(this.result == \'error\'){ %> <% this.title.error %> <% }else if(this.result == \'question\'){%> <% this.title.question %> <% }else if(this.result == \'warning\'){%> <% this.title.warning %> <% } else {%> <% this.title.info %> <% } %>
\n
<% this.content %>
\n
\n <% if(this.close){ %> <% } %>\n <% if(this.progress){ %>
<% } %>\n
\n ',this.options)):this.template=axTplEngine('\n
\n
\n <% if(this.iconShow){ %><% this.icon %><% } %>\n
<% this.content %>
\n <% if(this.close){ %> <% } %>\n
\n
\n ',this.options),this.targetDom=axStrToDom(this.template),this.content=this.targetDom.querySelector(".ax-message-body"),this.title=this.targetDom.querySelector(".ax-message-title"),this.close=this.targetDom.querySelector(".ax-close"),this.progress=this.targetDom.querySelector(".ax-message-progress"),this.options.result){case"success":this.targetDom.setAttribute("data-result","success");break;case"error":this.targetDom.setAttribute("data-result","error");break;case"question":this.targetDom.setAttribute("data-result","question");break;case"warning":this.targetDom.setAttribute("data-result","warning");break;default:this.targetDom.setAttribute("data-result","info")}let t="";switch(t=this.options.className?"":" "+this.options.className,this.options.close&&this.targetDom.setAttribute("data-close","true"),this.content.innerHTML=this.options.content,this.event=i=>{if(-1===JSON.stringify(axMessages).indexOf(i)){let s=axAddElem("div",{class:"ax-message"+t,"data-placement":i});axMessages.push({postion:i,parent:s}),s.appendChild(e.targetDom),document.body.appendChild(s),axSlideDown(e.targetDom,()=>{"shown"in e.handlers&&e.emit("shown","")}),e.options.close?e.close.addEventListener("click",()=>{axSlideUp(e.targetDom,()=>{e.targetDom.remove(),"hidden"in e.handlers&&e.emit("hidden","")})},!1):(e.options.progress&&e.progress&&(e.progress.style.cssText+="width:0;"),setTimeout(()=>{axSlideUp(e.targetDom,()=>{e.targetDom.remove(),"hidden"in e.handlers&&e.emit("hidden","")})},this.options.delay))}else{axMessages.find(e=>e.postion==i).parent.insertAdjacentElement("beforeend",e.targetDom),axSlideDown(e.targetDom,()=>{"shown"in e.handlers&&e.emit("shown","")}),e.options.close?e.close.addEventListener("click",()=>{axSlideUp(e.targetDom,()=>{e.targetDom.remove(),"hidden"in e.handlers&&e.emit("hidden","")})},!1):(e.options.progress&&e.progress&&(e.progress.style.cssText+="width:0;"),setTimeout(()=>{axSlideUp(e.targetDom,()=>{e.targetDom.remove(),"hidden"in e.handlers&&e.emit("hidden","")})},this.options.delay))}},this.options.placement){case"left-top":this.event("left-top");break;case"center-top":this.event("center-top");break;case"right-top":this.event("right-top");break;case"left-center":this.event("left-center");break;case"center-center":this.event("center-center");break;case"right-center":this.event("right-center");break;case"left-bottom":this.event("left-bottom");break;case"center-bottom":this.event("center-bottom");break;case"right-bottom":this.event("right-bottom");break;case"left":this.event("left-top");break;case"top":this.event("center-top");break;case"right":this.event("right-top");break;case"center":this.event("center-center");break;default:this.event("center-top")}return this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}} /*! * 插件:纵向折叠菜单;使用方法:new axMenu('#id',{参数}) */const axMenus=[];class axMenu{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({active:"",disabled:"",toggle:!0,cookie:"",collapse:!0,trigger:"click",dispose:!1,url:"",row:!1,headerWidth:"",dropWidth:"",gutter:""},t,this.targetDom);let i=this;this.handlers={},this.ul=this.targetDom.querySelectorAll("ul"),this.li=this.targetDom.querySelectorAll("li"),this.a=this.targetDom.querySelectorAll("a"),this.showUl=function(e,t){let s=e.parentElement;"show"in i.handlers&&i.emit("show",t),s.classList.add("ax-active"),e.setAttribute("aria-expand","true"),axSlideDown(s.querySelector("ul"),()=>{"shown"in i.handlers&&i.emit("shown",t)})},this.closeUl=function(e,t){let s=e.parentElement;"hide"in i.handlers&&i.emit("hide",t),s.classList.remove("ax-active"),e.setAttribute("aria-expand","false"),axSlideUp(s.querySelector("ul"),(function(){"hidden"in i.handlers&&i.emit("hidden",t)}))},this.event=function(){let e=this.parentElement,t=axSiblings(e),s=[...i.a].filter(e=>e!==this),n="";i.li.forEach((t,i)=>{t==e&&(n=i)}),"false"==this.getAttribute("aria-child")&&(this.classList.add("ax-selected"),s.forEach(e=>{e.classList.remove("ax-selected")}),"selected"in i.handlers&&i.emit("selected",n)),e.querySelector("ul")&&("none"===window.getComputedStyle(e.querySelector("ul")).display?(i.showUl(this,n),i.options.toggle&&t&&t.forEach(e=>{e.classList.remove("ax-active"),e.querySelector("ul")&&axSlideUp(e.querySelector("ul"))})):i.closeUl(this,n)),i.options.cookie&&Cookies.set(i.options.cookie,n,{expires:365e3,path:"/"})},this.targetDom.getAttribute("axMenu")?this.referName=this.targetDom.getAttribute("axMenu"):this.referName="",this.init()}init(){let e=this,t=[],i=[];if(this.options.row&&(this.targetDom.classList.add("ax-menu-row"),this.options.headerWidth&&axChildren(this.targetDom,"li").forEach(e=>{e.style.width=this.options.headerWidth}),this.options.gutter&&axChildren(this.targetDom,"li").forEach(e=>{e.style.marginLeft=this.options.gutter,e.style.marginRight=this.options.gutter}),this.options.dropWidth&&axChildren(this.targetDom,"li").forEach(e=>{let t=e.querySelector("ul");t&&(t.style.width=this.options.dropWidth)})),this.options.active&&(t=t.concat(axArrToDom(this.options.active))),this.targetDom.querySelectorAll("a.ax-selected")&&(t=t.concat([...this.targetDom.querySelectorAll(".ax-selected")])),this.options.disabled&&(i=i.concat(axArrToDom(this.options.disabled))),this.targetDom.querySelectorAll("[aria-disabled=true]")&&(i=i.concat([...this.targetDom.querySelectorAll("[aria-disabled=true]")])),this.options.collapse||(this.li.forEach(e=>{e.classList.add("ax-active")}),this.ul.forEach(e=>{axSlideDown(e)})),axIsEmpty(t)){if(!this.options.active&&this.options.cookie){let e=Cookies.get(this.options.cookie),t=this.targetDom.querySelectorAll("li")[e];t&&(axParents(t,this.targetDom,!0,!1).forEach(e=>{"LI"==e.nodeName?(e.classList.add("ax-active"),e.querySelector("a").setAttribute("aria-expand","true"),e.querySelector("ul")||e.querySelector("a").classList.add("ax-selected")):"UL"==e.nodeName&&axSlideDown(e)}),t.querySelector("ul")&&axSlideDown(t.querySelector("ul")))}}else t.forEach(e=>{axParents(e.parentElement,this.targetDom,!0,!1).forEach(e=>{"LI"==e.nodeName?(e.classList.add("ax-active"),e.querySelector("a").setAttribute("aria-expand","true"),e.querySelector("ul")||e.querySelector("a").classList.add("ax-selected")):"UL"==e.nodeName&&axSlideDown(e)}),e.parentElement.classList.add("ax-active"),axSiblings(e,!1,"ul")[0]&&axSlideDown(axSiblings(e,!1,"ul")[0])});for(let t=0;t{e.showUl(n,t)},leave:()=>{e.closeUl(n,t)},hold:n.nextElementSibling}):n.addEventListener("click",this.event,!1):n.removeEventListener("click",this.event,!1)}this.referName&&(axIsEmpty(axMenus)?axMenus.push({name:this.referName,instance:this}):axMenus.some(e=>e.name==this.referName)||axMenus.push({name:this.referName,instance:this})),"load"in this.handlers&&this.emit("load","")}update(e,t){let i=this;return this.options=axExtend(this.options,e),this.options.url&&axAjax({url:i.options.url,success:e=>{i.targetDom.appendChild(axStrToDom(e)),i.li=i.targetDom.querySelectorAll("li"),i.init()}}),this.init(),"update"in this.handlers&&this.emit("update",""),t&&t.call(this),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axMenu]").forEach(e=>{new axMenu(e)}); /*! * 插件:黏住顶部或盒子;使用方法:new axStick('#id',{参数}) */ const axSticks=[];class axStick{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({refer:"body",space:"0px",width:"",zIndex:""},t,this.targetDom);this.handlers={},this.height=this.targetDom.offsetHeight,this.width=this.targetDom.offsetWidth,this.left=axOffset(this.targetDom).left,this.top=axOffset(this.targetDom).top,this.bottom=axOffset(this.targetDom).top+this.height,this.style=this.targetDom.getAttribute("style"),this.placeholder=axAddElem("DIV",{style:`width:${this.width}px;height:${this.height}px;display:none;`}),this.targetDom.insertAdjacentElement("beforebegin",this.placeholder),this.targetDom.getAttribute("axStick")?this.referName=this.targetDom.getAttribute("axStick"):this.referName="",this.init()}init(){this.refer=this.targetDom.closest(this.options.refer),this.referHeight=this.refer.offsetHeight,this.referWidth=this.refer.offsetWidth,this.referLeft=axOffset(this.refer).left,this.referTop=axOffset(this.refer).top,this.referBottom=axOffset(this.refer).top+this.referHeight,"body"===this.options.refer||"fixed"===getComputedStyle(this.refer).position&&"absolute"===getComputedStyle(this.refer).position||(this.refer.style.position="relative"),this.options.zIndex&&(this.targetDom.style.zIndex=this.options.zIndex),"none"!==getComputedStyle(this.targetDom).float&&(this.placeholder.style.float=getComputedStyle(this.targetDom).float);let e=this;window.addEventListener("scroll",()=>{e.height>window.innerHeight?e.bottomdocument.documentElement.scrollTop+window.innerHeight?(e.targetDom.style.cssText+=`width:${e.targetDom.offsetWidth}px;`,e.targetDom.style.cssText+=`left:${axOffset(e.targetDom).left}px;`,e.targetDom.style.cssText+=`position:fixed;bottom:${e.options.space};margin:0;`,e.placeholder.style.display="block","sticked"in e.handlers&&e.emit("sticked","fixed")):e.referBottomdocument.documentElement.scrollTop&&(e.targetDom.setAttribute("style",e.style),e.placeholder.style.display="none","unsticked"in e.handlers&&e.emit("unsticked","")):e.tope.referBottom-document.documentElement.scrollTop&&(e.targetDom.style.position="absolute",e.targetDom.style.left=e.left-e.referLeft+"px",e.targetDom.style.top="auto",e.targetDom.style.bottom=0,"sticked"in e.handlers&&e.emit("sticked","absolute"))):(e.targetDom.setAttribute("style",e.style),e.placeholder.style.display="none","unsticked"in e.handlers&&e.emit("unsticked",""))},!1),this.referName&&(axIsEmpty(axSticks)?axSticks.push({name:this.referName,instance:this}):axSticks.some(e=>e.name==this.referName)||axSticks.push({name:this.referName,instance:this}))}destroy(e){this.targetDom.lastChild.removeEventListener("click",this.event,!1),this.targetDom.innerHTML=this.html,e&&e.call(this)}update(e,t){return this.targetDom.style=this.style,this.options=axExtend(this.options,e),this.init(),"updated"in this.handlers&&this.emit("updated",""),t&&t.call(this),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axStick]").forEach(e=>{new axStick(e)}); /*! * 插件:轮滑选择;改造自mobile-select 20201110更新 https://github.com/onlyhom/mobile-select;使用方法:new axScrollSelect('#id',{参数}) */ const axScrollSelects=[];(()=>{const e=(e,t)=>e.getElementsByClassName(t),t=(e,t,i,s)=>("mousewheel"===t&&void 0!==document.mozFullScreen&&(t="DOMMouseScroll"),void e.addEventListener(t,(function(e){i.call(this,function(e){let t=e.type;return"DOMMouseScroll"!=t&&"mousewheel"!=t||(e.delta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3),e.srcElement&&!e.target&&(e.target=e.srcElement),axPreventDefault(e),e}(e))}),s||!1));class i{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({wheels:[],title:"",position:[],final:!1,connector:" ",confirmText:"确认",cancelText:"取消",className:"",type:"actionbar",labels:"",keyMap:{id:"id",name:"name",value:"value",children:"children"},triggerDisplayData:!0,callback:function(){},transitionEnd:function(){},cancel:function(){},onShow:function(){},onHide:function(){}},t,this.targetDom),this.jsonType=!1,this.cascadeJsonData=[],this.displayJson=[],this.curValue=null,this.curIndexArr=[],this.cascade=!1,this.startY,this.moveEndY,this.moveY,this.oldMoveY,this.offset=0,this.offsetSum=0,this.oversizeBorder,this.curDistance=[],this.clickStatus=!1,this.init(),this.targetDom.setAttribute("autocomplete","off"),this.targetDom.setAttribute("readonly","true")}init(){let e=this;if("string"==typeof e.options.wheels&&-1!=e.options.wheels.indexOf("#"))"UL"==document.querySelector(e.options.wheels).nodeName?e.options.wheels=[{data:axUlToArr(e.options.wheels)}]:"SELECT"==document.querySelector(e.options.wheels).nodeName&&(e.options.wheels=[{data:axSelectToArr(e.options.wheels)}]);else if(0==e.options.wheels.indexOf("date")){let t=e.options.wheels.split("-"),i=t[1],s=t[2],n=t[3];e.options.wheels=e.getDate(i,s,n)}if(e.checkDataType(),e.renderWheels(e.options.wheels,this.options.cancelText,this.options.confirmText),!e.targetDom)return console.error("SwiperSelect instance has been created , but there is no trigger is found on page."),!1;e.targetDom.style.cursor="pointer",e.checkCascade(),e.addListenerAll(),e.cascade&&e.initCascade();let t="";for(let i=0;i"+e.options.labels[i]+"");if(e.group.innerHTML=t,e.options.position.lengths&&a.push(0,0);let r=[{data:[]}];for(let d=t;d>=e;d--){if(0==d)return;let e={id:d,name:d+"年",value:d,children:[]};for(let t=1;t<=12;t++)if("YMD"==i.toUpperCase()){let i=[],r=(l=d,1==(c=t)||3==c||5==c||7==c||8==c||10==c||12==c?31:2==c?l%4==0&&l%100!=0?29:l%400==0?29:28:30);for(let e=1;e<=r;e++)i.push({id:e,name:e+"日",value:e});e.children.push({id:t,name:t+"月",value:t,children:i}),"auto"==s&&"auto"==n?a.push(o.getDate()-1):n>s&&a.push(0)}else"YM"==i.toUpperCase()&&e.children.push({id:t,name:t+"月",value:t});r[0].data.push(e)}var l,c;return axIsEmpty(this.options.position)&&(this.options.position=a),this.options.connector="-",r}show(){this.mobileSelect.classList.add("ax-show"),"function"==typeof this.options.onShow&&this.options.onShow(this)}hide(){this.mobileSelect.classList.remove("ax-show"),"function"==typeof this.options.onHide&&this.options.onHide(this)}renderWheels(t){let i=this,s="";for(let e=0;e
    ',i.jsonType)for(let n=0;n'+t[e].data[n][i.options.keyMap.name]+"";else for(let i=0;i"+t[e].data[i]+"";s+="
"}this.options.title||("INPUT"==this.targetDom.nodeName?this.targetDom.getAttribute("placeholder")?this.options.title=this.targetDom.getAttribute("placeholder"):this.targetDom.getAttribute("value")?this.options.title=this.targetDom.getAttribute("value"):this.options.title="":this.options.title=this.targetDom.textContent.trim().replace(/<[^>]+>/g,"").replace(/ +/g," ")),this.template=axTplEngine(`\n
\n <% if(this.type == 'actionbar'){ %>
<% } %>\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `,this.options),i.mobileSelect=axStrToDom(this.template),i.wheels=i.mobileSelect.querySelector(".ax-wheels"),i.wheels.innerHTML=s,"actionbar"==i.options.type?document.body.appendChild(i.mobileSelect):"popup"==i.options.type?i.popup=new axPopup(this.targetDom,{content:i.mobileSelect,padding:!1,placement:"bottom-start",close:!1,footerShow:!1}):"inline"==i.options.type&&(i.targetDom.insertAdjacentElement("afterEnd",i.mobileSelect),i.header=i.mobileSelect.querySelector(".ax-scrollSelect-header"),i.header.style.display="none"),i.wheel=e(i.mobileSelect,"ax-wheel"),i.slider=e(i.mobileSelect,"ax-item-list"),i.wheels=i.mobileSelect.querySelector(".ax-wheels"),i.liHeight=i.mobileSelect.querySelector("li").offsetHeight,i.ensureBtn=i.mobileSelect.querySelector(".ax-confirm"),i.cancelBtn=i.mobileSelect.querySelector(".ax-cancel"),i.grayLayer=i.mobileSelect.querySelector(".ax-scrollSelect-overlay"),i.wrapper=i.mobileSelect.querySelector(".ax-scrollSelect-wrapper"),i.body=i.mobileSelect.querySelector(".ax-scrollSelect-body"),i.group=i.mobileSelect.querySelector(".ax-group"),i.title=i.mobileSelect.querySelector(".ax-title"),axPreventScroll(i.wrapper)}addListenerAll(){let e=this;for(let t=0;t0&&(e.direction="wheelDown"),s.dragClick(e,this.firstChild,i)})))}checkDataType(){let e=this;"object"==typeof e.options.wheels[0].data[0]&&(e.jsonType=!0)}checkCascade(){let e=this;if(e.jsonType){let t=e.options.wheels[0].data;for(let i=0;i0){e.cascade=!0,e.cascadeJsonData=e.options.wheels[0].data;break}}else e.cascade=!1}generateArrData(e){let t=[],i=this.options.keyMap.id,s=this.options.keyMap.value,n=this.options.keyMap.name;for(let a=0;a0?(e.initDeepCount=0,e.initCheckArrDeep(e.cascadeJsonData[e.options.position[0]])):e.checkArrDeep(e.cascadeJsonData[0]),e.reRenderWheels()}initCheckArrDeep(e){let t=this;if(e&&t.options.keyMap.children in e&&e[t.options.keyMap.children].length>0){t.displayJson.push(t.generateArrData(e[t.options.keyMap.children])),t.initDeepCount++;let i=e[t.options.keyMap.children][t.options.position[t.initDeepCount]];i?t.initCheckArrDeep(i):t.checkArrDeep(e[t.options.keyMap.children][0])}}checkArrDeep(e){let t=this;e&&t.options.keyMap.children in e&&e[t.options.keyMap.children].length>0&&(t.displayJson.push(t.generateArrData(e[t.options.keyMap.children])),t.checkArrDeep(e[t.options.keyMap.children][0]))}checkRange(e,t){let i,s=this,n=s.displayJson.length-1-e;for(let e=0;et.length){i=s.slider.length-t.length;for(let e=0;ee.displayJson.length){let t=e.wheel.length-e.displayJson.length;for(let i=0;i'+n+""}e.slider[t].innerHTML=i}else{let s=document.createElement("div");s.className="ax-wheel",i='
    ';for(let s=0;s'+n+""}i+="
",s.innerHTML=i,e.addListenerWheel(s,t),e.wheels.appendChild(s)}}(t);let t="";for(let i=0;i"+e.options.labels[i]+"");e.group.innerHTML=t}updateWheels(e){let t=this;if(t.cascade){if(t.cascadeJsonData=e,t.displayJson=[],t.initCascade(),t.options.position.length'+n+""}i.options.wheels[e]={data:t}}else{for(let e=0;e"+t[e]+"";i.options.wheels[e]=t}i.slider[e].innerHTML=s}fixRowStyle(){let e=this,t=(100/e.wheel.length).toFixed(2);for(let i=0;i=i?s=i-1:s<0&&(s=0),t.slider[e].getElementsByTagName("li")[s].getAttribute("data-value")?t.slider[e].getElementsByTagName("li")[s].getAttribute("data-value"):t.slider[e].getElementsByTagName("li")[s].textContent}setActive(){let e=this;setTimeout((function(){if(!axIsEmpty(e.getIndexArr()))for(let t=0;t{t.name?e+=t.name:t.value?e+=t.value:e+=t}),this.title.innerHTML=e}touch(e,t,i){let s=this;switch((e=e||window.event).type){case"touchstart":s.startY=e.touches[0].clientY,s.startY=parseInt(s.startY),s.oldMoveY=s.startY;break;case"touchend":if(s.moveEndY=parseInt(e.changedTouches[0].clientY),s.offsetSum=s.moveEndY-s.startY,s.oversizeBorder=-(t.getElementsByTagName("li").length-3)*s.liHeight,0==s.offsetSum){let e=parseInt((document.documentElement.clientHeight-s.moveEndY)/40);if(2!=e){let n=e-2,a=s.curDistance[i]+n*s.liHeight;a<=2*s.liHeight&&a>=s.oversizeBorder&&(s.curDistance[i]=a,s.movePosition(t,s.curDistance[i]),s.options.transitionEnd.call(s,s.getIndexArr(),s.getCurValue()))}"inline"==s.options.type&&s.setValue(),s.setTitle(),s.setActive()}else s.updateCurDistance(t,i),s.curDistance[i]=s.fixPosition(s.curDistance[i]),s.movePosition(t,s.curDistance[i]),s.curDistance[i]+s.offsetSum>2*s.liHeight?(s.curDistance[i]=2*s.liHeight,setTimeout((function(){s.movePosition(t,s.curDistance[i])}),100)):s.curDistance[i]+s.offsetSum=s.oversizeBorder&&(s.curDistance[i]=a,s.movePosition(t,s.curDistance[i]),s.options.transitionEnd.call(s,s.getIndexArr(),s.getCurValue()))}}else s.updateCurDistance(t,i),s.curDistance[i]=s.fixPosition(s.curDistance[i]),s.movePosition(t,s.curDistance[i]),s.curDistance[i]+s.offsetSum>2*s.liHeight?(s.curDistance[i]=2*s.liHeight,setTimeout((function(){s.movePosition(t,s.curDistance[i])}),100)):s.curDistance[i]+s.offsetSum2*s.liHeight&&(s.curDistance[i]=2*s.liHeight,setTimeout((function(){s.movePosition(t,s.curDistance[i])}),100)),s.clickStatus=!1,s.cascade&&s.checkRange(i,s.getIndexArr()),"inline"==s.options.type&&s.setValue(),s.setTitle(),s.setActive(),s.options.transitionEnd.call(s,s.getIndexArr(),s.getCurValue()))}}window.axScrollSelect=i,document.querySelectorAll("[axScrollSelect]").forEach(e=>{new i(e)})})(), /*! * 插件:下拉选择(单选和多选);改造自Choices v10.1.0 https://github.com/Choices-js/Choices;使用方法:new axSelect('#id',{参数}) */ function(e){let t=window||t||self;"function"==typeof define&&define.amd?define(e):t.axSelect=e(),document.querySelectorAll("[axSelect]").forEach(e=>{new axSelect(e)})}((function(){"use strict";const e="showDropdown",t="hideDropdown",i="change",s="choice",n="search",a="addItem",o="removeItem",r="highlightItem",l="highlightChoice",c="ADD_CHOICE",d="FILTER_CHOICES",h="ACTIVATE_CHOICES",u="CLEAR_CHOICES",p="ADD_GROUP",m="ADD_ITEM",f="REMOVE_ITEM",g="HIGHLIGHT_ITEM",v="CLEAR_ALL",x="RESET_TO",y="SET_IS_LOADING",b={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},w=(e=!0)=>({type:h,active:e}),M=({value:e,id:t,active:i,disabled:s})=>({type:p,value:e,id:t,active:i,disabled:s}),E=(e,t)=>({type:g,id:e,highlighted:t}),S=e=>({type:y,isLoading:e});class D{constructor({element:e,type:t,classNames:i}){this.element=e,this.classNames=i,this.type=t,this.isActive=!1}get distanceFromTopWindow(){return this.element.getBoundingClientRect().bottom}getChild(e){return this.element.querySelector(e)}show(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this}hide(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this}}const T=(()=>{const e=document.createElement("div");return t=>{const i=t.trim();e.innerHTML=i;const s=e.children[0];for(;e.firstChild;)e.removeChild(e.firstChild);return s}})(),C=(e,t)=>{const{score:i=0}=e,{score:s=0}=t;return i-s};class L{constructor({element:e,type:t,classNames:i,position:s}){this.element=e,this.classNames=i,this.type=t,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}addEventListeners(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)}removeEventListeners(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)}shouldFlip(e){if("number"!=typeof e)return!1;let t=!1;return"auto"===this.position?t=!window.matchMedia(`(min-height: ${e+1}px)`).matches:"top"===this.position&&(t=!0),t}setActiveDescendant(e){this.element.setAttribute("aria-activedescendant",e)}removeActiveDescendant(){this.element.removeAttribute("aria-activedescendant")}open(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)}close(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)}focus(){this.isFocussed||this.element.focus()}addFocusState(){this.element.classList.add(this.classNames.focusState)}removeFocusState(){this.element.classList.remove(this.classNames.focusState)}enable(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),"select-one"===this.type&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1}disable(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),"select-one"===this.type&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0}wrap(e){axAddWrap(e,this.element)}unwrap(e){this.element.parentNode&&(this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element))}addLoadingState(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0}removeLoadingState(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1}_onFocus(){this.isFocussed=!0}_onBlur(){this.isFocussed=!1}}class A{constructor({element:e,type:t,classNames:i,preventPaste:s}){this.element=e,this.type=t,this.classNames=i,this.preventPaste=s,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=e.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}set placeholder(e){this.element.placeholder=e}get value(){return axCleanString(this.element.value)}set value(e){this.element.value=e}get rawValue(){return this.element.value}addEventListeners(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})}removeEventListeners(){this.element.removeEventListener("input",this._onInput),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)}enable(){this.element.removeAttribute("disabled"),this.isDisabled=!1}disable(){this.element.setAttribute("disabled",""),this.isDisabled=!0}focus(){this.isFocussed||this.element.focus()}blur(){this.isFocussed&&this.element.blur()}clear(e=!0){return this.element.value&&(this.element.value=""),e&&this.setWidth(),this}setWidth(){const{style:e,value:t,placeholder:i}=this.element;e.minWidth=i.length+1+"em",e.width=t.length+1+"em"}setActiveDescendant(e){this.element.setAttribute("aria-activedescendant",e)}removeActiveDescendant(){this.element.removeAttribute("aria-activedescendant")}_onInput(){"select-one"!==this.type&&this.setWidth()}_onPaste(e){this.preventPaste&&axPreventDefault(e)}_onFocus(){this.isFocussed=!0}_onBlur(){this.isFocussed=!1}}class _{constructor({element:e}){this.element=e,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}clear(){this.element.innerHTML=""}append(e){this.element.appendChild(e)}getChild(e){return this.element.querySelector(e)}hasChildren(){return this.element.hasChildNodes()}scrollToTop(){this.element.scrollTop=0}scrollToChildElement(e,t){if(!e)return;const i=this.element.offsetHeight,s=this.element.scrollTop+i,n=e.offsetHeight,a=e.offsetTop+n,o=t>0?this.element.scrollTop+a-s:e.offsetTop;requestAnimationFrame(()=>{this._animateScroll(o,t)})}_scrollDown(e,t,i){const s=(i-e)/t,n=s>1?s:1;this.element.scrollTop=e+n}_scrollUp(e,t,i){const s=(e-i)/t,n=s>1?s:1;this.element.scrollTop=e-n}_animateScroll(e,t){const i=this.element.scrollTop;let s=!1;t>0?(this._scrollDown(i,4,e),ie&&(s=!0)),s&&requestAnimationFrame(()=>{this._animateScroll(e,t)})}}class I{constructor({element:e,classNames:t}){if(this.element=e,this.classNames=t,!(e instanceof HTMLInputElement||e instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}get isActive(){return"active"===this.element.dataset.choice}get dir(){return this.element.dir}get value(){return this.element.value}set value(e){this.element.value=e}conceal(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;const e=this.element.getAttribute("style");e&&this.element.setAttribute("data-choice-orig-style",e),this.element.setAttribute("data-choice","active")}reveal(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");const e=this.element.getAttribute("data-choice-orig-style");e?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",e)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value}enable(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1}disable(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0}triggerEvent(e,t){((e,t,i=null)=>{const s=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});e.dispatchEvent(s)})(this.element,e,t)}}class k extends I{constructor({element:e,classNames:t,delimiter:i}){super({element:e,classNames:t}),this.delimiter=i}get value(){return this.element.value}set value(e){this.element.setAttribute("value",e),this.element.value=e}}class N extends I{constructor({element:e,classNames:t,template:i}){super({element:e,classNames:t}),this.template=i}get placeholderOption(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")}get optionGroups(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))}get options(){return Array.from(this.element.options)}set options(e){const t=document.createDocumentFragment(),i=e=>{const i=this.template(e);t.appendChild(i)};e.forEach(e=>i(e)),this.appendDocFragment(t)}appendDocFragment(e){this.element.innerHTML="",this.element.appendChild(e)}}const O={disabled:!1,size:"",width:"",items:[],choices:[],silent:!1,renderChoiceLimit:-1,className:"",maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,allowHTML:!0,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!1,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:({value:e,label:t=e},{value:i,label:s=i})=>t.localeCompare(s,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0}),placeholder:!0,placeholderValue:"请输入关键字...",searchPlaceholderValue:"请输入关键字...",prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"加载中...",noResultsText:"没有检索结果",noChoicesText:"没有符合条件的选项",itemSelectText:"点击选择",uniqueItemText:"只能添加唯一值",customAddItemText:"只可添加条件匹配的选项",addItemText:e=>`按回车键添加 "${axCleanString(e)}" 选项`,maxItemText:e=>`只能添加 ${e} 项`,valueComparer:(e,t)=>e===t,fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:"ax-select",containerInner:"ax-select-inner",input:"ax-select-input",inputCloned:"ax-input-cloned",list:"ax-select-list",listItems:"ax-label-multiple",listSingle:"ax-label-single",listDropdown:"ax-select-dropdown",dropdownList:"ax-item-list",item:"ax-item",itemSelectable:"ax-item-selectable",itemDisabled:"ax-item-disabled",itemChoice:"ax-item-done",placeholder:"ax-select-placeholder",group:"ax-item-group",groupHeading:"ax-group-name",button:"ax-close",activeState:"ax-active",focusState:"ax-focuse",openState:"ax-open",disabledState:"ax-disabled",highlightedState:"ax-highlight",selectedState:"ax-selected",flippedState:"ax-flipped",loadingState:"ax-buffer",noResults:"ax-no-results",noChoices:"ax-no-select"}},j=[];const $=[];const P=[];const z={groups:[],items:[],choices:[],loading:!1},Y=Redux.combineReducers({items:function(e=j,t={}){switch(t.type){case"ADD_ITEM":{const i=t;return[...e,{id:i.id,choiceId:i.choiceId,groupId:i.groupId,value:i.value,label:i.label,active:!0,highlighted:!1,customProperties:i.customProperties,placeholder:i.placeholder||!1,keyCode:null}].map(e=>{const t=e;return t.highlighted=!1,t})}case"REMOVE_ITEM":return e.map(e=>{const i=e;return i.id===t.id&&(i.active=!1),i});case"HIGHLIGHT_ITEM":{const i=t;return e.map(e=>{const t=e;return t.id===i.id&&(t.highlighted=i.highlighted),t})}default:return e}},groups:function(e=$,t={}){switch(t.type){case"ADD_GROUP":{const i=t;return[...e,{id:i.id,value:i.value,active:i.active,disabled:i.disabled}]}case"CLEAR_CHOICES":return[];default:return e}},choices:function(e=P,t={}){switch(t.type){case"ADD_CHOICE":{const i=t,s={id:i.id,elementId:i.elementId,groupId:i.groupId,value:i.value,label:i.label||i.value,disabled:i.disabled||!1,selected:!1,active:!0,score:9999,customProperties:i.customProperties,placeholder:i.placeholder||!1};return[...e,s]}case"ADD_ITEM":{const i=t;return i.choiceId>-1?e.map(e=>{const t=e;return t.id===parseInt(`${i.choiceId}`,10)&&(t.selected=!0),t}):e}case"REMOVE_ITEM":{const i=t;return i.choiceId&&i.choiceId>-1?e.map(e=>{const t=e;return t.id===parseInt(`${i.choiceId}`,10)&&(t.selected=!1),t}):e}case"FILTER_CHOICES":{const i=t;return e.map(e=>{const t=e;return t.active=i.results.some(({item:e,score:i})=>e.id===t.id&&(t.score=i,!0)),t})}case"ACTIVATE_CHOICES":{const i=t;return e.map(e=>{const t=e;return t.active=i.active,t})}case"CLEAR_CHOICES":return P;default:return e}},loading:(e=!1,t={})=>{switch(t.type){case"SET_IS_LOADING":return t.isLoading;default:return e}}}),q=(e,t)=>{let i=e;if("CLEAR_ALL"===t.type)i=z;else if("RESET_TO"===t.type)return s=t.state,JSON.parse(JSON.stringify(s));var s;return Y(i,t)};class B{constructor(){this._store=Redux.createStore(q,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}subscribe(e){this._store.subscribe(e)}dispatch(e){this._store.dispatch(e)}get state(){return this._store.getState()}get items(){return this.state.items}get activeItems(){return this.items.filter(e=>!0===e.active)}get highlightedActiveItems(){return this.items.filter(e=>e.active&&e.highlighted)}get choices(){return this.state.choices}get activeChoices(){return this.choices.filter(e=>!0===e.active)}get selectableChoices(){return this.choices.filter(e=>!0!==e.disabled)}get searchableChoices(){return this.selectableChoices.filter(e=>!0!==e.placeholder)}get placeholderChoice(){return[...this.choices].reverse().find(e=>!0===e.placeholder)}get groups(){return this.state.groups}get activeGroups(){const{groups:e,choices:t}=this;return e.filter(e=>{const i=!0===e.active&&!1===e.disabled,s=t.some(e=>!0===e.active&&!1===e.disabled);return i&&s},[])}isLoading(){return this.state.loading}getChoiceById(e){return this.activeChoices.find(t=>t.id===parseInt(e,10))}getGroupById(e){return this.groups.find(t=>t.id===e)}}const H={containerOuter({classNames:{containerOuter:e}},t,i,s,n,a,o){const r=Object.assign(document.createElement("div"),{className:e});return r.dataset.type=a,t&&(r.dir=t),s&&(r.tabIndex=0),i&&(r.setAttribute("role",n?"combobox":"listbox"),n&&r.setAttribute("aria-autocomplete","list")),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),this.config.className&&r.classList.add(this.config.className),this.config.size&&r.setAttribute("data-size",this.config.size),o&&r.setAttribute("aria-labeledby",o),r},containerInner:({classNames:{containerInner:e}})=>Object.assign(document.createElement("div"),{className:e}),itemList:({classNames:{list:e,listSingle:t,listItems:i}},s)=>Object.assign(document.createElement("span"),{className:`${s?t:i}`}),placeholder:({allowHTML:e,classNames:{placeholder:t}},i)=>Object.assign(document.createElement("div"),{className:t,[e?"innerHTML":"innerText"]:i}),item({allowHTML:e,classNames:{item:t,button:i,highlightedState:s,itemSelectable:n,placeholder:a}},{id:o,value:r,label:l,customProperties:c,active:d,disabled:h,highlighted:u,placeholder:p},m){const f=Object.assign(document.createElement("span"),{className:t,[e?"innerHTML":"innerText"]:l});if(Object.assign(f.dataset,{item:"",id:o,value:r,customProperties:c}),d&&f.setAttribute("aria-selected","true"),h&&f.setAttribute("aria-disabled","true"),p&&f.classList.add(a),f.classList.add(u?s:n),m){h&&f.classList.remove(n),f.dataset.deletable="";const t="",s=Object.assign(document.createElement("i"),{type:"button",className:i,[e?"innerHTML":"innerText"]:t});s.setAttribute("aria-label",`${t}: '${r}'`),s.dataset.button="",f.appendChild(s)}return f},choiceList({classNames:{dropdownList:e}},t){const i=Object.assign(document.createElement("div"),{className:e});return t||i.setAttribute("aria-multiselectable","true"),i.setAttribute("role","listbox"),i},choiceGroup({allowHTML:e,classNames:{group:t,groupHeading:i,itemDisabled:s}},{id:n,value:a,disabled:o}){const r=Object.assign(document.createElement("div"),{className:`${t} ${o?s:""}`});return r.setAttribute("role","group"),Object.assign(r.dataset,{group:"",id:n,value:a}),o&&r.setAttribute("aria-disabled","true"),r.appendChild(Object.assign(document.createElement("div"),{className:i,[e?"innerHTML":"innerText"]:a})),r},choice({allowHTML:e,classNames:{item:t,itemChoice:i,itemSelectable:s,selectedState:n,itemDisabled:a,placeholder:o}},{id:r,value:l,label:c,groupId:d,elementId:h,disabled:u,selected:p,placeholder:m},f){const g=Object.assign(document.createElement("div"),{id:h,[e?"innerHTML":"innerText"]:c,className:`${t} ${i}`});return p&&g.classList.add(n),m&&g.classList.add(o),g.setAttribute("role",d&&d>0?"treeitem":"option"),Object.assign(g.dataset,{choice:"",id:r,value:l,selectText:f}),u?(g.classList.add(a),g.dataset.choiceDisabled="",g.setAttribute("aria-disabled","true")):(g.classList.add(s),g.dataset.choiceSelectable=""),g},input({classNames:{input:e,inputCloned:t}},i){const s=Object.assign(document.createElement("input"),{type:"search",name:"search_terms",className:`${e} ${t}`,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return s.setAttribute("role","textbox"),s.setAttribute("aria-autocomplete","list"),s.setAttribute("aria-label",i),s},dropdown({classNames:{list:e,listDropdown:t}}){const i=document.createElement("div");return i.classList.add(t),i.setAttribute("aria-expanded","false"),i},notice({allowHTML:e,classNames:{item:t,itemChoice:i,noResults:s,noChoices:n}},a,o=""){const r=[t,i];return"no-choices"===o?r.push(n):"no-results"===o&&r.push(s),Object.assign(document.createElement("div"),{[e?"innerHTML":"innerText"]:a,className:r.join(" ")})},option({label:e,value:t,customProperties:i,active:s,disabled:n}){const a=new Option(e,t,!1,s);return i&&(a.dataset.customProperties=`${i}`),a.disabled=!!n,a}},F="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,R={};class V{constructor(e="[data-choice]",t={}){t.allowHTML,this.config=deepmerge.all([O,V.defaults.options,t],{arrayMerge:(e,t)=>[...t]}),this.origElem=e,this.config=axDataset(e,this.config);const i=((e,t)=>{const i=Object.keys(e).sort(),s=Object.keys(t).sort();return i.filter(e=>s.indexOf(e)<0)})(this.config,O);i.length&&console.warn("Unknown config option(s) passed",i.join(", "));const s="string"==typeof e?document.querySelector(e):e;if(!(s instanceof HTMLInputElement||s instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement="text"===s.type,this._isSelectOneElement="select-one"===s.type,this._isSelectMultipleElement="select-multiple"===s.type,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,["auto","always"].includes(`${this.config.renderSelectedChoices}`)||(this.config.renderSelectedChoices="auto"),t.addItemFilter&&"function"!=typeof t.addItemFilter){const e=t.addItemFilter instanceof RegExp?t.addItemFilter:new RegExp(t.addItemFilter);this.config.addItemFilter=e.test.bind(e)}if(this._isTextElement?this.passedElement=new k({element:s,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new N({element:s,classNames:this.config.classNames,template:e=>this._templates.option(e)}),this.initialised=!1,this._store=new B,this._initialState=z,this._currentState=z,this._prevState=z,this._currentValue="",this._canSearch=!!this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=axCreateId("choices-","",this.passedElement.element),this._direction=this.passedElement.dir,!this._direction){const{direction:e}=window.getComputedStyle(this.passedElement.element),{direction:t}=window.getComputedStyle(document.documentElement);e!==t&&(this._direction=e)}if(this._idNames={itemChoice:"item-choice"},this._isSelectElement&&(this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options),this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&this._isTextElement){const e=this.passedElement.value.split(this.config.delimiter);this._presetItems=this._presetItems.concat(e)}if(this.passedElement.options&&this.passedElement.options.forEach(e=>{this._presetChoices.push({value:e.value,label:e.innerHTML,selected:!!e.selected,disabled:e.disabled||e.parentNode.disabled,placeholder:""===e.value||e.hasAttribute("placeholder"),customProperties:e.dataset["custom-properties"]})}),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onSelectKey=this._onSelectKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive)return this.config.silent||console.warn("Trying to initialise Choices on element already initialised",{element:e}),void(this.initialised=!0);e&&e.hasOwnProperty("axSelect")&&e.getAttribute("axSelect")?this.referName=e.getAttribute("axSelect"):this.referName="",this.init(),this.config.disabled&&this.disable()}static get defaults(){return Object.preventExtensions({get options(){return R},get templates(){return H}})}init(e){if(this.initialised)return;this._createTemplates(),this._createElements(),this._createStructure(),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;const{callbackOnInit:t}=this.config;if(t&&"function"==typeof t&&t.call(this),e&&e.call(this),this.referName)if(axIsEmpty(axSelects))axSelects.push({name:this.referName,instance:this});else for(let e=0;e=0?this._store.getGroupById(n):null;return this._store.dispatch(E(s,!0)),t&&this.passedElement.triggerEvent(r,{id:s,value:a,label:o,groupValue:l&&l.value?l.value:null}),i&&i.call(this),this}unhighlightItem(e,t){if(!e||!e.id)return this;const{id:i,groupId:s=-1,value:n="",label:a=""}=e,o=s>=0?this._store.getGroupById(s):null;return this._store.dispatch(E(i,!1)),this.passedElement.triggerEvent(r,{id:i,value:n,label:a,groupValue:o&&o.value?o.value:null}),t&&t.call(this),this}highlightAll(e){return this._store.items.forEach(e=>this.highlightItem(e)),e&&e.call(this),this}unhighlightAll(e){return this._store.items.forEach(e=>this.unhighlightItem(e)),e&&e.call(this),this}removeActiveItemsByValue(e,t){return this._store.activeItems.filter(t=>t.value===e).forEach(e=>this._removeItem(e)),t&&t.call(this),this}removeActiveItems(e,t){return this._store.activeItems.filter(({id:t})=>t!==e).forEach(e=>this._removeItem(e)),t&&t.call(this),this}removeHighlightedItems(e=!1,t){return this._store.highlightedActiveItems.forEach(t=>{this._removeItem(t),e&&this._triggerChange(t.value)}),t&&t.call(this),this}showDropdown(t,i){return this.dropdown.isActive?this:(requestAnimationFrame(()=>{this.dropdown.show(),this.containerOuter.open(this.dropdown.distanceFromTopWindow),!t&&this._canSearch&&this.input.focus(),this.passedElement.triggerEvent(e,{})}),i&&i.call(this),this)}hideDropdown(e,i){return this.dropdown.isActive?(requestAnimationFrame(()=>{this.dropdown.hide(),this.containerOuter.close(),!e&&this._canSearch&&(this.input.removeActiveDescendant(),this.input.blur()),this.passedElement.triggerEvent(t,{})}),i&&i.call(this),this):(i&&i.call(this),this)}getValue(e=!1,t){const i=this._store.activeItems.reduce((t,i)=>{const s=e?i.value:i;return t.push(s),t},[]);return t&&t.call(this),this._isSelectOneElement?i[0]:i}setValue(e,t){return this.initialised?(e.forEach(e=>this._setChoiceOrItem(e)),t&&t.call(this),this):this}setChoiceByValue(e,t){if(!this.initialised||this._isTextElement)return this;return(Array.isArray(e)?e:[e]).forEach(e=>this._findAndSelectChoiceByValue(e)),t&&t.call(this),this}setChoices(e=[],t="value",i="label",s=!1,n){if(!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if("string"!=typeof t||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(s&&this.clearChoices(),"function"==typeof e){const n=e(this);if("function"==typeof Promise&&n instanceof Promise)return new Promise(e=>requestAnimationFrame(e)).then(()=>this._handleLoadingState(!0)).then(()=>n).then(e=>this.setChoices(e,t,i,s)).catch(e=>{this.config.silent||console.error(e)}).then(()=>this._handleLoadingState(!1)).then(()=>this);if(!Array.isArray(n))throw new TypeError(`.setChoices first argument function must return either array of choices or Promise, got: ${typeof n}`);return this.setChoices(n,t,i,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach(e=>{if(e.choices)this._addGroup({id:e.id?parseInt(`${e.id}`,10):null,group:e,valueKey:t,labelKey:i});else{const s=e;this._addChoice({value:s[t],label:s[i],isSelected:!!s.selected,isDisabled:!!s.disabled,placeholder:!!s.placeholder,customProperties:s.customProperties})}}),this._stopLoading(),n&&n.call(this),this}clearChoices(e){return this._store.dispatch({type:u}),e&&e.call(this),this}clearStore(e){return this._store.dispatch({type:v}),e&&e.call(this),this}clearInput(e){const t=!this._isSelectOneElement;return this.input.clear(t),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(w(!0))),e&&e.call(this),this}_render(e){if(this._store.isLoading())return;this._currentState=this._store.state;const t=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,i=this._isSelectElement,s=this._currentState.items!==this._prevState.items;t&&(i&&this._renderChoices(),s&&this._renderItems(),this._prevState=this._currentState,e&&e.call(this))}_renderChoices(){const{activeGroups:e,activeChoices:t}=this._store;let i=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(()=>this.choiceList.scrollToTop()),e.length>=1&&!this._isSearching){const s=t.filter(e=>!0===e.placeholder&&-1===e.groupId);s.length>=1&&(i=this._createChoicesFragment(s,i)),i=this._createGroupsFragment(e,t,i)}else t.length>=1&&(i=this._createChoicesFragment(t,i));if(i.childNodes&&i.childNodes.length>0){const{activeItems:e}=this._store,t=this._canAddItem(e,this.input.value);if(t.response)this.choiceList.append(i),this._highlightChoice();else{const e=this._getTemplate("notice",t.notice);this.choiceList.append(e)}}else{let e,t;this._isSearching?(t="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,e=this._getTemplate("notice",t,"no-results")):(t="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,e=this._getTemplate("notice",t,"no-choices")),this.choiceList.append(e)}}_renderItems(){const e=this._store.activeItems||[];this.itemList.clear();const t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)}_createGroupsFragment(e,t,i=document.createDocumentFragment()){const s=e=>t.filter(t=>this._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===this.config.renderSelectedChoices||!t.selected));return this.config.shouldSort&&e.sort(this.config.sorter),e.forEach(e=>{const t=s(e);if(t.length>=1){const s=this._getTemplate("choiceGroup",e);i.appendChild(s),this._createChoicesFragment(t,i,!0)}}),i}_createChoicesFragment(e,t=document.createDocumentFragment(),i=!1){const{renderSelectedChoices:s,searchResultLimit:n,renderChoiceLimit:a}=this.config,o=this._isSearching?C:this.config.sorter,r=e=>{if("auto"!==s||(this._isSelectOneElement||!e.selected)){const i=this._getTemplate("choice",e,this.config.itemSelectText);t.appendChild(i)}};let l=e;"auto"!==s||this._isSelectOneElement||(l=e.filter(e=>!e.selected));const{placeholderChoices:c,normalChoices:d}=l.reduce((e,t)=>(t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e),{placeholderChoices:[],normalChoices:[]});(this.config.shouldSort||this._isSearching)&&d.sort(o);let h=l.length;const u=this._isSelectOneElement?[...c,...d]:d;this._isSearching?h=n:a&&a>0&&!i&&(h=a);for(let e=0;ee).join(this.config.delimiter):this.passedElement.options=e;return e.forEach(e=>{const i=this._getTemplate("item",e,n);t.appendChild(i)}),t}_triggerChange(e){null!=e&&this.passedElement.triggerEvent(i,{value:e})}_selectPlaceholderChoice(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)}_handleButtonAction(e,t){if(!(e&&t&&this.config.removeItems&&this.config.removeItemButton))return;const i=t.parentNode&&t.parentNode.dataset.id,s=i&&e.find(e=>e.id===parseInt(i,10));s&&(this._removeItem(s),this._triggerChange(s.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}_handleItemAction(e,t,i=!1){if(!e||!t||!this.config.removeItems||this._isSelectOneElement)return;const s=t.dataset.id;e.forEach(e=>{e.id!==parseInt(`${s}`,10)||e.highlighted?!i&&e.highlighted&&this.unhighlightItem(e):this.highlightItem(e)}),this.input.focus()}_handleChoiceAction(e,t){if(!e||!t)return;const{id:i}=t.dataset,n=i&&this._store.getChoiceById(i);if(!n)return;const a=e[0]&&e[0].keyCode?e[0].keyCode:void 0,o=this.dropdown.isActive;if(n.keyCode=a,this.passedElement.triggerEvent(s,{choice:n}),!n.selected&&!n.disabled){this._canAddItem(e,n.value).response&&(this._addItem({value:n.value,label:n.label,choiceId:n.id,groupId:n.groupId,customProperties:n.customProperties,placeholder:n.placeholder,keyCode:n.keyCode}),this._triggerChange(n.value))}this.clearInput(),o&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}_handleBackspace(e){if(!this.config.removeItems||!e)return;const t=e[e.length-1],i=e.some(e=>e.highlighted);this.config.editItems&&!i&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(i||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}_startLoading(){this._store.dispatch(S(!0))}_stopLoading(){this._store.dispatch(S(!1))}_handleLoadingState(e=!0){let t=this.itemList.getChild(`.${this.config.classNames.placeholder}`);e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),t&&this.itemList.append(t)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")}_handleSearch(e){if(!this.input.isFocussed)return;const{choices:t}=this._store,{searchFloor:i,searchChoices:s}=this.config,a=t.some(e=>!e.active);if(null!=e&&e.length>=i){const t=s?this._searchChoices(e):0;this.passedElement.triggerEvent(n,{value:e,resultCount:t})}else a&&(this._isSearching=!1,this._store.dispatch(w(!0)))}_canAddItem(e,t){let i=!0,s="function"==typeof this.config.addItemText?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){const n=((e,t,i="value")=>e.some(e=>"string"==typeof t?e[i]===t.trim():e[i]===t))(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(i=!1,s="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&n&&i&&(i=!1,s="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&i&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(i=!1,s="function"==typeof this.config.customAddItemText?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:i,notice:s}}_searchChoices(e){const t="string"==typeof e?e.trim():e,i="string"==typeof this._currentValue?this._currentValue.trim():this._currentValue;if(t.length<1&&t===`${i} `)return 0;const s=this._store.searchableChoices,n=t,a=Object.assign(this.config.fuseOptions,{keys:[...this.config.searchFields],includeMatches:!0}),o=new Fuse(s,a).search(n);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((e=>({type:d,results:e}))(o)),o.length}_addEventListeners(){const{documentElement:e}=document;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()}_removeEventListeners(){const{documentElement:e}=document;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()}_onKeyDown(e){const{keyCode:t}=e,{activeItems:i}=this._store,s=this.input.isFocussed,n=this.dropdown.isActive,a=this.itemList.hasChildren(),o=String.fromCharCode(t),r=/[a-zA-Z0-9-_ ]/.test(o),{BACK_KEY:l,DELETE_KEY:c,ENTER_KEY:d,A_KEY:h,ESC_KEY:u,UP_KEY:p,DOWN_KEY:m,PAGE_UP_KEY:f,PAGE_DOWN_KEY:g}=b;switch(this._isTextElement||n||!r||(this.showDropdown(),this.input.isFocussed||(this.input.value+=o.toLowerCase())),t){case h:return this._onSelectKey(e,a);case d:return this._onEnterKey(e,i,n);case u:return this._onEscapeKey(n);case p:case f:case m:case g:return this._onDirectionKey(e,n);case c:case l:return this._onDeleteKey(e,i,s)}}_onKeyUp({target:e,keyCode:t}){const{value:i}=this.input,{activeItems:s}=this._store,n=this._canAddItem(s,i),{BACK_KEY:a,DELETE_KEY:o}=b;if(this._isTextElement){if(n.notice&&i){const e=this._getTemplate("notice",n.notice);this.dropdown.element.innerHTML=e.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0)}else{const i=(t===a||t===o)&&e&&!e.value,s=!this._isTextElement&&this._isSearching,r=this._canSearch&&n.response;i&&s?(this._isSearching=!1,this._store.dispatch(w(!0))):r&&this._handleSearch(this.input.rawValue)}this._canSearch=this.config.searchEnabled}_onSelectKey(e,t){const{ctrlKey:i,metaKey:s}=e;if((i||s)&&t){this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll()}}_onEnterKey(e,t,i){const{target:s}=e,{ENTER_KEY:n}=b,a=s&&s.hasAttribute("data-button");if(this._isTextElement&&s&&s.value){const{value:e}=this.input;this._canAddItem(t,e).response&&(this.hideDropdown(!0),this._addItem({value:e}),this._triggerChange(e),this.clearInput())}if(a&&(this._handleButtonAction(t,s),axPreventDefault(e)),i){const i=this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);i&&(t[0]&&(t[0].keyCode=n),this._handleChoiceAction(t,i)),axPreventDefault(e)}else this._isSelectOneElement&&(this.showDropdown(),axPreventDefault(e))}_onEscapeKey(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())}_onDirectionKey(e,t){const{keyCode:i,metaKey:s}=e,{DOWN_KEY:n,PAGE_UP_KEY:a,PAGE_DOWN_KEY:o}=b;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;const t=i===n||i===o?1:-1,r="[data-choice-selectable]";let l;if(s||i===o||i===a)l=t>0?this.dropdown.element.querySelector(`${r}:last-of-type`):this.dropdown.element.querySelector(r);else{const e=this.dropdown.element.querySelector(`.${this.config.classNames.highlightedState}`);l=e?((e,t,i=1)=>{const s=`${i>0?"next":"previous"}ElementSibling`;let n=e[s];for(;n;){if(n.matches(t))return n;n=n[s]}return n})(e,r,t):this.dropdown.element.querySelector(r)}l&&(((e,t,i=1)=>{if(!e)return!1;let s;return s=i>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop,s})(l,this.choiceList.element,t)||this.choiceList.scrollToChildElement(l,t),this._highlightChoice(l)),axPreventDefault(e)}}_onDeleteKey(e,t,i){const{target:s}=e;this._isSelectOneElement||s.value||!i||(this._handleBackspace(t),axPreventDefault(e))}_onTouchMove(){this._wasTap&&(this._wasTap=!1)}_onTouchEnd(e){const{target:t}=e||e.touches[0];if(this._wasTap&&this.containerOuter.element.contains(t)){(t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()}this._wasTap=!0}_onMouseDown(e){const{target:t}=e;if(!(t instanceof HTMLElement))return;if(F&&this.choiceList.element.contains(t)){const t=this.choiceList.element.firstElementChild,i="ltr"===this._direction?e.offsetX>=t.offsetWidth:e.offsetX0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0)}}_onFocus({target:e}){e&&this.containerOuter.element.contains(e)&&{text:()=>{e===this.input.element&&this.containerOuter.addFocusState()},"select-one":()=>{this.containerOuter.addFocusState(),e===this.input.element&&this.showDropdown(!0)},"select-multiple":()=>{e===this.input.element&&(this.showDropdown(!0),this.containerOuter.addFocusState())}}[this.passedElement.element.type]()}_onBlur({target:e}){if(e&&this.containerOuter.element.contains(e)&&!this._isScrollingOnIe){const{activeItems:t}=this._store,i=t.some(e=>e.highlighted);({text:()=>{e===this.input.element&&(this.containerOuter.removeFocusState(),i&&this.unhighlightAll(),this.hideDropdown(!0))},"select-one":()=>{this.containerOuter.removeFocusState(),(e===this.input.element||e===this.containerOuter.element&&!this._canSearch)&&this.hideDropdown(!0)},"select-multiple":()=>{e===this.input.element&&(this.containerOuter.removeFocusState(),this.hideDropdown(!0),i&&this.unhighlightAll())}})[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()}_onFormReset(){var e;this._store.dispatch((e=this._initialState,{type:x,state:e}))}_highlightChoice(e=null){const t=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(!t.length)return;let i=e;Array.from(this.dropdown.element.querySelectorAll(`.${this.config.classNames.highlightedState}`)).forEach(e=>{e.classList.remove(this.config.classNames.highlightedState),e.setAttribute("aria-selected","false")}),i?this._highlightPosition=t.indexOf(i):(i=t.length>this._highlightPosition?t[this._highlightPosition]:t[t.length-1],i||(i=t[0])),i.classList.add(this.config.classNames.highlightedState),i.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(l,{el:i}),this.dropdown.isActive&&(this.input.setActiveDescendant(i.id),this.containerOuter.setActiveDescendant(i.id))}_addItem({value:e,label:t=null,choiceId:i=-1,groupId:s=-1,customProperties:n={},placeholder:o=!1,keyCode:r=-1}){let l="string"==typeof e?e.trim():e;const{items:c}=this._store,d=t||l,h=i||-1,u=s>=0?this._store.getGroupById(s):null,p=c?c.length+1:1;this.config.prependValue&&(l=this.config.prependValue+l.toString()),this.config.appendValue&&(l+=this.config.appendValue.toString()),this._store.dispatch((({value:e,label:t,id:i,choiceId:s,groupId:n,customProperties:a,placeholder:o,keyCode:r})=>({type:m,value:e,label:t,id:i,choiceId:s,groupId:n,customProperties:a,placeholder:o,keyCode:r}))({value:l,label:d,id:p,choiceId:h,groupId:s,customProperties:n,placeholder:o,keyCode:r})),this._isSelectOneElement&&this.removeActiveItems(p),this.passedElement.triggerEvent(a,{id:p,value:l,label:d,customProperties:n,groupValue:u&&u.value?u.value:null,keyCode:r})}_removeItem(e){const{id:t,value:i,label:s,customProperties:n,choiceId:a,groupId:r}=e,l=r&&r>=0?this._store.getGroupById(r):null;t&&a&&(this._store.dispatch(((e,t)=>({type:f,id:e,choiceId:t}))(t,a)),this.passedElement.triggerEvent(o,{id:t,value:i,label:s,customProperties:n,groupValue:l&&l.value?l.value:null}))}_addChoice({value:e,label:t=null,isSelected:i=!1,isDisabled:s=!1,groupId:n=-1,customProperties:a={},placeholder:o=!1,keyCode:r=-1}){if(null==e)return;const{choices:l}=this._store,d=t||e,h=l?l.length+1:1,u=`${this._baseId}-${this._idNames.itemChoice}-${h}`;this._store.dispatch((({value:e,label:t,id:i,groupId:s,disabled:n,elementId:a,customProperties:o,placeholder:r,keyCode:l})=>({type:c,value:e,label:t,id:i,groupId:s,disabled:n,elementId:a,customProperties:o,placeholder:r,keyCode:l}))({id:h,groupId:n,elementId:u,value:e,label:d,disabled:s,customProperties:a,placeholder:o,keyCode:r})),i&&this._addItem({value:e,label:d,choiceId:h,customProperties:a,placeholder:o,keyCode:r})}_addGroup({group:e,id:t,valueKey:i="value",labelKey:s="label"}){const n=axTypeIs("Object",e)?e.choices:Array.from(e.getElementsByTagName("OPTION")),a=t||Math.floor((new Date).valueOf()*Math.random()),o=!!e.disabled&&e.disabled;if(n){this._store.dispatch(M({value:e.label,id:a,active:!0,disabled:o}));const t=e=>{const t=e.disabled||e.parentNode&&e.parentNode.disabled;this._addChoice({value:e[i],label:axTypeIs("Object",e)?e[s]:e.innerHTML,isSelected:e.selected,isDisabled:t,groupId:a,customProperties:e.customProperties,placeholder:e.placeholder})};n.forEach(t)}else this._store.dispatch(M({value:e.label,id:e.id,active:!1,disabled:e.disabled}))}_getTemplate(e,...t){return this._templates[e].call(this,this.config,...t)}_createTemplates(){const{callbackOnCreateTemplates:e}=this.config;let t={};e&&"function"==typeof e&&(t=e.call(this,T)),this._templates=deepmerge(H,t)}_createElements(){this.containerOuter=new L({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type,this.config.labelId),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new L({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new A({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new _({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new _({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new D({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})}_createStructure(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this.config.width?this.containerOuter.element.style.width=this.config.width:this.origElem.style&&this.origElem.style.width&&(this.containerOuter.element.style.width=this.origElem.style.width),this._isTextElement&&this._addPredefinedItems(this._presetItems),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element)}_addPredefinedGroups(e){const t=this.passedElement.placeholderOption;t&&t.parentNode&&"SELECT"===t.parentNode.tagName&&this._addChoice({value:t.value,label:t.innerHTML,isSelected:t.selected,isDisabled:t.disabled,placeholder:!0}),e.forEach(e=>this._addGroup({group:e,id:e.id||null}))}_addPredefinedChoices(e){this.config.shouldSort&&e.sort(this.config.sorter);const t=e.some(e=>e.selected),i=e.findIndex(e=>void 0===e.disabled||!e.disabled);e.forEach((e,s)=>{const{value:n="",label:a,customProperties:o,placeholder:r}=e;if(this._isSelectElement)if(e.choices)this._addGroup({group:e,id:e.id||null});else{const l=!!(this._isSelectOneElement&&!t&&s===i)||e.selected,c=e.disabled;this._addChoice({value:n,label:a,isSelected:!!l,isDisabled:!!c,placeholder:!!r,customProperties:o})}else this._addChoice({value:n,label:a,isSelected:!!e.selected,isDisabled:!!e.disabled,placeholder:!!e.placeholder,customProperties:o})})}_addPredefinedItems(e){e.forEach(e=>{"object"==typeof e&&e.value&&this._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}),"string"==typeof e&&this._addItem({value:e})})}_setChoiceOrItem(e){({object:()=>{e.value&&(this._isTextElement?this._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}):this._addChoice({value:e.value,label:e.label,isSelected:!0,isDisabled:!1,customProperties:e.customProperties,placeholder:e.placeholder}))},string:()=>{this._isTextElement?this._addItem({value:e}):this._addChoice({value:e,label:e,isSelected:!0,isDisabled:!1})}})[axType(e).toLowerCase()]()}_findAndSelectChoiceByValue(e){const{choices:t}=this._store,i=t.find(t=>this.config.valueComparer(t.value,e));i&&!i.selected&&this._addItem({value:i.value,label:i.label,choiceId:i.id,groupId:i.groupId,customProperties:i.customProperties,placeholder:i.placeholder,keyCode:i.keyCode})}_generatePlaceholderValue(){if(this._isSelectElement&&this.passedElement.placeholderOption){const{placeholderOption:e}=this.passedElement;return e?e.text:null}const{placeholder:e,placeholderValue:t}=this.config,{element:{dataset:i}}=this.passedElement;if(e){if(t)return t;if(i.placeholder)return i.placeholder}return null}}return V})); /*! * 插件:查看更多;使用方法:new axDropdown('#id',{参数}) */ class axDropdown{constructor(e,t){this.options=axExtend({content:"",arrow:!0,padding:!1,size:"sm",width:"",placement:"bottom",trigger:"click",break:!0,node:"a",ellipsis:!0,theme:""},t,e);let i=this;this.button=axIdToDom(e),this.content="";axTypeIs("Array",this.options.content)?this.content=function(e){let t="string"==typeof e?JSON.parse(e):e,s=axAddElem("div");return t.forEach((e,n)=>{let a="";a="a"==i.options.node?axAddElem(i.options.node,{class:"ax-info-block",href:e.link?e.link:"##",target:e.target?e.target:"_blank"},'
'):axAddElem(i.options.node,{class:"ax-info-block"},'
'),e.className&&a.classList.add(e.className),i.options.ellipsis?"a"!=i.options.node&&e.link?a.querySelector(".ax-col").appendChild(axAddElem("a",{class:"ax-ell",href:e.link,target:e.target?e.target:"_blank"},e.name)):a.querySelector(".ax-col").appendChild(axAddElem("span",{class:"ax-ell"},e.name)):a.querySelector(".ax-col").textContent=e.name,e.icon?a.querySelector(".ax-col").insertAdjacentElement("beforebegin",axAddElem("span",{class:"ax-icon ax-iconfont "+e.icon})):e.head&&a.querySelector(".ax-col").insertAdjacentElement("beforebegin",axAddElem("span",{class:"ax-head",style:"background-image:url("+e.head+");"})),e.suffix&&a.querySelector(".ax-col").insertAdjacentElement("afterend",axAddElem("span",{class:"ax-arrow"},e.suffix)),s.appendChild(a),i.options.break&&t.length!=n+1&&a.insertAdjacentHTML("afterend",'
')}),s}(this.options.content):axTypeIs("String",this.options.content)&&(this.content=this.options.content),this.init()}init(){return this.popup=new axPopup(this.button,{padding:this.options.padding,arrow:this.options.arrow,in:"slideDown",out:"slideUp",size:this.options.size,width:this.options.width,trigger:this.options.trigger,placement:this.options.placement,theme:this.options.theme,content:this.content,footerShow:!1,close:!1}),axTypeIs("Array",this.options.content)&&(this.popup.body.innerHTML=this.content.innerHTML,this.popup.wrapperHeight=axArrHeight(this.popup.wrapper).height),this}}document.querySelectorAll("[axDropdown]").forEach(e=>{new axDropdown(e)}); /*! * 插件:表单数量步进增减;使用方法:new axAmount('#id',{参数}) */ const axAmounts=[];class axAmount{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({value:"",min:"",max:"",step:1,precision:0,rule:"",disabled:!1,increase:!0,decrease:!0,cookie:""},t,this.targetDom);this.handlers={},this.increase=this.targetDom.querySelector("[increase]"),this.decrease=this.targetDom.querySelector("[decrease]"),this.input=this.targetDom.querySelector("input"),this.targetDom.getAttribute("axAmount")?this.referName=this.targetDom.getAttribute("axAmount"):this.referName="",this.init()}init(){let e=this;switch(this.options.rule){case"currency":this.options.min=0,this.options.max=null,this.options.step=.01,this.options.precision=2;break;case"quantity":this.options.min=1,this.options.max=999,this.options.step=1,this.options.precision=0;break;case"percent":this.options.min=0,this.options.max=100,this.options.step=1,this.options.precision=0;break;case"month":this.options.min=1,this.options.max=12,this.options.step=1,this.options.precision=0;break;case"day":this.options.min=1,this.options.max=31,this.options.step=1,this.options.precision=0;break;case"hour":this.options.min=0,this.options.max=24,this.options.step=1,this.options.precision=0;break;case"minute":case"second":this.options.min=0,this.options.max=59,this.options.step=1,this.options.precision=0}this.options.cookie&&(this.options.value=Cookies.get(this.options.cookie)),this.options.value&&(this.options.min&&this.options.valuethis.options.max&&(this.options.value=this.options.max),this.input.value=this.options.value),this.options.min&&this.options.min>Number(e.input.value)&&(this.input.value=this.options.min),this.options.max&&this.options.maxe.options.max&&(e.options.increae=!1,e.increase.setAttribute("disabled","true"),t=!1,"maxed"in e.handlers&&e.emit("maxed","")),e.input.value=s.toFixed(e.options.precision),e.input.value>n&&"changed"in e.handlers&&e.emit("changed",n,e.input.value),e.options.cookie&&Cookies.set(e.options.cookie,Number(e.input.value),{expires:365e3,path:"/"})},this.eventDecrease=function(){t||(e.options.increae=!0,e.increase.removeAttribute("disabled"));let s=Number(e.input.value),n=Number(e.input.value);""===e.options.min?s-=e.options.step:""!==e.options.min&&s>e.options.min&&(s-=e.options.step),""!==e.options.min&&s-e.options.stepe.name==this.referName)||axAmounts.push({name:this.referName,instance:this}))}update(e,t){return this.options=axExtend(this.options,e),"updated"in this.handlers&&this.emit("updated",""),t&&t.call(this),this}destroy(e){this.input.removeAttribute("disabled"),this.increase.removeAttribute("disabled"),this.decrease.removeAttribute("disabled"),this.input.removeEventListener("keydown",this.eventKey,!1),this.increase.removeEventListener("click",this.eventIncrease,!1),this.decrease.removeEventListener("click",this.eventDecrease,!1),e&&e.call(this)}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}} /*! * QRCode.js 1.0.0 from https://github.com/davidshimjs/qrcodejs | AXUI修复了严格模式下报错问题 */ var QRCode;document.querySelectorAll("[axAmount]").forEach(e=>{new axAmount(e)}),function(){function e(e){this.mode=i.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,s=this.data.length;t65536?(n[0]=240|(1835008&a)>>>18,n[1]=128|(258048&a)>>>12,n[2]=128|(4032&a)>>>6,n[3]=128|63&a):a>2048?(n[0]=224|(61440&a)>>>12,n[1]=128|(4032&a)>>>6,n[2]=128|63&a):a>128?(n[0]=192|(1984&a)>>>6,n[1]=128|63&a):n[0]=a,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function t(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}e.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,i=this.parsedData.length;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,i)},setupPositionProbePattern:function(e,t){for(var i=-1;i<=7;i++)if(!(e+i<=-1||this.moduleCount<=e+i))for(var s=-1;s<=7;s++)t+s<=-1||this.moduleCount<=t+s||(this.modules[e+i][t+s]=0<=i&&i<=6&&(0==s||6==s)||0<=s&&s<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=s&&s<=4)},getBestMaskPattern:function(){for(var e=0,t=0,i=0;i<8;i++){this.makeImpl(!0,i);var s=n.getLostPoint(this);(0==i||e>s)&&(e=s,t=i)}return t},createMovieClip:function(e,t,i){var s=e.createEmptyMovieClip(t,i);this.make();for(var n=0;n>i&1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=s}for(i=0;i<18;i++){s=!e&&1==(t>>i&1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=s}},setupTypeInfo:function(e,t){for(var i=this.errorCorrectLevel<<3|t,s=n.getBCHTypeInfo(i),a=0;a<15;a++){var o=!e&&1==(s>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o}for(a=0;a<15;a++){o=!e&&1==(s>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var i=-1,s=this.moduleCount-1,a=7,o=0,r=this.moduleCount-1;r>0;r-=2)for(6==r&&r--;;){for(var l=0;l<2;l++)if(null==this.modules[s][r-l]){var c=!1;o>>a&1)),n.getMask(t,s,r-l)&&(c=!c),this.modules[s][r-l]=c,-1==--a&&(o++,a=7)}if((s+=i)<0||this.moduleCount<=s){s-=i,i=-i;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(e,i,s){for(var a=l.getRSBlocks(e,i),o=new c,r=0;r8*h)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*h+")");for(o.getLengthInBits()+4<=8*h&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*h||(o.put(t.PAD0,8),o.getLengthInBits()>=8*h));)o.put(t.PAD1,8);return t.createBytes(o,a)},t.createBytes=function(e,t){for(var i=0,s=0,a=0,o=new Array(t.length),l=new Array(t.length),c=0;c=0?m.get(f):0}}var g=0;for(u=0;u=0;)t^=n.G15<=0;)t^=n.G18<>>=1;return t},getPatternPosition:function(e){return n.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,i){switch(e){case 0:return(t+i)%2==0;case 1:return t%2==0;case 2:return i%3==0;case 3:return(t+i)%3==0;case 4:return(Math.floor(t/2)+Math.floor(i/3))%2==0;case 5:return t*i%2+t*i%3==0;case 6:return(t*i%2+t*i%3)%2==0;case 7:return(t*i%3+(t+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new r([1],0),i=0;i5&&(i+=3+a-5)}for(s=0;s=256;)e-=255;return a.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)a.EXP_TABLE[o]=1<>>7-e%8&1)},put:function(e,t){for(var i=0;i>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var d=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function h(){var e=!1,t=navigator.userAgent;if(/android/i.test(t)){e=!0;var i=t.toString().match(/android ([0-9]\.[0-9])/i);i&&i[1]&&(e=parseFloat(i[1]))}return e}var u=function(){var e=function(e,t){this._el=e,this._htOption=t};return e.prototype.draw=function(e){var t=this._htOption,i=this._el,s=e.getModuleCount();Math.floor(t.width/s),Math.floor(t.height/s);function n(e,t){var i=document.createElementNS("http://www.w3.org/2000/svg",e);for(var s in t)t.hasOwnProperty(s)&&i.setAttribute(s,t[s]);return i}this.clear();var a=n("svg",{viewBox:"0 0 "+String(s)+" "+String(s),width:"100%",height:"100%",fill:t.colorLight});a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),i.appendChild(a),a.appendChild(n("rect",{fill:t.colorLight,width:"100%",height:"100%"})),a.appendChild(n("rect",{fill:t.colorDark,width:"1",height:"1",id:"template"}));for(var o=0;o=1;h--)arguments[h]=arguments[h]*t;else void 0===c&&(arguments[1]*=t,arguments[2]*=t,arguments[3]*=t,arguments[4]*=t);i.apply(this,arguments)}}function s(e,t){var i=this;if(i._fFail=t,i._fSuccess=e,null===i._bSupportDataURI){var s=document.createElement("img"),n=function(){i._bSupportDataURI=!1,i._fFail&&i._fFail.call(i)};return s.onabort=n,s.onerror=n,s.onload=function(){i._bSupportDataURI=!0,i._fSuccess&&i._fSuccess.call(i)},void(s.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===i._bSupportDataURI&&i._fSuccess?i._fSuccess.call(i):!1===i._bSupportDataURI&&i._fFail&&i._fFail.call(i)}var n=function(e,t){this._bIsPainted=!1,this._android=h(),this._htOption=t,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=t.width,this._elCanvas.height=t.height,e.appendChild(this._elCanvas),this._el=e,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return n.prototype.draw=function(e){var t=this._elImage,i=this._oContext,s=this._htOption,n=e.getModuleCount(),a=s.width/n,o=s.height/n,r=Math.round(a),l=Math.round(o);t.style.display="none",this.clear();for(var c=0;c'],r=0;r");for(var l=0;l');o.push("")}o.push(""),i.innerHTML=o.join("");var c=i.childNodes[0],d=(t.width-c.offsetWidth)/2,h=(t.height-c.offsetHeight)/2;d>0&&h>0&&(c.style.margin=h+"px "+d+"px")},e.prototype.clear=function(){this._el.innerHTML=""},e}();function m(e,t){for(var i=1,n=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),a=0,o=d.length;a<=o;a++){var r=0;switch(t){case s.L:r=d[a][0];break;case s.M:r=d[a][1];break;case s.Q:r=d[a][2];break;case s.H:r=d[a][3]}if(n<=r)break;i++}if(i>d.length)throw new Error("Too long data");return i}(QRCode=function(e,t){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:s.H},"string"==typeof t&&(t={text:t}),t)for(var i in t)this._htOption[i]=t[i];"string"==typeof e&&(e=document.getElementById(e)),this._htOption.useSVG&&(p=u),this._android=h(),this._el=e,this._oQRCode=null,this._oDrawing=new p(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)}).prototype.makeCode=function(e){this._oQRCode=new t(m(e,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(e),this._oQRCode.make(),this._el.title=e,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=s}(); /*! * 插件:页面社交分享;使用方法:new axShare('#id',{参数}) */ class axShare{constructor(e,t){this.targetDom=axIdToDom(e),this.options=axExtend({source:"",title:"",des:"",url:window.location.href,image:"",key:"",origin:window.location.origin,qrTitle:"

在微信里点击“发现”,再点击“扫一扫,”
便可将本文分享至朋友圈。

",qrSize:180,newPage:!0,dialogText:"确定分享本页面?",onShare:""},t,this.targetDom);this.handlers={},this.options.source||(this.options.source=document.querySelector('meta[name="site"]')||document.title),this.options.title||(this.options.title=document.querySelector('meta[name="title"]')||document.title),this.options.des||(this.options.des=document.querySelector('meta[name="description"]')||""),this.options.image||(this.options.image=(document.images[0]||0).src||""),this.init()}init(){this.shareUrl={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+this.options.url+"&title="+this.options.title+"&desc="+this.options.des+"&summary="+this.options.summary+"&site="+this.options.source+"&pics="+this.options.image,youdao:"http://note.youdao.com/memory/?title="+this.options.title+"&pic="+this.options.image+"&summary="+this.options.des+"&url="+this.options.url,qq:"http://connect.qq.com/widget/shareqq/index.html?url="+this.options.url+"&title="+this.options.title+"&source="+this.options.source+"&desc="+this.options.des+"&pics="+this.options.image+"&summary="+this.options.summary,weibo:"https://service.weibo.com/share/share.php?url="+this.options.url+"&title="+this.options.title+"&pic="+this.options.image+"&appkey="+this.options.key,daoban:"http://shuo.douban.com/!service/share?href="+this.options.url+"&name="+this.options.title+"&text="+this.options.des+"&image="+this.options.image+"&starid=0&aid=0&style=11",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title="+this.options.title+"&url="+this.options.url+"&summary="+this.options.summary+"&source="+this.options.source+"&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u="+this.options.url,twitter:"https://twitter.com/intent/tweet?text="+this.options.title+"&url="+this.options.url+"&via="+this.options.origin,google:"https://plus.google.com/share?url="+this.options.url,pinterest:"https://www.pinterest.com/pin/create/button/?url="+this.options.url+"&description="+this.options.des+"&media="+this.options.image,tumblr:"https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&url="+this.options.url+"&title="+this.options.title};for(let e in this.shareUrl)this.changeHref(e);this.targetDom.querySelector('[share="wechat"]')&&this.createQrcode()}changeHref(e){let t=this,i=this.targetDom.querySelector("[share="+e+"]");i&&(i.hasAttribute("confirm")?i.addEventListener("click",(function(i){axPreventDefault(i),new axDialog({content:t.options.dialogText,footerType:"right",confirm:{callback:function(){t.options.newPage?(window.open(t.shareUrl[e]),this.hide()):window.location.href=t.shareUrl[e],t.options.onShare&&t.options.onShare.call(t,e)}}}).show()}),!1):(this.options.newPage?i.setAttribute("target","_blank"):i.removeAttribute("target"),i.setAttribute("href",this.shareUrl[e]),i.addEventListener("click",i=>{t.options.onShare&&t.options.onShare.call(t,e)},!1)))}createQrcode(){let e=this.targetDom.querySelector('[share="wechat"]');if(0===e.length)return!1;let t=axAddElem("div",{class:"ax-qrcode"}),i=axAddElem("div",{class:"ax-qrcode-body"}),s=axAddElem("div",{class:"ax-qrcode-title"},this.options.qrTitle);new QRCode(i,{text:this.options.url,width:this.options.qrSize,height:this.options.qrSize}),t.appendChild(i),t.appendChild(s),new axPopup(e,{content:t,padding:!0,placement:"bottom",close:!1,footerShow:!1})}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axShare]").forEach(e=>{new axShare(e)}); /*! * 插件:表单数量步进增减;使用方法:new axComplete('#id',{参数}) */ class axComplete{constructor(e,t){this.options=axExtend({list:"",keys:[],threshold:.6,isCaseSensitive:!1,hasMatches:!0,minLength:1,findAll:!1,template:"",className:"",break:!0,tips:"inside",highlight:!0,rel:"",fill:""},t,e),this.input=axIdToDom(e),this.handlers={},this.rel=this.options.rel?axIdToDom(this.options.rel):"",this.outerDom=axAddElem("div",this.options.className?{class:this.options.className}:{class:"ax-complete"}),this.popup=this.createPopup(),this.popup.content.appendChild(this.outerDom),this.innerDom=axAddElem("div",{class:"ax-complete-list"}),this.outerDom.appendChild(this.innerDom),this.tipsDom=axAddElem("div",{class:"ax-complete-tips"}),this.options.tips?"inline"==this.options.tips?this.input.insertAdjacentElement("afterend",this.tipsDom):"#"==this.options.tips.substr(0,1)?axIdToDom(this.options.tips).appendChild(this.tipsDom):this.outerDom.insertAdjacentElement("afterbegin",this.tipsDom):this.tipsDom.remove(),this.init()}init(){let e=this;if(this.data=[],"string"==typeof this.options.list&&"#"==this.options.list.substr(0,1)?this.data=axListToArr(this.options.list):"string"==typeof this.options.list?this.data=this.options.list.split(","):this.options.list instanceof Array&&(this.data=this.options.list),axIsEmpty(this.data))return!1;if("0"==Object.keys(this.data[0])[0]){let e=[];this.data.forEach(t=>{let i={};i.name=t,e.push(i)}),this.data=e}this.fuseOpt={includeScore:!0},this.fuseOpt.threshold=this.options.threshold,this.fuseOpt.includeMatches=this.options.hasMatches,this.fuseOpt.minMatchCharLength=this.options.minLength,this.fuseOpt.findAllMatches=this.options.findAll,Object.keys(this.data[0])[0]&&axIsEmpty(this.options.keys)?this.fuseOpt.keys=["name"]:Object.keys(this.data[0])[0]&&!axIsEmpty(this.options.keys)&&(this.fuseOpt.keys=this.options.keys),this.initList(),this.fuse=new Fuse(this.data,this.fuseOpt),this.input.addEventListener("input",(function(){e.results=e.fuse.search(this.value.trim()),e.innerDom.innerHTML=e.renderDom(),e.options.tips&&(e.tipsDom.innerHTML=`共有${e.results.length}个结果符合要求`),e.options.highlight&&e.results.forEach((t,i)=>{let s=e.innerDom.querySelectorAll('[role="item"]')[i],n=s.querySelector('[role="name"]').innerHTML;t.matches[0].indices.forEach(e=>{let t=n.substring(e[0],e[1]+1),i=n.split(t).join(''+t+"");s.querySelector('[role="name"]').innerHTML=i}),s.onclick=function(){e.options.fill&&Object.keys(t.item).indexOf(e.options.fill)>-1?(e.input.value=t.item[e.options.fill],"selected"in e.handlers&&e.emit("selected",t.item[e.options.fill])):(e.input.value=Object.values(t.item)[0],"selected"in e.handlers&&e.emit("selected",Object.values(t.item)[0])),e.popup.hide()}}),this.value||(e.tipsDom.innerHTML="",setTimeout((function(){e.initList()}),50))}),!1)}createPopup(){return new axPopup(this.input,{content:this.outerDom,trigger:"input",padding:!1,placement:"bottom-start",close:!1,footerShow:!1})}renderDom(){let e="";return axIsEmpty(this.results)?this.innerDom.innerHTML="":(this.results.forEach((t,i)=>{e+=axTplEngine(this.createTemplate(),t),this.options.break&&i+1
')}),this.innerDom.innerHTML=e),this.innerDom.innerHTML}initList(){let e=this;this.innerDom.innerHTML=this.initDom(),this.options.rel&&(this.rel.onclick=function(){e.popup.targetDom.classList.contains("ax-show")?e.popup.hide():e.popup.show()}),this.innerDom.querySelectorAll('[role="item"]').forEach((t,i)=>{t.onclick=function(){e.options.fill&&Object.keys(e.data[i]).indexOf(e.options.fill)>-1?e.input.value=e.data[i][e.options.fill]:e.input.value=Object.values(e.data[i])[0],e.popup.hide()}})}initDom(){let e=[];this.data.forEach(t=>{let i={};i.item=t,e.push(i)});let t="";return axIsEmpty(this.data)?this.innerDom.innerHTML="":(e.forEach((i,s)=>{t+=axTplEngine(this.createTemplate(),i),this.options.break&&s+1')}),this.innerDom.innerHTML=t),this.innerDom.innerHTML}createTemplate(){return this.options.template?this.options.template:'\n
\n
<% Object.values(this[Object.keys(this)[0]])[0] %>
\n
\n
\n '}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}document.querySelectorAll("[axComplete]").forEach(e=>{new axComplete(e)}); /*! * jeDate v6.5.0 from https://github.com/singod/jeDate | AXUI做了深度修改 */ const axDate=(()=>{var jet={},regymdzz="YYYY|MM|DD|hh|mm|ss|zz",$Q=function(e,t){return t=t||document,e.nodeType?e:t.querySelector(e)},jeDate=function(e,t){return new jeDatePick(e,"function"==typeof t?t():t)};function DateTime(e,t){var i=new Date,s=["FullYear","Month","Date","Hours","Minutes","Seconds"],n=jet.extend({YYYY:null,MM:null,DD:null,hh:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds()},t),a=null==t?i:new Date(n.YYYY,n.MM,n.DD,n.hh,n.mm,n.ss);(e||[]).length>0&&jet.each(e,(function(e,t){a["set"+s[e]]("Month"==s[e]?parseInt(t)-1:parseInt(t))})),this.reDate=function(){return new DateTime},this.GetValue=function(){return a},this.GetYear=function(){return a.getFullYear()},this.GetMonth=function(){return a.getMonth()+1},this.GetDate=function(){return a.getDate()},this.GetHours=function(){return a.getHours()},this.GetMinutes=function(){return a.getMinutes()},this.GetSeconds=function(){return a.getSeconds()}}function jeDatePick(e,t){var i=axExtend({language:{name:"cn",month:["01","02","03","04","05","06","07","08","09","10","11","12"],weeks:["日","一","二","三","四","五","六"],times:["小时","分钟","秒数"],timetxt:["时间选择","开始时间","结束时间"],backtxt:"返回日期",clear:"清空",close:"关闭",today:"现在",yes:"确定"},format:"YYYY-MM-DD hh:mm:ss",minDate:"1900-01-01 00:00:00",maxDate:"2099-12-31 23:59:59",mode:"popup",isShow:!0,multiPane:!0,onClose:!0,range:!1,trigger:"click",position:[],valiDate:[],isinitVal:!1,initDate:{},rel:"",isTime:!0,isClear:!1,clearFun:function(){},isClose:!0,closeFun:function(){},isToday:!0,isYes:!0,festival:!1,fixed:!0,zIndex:2099,nowClose:!1,method:{},theme:{},shortcut:[],donefun:null,before:null,succeed:null},t,e);this.$opts=jet.extend(i,t||{}),this.valCell=$Q(e),this.format=this.$opts.format,null!=this.valCell?this.init():alert(e+" ID或类名不存在!"),jet.extend(this,this.$opts.method),delete this.$opts.method}jeDate.extend=jet.extend=function(){var e,t,i,s=arguments[0],n=1,a=arguments.length;for("boolean"==typeof s&&(s,s=arguments[1]||{},n=2),"object"!=typeof s&&"function"!=typeof s&&(s={}),a===n&&(s=this,--n);n8;t>>=1)i+=s[e-1900]&t?1:0;return i+d(e)},c=function(e){return"甲乙丙丁戊己庚辛壬癸".charAt(e%10)+"子丑寅卯辰巳午未申酉戌亥".charAt(e%12)},d=function(e){return h(e)?65536&s[e-1900]?30:29:0},h=function(e){return 15&s[e-1900]},u=function(e,t){return s[e-1900]&65536>>t?30:29},p=function(e){return e<10?"0"+(0|e):e},m=function(e,t){var i=e;return t.replace(/dd?d?d?|MM?M?M?|yy?y?y?/g,(function(e){switch(e){case"yyyy":var t="000"+i.getFullYear();return t.substring(t.length-4);case"dd":return p(i.getDate());case"d":return i.getDate().toString();case"MM":return p(i.getMonth()+1);case"M":return i.getMonth()+1}}))};this.isToday=!1,this.isRestDay=!1,this.solarYear=m(e,"yyyy"),this.solarMonth=m(e,"M"),this.solarDate=m(e,"d"),this.solarWeekDay=e.getDay(),this.inWeekDays="星期"+"日一二三四五六七八九十".charAt(this.solarWeekDay);var f=new function(e){var t,s,n=0,a=(e-new Date(1900,0,31))/864e5;for(this.dayCyl=a+40,this.monCyl=14,t=1900;t<2050&&a>0;t++)a-=n=i(t),this.monCyl+=12;for(a<0&&(a+=n,t--,this.monCyl-=12),this.year=t,this.yearCyl=t-1864,s=h(t),this.isLeap=!1,t=1;t<13&&a>0;t++)s>0&&t==s+1&&0==this.isLeap?(--t,this.isLeap=!0,n=d(this.year)):n=u(this.year,t),1==this.isLeap&&t==s+1&&(this.isLeap=!1),a-=n,0==this.isLeap&&this.monCyl++;0==a&&s>0&&t==s+1&&(this.isLeap?this.isLeap=!1:(this.isLeap=!0,--t,--this.monCyl)),a<0&&(a+=n,--t,--this.monCyl),this.month=t,this.day=a+1}(e);this.lunarYear=f.year,this.shengxiao="鼠牛虎兔龙蛇马羊猴鸡狗猪".charAt((this.lunarYear-4)%12),this.lunarMonth=f.month,this.lunarIsLeapMonth=f.isLeap,this.lnongMonth=this.lunarIsLeapMonth?"闰"+o[f.month-1]:o[f.month-1],this.lunarDate=f.day,this.showInLunar=this.lnongDate=function(e,t){var i;switch(t){case 10:i="初十";break;case 20:i="二十";break;case 30:i="三十";break;default:i="初十廿卅".charAt(Math.floor(t/10)),i+="日一二三四五六七八九十".charAt(t%10)}return i}(this.lunarMonth,this.lunarDate),1==this.lunarDate&&(this.showInLunar=this.lnongMonth+"月"),this.ganzhiYear=c(f.yearCyl),this.ganzhiMonth=c(f.monCyl),this.ganzhiDate=c(f.dayCyl++),this.jieqi="",this.restDays=0,t(this.solarYear,2*(this.solarMonth-1))==m(e,"d")&&(this.showInLunar=this.jieqi=a[2*(this.solarMonth-1)]),t(this.solarYear,2*(this.solarMonth-1)+1)==m(e,"d")&&(this.showInLunar=this.jieqi=a[2*(this.solarMonth-1)+1]),"清明"==this.showInLunar&&(this.showInLunar="清明节",this.restDays=1),this.solarFestival=r[m(e,"MM")+m(e,"dd")],void 0===this.solarFestival?this.solarFestival="":/\*(\d)/.test(this.solarFestival)&&(this.restDays=parseInt(RegExp.$1),this.solarFestival=this.solarFestival.replace(/\*\d/,"")),this.showInLunar=""==this.solarFestival?this.showInLunar:this.solarFestival,this.lunarFestival=l[this.lunarIsLeapMonth?"00":p(this.lunarMonth)+p(this.lunarDate)],void 0===this.lunarFestival?this.lunarFestival="":/\*(\d)/.test(this.lunarFestival)&&(this.restDays=this.restDays>parseInt(RegExp.$1)?this.restDays:parseInt(RegExp.$1),this.lunarFestival=this.lunarFestival.replace(/\*\d/,"")),12==this.lunarMonth&&this.lunarDate==u(this.lunarYear,12)&&(this.lunarFestival=l["0100"],this.restDays=1),this.showInLunar=""==this.lunarFestival?this.showInLunar:this.lunarFestival}(new Date(e,t,i))}return jet.extend(jeDatePick.prototype,{init:function(){var e,t=this,i=t.$opts,s=i.trigger,n=i.initDate||[],a=i.range,o=jet.isBool(i.isShow),r=null!=i.isinitVal&&0!=i.isinitVal;if(t.shortIndex="",t.shortMenu=axAddElem("div",{class:"ax-date-menu"}),t.setDatas(),i.before&&i.before(t.valCell),r&&s&&o){if(n[1]){var l=jet.getDateTime(n[0]);e=[{YYYY:l.YYYY,MM:jet.digit(l.MM),DD:jet.digit(l.DD),hh:jet.digit(l.hh),mm:jet.digit(l.mm),ss:jet.digit(l.ss)}]}else e=t.getValue(jet.isObj(n[0])?n[0]:{});a||t.setValue([e[0]],i.format,!0)}var c=function(){var e=jet.reMatch(t.format),i=""!=t.getValue(),s=[],n=7==t.dlen?"hh:mm:ss":"YYYY-MM"+(t.dlen<=2?"":"-DD"),r=t.valCell.value;if(r){r=r.substr(0,11);var l=[jet.parse(jet.getDateTime({}),n)];l=l[0];var c=new Date(r).setHours("0"),d=new Date(l).setHours("0"),h={DD:parseInt((c-d)/1e3/3600/24)};t.selectValue=[jet.parse(jet.getDateTime(h),n)]}else t.selectValue=[jet.parse(jet.getDateTime({}),n)];if(i&&o){var u=t.getValue().split(a);jet.each(new Array(a?2:1),(function(t){s[t]={},jet.each(jet.reMatch(u[t]),(function(i,n){s[t][e[i]]=parseInt(n)}))})),a&&(t.selectValue=u)}else{var p=t.getValue({})[0],m=jet.nextMonth(p.YYYY,p.MM||jet.getDateTime({}).MM);t.dlen>2&&t.dlen<=6&&(m.y,m.m);s=[p]}return t.selectDate=s,s},d=[];if(t.minDate="",t.maxDate="",o&&s||(d=c()),o&&s){if(s){if(document.querySelectorAll(elx).length>0)return;var h=c();t.minDate=jet.isType(i.minDate,"function")?i.minDate(t):i.minDate,t.maxDate=jet.isType(i.maxDate,"function")?i.maxDate(t):i.maxDate,t.storeData(h[0],h[1]),t.renderDate(),"inline"==i.mode?(t.valCell.insertAdjacentElement("afterend",t.dateCell),t.valCell.setAttribute("readonly","")):"dialog"==i.mode?(t.dialog=new axDialog({size:"",padding:!1,footerShow:!1,content:t.dateCell}),t.valCell.addEventListener("click",(function(){t.dialog.show()}),!1)):t.popup=new axPopup(t.valCell,{size:"",padding:!1,rel:i.rel,placement:"bottom-start",close:!1,footerShow:!1,content:t.dateCell})}}else t.minDate=jet.isType(i.minDate,"function")?i.minDate(t):i.minDate,t.maxDate=jet.isType(i.maxDate,"function")?i.maxDate(t):i.maxDate,t.storeData(d[0],d[1]),t.renderDate(),i.succeed&&i.succeed(t.dateCell)},setDatas:function(){var e=this,t=e.$opts,i=t.range,s=[],n=jet.isBool(t.isShow),a=t.multiPane;e.$data=jet.extend({year:!1,month:!1,day:!0,time:!1,timebtn:!1},{shortcut:[],lang:t.language,yaerlist:[],monthlist:[[],[]],ymlist:[[],[]],daylist:[[],[]],clear:t.isClear,close:t.isClose,today:!i&&t.isToday,yes:t.isYes,pane:a?1:2}),t.shortcut.length>0&&(jet.each(t.shortcut,(function(e,t){var i=[],n=jet.isType(t.val,"function")?t.val():t.val;if(jet.isType(n,"object")){for(var a in n)i.push(a+":"+n[a]);s.push(jet.extend({},{name:t.name,val:"{"+i.join("#")+"}"}))}})),e.$data.shortcut=s),e.dlen=function(){var t=jet.reMatch(e.format),i=[];jet.each(ymdzArr,(function(e,s){jet.each(t,(function(e,t){s==t&&i.push(t)}))}));var s=i.length;return"hh"==i[0]&&s<=3?7:s}(),e.$data.dlen=e.dlen,e.timeInspect=!1,1==e.dlen?jet.extend(e.$data,{year:!0,day:!1}):2==e.dlen?jet.extend(e.$data,{month:!0,day:!1}):e.dlen>3&&e.dlen<=6?e.$data.timebtn=!0:7==e.dlen&&jet.extend(e.$data,{day:!1,time:!0}),n||(e.$data.clear=!1,e.$data.yes=!1)},renderDate:function(){var e=this,t=e.$opts,i=jet.isBool(t.isShow),s=elx+searandom();if(null==e.dateCell&&(e.dateCell=document.createElement("div"),e.dateCell.id=s.replace(/\#/g,""),e.dateCell.className=elx.replace(/\#/g,"")+" "+(t.festival?" ax-with-calendar":""),e.wrapper=axAddElem("div",{class:"ax-date-wrapper"}),e.dateCell.appendChild(e.wrapper)),jet.html(e.wrapper,jet.template(e.dateTemplate(),e.$data)),jet.isObj(t.theme)){var n=document.createElement("style"),a=".ax-date"+searandom(),o=t.theme,r="background-color:"+o.bgcolor,l="color:"+(null==o.color?"#FFFFFF":o.color),c=null==o.pnColor?"":"color:"+o.pnColor+";";e.dateCell.className=e.dateCell.className+" "+a.replace(/^./g,""),n.setAttribute("type","text/css"),n.innerHTML=a+" .ax-date-menu p:hover{"+r+";"+l+";}"+a+" .ax-date-header em{"+l+";}"+a+" .ax-date-body .ytable td.ax-selected span,"+a+" .ax-date-body .ax-mtable td.ax-selected span,"+a+" .ax-date-body .ytable td.ax-selected span:hover,"+a+" .ax-date-body .ax-mtable td.ax-selected span:hover{"+r+";border:1px "+o.bgcolor+" solid;"+l+";}"+a+" .ax-date-body .ax-dtable td.ax-selected,"+a+" .ax-date-body .ax-dtable td.ax-selected:hover,"+a+" .ax-date-body .ax-dtable td.ax-selected .lunar,"+a+" .ax-date-header,"+a+" .ax-date-time .ax-date-header,"+a+" .ax-date-time .ax-time-list ul li.ax-selected,"+a+" .ax-date-time .ax-time-list ul li.ax-selected:hover,"+a+" .ax-date-time .ax-time-list ul li.ax-disabled.ax-selected,"+a+" .ax-date-footbtn .timecon,"+a+" .ax-date-footbtn .btnscon span{"+r+";"+l+";}"+a+" .ax-date-body .ax-dtable td.ax-other,"+a+" .ax-date-body .ax-dtable td.ax-other .ax-unit,"+a+" .ax-date-body .ax-dtable td.ax-other .lunar{"+c+"}"+a+" .ax-date-body .ax-dtable td.contain,"+a+" .ax-date-body .ax-dtable td.contain:hover{background-"+c+"}",e.dateCell.appendChild(n)}if(e.compileBindNode(e.dateCell),document.querySelectorAll(s).length>0&&document.body.removeChild($Q(s)),!i&&e.valCell.appendChild(e.dateCell),e.methodEventBind(),(7==e.dlen||e.dlen>3&&e.dlen<=6)&&e.locateScroll(),t.festival&&"cn"==t.language.name&&e.showFestival(),i&&(e.dateOrien(e.dateCell,e.valCell),e.blankArea()),t.shortcut.length>0){e.shortMenu.innerHTML="";for(var d=0;d'+t.shortcut[d].name+"";e.wrapper.insertAdjacentElement("afterbegin",e.shortMenu),e.shortMenu.querySelectorAll("a").forEach((i,s)=>{i.onclick=function(){e.shortIndex=s,e.shortClick(JSON.stringify(t.shortcut[s].val))}}),""!==e.shortIndex&&e.shortMenu.querySelectorAll("a")[e.shortIndex].classList.add("ax-selected")}},setValue:function(e,t,i){var s,n=this.valCell;if(t=t||this.format,"string"==typeof e&&""!=e){var a=e.split(this.$opts.range),o=[];jet.each(a,(function(e,i){var s=jet.reMatch(i),n={};jet.each(jet.reMatch(t),(function(e,t){n[t]=s[e]})),o.push(n)})),s=o}else s=e;var r=this.parseValue(s,t);return 0!=i&&jet.valText(n,r),r},getValue:function(e){var t,i=this.valCell,s=this.$opts,n=(new DateTime).reDate(),a=n.GetYear(),o=n.GetMonth(),r=n.GetDate(),l=n.GetHours(),c=n.GetMinutes(),d=n.GetSeconds();if(null==e&&jet.isBool(s.isShow))t=jet.valText(i);else{var h=jet.isBool(s.isShow)?""==jet.valText(i):!jet.isBool(s.isShow),u=jet.extend({YYYY:null,MM:null,DD:null},e||{}),p=[],m=new Array(2),f=function(e){return[null==u[e]||null==u[e],u[e]]},g=[{YYYY:a,MM:o,DD:r,hh:l,mm:c,ss:d,zz:""},{YYYY:a,MM:o,DD:r,hh:l,mm:c,ss:d,zz:""}];if(h)jet.each(m,(function(e){var t={};jet.each(ymdzArr,(function(i,s){t[s]=parseInt(f(s)[0]?g[e][s]:f(s)[1])})),p.push(jet.extend(g[e],t))}));else{var v=0!=s.range,x=this.getValue(),y=x.split(s.range),b=jet.reMatch(this.format);jet.each(m,(function(t){var i={},s=v?jet.reMatch(y[t]):jet.reMatch(x);jet.each(b,(function(e,t){i[t]=s[e]}));var n=jet.extend(i,e||{});p.push(jet.extend(g[t],n))}))}t=p}return t},storeData:function(e,t){t=t||{};var i,s=this.$opts,n=s.multiPane,a=this.valCell,o=(new Date).getDate(),r=jet.isObj(t),l={yearlist:[],monthlist:[[],[]],daylist:[],daytit:[],timelist:[]},c=null==e.DD?o:e.DD,d=null==t.DD?o:t.DD,h={hh:e.hh,mm:e.mm,ss:e.ss},u={hh:t.hh||0,mm:t.mm||0,ss:t.ss||0};if(l.yearlist.push(this.eachYear(parseInt(e.YYYY),1)),0==n){var p=r?t.YYYY:e.YYYY;l.yearlist.push(this.eachYear(parseInt(p),2))}if(l.monthlist[0]=this.eachMonth(e.YYYY,0),0==n&&(l.monthlist[1]=this.eachMonth(e.YYYY+1,1)),l.daylist.push(this.eachDays(e.YYYY,e.MM,c,0)),l.daytit.push({YYYY:e.YYYY,MM:e.MM}),0==n){var m=jet.nextMonth(e.YYYY,e.MM);l.daylist.push(this.eachDays(m.y,m.m,d,1)),l.daytit.push({YYYY:m.y,MM:m.m})}this.selectTime=[h,u],l.timelist.push(this.eachTime(h,1)),0==n&&(i=7==this.dlen&&s.range&&!r?h:u,7==this.dlen&&s.range&&""==jet.valText(a)&&(this.selectTime[1]=jet.extend(u,h)),l.timelist.push(this.eachTime(i,2))),jet.extend(this.$data,l)},dateTemplate:function(){var e,t,i,s,n=this,a=n.$opts,o=a.multiPane,r="",l="",c=a.language,d="cn"==c.name?"年":"",h="cn"==c.name?"月":"",u=(e=[],t=o?"11":"23",1==n.dlen?e=["{%=yearlist[i][0].y-"+t+"%}","{%=yearlist[i][yearlist[i].length-1].y%}"]:2==n.dlen?e=o?["{%=yearlist[0][0].y-1%}","{%=yearlist[0][0].y+1%}"]:["{%=yearlist[i][0].y-"+t+"%}","{%=yearlist[i][yearlist[i].length-1].y%}"]:n.dlen>2&&n.dlen<=6&&(e=["{%=yearlist[0][0].y-1%}","{%=yearlist[0][0].y+1%}"]),e),p='',m='',f='{% if(dlen>2){ %}{% } %}',g='{% if(dlen>2){ %}{% } %}',v='{% for(var y=0;y<=11;y++){ %}{% if((y+1)%3==0){ %} {% } %} {% } %}
{%=yearlist[i][y].y%}'+d+"
",x='{% for(var m=0;m<=11;m++){ %}{% if((m+1)%3==0){ %} {% } %} {% } %}
{%=monthlist[i][m].m%}'+h+"
",y='{% for(var w=0;w{%=lang.weeks[w]%} {% } %}{% for(var d=0;d<=41;d++){ %}{% if((d+1)%7==0){ %} {% } %} {% } %}
{%=daylist[i][d].day%}
',b='
{% for(var h=0;h
{%= timelist.length == 1 ? lang.timetxt[0]:lang.timetxt[h+1]%}
{%=lang.times[0]%}
{%=lang.times[1]%}
{%=lang.times[2]%}
{% for(var t=0;t<3;t++){ %}
    {% for(var s=0;s{%= timelist[h][t][s].hms < 10 ? "0" + timelist[h][t][s].hms :timelist[h][t][s].hms %}{% } %}
{% } %}
{% } %}',w=(a.shortcut.length,i="",1==n.dlen?i='{%=yearlist[i][0].y%}'+d+" ~ {%=yearlist[i][yearlist[i].length-1].y%}"+d+"":2==n.dlen?i='{%=yearlist[0][i].y%}'+d+"":n.dlen>2&&n.dlen<=6&&(i='{%=daytit[i].MM%}'+h+'{%=daytit[i].YYYY%}'+d+""),i),M=(s="",1==n.dlen?s=o?[p+m]:[p,m]:2==n.dlen?s=o?[p+m]:[p,m]:n.dlen>2&&n.dlen<=6?s=o?[p+f+g+m]:[p+f,g+m]:7==n.dlen&&(s=""),s);1==n.dlen?r=v:2==n.dlen?r=v+x:3==n.dlen?r=v+x+y:n.dlen>3&&n.dlen<=6?(r=v+x+y,l=b):7==n.dlen&&(l=b);var E='{% for(var i=0;i
{% if(i==0){ %}'+M[0]+"{% }else{ %}"+M[1]+"{% } %}"+w+'
'+r+"
{% } %}";"inline"==a.mode&&(a.isClose=!1,n.dateCell.setAttribute("data-mode","inline"));let S="";if(a.isShow&&"inline"!=a.mode||(a.isClose=!1),S=a.isClear?''+a.language.clear+"":a.isClose?''+a.language.close+"":"",a.multiPane)var D='';else D='';return'
'+E+"
"+l+D+"
"},compileBindNode:function(e){var t=this;jet.each(e.childNodes,(function(e,i){if(1===i.nodeType){t.$opts.festival||i.removeAttribute("ymd"),t.compileBindNode(i);var s=i.getAttribute("@on");if(null!=s){var n=((o=/\(.*\)/.exec(a=s))?(o=o[0],a=a.replace(o,""),o=o.replace(/[\(\)\'\"]/g,"").split(",")):o=[],[a,o]);jet.on(i,"click",(function(){t[n[0]]&&t[n[0]].apply(i,n[1])})),i.removeAttribute("@on")}}var a,o}))},methodEventBind:function(){var that=this,opts=that.$opts,multi=opts.multiPane,DTS=that.$data,result=(new DateTime).reDate(),dateY=result.GetYear(),dateM=result.GetMonth(),dateD=result.GetDate(),range=opts.range,elCell=that.dateCell;jet.extend(that,{yearBtn:function(e,t){var i=t.split("#"),s=(jet.reMatch(i[0]),that.selectTime);exarr=[jet.extend({YYYY:parseInt(t),MM:dateM,DD:dateD},s[0]),{}];var n=that.parseValue([exarr[0]],that.format);that.storeData(exarr[0],exarr[1]),that.renderDate(),opts.toggle&&opts.toggle({elem:that.valCell,val:n,date:exarr[0]})},yearShow:function(e){DTS.year=!0,DTS.month=!1,that.dlen>2&&that.dlen<=6&&(DTS.day=!1),that.renderDate()},monthBtn:function(e,t){var i,s,n=jet.reMatch(t),a=that.selectTime,o=[],r=parseInt(n[0]),l=parseInt(n[1]);if(range)"mprev"==e?(i=jet.prevMonth(r,l),s=jet.nextMonth(i.y,i.m)):(s=jet.nextMonth(r,l),i=jet.prevMonth(s.y,s.m)),o=[jet.extend({YYYY:i.y,MM:i.m,DD:dateD},a[0]),{YYYY:s.y,MM:s.m,DD:dateD}];else{var c="mprev"==e?jet.prevMonth(r,l):jet.nextMonth(r,l);o=[jet.extend({YYYY:c.y,MM:c.m,DD:dateD},a[0]),{}]}var d=that.parseValue([o[0]],that.format);that.storeData(o[0],o[1]),that.renderDate(),opts.toggle&&opts.toggle({elem:that.valCell,val:d,date:o[0]})},monthShow:function(e){DTS.year=!1,DTS.month=!0,that.dlen>2&&that.dlen<=6&&(DTS.day=!1),that.renderDate()},shortClick:function(val){var reval=val.replace(/\#/g,","),evobj=eval("("+reval+")"),gval=jet.getDateTime(evobj),tmval=that.selectTime;if(that.selectValue=[jet.parse(gval,"YYYY-MM-DD")],that.selectDate=[{YYYY:gval.YYYY,MM:gval.MM,DD:gval.DD}],that.selectTime=[{hh:gval.hh,mm:gval.mm,ss:gval.ss}],tmval=that.selectTime,opts.onClose){var nYM=jet.nextMonth(gval.YYYY,gval.MM),ymarr=[{YYYY:gval.YYYY,MM:gval.MM,DD:gval.DD},{YYYY:nYM.y,MM:nYM.m,DD:null}];that.storeData(jet.extend(ymarr[0],tmval[0]),jet.extend(ymarr[1],tmval[1])),that.renderDate()}else that.setValue(gval,that.format),that.closeDate();that.lastClick="panel"},yearClick:function(e){if(!jet.hasClass(this,"ax-disabled")){var t="",i=that.dlen;if(range&&1==i){var s=that.selectValue.length;if(that.selectDate=2==s?[{YYYY:parseInt(e),MM:dateM}]:[{YYYY:that.selectDate[0].YYYY,MM:that.selectDate[0].MM},{YYYY:parseInt(e),MM:dateM}],that.selectValue=2==s?[e+"-"+jet.digit(dateM)]:[that.selectValue[0],e+"-"+jet.digit(dateM)],2==that.selectValue.length){var n=[that.selectValue[0],that.selectValue[1]],a=[{},{}];n.sort((function(e,t){return e>t?1:-1})),that.selectValue=n,jet.each(n,(function(e,t){jet.each(jet.reMatch(t),(function(t,i){a[e][ymdzArr[t]]=i}))})),that.selectDate=a}}else i>1&&i<=6?t=parseInt(e):(that.selectValue=[e+"-"+jet.digit(dateM)],that.selectDate=[{YYYY:parseInt(e),MM:dateM}]);DTS.year=1==i,DTS.month=i<3,DTS.day=i>2&&i<=6;var o=i>1&&i<=6?t:parseInt(that.selectDate[0].YYYY);that.storeData(jet.extend({YYYY:o,MM:dateM,DD:dateD},that.selectTime[0]),{}),that.renderDate(),that.lastClick="panel"}},monthClick:function(e){if(!jet.hasClass(this,"ax-disabled")){var t=jet.reMatch(e),i=[{},{}],s=that.selectValue.length;if(range){if(that.selectDate=2==s?[{YYYY:t[0],MM:t[1]}]:[{YYYY:that.selectDate[0].YYYY,MM:that.selectDate[0].MM},{YYYY:parseInt(e),MM:t[1]}],that.selectValue=2==s?[e]:[that.selectValue[0],e],2==that.selectValue.length){var n=[that.selectValue[0],that.selectValue[1]];n.sort((function(e,t){return e>t?1:-1})),that.selectValue=n,jet.each(n,(function(e,t){jet.each(jet.reMatch(t),(function(t,s){i[e][ymdzArr[t]]=s}))})),that.selectDate=i}}else that.selectValue=[e],that.selectDate=[{YYYY:t[0],MM:t[1]}];that.dlen>2&&(DTS.year=!1,DTS.month=!1),DTS.day=that.dlen>2&&that.dlen<=6,that.storeData(jet.extend({YYYY:parseInt(that.selectDate[0].YYYY),MM:parseInt(that.selectDate[0].MM),DD:dateD},that.selectTime[0]),{}),that.renderDate(),that.lastClick="panel"}},daysClick:function(e){if(!jet.hasClass(this,"ax-disabled")){var t,i,s=that.selectTime,n=jet.reMatch(e),a=that.selectValue.length,o="",r=[{},{}];if(range){if(1==a){var l=[that.selectValue[0],e];l.sort((function(e,t){return e>t?1:-1})),that.selectValue=l,jet.each(l,(function(e,t){jet.each(jet.reMatch(t),(function(t,i){r[e][ymdzArr[t]]=i}))})),that.selectDate=r}else that.selectValue=[e],r=[{YYYY:n[0],MM:n[1],DD:n[2]}],that.selectDate=[{YYYY:n[0],MM:n[1],DD:n[2]},{}];t=jet.nextMonth(r[0].YYYY,r[0].MM),i=[{YYYY:r[0].YYYY,MM:r[0].MM,DD:r[0].DD},{YYYY:t.y,MM:t.m,DD:null}],that.storeData(jet.extend(i[0],s[0]),jet.extend(i[1],s[1])),that.renderDate()}else that.selectValue=[e],that.selectDate=[{YYYY:n[0],MM:n[1],DD:n[2]},{YYYY:n[0],MM:n[1],DD:n[2]}],jet.each(new Array(0==range?1:2),(function(e){jet.each(n,(function(t,i){r[e][ymdzArr[t]]=i})),jet.extend(r[e],s[e])})),opts.onClose?(that.storeData(jet.extend(r[0],s[0]),jet.extend(r[1],s[1])),that.renderDate()):(o=that.setValue(r,that.format),that.closeDate(),opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:o,date:r}));that.lastClick="panel"}},hmsClick:function(e,t){var i=parseInt(t),s=parseInt(jet.text(this)),n=parseInt(e),a="ax-selected",o=["hh","mm","ss"],r=$Q(".ax-date-time",that.dateCell).querySelectorAll("ul")[i],l=that.$data.timelist[0].length;if(!jet.hasClass(this,"ax-disabled")){if(jet.each(r.childNodes,(function(e,t){var i=new RegExp("(^|\\s+)"+a+"(\\s+|$)","g");t.className=i.test(t.className)?t.className.replace(i,""):t.className})),that.selectTime[n][1==n?o[i-l]:o[i]]=s,this.className=this.className+a,7==that.dlen&&0==e&&range&&!multi){var c=that.getValue({}),d=jet.nextMonth(c[0].YYYY,c[0].MM),h=that.selectTime;that.storeData({YYYY:c[0].YYYY,MM:c[0].MM,DD:null,hh:h[0].hh,mm:h[0].mm,ss:h[0].ss},{YYYY:d.y,MM:d.m,DD:null,hh:h[1].hh,mm:h[1].mm,ss:h[1].ss}),that.renderDate()}that.lastClick="panel"}},timeBtn:function(){var e=$Q(".ax-date-time",elCell),t="none"==e.style.display;jet.text(this,t?opts.language.backtxt:opts.language.timetxt[0]),jet.setCss(e,{display:t?"":"none"}),that.lastClick="panel",e.querySelectorAll("ul").forEach(e=>{axPreventScroll(e)})},clearBtn:function(){jet.valText(that.valCell,""),that.selectDate=[jet.parse(jet.getDateTime({}),"YYYY-MM-DD hh:mm:ss")],opts.isShow&&that.closeDate(),opts.clearfun&&opts.clearfun.call(that)},closeBtn:function(){opts.isShow&&that.closeDate(),opts.closefun&&opts.closefun.call(that)},nowBtn:function(){var e,t=jet.getDateTime({}),i=jet.nextMonth(t.YYYY,t.MM);that.selectDate=[t],that.storeData(t,{YYYY:i.y,MM:i.m,DD:null,hh:0,mm:0,ss:0}),that.renderDate(),opts.nowClose?(e=opts.isShow?that.setValue([t],that.format,!0):jet.parse(t,that.format),that.closeDate()):"inline"==opts.mode&&that.setValue([t],that.format,!0),that.nowVal=that.selectDate,that.lastClick="now",opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:e,date:t})},sureBtn:function(){var e=that.selectValue.length>1?[{},{}]:[{}],t="",i=that.selectTime,s=function(e){var t=null==e.hh?0:e.hh,i=null==e.mm?0:e.mm,s=null==e.ss?0:e.ss;return parseInt(jet.digit(t)+""+jet.digit(i)+jet.digit(s))};if(range){if(that.selectValue.length>1){var n=that.selectValue;n.sort((function(e,t){return e>t?1:-1})),jet.each(n,(function(t,s){jet.each(jet.reMatch(s),(function(i,s){e[t][ymdzArr[i]]=s})),jet.extend(e[t],i[t])}))}else 7==that.dlen&&i.length>1&&(e=i);var a=s(i[0])>=s(i[1]),o=that.selectValue,r="";if(null!=o[1]&&(r=o[0].replace(/\-/g,"")==o[1].replace(/\-/g,"")),1==o.length&&that.dlen<7)return void that.tips("cn"==opts.language.name?"未选结束日期":"Please select the end date");if(7==that.dlen&&a||r&&a)return void that.tips("cn"==opts.language.name?"结束时间必须大于开始时间":"The end time must be greater than the start time")}else jet.each(new Array(0==range?1:2),(function(t){7!=that.dlen&&jet.each(jet.reMatch(that.selectValue[0]),(function(i,s){e[t][ymdzArr[i]]=s})),jet.extend(e[t],i[t])}));t="now"==that.lastClick?that.setValue(that.nowVal,that.format,!!opts.isShow):that.setValue(e,that.format,!!opts.isShow),that.closeDate(),opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:t,date:e})},blankArea:function(){}})},eachYear:function(e,t){var i,s=this.$opts,n=parseInt(e),a=[],o="",r=this.selectDate,l=jet.reMatch(this.minDate),c=jet.reMatch(this.maxDate);i=1==t?n:this.yindex,this.yindex=1==t?12+n:12+this.yindex;for(var d=null==r[1]?"":r[1].YYYY;ir[0].YYYY&&ic[0]?"ax-disabled":"",a.push({style:o,y:i});return a},eachMonth:function(e,t){var i=this.$opts,s=[],n=this.selectDate,a="",o=i.language.month,r=jet.reMatch(this.minDate),l=jet.reMatch(this.maxDate),c=parseInt(r[0]+""+jet.digit(r[1])),d=parseInt(l[0]+""+jet.digit(l[1])),h=parseInt(n[0].YYYY+""+jet.digit(n[0].MM)),u=n[1]?parseInt(n[1].YYYY+""+jet.digit(n[1].MM)):0;return jet.each(o,(function(t,n){var o=parseInt(e+""+jet.digit(n));a=i.range&&o==h?"ax-selected ax-start":i.range&&o==u?"ax-selected ax-end":o==h||o==u?"ax-selected":o>h&&od?"ax-disabled":"",s.push({style:a,y:e,m:n})})),s},eachDays:function(e,t,i,s){for(var n=this,a=0,o=[],r=n.$opts,l=new Date(e,t-1,1).getDay()||7,c=jet.getDaysNum(e,t),d=n.selectDate,h=jet.prevMonth(e,t),u=jet.getDaysNum(e,h.m),p=jet.nextMonth(e,t),m=r.language,f=r.valiDate||[],g=jet.reMatch(n.minDate),v=parseInt(g[0]+""+jet.digit(g[1])+jet.digit(g[2])),x=jet.reMatch(n.maxDate),y=parseInt(x[0]+""+jet.digit(x[1])+jet.digit(x[2])),b=d[0]?parseInt(d[0].YYYY+""+jet.digit(d[0].MM)+jet.digit(d[0].DD)):"",w=d[1]?parseInt(d[1].YYYY+""+jet.digit(d[1].MM)+jet.digit(d[1].DD)):"",M=function(e,t,i){var s=r.marks;return jet.isType(s,"array")&&s.length>0&&function(e,t){for(var i=e.length;i--;)if(e[i]===t)return!0;return!1}(s,e+"-"+jet.digit(t)+"-"+jet.digit(i))?'':""},E=function(e,t,i){var s="";if(1==r.festival&&"cn"==m.name){var n=jeLunar(e,t-1,i),a=n.solarFestival||n.lunarFestival;s='
'+i+'
'+(""!=(a&&n.jieqi)?a:n.jieqi||n.showInLunar)+"
"}else s=''+i+"";return s},S=function(e,t,i,s){var n=parseInt(e+""+jet.digit(t)+jet.digit(i));if(s){if(n>=v&&n<=y)return!0}else if(v>n||y0&&""!=f[0])if(/\%/g.test(f[0])){var i=f[0].replace(/\%/g,"").split(","),s=[];jet.each(i,(function(e,t){s.push(jet.digit(parseInt(t)))}));var a=0==function(e,t){for(var i in t)if(t[i]==e)return!0;return!1}(jet.digit(e),s);t=jet.isBool(f[1])?a?" ax-disabled":t:a?t:" ax-disabled"}else{var o=n.dateRegExp(f[0]).test(jet.digit(e));t=jet.isBool(f[1])?o?" ax-disabled":t:o?t:" ax-disabled"}return t},T=u-l+1;T<=u;T++,a++){var C=M(h.y,h.m,T),L=S(h.y,h.m,T,!1)?"ax-disabled":"ax-other";L=D(T,L),o.push({style:L,ymd:h.y+"-"+jet.digit(h.m)+"-"+jet.digit(T),day:E(h.y,h.m,T)+C})}for(var A=1;A<=c;A++,a++){var _=M(e,t,A),I="",k=parseInt(e+""+jet.digit(t)+jet.digit(A)),N=k>b,O=k3&&/\:/.test(m)&&/\:/.test(f)&&(o=jet.reMatch(/\s/.test(u)&&i.dlen>3?m[1]:u),r=jet.reMatch(/\s/.test(p)&&i.dlen>3?f[1]:p)),jet.each([24,60,60],(function(s,u){c[s]=[];var p=null==o[s]||0==o[s]?e[l[s]]:o[s],f=""==i.getValue()?p:e[l[s]];i.dlen>3&&/\:/.test(m)&&1==t&&(i.selectTime[0][l[s]]=f);for(var g=0;gr[s])?"ax-disabled":a?"":1==t&&gr[s]?"ax-disabled":"",c[s].push({style:d,hms:g})}})),c},closeDate:function(){"popup"==this.$opts.mode?this.popup.hide():"dialog"==this.$opts.mode&&this.dialog.hide()},parseValue:function(e,t){var i=[],s=this.$opts.range;return jet.each(e,(function(e,s){i.push(jet.parse(s,t))})),0==s?i[0]:i.join(s)},dateRegExp:function(valArr){var enval=valArr.split(",")||[],regs="",doExp=function(val){var arr,tmpEval,regs=/#?\{(.*?)\}/;for(val+="";null!=(arr=regs.exec(val));)arr.lastIndex=arr.index+arr[1].length+arr[0].length-arr[1].length-1,tmpEval=parseInt(eval(arr[1])),tmpEval<0&&(tmpEval="9700"+-tmpEval),val=val.substring(0,arr.index)+tmpEval+val.substring(arr.lastIndex+1);return val};if(enval&&enval.length>0){for(var i=0;i

农历:"+t.shengxiao+"年 "+t.lnongMonth+"月"+t.lnongDate+"

"+t.ganzhiYear+"年 "+t.ganzhiMonth+"月 "+t.ganzhiDate+"日

",o=""!=(t.solarFestival||t.lunarFestival)?'

节日:'+t.solarFestival+t.lunarFestival+"

":"",r=""!=t.jieqi?"

"+(""!=t.jieqi?"节气:"+t.jieqi:"")+"

":"",l=""!=(t.solarFestival||t.lunarFestival||t.jieqi)?o+r:"";jet.html(n,a+l),e.lunarPopup=new axPopup(i,{size:"",close:!1,placement:"bottom-start",footerShow:!1,content:n}).show()}},leave:function(){e.lunarPopup&&e.lunarPopup.targetDom.remove()}})})),1!==e.dateCell.nodeType||jet.hasClass(e.dateCell,"grid")||(e.dateCell.className=e.dateCell.className+" grid")},lunarOrien:function(e,t,i){var s,n,a=t.getBoundingClientRect(),o=e.offsetWidth,r=e.offsetHeight;return n=a.right+o/1.5>=jet.docArea(!0)?a.right-o:a.left+(i?0:jet.docScroll(!0)),s=a.bottom+r/1<=jet.docArea()?a.bottom-1:a.top>r/1.5?a.top-r-1:jet.docArea()-r,n+o>jet.docArea(!0)&&(n=a.left-(o-a.width)),{top:Math.max(s+(i?0:jet.docScroll())+1,1)+"px",left:n+"px"}},dateOrien:function(e,t,i){var s=this.$opts.fixed?t.getBoundingClientRect():e.getBoundingClientRect(),n=s.left,a=s.bottom;if(this.$opts.fixed){var o=e.offsetWidth,r=e.offsetHeight;n+o>jet.docArea(!0)&&(n-=o-s.width),a+r>jet.docArea()&&(a=s.top>r?s.top-r-2:jet.docArea()-r-1),Math.max(a+(i?0:jet.docScroll())+1,1)+"px",n+"px"}else"50%","50%",e.style.cssText="marginTop:"+-s.height/2+";marginLeft:"+-s.width/2},tips:function(e,t){new axMessage({content:e,iconShow:!0,result:"error"})},locateScroll:function(){var e=$Q(".ax-date-time",this.dateCell).querySelectorAll("ul");jet.each(e,(function(e,t){var i=t.querySelector(".ax-selected");t.scrollTop=i?i.offsetTop:0})),7!=this.dlen&&jet.setCss($Q(".ax-date-time",this.dateCell),{display:"none"})}}),jeDate})();document.querySelectorAll("[axDate]").forEach(e=>{new axDate(e)}); /*! * 插件:轮滑选择;改造自ion.rangeSlider | https://github.com/IonDen/ion.rangeSlider;使用方法:new axRange('#id',{参数}) */ const axRanges=[];class axRange{constructor(e,t){if(this.targetDom="string"==typeof e?document.querySelector(e):e,!(this instanceof axRange))return new axRange(e,t);let i=this;this.calcCount=0,this.updateTm=0,this.oldFrom=0,this.oldTo=0,this.oldMinInterval=null,this.rafId=null,this.dragging=!1,this.forceRedraw=!1,this.noDiapason=!1,this.hasTabIndex=!0,this.isKey=!1,this.isUpdate=!1,this.isStart=!0,this.isFinish=!1,this.isActive=!1,this.isResize=!1,this.isClick=!1,this.target="base",this.cache={win:window,body:document.body,targetDom:this.targetDom,cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0},"INPUT"!==this.targetDom.nodeName&&console&&console.warn&&console.warn("Base targetDom should be !",input),this.config={className:"",type:"single",min:0,max:100,from:null,to:null,step:1,minInterval:0,maxInterval:0,dragInterval:!1,values:[],pValues:[],fromStick:!1,fromMin:null,fromMax:null,fromShadow:!1,toStick:!1,toMin:null,toMax:null,toShadow:!1,prettifyEnabled:!1,prettifySeparator:" ",prettify:null,forceEdges:!1,keyboard:!0,grid:!1,gridMargin:!0,gridNum:4,gridSnap:!1,hideLabelTrack:!1,hideLabelSlider:!1,prefix:"",postfix:"",maxPostfix:"",decorateBoth:!0,valuesSeparator:" — ",inputValuesSeparator:";",disabled:!1,block:!1,scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null};let s=this.targetDom.value;void 0!==s&&""!==s&&(s=t&&t.inputValuesSeparator?s.split(t.inputValuesSeparator):s.split(";"),s[0]&&s[0]==+s[0]&&(s[0]=+s[0]),s[1]&&s[1]==+s[1]&&(s[1]=+s[1]),t&&t.values&&t.values.length?(this.config.from=s[0]&&t.values.indexOf(s[0]),this.config.to=s[1]&&t.values.indexOf(s[1])):(this.config.from=s[0]&&+s[0],this.config.to=s[1]&&+s[1])),this.options=axExtend(this.config,t,this.targetDom),this.targetDom?this.referName=this.targetDom.getAttribute("axRange"):this.referName="",this.handlers={},this.update_check={},this.result={input:this.cache.targetDom,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.ready=function(e){this.noDiapason=!1,this.coords.p_step=P(this.options.step,!0),this.target="base",this.toggleInput(),n(),g(),e?(this.forceRedraw=!0,y(!0),$()):(this.forceRedraw=!0,y(!0),N()),L()};const n=function(){const e='
';i.cache.targetDom.insertAdjacentHTML("beforebegin",e),i.cache.targetDom.setAttribute("readonly","true"),i.cache.cont=i.cache.targetDom.previousElementSibling,i.result.slider=i.cache.cont,i.cache.cont.innerHTML='
01000
1
',i.cache.label=i.cache.cont.querySelector(".ax-range-label"),i.cache.min=i.cache.cont.querySelector(".ax-range-min"),i.cache.max=i.cache.cont.querySelector(".ax-range-max"),i.cache.from=i.cache.cont.querySelector(".ax-range-from"),i.cache.to=i.cache.cont.querySelector(".ax-range-to"),i.cache.single=i.cache.cont.querySelector(".ax-range-single"),i.cache.line=i.cache.cont.querySelector(".ax-range-line"),i.cache.grid=i.cache.cont.querySelector(".ax-range-grid"),"single"===i.options.type?(i.cache.cont.insertAdjacentHTML("beforeend",'
'),i.cache.bar=i.cache.cont.querySelector(".ax-range-bar"),i.cache.edge=i.cache.cont.querySelector(".ax-range-bar-single"),i.cache.s_single=i.cache.cont.querySelector(".ax-single"),i.cache.from.style.visibility="hidden",i.cache.to.style.visibility="hidden",i.cache.shad_single=i.cache.cont.querySelector(".ax-shadow-single")):(i.cache.cont.insertAdjacentHTML("beforeend",'
'),i.cache.bar=i.cache.cont.querySelector(".ax-range-bar"),i.cache.s_from=i.cache.cont.querySelector(".ax-from"),i.cache.s_to=i.cache.cont.querySelector(".ax-to"),i.cache.shad_from=i.cache.cont.querySelector(".ax-shadow-from"),i.cache.shad_to=i.cache.cont.querySelector(".ax-shadow-to"),a()),i.options.hideLabelSlider&&(i.cache.from.style.display="none",i.cache.to.style.display="none",i.cache.single.style.display="none"),W(),i.options.disabled?(o(),i.cache.targetDom.disabled=!0):(i.cache.targetDom.disabled=!1,r(),l()),i.options.disabled||(i.options.block?o():r()),i.options.dragInterval&&(i.cache.bar.style.cursor="ew-resize")},a=function(){const e=i.options.min,t=i.options.max,s=i.options.from,n=i.options.to;s>e&&n===t?i.cache.s_from.classList.add("ax-last"):n'),i.cache.cont.classList.add("ax-disabled")},r=function(){i.cache.cont.classList.remove(".ax-disabled-mask"),i.cache.cont.classList.remove("ax-disabled")};this.remove=function(){this.cache.cont.remove(),this.cache.cont=null,this.cache.win.removeEventListener("keydown",m.bind(this,"keyboard")),this.cache.body.removeEventListener("touchmove",d.bind(this)),this.cache.body.removeEventListener("mousemove",d.bind(this)),this.cache.win.removeEventListener("touchend",h.bind(this)),this.cache.win.removeEventListener("mouseup",h.bind(this)),this.cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.rafId)};const l=function(){i.noDiapason||(i.cache.body.addEventListener("touchmove",d.bind(this)),i.cache.body.addEventListener("mousemove",d.bind(this)),i.cache.win.addEventListener("touchend",h.bind(this)),i.cache.win.addEventListener("mouseup",h.bind(this)),i.cache.line.addEventListener("touchstart",p.bind(this,"click"),{passive:!0}),i.cache.line.addEventListener("mousedown",p.bind(this,"click")),i.cache.line.addEventListener("focus",c.bind(this)),i.options.dragInterval&&"double"===i.options.type?(i.cache.bar.addEventListener("touchstart",u.bind(this,"both"),{passive:!0}),i.cache.bar.addEventListener("mousedown",u.bind(this,"both"))):(i.cache.bar.addEventListener("touchstart",p.bind(this,"click"),{passive:!0}),i.cache.bar.addEventListener("mousedown",p.bind(this,"click"))),"single"===i.options.type?(i.cache.single.addEventListener("touchstart",u.bind(this,"single"),{passive:!0}),i.cache.s_single.addEventListener("touchstart",u.bind(this,"single"),{passive:!0}),i.cache.shad_single.addEventListener("touchstart",p.bind(this,"click"),{passive:!0}),i.cache.single.addEventListener("mousedown",u.bind(this,"single")),i.cache.s_single.addEventListener("mousedown",u.bind(this,"single")),i.cache.edge.addEventListener("mousedown",p.bind(this,"click")),i.cache.shad_single.addEventListener("touchstart",p.bind(this,"click"),{passive:!0})):(i.cache.single.addEventListener("touchstart",u.bind(this,null),{passive:!0}),i.cache.single.addEventListener("mousedown",u.bind(this,null)),i.cache.from.addEventListener("touchstart",u.bind(this,"from"),{passive:!0}),i.cache.s_from.addEventListener("touchstart",u.bind(this,"from"),{passive:!0}),i.cache.to.addEventListener("touchstart",u.bind(this,"to"),{passive:!0}),i.cache.s_to.addEventListener("touchstart",u.bind(this,"to"),{passive:!0}),i.cache.shad_from.addEventListener("touchstart",p.bind(this,"click"),{passive:!0}),i.cache.shad_to.addEventListener("touchstart",p.bind(this,"click"),{passive:!0}),i.cache.from.addEventListener("mousedown",u.bind(this,"from")),i.cache.s_from.addEventListener("mousedown",u.bind(this,"from")),i.cache.to.addEventListener("mousedown",u.bind(this,"to")),i.cache.s_to.addEventListener("mousedown",u.bind(this,"to")),i.cache.shad_from.addEventListener("mousedown",p.bind(this,"click")),i.cache.shad_to.addEventListener("mousedown",p.bind(this,"click"))),i.options.keyboard&&i.cache.line.addEventListener("keydown",m.bind(this,"keyboard")))},c=function(e){if(i.target)i.cache.line.focus();else{let e,t;t="single"===i.options.type?i.cache.single:i.cache.from,e=t.getBoundingClientRect().left,e+=t.getBoundingClientRect().width/2-1,p("single",{preventDefault:function(){},pageX:e})}},d=function(e){if(!i.dragging)return;const t=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;i.coords.x_pointer=t-i.coords.x_gap,y()},h=function(e){if(!i.isActive)return;i.isActive=!1;const t=i.cache.cont.querySelector(".ax-hover");t&&t.classList.remove("ax-hover"),i.forceRedraw=!0,L(),x(),(i.cache.cont.contains(e.target)||i.dragging)&&j(),i.dragging=!1},u=function(e,t){axPreventDefault(t);const s=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;2!==t.button&&("both"===e&&v(),e||(e=i.target||"from"),i.target=e,i.isActive=!0,i.dragging=!0,i.coords.x_gap=i.cache.label.getBoundingClientRect().left,i.coords.x_pointer=s-i.coords.x_gap,b(),function(e){switch(i.target){case"single":i.coords.p_gap=F(i.coords.p_pointer-i.coords.p_single_fake),i.cache.s_single.classList.add("ax-hover");break;case"from":i.coords.p_gap=F(i.coords.p_pointer-i.coords.p_from_fake),i.cache.s_from.classList.add("ax-hover","ax-last"),i.cache.s_to.classList.remove("ax-last");break;case"to":i.coords.p_gap=F(i.coords.p_pointer-i.coords.p_to_fake),i.cache.s_to.classList.add("ax-hover","ax-last"),i.cache.s_from.classList.remove("ax-last");break;case"both":i.coords.p_gap_left=F(i.coords.p_pointer-i.coords.p_from_fake),i.coords.p_gap_right=F(i.coords.p_to_fake-i.coords.p_pointer),i.cache.s_to.classList.remove("ax-last"),i.cache.s_from.classList.remove("ax-last")}}(),i.cache.line.dispatchEvent(new Event("focus")),L())},p=function(e,t){axPreventDefault(t);const s=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;2!==t.button&&(i.target=e,i.isClick=!0,i.coords.x_gap=i.cache.label.getBoundingClientRect().left,i.coords.x_pointer=+(s-i.coords.x_gap).toFixed(),i.forceRedraw=!0,y(),i.cache.line.dispatchEvent(new Event("focus")))},m=function(e,t){if(!(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey))switch(t.which){case 83:case 65:case 40:case 37:axPreventDefault(t),f(!1);break;case 87:case 68:case 38:case 39:axPreventDefault(t),f(!0)}},f=function(e){let t=i.coords.p_pointer;const s=i.options.step/((i.options.max-i.options.min)/100);e?t+=s:t-=s,i.coords.x_pointer=F(i.coords.w_rs/100*t),i.isKey=!0,y()},g=function(){if(i.options){if(i.options.hideLabelTrack)return i.cache.min.style.display="none",void(i.cache.max.style.display="none");if(i.options.values.length)i.cache.min.innerHTML=U(i.options.pValues[i.options.min]),i.cache.max.innerHTML=U(i.options.pValues[i.options.max]);else{const e=R(i.options.min),t=R(i.options.max);i.result.min_pretty=e,i.result.max_pretty=t,i.cache.min.innerHTML=U(e,i.options.min),i.cache.max.innerHTML=U(t,i.options.max)}i.labels.w_min=i.cache.min.offsetWidth,i.labels.w_max=i.cache.max.offsetWidth}},v=function(){const e=i.result.to-i.result.from;null===i.oldMinInterval&&(i.oldMinInterval=i.options.minInterval),i.options.minInterval=e},x=function(){null!==i.oldMinInterval&&(i.options.minInterval=i.oldMinInterval,i.oldMinInterval=null)},y=function(e){if(!i.options)return;if(i.calcCount++,(10===i.calcCount||e)&&(i.calcCount=0,i.coords.w_rs=i.cache.label.offsetWidth,S()),!i.coords.w_rs)return;b();let t=E();switch("both"===i.target&&(i.coords.p_gap=0,t=E()),"click"===i.target&&(i.coords.p_gap=i.coords.p_handle/2,t=E(),i.options.dragInterval?i.target="both_one":i.target=D(t)),i.target){case"base":const e=(i.options.max-i.options.min)/100,s=(i.result.from-i.options.min)/e,n=(i.result.to-i.options.min)/e;i.coords.p_single_real=F(s),i.coords.p_from_real=F(s),i.coords.p_to_real=F(n),i.coords.p_single_real=H(i.coords.p_single_real,i.options.fromMin,i.options.fromMax),i.coords.p_from_real=H(i.coords.p_from_real,i.options.fromMin,i.options.fromMax),i.coords.p_to_real=H(i.coords.p_to_real,i.options.toMin,i.options.toMax),i.coords.p_single_fake=M(i.coords.p_single_real),i.coords.p_from_fake=M(i.coords.p_from_real),i.coords.p_to_fake=M(i.coords.p_to_real),i.target=null;break;case"single":if(i.options.fromStick)break;i.coords.p_single_real=w(t),i.coords.p_single_real=Y(i.coords.p_single_real),i.coords.p_single_real=H(i.coords.p_single_real,i.options.fromMin,i.options.fromMax),i.coords.p_single_fake=M(i.coords.p_single_real);break;case"from":if(i.options.fromStick)break;i.coords.p_from_real=w(t),i.coords.p_from_real=Y(i.coords.p_from_real),i.coords.p_from_real>i.coords.p_to_real&&(i.coords.p_from_real=i.coords.p_to_real),i.coords.p_from_real=H(i.coords.p_from_real,i.options.fromMin,i.options.fromMax),i.coords.p_from_real=q(i.coords.p_from_real,i.coords.p_to_real,"from"),i.coords.p_from_real=B(i.coords.p_from_real,i.coords.p_to_real,"from"),i.coords.p_from_fake=M(i.coords.p_from_real);break;case"to":if(i.options.toStick)break;i.coords.p_to_real=w(t),i.coords.p_to_real=Y(i.coords.p_to_real),i.coords.p_to_real100&&(d=100,c=d-r),i.coords.p_from_real=Y(c),i.coords.p_from_real=H(i.coords.p_from_real,i.options.fromMin,i.options.fromMax),i.coords.p_from_fake=M(i.coords.p_from_real),i.coords.p_to_real=Y(d),i.coords.p_to_real=H(i.coords.p_to_real,i.options.toMin,i.options.toMax),i.coords.p_to_fake=M(i.coords.p_to_real)}"single"===i.options.type?(i.coords.p_bar_x=i.coords.p_handle/2,i.coords.p_bar_w=i.coords.p_single_fake,i.result.from_percent=i.coords.p_single_real,i.result.from=z(i.coords.p_single_real),i.result.from_pretty=R(i.result.from),i.options.values.length&&(i.result.from_value=i.options.values[i.result.from])):(i.coords.p_bar_x=F(i.coords.p_from_fake+i.coords.p_handle/2),i.coords.p_bar_w=F(i.coords.p_to_fake-i.coords.p_from_fake),i.result.from_percent=i.coords.p_from_real,i.result.from=z(i.coords.p_from_real),i.result.from_pretty=R(i.result.from),i.result.to_percent=i.coords.p_to_real,i.result.to=z(i.coords.p_to_real),i.result.to_pretty=R(i.result.to),i.options.values.length&&(i.result.from_value=i.options.values[i.result.from],i.result.to_value=i.options.values[i.result.to])),T(),C()},b=function(){i.coords.w_rs?(i.coords.x_pointer<0||isNaN(i.coords.x_pointer)?i.coords.x_pointer=0:i.coords.x_pointer>i.coords.w_rs&&(i.coords.x_pointer=i.coords.w_rs),i.coords.p_pointer=F(i.coords.x_pointer/i.coords.w_rs*100)):i.coords.p_pointer=0},w=function(e){return e/(100-i.coords.p_handle)*100},M=function(e){return e/100*(100-i.coords.p_handle)},E=function(){const e=100-i.coords.p_handle;let t=F(i.coords.p_pointer-i.coords.p_gap);return t<0?t=0:t>e&&(t=e),t},S=function(){"single"===i.options.type?i.coords.w_handle=i.cache.s_single.offsetWidth:i.coords.w_handle=i.cache.s_from.offsetWidth,i.coords.p_handle=F(i.coords.w_handle/i.coords.w_rs*100)},D=function(e){if("single"===i.options.type)return"single";return e>=i.coords.p_from_real+(i.coords.p_to_real-i.coords.p_from_real)/2?i.options.toStick?"from":"to":i.options.fromStick?"to":"from"},T=function(){i.coords.w_rs&&(i.labels.p_min=i.labels.w_min/i.coords.w_rs*100,i.labels.p_max=i.labels.w_max/i.coords.w_rs*100)},C=function(){i.coords.w_rs&&!i.options.hideLabelSlider&&("single"===i.options.type?(i.labels.w_single=i.cache.single.offsetWidth,i.labels.p_single_fake=i.labels.w_single/i.coords.w_rs*100,i.labels.p_single_left=i.coords.p_single_fake+i.coords.p_handle/2-i.labels.p_single_fake/2,i.labels.p_single_left=G(i.labels.p_single_left,i.labels.p_single_fake)):(i.labels.w_from=i.cache.from.offsetWidth,i.labels.p_from_fake=i.labels.w_from/i.coords.w_rs*100,i.labels.p_from_left=i.coords.p_from_fake+i.coords.p_handle/2-i.labels.p_from_fake/2,i.labels.p_from_left=F(i.labels.p_from_left),i.labels.p_from_left=G(i.labels.p_from_left,i.labels.p_from_fake),i.labels.w_to=i.cache.to.offsetWidth,i.labels.p_to_fake=i.labels.w_to/i.coords.w_rs*100,i.labels.p_to_left=i.coords.p_to_fake+i.coords.p_handle/2-i.labels.p_to_fake/2,i.labels.p_to_left=F(i.labels.p_to_left),i.labels.p_to_left=G(i.labels.p_to_left,i.labels.p_to_fake),i.labels.w_single=i.cache.single.offsetWidth,i.labels.p_single_fake=i.labels.w_single/i.coords.w_rs*100,i.labels.p_single_left=(i.labels.p_from_left+i.labels.p_to_left+i.labels.p_to_fake)/2-i.labels.p_single_fake/2,i.labels.p_single_left=F(i.labels.p_single_left),i.labels.p_single_left=G(i.labels.p_single_left,i.labels.p_single_fake)))},L=function(){i.rafId&&(cancelAnimationFrame(i.rafId),i.rafId=null),clearTimeout(i.updateTm),i.updateTm=null,i.options&&(A(),i.isActive?i.rafId=requestAnimationFrame(L):i.updateTm=setTimeout(L,300))},A=function(){i.coords.w_rs=i.cache.label.offsetWidth,i.coords.w_rs&&(i.coords.w_rs!==i.coords.w_rs_old&&(i.target="base",i.isResize=!0),(i.coords.w_rs!==i.coords.w_rs_old||i.forceRedraw)&&(g(),y(!0),_(),i.options.grid&&(J(),Q()),i.forceRedraw=!0,i.coords.w_rs_old=i.coords.w_rs,I()),i.coords.w_rs&&(i.dragging||i.forceRedraw||i.isKey)&&((i.oldFrom!==i.result.from||i.oldTo!==i.result.to||i.forceRedraw||i.isKey)&&(_(),i.cache.bar.style.left=i.coords.p_bar_x+"%",i.cache.bar.style.width=i.coords.p_bar_w+"%","single"===i.options.type?(i.cache.bar.style.left="0",i.cache.bar.style.width=i.coords.p_bar_w+i.coords.p_bar_x+"%",i.cache.s_single.style.left=i.coords.p_single_fake+"%",i.cache.single.style.left=i.labels.p_single_left+"%"):(i.cache.s_from.style.left=i.coords.p_from_fake+"%",i.cache.s_to.style.left=i.coords.p_to_fake+"%",(i.oldFrom!==i.result.from||i.forceRedraw)&&(i.cache.from.style.left=i.labels.p_from_left+"%"),(i.oldTo!==i.result.to||i.forceRedraw)&&(i.cache.to.style.left=i.labels.p_to_left+"%"),i.cache.single.style.left=i.labels.p_single_left+"%"),k(),i.oldFrom===i.result.from&&i.oldTo===i.result.to||i.isStart||(i.cache.targetDom.dispatchEvent(new Event("change")),i.cache.targetDom.dispatchEvent(new Event("input"))),i.oldFrom=i.result.from,i.oldTo=i.result.to,i.isResize||i.isUpdate||i.isStart||i.isFinish||O(),(i.isKey||i.isClick)&&(i.isKey=!1,i.isClick=!1,j()),i.isUpdate=!1,i.isResize=!1,i.isFinish=!1),i.isStart=!1,i.isKey=!1,i.isClick=!1,i.forceRedraw=!1))},_=function(){if(!i.options)return;const e=i.options.values.length,t=i.options.pValues;let s,n,a,o,r;if(!i.options.hideLabelSlider)if("single"===i.options.type)e?(s=U(t[i.result.from]),i.cache.single.innerHTML=s):(o=R(i.result.from),s=U(o,i.result.from),i.cache.single.innerHTML=s),C(),i.labels.p_single_left100-i.labels.p_max-1?i.cache.max.style.visibility="hidden":i.cache.max.style.visibility="visible";else{e?(i.options.decorateBoth?(s=U(t[i.result.from]),s+=i.options.valuesSeparator,s+=U(t[i.result.to])):s=U(t[i.result.from]+i.options.valuesSeparator+t[i.result.to]),n=U(t[i.result.from]),a=U(t[i.result.to]),i.cache.single.innerHTML=s,i.cache.from.innerHTML=n,i.cache.to.innerHTML=a):(o=R(i.result.from),r=R(i.result.to),i.options.decorateBoth?(s=U(o,i.result.from),s+=i.options.valuesSeparator,s+=U(r,i.result.to)):s=U(o+i.options.valuesSeparator+r,i.result.to),n=U(o,i.result.from),a=U(r,i.result.to),i.cache.single.innerHTML=s,i.cache.from.innerHTML=n,i.cache.to.innerHTML=a),C();const l=Math.min(i.labels.p_single_left,i.labels.p_from_left),c=i.labels.p_single_left+i.labels.p_single_fake,d=i.labels.p_to_left+i.labels.p_to_fake;let h=Math.max(c,d);i.labels.p_from_left+i.labels.p_from_fake>=i.labels.p_to_left?(i.cache.from.style.visibility="hidden",i.cache.to.style.visibility="hidden",i.cache.single.style.visibility="visible",i.result.from===i.result.to?("from"===i.target?i.cache.from.style.visibility="visible":"to"===i.target?i.cache.to.style.visibility="visible":i.target||(i.cache.from.style.visibility="visible"),i.cache.single.style.visibility="hidden",h=d):(i.cache.from.style.visibility="hidden",i.cache.to.style.visibility="hidden",i.cache.single.style.visibility="visible",h=Math.max(c,d))):(i.cache.from.style.visibility="visible",i.cache.to.style.visibility="visible",i.cache.single.style.visibility="hidden"),l100-i.labels.p_max-1?i.cache.max.style.visibility="hidden":i.cache.max.style.visibility="visible"}},I=function(){const e=i.options,t=i.cache,s="number"==typeof e.fromMin&&!isNaN(e.fromMin),n="number"==typeof e.fromMax&&!isNaN(e.fromMax),a="number"==typeof e.toMin&&!isNaN(e.toMin),o="number"==typeof e.toMax&&!isNaN(e.toMax);let r,l,c,d;"single"===e.type?e.fromShadow&&(s||n)?(r=P(s?e.fromMin:e.min),l=P(n?e.fromMax:e.max)-r,r=F(r-i.coords.p_handle/100*r),l=F(l-i.coords.p_handle/100*l),r+=i.coords.p_handle/2,t.shad_single.style.display="block",t.shad_single.style.left=r+"%",t.shad_single.style.width=l+"%"):t.shad_single.style.display="none":(e.fromShadow&&(s||n)?(r=P(s?e.fromMin:e.min),l=P(n?e.fromMax:e.max)-r,r=F(r-i.coords.p_handle/100*r),l=F(l-i.coords.p_handle/100*l),r+=i.coords.p_handle/2,t.shad_from.style.display="block",t.shad_from.style.left=r+"%",t.shad_from.style.width=l+"%"):t.shad_from.style.display="none",e.toShadow&&(a||o)?(c=P(a?e.toMin:e.min),d=P(o?e.toMax:e.max)-c,c=F(c-i.coords.p_handle/100*c),d=F(d-i.coords.p_handle/100*d),c+=i.coords.p_handle/2,t.shad_to.style.display="block",t.shad_to.style.left=c+"%",t.shad_to.style.width=d+"%"):t.shad_to.style.display="none")},k=function(){"single"===i.options.type?(i.options.values.length?i.cache.targetDom.setAttribute("value",i.result.from_value):i.cache.targetDom.setAttribute("value",i.result.from),i.cache.targetDom.dataset.from=i.result.from):(i.options.values.length?i.cache.targetDom.setAttribute("value",i.result.from_value+i.options.inputValuesSeparator+i.result.to_value):i.cache.targetDom.setAttribute("value",i.result.from+i.options.inputValuesSeparator+i.result.to),i.cache.targetDom.dataset.from=i.result.from,i.cache.targetDom.dataset.to=i.result.to)},N=function(){k(),i.options.onStart&&"function"==typeof i.options.onStart&&(i.options.scope?i.options.onStart.call(i.options.scope,i.result):i.options.onStart(i.result))},O=function(){k(),i.options.onChange&&"function"==typeof i.options.onChange&&(i.options.scope?i.options.onChange.call(i.options.scope,i.result):i.options.onChange(i.result))},j=function(){k(),i.options.onFinish&&"function"==typeof i.options.onFinish&&(i.options.scope?i.options.onFinish.call(i.options.scope,i.result):i.options.onFinish(i.result))},$=function(){k(),i.options.onUpdate&&"function"==typeof i.options.onUpdate&&(i.options.scope?i.options.onUpdate.call(i.options.scope,i.result):i.options.onUpdate(i.result))};this.toggleInput=function(){this.cache.targetDom.classList.toggle("ax-range-input"),this.hasTabIndex?this.cache.targetDom.setAttribute("tabindex","-1"):this.cache.targetDom.removeAttribute("tabindex"),this.hasTabIndex=!this.hasTabIndex};const P=function(e,t){let s,n,a=i.options.max-i.options.min,o=a/100;return a?(s=t?e:e-i.options.min,n=s/o,F(n)):(i.noDiapason=!0,0)},z=function(e){let t,s,n=i.options.min,a=i.options.max,o=n.toString().split(".")[1],r=a.toString().split(".")[1],l=0,c=0;if(0===e)return i.options.min;if(100===e)return i.options.max;o&&(t=o.length,l=t),r&&(s=r.length,l=s),t&&s&&(l=t>=s?t:s),n<0&&(c=Math.abs(n),n=+(n+c).toFixed(l),a=+(a+c).toFixed(l));let d,h=(a-n)/100*e+n,u=i.options.step.toString().split(".")[1];return u?h=+h.toFixed(u.length):(h/=i.options.step,h*=i.options.step,h=+h.toFixed(0)),c&&(h-=c),d=u?+h.toFixed(u.length):F(h),di.options.max&&(d=i.options.max),d},Y=function(e){let t=Math.round(e/i.coords.p_step)*i.coords.p_step;return t>100&&(t=100),100===e&&(t=100),F(t)},q=function(e,t,s){let n,a,o=i.options;return o.minInterval?(n=z(e),a=z(t),"from"===s?a-no.maxInterval&&(n=a-o.maxInterval):n-a>o.maxInterval&&(n=a+o.maxInterval),P(n)):e},H=function(e,t,s){let n=z(e);return"number"!=typeof t&&(t=i.options.min),"number"!=typeof s&&(s=i.options.max),ns&&(n=s),P(n)},F=function(e){return+(e=e.toFixed(20))},R=function(e){return i.options.prettifyEnabled?i.options.prettify&&"function"==typeof i.options.prettify?i.options.prettify(e):V(e):e},V=function(e){return e.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+i.options.prettifySeparator)},G=function(e,t){return i.options.forceEdges?(e<0?e=0:e>100-t&&(e=100-t),F(e)):F(e)};this.validate=function(){let e,t,s=this.options,n=this.result,a=s.values,o=a.length;if("string"==typeof s.min&&(s.min=+s.min),"string"==typeof s.max&&(s.max=+s.max),"string"==typeof s.from&&(s.from=+s.from),"string"==typeof s.to&&(s.to=+s.to),"string"==typeof s.step&&(s.step=+s.step),"string"==typeof s.fromMin&&(s.fromMin=+s.fromMin),"string"==typeof s.fromMax&&(s.fromMax=+s.fromMax),"string"==typeof s.toMin&&(s.toMin=+s.toMin),"string"==typeof s.toMax&&(s.toMax=+s.toMax),"string"==typeof s.gridNum&&(s.gridNum=+s.gridNum),s.maxs.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),i.update_check.from&&(i.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),i.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.fromMax&&(s.from=s.fromMax),"number"==typeof s.toMin&&s.tos.toMax&&(s.to=s.toMax),n&&(n.min!==s.min&&(n.min=s.min),n.max!==s.max&&(n.max=s.max),(n.fromn.max)&&(n.from=s.from),(n.ton.max)&&(n.to=s.to)),("number"!=typeof s.minInterval||isNaN(s.minInterval)||!s.minInterval||s.minInterval<0)&&(s.minInterval=0),("number"!=typeof s.maxInterval||isNaN(s.maxInterval)||!s.maxInterval||s.maxInterval<0)&&(s.maxInterval=0),s.minInterval&&s.minInterval>s.max-s.min&&(s.minInterval=s.max-s.min),s.maxInterval&&s.maxInterval>s.max-s.min&&(s.maxInterval=s.max-s.min)};const U=function(e,t){let s="",n=i.options;return n.prefix&&(s+=n.prefix),s+=e,n.maxPostfix&&(n.values.length&&e===n.pValues[n.max]?(s+=n.maxPostfix,n.postfix&&(s+=" ")):t===n.max&&(s+=n.maxPostfix,n.postfix&&(s+=" "))),n.postfix&&(s+=n.postfix),s};this.updateResult=function(){this.result.min=this.options.min,this.result.max=this.options.max,i.result.from=i.options.from,i.result.from_percent=P(i.result.from),i.result.from_pretty=R(i.result.from),i.options.values&&(i.result.from_value=i.options.values[i.result.from]),i.result.to=i.options.to,i.result.to_percent=P(i.result.to),i.result.to_pretty=R(i.result.to),i.options.values&&(i.result.to_value=i.options.values[i.result.to])};const W=function(){if(!i.options.grid)return;let e,t,s,n,a,o=i.options,r=o.max-o.min,l=o.gridNum,c=0,d=0,h=4,u=0,p="";for(J(),o.gridSnap&&(l=r/o.step),l>50&&(l=50),c=F(100/l),l>4&&(h=3),l>7&&(h=2),l>14&&(h=1),l>28&&(h=0),e=0;e100&&(d=100),i.coords.big[e]=d,n=(d-c*(e-1))/(s+1),t=1;t<=s&&0!==d;t++)u=F(d-n*t),p+='';p+='',a=z(d),a=o.values.length?o.pValues[a]:R(a),p+=''+a+""}i.coords.big_num=Math.ceil(l+1),i.cache.cont.classList.add("ax-with-grid"),i.cache.grid.innerHTML=p,X()},X=function(){for(let e=0;e100+i.coords.grid_gap&&(t[s-1]=100+i.coords.grid_gap,e[s-1]=F(t[s-1]-i.coords.big_p[s-1]),i.coords.big_x[s-1]=F(i.coords.big_p[s-1]-i.coords.grid_gap))),K(2,e,t),K(4,e,t);for(let e=0;e=n)break;const r=i.cache.grid_labels[o];s[a]<=t[o]?r.style.visibility="visible":r.style.visibility="hidden"}},J=function(){i.options.gridMargin&&(i.coords.w_rs=i.cache.label.offsetWidth,i.coords.w_rs&&("single"===i.options.type?i.coords.w_handle=i.cache.s_single.offsetWidth:i.coords.w_handle=i.cache.s_from.offsetWidth,i.coords.p_handle=F(i.coords.w_handle/i.coords.w_rs*100),i.coords.grid_gap=F(i.coords.p_handle/2-.1),i.cache.grid.style.width=F(100-i.coords.p_handle)+"%",i.cache.grid.style.left=i.coords.grid_gap+"%"))};this.init()}init(){if(this.validate(),this.ready(),this.referName)if(axIsEmpty(axRanges))axRanges.push({name:this.referName,instance:this});else for(let e=0;e{new axRange(e)}); /*! * 插件:表单校验;使用方法:new axValid('#id',{参数},'#id');parent参数可指定,也可让插件自己匹配(最近的form元素) */ const axValids=[];class axValid{constructor(e,t,i){if(this.targetDom=axIdToDom(e),!this.targetDom.getAttribute("name"))return console.error("The element to be verified must have a name attribute!"),!1;if(i?this.parent="string"==typeof e?document.querySelector(i):i:this.targetDom.closest("form")?this.parent=this.targetDom.closest("form"):this.parent="",this.options=axExtend({mode:"newLine",iconShow:!0,type:"",rule:{},label:"",within:"",error:"",success:"通过验证!",equal:"",max:"",min:"",divisor:"",length:"",maxLength:"",minLength:"",include:[],exclude:[],earliest:"",latest:"",compare:"",date:"",format:"",inputSuccess:"ax-check-primary",inputError:"ax-check-danger",boxSuccess:"ax-color-primary",boxError:"ax-color-danger",chars:"~!@#",charsShow:!1,trigger:"blur",group:!1,onChange:""},t,this.targetDom),this.handlers={},this.strong=0,this.message="",this.name=this.targetDom.getAttribute("name"),this.buttonId=this.name,this.targetDom.getAttribute("axValid")?this.alias=this.targetDom.getAttribute("axValid"):this.alias="",axIsEmpty(this.options.include)?this.options.include=[]:this.options.include=this.options.include.split(","),axIsEmpty(this.options.exclude)?this.options.exclude=[]:this.options.exclude=this.options.exclude.split(","),this.options.type.indexOf("strong")>-1&&this.options.format){this.upperLen="",this.lowerLen="",this.numberLen="",this.charLen;let e="",t="",i="";if(this.formatMin="",this.formatMax="",this.onlyName={},this.lowerName="",this.upperName="",this.numberName="",this.charsName="",this.scaleNameGroup=[],this.scaleName={},this.scale="",this.regExp="",this.regText=[],e=this.options.format.split("#")[0],this.options.format.split("#")[1]?(t=this.options.format.split("#")[1],this.formatMin=t.split(",")[0],-1==t.indexOf(",")?(this.lengthOnly=!0,this.formatMax=""):-1!==t.indexOf(",")&&t.split(",")[1]?this.formatMax=t.split(",")[1]:this.formatMax=""):(this.formatMin="",this.formatMax=""),this.options.format.split("#")[2]&&(i=this.options.format.split("#")[2],-1!==i.indexOf("a")&&(this.scaleName.lower="小写字母",this.scale+="a-z",this.regText.push("a-z"),this.scaleNameGroup.push(this.scaleName.lower)),-1!==i.indexOf("A")&&(this.scaleName.upper="大写字母",this.scale+="A-Z",this.regText.push("A-Z"),this.scaleNameGroup.push(this.scaleName.upper)),-1!==i.indexOf("9")&&(this.scaleName.number="数字",this.scale+="0-9",this.regText.push("0-9"),this.scaleNameGroup.push(this.scaleName.number)),-1!==i.indexOf("~")&&(this.scaleName.char=this.options.charsShow?'特殊字符"'+this.options.chars+'"':"特殊字符",this.scale+=this.options.chars,this.regText.push(this.options.chars),this.scaleNameGroup.push(this.scaleName.char)),-1!==i.indexOf("中")&&(this.scaleName.cn="中文",this.scale+="一-龥",this.regText.push("一-龥"),this.scaleNameGroup.push(this.scaleName.cn)),this.scaleNameGroup.length>2?this.scaleNameGroup=axRangeReplace(this.scaleNameGroup.join(),"和",this.scaleNameGroup.join().lastIndexOf(","),"",1):this.scaleNameGroup=this.scaleNameGroup.join(),this.scaleNameGroup=this.scaleNameGroup.replaceAll(",","、"),!axIsEmpty(this.scaleNameGroup)&&(this.message+="必须是"+this.scaleNameGroup+",并且要求")),axIsEmpty(this.options.format.split("#")[0])&&this.options.format.split("#")[3]&&(this.options.format.split("#")[3]0?2==this.options.format.split("#")[3]?this.regText.forEach(e=>{this.regExp+="(?!["+e+"]+$)"}):3==this.options.format.split("#")[3]?axArrange(this.regText,2).forEach(e=>{this.regExp+="(?!["+e.join().replaceAll(",","")+"]+$)"}):4==this.options.format.split("#")[3]&&axArrange(this.regExp,3).forEach(e=>{this.regExp+="(?!["+e.join().replaceAll(",","")+"]+$)"}):console.error("随机字符类型必须有1种,并且不能超过允许字符类型范围!"),this.message=this.scaleNameGroup+"中至少选择"+this.options.format.split("#")[3]+"种字符。"),-1!==e.indexOf("a")){let t=e.lastIndexOf("a");this.onlyName.lower="小写字母",this.lowerLen=parseInt(e.substring(t+1,t+2)),this.message+=this.onlyName.lower+"至少"+this.lowerLen+"个,"}if(-1!==e.indexOf("A")){let t=e.lastIndexOf("A");this.onlyName.upper="大写字母",this.upperLen=parseInt(e.substring(t+1,t+2)),this.message+=this.onlyName.upper+"至少"+this.upperLen+"个,"}if(-1!==e.indexOf("9")){let t=e.lastIndexOf("9");this.onlyName.number="数字",this.numberLen=parseInt(e.substring(t+1,t+2)),this.message+=this.onlyName.number+"至少"+this.numberLen+"个,"}if(-1!==e.indexOf("~")){let t=e.lastIndexOf("~");this.onlyName.char=this.options.charsShow?'特殊字符"'+this.options.chars+'"':"特殊字符",this.charLen=parseInt(e.substring(t+1,t+2)),this.message+=this.onlyName.char+"至少"+this.charLen+"个。"}if(-1!==e.indexOf("中")){let t=e.lastIndexOf("中");this.onlyName.cn="中文",this.cnLen=parseInt(e.substring(t+1,t+2)),this.message+=this.onlyName.cn+"至少"+this.cnLen+"个。"}this.lowerLen&&(this.regExp+="(?="+Array(this.lowerLen+1).join(".*?[a-z]")+")"),this.upperLen&&(this.regExp+="(?="+Array(this.upperLen+1).join(".*?[A-Z]")+")"),this.numberLen&&(this.regExp+="(?="+Array(this.numberLen+1).join(".*?[0-9]")+")"),this.charLen&&(this.regExp+="(?="+Array(this.charLen+1).join(".*?["+this.options.chars+"]")+")"),this.cnLen&&(this.regExp+="(?="+Array(this.cnLen+1).join(".*?[一-龥]")+")"),axIsEmpty(this.scale)?axIsEmpty(this.scale)&&this.formatMin?this.regExp+=".":this.regExp+=".{0,}":this.formatMin?this.regExp+="["+this.scale+"]":this.regExp+="["+this.scale+"]+",this.formatMin&&this.lengthOnly&&!this.formatMax?(this.regExp+="{"+this.formatMin+"}",this.message+="总共只能是"+this.formatMin+"个字符。"):this.formatMin&&!this.formatMax?(this.regExp+="{"+this.formatMin+",}",this.message+="总共至少"+this.formatMin+"个字符。"):this.formatMin&&this.formatMax&&(this.regExp+="{"+this.formatMin+","+this.formatMax+"}",this.message+="总共至少"+this.formatMin+"个字符,且不能超过"+this.formatMax+"个字符。")}this.init()}init(){let e=this;this.buttonId&&(axIsEmpty(axValids)?axValids.push({name:this.buttonId,alias:this.alias,instance:this,parent:this.parent}):axValids.some(e=>e.name==this.buttonId&&e.parent==this.parent)||axValids.push({name:this.buttonId,alias:this.alias,instance:this,parent:this.parent})),axValids.some(e=>e.name==this.options.compare)?(this.compareName=axInstance(axValids,this.options.compare).name,axInstance(axValids,this.options.compare).options.label?this.compareLabel=axInstance(axValids,this.options.compare).options.label:this.compareLabel=this.compareName):this.options.compare&&document.querySelector("[name = "+this.options.compare+"]")?(this.compareName=this.options.compare,this.compareLabel=this.options.compare):(this.compareLabel="",this.compareName=""),this.rules=this.getRules(this.options.rule,this.options.label),this.msgBox=axAddElem("div",{valid:""}),"submit"==this.options.trigger?this.targetDom.addEventListener("change",()=>{e.createMsg()},!1):"input"==this.options.trigger?this.targetDom.addEventListener("input",()=>{e.createMsg()},!1):"change"==this.options.trigger?this.targetDom.addEventListener("change",()=>{e.createMsg()},!1):this.targetDom.addEventListener("blur",()=>{e.createMsg()},!1)}getRules(e,t){if("string"==typeof e&&e)e=JSON.parse(e);else{this.options.type.trim().split(",").forEach(i=>{this.isType(i,e,t)})}return e}isType(e,t,i){"isRequired"==e?t.presence={message:this.diyMsg("^"+i+"不能为空!")}:"isEmail"==e?t.email={message:this.diyMsg('^"%{value}"不是一个有效的邮箱地址!')}:"isUrl"==e?t.url={message:this.diyMsg('^"%{value}"不是一个有效的网址!')}:"exclude"==e?this.options.exclude&&(t.exclusion={within:this.options.exclude,message:this.diyMsg("^"+i+'"%{value}"是不被允许的!')}):"include"==e?this.options.include&&(t.inclusion={within:this.options.include,message:this.diyMsg("^"+i+'"%{value}"是不被允许的!')}):"maxLength"==e?this.options.maxLength&&(axIsEmpty(t.length)&&(t.length={}),t.length.maximum=this.options.maxLength,t.length.tooLong=this.diyMsg("^"+i+"最多允许"+this.options.maxLength+"个字符串!")):"minLength"==e?this.options.minLength&&(axIsEmpty(t.length)&&(t.length={}),t.length.minimum=this.options.minLength,t.length.tooShort=this.diyMsg("^"+i+"最少要求"+this.options.minLength+"个字符串!")):"length"==e?this.options.length&&(axIsEmpty(t.length)&&(t.length={}),t.length.is=this.options.length,t.length.wrongLength=this.diyMsg("^"+i+"要求等于"+this.options.length+"个字符串!")):"isStrict"==e?(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.strict=!0,t.numericality.notValid=this.diyMsg("^"+i+"要求是一个数字并且不能以0开头!")):"isNumber"==e?(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.notValid=this.diyMsg("^"+i+"必须是一个数字!")):"isOdd"==e?(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.odd=!0,t.numericality.notOdd=this.diyMsg("^"+i+"要求是一个奇数!")):"isEven"==e?(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.even=!0,t.numericality.notEven=this.diyMsg("^"+i+"要求是一个偶数!")):"isInteger"==e?(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.onlyInteger=!0,t.numericality.notInteger=this.diyMsg("^"+i+"要求是一个整数!")):"greaterThan"==e?this.options.max&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.greaterThan=this.options.max,t.numericality.notGreaterThan=this.diyMsg("^"+i+"要求大于"+this.options.max+"!")):"greaterEqual"==e?this.options.max&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.greaterThanOrEqualTo=this.options.max,t.numericality.notGreaterThanOrEqualTo=this.diyMsg("^"+i+"要求大于或等于"+this.options.max+"!")):"lessThan"==e?this.options.min&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.lessThan=this.options.min,t.numericality.message=this.diyMsg("^"+i+"要求小于"+this.options.min+"!")):"lessEqual"==e?this.options.min&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.lessThanOrEqualTo=this.options.min,t.numericality.notLessThanOrEqualTo=this.diyMsg("^"+i+"要求小于或等于"+this.options.min+"!")):"equal"==e?this.options.equal&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.equalTo=this.options.equal,t.numericality.notEqualTo=this.diyMsg("^"+i+"要求等于"+this.options.equal+"!")):"divisible"==e?this.options.divisor&&(axIsEmpty(t.numericality)&&(t.numericality={}),t.numericality.divisibleBy=this.options.divisor,t.numericality.notDivisibleBy=this.diyMsg("^"+i+"要求能被"+this.options.divisor+"整除!")):"isDateTime"==e?(axIsEmpty(t.datetime)&&(t.datetime={}),t.datetime.notValid=this.diyMsg('^"%{value}"不是一个日期格式!')):"isDate"==e?(axIsEmpty(t.datetime)&&(t.datetime={}),t.datetime.dateOnly=!0,t.datetime.notValid=this.diyMsg('^"%{value}"不是一个日期格式!正确格式如:2021-2-12或2021/2/12')):"earliest"==e?this.options.earliest&&(axIsEmpty(t.datetime)&&(t.datetime={}),t.datetime.earliest=this.options.earliest,t.datetime.tooEarly=this.diyMsg("^日期时间不能早于"+this.options.earliest+"!")):"latest"==e?this.options.latest&&(axIsEmpty(t.datetime)&&(t.datetime={}),t.datetime.latest=this.options.latest,t.datetime.tooLate=this.diyMsg("^日期时间不能晚于"+this.options.latest+"!")):"confirm"==e?axIsEmpty(this.options.compare)||(t.equality={attribute:this.options.compare,message:this.diyMsg("^"+i+"与"+this.compareLabel+"不一致!")}):"strong"==e&&this.options.format&&(t.format={pattern:this.regExp,message:this.diyMsg("^"+i+"要求"+this.message)})}diyMsg(e){return this.options.error?this.options.error:e}createMsg(){let e={},t={},i=this.targetDom.name,s=this.targetDom.value;if(!s||(e[i]=s),this.compareName&&this.options.compare){let t=document.querySelector("[name="+this.compareName+"]").value;e[this.compareName]=t}!this.rules||(t[i]=this.rules),validate.extend(validate.validators.datetime,{parse:(e,t)=>(this.timeValue=e,axLocalTime(e)),format:(e,t)=>this.timeValue});let n=validate(e,t,{format:"flat"});n?(this.flag=!1,this.result=n[0],this.targetDom.classList.remove(this.options.inputSuccess),this.targetDom.classList.add(this.options.inputError),this.msgBox.classList.remove(this.options.boxSuccess),this.msgBox.classList.add(this.options.boxError),this.options.iconShow?this.msgBox.innerHTML=axIcon.font.errorFill+" "+this.result:this.msgBox.innerHTML=this.result):(this.flag=!0,this.result=this.options.label+this.options.success,this.targetDom.classList.remove(this.options.inputError),this.targetDom.classList.add(this.options.inputSuccess),this.msgBox.classList.remove(this.options.boxError),this.msgBox.classList.add(this.options.boxSuccess),this.options.iconShow?this.msgBox.innerHTML=axIcon.font.successFill+" "+this.result:this.msgBox.innerHTML=this.result);let a=0,o=0,r=0,l=0,c=0,d=0;if("strong"==this.options.type&&this.options.format&&(s&&s.match(new RegExp("[a-z]"))&&(o=1),s&&s.match(new RegExp("[A-Z]"))&&(a=1),s&&s.match(new RegExp("[0-9]"))&&(r=1),s&&s.match(new RegExp("["+this.options.chars+"]"))&&(l=1),s&&s.match(new RegExp("[一-龥]"))&&(c=1),s&&this.formatMin&&s.length>=this.formatMin&&(d=1)),this.strong=a+o+r+l+c+d,axValids.find(e=>e.name=this.buttonId&&e.parent==this.parent).instance=this,"note"==this.options.mode){this.msgBox.classList.add("ax-form-txt");let e=this.targetDom.parentNode.parentNode.nextElementSibling;e&&e.hasAttribute("valid")&&(e.remove(),this.targetDom.parentNode.parentNode.insertAdjacentElement("afterend",this.msgBox)),this.targetDom.parentNode.parentNode.insertAdjacentElement("afterend",this.msgBox)}else if("popup"==this.options.mode)this.popup?(this.popup.content.innerHTML="",this.popup.content.appendChild(this.msgBox)):this.popup=new axPopup(this.targetDom,{content:this.msgBox,padding:!1,placement:"bottom-start",offsetShow:!1,arrow:!1,close:!1,footerShow:!1,theme:"crude",stay:!0}).show();else if("message"==this.options.mode)this.flag?new axMessage({content:this.result,result:"success",iconShow:!0}):new axMessage({content:this.result,result:"error",iconShow:!0});else if("#"==this.options.mode.substr(0,1))document.querySelector(this.options.mode).innerHTML="",this.options.group?axIsEmpty(axValids)||axValids.forEach(e=>{axIsEmpty(e.instance.msgBox.children)||document.querySelector(this.options.mode).insertAdjacentElement("beforeend",e.instance.msgBox)}):document.querySelector(this.options.mode).appendChild(this.msgBox);else if(1==this.options.mode.nodeType)this.options.mode.innerHTML="",this.options.group?axIsEmpty(axValids)||axValids.forEach(e=>{axIsEmpty(e.instance.msgBox.children)||document.querySelector(this.options.mode).insertAdjacentElement("beforeend",e.instance.msgBox)}):this.options.mode.appendChild(this.msgBox);else{this.msgBox.classList.add("ax-valid");let e=this.targetDom.nextElementSibling;e&&e.hasAttribute("valid")&&e.remove(),this.targetDom.insertAdjacentElement("afterend",this.msgBox)}this.options.onChange&&this.options.onChange.call(this,this.strong,this.flag,this.msgBox.innerHTML),"update"in this.handlers&&this.emit("update",this.strong,this.flag,this.msgBox.innerHTML)}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}[...document.querySelectorAll("[axValid]")].filter(e=>e.getAttribute("name")).forEach(e=>{new axValid(e)}); /*! * 插件:列表筛选、检索、排序和分页;改造自listjs v2.3.1 https://github.com/javve/list.js;使用方法:new axList('#id',{参数}) */ const axLists=[];!function(e){let t=window||t||self;"function"==typeof define&&define.amd?define(e):t.axList=e(),document.querySelectorAll("[axList]").forEach(e=>{new axList(e)})}((function(){"use strict";var e,t,i=0;function s(e){return e>=48&&e<=57}function n(e,n){for(var a=(e+="").length,o=(n+="").length,r=0,l=0;r=a&&l=o?-1:l>=o&&r=a?1:a-o}n.caseInsensitive=n.i=function(e,t){return n((""+e).toLowerCase(),(""+t).toLowerCase())},Object.defineProperties(n,{alphabet:{get:function(){return e},set:function(s){t=[];var n=0;if(e=s)for(;n]/g.exec(e)){var t=document.createElement("tbody");return t.innerHTML=e,t.firstElementChild}if(-1!==e.indexOf("<")){var i=document.createElement("div");return i.innerHTML=e,i.firstElementChild}}},o=function(t,i,s){var n=void 0,a=function(t){for(var i=0,s=e.valueNames.length;i=1;)e.list.removeChild(e.list.firstChild)},function(){var i;if("function"!=typeof e.item){if(!(i=e.item&&"string"==typeof e.item?-1===e.item.indexOf("<")?document.querySelector(e.item):a(e.item):n()))throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");i=s(i,e.valueNames),t=function(){return i.cloneNode(!0)}}else t=function(t){var i=e.item(t);return a(i)}}()},E=function(e,t){t=r({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"[fuzzy]"},t=t||{});var i={search:function(s,n){for(var a=t.multiSearch?s.replace(/ +$/,"").split(/ +/):[s],o=0,r=e.items.length;o32)return!1;var o=s,r=function(){var e,i={};for(e=0;e=v;b--){var w=r[e.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&w:(y[b+1]<<1|1)&w|(m[b+1]|m[b])<<1|1|m[b+1],y[b]&p){var M=l(g,b-1);if(M<=c){if(c=M,!((d=b-1)>o))break;v=Math.max(1,2*o-d)}}}if(l(g+1,o)>c)break;m=y}return!(d<0)}(f(e[i]).toLowerCase(),s,t))return!0;return!1}};return d.bind(o(e.listContainer,t.searchClass),"keyup",e.utils.events.debounce((function(t){var s=t.target||t.srcElement;e.search(s.value,i.search)}),e.searchDelay)),function(t,s){e.search(t,s,i.search)}},S=a;l=c;return function(e,t,i){var s,n,a,c=this,u=w(c),p=(n=c,a=function(e,t,i){var s=e.splice(0,50);i=(i=i||[]).concat(n.add(s)),e.length>0?setTimeout((function(){a(e,t,i)}),1):(n.update(),t(i))}),m=function(e){var t=!1,i=function(i,n){var a=axAddElem("a",{class:"ax-first",href:"###"}),o=axAddElem("a",{class:"ax-last",href:"###"}),r=axAddElem("a",{class:"ax-prev",href:"###"}),l=axAddElem("a",{class:"ax-next",href:"###"}),c=axAddElem("span",{class:"ax-total"});n.btnFirst=a,n.btnLast=o,n.btnPrev=r,n.btnNext=l,n.btnTotal=c;var d=function(e){"left"==e?(a.classList.add("ax-disabled"),r.classList.add("ax-disabled"),o.classList.remove("ax-disabled"),l.classList.remove("ax-disabled")):"right"==e?(o.classList.add("ax-disabled"),l.classList.add("ax-disabled"),a.classList.remove("ax-disabled"),r.classList.remove("ax-disabled")):(o.classList.remove("ax-disabled"),l.classList.remove("ax-disabled"),a.classList.remove("ax-disabled"),r.classList.remove("ax-disabled"))};if(e.page<1)return e.listContainer.style.display="none",void(t=!0);t&&(e.listContainer.style.display="block");var h,u=e.matchingItems.length,p=e.i,m=e.page,f=Math.ceil(u/m),g=Math.ceil(p/m),v=n.innerWindow||2,y=n.left||n.outerWindow||0,b=n.right||n.outerWindow||0;if(b=f-b,i.clear(),1==g?d("left"):g==f?d("right"):d(),"simple"==n.type?(n.totalShow=!1,n.firstShow=!1,n.lastShow=!1,n.pagesShow=!1,n.prevShow=!0,n.nextShow=!0):"full"==n.type?(n.totalShow=!0,n.firstShow=!0,n.lastShow=!0,n.pagesShow=!0,n.prevShow=!0,n.nextShow=!0):"pure"==n.type&&(n.totalShow=!1,n.firstShow=!1,n.lastShow=!1,n.pagesShow=!0,n.prevShow=!1,n.nextShow=!1),n.pagesShow)for(var w=1;w<=f;w++){var M=g===w?"ax-active":"";s.number(w,y,b,g,v)?((h=i.add({dotted:!1})[0]).elm.innerHTML=w,M&&x(h.elm).add(M),h.elm.setAttribute("data-i",w),h.elm.setAttribute("data-page",m)):s.dotted(i,w,y,b,g,v,i.size())&&((h=i.add({dotted:!0})[0]).elm=axAddElem("span","","..."))}a.innerHTML=n.textFirst,o.innerHTML=n.textLast,r.innerHTML=n.textPrev,l.innerHTML=n.textNext,c.innerHTML="第"+g+"/"+f+"页",i.list.classList.contains("ax-group")?(axSiblings(i.list).forEach(e=>{e.remove()}),n.totalShow&&i.list.insertAdjacentElement("beforeBegin",c),n.firstShow&&i.list.insertAdjacentElement("beforeBegin",a),n.prevShow&&i.list.insertAdjacentElement("beforeBegin",r),n.lastShow&&i.list.insertAdjacentElement("afterEnd",o),n.nextShow&&i.list.insertAdjacentElement("afterEnd",l)):(n.prevShow&&i.list.insertAdjacentElement("afterBegin",r),n.firstShow&&i.list.insertAdjacentElement("afterBegin",a),n.totalShow&&i.list.insertAdjacentElement("afterBegin",c),n.nextShow&&i.list.insertAdjacentElement("beforeEnd",l),n.lastShow&&i.list.insertAdjacentElement("beforeEnd",o))},s={number:function(e,t,i,s,n){return this.left(e,t,n,s)||this.right(e,i,n,s)||this.innerWindow(e,s,n)},left:function(e,t,i,s){return s<=t+i+2&&e<=t+2*i+2||e<=t},right:function(e,t,i,s){return s>=t-i-1&&e>t-2*i-2||e>t},innerWindow:function(e,t,i){return e>=t-i&&e<=t+i},dotted:function(e,t,i,s,n,a,o){return this.dottedLeft(e,t,i,s,n,a)||this.dottedRight(e,t,i,s,n,a,o)},dottedLeft:function(e,t,i,s,n,a){return t==i+1&&!this.innerWindow(t,n,a)&&!this.right(t,s)},dottedRight:function(e,t,i,s,n,a,o){return!e.items[o-1].values().dotted&&(t==s&&!this.innerWindow(t,n,a)&&!this.right(t,s))}};return function(t){var s=new axList(e.listContainer,{listClass:t.paginationClass||".ax-pagination",item:t.item||"",valueNames:["page","dotted"],searchClass:".pagination-search-that-is-not-supposed-to-exist",sortClass:".pagination-sort-that-is-not-supposed-to-exist"});d.bind(s.listContainer,"click",(function(t){var i=t.target||t.srcElement,s=e.utils.getAttribute(i,"data-page"),n=e.utils.getAttribute(i,"data-i");n&&e.show((n-1)*s+1,s);var a=e.matchingItems.length,o=Math.floor(a/e.page),r=a%e.page,l=Math.ceil(e.i/e.page),c=(l-2)*e.page+1,d=l*e.page+1,h="",u=Math.ceil(a/e.page);e.options.pagination.forEach(t=>{t.btnFirst&&i==t.btnFirst&&e.show(1,e.page),t.btnLast&&i==t.btnLast&&(h=0==r?e.matchingItems.length-e.page+1:o*e.page+1,e.show(h,e.page)),t.btnPrev&&i==t.btnPrev&&1!=l&&e.show(c,e.page),t.btnNext&&i==t.btnNext&&l!=u&&e.show(d,e.page)})})),e.on("updated",(function(){i(s,t)})),i(s,t)}}(c);s={start:function(){if(c.listContainer=axIdToDom(e),t&&".pagination-search-that-is-not-supposed-to-exist"==t.searchClass)c.options=t;else{var i={valueNames:["name"],page:10,i:1,item:"",searchDelay:0,listClass:"[list]",searchClass:"[search]",sortClass:"[data-sort]",filterClass:"[filter]",resetClass:"[reset]",pagination:{paginationClass:".ax-pagination",textFirst:"首页",textLast:"尾页",textPrev:"上一页",textNext:"下一页",type:"regular",innerWindow:2,left:2,right:2,totalShow:!1,prevShow:!0,nextShow:!0,firstShow:!0,lastShow:!0,pagesShow:!0}},s=axClone(i.pagination);if(c.options=axExtend(i,t,c.listContainer),1==c.options.pagination&&(c.options.pagination=s),"Array"==axType(c.options.pagination)){var n=[];c.options.pagination.forEach(e=>{e=axMerge(s,e),n.push(e)}),c.options.pagination=n}c.listContainer&&c.listContainer.getAttribute("axList")?c.referName=c.listContainer.getAttribute("axList"):c.referName="",axLists.push({name:c.referName,instance:c})}c.listClass=c.options.listClass?c.options.listClass:".ax-list-body",c.searchClass=c.options.searchClass?c.options.searchClass:".ax-list-search",c.sortClass=c.options.sortClass?c.options.sortClass:".ax-list-sort",c.page=c.options.page?c.options.page:1e3,c.i=c.options.i?c.options.i:1,c.items=[],c.visibleItems=[],c.matchingItems=[],c.searched=!1,c.filtered=!1,c.searchColumns=void 0,c.searchDelay=c.options.searchDelay?c.options.searchDelay:0,c.handlers={updated:[]},c.valueNames=[],c.utils={getByClass:o,extend:r,indexOf:l,events:d,toString:f,naturalSort:S,classes:x,getAttribute:b,toArray:h},c.utils.extend(c,c.options),c.listContainer&&(c.list=o(c.listContainer,c.listClass,!0),c.parse=function(e){var t=w(e),i=function(i,s){for(var n=0,a=i.length;n0?setTimeout((function(){s(t,n)}),1):(e.update(),e.trigger("parseComplete"))};return e.handlers.parseComplete=e.handlers.parseComplete||[],function(){var t=function(e){for(var t=e.childNodes,i=[],s=0,n=t.length;s{var t=e.getAttribute("filter").match(/(\S*):/)[1].trim(),i=e.getAttribute("filter").match(/:(\S*)/)[1].trim();e.onclick=function(){return c.filter((function(e){return e.values()[t]==i})),!1}}),c.listContainer.querySelectorAll(c.options.resetClass).forEach(e=>{e.onclick=function(){return c.filter(),c.search(),!1}}),c.on("searchComplete",(function(e){var t=c.listContainer.querySelector(".ax-fast-list");c.listContainer.querySelector(c.options.searchClass).value&&e.matchingItems.length?t&&axSlideDown(t):t&&axSlideUp(t)})),c.update())},handlers:function(){for(var e in c.handlers)c[e]&&c.handlers.hasOwnProperty(e)&&c.on(e,c[e])},items:function(){c.parse(c.list),void 0!==i&&c.add(i)},pagination:function(){if(void 0!==c.options.pagination){!0===c.options.pagination&&(c.options.pagination=[{}]),void 0===c.options.pagination[0]&&(c.options.pagination=[c.options.pagination]);for(var e=0,t=c.options.pagination.length;ec.page,o=new u(e[n],void 0,s),c.items.push(o),i.push(o)}return c.update(),i}p(e.slice(0),t)}},this.show=function(e,t){return this.i=e,this.page=t,c.update(),c},this.remove=function(e,t,i){for(var s=0,n=0,a=c.items.length;n-1&&i.splice(s,1),c},this.trigger=function(e){for(var t=c.handlers[e].length;t--;)c.handlers[e][t](c);return c},this.reset={filter:function(){for(var e=c.items,t=e.length;t--;)e[t].filtered=!1;return c},search:function(){for(var e=c.items,t=e.length;t--;)e[t].found=!1;return c}},this.update=function(){var e=c.items,t=e.length;c.visibleItems=[],c.matchingItems=[],c.templater.clear();for(var i=0;i=c.i&&c.visibleItems.length{new axSwiper(e)})}(this,(function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(i,s){void 0===i&&(i={}),void 0===s&&(s={}),Object.keys(s).forEach(n=>{void 0===i[n]?i[n]=s[n]:e(s[n])&&e(i[n])&&Object.keys(s[n]).length>0&&t(i[n],s[n])})}const i={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function s(){const e="undefined"!=typeof document?document:{};return t(e,i),e}const n={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function a(){const e="undefined"!=typeof window?window:{};return t(e,n),e}class o extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function r(e){void 0===e&&(e=[]);const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...r(e)):t.push(e)}),t}function l(e,t){return Array.prototype.filter.call(e,t)}function c(e,t){const i=a(),n=s();let r=[];if(!t&&e instanceof o)return e;if(!e)return new o(r);if("string"==typeof e){const i=e.trim();if(i.indexOf("<")>=0&&i.indexOf(">")>=0){let e="div";0===i.indexOf("e.split(" ")));return this.forEach(e=>{e.classList.add(...s)}),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),i=0;ie.split(" ")));return this.forEach(e=>{e.classList.remove(...s)}),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),i=0;ie.split(" ")));return l(this,e=>s.filter(t=>e.classList.contains(t)).length>0).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),i=0;ie.split(" ")));this.forEach(e=>{s.forEach(t=>{e.classList.toggle(t)})})},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let i=0;i=0;e-=1){const n=s[e];a&&n.listener===a?(i.removeEventListener(t,n.proxyListener,o),s.splice(e,1)):a&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===a?(i.removeEventListener(t,n.proxyListener,o),s.splice(e,1)):a||(i.removeEventListener(t,n.proxyListener,o),s.splice(e,1))}}}return this},trigger:function(){const e=a();for(var t=arguments.length,i=new Array(t),s=0;st>0),n.dispatchEvent(t),n.dom7EventData=[],delete n.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",(function i(s){s.target===this&&(e.call(this,s),t.off("transitionend",i))})),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=a();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=a(),t=s(),i=this[0],n=i.getBoundingClientRect(),o=t.body,r=i.clientTop||o.clientTop||0,l=i.clientLeft||o.clientLeft||0,c=i===e?e.scrollY:i.scrollTop,d=i===e?e.scrollX:i.scrollLeft;return{top:n.top+c-r,left:n.left+d-l}}return null},css:function(e,t){const i=a();let s;if(1===arguments.length){if("string"!=typeof e){for(s=0;s{e.apply(t,[t,i])}),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;tt-1)return c([]);if(e<0){const i=t+e;return c(i<0?[]:[this[i]])}return c([this[e]])},append:function(){let e;const t=s();for(let i=0;i=0;n-=1)this[i].insertBefore(s.childNodes[n],this[i].childNodes[0])}else if(e instanceof o)for(n=0;n0?e?this[0].nextElementSibling&&c(this[0].nextElementSibling).is(e)?c([this[0].nextElementSibling]):c([]):this[0].nextElementSibling?c([this[0].nextElementSibling]):c([]):c([])},nextAll:function(e){const t=[];let i=this[0];if(!i)return c([]);for(;i.nextElementSibling;){const s=i.nextElementSibling;e?c(s).is(e)&&t.push(s):t.push(s),i=s}return c(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&c(t.previousElementSibling).is(e)?c([t.previousElementSibling]):c([]):t.previousElementSibling?c([t.previousElementSibling]):c([])}return c([])},prevAll:function(e){const t=[];let i=this[0];if(!i)return c([]);for(;i.previousElementSibling;){const s=i.previousElementSibling;e?c(s).is(e)&&t.push(s):t.push(s),i=s}return c(t)},parent:function(e){const t=[];for(let i=0;i6&&(n=n.split(", ").map(e=>e.replace(",",".")).join(", ")),o=new i.WebKitCSSMatrix("none"===n?"":n)):(o=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),s=o.toString().split(",")),"x"===t&&(n=i.WebKitCSSMatrix?o.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(n=i.WebKitCSSMatrix?o.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),n||0}function m(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function f(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function g(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;it.indexOf(e)<0);for(let t=0,n=i.length;to?"next":"prev",h=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,u=()=>{r=(new Date).getTime(),null===l&&(l=r);const e=Math.max(Math.min((r-l)/c,1),0),a=.5-Math.cos(e*Math.PI)/2;let d=o+a*(i-o);if(h(d,i)&&(d=i),t.wrapperEl.scrollTo({[s]:d}),h(d,i))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[s]:d})}),void n.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=n.requestAnimationFrame(u)};u()}let y,b,w;function M(){return y||(y=function(){const e=a(),t=s();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const i=Object.defineProperty({},"passive",{get(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),y}function E(e){return void 0===e&&(e={}),b||(b=function(e){let{userAgent:t}=void 0===e?{}:e;const i=M(),s=a(),n=s.navigator.platform,o=t||s.navigator.userAgent,r={ios:!1,android:!1},l=s.screen.width,c=s.screen.height,d=o.match(/(Android);?[\s\/]+([\d.]+)?/);let h=o.match(/(iPad).*OS\s([\d_]+)/);const u=o.match(/(iPod)(.*OS\s([\d_]+))?/),p=!h&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===n;let f="MacIntel"===n;return!h&&f&&i.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${c}`)>=0&&(h=o.match(/(Version)\/([\d.]+)/),h||(h=[0,1,"13_0_0"]),f=!1),d&&!m&&(r.os="android",r.android=!0),(h||p||u)&&(r.os="ios",r.ios=!0),r}(e)),b}function S(){return w||(w=function(){const e=a();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),w}Object.keys(d).forEach(e=>{Object.defineProperty(c.fn,e,{value:d[e],writable:!0})});var D={on(e,t,i){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof t)return s;const n=i?"unshift":"push";return e.split(" ").forEach(e=>{s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][n](t)}),s},once(e,t,i){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof t)return s;function n(){s.off(e,n),n.__emitterProxy&&delete n.__emitterProxy;for(var i=arguments.length,a=new Array(i),o=0;o=0&&t.eventsAnyListeners.splice(i,1),t},off(e,t){const i=this;return!i.eventsListeners||i.destroyed?i:i.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((s,n)=>{(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(n,1)})}),i):i},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,i,s;for(var n=arguments.length,a=new Array(n),o=0;o{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(s,[t,...i])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(s,i)})}),e}};function T(e){let{swiper:t,runCallbacks:i,direction:s,step:n}=e;const{activeIndex:a,previousIndex:o}=t;let r=s;if(r||(r=a>o?"next":a0)return;if(o.isTouched&&o.isMoved)return;!!r.noSwipingClass&&""!==r.noSwipingClass&&h.target&&h.target.shadowRoot&&e.path&&e.path[0]&&(p=c(e.path[0]));const m=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,f=!(!h.target||!h.target.shadowRoot);if(r.noSwiping&&(f?function(e,t){return void 0===t&&(t=this),function t(i){return i&&i!==s()&&i!==a()?(i.assignedSlot&&(i=i.assignedSlot),i.closest(e)||t(i.getRootNode().host)):null}(t)}(m,h.target):p.closest(m)[0]))return void(t.allowClick=!0);if(r.swipeHandler&&!p.closest(r.swipeHandler)[0])return;l.currentX="touchstart"===h.type?h.targetTouches[0].pageX:h.pageX,l.currentY="touchstart"===h.type?h.targetTouches[0].pageY:h.pageY;const g=l.currentX,v=l.currentY,x=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,y=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(x&&(g<=y||g>=n.innerWidth-y)){if("prevent"!==x)return;axPreventDefault(e)}if(Object.assign(o,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=g,l.startY=v,o.touchStartTime=u(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(o.allowThresholdMove=!1),"touchstart"!==h.type){let e=!0;p.is(o.focusableElements)&&(e=!1,"SELECT"===p[0].nodeName&&(o.isTouched=!1)),i.activeElement&&c(i.activeElement).is(o.focusableElements)&&i.activeElement!==p[0]&&i.activeElement.blur();const s=e&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!s||p[0].isContentEditable||axPreventDefault(h)}t.params.freeMode&&t.params.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",h)}function L(e){const t=s(),i=this,n=i.touchEventsData,{params:a,touches:o,rtlTranslate:r,enabled:l}=i;if(!l)return;let d=e;if(d.originalEvent&&(d=d.originalEvent),!n.isTouched)return void(n.startMoving&&n.isScrolling&&i.emit("touchMoveOpposite",d));if(n.isTouchEvent&&"touchmove"!==d.type)return;const h="touchmove"===d.type&&d.targetTouches&&(d.targetTouches[0]||d.changedTouches[0]),p="touchmove"===d.type?h.pageX:d.pageX,m="touchmove"===d.type?h.pageY:d.pageY;if(d.preventedByNestedSwiper)return o.startX=p,void(o.startY=m);if(!i.allowTouchMove)return c(d.target).is(n.focusableElements)||(i.allowClick=!1),void(n.isTouched&&(Object.assign(o,{startX:p,startY:m,currentX:p,currentY:m}),n.touchStartTime=u()));if(n.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(i.isVertical()){if(mo.startY&&i.translate>=i.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else if(po.startX&&i.translate>=i.minTranslate())return;if(n.isTouchEvent&&t.activeElement&&d.target===t.activeElement&&c(d.target).is(n.focusableElements))return n.isMoved=!0,void(i.allowClick=!1);if(n.allowTouchCallbacks&&i.emit("touchMove",d),d.targetTouches&&d.targetTouches.length>1)return;o.currentX=p,o.currentY=m;const f=o.currentX-o.startX,g=o.currentY-o.startY;if(i.params.threshold&&Math.sqrt(f**2+g**2)=25&&(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,n.isScrolling=i.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(n.isScrolling&&i.emit("touchMoveOpposite",d),void 0===n.startMoving&&(o.currentX===o.startX&&o.currentY===o.startY||(n.startMoving=!0)),n.isScrolling)return void(n.isTouched=!1);if(!n.startMoving)return;i.allowClick=!1,!a.cssMode&&d.cancelable&&axPreventDefault(d),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation(),n.isMoved||(a.loop&&!a.cssMode&&i.loopFix(),n.startTranslate=i.getTranslate(),i.setTransition(0),i.animating&&i.$wrapperEl.trigger("webkitTransitionEnd transitionend"),n.allowMomentumBounce=!1,!a.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",d)),i.emit("sliderMove",d),n.isMoved=!0;let v=i.isHorizontal()?f:g;o.diff=v,v*=a.touchRatio,r&&(v=-v),i.swipeDirection=v>0?"prev":"next",n.currentTranslate=v+n.startTranslate;let x=!0,y=a.resistanceRatio;if(a.touchReleaseOnEdges&&(y=0),v>0&&n.currentTranslate>i.minTranslate()?(x=!1,a.resistance&&(n.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+n.startTranslate+v)**y)):v<0&&n.currentTranslaten.startTranslate&&(n.currentTranslate=n.startTranslate),i.allowSlidePrev||i.allowSlideNext||(n.currentTranslate=n.startTranslate),a.threshold>0){if(!(Math.abs(v)>a.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,n.currentTranslate=n.startTranslate,void(o.diff=i.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&i.freeMode||a.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),i.params.freeMode&&a.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(n.currentTranslate),i.setTranslate(n.currentTranslate))}function A(e){const t=this,i=t.touchEventsData,{params:s,touches:n,rtlTranslate:a,slidesGrid:o,enabled:r}=t;if(!r)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",l),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=u(),d=c-i.touchStartTime;if(t.allowClick){const e=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(e&&e[0]||l.target),t.emit("tap click",l),d<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(i.lastClickTime=u(),h(()=>{t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===n.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);let p;if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,p=s.followFinger?a?t.translate:-t.translate:-i.currentTranslate,s.cssMode)return;if(t.params.freeMode&&s.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});let m=0,f=t.slidesSizesGrid[0];for(let e=0;e=o[e]&&p=o[e]&&(m=e,f=o[o.length-1]-o[o.length-2])}let g=null,v=null;s.rewind&&(t.isBeginning?v=t.params.virtual&&t.params.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const x=(p-o[m])/f,y=ms.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(x>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:m+y):t.slideTo(m)),"prev"===t.swipeDirection&&(x>1-s.longSwipesRatio?t.slideTo(m+y):null!==v&&x<0&&Math.abs(x)>s.longSwipesRatio?t.slideTo(v):t.slideTo(m))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(m+y):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==g?g:m+y),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:m))}}function _(){const e=this,{params:t,el:i}=e;if(i&&0===i.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:s,allowSlidePrev:n,snapGrid:a}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=n,e.allowSlideNext=s,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function I(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&axPreventDefault(e),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function k(){const e=this,{wrapperEl:t,rtlTranslate:i,enabled:s}=e;if(!s)return;let n;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const a=e.maxTranslate()-e.minTranslate();n=0===a?0:(e.translate-e.minTranslate())/a,n!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let N=!1;function O(){}const j=(e,t)=>{const i=s(),{params:n,touchEvents:a,el:o,wrapperEl:r,device:l,support:c}=e,d=!!n.nested,h="on"===t?"addEventListener":"removeEventListener",u=t;if(c.touch){const t=!("touchstart"!==a.start||!c.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};o[h](a.start,e.onTouchStart,t),o[h](a.move,e.onTouchMove,c.passiveListener?{passive:!1,capture:d}:d),o[h](a.end,e.onTouchEnd,t),a.cancel&&o[h](a.cancel,e.onTouchEnd,t)}else o[h](a.start,e.onTouchStart,!1),i[h](a.move,e.onTouchMove,d),i[h](a.end,e.onTouchEnd,!1);(n.preventClicks||n.preventClicksPropagation)&&o[h]("click",e.onClick,!0),n.cssMode&&r[h]("scroll",e.onScroll),n.updateOnWindowResize?e[u](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",_,!0):e[u]("observerUpdate",_,!0)};const $=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var P={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"ax-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"ax-",slideClass:"ax-slide",slideBlankClass:"ax-slide-invisible-blank",slideActiveClass:"ax-slide-active",slideDuplicateActiveClass:"ax-slide-duplicate-active",slideVisibleClass:"ax-slide-visible",slideDuplicateClass:"ax-slide-duplicate",slideNextClass:"ax-slide-next",slideDuplicateNextClass:"ax-slide-duplicate-next",slidePrevClass:"ax-slide-prev",slideDuplicatePrevClass:"ax-slide-duplicate-prev",wrapperClass:"ax-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function z(e,t){return function(i){void 0===i&&(i={});const s=Object.keys(i)[0],n=i[s];"object"==typeof n&&null!==n?(["navigation","pagination","scrollbar"].indexOf(s)>=0&&!0===e[s]&&(e[s]={auto:!0}),s in e&&"enabled"in n?(!0===e[s]&&(e[s]={enabled:!0}),"object"!=typeof e[s]||"enabled"in e[s]||(e[s].enabled=!0),e[s]||(e[s]={enabled:!1}),g(t,i)):g(t,i)):g(t,i)}}const Y={eventsEmitter:D,update:{updateSize:function(){const e=this;let t,i;const s=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:s[0].clientWidth,i=void 0!==e.params.height&&null!==e.params.height?e.params.height:s[0].clientHeight,0===t&&e.isHorizontal()||0===i&&e.isVertical()||(t=t-parseInt(s.css("padding-left")||0,10)-parseInt(s.css("padding-right")||0,10),i=i-parseInt(s.css("padding-top")||0,10)-parseInt(s.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(i)&&(i=0),Object.assign(e,{width:t,height:i,size:e.isHorizontal()?t:i}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function i(e,i){return parseFloat(e.getPropertyValue(t(i))||0)}const s=e.params,{$wrapperEl:n,size:a,rtlTranslate:o,wrongRTL:r}=e,l=e.virtual&&s.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=n.children(`.${e.params.slideClass}`),h=l?e.virtual.slides.length:d.length;let u=[];const p=[],m=[];let f=s.slidesOffsetBefore;"function"==typeof f&&(f=s.slidesOffsetBefore.call(e));let g=s.slidesOffsetAfter;"function"==typeof g&&(g=s.slidesOffsetAfter.call(e));const x=e.snapGrid.length,y=e.slidesGrid.length;let b=s.spaceBetween,w=-f,M=0,E=0;if(void 0===a)return;"string"==typeof b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*a),e.virtualSize=-b,o?d.css({marginLeft:"",marginBottom:"",marginTop:""}):d.css({marginRight:"",marginBottom:"",marginTop:""}),s.centeredSlides&&s.cssMode&&(v(e.wrapperEl,"--swiper-centered-offset-before",""),v(e.wrapperEl,"--swiper-centered-offset-after",""));const S=s.grid&&s.grid.rows>1&&e.grid;let D;S&&e.grid.initSlides(h);const T="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter(e=>void 0!==s.breakpoints[e].slidesPerView).length>0;for(let n=0;n1&&u.push(e.virtualSize-a)}if(0===u.length&&(u=[0]),0!==s.spaceBetween){const i=e.isHorizontal()&&o?"marginLeft":t("marginRight");d.filter((e,t)=>!s.cssMode||t!==d.length-1).css({[i]:`${b}px`})}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;m.forEach(t=>{e+=t+(s.spaceBetween?s.spaceBetween:0)}),e-=s.spaceBetween;const t=e-a;u=u.map(e=>e<0?-f:e>t?t+g:e)}if(s.centerInsufficientSlides){let e=0;if(m.forEach(t=>{e+=t+(s.spaceBetween?s.spaceBetween:0)}),e-=s.spaceBetween,e{u[i]=e-t}),p.forEach((e,i)=>{p[i]=e+t})}}if(Object.assign(e,{slides:d,snapGrid:u,slidesGrid:p,slidesSizesGrid:m}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){v(e.wrapperEl,"--swiper-centered-offset-before",`${-u[0]}px`),v(e.wrapperEl,"--swiper-centered-offset-after",`${e.size/2-m[m.length-1]/2}px`);const t=-e.snapGrid[0],i=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+i)}if(h!==c&&e.emit("slidesLengthChange"),u.length!==x&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==y&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),!(l||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,i=e.$el.hasClass(t);h<=s.maxBackfaceHiddenSlides?i||e.$el.addClass(t):i&&e.$el.removeClass(t)}},updateAutoHeight:function(e){const t=this,i=[],s=t.virtual&&t.params.virtual.enabled;let n,a=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>s?t.slides.filter(t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e)[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)t.visibleSlides.each(e=>{i.push(e)});else for(n=0;nt.slides.length&&!s)break;i.push(o(e))}else i.push(o(t.activeIndex));for(n=0;na?e:a}(a||0===a)&&t.$wrapperEl.css("height",`${a}px`)},updateSlidesOffset:function(){const e=this,t=e.slides;for(let i=0;i=0&&h1&&u<=t.size||h<=0&&u>=t.size)&&(t.visibleSlides.push(r),t.visibleSlidesIndexes.push(e),s.eq(e).addClass(i.slideVisibleClass)),r.progress=n?-c:c,r.originalProgress=n?-d:d}t.visibleSlides=c(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}const i=t.params,s=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:a,isEnd:o}=t;const r=a,l=o;0===s?(n=0,a=!0,o=!0):(n=(e-t.minTranslate())/s,a=n<=0,o=n>=1),Object.assign(t,{progress:n,isBeginning:a,isEnd:o}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),a&&!r&&t.emit("reachBeginning toEdge"),o&&!l&&t.emit("reachEnd toEdge"),(r&&!a||l&&!o)&&t.emit("fromEdge"),t.emit("progress",n)},updateSlidesClasses:function(){const e=this,{slides:t,params:i,$wrapperEl:s,activeIndex:n,realIndex:a}=e,o=e.virtual&&i.virtual.enabled;let r;t.removeClass(`${i.slideActiveClass} ${i.slideNextClass} ${i.slidePrevClass} ${i.slideDuplicateActiveClass} ${i.slideDuplicateNextClass} ${i.slideDuplicatePrevClass}`),r=o?e.$wrapperEl.find(`.${i.slideClass}[data-swiper-slide-index="${n}"]`):t.eq(n),r.addClass(i.slideActiveClass),i.loop&&(r.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${a}"]`).addClass(i.slideDuplicateActiveClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${a}"]`).addClass(i.slideDuplicateActiveClass));let l=r.nextAll(`.${i.slideClass}`).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=t.eq(0),l.addClass(i.slideNextClass));let c=r.prevAll(`.${i.slideClass}`).eq(0).addClass(i.slidePrevClass);i.loop&&0===c.length&&(c=t.eq(-1),c.addClass(i.slidePrevClass)),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass),c.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,i=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:s,snapGrid:n,params:a,activeIndex:o,realIndex:r,snapIndex:l}=t;let c,d=e;if(void 0===d){for(let e=0;e=s[e]&&i=s[e]&&i=s[e]&&(d=e);a.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(n.indexOf(i)>=0)c=n.indexOf(i);else{const e=Math.min(a.slidesPerGroupSkip,d);c=e+Math.floor((d-e)/a.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),d===o)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const h=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:c,realIndex:h,previousIndex:o,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),r!==h&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,i=t.params,s=c(e).closest(`.${i.slideClass}`)[0];let n,a=!1;if(s)for(let e=0;el?l:s&&e=l.length&&(g=l.length-1),(h||r.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");const v=-l[g];if(a.updateProgress(v),r.normalizeSlideIndex)for(let e=0;e=i&&t=i&&t=i&&(o=e)}if(a.initialized&&o!==h){if(!a.allowSlideNext&&va.translate&&v>a.maxTranslate()&&(h||0)!==o)return!1}let y;if(y=o>h?"next":o{a.wrapperEl.style.scrollSnapType="",a._swiperImmediateVirtual=!1})}else{if(!a.support.smoothScroll)return x({swiper:a,targetPosition:i,side:e?"left":"top"}),!0;p.scrollTo({[e?"left":"top"]:i,behavior:"smooth"})}return!0}return a.setTransition(t),a.setTranslate(v),a.updateActiveIndex(o),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,y),0===t?a.transitionEnd(i,y):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(i,y))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);const n=this;let a=e;return n.params.loop&&(a+=n.loopedSlides),n.slideTo(a,t,i,s)},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const s=this,{animating:n,enabled:a,params:o}=s;if(!a)return s;let r=o.slidesPerGroup;"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(r=Math.max(s.slidesPerViewDynamic("current",!0),1));const l=s.activeIndexd(e));let p=o[u.indexOf(h)-1];if(void 0===p&&n.cssMode){let e;o.forEach((t,i)=>{h>=t&&(e=i)}),void 0!==e&&(p=o[e>0?e-1:e])}let m=0;if(void 0!==p&&(m=r.indexOf(p),m<0&&(m=s.activeIndex-1),"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(m=m-s.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),n.rewind&&s.isBeginning){const n=s.params.virtual&&s.params.virtual.enabled&&s.virtual?s.virtual.slides.length-1:s.slides.length-1;return s.slideTo(n,e,t,i)}return s.slideTo(m,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);const n=this;let a=n.activeIndex;const o=Math.min(n.params.slidesPerGroupSkip,a),r=o+Math.floor((a-o)/n.params.slidesPerGroup),l=n.rtlTranslate?n.translate:-n.translate;if(l>=n.snapGrid[r]){const e=n.snapGrid[r];l-e>(n.snapGrid[r+1]-e)*s&&(a+=n.params.slidesPerGroup)}else{const e=n.snapGrid[r-1];l-e<=(n.snapGrid[r]-e)*s&&(a-=n.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,n.slidesGrid.length-1),n.slideTo(a,e,t,i)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:i}=e,s="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let n,a=e.clickedIndex;if(t.loop){if(e.animating)return;n=parseInt(c(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?ae.slides.length-e.loopedSlides+s/2?(e.loopFix(),a=i.children(`.${t.slideClass}[data-swiper-slide-index="${n}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),h(()=>{e.slideTo(a)})):e.slideTo(a):a>e.slides.length-s?(e.loopFix(),a=i.children(`.${t.slideClass}[data-swiper-slide-index="${n}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),h(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}},loop:{loopCreate:function(){const e=this,t=s(),{params:i,$wrapperEl:n}=e,a=n.children().length>0?c(n.children()[0].parentNode):n;a.children(`.${i.slideClass}.${i.slideDuplicateClass}`).remove();let o=a.children(`.${i.slideClass}`);if(i.loopFillGroupWithBlank){const e=i.slidesPerGroup-o.length%i.slidesPerGroup;if(e!==i.slidesPerGroup){for(let s=0;so.length&&(e.loopedSlides=o.length);const r=[],l=[];o.each((t,i)=>{const s=c(t);i=o.length-e.loopedSlides&&r.push(t),s.attr("data-swiper-slide-index",i)});for(let e=0;e=0;e-=1)a.prepend(c(r[e].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:i,loopedSlides:s,allowSlidePrev:n,allowSlideNext:a,snapGrid:o,rtlTranslate:r}=e;let l;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-o[t]-e.getTranslate();if(t=i.length-s){l=-i.length+t+s,l+=s,e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((r?-e.translate:e.translate)-c)}e.allowSlidePrev=n,e.allowSlideNext=a,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:i}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){if(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)return;const t="container"===this.params.touchEventsTarget?this.el:this.wrapperEl;t.style.cursor="move",t.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this["container"===this.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const e=this,t=s(),{params:i,support:n}=e;e.onTouchStart=C.bind(e),e.onTouchMove=L.bind(e),e.onTouchEnd=A.bind(e),i.cssMode&&(e.onScroll=k.bind(e)),e.onClick=I.bind(e),n.touch&&!N&&(t.addEventListener("touchstart",O),N=!0),j(e,"on")},detachEvents:function(){j(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:i,loopedSlides:s=0,params:n,$el:a}=e,o=n.breakpoints;if(!o||o&&0===Object.keys(o).length)return;const r=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!r||e.currentBreakpoint===r)return;const l=(r in o?o[r]:void 0)||e.originalParams,c=$(e,n),d=$(e,l),h=n.enabled;c&&!d?(a.removeClass(`${n.containerModifierClass}grid ${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&d&&(a.addClass(`${n.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===n.grid.fill)&&a.addClass(`${n.containerModifierClass}grid-column`),e.emitContainerClasses());const u=l.direction&&l.direction!==n.direction,p=n.loop&&(l.slidesPerView!==n.slidesPerView||u);u&&i&&e.changeDirection(),g(e.params,l);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!m?e.disable():!h&&m&&e.enable(),e.currentBreakpoint=r,e.emit("_beforeBreakpoint",l),p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t,i){if(void 0===t&&(t="window"),!e||"container"===t&&!i)return;let s=!1;const n=a(),o="window"===t?n.innerHeight:i.clientHeight,r=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:o*t,point:e}}return{value:e,point:e}});r.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;ei}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const{classNames:e,params:t,rtl:i,$el:s,device:n,support:a}=this,o=function(e,t){const i=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(s=>{e[s]&&i.push(t+s)}):"string"==typeof e&&i.push(t+e)}),i}(["initialized",t.direction,{"pointer-events":!a.touch},{"free-mode":this.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:i},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&"column"===t.grid.fill},{android:n.android},{ios:n.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...o),s.addClass([...e].join(" ")),this.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(e,t,i,s,n,o){const r=a();let l;function d(){o&&o()}c(e).parent("picture")[0]||e.complete&&n?d():t?(l=new r.Image,l.onload=d,l.onerror=d,s&&(l.sizes=s),i&&(l.srcset=i),t&&(l.src=t)):d()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let i=0;i1){const e=[];return c(t.el).each(i=>{const s=g({},t,{el:i});e.push(new B(s))}),e}const a=this;a.__swiper__=!0,a.support=M(),a.device=E({userAgent:t.userAgent}),a.browser=S(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],t.modules&&Array.isArray(t.modules)&&a.modules.push(...t.modules);const o={};a.modules.forEach(e=>{e({swiper:a,extendParams:z(t,o),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const r=g({},P,o);return a.params=g({},r,q,t),a.params=axDataset(t.el,a.params),"string"==typeof t.el?(".ax-prev"==a.params.navigation.prevEl&&(a.params.navigation.prevEl=document.querySelector(t.el+" .ax-prev")),".ax-next"==a.params.navigation.nextEl&&(a.params.navigation.nextEl=document.querySelector(t.el+" .ax-next"))):(".ax-prev"==a.params.navigation.prevEl&&(a.params.navigation.prevEl=t.el.querySelector(".ax-prev")),".ax-next"==a.params.navigation.nextEl&&(a.params.navigation.nextEl=t.el.querySelector(".ax-next"))),a.originalParams=g({},a.params),a.passedParams=g({},t),a.params&&a.params.on&&Object.keys(a.params.on).forEach(e=>{a.on(e,a.params.on[e])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),a.$=c,Object.assign(a,{enabled:a.params.enabled,el:e,classNames:[],slides:c(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===a.params.direction,isVertical:()=>"vertical"===a.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return a.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},a.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},a.support.touch||!a.params.simulateTouch?a.touchEventsTouch:a.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:u(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);const i=this.minTranslate(),s=(this.maxTranslate()-i)*e+i;this.translateTo(s,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("ax")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("ax-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each(i=>{const s=e.getSlideClasses(i);t.push({slideEl:i,classNames:s}),e.emit("_slideClass",i,s)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:i,slides:s,slidesGrid:n,slidesSizesGrid:a,size:o,activeIndex:r}=this;let l=1;if(i.centeredSlides){let e,t=s[r].swiperSlideSize;for(let i=r+1;io&&(e=!0));for(let i=r-1;i>=0;i-=1)s[i]&&!e&&(t+=s[i].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let e=r+1;e=0;e-=1){n[r]-n[e]1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),n||s()),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const i=this,s=i.params.direction;return e||(e="horizontal"===s?"vertical":"horizontal"),e===s||"horizontal"!==e&&"vertical"!==e?i:(i.$el.removeClass(`${i.params.containerModifierClass}${s}`).addClass(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.each(t=>{"vertical"===e?t.style.width="":t.style.height=""}),i.emit("changeDirection"),t&&i.update(),i)}mount(e){const t=this;if(t.mounted)return!0;const i=c(e||t.params.el);if(!(e=i[0]))return!1;e.swiper=t;const n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=c(e.shadowRoot.querySelector(n()));return t.children=e=>i.children(e),t}return i.children(n())})();if(0===a.length&&t.params.createElements){const e=s().createElement("div");a=c(e),e.className=t.params.wrapperClass,i.append(e),i.children(`.${t.params.slideClass}`).each(e=>{a.append(e)})}return Object.assign(t,{$el:i,el:e,$wrapperEl:a,wrapperEl:a[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction")),wrongRTL:"-webkit-box"===a.css("display")}),!0}init(e){const t=this;return t.initialized?t:!1===t.mount(e)?t:(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit"),t)}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const i=this,{params:s,$el:n,$wrapperEl:a,slides:o}=i;return void 0===i.params||i.destroyed?null:(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),n.removeAttr("style"),a.removeAttr("style"),o&&o.length&&o.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(e=>{i.off(e)}),!1!==e&&(i.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(i)),i.destroyed=!0,null)}static extendDefaults(e){g(q,e)}static get extendedDefaults(){return q}static get defaults(){return P}static installModule(e){B.prototype.__modules__||(B.prototype.__modules__=[]);const t=B.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>B.installModule(e)),B):(B.installModule(e),B)}}function H(e,t,i,n){const a=s();return e.params.createElements&&Object.keys(n).forEach(s=>{if(!i[s]&&!0===i.auto){let o=e.$el.children(`.${n[s]}`)[0];o||(o=a.createElement("div"),o.className=n[s],e.$el.append(o)),i[s]=o,t[s]=o}}),i}function F(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function R(e){const t=this,{$wrapperEl:i,params:s}=t;if(s.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let t=0;t=r)return void i.appendSlide(t);let l=o>e?o+1:o;const c=[];for(let t=r-1;t>=e;t-=1){const e=i.slides.eq(t);e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;ee?o+t.length:o}else s.append(t);for(let e=0;e{if(i.params.effect!==t)return;i.classNames.push(`${i.params.containerModifierClass}${t}`),r&&r()&&i.classNames.push(`${i.params.containerModifierClass}3d`);const e=o?o():{};Object.assign(i.params,e),Object.assign(i.originalParams,e)}),s("setTranslate",()=>{i.params.effect===t&&n()}),s("setTransition",(e,s)=>{i.params.effect===t&&a(s)}),s("transitionEnd",()=>{if(i.params.effect===t&&l){if(!c||!c().slideShadows)return;i.slides.each(e=>{i.$(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").remove()}),l()}}),s("virtualUpdate",()=>{i.params.effect===t&&(i.slides.length||(d=!0),requestAnimationFrame(()=>{d&&i.slides&&i.slides.length&&(n(),d=!1)}))})}function Q(e,t){return e.transformEl?t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):t}function K(e){let{swiper:t,duration:i,transformEl:s,allSlides:n}=e;const{slides:a,activeIndex:o,$wrapperEl:r}=t;if(t.params.virtualTranslate&&0!==i){let e,i=!1;e=n?s?a.find(s):a:s?a.eq(o).find(s):a.eq(o),e.transitionEnd(()=>{if(i)return;if(!t||t.destroyed)return;i=!0,t.animating=!1;const e=["webkitTransitionEnd","transitionend"];for(let t=0;t`),n.append(a)),a}Object.keys(Y).forEach(e=>{Object.keys(Y[e]).forEach(t=>{B.prototype[t]=Y[e][t]})}),B.use([function(e){let{swiper:t,on:i,emit:s}=e;const n=a();let o=null,r=null;const l=()=>{t&&!t.destroyed&&t.initialized&&(s("beforeResize"),s("resize"))},c=()=>{t&&!t.destroyed&&t.initialized&&s("orientationchange")};i("init",()=>{t.params.resizeObserver&&void 0!==n.ResizeObserver?t&&!t.destroyed&&t.initialized&&(o=new ResizeObserver(e=>{r=n.requestAnimationFrame(()=>{const{width:i,height:s}=t;let n=i,a=s;e.forEach(e=>{let{contentBoxSize:i,contentRect:s,target:o}=e;o&&o!==t.el||(n=s?s.width:(i[0]||i).inlineSize,a=s?s.height:(i[0]||i).blockSize)}),n===i&&a===s||l()})}),o.observe(t.el)):(n.addEventListener("resize",l),n.addEventListener("orientationchange",c))}),i("destroy",()=>{r&&n.cancelAnimationFrame(r),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null),n.removeEventListener("resize",l),n.removeEventListener("orientationchange",c)})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const o=[],r=a(),l=function(e,t){void 0===t&&(t={});const i=new(r.MutationObserver||r.WebkitMutationObserver)(e=>{if(1===e.length)return void n("observerUpdate",e[0]);const t=function(){n("observerUpdate",e[0])};r.requestAnimationFrame?r.requestAnimationFrame(t):r.setTimeout(t,0)});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),o.push(i)};i({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=t.$el.parents();for(let t=0;t{o.forEach(e=>{e.disconnect()}),o.splice(0,o.length)})}]);const Z=[function(e){let t,{swiper:i,extendParams:s,on:n,emit:a}=e;function o(e,t){const s=i.params.virtual;if(s.cache&&i.virtual.cache[t])return i.virtual.cache[t];const n=s.renderSlide?c(s.renderSlide.call(i,e,t)):c(`
${e}
`);return n.attr("data-swiper-slide-index")||n.attr("data-swiper-slide-index",t),s.cache&&(i.virtual.cache[t]=n),n}function r(e){const{slidesPerView:t,slidesPerGroup:s,centeredSlides:n}=i.params,{addSlidesBefore:r,addSlidesAfter:l}=i.params.virtual,{from:c,to:d,slides:h,slidesGrid:u,offset:p}=i.virtual;i.params.cssMode||i.updateActiveIndex();const m=i.activeIndex||0;let f,g,v;f=i.rtlTranslate?"right":i.isHorizontal()?"left":"top",n?(g=Math.floor(t/2)+s+l,v=Math.floor(t/2)+s+r):(g=t+(s-1)+l,v=s+r);const x=Math.max((m||0)-v,0),y=Math.min((m||0)+g,h.length-1),b=(i.slidesGrid[x]||0)-(i.slidesGrid[0]||0);function w(){i.updateSlides(),i.updateProgress(),i.updateSlidesClasses(),i.lazy&&i.params.lazy.enabled&&i.lazy.load(),a("virtualUpdate")}if(Object.assign(i.virtual,{from:x,to:y,offset:b,slidesGrid:i.slidesGrid}),c===x&&d===y&&!e)return i.slidesGrid!==u&&b!==p&&i.slides.css(f,`${b}px`),i.updateProgress(),void a("virtualUpdate");if(i.params.virtual.renderExternal)return i.params.virtual.renderExternal.call(i,{offset:b,from:x,to:y,slides:function(){const e=[];for(let t=x;t<=y;t+=1)e.push(h[t]);return e}()}),void(i.params.virtual.renderExternalUpdate?w():a("virtualUpdate"));const M=[],E=[];if(e)i.$wrapperEl.find(`.${i.params.slideClass}`).remove();else for(let e=c;e<=d;e+=1)(ey)&&i.$wrapperEl.find(`.${i.params.slideClass}[data-swiper-slide-index="${e}"]`).remove();for(let t=0;t=x&&t<=y&&(void 0===d||e?E.push(t):(t>d&&E.push(t),t{i.$wrapperEl.append(o(h[e],e))}),M.sort((e,t)=>t-e).forEach(e=>{i.$wrapperEl.prepend(o(h[e],e))}),i.$wrapperEl.children(".swiper-slide").css(f,`${b}px`),w()}s({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),i.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},n("beforeInit",()=>{i.params.virtual.enabled&&(i.virtual.slides=i.params.virtual.slides,i.classNames.push(`${i.params.containerModifierClass}virtual`),i.params.watchSlidesProgress=!0,i.originalParams.watchSlidesProgress=!0,i.params.initialSlide||r())}),n("setTranslate",()=>{i.params.virtual.enabled&&(i.params.cssMode&&!i._immediateVirtual?(clearTimeout(t),t=setTimeout(()=>{r()},100)):r())}),n("init update resize",()=>{i.params.virtual.enabled&&i.params.cssMode&&v(i.wrapperEl,"--swiper-virtual-size",`${i.virtualSize}px`)}),Object.assign(i.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t{const s=e[i],a=s.attr("data-swiper-slide-index");a&&s.attr("data-swiper-slide-index",parseInt(a,10)+n),t[parseInt(i,10)+n]=s}),i.virtual.cache=t}r(!0),i.slideTo(s,0)},removeSlide:function(e){if(null==e)return;let t=i.activeIndex;if(Array.isArray(e))for(let s=e.length-1;s>=0;s-=1)i.virtual.slides.splice(e[s],1),i.params.virtual.cache&&delete i.virtual.cache[e[s]],e[s]0&&0===t.$el.parents(`.${t.params.slideActiveClass}`).length)return;const s=t.$el,n=s[0].clientWidth,a=s[0].clientHeight,o=l.innerWidth,r=l.innerHeight,c=t.$el.offset();i&&(c.left-=t.$el[0].scrollLeft);const d=[[c.left,c.top],[c.left+n,c.top],[c.left,c.top+a],[c.left+n,c.top+a]];for(let t=0;t=0&&i[0]<=o&&i[1]>=0&&i[1]<=r){if(0===i[0]&&0===i[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((c||d||h||u)&&axPreventDefault(s),((d||u)&&!i||(c||h)&&i)&&t.slideNext(),((c||h)&&!i||(d||u)&&i)&&t.slidePrev()):((c||d||p||m)&&axPreventDefault(s),(d||m)&&t.slideNext(),(c||p)&&t.slidePrev()),o("keyPress",n)}}function h(){t.keyboard.enabled||(c(r).on("keydown",d),t.keyboard.enabled=!0)}function u(){t.keyboard.enabled&&(c(r).off("keydown",d),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},i({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),n("init",()=>{t.params.keyboard.enabled&&h()}),n("destroy",()=>{t.keyboard.enabled&&u()}),Object.assign(t.keyboard,{enable:h,disable:u})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const o=a();let r;i({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let l,d=u();const p=[];function m(){t.enabled&&(t.mouseEntered=!0)}function f(){t.enabled&&(t.mouseEntered=!1)}function g(e){return!(t.params.mousewheel.thresholdDelta&&e.delta=6&&u()-d<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),n("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),n("scroll",e.raw)),d=(new o.Date).getTime(),!1)))}function v(e){let i=e,s=!0;if(!t.enabled)return;const a=t.params.mousewheel;t.params.cssMode&&axPreventDefault(i);let o=t.$el;if("container"!==t.params.mousewheel.eventsTarget&&(o=c(t.params.mousewheel.eventsTarget)),!t.mouseEntered&&!o[0].contains(i.target)&&!a.releaseOnEdges)return!0;i.originalEvent&&(i=i.originalEvent);let d=0;const m=t.rtlTranslate?-1:1,f=function(e){let t=0,i=0,s=0,n=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,n=10*i,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=n,n=0),(s||n)&&e.deltaMode&&(1===e.deltaMode?(s*=40,n*=40):(s*=800,n*=800)),s&&!t&&(t=s<1?-1:1),n&&!i&&(i=n<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:n}}(i);if(a.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(f.pixelX)>Math.abs(f.pixelY)))return!0;d=-f.pixelX*m}else{if(!(Math.abs(f.pixelY)>Math.abs(f.pixelX)))return!0;d=-f.pixelY}else d=Math.abs(f.pixelX)>Math.abs(f.pixelY)?-f.pixelX*m:-f.pixelY;if(0===d)return!0;a.invert&&(d=-d);let v=t.getTranslate()+d*a.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),s=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),s&&t.params.nested&&i.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:u(),delta:Math.abs(d),direction:Math.sign(d)},s=l&&e.time=t.minTranslate()&&(o=t.minTranslate()),o<=t.maxTranslate()&&(o=t.maxTranslate()),t.setTransition(0),t.setTranslate(o),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!c&&t.isBeginning||!u&&t.isEnd)&&t.updateSlidesClasses(),t.params.freeMode.sticky){clearTimeout(r),r=void 0,p.length>=15&&p.shift();const i=p.length?p[p.length-1]:void 0,s=p[0];if(p.push(e),i&&(e.delta>i.delta||e.direction!==i.direction))p.splice(0);else if(p.length>=15&&e.time-s.time<500&&s.delta-e.delta>=1&&e.delta<=6){const i=d>0?.8:.2;l=e,p.splice(0),r=h(()=>{t.slideToClosest(t.params.speed,!0,void 0,i)},0)}r||(r=h(()=>{l=e,p.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(s||n("scroll",i),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),o===t.minTranslate()||o===t.maxTranslate())return!0}}else{const i={time:u(),delta:Math.abs(d),direction:Math.sign(d),raw:e};p.length>=2&&p.shift();const s=p.length?p[p.length-1]:void 0;if(p.push(i),s?(i.direction!==s.direction||i.delta>s.delta||i.time>s.time+150)&&g(i):g(i),function(e){const i=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&i.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&i.releaseOnEdges)return!0;return!1}(i))return!0}return axPreventDefault(i),!1}function x(e){let i=t.$el;"container"!==t.params.mousewheel.eventsTarget&&(i=c(t.params.mousewheel.eventsTarget)),i[e]("mouseenter",m),i[e]("mouseleave",f),i[e]("wheel",v)}function y(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",v),!0):!t.mousewheel.enabled&&(x("on"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,v),!0):!!t.mousewheel.enabled&&(x("off"),t.mousewheel.enabled=!1,!0)}s("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&y()}),s("destroy",()=>{t.params.cssMode&&y(),t.mousewheel.enabled&&b()}),Object.assign(t.mousewheel,{enable:y,disable:b})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;function a(e){let i;return e&&(i=c(e),t.params.uniqueNavElements&&"string"==typeof e&&i.length>1&&1===t.$el.find(e).length&&(i=t.$el.find(e))),i}function o(e,i){const s=t.params.navigation;e&&e.length>0&&(e[i?"addClass":"removeClass"](s.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=i),t.params.watchOverflow&&t.enabled&&e[t.isLocked?"addClass":"removeClass"](s.lockClass))}function r(){if(t.params.loop)return;const{$nextEl:e,$prevEl:i}=t.navigation;o(i,t.isBeginning&&!t.params.rewind),o(e,t.isEnd&&!t.params.rewind)}function l(e){axPreventDefault(e),(!t.isBeginning||t.params.loop||t.params.rewind)&&t.slidePrev()}function d(e){axPreventDefault(e),(!t.isEnd||t.params.loop||t.params.rewind)&&t.slideNext()}function h(){const e=t.params.navigation;if(t.params.navigation=H(t,t.originalParams.navigation,t.params.navigation,{nextEl:"ax-next",prevEl:"ax-prev"}),!e.nextEl&&!e.prevEl)return;const i=a(e.nextEl),s=a(e.prevEl);i&&i.length>0&&i.on("click",d),s&&s.length>0&&s.on("click",l),Object.assign(t.navigation,{$nextEl:i,nextEl:i&&i[0],$prevEl:s,prevEl:s&&s[0]}),t.enabled||(i&&i.addClass(e.lockClass),s&&s.addClass(e.lockClass))}function u(){const{$nextEl:e,$prevEl:i}=t.navigation;e&&e.length&&(e.off("click",d),e.removeClass(t.params.navigation.disabledClass)),i&&i.length&&(i.off("click",l),i.removeClass(t.params.navigation.disabledClass))}i({navigation:{nextEl:".ax-next",prevEl:".ax-prev",hideOnClick:!1,disabledClass:"ax-disabled",hiddenClass:"ax-hidden",lockClass:"ax-lock"}}),t.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},s("init",()=>{h(),r()}),s("toEdge fromEdge lock unlock",()=>{r()}),s("destroy",()=>{u()}),s("enable disable",()=>{const{$nextEl:e,$prevEl:i}=t.navigation;e&&e[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),i&&i[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)}),s("click",(e,i)=>{const{$nextEl:s,$prevEl:a}=t.navigation,o=i.target;if(t.params.navigation.hideOnClick&&!c(o).is(a)&&!c(o).is(s)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===o||t.pagination.el.contains(o)))return;let e;s?e=s.hasClass(t.params.navigation.hiddenClass):a&&(e=a.hasClass(t.params.navigation.hiddenClass)),n(!0===e?"navigationShow":"navigationHide"),s&&s.toggleClass(t.params.navigation.hiddenClass),a&&a.toggleClass(t.params.navigation.hiddenClass)}}),Object.assign(t.navigation,{update:r,init:h,destroy:u})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const a="ax-pages";let o;i({pagination:{el:"."+a,bulletElement:"i",clickable:!0,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`}}),t.pagination={el:null,$el:null,bullets:[]};let r=0;function l(){return!t.params.pagination.el||!t.pagination.el||!t.pagination.$el||0===t.pagination.$el.length}function d(e,i){const{bulletActiveClass:s}=t.params.pagination;e[i]().addClass(`${s}-${i}`)[i]().addClass(`${s}-${i}-${i}`)}function h(){const e=t.rtl,i=t.params.pagination;if(l())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,a=t.pagination.$el;let h;const u=t.params.loop?Math.ceil((s-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(h=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup),h>s-1-2*t.loopedSlides&&(h-=s-2*t.loopedSlides),h>u-1&&(h-=u),h<0&&"bullets"!==t.params.paginationType&&(h=u+h)):h=void 0!==t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===i.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const s=t.pagination.bullets;let n,l,u;if(i.dynamicBullets&&(o=s.eq(0)[t.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(t.isHorizontal()?"width":"height",`${o*(i.dynamicMainBullets+4)}px`),i.dynamicMainBullets>1&&void 0!==t.previousIndex&&(r+=h-(t.previousIndex-t.loopedSlides||0),r>i.dynamicMainBullets-1?r=i.dynamicMainBullets-1:r<0&&(r=0)),n=Math.max(h-r,0),l=n+(Math.min(s.length,i.dynamicMainBullets)-1),u=(l+n)/2),s.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${i.bulletActiveClass}${e}`).join(" ")),a.length>1)s.each(e=>{const t=c(e),s=t.index();s===h&&t.addClass(i.bulletActiveClass),i.dynamicBullets&&(s>=n&&s<=l&&t.addClass(`${i.bulletActiveClass}-main`),s===n&&d(t,"prev"),s===l&&d(t,"next"))});else{const e=s.eq(h),a=e.index();if(e.addClass(i.bulletActiveClass),i.dynamicBullets){const e=s.eq(n),o=s.eq(l);for(let e=n;e<=l;e+=1)s.eq(e).addClass(`${i.bulletActiveClass}-main`);if(t.params.loop)if(a>=s.length){for(let e=i.dynamicMainBullets;e>=0;e-=1)s.eq(s.length-e).addClass(`${i.bulletActiveClass}-main`);s.eq(s.length-i.dynamicMainBullets-1).addClass(`${i.bulletActiveClass}-prev`)}else d(e,"prev"),d(o,"next");else d(e,"prev"),d(o,"next")}}if(i.dynamicBullets){const n=Math.min(s.length,i.dynamicMainBullets+4),a=(o*n-o)/2-u*o,r=e?"right":"left";s.css(t.isHorizontal()?r:"top",`${a}px`)}}if("fraction"===i.type&&(a.find(F(i.currentClass)).text(i.formatFractionCurrent(h+1)),a.find(F(i.totalClass)).text(i.formatFractionTotal(u))),"progressbar"===i.type){let e;e=i.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const s=(h+1)/u;let n=1,o=1;"horizontal"===e?n=s:o=s,a.find(F(i.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${n}) scaleY(${o})`).transition(t.params.speed)}"custom"===i.type&&i.renderCustom?(a.html(i.renderCustom(t,h+1,u)),n("paginationRender",a[0])):n("paginationUpdate",a[0]),t.params.watchOverflow&&t.enabled&&a[t.isLocked?"addClass":"removeClass"](i.lockClass)}function u(){const e=t.params.pagination;if(l())return;const i=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,s=t.pagination.$el;let a="";if("bullets"===e.type){let n=t.params.loop?Math.ceil((i-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&!t.params.loop&&n>i&&(n=i);for(let i=0;i`;s.html(a),t.pagination.bullets=s.find(F(e.bulletClass))}"fraction"===e.type&&(a=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):``+" / "+``,s.html(a)),"progressbar"===e.type&&(a=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):``,s.html(a)),"custom"!==e.type&&n("paginationRender",t.pagination.$el[0])}function p(){t.params.pagination=H(t,t.originalParams.pagination,t.params.pagination,{el:"ax-pages"});const e=t.params.pagination;if(!e.el)return;let i=c(e.el);0!==i.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&i.length>1&&(i=t.$el.find(e.el),i.length>1&&(i=i.filter(e=>c(e).parents(".swiper")[0]===t.el))),"bullets"===e.type&&e.clickable&&i.addClass(e.clickableClass),i.addClass(e.modifierClass+e.type),i.addClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(i.addClass(`${e.modifierClass}${e.type}-dynamic`),r=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&i.addClass(e.progressbarOppositeClass),e.clickable&&i.on("click",F(e.bulletClass),(function(e){axPreventDefault(e);let i=c(this).index()*t.params.slidesPerGroup;t.params.loop&&(i+=t.loopedSlides),t.slideTo(i)})),Object.assign(t.pagination,{$el:i,el:i[0]}),t.enabled||i.addClass(e.lockClass))}function m(){const e=t.params.pagination;if(l())return;const i=t.pagination.$el;i.removeClass(e.hiddenClass),i.removeClass(e.modifierClass+e.type),i.removeClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.pagination.bullets&&t.pagination.bullets.removeClass&&t.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&i.off("click",F(e.bulletClass))}s("init",()=>{p(),u(),h()}),s("activeIndexChange",()=>{t.params.loop?h():void 0===t.snapIndex&&h()}),s("snapIndexChange",()=>{t.params.loop||h()}),s("slidesLengthChange",()=>{t.params.loop&&(u(),h())}),s("snapGridLengthChange",()=>{t.params.loop||(u(),h())}),s("destroy",()=>{m()}),s("enable disable",()=>{const{$el:e}=t.pagination;e&&e[t.enabled?"removeClass":"addClass"](t.params.pagination.lockClass)}),s("lock unlock",()=>{h()}),s("click",(e,i)=>{const s=i.target,{$el:a}=t.pagination;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&a.length>0&&!c(s).hasClass(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&s===t.navigation.nextEl||t.navigation.prevEl&&s===t.navigation.prevEl))return;const e=a.hasClass(t.params.pagination.hiddenClass);n(!0===e?"paginationShow":"paginationHide"),a.toggleClass(t.params.pagination.hiddenClass)}}),Object.assign(t.pagination,{render:u,update:h,init:p,destroy:m})},function(e){let{swiper:t,extendParams:i,on:n,emit:a}=e;const o=s();let r,l,d,u,p=!1,m=null,f=null;function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:i,progress:s}=t,{$dragEl:n,$el:a}=e,o=t.params.scrollbar;let r=l,c=(d-l)*s;i?(c=-c,c>0?(r=l-c,c=0):-c+l>d&&(r=d+c)):c<0?(r=l+c,c=0):c+l>d&&(r=d-c),t.isHorizontal()?(n.transform(`translate3d(${c}px, 0, 0)`),n[0].style.width=`${r}px`):(n.transform(`translate3d(0px, ${c}px, 0)`),n[0].style.height=`${r}px`),o.hide&&(clearTimeout(m),a[0].style.opacity=1,m=setTimeout(()=>{a[0].style.opacity=0,a.transition(400)},1e3))}function v(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{$dragEl:i,$el:s}=e;i[0].style.width="",i[0].style.height="",d=t.isHorizontal()?s[0].offsetWidth:s[0].offsetHeight,u=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),l="auto"===t.params.scrollbar.dragSize?d*u:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?i[0].style.width=`${l}px`:i[0].style.height=`${l}px`,s[0].style.display=u>=1?"none":"",t.params.scrollbar.hide&&(s[0].style.opacity=0),t.params.watchOverflow&&t.enabled&&e.$el[t.isLocked?"addClass":"removeClass"](t.params.scrollbar.lockClass)}function x(e){return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY}function y(e){const{scrollbar:i,rtlTranslate:s}=t,{$el:n}=i;let a;a=(x(e)-n.offset()[t.isHorizontal()?"left":"top"]-(null!==r?r:l/2))/(d-l),a=Math.max(Math.min(a,1),0),s&&(a=1-a);const o=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*a;t.updateProgress(o),t.setTranslate(o),t.updateActiveIndex(),t.updateSlidesClasses()}function b(e){const i=t.params.scrollbar,{scrollbar:s,$wrapperEl:n}=t,{$el:o,$dragEl:l}=s;p=!0,r=e.target===l[0]||e.target===l?x(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,axPreventDefault(e),e.stopPropagation(),n.transition(100),l.transition(100),y(e),clearTimeout(f),o.transition(0),i.hide&&o.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),a("scrollbarDragStart",e)}function w(e){const{scrollbar:i,$wrapperEl:s}=t,{$el:n,$dragEl:o}=i;p&&(axPreventDefault(e),y(e),s.transition(0),n.transition(0),o.transition(0),a("scrollbarDragMove",e))}function M(e){const i=t.params.scrollbar,{scrollbar:s,$wrapperEl:n}=t,{$el:o}=s;p&&(p=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),n.transition("")),i.hide&&(clearTimeout(f),f=h(()=>{o.css("opacity",0),o.transition(400)},1e3)),a("scrollbarDragEnd",e),i.snapOnRelease&&t.slideToClosest())}function E(e){const{scrollbar:i,touchEventsTouch:s,touchEventsDesktop:n,params:a,support:r}=t,l=i.$el[0],c=!(!r.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},d=!(!r.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};if(!l)return;const h="on"===e?"addEventListener":"removeEventListener";r.touch?(l[h](s.start,b,c),l[h](s.move,w,c),l[h](s.end,M,d)):(l[h](n.start,b,c),o[h](n.move,w,c),o[h](n.end,M,d))}function S(){const{scrollbar:e,$el:i}=t;t.params.scrollbar=H(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"ax-scrollbar"});const s=t.params.scrollbar;if(!s.el)return;let n=c(s.el);t.params.uniqueNavElements&&"string"==typeof s.el&&n.length>1&&1===i.find(s.el).length&&(n=i.find(s.el));let a=n.find(`.${t.params.scrollbar.dragClass}`);0===a.length&&(a=c(`
`),n.append(a)),Object.assign(e,{$el:n,el:n[0],$dragEl:a,dragEl:a[0]}),s.draggable&&t.params.scrollbar.el&&E("on"),n&&n[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}function D(){t.params.scrollbar.el&&E("off")}i({scrollbar:{el:".ax-scrollbar",dragSize:"auto",hide:!0,draggable:!0,snapOnRelease:!0,lockClass:"ax-scrollbar-lock",dragClass:"ax-scrollbar-drag"}}),t.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null},n("init",()=>{S(),v(),g()}),n("update resize observerUpdate lock unlock",()=>{v()}),n("setTranslate",()=>{g()}),n("setTransition",(e,i)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)}(i)}),n("enable disable",()=>{const{$el:e}=t.scrollbar;e&&e[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}),n("destroy",()=>{D()}),Object.assign(t.scrollbar,{updateSize:v,setTranslate:g,init:S,destroy:D})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({parallax:{enabled:!1}});const n=(e,i)=>{const{rtl:s}=t,n=c(e),a=s?-1:1,o=n.attr("data-swiper-parallax")||"0";let r=n.attr("data-swiper-parallax-x"),l=n.attr("data-swiper-parallax-y");const d=n.attr("data-swiper-parallax-scale"),h=n.attr("data-swiper-parallax-opacity");if(r||l?(r=r||"0",l=l||"0"):t.isHorizontal()?(r=o,l="0"):(l=o,r="0"),r=r.indexOf("%")>=0?`${parseInt(r,10)*i*a}%`:`${r*i*a}px`,l=l.indexOf("%")>=0?`${parseInt(l,10)*i}%`:`${l*i}px`,null!=h){const e=h-(h-1)*(1-Math.abs(i));n[0].style.opacity=e}if(null==d)n.transform(`translate3d(${r}, ${l}, 0px)`);else{const e=d-(d-1)*(1-Math.abs(i));n.transform(`translate3d(${r}, ${l}, 0px) scale(${e})`)}},a=()=>{const{$el:e,slides:i,progress:s,snapGrid:a}=t;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{n(e,s)}),i.each((e,i)=>{let o=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(o+=Math.ceil(i/2)-s*(a.length-1)),o=Math.min(Math.max(o,-1),1),c(e).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{n(e,o)})})};s("beforeInit",()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)}),s("init",()=>{t.params.parallax.enabled&&a()}),s("setTranslate",()=>{t.params.parallax.enabled&&a()}),s("setTransition",(e,i)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{$el:i}=t;i.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(t=>{const i=c(t);let s=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),i.transition(s)})}(i)})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const o=a();i({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"ax-zoom",zoomedSlideClass:"ax-slide-zoomed"}}),t.zoom={enabled:!1};let r,l,d,h=1,u=!1;const m={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},f={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let v=1;function x(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,n=e.targetTouches[1].pageY;return Math.sqrt((s-t)**2+(n-i)**2)}function y(e){const i=t.support,s=t.params.zoom;if(l=!1,d=!1,!i.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;l=!0,m.scaleStart=x(e)}m.$slideEl&&m.$slideEl.length||(m.$slideEl=c(e.target).closest(`.${t.params.slideClass}`),0===m.$slideEl.length&&(m.$slideEl=t.slides.eq(t.activeIndex)),m.$imageEl=m.$slideEl.find(`.${s.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${s.containerClass}`),m.maxRatio=m.$imageWrapEl.attr("data-swiper-zoom")||s.maxRatio,0!==m.$imageWrapEl.length)?(m.$imageEl&&m.$imageEl.transition(0),u=!0):m.$imageEl=void 0}function b(e){const i=t.support,s=t.params.zoom,n=t.zoom;if(!i.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;d=!0,m.scaleMove=x(e)}m.$imageEl&&0!==m.$imageEl.length?(i.gestures?n.scale=e.scale*h:n.scale=m.scaleMove/m.scaleStart*h,n.scale>m.maxRatio&&(n.scale=m.maxRatio-1+(n.scale-m.maxRatio+1)**.5),n.scalef.touchesStart.x))return void(f.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(f.minY)===Math.floor(f.startY)&&f.touchesCurrent.yf.touchesStart.y))return void(f.isTouched=!1)}e.cancelable&&axPreventDefault(e),e.stopPropagation(),f.isMoved=!0,f.currentX=f.touchesCurrent.x-f.touchesStart.x+f.startX,f.currentY=f.touchesCurrent.y-f.touchesStart.y+f.startY,f.currentXf.maxX&&(f.currentX=f.maxX-1+(f.currentX-f.maxX+1)**.8),f.currentYf.maxY&&(f.currentY=f.maxY-1+(f.currentY-f.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=f.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=f.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(f.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(f.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(f.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(f.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=f.touchesCurrent.x,g.prevPositionY=f.touchesCurrent.y,g.prevTime=Date.now(),m.$imageWrapEl.transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}}function E(){const e=t.zoom;m.$slideEl&&t.previousIndex!==t.activeIndex&&(m.$imageEl&&m.$imageEl.transform("translate3d(0,0,0) scale(1)"),m.$imageWrapEl&&m.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,h=1,m.$slideEl=void 0,m.$imageEl=void 0,m.$imageWrapEl=void 0)}function S(e){const i=t.zoom,s=t.params.zoom;if(m.$slideEl||(e&&e.target&&(m.$slideEl=c(e.target).closest(`.${t.params.slideClass}`)),m.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):m.$slideEl=t.slides.eq(t.activeIndex)),m.$imageEl=m.$slideEl.find(`.${s.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${s.containerClass}`)),!m.$imageEl||0===m.$imageEl.length||!m.$imageWrapEl||0===m.$imageWrapEl.length)return;let n,a,r,l,d,u,p,g,v,x,y,b,w,M,E,S,D,T;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),m.$slideEl.addClass(`${s.zoomedSlideClass}`),void 0===f.touchesStart.x&&e?(n="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,a="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(n=f.touchesStart.x,a=f.touchesStart.y),i.scale=m.$imageWrapEl.attr("data-swiper-zoom")||s.maxRatio,h=m.$imageWrapEl.attr("data-swiper-zoom")||s.maxRatio,e?(D=m.$slideEl[0].offsetWidth,T=m.$slideEl[0].offsetHeight,r=m.$slideEl.offset().left+o.scrollX,l=m.$slideEl.offset().top+o.scrollY,d=r+D/2-n,u=l+T/2-a,v=m.$imageEl[0].offsetWidth,x=m.$imageEl[0].offsetHeight,y=v*i.scale,b=x*i.scale,w=Math.min(D/2-y/2,0),M=Math.min(T/2-b/2,0),E=-w,S=-M,p=d*i.scale,g=u*i.scale,pE&&(p=E),gS&&(g=S)):(p=0,g=0),m.$imageWrapEl.transition(300).transform(`translate3d(${p}px, ${g}px,0)`),m.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${i.scale})`)}function D(){const e=t.zoom,i=t.params.zoom;m.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):m.$slideEl=t.slides.eq(t.activeIndex),m.$imageEl=m.$slideEl.find(`.${i.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${i.containerClass}`)),m.$imageEl&&0!==m.$imageEl.length&&m.$imageWrapEl&&0!==m.$imageWrapEl.length&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,h=1,m.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),m.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),m.$slideEl.removeClass(`${i.zoomedSlideClass}`),m.$slideEl=void 0)}function T(e){const i=t.zoom;i.scale&&1!==i.scale?D():S(e)}function C(){const e=t.support;return{passiveListener:!("touchstart"!==t.touchEvents.start||!e.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!e.passiveListener||{passive:!1,capture:!0}}}function L(){return`.${t.params.slideClass}`}function A(e){const{passiveListener:i}=C(),s=L();t.$wrapperEl[e]("gesturestart",s,y,i),t.$wrapperEl[e]("gesturechange",s,b,i),t.$wrapperEl[e]("gestureend",s,w,i)}function _(){r||(r=!0,A("on"))}function I(){r&&(r=!1,A("off"))}function k(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const i=t.support,{passiveListener:s,activeListenerWithCapture:n}=C(),a=L();i.gestures?(t.$wrapperEl.on(t.touchEvents.start,_,s),t.$wrapperEl.on(t.touchEvents.end,I,s)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.on(t.touchEvents.start,a,y,s),t.$wrapperEl.on(t.touchEvents.move,a,b,n),t.$wrapperEl.on(t.touchEvents.end,a,w,s),t.touchEvents.cancel&&t.$wrapperEl.on(t.touchEvents.cancel,a,w,s)),t.$wrapperEl.on(t.touchEvents.move,`.${t.params.zoom.containerClass}`,M,n)}function N(){const e=t.zoom;if(!e.enabled)return;const i=t.support;e.enabled=!1;const{passiveListener:s,activeListenerWithCapture:n}=C(),a=L();i.gestures?(t.$wrapperEl.off(t.touchEvents.start,_,s),t.$wrapperEl.off(t.touchEvents.end,I,s)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.off(t.touchEvents.start,a,y,s),t.$wrapperEl.off(t.touchEvents.move,a,b,n),t.$wrapperEl.off(t.touchEvents.end,a,w,s),t.touchEvents.cancel&&t.$wrapperEl.off(t.touchEvents.cancel,a,w,s)),t.$wrapperEl.off(t.touchEvents.move,`.${t.params.zoom.containerClass}`,M,n)}Object.defineProperty(t.zoom,"scale",{get:()=>v,set(e){if(v!==e){const t=m.$imageEl?m.$imageEl[0]:void 0,i=m.$slideEl?m.$slideEl[0]:void 0;n("zoomChange",e,t,i)}v=e}}),s("init",()=>{t.params.zoom.enabled&&k()}),s("destroy",()=>{N()}),s("touchStart",(e,i)=>{t.zoom.enabled&&function(e){const i=t.device;m.$imageEl&&0!==m.$imageEl.length&&(f.isTouched||(i.android&&e.cancelable&&axPreventDefault(e),f.isTouched=!0,f.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,f.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))}(i)}),s("touchEnd",(e,i)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!m.$imageEl||0===m.$imageEl.length)return;if(!f.isTouched||!f.isMoved)return f.isTouched=!1,void(f.isMoved=!1);f.isTouched=!1,f.isMoved=!1;let i=300,s=300;const n=g.x*i,a=f.currentX+n,o=g.y*s,r=f.currentY+o;0!==g.x&&(i=Math.abs((a-f.currentX)/g.x)),0!==g.y&&(s=Math.abs((r-f.currentY)/g.y));const l=Math.max(i,s);f.currentX=a,f.currentY=r;const c=f.width*e.scale,d=f.height*e.scale;f.minX=Math.min(m.slideWidth/2-c/2,0),f.maxX=-f.minX,f.minY=Math.min(m.slideHeight/2-d/2,0),f.maxY=-f.minY,f.currentX=Math.max(Math.min(f.currentX,f.maxX),f.minX),f.currentY=Math.max(Math.min(f.currentY,f.maxY),f.minY),m.$imageWrapEl.transition(l).transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}()}),s("doubleTap",(e,i)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&T(i)}),s("transitionEnd",()=>{t.zoom.enabled&&t.params.zoom.enabled&&E()}),s("slideChange",()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&E()}),Object.assign(t.zoom,{enable:k,disable:N,in:S,out:D,toggle:T})},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;i({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"ax-lazy",loadingClass:"ax-lazy-loading",loadedClass:"ax-lazy-loaded",preloaderClass:"ax-loading"}}),t.lazy={};let o=!1,r=!1;function l(e,i){void 0===i&&(i=!0);const s=t.params.lazy;if(void 0===e)return;if(0===t.slides.length)return;const a=t.virtual&&t.params.virtual.enabled?t.$wrapperEl.children(`.${t.params.slideClass}[data-swiper-slide-index="${e}"]`):t.slides.eq(e),o=a.find(`.${s.elementClass}:not(.${s.loadedClass}):not(.${s.loadingClass})`);!a.hasClass(s.elementClass)||a.hasClass(s.loadedClass)||a.hasClass(s.loadingClass)||o.push(a[0]),0!==o.length&&o.each(e=>{const o=c(e);o.addClass(s.loadingClass);const r=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),u=o.attr("data-sizes"),p=o.parent("picture");t.loadImage(o[0],d||r,h,u,!1,()=>{if(null!=t&&t&&(!t||t.params)&&!t.destroyed){if(r?(o.css("background-image",`url("${r}")`),o.removeAttr("data-background")):(h&&(o.attr("srcset",h),o.removeAttr("data-srcset")),u&&(o.attr("sizes",u),o.removeAttr("data-sizes")),p.length&&p.children("source").each(e=>{const t=c(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))}),d&&(o.attr("src",d),o.removeAttr("data-src"))),o.addClass(s.loadedClass).removeClass(s.loadingClass),a.find(`.${s.preloaderClass}`).remove(),t.params.loop&&i){const e=a.attr("data-swiper-slide-index");if(a.hasClass(t.params.slideDuplicateClass)){l(t.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${t.params.slideDuplicateClass})`).index(),!1)}else{l(t.$wrapperEl.children(`.${t.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).index(),!1)}}n("lazyImageReady",a[0],o[0]),t.params.autoHeight&&t.updateAutoHeight()}}),n("lazyImageLoad",a[0],o[0])})}function d(){const{$wrapperEl:e,params:i,slides:s,activeIndex:n}=t,a=t.virtual&&i.virtual.enabled,o=i.lazy;let d=i.slidesPerView;function h(t){if(a){if(e.children(`.${i.slideClass}[data-swiper-slide-index="${t}"]`).length)return!0}else if(s[t])return!0;return!1}function u(e){return a?c(e).attr("data-swiper-slide-index"):c(e).index()}if("auto"===d&&(d=0),r||(r=!0),t.params.watchSlidesProgress)e.children(`.${i.slideVisibleClass}`).each(e=>{l(a?c(e).attr("data-swiper-slide-index"):c(e).index())});else if(d>1)for(let e=n;e1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){const e=o.loadPrevNextAmount,t=d,i=Math.min(n+t+Math.max(e,t),s.length),a=Math.max(n-Math.max(t,e),0);for(let e=n+d;e0&&l(u(t));const s=e.children(`.${i.slidePrevClass}`);s.length>0&&l(u(s))}}function h(){const e=a();if(!t||t.destroyed)return;const i=t.params.lazy.scrollingElement?c(t.params.lazy.scrollingElement):c(e),s=i[0]===e,n=s?e.innerWidth:i[0].offsetWidth,r=s?e.innerHeight:i[0].offsetHeight,l=t.$el.offset(),{rtlTranslate:u}=t;let p=!1;u&&(l.left-=t.$el[0].scrollLeft);const m=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]];for(let e=0;e=0&&t[0]<=n&&t[1]>=0&&t[1]<=r){if(0===t[0]&&0===t[1])continue;p=!0}}const f=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};p?(d(),i.off("scroll",h,f)):o||(o=!0,i.on("scroll",h,f))}s("beforeInit",()=>{t.params.lazy.enabled&&t.params.preloadImages&&(t.params.preloadImages=!1)}),s("init",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?h():d())}),s("scroll",()=>{t.params.freeMode&&t.params.freeMode.enabled&&!t.params.freeMode.sticky&&d()}),s("scrollbarDragMove resize _freeModeNoMomentumRelease",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?h():d())}),s("transitionStart",()=>{t.params.lazy.enabled&&(t.params.lazy.loadOnTransitionStart||!t.params.lazy.loadOnTransitionStart&&!r)&&(t.params.lazy.checkInView?h():d())}),s("transitionEnd",()=>{t.params.lazy.enabled&&!t.params.lazy.loadOnTransitionStart&&(t.params.lazy.checkInView?h():d())}),s("slideChange",()=>{const{lazy:e,cssMode:i,watchSlidesProgress:s,touchReleaseOnEdges:n,resistanceRatio:a}=t.params;e.enabled&&(i||s&&(n||0===a))&&d()}),Object.assign(t.lazy,{load:d,loadInSlide:l})},function(e){let{swiper:t,extendParams:i,on:s}=e;function n(e,t){const i=function(){let e,t,i;return(s,n)=>{for(t=-1,e=s.length;e-t>1;)i=e+t>>1,s[i]<=n?t=i:e=i;return e}}();let s,n;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=i(this.x,e),s=n-1,(e-this.x[s])*(this.y[n]-this.y[s])/(this.x[n]-this.x[s])+this.y[s]):0},this}function a(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}i({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},s("beforeInit",()=>{t.controller.control=t.params.controller.control}),s("update",()=>{a()}),s("resize",()=>{a()}),s("observerUpdate",()=>{a()}),s("setTranslate",(e,i,s)=>{t.controller.control&&t.controller.setTranslate(i,s)}),s("setTransition",(e,i,s)=>{t.controller.control&&t.controller.setTransition(i,s)}),Object.assign(t.controller,{setTranslate:function(e,i){const s=t.controller.control;let a,o;const r=t.constructor;function l(e){const i=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline||(t.controller.spline=t.params.loop?new n(t.slidesGrid,e.slidesGrid):new n(t.snapGrid,e.snapGrid))}(e),o=-t.controller.spline.interpolate(-i)),o&&"container"!==t.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),o=(i-t.minTranslate())*a+e.minTranslate()),t.params.controller.inverse&&(o=e.maxTranslate()-o),e.updateProgress(o),e.setTranslate(o,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(s))for(let e=0;e{i.updateAutoHeight()}),i.$wrapperEl.transitionEnd(()=>{n&&(i.params.loop&&"slide"===t.params.controller.by&&i.loopFix(),i.transitionEnd())}))}if(Array.isArray(n))for(a=0;a{o(e),"BUTTON"!==e[0].tagName&&(l(e,"button"),e.on("keydown",m)),h(e,i),function(e,t){e.attr("aria-controls",t)}(e,t)},x=e=>{const i=e.target.closest(`.${t.params.slideClass}`);if(!i||!t.slides.includes(i))return;const s=t.slides.indexOf(i)===t.activeIndex,n=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(i);s||n||t.slideTo(t.slides.indexOf(i),0)};function y(){const e=t.params.a11y;t.$el.append(n);const i=t.$el;e.containerRoleDescriptionMessage&&d(i,e.containerRoleDescriptionMessage),e.containerMessage&&h(i,e.containerMessage);const s=t.$wrapperEl,a=e.id||s.attr("id")||`ax-wrapper-${o=16,void 0===o&&(o=16),"x".repeat(o).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}`;var o;const r=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var u;u=a,s.attr("id",u),function(e,t){e.attr("aria-live",t)}(s,r),e.itemRoleDescriptionMessage&&d(c(t.slides),e.itemRoleDescriptionMessage),l(c(t.slides),e.slideRole);const p=t.params.loop?t.slides.filter(e=>!e.classList.contains(t.params.slideDuplicateClass)).length:t.slides.length;let f,y;t.slides.each((i,s)=>{const n=c(i),a=t.params.loop?parseInt(n.attr("data-swiper-slide-index"),10):s;h(n,e.slideLabelMessage.replace(/\{\{index\}\}/,a+1).replace(/\{\{slidesLength\}\}/,p))}),t.navigation&&t.navigation.$nextEl&&(f=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(y=t.navigation.$prevEl),f&&f.length&&v(f,a,e.nextSlideMessage),y&&y.length&&v(y,a,e.prevSlideMessage),g()&&t.pagination.$el.on("keydown",F(t.params.pagination.bulletClass),m),t.$el.on("focus",x,!0)}s("beforeInit",()=>{n=c(``)}),s("afterInit",()=>{t.params.a11y.enabled&&y()}),s("fromEdge toEdge afterInit lock unlock",()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{$nextEl:e,$prevEl:i}=t.navigation;i&&i.length>0&&(t.isBeginning?(u(i),r(i)):(p(i),o(i))),e&&e.length>0&&(t.isEnd?(u(e),r(e)):(p(e),o(e)))}()}),s("paginationUpdate",()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;f()&&t.pagination.bullets.each(i=>{const s=c(i);t.params.pagination.clickable&&(o(s),t.params.pagination.renderBullet||(l(s,"button"),h(s,e.paginationBulletMessage.replace(/\{\{index\}\}/,s.index()+1)))),s.is(`.${t.params.pagination.bulletActiveClass}`)?s.attr("aria-current","true"):s.removeAttr("aria-current")})}()}),s("destroy",()=>{t.params.a11y.enabled&&function(){let e,i;n&&n.length>0&&n.remove(),t.navigation&&t.navigation.$nextEl&&(e=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(i=t.navigation.$prevEl),e&&e.off("keydown",m),i&&i.off("keydown",m),g()&&t.pagination.$el.off("keydown",F(t.params.pagination.bulletClass),m),t.$el.off("focus",x,!0)}()})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({history:{enabled:!1,root:"",replaceState:!1,key:"slides"}});let n=!1,o={};const r=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),l=e=>{const t=a();let i;i=e?new URL(e):t.location;const s=i.pathname.slice(1).split("/").filter(e=>""!==e),n=s.length;return{key:s[n-2],value:s[n-1]}},c=(e,i)=>{const s=a();if(!n||!t.params.history.enabled)return;let o;o=t.params.url?new URL(t.params.url):s.location;const l=t.slides.eq(i);let c=r(l.attr("data-history"));if(t.params.history.root.length>0){let i=t.params.history.root;"/"===i[i.length-1]&&(i=i.slice(0,i.length-1)),c=`${i}/${e}/${c}`}else o.pathname.includes(e)||(c=`${e}/${c}`);const d=s.history.state;d&&d.value===c||(t.params.history.replaceState?s.history.replaceState({value:c},null,c):s.history.pushState({value:c},null,c))},d=(e,i,s)=>{if(i)for(let n=0,a=t.slides.length;n{o=l(t.params.url),d(t.params.speed,t.paths.value,!1)};s("init",()=>{t.params.history.enabled&&(()=>{const e=a();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);n=!0,o=l(t.params.url),(o.key||o.value)&&(d(0,o.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",h))}})()}),s("destroy",()=>{t.params.history.enabled&&(()=>{const e=a();t.params.history.replaceState||e.removeEventListener("popstate",h)})()}),s("transitionEnd _freeModeNoMomentumRelease",()=>{n&&c(t.params.history.key,t.activeIndex)}),s("slideChange",()=>{n&&t.params.cssMode&&c(t.params.history.key,t.activeIndex)})},function(e){let{swiper:t,extendParams:i,emit:n,on:o}=e,r=!1;const l=s(),d=a();i({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}});const h=()=>{n("hashChange");const e=l.location.hash.replace("#","");if(e!==t.slides.eq(t.activeIndex).attr("data-hash")){const i=t.$wrapperEl.children(`.${t.params.slideClass}[data-hash="${e}"]`).index();if(void 0===i)return;t.slideTo(i)}},u=()=>{if(r&&t.params.hashNavigation.enabled)if(t.params.hashNavigation.replaceState&&d.history&&d.history.replaceState)d.history.replaceState(null,null,`#${t.slides.eq(t.activeIndex).attr("data-hash")}`||""),n("hashSet");else{const e=t.slides.eq(t.activeIndex),i=e.attr("data-hash")||e.attr("data-history");l.location.hash=i||"",n("hashSet")}};o("init",()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;r=!0;const e=l.location.hash.replace("#","");if(e){const i=0;for(let s=0,n=t.slides.length;s{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&c(d).off("hashchange",h)}),o("transitionEnd _freeModeNoMomentumRelease",()=>{r&&u()}),o("slideChange",()=>{r&&t.params.cssMode&&u()})},function(e){let t,{swiper:i,extendParams:n,on:a,emit:o}=e;function r(){const e=i.slides.eq(i.activeIndex);let s=i.params.autoplay.delay;e.attr("data-swiper-autoplay")&&(s=e.attr("data-swiper-autoplay")||i.params.autoplay.delay),clearTimeout(t),t=h(()=>{let e;i.params.autoplay.reverseDirection?i.params.loop?(i.loopFix(),e=i.slidePrev(i.params.speed,!0,!0),o("autoplay")):i.isBeginning?i.params.autoplay.stopOnLastSlide?c():(e=i.slideTo(i.slides.length-1,i.params.speed,!0,!0),o("autoplay")):(e=i.slidePrev(i.params.speed,!0,!0),o("autoplay")):i.params.loop?(i.loopFix(),e=i.slideNext(i.params.speed,!0,!0),o("autoplay")):i.isEnd?i.params.autoplay.stopOnLastSlide?c():(e=i.slideTo(0,i.params.speed,!0,!0),o("autoplay")):(e=i.slideNext(i.params.speed,!0,!0),o("autoplay")),i.params.cssMode&&i.autoplay.running?r():!1===e&&r()},s)}function l(){return void 0===t&&(!i.autoplay.running&&(i.autoplay.running=!0,o("autoplayStart"),r(),!0))}function c(){return!!i.autoplay.running&&(void 0!==t&&(t&&(clearTimeout(t),t=void 0),i.autoplay.running=!1,o("autoplayStop"),!0))}function d(e){i.autoplay.running&&(i.autoplay.paused||(t&&clearTimeout(t),i.autoplay.paused=!0,0!==e&&i.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach(e=>{i.$wrapperEl[0].addEventListener(e,p)}):(i.autoplay.paused=!1,r())))}function u(){const e=s();"hidden"===e.visibilityState&&i.autoplay.running&&d(),"visible"===e.visibilityState&&i.autoplay.paused&&(r(),i.autoplay.paused=!1)}function p(e){i&&!i.destroyed&&i.$wrapperEl&&e.target===i.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach(e=>{i.$wrapperEl[0].removeEventListener(e,p)}),i.autoplay.paused=!1,i.autoplay.running?r():c())}function m(){i.params.autoplay.disableOnInteraction?c():(o("autoplayPause"),d()),["transitionend","webkitTransitionEnd"].forEach(e=>{i.$wrapperEl[0].removeEventListener(e,p)})}function f(){i.params.autoplay.disableOnInteraction||(i.autoplay.paused=!1,o("autoplayResume"),r())}i.autoplay={running:!1,paused:!1},n({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),a("init",()=>{if(i.params.autoplay.enabled){l(),s().addEventListener("visibilitychange",u),i.params.autoplay.pauseOnMouseEnter&&(i.$el.on("mouseenter",m),i.$el.on("mouseleave",f))}}),a("beforeTransitionStart",(e,t,s)=>{i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?i.autoplay.pause(t):c())}),a("sliderFirstMove",()=>{i.autoplay.running&&(i.params.autoplay.disableOnInteraction?c():d())}),a("touchEnd",()=>{i.params.cssMode&&i.autoplay.paused&&!i.params.autoplay.disableOnInteraction&&r()}),a("destroy",()=>{i.$el.off("mouseenter",m),i.$el.off("mouseleave",f),i.autoplay.running&&c(),s().removeEventListener("visibilitychange",u)}),Object.assign(i.autoplay,{pause:d,run:r,start:l,stop:c})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"ax-slide-thumb-active",thumbsContainerClass:"ax-thumbs"}});let n=!1,a=!1;function o(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const i=e.clickedIndex,s=e.clickedSlide;if(s&&c(s).hasClass(t.params.thumbs.slideThumbActiveClass))return;if(null==i)return;let n;if(n=e.params.loop?parseInt(c(e.clickedSlide).attr("data-swiper-slide-index"),10):i,t.params.loop){let e=t.activeIndex;t.slides.eq(e).hasClass(t.params.slideDuplicateClass)&&(t.loopFix(),t._clientLeft=t.$wrapperEl[0].clientLeft,e=t.activeIndex);const i=t.slides.eq(e).prevAll(`[data-swiper-slide-index="${n}"]`).eq(0).index(),s=t.slides.eq(e).nextAll(`[data-swiper-slide-index="${n}"]`).eq(0).index();n=void 0===i?s:void 0===s?i:s-e1?s:l:s-lt.previousIndex?"next":"prev"}else o=t.realIndex,r=o>t.previousIndex?"next":"prev";a&&(o+="next"===r?n:-1*n),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(o)<0&&(i.params.centeredSlides?o=o>l?o-Math.floor(s/2)+1:o+Math.floor(s/2)-1:o>l&&i.params.slidesPerGroup,i.slideTo(o,e?0:void 0))}let o=1;const r=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(o=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(o=1),o=Math.floor(o),i.slides.removeClass(r),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(let e=0;e{const{thumbs:e}=t.params;e&&e.swiper&&(r(),l(!0))}),s("slideChange update resize observerUpdate",()=>{l()}),s("setTransition",(e,i)=>{const s=t.thumbs.swiper;s&&!s.destroyed&&s.setTransition(i)}),s("beforeDestroy",()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&a&&e.destroy()}),Object.assign(t.thumbs,{init:r,update:l})},function(e){let{swiper:t,extendParams:i,emit:s,once:n}=e;i({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){const{touchEventsData:e,touches:i}=t;0===e.velocities.length&&e.velocities.push({position:i[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:i[t.isHorizontal()?"currentX":"currentY"],time:u()})},onTouchEnd:function(e){let{currentPos:i}=e;const{params:a,$wrapperEl:o,rtlTranslate:r,snapGrid:l,touchEventsData:c}=t,d=u()-c.touchStartTime;if(i<-t.minTranslate())t.slideTo(t.activeIndex);else if(i>-t.maxTranslate())t.slides.length1){const e=c.velocities.pop(),i=c.velocities.pop(),s=e.position-i.position,n=e.time-i.time;t.velocity=s/n,t.velocity/=2,Math.abs(t.velocity)150||u()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=a.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*a.freeMode.momentumRatio;const i=t.velocity*e;let d=t.translate+i;r&&(d=-d);let h,p=!1;const m=20*Math.abs(t.velocity)*a.freeMode.momentumBounceRatio;let f;if(dt.minTranslate())a.freeMode.momentumBounce?(d-t.minTranslate()>m&&(d=t.minTranslate()+m),h=t.minTranslate(),p=!0,c.allowMomentumBounce=!0):d=t.minTranslate(),a.loop&&a.centeredSlides&&(f=!0);else if(a.freeMode.sticky){let e;for(let t=0;t-d){e=t;break}d=Math.abs(l[e]-d){t.loopFix()}),0!==t.velocity){if(e=r?Math.abs((-d-t.translate)/t.velocity):Math.abs((d-t.translate)/t.velocity),a.freeMode.sticky){const i=Math.abs((r?-d:d)-t.translate),s=t.slidesSizesGrid[t.activeIndex];e=i{t&&!t.destroyed&&c.allowMomentumBounce&&(s("momentumBounce"),t.setTransition(a.speed),setTimeout(()=>{t.setTranslate(h),o.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(s("_freeModeNoMomentumRelease"),t.updateProgress(d),t.setTransition(e),t.setTranslate(d),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,o.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(d),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(a.freeMode.sticky)return void t.slideToClosest();a.freeMode&&s("_freeModeNoMomentumRelease")}(!a.freeMode.momentum||d>=a.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,i,s,{swiper:n,extendParams:a}=e;a({grid:{rows:1,fill:"column"}}),n.grid={initSlides:e=>{const{slidesPerView:a}=n.params,{rows:o,fill:r}=n.params.grid;i=t/o,s=Math.floor(e/o),t=Math.floor(e/o)===e/o?e:Math.ceil(e/o)*o,"auto"!==a&&"row"===r&&(t=Math.max(t,a*o))},updateSlide:(e,a,o,r)=>{const{slidesPerGroup:l,spaceBetween:c}=n.params,{rows:d,fill:h}=n.params.grid;let u,p,m;if("row"===h&&l>1){const i=Math.floor(e/(l*d)),s=e-d*l*i,n=0===i?l:Math.min(Math.ceil((o-i*d*l)/d),l);m=Math.floor(s/n),p=s-m*n+i*l,u=p+m*t/d,a.css({"-webkit-order":u,order:u})}else"column"===h?(p=Math.floor(e/d),m=e-p*d,(p>s||p===s&&m===d-1)&&(m+=1,m>=d&&(m=0,p+=1))):(m=Math.floor(e/i),p=e-m*i);a.css(r("margin-top"),0!==m?c&&`${c}px`:"")},updateWrapperSize:(e,i,s)=>{const{spaceBetween:a,centeredSlides:o,roundLengths:r}=n.params,{rows:l}=n.params.grid;if(n.virtualSize=(e+a)*t,n.virtualSize=Math.ceil(n.virtualSize/l)-a,n.$wrapperEl.css({[s("width")]:`${n.virtualSize+a}px`}),o){i.splice(0,i.length);const e=[];for(let t=0;t{const{slides:e}=t,i=t.params.fadeEffect;for(let s=0;s{const{transformEl:i}=t.params.fadeEffect;(i?t.slides.find(i):t.slides).transition(e),K({swiper:t,duration:e,transformEl:i,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const n=(e,t,i)=>{let s=i?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),n=i?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===s.length&&(s=c(`
`),e.append(s)),0===n.length&&(n=c(`
`),e.append(n)),s.length&&(s[0].style.opacity=Math.max(-t,0)),n.length&&(n[0].style.opacity=Math.max(t,0))};X({effect:"cube",swiper:t,on:s,setTranslate:()=>{const{$el:e,$wrapperEl:i,slides:s,width:a,height:o,rtlTranslate:r,size:l,browser:d}=t,h=t.params.cubeEffect,u=t.isHorizontal(),p=t.virtual&&t.params.virtual.enabled;let m,f=0;h.shadow&&(u?(m=i.find(".swiper-cube-shadow"),0===m.length&&(m=c('
'),i.append(m)),m.css({height:`${a}px`})):(m=e.find(".swiper-cube-shadow"),0===m.length&&(m=c('
'),e.append(m))));for(let e=0;e-1&&(f=90*i+90*c,r&&(f=90*-i-90*c)),t.transform(v),h.slideShadows&&n(t,c,u)}if(i.css({"-webkit-transform-origin":`50% 50% -${l/2}px`,"transform-origin":`50% 50% -${l/2}px`}),h.shadow)if(u)m.transform(`translate3d(0px, ${a/2+h.shadowOffset}px, ${-a/2}px) rotateX(90deg) rotateZ(0deg) scale(${h.shadowScale})`);else{const e=Math.abs(f)-90*Math.floor(Math.abs(f)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),i=h.shadowScale,s=h.shadowScale/t,n=h.shadowOffset;m.transform(`scale3d(${i}, 1, ${s}) translate3d(0px, ${o/2+n}px, ${-o/2/s}px) rotateX(-90deg)`)}const g=d.isSafari||d.isWebView?-l/2:0;i.transform(`translate3d(0px,0,${g}px) rotateX(${t.isHorizontal()?0:f}deg) rotateY(${t.isHorizontal()?-f:0}deg)`),i[0].style.setProperty("--swiper-cube-translate-z",`${g}px`)},setTransition:e=>{const{$el:i,slides:s}=t;s.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&i.find(".swiper-cube-shadow").transition(e)},recreateShadows:()=>{const e=t.isHorizontal();t.slides.each(t=>{const i=Math.max(Math.min(t.progress,1),-1);n(c(t),i,e)})},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({flipEffect:{slideShadows:!0,limitRotation:!0,transformEl:null}});const n=(e,i,s)=>{let n=t.isHorizontal()?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),a=t.isHorizontal()?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===n.length&&(n=J(s,e,t.isHorizontal()?"left":"top")),0===a.length&&(a=J(s,e,t.isHorizontal()?"right":"bottom")),n.length&&(n[0].style.opacity=Math.max(-i,0)),a.length&&(a[0].style.opacity=Math.max(i,0))};X({effect:"flip",swiper:t,on:s,setTranslate:()=>{const{slides:e,rtlTranslate:i}=t,s=t.params.flipEffect;for(let a=0;a{const{transformEl:i}=t.params.flipEffect;(i?t.slides.find(i):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),K({swiper:t,duration:e,transformEl:i})},recreateShadows:()=>{const e=t.params.flipEffect;t.slides.each(i=>{const s=c(i);let a=s[0].progress;t.params.flipEffect.limitRotation&&(a=Math.max(Math.min(i.progress,1),-1)),n(s,a,e)})},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0,transformEl:null}}),X({effect:"coverflow",swiper:t,on:s,setTranslate:()=>{const{width:e,height:i,slides:s,slidesSizesGrid:n}=t,a=t.params.coverflowEffect,o=t.isHorizontal(),r=t.translate,l=o?e/2-r:i/2-r,c=o?a.rotate:-a.rotate,d=a.depth;for(let e=0,t=s.length;e0?h:0),i.length&&(i[0].style.opacity=-h>0?-h:0)}}},setTransition:e=>{const{transformEl:i}=t.params.coverflowEffect;(i?t.slides.find(i):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const n=e=>"string"==typeof e?e:`${e}px`;X({effect:"creative",swiper:t,on:s,setTranslate:()=>{const{slides:e,$wrapperEl:i,slidesSizesGrid:s}=t,a=t.params.creativeEffect,{progressMultiplier:o}=a,r=t.params.centeredSlides;if(r){const e=s[0]/2-t.params.slidesOffsetBefore||0;i.transform(`translateX(calc(50% - ${e}px))`)}for(let i=0;i0&&(f=a.prev,m=!0),u.forEach((e,t)=>{u[t]=`calc(${e}px + (${n(f.translate[t])} * ${Math.abs(c*o)}))`}),p.forEach((e,t)=>{p[t]=f.rotate[t]*Math.abs(c*o)}),s[0].style.zIndex=-Math.abs(Math.round(l))+e.length;const g=u.join(", "),v=`rotateX(${p[0]}deg) rotateY(${p[1]}deg) rotateZ(${p[2]}deg)`,x=d<0?`scale(${1+(1-f.scale)*d*o})`:`scale(${1-(1-f.scale)*d*o})`,y=d<0?1+(1-f.opacity)*d*o:1-(1-f.opacity)*d*o,b=`translate3d(${g}) ${v} ${x}`;if(m&&f.shadow||!m){let e=s.children(".swiper-slide-shadow");if(0===e.length&&f.shadow&&(e=J(a,s)),e.length){const t=a.shadowPerProgress?c*(1/a.limitProgress):c;e[0].style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const w=Q(a,s);w.transform(b).css({opacity:y}),f.origin&&w.css("transform-origin",f.origin)}},setTransition:e=>{const{transformEl:i}=t.params.creativeEffect;(i?t.slides.find(i):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),K({swiper:t,duration:e,transformEl:i,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:i,on:s}=e;i({cardsEffect:{slideShadows:!0,transformEl:null,rotate:!0}}),X({effect:"cards",swiper:t,on:s,setTranslate:()=>{const{slides:e,activeIndex:i}=t,s=t.params.cardsEffect,{startTranslate:n,isTouched:a}=t.touchEventsData,o=t.translate;for(let r=0;r0&&d<1&&(a||t.params.cssMode)&&o-1&&(a||t.params.cssMode)&&o>n;if(y||b){const e=(1-Math.abs((Math.abs(d)-.5)/.5))**.5;g+=-28*d*e,f+=-.5*e,v+=96*e,p=`${-25*e*Math.abs(d)}%`}if(u=d<0?`calc(${u}px + (${v*Math.abs(d)}%))`:d>0?`calc(${u}px + (-${v*Math.abs(d)}%))`:`${u}px`,!t.isHorizontal()){const e=p;p=u,u=e}const w=d<0?`${1+(1-f)*d}`:`${1-(1-f)*d}`,M=`\n translate3d(${u}, ${p}, ${m}px)\n rotateZ(${s.rotate?g:0}deg)\n scale(${w})\n `;if(s.slideShadows){let e=l.find(".swiper-slide-shadow");0===e.length&&(e=J(s,l)),e.length&&(e[0].style.opacity=Math.min(Math.max((Math.abs(d)-.5)/.5,0),1))}l[0].style.zIndex=-Math.abs(Math.round(c))+e.length,Q(s,l).transform(M)}},setTransition:e=>{const{transformEl:i}=t.params.cardsEffect;(i?t.slides.find(i):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),K({swiper:t,duration:e,transformEl:i})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return B.use(Z),B})); /*!a * 插件:灯箱画廊;使用方法:axLightbox('#id',{参数}) */ const axLightboxs=[];class axLightbox{constructor(e,t){this.options=axExtend({src:"",gallery:!0,download:!1,autoplay:!1,thumb:{show:!1,placement:"bottom",row:1},zoom:!0,share:!1,btnClass:"ax-lightbox-open",index:0},e,t);this.handlers={},this.data=[],this.closeArea=[],this.zoomIn=!1,this.button=t?axIdToDom(t):null,this.referName=""}init(){let e=this;this.data=axCreateData(this.options.src,["src","cover","caption","type"],"figure",["media","cover","caption","type"],["","","","image"],(function(e){e.forEach(e=>{e.cover||"image"!=e.type||(e.cover=e.media),e.cover=e.cover?e.cover:axImage.imgNone})})),this.setAttribute(),this.createBox(),this.createSlide(),this.data.length>1&&(this.prev=axStrToDom(''),this.next=axStrToDom(''),this.swiper.appendChild(this.prev),this.swiper.appendChild(this.next));let t={zoom:this.options.zoom,lazy:!0,keyboard:!0,mousewheel:!0,initialSlide:this.options.index||0,pagination:{el:this.options.gallery?this.targetDom.querySelector(".ax-pages"):null,type:"fraction"},thumbs:{swiper:""},on:{touchStart:function(e,t){e.el.classList.add("ax-grabbing")},touchEnd:function(e,t){e.el.classList.remove("ax-grabbing")},zoomChange:function(t,i){i>1?e.zoomIn=!0:setTimeout((function(){e.zoomIn=!1}),100)}}},i={lazy:!0,spaceBetween:4,slidesPerView:"auto",mousewheel:!0,grid:{rows:this.options.thumb.row},watchSlidesProgress:!0};return this.options.gallery&&this.options.thumb&&(this.stage.insertAdjacentElement("afterend",this.createThumb()),this.insThumb=new axSwiper(this.thumb.querySelector(".ax-swiper"),i),t.thumbs.swiper=this.insThumb,this.btnList.onclick=function(){e.targetDom.classList.toggle("ax-thumb-hide")}),this.options.thumb.show||this.targetDom.classList.add("ax-thumb-hide"),this.options.autoplay&&(t.autoplay={delay:5e3,stopOnLastSlide:!1,disableOnInteraction:!0}),this.insSwiper=new axSwiper(this.swiper,t),document.body.appendChild(this.targetDom),this.data.length>1&&this.options.thumb.row&&this.options.thumb.row>1&&(this.thumb.querySelector(".ax-swiper").style.height=axHeight(this.thumb.querySelector(".ax-slide"),"outer")*this.options.thumb.row+i.spaceBetween*(this.options.thumb.row-1)+"px"),this.options.gallery||this.insSwiper.disable(),axPreventScroll(this.targetDom),this.targetDom.querySelectorAll("[close]").forEach(t=>{t.addEventListener("click",(function(){e.hide()}),!1)}),this.options.zoom&&(this.btnZoom.onclick=function(){this.classList.contains("ax-icon-zoomin")?e.insSwiper.zoom.in():e.insSwiper.zoom.out()}),this.options.download&&("image"!=this.data[this.insSwiper.activeIndex].type?(this.btnDownload.href="###",this.btnDownload.classList.add("ax-disabled"),this.btnDownload.removeAttribute("download"),this.btnDownload.removeAttribute("target")):(this.btnDownload.href=this.data[this.insSwiper.activeIndex].media,this.btnDownload.classList.remove("ax-disabled"),this.btnDownload.setAttribute("download",""),this.btnDownload.setAttribute("target","_blank"))),this.options.zoom&&("image"!=this.data[this.insSwiper.activeIndex].type?(this.btnZoom.classList.add("ax-disabled"),this.insSwiper.zoom.disable()):(this.btnZoom.classList.remove("ax-disabled"),this.insSwiper.zoom.enable())),this.options.share&&("image"!=this.data[this.insSwiper.activeIndex].type?this.btnShare.classList.add("ax-disabled"):this.btnShare.classList.remove("ax-disabled")),this.insSwiper.on("slideChangeTransitionEnd",(function(){e.options.download&&("image"!=e.data[this.activeIndex].type?(e.btnDownload.href="###",e.btnDownload.classList.add("ax-disabled"),e.btnDownload.removeAttribute("download"),e.btnDownload.removeAttribute("target")):(e.btnDownload.href=e.data[this.activeIndex].media,e.btnDownload.classList.remove("ax-disabled"),e.btnDownload.setAttribute("download",""),e.btnDownload.setAttribute("target","_blank"))),e.options.zoom&&("image"!=e.data[this.activeIndex].type?(e.btnZoom.classList.add("ax-disabled"),e.insSwiper.zoom.disable()):(e.btnZoom.classList.remove("ax-disabled"),e.btnZoom.classList.remove("ax-icon-zoomout"),e.btnZoom.classList.add("ax-icon-zoomin"),e.insSwiper.zoom.enable())),e.options.share&&("image"!=e.data[this.activeIndex].type?e.btnShare.classList.add("ax-disabled"):e.btnShare.classList.remove("ax-disabled")),e.targetDom.querySelectorAll("video,audio").forEach(e=>{e.pause()}),e.zoomIn=!1})),this.insSwiper.on("zoomChange",(function(t,i){i>1?(e.btnZoom.classList.remove("ax-icon-zoomin"),e.btnZoom.classList.add("ax-icon-zoomout")):(e.btnZoom.classList.remove("ax-icon-zoomout"),e.btnZoom.classList.add("ax-icon-zoomin"))})),"init"in this.handlers&&this.emit("init",""),this}overlayClose(e){this.closeArea=[];let t=this,i=!0,s=!0,n=!0;return t.prev&&(i=axIsOutside(e,t.prev)),t.closeArea.push(i),t.next&&(s=axIsOutside(e,t.next)),t.closeArea.push(s),n=!t.options.thumb||axIsOutside(e,t.thumb),t.closeArea.push(n),t.swiperWrapper.querySelectorAll(".ax-media").forEach(i=>{let s=i.firstElementChild;t.closeArea.push(axIsOutside(e,s))}),t.swiperWrapper.querySelectorAll(".ax-caption")&&t.swiperWrapper.querySelectorAll(".ax-caption").forEach(i=>{t.closeArea.push(axIsOutside(e,i))}),t.closeArea.push(axIsOutside(e,t.operate)),t.closeArea.push(axIsOutside(e,t.pages)),this.closeArea}createSlide(){this.data.forEach(e=>{let t=null,i=null;var s,n;t=axStrToDom((s=e.media,(n=e.type)&&"video"==n?`\n
\n
\n \n
\n
\n `:n&&"iframe"==n?`\n
\n
\n \n
\n
\n `:n&&"text"==n?("#"==s.substr(0,1)&&(s=document.querySelector(s).innerHTML),`\n
\n
\n
${s}
\n
\n
\n `):`\n
\n
\n \n \n
\n
\n `)),i=e.caption?axStrToDom(`
${e.caption}
`):null,i&&t.appendChild(i),this.swiperWrapper.appendChild(t)})}createThumb(){return this.thumb=axStrToDom('
'),this.thumbWrapper=this.thumb.querySelector(".ax-wrapper"),this.data.forEach(e=>{let t=axStrToDom(`\n
\n \n \n
\n `);this.thumbWrapper.appendChild(t)}),this.thumb}createBox(){let e=`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `;this.targetDom=axStrToDom(e),this.tools=this.targetDom.querySelector(".ax-tools"),this.pages=this.targetDom.querySelector(".ax-pages"),this.operate=this.targetDom.querySelector(".ax-operate"),this.stage=this.targetDom.querySelector(".ax-stage"),this.swiper=this.stage.querySelector(".ax-swiper"),this.swiperWrapper=this.swiper.querySelector(".ax-wrapper"),this.createBtn()}createBtn(){this.btnShare=axStrToDom(''),this.btnDownload=axStrToDom(''),this.btnZoom=axStrToDom(''),this.btnList=axStrToDom(''),this.options.thumb&&this.operate.insertAdjacentElement("afterbegin",this.btnList),this.options.download&&this.operate.insertAdjacentElement("afterbegin",this.btnDownload),this.options.zoom&&this.operate.insertAdjacentElement("afterbegin",this.btnZoom),this.options.share&&this.operate.insertAdjacentElement("afterbegin",this.btnShare)}setAttribute(){for(let e=0,t=this.data.length;e{e.pause()}),e&&e.call(this),"hidden"in this.handlers&&this.emit("hidden",""),this}on(e,t){return axAddPlan(e,t,this),this}emit(e,...t){axExePlan(e,this,...t)}off(e,t){return axDelPlan(e,t,this),this}}(()=>{let e=e=>{let t=axIdToDom(e),i=[{}],s=t.nodeName;return"A"==s?t.hasAttribute("href")&&-1==t.getAttribute("href").indexOf("##")&&(i[0].media=t.getAttribute("href"),i[0].cover=t.getAttribute("href")):"IMG"==s&&t.hasAttribute("src")&&(i[0].media=t.getAttribute("src"),i[0].cover=t.getAttribute("src")),t.hasAttribute("type")?i[0].type=t.getAttribute("type"):i[0].type="image",t.hasAttribute("title")?i[0].caption=t.getAttribute("title"):t.hasAttribute("alt")?i[0].caption=t.getAttribute("alt"):i[0].caption="",i},t=[];document.querySelectorAll("[axLightbox]").forEach(i=>{let s=i.getAttribute("axLightbox");if(s){let n=[];n=i.getAttribute("data-src")?axCreateData(i.getAttribute("data-src"),["src","cover","caption","type"],"figure",["media","cover","caption","type"],["","","","image"],(function(e){e.forEach(e=>{e.cover||"image"!=e.type||(e.cover=e.media),e.cover=e.cover?e.cover:axImage.imgNone})})):e(i),axIsEmpty(t)?t.push({name:s,data:n}):(t.forEach(e=>{e.name==s&&e.data.push(...n)}),t.some(e=>e.name==s)||t.push({name:s,data:n}))}}),t.forEach(e=>{let t={},i=new axLightbox({src:e.data});t.name=e.name,t.instance=i,i.referName=t.name,axLightboxs.push(t)}),document.querySelectorAll("[axLightbox]").forEach(t=>{let i=t.getAttribute("axLightbox");i?t.onclick=e=>{axPreventDefault(e),axLightboxs.forEach(e=>{e.name==i&&axInstance(axLightboxs,i).init().show()})}:t.getAttribute("data-src")?t.onclick=e=>{axPreventDefault(e),new axLightbox("",t).init().show()}:t.onclick=i=>{axPreventDefault(i),new axLightbox({src:e(t)}).init().show()}})})(), /*! *项目所需的立即执行的代码片段,避免污染全局变量 */ (()=>{const e=document.querySelectorAll(".ax-alert");for(let t=0;t{e[t].style.display="none"},!1);const t=document.querySelectorAll(".ax-tag");for(let e=0;e{t[e].style.display="none"},!1);const i=document.querySelectorAll(".ax-pos-left");for(let e=0;e{for(let e=0;e{let e=t.querySelectorAll("input:checked:not(:disabled)").length;"0"==e?(d&&(d.checked=!1),h&&(h.checked=!0)):r!=e?m&&m.forEach(e=>{e.checked=!1}):(p&&(p.checked=!0),d&&(d.checked=!0))};o.addEventListener("click",()=>{n.checked?(n.checked=!1,s.classList.remove("ax-active")):(n.checked=!0,s.classList.add("ax-active")),e()},!1)}}}const r=document.querySelectorAll('input[name^="group-select-"]');for(let e=0;es&&(s=parseInt(getComputedStyle(i[e]).width));parseInt(getComputedStyle(t).width){s-parseInt(getComputedStyle(t).width)-this.scrollLeft<44?t.classList.remove("ax-done"):t.classList.add("ax-done")}}const c=document.querySelectorAll(".ax-scrollnav-v");for(let e=0;e{t.classList.contains("ax-hide")?(t.classList.remove("ax-hide"),Cookies.set("scrollnav","show",{expires:365e3,path:"/"})):(t.classList.add("ax-hide"),Cookies.set("scrollnav","hide",{expires:365e3,path:"/"}))},!1),"hide"===Cookies.get("scrollnav")?t.classList.add("ax-hide"):t.classList.remove("ax-hide")}const d=document.querySelectorAll(".ax-backtop");for(let e=0;ewindow.innerHeight&&u[e].classList.add("ax-hide");const p=document.querySelectorAll(".ax-ripple");for(let e=0;e{a.parentNode.removeChild(a)},800)}),!1)}window.axDodge=(e,t)=>{let i=(e=axIdToDom(e)).querySelector("input,textarea");return t?(e.classList.add("ax-active"),i.value=t):(e.classList.remove("ax-active"),i.value=t),e};const m=document.querySelectorAll(".ax-dodge");for(let e=0;e{t.classList.add("ax-focus")},n.onblur=()=>{t.classList.remove("ax-focus")}}window.addEventListener("scroll",()=>{if(document.documentElement.scrollTop>=400)for(let e=0;e