@egjs/flicking 4.6.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declaration/camera/mode/CameraMode.d.ts +1 -0
- package/declaration/camera/mode/CircularCameraMode.d.ts +1 -0
- package/dist/flicking.esm.js +48 -21
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +48 -21
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +48 -21
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/camera/Camera.ts +1 -19
- package/src/camera/mode/CameraMode.ts +22 -0
- package/src/camera/mode/CircularCameraMode.ts +27 -0
- package/src/control/StrictControl.ts +7 -3
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.6.
|
|
7
|
+
version: 4.6.3
|
|
8
8
|
*/
|
|
9
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};function i(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var h,f=function(e){return void 0===e},d=function(){function e(e,t){var n,i;if(this._canceled=!1,t)try{for(var r=u(Object.keys(t)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=t[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=e}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),p=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=e instanceof d?e.eventType:e,r=c(this._eventHandler[i]||[]);return r.length<=0||(e instanceof d?(e.currentTarget=this,r.forEach((function(t){t(e)}))):r.forEach((function(e){e.apply(void 0,c(t))}))),this},t.once=function(e,t){var n=this;if("object"==typeof e&&f(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(void 0,c(i)),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&f(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];f(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(f(e))return this._eventHandler={},this;if(f(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var l=u(a),c=l.next();!c.done;c=l.next()){if(c.value===t){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.2",e}(),g=d,v={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13,NOT_ALLOWED_IN_VIRTUAL:14},m=function(e,t){return e+"("+typeof e+") is not a "+t.map((function(e){return'"'+e+'"'})).join(" or ")+"."},_=function(e){return'Element with selector "'+e+'" not found.'},b=function(e,t){return t+" should be provided. Given: "+e},y='This module is not attached to the Flicking instance. "init()" should be called first.',P=function(e,t){return'Option "'+e+'" is not in correct format, given: '+t},E=function(e,t,n){return'Index "'+e+'" is out of range: should be between '+t+" and "+n+"."},x=function(e){return'Position "'+e+'" is not reachable.'},T="Browser does not support CSS transform.",O="Event stop() is called by user.",w="Animation is interrupted by user input.",R="Animation is already playing.",I="This behavior is not allowed in the frameworks like React, Vue, or Angular.",A="Flicking is not initialized yet, call init() first.",C={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},k={PREV:"prev",CENTER:"center",NEXT:"next"},S={PREV:"PREV",NEXT:"NEXT",NONE:null},N={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},D={VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},j={LINEAR:"linear",BOUND:"bound"},z={__proto__:null,EVENTS:C,ALIGN:k,DIRECTION:S,MOVE_TYPE:N,CLASS:D,CIRCULAR_FALLBACK:j,ERROR_CODE:v},L=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},M=function(e,t){var n=null;if(Q(e)){var i=(t||document).querySelector(e);if(!i)throw new ce(_(e),v.ELEMENT_NOT_FOUND);n=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(n=e);if(!n)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);return n},H=function(e,t){if(null==e)throw new ce(b(e,t),v.VAL_MUST_NOT_NULL)},F=function(e,t,n){return Math.max(Math.min(e,n),t)},V=function(e){if(!e)throw new ce(y,v.NOT_ATTACHED_TO_FLICKING);return e},G=function(e){return[].slice.call(e)},B=function(e,t){var n;if(Q(e))switch(e){case k.PREV:n=0;break;case k.CENTER:n=.5*t;break;case k.NEXT:n=t;break;default:if(null==(n=Y(e,t)))throw new ce(P("align",e),v.WRONG_OPTION)}else n=e;return n},X=function(e,t){var n;if(Array.isArray(e))n=e.map((function(e){return Y(e,t)}));else{var i=Y(e,t);n=[i,i]}return n.map((function(t){if(null==t)throw new ce(P("bounce",e),v.WRONG_OPTION);return t}))},Y=function(e,t){var n=W(e);return null==n?null:n.percentage*t+n.absolute},W=function(e){var t=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var n={percentage:0,absolute:0},i=0,r=t.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],u=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var l="+"===o?1:-1;"%"===s?n.percentage+=l*(u/100):n.absolute+=l*u,++i,r=t.exec(e)}return 0===i?null:n},U=function(e){return"object"==typeof e?e.panel:e},q=function(e,t){return e===t?S.NONE:e<t?S.NEXT:S.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var t=[];return e.forEach((function(e){if(Q(e)){var n=document.createElement("div");for(n.innerHTML=e,t.push.apply(t,s(G(n.children)));n.firstChild;)n.removeChild(n.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);t.push(e)}})),t},K=function(e,t){return F(e<0?e+t:e,0,t)},J=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===t)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return!1},Q=function(e){return"string"==typeof e},$=function(e,t,n){var i=n-t;if(e<t)e=n-(t-e)%i;else if(e>n){e=t+(e-n)%i}return e},ee=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(t(s))return s}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return null},te=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},ne=function(e,t,n){return(e-t)/(n-t)},ie=function(e){return window.getComputedStyle(e)||e.currentStyle},re=function(e,t){var n=t.width,i=t.height;null!=n&&(Q(n)?e.style.width=n:e.style.width=n+"px"),null!=i&&(Q(i)?e.style.height=i:e.style.height=i+"px")},oe=function(e,t,n){return e>=t&&e<=n},ae=function(e,t){return e>=t?e%t:e<0?K((e+1)%t-1,t):e},se=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=n;return t},ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},le={__proto__:null,merge:L,getElement:M,checkExistence:H,clamp:F,getFlickingAttached:V,toArray:G,parseAlign:B,parseBounce:X,parseArithmeticSize:Y,parseArithmeticExpression:W,parseCSSSizeValue:function(e){return Q(e)?e:e+"px"},parsePanelAlign:U,getDirection:q,parseElement:Z,getMinusCompensatedIndex:K,includes:J,isString:Q,circulatePosition:$,find:ee,findRight:function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(t(i))return i}return null},findIndex:te,getProgress:ne,getStyle:ie,setSize:re,isBetween:oe,circulateIndex:ae,range:se,setPrototypeOf:ue},ce=function(e){function n(t,i){var r=e.call(this,t)||this;return ue(r,n.prototype),r.name="FlickingError",r.code=i,r}return t(n,e),n}(Error),he=function(){function e(e){this._el=e,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),t.setSize=function(e){var t=e.width,n=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=t)if(Q(t))i.style.width=t;else{var a=o?t+r.left+r.right:t;i.style.width=a+"px"}if(null!=n)if(Q(n))i.style.height=n;else{var s=o?n+r.top+r.bottom:n;i.style.height=s+"px"}this.resize()},t.resize=function(){var e=this._el,t=ie(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:t.paddingLeft?parseFloat(t.paddingLeft):0,right:t.paddingRight?parseFloat(t.paddingRight):0,top:t.paddingTop?parseFloat(t.paddingTop):0,bottom:t.paddingBottom?parseFloat(t.paddingBottom):0},this._isBorderBoxSizing="border-box"===t.boxSizing},e}(),fe=function(){function e(e){var t,n=this;this._onResize=function(){var e=n._flicking,t=e.resizeDebounce,i=e.maxResizeDebounce;t<=0?e.resize():(n._maxResizeDebounceTimer<=0&&i>0&&i>=t&&(n._maxResizeDebounceTimer=window.setTimeout(n._doScheduledResize,i)),n._resizeTimer>0&&(clearTimeout(n._resizeTimer),n._resizeTimer=0),n._resizeTimer=window.setTimeout(n._doScheduledResize,t))},this._doScheduledResize=function(){clearTimeout(n._resizeTimer),clearTimeout(n._maxResizeDebounceTimer),n._maxResizeDebounceTimer=-1,n._resizeTimer=-1,n._flicking.resize()},this._skipFirstResize=(t=!0,function(){t?t=!1:n._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var t=e.prototype;return Object.defineProperty(t,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),t.enable=function(){var e=this._flicking,t=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var n=0!==t.width||0!==t.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);n.observe(e.viewport.element),this._resizeObserver=n}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},t.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),de=function(){function e(e){this._element=e,this._rendered=!0}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),t.show=function(e){var t=this.element,n=e.camera.element;t.parentElement!==n&&(n.appendChild(t),this._rendered=!0)},t.hide=function(e){var t=this.element,n=e.camera.element;t.parentElement===n&&(n.removeChild(t),this._rendered=!1)},e}(),pe=function(){function e(e){this._flicking=e}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(t,"_virtualElement",{get:function(){var e=this._flicking,t=this._panel.elementIndex;return e.virtual.elements[t]},enumerable:!1,configurable:!0}),t.init=function(e){this._panel=e},t.show=function(){},t.hide=function(){},e}(),ge=function(){function e(e,t){var n,i,r,o;this._flicking=e,this._renderPanel=null!==(n=null==t?void 0:t.renderPanel)&&void 0!==n?n:function(){return""},this._initialPanelCount=null!==(i=null==t?void 0:t.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==t?void 0:t.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==t?void 0:t.panelClass)&&void 0!==o?o:D.DEFAULT_VIRTUAL,this._elements=[]}var t=e.prototype;return Object.defineProperty(t,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var t=e.camera.children;this._elements=t.map((function(e){return{nativeElement:e,visible:!0}}))}},t.show=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!0,n.style.display&&(n.style.display="")},t.hide=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!1,n.style.display="none"},t.append=function(e){void 0===e&&(e=1);var t=this._flicking;return this.insert(t.panels.length,e)},t.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},t.insert=function(e,t){return void 0===t&&(t=1),t<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:se(t),hasDOMInElements:!1})},t.remove=function(e,t){return t<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!1})},t._initVirtualElements=function(){var e=this,t=this._flicking,n=t.camera.element,i=t.panelsPerView,r=document.createDocumentFragment();se(i+1).map((function(t){var n=document.createElement("div");return n.className=e._panelClass,n.dataset.elementIndex=t.toString(),n})).forEach((function(e){r.appendChild(e)})),n.appendChild(r)},e}();function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ve.apply(this,arguments)}function me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}h="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var be,ye=h,Pe=["","webkit","Moz","MS","ms","o"],Ee="undefined"==typeof document?{style:{}}:document.createElement("div"),xe=Math.round,Te=Math.abs,Oe=Date.now;function we(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<Pe.length;){if((i=(n=Pe[o])?n+r:t)in e)return i;o++}}be="undefined"==typeof window?{}:window;var Re=we(Ee.style,"touchAction"),Ie=void 0!==Re;var Ae="compute",Ce="auto",ke="manipulation",Se="none",Ne="pan-x",De="pan-y",je=function(){if(!Ie)return!1;var e={},t=be.CSS&&be.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||be.CSS.supports("touch-action",n)})),e}(),ze="ontouchstart"in be,Le=void 0!==we(be,"PointerEvent"),Me=ze&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),He="touch",Fe="mouse",Ve=16,Ge=24,Be=["x","y"],Xe=["clientX","clientY"];function Ye(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function We(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function Ue(e,t){return e.indexOf(t)>-1}var qe=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Ae&&(e=this.compute()),Ie&&this.manager.element.style&&je[e]&&(this.manager.element.style[Re]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Ye(this.manager.recognizers,(function(t){We(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Ue(e,Se))return Se;var t=Ue(e,Ne),n=Ue(e,De);return t&&n?Se:t||n?t?Ne:De:Ue(e,ke)?ke:Ce}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=Ue(i,Se)&&!je.none,o=Ue(i,De)&&!je["pan-y"],a=Ue(i,Ne)&&!je["pan-x"];if(r){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return r||o&&6&n||a&&n&Ge?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ze(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Ke(e){var t=e.length;if(1===t)return{x:xe(e[0].clientX),y:xe(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:xe(n/t),y:xe(i/t)}}function Je(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:xe(e.pointers[n].clientX),clientY:xe(e.pointers[n].clientY)},n++;return{timeStamp:Oe(),pointers:t,center:Ke(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Qe(e,t,n){n||(n=Be);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function $e(e,t,n){n||(n=Be);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function et(e,t){return e===t?1:Te(e)>=Te(t)?e<0?2:4:t<0?8:Ve}function tt(e,t,n){return{x:t/e||0,y:n/e||0}}function nt(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=Je(t)),r>1&&!n.firstMultiple?n.firstMultiple=Je(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=Ke(i);t.timeStamp=Oe(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=$e(s,u),t.distance=Qe(s,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=et(t.deltaX,t.deltaY);var l,c,h=tt(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=Te(h.x)>Te(h.y)?h.x:h.y,t.scale=a?(l=a.pointers,Qe((c=i)[0],c[1],Xe)/Qe(l[0],l[1],Xe)):1,t.rotation=a?function(e,t){return $e(t[1],t[0],Xe)+$e(e[1],e[0],Xe)}(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(8!==t.eventType&&(s>25||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=tt(s,u,l);i=c.x,r=c.y,n=Te(c.x)>Te(c.y)?c.x:c.y,o=et(u,l),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var f,d=e.element,p=t.srcEvent;Ze(f=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,d)&&(d=f),t.target=d}function it(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,a=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,nt(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function rt(e){return e.trim().split(/\s+/g)}function ot(e,t,n){Ye(rt(t),(function(t){e.addEventListener(t,n,!1)}))}function at(e,t,n){Ye(rt(t),(function(t){e.removeEventListener(t,n,!1)}))}function st(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var ut=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){We(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(st(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&at(this.element,this.evEl,this.domHandler),this.evTarget&&at(this.target,this.evTarget,this.domHandler),this.evWin&&at(st(this.element),this.evWin,this.domHandler)},e}();function lt(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var ct={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ht={2:He,3:"pen",4:Fe,5:"kinect"},ft="pointerdown",dt="pointermove pointerup pointercancel";be.MSPointerEvent&&!be.PointerEvent&&(ft="MSPointerDown",dt="MSPointerMove MSPointerUp MSPointerCancel");var pt=function(e){function t(){var n,i=t.prototype;return i.evEl=ft,i.evWin=dt,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return me(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ct[i],o=ht[e.pointerType]||e.pointerType,a=o===He,s=lt(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(ut);function gt(e){return Array.prototype.slice.call(e,0)}function vt(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];lt(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}var mt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},_t="touchstart touchmove touchend touchcancel",bt=function(e){function t(){var n;return t.prototype.evTarget=_t,(n=e.apply(this,arguments)||this).targetIds={},n}return me(t,e),t.prototype.handler=function(e){var t=mt[e.type],n=yt.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})},t}(ut);function yt(e,t){var n,i,r=gt(e.touches),o=this.targetIds;if(3&t&&1===r.length)return o[r[0].identifier]=!0,[r,r];var a=gt(e.changedTouches),s=[],u=this.target;if(i=r.filter((function(e){return Ze(e.target,u)})),1===t)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),12&t&&delete o[a[n].identifier],n++;return s.length?[vt(i.concat(s),"identifier",!0),s]:void 0}var Pt={mousedown:1,mousemove:2,mouseup:4},Et="mousedown",xt="mousemove mouseup",Tt=function(e){function t(){var n,i=t.prototype;return i.evEl=Et,i.evWin=xt,(n=e.apply(this,arguments)||this).pressed=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Pt[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Fe,srcEvent:e}))},t}(ut);function Ot(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function wt(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,Ot.call(this,t)):12&e&&Ot.call(this,t)}function Rt(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}var It=function(){return function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handler=function(e,t,n){var r=n.pointerType===He,o=n.pointerType===Fe;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)wt.call(_e(_e(i)),t,n);else if(o&&Rt.call(_e(_e(i)),n))return;i.callback(e,t,n)}},i.touch=new bt(i.manager,i.handler),i.mouse=new Tt(i.manager,i.handler),i.primaryTouch=null,i.lastTouches=[],i}return me(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(ut)}();function At(e,t,n){return!!Array.isArray(e)&&(Ye(e,n[t],n),!0)}var Ct=32,kt=1;function St(e,t){var n=t.manager;return n?n.get(e):e}function Nt(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Dt=function(){function e(e){void 0===e&&(e={}),this.options=ve({enable:!0},e),this.id=kt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return ye(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(At(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=St(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return At(e,"dropRecognizeWith",this)||(e=St(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(At(e,"requireFailure",this))return this;var t=this.requireFail;return-1===lt(t,e=St(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(At(e,"dropRequireFailure",this))return this;e=St(e,this);var t=lt(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Nt(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Nt(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ct},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=ye({},e);if(!We(this.options.enable,[this,t]))return this.reset(),void(this.state=Ct);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),jt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ke]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&o&&i){if(4!==e.eventType)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Qe(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0===this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Ct},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Ct}),this.options.interval),Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Dt),zt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({pointers:1},t))||this}me(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Ct},t}(Dt);function Lt(e){return e===Ve?"down":8===e?"up":2===e?"left":4===e?"right":""}var Mt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"pan",threshold:10,pointers:1,direction:30},t))||this).pX=null,n.pY=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(De),e&Ge&&t.push(Ne),t},n.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:Ve,n=a!==this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},n.attrTest=function(e){return zt.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Lt(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(zt),Ht=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return Mt.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,i=this.options.direction;return 30&i?n=t.overallVelocity:6&i?n=t.overallVelocityX:i&Ge&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Te(n)>this.options.velocity&&4&t.eventType},n.emit=function(e){var t=Lt(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(zt),Ft=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"pinch",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Se]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(zt),Vt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"rotate",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Se]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(zt),Gt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ce]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||12&e.eventType&&!o)this.reset();else if(1&e.eventType)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(4&e.eventType)return 8;return Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Oe(),this.manager.emit(this.options.event,this._input)))},t}(Dt),Bt={domEvents:!1,touchAction:Ae,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Xt=[[Vt,{enable:!1}],[Ft,{enable:!1},["rotate"]],[Ht,{direction:6}],[Mt,{direction:6},["swipe"]],[jt],[jt,{event:"doubletap",taps:2},["tap"]],[Gt]];function Yt(e,t){var n,i=e.element;i.style&&(Ye(e.options.cssProps,(function(r,o){n=we(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var Wt=function(){function e(e,t){var n,i=this;this.options=ye({},Bt,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(Le?pt:Me?bt:ze?It:Tt))(n,it),this.touchAction=new qe(this,this.options.touchAction),Yt(this,!0),Ye(this.options.recognizers,(function(e){var t=i.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return ye(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(t.curRecognizer=null,r=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(t.curRecognizer=n,r=n),o++}},t.get=function(e){if(e instanceof Dt)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(At(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(At(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,i=lt(n,t);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return Ye(rt(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return Ye(rt(e),(function(e){t?n[e]&&n[e].splice(lt(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},t.destroy=function(){this.element&&Yt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Ut={touchstart:1,touchmove:2,touchend:4,touchcancel:8},qt="touchstart",Zt="touchstart touchmove touchend touchcancel",Kt=function(e){function t(){var n,i=t.prototype;return i.evTarget=qt,i.evWin=Zt,(n=e.apply(this,arguments)||this).started=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Ut[e.type];if(1===t&&(this.started=!0),this.started){var n=Jt.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})}},t}(ut);function Jt(e,t){var n=gt(e.touches),i=gt(e.changedTouches);return 12&t&&(n=vt(n.concat(i),"identifier",!0)),[n,i]}function Qt(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=window.console&&(window.console.warn||window.console.log);return r&&r.call(window.console,i,n),e.apply(this,arguments)}}var $t=Qt((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&void 0===e[i[r]])&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),en=Qt((function(e,t){return $t(e,t,!0)}),"merge","Use `assign`.");function tn(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&ye(i,n)}function nn(e,t){return function(){return e.apply(t,arguments)}}function rn(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function on(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function an(e,t){try{return new RegExp(e,"g").exec(t)}catch(e){return null}}function sn(e){return e.replace(/_/g,".")}function un(e,t){var n=null,i="-1";return rn(e,(function(e){var r=an("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!r||e.brand)&&(n=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,t){var n=an("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t);return n?n[3]:""}(e.versionTest.toLowerCase(),t)||i),i=sn(i),!0)})),{preset:n,version:i}}function ln(e,t){var n={brand:"",version:"-1"};return rn(e,(function(e){var i=cn(t,e);return!!i&&(n.brand=e.id,n.version=e.versionAlias||i.version,"-1"!==n.version)})),n}function cn(e,t){return on(e,(function(e){var n=e.brand;return an(""+t.test,n.toLowerCase())}))}(function(){var e=function(e,t){return void 0===t&&(t={}),new Wt(e,ve({recognizers:Xt.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=Ve,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=Ge,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=Ve,e.INPUT_START=1,e.INPUT_MOVE=2,e.INPUT_END=4,e.INPUT_CANCEL=8,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Ct,e.Manager=Wt,e.Input=ut,e.TouchAction=qe,e.TouchInput=bt,e.MouseInput=Tt,e.PointerEventInput=pt,e.TouchMouseInput=It,e.SingleTouchInput=Kt,e.Recognizer=Dt,e.AttrRecognizer=zt,e.Tap=jt,e.Pan=Mt,e.Swipe=Ht,e.Pinch=Ft,e.Rotate=Vt,e.Press=Gt,e.on=ot,e.off=at,e.each=Ye,e.merge=en,e.extend=$t,e.bindFn=nn,e.assign=ye,e.inherit=tn,e.bindFn=nn,e.prefixed=we,e.toArray=gt,e.inArray=lt,e.uniqueArray=vt,e.splitStr=rt,e.boolOrFn=We,e.hasParent=Ze,e.addEventListeners=ot,e.removeEventListeners=at,e.defaults=ye({},Bt,{preset:Xt}),e})().defaults;var hn=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],fn=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],dn=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],pn=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],gn=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function vn(e){var t=function(e){var t=e;if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(e),n=!!/mobi/g.exec(t),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!un(pn,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=un(hn,t),a=o.preset,s=o.version,u=un(gn,t),l=u.preset,c=u.version,h=un(fn,t);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=un(dn,t);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}function mn(e){return void 0===e}var _n=function(){function e(){this.options={},this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this._eventHandler[e]||[],o=r.length>0;if(!o)return!0;var a=n[0]||{},s=n.slice(1);r=r.concat();var u=!1;a.eventType=e,a.stop=function(){u=!0},a.currentTarget=this;var l=[a];return s.length>=1&&(l=l.concat(s)),r.forEach((function(e){e.apply(t,l)})),!u},t.once=function(e,t){var n=this;if("object"==typeof e&&mn(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(n,i),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&mn(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];mn(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(mn(e))return this._eventHandler={},this;if(mn(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),l=u.next();!l.done;l=u.next()){if(l.value===t){a.splice(s,1);break}s++}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="2.2.2",e}(),bn=function(e,t){return bn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},bn(e,t)};var yn,Pn=function(){return Pn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Pn.apply(this,arguments)};function En(e,t,n,i){var r=e,o=[n[0]?t[0]:i?t[0]-i[0]:t[0],n[1]?t[1]:i?t[1]+i[1]:t[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)}function xn(e,t){return e<t[0]||e>t[1]}function Tn(e,t,n){return n[1]&&e>t[1]||n[0]&&e<t[0]}function On(e,t,n){var i=e,r=t[0],o=t[1],a=o-r;return n[1]&&e>o&&(i=(i-o)%a+r),n[0]&&e<r&&(i=(i-r)%a+o),i}function wn(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function Rn(e,t){var n;if(void 0===t&&(t=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,n=wn(i.childNodes)}else n=wn(document.querySelectorAll(e));t||(n=n.length>=1?n[0]:void 0)}else e===yn?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in yn&&e instanceof jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map((function(e){return Rn(e)})),t||(n=n.length>=1?n[0]:void 0)):n=e;return n}var In=(yn="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||yn.webkitRequestAnimationFrame,An=yn.cancelAnimationFrame||yn.webkitCancelAnimationFrame;if(In&&!An){var Cn={},kn=In;In=function(e){var t=kn((function(n){Cn[t]&&e(n)}));return Cn[t]=!0,t},An=function(e){delete Cn[e]}}else In&&An||(In=function(e){return yn.setTimeout((function(){e(yn.performance&&yn.performance.now&&yn.performance.now()||(new Date).getTime())}),16)},An=yn.clearTimeout);function Sn(e,t){var n={};for(var i in e)i&&(n[i]=t(e[i],i));return n}function Nn(e,t){var n={};for(var i in e)i&&t(e[i],i)&&(n[i]=e[i]);return n}function Dn(e,t){for(var n in e)if(n&&!t(e[n],n))return!1;return!0}function jn(e,t){return Dn(e,(function(e,n){return e===t[n]}))}var zn={};function Ln(e,t){var n,i;return zn[t]||(zn[t]=(i=(n=t)<1?Math.pow(10,Hn(n)):1,function(e){return 0===n?0:Math.round(Math.round(e/n)*n*i)/i})),zn[t](e)}function Mn(e,t){if(!e||!t)return e;var n="number"==typeof t;return Sn(e,(function(e,i){return Ln(e,n?t:t[i])}))}function Hn(e){if(!isFinite(e))return 0;var t=e+"";if(t.indexOf("e")>=0){for(var n=0,i=1;Math.round(e*i)/i!==e;)i*=10,n++;return n}return t.indexOf(".")>=0?t.length-t.indexOf(".")-1:0}function Fn(e,t,n){return Math.max(Math.min(e,n),t)}var Vn,Gn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm;this.options=t,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var t=e.prototype;return t.getDuration=function(e,t,n){var i,r=this;if(void 0!==n)i=n;else{var o=Sn(t,(function(t,n){return function(e,t){var n=Math.sqrt(e/t*2);return n<100?0:n}(Math.abs(t-e[n]),r.options.deceleration)}));i=Object.keys(o).reduce((function(e,t){return Math.max(e,o[t])}),-1/0)}return Fn(i,this.options.minimumDuration,this.options.maximumDuration)},t.createAnimationParam=function(e,t,n){var i=this.axm.get(),r=e,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:Fn(t,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},t.grab=function(e,t){if(this._animateParam&&e.length){var n=this.axm.get(e),i=this.axm.map(n,(function(e,t){return On(e,t.range,t.circular)}));Dn(i,(function(e,t){return n[t]===e}))||this.em.triggerChange(i,!1,n,t,!!t),this._animateParam=null,this._raf&&(r=this._raf,An(r)),this._raf=null,this.em.triggerAnimationEnd(!(!t||!t.event))}var r},t.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},t.restore=function(e){var t=this.axm.get(),n=this.axm.map(t,(function(e,t){return Math.min(t.range[1],Math.max(t.range[0],e))}));this.animateTo(n,this.getDuration(t,n),e)},t.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var t=this.axm.filter(this.axm.get(),(function(e,t){return Tn(e,t.range,t.circular)}));Object.keys(t).length>0&&this.setTo(this.axm.map(t,(function(e,t){return On(e,t.range,t.circular)}))),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!e),this.axm.isOutside()?this.restore(e):this.finish(!!e)},t.finish=function(e){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(e)},t.animateLoop=function(e,t){if(e.duration){this._animateParam=Pn({},e);var n=this._animateParam,i=this,r=n.destPos,o=n.depaPos,a=0,s=Sn(o,(function(e,t){return e<=r[t]?1:-1})),u=Sn(r,(function(e){return e})),l=(new Date).getTime();n.startTime=l,function c(){i._raf=null;var h=(new Date).getTime(),f=(h-n.startTime)/e.duration,d=i.easing(f),p=i.axm.map(o,(function(e,t,i){var u=f>=1?r[i]:e+n.delta[i]*(d-a),l=On(u,t.range,t.circular);if(u!==l){var c=s[i]*(t.range[1]-t.range[0]);r[i]-=c,o[i]-=c}return l})),g=!i.em.triggerChange(p,!1,o);if(o=p,l=h,a=d,d>=1)return jn(r=i.getFinalPos(r,u),i.axm.get(Object.keys(r)))||i.em.triggerChange(r,!0,o),void t();g?i.finish(!1):i._raf=In(c)}()}else this.em.triggerChange(e.destPos,!0),t()},t.getFinalPos=function(e,t){var n=this,i=1e-6;return Sn(e,(function(e,r){return e>=t[r]-i&&e<=t[r]+i?t[r]:Ln(e,n.getRoundUnit(e,r))}))},t.getRoundUnit=function(e,t){var n,i=this.options.round,r=null;if(!i){var o=this.axm.getAxisOptions(t);n=Math.max(Hn(o.range[0]),Hn(o.range[1]),Hn(e)),r=1/Math.pow(10,n)}return r||i},t.getUserControll=function(e){var t=e.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=Fn(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},t.animateTo=function(e,t,n){var i=this,r=this.createAnimationParam(e,t,n),o=Pn({},r.depaPos),a=this.em.triggerAnimationStart(r),s=this.getUserControll(r);if(!a&&this.axm.every(s.destPos,(function(e,t){return Tn(e,t.range,t.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!jn(s.destPos,o)){var u=n&&n.event||null;this.animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axm.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:n&&n.input||null},(function(){return i.animationEnd()}))}},t.easing=function(e){return e>1?1:this.options.easing(e)},t.setTo=function(e,t){void 0===t&&(t=0);var n=Object.keys(e);this.grab(n);var i=this.axm.get(n);if(jn(e,i))return this;this.itm.setInterrupt(!0);var r=Nn(e,(function(e,t){return i[t]!==e}));return Object.keys(r).length?(r=this.axm.map(r,(function(e,t){var n=t.range,i=t.circular;return i&&(i[0]||i[1])?e:En(e,n,i)})),jn(r,i)||(t>0?this.animateTo(r,t):(this.em.triggerChange(r),this.finish(!1))),this):this},t.setBy=function(e,t){return void 0===t&&(t=0),this.setTo(Sn(this.axm.get(Object.keys(e)),(function(t,n){return t+e[n]})),t)},e}(),Bn=function(){function e(e){this.axes=e}var t=e.prototype;return t.triggerHold=function(e,t){var n=this.getRoundPos(e).roundPos;this.axes.trigger("hold",{pos:n,input:t.input||null,inputEvent:t.event||null,isTrusted:!0})},t.triggerRelease=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("release",e)},t.triggerChange=function(e,t,n,i,r){void 0===r&&(r=!1);var o=this.am,a=o.axm,s=o.getEventInfo(),u=this.getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=i&&i.event||s&&s.event||null,d={pos:h.pos,delta:h.delta,holding:r,inputEvent:f,isTrusted:!!f,input:i&&i.input||s&&s.input||null,set:f?this.createUserControll(h.pos):function(){}},p=this.axes.trigger("change",d);return f&&a.set(d.set().destPos),p},t.triggerAnimationStart=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;return e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("animationStart",e)},t.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this.axes.trigger("animationEnd",{isTrusted:e})},t.triggerFinish=function(e){void 0===e&&(e=!1),this.axes.trigger("finish",{isTrusted:e})},t.createUserControll=function(e,t){void 0===t&&(t=0);var n={destPos:Pn({},e),duration:t};return function(e,t){return e&&(n.destPos=Pn({},e)),void 0!==t&&(n.duration=t),n}},t.setAnimationManager=function(e){this.am=e},t.destroy=function(){this.axes.off()},t.getRoundPos=function(e,t){var n=this.axes.options.round;return{roundPos:Mn(e,n),roundDepa:Mn(t,n)}},e}(),Xn=function(){function e(e){this.options=e,this._prevented=!1}var t=e.prototype;return t.isInterrupting=function(){return this.options.interruptable||this._prevented},t.isInterrupted=function(){return!this.options.interruptable&&this._prevented},t.setInterrupt=function(e){!this.options.interruptable&&(this._prevented=e)},e}(),Yn=function(){function e(e,t){var n=this;this.axis=e,this.options=t,this._complementOptions(),this._pos=Object.keys(this.axis).reduce((function(e,t){return e[t]=n.axis[t].range[0],e}),{})}var t=e.prototype;return t._complementOptions=function(){var e=this;Object.keys(this.axis).forEach((function(t){e.axis[t]=Pn({range:[0,100],bounce:[0,0],circular:[!1,!1]},e.axis[t]),["bounce","circular"].forEach((function(n){var i=e.axis,r=i[t][n];/string|number|boolean/.test(typeof r)&&(i[t][n]=[r,r])}))}))},t.getDelta=function(e,t){var n=this.get(e);return Sn(this.get(t),(function(e,t){return e-n[t]}))},t.get=function(e){var t=this;return e&&Array.isArray(e)?e.reduce((function(e,n){return n&&n in t._pos&&(e[n]=t._pos[n]),e}),{}):Pn(Pn({},this._pos),e||{})},t.moveTo=function(e,t){void 0===t&&(t=this._pos);var n=Sn(this._pos,(function(n,i){return i in e&&i in t?e[i]-t[i]:0}));return this.set(this.map(e,(function(e,t){return t?On(e,t.range,t.circular):0}))),{pos:Pn({},this._pos),delta:n}},t.set=function(e){for(var t in e)t&&t in this._pos&&(this._pos[t]=e[t])},t.every=function(e,t){var n=this.axis;return Dn(e,(function(e,i){return t(e,n[i],i)}))},t.filter=function(e,t){var n=this.axis;return Nn(e,(function(e,i){return t(e,n[i],i)}))},t.map=function(e,t){var n=this.axis;return Sn(e,(function(e,i){return t(e,n[i],i)}))},t.isOutside=function(e){return!this.every(e?this.get(e):this._pos,(function(e,t){return!xn(e,t.range)}))},t.getAxisOptions=function(e){return this.axis[e]},e}(),Wn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm,o=e.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=t,this.itm=n,this.em=i,this.axm=r,this.am=o}var t=e.prototype;return t.atOutside=function(e){var t=this;if(this.isOutside)return this.axm.map(e,(function(e,t){var n=t.range[0]-t.bounce[0],i=t.range[1]+t.bounce[1];return e>i?i:e<n?n:e}));var n=this.am.easing(1e-5)/1e-5;return this.axm.map(e,(function(e,i){var r=i.range[0],o=i.range[1],a=i.bounce,s=i.circular;return s&&(s[0]||s[1])?e:e<r?r-t.am.easing((r-e)/(a[0]*n))*a[0]:e>o?o+t.am.easing((e-o)/(a[1]*n))*a[1]:e}))},t.get=function(e){return this.axm.get(e.axes)},t.hold=function(e,t){if(!this.itm.isInterrupted()&&e.axes.length){var n={input:e,event:t};this.isStopped=!1,this.itm.setInterrupt(!0),this.am.grab(e.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(e.axes),this.moveDistance=this.axm.get(e.axes)}},t.change=function(e,t,n){if(!this.isStopped&&this.itm.isInterrupting()&&!this.axm.every(n,(function(e){return 0===e}))){var i,r=this.moveDistance||this.axm.get(e.axes);i=Sn(r,(function(e,t){return e+(n[t]||0)})),this.moveDistance&&(this.moveDistance=i),this.isOutside&&this.axm.every(r,(function(e,t){return!xn(e,t.range)}))&&(this.isOutside=!1),r=this.atOutside(r),i=this.atOutside(i),!this.em.triggerChange(i,!1,r,{input:e,event:t},!0)&&(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1))}},t.release=function(e,t,n,i){if(!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(e.axes),o=this.axm.get(),a=this.axm.get(this.axm.map(n,(function(e,t,n){return t.circular&&(t.circular[0]||t.circular[1])?r[n]+e:En(r[n]+e,t.range,t.circular,t.bounce)}))),s=this.am.getDuration(a,r,i);0===s&&(a=Pn({},o));var u={depaPos:o,destPos:a,duration:s,delta:this.axm.getDelta(o,a),inputEvent:t,input:e,isTrusted:!0};this.em.triggerRelease(u),this.moveDistance=null;var l=this.am.getUserControll(u),c=jn(l.destPos,o),h={input:e,event:t};c||0===l.duration?(!c&&this.em.triggerChange(l.destPos,!1,o,h,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(h):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,h)}},e}(),Un="ontouchstart"in yn&&"safari"===(void 0===Vn&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(e){var t=navigator.userAgentData,n=(t.uaList||t.brands).slice(),i=t.mobile||!1,r=n[0],o={name:r.brand,version:r.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!ln(pn,n).brand},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&rn(dn,(function(e){return cn(n,e)}));var s=ln(fn,n);if(o.chromium=!!s.brand,o.chromiumVersion=s.version,!o.chromium){var u=ln(dn,n);o.webkit=!!u.brand,o.webkitVersion=u.version}if(e){var l=e.platform.toLowerCase(),c=on(gn,(function(e){return new RegExp(""+e.test,"g").exec(l)}));a.name=c?c.id:l,a.version=e.platformVersion}var h=ln(hn,n);return h.brand&&(o.name=h.brand,o.version=e?e.uaFullVersion:h.version),"Linux armv8l"===navigator.platform?a.name="android":o.webkit&&(a.name=i?"ios":"mac"),"ios"===a.name&&o.webview&&(o.version="-1"),a.version=sn(a.version),o.version=sn(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:i,isHints:!0}}():vn(Vn)).browser.name,qn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,t=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n];return""}(),Zn=function(e){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={});var r=e.call(this)||this;return r.axis=t,r._inputs=[],r.options=Pn({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},n),r.itm=new Xn(r.options),r.axm=new Yn(r.axis,r.options),r.em=new Bn(r),r.am=new Gn(r),r.io=new Wn(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}!function(e,t){function n(){this.constructor=e}bn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e);var n=t.prototype;return n.connect=function(e,t){var n;if(n="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(t)&&this.disconnect(t),"hammer"in t){var i=this._inputs.filter((function(e){return e.hammer&&e.element===t.element}));i.length&&(t.hammer=i[0].hammer)}return t.mapAxes(n),t.connect(this.io),this._inputs.push(t),this},n.disconnect=function(e){if(e){var t=this._inputs.indexOf(e);t>=0&&(this._inputs[t].disconnect(),this._inputs.splice(t,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},n.get=function(e){return this.axm.get(e)},n.setTo=function(e,t){return void 0===t&&(t=0),this.am.setTo(e,t),this},n.setBy=function(e,t){return void 0===t&&(t=0),this.am.setBy(e,t),this},n.isBounceArea=function(e){return this.axm.isOutside(e)},n.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.8.0",t.TRANSFORM=qn,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=Ve,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Ge,t.DIRECTION_ALL=30,t}(_n),Kn="PointerEvent"in yn||"MSPointerEvent"in yn,Jn="ontouchstart"in yn,Qn="_EGJS_AXES_INPUTTYPE_";function $n(e,t){return t.reduce((function(t,n,i){return e[i]&&(t[e[i]]=n),t}),{})}function ei(e,t,n){return n?!!(30===t||t&e&&n&e):!!(t&e)}var ti,ni=function(){function e(e,t){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===Wt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=Rn(e),this.options=Pn({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},t),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var t=e.prototype;return t.mapAxes=function(e){var t=!!e[0],n=!!e[1];this._direction=t&&n?30:t?6:n?Ge:1,this.axes=e},t.connect=function(e){var t={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[Qn];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=function(e){void 0===e&&(e=[]);var t=!1,n=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":n=!0;break;case"touch":t=Jn;break;case"pointer":i=Kn}})),i?pt:t&&n?It:t?bt:n?Tt:null}(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=function(e,t){try{return new Wt(e,Pn({},t))}catch(e){return null}}(this.element,Pn({inputClass:i},this.options.hammerManagerOptions)),this.element[Qn]=n}return this.panRecognizer=new Mt(t),this.hammer.add(this.panRecognizer),this.attachEvent(e),this},t.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},t.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[Qn],this.element=null,this.hammer=null},t.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},t.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},t.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},t.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},t.onHammerInput=function(e){if(this.isEnable())if(e.isFirst){if(this.panFlag=!1,!1!==e.srcEvent.cancelable){var t=this.options.iOSEdgeSwipeThreshold;this.observer.hold(this,e),this.isRightEdge=Un&&e.center.x>window.innerWidth-t,this.panFlag=!0}}else e.isFinal&&this.onPanend(e)},t.onPanmove=function(e){var t=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.releaseOnScroll,o=function(e,t){if(t<0||t>90)return 1;var n=Math.abs(e);return n>t&&n<180-t?Ge:6}(e.angle,this.options.thresholdAngle),a=this.hammer.session.prevInput;if(!r||e.srcEvent.cancelable){if(a&&Un){if(e.center.x<0)return void this.onPanend(Pn(Pn({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),e.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout((function(){t.onPanend(Pn(Pn({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}),100))}a?(e.offsetX=e.deltaX-a.deltaX,e.offsetY=e.deltaY-a.deltaY):(e.offsetX=0,e.offsetY=0);var s=this.getOffset([e.offsetX,e.offsetY],[ei(6,this._direction,o),ei(Ge,this._direction,o)]),u=s.some((function(e){return 0!==e}));if(u){var l=e.srcEvent;!1!==l.cancelable&&l.preventDefault(),l.stopPropagation()}e.preventSystemEvent=u,u&&this.observer.change(this,e,$n(this.axes,s))}else this.onPanend(Pn(Pn({},e),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},t.onPanend=function(e){if(this.panFlag){clearTimeout(this.rightEdgeTimer),this.panFlag=!1;var t,n,i,r,o=this.getOffset([Math.abs(e.velocityX)*(e.deltaX<0?-1:1),Math.abs(e.velocityY)*(e.deltaY<0?-1:1)],[ei(6,this._direction),ei(Ge,this._direction)]);t=o,n=this.observer.options.deceleration,i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.abs(i/-n),o=[t[0]/2*r,t[1]/2*r],this.observer.release(this,e,$n(this.axes,o))}},t.attachEvent=function(e){this.observer=e,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},t.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},t.getOffset=function(e,t){var n=[0,0],i=this.options.scale;return t[0]&&(n[0]=e[0]*i[0]),t[1]&&(n[1]=e[1]*i[1]),n},e}(),ii=Zn,ri={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},oi="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(ti||(ti={}));var ai=function(){function e(){this._delta=0,this._targetPanel=null}var t=e.prototype;return Object.defineProperty(t,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(t,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),t.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},t.onHold=function(e){},t.onChange=function(e){},t.onRelease=function(e){},t.onAnimationEnd=function(e){},t.onFinish=function(e){},t._moveToChangedPosition=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.delta.flick;if(r){this._delta+=r;var o=t.camera,a=o.position,s=n.pos.flick,u=t.circularEnabled?$(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(C.MOVE,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,n.delta.flick),axesEvent:n});t.trigger(l),l.isCanceled()&&(o.lookAt(a),i(ti.DISABLED))}},e}(),si=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!1,t}t(n,e);var i=n.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.renderer.panelCount<=0)i(ti.DISABLED);else{var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.HOLDING)}},i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control.controller.animatingContext,o=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(r.start,r.end),axesEvent:n});t.trigger(o),o.isCanceled()?i(ti.DISABLED):i(ti.ANIMATING).onChange(e)},n}(ai),ui=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!1,t._releaseEvent=null,t}t(n,e);var i=n.prototype;return i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.inputEvent,o=t.horizontal?r.offsetX:r.offsetY,a=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,-o),axesEvent:n});t.trigger(a),a.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING).onChange(e)},i.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.trigger(new g(C.HOLD_END,{axesEvent:n})),0!==n.delta.flick)return n.setTo({flick:t.camera.position},0),void i(ti.IDLE);this._releaseEvent=n},i.onFinish=function(e){var t,n,i=e.flicking;if((0,e.transitTo)(ti.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(C.SELECT,{index:l.index,panel:l,direction:q(d,p)}))}}},n}(ai),li=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var t,n=e.flicking,i=e.axesEvent,r=e.transitTo;if(n.trigger(new g(C.HOLD_END,{axesEvent:i})),n.renderer.panelCount<=0)r(ti.IDLE);else{r(ti.ANIMATING);var o=n.control,a=i.destPos.flick,s=Math.max(i.duration,n.duration);try{o.moveToPosition(a,s,i)}catch(e){r(ti.IDLE),i.setTo(((t={}).flick=n.camera.position,t),0)}}},n}(ai),ci=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;this._delta=0,t.control.updateInput();var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control,o=r.controller.animatingContext;i(ti.IDLE),t.trigger(new g(C.MOVE_END,{isTrusted:n.isTrusted,direction:q(o.start,o.end),axesEvent:n}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,n.isTrusted)},n}(ai),hi=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(ti.IDLE)},i.onChange=function(e){var t=e.axesEvent,n=e.transitTo;t.stop(),n(ti.IDLE)},i.onRelease=function(e){var t=e.axesEvent,n=e.transitTo;0===t.delta.flick&&n(ti.IDLE)},n}(ai),fi=function(){function e(){var e=this;this.transitTo=function(t){var n;switch(t){case ti.IDLE:n=new si;break;case ti.HOLDING:n=new ui;break;case ti.DRAGGING:n=new li;break;case ti.ANIMATING:n=new ci;break;case ti.DISABLED:n=new hi}return n.onEnter(e._state),e._state=n,e._state},this._state=new si}var t=e.prototype;return Object.defineProperty(t,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.fire=function(e,t){var i=this._state,r=n(n({},t),{transitTo:this.transitTo});switch(e){case ri.HOLD:i.onHold(r);break;case ri.CHANGE:i.onChange(r);break;case ri.RELEASE:i.onRelease(r);break;case ri.ANIMATION_END:i.onAnimationEnd(r);break;case ri.FINISH:i.onFinish(r)}},e}(),di=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){e._dragged=!0},this._preventClickWhenDragged=function(t){e._dragged&&(t.preventDefault(),t.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new fi}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var t=e.axis.flick;return{range:{min:t.range[0],max:t.range[1]},circular:t.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,t;return null!==(t=null===(e=this._panInput)||void 0===e?void 0:e.isEnable())&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.get([oi]).flick)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.axis.flick.range)&&void 0!==t?t:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis.flick.bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,n=this;this._flicking=e,this._axes=new ii(((t={}).flick={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,easing:e.easing}),this._panInput=new ni(e.viewport.element,{inputType:e.inputType,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,scale:e.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[oi,""]:["",oi],this._panInput);var r=function(t){var r=ri[t];i.on(r,(function(t){n._stateMachine.fire(r,{flicking:e,axesEvent:t})}))};for(var o in ri)r(o);return this},t.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},t.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},t.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},t.update=function(e){var t,n=V(this._flicking),i=n.camera,r=this._axes,o=r.axis.flick;return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=X(n.bounce,i.size),r.axm.set(((t={}).flick=e.position,t)),this},t.addPreventClickHandler=function(){var e=V(this._flicking),t=this._axes,n=e.camera.element;return t.on(ri.HOLD,this._onAxesHold),t.on(ri.CHANGE,this._onAxesChange),n.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=V(this._flicking),t=this._axes,n=e.camera.element;return t.off(ri.HOLD,this._onAxesHold),t.off(ri.CHANGE,this._onAxesChange),n.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,t,n){var i,r,o=this,a=this._axes,s=this._stateMachine.state;if(!a)return Promise.reject(new ce(y,v.NOT_ATTACHED_TO_FLICKING));var u=a.get([oi]).flick;if(u===e)return(c=V(this._flicking)).camera.lookAt(e),s.targetPanel&&c.control.setActive(s.targetPanel,c.control.activePanel,null!==(r=null==n?void 0:n.isTrusted)&&void 0!==r&&r),Promise.resolve();this._animatingContext={start:u,end:e,offset:0};var l=function(){var i,r;a.once(ri.FINISH,(function(){o._animatingContext={start:0,end:0,offset:0}})),n?n.setTo(((i={}).flick=e,i),t):a.setTo(((r={}).flick=e,r),t)};if(0===t){var c,h=(c=V(this._flicking)).camera;l();var f=c.circularEnabled?$(e,h.range.min,h.range.max):e;return a.axm.set(((i={}).flick=f,i)),Promise.resolve()}return new Promise((function(e,t){var n=function(){a.off(ri.HOLD,i),e()},i=function(){a.off(ri.FINISH,n),t(new ce(w,v.ANIMATION_INTERRUPTED))};a.once(ri.FINISH,n),a.once(ri.HOLD,i),l()}))},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),pi=function(){function e(){this._flicking=null,this._controller=new di,this._activePanel=null}var t=e.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,t;return null!==(t=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==t?t:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._controller.init(e),this},t.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},t.enable=function(){return this._controller.enable(),this},t.disable=function(){return this._controller.disable(),this},t.updatePosition=function(e){var t=V(this._flicking).camera,n=this._activePanel;n&&t.lookAt(t.clampToReachablePosition(n.position))},t.updateInput=function(){var e=V(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,t){var n=t.duration,o=t.direction,a=void 0===o?S.NONE:o,s=t.axesEvent;return i(this,void 0,void 0,(function(){var t,i,o,u,l,c,h;return r(this,(function(r){return t=V(this._flicking),i=t.camera,o=e.position,u=i.findNearestAnchor(o),e.removed||!u?[2,Promise.reject(new ce(x(e.position),v.POSITION_NOT_REACHABLE))]:(i.canReach(e)?t.circularEnabled&&(l=this._controller.position,c=i.rangeDiff,h=[o,o+c,o-c].filter((function(e){return a===S.NONE||(a===S.PREV?e<=l:e>=l)})),o=h.reduce((function(e,t){return Math.abs(l-t)<Math.abs(l-e)?t:e}),1/0)):(o=u.position,e=u.panel),this._triggerIndexChangeEvent(e,e.position,s),[2,this._animateToPosition({position:o,duration:n,newActivePanel:e,axesEvent:s})])}))}))},t.setActive=function(e,t,n){var i,r=V(this._flicking);this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==t?r.trigger(new g(C.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==t?void 0:t.index)&&void 0!==i?i:-1,prevPanel:t,isTrusted:n,direction:t?q(t.position,e.position):S.NONE})):r.trigger(new g(C.RESTORED,{isTrusted:n}))},t._triggerIndexChangeEvent=function(e,t,n){var i,r=V(this._flicking),o=e!==this._activePanel?C.WILL_CHANGE:C.WILL_RESTORE,a=r.camera,s=this._activePanel,u=new g(o,{index:e.index,panel:e,isTrusted:(null==n?void 0:n.isTrusted)||!1,direction:q(null!==(i=null==s?void 0:s.position)&&void 0!==i?i:a.position,t)});if(r.trigger(u),u.isCanceled())throw new ce(O,v.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var t=e.position,n=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,(function(){var e,s,u=this;return r(this,(function(l){return e=V(this._flicking),s=function(){return u._controller.animateTo(t,n,a)},this._controller.state.targetPanel=o,n<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,e.renderer.render()];case 1:return t.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof ce&&e.code===v.ANIMATION_INTERRUPTED))throw e}))]}))}))},e}(),gi=function(){function e(e){var t=e.index,n=e.position,i=e.panel;this._index=t,this._pos=n,this._panel=i}var t=e.prototype;return Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),vi=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1/0:n,r=e.call(this)||this;return r._count=i,r}t(n,e);var i=n.prototype;return Object.defineProperty(i,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),i.moveToPosition=function(e,t,n){var i=V(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=i.control.controller.state;if(!o||!a)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var u,l=this._calcSnapThreshold(e,o),c=i.animating?s.delta:e-r.position,h=Math.abs(c),f=n&&0!==n.delta.flick?Math.abs(n.delta.flick):h;return u=f>=l&&f>0?this._findSnappedAnchor(e,a):h>=i.threshold&&h>0?this._findAdjacentAnchor(c,a):a,this._triggerIndexChangeEvent(u.panel,e,n),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:t,newActivePanel:u.panel,axesEvent:n})},i._findSnappedAnchor=function(e,t){var n=V(this._flicking),i=n.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!t||!s)throw new ce(x(e),v.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=n.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<t.index||s.position>t.position&&s.index===t.index?c+=1:(e<o&&s.index>t.index||s.position<t.position&&s.index===t.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-t.index)<=r){var d=l[s.index];return new gi({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(n.circularEnabled){var p=l[ae(t.index+Math.sign(e-o)*r,u)],g=Math.floor(r/u);return e>o&&p.index<t.index?g+=1:e<o&&p.index>t.index&&(g-=1),new gi({index:p.index,position:p.position+g*i.rangeDiff,panel:p.panel})}return l[F(t.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,t){var n,i=V(this._flicking).camera;return null!==(n=e>0?i.getNextAnchor(t):i.getPrevAnchor(t))&&void 0!==n?n:t},i._calcSnapThreshold=function(e,t){var n=e>t.position,i=t.panel,r=i.size,o=i.alignPosition;return n?r-o+i.margin.next:o+i.margin.prev},n}(pi),mi=function(e){function n(t){var n=(void 0===t?{}:t).stopAtEdge,i=void 0===n||n,r=e.call(this)||this;return r._stopAtEdge=i,r}t(n,e);var i=n.prototype;return Object.defineProperty(i,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),i.updatePosition=function(e){var t=V(this._flicking).camera,n=this._activePanel;if(n){var i=n.range,r=i.min+(i.max-i.min)*e;t.lookAt(t.clampToReachablePosition(r))}},i.moveToPosition=function(e,t,n){var i=V(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,n),this._animateToPosition({position:this._stopAtEdge?r:e,duration:t,newActivePanel:a,axesEvent:n})},n}(pi),_i=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1:n,r=e.call(this)||this;return r.setActive=function(t,n,i){e.prototype.setActive.call(r,t,n,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}t(n,e);var o=n.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,t=V(this._flicking),n=t.camera,i=t.renderer,r=this._controller,o=n.controlParams,a=this._count,s=r.state.animating?null===(e=n.findNearestAnchor(n.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=t.circularEnabled?K((f+1)%h-1,h):F(f,0,h-1)),d>=h&&(d=t.circularEnabled?d%h:F(d,0,h-1));var p=i.panels[f],g=i.panels[d],v=Math.max(p.position,u.min),m=Math.min(g.position,u.max);return v>l&&(v-=n.rangeDiff),m<l&&(m+=n.rangeDiff),o.range={min:v,max:m},o.circular&&(o.position<v&&(o.position+=n.rangeDiff),o.position>m&&(o.position-=n.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:p.index,max:g.index},this},o.moveToPanel=function(t,n){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){return i=V(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,t,n)]}))}))},o.moveToPosition=function(e,t,n){var i=V(this._flicking),r=i.camera,o=this._activePanel,a=this._controller.range,s=this._indexRange,u=r.range,l=F(r.clampToReachablePosition(e),a[0],a[1]),c=r.findAnchorIncludePosition(l);if(!c||!o)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var h,f,d=o.position,p=Math.abs(e-d)>=i.threshold,g=e>d?r.getNextAnchor(c):r.getPrevAnchor(c),m=r.anchorPoints,_=m[0],b=m[m.length-1],y=e<=u.min&&oe(_.panel.index,s.min,s.max),P=e>=u.max&&oe(b.panel.index,s.min,s.max);if(y||P){var E=e<u.min?_:b;f=E.panel,h=E.position}else p&&c.position!==o.position?(f=c.panel,h=c.position):p&&g&&oe(g.index,s.min,s.max)?(f=g.panel,h=g.position):(h=r.clampToReachablePosition(o.position),f=o);return this._triggerIndexChangeEvent(f,e,n),this._animateToPosition({position:h,duration:t,newActivePanel:f,axesEvent:n})},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(pi),bi={__proto__:null,Control:pi,SnapControl:vi,FreeControl:mi,StrictControl:_i,AxesController:di,State:ai,IdleState:si,HoldingState:ui,DraggingState:li,AnimatingState:ci,DisabledState:hi,StateMachine:fi},yi=function(){function e(e){this._flicking=e}var t=e.prototype;return t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},t.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter((function(t){return t.panel.includePosition(e,!0)})).reduce((function(t,n){return t&&Math.abs(t.position-e)<Math.abs(n.position-e)?t:n}),null)},t.clampToReachablePosition=function(e){var t=this._flicking.camera.range;return F(e,t.min,t.max)},t.getCircularOffset=function(){return 0},t.canReach=function(e){var t=this._flicking.camera.range;if(e.removed)return!1;var n=e.position;return n>=t.min&&n<=t.max},t.canSee=function(e){var t=this._flicking.camera.visibleRange;return e.isVisibleOnRange(t.min,t.max)},e}(),Pi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,t,n=this._flicking.renderer,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(t=null==r?void 0:r.position)&&void 0!==t?t:0}},n}(yi),Ei=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer.panels;if(t.length<=0)return!1;var n=t[0],i=t[t.length-1],r=n.range.min-n.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return t.every((function(e){return s-e.size>=a}))},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var t=e[0],n=e[e.length-1];return{min:t.range.min-t.margin.prev,max:n.range.max+n.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints,o=n.rangeDiff,a=r.length,s=$(t,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(t===i.min||t===i.max)){var l=[u,new gi({index:0,position:r[0].position+o,panel:r[0].panel}),new gi({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,n){return e&&Math.abs(e.position-t)<Math.abs(n.position-t)?e:n}),null)}if(!u)return null;if(t<i.min){var c=-Math.floor((i.min-t)/o)-1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}if(t>i.max){c=Math.floor((t-i.max)/o)+1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var t=e.panels.filter((function(e){return e.toggled})),n=t.filter((function(e){return e.toggleDirection===S.PREV})),i=t.filter((function(e){return e.toggleDirection===S.NEXT}));return this._calcPanelAreaSum(n)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(t){var n=this._flicking.camera,i=n.range,r=n.rangeDiff,o=n.visibleRange,a=e.prototype.canSee.call(this,t);return o.min<i.min?a||t.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||t.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,t){return e+t.sizeIncludingMargin}),0)},n}(yi),xi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer,n=t.getPanel(0),i=t.getPanel(t.panelCount-1);if(!n||!i)return!1;var r=e.camera.size,o=n.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,t=e.renderer,n=e.camera.alignPosition,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,u=a+n,l=s-o+n;if(o<s-a)return{min:u,max:l};var c=e.camera.align,h="object"==typeof c?c.camera:c,f=u+B(h,l-u);return{min:f,max:f}},i.getAnchors=function(){var e=this._flicking,t=e.camera,n=e.renderer.panels;if(n.length<=0)return[];var i=e.camera.range,r=n.filter((function(e){return t.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,t){return new gi({index:t+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new gi({index:0,position:i.min,panel:n[r[0].index-1]})),a&&u.push(new gi({index:u.length,position:i.max,panel:n[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,n),c=l.index===n.length-1?l.prev():l,h=c.next();return[new gi({index:0,position:i.min,panel:c}),new gi({index:1,position:i.max,panel:h})]}return[new gi({index:0,position:i.min,panel:this._findNearestPanel(i.min,n)})]},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints;return r.length<=0?null:t<=i.min?r[0]:t>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,t)},i._findNearestPanel=function(e,t){for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},n}(yi),Ti=function(){function e(e,t){var n=this,i=(void 0===t?{}:t).align,r=void 0===i?k.CENTER:i;this._checkTranslateSupport=function(){var e,t,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(!r)throw new ce(T,v.TRANSFORM_NOT_SUPPORTED);n._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return G(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,t=this._position+this._offset,n=this.findNearestAnchor(this._position);if(!e||!n)return NaN;var i=n.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(t===r)return i.index;if(t<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+ne(t,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+ne(t,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking.viewport.element;return H(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this},t.destroy=function(){return this._resetInternalValues(),this},t.lookAt=function(e){var t=this,n=V(this._flicking),i=this._position;this._position=e;var r=this._togglePanels(i,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(i,e),r?n.renderer.render().then((function(){t.updateOffset()})):this.applyTransform()},t.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var t=this._anchors,n=this.rangeDiff,i=t[t.length-1];return new gi({index:i.index,position:i.position-n,panel:i.panel})}return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){var t=this._anchors;if(this._circularEnabled&&e.index===t.length-1){var n=this.rangeDiff,i=t[0];return new gi({index:i.index,position:i.position+n,panel:i.panel})}return t[e.index+1]||null},t.getProgressInPanel=function(e){var t=e.range;return(this._position-t.min)/(t.max-t.min)},t.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},t.findNearestAnchor=function(e){var t=this._anchors;if(t.length<=0)return null;for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},t.findActiveAnchor=function(){var e=V(this._flicking).control.activeIndex;return ee(this._anchors,(function(t){return t.panel.index===e}))},t.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},t.canReach=function(e){return this._mode.canReach(e)},t.canSee=function(e){return this._mode.canSee(e)},t.updateRange=function(){var e=V(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),this._circularEnabled&&e.forEach((function(e){return e.updateCircularToggleDirection()})),this},t.updateAlignPos=function(){var e=this._align,t="object"==typeof e?e.camera:e;return this._alignPos=B(t,this.size),this},t.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},t.updateAdaptiveHeight=function(){var e=V(this._flicking),t=e.control.activePanel;e.horizontal&&e.adaptive&&t&&e.viewport.setSize({height:t.height})},t.updateOffset=function(){var e=V(this._flicking),t=this._position,n=e.panels.filter((function(e){return!e.rendered}));return this._offset=n.filter((function(e){return e.position+e.offset<t})).reduce((function(e,t){return e+t.sizeIncludingMargin}),0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,t=V(this._flicking);if(t.renderer.rendering)return this;var n=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=t.horizontal?"translate("+-n+"px)":"translate(0, "+-n+"px)",this},t._resetInternalValues=function(){this._position=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},t._refreshVisiblePanels=function(){var e=this,t=V(this._flicking),n=t.renderer.panels.filter((function(t){return e.canSee(t)})),i=this._visiblePanels;this._visiblePanels=n;var r=n.filter((function(e){return!J(i,e)})),o=i.filter((function(e){return!J(n,e)}));(r.length>0||o.length>0)&&t.renderer.render().then((function(){t.trigger(new g(C.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:n}))}))},t._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var t=V(this._flicking),n=t.renderer.panels;if(n.length<=0)return e.prev||(t.trigger(new g(C.NEED_PANEL,{direction:S.PREV})),e.prev=!0),void(e.next||(t.trigger(new g(C.NEED_PANEL,{direction:S.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=t.needPanelThreshold,s=i-this._alignPos,u=s+r,l=n[0],c=n[n.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(t.trigger(new g(C.NEED_PANEL,{direction:S.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(t.trigger(new g(C.NEED_PANEL,{direction:S.NEXT})),e.next=!0)}},t._checkReachEnd=function(e,t){var n=V(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=t>i.min&&t<i.max;if(r&&!o){var a=t<=i.min?S.PREV:S.NEXT;n.trigger(new g(C.REACH_EDGE,{direction:a}))}},t._updateMode=function(){var e=V(this._flicking);if(e.circular){var t=new Ei(e),n=t.checkAvailability();if(n)this._mode=t;else{var i=e.circularFallback;this._mode=i===j.BOUND?new xi(e):new Pi(e)}this._circularEnabled=n}else this._mode=e.bound?new xi(e):new Pi(e)},t._togglePanels=function(e,t){return t!==e&&V(this._flicking).renderer.panels.map((function(n){return n.toggle(e,t)})).some((function(e){return e}))},e}(),Oi={__proto__:null,Camera:Ti,LinearCameraMode:Pi,CircularCameraMode:Ei,BoundCameraMode:xi},wi=function(e,t){return wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wi(e,t)};function Ri(e,t){function n(){this.constructor=e}wi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ii=function(){return Ii=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ii.apply(this,arguments)};var Ai="undefined"!=typeof window,Ci=Ai?window.navigator.userAgent:"",ki=!!Ai&&!!("getComputedStyle"in window),Si=/MSIE|Trident|Windows Phone|Edge/.test(Ci),Ni=!!Ai&&!!("addEventListener"in document),Di="width",ji="height";function zi(e,t){return e.getAttribute(t)||""}function Li(e){return[].slice.call(e)}function Mi(e){return"loading"in e&&"lazy"===e.getAttribute("loading")}function Hi(e,t,n){Ni?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Fi(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function Vi(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||function(e){return(ki?window.getComputedStyle(e):e.currentStyle)||{}}(e)[t.toLowerCase()])||0}function Gi(e,t,n){var i=Li(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+n+"skip] ["+n+"width]"],t.map((function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")}))).join(", ")));return Li(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter((function(e){return-1===i.indexOf(e)}))}var Bi=[];function Xi(e,t){!Bi.length&&Hi(window,"resize",Wi),e.__PREFIX__=t,Bi.push(e),Yi(e)}function Yi(e,t){void 0===t&&(t="data-");var n=e.__PREFIX__||t,i=parseInt(zi(e,""+n+Di),10)||0,r=parseInt(zi(e,""+n+ji),10)||0;if(zi(e,n+"fixed")===ji){var o=Vi(e,"Height")||r;e.style.width=i/r*o+"px"}else{o=function(e){return Vi(e,"Width")}(e)||i;e.style.height=r/i*o+"px"}}function Wi(){Bi.forEach((function(e){Yi(e)}))}var Ui=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){i.clear(),e&&"error"===e.type&&i.onError(i.element);var t=!i.hasDataSize&&!i.hasLoading;i.onReady(t)},i.options=Ii({prefix:"data-"},n),i.element=t;var r=i.options.prefix;return i.hasDataSize=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"width")}(t,r),i.isSkip=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"skip")}(t,r),i.hasLoading=Mi(t),i}Ri(t,e);var n=t.prototype;return n.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&Xi(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},n.addEvents=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Hi(t,n,e.onCheck)}))},n.clear=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Fi(t,n,e.onCheck)})),this.removeAutoSizer()},n.destroy=function(){this.clear(),this.off()},n.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,t){var n=Bi.indexOf(e);if(!(n<0)){var i=zi(e,t+"fixed");delete e.__PREFIX__,e.style[i===ji?Di:ji]="",Bi.splice(n,1),!Bi.length&&Fi(window,"resize",Wi)}}(this.element,e)}},n.onError=function(e){this.trigger("error",{element:this.element,target:e})},n.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onAlreadyError=function(e){var t=this;setTimeout((function(){t.onError(e)}))},n.onAlreadyPreReady=function(){var e=this;setTimeout((function(){e.onPreReady()}))},n.onAlreadyReady=function(e){var t=this;setTimeout((function(){t.onReady(e)}))},t.EVENTS=[],t}(p),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Ri(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(Xi(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(Ui),Zi=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.readyCount=0,n.preReadyCount=0,n.totalCount=0,n.totalErrorCount=0,n.isPreReadyOver=!0,n.elementInfos=[],n.options=Ii({loaders:{},prefix:"data-"},t),n}Ri(t,e);var n=t.prototype;return n.check=function(e){var t=this,n=this.options.prefix;this.clear(),this.elementInfos=Li(e).map((function(e,i){var r=t.getLoader(e,{prefix:n});return r.check(),r.on("error",(function(e){t.onError(i,e.target)})).on("preReady",(function(e){var n=t.elementInfos[i];n.hasLoading=e.hasLoading,n.isSkip=e.isSkip;var r=t.checkPreReady(i);t.onPreReadyElement(i),r&&t.onPreReady()})).on("ready",(function(e){var n=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=t.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=n&&t.checkPreReady(i),u=t.checkReady(i);n&&t.onPreReadyElement(i),t.onReadyElement(i),s&&t.onPreReady(),u&&t.onReady()})),{loader:r,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}}));var i=this.elementInfos.length;return this.totalCount=i,i||setTimeout((function(){t.onPreReady(),t.onReady()})),this},n.getTotalCount=function(){return this.totalCount},n.isPreReady=function(){return this.elementInfos.every((function(e){return e.isPreReady}))},n.isReady=function(){return this.elementInfos.every((function(e){return e.isReady}))},n.hasError=function(){return this.totalErrorCount>0},n.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){!e.isReady&&e.loader&&e.loader.destroy()})),this.elementInfos=[]},n.destroy=function(){this.clear(),this.off()},n.getLoader=function(e,t){var n=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=Object.keys(r);if(r[i])return new r[i](e,t);var a=new qi(e,t),s=Li(e.querySelectorAll(o.join(", ")));a.setHasLoading(s.some((function(e){return Mi(e)})));var u=!1,l=this.clone().on("error",(function(e){a.onError(e.target)})).on("ready",(function(){a.onReady(u)}));return a.on("requestChildren",(function(){var t=Gi(e,o,n.options.prefix);l.check(t).on("preReady",(function(e){(u=e.isReady)||a.onPreReady()}))})).on("reqeustReadyChildren",(function(){l.check(s)})).on("requestDestroy",(function(){l.destroy()})),a},n.clone=function(){return new t(Ii({},this.options))},n.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},n.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},n.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount})},n.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip})},n.onPreReady=function(){this.isPreReadyOver=!0,this.trigger("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()})},n.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip})},n.onReady=function(){this.trigger("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount})},n.getErrorCount=function(){return this.elementInfos.filter((function(e){return e.hasError})).length},n.hasLoading=function(){return this.elementInfos.some((function(e){return e.hasLoading}))},t}(p),Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),Si&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(Ui),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(Ui),Qi=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Ii({loaders:{img:Ki,video:Ji}},t))||this}return Ri(t,e),t}(Zi),$i=function(){function e(e){var t=e.align,n=void 0===t?k.CENTER:t,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=n,this._strategy=i}var t=e.prototype;return Object.defineProperty(t,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e;var t=U(e);this._panels.forEach((function(e){e.align=t}))},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._collectPanels(),this},t.destroy=function(){this._flicking=null,this._panels=[]},t.getPanel=function(e){return this._panels[e]||null},t.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},t.updatePanelSize=function(){var e=V(this._flicking),t=this._panels;if(t.length<=0)return this;if(e.panelsPerView>0){var n=t[0];n.resize(),this._updatePanelSizeByGrid(n,t)}else e.panels.forEach((function(e){return e.resize()}));return this},t.batchInsert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.batchInsertDefer.apply(this,s(e));return n.length<=0?[]:(this.updateAfterPanelChange(n,[]),n)},t.batchInsertDefer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=V(this._flicking),o=i[0],a=U(this._align),u=t.reduce((function(t,n){var u,l=K(n.index,i.length),c=i.slice(l),h=n.elements.map((function(t,n){return e._createPanel(t,{index:l+n,align:a,flicking:r})}));if(i.splice.apply(i,s([l,0],h)),n.hasDOMInElements&&e._insertPanelElements(h,null!==(u=c[0])&&void 0!==u?u:null),r.panelsPerView>0){var f=o||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach((function(e){return e.resize()}));return c.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),s(t,h)}),[]);return u},t.batchRemove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.batchRemoveDefer.apply(this,s(e));return n.length<=0?[]:(this.updateAfterPanelChange([],n),n)},t.batchRemoveDefer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=V(this._flicking),o=r.control,a=o.activePanel,u=t.reduce((function(t,n){var r=n.index,u=n.deleteCount,l=K(r,i.length),c=i.slice(l+u),h=i.splice(l,u);return h.length<=0?[]:(c.forEach((function(e){e.decreaseIndex(h.length),e.updatePosition()})),n.hasDOMInElements&&e._removePanelElements(h),h.forEach((function(e){return e.destroy()})),J(h,a)&&o.resetActive(),s(t,h))}),[]);return u},t.updateAfterPanelChange=function(e,t){var n,i=V(this._flicking),r=i.camera,o=i.control,a=this._panels,u=o.activePanel;if(this._updateCameraAndControl(),this.render(),!i.animating)if(!u||u.removed)if(a.length<=0)r.lookAt(0);else{var l=null!==(n=null==u?void 0:u.index)&&void 0!==n?n:0;l>a.length-1&&(l=a.length-1),o.moveToPanel(a[l],{duration:0}).catch((function(){}))}else o.moveToPanel(u,{duration:0}).catch((function(){}));i.camera.updateOffset(),(e.length>0||t.length>0)&&(i.trigger(new g(C.PANEL_CHANGE,{added:e,removed:t})),this.checkPanelContentsReady(s(e,t)))},t.checkPanelContentsReady=function(e){var t=this,n=V(this._flicking),i=n.resizeOnContentsReady,r=this._panels;if(i&&!n.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new Qi;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(t._flicking){var a=e[i.index],s=n.camera,u=n.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),n.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){t._flicking&&t.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){t._flicking&&t.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},t._updateCameraAndControl=function(){var e=V(this._flicking),t=e.camera,n=e.control;t.updateRange(),t.updateOffset(),t.updateAnchors(),t.resetNeedPanelHistory(),n.updateInput()},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in n||t.loading?t.markForShow():e.holding||t.markForHide()}))},t._updatePanelSizeByGrid=function(e,t){var n=V(this._flicking),i=n.panelsPerView;if(i<=0)throw new ce(P("panelsPerView",i),v.WRONG_OPTION);if(!(t.length<=0)){var r=(n.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,o=n.horizontal?{width:r}:{height:r},a={size:r,height:e.height,margin:e.margin};n.noPanelStyleOverride||this._strategy.updatePanelSizes(n,o),n.panels.forEach((function(e){return e.resize(a)}))}},t._removeAllChildsFromCamera=function(){for(var e=V(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},t._insertPanelElements=function(e,t){void 0===t&&(t=null);var n=V(this._flicking).camera.element,i=(null==t?void 0:t.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),n.insertBefore(r,i)},t._removePanelElements=function(e){var t=V(this._flicking).camera.element;e.forEach((function(e){t.removeChild(e.element)}))},e}(),er=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var o=n.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,t;return r(this,(function(n){return e=V(this._flicking),(t=this._strategy).updateRenderingPanels(e),t.renderPanels(e),this._resetPanelElementOrder(),[2]}))}))},o._collectPanels=function(){var e=V(this._flicking),t=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,t.children)},o._createPanel=function(e,t){return this._strategy.createPanel(e,t)},o._resetPanelElementOrder=function(){var e=V(this._flicking),t=e.camera.element,n=this._strategy.getRenderingElementsByOrder(e).reverse();n.forEach((function(e,i){var r=n[i-1]?n[i-1]:null;e.nextElementSibling!==r&&t.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=V(this._flicking).camera.element;G(e.childNodes).forEach((function(t){t.nodeType===Node.TEXT_NODE&&e.removeChild(t)}))},n}($i),tr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},n}($i),nr=function(){function e(e){var t=e.index,n=e.align,i=e.flicking,r=e.elementProvider;this._index=t,this._flicking=i,this._elProvider=r,this._align=n,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(t,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){var e=this._toggleDirection,t=this._flicking.camera.rangeDiff;return e!==S.NONE&&this._toggled?e===S.PREV?-t:t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(t,"outsetProgress",{get:function(){var e=this.position+this.offset,t=this._alignPos,n=this._flicking.camera,i=n.position;if(i===e)return 0;if(i<e){var r=e+(n.size-n.alignPosition)+t;return-ne(i,e,r)}var o=e-(n.alignPosition+this._size-t);return 1-ne(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRatio",{get:function(){var e=this.range,t=this._size,n=this.offset,i=this._flicking.camera.visibleRange,r=e.min+n,o=e.max+n;if(o<=i.min||r>=i.max)return 0;var a=t;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},t.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},t.resize=function(e){var t=this.element,i=this._flicking.horizontal;if(e)this._size=e.size,this._margin=n({},e.margin),this._height=e.height;else{var r=ie(t);this._size=i?t.offsetWidth:t.offsetHeight,this._margin=i?{prev:parseFloat(r.marginLeft||"0"),next:parseFloat(r.marginRight||"0")}:{prev:parseFloat(r.marginTop||"0"),next:parseFloat(r.marginBottom||"0")},this._height=i?t.offsetHeight:this._size}return this.updatePosition(),this._updateAlignPos(),this},t.setSize=function(e){return re(this.element,e),this},t.contains=function(e){var t;return!!(null===(t=this.element)||void 0===t?void 0:t.contains(e))},t.destroy=function(){this._resetInternalStates(),this._removed=!0},t.includePosition=function(e,t){return void 0===t&&(t=!1),this.includeRange(e,e,t)},t.includeRange=function(e,t,n){void 0===n&&(n=!1);var i=this._margin,r=this.range;return n&&(r.min-=i.prev,r.max+=i.next),t>=r.min&&e<=r.max},t.isVisibleOnRange=function(e,t){var n=this.range;return t>n.min&&e<n.max},t.focus=function(e){return this._flicking.moveTo(this._index,e)},t.prev=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(0===e?i-1:e-1):n.getPanel(e-1)},t.next=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(e===i-1?0:e+1):n.getPanel(e+1)},t.increaseIndex=function(e){return this._index+=Math.max(e,0),this},t.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},t.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},t.toggle=function(e,t){var n=this._toggleDirection,i=this._togglePosition;if(n===S.NONE||t===e)return!1;var r=this._toggled;return t>e?i>=e&&i<=t&&(this._toggled=n===S.NEXT):i<=e&&i>=t&&(this._toggled=n!==S.NEXT),r!==this._toggled},t.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=S.NONE,this._toggled=!1,this;var t=e.camera,n=t.range,i=t.alignPosition,r=t.visibleRange,o=r.max-r.min,a=n.min-i,s=n.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=S.PREV,this._togglePosition=this.range.max+n.min-n.max+i,this.toggle(1/0,t.position)):l?(this._toggleDirection=S.NEXT,this._togglePosition=this.range.min+n.max-o+i,this.toggle(-1/0,t.position)):(this._toggleDirection=S.NONE,this._togglePosition=0),this},t._updateAlignPos=function(){this._alignPos=B(this._align,this._size)},t._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=S.NONE},e}(),ir=function(){function e(e){var t=e.providerCtor;this._providerCtor=t}var t=e.prototype;return t.renderPanels=function(){},t.getRenderingIndexesByOrder=function(e){var t=e.renderer.panels.filter((function(e){return e.rendered})),n=t.filter((function(e){return e.toggled&&e.toggleDirection===S.PREV})),i=t.filter((function(e){return e.toggled&&e.toggleDirection===S.NEXT}));return s(n,t.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},t.getRenderingElementsByOrder=function(e){var t=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].element}))},t.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},t.collectPanels=function(e,t){var n=this,i=U(e.renderer.align);return t.map((function(t,r){return new nr({index:r,elementProvider:new n._providerCtor(t),align:i,flicking:e})}))},t.createPanel=function(e,t){return new nr(n(n({},t),{elementProvider:new this._providerCtor(e)}))},t.updatePanelSizes=function(e,t){e.panels.forEach((function(e){return e.setSize(t)}))},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in i||t.loading?t.markForShow():e.holding||t.markForHide()})),n.updateOffset()},e}(),rr=function(e){function n(t){var n=e.call(this,t)||this;return t.elementProvider.init(n),n._elProvider=t.elementProvider,n._cachedInnerHTML=null,n}t(n,e);var i=n.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,t=e.panelsPerView+1,n=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===S.NEXT?i+n:i-n),ae(i,t)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,t=e.renderPanel,n=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||t(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,n&&this.cacheRenderResult(r))},i.increaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,t)},i.decreaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,t)},n}(nr),or=function(){function e(){}var t=e.prototype;return t.renderPanels=function(e){var t=e.virtual,n=e.visiblePanels,i=se(e.panelsPerView+1);n.forEach((function(e){var n=e.elementIndex;e.render(),t.show(n),i[n]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){t.hide(e)}))},t.getRenderingIndexesByOrder=function(e){var t=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)}));return i.length<=0?t.elements.map((function(e,t){return t})):s(i.map((function(e){return e.elementIndex})),t.elements.map((function(e,t){return n(n({},e),{idx:t})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},t.getRenderingElementsByOrder=function(e){var t=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].nativeElement}))},t.updateRenderingPanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),n.updateOffset()},t.collectPanels=function(e){var t=U(e.renderer.align);return se(e.virtual.initialPanelCount).map((function(n){return new rr({index:n,elementProvider:new pe(e),align:t,flicking:e})}))},t.createPanel=function(e,t){return new rr(n(n({},t),{elementProvider:new pe(t.flicking)}))},t.updatePanelSizes=function(e,t){e.virtual.elements.forEach((function(e){re(e.nativeElement,t)})),e.panels.forEach((function(e){return e.setSize(t)}))},e}(),ar={__proto__:null,Renderer:$i,VanillaRenderer:er,ExternalRenderer:tr,NormalRenderingStrategy:ir,VirtualRenderingStrategy:or},sr=function(e){function o(t,n){var i=void 0===n?{}:n,r=i.align,o=void 0===r?k.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?j.LINEAR:f,p=i.bound,g=void 0!==p&&p,v=i.adaptive,m=void 0!==v&&v,_=i.panelsPerView,b=void 0===_?-1:_,y=i.noPanelStyleOverride,P=void 0!==y&&y,E=i.resizeOnContentsReady,x=void 0!==E&&E,T=i.needPanelThreshold,O=void 0===T?0:T,w=i.preventEventsBeforeInit,R=void 0===w||w,I=i.deceleration,A=void 0===I?.0075:I,C=i.duration,S=void 0===C?500:C,N=i.easing,D=void 0===N?function(e){return 1-Math.pow(1-e,3)}:N,z=i.inputType,L=void 0===z?["mouse","touch"]:z,H=i.moveType,F=void 0===H?"snap":H,V=i.threshold,G=void 0===V?40:V,B=i.interruptable,X=void 0===B||B,Y=i.bounce,W=void 0===Y?"20%":Y,U=i.iOSEdgeSwipeThreshold,q=void 0===U?30:U,Z=i.preventClickOnDrag,K=void 0===Z||Z,J=i.disableOnInit,Q=void 0!==J&&J,$=i.renderOnlyVisible,ee=void 0!==$&&$,te=i.virtual,ne=void 0===te?null:te,ie=i.autoInit,re=void 0===ie||ie,oe=i.autoResize,ae=void 0===oe||oe,se=i.useResizeObserver,ue=void 0===se||se,le=i.resizeDebounce,ce=void 0===le?0:le,de=i.maxResizeDebounce,pe=void 0===de?100:de,ve=i.externalRenderer,me=void 0===ve?null:ve,_e=i.renderExternal,be=void 0===_e?null:_e,ye=e.call(this)||this;return ye._initialized=!1,ye._plugins=[],ye._align=o,ye._defaultIndex=s,ye._horizontal=l,ye._circular=h,ye._circularFallback=d,ye._bound=g,ye._adaptive=m,ye._panelsPerView=b,ye._noPanelStyleOverride=P,ye._resizeOnContentsReady=x,ye._virtual=ne,ye._needPanelThreshold=O,ye._preventEventsBeforeInit=R,ye._deceleration=A,ye._duration=S,ye._easing=D,ye._inputType=L,ye._moveType=F,ye._threshold=G,ye._interruptable=X,ye._bounce=W,ye._iOSEdgeSwipeThreshold=q,ye._preventClickOnDrag=K,ye._disableOnInit=Q,ye._renderOnlyVisible=ee,ye._autoInit=re,ye._autoResize=ae,ye._useResizeObserver=ue,ye._resizeDebounce=ce,ye._maxResizeDebounce=pe,ye._externalRenderer=me,ye._renderExternal=be,ye._viewport=new he(M(t)),ye._autoResizer=new fe(ye),ye._renderer=ye._createRenderer(),ye._camera=ye._createCamera(),ye._control=ye._createControl(),ye._virtualManager=new ge(ye,ne),ye._autoInit&&ye.init(),ye}t(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var t=this._control.controller;e?t.addPreventClickHandler():t.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),a.init=function(){var e=this;if(this._initialized)return Promise.resolve();var t=this._camera,n=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return t.init(),r.init(),n.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),n.checkPanelContentsReady(n.panels),n.render().then((function(){e._plugins.forEach((function(t){return t.init(e)})),e._initialized=!0,a&&(e.trigger=o),e.trigger(new g(C.READY))}))},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},a.prev=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.prev())||void 0===n?void 0:n.index)&&void 0!==i?i:-1,e,S.PREV)},a.next=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.next())||void 0===n?void 0:n.index)&&void 0!==i?i:this._renderer.panelCount,e,S.NEXT)},a.moveTo=function(e,t,n){void 0===t&&(t=this._duration),void 0===n&&(n=S.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new ce(R,v.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(o,{duration:t,direction:n}):Promise.reject(new ce(E(e,0,r-1),v.INDEX_OUT_OF_RANGE))},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var t,n,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map((function(e){var t={index:e.index};return l&&(t.html=e.element.outerHTML),t}))};if(o&&(d.index=this.index),s){var p=f.findNearestAnchor(f.position);p&&(d.position={panel:p.panel.index,progressInPanel:f.getProgressInPanel(p.panel)})}if(h){var g=this.visiblePanels;d.visibleOffset=null!==(n=null===(t=g[0])||void 0===t?void 0:t.index)&&void 0!==n?n:0}return d},a.setStatus=function(e){var t;if(!this._initialized)throw new ce(A,v.NOT_INITIALIZED);var n=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(t=o[0])||void 0===t?void 0:t.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),n){var u=r?n-r:n;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===N.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch((function(){}))}},a.addPlugins=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._initialized&&n.forEach((function(e){return e.init(t)})),(e=this._plugins).push.apply(e,s(n)),this},a.removePlugins=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){var n=te(e._plugins,(function(e){return e===t}));n>=0&&(t.destroy(),e._plugins.splice(n,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,t,n,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return e=this._viewport,t=this._renderer,n=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?n.getProgressInPanel(o):0,this.trigger(new g(C.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),[4,t.forceRenderAllPanels()];case 1:return r.sent(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),[4,t.render()];case 2:return r.sent(),i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new g(C.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),[2]}}))}))},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,t){if(this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(t),hasDOMInElements:!0})},a.remove=function(e,t){if(void 0===t&&(t=1),this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!0})},a._createControl=function(){var e,t=this._moveType,n=Object.keys(N).map((function(e){return N[e]})),i=Array.isArray(t)?t[0]:t,r=Array.isArray(t)&&null!==(e=t[1])&&void 0!==e?e:{};if(!J(n,i))throw new ce(P("moveType",JSON.stringify(t)),v.WRONG_OPTION);switch(i){case N.SNAP:return new vi(r);case N.FREE_SCROLL:return new mi(r);case N.STRICT:return new _i(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Ti(this,{align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,t=e.renderer,i=e.rendererOptions;return new t(n({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new er({align:this._align,strategy:e?new or:new ir({providerCtor:de})})},a._moveToInitialPanel=function(){var e=this._renderer,t=this._control,n=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=n.findNearestAnchor(i.position);if(t.setActive(i,null,!1),!r)throw new ce(x(i.position),v.POSITION_NOT_REACHABLE);var o=i.position;n.canReach(i)||(o=r.position),n.lookAt(o),t.updateInput(),n.updateOffset()}},a._initialResize=function(){var e=this._viewport,t=this._renderer,n=this._camera,i=this._control;this.trigger(new g(C.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),n.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new g(C.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.6.2",o}(p),ur=function(e,t,n,i,r){return e.batchInsertDefer.apply(e,s(t.added.slice(i,r).map((function(e,t){return{index:e,elements:[n[t]],hasDOMInElements:!1}}))))},lr=function(e,t,n){var i=e.panels.slice(t,n);return e.batchRemoveDefer({index:t,deleteCount:i.length,hasDOMInElements:!1})},cr=function(e){var t="object"==typeof e?e.camera:e;return fr(t)},hr=function(e){var t="object"==typeof e?e.panel:e;return W(fr(t))},fr=function(e){if("number"==typeof e)return e+"px";switch(e){case k.CENTER:return"50%";case k.NEXT:return"100%";case k.PREV:return"0%";default:return e}},dr={__proto__:null,withFlickingMethods:function(e,t){[p.prototype,sr.prototype].forEach((function(n){Object.getOwnPropertyNames(n).filter((function(t){return!e[t]&&0!==t.indexOf("_")&&"constructor"!==t})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(e=r.value).call.apply(e,s([this[t]],n))}});else{var o={};r.get&&(o.get=function(){var e,n=this[t];return n&&(null===(e=r.get)||void 0===e?void 0:e.call(n))}),r.set&&(o.set=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[t]],n))}),Object.defineProperty(e,i,o)}}))}))},sync:function(e,t,n){var i=e.renderer,r=i.panels,o=s(t.prevList),u=[],l=[];if(t.removed.length>0){var c=-1,h=-1;t.removed.forEach((function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s(lr(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)})),l.push.apply(l,s(lr(i,h,c+1)))}if(t.ordered.forEach((function(e){var t=a(e,2),n=t[0],i=t[1],o=r.splice(n,1)[0];r.splice(i,0,o)})),t.ordered.length>0&&(r.forEach((function(e,t){var n=t-e.index;n>0?e.increaseIndex(n):e.decreaseIndex(-n)})),r.sort((function(e,t){return e.index-t.index})),r.forEach((function(e){e.updatePosition()}))),t.added.length>0){var f=-1,d=-1,p=n.slice(o.length);t.added.forEach((function(e,n){f<0&&(f=n),d>=0&&e!==d+1?(u.push.apply(u,s(ur(i,t,p,f,n+1))),f=-1,d=-1):d=e})),f>=0&&u.push.apply(u,s(ur(i,t,p,f)))}(t.added.length>0||t.removed.length>0)&&i.updateAfterPanelChange(u,l)},getRenderingPanels:function(e,t){var n=t.removed.reduce((function(e,t){return e[t]=!0,e}),{}),i=t.maintained.reduce((function(e,t){var n=a(t,2),i=n[0],r=n[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!n[e.index]})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)})).map((function(e){return t.list[i[e.index]]})),t.added.map((function(e){return t.list[e]})))},getDefaultCameraTransform:function(e,t,n){void 0===e&&(e=k.CENTER),void 0===t&&(t=!0);var i=cr(e),r=hr(e);if(null==r)return"";var o="calc("+i+" - ("+(n||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return t?"translate("+o+")":"translate(0, "+o+")"}};return L(sr,{__proto__:null,Viewport:he,FlickingError:ce,AnchorPoint:gi,VirtualManager:ge,VanillaElementProvider:de,VirtualElementProvider:pe,Panel:nr,VirtualPanel:rr}),L(sr,Oi),L(sr,bi),L(sr,ar),L(sr,z),L(sr,dr),L(sr,le),sr}));
|
|
9
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};function i(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var h,f=function(e){return void 0===e},d=function(){function e(e,t){var n,i;if(this._canceled=!1,t)try{for(var r=u(Object.keys(t)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=t[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=e}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),p=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=e instanceof d?e.eventType:e,r=c(this._eventHandler[i]||[]);return r.length<=0||(e instanceof d?(e.currentTarget=this,r.forEach((function(t){t(e)}))):r.forEach((function(e){e.apply(void 0,c(t))}))),this},t.once=function(e,t){var n=this;if("object"==typeof e&&f(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(void 0,c(i)),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&f(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];f(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(f(e))return this._eventHandler={},this;if(f(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var l=u(a),c=l.next();!c.done;c=l.next()){if(c.value===t){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.2",e}(),g=d,v={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13,NOT_ALLOWED_IN_VIRTUAL:14},m=function(e,t){return e+"("+typeof e+") is not a "+t.map((function(e){return'"'+e+'"'})).join(" or ")+"."},_=function(e){return'Element with selector "'+e+'" not found.'},b=function(e,t){return t+" should be provided. Given: "+e},y='This module is not attached to the Flicking instance. "init()" should be called first.',P=function(e,t){return'Option "'+e+'" is not in correct format, given: '+t},E=function(e,t,n){return'Index "'+e+'" is out of range: should be between '+t+" and "+n+"."},x=function(e){return'Position "'+e+'" is not reachable.'},T="Browser does not support CSS transform.",O="Event stop() is called by user.",w="Animation is interrupted by user input.",R="Animation is already playing.",I="This behavior is not allowed in the frameworks like React, Vue, or Angular.",A="Flicking is not initialized yet, call init() first.",C={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},k={PREV:"prev",CENTER:"center",NEXT:"next"},S={PREV:"PREV",NEXT:"NEXT",NONE:null},N={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},D={VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},j={LINEAR:"linear",BOUND:"bound"},z={__proto__:null,EVENTS:C,ALIGN:k,DIRECTION:S,MOVE_TYPE:N,CLASS:D,CIRCULAR_FALLBACK:j,ERROR_CODE:v},L=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},M=function(e,t){var n=null;if(Q(e)){var i=(t||document).querySelector(e);if(!i)throw new ce(_(e),v.ELEMENT_NOT_FOUND);n=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(n=e);if(!n)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);return n},H=function(e,t){if(null==e)throw new ce(b(e,t),v.VAL_MUST_NOT_NULL)},F=function(e,t,n){return Math.max(Math.min(e,n),t)},V=function(e){if(!e)throw new ce(y,v.NOT_ATTACHED_TO_FLICKING);return e},G=function(e){return[].slice.call(e)},B=function(e,t){var n;if(Q(e))switch(e){case k.PREV:n=0;break;case k.CENTER:n=.5*t;break;case k.NEXT:n=t;break;default:if(null==(n=Y(e,t)))throw new ce(P("align",e),v.WRONG_OPTION)}else n=e;return n},X=function(e,t){var n;if(Array.isArray(e))n=e.map((function(e){return Y(e,t)}));else{var i=Y(e,t);n=[i,i]}return n.map((function(t){if(null==t)throw new ce(P("bounce",e),v.WRONG_OPTION);return t}))},Y=function(e,t){var n=W(e);return null==n?null:n.percentage*t+n.absolute},W=function(e){var t=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var n={percentage:0,absolute:0},i=0,r=t.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],u=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var l="+"===o?1:-1;"%"===s?n.percentage+=l*(u/100):n.absolute+=l*u,++i,r=t.exec(e)}return 0===i?null:n},U=function(e){return"object"==typeof e?e.panel:e},q=function(e,t){return e===t?S.NONE:e<t?S.NEXT:S.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var t=[];return e.forEach((function(e){if(Q(e)){var n=document.createElement("div");for(n.innerHTML=e,t.push.apply(t,s(G(n.children)));n.firstChild;)n.removeChild(n.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);t.push(e)}})),t},K=function(e,t){return F(e<0?e+t:e,0,t)},J=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===t)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return!1},Q=function(e){return"string"==typeof e},$=function(e,t,n){var i=n-t;if(e<t)e=n-(t-e)%i;else if(e>n){e=t+(e-n)%i}return e},ee=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(t(s))return s}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return null},te=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},ne=function(e,t,n){return(e-t)/(n-t)},ie=function(e){return window.getComputedStyle(e)||e.currentStyle},re=function(e,t){var n=t.width,i=t.height;null!=n&&(Q(n)?e.style.width=n:e.style.width=n+"px"),null!=i&&(Q(i)?e.style.height=i:e.style.height=i+"px")},oe=function(e,t,n){return e>=t&&e<=n},ae=function(e,t){return e>=t?e%t:e<0?K((e+1)%t-1,t):e},se=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=n;return t},ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},le={__proto__:null,merge:L,getElement:M,checkExistence:H,clamp:F,getFlickingAttached:V,toArray:G,parseAlign:B,parseBounce:X,parseArithmeticSize:Y,parseArithmeticExpression:W,parseCSSSizeValue:function(e){return Q(e)?e:e+"px"},parsePanelAlign:U,getDirection:q,parseElement:Z,getMinusCompensatedIndex:K,includes:J,isString:Q,circulatePosition:$,find:ee,findRight:function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(t(i))return i}return null},findIndex:te,getProgress:ne,getStyle:ie,setSize:re,isBetween:oe,circulateIndex:ae,range:se,setPrototypeOf:ue},ce=function(e){function n(t,i){var r=e.call(this,t)||this;return ue(r,n.prototype),r.name="FlickingError",r.code=i,r}return t(n,e),n}(Error),he=function(){function e(e){this._el=e,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),t.setSize=function(e){var t=e.width,n=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=t)if(Q(t))i.style.width=t;else{var a=o?t+r.left+r.right:t;i.style.width=a+"px"}if(null!=n)if(Q(n))i.style.height=n;else{var s=o?n+r.top+r.bottom:n;i.style.height=s+"px"}this.resize()},t.resize=function(){var e=this._el,t=ie(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:t.paddingLeft?parseFloat(t.paddingLeft):0,right:t.paddingRight?parseFloat(t.paddingRight):0,top:t.paddingTop?parseFloat(t.paddingTop):0,bottom:t.paddingBottom?parseFloat(t.paddingBottom):0},this._isBorderBoxSizing="border-box"===t.boxSizing},e}(),fe=function(){function e(e){var t,n=this;this._onResize=function(){var e=n._flicking,t=e.resizeDebounce,i=e.maxResizeDebounce;t<=0?e.resize():(n._maxResizeDebounceTimer<=0&&i>0&&i>=t&&(n._maxResizeDebounceTimer=window.setTimeout(n._doScheduledResize,i)),n._resizeTimer>0&&(clearTimeout(n._resizeTimer),n._resizeTimer=0),n._resizeTimer=window.setTimeout(n._doScheduledResize,t))},this._doScheduledResize=function(){clearTimeout(n._resizeTimer),clearTimeout(n._maxResizeDebounceTimer),n._maxResizeDebounceTimer=-1,n._resizeTimer=-1,n._flicking.resize()},this._skipFirstResize=(t=!0,function(){t?t=!1:n._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var t=e.prototype;return Object.defineProperty(t,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),t.enable=function(){var e=this._flicking,t=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var n=0!==t.width||0!==t.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);n.observe(e.viewport.element),this._resizeObserver=n}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},t.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),de=function(){function e(e){this._element=e,this._rendered=!0}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),t.show=function(e){var t=this.element,n=e.camera.element;t.parentElement!==n&&(n.appendChild(t),this._rendered=!0)},t.hide=function(e){var t=this.element,n=e.camera.element;t.parentElement===n&&(n.removeChild(t),this._rendered=!1)},e}(),pe=function(){function e(e){this._flicking=e}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(t,"_virtualElement",{get:function(){var e=this._flicking,t=this._panel.elementIndex;return e.virtual.elements[t]},enumerable:!1,configurable:!0}),t.init=function(e){this._panel=e},t.show=function(){},t.hide=function(){},e}(),ge=function(){function e(e,t){var n,i,r,o;this._flicking=e,this._renderPanel=null!==(n=null==t?void 0:t.renderPanel)&&void 0!==n?n:function(){return""},this._initialPanelCount=null!==(i=null==t?void 0:t.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==t?void 0:t.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==t?void 0:t.panelClass)&&void 0!==o?o:D.DEFAULT_VIRTUAL,this._elements=[]}var t=e.prototype;return Object.defineProperty(t,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var t=e.camera.children;this._elements=t.map((function(e){return{nativeElement:e,visible:!0}}))}},t.show=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!0,n.style.display&&(n.style.display="")},t.hide=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!1,n.style.display="none"},t.append=function(e){void 0===e&&(e=1);var t=this._flicking;return this.insert(t.panels.length,e)},t.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},t.insert=function(e,t){return void 0===t&&(t=1),t<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:se(t),hasDOMInElements:!1})},t.remove=function(e,t){return t<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!1})},t._initVirtualElements=function(){var e=this,t=this._flicking,n=t.camera.element,i=t.panelsPerView,r=document.createDocumentFragment();se(i+1).map((function(t){var n=document.createElement("div");return n.className=e._panelClass,n.dataset.elementIndex=t.toString(),n})).forEach((function(e){r.appendChild(e)})),n.appendChild(r)},e}();function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ve.apply(this,arguments)}function me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}h="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var be,ye=h,Pe=["","webkit","Moz","MS","ms","o"],Ee="undefined"==typeof document?{style:{}}:document.createElement("div"),xe=Math.round,Te=Math.abs,Oe=Date.now;function we(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<Pe.length;){if((i=(n=Pe[o])?n+r:t)in e)return i;o++}}be="undefined"==typeof window?{}:window;var Re=we(Ee.style,"touchAction"),Ie=void 0!==Re;var Ae="compute",Ce="auto",ke="manipulation",Se="none",Ne="pan-x",De="pan-y",je=function(){if(!Ie)return!1;var e={},t=be.CSS&&be.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||be.CSS.supports("touch-action",n)})),e}(),ze="ontouchstart"in be,Le=void 0!==we(be,"PointerEvent"),Me=ze&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),He="touch",Fe="mouse",Ve=16,Ge=24,Be=["x","y"],Xe=["clientX","clientY"];function Ye(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function We(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function Ue(e,t){return e.indexOf(t)>-1}var qe=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Ae&&(e=this.compute()),Ie&&this.manager.element.style&&je[e]&&(this.manager.element.style[Re]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Ye(this.manager.recognizers,(function(t){We(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Ue(e,Se))return Se;var t=Ue(e,Ne),n=Ue(e,De);return t&&n?Se:t||n?t?Ne:De:Ue(e,ke)?ke:Ce}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=Ue(i,Se)&&!je.none,o=Ue(i,De)&&!je["pan-y"],a=Ue(i,Ne)&&!je["pan-x"];if(r){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return r||o&&6&n||a&&n&Ge?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ze(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Ke(e){var t=e.length;if(1===t)return{x:xe(e[0].clientX),y:xe(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:xe(n/t),y:xe(i/t)}}function Je(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:xe(e.pointers[n].clientX),clientY:xe(e.pointers[n].clientY)},n++;return{timeStamp:Oe(),pointers:t,center:Ke(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Qe(e,t,n){n||(n=Be);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function $e(e,t,n){n||(n=Be);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function et(e,t){return e===t?1:Te(e)>=Te(t)?e<0?2:4:t<0?8:Ve}function tt(e,t,n){return{x:t/e||0,y:n/e||0}}function nt(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=Je(t)),r>1&&!n.firstMultiple?n.firstMultiple=Je(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=Ke(i);t.timeStamp=Oe(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=$e(s,u),t.distance=Qe(s,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=et(t.deltaX,t.deltaY);var l,c,h=tt(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=Te(h.x)>Te(h.y)?h.x:h.y,t.scale=a?(l=a.pointers,Qe((c=i)[0],c[1],Xe)/Qe(l[0],l[1],Xe)):1,t.rotation=a?function(e,t){return $e(t[1],t[0],Xe)+$e(e[1],e[0],Xe)}(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(8!==t.eventType&&(s>25||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=tt(s,u,l);i=c.x,r=c.y,n=Te(c.x)>Te(c.y)?c.x:c.y,o=et(u,l),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var f,d=e.element,p=t.srcEvent;Ze(f=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,d)&&(d=f),t.target=d}function it(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,a=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,nt(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function rt(e){return e.trim().split(/\s+/g)}function ot(e,t,n){Ye(rt(t),(function(t){e.addEventListener(t,n,!1)}))}function at(e,t,n){Ye(rt(t),(function(t){e.removeEventListener(t,n,!1)}))}function st(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var ut=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){We(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(st(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&at(this.element,this.evEl,this.domHandler),this.evTarget&&at(this.target,this.evTarget,this.domHandler),this.evWin&&at(st(this.element),this.evWin,this.domHandler)},e}();function lt(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var ct={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ht={2:He,3:"pen",4:Fe,5:"kinect"},ft="pointerdown",dt="pointermove pointerup pointercancel";be.MSPointerEvent&&!be.PointerEvent&&(ft="MSPointerDown",dt="MSPointerMove MSPointerUp MSPointerCancel");var pt=function(e){function t(){var n,i=t.prototype;return i.evEl=ft,i.evWin=dt,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return me(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ct[i],o=ht[e.pointerType]||e.pointerType,a=o===He,s=lt(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(ut);function gt(e){return Array.prototype.slice.call(e,0)}function vt(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];lt(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}var mt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},_t="touchstart touchmove touchend touchcancel",bt=function(e){function t(){var n;return t.prototype.evTarget=_t,(n=e.apply(this,arguments)||this).targetIds={},n}return me(t,e),t.prototype.handler=function(e){var t=mt[e.type],n=yt.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})},t}(ut);function yt(e,t){var n,i,r=gt(e.touches),o=this.targetIds;if(3&t&&1===r.length)return o[r[0].identifier]=!0,[r,r];var a=gt(e.changedTouches),s=[],u=this.target;if(i=r.filter((function(e){return Ze(e.target,u)})),1===t)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),12&t&&delete o[a[n].identifier],n++;return s.length?[vt(i.concat(s),"identifier",!0),s]:void 0}var Pt={mousedown:1,mousemove:2,mouseup:4},Et="mousedown",xt="mousemove mouseup",Tt=function(e){function t(){var n,i=t.prototype;return i.evEl=Et,i.evWin=xt,(n=e.apply(this,arguments)||this).pressed=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Pt[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Fe,srcEvent:e}))},t}(ut);function Ot(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function wt(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,Ot.call(this,t)):12&e&&Ot.call(this,t)}function Rt(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}var It=function(){return function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handler=function(e,t,n){var r=n.pointerType===He,o=n.pointerType===Fe;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)wt.call(_e(_e(i)),t,n);else if(o&&Rt.call(_e(_e(i)),n))return;i.callback(e,t,n)}},i.touch=new bt(i.manager,i.handler),i.mouse=new Tt(i.manager,i.handler),i.primaryTouch=null,i.lastTouches=[],i}return me(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(ut)}();function At(e,t,n){return!!Array.isArray(e)&&(Ye(e,n[t],n),!0)}var Ct=32,kt=1;function St(e,t){var n=t.manager;return n?n.get(e):e}function Nt(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Dt=function(){function e(e){void 0===e&&(e={}),this.options=ve({enable:!0},e),this.id=kt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return ye(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(At(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=St(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return At(e,"dropRecognizeWith",this)||(e=St(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(At(e,"requireFailure",this))return this;var t=this.requireFail;return-1===lt(t,e=St(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(At(e,"dropRequireFailure",this))return this;e=St(e,this);var t=lt(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Nt(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Nt(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ct},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=ye({},e);if(!We(this.options.enable,[this,t]))return this.reset(),void(this.state=Ct);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),jt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ke]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&o&&i){if(4!==e.eventType)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Qe(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0===this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Ct},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Ct}),this.options.interval),Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Dt),zt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({pointers:1},t))||this}me(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Ct},t}(Dt);function Lt(e){return e===Ve?"down":8===e?"up":2===e?"left":4===e?"right":""}var Mt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"pan",threshold:10,pointers:1,direction:30},t))||this).pX=null,n.pY=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(De),e&Ge&&t.push(Ne),t},n.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:Ve,n=a!==this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},n.attrTest=function(e){return zt.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Lt(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(zt),Ht=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return Mt.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,i=this.options.direction;return 30&i?n=t.overallVelocity:6&i?n=t.overallVelocityX:i&Ge&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Te(n)>this.options.velocity&&4&t.eventType},n.emit=function(e){var t=Lt(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(zt),Ft=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"pinch",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Se]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(zt),Vt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"rotate",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Se]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(zt),Gt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ce]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||12&e.eventType&&!o)this.reset();else if(1&e.eventType)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(4&e.eventType)return 8;return Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Oe(),this.manager.emit(this.options.event,this._input)))},t}(Dt),Bt={domEvents:!1,touchAction:Ae,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Xt=[[Vt,{enable:!1}],[Ft,{enable:!1},["rotate"]],[Ht,{direction:6}],[Mt,{direction:6},["swipe"]],[jt],[jt,{event:"doubletap",taps:2},["tap"]],[Gt]];function Yt(e,t){var n,i=e.element;i.style&&(Ye(e.options.cssProps,(function(r,o){n=we(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var Wt=function(){function e(e,t){var n,i=this;this.options=ye({},Bt,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(Le?pt:Me?bt:ze?It:Tt))(n,it),this.touchAction=new qe(this,this.options.touchAction),Yt(this,!0),Ye(this.options.recognizers,(function(e){var t=i.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return ye(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(t.curRecognizer=null,r=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(t.curRecognizer=n,r=n),o++}},t.get=function(e){if(e instanceof Dt)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(At(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(At(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,i=lt(n,t);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return Ye(rt(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return Ye(rt(e),(function(e){t?n[e]&&n[e].splice(lt(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},t.destroy=function(){this.element&&Yt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Ut={touchstart:1,touchmove:2,touchend:4,touchcancel:8},qt="touchstart",Zt="touchstart touchmove touchend touchcancel",Kt=function(e){function t(){var n,i=t.prototype;return i.evTarget=qt,i.evWin=Zt,(n=e.apply(this,arguments)||this).started=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Ut[e.type];if(1===t&&(this.started=!0),this.started){var n=Jt.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})}},t}(ut);function Jt(e,t){var n=gt(e.touches),i=gt(e.changedTouches);return 12&t&&(n=vt(n.concat(i),"identifier",!0)),[n,i]}function Qt(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=window.console&&(window.console.warn||window.console.log);return r&&r.call(window.console,i,n),e.apply(this,arguments)}}var $t=Qt((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&void 0===e[i[r]])&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),en=Qt((function(e,t){return $t(e,t,!0)}),"merge","Use `assign`.");function tn(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&ye(i,n)}function nn(e,t){return function(){return e.apply(t,arguments)}}function rn(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function on(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function an(e,t){try{return new RegExp(e,"g").exec(t)}catch(e){return null}}function sn(e){return e.replace(/_/g,".")}function un(e,t){var n=null,i="-1";return rn(e,(function(e){var r=an("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!r||e.brand)&&(n=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,t){var n=an("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t);return n?n[3]:""}(e.versionTest.toLowerCase(),t)||i),i=sn(i),!0)})),{preset:n,version:i}}function ln(e,t){var n={brand:"",version:"-1"};return rn(e,(function(e){var i=cn(t,e);return!!i&&(n.brand=e.id,n.version=e.versionAlias||i.version,"-1"!==n.version)})),n}function cn(e,t){return on(e,(function(e){var n=e.brand;return an(""+t.test,n.toLowerCase())}))}(function(){var e=function(e,t){return void 0===t&&(t={}),new Wt(e,ve({recognizers:Xt.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=Ve,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=Ge,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=Ve,e.INPUT_START=1,e.INPUT_MOVE=2,e.INPUT_END=4,e.INPUT_CANCEL=8,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Ct,e.Manager=Wt,e.Input=ut,e.TouchAction=qe,e.TouchInput=bt,e.MouseInput=Tt,e.PointerEventInput=pt,e.TouchMouseInput=It,e.SingleTouchInput=Kt,e.Recognizer=Dt,e.AttrRecognizer=zt,e.Tap=jt,e.Pan=Mt,e.Swipe=Ht,e.Pinch=Ft,e.Rotate=Vt,e.Press=Gt,e.on=ot,e.off=at,e.each=Ye,e.merge=en,e.extend=$t,e.bindFn=nn,e.assign=ye,e.inherit=tn,e.bindFn=nn,e.prefixed=we,e.toArray=gt,e.inArray=lt,e.uniqueArray=vt,e.splitStr=rt,e.boolOrFn=We,e.hasParent=Ze,e.addEventListeners=ot,e.removeEventListeners=at,e.defaults=ye({},Bt,{preset:Xt}),e})().defaults;var hn=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],fn=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],dn=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],pn=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],gn=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function vn(e){var t=function(e){var t=e;if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(e),n=!!/mobi/g.exec(t),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!un(pn,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=un(hn,t),a=o.preset,s=o.version,u=un(gn,t),l=u.preset,c=u.version,h=un(fn,t);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=un(dn,t);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}function mn(e){return void 0===e}var _n=function(){function e(){this.options={},this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this._eventHandler[e]||[],o=r.length>0;if(!o)return!0;var a=n[0]||{},s=n.slice(1);r=r.concat();var u=!1;a.eventType=e,a.stop=function(){u=!0},a.currentTarget=this;var l=[a];return s.length>=1&&(l=l.concat(s)),r.forEach((function(e){e.apply(t,l)})),!u},t.once=function(e,t){var n=this;if("object"==typeof e&&mn(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(n,i),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&mn(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];mn(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(mn(e))return this._eventHandler={},this;if(mn(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),l=u.next();!l.done;l=u.next()){if(l.value===t){a.splice(s,1);break}s++}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="2.2.2",e}(),bn=function(e,t){return bn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},bn(e,t)};var yn,Pn=function(){return Pn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Pn.apply(this,arguments)};function En(e,t,n,i){var r=e,o=[n[0]?t[0]:i?t[0]-i[0]:t[0],n[1]?t[1]:i?t[1]+i[1]:t[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)}function xn(e,t){return e<t[0]||e>t[1]}function Tn(e,t,n){return n[1]&&e>t[1]||n[0]&&e<t[0]}function On(e,t,n){var i=e,r=t[0],o=t[1],a=o-r;return n[1]&&e>o&&(i=(i-o)%a+r),n[0]&&e<r&&(i=(i-r)%a+o),i}function wn(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function Rn(e,t){var n;if(void 0===t&&(t=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,n=wn(i.childNodes)}else n=wn(document.querySelectorAll(e));t||(n=n.length>=1?n[0]:void 0)}else e===yn?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in yn&&e instanceof jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map((function(e){return Rn(e)})),t||(n=n.length>=1?n[0]:void 0)):n=e;return n}var In=(yn="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||yn.webkitRequestAnimationFrame,An=yn.cancelAnimationFrame||yn.webkitCancelAnimationFrame;if(In&&!An){var Cn={},kn=In;In=function(e){var t=kn((function(n){Cn[t]&&e(n)}));return Cn[t]=!0,t},An=function(e){delete Cn[e]}}else In&&An||(In=function(e){return yn.setTimeout((function(){e(yn.performance&&yn.performance.now&&yn.performance.now()||(new Date).getTime())}),16)},An=yn.clearTimeout);function Sn(e,t){var n={};for(var i in e)i&&(n[i]=t(e[i],i));return n}function Nn(e,t){var n={};for(var i in e)i&&t(e[i],i)&&(n[i]=e[i]);return n}function Dn(e,t){for(var n in e)if(n&&!t(e[n],n))return!1;return!0}function jn(e,t){return Dn(e,(function(e,n){return e===t[n]}))}var zn={};function Ln(e,t){var n,i;return zn[t]||(zn[t]=(i=(n=t)<1?Math.pow(10,Hn(n)):1,function(e){return 0===n?0:Math.round(Math.round(e/n)*n*i)/i})),zn[t](e)}function Mn(e,t){if(!e||!t)return e;var n="number"==typeof t;return Sn(e,(function(e,i){return Ln(e,n?t:t[i])}))}function Hn(e){if(!isFinite(e))return 0;var t=e+"";if(t.indexOf("e")>=0){for(var n=0,i=1;Math.round(e*i)/i!==e;)i*=10,n++;return n}return t.indexOf(".")>=0?t.length-t.indexOf(".")-1:0}function Fn(e,t,n){return Math.max(Math.min(e,n),t)}var Vn,Gn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm;this.options=t,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var t=e.prototype;return t.getDuration=function(e,t,n){var i,r=this;if(void 0!==n)i=n;else{var o=Sn(t,(function(t,n){return function(e,t){var n=Math.sqrt(e/t*2);return n<100?0:n}(Math.abs(t-e[n]),r.options.deceleration)}));i=Object.keys(o).reduce((function(e,t){return Math.max(e,o[t])}),-1/0)}return Fn(i,this.options.minimumDuration,this.options.maximumDuration)},t.createAnimationParam=function(e,t,n){var i=this.axm.get(),r=e,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:Fn(t,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},t.grab=function(e,t){if(this._animateParam&&e.length){var n=this.axm.get(e),i=this.axm.map(n,(function(e,t){return On(e,t.range,t.circular)}));Dn(i,(function(e,t){return n[t]===e}))||this.em.triggerChange(i,!1,n,t,!!t),this._animateParam=null,this._raf&&(r=this._raf,An(r)),this._raf=null,this.em.triggerAnimationEnd(!(!t||!t.event))}var r},t.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},t.restore=function(e){var t=this.axm.get(),n=this.axm.map(t,(function(e,t){return Math.min(t.range[1],Math.max(t.range[0],e))}));this.animateTo(n,this.getDuration(t,n),e)},t.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var t=this.axm.filter(this.axm.get(),(function(e,t){return Tn(e,t.range,t.circular)}));Object.keys(t).length>0&&this.setTo(this.axm.map(t,(function(e,t){return On(e,t.range,t.circular)}))),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!e),this.axm.isOutside()?this.restore(e):this.finish(!!e)},t.finish=function(e){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(e)},t.animateLoop=function(e,t){if(e.duration){this._animateParam=Pn({},e);var n=this._animateParam,i=this,r=n.destPos,o=n.depaPos,a=0,s=Sn(o,(function(e,t){return e<=r[t]?1:-1})),u=Sn(r,(function(e){return e})),l=(new Date).getTime();n.startTime=l,function c(){i._raf=null;var h=(new Date).getTime(),f=(h-n.startTime)/e.duration,d=i.easing(f),p=i.axm.map(o,(function(e,t,i){var u=f>=1?r[i]:e+n.delta[i]*(d-a),l=On(u,t.range,t.circular);if(u!==l){var c=s[i]*(t.range[1]-t.range[0]);r[i]-=c,o[i]-=c}return l})),g=!i.em.triggerChange(p,!1,o);if(o=p,l=h,a=d,d>=1)return jn(r=i.getFinalPos(r,u),i.axm.get(Object.keys(r)))||i.em.triggerChange(r,!0,o),void t();g?i.finish(!1):i._raf=In(c)}()}else this.em.triggerChange(e.destPos,!0),t()},t.getFinalPos=function(e,t){var n=this,i=1e-6;return Sn(e,(function(e,r){return e>=t[r]-i&&e<=t[r]+i?t[r]:Ln(e,n.getRoundUnit(e,r))}))},t.getRoundUnit=function(e,t){var n,i=this.options.round,r=null;if(!i){var o=this.axm.getAxisOptions(t);n=Math.max(Hn(o.range[0]),Hn(o.range[1]),Hn(e)),r=1/Math.pow(10,n)}return r||i},t.getUserControll=function(e){var t=e.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=Fn(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},t.animateTo=function(e,t,n){var i=this,r=this.createAnimationParam(e,t,n),o=Pn({},r.depaPos),a=this.em.triggerAnimationStart(r),s=this.getUserControll(r);if(!a&&this.axm.every(s.destPos,(function(e,t){return Tn(e,t.range,t.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!jn(s.destPos,o)){var u=n&&n.event||null;this.animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axm.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:n&&n.input||null},(function(){return i.animationEnd()}))}},t.easing=function(e){return e>1?1:this.options.easing(e)},t.setTo=function(e,t){void 0===t&&(t=0);var n=Object.keys(e);this.grab(n);var i=this.axm.get(n);if(jn(e,i))return this;this.itm.setInterrupt(!0);var r=Nn(e,(function(e,t){return i[t]!==e}));return Object.keys(r).length?(r=this.axm.map(r,(function(e,t){var n=t.range,i=t.circular;return i&&(i[0]||i[1])?e:En(e,n,i)})),jn(r,i)||(t>0?this.animateTo(r,t):(this.em.triggerChange(r),this.finish(!1))),this):this},t.setBy=function(e,t){return void 0===t&&(t=0),this.setTo(Sn(this.axm.get(Object.keys(e)),(function(t,n){return t+e[n]})),t)},e}(),Bn=function(){function e(e){this.axes=e}var t=e.prototype;return t.triggerHold=function(e,t){var n=this.getRoundPos(e).roundPos;this.axes.trigger("hold",{pos:n,input:t.input||null,inputEvent:t.event||null,isTrusted:!0})},t.triggerRelease=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("release",e)},t.triggerChange=function(e,t,n,i,r){void 0===r&&(r=!1);var o=this.am,a=o.axm,s=o.getEventInfo(),u=this.getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=i&&i.event||s&&s.event||null,d={pos:h.pos,delta:h.delta,holding:r,inputEvent:f,isTrusted:!!f,input:i&&i.input||s&&s.input||null,set:f?this.createUserControll(h.pos):function(){}},p=this.axes.trigger("change",d);return f&&a.set(d.set().destPos),p},t.triggerAnimationStart=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;return e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("animationStart",e)},t.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this.axes.trigger("animationEnd",{isTrusted:e})},t.triggerFinish=function(e){void 0===e&&(e=!1),this.axes.trigger("finish",{isTrusted:e})},t.createUserControll=function(e,t){void 0===t&&(t=0);var n={destPos:Pn({},e),duration:t};return function(e,t){return e&&(n.destPos=Pn({},e)),void 0!==t&&(n.duration=t),n}},t.setAnimationManager=function(e){this.am=e},t.destroy=function(){this.axes.off()},t.getRoundPos=function(e,t){var n=this.axes.options.round;return{roundPos:Mn(e,n),roundDepa:Mn(t,n)}},e}(),Xn=function(){function e(e){this.options=e,this._prevented=!1}var t=e.prototype;return t.isInterrupting=function(){return this.options.interruptable||this._prevented},t.isInterrupted=function(){return!this.options.interruptable&&this._prevented},t.setInterrupt=function(e){!this.options.interruptable&&(this._prevented=e)},e}(),Yn=function(){function e(e,t){var n=this;this.axis=e,this.options=t,this._complementOptions(),this._pos=Object.keys(this.axis).reduce((function(e,t){return e[t]=n.axis[t].range[0],e}),{})}var t=e.prototype;return t._complementOptions=function(){var e=this;Object.keys(this.axis).forEach((function(t){e.axis[t]=Pn({range:[0,100],bounce:[0,0],circular:[!1,!1]},e.axis[t]),["bounce","circular"].forEach((function(n){var i=e.axis,r=i[t][n];/string|number|boolean/.test(typeof r)&&(i[t][n]=[r,r])}))}))},t.getDelta=function(e,t){var n=this.get(e);return Sn(this.get(t),(function(e,t){return e-n[t]}))},t.get=function(e){var t=this;return e&&Array.isArray(e)?e.reduce((function(e,n){return n&&n in t._pos&&(e[n]=t._pos[n]),e}),{}):Pn(Pn({},this._pos),e||{})},t.moveTo=function(e,t){void 0===t&&(t=this._pos);var n=Sn(this._pos,(function(n,i){return i in e&&i in t?e[i]-t[i]:0}));return this.set(this.map(e,(function(e,t){return t?On(e,t.range,t.circular):0}))),{pos:Pn({},this._pos),delta:n}},t.set=function(e){for(var t in e)t&&t in this._pos&&(this._pos[t]=e[t])},t.every=function(e,t){var n=this.axis;return Dn(e,(function(e,i){return t(e,n[i],i)}))},t.filter=function(e,t){var n=this.axis;return Nn(e,(function(e,i){return t(e,n[i],i)}))},t.map=function(e,t){var n=this.axis;return Sn(e,(function(e,i){return t(e,n[i],i)}))},t.isOutside=function(e){return!this.every(e?this.get(e):this._pos,(function(e,t){return!xn(e,t.range)}))},t.getAxisOptions=function(e){return this.axis[e]},e}(),Wn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm,o=e.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=t,this.itm=n,this.em=i,this.axm=r,this.am=o}var t=e.prototype;return t.atOutside=function(e){var t=this;if(this.isOutside)return this.axm.map(e,(function(e,t){var n=t.range[0]-t.bounce[0],i=t.range[1]+t.bounce[1];return e>i?i:e<n?n:e}));var n=this.am.easing(1e-5)/1e-5;return this.axm.map(e,(function(e,i){var r=i.range[0],o=i.range[1],a=i.bounce,s=i.circular;return s&&(s[0]||s[1])?e:e<r?r-t.am.easing((r-e)/(a[0]*n))*a[0]:e>o?o+t.am.easing((e-o)/(a[1]*n))*a[1]:e}))},t.get=function(e){return this.axm.get(e.axes)},t.hold=function(e,t){if(!this.itm.isInterrupted()&&e.axes.length){var n={input:e,event:t};this.isStopped=!1,this.itm.setInterrupt(!0),this.am.grab(e.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(e.axes),this.moveDistance=this.axm.get(e.axes)}},t.change=function(e,t,n){if(!this.isStopped&&this.itm.isInterrupting()&&!this.axm.every(n,(function(e){return 0===e}))){var i,r=this.moveDistance||this.axm.get(e.axes);i=Sn(r,(function(e,t){return e+(n[t]||0)})),this.moveDistance&&(this.moveDistance=i),this.isOutside&&this.axm.every(r,(function(e,t){return!xn(e,t.range)}))&&(this.isOutside=!1),r=this.atOutside(r),i=this.atOutside(i),!this.em.triggerChange(i,!1,r,{input:e,event:t},!0)&&(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1))}},t.release=function(e,t,n,i){if(!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(e.axes),o=this.axm.get(),a=this.axm.get(this.axm.map(n,(function(e,t,n){return t.circular&&(t.circular[0]||t.circular[1])?r[n]+e:En(r[n]+e,t.range,t.circular,t.bounce)}))),s=this.am.getDuration(a,r,i);0===s&&(a=Pn({},o));var u={depaPos:o,destPos:a,duration:s,delta:this.axm.getDelta(o,a),inputEvent:t,input:e,isTrusted:!0};this.em.triggerRelease(u),this.moveDistance=null;var l=this.am.getUserControll(u),c=jn(l.destPos,o),h={input:e,event:t};c||0===l.duration?(!c&&this.em.triggerChange(l.destPos,!1,o,h,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(h):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,h)}},e}(),Un="ontouchstart"in yn&&"safari"===(void 0===Vn&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(e){var t=navigator.userAgentData,n=(t.uaList||t.brands).slice(),i=t.mobile||!1,r=n[0],o={name:r.brand,version:r.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!ln(pn,n).brand},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&rn(dn,(function(e){return cn(n,e)}));var s=ln(fn,n);if(o.chromium=!!s.brand,o.chromiumVersion=s.version,!o.chromium){var u=ln(dn,n);o.webkit=!!u.brand,o.webkitVersion=u.version}if(e){var l=e.platform.toLowerCase(),c=on(gn,(function(e){return new RegExp(""+e.test,"g").exec(l)}));a.name=c?c.id:l,a.version=e.platformVersion}var h=ln(hn,n);return h.brand&&(o.name=h.brand,o.version=e?e.uaFullVersion:h.version),"Linux armv8l"===navigator.platform?a.name="android":o.webkit&&(a.name=i?"ios":"mac"),"ios"===a.name&&o.webview&&(o.version="-1"),a.version=sn(a.version),o.version=sn(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:i,isHints:!0}}():vn(Vn)).browser.name,qn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,t=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n];return""}(),Zn=function(e){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={});var r=e.call(this)||this;return r.axis=t,r._inputs=[],r.options=Pn({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},n),r.itm=new Xn(r.options),r.axm=new Yn(r.axis,r.options),r.em=new Bn(r),r.am=new Gn(r),r.io=new Wn(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}!function(e,t){function n(){this.constructor=e}bn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e);var n=t.prototype;return n.connect=function(e,t){var n;if(n="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(t)&&this.disconnect(t),"hammer"in t){var i=this._inputs.filter((function(e){return e.hammer&&e.element===t.element}));i.length&&(t.hammer=i[0].hammer)}return t.mapAxes(n),t.connect(this.io),this._inputs.push(t),this},n.disconnect=function(e){if(e){var t=this._inputs.indexOf(e);t>=0&&(this._inputs[t].disconnect(),this._inputs.splice(t,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},n.get=function(e){return this.axm.get(e)},n.setTo=function(e,t){return void 0===t&&(t=0),this.am.setTo(e,t),this},n.setBy=function(e,t){return void 0===t&&(t=0),this.am.setBy(e,t),this},n.isBounceArea=function(e){return this.axm.isOutside(e)},n.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.8.0",t.TRANSFORM=qn,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=Ve,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Ge,t.DIRECTION_ALL=30,t}(_n),Kn="PointerEvent"in yn||"MSPointerEvent"in yn,Jn="ontouchstart"in yn,Qn="_EGJS_AXES_INPUTTYPE_";function $n(e,t){return t.reduce((function(t,n,i){return e[i]&&(t[e[i]]=n),t}),{})}function ei(e,t,n){return n?!!(30===t||t&e&&n&e):!!(t&e)}var ti,ni=function(){function e(e,t){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===Wt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=Rn(e),this.options=Pn({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},t),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var t=e.prototype;return t.mapAxes=function(e){var t=!!e[0],n=!!e[1];this._direction=t&&n?30:t?6:n?Ge:1,this.axes=e},t.connect=function(e){var t={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[Qn];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=function(e){void 0===e&&(e=[]);var t=!1,n=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":n=!0;break;case"touch":t=Jn;break;case"pointer":i=Kn}})),i?pt:t&&n?It:t?bt:n?Tt:null}(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=function(e,t){try{return new Wt(e,Pn({},t))}catch(e){return null}}(this.element,Pn({inputClass:i},this.options.hammerManagerOptions)),this.element[Qn]=n}return this.panRecognizer=new Mt(t),this.hammer.add(this.panRecognizer),this.attachEvent(e),this},t.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},t.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[Qn],this.element=null,this.hammer=null},t.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},t.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},t.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},t.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},t.onHammerInput=function(e){if(this.isEnable())if(e.isFirst){if(this.panFlag=!1,!1!==e.srcEvent.cancelable){var t=this.options.iOSEdgeSwipeThreshold;this.observer.hold(this,e),this.isRightEdge=Un&&e.center.x>window.innerWidth-t,this.panFlag=!0}}else e.isFinal&&this.onPanend(e)},t.onPanmove=function(e){var t=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.releaseOnScroll,o=function(e,t){if(t<0||t>90)return 1;var n=Math.abs(e);return n>t&&n<180-t?Ge:6}(e.angle,this.options.thresholdAngle),a=this.hammer.session.prevInput;if(!r||e.srcEvent.cancelable){if(a&&Un){if(e.center.x<0)return void this.onPanend(Pn(Pn({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),e.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout((function(){t.onPanend(Pn(Pn({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}),100))}a?(e.offsetX=e.deltaX-a.deltaX,e.offsetY=e.deltaY-a.deltaY):(e.offsetX=0,e.offsetY=0);var s=this.getOffset([e.offsetX,e.offsetY],[ei(6,this._direction,o),ei(Ge,this._direction,o)]),u=s.some((function(e){return 0!==e}));if(u){var l=e.srcEvent;!1!==l.cancelable&&l.preventDefault(),l.stopPropagation()}e.preventSystemEvent=u,u&&this.observer.change(this,e,$n(this.axes,s))}else this.onPanend(Pn(Pn({},e),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},t.onPanend=function(e){if(this.panFlag){clearTimeout(this.rightEdgeTimer),this.panFlag=!1;var t,n,i,r,o=this.getOffset([Math.abs(e.velocityX)*(e.deltaX<0?-1:1),Math.abs(e.velocityY)*(e.deltaY<0?-1:1)],[ei(6,this._direction),ei(Ge,this._direction)]);t=o,n=this.observer.options.deceleration,i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.abs(i/-n),o=[t[0]/2*r,t[1]/2*r],this.observer.release(this,e,$n(this.axes,o))}},t.attachEvent=function(e){this.observer=e,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},t.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},t.getOffset=function(e,t){var n=[0,0],i=this.options.scale;return t[0]&&(n[0]=e[0]*i[0]),t[1]&&(n[1]=e[1]*i[1]),n},e}(),ii=Zn,ri={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},oi="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(ti||(ti={}));var ai=function(){function e(){this._delta=0,this._targetPanel=null}var t=e.prototype;return Object.defineProperty(t,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(t,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),t.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},t.onHold=function(e){},t.onChange=function(e){},t.onRelease=function(e){},t.onAnimationEnd=function(e){},t.onFinish=function(e){},t._moveToChangedPosition=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.delta.flick;if(r){this._delta+=r;var o=t.camera,a=o.position,s=n.pos.flick,u=t.circularEnabled?$(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(C.MOVE,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,n.delta.flick),axesEvent:n});t.trigger(l),l.isCanceled()&&(o.lookAt(a),i(ti.DISABLED))}},e}(),si=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!1,t}t(n,e);var i=n.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.renderer.panelCount<=0)i(ti.DISABLED);else{var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.HOLDING)}},i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control.controller.animatingContext,o=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(r.start,r.end),axesEvent:n});t.trigger(o),o.isCanceled()?i(ti.DISABLED):i(ti.ANIMATING).onChange(e)},n}(ai),ui=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!1,t._releaseEvent=null,t}t(n,e);var i=n.prototype;return i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.inputEvent,o=t.horizontal?r.offsetX:r.offsetY,a=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,-o),axesEvent:n});t.trigger(a),a.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING).onChange(e)},i.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.trigger(new g(C.HOLD_END,{axesEvent:n})),0!==n.delta.flick)return n.setTo({flick:t.camera.position},0),void i(ti.IDLE);this._releaseEvent=n},i.onFinish=function(e){var t,n,i=e.flicking;if((0,e.transitTo)(ti.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(C.SELECT,{index:l.index,panel:l,direction:q(d,p)}))}}},n}(ai),li=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var t,n=e.flicking,i=e.axesEvent,r=e.transitTo;if(n.trigger(new g(C.HOLD_END,{axesEvent:i})),n.renderer.panelCount<=0)r(ti.IDLE);else{r(ti.ANIMATING);var o=n.control,a=i.destPos.flick,s=Math.max(i.duration,n.duration);try{o.moveToPosition(a,s,i)}catch(e){r(ti.IDLE),i.setTo(((t={}).flick=n.camera.position,t),0)}}},n}(ai),ci=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;this._delta=0,t.control.updateInput();var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control,o=r.controller.animatingContext;i(ti.IDLE),t.trigger(new g(C.MOVE_END,{isTrusted:n.isTrusted,direction:q(o.start,o.end),axesEvent:n}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,n.isTrusted)},n}(ai),hi=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(ti.IDLE)},i.onChange=function(e){var t=e.axesEvent,n=e.transitTo;t.stop(),n(ti.IDLE)},i.onRelease=function(e){var t=e.axesEvent,n=e.transitTo;0===t.delta.flick&&n(ti.IDLE)},n}(ai),fi=function(){function e(){var e=this;this.transitTo=function(t){var n;switch(t){case ti.IDLE:n=new si;break;case ti.HOLDING:n=new ui;break;case ti.DRAGGING:n=new li;break;case ti.ANIMATING:n=new ci;break;case ti.DISABLED:n=new hi}return n.onEnter(e._state),e._state=n,e._state},this._state=new si}var t=e.prototype;return Object.defineProperty(t,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.fire=function(e,t){var i=this._state,r=n(n({},t),{transitTo:this.transitTo});switch(e){case ri.HOLD:i.onHold(r);break;case ri.CHANGE:i.onChange(r);break;case ri.RELEASE:i.onRelease(r);break;case ri.ANIMATION_END:i.onAnimationEnd(r);break;case ri.FINISH:i.onFinish(r)}},e}(),di=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){e._dragged=!0},this._preventClickWhenDragged=function(t){e._dragged&&(t.preventDefault(),t.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new fi}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var t=e.axis.flick;return{range:{min:t.range[0],max:t.range[1]},circular:t.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,t;return null!==(t=null===(e=this._panInput)||void 0===e?void 0:e.isEnable())&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.get([oi]).flick)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.axis.flick.range)&&void 0!==t?t:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis.flick.bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,n=this;this._flicking=e,this._axes=new ii(((t={}).flick={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,easing:e.easing}),this._panInput=new ni(e.viewport.element,{inputType:e.inputType,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,scale:e.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[oi,""]:["",oi],this._panInput);var r=function(t){var r=ri[t];i.on(r,(function(t){n._stateMachine.fire(r,{flicking:e,axesEvent:t})}))};for(var o in ri)r(o);return this},t.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},t.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},t.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},t.update=function(e){var t,n=V(this._flicking),i=n.camera,r=this._axes,o=r.axis.flick;return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=X(n.bounce,i.size),r.axm.set(((t={}).flick=e.position,t)),this},t.addPreventClickHandler=function(){var e=V(this._flicking),t=this._axes,n=e.camera.element;return t.on(ri.HOLD,this._onAxesHold),t.on(ri.CHANGE,this._onAxesChange),n.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=V(this._flicking),t=this._axes,n=e.camera.element;return t.off(ri.HOLD,this._onAxesHold),t.off(ri.CHANGE,this._onAxesChange),n.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,t,n){var i,r,o=this,a=this._axes,s=this._stateMachine.state;if(!a)return Promise.reject(new ce(y,v.NOT_ATTACHED_TO_FLICKING));var u=a.get([oi]).flick;if(u===e)return(c=V(this._flicking)).camera.lookAt(e),s.targetPanel&&c.control.setActive(s.targetPanel,c.control.activePanel,null!==(r=null==n?void 0:n.isTrusted)&&void 0!==r&&r),Promise.resolve();this._animatingContext={start:u,end:e,offset:0};var l=function(){var i,r;a.once(ri.FINISH,(function(){o._animatingContext={start:0,end:0,offset:0}})),n?n.setTo(((i={}).flick=e,i),t):a.setTo(((r={}).flick=e,r),t)};if(0===t){var c,h=(c=V(this._flicking)).camera;l();var f=c.circularEnabled?$(e,h.range.min,h.range.max):e;return a.axm.set(((i={}).flick=f,i)),Promise.resolve()}return new Promise((function(e,t){var n=function(){a.off(ri.HOLD,i),e()},i=function(){a.off(ri.FINISH,n),t(new ce(w,v.ANIMATION_INTERRUPTED))};a.once(ri.FINISH,n),a.once(ri.HOLD,i),l()}))},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),pi=function(){function e(){this._flicking=null,this._controller=new di,this._activePanel=null}var t=e.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,t;return null!==(t=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==t?t:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._controller.init(e),this},t.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},t.enable=function(){return this._controller.enable(),this},t.disable=function(){return this._controller.disable(),this},t.updatePosition=function(e){var t=V(this._flicking).camera,n=this._activePanel;n&&t.lookAt(t.clampToReachablePosition(n.position))},t.updateInput=function(){var e=V(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,t){var n=t.duration,o=t.direction,a=void 0===o?S.NONE:o,s=t.axesEvent;return i(this,void 0,void 0,(function(){var t,i,o,u,l,c,h;return r(this,(function(r){return t=V(this._flicking),i=t.camera,o=e.position,u=i.findNearestAnchor(o),e.removed||!u?[2,Promise.reject(new ce(x(e.position),v.POSITION_NOT_REACHABLE))]:(i.canReach(e)?t.circularEnabled&&(l=this._controller.position,c=i.rangeDiff,h=[o,o+c,o-c].filter((function(e){return a===S.NONE||(a===S.PREV?e<=l:e>=l)})),o=h.reduce((function(e,t){return Math.abs(l-t)<Math.abs(l-e)?t:e}),1/0)):(o=u.position,e=u.panel),this._triggerIndexChangeEvent(e,e.position,s),[2,this._animateToPosition({position:o,duration:n,newActivePanel:e,axesEvent:s})])}))}))},t.setActive=function(e,t,n){var i,r=V(this._flicking);this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==t?r.trigger(new g(C.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==t?void 0:t.index)&&void 0!==i?i:-1,prevPanel:t,isTrusted:n,direction:t?q(t.position,e.position):S.NONE})):r.trigger(new g(C.RESTORED,{isTrusted:n}))},t._triggerIndexChangeEvent=function(e,t,n){var i,r=V(this._flicking),o=e!==this._activePanel?C.WILL_CHANGE:C.WILL_RESTORE,a=r.camera,s=this._activePanel,u=new g(o,{index:e.index,panel:e,isTrusted:(null==n?void 0:n.isTrusted)||!1,direction:q(null!==(i=null==s?void 0:s.position)&&void 0!==i?i:a.position,t)});if(r.trigger(u),u.isCanceled())throw new ce(O,v.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var t=e.position,n=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,(function(){var e,s,u=this;return r(this,(function(l){return e=V(this._flicking),s=function(){return u._controller.animateTo(t,n,a)},this._controller.state.targetPanel=o,n<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,e.renderer.render()];case 1:return t.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof ce&&e.code===v.ANIMATION_INTERRUPTED))throw e}))]}))}))},e}(),gi=function(){function e(e){var t=e.index,n=e.position,i=e.panel;this._index=t,this._pos=n,this._panel=i}var t=e.prototype;return Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),vi=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1/0:n,r=e.call(this)||this;return r._count=i,r}t(n,e);var i=n.prototype;return Object.defineProperty(i,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),i.moveToPosition=function(e,t,n){var i=V(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=i.control.controller.state;if(!o||!a)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var u,l=this._calcSnapThreshold(e,o),c=i.animating?s.delta:e-r.position,h=Math.abs(c),f=n&&0!==n.delta.flick?Math.abs(n.delta.flick):h;return u=f>=l&&f>0?this._findSnappedAnchor(e,a):h>=i.threshold&&h>0?this._findAdjacentAnchor(c,a):a,this._triggerIndexChangeEvent(u.panel,e,n),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:t,newActivePanel:u.panel,axesEvent:n})},i._findSnappedAnchor=function(e,t){var n=V(this._flicking),i=n.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!t||!s)throw new ce(x(e),v.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=n.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<t.index||s.position>t.position&&s.index===t.index?c+=1:(e<o&&s.index>t.index||s.position<t.position&&s.index===t.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-t.index)<=r){var d=l[s.index];return new gi({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(n.circularEnabled){var p=l[ae(t.index+Math.sign(e-o)*r,u)],g=Math.floor(r/u);return e>o&&p.index<t.index?g+=1:e<o&&p.index>t.index&&(g-=1),new gi({index:p.index,position:p.position+g*i.rangeDiff,panel:p.panel})}return l[F(t.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,t){var n,i=V(this._flicking).camera;return null!==(n=e>0?i.getNextAnchor(t):i.getPrevAnchor(t))&&void 0!==n?n:t},i._calcSnapThreshold=function(e,t){var n=e>t.position,i=t.panel,r=i.size,o=i.alignPosition;return n?r-o+i.margin.next:o+i.margin.prev},n}(pi),mi=function(e){function n(t){var n=(void 0===t?{}:t).stopAtEdge,i=void 0===n||n,r=e.call(this)||this;return r._stopAtEdge=i,r}t(n,e);var i=n.prototype;return Object.defineProperty(i,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),i.updatePosition=function(e){var t=V(this._flicking).camera,n=this._activePanel;if(n){var i=n.range,r=i.min+(i.max-i.min)*e;t.lookAt(t.clampToReachablePosition(r))}},i.moveToPosition=function(e,t,n){var i=V(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,n),this._animateToPosition({position:this._stopAtEdge?r:e,duration:t,newActivePanel:a,axesEvent:n})},n}(pi),_i=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1:n,r=e.call(this)||this;return r.setActive=function(t,n,i){e.prototype.setActive.call(r,t,n,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}t(n,e);var o=n.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,t=V(this._flicking),n=t.camera,i=t.renderer,r=this._controller,o=n.controlParams,a=this._count,s=r.state.animating?null===(e=n.findNearestAnchor(n.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=t.circularEnabled?K((f+1)%h-1,h):F(f,0,h-1)),d>=h&&(d=t.circularEnabled?d%h:F(d,0,h-1));var p=i.panels[f],g=i.panels[d],v=Math.max(p.position,u.min),m=Math.min(g.position,u.max);return v>l&&(v-=n.rangeDiff),m<l&&(m+=n.rangeDiff),o.range={min:v,max:m},o.circular&&(o.position<v&&(o.position+=n.rangeDiff),o.position>m&&(o.position-=n.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:p.index,max:g.index},this},o.moveToPanel=function(t,n){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){return i=V(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,t,n)]}))}))},o.moveToPosition=function(e,t,n){var i=V(this._flicking),r=i.camera,o=this._activePanel,a=this._controller.range,s=this._indexRange,u=r.range,l=F(r.clampToReachablePosition(e),a[0],a[1]),c=r.findAnchorIncludePosition(l);if(!c||!o)return Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE));var h,f,d=o.position,p=Math.abs(e-d)>=i.threshold,g=e>d?r.getNextAnchor(c):r.getPrevAnchor(c),m=r.anchorPoints,_=m[0],b=m[m.length-1],y=e<=u.min&&oe(_.panel.index,s.min,s.max),P=e>=u.max&&oe(b.panel.index,s.min,s.max),E=g&&(s.min<=s.max?oe(g.index,s.min,s.max):g.index>=s.min||g.index<=s.max);if(y||P){var T=e<u.min?_:b;f=T.panel,h=T.position}else p&&c.position!==o.position?(f=c.panel,h=c.position):p&&E?(f=g.panel,h=g.position):(h=r.clampToReachablePosition(o.position),f=o);return this._triggerIndexChangeEvent(f,e,n),this._animateToPosition({position:h,duration:t,newActivePanel:f,axesEvent:n})},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(pi),bi={__proto__:null,Control:pi,SnapControl:vi,FreeControl:mi,StrictControl:_i,AxesController:di,State:ai,IdleState:si,HoldingState:ui,DraggingState:li,AnimatingState:ci,DisabledState:hi,StateMachine:fi},yi=function(){function e(e){this._flicking=e}var t=e.prototype;return t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},t.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter((function(t){return t.panel.includePosition(e,!0)})).reduce((function(t,n){return t&&Math.abs(t.position-e)<Math.abs(n.position-e)?t:n}),null)},t.findNearestAnchor=function(e){var t=this._flicking.camera.anchorPoints;if(t.length<=0)return null;for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},t.clampToReachablePosition=function(e){var t=this._flicking.camera.range;return F(e,t.min,t.max)},t.getCircularOffset=function(){return 0},t.canReach=function(e){var t=this._flicking.camera.range;if(e.removed)return!1;var n=e.position;return n>=t.min&&n<=t.max},t.canSee=function(e){var t=this._flicking.camera.visibleRange;return e.isVisibleOnRange(t.min,t.max)},e}(),Pi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,t,n=this._flicking.renderer,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(t=null==r?void 0:r.position)&&void 0!==t?t:0}},n}(yi),Ei=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer.panels;if(t.length<=0)return!1;var n=t[0],i=t[t.length-1],r=n.range.min-n.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return t.every((function(e){return s-e.size>=a}))},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var t=e[0],n=e[e.length-1];return{min:t.range.min-t.margin.prev,max:n.range.max+n.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},i.findNearestAnchor=function(e){var t=this._flicking.camera,n=t.anchorPoints;if(n.length<=0)return null;for(var i=t.range,r=1/0,o=-1,a=0;a<n.length;a++){var s=n[a],u=Math.min(Math.abs(s.position-e),Math.abs(s.position-i.min+i.max-e),Math.abs(e-i.min+i.max-s.position));u<r&&(r=u,o=a)}return n[o]},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints,o=n.rangeDiff,a=r.length,s=$(t,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(t===i.min||t===i.max)){var l=[u,new gi({index:0,position:r[0].position+o,panel:r[0].panel}),new gi({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,n){return e&&Math.abs(e.position-t)<Math.abs(n.position-t)?e:n}),null)}if(!u)return null;if(t<i.min){var c=-Math.floor((i.min-t)/o)-1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}if(t>i.max){c=Math.floor((t-i.max)/o)+1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var t=e.panels.filter((function(e){return e.toggled})),n=t.filter((function(e){return e.toggleDirection===S.PREV})),i=t.filter((function(e){return e.toggleDirection===S.NEXT}));return this._calcPanelAreaSum(n)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(t){var n=this._flicking.camera,i=n.range,r=n.rangeDiff,o=n.visibleRange,a=e.prototype.canSee.call(this,t);return o.min<i.min?a||t.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||t.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,t){return e+t.sizeIncludingMargin}),0)},n}(yi),xi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer,n=t.getPanel(0),i=t.getPanel(t.panelCount-1);if(!n||!i)return!1;var r=e.camera.size,o=n.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,t=e.renderer,n=e.camera.alignPosition,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,u=a+n,l=s-o+n;if(o<s-a)return{min:u,max:l};var c=e.camera.align,h="object"==typeof c?c.camera:c,f=u+B(h,l-u);return{min:f,max:f}},i.getAnchors=function(){var e=this._flicking,t=e.camera,n=e.renderer.panels;if(n.length<=0)return[];var i=e.camera.range,r=n.filter((function(e){return t.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,t){return new gi({index:t+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new gi({index:0,position:i.min,panel:n[r[0].index-1]})),a&&u.push(new gi({index:u.length,position:i.max,panel:n[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,n),c=l.index===n.length-1?l.prev():l,h=c.next();return[new gi({index:0,position:i.min,panel:c}),new gi({index:1,position:i.max,panel:h})]}return[new gi({index:0,position:i.min,panel:this._findNearestPanel(i.min,n)})]},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints;return r.length<=0?null:t<=i.min?r[0]:t>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,t)},i._findNearestPanel=function(e,t){for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},n}(yi),Ti=function(){function e(e,t){var n=this,i=(void 0===t?{}:t).align,r=void 0===i?k.CENTER:i;this._checkTranslateSupport=function(){var e,t,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(!r)throw new ce(T,v.TRANSFORM_NOT_SUPPORTED);n._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return G(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,t=this._position+this._offset,n=this.findNearestAnchor(this._position);if(!e||!n)return NaN;var i=n.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(t===r)return i.index;if(t<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+ne(t,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+ne(t,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking.viewport.element;return H(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this},t.destroy=function(){return this._resetInternalValues(),this},t.lookAt=function(e){var t=this,n=V(this._flicking),i=this._position;this._position=e;var r=this._togglePanels(i,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(i,e),r?n.renderer.render().then((function(){t.updateOffset()})):this.applyTransform()},t.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var t=this._anchors,n=this.rangeDiff,i=t[t.length-1];return new gi({index:i.index,position:i.position-n,panel:i.panel})}return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){var t=this._anchors;if(this._circularEnabled&&e.index===t.length-1){var n=this.rangeDiff,i=t[0];return new gi({index:i.index,position:i.position+n,panel:i.panel})}return t[e.index+1]||null},t.getProgressInPanel=function(e){var t=e.range;return(this._position-t.min)/(t.max-t.min)},t.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},t.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},t.findActiveAnchor=function(){var e=V(this._flicking).control.activeIndex;return ee(this._anchors,(function(t){return t.panel.index===e}))},t.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},t.canReach=function(e){return this._mode.canReach(e)},t.canSee=function(e){return this._mode.canSee(e)},t.updateRange=function(){var e=V(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),this._circularEnabled&&e.forEach((function(e){return e.updateCircularToggleDirection()})),this},t.updateAlignPos=function(){var e=this._align,t="object"==typeof e?e.camera:e;return this._alignPos=B(t,this.size),this},t.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},t.updateAdaptiveHeight=function(){var e=V(this._flicking),t=e.control.activePanel;e.horizontal&&e.adaptive&&t&&e.viewport.setSize({height:t.height})},t.updateOffset=function(){var e=V(this._flicking),t=this._position,n=e.panels.filter((function(e){return!e.rendered}));return this._offset=n.filter((function(e){return e.position+e.offset<t})).reduce((function(e,t){return e+t.sizeIncludingMargin}),0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,t=V(this._flicking);if(t.renderer.rendering)return this;var n=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=t.horizontal?"translate("+-n+"px)":"translate(0, "+-n+"px)",this},t._resetInternalValues=function(){this._position=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},t._refreshVisiblePanels=function(){var e=this,t=V(this._flicking),n=t.renderer.panels.filter((function(t){return e.canSee(t)})),i=this._visiblePanels;this._visiblePanels=n;var r=n.filter((function(e){return!J(i,e)})),o=i.filter((function(e){return!J(n,e)}));(r.length>0||o.length>0)&&t.renderer.render().then((function(){t.trigger(new g(C.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:n}))}))},t._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var t=V(this._flicking),n=t.renderer.panels;if(n.length<=0)return e.prev||(t.trigger(new g(C.NEED_PANEL,{direction:S.PREV})),e.prev=!0),void(e.next||(t.trigger(new g(C.NEED_PANEL,{direction:S.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=t.needPanelThreshold,s=i-this._alignPos,u=s+r,l=n[0],c=n[n.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(t.trigger(new g(C.NEED_PANEL,{direction:S.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(t.trigger(new g(C.NEED_PANEL,{direction:S.NEXT})),e.next=!0)}},t._checkReachEnd=function(e,t){var n=V(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=t>i.min&&t<i.max;if(r&&!o){var a=t<=i.min?S.PREV:S.NEXT;n.trigger(new g(C.REACH_EDGE,{direction:a}))}},t._updateMode=function(){var e=V(this._flicking);if(e.circular){var t=new Ei(e),n=t.checkAvailability();if(n)this._mode=t;else{var i=e.circularFallback;this._mode=i===j.BOUND?new xi(e):new Pi(e)}this._circularEnabled=n}else this._mode=e.bound?new xi(e):new Pi(e)},t._togglePanels=function(e,t){return t!==e&&V(this._flicking).renderer.panels.map((function(n){return n.toggle(e,t)})).some((function(e){return e}))},e}(),Oi={__proto__:null,Camera:Ti,LinearCameraMode:Pi,CircularCameraMode:Ei,BoundCameraMode:xi},wi=function(e,t){return wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wi(e,t)};function Ri(e,t){function n(){this.constructor=e}wi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ii=function(){return Ii=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ii.apply(this,arguments)};var Ai="undefined"!=typeof window,Ci=Ai?window.navigator.userAgent:"",ki=!!Ai&&!!("getComputedStyle"in window),Si=/MSIE|Trident|Windows Phone|Edge/.test(Ci),Ni=!!Ai&&!!("addEventListener"in document),Di="width",ji="height";function zi(e,t){return e.getAttribute(t)||""}function Li(e){return[].slice.call(e)}function Mi(e){return"loading"in e&&"lazy"===e.getAttribute("loading")}function Hi(e,t,n){Ni?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Fi(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function Vi(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||function(e){return(ki?window.getComputedStyle(e):e.currentStyle)||{}}(e)[t.toLowerCase()])||0}function Gi(e,t,n){var i=Li(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+n+"skip] ["+n+"width]"],t.map((function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")}))).join(", ")));return Li(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter((function(e){return-1===i.indexOf(e)}))}var Bi=[];function Xi(e,t){!Bi.length&&Hi(window,"resize",Wi),e.__PREFIX__=t,Bi.push(e),Yi(e)}function Yi(e,t){void 0===t&&(t="data-");var n=e.__PREFIX__||t,i=parseInt(zi(e,""+n+Di),10)||0,r=parseInt(zi(e,""+n+ji),10)||0;if(zi(e,n+"fixed")===ji){var o=Vi(e,"Height")||r;e.style.width=i/r*o+"px"}else{o=function(e){return Vi(e,"Width")}(e)||i;e.style.height=r/i*o+"px"}}function Wi(){Bi.forEach((function(e){Yi(e)}))}var Ui=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){i.clear(),e&&"error"===e.type&&i.onError(i.element);var t=!i.hasDataSize&&!i.hasLoading;i.onReady(t)},i.options=Ii({prefix:"data-"},n),i.element=t;var r=i.options.prefix;return i.hasDataSize=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"width")}(t,r),i.isSkip=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"skip")}(t,r),i.hasLoading=Mi(t),i}Ri(t,e);var n=t.prototype;return n.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&Xi(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},n.addEvents=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Hi(t,n,e.onCheck)}))},n.clear=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Fi(t,n,e.onCheck)})),this.removeAutoSizer()},n.destroy=function(){this.clear(),this.off()},n.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,t){var n=Bi.indexOf(e);if(!(n<0)){var i=zi(e,t+"fixed");delete e.__PREFIX__,e.style[i===ji?Di:ji]="",Bi.splice(n,1),!Bi.length&&Fi(window,"resize",Wi)}}(this.element,e)}},n.onError=function(e){this.trigger("error",{element:this.element,target:e})},n.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onAlreadyError=function(e){var t=this;setTimeout((function(){t.onError(e)}))},n.onAlreadyPreReady=function(){var e=this;setTimeout((function(){e.onPreReady()}))},n.onAlreadyReady=function(e){var t=this;setTimeout((function(){t.onReady(e)}))},t.EVENTS=[],t}(p),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Ri(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(Xi(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(Ui),Zi=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.readyCount=0,n.preReadyCount=0,n.totalCount=0,n.totalErrorCount=0,n.isPreReadyOver=!0,n.elementInfos=[],n.options=Ii({loaders:{},prefix:"data-"},t),n}Ri(t,e);var n=t.prototype;return n.check=function(e){var t=this,n=this.options.prefix;this.clear(),this.elementInfos=Li(e).map((function(e,i){var r=t.getLoader(e,{prefix:n});return r.check(),r.on("error",(function(e){t.onError(i,e.target)})).on("preReady",(function(e){var n=t.elementInfos[i];n.hasLoading=e.hasLoading,n.isSkip=e.isSkip;var r=t.checkPreReady(i);t.onPreReadyElement(i),r&&t.onPreReady()})).on("ready",(function(e){var n=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=t.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=n&&t.checkPreReady(i),u=t.checkReady(i);n&&t.onPreReadyElement(i),t.onReadyElement(i),s&&t.onPreReady(),u&&t.onReady()})),{loader:r,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}}));var i=this.elementInfos.length;return this.totalCount=i,i||setTimeout((function(){t.onPreReady(),t.onReady()})),this},n.getTotalCount=function(){return this.totalCount},n.isPreReady=function(){return this.elementInfos.every((function(e){return e.isPreReady}))},n.isReady=function(){return this.elementInfos.every((function(e){return e.isReady}))},n.hasError=function(){return this.totalErrorCount>0},n.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){!e.isReady&&e.loader&&e.loader.destroy()})),this.elementInfos=[]},n.destroy=function(){this.clear(),this.off()},n.getLoader=function(e,t){var n=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=Object.keys(r);if(r[i])return new r[i](e,t);var a=new qi(e,t),s=Li(e.querySelectorAll(o.join(", ")));a.setHasLoading(s.some((function(e){return Mi(e)})));var u=!1,l=this.clone().on("error",(function(e){a.onError(e.target)})).on("ready",(function(){a.onReady(u)}));return a.on("requestChildren",(function(){var t=Gi(e,o,n.options.prefix);l.check(t).on("preReady",(function(e){(u=e.isReady)||a.onPreReady()}))})).on("reqeustReadyChildren",(function(){l.check(s)})).on("requestDestroy",(function(){l.destroy()})),a},n.clone=function(){return new t(Ii({},this.options))},n.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},n.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},n.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount})},n.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip})},n.onPreReady=function(){this.isPreReadyOver=!0,this.trigger("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()})},n.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip})},n.onReady=function(){this.trigger("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount})},n.getErrorCount=function(){return this.elementInfos.filter((function(e){return e.hasError})).length},n.hasLoading=function(){return this.elementInfos.some((function(e){return e.hasLoading}))},t}(p),Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),Si&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(Ui),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(Ui),Qi=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Ii({loaders:{img:Ki,video:Ji}},t))||this}return Ri(t,e),t}(Zi),$i=function(){function e(e){var t=e.align,n=void 0===t?k.CENTER:t,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=n,this._strategy=i}var t=e.prototype;return Object.defineProperty(t,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e;var t=U(e);this._panels.forEach((function(e){e.align=t}))},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._collectPanels(),this},t.destroy=function(){this._flicking=null,this._panels=[]},t.getPanel=function(e){return this._panels[e]||null},t.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},t.updatePanelSize=function(){var e=V(this._flicking),t=this._panels;if(t.length<=0)return this;if(e.panelsPerView>0){var n=t[0];n.resize(),this._updatePanelSizeByGrid(n,t)}else e.panels.forEach((function(e){return e.resize()}));return this},t.batchInsert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.batchInsertDefer.apply(this,s(e));return n.length<=0?[]:(this.updateAfterPanelChange(n,[]),n)},t.batchInsertDefer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=V(this._flicking),o=i[0],a=U(this._align),u=t.reduce((function(t,n){var u,l=K(n.index,i.length),c=i.slice(l),h=n.elements.map((function(t,n){return e._createPanel(t,{index:l+n,align:a,flicking:r})}));if(i.splice.apply(i,s([l,0],h)),n.hasDOMInElements&&e._insertPanelElements(h,null!==(u=c[0])&&void 0!==u?u:null),r.panelsPerView>0){var f=o||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach((function(e){return e.resize()}));return c.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),s(t,h)}),[]);return u},t.batchRemove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.batchRemoveDefer.apply(this,s(e));return n.length<=0?[]:(this.updateAfterPanelChange([],n),n)},t.batchRemoveDefer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=V(this._flicking),o=r.control,a=o.activePanel,u=t.reduce((function(t,n){var r=n.index,u=n.deleteCount,l=K(r,i.length),c=i.slice(l+u),h=i.splice(l,u);return h.length<=0?[]:(c.forEach((function(e){e.decreaseIndex(h.length),e.updatePosition()})),n.hasDOMInElements&&e._removePanelElements(h),h.forEach((function(e){return e.destroy()})),J(h,a)&&o.resetActive(),s(t,h))}),[]);return u},t.updateAfterPanelChange=function(e,t){var n,i=V(this._flicking),r=i.camera,o=i.control,a=this._panels,u=o.activePanel;if(this._updateCameraAndControl(),this.render(),!i.animating)if(!u||u.removed)if(a.length<=0)r.lookAt(0);else{var l=null!==(n=null==u?void 0:u.index)&&void 0!==n?n:0;l>a.length-1&&(l=a.length-1),o.moveToPanel(a[l],{duration:0}).catch((function(){}))}else o.moveToPanel(u,{duration:0}).catch((function(){}));i.camera.updateOffset(),(e.length>0||t.length>0)&&(i.trigger(new g(C.PANEL_CHANGE,{added:e,removed:t})),this.checkPanelContentsReady(s(e,t)))},t.checkPanelContentsReady=function(e){var t=this,n=V(this._flicking),i=n.resizeOnContentsReady,r=this._panels;if(i&&!n.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new Qi;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(t._flicking){var a=e[i.index],s=n.camera,u=n.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),n.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){t._flicking&&t.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){t._flicking&&t.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},t._updateCameraAndControl=function(){var e=V(this._flicking),t=e.camera,n=e.control;t.updateRange(),t.updateOffset(),t.updateAnchors(),t.resetNeedPanelHistory(),n.updateInput()},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in n||t.loading?t.markForShow():e.holding||t.markForHide()}))},t._updatePanelSizeByGrid=function(e,t){var n=V(this._flicking),i=n.panelsPerView;if(i<=0)throw new ce(P("panelsPerView",i),v.WRONG_OPTION);if(!(t.length<=0)){var r=(n.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,o=n.horizontal?{width:r}:{height:r},a={size:r,height:e.height,margin:e.margin};n.noPanelStyleOverride||this._strategy.updatePanelSizes(n,o),n.panels.forEach((function(e){return e.resize(a)}))}},t._removeAllChildsFromCamera=function(){for(var e=V(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},t._insertPanelElements=function(e,t){void 0===t&&(t=null);var n=V(this._flicking).camera.element,i=(null==t?void 0:t.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),n.insertBefore(r,i)},t._removePanelElements=function(e){var t=V(this._flicking).camera.element;e.forEach((function(e){t.removeChild(e.element)}))},e}(),er=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var o=n.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,t;return r(this,(function(n){return e=V(this._flicking),(t=this._strategy).updateRenderingPanels(e),t.renderPanels(e),this._resetPanelElementOrder(),[2]}))}))},o._collectPanels=function(){var e=V(this._flicking),t=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,t.children)},o._createPanel=function(e,t){return this._strategy.createPanel(e,t)},o._resetPanelElementOrder=function(){var e=V(this._flicking),t=e.camera.element,n=this._strategy.getRenderingElementsByOrder(e).reverse();n.forEach((function(e,i){var r=n[i-1]?n[i-1]:null;e.nextElementSibling!==r&&t.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=V(this._flicking).camera.element;G(e.childNodes).forEach((function(t){t.nodeType===Node.TEXT_NODE&&e.removeChild(t)}))},n}($i),tr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},n}($i),nr=function(){function e(e){var t=e.index,n=e.align,i=e.flicking,r=e.elementProvider;this._index=t,this._flicking=i,this._elProvider=r,this._align=n,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(t,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){var e=this._toggleDirection,t=this._flicking.camera.rangeDiff;return e!==S.NONE&&this._toggled?e===S.PREV?-t:t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(t,"outsetProgress",{get:function(){var e=this.position+this.offset,t=this._alignPos,n=this._flicking.camera,i=n.position;if(i===e)return 0;if(i<e){var r=e+(n.size-n.alignPosition)+t;return-ne(i,e,r)}var o=e-(n.alignPosition+this._size-t);return 1-ne(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRatio",{get:function(){var e=this.range,t=this._size,n=this.offset,i=this._flicking.camera.visibleRange,r=e.min+n,o=e.max+n;if(o<=i.min||r>=i.max)return 0;var a=t;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},t.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},t.resize=function(e){var t=this.element,i=this._flicking.horizontal;if(e)this._size=e.size,this._margin=n({},e.margin),this._height=e.height;else{var r=ie(t);this._size=i?t.offsetWidth:t.offsetHeight,this._margin=i?{prev:parseFloat(r.marginLeft||"0"),next:parseFloat(r.marginRight||"0")}:{prev:parseFloat(r.marginTop||"0"),next:parseFloat(r.marginBottom||"0")},this._height=i?t.offsetHeight:this._size}return this.updatePosition(),this._updateAlignPos(),this},t.setSize=function(e){return re(this.element,e),this},t.contains=function(e){var t;return!!(null===(t=this.element)||void 0===t?void 0:t.contains(e))},t.destroy=function(){this._resetInternalStates(),this._removed=!0},t.includePosition=function(e,t){return void 0===t&&(t=!1),this.includeRange(e,e,t)},t.includeRange=function(e,t,n){void 0===n&&(n=!1);var i=this._margin,r=this.range;return n&&(r.min-=i.prev,r.max+=i.next),t>=r.min&&e<=r.max},t.isVisibleOnRange=function(e,t){var n=this.range;return t>n.min&&e<n.max},t.focus=function(e){return this._flicking.moveTo(this._index,e)},t.prev=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(0===e?i-1:e-1):n.getPanel(e-1)},t.next=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(e===i-1?0:e+1):n.getPanel(e+1)},t.increaseIndex=function(e){return this._index+=Math.max(e,0),this},t.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},t.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},t.toggle=function(e,t){var n=this._toggleDirection,i=this._togglePosition;if(n===S.NONE||t===e)return!1;var r=this._toggled;return t>e?i>=e&&i<=t&&(this._toggled=n===S.NEXT):i<=e&&i>=t&&(this._toggled=n!==S.NEXT),r!==this._toggled},t.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=S.NONE,this._toggled=!1,this;var t=e.camera,n=t.range,i=t.alignPosition,r=t.visibleRange,o=r.max-r.min,a=n.min-i,s=n.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=S.PREV,this._togglePosition=this.range.max+n.min-n.max+i,this.toggle(1/0,t.position)):l?(this._toggleDirection=S.NEXT,this._togglePosition=this.range.min+n.max-o+i,this.toggle(-1/0,t.position)):(this._toggleDirection=S.NONE,this._togglePosition=0),this},t._updateAlignPos=function(){this._alignPos=B(this._align,this._size)},t._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=S.NONE},e}(),ir=function(){function e(e){var t=e.providerCtor;this._providerCtor=t}var t=e.prototype;return t.renderPanels=function(){},t.getRenderingIndexesByOrder=function(e){var t=e.renderer.panels.filter((function(e){return e.rendered})),n=t.filter((function(e){return e.toggled&&e.toggleDirection===S.PREV})),i=t.filter((function(e){return e.toggled&&e.toggleDirection===S.NEXT}));return s(n,t.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},t.getRenderingElementsByOrder=function(e){var t=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].element}))},t.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},t.collectPanels=function(e,t){var n=this,i=U(e.renderer.align);return t.map((function(t,r){return new nr({index:r,elementProvider:new n._providerCtor(t),align:i,flicking:e})}))},t.createPanel=function(e,t){return new nr(n(n({},t),{elementProvider:new this._providerCtor(e)}))},t.updatePanelSizes=function(e,t){e.panels.forEach((function(e){return e.setSize(t)}))},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in i||t.loading?t.markForShow():e.holding||t.markForHide()})),n.updateOffset()},e}(),rr=function(e){function n(t){var n=e.call(this,t)||this;return t.elementProvider.init(n),n._elProvider=t.elementProvider,n._cachedInnerHTML=null,n}t(n,e);var i=n.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,t=e.panelsPerView+1,n=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===S.NEXT?i+n:i-n),ae(i,t)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,t=e.renderPanel,n=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||t(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,n&&this.cacheRenderResult(r))},i.increaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,t)},i.decreaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,t)},n}(nr),or=function(){function e(){}var t=e.prototype;return t.renderPanels=function(e){var t=e.virtual,n=e.visiblePanels,i=se(e.panelsPerView+1);n.forEach((function(e){var n=e.elementIndex;e.render(),t.show(n),i[n]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){t.hide(e)}))},t.getRenderingIndexesByOrder=function(e){var t=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)}));return i.length<=0?t.elements.map((function(e,t){return t})):s(i.map((function(e){return e.elementIndex})),t.elements.map((function(e,t){return n(n({},e),{idx:t})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},t.getRenderingElementsByOrder=function(e){var t=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].nativeElement}))},t.updateRenderingPanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),n.updateOffset()},t.collectPanels=function(e){var t=U(e.renderer.align);return se(e.virtual.initialPanelCount).map((function(n){return new rr({index:n,elementProvider:new pe(e),align:t,flicking:e})}))},t.createPanel=function(e,t){return new rr(n(n({},t),{elementProvider:new pe(t.flicking)}))},t.updatePanelSizes=function(e,t){e.virtual.elements.forEach((function(e){re(e.nativeElement,t)})),e.panels.forEach((function(e){return e.setSize(t)}))},e}(),ar={__proto__:null,Renderer:$i,VanillaRenderer:er,ExternalRenderer:tr,NormalRenderingStrategy:ir,VirtualRenderingStrategy:or},sr=function(e){function o(t,n){var i=void 0===n?{}:n,r=i.align,o=void 0===r?k.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?j.LINEAR:f,p=i.bound,g=void 0!==p&&p,v=i.adaptive,m=void 0!==v&&v,_=i.panelsPerView,b=void 0===_?-1:_,y=i.noPanelStyleOverride,P=void 0!==y&&y,E=i.resizeOnContentsReady,x=void 0!==E&&E,T=i.needPanelThreshold,O=void 0===T?0:T,w=i.preventEventsBeforeInit,R=void 0===w||w,I=i.deceleration,A=void 0===I?.0075:I,C=i.duration,S=void 0===C?500:C,N=i.easing,D=void 0===N?function(e){return 1-Math.pow(1-e,3)}:N,z=i.inputType,L=void 0===z?["mouse","touch"]:z,H=i.moveType,F=void 0===H?"snap":H,V=i.threshold,G=void 0===V?40:V,B=i.interruptable,X=void 0===B||B,Y=i.bounce,W=void 0===Y?"20%":Y,U=i.iOSEdgeSwipeThreshold,q=void 0===U?30:U,Z=i.preventClickOnDrag,K=void 0===Z||Z,J=i.disableOnInit,Q=void 0!==J&&J,$=i.renderOnlyVisible,ee=void 0!==$&&$,te=i.virtual,ne=void 0===te?null:te,ie=i.autoInit,re=void 0===ie||ie,oe=i.autoResize,ae=void 0===oe||oe,se=i.useResizeObserver,ue=void 0===se||se,le=i.resizeDebounce,ce=void 0===le?0:le,de=i.maxResizeDebounce,pe=void 0===de?100:de,ve=i.externalRenderer,me=void 0===ve?null:ve,_e=i.renderExternal,be=void 0===_e?null:_e,ye=e.call(this)||this;return ye._initialized=!1,ye._plugins=[],ye._align=o,ye._defaultIndex=s,ye._horizontal=l,ye._circular=h,ye._circularFallback=d,ye._bound=g,ye._adaptive=m,ye._panelsPerView=b,ye._noPanelStyleOverride=P,ye._resizeOnContentsReady=x,ye._virtual=ne,ye._needPanelThreshold=O,ye._preventEventsBeforeInit=R,ye._deceleration=A,ye._duration=S,ye._easing=D,ye._inputType=L,ye._moveType=F,ye._threshold=G,ye._interruptable=X,ye._bounce=W,ye._iOSEdgeSwipeThreshold=q,ye._preventClickOnDrag=K,ye._disableOnInit=Q,ye._renderOnlyVisible=ee,ye._autoInit=re,ye._autoResize=ae,ye._useResizeObserver=ue,ye._resizeDebounce=ce,ye._maxResizeDebounce=pe,ye._externalRenderer=me,ye._renderExternal=be,ye._viewport=new he(M(t)),ye._autoResizer=new fe(ye),ye._renderer=ye._createRenderer(),ye._camera=ye._createCamera(),ye._control=ye._createControl(),ye._virtualManager=new ge(ye,ne),ye._autoInit&&ye.init(),ye}t(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var t=this._control.controller;e?t.addPreventClickHandler():t.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),a.init=function(){var e=this;if(this._initialized)return Promise.resolve();var t=this._camera,n=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return t.init(),r.init(),n.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),n.checkPanelContentsReady(n.panels),n.render().then((function(){e._plugins.forEach((function(t){return t.init(e)})),e._initialized=!0,a&&(e.trigger=o),e.trigger(new g(C.READY))}))},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},a.prev=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.prev())||void 0===n?void 0:n.index)&&void 0!==i?i:-1,e,S.PREV)},a.next=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.next())||void 0===n?void 0:n.index)&&void 0!==i?i:this._renderer.panelCount,e,S.NEXT)},a.moveTo=function(e,t,n){void 0===t&&(t=this._duration),void 0===n&&(n=S.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new ce(R,v.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(o,{duration:t,direction:n}):Promise.reject(new ce(E(e,0,r-1),v.INDEX_OUT_OF_RANGE))},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var t,n,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map((function(e){var t={index:e.index};return l&&(t.html=e.element.outerHTML),t}))};if(o&&(d.index=this.index),s){var p=f.findNearestAnchor(f.position);p&&(d.position={panel:p.panel.index,progressInPanel:f.getProgressInPanel(p.panel)})}if(h){var g=this.visiblePanels;d.visibleOffset=null!==(n=null===(t=g[0])||void 0===t?void 0:t.index)&&void 0!==n?n:0}return d},a.setStatus=function(e){var t;if(!this._initialized)throw new ce(A,v.NOT_INITIALIZED);var n=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(t=o[0])||void 0===t?void 0:t.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),n){var u=r?n-r:n;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===N.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch((function(){}))}},a.addPlugins=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._initialized&&n.forEach((function(e){return e.init(t)})),(e=this._plugins).push.apply(e,s(n)),this},a.removePlugins=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){var n=te(e._plugins,(function(e){return e===t}));n>=0&&(t.destroy(),e._plugins.splice(n,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,t,n,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return e=this._viewport,t=this._renderer,n=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?n.getProgressInPanel(o):0,this.trigger(new g(C.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),[4,t.forceRenderAllPanels()];case 1:return r.sent(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),[4,t.render()];case 2:return r.sent(),i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new g(C.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),[2]}}))}))},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,t){if(this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(t),hasDOMInElements:!0})},a.remove=function(e,t){if(void 0===t&&(t=1),this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!0})},a._createControl=function(){var e,t=this._moveType,n=Object.keys(N).map((function(e){return N[e]})),i=Array.isArray(t)?t[0]:t,r=Array.isArray(t)&&null!==(e=t[1])&&void 0!==e?e:{};if(!J(n,i))throw new ce(P("moveType",JSON.stringify(t)),v.WRONG_OPTION);switch(i){case N.SNAP:return new vi(r);case N.FREE_SCROLL:return new mi(r);case N.STRICT:return new _i(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Ti(this,{align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,t=e.renderer,i=e.rendererOptions;return new t(n({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new er({align:this._align,strategy:e?new or:new ir({providerCtor:de})})},a._moveToInitialPanel=function(){var e=this._renderer,t=this._control,n=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=n.findNearestAnchor(i.position);if(t.setActive(i,null,!1),!r)throw new ce(x(i.position),v.POSITION_NOT_REACHABLE);var o=i.position;n.canReach(i)||(o=r.position),n.lookAt(o),t.updateInput(),n.updateOffset()}},a._initialResize=function(){var e=this._viewport,t=this._renderer,n=this._camera,i=this._control;this.trigger(new g(C.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),n.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new g(C.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.6.3",o}(p),ur=function(e,t,n,i,r){return e.batchInsertDefer.apply(e,s(t.added.slice(i,r).map((function(e,t){return{index:e,elements:[n[t]],hasDOMInElements:!1}}))))},lr=function(e,t,n){var i=e.panels.slice(t,n);return e.batchRemoveDefer({index:t,deleteCount:i.length,hasDOMInElements:!1})},cr=function(e){var t="object"==typeof e?e.camera:e;return fr(t)},hr=function(e){var t="object"==typeof e?e.panel:e;return W(fr(t))},fr=function(e){if("number"==typeof e)return e+"px";switch(e){case k.CENTER:return"50%";case k.NEXT:return"100%";case k.PREV:return"0%";default:return e}},dr={__proto__:null,withFlickingMethods:function(e,t){[p.prototype,sr.prototype].forEach((function(n){Object.getOwnPropertyNames(n).filter((function(t){return!e[t]&&0!==t.indexOf("_")&&"constructor"!==t})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(e=r.value).call.apply(e,s([this[t]],n))}});else{var o={};r.get&&(o.get=function(){var e,n=this[t];return n&&(null===(e=r.get)||void 0===e?void 0:e.call(n))}),r.set&&(o.set=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[t]],n))}),Object.defineProperty(e,i,o)}}))}))},sync:function(e,t,n){var i=e.renderer,r=i.panels,o=s(t.prevList),u=[],l=[];if(t.removed.length>0){var c=-1,h=-1;t.removed.forEach((function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s(lr(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)})),l.push.apply(l,s(lr(i,h,c+1)))}if(t.ordered.forEach((function(e){var t=a(e,2),n=t[0],i=t[1],o=r.splice(n,1)[0];r.splice(i,0,o)})),t.ordered.length>0&&(r.forEach((function(e,t){var n=t-e.index;n>0?e.increaseIndex(n):e.decreaseIndex(-n)})),r.sort((function(e,t){return e.index-t.index})),r.forEach((function(e){e.updatePosition()}))),t.added.length>0){var f=-1,d=-1,p=n.slice(o.length);t.added.forEach((function(e,n){f<0&&(f=n),d>=0&&e!==d+1?(u.push.apply(u,s(ur(i,t,p,f,n+1))),f=-1,d=-1):d=e})),f>=0&&u.push.apply(u,s(ur(i,t,p,f)))}(t.added.length>0||t.removed.length>0)&&i.updateAfterPanelChange(u,l)},getRenderingPanels:function(e,t){var n=t.removed.reduce((function(e,t){return e[t]=!0,e}),{}),i=t.maintained.reduce((function(e,t){var n=a(t,2),i=n[0],r=n[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!n[e.index]})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)})).map((function(e){return t.list[i[e.index]]})),t.added.map((function(e){return t.list[e]})))},getDefaultCameraTransform:function(e,t,n){void 0===e&&(e=k.CENTER),void 0===t&&(t=!0);var i=cr(e),r=hr(e);if(null==r)return"";var o="calc("+i+" - ("+(n||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return t?"translate("+o+")":"translate(0, "+o+")"}};return L(sr,{__proto__:null,Viewport:he,FlickingError:ce,AnchorPoint:gi,VirtualManager:ge,VanillaElementProvider:de,VirtualElementProvider:pe,Panel:nr,VirtualPanel:rr}),L(sr,Oi),L(sr,bi),L(sr,ar),L(sr,z),L(sr,dr),L(sr,le),sr}));
|
|
10
10
|
//# sourceMappingURL=flicking.pkgd.min.js.map
|