UNPKG

136 kBJavaScriptView Raw
1/*
2Copyright (c) 2015-present NAVER Corp.
3name: @egjs/flicking
4license: MIT
5author: NAVER Corp.
6repository: https://github.com/naver/egjs-flicking
7version: 4.10.0
8*/
9!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n()}(this,(function(){"use strict";var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var t=function(){return t=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},t.apply(this,arguments)};function i(e,n,t,i){return new(t||(t=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 n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}u((i=i.apply(e,n||[])).next())}))}function r(e,n){var t,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(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=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=n.call(e,a)}catch(e){o=[6,e],i=0}finally{t=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 n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(a(arguments[n]));return e}function u(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(l(arguments[n]));return e}var h=function(e){return void 0===e},f=function(){function e(e,n){var t,i;if(this._canceled=!1,n)try{for(var r=u(Object.keys(n)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=n[a]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}this.eventType=e}var n=e.prototype;return n.stop=function(){this._canceled=!0},n.isCanceled=function(){return this._canceled},e}(),d=function(){function e(){this._eventHandler={}}var n=e.prototype;return n.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof f?e.eventType:e,r=c(this._eventHandler[i]||[]);return r.length<=0||(e instanceof f?(e.currentTarget=this,r.forEach((function(n){n(e)}))):r.forEach((function(e){e.apply(void 0,c(n))}))),this},n.once=function(e,n){var t=this;if("object"==typeof e&&h(n)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof n){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n.apply(void 0,c(i)),t.off(e,o)};this.on(e,o)}return this},n.hasOn=function(e){return!!this._eventHandler[e]},n.on=function(e,n){if("object"==typeof e&&h(n)){var t=e;for(var i in t)this.on(i,t[i]);return this}if("string"==typeof e&&"function"==typeof n){var r=this._eventHandler[e];h(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(n)}return this},n.off=function(e,n){var t,i;if(h(e))return this._eventHandler={},this;if(h(n)){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===n){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}}return this},e.VERSION="3.0.2",e}(),g=f,p={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},v=function(e,n){return e+"("+typeof e+") is not a "+n.map((function(e){return'"'+e+'"'})).join(" or ")+"."},_=function(e){return'Element with selector "'+e+'" not found.'},m=function(e,n){return n+" should be provided. Given: "+e},b='This module is not attached to the Flicking instance. "init()" should be called first.',y=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},E=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},P=function(e){return'Position "'+e+'" is not reachable.'},x="Browser does not support CSS transform.",O="Event stop() is called by user.",w="Animation is interrupted by user input.",T="Animation is already playing.",R="This behavior is not allowed in the frameworks like React, Vue, or Angular.",A="Flicking is not initialized yet, call init() first.",I={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"},C={PREV:"PREV",NEXT:"NEXT",NONE:null},M={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},S={VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},N={LINEAR:"linear",BOUND:"bound"},D={__proto__:null,EVENTS:I,ALIGN:k,DIRECTION:C,MOVE_TYPE:M,CLASS:S,CIRCULAR_FALLBACK:N,ERROR_CODE:p},j=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.forEach((function(n){Object.keys(n).forEach((function(t){e[t]=n[t]}))})),e},z=function(e,n){var t=null;if(Q(e)){var i=(n||document).querySelector(e);if(!i)throw new ce(_(e),p.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new ce(v(e,["HTMLElement","string"]),p.WRONG_TYPE);return t},L=function(e,n){if(null==e)throw new ce(m(e,n),p.VAL_MUST_NOT_NULL)},V=function(e,n,t){return Math.max(Math.min(e,t),n)},F=function(e){if(!e)throw new ce(b,p.NOT_ATTACHED_TO_FLICKING);return e},H=function(e){return[].slice.call(e)},B=function(e,n){var t;if(Q(e))switch(e){case k.PREV:t=0;break;case k.CENTER:t=.5*n;break;case k.NEXT:t=n;break;default:if(null==(t=X(e,n)))throw new ce(y("align",e),p.WRONG_OPTION)}else t=e;return t},G=function(e,n){var t;if(Array.isArray(e))t=e.map((function(e){return X(e,n)}));else{var i=X(e,n);t=[i,i]}return t.map((function(n){if(null==n)throw new ce(y("bounce",e),p.WRONG_OPTION);return n}))},X=function(e,n){var t=W(e);return null==t?null:t.percentage*n+t.absolute},W=function(e){var n=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var t={percentage:0,absolute:0},i=0,r=n.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?t.percentage+=l*(u/100):t.absolute+=l*u,++i,r=n.exec(e)}return 0===i?null:t},Y=function(e){return"object"==typeof e?e.panel:e},U=function(e,n){return e===n?C.NONE:e<n?C.NEXT:C.PREV},q=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){if(Q(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,s(H(t.children)));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new ce(v(e,["HTMLElement","string"]),p.WRONG_TYPE);n.push(e)}})),n},Z=function(e,n){return V(e<0?e+n:e,0,n)},K=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===n)return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return!1},Q=function(e){return"string"==typeof e},J=function(e,n,t){var i=t-n;if(e<n)e=t-(n-e)%i;else if(e>t){e=n+(e-t)%i}return e},$=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(n(s))return s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},ee=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},ne=function(e,n,t){return(e-n)/(t-n)},te=function(e){return window.getComputedStyle(e)||e.currentStyle},ie=function(e,n){var t=n.width,i=n.height;null!=t&&(Q(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&(Q(i)?e.style.height=i:e.style.height=i+"px")},re=function(e,n,t){return e>=n&&e<=t},oe=function(e,n){return e>=n?e%n:e<0?Z((e+1)%n-1,n):e},ae=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},se=function(e){var n=e.el,t=e.horizontal,i=e.useFractionalSize,r=e.useOffset,o=e.style;if(i){var a=parseFloat(t?o.width:o.height),s="border-box"===o.boxSizing,u=t?parseFloat(o.borderLeftWidth||"0")+parseFloat(o.borderRightWidth||"0"):parseFloat(o.borderTopWidth||"0")+parseFloat(o.borderBottomWidth||"0");if(s)return r?a:a-u;var l=t?parseFloat(o.paddingLeft||"0")+parseFloat(o.paddingRight||"0"):parseFloat(o.paddingTop||"0")+parseFloat(o.paddingBottom||"0");return r?a+l+u:a+l}var c=t?"Width":"Height";return r?n["offset"+c]:n["client"+c]},ue=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},le={__proto__:null,merge:j,getElement:z,checkExistence:L,clamp:V,getFlickingAttached:F,toArray:H,parseAlign:B,parseBounce:G,parseArithmeticSize:X,parseArithmeticExpression:W,parseCSSSizeValue:function(e){return Q(e)?e:e+"px"},parsePanelAlign:Y,getDirection:U,parseElement:q,getMinusCompensatedIndex:Z,includes:K,isString:Q,circulatePosition:J,find:$,findRight:function(e,n){for(var t=e.length-1;t>=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:ee,getProgress:ne,getStyle:te,setSize:ie,isBetween:re,circulateIndex:oe,range:ae,getElementSize:se,setPrototypeOf:ue},ce=function(e){function t(n,i){var r=e.call(this,n)||this;return ue(r,t.prototype),r.name="FlickingError",r.code=i,r}return n(t,e),t}(Error),he=function(){function e(e,n){this._flicking=e,this._el=n,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if(Q(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(Q(t))i.style.height=t;else{var s=o?t+r.top+r.bottom:t;i.style.height=s+"px"}this.resize()},n.resize=function(){var e=this._el,n=te(e),t=this._flicking.useFractionalSize;this._width=se({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=se({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),fe=function(){function e(e){var n,t=this;this._onResize=function(){var e=t._flicking,n=e.resizeDebounce,i=e.maxResizeDebounce;n<=0?e.resize():(t._maxResizeDebounceTimer<=0&&i>0&&i>=n&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,i)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,n))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(){n?n=!1:t._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);t.observe(e.viewport.element),this._resizeObserver=t}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},n.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 n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),ge=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),pe=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:S.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"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(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map((function(e){return{nativeElement:e,visible:!0}}))}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:ae(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();ae(i+1).map((function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t})).forEach((function(e){r.appendChild(e)})),t.appendChild(r)},e}();function ve(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return!0;return!1}function _e(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return e[i];return null}function me(e){var n=e;if(void 0===n){if("undefined"==typeof navigator||!navigator)return"";n=navigator.userAgent||""}return n.toLowerCase()}function be(e,n){try{return new RegExp(e,"g").exec(n)}catch(e){return null}}function ye(e){return e.replace(/_/g,".")}function Ee(e,n){var t=null,i="-1";return ve(e,(function(e){var r=be("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return!(!r||e.brand)&&(t=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,n){var t=be("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n);return t?t[3]:""}(e.versionTest.toLowerCase(),n)||i),i=ye(i),!0)})),{preset:t,version:i}}function Pe(e,n){var t={brand:"",version:"-1"};return ve(e,(function(e){var i=xe(n,e);return!!i&&(t.brand=e.id,t.version=e.versionAlias||i.version,"-1"!==t.version)})),t}function xe(e,n){return _e(e,(function(e){var t=e.brand;return be(""+n.test,t.toLowerCase())}))}var Oe=[{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"}],we=[{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}],Te=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Re=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Ae=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Ie(e){return!!Ee(Re,e).preset}var ke=function(){function e(e){this._emitter=new d,this._current=e}var n=e.prototype;return Object.defineProperty(n,"current",{get:function(){return this._current},set:function(e){var n=e!==this._current;this._current=e,n&&this._emitter.trigger("update",e)},enumerable:!1,configurable:!0}),n.subscribe=function(e){this._emitter.on("update",e)},n.unsubscribe=function(e){this._emitter.off("update",e)},e}();function Ce(e){return e.__observers__||(e.__observers__={}),e.__observers__}function Me(e,n,t){var i=Ce(e);return i[n]||(i[n]=function(e){return new ke(e)}(t)),i[n]}function Se(e){e.subscribe=function(e,n){Me(this,e).subscribe(n)},e.unsubscribe=function(e,n){var t,i=this;e?e in this&&Me(this,e).unsubscribe(n):(t=Ce(this),Object.keys(t)).forEach((function(e){i.unsubscribe(e)}))}}function Ne(e){Se(e.prototype)}var De=function(e,n){return De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},De(e,n)};function je(e,n){function t(){this.constructor=e}De(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var ze,Le=function(){return Le=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},Le.apply(this,arguments)};ze="undefined"==typeof window?{navigator:{userAgent:""}}:window;var Ve,Fe=24,He="left",Be="right",Ge="middle",Xe="ontouchstart"in ze&&"safari"===(void 0===Ve&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,n=e.brands||e.uaList;return!(!n||!n.length)}()?function(e){var n=navigator.userAgentData,t=(n.uaList||n.brands).slice(),i=e&&e.fullVersionList,r=n.mobile||!1,o=t[0],a=(e&&e.platform||n.platform||navigator.platform).toLowerCase(),s={name:o.brand,version:o.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Pe(Re,t).brand||Ie(me())},u={name:"unknown",version:"-1",majorVersion:-1};s.webkit=!s.chromium&&ve(Te,(function(e){return xe(t,e)}));var l=Pe(we,t);if(s.chromium=!!l.brand,s.chromiumVersion=l.version,!s.chromium){var c=Pe(Te,t);s.webkit=!!c.brand,s.webkitVersion=c.version}var h=_e(Ae,(function(e){return new RegExp(""+e.test,"g").exec(a)}));if(u.name=h?h.id:"",e&&(u.version=e.platformVersion),i&&i.length){var f=Pe(Oe,i);s.name=f.brand||s.name,s.version=f.version||s.version}else{var d=Pe(Oe,t);s.name=d.brand||s.name,s.version=d.brand&&e?e.uaFullVersion:d.version}return s.webkit&&(u.name=r?"ios":"mac"),"ios"===u.name&&s.webview&&(s.version="-1"),u.version=ye(u.version),s.version=ye(s.version),u.majorVersion=parseInt(u.version,10),s.majorVersion=parseInt(s.version,10),{browser:s,os:u,isMobile:r,isHints:!0}}():function(e){var n=me(e),t=!!/mobi/g.exec(n),i={name:"unknown",version:"-1",majorVersion:-1,webview:Ie(n),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Ee(Oe,n),a=o.preset,s=o.version,u=Ee(Ae,n),l=u.preset,c=u.version,h=Ee(we,n);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=Ee(Te,n);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:t,isHints:!1}}(Ve)).browser.name,We=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,n=["transform","webkitTransform","msTransform","mozTransform"],t=0,i=n.length;t<i;t++)if(n[t]in e)return n[t];return""}(),Ye={"user-select":"none","-webkit-user-drag":"none"},Ue=function(e){for(var n=[],t=0,i=e.length;t<i;t++)n.push(e[t]);return n},qe=function(e,n){var t;if(void 0===n&&(n=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,t=Ue(i.childNodes)}else t=Ue(document.querySelectorAll(e));n||(t=t.length>=1?t[0]:void 0)}else e===ze?t=e:"value"in e||"current"in e?t=e.value||e.current:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in ze&&e instanceof jQuery||e.constructor.prototype.jquery?t=n?e.toArray():e.get(0):Array.isArray(e)&&(t=e.map((function(e){return qe(e)})),n||(t=t.length>=1?t[0]:void 0)):t=e;return t},Ze=ze.requestAnimationFrame||ze.webkitRequestAnimationFrame,Ke=ze.cancelAnimationFrame||ze.webkitCancelAnimationFrame;if(Ze&&!Ke){var Qe={},Je=Ze;Ze=function(e){var n=Je((function(t){Qe[n]&&e(t)}));return Qe[n]=!0,n},Ke=function(e){delete Qe[e]}}else Ze&&Ke||(Ze=function(e){return ze.setTimeout((function(){e(ze.performance&&ze.performance.now&&ze.performance.now()||(new Date).getTime())}),16)},Ke=ze.clearTimeout);var $e,en=function(e,n){var t={};for(var i in e)i&&(t[i]=n(e[i],i));return t},nn=function(e,n){var t={};for(var i in e)i&&n(e[i],i)&&(t[i]=e[i]);return t},tn=function(e,n){for(var t in e)if(t&&!n(e[t],t))return!1;return!0},rn=function(e,n){return tn(e,(function(e,t){return e===n[t]}))},on={},an=function(e,n){return on[n]||(on[n]=ln(n)),on[n](e)},sn=function(e,n){return e&&n?en(e,(function(e,t){return an(e,"number"==typeof n?n:n[t])})):e},un=function(e){if(!isFinite(e))return 0;var n="".concat(e);if(n.indexOf("e")>=0){for(var t=0,i=1;Math.round(e*i)/i!==e;)i*=10,t++;return t}return n.indexOf(".")>=0?n.length-n.indexOf(".")-1:0},ln=function(e){var n=e<1?Math.pow(10,un(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},cn=function(e,n,t){return t?!!(30===n||n&e&&t&e):!!(n&e)},hn=function(){function e(e){this._axes=e}var n=e.prototype;return n.hold=function(e,n){var t=this._getRoundPos(e).roundPos;this._axes.trigger(new g("hold",{pos:t,input:n.input||null,inputEvent:n.event||null,isTrusted:!0}))},n.triggerRelease=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration),this._axes.trigger(new g("release",Le(Le({},e),{bounceRatio:this._getBounceRatio(t)})))},n.triggerChange=function(e,n,t,i){var r=this;void 0===i&&(i=!1);var o=this.animationManager,a=o.axisManager,s=o.getEventInfo(),u=this._getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=(null==t?void 0:t.event)||(null==s?void 0:s.event)||null,d={pos:h.pos,delta:h.delta,bounceRatio:this._getBounceRatio(h.pos),holding:i,inputEvent:f,isTrusted:!!f,input:(null==t?void 0:t.input)||(null==s?void 0:s.input)||null,set:f?this._createUserControll(h.pos):function(){}},p=new g("change",d);return this._axes.trigger(p),Object.keys(h.pos).forEach((function(e){var n=h.pos[e];Me(r._axes,e,n).current=n})),f&&a.set(d.set().destPos),!p.isCanceled()},n.triggerAnimationStart=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration);var r=new g("animationStart",e);return this._axes.trigger(r),!r.isCanceled()},n.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("animationEnd",{isTrusted:e}))},n.triggerFinish=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("finish",{isTrusted:e}))},n.setAnimationManager=function(e){this.animationManager=e},n.destroy=function(){this._axes.off()},n._createUserControll=function(e,n){void 0===n&&(n=0);var t={destPos:Le({},e),duration:n};return function(e,n){return e&&(t.destPos=Le({},e)),void 0!==n&&(t.duration=n),t}},n._getRoundPos=function(e,n){var t=this._axes.options.round;return{roundPos:sn(e,t),roundDepa:sn(n,t)}},n._getBounceRatio=function(e){return this._axes.axisManager.map(e,(function(e,n){return e<n.range[0]&&0!==n.bounce[0]?(n.range[0]-e)/n.bounce[0]:e>n.range[1]&&0!==n.bounce[1]?(e-n.range[1])/n.bounce[1]:0}))},e}(),fn=function(){function e(e){this._options=e,this._prevented=!1}var n=e.prototype;return n.isInterrupting=function(){return this._options.interruptable||this._prevented},n.isInterrupted=function(){return!this._options.interruptable&&this._prevented},n.setInterrupt=function(e){this._options.interruptable||(this._prevented=e)},e}(),dn=function(e,n,t,i){var r=e,o=[t[0]?n[0]:i?n[0]-i[0]:n[0],t[1]?n[1]:i?n[1]+i[1]:n[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)},gn=function(e,n){return e<n[0]||e>n[1]},pn=function(e,n,t){return t[1]&&e>n[1]||t[0]&&e<n[0]},vn=function(e,n,t){var i=e,r=n[0],o=n[1],a=o-r;return t[1]&&e>o&&(i=(i-o)%a+r),t[0]&&e<r&&(i=(i-r)%a+o),i},_n=function(){function e(e){var n=this;this._axis=e,this._complementOptions(),this._pos=Object.keys(this._axis).reduce((function(e,t){return e[t]=n._axis[t].startPos,e}),{})}var n=e.prototype;return n.getDelta=function(e,n){var t=this.get(e);return en(this.get(n),(function(e,n){return e-t[n]}))},n.get=function(e){var n=this;return e&&Array.isArray(e)?e.reduce((function(e,t){return t&&t in n._pos&&(e[t]=n._pos[t]),e}),{}):Le(Le({},this._pos),e||{})},n.moveTo=function(e,n){void 0===n&&(n=this._pos);var t=en(this._pos,(function(t,i){return i in e&&i in n?e[i]-n[i]:0}));return this.set(this.map(e,(function(e,n){return n?vn(e,n.range,n.circular):0}))),{pos:Le({},this._pos),delta:t}},n.set=function(e){for(var n in e)n&&n in this._pos&&(this._pos[n]=e[n])},n.every=function(e,n){var t=this._axis;return tn(e,(function(e,i){return n(e,t[i],i)}))},n.filter=function(e,n){var t=this._axis;return nn(e,(function(e,i){return n(e,t[i],i)}))},n.map=function(e,n){var t=this._axis;return en(e,(function(e,i){return n(e,t[i],i)}))},n.isOutside=function(e){return!this.every(e?this.get(e):this._pos,(function(e,n){return!gn(e,n.range)}))},n.getAxisOptions=function(e){return this._axis[e]},n.setAxis=function(e){var n=this;Object.keys(e).forEach((function(t){if(!n._axis[t])throw new Error("Axis ".concat(t," does not exist in Axes instance"));n._axis[t]=Le(Le({},n._axis[t]),e[t])})),this._complementOptions()},n._complementOptions=function(){var e=this;Object.keys(this._axis).forEach((function(n){e._axis[n]=Le({range:[0,100],startPos:e._axis[n].range[0],bounce:[0,0],circular:[!1,!1]},e._axis[n]),["bounce","circular"].forEach((function(t){var i=e._axis,r=i[n][t];/string|number|boolean/.test(typeof r)&&(i[n][t]=[r,r])}))}))},e}(),mn="ontouchstart"in ze,bn="PointerEvent"in ze,yn=bn||"MSPointerEvent"in ze,En=function(){function e(){var e=this;this._stopContextMenu=function(n){n.preventDefault(),ze.removeEventListener("contextmenu",e._stopContextMenu)}}var n=e.prototype;return n.extendEvent=function(e){var n,t,i,r=this.prevEvent,o=this._getCenter(e),a=r?this._getMovement(e):{x:0,y:0},s=r?this._getScale(e):1,u=r?(t=o.x-r.center.x,i=o.y-r.center.y,180*Math.atan2(i,t)/Math.PI):0,l=r?r.deltaX+a.x:a.x,c=r?r.deltaY+a.y:a.y,h=a.x,f=a.y,d=this._latestInterval,g=Date.now(),p=d?g-d.timestamp:0,v=r?r.velocityX:0,_=r?r.velocityY:0;return(!d||p>=16)&&(d&&(v=(n=[(l-d.deltaX)/p,(c-d.deltaY)/p])[0],_=n[1]),this._latestInterval={timestamp:g,deltaX:l,deltaY:c}),{srcEvent:e,scale:s,angle:u,center:o,deltaX:l,deltaY:c,offsetX:h,offsetY:f,velocityX:v,velocityY:_,preventSystemEvent:!0}},n._getDistance=function(e,n){var t=n.clientX-e.clientX,i=n.clientY-e.clientY;return Math.sqrt(t*t+i*i)},n._getButton=function(e){var n={1:He,2:Be,4:Ge},t=this._isTouchEvent(e)?He:n[e.buttons];return t||null},n._isTouchEvent=function(e){return e.type.indexOf("touch")>-1},n._isValidButton=function(e,n){return n.indexOf(e)>-1},n._preventMouseButton=function(e,n){n===Be?ze.addEventListener("contextmenu",this._stopContextMenu):n===Ge&&e.preventDefault()},e}(),Pn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown"],n.move=["mousemove"],n.end=["mouseup"],n}je(n,e);var t=n.prototype;return t.onEventStart=function(e,n){var t=this._getButton(e);return n&&!this._isValidButton(t,n)?null:(this._preventMouseButton(e,t),this.extendEvent(e))},t.onEventMove=function(e,n){return n&&!this._isValidButton(this._getButton(e),n)?null:this.extendEvent(e)},t.onEventEnd=function(){},t.onRelease=function(){this.prevEvent=null},t.getTouches=function(e,n){if(n){var t={1:He,2:Ge,3:Be};return this._isValidButton(t[e.which],n)&&-1===this.end.indexOf(e.type)?1:0}return 0},t._getScale=function(){return 1},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},n}(En),xn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["touchstart"],n.move=["touchmove"],n.end=["touchend","touchcancel"],n}je(n,e);var t=n.prototype;return t.onEventStart=function(e){return this._baseTouches=e.touches,this.extendEvent(e)},t.onEventMove=function(e){return this.extendEvent(e)},t.onEventEnd=function(e){this._baseTouches=e.touches},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e){return e.touches.length},t._getScale=function(e){return 2!==e.touches.length||this._baseTouches.length<2?null:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},t._getCenter=function(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.touches[0].identifier!==n.touches[0].identifier?{x:0,y:0}:{x:e.touches[0].clientX-n.touches[0].clientX,y:e.touches[0].clientY-n.touches[0].clientY}},n}(En),On=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=bn?["pointerdown"]:["MSPointerDown"],n.move=bn?["pointermove"]:["MSPointerMove"],n.end=bn?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],n._firstInputs=[],n._recentInputs=[],n}je(n,e);var t=n.prototype;return t.onEventStart=function(e,n){var t=this._getButton(e);return n&&!this._isValidButton(t,n)?null:(this._preventMouseButton(e,t),this._updatePointerEvent(e),this.extendEvent(e))},t.onEventMove=function(e,n){return n&&!this._isValidButton(this._getButton(e),n)?null:(this._updatePointerEvent(e),this.extendEvent(e))},t.onEventEnd=function(e){this._removePointerEvent(e)},t.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},t.getTouches=function(){return this._recentInputs.length},t._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.pointerId!==n.pointerId?{x:0,y:0}:{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},t._updatePointerEvent=function(e){var n=this,t=!1;this._recentInputs.forEach((function(i,r){i.pointerId===e.pointerId&&(t=!0,n._recentInputs[r]=e)})),t||(this._firstInputs.push(e),this._recentInputs.push(e))},t._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter((function(n){return n.pointerId!==e.pointerId})),this._recentInputs=this._recentInputs.filter((function(n){return n.pointerId!==e.pointerId}))},n}(En),wn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown","touchstart"],n.move=["mousemove","touchmove"],n.end=["mouseup","touchend","touchcancel"],n}je(n,e);var t=n.prototype;return t.onEventStart=function(e,n){var t=this._getButton(e);return this._isTouchEvent(e)&&(this._baseTouches=e.touches),n&&!this._isValidButton(t,n)?null:(this._preventMouseButton(e,t),this.extendEvent(e))},t.onEventMove=function(e,n){return n&&!this._isValidButton(this._getButton(e),n)?null:this.extendEvent(e)},t.onEventEnd=function(e){this._isTouchEvent(e)&&(this._baseTouches=e.touches)},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e){return this._isTouchEvent(e)?e.touches.length:0},t._getScale=function(e){return this._isTouchEvent(e)?2!==e.touches.length||this._baseTouches.length<2?1:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},t._getCenter=function(e){return this._isTouchEvent(e)?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this,t=[e,this.prevEvent.srcEvent].map((function(e){return n._isTouchEvent(e)?{id:e.touches[0].identifier,x:e.touches[0].clientX,y:e.touches[0].clientY}:{id:null,x:e.clientX,y:e.clientY}})),i=t[0],r=t[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},n}(En),Tn=function(e,n){return n.reduce((function(n,t,i){return e[i]&&(n[e[i]]=t),n}),{})},Rn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager,o=e.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=n,this._interruptManager=t,this._eventManager=i,this._axisManager=r,this._animationManager=o}var n=e.prototype;return n.get=function(e){return this._axisManager.get(e.axes)},n.hold=function(e,n){if(!this._interruptManager.isInterrupted()&&e.axes.length){var t={input:e,event:n};this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(t),this._moveDistance||this._eventManager.hold(this._axisManager.get(),t),this._isOutside=this._axisManager.isOutside(e.axes),this._moveDistance=this._axisManager.get(e.axes)}},n.change=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&!this._axisManager.every(t,(function(e){return 0===e}))){var r=n.srcEvent?n.srcEvent:n;if(!r.__childrenAxesAlreadyChanged){var o,a=this._moveDistance||this._axisManager.get(e.axes);o=en(a,(function(e,n){return e+(t[n]||0)})),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,(function(e,n){var t=n.circular,i=n.range;return t&&(t[0]||t[1])?vn(e,i,t):e}))),this._isOutside&&this._axisManager.every(a,(function(e,n){return!gn(e,n.range)}))&&(this._isOutside=!1),a=this._atOutside(a),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(t,a,o)||(r.__childrenAxesAlreadyChanged=!0);var s={input:e,event:n};if(i){var u=this._animationManager.getDuration(o,a);this._animationManager.animateTo(o,u,s)}else{!this._eventManager.triggerChange(o,a,s,!0)&&(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))}}}},n.release=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance){var r=n.srcEvent?n.srcEvent:n;r.__childrenAxesAlreadyReleased&&(t=t.map((function(){return 0})));var o=this._axisManager.get(e.axes),a=this._axisManager.get(),s=this._animationManager.getDisplacement(t),u=Tn(e.axes,s),l=this._axisManager.get(this._axisManager.map(u,(function(e,n,t){return n.circular&&(n.circular[0]||n.circular[1])?o[t]+e:dn(o[t]+e,n.range,n.circular,n.bounce)})));r.__childrenAxesAlreadyReleased=!0;var c=this._animationManager.getDuration(l,o,i);0===c&&(l=Le({},a));var h={depaPos:a,destPos:l,duration:c,delta:this._axisManager.getDelta(a,l),inputEvent:n,input:e,isTrusted:!0};this._eventManager.triggerRelease(h),this._moveDistance=null;var f=this._animationManager.getUserControl(h),d=rn(f.destPos,a),g={input:e,event:n};d||0===f.duration?(d||this._eventManager.triggerChange(f.destPos,a,g,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(g):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(f.destPos,f.duration,g)}},n._atOutside=function(e){var n=this;return this._isOutside?this._axisManager.map(e,(function(e,n){var t=n.range[0]-n.bounce[0],i=n.range[1]+n.bounce[1];return e>i?i:e<t?t:e})):this._axisManager.map(e,(function(e,t){var i=t.range[0],r=t.range[1],o=t.bounce,a=t.circular;return a&&(a[0]||a[1])?e:e<i?i-n._animationManager.interpolate(i-e,o[0]):e>r?r+n._animationManager.interpolate(e-r,o[1]):e}))},n._isEndofAxis=function(e,n,t){return this._axisManager.every(n,(function(i,r,o){return 0===e[o]||n[o]===t[o]&&function(e,n,t,i){return!i[0]&&e===n[0]-t[0]||!i[1]&&e===n[1]+t[1]}(i,r.range,r.bounce,r.circular)}))},e}(),An=function(e,n,t){return Math.max(Math.min(e,t),n)},In=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager;this._options=n,this.interruptManager=t,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var n=e.prototype;return n.getDuration=function(e,n,t){var i,r=this;if(void 0!==t)i=t;else{var o=en(n,(function(n,t){return function(e,n){var t=Math.sqrt(e/n*2);return t<100?0:t}(Math.abs(n-e[t]),r._options.deceleration)}));i=Object.keys(o).reduce((function(e,n){return Math.max(e,o[n])}),-1/0)}return An(i,this._options.minimumDuration,this._options.maximumDuration)},n.getDisplacement=function(e){var n=Math.pow(e.reduce((function(e,n){return e+n*n}),0),1/e.length),t=Math.abs(n/-this._options.deceleration);return e.map((function(e){return e/2*t}))},n.stopAnimation=function(e){if(this._animateParam){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return vn(e,n.range,n.circular)}));tn(t,(function(e,t){return n[t]===e}))||this.eventManager.triggerChange(t,n,e,!!e),this._animateParam=null,this._raf&&(i=this._raf,Ke(i)),this._raf=null,this.eventManager.triggerAnimationEnd(!!(null==e?void 0:e.event))}var i},n.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},n.restore=function(e){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return Math.min(n.range[1],Math.max(n.range[0],e))}));this.stopAnimation(),this.animateTo(t,this.getDuration(n,t),e)},n.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var n=this.axisManager.filter(this.axisManager.get(),(function(e,n){return pn(e,n.range,n.circular)}));Object.keys(n).length>0&&this.setTo(this.axisManager.map(n,(function(e,n){return vn(e,n.range,n.circular)}))),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!e),this.axisManager.isOutside()?this.restore(e):this.finish(!!e)},n.finish=function(e){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(e)},n.getUserControl=function(e){var n=e.setTo();return n.destPos=this.axisManager.get(n.destPos),n.duration=An(n.duration,this._options.minimumDuration,this._options.maximumDuration),n},n.animateTo=function(e,n,t){var i=this;this.stopAnimation();var r=this._createAnimationParam(e,n,t),o=Le({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),s=this.getUserControl(r);if(!a&&this.axisManager.every(s.destPos,(function(e,n){return pn(e,n.range,n.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!rn(s.destPos,o)){var u=(null==t?void 0:t.event)||null;this._animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axisManager.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:(null==t?void 0:t.input)||null},(function(){return i.animationEnd()}))}},n.setTo=function(e,n){void 0===n&&(n=0);var t=Object.keys(e),i=this.axisManager.get(t);if(rn(e,i))return this;this.interruptManager.setInterrupt(!0);var r=nn(e,(function(e,n){return i[n]!==e}));return Object.keys(r).length?(r=this.axisManager.map(r,(function(e,n){var t=n.range,i=n.circular;return i&&(i[0]||i[1])?e:dn(e,t,i)})),rn(r,i)||(n>0?this.animateTo(r,n):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},n.setBy=function(e,n){return void 0===n&&(n=0),this.setTo(en(this.axisManager.get(Object.keys(e)),(function(n,t){return n+e[t]})),n)},n._createAnimationParam=function(e,n,t){var i=this.axisManager.get(),r=e,o=(null==t?void 0:t.event)||null;return{depaPos:i,destPos:r,duration:An(n,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:o,input:(null==t?void 0:t.input)||null,isTrusted:!!o,done:this.animationEnd}},n._animateLoop=function(e,n){var t=this;if(e.duration){this._animateParam=Le(Le({},e),{startTime:(new Date).getTime()});var i=en(e.destPos,(function(e){return e})),r=this._initState(this._animateParam),o=function(){t._raf=null;var e=t._animateParam,a=t._getNextState(r),s=!t.eventManager.triggerChange(a.pos,r.pos);if(r=a,a.finished)return e.destPos=t._getFinalPos(e.destPos,i),rn(e.destPos,t.axisManager.get(Object.keys(e.destPos)))||t.eventManager.triggerChange(e.destPos,a.pos),void n();s?t.finish(!1):t._raf=Ze(o)};o()}else this.eventManager.triggerChange(e.destPos),n()},n._getFinalPos=function(e,n){var t=this,i=1e-6;return en(e,(function(e,r){if(e>=n[r]-i&&e<=n[r]+i)return n[r];var o=t._getRoundUnit(e,r);return an(e,o)}))},n._getRoundUnit=function(e,n){var t,i=this._options.round,r=null;if(!i){var o=this.axisManager.getAxisOptions(n);t=Math.max(un(o.range[0]),un(o.range[1]),un(e)),r=1/Math.pow(10,t)}return r||i},e}(),kn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._useDuration=!0,n}je(n,e);var t=n.prototype;return t.interpolate=function(e,n){var t=this._easing(1e-5)/1e-5;return this._easing(e/(n*t))*n},t.updateAnimation=function(e){var n,t=this._animateParam;if(t){var i=(new Date).getTime()-t.startTime,r=(null==e?void 0:e.destPos)||t.destPos,o=null!==(n=null==e?void 0:e.duration)&&void 0!==n?n:t.duration;if((null==e?void 0:e.restart)||o<=i)this.setTo(r,o-i);else{if(null==e?void 0:e.destPos){var a=this.axisManager.get();this._initialEasingPer=this._prevEasingPer,t.delta=this.axisManager.getDelta(a,r),t.destPos=r}if(null==e?void 0:e.duration){var s=(i+this._durationOffset)/t.duration;this._durationOffset=s*o-i,t.duration=o}}}},t._initState=function(e){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:e.depaPos,easingPer:0,finished:!1}},t._getNextState=function(e){var n=this,t=this._animateParam,i=e.pos,r=t.destPos,o=en(i,(function(e,n){return e<=r[n]?1:-1})),a=((new Date).getTime()-t.startTime+this._durationOffset)/t.duration,s=this._easing(a),u=this.axisManager.map(i,(function(e,u,l){var c=a>=1?r[l]:e+t.delta[l]*(s-n._prevEasingPer)/(1-n._initialEasingPer),h=vn(c,u.range,u.circular);if(c!==h){var f=o[l]*(u.range[1]-u.range[0]);r[l]-=f,i[l]-=f}return h}));return this._prevEasingPer=s,{pos:u,easingPer:s,finished:s>=1}},t._easing=function(e){return e>1?1:this._options.easing(e)},n}(In),Cn=function(e){function n(n,t,i){void 0===n&&(n={}),void 0===t&&(t={}),void 0===i&&(i={});var r=e.call(this)||this;return r.axis=n,r._inputs=[],r.options=Le({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},t),Object.keys(i).forEach((function(e){r.axis[e].startPos=i[e]})),r.interruptManager=new fn(r.options),r.axisManager=new _n(r.axis),r.eventManager=new hn(r),r.animationManager=new kn(r),r.inputObserver=new Rn(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange(r.axisManager.get()),r}je(n,e);var t=n.prototype;return t.connect=function(e,n){var t;return t="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(n)&&this.disconnect(n),n.mapAxes(t),n.connect(this.inputObserver),this._inputs.push(n),this},t.disconnect=function(e){if(e){var n=this._inputs.indexOf(e);n>=0&&(this._inputs[n].disconnect(),this._inputs.splice(n,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},t.get=function(e){return this.axisManager.get(e)},t.setTo=function(e,n){return void 0===n&&(n=0),this.animationManager.setTo(e,n),this},t.setBy=function(e,n){return void 0===n&&(n=0),this.animationManager.setBy(e,n),this},t.setOptions=function(e){return this.options=Le(Le({},this.options),e),this},t.setAxis=function(e){return this.axisManager.setAxis(e),this},t.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},t.updateAnimation=function(e){return this.animationManager.updateAnimation(e),this},t.isBounceArea=function(e){return this.axisManager.isOutside(e)},t.destroy=function(){this.disconnect(),this.eventManager.destroy()},n.VERSION="3.8.1",n.TRANSFORM=We,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=Fe,n.DIRECTION_ALL=30,n=function(e,n,t,i){var r,o=arguments.length,a=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,t,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(n,t,a):r(n,t))||a);return o>3&&a&&Object.defineProperty(n,t,a),a}([Ne],n),n}(d),Mn=function(){function e(e,n){var t=this;this.axes=[],this.element=null,this._enabled=!1,this._activeEvent=null,this._atRightEdge=!1,this._rightEdgeTimer=0,this._dragged=!1,this._isOverThreshold=!1,this._preventClickWhenDragged=function(e){t._dragged&&(e.preventDefault(),e.stopPropagation()),t._dragged=!1},this._voidFunction=function(){},this.element=qe(e),this.options=Le({inputType:["touch","mouse","pointer"],inputButton:[He],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},n),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var n=e.prototype;return n.mapAxes=function(e){var n,t;this._direction=(n=!!e[0],t=!!e[1],n&&t?30:n?6:t?Fe:1),this.axes=e},n.connect=function(e){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(e),this._originalCssProps=function(e,n,t){var i,r=((i={})[1]="auto",i[30]="none",i[24]="pan-x",i[6]="pan-y",i),o={};if(e&&e.style){var a=n.touchAction?n.touchAction:r[t],s=Le(Le({},Ye),{"touch-action":"none"===e.style["touch-action"]?"none":a});Object.keys(s).forEach((function(n){o[n]=e.style[n],e.style[n]=s[n]}))}return o}(this.element,this.options,this._direction),this},n.disconnect=function(){var e,n;return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),e=this._originalCssProps,n=!0,Object.keys(Ye).forEach((function(t){e&&e[t]===Ye[t]||(n=!1)})),n||function(e,n){e&&e.style&&n&&Object.keys(n).forEach((function(t){e.style[t]=n[t]}))}(this.element,this._originalCssProps),this._direction=1,this},n.destroy=function(){this.disconnect(),this.element=null},n.enable=function(){return this._enabled=!0,this},n.disable=function(){return this._enabled=!1,this},n.isEnabled=function(){return this._enabled},n.release=function(){var e=this._activeEvent,n=e.prevEvent;return e.onRelease(),this._observer.release(this,n,[0,0]),this._detachWindowEvent(e),this},n._onPanstart=function(e){var n=this.options.inputButton,t=this._activeEvent,i=t.onEventStart(e,n);if(i&&this._enabled&&!(t.getTouches(e,n)>1)&&!1!==i.srcEvent.cancelable){var r=this.options.iOSEdgeSwipeThreshold;this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,i),this._atRightEdge=Xe&&i.center.x>window.innerWidth-r,this._attachWindowEvent(t),t.prevEvent=i}},n._onPanmove=function(e){var n=this,t=this.options,i=t.iOSEdgeSwipeThreshold,r=t.releaseOnScroll,o=t.inputButton,a=t.threshold,s=t.thresholdAngle,u=this._activeEvent,l=u.onEventMove(e,o),c=u.getTouches(e,o);if(0===c||r&&l&&!l.srcEvent.cancelable)this._onPanend(e);else if(l&&this._enabled&&!(c>1)){var h=function(e,n){if(n<0||n>90)return 1;var t=Math.abs(e);return t>n&&t<180-n?Fe:6}(l.angle,s),f=cn(6,this._direction,h),d=cn(Fe,this._direction,h);if(u.prevEvent&&Xe){if(l.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),l.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout((function(){return n.release()}),100))}var g=this._getDistance([l.deltaX,l.deltaY],[f,d]),p=this._getOffset([l.offsetX,l.offsetY],[f,d]),v=p.some((function(e){return 0!==e}));v&&(!1!==l.srcEvent.cancelable&&l.srcEvent.preventDefault(),l.srcEvent.stopPropagation()),l.preventSystemEvent=v,v&&(this._isOverThreshold||g>=a)&&(this._dragged=!0,this._isOverThreshold=!0,this._observer.change(this,l,Tn(this.axes,p))),u.prevEvent=l}},n._onPanend=function(e){var n=this.options.inputButton,t=this._activeEvent;if(t.onEventEnd(e),this._enabled&&0===t.getTouches(e,n)){this._detachWindowEvent(t),clearTimeout(this._rightEdgeTimer);var i=t.prevEvent,r=this._isOverThreshold?this._getOffset([Math.abs(i.velocityX)*(i.offsetX<0?-1:1),Math.abs(i.velocityY)*(i.offsetY<0?-1:1)],[cn(6,this._direction),cn(Fe,this._direction)]):[0,0];t.onRelease(),this._observer.release(this,i,r)}},n._attachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.addEventListener(e,n._onPanmove,{passive:!1})})),null==e||e.end.forEach((function(e){window.addEventListener(e,n._onPanend,{passive:!1})}))},n._detachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.removeEventListener(e,n._onPanmove)})),null==e||e.end.forEach((function(e){window.removeEventListener(e,n._onPanend)}))},n._getOffset=function(e,n){var t=this.options.scale;return[n[0]?e[0]*t[0]:0,n[1]?e[1]*t[1]:0]},n._getDistance=function(e,n){return Math.sqrt(Number(n[0])*Math.pow(e[0],2)+Number(n[1])*Math.pow(e[1],2))},n._attachElementEvent=function(e){var n=this,t=function(e){void 0===e&&(e=[]);var n=!1,t=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":t=!0;break;case"touch":n=mn;break;case"pointer":i=yn}})),i?new On:n&&t?new wn:n?new xn:t?new Pn:null}(this.options.inputType),i=this.element;if(t){if(!i)throw new Error("Element to connect input does not exist.");this._observer=e,this._enabled=!0,this._activeEvent=t,this.options.preventClickOnDrag&&i.addEventListener("click",this._preventClickWhenDragged,!0),t.start.forEach((function(e){i.addEventListener(e,n._onPanstart)})),t.move.forEach((function(e){i.addEventListener(e,n._voidFunction)}))}},n._detachElementEvent=function(){var e=this,n=this._activeEvent,t=this.element;t&&(this.options.preventClickOnDrag&&t.removeEventListener("click",this._preventClickWhenDragged,!0),null==n||n.start.forEach((function(n){t.removeEventListener(n,e._onPanstart)})),null==n||n.move.forEach((function(n){t.removeEventListener(n,e._voidFunction)}))),this._enabled=!1,this._observer=null},e}(),Sn=Cn,Nn={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},Dn="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"}($e||($e={}));var jn=function(){function e(){this._delta=0,this._targetPanel=null}var n=e.prototype;return Object.defineProperty(n,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(n,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),n.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},n.onHold=function(e){},n.onChange=function(e){},n.onRelease=function(e){},n.onAnimationEnd=function(e){},n.onFinish=function(e){},n._moveToChangedPosition=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.delta.flick;if(r){this._delta+=r;var o=n.camera,a=o.position,s=t.pos.flick,u=n.circularEnabled?J(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(I.MOVE,{isTrusted:t.isTrusted,holding:this.holding,direction:U(0,t.delta.flick),axesEvent:t});n.trigger(l),l.isCanceled()&&(o.lookAt(a),i($e.DISABLED))}},e}(),zn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!1,n}n(t,e);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.renderer.panelCount<=0)i($e.DISABLED);else{var r=new g(I.HOLD_START,{axesEvent:t});n.trigger(r),r.isCanceled()?i($e.DISABLED):i($e.HOLDING)}},i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control.controller.animatingContext,o=new g(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:U(r.start,r.end),axesEvent:t});n.trigger(o),o.isCanceled()?i($e.DISABLED):i($e.ANIMATING).onChange(e)},t}(jn),Ln=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!1,n._releaseEvent=null,n}n(t,e);var i=t.prototype;return i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.inputEvent,o=n.horizontal?r.offsetX:r.offsetY,a=new g(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:U(0,-o),axesEvent:t});n.trigger(a),a.isCanceled()?i($e.DISABLED):i($e.DRAGGING).onChange(e)},i.onRelease=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.trigger(new g(I.HOLD_END,{axesEvent:t})),0!==t.delta.flick)return t.setTo({flick:n.camera.position},0),void i($e.IDLE);this._releaseEvent=t},i.onFinish=function(e){var n,t,i=e.flicking;if((0,e.transitTo)($e.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){n={error:e}}finally{try{h&&!h.done&&(t=c.return)&&t.call(c)}finally{if(n)throw n.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(I.SELECT,{index:l.index,panel:l,direction:U(d,p)}))}}},t}(jn),Vn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var n,t=e.flicking,i=e.axesEvent,r=e.transitTo;if(t.trigger(new g(I.HOLD_END,{axesEvent:i})),t.renderer.panelCount<=0)r($e.IDLE);else{r($e.ANIMATING);var o=t.control,a=i.destPos.flick,s=Math.max(i.duration,t.duration);try{o.moveToPosition(a,s,i)}catch(e){r($e.IDLE),i.setTo(((n={}).flick=t.camera.position,n),0)}}},t}(jn),Fn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=this._targetPanel,o=n.control;this._delta=0,n.control.updateInput(),n.changeOnHold&&r&&o.setActive(r,o.activePanel,t.isTrusted);var a=new g(I.HOLD_START,{axesEvent:t});n.trigger(a),a.isCanceled()?i($e.DISABLED):i($e.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control,o=r.controller.animatingContext;i($e.IDLE),n.trigger(new g(I.MOVE_END,{isTrusted:t.isTrusted,direction:U(o.start,o.end),axesEvent:t}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,t.isTrusted)},t}(jn),Hn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)($e.IDLE)},i.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t($e.IDLE)},i.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t($e.IDLE)},t}(jn),Bn=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case $e.IDLE:t=new zn;break;case $e.HOLDING:t=new Ln;break;case $e.DRAGGING:t=new Vn;break;case $e.ANIMATING:t=new Fn;break;case $e.DISABLED:t=new Hn}return t.onEnter(e._state),e._state=t,e._state},this._state=new zn}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var i=this._state,r=t(t({},n),{transitTo:this.transitTo});switch(e){case Nn.HOLD:i.onHold(r);break;case Nn.CHANGE:i.onChange(r);break;case Nn.RELEASE:i.onRelease(r);break;case Nn.ANIMATION_END:i.onAnimationEnd(r);break;case Nn.FINISH:i.onFinish(r)}},e}(),Gn=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new Bn}var n=e.prototype;return Object.defineProperty(n,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(n,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(n,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var n=e.axis.flick;return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([Dn]).flick)&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis.flick.range)&&void 0!==n?n:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis.flick.bounce},enumerable:!1,configurable:!0}),n.init=function(e){var n,t=this;this._flicking=e,this._axes=new Sn(((n={}).flick={range:[0,0],circular:!1,bounce:[0,0]},n),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new Mn(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?[Dn,""]:["",Dn],this._panInput);var r=function(n){var r=Nn[n];i.on(r,(function(n){t._stateMachine.fire(r,{flicking:e,axesEvent:n})}))};for(var o in Nn)r(o);return this},n.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},n.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},n.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},n.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},n.updateAnimation=function(e,n){var i,r;return this._animatingContext=t(t({},this._animatingContext),{end:e}),null===(r=this._axes)||void 0===r||r.updateAnimation({destPos:(i={},i.flick=e,i),duration:n}),this},n.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},n.update=function(e){var n,t=F(this._flicking),i=t.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=G(t.bounce,i.size),r.axisManager.set(((n={}).flick=e.position,n)),this},n.addPreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.on(Nn.HOLD,this._onAxesHold),n.on(Nn.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},n.removePreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.off(Nn.HOLD,this._onAxesHold),n.off(Nn.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},n.animateTo=function(e,n,t){var i,r,o=this,a=this._axes,s=this._stateMachine.state;if(!a)return Promise.reject(new ce(b,p.NOT_ATTACHED_TO_FLICKING));var u=a.get([Dn]).flick;if(u===e)return(c=F(this._flicking)).camera.lookAt(e),s.targetPanel&&c.control.setActive(s.targetPanel,c.control.activePanel,null!==(r=null==t?void 0:t.isTrusted)&&void 0!==r&&r),Promise.resolve();this._animatingContext={start:u,end:e,offset:0};var l=function(){var i,r;a.once(Nn.FINISH,(function(){o._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={}).flick=e,i),n):a.setTo(((r={}).flick=e,r),n)};if(0===n){var c,h=(c=F(this._flicking)).camera;l();var f=c.circularEnabled?J(e,h.range.min,h.range.max):e;return a.axisManager.set(((i={}).flick=f,i)),Promise.resolve()}return new Promise((function(e,n){var t=function(){a.off(Nn.HOLD,i),e()},i=function(){a.off(Nn.FINISH,t),n(new ce(w,p.ANIMATION_INTERRUPTED))};a.once(Nn.FINISH,t),a.once(Nn.HOLD,i),l()}))},n._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),Xn=function(){function e(){this._flicking=null,this._controller=new Gn,this._activePanel=null}var n=e.prototype;return Object.defineProperty(n,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-1},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._controller.init(e),this},n.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},n.enable=function(){return this._controller.enable(),this},n.disable=function(){return this._controller.disable(),this},n.release=function(){return this._controller.release(),this},n.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:C.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},n.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},n.updatePosition=function(e){var n=F(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},n.updateInput=function(){var e=F(this._flicking).camera;return this._controller.update(e.controlParams),this},n.resetActive=function(){return this._activePanel=null,this},n.moveToPanel=function(e,n){var t=n.duration,o=n.direction,a=void 0===o?C.NONE:o,s=n.axesEvent;return i(this,void 0,void 0,(function(){var n;return r(this,(function(i){return n=this._getPosition(e,a),this._triggerIndexChangeEvent(e,e.position,s),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:s})]}))}))},n.setActive=function(e,n,t){var i,r=F(this._flicking);this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==n?r.trigger(new g(I.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:-1,prevPanel:n,isTrusted:t,direction:n?U(n.position,e.position):C.NONE})):r.trigger(new g(I.RESTORED,{isTrusted:t}))},n._triggerIndexChangeEvent=function(e,n,t){var i,r=F(this._flicking),o=e!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,a=r.camera,s=this._activePanel,u=new g(o,{index:e.index,panel:e,isTrusted:(null==t?void 0:t.isTrusted)||!1,direction:U(null!==(i=null==s?void 0:s.position)&&void 0!==i?i:a.position,n)});if(r.trigger(u),u.isCanceled())throw new ce(O,p.STOP_CALLED_BY_USER)},n._animateToPosition=function(e){var n=e.position,t=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=F(this._flicking),s=function(){return u._controller.animateTo(n,t,a)},this._controller.state.targetPanel=o,t<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,e.renderer.render()];case 1:return n.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof ce&&e.code===p.ANIMATION_INTERRUPTED))throw e}))]}))}))},n._getPosition=function(e,n){void 0===n&&(n=C.NONE);var t=F(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new ce(P(e.position),p.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,u=[r,r+s,r-s].filter((function(e){return n===C.NONE||(n===C.PREV?e<=a:e>=a)}));r=u.reduce((function(e,n){return Math.abs(a-n)<Math.abs(a-e)?n:e}),1/0)}}else r=o.position,e=o.panel;return r},e}(),Wn=function(){function e(e){var n=e.index,t=e.position,i=e.panel;this._index=n,this._pos=t,this._panel=i}var n=e.prototype;return Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),Yn=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1/0:t,r=e.call(this)||this;return r._count=i,r}n(t,e);var i=t.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,n,t){var i=F(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=this._controller.state;if(!o||!a)return Promise.reject(new ce(P(e),p.POSITION_NOT_REACHABLE));var u,l=this._calcSnapThreshold(e,o),c=i.animating?s.delta:e-r.position,h=Math.abs(c),f=t&&0!==t.delta.flick?Math.abs(t.delta.flick):h;if(f>=l&&f>0)u=this._findSnappedAnchor(e,a);else{if(!(h>=i.threshold&&h>0))return this.moveToPanel(o.panel,{duration:n,axesEvent:t});u=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(u.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:n,newActivePanel:u.panel,axesEvent:t})},i._findSnappedAnchor=function(e,n){var t=F(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new ce(P(e),p.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=t.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<n.index||s.position>n.position&&s.index===n.index?c+=1:(e<o&&s.index>n.index||s.position<n.position&&s.index===n.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-n.index)<=r){var d=l[s.index];return new Wn({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(t.circularEnabled){var g=l[oe(n.index+Math.sign(e-o)*r,u)],v=Math.floor(r/u);return e>o&&g.index<n.index?v+=1:e<o&&g.index>n.index&&(v-=1),new Wn({index:g.index,position:g.position+v*i.rangeDiff,panel:g.panel})}return l[V(n.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,n,t){var i,r=F(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},i._calcSnapThreshold=function(e,n){var t=e>n.position,i=n.panel,r=i.size,o=i.alignPosition;return t?r-o+i.margin.next:o+i.margin.prev},t}(Xn),Un=function(e){function t(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}n(t,e);var i=t.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 n=F(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},i.moveToPosition=function(e,n,t){var i=F(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new ce(P(e),p.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},t}(Xn),qn=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}n(t,e);var o=t.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,n=F(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,s=r.state.animating?null===(e=t.findNearestAnchor(t.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=n.circularEnabled?Z((f+1)%h-1,h):V(f,0,h-1)),d>=h&&(d=n.circularEnabled?d%h:V(d,0,h-1));var g=i.panels[f],p=i.panels[d],v=Math.max(g.position,u.min),_=Math.min(p.position,u.max);return v>l&&(v-=t.rangeDiff),_<l&&(_+=t.rangeDiff),o.range={min:v,max:_},o.circular&&(o.position<v&&(o.position+=t.rangeDiff),o.position>_&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},o.moveToPanel=function(n,t){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){return i=F(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},o.moveToPosition=function(e,n,t){var i=F(this._flicking),r=i.camera,o=this._activePanel,a=this._controller.range,s=this._indexRange,u=r.range,l=this._controller.state,c=V(r.clampToReachablePosition(e),a[0],a[1]),h=r.findAnchorIncludePosition(c);if(!h||!o)return Promise.reject(new ce(P(e),p.POSITION_NOT_REACHABLE));var f,d,g=o.position,v=i.animating?l.delta:e-r.position,_=Math.abs(v)>=i.threshold,m=e>g?r.getNextAnchor(h):r.getPrevAnchor(h),b=r.anchorPoints,y=b[0],E=b[b.length-1],x=e<=u.min&&re(y.panel.index,s.min,s.max),O=e>=u.max&&re(E.panel.index,s.min,s.max),w=m&&(s.min<=s.max?re(m.index,s.min,s.max):m.index>=s.min||m.index<=s.max);if(x||O){var T=e<u.min?y:E;d=T.panel,f=T.position}else _&&h.position!==o.position?(d=h.panel,f=h.position):_&&w?(d=m.panel,f=m.position):(f=r.clampToReachablePosition(o.position),d=o);return this._triggerIndexChangeEvent(d,e,t),this._animateToPosition({position:f,duration:n,newActivePanel:d,axesEvent:t})},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},t}(Xn),Zn={__proto__:null,Control:Xn,SnapControl:Yn,FreeControl:Un,StrictControl:qn,AxesController:Gn,State:jn,IdleState:zn,HoldingState:Ln,DraggingState:Vn,AnimatingState:Fn,DisabledState:Hn,StateMachine:Bn},Kn=function(){function e(e){this._flicking=e}var n=e.prototype;return n.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Wn({index:n,position:e.position,panel:e})}))},n.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter((function(n){return n.panel.includePosition(e,!0)})).reduce((function(n,t){return n&&Math.abs(n.position-e)<Math.abs(t.position-e)?n:t}),null)},n.findNearestAnchor=function(e){var n=this._flicking.camera.anchorPoints;if(n.length<=0)return null;for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return V(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),Qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0}},t}(Kn),Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.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 n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Wn({index:n,position:e.position,panel:e})}))},i.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a<t.length;a++){var s=t[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 t[o]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints,o=t.rangeDiff,a=r.length,s=J(n,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(n===i.min||n===i.max)){var l=[u,new Wn({index:0,position:r[0].position+o,panel:r[0].panel}),new Wn({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t}),null)}if(!u)return null;if(n<i.min){var c=-Math.floor((i.min-n)/o)-1;return new Wn({index:u.index,position:u.position+o*c,panel:u.panel})}if(n>i.max){c=Math.floor((n-i.max)/o)+1;return new Wn({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 n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===C.PREV})),i=n.filter((function(e){return e.toggleDirection===C.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.min<i.min?a||n.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},t}(Kn),$n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,n=e.renderer,t=e.camera.alignPosition,i=n.getPanel(0),r=n.getPanel(n.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+t,l=s-o+t;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,n=e.camera,t=e.renderer.panels;if(t.length<=0)return[];var i=e.camera.range,r=t.filter((function(e){return n.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,n){return new Wn({index:n+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new Wn({index:0,position:i.min,panel:t[r[0].index-1]})),a&&u.push(new Wn({index:u.length,position:i.max,panel:t[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,t),c=l.index===t.length-1?l.prev():l,h=c.next();return[new Wn({index:0,position:i.min,panel:c}),new Wn({index:1,position:i.max,panel:h})]}return[new Wn({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},i._findNearestPanel=function(e,n){for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},t}(Kn),et=function(){function e(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?k.CENTER:i;this._checkTranslateSupport=function(){var e,n,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(n){e={error:n}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(!r)throw new ce(x,p.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"children",{get:function(){return H(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(n===r)return i.index;if(n<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+ne(n,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+ne(n,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking.viewport.element;return L(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this},n.destroy=function(){return this._resetInternalValues(),this},n.lookAt=function(e){var n=this,t=F(this._flicking),i=this._position;this._position=e;var r=this._togglePanels(i,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(i,e),r?t.renderer.render().then((function(){n.updateOffset()})):this.applyTransform()},n.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var n=this._anchors,t=this.rangeDiff,i=n[n.length-1];return new Wn({index:i.index,position:i.position-t,panel:i.panel})}return this._anchors[e.index-1]||null},n.getNextAnchor=function(e){var n=this._anchors;if(this._circularEnabled&&e.index===n.length-1){var t=this.rangeDiff,i=n[0];return new Wn({index:i.index,position:i.position+t,panel:i.panel})}return n[e.index+1]||null},n.getProgressInPanel=function(e){var n=e.range;return(this._position-n.min)/(n.max-n.min)},n.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},n.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},n.findActiveAnchor=function(){var e=F(this._flicking).control.activeIndex;return $(this._anchors,(function(n){return n.panel.index===e}))},n.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},n.canReach=function(e){return this._mode.canReach(e)},n.canSee=function(e){return this._mode.canSee(e)},n.updateRange=function(){var e=F(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),this._circularEnabled&&e.forEach((function(e){return e.updateCircularToggleDirection()})),this},n.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=B(n,this.size),this},n.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},n.updateAdaptiveHeight=function(){var e=F(this._flicking),n=e.control.activePanel;e.horizontal&&e.adaptive&&n&&e.viewport.setSize({height:n.height})},n.updateOffset=function(){var e=F(this._flicking),n=this._position,t=e.panels.filter((function(e){return!e.rendered}));return this._offset=t.filter((function(e){return e.position+e.offset<n})).reduce((function(e,n){return e+n.sizeIncludingMargin}),0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},n.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},n.applyTransform=function(){var e=this._el,n=F(this._flicking);if(n.renderer.rendering)return this;var t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+-t+"px)":"translate(0, "+-t+"px)",this},n._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}},n._refreshVisiblePanels=function(){var e=this,n=F(this._flicking),t=n.renderer.panels.filter((function(n){return e.canSee(n)})),i=this._visiblePanels;this._visiblePanels=t;var r=t.filter((function(e){return!K(i,e)})),o=i.filter((function(e){return!K(t,e)}));(r.length>0||o.length>0)&&n.renderer.render().then((function(){n.trigger(new g(I.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:t}))}))},n._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var n=F(this._flicking),t=n.renderer.panels;if(t.length<=0)return e.prev||(n.trigger(new g(I.NEED_PANEL,{direction:C.PREV})),e.prev=!0),void(e.next||(n.trigger(new g(I.NEED_PANEL,{direction:C.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=n.needPanelThreshold,s=i-this._alignPos,u=s+r,l=t[0],c=t[t.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(n.trigger(new g(I.NEED_PANEL,{direction:C.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(n.trigger(new g(I.NEED_PANEL,{direction:C.NEXT})),e.next=!0)}},n._checkReachEnd=function(e,n){var t=F(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=n>i.min&&n<i.max;if(r&&!o){var a=n<=i.min?C.PREV:C.NEXT;t.trigger(new g(I.REACH_EDGE,{direction:a}))}},n._updateMode=function(){var e=F(this._flicking);if(e.circular){var n=new Jn(e),t=n.checkAvailability();if(t)this._mode=n;else{var i=e.circularFallback;this._mode=i===N.BOUND?new $n(e):new Qn(e)}this._circularEnabled=t}else this._mode=e.bound?new $n(e):new Qn(e)},n._togglePanels=function(e,n){return n!==e&&F(this._flicking).renderer.panels.map((function(t){return t.toggle(e,n)})).some((function(e){return e}))},e}(),nt={__proto__:null,Camera:et,LinearCameraMode:Qn,CircularCameraMode:Jn,BoundCameraMode:$n},tt=function(e,n){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},tt(e,n)};function it(e,n){function t(){this.constructor=e}tt(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var rt=function(){return rt=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},rt.apply(this,arguments)};var ot="undefined"!=typeof window,at=ot?window.navigator.userAgent:"",st=!!ot&&!!("getComputedStyle"in window),ut=/MSIE|Trident|Windows Phone|Edge/.test(at),lt=!!ot&&!!("addEventListener"in document),ct="width",ht="height";function ft(e,n){return e.getAttribute(n)||""}function dt(e){return[].slice.call(e)}function gt(e,n){return void 0===n&&(n="data-"),"loading"in e&&"lazy"===e.getAttribute("loading")||!!e.getAttribute(n+"lazy")}function pt(e,n,t){lt?e.addEventListener(n,t,!1):e.attachEvent?e.attachEvent("on"+n,t):e["on"+n]=t}function vt(e,n,t){e.removeEventListener?e.removeEventListener(n,t,!1):e.detachEvent?e.detachEvent("on"+n,t):e["on"+n]=null}function _t(e,n){var t=e["client"+n]||e["offset"+n];return parseFloat(t||function(e){return(st?window.getComputedStyle(e):e.currentStyle)||{}}(e)[n.toLowerCase()])||0}function mt(e,n,t){var i=dt(e.querySelectorAll(function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var i=Array(e),r=0;for(n=0;n<t;n++)for(var o=arguments[n],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+t+"skip] ["+t+"width]"],n.map((function(e){return["["+t+"skip] "+e,e+"["+t+"skip]","["+t+"width] "+e].join(", ")}))).join(", ")));return dt(e.querySelectorAll("["+t+"width], "+n.join(", "))).filter((function(e){return-1===i.indexOf(e)}))}var bt=[];function yt(e,n){!bt.length&&pt(window,"resize",Pt),e.__PREFIX__=n,bt.push(e),Et(e)}function Et(e,n){void 0===n&&(n="data-");var t=e.__PREFIX__||n,i=parseInt(ft(e,""+t+ct),10)||0,r=parseInt(ft(e,""+t+ht),10)||0;if(ft(e,t+"fixed")===ht){var o=_t(e,"Height")||r;e.style.width=i/r*o+"px"}else{o=function(e){return _t(e,"Width")}(e)||i;e.style.height=r/i*o+"px"}}function Pt(){bt.forEach((function(e){Et(e)}))}var xt=function(e){function n(n,t){void 0===t&&(t={});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){if(i.clear(),e&&"error"===e.type&&i.onError(i.element),!i.hasLoading||!i.checkElement()){var n=!i.hasDataSize&&!i.hasLoading;i.onReady(n)}},i.options=rt({prefix:"data-"},t),i.element=n;var r=i.options.prefix;return i.hasDataSize=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"width")}(n,r),i.isSkip=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"skip")}(n,r),i.hasLoading=gt(n,r),i}it(n,e);var t=n.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&yt(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach((function(t){pt(n,t,e.onCheck)}))},t.clear=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach((function(t){vt(n,t,e.onCheck)})),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,n){var t=bt.indexOf(e);if(!(t<0)){var i=ft(e,n+"fixed");delete e.__PREFIX__,e.style[i===ht?ct:ht]="",bt.splice(t,1),!bt.length&&vt(window,"resize",Pt)}}(this.element,e)}},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.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}))},t.onAlreadyError=function(e){var n=this;setTimeout((function(){n.onError(e)}))},t.onAlreadyPreReady=function(){var e=this;setTimeout((function(){e.onPreReady()}))},t.onAlreadyReady=function(e){var n=this;setTimeout((function(){n.onReady(e)}))},n.EVENTS=[],n}(d),Ot=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}it(n,e);var t=n.prototype;return t.setHasLoading=function(e){this.hasLoading=e},t.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(yt(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},t.checkElement=function(){return!0},t.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},t.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},n.EVENTS=[],n}(xt),wt=function(e){function n(n){void 0===n&&(n={});var t=e.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=rt({loaders:{},prefix:"data-"},n),t}it(n,e);var t=n.prototype;return t.check=function(e){var n=this,t=this.options.prefix;this.clear(),this.elementInfos=dt(e).map((function(e,i){var r=n.getLoader(e,{prefix:t});return r.check(),r.on("error",(function(e){n.onError(i,e.target)})).on("preReady",(function(e){var t=n.elementInfos[i];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;var r=n.checkPreReady(i);n.onPreReadyElement(i),r&&n.onPreReady()})).on("ready",(function(e){var t=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=n.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=t&&n.checkPreReady(i),u=n.checkReady(i);t&&n.onPreReadyElement(i),n.onReadyElement(i),s&&n.onPreReady(),u&&n.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(){n.onPreReady(),n.onReady()})),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every((function(e){return e.isPreReady}))},t.isReady=function(){return this.elementInfos.every((function(e){return e.isReady}))},t.hasError=function(){return this.totalErrorCount>0},t.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=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(e,n){var t=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=n.prefix,a=Object.keys(r);if(r[i])return new r[i](e,n);var s=new Ot(e,n),u=dt(e.querySelectorAll(a.join(", ")));s.setHasLoading(u.some((function(e){return gt(e,o)})));var l=!1,c=this.clone().on("error",(function(e){s.onError(e.target)})).on("ready",(function(){s.onReady(l)}));return s.on("requestChildren",(function(){var n=mt(e,a,t.options.prefix);c.check(n).on("preReady",(function(e){(l=e.isReady)||s.onPreReady()}))})).on("reqeustReadyChildren",(function(){c.check(u)})).on("requestDestroy",(function(){c.destroy()})),s},t.clone=function(){return new n(rt({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,n){var t=this.elementInfos[e];t.hasError=!0,this.trigger(new g("error",{element:t.element,index:e,target:n,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},t.onPreReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new g("preReadyElement",{element:n.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isSkip:n.isSkip}))},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new g("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},t.onReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new g("readyElement",{index:e,element:n.element,hasError:n.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:n.isSkip}))},t.onReady=function(){this.trigger(new g("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},t.getErrorCount=function(){return this.elementInfos.filter((function(e){return e.hasError})).length},t.hasLoading=function(){return this.elementInfos.some((function(e){return e.hasLoading}))},n}(d),Tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return it(n,e),n.prototype.checkElement=function(){var e=this.element,n=e.getAttribute("src");if(e.complete){if(n)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),ut&&e.setAttribute("src",n),!0},n.EVENTS=["load","error"],n}(xt),Rt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return it(n,e),n.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},n.EVENTS=["loadedmetadata","error"],n}(xt),At=function(e){function n(n){return void 0===n&&(n={}),e.call(this,rt({loaders:{img:Tt,video:Rt}},n))||this}return it(n,e),n}(wt),It=function(){function e(e){var n=e.align,t=void 0===n?k.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=t,this._strategy=i}var n=e.prototype;return Object.defineProperty(n,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=Y(e);this._panels.forEach((function(e){e.align=n}))},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._collectPanels(),this},n.destroy=function(){this._flicking=null,this._panels=[]},n.getPanel=function(e){return this._panels[e]||null},n.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},n.updatePanelSize=function(){var e=F(this._flicking),n=this._panels;if(n.length<=0)return this;if(e.panelsPerView>0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach((function(e){return e.resize()}));return this},n.batchInsert=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchInsertDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange(t,[]),t)},n.batchInsertDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking),o=i[0],a=Y(this._align),u=n.reduce((function(n,t){var u,l=Z(t.index,i.length),c=i.slice(l),h=t.elements.map((function(n,t){return e._createPanel(n,{index:l+t,align:a,flicking:r})}));if(i.splice.apply(i,s([l,0],h)),t.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(n,h)}),[]);return u},n.batchRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchRemoveDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange([],t),t)},n.batchRemoveDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking),o=r.control,a=o.activePanel,u=n.reduce((function(n,t){var r=t.index,u=t.deleteCount,l=Z(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()})),t.hasDOMInElements&&e._removePanelElements(h),h.forEach((function(e){return e.destroy()})),K(h,a)&&o.resetActive(),s(n,h))}),[]);return u},n.updateAfterPanelChange=function(e,n){var t,i=F(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!==(t=null==u?void 0:u.index)&&void 0!==t?t: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||n.length>0)&&(i.trigger(new g(I.PANEL_CHANGE,{added:e,removed:n})),this.checkPanelContentsReady(s(e,n)))},n.checkPanelContentsReady=function(e){var n=this,t=F(this._flicking),i=t.resizeOnContentsReady,r=this._panels;if(i&&!t.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new At;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(n._flicking){var a=e[i.index],s=t.camera,u=t.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()})),t.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){n._flicking&&n.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},n._updateCameraAndControl=function(){var e=F(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()}))},n._updatePanelSizeByGrid=function(e,n){var i=F(this._flicking),r=i.panelsPerView;if(r<=0)throw new ce(y("panelsPerView",r),p.WRONG_OPTION);if(!(n.length<=0)){var o=(i.camera.size-(e.margin.prev+e.margin.next)*(r-1))/r,a=i.horizontal?{width:o}:{height:o},s=t({size:o,margin:e.margin},!i.horizontal&&{height:e.height});i.noPanelStyleOverride||this._strategy.updatePanelSizes(i,a),i.panels.forEach((function(e){return e.resize(s)}))}},n._removeAllChildsFromCamera=function(){for(var e=F(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},n._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=F(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),t.insertBefore(r,i)},n._removePanelElements=function(e){var n=F(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},e}(),kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var o=t.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,n;return r(this,(function(t){return e=F(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),[2]}))}))},o._collectPanels=function(){var e=F(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},o._createPanel=function(e,n){return this._strategy.createPanel(e,n)},o._resetPanelElementOrder=function(){var e=F(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach((function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=F(this._flicking).camera.element;H(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},t}(It),Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},t}(It),Mt=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==C.NONE&&this._toggled?e===C.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i<e){var r=e+(t.size-t.alignPosition)+n;return-ne(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-ne(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRatio",{get:function(){var e=this.range,n=this._size,t=this.offset,i=this._flicking.camera.visibleRange,r=e.min+t,o=e.max+t;if(o<=i.min||r>=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),n.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},n.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},n.resize=function(e){var n,i=this.element,r=this._flicking,o=r.horizontal,a=r.useFractionalSize;if(e)this._size=e.size,this._margin=t({},e.margin),this._height=null!==(n=e.height)&&void 0!==n?n:se({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:te(i)});else{var s=te(i);this._size=se({el:i,horizontal:o,useFractionalSize:a,useOffset:!0,style:s}),this._margin=o?{prev:parseFloat(s.marginLeft||"0"),next:parseFloat(s.marginRight||"0")}:{prev:parseFloat(s.marginTop||"0"),next:parseFloat(s.marginBottom||"0")},this._height=o?se({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:s}):this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return ie(this.element,e),this},n.contains=function(e){var n;return!!(null===(n=this.element)||void 0===n?void 0:n.contains(e))},n.destroy=function(){this._resetInternalStates(),this._removed=!0},n.includePosition=function(e,n){return void 0===n&&(n=!1),this.includeRange(e,e,n)},n.includeRange=function(e,n,t){void 0===t&&(t=!1);var i=this._margin,r=this.range;return t&&(r.min-=i.prev,r.max+=i.next),n>=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&e<t.max},n.focus=function(e){return this._flicking.moveTo(this._index,e)},n.prev=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(0===e?i-1:e-1):t.getPanel(e-1)},n.next=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(e===i-1?0:e+1):t.getPanel(e+1)},n.increaseIndex=function(e){return this._index+=Math.max(e,0),this},n.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},n.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},n.toggle=function(e,n){var t=this._toggleDirection,i=this._togglePosition;if(t===C.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===C.NEXT):i<=e&&i>=n&&(this._toggled=t!==C.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=C.NONE,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,s=t.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=C.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):l?(this._toggleDirection=C.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=C.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=B(this._align,this._size)},n._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=C.NONE},e}(),St=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter((function(e){return e.rendered})),t=n.filter((function(e){return e.toggled&&e.toggleDirection===C.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===C.NEXT}));return s(t,n.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].element}))},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},n.collectPanels=function(e,n){var t=this,i=Y(e.renderer.align);return n.map((function(n,r){return new Mt({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new Mt(t(t({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach((function(e){return e.setSize(n)}))},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()})),t.updateOffset()},e}(),Nt=function(e){function t(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}n(t,e);var i=t.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,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===C.NEXT?i+t:i-t),oe(i,n)},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,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},i.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},i.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},t}(Mt),Dt=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=ae(e.panelsPerView+1);t.forEach((function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){n.hide(e)}))},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return i.length<=0?n.elements.map((function(e,n){return n})):s(i.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return t(t({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].nativeElement}))},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),t.updateOffset()},n.collectPanels=function(e){var n=Y(e.renderer.align);return ae(e.virtual.initialPanelCount).map((function(t){return new Nt({index:t,elementProvider:new ge(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new Nt(t(t({},n),{elementProvider:new ge(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){ie(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),jt={__proto__:null,Renderer:It,VanillaRenderer:kt,ExternalRenderer:Ct,NormalRenderingStrategy:St,VirtualRenderingStrategy:Dt},zt=function(e){function o(n,t){var i=void 0===t?{}:t,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?N.LINEAR:f,g=i.bound,p=void 0!==g&&g,v=i.adaptive,_=void 0!==v&&v,m=i.panelsPerView,b=void 0===m?-1:m,y=i.noPanelStyleOverride,E=void 0!==y&&y,P=i.resizeOnContentsReady,x=void 0!==P&&P,O=i.nested,w=void 0!==O&&O,T=i.needPanelThreshold,R=void 0===T?0:T,A=i.preventEventsBeforeInit,I=void 0===A||A,C=i.deceleration,M=void 0===C?.0075:C,S=i.duration,D=void 0===S?500:S,j=i.easing,L=void 0===j?function(e){return 1-Math.pow(1-e,3)}:j,V=i.inputType,F=void 0===V?["mouse","touch"]:V,H=i.moveType,B=void 0===H?"snap":H,G=i.threshold,X=void 0===G?40:G,W=i.interruptable,Y=void 0===W||W,U=i.bounce,q=void 0===U?"20%":U,Z=i.iOSEdgeSwipeThreshold,K=void 0===Z?30:Z,Q=i.preventClickOnDrag,J=void 0===Q||Q,$=i.disableOnInit,ee=void 0!==$&&$,ne=i.changeOnHold,te=void 0!==ne&&ne,ie=i.renderOnlyVisible,re=void 0!==ie&&ie,oe=i.virtual,ae=void 0===oe?null:oe,se=i.autoInit,ue=void 0===se||se,le=i.autoResize,ce=void 0===le||le,de=i.useResizeObserver,ge=void 0===de||de,ve=i.resizeDebounce,_e=void 0===ve?0:ve,me=i.maxResizeDebounce,be=void 0===me?100:me,ye=i.useFractionalSize,Ee=void 0!==ye&&ye,Pe=i.externalRenderer,xe=void 0===Pe?null:Pe,Oe=i.renderExternal,we=void 0===Oe?null:Oe,Te=e.call(this)||this;return Te._initialized=!1,Te._plugins=[],Te._align=o,Te._defaultIndex=s,Te._horizontal=l,Te._circular=h,Te._circularFallback=d,Te._bound=p,Te._adaptive=_,Te._panelsPerView=b,Te._noPanelStyleOverride=E,Te._resizeOnContentsReady=x,Te._nested=w,Te._virtual=ae,Te._needPanelThreshold=R,Te._preventEventsBeforeInit=I,Te._deceleration=M,Te._duration=D,Te._easing=L,Te._inputType=F,Te._moveType=B,Te._threshold=X,Te._interruptable=Y,Te._bounce=q,Te._iOSEdgeSwipeThreshold=K,Te._preventClickOnDrag=J,Te._disableOnInit=ee,Te._changeOnHold=te,Te._renderOnlyVisible=re,Te._autoInit=ue,Te._autoResize=ce,Te._useResizeObserver=ge,Te._resizeDebounce=_e,Te._maxResizeDebounce=be,Te._useFractionalSize=Ee,Te._externalRenderer=xe,Te._renderExternal=we,Te._viewport=new he(Te,z(n)),Te._autoResizer=new fe(Te),Te._renderer=Te._createRenderer(),Te._camera=Te._createCamera(),Te._control=Te._createControl(),Te._virtualManager=new pe(Te,ae),Te._autoInit&&Te.init(),Te}n(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,"nested",{get:function(){return this._nested},set:function(e){this._nested=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 n=this._control.controller;e?n.addPreventClickHandler():n.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,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=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,"useFractionalSize",{get:function(){return this._useFractionalSize},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 n=this._camera,t=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return n.init(),r.init(),t.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(),t.checkPanelContentsReady(t.panels),t.render().then((function(){e._plugins.forEach((function(n){return n.init(e)})),e._initialized=!0,a&&(e.trigger=o),e.trigger(new g(I.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 n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,C.PREV)},a.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,C.NEXT)},a.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=C.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new ce(T,p.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new ce(E(e,0,r-1),p.INDEX_OUT_OF_RANGE))},a.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new ce(E(e,0,r-1),p.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},a.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},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 n,t,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 n={index:e.index};return l&&(n.html=e.element.outerHTML),n}))};if(o&&(d.index=this.index),s){var g=f.findNearestAnchor(f.position);g&&(d.position={panel:g.panel.index,progressInPanel:f.getProgressInPanel(g.panel)})}if(h){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},a.setStatus=function(e){var n;if(!this._initialized)throw new ce(A,p.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:q(o.map((function(e){return e.html}))),hasDOMInElements:!0})),t){var u=r?t-r:t;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===M.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,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._initialized&&t.forEach((function(e){return e.init(n)})),(e=this._plugins).push.apply(e,s(t)),this},a.removePlugins=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.forEach((function(n){var t=ee(e._plugins,(function(e){return e===n}));t>=0&&(n.destroy(),e._plugins.splice(t,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,n,t,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return e=this._viewport,n=this._renderer,t=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?t.getProgressInPanel(o):0,this.trigger(new g(I.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),[4,n.forceRenderAllPanels()];case 1:return r.sent(),n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateAdaptiveHeight(),t.updateOffset(),[4,n.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(I.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,n){if(this._renderExternal)throw new ce(R,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:q(n),hasDOMInElements:!0})},a.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new ce(R,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},a._createControl=function(){var e,n=this._moveType,t=Object.keys(M).map((function(e){return M[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!K(t,i))throw new ce(y("moveType",JSON.stringify(n)),p.WRONG_OPTION);switch(i){case M.SNAP:return new Yn(r);case M.FREE_SCROLL:return new Un(r);case M.STRICT:return new qn(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new et(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,n=e.renderer,i=e.rendererOptions;return new n(t({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new kt({align:this._align,strategy:e?new Dt:new St({providerCtor:de})})},a._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new ce(P(o.position),p.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},a._initialResize=function(){var e=this._viewport,n=this._renderer,t=this._camera,i=this._control;this.trigger(new g(I.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new g(I.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.10.0",o}(d),Lt=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,s(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},Vt=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},Ft=function(e){var n="object"==typeof e?e.camera:e;return Bt(n)},Ht=function(e){var n="object"==typeof e?e.panel:e;return W(Bt(n))},Bt=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}},Gt={__proto__:null,withFlickingMethods:function(e,n){[d.prototype,zt.prototype].forEach((function(t){Object.getOwnPropertyNames(t).filter((function(n){return!e[n]&&0!==n.indexOf("_")&&"constructor"!==n})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(t,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return(e=r.value).call.apply(e,s([this[n]],t))}});else{var o={};r.get&&(o.get=function(){var e,t=this[n];return t&&(null===(e=r.get)||void 0===e?void 0:e.call(t))}),r.set&&(o.set=function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[n]],t))}),Object.defineProperty(e,i,o)}}))}))},sync:function(e,n,t){var i=e.renderer,r=i.panels,o=s(n.prevList),u=[],l=[];if(n.removed.length>0){var c=-1,h=-1;n.removed.forEach((function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s(Vt(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)})),l.push.apply(l,s(Vt(i,h,c+1)))}if(n.ordered.forEach((function(e){var n=a(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var f=-1,d=-1,g=t.slice(o.length);n.added.forEach((function(e,t){f<0&&(f=t),d>=0&&e!==d+1?(u.push.apply(u,s(Lt(i,n,g,f,t+1))),f=-1,d=-1):d=e})),f>=0&&u.push.apply(u,s(Lt(i,n,g,f)))}(n.added.length>0||n.removed.length>0)&&i.updateAfterPanelChange(u,l)},getRenderingPanels:function(e,n){var t=n.removed.reduce((function(e,n){return e[n]=!0,e}),{}),i=n.maintained.reduce((function(e,n){var t=a(n,2),i=t[0],r=t[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!t[e.index]})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})).map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=k.CENTER),void 0===n&&(n=!0);var i=Ft(e),r=Ht(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}};return j(zt,{__proto__:null,Viewport:he,FlickingError:ce,AnchorPoint:Wn,VirtualManager:pe,VanillaElementProvider:de,VirtualElementProvider:ge,Panel:Mt,VirtualPanel:Nt}),j(zt,nt),j(zt,Zn),j(zt,jt),j(zt,D),j(zt,Gt),j(zt,le),zt}));
10//# sourceMappingURL=flicking.pkgd.min.js.map