UNPKG

img-viewer-react

Version:

image viewer for react

44 lines (39 loc) 152 kB
(function(tt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(tt=typeof globalThis<"u"?globalThis:tt||self,x(tt["image-viewer-react"]={},tt.React,tt.ReactDOM))})(this,function(tt,x,Ee){"use strict";var _t={exports:{}},xt={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var we;function ho(){if(we)return xt;we=1;var r=x,t=Symbol.for("react.element"),e=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function n(a,c,l){var u,p={},g=null,y=null;l!==void 0&&(g=""+l),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(y=c.ref);for(u in c)o.call(c,u)&&!s.hasOwnProperty(u)&&(p[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)p[u]===void 0&&(p[u]=c[u]);return{$$typeof:t,type:a,key:g,ref:y,props:p,_owner:i.current}}return xt.Fragment=e,xt.jsx=n,xt.jsxs=n,xt}var At={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xe;function co(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){var r=x,t=Symbol.for("react.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),n=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator,H="@@iterator";function w(h){if(h===null||typeof h!="object")return null;var f=m&&h[m]||h[H];return typeof f=="function"?f:null}var j=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(h){{for(var f=arguments.length,v=new Array(f>1?f-1:0),T=1;T<f;T++)v[T-1]=arguments[T];ht("error",h,v)}}function ht(h,f,v){{var T=j.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(f+="%s",v=v.concat([P]));var E=v.map(function(b){return String(b)});E.unshift("Warning: "+f),Function.prototype.apply.call(console[h],console,E)}}var Mt=!1,Je=!1,fe=!1,de=!1,V=!1,Yt;Yt=Symbol.for("react.module.reference");function K(h){return!!(typeof h=="string"||typeof h=="function"||h===o||h===s||V||h===i||h===l||h===u||de||h===y||Mt||Je||fe||typeof h=="object"&&h!==null&&(h.$$typeof===g||h.$$typeof===p||h.$$typeof===n||h.$$typeof===a||h.$$typeof===c||h.$$typeof===Yt||h.getModuleId!==void 0))}function ve(h,f,v){var T=h.displayName;if(T)return T;var P=f.displayName||f.name||"";return P!==""?v+"("+P+")":v}function Bt(h){return h.displayName||"Context"}function q(h){if(h==null)return null;if(typeof h.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case o:return"Fragment";case e:return"Portal";case s:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var f=h;return Bt(f)+".Consumer";case n:var v=h;return Bt(v._context)+".Provider";case c:return ve(h,h.render,"ForwardRef");case p:var T=h.displayName||null;return T!==null?T:q(h.type)||"Memo";case g:{var P=h,E=P._payload,b=P._init;try{return q(b(E))}catch{return null}}}return null}var rt=Object.assign,ct=0,Kt,ut,Gt,Dt,Qt,_,pt;function ft(){}ft.__reactDisabledLog=!0;function ge(){{if(ct===0){Kt=console.log,ut=console.info,Gt=console.warn,Dt=console.error,Qt=console.group,_=console.groupCollapsed,pt=console.groupEnd;var h={configurable:!0,enumerable:!0,value:ft,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ct++}}function Y(){{if(ct--,ct===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:rt({},h,{value:Kt}),info:rt({},h,{value:ut}),warn:rt({},h,{value:Gt}),error:rt({},h,{value:Dt}),group:rt({},h,{value:Qt}),groupCollapsed:rt({},h,{value:_}),groupEnd:rt({},h,{value:pt})})}ct<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=j.ReactCurrentDispatcher,bt;function dt(h,f,v){{if(bt===void 0)try{throw Error()}catch(P){var T=P.stack.trim().match(/\n( *(at )?)/);bt=T&&T[1]||""}return` `+bt+h}}var vt=!1,Pt;{var ye=typeof WeakMap=="function"?WeakMap:Map;Pt=new ye}function Zt(h,f){if(!h||vt)return"";{var v=Pt.get(h);if(v!==void 0)return v}var T;vt=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=$.current,$.current=null,ge();try{if(f){var b=function(){throw Error()};if(Object.defineProperty(b.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(b,[])}catch(it){T=it}Reflect.construct(h,[],b)}else{try{b.call()}catch(it){T=it}h.call(b.prototype)}}else{try{throw Error()}catch(it){T=it}h()}}catch(it){if(it&&T&&typeof it.stack=="string"){for(var k=it.stack.split(` `),L=T.stack.split(` `),B=k.length-1,I=L.length-1;B>=1&&I>=0&&k[B]!==L[I];)I--;for(;B>=1&&I>=0;B--,I--)if(k[B]!==L[I]){if(B!==1||I!==1)do if(B--,I--,I<0||k[B]!==L[I]){var G=` `+k[B].replace(" at new "," at ");return h.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",h.displayName)),typeof h=="function"&&Pt.set(h,G),G}while(B>=1&&I>=0);break}}}finally{vt=!1,$.current=E,Y(),Error.prepareStackTrace=P}var wt=h?h.displayName||h.name:"",lo=wt?dt(wt):"";return typeof h=="function"&&Pt.set(h,lo),lo}function me(h,f,v){return Zt(h,!1)}function Te(h){var f=h.prototype;return!!(f&&f.isReactComponent)}function gt(h,f,v){if(h==null)return"";if(typeof h=="function")return Zt(h,Te(h));if(typeof h=="string")return dt(h);switch(h){case l:return dt("Suspense");case u:return dt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case c:return me(h.render);case p:return gt(h.type,f,v);case g:{var T=h,P=T._payload,E=T._init;try{return gt(E(P),f,v)}catch{}}}return""}var yt=Object.prototype.hasOwnProperty,d={},S=j.ReactDebugCurrentFrame;function C(h){if(h){var f=h._owner,v=gt(h.type,h._source,f?f.type:null);S.setExtraStackFrame(v)}else S.setExtraStackFrame(null)}function O(h,f,v,T,P){{var E=Function.call.bind(yt);for(var b in h)if(E(h,b)){var k=void 0;try{if(typeof h[b]!="function"){var L=Error((T||"React class")+": "+v+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}k=h[b](f,b,T,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(B){k=B}k&&!(k instanceof Error)&&(C(P),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",v,b,typeof k),C(null)),k instanceof Error&&!(k.message in d)&&(d[k.message]=!0,C(P),M("Failed %s type: %s",v,k.message),C(null))}}}var W=Array.isArray;function R(h){return W(h)}function qt(h){{var f=typeof Symbol=="function"&&Symbol.toStringTag,v=f&&h[Symbol.toStringTag]||h.constructor.name||"Object";return v}}function Jt(h){try{return _e(h),!1}catch{return!0}}function _e(h){return""+h}function $e(h){if(Jt(h))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qt(h)),_e(h)}var Xt=j.ReactCurrentOwner,ai={key:!0,ref:!0,__self:!0,__source:!0},to,eo,Se;Se={};function li(h){if(yt.call(h,"ref")){var f=Object.getOwnPropertyDescriptor(h,"ref").get;if(f&&f.isReactWarning)return!1}return h.ref!==void 0}function hi(h){if(yt.call(h,"key")){var f=Object.getOwnPropertyDescriptor(h,"key").get;if(f&&f.isReactWarning)return!1}return h.key!==void 0}function ci(h,f){if(typeof h.ref=="string"&&Xt.current&&f&&Xt.current.stateNode!==f){var v=q(Xt.current.type);Se[v]||(M('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',q(Xt.current.type),h.ref),Se[v]=!0)}}function ui(h,f){{var v=function(){to||(to=!0,M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(h,"key",{get:v,configurable:!0})}}function pi(h,f){{var v=function(){eo||(eo=!0,M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(h,"ref",{get:v,configurable:!0})}}var fi=function(h,f,v,T,P,E,b){var k={$$typeof:t,type:h,key:f,ref:v,props:b,_owner:E};return k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(k,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(k,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k};function di(h,f,v,T,P){{var E,b={},k=null,L=null;v!==void 0&&($e(v),k=""+v),hi(f)&&($e(f.key),k=""+f.key),li(f)&&(L=f.ref,ci(f,P));for(E in f)yt.call(f,E)&&!ai.hasOwnProperty(E)&&(b[E]=f[E]);if(h&&h.defaultProps){var B=h.defaultProps;for(E in B)b[E]===void 0&&(b[E]=B[E])}if(k||L){var I=typeof h=="function"?h.displayName||h.name||"Unknown":h;k&&ui(b,I),L&&pi(b,I)}return fi(h,k,L,P,T,Xt.current,b)}}var ke=j.ReactCurrentOwner,oo=j.ReactDebugCurrentFrame;function Et(h){if(h){var f=h._owner,v=gt(h.type,h._source,f?f.type:null);oo.setExtraStackFrame(v)}else oo.setExtraStackFrame(null)}var be;be=!1;function Pe(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function ro(){{if(ke.current){var h=q(ke.current.type);if(h)return` Check the render method of \``+h+"`."}return""}}function vi(h){{if(h!==void 0){var f=h.fileName.replace(/^.*[\\\/]/,""),v=h.lineNumber;return` Check your code at `+f+":"+v+"."}return""}}var io={};function gi(h){{var f=ro();if(!f){var v=typeof h=="string"?h:h.displayName||h.name;v&&(f=` Check the top-level render call using <`+v+">.")}return f}}function so(h,f){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var v=gi(f);if(io[v])return;io[v]=!0;var T="";h&&h._owner&&h._owner!==ke.current&&(T=" It was passed a child from "+q(h._owner.type)+"."),Et(h),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,T),Et(null)}}function no(h,f){{if(typeof h!="object")return;if(R(h))for(var v=0;v<h.length;v++){var T=h[v];Pe(T)&&so(T,f)}else if(Pe(h))h._store&&(h._store.validated=!0);else if(h){var P=w(h);if(typeof P=="function"&&P!==h.entries)for(var E=P.call(h),b;!(b=E.next()).done;)Pe(b.value)&&so(b.value,f)}}}function yi(h){{var f=h.type;if(f==null||typeof f=="string")return;var v;if(typeof f=="function")v=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===c||f.$$typeof===p))v=f.propTypes;else return;if(v){var T=q(f);O(v,h.props,"prop",T,h)}else if(f.PropTypes!==void 0&&!be){be=!0;var P=q(f);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mi(h){{for(var f=Object.keys(h.props),v=0;v<f.length;v++){var T=f[v];if(T!=="children"&&T!=="key"){Et(h),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),Et(null);break}}h.ref!==null&&(Et(h),M("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}function ao(h,f,v,T,P,E){{var b=K(h);if(!b){var k="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var L=vi(P);L?k+=L:k+=ro();var B;h===null?B="null":R(h)?B="array":h!==void 0&&h.$$typeof===t?(B="<"+(q(h.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):B=typeof h,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,k)}var I=di(h,f,v,P,E);if(I==null)return I;if(b){var G=f.children;if(G!==void 0)if(T)if(R(G)){for(var wt=0;wt<G.length;wt++)no(G[wt],h);Object.freeze&&Object.freeze(G)}else M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else no(G,h)}return h===o?mi(I):yi(I),I}}function Ti(h,f,v){return ao(h,f,v,!0)}function Si(h,f,v){return ao(h,f,v,!1)}var ki=Si,bi=Ti;At.Fragment=o,At.jsx=ki,At.jsxs=bi}()),At}process.env.NODE_ENV==="production"?_t.exports=ho():_t.exports=co();var D=_t.exports;/*! * better-scroll / better-scroll * (c) 2016-2023 ustbhuangyi * Released under the MIT License. *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var $t=function(r,t){return $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])},$t(r,t)};function Ct(r,t){$t(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Q=function(){return Q=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++){e=arguments[o];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Q.apply(this,arguments)};function te(r,t,e,o){function i(s){return s instanceof e?s:new e(function(n){n(s)})}return new(e||(e=Promise))(function(s,n){function a(u){try{l(o.next(u))}catch(p){n(p)}}function c(u){try{l(o.throw(u))}catch(p){n(p)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((o=o.apply(r,t||[])).next())})}function ee(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,i,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(l){return function(u){return c([l,u])}}function c(l){if(o)throw new TypeError("Generator is already executing.");for(;e;)try{if(o=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(r,e)}catch(u){l=[6,u],i=0}finally{o=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ot(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var o=Array(r),i=0,t=0;t<e;t++)for(var s=arguments[t],n=0,a=s.length;n<a;n++,i++)o[i]=s[n];return o}var uo=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function Z(r){console.error("[BScroll warn]: "+r)}function Ae(r,t){if(!r)throw new Error("[BScroll] "+t)}var J=typeof window<"u",mt=J&&navigator.userAgent.toLowerCase(),po=!!(mt&&/wechatdevtools/.test(mt)),fo=mt&&mt.indexOf("android")>0,vo=function(){if(typeof mt=="string"){var r=/os (\d\d?_\d(_\d)?)/,t=r.exec(mt);if(!t)return!1;var e=t[1].split("_").map(function(o){return parseInt(o,10)});return e[0]===13&&e[1]>=4}return!1}(),Me=!1;if(J){var go="test-passive";try{var Ye={};Object.defineProperty(Ye,"passive",{get:function(){Me=!0}}),window.addEventListener(go,function(){},Ye)}catch{}}function U(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var z=function(r,t){for(var e in t)r[e]=t[e];return r};function oe(r){return r==null}function yo(r,t){return Math.sqrt(r*r+t*t)}function X(r,t,e){return r<t?t:r>e?e:r}function Tt(r,t){if(r.findIndex)return r.findIndex(t);var e=-1;return r.some(function(o,i,s){var n=t(o,i,s);if(n)return e=i,n}),e}var re=J&&document.createElement("div").style,St=function(){if(!J)return!1;for(var r=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=r;t<e.length;t++){var o=e[t];if(re[o.value]!==void 0)return o.key}return!1}();function et(r){return St===!1?r:St==="standard"?r==="transitionEnd"?"transitionend":r:St+r.charAt(0).toUpperCase()+r.substr(1)}function Be(r){return typeof r=="string"?document.querySelector(r):r}function mo(r,t,e,o){var i=Me?{passive:!1,capture:!!o}:!!o;r.addEventListener(t,e,i)}function To(r,t,e,o){r.removeEventListener(t,e,{capture:!!o})}function at(r){r.cancelable&&r.preventDefault()}function De(r){for(var t=0,e=0;r;)t-=r.offsetLeft,e-=r.offsetTop,r=r.offsetParent;return{left:t,top:e}}function So(r){var t=r.getBoundingClientRect();return{left:-(t.left+window.pageXOffset),top:-(t.top+window.pageYOffset)}}var ko=St&&St!=="standard"?"-"+St.toLowerCase()+"-":"",bo=et("transform"),Xe=et("transition"),Po=J&&et("perspective")in re,Ce=J&&("ontouchstart"in window||po),Eo=J&&Xe in re,A={transform:bo,transition:Xe,transitionTimingFunction:et("transitionTimingFunction"),transitionDuration:et("transitionDuration"),transitionDelay:et("transitionDelay"),transformOrigin:et("transformOrigin"),transitionEnd:et("transitionEnd"),transitionProperty:et("transitionProperty")},ie={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function lt(r){if(r instanceof window.SVGElement){var t=r.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:r.offsetTop,left:r.offsetLeft,width:r.offsetWidth,height:r.offsetHeight}}function kt(r,t){for(var e in t)if(t[e].test(r[e]))return!0;return!1}var wo=kt;function xo(r,t){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.pageX=r.pageX,e.pageY=r.pageY,r.target.dispatchEvent(e)}function Oe(r,t){t===void 0&&(t="click");var e;r.type==="mouseup"?e=r:(r.type==="touchend"||r.type==="touchcancel")&&(e=r.changedTouches[0]);var o={};e&&(o.screenX=e.screenX||0,o.screenY=e.screenY||0,o.clientX=e.clientX||0,o.clientY=e.clientY||0);var i,s=!0,n=!0,a=r.ctrlKey,c=r.shiftKey,l=r.altKey,u=r.metaKey,p={ctrlKey:a,shiftKey:c,altKey:l,metaKey:u};if(typeof MouseEvent<"u")try{i=new MouseEvent(t,z(Q({bubbles:s,cancelable:n},p),o))}catch{g()}else g();function g(){i=document.createEvent("Event"),i.initEvent(t,s,n),z(i,o)}i.forwardedTouchEvent=!0,i._constructed=!0,r.target.dispatchEvent(i)}function Ao(r){Oe(r,"dblclick")}function Mo(r,t){var e=t.firstChild;e?Yo(r,e):t.appendChild(r)}function Yo(r,t){var e=t.parentNode;e.insertBefore(r,t)}function Bo(r,t){r.removeChild(t)}function Rt(r,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(r.className)}function Do(r){return Array.prototype.slice.call(r,0)}function Xo(r){return{width:r.clientWidth,height:r.clientHeight}}var F={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(r){return 1+--r*r*r*r*r}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(r){return r*(2-r)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(r){return 1- --r*r*r*r}}},Co=1e3/60,st=J&&window;function Re(){}var se=function(){return J?st.requestAnimationFrame||st.webkitRequestAnimationFrame||st.mozRequestAnimationFrame||st.oRequestAnimationFrame||function(r){return window.setTimeout(r,r.interval||Co)}:Re}(),nt=function(){return J?st.cancelAnimationFrame||st.webkitCancelAnimationFrame||st.mozCancelAnimationFrame||st.oCancelAnimationFrame||function(r){window.clearTimeout(r)}:Re}(),Ie=function(r){},ne={enumerable:!0,configurable:!0,get:Ie,set:Ie},Oo=function(r,t){for(var e=t.split("."),o=0;o<e.length-1;o++)if(r=r[e[o]],typeof r!="object"||!r)return;var i=e.pop();return typeof r[i]=="function"?function(){return r[i].apply(r,arguments)}:r[i]},Ro=function(r,t,e){for(var o=t.split("."),i,s=0;s<o.length-1;s++)i=o[s],r[i]||(r[i]={}),r=r[i];r[o.pop()]=e};function Io(r,t,e){ne.get=function(){return Oo(this,t)},ne.set=function(i){Ro(this,t,i)},Object.defineProperty(r,e,ne)}var ot=function(){function r(t){this.events={},this.eventTypes={},this.registerType(t)}return r.prototype.on=function(t,e,o){return o===void 0&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,o]),this},r.prototype.once=function(t,e,o){var i=this;o===void 0&&(o=this),this.hasType(t);var s=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];i.off(t,s);var c=e.apply(o,n);if(c===!0)return c};return s.fn=e,this.on(t,s),this},r.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var i=o.length;i--;)(o[i][0]===e||o[i][0]&&o[i][0].fn===e)&&o.splice(i,1);return this}},r.prototype.trigger=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];this.hasType(t);var i=this.events[t];if(i)for(var s=i.length,n=Ot(i),a,c=0;c<s;c++){var l=n[c],u=l[0],p=l[1];if(u&&(a=u.apply(p,e),a===!0))return a}},r.prototype.registerType=function(t){var e=this;t.forEach(function(o){e.eventTypes[o]=o})},r.prototype.destroy=function(){this.events={},this.eventTypes={}},r.prototype.hasType=function(t){var e=this.eventTypes,o=e[t]===t;o||Z('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(e).map(function(i){return JSON.stringify(i)}))+"]")},r}(),N=function(){function r(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return r.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},r.prototype.addDOMEvents=function(){this.handleDOMEvents(mo)},r.prototype.removeDOMEvents=function(){this.handleDOMEvents(To)},r.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach(function(i){t(o,i.name,e,!!i.capture)})},r.prototype.handleEvent=function(t){var e=t.type;this.events.some(function(o){return o.name===e?(o.handler(t),!0):!1})},r}(),Ho=function(){function r(){}return r}(),Fo=function(r){Ct(t,r);function t(){var e=r.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=Ce,e.disableTouch=!Ce,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return t.prototype.merge=function(e){if(!e)return this;for(var o in e){if(o==="bounce"){this.bounce=this.resolveBounce(e[o]);continue}this[o]=e[o]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&Po?" translateZ(1px)":"",this.useTransition=this.useTransition&&Eo,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(e){var o={top:!0,right:!0,bottom:!0,left:!0},i={top:!1,right:!1,bottom:!1,left:!1},s;return typeof e=="object"?s=z(o,e):s=e?o:i,s},t}(Ho),zo=function(){function r(t,e){this.wrapper=t,this.options=e,this.hooks=new ot(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return r.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,i=t.disableTouch,s=t.click,n=this.wrapper,a=e?n:window,c=[],l=[],u=!i,p=!o;s&&c.push({name:"click",handler:this.click.bind(this),capture:!0}),u&&(c.push({name:"touchstart",handler:this.start.bind(this)}),l.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),p&&(c.push({name:"mousedown",handler:this.start.bind(this)}),l.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new N(n,c),this.targetEventRegister=new N(a,l)},r.prototype.beforeHandler=function(t,e){var o=this.options,i=o.preventDefault,s=o.stopPropagation,n=o.preventDefaultException,a={start:function(){return i&&!kt(t.target,n)},end:function(){return i&&!kt(t.target,n)},move:function(){return i}};a[e]()&&t.preventDefault(),s&&t.stopPropagation()},r.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},r.prototype.start=function(t){var e=ie[t.type];if(!(this.initiated&&this.initiated!==e)){if(this.setInitiated(e),wo(t.target,this.options.tagException)){this.setInitiated();return}if(!(e===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},r.prototype.move=function(t){if(ie[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,i=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:i,e:t})){var s=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,n=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,a=this.pointX-s,c=this.pointY-n,l=this.options.autoEndDistance;(a>document.documentElement.clientWidth-l||c>document.documentElement.clientHeight-l||a<l||c<l)&&this.end(t)}}},r.prototype.end=function(t){ie[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},r.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},r.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},r.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},r.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},r}(),ae={x:["translateX","px"],y:["translateY","px"]},Lo=function(){function r(t){this.setContent(t),this.hooks=new ot(["beforeTranslate","translate"])}return r.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[A.transform].split(")")[0].split(", "),o=+(e[12]||e[4])||0,i=+(e[13]||e[5])||0;return{x:o,y:i}},r.prototype.translate=function(t){var e=[];Object.keys(t).forEach(function(o){if(ae[o]){var i=ae[o][0];if(i){var s=ae[o][1],n=t[o];e.push(i+"("+n+s+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[A.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},r.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),He=function(){function r(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new ot(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return r.prototype.translate=function(t){this.translater.translate(t)},r.prototype.setPending=function(t){this.pending=t},r.prototype.setForceStopped=function(t){this.forceStopped=t},r.prototype.setCallStop=function(t){this.callStopWhenPending=t},r.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},r.prototype.clearTimer=function(){this.timer&&(nt(this.timer),this.timer=0)},r.prototype.destroy=function(){this.hooks.destroy(),nt(this.timer)},r}(),No=function(r,t,e,o){var i=function(l,u){var p=l-u,g=p>0?-1:p<0?1:0;return g},s=i(t.x,r.x),n=i(t.y,r.y),a=e.x-o.x,c=e.y-o.y;return s*a<=0&&n*c<=0},Wo=function(r){Ct(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.startProbe=function(e,o){var i=this,s=e,n=function(){var a=i.translater.getComputedPosition();No(e,o,a,s)&&i.hooks.trigger(i.hooks.eventTypes.move,a),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,a)),s=a,i.pending&&(i.timer=se(n))};this.callStopWhenPending&&this.setCallStop(!1),nt(this.timer),n()},t.prototype.transitionTime=function(e){e===void 0&&(e=0),this.style[A.transitionDuration]=e+"ms",this.hooks.trigger(this.hooks.eventTypes.time,e)},t.prototype.transitionTimingFunction=function(e){this.style[A.transitionTimingFunction]=e,this.hooks.trigger(this.hooks.eventTypes.timeFunction,e)},t.prototype.transitionProperty=function(){this.style[A.transitionProperty]=A.transform},t.prototype.move=function(e,o,i,s){this.setPending(i>0),this.transitionTimingFunction(s),this.transitionProperty(),this.transitionTime(i),this.translate(o);var n=this.options.probeType===3;i&&n&&this.startProbe(e,o),i||(this._reflow=this.content.offsetHeight,n&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o))},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),nt(this.timer);var o=this.translater.getComputedPosition(),i=o.x,s=o.y;this.transitionTime(),this.translate({x:i,y:s}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:i,y:s})}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(He),Uo=function(r){Ct(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.move=function(e,o,i,s){if(!i){this.translate(o),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o);return}this.animate(e,o,i,s)},t.prototype.animate=function(e,o,i,s){var n=this,a=U(),c=a+i,l=this.options.probeType===3,u=function(){var p=U();if(p>=c){n.translate(o),l&&n.hooks.trigger(n.hooks.eventTypes.move,o),n.hooks.trigger(n.hooks.eventTypes.end,o);return}p=(p-a)/i;var g=s(p),y={};Object.keys(o).forEach(function(m){var H=e[m],w=o[m];y[m]=(w-H)*g+H}),n.translate(y),l&&n.hooks.trigger(n.hooks.eventTypes.move,y),n.pending&&(n.timer=se(u)),n.pending||(n.callStopWhenPending?n.callStopWhenPending=!1:n.hooks.trigger(n.hooks.eventTypes.end,o))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),nt(this.timer),u()},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),nt(this.timer);var o=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,o)}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(He);function jo(r,t,e){var o=e.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return e.probeType}}),o?new Wo(r,t,i):new Uo(r,t,i)}var Fe=function(){function r(t,e,o){this.wrapper=t,this.options=o,this.hooks=new ot(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return r.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},r.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},r.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},r.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},r.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?o=this.currentPos+t*e:o=o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},r.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var i=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},r.prototype.momentum=function(t,e,o,i,s,n,a){a===void 0&&(a=this.options);var c=t-e,l=Math.abs(c)/o,u=a.deceleration,p=a.swipeBounceTime,g=a.swipeTime,y=Math.min(g,l*2/u),m={destination:t+l*l/u*(c<0?-1:1),duration:y,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,m,c),m.destination<i?(m.destination=n?Math.max(i-n/4,i-n/m.rate*l):i,m.duration=p):m.destination>s&&(m.destination=n?Math.min(s+n/4,s+n/m.rate*l):s,m.duration=p),m.destination=Math.round(m.destination),m},r.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},r.prototype.refresh=function(t){var e=this.options.rect,o=e.size,i=e.position,s=window.getComputedStyle(this.wrapper,null).position==="static",n=lt(this.wrapper);this.wrapperSize=this.wrapper[o==="width"?"clientWidth":"clientHeight"],this.setContent(t);var a=lt(this.content);this.contentSize=a[o],this.relativeOffset=a[i],s&&(this.relativeOffset-=n[i]),this.computeBoundary(),this.setDirection(0)},r.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},r.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},r.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},r.prototype.updatePosition=function(t){this.currentPos=t},r.prototype.getCurrentPos=function(){return this.currentPos},r.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),e=t===this.getCurrentPos();return{position:t,inBoundary:e}},r.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},r.prototype.updateStartPos=function(){this.startPos=this.currentPos},r.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},r.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},r.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),It,Ht,Ft,zt,ze=(It={},It.yes=function(r){return!0},It.no=function(r){return at(r),!1},It),Vo=(Ht={},Ht.horizontal=(Ft={},Ft.yes="horizontal",Ft.no="vertical",Ft),Ht.vertical=(zt={},zt.yes="vertical",zt.no="horizontal",zt),Ht),Ko=function(){function r(t,e,o){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=o,this.reset()}return r.prototype.reset=function(){this.directionLocked=""},r.prototype.checkMovingDirection=function(t,e,o){return this.computeDirectionLock(t,e),this.handleEventPassthrough(o)},r.prototype.adjustDelta=function(t,e){return this.directionLocked==="horizontal"?e=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:e}},r.prototype.computeDirectionLock=function(t,e){this.directionLocked===""&&!this.freeScroll&&(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},r.prototype.handleEventPassthrough=function(t){var e=Vo[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return ze.yes(t);if(this.eventPassthrough===e.no)return ze.no(t)}return!1},r}(),Go=function(r,t,e){return e===2?[t,-r]:e===3?[-r,-t]:e===4?[-t,r]:[r,t]},Qo=function(){function r(t,e,o,i,s){this.hooks=new ot(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=i,this.options=s,this.directionLockAction=new Ko(s.directionLockThreshold,s.freeScroll,s.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return r.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(e){return t.enabled?t.handleStart(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(e){var o=e.deltaX,i=e.deltaY,s=e.e;if(!t.enabled)return!0;var n=Go(o,i,t.options.quadrant),a=n[0],c=n[1],l={deltaX:a,deltaY:c};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,l),t.handleMove(l.deltaX,l.deltaY,s)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(e){return t.enabled?t.handleEnd(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(e){t.enabled&&!e._constructed&&t.handleClick(e)})},r.prototype.handleStart=function(t){var e=U();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},r.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var i=this.scrollBehaviorX.getAbsDist(t),s=this.scrollBehaviorY.getAbsDist(e),n=U();if(this.checkMomentum(i,s,n))return!0;if(this.directionLockAction.checkMovingDirection(i,s,o))return this.actionsHandler.setInitiated(),!0;var a=this.directionLockAction.adjustDelta(t,e),c=this.scrollBehaviorX.getCurrentPos(),l=this.scrollBehaviorX.move(a.deltaX),u=this.scrollBehaviorY.getCurrentPos(),p=this.scrollBehaviorY.move(a.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var g=l!==c||p!==u;!this.contentMoved&&!g&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&g&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&g&&(this.animater.translate({x:l,y:p}),this.dispatchScroll(n))}}},r.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},r.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},r.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=U();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,o)}},r.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,o=t.y,i=this.scrollBehaviorX,s=i.minScrollPos,n=i.maxScrollPos,a=this.scrollBehaviorY,c=a.minScrollPos,l=a.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),e=X(e,n,s),o=X(o,l,c),{x:e,y:o}},r.prototype.handleClick=function(t){kt(t.target,this.options.preventDefaultException)||(at(t),t.stopPropagation())},r.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},r.prototype.refresh=function(){this.endTime=0},r.prototype.destroy=function(){this.hooks.destroy()},r}();function Zo(r){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(e,o){return e[o]=r[o],e},{});return t}function Le(r,t,e,o){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(s,n){return s[n]=r[n],s},{});return i.scrollable=!!r[t],i.bounces=e,i.rect=o,i}function le(r,t,e){e.forEach(function(o){var i,s;typeof o=="string"?i=s=o:(i=o.source,s=o.target),r.on(i,function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return t.trigger.apply(t,Ot([s],n))})})}function qo(r,t){for(var e=Object.keys(r),o=0,i=e;o<i.length;o++){var s=i[o];if(r[s]!==t[s])return!1}return!0}var Ne=1,Jo=function(){function r(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new ot(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var i=this.options.bounce,s=i.left,n=i.right,a=i.top,c=i.bottom;this.scrollBehaviorX=new Fe(t,e,Le(o,"scrollX",[s,n],{size:"width",position:"left"})),this.scrollBehaviorY=new Fe(t,e,Le(o,"scrollY",[a,c],{size:"height",position:"top"})),this.translater=new Lo(this.content),this.animater=jo(this.content,this.translater,this.options),this.actionsHandler=new zo(this.options.bindToTarget?this.content:t,Zo(this.options)),this.actions=new Qo(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var l=this.resize.bind(this);this.resizeRegister=new N(window,[{name:"orientationchange",handler:l},{name:"resize",handler:l}]),this.registerTransitionEnd(),this.init()}return r.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},r.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new N(this.content,[{name:A.transitionEnd,handler:this.transitionEnd.bind(this)}])},r.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,function(o){t.options.translateZ&&o.push(t.options.translateZ)}),e.on(e.eventTypes.translate,function(o){var i=t.getCurrentPos();if(t.updatePositions(o),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(o.x!==i.x||o.y!==i.y)&&t.togglePointerEvents(!1)})},r.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))}),le(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},r.prototype.bindActions=function(){var t=this,e=this.actions;le(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,function(o,i){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,i),t.hooks.trigger(t.hooks.eventTypes.end,i)||!e.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(o)))return!0;if(t.resetPosition(t.options.bounceTime,F.bounce))return t.animater.setForceStopped(!1),!0}),e.hooks.on(e.hooks.eventTypes.scrollEnd,function(o,i){var s=Math.abs(o.x-t.scrollBehaviorX.startPos),n=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(i,s,n)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(o,i)){t.animater.setForceStopped(!1);return}e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},r.prototype.checkFlick=function(t,e,o){var i=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>i||e>i))return!0},r.prototype.momentum=function(t,e){var o={time:0,easing:F.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),s=this.scrollBehaviorY.end(e);if(o.newX=oe(i.destination)?o.newX:i.destination,o.newY=oe(s.destination)?o.newY:s.destination,o.time=Math.max(i.duration,s.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=F.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},r.prototype.checkClick=function(t){var e={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e.preventClick){var o=this.options.dblclick,i=!1;if(o&&this.lastClickTime){var s=o.delay,n=s===void 0?300:s;U()-this.lastClickTime<n&&(i=!0,Ao(t))}return this.options.tap&&xo(t,this.options.tap),this.options.click&&!kt(t.target,this.options.preventDefaultException)&&Oe(t),this.lastClickTime=i?null:U(),!0}return!1},r.prototype.resize=function(){var t=this;this.actions.enabled&&(fo&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(