@egjs/flicking
Advanced tools
Comparing version 2.4.2 to 2.4.3
@@ -8,5 +8,5 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/component"),require("@egjs/axes")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes"],e):(t.eg=t.eg||{},t.eg.Flicking=e(t.eg.Component,t.eg.Axes))}(this,function(n,d){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}var r,f=(r="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document,p={$:function(t){var n=null;if("string"==typeof t){var e=t.match(/^<([a-z]+)\s*([^>]*)>/);e?(n=f.createElement(e[1]),3===e.length&&e[2].split(" ").forEach(function(t){var e=t.split("=");n.setAttribute(e[0],e[1].trim().replace(/(^["']|["']$)/g,""))})):(n=f.querySelectorAll(t)).length?1===n.length&&(n=n[0]):n=null}else t.nodeName&&1===t.nodeType&&(n=t);return n},toArray:function(t){return[].slice.call(t)},isArray:function(t){return t&&t.constructor===Array},isObject:function(t){return t&&!t.nodeType&&"object"==typeof t&&!this.isArray(t)},extend:function(n){for(var i=this,t=arguments.length,e=new Array(1<t?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];if(!e.length||1===e.length&&!e[0])return n;var r=e.shift();return this.isObject(n)&&this.isObject(r)&&Object.keys(r).forEach(function(t){var e=r[t];i.isObject(e)?(!n[t]&&(n[t]={}),n[t]=i.extend(n[t],e)):n[t]=i.isArray(e)?e.concat():e}),this.extend.apply(this,[n].concat(e))},css:function(t,e,n){if("string"==typeof e){var i=t.style[e];return(!i||"auto"===i||/\d/.test(i)&&!/\d(px)?$/.test(i))&&(i=r.getComputedStyle(t)[e]),n?this.getNumValue(i):i}var s=function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]})};return this.isArray(t)?t.forEach(function(t){return s(t.style,e)}):s(t.style,e),t},classList:function(t,e,n){var i,s="boolean"==typeof n;return t.classList?i=t.classList[s&&(n?"add":"remove")||"contains"](e):(i=t.className,s?n&&-1===i.indexOf(e)?i=t.className=(i+" "+e).replace(/\s{2,}/g," "):n||(i=t.className=i.replace(e,"")):i=new RegExp("\\b"+e+"\\b").test(i)),i},getNumValue:function(t,e){var n=t;return isNaN(n=parseFloat(n))?e:n},getUnitValue:function(t){return(parseFloat(t)||0)+(String(t).match(/(?:[a-z]{2,}|%)$/)||"px")},getOuter:function(n,t){var i=this,s=0;return("outerWidth"===t?["Left","Right"]:["Top","Bottom"]).forEach(function(e){["padding","margin"].forEach(function(t){s+=i.css(n,""+t+e,!0)})}),this.css(n,t.replace("outer","").toLocaleLowerCase(),!0)+s},outerWidth:function(t){return this.getOuter(t,"outerWidth")},outerHeight:function(t){return this.getOuter(t,"outerHeight")},translate:function(t,e,n){return n?"translate3d("+t+","+e+",0)":"translate("+t+","+e+")"},hasClickBug:function(){var t=r.navigator.userAgent,e=/iPhone|iPad/.test(t);return this.hasClickBug=function(){return e},e}},s=function(){function t(t){this.superclass=t||function(){return function(){}}()}return t.prototype.with=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(function(t,e){return e(t)},this.superclass)},t}(),c={beforeFlickStart:"beforeFlickStart",beforeRestore:"beforeRestore",flick:"flick",flickEnd:"flickEnd",restore:"restore"},g={name:"transform"};g.support=function(){if(!f.documentElement)return!1;var t=f.documentElement.style;return g.name in t||(g.name="webkitTransform")in t}();var o=r.CSS&&r.CSS.supports&&r.CSS.supports("will-change","transform"),a=/Android 2\./.test(r.navigator.userAgent),l="data-height",u={panel:{$list:null,index:0,no:0,currIndex:0,currNo:0,size:0,count:0,origCount:0,changed:!1,animating:!1,minCount:3},touch:{holdPos:0,destPos:0,distance:0,direction:null,lastPos:0,holding:!1,isTrusted:!1},customEvent:{flick:!0,restore:!1,restoreCall:!1},dirData:[],indexToMove:0,$dummyAnchor:null},h={hwAccelerable:!0,prefix:"eg-flick",deceleration:6e-4,horizontal:!0,circular:!1,previewPadding:null,bounce:null,threshold:40,duration:100,panelEffect:function(t){return 1-Math.pow(1-t,3)},defaultIndex:0,inputType:["touch","mouse"],thresholdAngle:45,adaptiveHeight:!1,zIndex:2e3,useTranslate:!0},_=function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n._holdHandler=function(t){var e=this._conf,n=e.touch,i=t.pos.flick;n.holdPos=i,n.holding=!0,n.isTrusted=!0,e.panel.changed=!1,this._adjustContainerCss("start",i)},n._changeHandler=function(t){var e,n,i=this._conf,s=i.touch,r=t.pos.flick,o=s.holdPos,a=null;this._setPointerEvents(t),t.inputEvent?(e=t.inputEvent.direction,n=t.inputEvent[this.options.horizontal?"deltaX":"deltaY"],~i.dirData.indexOf(e)||(e=i.dirData[+(Math.abs(s.lastPos)<=n)]),s.lastPos=n):s.lastPos=null,i.customEvent.flick&&(a=this._triggerEvent(c.flick,{pos:r,holding:t.holding,direction:e||s.direction,distance:s.isTrusted?r-o:null})),(a||null===a)&&this._setTranslate([-r,0])},n._releaseHandler=function(t){var e=this._conf,n=e.touch,i=n.holdPos,s=e.panel.size,r=e.customEvent,o=n.holdPos<t.depaPos.flick;n.distance=t.depaPos.flick-i,n.direction=e.dirData[+!o],n.destPos=i+(o?s:-s);var a=n.distance,c=this.options.duration,l=i;this._isMovable()?(!r.restoreCall&&(r.restore=!1),l=n.destPos):0<Math.abs(a)?this._triggerBeforeRestore(t):c=0,t.setTo({flick:l},c),0===a&&this._adjustContainerCss("end"),n.holding=!1,this._setPointerEvents()},n._animationStartHandler=function(t){var e=this._conf,n=e.panel,i=e.customEvent,s=t.inputEvent||e.touch.lastPos;!i.restoreCall&&s&&!1===this._setPhaseValue("start",{depaPos:t.depaPos.flick,destPos:t.destPos.flick})&&t.stop(),s&&(t.duration=this.options.duration,t.destPos.flick=n.size*(n.index+e.indexToMove)),n.animating=!0},n._animationEndHandler=function(){var t=this._conf;t.panel.animating=!1,this._setPhaseValue("end"),this._triggerRestore(),t.touch.isTrusted=!1},e}(t)};return function(){var t,e=function(r){function t(t,e,n){var i;(i=r.call(this)||this).$wrapper=p.$(t),i.plugins=[];var s=i.$wrapper&&i.$wrapper.children;if(!i.$wrapper||!s||!s.length)throw new Error("Given base element doesn't exist or it hasn't proper DOM structure to be initialized.");return i._setOptions(e),i._setConfig(s,n),!p.hasClickBug()&&(i._setPointerEvents=function(){}),i._build(),i._bindEvents(!0),i._applyPanelsCss(),i._arrangePanels(),i.options.hwAccelerable&&o&&i._setHint(),i.options.adaptiveHeight&&i._setAdaptiveHeight(),i._adjustContainerCss("end"),i}i(t,r);var e=t.prototype;return e._setOptions=function(t){var e={previewPadding:[0,0],bounce:[10,10]};for(var n in this.options=p.extend(p.extend({},h),e,t),e){var i=this.options[n];/(number|string)/.test(typeof i)?i=[i,i]:p.isArray(i)||(i=e[n]),this.options[n]=i}a&&(this.options.useTranslate=!1)},e._setConfig=function(t,e){var n=this.options,i=n.previewPadding,s=t;p.classList(s[0],n.prefix+"-container")&&(s=s[0],s=(this.$container=s).children),s=p.toArray(s);var r=this._conf=p.extend(p.extend({},u),{panel:{$list:s,minCount:0<i[0]+i[1]?5:3},origPanelStyle:{wrapper:{className:this.$wrapper.getAttribute("class")||null,style:this.$wrapper.getAttribute("style")||null},container:{className:this.$container&&this.$container.getAttribute("class")||null,style:this.$container&&this.$container.getAttribute("style")||null},list:s.map(function(t){return{className:t.getAttribute("class")||null,style:t.getAttribute("style")||null}})},useLayerHack:n.hwAccelerable&&!o,eventPrefix:e||""});[["LEFT","RIGHT"],["UP","DOWN"]][+!n.horizontal].forEach(function(t){return r.dirData.push(d["DIRECTION_"+t])})},e._build=function(){var t=this._conf.panel,e=this.options,n=t.$list,i=e.previewPadding.concat(),s=e.prefix,r=e.horizontal,o=t.count=t.origCount=n.length,a=e.bounce;this._setPadding(i,!0);var c=this._getDataByDirection([t.size,"100%"]),l={position:"relative",zIndex:e.zIndex||2e3,width:"100%",height:"100%"};if(r&&(l.top="0px"),this.$container)p.css(this.$container,l);else{var u=n[0].parentNode,h=f.createElement("div");h.className=s+"-container",p.css(h,l),n.forEach(function(t){return h.appendChild(t)}),u.appendChild(h),this.$container=h}n.forEach(function(t){p.classList(t,s+"-panel",!0),p.css(t,{position:"absolute",width:p.getUnitValue(c[0]),height:p.getUnitValue(c[1]),boxSizing:"border-box",top:0,left:0})}),this._addClonePanels()&&(o=t.count=(t.$list=p.toArray(this.$container.children)).length),this._axesInst=new d({flick:{range:[0,t.size*(o-1)],bounce:a}},{easing:e.panelEffect,deceleration:e.deceleration,interruptable:!1}),this._setDefaultPanel(e.defaultIndex)},e._setPadding=function(t,e){var n=this.$wrapper,i=this.options.horizontal,s=this._conf.panel,r={};!t.reduce(function(t,e){return parseFloat(t)+parseFloat(e)})&&e||(i&&t.reverse(),r.padding=(i?"0 ":"")+t.map(function(t){return isNaN(t)?t:t+"px"}).join(" 0 ")),e&&(r.overflow="hidden",r.boxSizing="border-box"),Object.keys(r).length&&p.css(n,r);var o=i?["Left","Right"]:["Top","Bottom"],a=Math.max(n["offset"+(i?"Width":"Height")],p.css(n,i?"width":"height",!0));s.size=a-(p.css(n,"padding"+o[0],!0)+p.css(n,"padding"+o[1],!0))},e._addClonePanels=function(){var t,e=this,n=this._conf.panel,i=n.origCount,s=n.minCount-i,r=n.$list;if(this.options.circular&&i<n.minCount){for(t=r.map(function(t){return t.cloneNode(!0)});t.length<s;)t=t.concat(r.map(function(t){return t.cloneNode(!0)}));return t.forEach(function(t){return e.$container.appendChild(t)}),!!t.length}return!1},e._movePanelPosition=function(t,e){var n=this._conf.panel,i=n.$list,s=i.splice(e?0:n.count-t,t);n.$list=e?i.concat(s):s.concat(i)},e._setDefaultPanel=function(t){var e,n,i=this._conf.panel,s=i.count-1;this.options.circular?(0<t&&t<=s&&this._movePanelPosition(t,!0),n=this._getBasePositionIndex(),this._movePanelPosition(n,!1),this._setPanelNo({no:t,currNo:t})):0<t&&t<=s&&(this._setPanelNo({index:t,no:t,currIndex:t,currNo:t}),e=[-i.size*t,0],this._setTranslate(e),this._setAxes("setTo",Math.abs(e[0]),0))},e._arrangePanels=function(t,e){var n,i=this._conf,s=i.panel,r=i.touch,o=i.dirData;this.options.circular&&(i.customEvent.flick=!1,t&&(e&&(r.direction=o[+!(0<e)]),this._arrangePanelPosition(r.direction,e)),n=this._getBasePositionIndex(),this._setPanelNo({index:n,currIndex:n}),i.customEvent.flick=!!this._setAxes("setTo",s.size*s.index,0)),this._applyPanelsPos()},e._applyPanelsPos=function(){this._conf.panel.$list.forEach(this._applyPanelsCss.bind(this))},e._setMoveStyle=function(t,e){var i=g,s=this._conf.useLayerHack;this._setMoveStyle=i.support?function(t,e){var n;p.css(t,((n={})[i.name]=p.translate(e[0],e[1],s),n))}:function(t,e){p.css(t,{left:e[0],top:e[1]})},this._setMoveStyle(t,e)},e._applyPanelsCss=function(){var t=this._conf,e="__dummy_anchor",n=this.options.useTranslate;this._applyPanelsCss=n?function(t,e){var n=this._getDataByDirection([g.support?100*e+"%":this._conf.panel.size*e+"px",0]);this._setMoveStyle(t,n)}:(a&&(t.$dummyAnchor=p.$("."+e),!t.$dummyAnchor&&this.$wrapper.appendChild(t.$dummyAnchor=p.$('<a href="javascript:void(0)" class="'+e+'" style="position:absolute;height:0px;width:0px">'))),function(t,e){var n=this._getDataByDirection([this._conf.panel.size*e+"px",0]);p.css(t,{left:n[0],top:n[1]})})},e._adjustContainerCss=function(t,e){var n,i=this._conf,s=i.panel,r=this.options,o=r.useTranslate,a=r.horizontal,c=r.previewPadding[0],l=this.$container,u=e;if(!o)if(u||(u=-s.size*s.index),"start"===t)l=l.style,n=parseFloat(l[a?"left":"top"]),a?n&&(l.left="0px"):n!==c&&(l.top="0px"),this._setTranslate([-u,0]);else if("end"===t){var h;u=this._getCoordsValue([u,0]),p.css(l,((h={left:u.x,top:u.y})[g.name]=p.translate(0,0,i.useLayerHack),h)),i.$dummyAnchor&&i.$dummyAnchor.focus()}},e._setAxes=function(t,e,n){return this._axesInst[t]({flick:e},n)},e._setHint=function(){var t={willChange:"transform"};p.css(this.$container,t),p.css(this._conf.panel.$list,t)},e._getDataByDirection=function(t){var e=t.concat();return!this.options.horizontal&&e.reverse(),e},e._arrangePanelPosition=function(t,e){var n=t===this._conf.dirData[0];this._movePanelPosition(Math.abs(e||1),n)},e._getBasePositionIndex=function(){return Math.floor(this._conf.panel.count/2-.1)},e._bindEvents=function(t){var e=this.options,n=this.$wrapper,i=this._axesInst;t?(this._panInput=new d.PanInput(n,{inputType:e.inputType,thresholdAngle:e.thresholdAngle,scale:this._getDataByDirection([-1,0])}),i.on({hold:this._holdHandler.bind(this),change:this._changeHandler.bind(this),release:this._releaseHandler.bind(this),animationStart:this._animationStartHandler.bind(this),animationEnd:this._animationEndHandler.bind(this)}).connect(this._getDataByDirection(["flick",""]),this._panInput)):(this.disableInput(),i.off())},e._setAdaptiveHeight=function(t){var e,n,i=this._conf,s=i.indexToMove,r=0===s?this["get"+((t===d.DIRECTION_LEFT?"Next":t===d.DIRECTION_RIGHT&&"Prev")||"")+"Element"]():i.panel.$list[i.panel.currIndex+s],o=r.querySelector(":first-child");o&&((n=o.getAttribute(l))||(e=r.children,0<(n=p.outerHeight(1<e.length?(r.style.height="auto",r):o))&&o.setAttribute(l,n)),0<n&&(this.$wrapper.style.height=n+"px"))},e._triggerBeforeRestore=function(t){var e=this._conf,n=e.touch;n.direction=+e.dirData.join("").replace(n.direction,""),e.customEvent.restore=this._triggerEvent(c.beforeRestore,{depaPos:t.depaPos.flick,destPos:t.destPos.flick}),e.customEvent.restore||("stop"in t&&t.stop(),e.panel.animating=!1)},e._triggerRestore=function(){var t=this._conf.customEvent;t.restore&&this._triggerEvent(c.restore),t.restore=t.restoreCall=!1},e._setPhaseValue=function(t,e){var n=this._conf,i=this.options,s=n.panel,r=i.useTranslate;if("start"===t&&(s.changed=this._isMovable())){if(!this._triggerEvent(c.beforeFlickStart,e))return s.changed=s.animating=!1,!1;i.adaptiveHeight&&this._setAdaptiveHeight(n.touch.direction),0===n.indexToMove&&this._setPanelNo()}else"end"===t&&(i.circular&&s.changed&&this._arrangePanels(!0,n.indexToMove),r&&this._setTranslate([-s.size*s.index,0]),n.touch.distance=n.indexToMove=0,s.changed&&this._triggerEvent(c.flickEnd));return this._adjustContainerCss(t),!0},e._getNumByDirection=function(){var t=this._conf;return t.touch.direction===t.dirData[0]?1:-1},e._revertPanelNo=function(){var t=this._conf.panel,e=this._getNumByDirection(),n=0<=t.currIndex?t.currIndex:t.index-e,i=0<=t.currNo?t.currNo:t.no-e;this._setPanelNo({index:n,no:i})},e._setPanelNo=function(t){var e=this._conf.panel,n=e.origCount-1,i=this._getNumByDirection();if(p.isObject(t))for(var s in t)e[s]=t[s];else e.currIndex=e.index,e.currNo=e.no,e.index+=i,e.no+=i;e.no>n?e.no=0:e.no<0&&(e.no=n)},e._setPointerEvents=function(t){var e,n=this.$container,i=p.css(n,"pointerEvents");t&&t.holding&&t.inputEvent&&t.inputEvent.preventSystemEvent&&"none"!==i?e="none":t||"auto"===i||(e="auto"),e&&p.css(n,{pointerEvents:e})},e._getCoordsValue=function(t){var e=this._getDataByDirection(t);return{x:p.getUnitValue(e[0]),y:p.getUnitValue(e[1])}},e._setTranslate=function(t){var e=this._getCoordsValue(t);this._setMoveStyle(this.$container,[e.x,e.y])},e._isMovable=function(){var t,e,n=this.options,i=this._axesInst,s=Math.abs(this._conf.touch.distance)>=n.threshold;return!(!n.circular&&s&&(t=i.axis.flick.range[1],(e=i.get().flick)<0||t<e))&&s},e._triggerEvent=function(t,e){var n=this._conf,i=n.panel;return t===c.flickEnd&&(i.currNo=i.no,i.currIndex=i.index),this.trigger(n.eventPrefix+t,p.extend({eventType:t,no:i.currNo,direction:n.touch.direction,isTrusted:n.touch.isTrusted},e))},e._getElement=function(t,e,n){var i,s,r=this._conf.panel,o=this.options.circular,a=r.currIndex,c=t===this._conf.dirData[0],l=null,u=s=n?(i=r.count,a):(i=r.origCount,r.currNo);return c?s<i-1?s++:o&&(s=0):0<s?s--:o&&(s=i-1),u!==s&&(l=e?r.$list[c?a+1:a-1]:s),l},e._setValueToMove=function(t){var e=this._conf;e.touch.distance=this.options.threshold+1,e.touch.direction=e.dirData[+!t]},e.getIndex=function(t){return this._conf.panel[t?"currIndex":"currNo"]},e.getElement=function(){var t=this._conf.panel;return t.$list[t.currIndex]},e.getNextElement=function(){return this._getElement(this._conf.dirData[0],!0)},e.getNextIndex=function(t){return this._getElement(this._conf.dirData[0],!1,t)},e.getAllElements=function(){return this._conf.panel.$list},e.getPrevElement=function(){return this._getElement(this._conf.dirData[1],!0)},e.getPrevIndex=function(t){return this._getElement(this._conf.dirData[1],!1,t)},e.isPlaying=function(){return this._conf.panel.animating},e._movePanelByPhase=function(t,e,n){var i=p.getNumValue(n,this.options.duration);!1!==this._setPhaseValue("start")&&(this._setAxes(t,e,i),!i&&this._setPhaseValue("end"))},e.next=function(t){var e=this.getNextIndex();return"number"!=typeof e?this:this.moveTo(e,t)},e.prev=function(t){var e=this.getPrevIndex();return"number"!=typeof e?this:this.moveTo(e,t)},e.moveTo=function(t,e){var n,i,s=this._conf,r=s.panel,o=this.options.circular,a=r.index,c=t;return(c=p.getNumValue(c,-1))<0||c>=r.origCount||c===r.no||r.animating||s.touch.holding||(i=0<(n=c-(o?r.no:a)),o&&Math.abs(n)>(i?r.count-(a+1):a)&&(i=0<(n+=(i?-1:1)*r.count)),this._setPanelNo(o?{no:c}:{no:c,index:c}),this._conf.indexToMove=n,this._setValueToMove(i),this._movePanelByPhase(o?"setBy":"setTo",r.size*(o?n:c),e)),this},e.resize=function(){var t,e=this._conf,n=this.options,i=e.panel,s=n.horizontal,r=n.useTranslate;if(!this.isPlaying()){var o;if(p.isArray(n.previewPadding)&&"number"==typeof+n.previewPadding.join("")?(this._setPadding(n.previewPadding.concat()),t=i.size):s&&(t=i.size=p.css(this.$wrapper,"width",!0)),p.css(i.$list,((o={})[s?"width":"height"]=p.getUnitValue(t),o)),n.adaptiveHeight){var a=this.$container.querySelectorAll("["+l+"]");a.length&&(p.toArray(a).forEach(function(t){return t.removeAttribute(l)}),this._setAdaptiveHeight())}this._axesInst.axis.flick.range=[0,t*(i.count-1)],this._setAxes("setTo",t*i.index,0),r||(this._applyPanelsPos(),this._adjustContainerCss("end"))}return this},e.restore=function(t){var e,n=this._conf,i=n.panel,s=this._axesInst.get().flick,r=t;return s!==i.currIndex*i.size?(n.customEvent.restoreCall=!0,r=p.getNumValue(r,this.options.duration),this._revertPanelNo(),e=i.size*i.index,this._triggerBeforeRestore({depaPos:s,destPos:e}),this._setAxes("setTo",e,r),r||(this._adjustContainerCss("end"),this._triggerRestore())):i.changed&&(this._revertPanelNo(),n.touch.distance=n.indexToMove=0),this},e.enableInput=function(){return this._panInput.enable(),this},e.disableInput=function(){return this._panInput.disable(),this},e.getStatus=function(t){var e=this._conf.panel,n=/((?:-webkit-)?transform|left|top|will-change|box-sizing|width):[^;]*;/g,i={panel:{index:e.index,no:e.no,currIndex:e.currIndex,currNo:e.currNo},$list:e.$list.map(function(t){return{style:t.style.cssText.replace(n,"").trim(),className:t.className,html:t.innerHTML}})};return t?JSON.stringify(i):i},e.setStatus=function(t){var e=this._conf.panel,n=this.options.adaptiveHeight,o="string"==typeof t?JSON.parse(t):t;if(o){for(var i in o.panel)i in e&&(e[i]=o.panel[i]);e.$list.forEach(function(t,e){var n=o.$list[e],i=n.style,s=n.className,r=n.html;i&&(t.style.cssText+=i),s&&(t.className=s),r&&(t.innerHTML=r)}),n&&this._setAdaptiveHeight()}},e.destroy=function(){var e=this,t=this._conf.origPanelStyle,n=t.wrapper,i=t.container,s=t.list;this._bindEvents(!1),this.off(),this._axesInst.destroy(),this._panInput.destroy();var r=this.$wrapper;r.setAttribute("class",n.className),r[n.style?"setAttribute":"removeAttribute"]("style",n.style);var o=this.$container,a=[].slice.call(o.children);t.container.className?(o.setAttribute("class",i.className),o[i.style?"setAttribute":"removeAttribute"]("style",i.style)):(a.forEach(function(t){return r.appendChild(t)}),o.parentNode.removeChild(o));for(var c,l=0;c=a[l];l++)if(l>s.length-1)c.parentNode.removeChild(c);else{var u=s[l].className,h=s[l].style;c[u?"setAttribute":"removeAttribute"]("class",u),c[h?"setAttribute":"removeAttribute"]("style",h)}for(var d in this.plugins.forEach(function(t){e.plugins[t].$componentWillUnmount()}),this)this[d]=null},e.plugin=function(t){var n=this;return t.forEach(function(e){0===n.plugins.filter(function(t){return t.constructor===e.constructor}).length&&n.plugins.push(e.$componentWillMount(n))}),this},t}((t=n,new s(t)).with(_));return e.utils=p,e.VERSION="2.4.2",e.consts={EVENTS:c,TRANSFORM:g,SUPPORT_WILLCHANGE:o,IS_ANDROID2:a},e.DIRECTION_NONE=d.DIRECTION_NONE,e.DIRECTION_LEFT=d.DIRECTION_LEFT,e.DIRECTION_RIGHT=d.DIRECTION_RIGHT,e.DIRECTION_UP=d.DIRECTION_UP,e.DIRECTION_DOWN=d.DIRECTION_DOWN,e.DIRECTION_HORIZONTAL=d.DIRECTION_HORIZONTAL,e.DIRECTION_VERTICAL=d.DIRECTION_VERTICAL,e.DIRECTION_ALL=d.DIRECTION_ALL,e}()}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/component"),require("@egjs/axes")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes"],e):(t.eg=t.eg||{},t.eg.Flicking=e(t.eg.Component,t.eg.Axes))}(this,function(n,d){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}var r,f=(r="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document,p={$:function(t){var n=null;if("string"==typeof t){var e=t.match(/^<([a-z]+)\s*([^>]*)>/);e?(n=f.createElement(e[1]),3===e.length&&e[2].split(" ").forEach(function(t){var e=t.split("=");n.setAttribute(e[0],e[1].trim().replace(/(^["']|["']$)/g,""))})):(n=f.querySelectorAll(t)).length?1===n.length&&(n=n[0]):n=null}else t.nodeName&&1===t.nodeType&&(n=t);return n},toArray:function(t){return[].slice.call(t)},isArray:function(t){return t&&t.constructor===Array},isObject:function(t){return t&&!t.nodeType&&"object"==typeof t&&!this.isArray(t)},extend:function(n){for(var i=this,t=arguments.length,e=new Array(1<t?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];if(!e.length||1===e.length&&!e[0])return n;var r=e.shift();return this.isObject(n)&&this.isObject(r)&&Object.keys(r).forEach(function(t){var e=r[t];i.isObject(e)?(!n[t]&&(n[t]={}),n[t]=i.extend(n[t],e)):n[t]=i.isArray(e)?e.concat():e}),this.extend.apply(this,[n].concat(e))},css:function(t,e,n){if("string"==typeof e){var i=t.style[e];return(!i||"auto"===i||/\d/.test(i)&&!/\d(px)?$/.test(i))&&(i=r.getComputedStyle(t)[e]),n?this.getNumValue(i):i}var s=function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]})};return this.isArray(t)?t.forEach(function(t){return s(t.style,e)}):s(t.style,e),t},classList:function(t,e,n){var i,s="boolean"==typeof n;return t.classList?i=t.classList[s&&(n?"add":"remove")||"contains"](e):(i=t.className,s?n&&-1===i.indexOf(e)?i=t.className=(i+" "+e).replace(/\s{2,}/g," "):n||(i=t.className=i.replace(e,"")):i=new RegExp("\\b"+e+"\\b").test(i)),i},getNumValue:function(t,e){var n=t;return isNaN(n=parseFloat(n))?e:n},getUnitValue:function(t){return(parseFloat(t)||0)+(String(t).match(/(?:[a-z]{2,}|%)$/)||"px")},getOuter:function(n,t){var i=this,s=0;return("outerWidth"===t?["Left","Right"]:["Top","Bottom"]).forEach(function(e){["padding","margin"].forEach(function(t){s+=i.css(n,""+t+e,!0)})}),this.css(n,t.replace("outer","").toLocaleLowerCase(),!0)+s},outerWidth:function(t){return this.getOuter(t,"outerWidth")},outerHeight:function(t){return this.getOuter(t,"outerHeight")},translate:function(t,e,n){return n?"translate3d("+t+","+e+",0)":"translate("+t+","+e+")"},hasClickBug:function(){var t=r.navigator.userAgent,e=/iPhone|iPad/.test(t);return this.hasClickBug=function(){return e},e}},s=function(){function t(t){this.superclass=t||function(){return function(){}}()}return t.prototype.with=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(function(t,e){return e(t)},this.superclass)},t}(),c={beforeFlickStart:"beforeFlickStart",beforeRestore:"beforeRestore",flick:"flick",flickEnd:"flickEnd",restore:"restore"},g={name:"transform"};g.support=function(){if(!f.documentElement)return!1;var t=f.documentElement.style;return g.name in t||(g.name="webkitTransform")in t}();var o=r.CSS&&r.CSS.supports&&r.CSS.supports("will-change","transform"),a=/Android 2\./.test(r.navigator.userAgent),l="data-height",u={panel:{$list:null,index:0,no:0,currIndex:0,currNo:0,size:0,count:0,origCount:0,changed:!1,animating:!1,minCount:3},touch:{holdPos:0,destPos:0,distance:0,direction:null,lastPos:0,holding:!1,isTrusted:!1},customEvent:{flick:!0,restore:!1,restoreCall:!1},dirData:[],indexToMove:0,$dummyAnchor:null},h={hwAccelerable:!0,prefix:"eg-flick",deceleration:6e-4,horizontal:!0,circular:!1,previewPadding:null,bounce:null,threshold:40,duration:100,panelEffect:function(t){return 1-Math.pow(1-t,3)},defaultIndex:0,inputType:["touch","mouse"],thresholdAngle:45,adaptiveHeight:!1,zIndex:2e3,useTranslate:!0},_=function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n._holdHandler=function(t){var e=this._conf,n=e.touch,i=t.pos.flick;n.holdPos=i,n.holding=!0,n.isTrusted=!0,e.panel.changed=!1,this._adjustContainerCss("start",i)},n._changeHandler=function(t){var e,n,i=this._conf,s=i.touch,r=t.pos.flick,o=s.holdPos,a=null;this._setPointerEvents(t),t.inputEvent?(e=t.inputEvent.direction,n=t.inputEvent[this.options.horizontal?"deltaX":"deltaY"],~i.dirData.indexOf(e)||(e=i.dirData[+(Math.abs(s.lastPos)<=n)]),s.lastPos=n):s.lastPos=null,i.customEvent.flick&&(a=this._triggerEvent(c.flick,{pos:r,holding:t.holding,direction:e||s.direction,distance:s.isTrusted?r-o:null})),(a||null===a)&&this._setTranslate([-r,0])},n._releaseHandler=function(t){var e=this._conf,n=e.touch,i=n.holdPos,s=e.panel.size,r=e.customEvent,o=n.holdPos<t.depaPos.flick;n.distance=t.depaPos.flick-i,n.direction=e.dirData[+!o],n.destPos=i+(o?s:-s);var a=n.distance,c=this.options.duration,l=i;this._isMovable()?(!r.restoreCall&&(r.restore=!1),l=n.destPos):0<Math.abs(a)?this._triggerBeforeRestore(t):c=0,t.setTo({flick:l},c),0===a&&this._adjustContainerCss("end"),n.holding=!1,this._setPointerEvents()},n._animationStartHandler=function(t){var e=this._conf,n=e.panel,i=e.customEvent,s=t.inputEvent||e.touch.lastPos;!i.restoreCall&&s&&!1===this._setPhaseValue("start",{depaPos:t.depaPos.flick,destPos:t.destPos.flick})&&t.stop(),s&&(t.duration=this.options.duration,t.destPos.flick=n.size*(n.index+e.indexToMove)),n.animating=!0},n._animationEndHandler=function(){var t=this._conf;t.panel.animating=!1,this._setPhaseValue("end"),this._triggerRestore(),t.touch.isTrusted=!1},e}(t)};return function(){var t,e=function(r){function t(t,e,n){var i;(i=r.call(this)||this).$wrapper=p.$(t),i.plugins=[];var s=i.$wrapper&&i.$wrapper.children;if(!i.$wrapper||!s||!s.length)throw new Error("Given base element doesn't exist or it hasn't proper DOM structure to be initialized.");return i._setOptions(e),i._setConfig(s,n),!p.hasClickBug()&&(i._setPointerEvents=function(){}),i._build(),i._bindEvents(!0),i._applyPanelsCss(),i._arrangePanels(),i.options.hwAccelerable&&o&&i._setHint(),i.options.adaptiveHeight&&i._setAdaptiveHeight(),i._adjustContainerCss("end"),i}i(t,r);var e=t.prototype;return e._setOptions=function(t){var e={previewPadding:[0,0],bounce:[10,10]};for(var n in this.options=p.extend(p.extend({},h),e,t),e){var i=this.options[n];/(number|string)/.test(typeof i)?i=[i,i]:p.isArray(i)||(i=e[n]),this.options[n]=i}a&&(this.options.useTranslate=!1)},e._setConfig=function(t,e){var n=this.options,i=n.previewPadding,s=t;p.classList(s[0],n.prefix+"-container")&&(s=s[0],s=(this.$container=s).children),s=p.toArray(s);var r=this._conf=p.extend(p.extend({},u),{panel:{$list:s,minCount:0<i[0]+i[1]?5:3},origPanelStyle:{wrapper:{className:this.$wrapper.getAttribute("class")||null,style:this.$wrapper.getAttribute("style")||null},container:{className:this.$container&&this.$container.getAttribute("class")||null,style:this.$container&&this.$container.getAttribute("style")||null},list:s.map(function(t){return{className:t.getAttribute("class")||null,style:t.getAttribute("style")||null}})},useLayerHack:n.hwAccelerable&&!o,eventPrefix:e||""});[["LEFT","RIGHT"],["UP","DOWN"]][+!n.horizontal].forEach(function(t){return r.dirData.push(d["DIRECTION_"+t])})},e._build=function(){var t=this._conf.panel,e=this.options,n=t.$list,i=e.previewPadding.concat(),s=e.prefix,r=e.horizontal,o=t.count=t.origCount=n.length,a=e.bounce;this._setPadding(i,!0);var c=this._getDataByDirection([t.size,"100%"]),l={position:"relative",zIndex:e.zIndex||2e3,width:"100%",height:"100%"};if(r&&(l.top="0px"),this.$container)p.css(this.$container,l);else{var u=n[0].parentNode,h=f.createElement("div");h.className=s+"-container",p.css(h,l),n.forEach(function(t){return h.appendChild(t)}),u.appendChild(h),this.$container=h}n.forEach(function(t){p.classList(t,s+"-panel",!0),p.css(t,{position:"absolute",width:p.getUnitValue(c[0]),height:p.getUnitValue(c[1]),boxSizing:"border-box",top:0,left:0})}),this._addClonePanels()&&(o=t.count=(t.$list=p.toArray(this.$container.children)).length),this._axesInst=new d({flick:{range:[0,t.size*(o-1)],bounce:a}},{easing:e.panelEffect,deceleration:e.deceleration,interruptable:!1}),this._setDefaultPanel(e.defaultIndex)},e._setPadding=function(t,e){var n=this.$wrapper,i=this.options.horizontal,s=this._conf.panel,r={};!t.reduce(function(t,e){return parseFloat(t)+parseFloat(e)})&&e||(i&&t.reverse(),r.padding=(i?"0 ":"")+t.map(function(t){return isNaN(t)?t:t+"px"}).join(" 0 ")),e&&(r.overflow="hidden",r.boxSizing="border-box"),Object.keys(r).length&&p.css(n,r);var o=i?["Left","Right"]:["Top","Bottom"],a=Math.max(n["offset"+(i?"Width":"Height")],p.css(n,i?"width":"height",!0));s.size=a-(p.css(n,"padding"+o[0],!0)+p.css(n,"padding"+o[1],!0))},e._addClonePanels=function(){var t,e=this,n=this._conf.panel,i=n.origCount,s=n.minCount-i,r=n.$list;if(this.options.circular&&i<n.minCount){for(t=r.map(function(t){return t.cloneNode(!0)});t.length<s;)t=t.concat(r.map(function(t){return t.cloneNode(!0)}));return t.forEach(function(t){return e.$container.appendChild(t)}),!!t.length}return!1},e._movePanelPosition=function(t,e){var n=this._conf.panel,i=n.$list,s=i.splice(e?0:n.count-t,t);n.$list=e?i.concat(s):s.concat(i)},e._setDefaultPanel=function(t){var e,n,i=this._conf.panel,s=i.count-1;this.options.circular?(0<t&&t<=s&&this._movePanelPosition(t,!0),n=this._getBasePositionIndex(),this._movePanelPosition(n,!1),this._setPanelNo({no:t,currNo:t})):0<t&&t<=s&&(this._setPanelNo({index:t,no:t,currIndex:t,currNo:t}),e=[-i.size*t,0],this._setTranslate(e),this._setAxes("setTo",Math.abs(e[0]),0))},e._arrangePanels=function(t,e){var n,i=this._conf,s=i.panel,r=i.touch,o=i.dirData;this.options.circular&&(i.customEvent.flick=!1,t&&(e&&(r.direction=o[+!(0<e)]),this._arrangePanelPosition(r.direction,e)),n=this._getBasePositionIndex(),this._setPanelNo({index:n,currIndex:n}),i.customEvent.flick=!!this._setAxes("setTo",s.size*s.index,0)),this._applyPanelsPos()},e._applyPanelsPos=function(){this._conf.panel.$list.forEach(this._applyPanelsCss.bind(this))},e._setMoveStyle=function(t,e){var i=g,s=this._conf.useLayerHack;this._setMoveStyle=i.support?function(t,e){var n;p.css(t,((n={})[i.name]=p.translate(e[0],e[1],s),n))}:function(t,e){p.css(t,{left:e[0],top:e[1]})},this._setMoveStyle(t,e)},e._applyPanelsCss=function(){var t=this._conf,e="__dummy_anchor",n=this.options.useTranslate;this._applyPanelsCss=n?function(t,e){var n=this._getDataByDirection([g.support?100*e+"%":this._conf.panel.size*e+"px",0]);this._setMoveStyle(t,n)}:(a&&(t.$dummyAnchor=p.$("."+e),!t.$dummyAnchor&&this.$wrapper.appendChild(t.$dummyAnchor=p.$('<a href="javascript:void(0)" class="'+e+'" style="position:absolute;height:0px;width:0px">'))),function(t,e){var n=this._getDataByDirection([this._conf.panel.size*e+"px",0]);p.css(t,{left:n[0],top:n[1]})})},e._adjustContainerCss=function(t,e){var n,i=this._conf,s=i.panel,r=this.options,o=r.useTranslate,a=r.horizontal,c=r.previewPadding[0],l=this.$container,u=e;if(!o)if(u||(u=-s.size*s.index),"start"===t)l=l.style,n=parseFloat(l[a?"left":"top"]),a?n&&(l.left="0px"):n!==c&&(l.top="0px"),this._setTranslate([-u,0]);else if("end"===t){var h;u=this._getCoordsValue([u,0]),p.css(l,((h={left:u.x,top:u.y})[g.name]=p.translate(0,0,i.useLayerHack),h)),i.$dummyAnchor&&i.$dummyAnchor.focus()}},e._setAxes=function(t,e,n){return this._axesInst[t]({flick:e},n)},e._setHint=function(){var t={willChange:"transform"};p.css(this.$container,t),p.css(this._conf.panel.$list,t)},e._getDataByDirection=function(t){var e=t.concat();return!this.options.horizontal&&e.reverse(),e},e._arrangePanelPosition=function(t,e){var n=t===this._conf.dirData[0];this._movePanelPosition(Math.abs(e||1),n)},e._getBasePositionIndex=function(){return Math.floor(this._conf.panel.count/2-.1)},e._bindEvents=function(t){var e=this.options,n=this.$wrapper,i=this._axesInst;t?(this._panInput=new d.PanInput(n,{inputType:e.inputType,thresholdAngle:e.thresholdAngle,scale:this._getDataByDirection([-1,0])}),i.on({hold:this._holdHandler.bind(this),change:this._changeHandler.bind(this),release:this._releaseHandler.bind(this),animationStart:this._animationStartHandler.bind(this),animationEnd:this._animationEndHandler.bind(this)}).connect(this._getDataByDirection(["flick",""]),this._panInput)):(this.disableInput(),i.off())},e._setAdaptiveHeight=function(t){var e,n,i=this._conf,s=i.indexToMove,r=0===s?this["get"+((t===d.DIRECTION_LEFT?"Next":t===d.DIRECTION_RIGHT&&"Prev")||"")+"Element"]():i.panel.$list[i.panel.currIndex+s],o=r.querySelector(":first-child");o&&((n=o.getAttribute(l))||(e=r.children,0<(n=p.outerHeight(1<e.length?(r.style.height="auto",r):o))&&o.setAttribute(l,n)),0<n&&(this.$wrapper.style.height=n+"px"))},e._triggerBeforeRestore=function(t){var e=this._conf,n=e.touch;n.direction=+e.dirData.join("").replace(n.direction,""),e.customEvent.restore=this._triggerEvent(c.beforeRestore,{depaPos:t.depaPos.flick,destPos:t.destPos.flick}),e.customEvent.restore||("stop"in t&&t.stop(),e.panel.animating=!1)},e._triggerRestore=function(){var t=this._conf.customEvent;t.restore&&this._triggerEvent(c.restore),t.restore=t.restoreCall=!1},e._setPhaseValue=function(t,e){var n=this._conf,i=this.options,s=n.panel,r=i.useTranslate;if("start"===t&&(s.changed=this._isMovable())){if(!this._triggerEvent(c.beforeFlickStart,e))return s.changed=s.animating=!1,!1;i.adaptiveHeight&&this._setAdaptiveHeight(n.touch.direction),0===n.indexToMove&&this._setPanelNo()}else"end"===t&&(i.circular&&s.changed&&this._arrangePanels(!0,n.indexToMove),r&&this._setTranslate([-s.size*s.index,0]),n.touch.distance=n.indexToMove=0,s.changed&&this._triggerEvent(c.flickEnd));return this._adjustContainerCss(t),!0},e._getNumByDirection=function(){var t=this._conf;return t.touch.direction===t.dirData[0]?1:-1},e._revertPanelNo=function(){var t=this._conf.panel,e=this._getNumByDirection(),n=0<=t.currIndex?t.currIndex:t.index-e,i=0<=t.currNo?t.currNo:t.no-e;this._setPanelNo({index:n,no:i})},e._setPanelNo=function(t){var e=this._conf.panel,n=e.origCount-1,i=this._getNumByDirection();if(p.isObject(t))for(var s in t)e[s]=t[s];else e.currIndex=e.index,e.currNo=e.no,e.index+=i,e.no+=i;e.no>n?e.no=0:e.no<0&&(e.no=n)},e._setPointerEvents=function(t){var e,n=this.$container,i=p.css(n,"pointerEvents");t&&t.holding&&t.inputEvent&&t.inputEvent.preventSystemEvent&&"none"!==i?e="none":t||"auto"===i||(e="auto"),e&&p.css(n,{pointerEvents:e})},e._getCoordsValue=function(t){var e=this._getDataByDirection(t);return{x:p.getUnitValue(e[0]),y:p.getUnitValue(e[1])}},e._setTranslate=function(t){var e=this._getCoordsValue(t);this._setMoveStyle(this.$container,[e.x,e.y])},e._isMovable=function(){var t,e,n=this.options,i=this._axesInst,s=Math.abs(this._conf.touch.distance)>=n.threshold;return!(!n.circular&&s&&(t=i.axis.flick.range[1],(e=i.get().flick)<0||t<e))&&s},e._triggerEvent=function(t,e){var n=this._conf,i=n.panel;return t===c.flickEnd&&(i.currNo=i.no,i.currIndex=i.index),this.trigger(n.eventPrefix+t,p.extend({eventType:t,no:i.currNo,direction:n.touch.direction,isTrusted:n.touch.isTrusted},e))},e._getElement=function(t,e,n){var i,s,r=this._conf.panel,o=this.options.circular,a=r.currIndex,c=t===this._conf.dirData[0],l=null,u=s=n?(i=r.count,a):(i=r.origCount,r.currNo);return c?s<i-1?s++:o&&(s=0):0<s?s--:o&&(s=i-1),u!==s&&(l=e?r.$list[c?a+1:a-1]:s),l},e._setValueToMove=function(t){var e=this._conf;e.touch.distance=this.options.threshold+1,e.touch.direction=e.dirData[+!t]},e.getIndex=function(t){return this._conf.panel[t?"currIndex":"currNo"]},e.getElement=function(){var t=this._conf.panel;return t.$list[t.currIndex]},e.getNextElement=function(){return this._getElement(this._conf.dirData[0],!0)},e.getNextIndex=function(t){return this._getElement(this._conf.dirData[0],!1,t)},e.getAllElements=function(){return this._conf.panel.$list},e.getPrevElement=function(){return this._getElement(this._conf.dirData[1],!0)},e.getPrevIndex=function(t){return this._getElement(this._conf.dirData[1],!1,t)},e.isPlaying=function(){return this._conf.panel.animating},e._movePanelByPhase=function(t,e,n){var i=p.getNumValue(n,this.options.duration);!1!==this._setPhaseValue("start")&&(this._setAxes(t,e,i),!i&&this._setPhaseValue("end"))},e.next=function(t){var e=this.getNextIndex();return"number"!=typeof e?this:this._moveTo(e,t,d.DIRECTION_RIGHT)},e.prev=function(t){var e=this.getPrevIndex();return"number"!=typeof e?this:this._moveTo(e,t,d.DIRECTION_LEFT)},e.moveTo=function(t,e){return this._moveTo(t,e)},e._moveTo=function(t,e,n){var i,s,r=this._conf,o=r.panel,a=this.options.circular,c=o.index,l=t;return(l=p.getNumValue(l,-1))<0||l>=o.origCount||l===o.no||o.animating||r.touch.holding||(i=l-(a?o.no:c),n===d.DIRECTION_RIGHT&&i<0?i+=o.origCount:n===d.DIRECTION_LEFT&&0<i&&(i-=o.origCount),s=0<i,a&&Math.abs(i)>(s?o.count-(c+1):c)&&(s=0<(i+=(s?-1:1)*o.count)),this._setPanelNo(a?{no:l}:{no:l,index:l}),this._conf.indexToMove=i,this._setValueToMove(s),this._movePanelByPhase(a?"setBy":"setTo",o.size*(a?i:l),e)),this},e.resize=function(){var t,e=this._conf,n=this.options,i=e.panel,s=n.horizontal,r=n.useTranslate;if(!this.isPlaying()){var o;if(p.isArray(n.previewPadding)&&"number"==typeof+n.previewPadding.join("")?(this._setPadding(n.previewPadding.concat()),t=i.size):s&&(t=i.size=p.css(this.$wrapper,"width",!0)),p.css(i.$list,((o={})[s?"width":"height"]=p.getUnitValue(t),o)),n.adaptiveHeight){var a=this.$container.querySelectorAll("["+l+"]");a.length&&(p.toArray(a).forEach(function(t){return t.removeAttribute(l)}),this._setAdaptiveHeight())}this._axesInst.axis.flick.range=[0,t*(i.count-1)],this._setAxes("setTo",t*i.index,0),r||(this._applyPanelsPos(),this._adjustContainerCss("end"))}return this},e.restore=function(t){var e,n=this._conf,i=n.panel,s=this._axesInst.get().flick,r=t;return s!==i.currIndex*i.size?(n.customEvent.restoreCall=!0,r=p.getNumValue(r,this.options.duration),this._revertPanelNo(),e=i.size*i.index,this._triggerBeforeRestore({depaPos:s,destPos:e}),this._setAxes("setTo",e,r),r||(this._adjustContainerCss("end"),this._triggerRestore())):i.changed&&(this._revertPanelNo(),n.touch.distance=n.indexToMove=0),this},e.enableInput=function(){return this._panInput.enable(),this},e.disableInput=function(){return this._panInput.disable(),this},e.getStatus=function(t){var e=this._conf.panel,n=/((?:-webkit-)?transform|left|top|will-change|box-sizing|width):[^;]*;/g,i={panel:{index:e.index,no:e.no,currIndex:e.currIndex,currNo:e.currNo},$list:e.$list.map(function(t){return{style:t.style.cssText.replace(n,"").trim(),className:t.className,html:t.innerHTML}})};return t?JSON.stringify(i):i},e.setStatus=function(t){var e=this._conf.panel,n=this.options.adaptiveHeight,o="string"==typeof t?JSON.parse(t):t;if(o){for(var i in o.panel)i in e&&(e[i]=o.panel[i]);e.$list.forEach(function(t,e){var n=o.$list[e],i=n.style,s=n.className,r=n.html;i&&(t.style.cssText+=i),s&&(t.className=s),r&&(t.innerHTML=r)}),n&&this._setAdaptiveHeight()}},e.destroy=function(){var e=this,t=this._conf.origPanelStyle,n=t.wrapper,i=t.container,s=t.list;this._bindEvents(!1),this.off(),this._axesInst.destroy(),this._panInput.destroy();var r=this.$wrapper;r.setAttribute("class",n.className),r[n.style?"setAttribute":"removeAttribute"]("style",n.style);var o=this.$container,a=[].slice.call(o.children);t.container.className?(o.setAttribute("class",i.className),o[i.style?"setAttribute":"removeAttribute"]("style",i.style)):(a.forEach(function(t){return r.appendChild(t)}),o.parentNode.removeChild(o));for(var c,l=0;c=a[l];l++)if(l>s.length-1)c.parentNode.removeChild(c);else{var u=s[l].className,h=s[l].style;c[u?"setAttribute":"removeAttribute"]("class",u),c[h?"setAttribute":"removeAttribute"]("style",h)}for(var d in this.plugins.forEach(function(t){e.plugins[t].$componentWillUnmount()}),this)this[d]=null},e.plugin=function(t){var n=this;return t.forEach(function(e){0===n.plugins.filter(function(t){return t.constructor===e.constructor}).length&&n.plugins.push(e.$componentWillMount(n))}),this},t}((t=n,new s(t)).with(_));return e.utils=p,e.VERSION="2.4.3",e.consts={EVENTS:c,TRANSFORM:g,SUPPORT_WILLCHANGE:o,IS_ANDROID2:a},e.DIRECTION_NONE=d.DIRECTION_NONE,e.DIRECTION_LEFT=d.DIRECTION_LEFT,e.DIRECTION_RIGHT=d.DIRECTION_RIGHT,e.DIRECTION_UP=d.DIRECTION_UP,e.DIRECTION_DOWN=d.DIRECTION_DOWN,e.DIRECTION_HORIZONTAL=d.DIRECTION_HORIZONTAL,e.DIRECTION_VERTICAL=d.DIRECTION_VERTICAL,e.DIRECTION_ALL=d.DIRECTION_ALL,e}()}); | ||
//# sourceMappingURL=flicking.min.js.map |
@@ -8,3 +8,3 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
@@ -14,3 +14,3 @@ All-in-one packaged file for ease use of '@egjs/flicking' with below dependencies. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.eg=t.eg||{},t.eg.Flicking=e())}(this,function(){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function a(t){return void 0===t}var n=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],s=0;e.stop=function(){i=!0},e.currentTarget=this;for(var o=arguments.length,a=new Array(2<o?o-2:0),u=2;u<o;u++)a[u-2]=arguments[u];for(1<=a.length&&(r=r.concat(a)),s=0;n[s];s++)n[s].apply(this,r);return!i},e.once=function(r,s){if("object"==typeof r&&a(s)){var t,e=r;for(t in e)this.once(t,e[t]);return this}if("string"==typeof r&&"function"==typeof s){var o=this;this.on(r,function t(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];s.apply(o,n),o.off(r,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&a(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}if("string"==typeof t&&"function"==typeof e){var r=this._eventHandler[t];a(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)}return this},e.off=function(t,e){if(a(t))return this._eventHandler={},this;if(a(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,i=t;for(n in i)this.off(n,i[n]);return this}var r,s,o=this._eventHandler[t];if(o)for(r=0;void 0!==(s=o[r]);r++)if(s===e){o=o.splice(r,1);break}return this},t}();return t.VERSION="2.1.2",t}();function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h,c="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,l=["","webkit","Moz","MS","ms","o"],t="undefined"==typeof document?{style:{}}:document.createElement("div"),f="function",p=Math.round,E=Math.abs,P=Date.now;function d(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<l.length;){if((i=(n=l[s])?n+r:e)in t)return i;s++}}h="undefined"==typeof window?{}:window;var m=d(t.style,"touchAction"),v=void 0!==m;var g="compute",y="auto",_="manipulation",x="none",b="pan-x",T="pan-y",I=function(){if(!v)return!1;var e={},n=h.CSS&&h.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||h.CSS.supports("touch-action",t)}),e}(),A="ontouchstart"in h,C=void 0!==d(h,"PointerEvent"),w=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",N="mouse",D=25,R=1,M=4,S=8,z=1,H=2,k=4,$=8,j=16,F=H|k,L=$|j,X=F|L,Y=["x","y"],V=["clientX","clientY"];function B(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function W(t,e){return typeof t===f?t.apply(e&&e[0]||void 0,e):t}function q(t,e){return-1<t.indexOf(e)}var U=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===g&&(t=this.compute()),v&&this.manager.element.style&&I[t]&&(this.manager.element.style[m]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[];return B(this.manager.recognizers,function(t){W(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(q(t,x))return x;var e=q(t,b),n=q(t,T);return e&&n?x:e||n?e?b:T:q(t,_)?_:y}(e.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=q(i,x)&&!I[x],s=q(i,T)&&!I[T],o=q(i,b)&&!I[b];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}if(!o||!s)return r||s&&n&F||o&&n&L?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function G(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Z(t){var e=t.length;if(1===e)return{x:p(t[0].clientX),y:p(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:p(n/e),y:p(i/e)}}function J(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:p(t.pointers[n].clientX),clientY:p(t.pointers[n].clientY)},n++;return{timeStamp:P(),pointers:e,center:Z(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Q(t,e,n){n||(n=Y);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function K(t,e,n){n||(n=Y);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function tt(t,e){return t===e?z:E(t)>=E(e)?t<0?H:k:e<0?$:j}function et(t,e,n){return{x:e/t||0,y:n/t||0}}function nt(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=J(e)),1<r&&!n.firstMultiple?n.firstMultiple=J(e):1===r&&(n.firstMultiple=!1);var s,o,a,u,h,c,l=n.firstInput,f=n.firstMultiple,p=f?f.center:l.center,d=e.center=Z(i);e.timeStamp=P(),e.deltaTime=e.timeStamp-l.timeStamp,e.angle=K(p,d),e.distance=Q(p,d),s=n,a=(o=e).center,u=s.offsetDelta||{},h=s.prevDelta||{},c=s.prevInput||{},o.eventType!==R&&c.eventType!==M||(h=s.prevDelta={x:c.deltaX||0,y:c.deltaY||0},u=s.offsetDelta={x:a.x,y:a.y}),o.deltaX=h.x+(a.x-u.x),o.deltaY=h.y+(a.y-u.y),e.offsetDirection=tt(e.deltaX,e.deltaY);var m,v,g,y,_=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=_.x,e.overallVelocityY=_.y,e.overallVelocity=E(_.x)>E(_.y)?_.x:_.y,e.scale=f?(m=f.pointers,Q((v=i)[0],v[1],V)/Q(m[0],m[1],V)):1,e.rotation=f?(g=f.pointers,K((y=i)[1],y[0],V)+K(g[1],g[0],V)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(e.eventType!==S&&(D<a||void 0===o.velocity)){var u=e.deltaX-o.deltaX,h=e.deltaY-o.deltaY,c=et(a,u,h);i=c.x,r=c.y,n=E(c.x)>E(c.y)?c.x:c.y,s=tt(u,h),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var x=t.element;G(e.srcEvent.target,x)&&(x=e.srcEvent.target),e.target=x}function it(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=e&R&&i-r==0,o=e&(M|S)&&i-r==0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,nt(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function rt(t){return t.trim().split(/\s+/g)}function st(e,t,n){B(rt(t),function(t){e.addEventListener(t,n,!1)})}function ot(e,t,n){B(rt(t),function(t){e.removeEventListener(t,n,!1)})}function at(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var e=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){W(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&st(this.element,this.evEl,this.domHandler),this.evTarget&&st(this.target,this.evTarget,this.domHandler),this.evWin&&st(at(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(at(this.element),this.evWin,this.domHandler)},t}();function ut(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}var ht={pointerdown:R,pointermove:2,pointerup:M,pointercancel:S,pointerout:S},ct={2:O,3:"pen",4:N,5:"kinect"},lt="pointerdown",ft="pointermove pointerup pointercancel";h.MSPointerEvent&&!h.PointerEvent&&(lt="MSPointerDown",ft="MSPointerMove MSPointerUp MSPointerCancel");var pt=function(n){function i(){var t,e=i.prototype;return e.evEl=lt,e.evWin=ft,(t=n.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return o(i,n),i.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=ht[i],s=ct[t.pointerType]||t.pointerType,o=s===O,a=ut(e,t.pointerId,"pointerId");r&R&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):r&(M|S)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))},i}(e);function dt(t){return Array.prototype.slice.call(t,0)}function mt(t,n,e){for(var i=[],r=[],s=0;s<t.length;){var o=n?t[s][n]:t[s];ut(r,o)<0&&i.push(t[s]),r[s]=o,s++}return e&&(i=n?i.sort(function(t,e){return t[n]>e[n]}):i.sort()),i}var vt={touchstart:R,touchmove:2,touchend:M,touchcancel:S},gt=function(t){function e(){return e.prototype.evTarget="touchstart touchmove touchend touchcancel",e.prototype.targetIds={},t.apply(this,arguments)||this}return o(e,t),e.prototype.handler=function(t){var e=vt[t.type],n=function(t,e){var n,i,r=dt(t.touches),s=this.targetIds;if(e&(2|R)&&1===r.length)return s[r[0].identifier]=!0,[r,r];var o=dt(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return G(t.target,u)}),e===R)for(n=0;n<i.length;)s[i[n].identifier]=!0,n++;n=0;for(;n<o.length;)s[o[n].identifier]&&a.push(o[n]),e&(M|S)&&delete s[o[n].identifier],n++;return a.length?[mt(i.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:O,srcEvent:t})},e}(e);var yt={mousedown:R,mousemove:2,mouseup:M},_t=function(n){function i(){var t,e=i.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(t=n.apply(this,arguments)||this).pressed=!1,t}return o(i,n),i.prototype.handler=function(t){var e=yt[t.type];e&R&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=M),this.pressed&&(e&M&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:N,srcEvent:t}))},i}(e),xt=2500,Et=25;function Pt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout(function(){var t=i.indexOf(n);-1<t&&i.splice(t,1)},xt)}}var bt=function(){return function(n){function t(t,e){var s;return r(u(u(s=n.call(this,t,e)||this)),"handler",function(t,e,n){var i=n.pointerType===O,r=n.pointerType===N;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&R?(this.primaryTouch=e.changedPointers[0].identifier,Pt.call(this,e)):t&(M|S)&&Pt.call(this,e)}).call(u(u(s)),e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=Et&&o<=Et)return!0}return!1}.call(u(u(s)),n))return;s.callback(t,e,n)}}),s.touch=new gt(s.manager,s.handler),s.mouse=new _t(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}return o(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(e)}();function Tt(t,e,n){return!!Array.isArray(t)&&(B(t,n[e],n),!0)}var It=1;function At(t,e){var n=e.manager;return n?n.get(t):t}function Ct(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var wt=function(){function t(t){void 0===t&&(t={}),this.options=s({enable:!0},t),this.id=It++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Tt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=At(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return Tt(t,"dropRecognizeWith",this)||(t=At(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Tt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ut(e,t=At(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Tt(t,"dropRequireFailure",this))return this;t=At(t,this);var e=ut(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+Ct(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Ct(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=c({},t);if(!W(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Ot={domEvents:!1,touchAction:g,enable:!0,inputTarget:null,inputClass:null,preset:[],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Nt(n,i){var r,s=n.element;s.style&&(B(n.options.cssProps,function(t,e){r=d(s.style,e),s.style[r]=i?(n.oldCssProps[r]=s.style[r],t):n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var Dt=function(){function t(t,e){var n,i=this;this.options=c({},Ot,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(C?pt:w?gt:A?bt:_t))(n,it),this.touchAction=new U(this,this.options.touchAction),Nt(this,!0),B(this.options.recognizers,function(t){var e=i.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},e.get=function(t){if(t instanceof wt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(Tt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(Tt(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,i=ut(n,e);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return B(rt(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return B(rt(t),function(t){e?n[t]&&n[t].splice(ut(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](e),o++}},e.destroy=function(){this.element&&Nt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Rt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,s({pointers:1},t))||this}o(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(n&S||!r)?16|e:i||r?n&M?8|e:2&e?4|e:2:32},t}(wt);function Mt(t){return t===j?"down":t===$?"up":t===H?"left":t===k?"right":""}var St=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this,s({event:"pan",threshold:10,pointers:1,direction:X},t))||this).pX=null,e.pY=null,e}o(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return t&F&&e.push(T),t&L&&e.push(b),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(i=e.direction&F?(r=0===s?z:s<0?H:k,n=s!==this.pX,Math.abs(t.deltaX)):(r=0===o?z:o<0?$:j,n=o!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Rt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Mt(t.direction);e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Rt);var zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var Ht=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};function kt(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)}function $t(t,e){return t<e[0]||t>e[1]}function jt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Ft(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&s<t&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}function Lt(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0}var Xt,Yt=function(){function t(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}var e=t.prototype;return e._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=Ht({range:[0,100],bounce:[0,0],circular:[!1,!1]},r.axis[i]),["bounce","circular"].forEach(function(t){var e=r.axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},e.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):Ht({},this._pos,t||{})},e.moveTo=function(n){var i=this,t=this.map(this._pos,function(t,e){return n[e]?n[e]-i._pos[e]:0});return this.set(n),{pos:Ht({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},e.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},e.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!$t(t,n.range)})},t}();(Xt="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document;function Vt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var Bt=Xt.requestAnimationFrame||Xt.webkitRequestAnimationFrame,Wt=Xt.cancelAnimationFrame||Xt.webkitCancelAnimationFrame;if(Bt&&!Wt){var qt={},Ut=Bt;Bt=function(e){var n=Ut(function(t){qt[n]&&e(t)});return qt[n]=!0,n},Wt=function(t){delete qt[t]}}else Bt&&Wt||(Bt=function(t){return Xt.setTimeout(function(){t(Xt.performance&&Xt.performance.now&&Xt.performance.now()||(new Date).getTime())},16)},Wt=Xt.clearTimeout);function Gt(t,e,n){return Math.max(Math.min(t,n),e)}var Zt=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=this.axm.map(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(s[e])),i=o.options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return Gt(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:Gt(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return Ft(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&(r=this._raf,Wt(r)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var r},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return jt(t,n.range,n.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e,n){return Ft(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},e.animateLoop=function(e,n){if(this._animateParam=Ht({},e),this._animateParam.startTime=(new Date).getTime(),e.duration){var i=this._animateParam,r=this;!function t(){if(r._raf=null,1<=r.frame(i))return Lt(e.destPos,r.axm.get(Object.keys(e.destPos)))||r.em.triggerChange(e.destPos),void n();r._raf=Bt(t)}()}else this.em.triggerChange(e.destPos),n()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=Gt(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,r=this.createAnimationParam(t,e,n),s=Ht({},r.depaPos),o=this.em.triggerAnimationStart(r),a=this.getUserControll(r);if(!o&&this.axm.every(a.destPos,function(t,e,n){return jt(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!Lt(a.destPos,s)){var u=n&&n.event||null;this.animateLoop({depaPos:s,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(s,a.destPos),isTrusted:!!u,inputEvent:u,input:n&&n.input||null},function(){return i.animationEnd()})}},e.frame=function(i){var t=(new Date).getTime()-i.startTime,r=this.easing(t/i.duration),e=i.depaPos;return e=this.axm.map(e,function(t,e,n){return Ft(t+=i.delta[e]*r,n.range,n.circular)}),this.em.triggerChange(e),r},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,i){void 0===i&&(i=0);var e=Object.keys(t);this.grab(e);var n=this.axm.get(e);if(Lt(t,n))return this;this.itm.setInterrupt(!0);var r=this.axm.filter(t,function(t,e){return n[e]!==t});return Object.keys(r).length&&(Lt(r=this.axm.map(r,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?0<i?t:Ft(t,n.range,n.circular):kt(t,n.range,n.circular)}),n)||(0<i?this.animateTo(r,i):(this.em.triggerChange(r),this.itm.setInterrupt(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(this.axm.map(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),Jt=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:Ht({},t),duration:e};return function(t,e){return t&&(n.destPos=Ht({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),Qt=function(){function t(t){this.options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this.options.interruptable||this._prevented},e.isInterrupted=function(){return!this.options.interruptable&&this._prevented},e.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},t}(),Kt=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}var e=t.prototype;return e.atOutside=function(t){var o=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return r<t?r:t<i?i:t});var a=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e,n){var i=n.range[0],r=n.range[1],s=n.bounce;return t<i?i-o.am.easing((i-t)/(s[0]*a))*s[0]:r<t?r+o.am.easing((t-r)/(s[1]*a))*s[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return Ft(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!$t(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},e.release=function(t,e,n,i){if(this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(t.axes),s=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?r[e]+t:kt(r[e]+t,n.range,n.circular,n.bounce)})),a=this.am.getDuration(o,r,i);0===a&&(o=Ht({},s));var u={depaPos:s,destPos:o,duration:a,delta:this.axm.getDelta(s,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(u),this.moveDistance=null;var h=this.am.getUserControll(u),c=Lt(h.destPos,s),l={input:t,event:e};c||0===h.duration?(!c&&this.em.triggerChange(h.destPos,l,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(l):this.em.triggerFinish(!0)):this.am.animateTo(h.destPos,h.duration,l)}},t}(),te=function(){if("undefined"==typeof document)return"";for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}(),ee=function(r){function t(t,e,n){void 0===t&&(t={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=Ht({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new Qt(i.options),i.axm=new Yt(i.axis,i.options),i.em=new Jt(i),i.am=new Zt(i),i.io=new Kt(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}zt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.7-snapshot",t.TRANSFORM=te,t.DIRECTION_NONE=z,t.DIRECTION_LEFT=H,t.DIRECTION_RIGHT=k,t.DIRECTION_UP=$,t.DIRECTION_DOWN=j,t.DIRECTION_HORIZONTAL=F,t.DIRECTION_VERTICAL=L,t.DIRECTION_ALL=X,t}(n),ne="PointerEvent"in Xt||"MSPointerEvent"in Xt,ie="ontouchstart"in Xt,re="_EGJS_AXES_INPUTTYPE_";function se(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function oe(t,e,n){return n?!!(e===X||e&t&&n&t):!!(e&t)}var ae,ue=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===Dt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;if(void 0===n&&(n=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var r=document.createElement("div");r.innerHTML=t,i=Vt(r.childNodes)}else i=Vt(document.querySelectorAll(t));n||(i=1<=i.length?i[0]:void 0)}else t===Xt?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in Xt&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)):i=t;return i}(t),this.options=Ht({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?X:e?F:n?L:z,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[re];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=function(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=ie;break;case"pointer":i=ne}}),i?pt:e&&n?bt:e?gt:n?_t:null}(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new Dt(t,Ht({},e))}catch(t){return null}}(this.element,Ht({inputClass:i},this.options.hammerManagerOptions)),this.element[re]=n}return this.panRecognizer=new St(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=z,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[re],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return z;var n=Math.abs(t);return e<n&&n<180-e?L:F}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[oe(F,this._direction,e),oe(L,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=r)&&this.observer.change(this,t,se(this.axes,i))},e.onPanend=function(t){var e,n,i,r,s=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[oe(F,this._direction),oe(L,this._direction)]);e=s,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=Math.abs(i/-n),s=[e[0]/2*r,e[1]/2*r],this.observer.release(this,t,se(this.axes,s))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),he=(ae="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document,ce={$:function(t){var n=null;if("string"==typeof t){var e=t.match(/^<([a-z]+)\s*([^>]*)>/);e?(n=he.createElement(e[1]),3===e.length&&e[2].split(" ").forEach(function(t){var e=t.split("=");n.setAttribute(e[0],e[1].trim().replace(/(^["']|["']$)/g,""))})):(n=he.querySelectorAll(t)).length?1===n.length&&(n=n[0]):n=null}else t.nodeName&&1===t.nodeType&&(n=t);return n},toArray:function(t){return[].slice.call(t)},isArray:function(t){return t&&t.constructor===Array},isObject:function(t){return t&&!t.nodeType&&"object"==typeof t&&!this.isArray(t)},extend:function(n){for(var i=this,t=arguments.length,e=new Array(1<t?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];if(!e.length||1===e.length&&!e[0])return n;var s=e.shift();return this.isObject(n)&&this.isObject(s)&&Object.keys(s).forEach(function(t){var e=s[t];i.isObject(e)?(!n[t]&&(n[t]={}),n[t]=i.extend(n[t],e)):n[t]=i.isArray(e)?e.concat():e}),this.extend.apply(this,[n].concat(e))},css:function(t,e,n){if("string"==typeof e){var i=t.style[e];return(!i||"auto"===i||/\d/.test(i)&&!/\d(px)?$/.test(i))&&(i=ae.getComputedStyle(t)[e]),n?this.getNumValue(i):i}var r=function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]})};return this.isArray(t)?t.forEach(function(t){return r(t.style,e)}):r(t.style,e),t},classList:function(t,e,n){var i,r="boolean"==typeof n;return t.classList?i=t.classList[r&&(n?"add":"remove")||"contains"](e):(i=t.className,r?n&&-1===i.indexOf(e)?i=t.className=(i+" "+e).replace(/\s{2,}/g," "):n||(i=t.className=i.replace(e,"")):i=new RegExp("\\b"+e+"\\b").test(i)),i},getNumValue:function(t,e){var n=t;return isNaN(n=parseFloat(n))?e:n},getUnitValue:function(t){return(parseFloat(t)||0)+(String(t).match(/(?:[a-z]{2,}|%)$/)||"px")},getOuter:function(n,t){var i=this,r=0;return("outerWidth"===t?["Left","Right"]:["Top","Bottom"]).forEach(function(e){["padding","margin"].forEach(function(t){r+=i.css(n,""+t+e,!0)})}),this.css(n,t.replace("outer","").toLocaleLowerCase(),!0)+r},outerWidth:function(t){return this.getOuter(t,"outerWidth")},outerHeight:function(t){return this.getOuter(t,"outerHeight")},translate:function(t,e,n){return n?"translate3d("+t+","+e+",0)":"translate("+t+","+e+")"},hasClickBug:function(){var t=ae.navigator.userAgent,e=/iPhone|iPad/.test(t);return this.hasClickBug=function(){return e},e}},le=function(){function t(t){this.superclass=t||function(){return function(){}}()}return t.prototype.with=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(function(t,e){return e(t)},this.superclass)},t}(),fe={beforeFlickStart:"beforeFlickStart",beforeRestore:"beforeRestore",flick:"flick",flickEnd:"flickEnd",restore:"restore"},pe={name:"transform"};pe.support=function(){if(!he.documentElement)return!1;var t=he.documentElement.style;return pe.name in t||(pe.name="webkitTransform")in t}();var de=ae.CSS&&ae.CSS.supports&&ae.CSS.supports("will-change","transform"),me=/Android 2\./.test(ae.navigator.userAgent),ve="data-height",ge={panel:{$list:null,index:0,no:0,currIndex:0,currNo:0,size:0,count:0,origCount:0,changed:!1,animating:!1,minCount:3},touch:{holdPos:0,destPos:0,distance:0,direction:null,lastPos:0,holding:!1,isTrusted:!1},customEvent:{flick:!0,restore:!1,restoreCall:!1},dirData:[],indexToMove:0,$dummyAnchor:null},ye={hwAccelerable:!0,prefix:"eg-flick",deceleration:6e-4,horizontal:!0,circular:!1,previewPadding:null,bounce:null,threshold:40,duration:100,panelEffect:function(t){return 1-Math.pow(1-t,3)},defaultIndex:0,inputType:["touch","mouse"],thresholdAngle:45,adaptiveHeight:!1,zIndex:2e3,useTranslate:!0},_e=function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n._holdHandler=function(t){var e=this._conf,n=e.touch,i=t.pos.flick;n.holdPos=i,n.holding=!0,n.isTrusted=!0,e.panel.changed=!1,this._adjustContainerCss("start",i)},n._changeHandler=function(t){var e,n,i=this._conf,r=i.touch,s=t.pos.flick,o=r.holdPos,a=null;this._setPointerEvents(t),t.inputEvent?(e=t.inputEvent.direction,n=t.inputEvent[this.options.horizontal?"deltaX":"deltaY"],~i.dirData.indexOf(e)||(e=i.dirData[+(Math.abs(r.lastPos)<=n)]),r.lastPos=n):r.lastPos=null,i.customEvent.flick&&(a=this._triggerEvent(fe.flick,{pos:s,holding:t.holding,direction:e||r.direction,distance:r.isTrusted?s-o:null})),(a||null===a)&&this._setTranslate([-s,0])},n._releaseHandler=function(t){var e=this._conf,n=e.touch,i=n.holdPos,r=e.panel.size,s=e.customEvent,o=n.holdPos<t.depaPos.flick;n.distance=t.depaPos.flick-i,n.direction=e.dirData[+!o],n.destPos=i+(o?r:-r);var a=n.distance,u=this.options.duration,h=i;this._isMovable()?(!s.restoreCall&&(s.restore=!1),h=n.destPos):0<Math.abs(a)?this._triggerBeforeRestore(t):u=0,t.setTo({flick:h},u),0===a&&this._adjustContainerCss("end"),n.holding=!1,this._setPointerEvents()},n._animationStartHandler=function(t){var e=this._conf,n=e.panel,i=e.customEvent,r=t.inputEvent||e.touch.lastPos;!i.restoreCall&&r&&!1===this._setPhaseValue("start",{depaPos:t.depaPos.flick,destPos:t.destPos.flick})&&t.stop(),r&&(t.duration=this.options.duration,t.destPos.flick=n.size*(n.index+e.indexToMove)),n.animating=!0},n._animationEndHandler=function(){var t=this._conf;t.panel.animating=!1,this._setPhaseValue("end"),this._triggerRestore(),t.touch.isTrusted=!1},e}(t)};return function(){var t,e=function(s){function t(t,e,n){var i;(i=s.call(this)||this).$wrapper=ce.$(t),i.plugins=[];var r=i.$wrapper&&i.$wrapper.children;if(!i.$wrapper||!r||!r.length)throw new Error("Given base element doesn't exist or it hasn't proper DOM structure to be initialized.");return i._setOptions(e),i._setConfig(r,n),!ce.hasClickBug()&&(i._setPointerEvents=function(){}),i._build(),i._bindEvents(!0),i._applyPanelsCss(),i._arrangePanels(),i.options.hwAccelerable&&de&&i._setHint(),i.options.adaptiveHeight&&i._setAdaptiveHeight(),i._adjustContainerCss("end"),i}i(t,s);var e=t.prototype;return e._setOptions=function(t){var e={previewPadding:[0,0],bounce:[10,10]};for(var n in this.options=ce.extend(ce.extend({},ye),e,t),e){var i=this.options[n];/(number|string)/.test(typeof i)?i=[i,i]:ce.isArray(i)||(i=e[n]),this.options[n]=i}me&&(this.options.useTranslate=!1)},e._setConfig=function(t,e){var n=this.options,i=n.previewPadding,r=t;ce.classList(r[0],n.prefix+"-container")&&(r=r[0],r=(this.$container=r).children),r=ce.toArray(r);var s=this._conf=ce.extend(ce.extend({},ge),{panel:{$list:r,minCount:0<i[0]+i[1]?5:3},origPanelStyle:{wrapper:{className:this.$wrapper.getAttribute("class")||null,style:this.$wrapper.getAttribute("style")||null},container:{className:this.$container&&this.$container.getAttribute("class")||null,style:this.$container&&this.$container.getAttribute("style")||null},list:r.map(function(t){return{className:t.getAttribute("class")||null,style:t.getAttribute("style")||null}})},useLayerHack:n.hwAccelerable&&!de,eventPrefix:e||""});[["LEFT","RIGHT"],["UP","DOWN"]][+!n.horizontal].forEach(function(t){return s.dirData.push(ee["DIRECTION_"+t])})},e._build=function(){var t=this._conf.panel,e=this.options,n=t.$list,i=e.previewPadding.concat(),r=e.prefix,s=e.horizontal,o=t.count=t.origCount=n.length,a=e.bounce;this._setPadding(i,!0);var u=this._getDataByDirection([t.size,"100%"]),h={position:"relative",zIndex:e.zIndex||2e3,width:"100%",height:"100%"};if(s&&(h.top="0px"),this.$container)ce.css(this.$container,h);else{var c=n[0].parentNode,l=he.createElement("div");l.className=r+"-container",ce.css(l,h),n.forEach(function(t){return l.appendChild(t)}),c.appendChild(l),this.$container=l}n.forEach(function(t){ce.classList(t,r+"-panel",!0),ce.css(t,{position:"absolute",width:ce.getUnitValue(u[0]),height:ce.getUnitValue(u[1]),boxSizing:"border-box",top:0,left:0})}),this._addClonePanels()&&(o=t.count=(t.$list=ce.toArray(this.$container.children)).length),this._axesInst=new ee({flick:{range:[0,t.size*(o-1)],bounce:a}},{easing:e.panelEffect,deceleration:e.deceleration,interruptable:!1}),this._setDefaultPanel(e.defaultIndex)},e._setPadding=function(t,e){var n=this.$wrapper,i=this.options.horizontal,r=this._conf.panel,s={};!t.reduce(function(t,e){return parseFloat(t)+parseFloat(e)})&&e||(i&&t.reverse(),s.padding=(i?"0 ":"")+t.map(function(t){return isNaN(t)?t:t+"px"}).join(" 0 ")),e&&(s.overflow="hidden",s.boxSizing="border-box"),Object.keys(s).length&&ce.css(n,s);var o=i?["Left","Right"]:["Top","Bottom"],a=Math.max(n["offset"+(i?"Width":"Height")],ce.css(n,i?"width":"height",!0));r.size=a-(ce.css(n,"padding"+o[0],!0)+ce.css(n,"padding"+o[1],!0))},e._addClonePanels=function(){var t,e=this,n=this._conf.panel,i=n.origCount,r=n.minCount-i,s=n.$list;if(this.options.circular&&i<n.minCount){for(t=s.map(function(t){return t.cloneNode(!0)});t.length<r;)t=t.concat(s.map(function(t){return t.cloneNode(!0)}));return t.forEach(function(t){return e.$container.appendChild(t)}),!!t.length}return!1},e._movePanelPosition=function(t,e){var n=this._conf.panel,i=n.$list,r=i.splice(e?0:n.count-t,t);n.$list=e?i.concat(r):r.concat(i)},e._setDefaultPanel=function(t){var e,n,i=this._conf.panel,r=i.count-1;this.options.circular?(0<t&&t<=r&&this._movePanelPosition(t,!0),n=this._getBasePositionIndex(),this._movePanelPosition(n,!1),this._setPanelNo({no:t,currNo:t})):0<t&&t<=r&&(this._setPanelNo({index:t,no:t,currIndex:t,currNo:t}),e=[-i.size*t,0],this._setTranslate(e),this._setAxes("setTo",Math.abs(e[0]),0))},e._arrangePanels=function(t,e){var n,i=this._conf,r=i.panel,s=i.touch,o=i.dirData;this.options.circular&&(i.customEvent.flick=!1,t&&(e&&(s.direction=o[+!(0<e)]),this._arrangePanelPosition(s.direction,e)),n=this._getBasePositionIndex(),this._setPanelNo({index:n,currIndex:n}),i.customEvent.flick=!!this._setAxes("setTo",r.size*r.index,0)),this._applyPanelsPos()},e._applyPanelsPos=function(){this._conf.panel.$list.forEach(this._applyPanelsCss.bind(this))},e._setMoveStyle=function(t,e){var i=pe,r=this._conf.useLayerHack;this._setMoveStyle=i.support?function(t,e){var n;ce.css(t,((n={})[i.name]=ce.translate(e[0],e[1],r),n))}:function(t,e){ce.css(t,{left:e[0],top:e[1]})},this._setMoveStyle(t,e)},e._applyPanelsCss=function(){var t=this._conf,e="__dummy_anchor",n=this.options.useTranslate;this._applyPanelsCss=n?function(t,e){var n=this._getDataByDirection([pe.support?100*e+"%":this._conf.panel.size*e+"px",0]);this._setMoveStyle(t,n)}:(me&&(t.$dummyAnchor=ce.$("."+e),!t.$dummyAnchor&&this.$wrapper.appendChild(t.$dummyAnchor=ce.$('<a href="javascript:void(0)" class="'+e+'" style="position:absolute;height:0px;width:0px">'))),function(t,e){var n=this._getDataByDirection([this._conf.panel.size*e+"px",0]);ce.css(t,{left:n[0],top:n[1]})})},e._adjustContainerCss=function(t,e){var n,i=this._conf,r=i.panel,s=this.options,o=s.useTranslate,a=s.horizontal,u=s.previewPadding[0],h=this.$container,c=e;if(!o)if(c||(c=-r.size*r.index),"start"===t)h=h.style,n=parseFloat(h[a?"left":"top"]),a?n&&(h.left="0px"):n!==u&&(h.top="0px"),this._setTranslate([-c,0]);else if("end"===t){var l;c=this._getCoordsValue([c,0]),ce.css(h,((l={left:c.x,top:c.y})[pe.name]=ce.translate(0,0,i.useLayerHack),l)),i.$dummyAnchor&&i.$dummyAnchor.focus()}},e._setAxes=function(t,e,n){return this._axesInst[t]({flick:e},n)},e._setHint=function(){var t={willChange:"transform"};ce.css(this.$container,t),ce.css(this._conf.panel.$list,t)},e._getDataByDirection=function(t){var e=t.concat();return!this.options.horizontal&&e.reverse(),e},e._arrangePanelPosition=function(t,e){var n=t===this._conf.dirData[0];this._movePanelPosition(Math.abs(e||1),n)},e._getBasePositionIndex=function(){return Math.floor(this._conf.panel.count/2-.1)},e._bindEvents=function(t){var e=this.options,n=this.$wrapper,i=this._axesInst;t?(this._panInput=new ue(n,{inputType:e.inputType,thresholdAngle:e.thresholdAngle,scale:this._getDataByDirection([-1,0])}),i.on({hold:this._holdHandler.bind(this),change:this._changeHandler.bind(this),release:this._releaseHandler.bind(this),animationStart:this._animationStartHandler.bind(this),animationEnd:this._animationEndHandler.bind(this)}).connect(this._getDataByDirection(["flick",""]),this._panInput)):(this.disableInput(),i.off())},e._setAdaptiveHeight=function(t){var e,n,i=this._conf,r=i.indexToMove,s=0===r?this["get"+((t===ee.DIRECTION_LEFT?"Next":t===ee.DIRECTION_RIGHT&&"Prev")||"")+"Element"]():i.panel.$list[i.panel.currIndex+r],o=s.querySelector(":first-child");o&&((n=o.getAttribute(ve))||(e=s.children,0<(n=ce.outerHeight(1<e.length?(s.style.height="auto",s):o))&&o.setAttribute(ve,n)),0<n&&(this.$wrapper.style.height=n+"px"))},e._triggerBeforeRestore=function(t){var e=this._conf,n=e.touch;n.direction=+e.dirData.join("").replace(n.direction,""),e.customEvent.restore=this._triggerEvent(fe.beforeRestore,{depaPos:t.depaPos.flick,destPos:t.destPos.flick}),e.customEvent.restore||("stop"in t&&t.stop(),e.panel.animating=!1)},e._triggerRestore=function(){var t=this._conf.customEvent;t.restore&&this._triggerEvent(fe.restore),t.restore=t.restoreCall=!1},e._setPhaseValue=function(t,e){var n=this._conf,i=this.options,r=n.panel,s=i.useTranslate;if("start"===t&&(r.changed=this._isMovable())){if(!this._triggerEvent(fe.beforeFlickStart,e))return r.changed=r.animating=!1,!1;i.adaptiveHeight&&this._setAdaptiveHeight(n.touch.direction),0===n.indexToMove&&this._setPanelNo()}else"end"===t&&(i.circular&&r.changed&&this._arrangePanels(!0,n.indexToMove),s&&this._setTranslate([-r.size*r.index,0]),n.touch.distance=n.indexToMove=0,r.changed&&this._triggerEvent(fe.flickEnd));return this._adjustContainerCss(t),!0},e._getNumByDirection=function(){var t=this._conf;return t.touch.direction===t.dirData[0]?1:-1},e._revertPanelNo=function(){var t=this._conf.panel,e=this._getNumByDirection(),n=0<=t.currIndex?t.currIndex:t.index-e,i=0<=t.currNo?t.currNo:t.no-e;this._setPanelNo({index:n,no:i})},e._setPanelNo=function(t){var e=this._conf.panel,n=e.origCount-1,i=this._getNumByDirection();if(ce.isObject(t))for(var r in t)e[r]=t[r];else e.currIndex=e.index,e.currNo=e.no,e.index+=i,e.no+=i;e.no>n?e.no=0:e.no<0&&(e.no=n)},e._setPointerEvents=function(t){var e,n=this.$container,i=ce.css(n,"pointerEvents");t&&t.holding&&t.inputEvent&&t.inputEvent.preventSystemEvent&&"none"!==i?e="none":t||"auto"===i||(e="auto"),e&&ce.css(n,{pointerEvents:e})},e._getCoordsValue=function(t){var e=this._getDataByDirection(t);return{x:ce.getUnitValue(e[0]),y:ce.getUnitValue(e[1])}},e._setTranslate=function(t){var e=this._getCoordsValue(t);this._setMoveStyle(this.$container,[e.x,e.y])},e._isMovable=function(){var t,e,n=this.options,i=this._axesInst,r=Math.abs(this._conf.touch.distance)>=n.threshold;return!(!n.circular&&r&&(t=i.axis.flick.range[1],(e=i.get().flick)<0||t<e))&&r},e._triggerEvent=function(t,e){var n=this._conf,i=n.panel;return t===fe.flickEnd&&(i.currNo=i.no,i.currIndex=i.index),this.trigger(n.eventPrefix+t,ce.extend({eventType:t,no:i.currNo,direction:n.touch.direction,isTrusted:n.touch.isTrusted},e))},e._getElement=function(t,e,n){var i,r,s=this._conf.panel,o=this.options.circular,a=s.currIndex,u=t===this._conf.dirData[0],h=null,c=r=n?(i=s.count,a):(i=s.origCount,s.currNo);return u?r<i-1?r++:o&&(r=0):0<r?r--:o&&(r=i-1),c!==r&&(h=e?s.$list[u?a+1:a-1]:r),h},e._setValueToMove=function(t){var e=this._conf;e.touch.distance=this.options.threshold+1,e.touch.direction=e.dirData[+!t]},e.getIndex=function(t){return this._conf.panel[t?"currIndex":"currNo"]},e.getElement=function(){var t=this._conf.panel;return t.$list[t.currIndex]},e.getNextElement=function(){return this._getElement(this._conf.dirData[0],!0)},e.getNextIndex=function(t){return this._getElement(this._conf.dirData[0],!1,t)},e.getAllElements=function(){return this._conf.panel.$list},e.getPrevElement=function(){return this._getElement(this._conf.dirData[1],!0)},e.getPrevIndex=function(t){return this._getElement(this._conf.dirData[1],!1,t)},e.isPlaying=function(){return this._conf.panel.animating},e._movePanelByPhase=function(t,e,n){var i=ce.getNumValue(n,this.options.duration);!1!==this._setPhaseValue("start")&&(this._setAxes(t,e,i),!i&&this._setPhaseValue("end"))},e.next=function(t){var e=this.getNextIndex();return"number"!=typeof e?this:this.moveTo(e,t)},e.prev=function(t){var e=this.getPrevIndex();return"number"!=typeof e?this:this.moveTo(e,t)},e.moveTo=function(t,e){var n,i,r=this._conf,s=r.panel,o=this.options.circular,a=s.index,u=t;return(u=ce.getNumValue(u,-1))<0||u>=s.origCount||u===s.no||s.animating||r.touch.holding||(i=0<(n=u-(o?s.no:a)),o&&Math.abs(n)>(i?s.count-(a+1):a)&&(i=0<(n+=(i?-1:1)*s.count)),this._setPanelNo(o?{no:u}:{no:u,index:u}),this._conf.indexToMove=n,this._setValueToMove(i),this._movePanelByPhase(o?"setBy":"setTo",s.size*(o?n:u),e)),this},e.resize=function(){var t,e=this._conf,n=this.options,i=e.panel,r=n.horizontal,s=n.useTranslate;if(!this.isPlaying()){var o;if(ce.isArray(n.previewPadding)&&"number"==typeof+n.previewPadding.join("")?(this._setPadding(n.previewPadding.concat()),t=i.size):r&&(t=i.size=ce.css(this.$wrapper,"width",!0)),ce.css(i.$list,((o={})[r?"width":"height"]=ce.getUnitValue(t),o)),n.adaptiveHeight){var a=this.$container.querySelectorAll("["+ve+"]");a.length&&(ce.toArray(a).forEach(function(t){return t.removeAttribute(ve)}),this._setAdaptiveHeight())}this._axesInst.axis.flick.range=[0,t*(i.count-1)],this._setAxes("setTo",t*i.index,0),s||(this._applyPanelsPos(),this._adjustContainerCss("end"))}return this},e.restore=function(t){var e,n=this._conf,i=n.panel,r=this._axesInst.get().flick,s=t;return r!==i.currIndex*i.size?(n.customEvent.restoreCall=!0,s=ce.getNumValue(s,this.options.duration),this._revertPanelNo(),e=i.size*i.index,this._triggerBeforeRestore({depaPos:r,destPos:e}),this._setAxes("setTo",e,s),s||(this._adjustContainerCss("end"),this._triggerRestore())):i.changed&&(this._revertPanelNo(),n.touch.distance=n.indexToMove=0),this},e.enableInput=function(){return this._panInput.enable(),this},e.disableInput=function(){return this._panInput.disable(),this},e.getStatus=function(t){var e=this._conf.panel,n=/((?:-webkit-)?transform|left|top|will-change|box-sizing|width):[^;]*;/g,i={panel:{index:e.index,no:e.no,currIndex:e.currIndex,currNo:e.currNo},$list:e.$list.map(function(t){return{style:t.style.cssText.replace(n,"").trim(),className:t.className,html:t.innerHTML}})};return t?JSON.stringify(i):i},e.setStatus=function(t){var e=this._conf.panel,n=this.options.adaptiveHeight,o="string"==typeof t?JSON.parse(t):t;if(o){for(var i in o.panel)i in e&&(e[i]=o.panel[i]);e.$list.forEach(function(t,e){var n=o.$list[e],i=n.style,r=n.className,s=n.html;i&&(t.style.cssText+=i),r&&(t.className=r),s&&(t.innerHTML=s)}),n&&this._setAdaptiveHeight()}},e.destroy=function(){var e=this,t=this._conf.origPanelStyle,n=t.wrapper,i=t.container,r=t.list;this._bindEvents(!1),this.off(),this._axesInst.destroy(),this._panInput.destroy();var s=this.$wrapper;s.setAttribute("class",n.className),s[n.style?"setAttribute":"removeAttribute"]("style",n.style);var o=this.$container,a=[].slice.call(o.children);t.container.className?(o.setAttribute("class",i.className),o[i.style?"setAttribute":"removeAttribute"]("style",i.style)):(a.forEach(function(t){return s.appendChild(t)}),o.parentNode.removeChild(o));for(var u,h=0;u=a[h];h++)if(h>r.length-1)u.parentNode.removeChild(u);else{var c=r[h].className,l=r[h].style;u[c?"setAttribute":"removeAttribute"]("class",c),u[l?"setAttribute":"removeAttribute"]("style",l)}for(var f in this.plugins.forEach(function(t){e.plugins[t].$componentWillUnmount()}),this)this[f]=null},e.plugin=function(t){var n=this;return t.forEach(function(e){0===n.plugins.filter(function(t){return t.constructor===e.constructor}).length&&n.plugins.push(e.$componentWillMount(n))}),this},t}((t=n,new le(t)).with(_e));return e.utils=ce,e.VERSION="2.4.2",e.consts={EVENTS:fe,TRANSFORM:pe,SUPPORT_WILLCHANGE:de,IS_ANDROID2:me},e.DIRECTION_NONE=ee.DIRECTION_NONE,e.DIRECTION_LEFT=ee.DIRECTION_LEFT,e.DIRECTION_RIGHT=ee.DIRECTION_RIGHT,e.DIRECTION_UP=ee.DIRECTION_UP,e.DIRECTION_DOWN=ee.DIRECTION_DOWN,e.DIRECTION_HORIZONTAL=ee.DIRECTION_HORIZONTAL,e.DIRECTION_VERTICAL=ee.DIRECTION_VERTICAL,e.DIRECTION_ALL=ee.DIRECTION_ALL,e}()}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.eg=t.eg||{},t.eg.Flicking=e())}(this,function(){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function a(t){return void 0===t}var n=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],s=0;e.stop=function(){i=!0},e.currentTarget=this;for(var o=arguments.length,a=new Array(2<o?o-2:0),u=2;u<o;u++)a[u-2]=arguments[u];for(1<=a.length&&(r=r.concat(a)),s=0;n[s];s++)n[s].apply(this,r);return!i},e.once=function(r,s){if("object"==typeof r&&a(s)){var t,e=r;for(t in e)this.once(t,e[t]);return this}if("string"==typeof r&&"function"==typeof s){var o=this;this.on(r,function t(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];s.apply(o,n),o.off(r,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&a(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}if("string"==typeof t&&"function"==typeof e){var r=this._eventHandler[t];a(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)}return this},e.off=function(t,e){if(a(t))return this._eventHandler={},this;if(a(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,i=t;for(n in i)this.off(n,i[n]);return this}var r,s,o=this._eventHandler[t];if(o)for(r=0;void 0!==(s=o[r]);r++)if(s===e){o=o.splice(r,1);break}return this},t}();return t.VERSION="2.1.2",t}();function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h,c="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,l=["","webkit","Moz","MS","ms","o"],t="undefined"==typeof document?{style:{}}:document.createElement("div"),f="function",p=Math.round,E=Math.abs,T=Date.now;function d(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<l.length;){if((i=(n=l[s])?n+r:e)in t)return i;s++}}h="undefined"==typeof window?{}:window;var m=d(t.style,"touchAction"),v=void 0!==m;var g="compute",_="auto",y="manipulation",x="none",P="pan-x",b="pan-y",I=function(){if(!v)return!1;var e={},n=h.CSS&&h.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||h.CSS.supports("touch-action",t)}),e}(),C="ontouchstart"in h,A=void 0!==d(h,"PointerEvent"),O=C&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),w="touch",N="mouse",D=25,R=1,M=4,S=8,z=1,H=2,k=4,$=8,j=16,F=H|k,L=$|j,X=F|L,Y=["x","y"],V=["clientX","clientY"];function B(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function W(t,e){return typeof t===f?t.apply(e&&e[0]||void 0,e):t}function q(t,e){return-1<t.indexOf(e)}var U=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===g&&(t=this.compute()),v&&this.manager.element.style&&I[t]&&(this.manager.element.style[m]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[];return B(this.manager.recognizers,function(t){W(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(q(t,x))return x;var e=q(t,P),n=q(t,b);return e&&n?x:e||n?e?P:b:q(t,y)?y:_}(e.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=q(i,x)&&!I[x],s=q(i,b)&&!I[b],o=q(i,P)&&!I[P];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}if(!o||!s)return r||s&&n&F||o&&n&L?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function G(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Z(t){var e=t.length;if(1===e)return{x:p(t[0].clientX),y:p(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:p(n/e),y:p(i/e)}}function J(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:p(t.pointers[n].clientX),clientY:p(t.pointers[n].clientY)},n++;return{timeStamp:T(),pointers:e,center:Z(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Q(t,e,n){n||(n=Y);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function K(t,e,n){n||(n=Y);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function tt(t,e){return t===e?z:E(t)>=E(e)?t<0?H:k:e<0?$:j}function et(t,e,n){return{x:e/t||0,y:n/t||0}}function nt(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=J(e)),1<r&&!n.firstMultiple?n.firstMultiple=J(e):1===r&&(n.firstMultiple=!1);var s,o,a,u,h,c,l=n.firstInput,f=n.firstMultiple,p=f?f.center:l.center,d=e.center=Z(i);e.timeStamp=T(),e.deltaTime=e.timeStamp-l.timeStamp,e.angle=K(p,d),e.distance=Q(p,d),s=n,a=(o=e).center,u=s.offsetDelta||{},h=s.prevDelta||{},c=s.prevInput||{},o.eventType!==R&&c.eventType!==M||(h=s.prevDelta={x:c.deltaX||0,y:c.deltaY||0},u=s.offsetDelta={x:a.x,y:a.y}),o.deltaX=h.x+(a.x-u.x),o.deltaY=h.y+(a.y-u.y),e.offsetDirection=tt(e.deltaX,e.deltaY);var m,v,g,_,y=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=y.x,e.overallVelocityY=y.y,e.overallVelocity=E(y.x)>E(y.y)?y.x:y.y,e.scale=f?(m=f.pointers,Q((v=i)[0],v[1],V)/Q(m[0],m[1],V)):1,e.rotation=f?(g=f.pointers,K((_=i)[1],_[0],V)+K(g[1],g[0],V)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(e.eventType!==S&&(D<a||void 0===o.velocity)){var u=e.deltaX-o.deltaX,h=e.deltaY-o.deltaY,c=et(a,u,h);i=c.x,r=c.y,n=E(c.x)>E(c.y)?c.x:c.y,s=tt(u,h),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var x=t.element;G(e.srcEvent.target,x)&&(x=e.srcEvent.target),e.target=x}function it(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=e&R&&i-r==0,o=e&(M|S)&&i-r==0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,nt(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function rt(t){return t.trim().split(/\s+/g)}function st(e,t,n){B(rt(t),function(t){e.addEventListener(t,n,!1)})}function ot(e,t,n){B(rt(t),function(t){e.removeEventListener(t,n,!1)})}function at(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var e=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){W(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&st(this.element,this.evEl,this.domHandler),this.evTarget&&st(this.target,this.evTarget,this.domHandler),this.evWin&&st(at(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(at(this.element),this.evWin,this.domHandler)},t}();function ut(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}var ht={pointerdown:R,pointermove:2,pointerup:M,pointercancel:S,pointerout:S},ct={2:w,3:"pen",4:N,5:"kinect"},lt="pointerdown",ft="pointermove pointerup pointercancel";h.MSPointerEvent&&!h.PointerEvent&&(lt="MSPointerDown",ft="MSPointerMove MSPointerUp MSPointerCancel");var pt=function(n){function i(){var t,e=i.prototype;return e.evEl=lt,e.evWin=ft,(t=n.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return o(i,n),i.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=ht[i],s=ct[t.pointerType]||t.pointerType,o=s===w,a=ut(e,t.pointerId,"pointerId");r&R&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):r&(M|S)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))},i}(e);function dt(t){return Array.prototype.slice.call(t,0)}function mt(t,n,e){for(var i=[],r=[],s=0;s<t.length;){var o=n?t[s][n]:t[s];ut(r,o)<0&&i.push(t[s]),r[s]=o,s++}return e&&(i=n?i.sort(function(t,e){return t[n]>e[n]}):i.sort()),i}var vt={touchstart:R,touchmove:2,touchend:M,touchcancel:S},gt=function(t){function e(){return e.prototype.evTarget="touchstart touchmove touchend touchcancel",e.prototype.targetIds={},t.apply(this,arguments)||this}return o(e,t),e.prototype.handler=function(t){var e=vt[t.type],n=function(t,e){var n,i,r=dt(t.touches),s=this.targetIds;if(e&(2|R)&&1===r.length)return s[r[0].identifier]=!0,[r,r];var o=dt(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return G(t.target,u)}),e===R)for(n=0;n<i.length;)s[i[n].identifier]=!0,n++;n=0;for(;n<o.length;)s[o[n].identifier]&&a.push(o[n]),e&(M|S)&&delete s[o[n].identifier],n++;return a.length?[mt(i.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:w,srcEvent:t})},e}(e);var _t={mousedown:R,mousemove:2,mouseup:M},yt=function(n){function i(){var t,e=i.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(t=n.apply(this,arguments)||this).pressed=!1,t}return o(i,n),i.prototype.handler=function(t){var e=_t[t.type];e&R&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=M),this.pressed&&(e&M&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:N,srcEvent:t}))},i}(e),xt=2500,Et=25;function Tt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout(function(){var t=i.indexOf(n);-1<t&&i.splice(t,1)},xt)}}var Pt=function(){return function(n){function t(t,e){var s;return r(u(u(s=n.call(this,t,e)||this)),"handler",function(t,e,n){var i=n.pointerType===w,r=n.pointerType===N;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&R?(this.primaryTouch=e.changedPointers[0].identifier,Tt.call(this,e)):t&(M|S)&&Tt.call(this,e)}).call(u(u(s)),e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=Et&&o<=Et)return!0}return!1}.call(u(u(s)),n))return;s.callback(t,e,n)}}),s.touch=new gt(s.manager,s.handler),s.mouse=new yt(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}return o(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(e)}();function bt(t,e,n){return!!Array.isArray(t)&&(B(t,n[e],n),!0)}var It=1;function Ct(t,e){var n=e.manager;return n?n.get(t):t}function At(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Ot=function(){function t(t){void 0===t&&(t={}),this.options=s({enable:!0},t),this.id=It++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(bt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Ct(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return bt(t,"dropRecognizeWith",this)||(t=Ct(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(bt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ut(e,t=Ct(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(bt(t,"dropRequireFailure",this))return this;t=Ct(t,this);var e=ut(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+At(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+At(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=c({},t);if(!W(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),wt={domEvents:!1,touchAction:g,enable:!0,inputTarget:null,inputClass:null,preset:[],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Nt(n,i){var r,s=n.element;s.style&&(B(n.options.cssProps,function(t,e){r=d(s.style,e),s.style[r]=i?(n.oldCssProps[r]=s.style[r],t):n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var Dt=function(){function t(t,e){var n,i=this;this.options=c({},wt,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(A?pt:O?gt:C?Pt:yt))(n,it),this.touchAction=new U(this,this.options.touchAction),Nt(this,!0),B(this.options.recognizers,function(t){var e=i.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},e.get=function(t){if(t instanceof Ot)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(bt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(bt(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,i=ut(n,e);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return B(rt(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return B(rt(t),function(t){e?n[t]&&n[t].splice(ut(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](e),o++}},e.destroy=function(){this.element&&Nt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Rt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,s({pointers:1},t))||this}o(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(n&S||!r)?16|e:i||r?n&M?8|e:2&e?4|e:2:32},t}(Ot);function Mt(t){return t===j?"down":t===$?"up":t===H?"left":t===k?"right":""}var St=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this,s({event:"pan",threshold:10,pointers:1,direction:X},t))||this).pX=null,e.pY=null,e}o(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return t&F&&e.push(b),t&L&&e.push(P),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(i=e.direction&F?(r=0===s?z:s<0?H:k,n=s!==this.pX,Math.abs(t.deltaX)):(r=0===o?z:o<0?$:j,n=o!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Rt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Mt(t.direction);e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Rt);var zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var Ht=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};function kt(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)}function $t(t,e){return t<e[0]||t>e[1]}function jt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Ft(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&s<t&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}function Lt(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0}var Xt,Yt=function(){function t(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}var e=t.prototype;return e._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=Ht({range:[0,100],bounce:[0,0],circular:[!1,!1]},r.axis[i]),["bounce","circular"].forEach(function(t){var e=r.axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},e.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):Ht({},this._pos,t||{})},e.moveTo=function(n){var i=this,t=this.map(this._pos,function(t,e){return n[e]?n[e]-i._pos[e]:0});return this.set(n),{pos:Ht({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},e.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},e.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!$t(t,n.range)})},t}();(Xt="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document;function Vt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var Bt=Xt.requestAnimationFrame||Xt.webkitRequestAnimationFrame,Wt=Xt.cancelAnimationFrame||Xt.webkitCancelAnimationFrame;if(Bt&&!Wt){var qt={},Ut=Bt;Bt=function(e){var n=Ut(function(t){qt[n]&&e(t)});return qt[n]=!0,n},Wt=function(t){delete qt[t]}}else Bt&&Wt||(Bt=function(t){return Xt.setTimeout(function(){t(Xt.performance&&Xt.performance.now&&Xt.performance.now()||(new Date).getTime())},16)},Wt=Xt.clearTimeout);function Gt(t,e,n){return Math.max(Math.min(t,n),e)}var Zt=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=this.axm.map(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(s[e])),i=o.options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return Gt(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:Gt(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return Ft(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&(r=this._raf,Wt(r)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var r},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return jt(t,n.range,n.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e,n){return Ft(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},e.animateLoop=function(e,n){if(this._animateParam=Ht({},e),this._animateParam.startTime=(new Date).getTime(),e.duration){var i=this._animateParam,r=this;!function t(){if(r._raf=null,1<=r.frame(i))return Lt(e.destPos,r.axm.get(Object.keys(e.destPos)))||r.em.triggerChange(e.destPos),void n();r._raf=Bt(t)}()}else this.em.triggerChange(e.destPos),n()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=Gt(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,r=this.createAnimationParam(t,e,n),s=Ht({},r.depaPos),o=this.em.triggerAnimationStart(r),a=this.getUserControll(r);if(!o&&this.axm.every(a.destPos,function(t,e,n){return jt(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!Lt(a.destPos,s)){var u=n&&n.event||null;this.animateLoop({depaPos:s,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(s,a.destPos),isTrusted:!!u,inputEvent:u,input:n&&n.input||null},function(){return i.animationEnd()})}},e.frame=function(i){var t=(new Date).getTime()-i.startTime,r=this.easing(t/i.duration),e=i.depaPos;return e=this.axm.map(e,function(t,e,n){return Ft(t+=i.delta[e]*r,n.range,n.circular)}),this.em.triggerChange(e),r},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,i){void 0===i&&(i=0);var e=Object.keys(t);this.grab(e);var n=this.axm.get(e);if(Lt(t,n))return this;this.itm.setInterrupt(!0);var r=this.axm.filter(t,function(t,e){return n[e]!==t});return Object.keys(r).length&&(Lt(r=this.axm.map(r,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?0<i?t:Ft(t,n.range,n.circular):kt(t,n.range,n.circular)}),n)||(0<i?this.animateTo(r,i):(this.em.triggerChange(r),this.itm.setInterrupt(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(this.axm.map(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),Jt=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:Ht({},t),duration:e};return function(t,e){return t&&(n.destPos=Ht({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),Qt=function(){function t(t){this.options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this.options.interruptable||this._prevented},e.isInterrupted=function(){return!this.options.interruptable&&this._prevented},e.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},t}(),Kt=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}var e=t.prototype;return e.atOutside=function(t){var o=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return r<t?r:t<i?i:t});var a=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e,n){var i=n.range[0],r=n.range[1],s=n.bounce;return t<i?i-o.am.easing((i-t)/(s[0]*a))*s[0]:r<t?r+o.am.easing((t-r)/(s[1]*a))*s[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return Ft(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!$t(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},e.release=function(t,e,n,i){if(this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(t.axes),s=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?r[e]+t:kt(r[e]+t,n.range,n.circular,n.bounce)})),a=this.am.getDuration(o,r,i);0===a&&(o=Ht({},s));var u={depaPos:s,destPos:o,duration:a,delta:this.axm.getDelta(s,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(u),this.moveDistance=null;var h=this.am.getUserControll(u),c=Lt(h.destPos,s),l={input:t,event:e};c||0===h.duration?(!c&&this.em.triggerChange(h.destPos,l,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(l):this.em.triggerFinish(!0)):this.am.animateTo(h.destPos,h.duration,l)}},t}(),te=function(){if("undefined"==typeof document)return"";for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}(),ee=function(r){function t(t,e,n){void 0===t&&(t={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=Ht({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new Qt(i.options),i.axm=new Yt(i.axis,i.options),i.em=new Jt(i),i.am=new Zt(i),i.io=new Kt(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}zt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.7-snapshot",t.TRANSFORM=te,t.DIRECTION_NONE=z,t.DIRECTION_LEFT=H,t.DIRECTION_RIGHT=k,t.DIRECTION_UP=$,t.DIRECTION_DOWN=j,t.DIRECTION_HORIZONTAL=F,t.DIRECTION_VERTICAL=L,t.DIRECTION_ALL=X,t}(n),ne="PointerEvent"in Xt||"MSPointerEvent"in Xt,ie="ontouchstart"in Xt,re="_EGJS_AXES_INPUTTYPE_";function se(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function oe(t,e,n){return n?!!(e===X||e&t&&n&t):!!(e&t)}var ae,ue=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===Dt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;if(void 0===n&&(n=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var r=document.createElement("div");r.innerHTML=t,i=Vt(r.childNodes)}else i=Vt(document.querySelectorAll(t));n||(i=1<=i.length?i[0]:void 0)}else t===Xt?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in Xt&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)):i=t;return i}(t),this.options=Ht({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?X:e?F:n?L:z,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[re];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=function(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=ie;break;case"pointer":i=ne}}),i?pt:e&&n?Pt:e?gt:n?yt:null}(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new Dt(t,Ht({},e))}catch(t){return null}}(this.element,Ht({inputClass:i},this.options.hammerManagerOptions)),this.element[re]=n}return this.panRecognizer=new St(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=z,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[re],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return z;var n=Math.abs(t);return e<n&&n<180-e?L:F}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[oe(F,this._direction,e),oe(L,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=r)&&this.observer.change(this,t,se(this.axes,i))},e.onPanend=function(t){var e,n,i,r,s=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[oe(F,this._direction),oe(L,this._direction)]);e=s,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=Math.abs(i/-n),s=[e[0]/2*r,e[1]/2*r],this.observer.release(this,t,se(this.axes,s))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),he=(ae="undefined"==typeof window?{document:{},navigator:{userAgent:""}}:window).document,ce={$:function(t){var n=null;if("string"==typeof t){var e=t.match(/^<([a-z]+)\s*([^>]*)>/);e?(n=he.createElement(e[1]),3===e.length&&e[2].split(" ").forEach(function(t){var e=t.split("=");n.setAttribute(e[0],e[1].trim().replace(/(^["']|["']$)/g,""))})):(n=he.querySelectorAll(t)).length?1===n.length&&(n=n[0]):n=null}else t.nodeName&&1===t.nodeType&&(n=t);return n},toArray:function(t){return[].slice.call(t)},isArray:function(t){return t&&t.constructor===Array},isObject:function(t){return t&&!t.nodeType&&"object"==typeof t&&!this.isArray(t)},extend:function(n){for(var i=this,t=arguments.length,e=new Array(1<t?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];if(!e.length||1===e.length&&!e[0])return n;var s=e.shift();return this.isObject(n)&&this.isObject(s)&&Object.keys(s).forEach(function(t){var e=s[t];i.isObject(e)?(!n[t]&&(n[t]={}),n[t]=i.extend(n[t],e)):n[t]=i.isArray(e)?e.concat():e}),this.extend.apply(this,[n].concat(e))},css:function(t,e,n){if("string"==typeof e){var i=t.style[e];return(!i||"auto"===i||/\d/.test(i)&&!/\d(px)?$/.test(i))&&(i=ae.getComputedStyle(t)[e]),n?this.getNumValue(i):i}var r=function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]})};return this.isArray(t)?t.forEach(function(t){return r(t.style,e)}):r(t.style,e),t},classList:function(t,e,n){var i,r="boolean"==typeof n;return t.classList?i=t.classList[r&&(n?"add":"remove")||"contains"](e):(i=t.className,r?n&&-1===i.indexOf(e)?i=t.className=(i+" "+e).replace(/\s{2,}/g," "):n||(i=t.className=i.replace(e,"")):i=new RegExp("\\b"+e+"\\b").test(i)),i},getNumValue:function(t,e){var n=t;return isNaN(n=parseFloat(n))?e:n},getUnitValue:function(t){return(parseFloat(t)||0)+(String(t).match(/(?:[a-z]{2,}|%)$/)||"px")},getOuter:function(n,t){var i=this,r=0;return("outerWidth"===t?["Left","Right"]:["Top","Bottom"]).forEach(function(e){["padding","margin"].forEach(function(t){r+=i.css(n,""+t+e,!0)})}),this.css(n,t.replace("outer","").toLocaleLowerCase(),!0)+r},outerWidth:function(t){return this.getOuter(t,"outerWidth")},outerHeight:function(t){return this.getOuter(t,"outerHeight")},translate:function(t,e,n){return n?"translate3d("+t+","+e+",0)":"translate("+t+","+e+")"},hasClickBug:function(){var t=ae.navigator.userAgent,e=/iPhone|iPad/.test(t);return this.hasClickBug=function(){return e},e}},le=function(){function t(t){this.superclass=t||function(){return function(){}}()}return t.prototype.with=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(function(t,e){return e(t)},this.superclass)},t}(),fe={beforeFlickStart:"beforeFlickStart",beforeRestore:"beforeRestore",flick:"flick",flickEnd:"flickEnd",restore:"restore"},pe={name:"transform"};pe.support=function(){if(!he.documentElement)return!1;var t=he.documentElement.style;return pe.name in t||(pe.name="webkitTransform")in t}();var de=ae.CSS&&ae.CSS.supports&&ae.CSS.supports("will-change","transform"),me=/Android 2\./.test(ae.navigator.userAgent),ve="data-height",ge={panel:{$list:null,index:0,no:0,currIndex:0,currNo:0,size:0,count:0,origCount:0,changed:!1,animating:!1,minCount:3},touch:{holdPos:0,destPos:0,distance:0,direction:null,lastPos:0,holding:!1,isTrusted:!1},customEvent:{flick:!0,restore:!1,restoreCall:!1},dirData:[],indexToMove:0,$dummyAnchor:null},_e={hwAccelerable:!0,prefix:"eg-flick",deceleration:6e-4,horizontal:!0,circular:!1,previewPadding:null,bounce:null,threshold:40,duration:100,panelEffect:function(t){return 1-Math.pow(1-t,3)},defaultIndex:0,inputType:["touch","mouse"],thresholdAngle:45,adaptiveHeight:!1,zIndex:2e3,useTranslate:!0},ye=function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n._holdHandler=function(t){var e=this._conf,n=e.touch,i=t.pos.flick;n.holdPos=i,n.holding=!0,n.isTrusted=!0,e.panel.changed=!1,this._adjustContainerCss("start",i)},n._changeHandler=function(t){var e,n,i=this._conf,r=i.touch,s=t.pos.flick,o=r.holdPos,a=null;this._setPointerEvents(t),t.inputEvent?(e=t.inputEvent.direction,n=t.inputEvent[this.options.horizontal?"deltaX":"deltaY"],~i.dirData.indexOf(e)||(e=i.dirData[+(Math.abs(r.lastPos)<=n)]),r.lastPos=n):r.lastPos=null,i.customEvent.flick&&(a=this._triggerEvent(fe.flick,{pos:s,holding:t.holding,direction:e||r.direction,distance:r.isTrusted?s-o:null})),(a||null===a)&&this._setTranslate([-s,0])},n._releaseHandler=function(t){var e=this._conf,n=e.touch,i=n.holdPos,r=e.panel.size,s=e.customEvent,o=n.holdPos<t.depaPos.flick;n.distance=t.depaPos.flick-i,n.direction=e.dirData[+!o],n.destPos=i+(o?r:-r);var a=n.distance,u=this.options.duration,h=i;this._isMovable()?(!s.restoreCall&&(s.restore=!1),h=n.destPos):0<Math.abs(a)?this._triggerBeforeRestore(t):u=0,t.setTo({flick:h},u),0===a&&this._adjustContainerCss("end"),n.holding=!1,this._setPointerEvents()},n._animationStartHandler=function(t){var e=this._conf,n=e.panel,i=e.customEvent,r=t.inputEvent||e.touch.lastPos;!i.restoreCall&&r&&!1===this._setPhaseValue("start",{depaPos:t.depaPos.flick,destPos:t.destPos.flick})&&t.stop(),r&&(t.duration=this.options.duration,t.destPos.flick=n.size*(n.index+e.indexToMove)),n.animating=!0},n._animationEndHandler=function(){var t=this._conf;t.panel.animating=!1,this._setPhaseValue("end"),this._triggerRestore(),t.touch.isTrusted=!1},e}(t)};return function(){var t,e=function(s){function t(t,e,n){var i;(i=s.call(this)||this).$wrapper=ce.$(t),i.plugins=[];var r=i.$wrapper&&i.$wrapper.children;if(!i.$wrapper||!r||!r.length)throw new Error("Given base element doesn't exist or it hasn't proper DOM structure to be initialized.");return i._setOptions(e),i._setConfig(r,n),!ce.hasClickBug()&&(i._setPointerEvents=function(){}),i._build(),i._bindEvents(!0),i._applyPanelsCss(),i._arrangePanels(),i.options.hwAccelerable&&de&&i._setHint(),i.options.adaptiveHeight&&i._setAdaptiveHeight(),i._adjustContainerCss("end"),i}i(t,s);var e=t.prototype;return e._setOptions=function(t){var e={previewPadding:[0,0],bounce:[10,10]};for(var n in this.options=ce.extend(ce.extend({},_e),e,t),e){var i=this.options[n];/(number|string)/.test(typeof i)?i=[i,i]:ce.isArray(i)||(i=e[n]),this.options[n]=i}me&&(this.options.useTranslate=!1)},e._setConfig=function(t,e){var n=this.options,i=n.previewPadding,r=t;ce.classList(r[0],n.prefix+"-container")&&(r=r[0],r=(this.$container=r).children),r=ce.toArray(r);var s=this._conf=ce.extend(ce.extend({},ge),{panel:{$list:r,minCount:0<i[0]+i[1]?5:3},origPanelStyle:{wrapper:{className:this.$wrapper.getAttribute("class")||null,style:this.$wrapper.getAttribute("style")||null},container:{className:this.$container&&this.$container.getAttribute("class")||null,style:this.$container&&this.$container.getAttribute("style")||null},list:r.map(function(t){return{className:t.getAttribute("class")||null,style:t.getAttribute("style")||null}})},useLayerHack:n.hwAccelerable&&!de,eventPrefix:e||""});[["LEFT","RIGHT"],["UP","DOWN"]][+!n.horizontal].forEach(function(t){return s.dirData.push(ee["DIRECTION_"+t])})},e._build=function(){var t=this._conf.panel,e=this.options,n=t.$list,i=e.previewPadding.concat(),r=e.prefix,s=e.horizontal,o=t.count=t.origCount=n.length,a=e.bounce;this._setPadding(i,!0);var u=this._getDataByDirection([t.size,"100%"]),h={position:"relative",zIndex:e.zIndex||2e3,width:"100%",height:"100%"};if(s&&(h.top="0px"),this.$container)ce.css(this.$container,h);else{var c=n[0].parentNode,l=he.createElement("div");l.className=r+"-container",ce.css(l,h),n.forEach(function(t){return l.appendChild(t)}),c.appendChild(l),this.$container=l}n.forEach(function(t){ce.classList(t,r+"-panel",!0),ce.css(t,{position:"absolute",width:ce.getUnitValue(u[0]),height:ce.getUnitValue(u[1]),boxSizing:"border-box",top:0,left:0})}),this._addClonePanels()&&(o=t.count=(t.$list=ce.toArray(this.$container.children)).length),this._axesInst=new ee({flick:{range:[0,t.size*(o-1)],bounce:a}},{easing:e.panelEffect,deceleration:e.deceleration,interruptable:!1}),this._setDefaultPanel(e.defaultIndex)},e._setPadding=function(t,e){var n=this.$wrapper,i=this.options.horizontal,r=this._conf.panel,s={};!t.reduce(function(t,e){return parseFloat(t)+parseFloat(e)})&&e||(i&&t.reverse(),s.padding=(i?"0 ":"")+t.map(function(t){return isNaN(t)?t:t+"px"}).join(" 0 ")),e&&(s.overflow="hidden",s.boxSizing="border-box"),Object.keys(s).length&&ce.css(n,s);var o=i?["Left","Right"]:["Top","Bottom"],a=Math.max(n["offset"+(i?"Width":"Height")],ce.css(n,i?"width":"height",!0));r.size=a-(ce.css(n,"padding"+o[0],!0)+ce.css(n,"padding"+o[1],!0))},e._addClonePanels=function(){var t,e=this,n=this._conf.panel,i=n.origCount,r=n.minCount-i,s=n.$list;if(this.options.circular&&i<n.minCount){for(t=s.map(function(t){return t.cloneNode(!0)});t.length<r;)t=t.concat(s.map(function(t){return t.cloneNode(!0)}));return t.forEach(function(t){return e.$container.appendChild(t)}),!!t.length}return!1},e._movePanelPosition=function(t,e){var n=this._conf.panel,i=n.$list,r=i.splice(e?0:n.count-t,t);n.$list=e?i.concat(r):r.concat(i)},e._setDefaultPanel=function(t){var e,n,i=this._conf.panel,r=i.count-1;this.options.circular?(0<t&&t<=r&&this._movePanelPosition(t,!0),n=this._getBasePositionIndex(),this._movePanelPosition(n,!1),this._setPanelNo({no:t,currNo:t})):0<t&&t<=r&&(this._setPanelNo({index:t,no:t,currIndex:t,currNo:t}),e=[-i.size*t,0],this._setTranslate(e),this._setAxes("setTo",Math.abs(e[0]),0))},e._arrangePanels=function(t,e){var n,i=this._conf,r=i.panel,s=i.touch,o=i.dirData;this.options.circular&&(i.customEvent.flick=!1,t&&(e&&(s.direction=o[+!(0<e)]),this._arrangePanelPosition(s.direction,e)),n=this._getBasePositionIndex(),this._setPanelNo({index:n,currIndex:n}),i.customEvent.flick=!!this._setAxes("setTo",r.size*r.index,0)),this._applyPanelsPos()},e._applyPanelsPos=function(){this._conf.panel.$list.forEach(this._applyPanelsCss.bind(this))},e._setMoveStyle=function(t,e){var i=pe,r=this._conf.useLayerHack;this._setMoveStyle=i.support?function(t,e){var n;ce.css(t,((n={})[i.name]=ce.translate(e[0],e[1],r),n))}:function(t,e){ce.css(t,{left:e[0],top:e[1]})},this._setMoveStyle(t,e)},e._applyPanelsCss=function(){var t=this._conf,e="__dummy_anchor",n=this.options.useTranslate;this._applyPanelsCss=n?function(t,e){var n=this._getDataByDirection([pe.support?100*e+"%":this._conf.panel.size*e+"px",0]);this._setMoveStyle(t,n)}:(me&&(t.$dummyAnchor=ce.$("."+e),!t.$dummyAnchor&&this.$wrapper.appendChild(t.$dummyAnchor=ce.$('<a href="javascript:void(0)" class="'+e+'" style="position:absolute;height:0px;width:0px">'))),function(t,e){var n=this._getDataByDirection([this._conf.panel.size*e+"px",0]);ce.css(t,{left:n[0],top:n[1]})})},e._adjustContainerCss=function(t,e){var n,i=this._conf,r=i.panel,s=this.options,o=s.useTranslate,a=s.horizontal,u=s.previewPadding[0],h=this.$container,c=e;if(!o)if(c||(c=-r.size*r.index),"start"===t)h=h.style,n=parseFloat(h[a?"left":"top"]),a?n&&(h.left="0px"):n!==u&&(h.top="0px"),this._setTranslate([-c,0]);else if("end"===t){var l;c=this._getCoordsValue([c,0]),ce.css(h,((l={left:c.x,top:c.y})[pe.name]=ce.translate(0,0,i.useLayerHack),l)),i.$dummyAnchor&&i.$dummyAnchor.focus()}},e._setAxes=function(t,e,n){return this._axesInst[t]({flick:e},n)},e._setHint=function(){var t={willChange:"transform"};ce.css(this.$container,t),ce.css(this._conf.panel.$list,t)},e._getDataByDirection=function(t){var e=t.concat();return!this.options.horizontal&&e.reverse(),e},e._arrangePanelPosition=function(t,e){var n=t===this._conf.dirData[0];this._movePanelPosition(Math.abs(e||1),n)},e._getBasePositionIndex=function(){return Math.floor(this._conf.panel.count/2-.1)},e._bindEvents=function(t){var e=this.options,n=this.$wrapper,i=this._axesInst;t?(this._panInput=new ue(n,{inputType:e.inputType,thresholdAngle:e.thresholdAngle,scale:this._getDataByDirection([-1,0])}),i.on({hold:this._holdHandler.bind(this),change:this._changeHandler.bind(this),release:this._releaseHandler.bind(this),animationStart:this._animationStartHandler.bind(this),animationEnd:this._animationEndHandler.bind(this)}).connect(this._getDataByDirection(["flick",""]),this._panInput)):(this.disableInput(),i.off())},e._setAdaptiveHeight=function(t){var e,n,i=this._conf,r=i.indexToMove,s=0===r?this["get"+((t===ee.DIRECTION_LEFT?"Next":t===ee.DIRECTION_RIGHT&&"Prev")||"")+"Element"]():i.panel.$list[i.panel.currIndex+r],o=s.querySelector(":first-child");o&&((n=o.getAttribute(ve))||(e=s.children,0<(n=ce.outerHeight(1<e.length?(s.style.height="auto",s):o))&&o.setAttribute(ve,n)),0<n&&(this.$wrapper.style.height=n+"px"))},e._triggerBeforeRestore=function(t){var e=this._conf,n=e.touch;n.direction=+e.dirData.join("").replace(n.direction,""),e.customEvent.restore=this._triggerEvent(fe.beforeRestore,{depaPos:t.depaPos.flick,destPos:t.destPos.flick}),e.customEvent.restore||("stop"in t&&t.stop(),e.panel.animating=!1)},e._triggerRestore=function(){var t=this._conf.customEvent;t.restore&&this._triggerEvent(fe.restore),t.restore=t.restoreCall=!1},e._setPhaseValue=function(t,e){var n=this._conf,i=this.options,r=n.panel,s=i.useTranslate;if("start"===t&&(r.changed=this._isMovable())){if(!this._triggerEvent(fe.beforeFlickStart,e))return r.changed=r.animating=!1,!1;i.adaptiveHeight&&this._setAdaptiveHeight(n.touch.direction),0===n.indexToMove&&this._setPanelNo()}else"end"===t&&(i.circular&&r.changed&&this._arrangePanels(!0,n.indexToMove),s&&this._setTranslate([-r.size*r.index,0]),n.touch.distance=n.indexToMove=0,r.changed&&this._triggerEvent(fe.flickEnd));return this._adjustContainerCss(t),!0},e._getNumByDirection=function(){var t=this._conf;return t.touch.direction===t.dirData[0]?1:-1},e._revertPanelNo=function(){var t=this._conf.panel,e=this._getNumByDirection(),n=0<=t.currIndex?t.currIndex:t.index-e,i=0<=t.currNo?t.currNo:t.no-e;this._setPanelNo({index:n,no:i})},e._setPanelNo=function(t){var e=this._conf.panel,n=e.origCount-1,i=this._getNumByDirection();if(ce.isObject(t))for(var r in t)e[r]=t[r];else e.currIndex=e.index,e.currNo=e.no,e.index+=i,e.no+=i;e.no>n?e.no=0:e.no<0&&(e.no=n)},e._setPointerEvents=function(t){var e,n=this.$container,i=ce.css(n,"pointerEvents");t&&t.holding&&t.inputEvent&&t.inputEvent.preventSystemEvent&&"none"!==i?e="none":t||"auto"===i||(e="auto"),e&&ce.css(n,{pointerEvents:e})},e._getCoordsValue=function(t){var e=this._getDataByDirection(t);return{x:ce.getUnitValue(e[0]),y:ce.getUnitValue(e[1])}},e._setTranslate=function(t){var e=this._getCoordsValue(t);this._setMoveStyle(this.$container,[e.x,e.y])},e._isMovable=function(){var t,e,n=this.options,i=this._axesInst,r=Math.abs(this._conf.touch.distance)>=n.threshold;return!(!n.circular&&r&&(t=i.axis.flick.range[1],(e=i.get().flick)<0||t<e))&&r},e._triggerEvent=function(t,e){var n=this._conf,i=n.panel;return t===fe.flickEnd&&(i.currNo=i.no,i.currIndex=i.index),this.trigger(n.eventPrefix+t,ce.extend({eventType:t,no:i.currNo,direction:n.touch.direction,isTrusted:n.touch.isTrusted},e))},e._getElement=function(t,e,n){var i,r,s=this._conf.panel,o=this.options.circular,a=s.currIndex,u=t===this._conf.dirData[0],h=null,c=r=n?(i=s.count,a):(i=s.origCount,s.currNo);return u?r<i-1?r++:o&&(r=0):0<r?r--:o&&(r=i-1),c!==r&&(h=e?s.$list[u?a+1:a-1]:r),h},e._setValueToMove=function(t){var e=this._conf;e.touch.distance=this.options.threshold+1,e.touch.direction=e.dirData[+!t]},e.getIndex=function(t){return this._conf.panel[t?"currIndex":"currNo"]},e.getElement=function(){var t=this._conf.panel;return t.$list[t.currIndex]},e.getNextElement=function(){return this._getElement(this._conf.dirData[0],!0)},e.getNextIndex=function(t){return this._getElement(this._conf.dirData[0],!1,t)},e.getAllElements=function(){return this._conf.panel.$list},e.getPrevElement=function(){return this._getElement(this._conf.dirData[1],!0)},e.getPrevIndex=function(t){return this._getElement(this._conf.dirData[1],!1,t)},e.isPlaying=function(){return this._conf.panel.animating},e._movePanelByPhase=function(t,e,n){var i=ce.getNumValue(n,this.options.duration);!1!==this._setPhaseValue("start")&&(this._setAxes(t,e,i),!i&&this._setPhaseValue("end"))},e.next=function(t){var e=this.getNextIndex();return"number"!=typeof e?this:this._moveTo(e,t,ee.DIRECTION_RIGHT)},e.prev=function(t){var e=this.getPrevIndex();return"number"!=typeof e?this:this._moveTo(e,t,ee.DIRECTION_LEFT)},e.moveTo=function(t,e){return this._moveTo(t,e)},e._moveTo=function(t,e,n){var i,r,s=this._conf,o=s.panel,a=this.options.circular,u=o.index,h=t;return(h=ce.getNumValue(h,-1))<0||h>=o.origCount||h===o.no||o.animating||s.touch.holding||(i=h-(a?o.no:u),n===ee.DIRECTION_RIGHT&&i<0?i+=o.origCount:n===ee.DIRECTION_LEFT&&0<i&&(i-=o.origCount),r=0<i,a&&Math.abs(i)>(r?o.count-(u+1):u)&&(r=0<(i+=(r?-1:1)*o.count)),this._setPanelNo(a?{no:h}:{no:h,index:h}),this._conf.indexToMove=i,this._setValueToMove(r),this._movePanelByPhase(a?"setBy":"setTo",o.size*(a?i:h),e)),this},e.resize=function(){var t,e=this._conf,n=this.options,i=e.panel,r=n.horizontal,s=n.useTranslate;if(!this.isPlaying()){var o;if(ce.isArray(n.previewPadding)&&"number"==typeof+n.previewPadding.join("")?(this._setPadding(n.previewPadding.concat()),t=i.size):r&&(t=i.size=ce.css(this.$wrapper,"width",!0)),ce.css(i.$list,((o={})[r?"width":"height"]=ce.getUnitValue(t),o)),n.adaptiveHeight){var a=this.$container.querySelectorAll("["+ve+"]");a.length&&(ce.toArray(a).forEach(function(t){return t.removeAttribute(ve)}),this._setAdaptiveHeight())}this._axesInst.axis.flick.range=[0,t*(i.count-1)],this._setAxes("setTo",t*i.index,0),s||(this._applyPanelsPos(),this._adjustContainerCss("end"))}return this},e.restore=function(t){var e,n=this._conf,i=n.panel,r=this._axesInst.get().flick,s=t;return r!==i.currIndex*i.size?(n.customEvent.restoreCall=!0,s=ce.getNumValue(s,this.options.duration),this._revertPanelNo(),e=i.size*i.index,this._triggerBeforeRestore({depaPos:r,destPos:e}),this._setAxes("setTo",e,s),s||(this._adjustContainerCss("end"),this._triggerRestore())):i.changed&&(this._revertPanelNo(),n.touch.distance=n.indexToMove=0),this},e.enableInput=function(){return this._panInput.enable(),this},e.disableInput=function(){return this._panInput.disable(),this},e.getStatus=function(t){var e=this._conf.panel,n=/((?:-webkit-)?transform|left|top|will-change|box-sizing|width):[^;]*;/g,i={panel:{index:e.index,no:e.no,currIndex:e.currIndex,currNo:e.currNo},$list:e.$list.map(function(t){return{style:t.style.cssText.replace(n,"").trim(),className:t.className,html:t.innerHTML}})};return t?JSON.stringify(i):i},e.setStatus=function(t){var e=this._conf.panel,n=this.options.adaptiveHeight,o="string"==typeof t?JSON.parse(t):t;if(o){for(var i in o.panel)i in e&&(e[i]=o.panel[i]);e.$list.forEach(function(t,e){var n=o.$list[e],i=n.style,r=n.className,s=n.html;i&&(t.style.cssText+=i),r&&(t.className=r),s&&(t.innerHTML=s)}),n&&this._setAdaptiveHeight()}},e.destroy=function(){var e=this,t=this._conf.origPanelStyle,n=t.wrapper,i=t.container,r=t.list;this._bindEvents(!1),this.off(),this._axesInst.destroy(),this._panInput.destroy();var s=this.$wrapper;s.setAttribute("class",n.className),s[n.style?"setAttribute":"removeAttribute"]("style",n.style);var o=this.$container,a=[].slice.call(o.children);t.container.className?(o.setAttribute("class",i.className),o[i.style?"setAttribute":"removeAttribute"]("style",i.style)):(a.forEach(function(t){return s.appendChild(t)}),o.parentNode.removeChild(o));for(var u,h=0;u=a[h];h++)if(h>r.length-1)u.parentNode.removeChild(u);else{var c=r[h].className,l=r[h].style;u[c?"setAttribute":"removeAttribute"]("class",c),u[l?"setAttribute":"removeAttribute"]("style",l)}for(var f in this.plugins.forEach(function(t){e.plugins[t].$componentWillUnmount()}),this)this[f]=null},e.plugin=function(t){var n=this;return t.forEach(function(e){0===n.plugins.filter(function(t){return t.constructor===e.constructor}).length&&n.plugins.push(e.$componentWillMount(n))}),this},t}((t=n,new le(t)).with(ye));return e.utils=ce,e.VERSION="2.4.3",e.consts={EVENTS:fe,TRANSFORM:pe,SUPPORT_WILLCHANGE:de,IS_ANDROID2:me},e.DIRECTION_NONE=ee.DIRECTION_NONE,e.DIRECTION_LEFT=ee.DIRECTION_LEFT,e.DIRECTION_RIGHT=ee.DIRECTION_RIGHT,e.DIRECTION_UP=ee.DIRECTION_UP,e.DIRECTION_DOWN=ee.DIRECTION_DOWN,e.DIRECTION_HORIZONTAL=ee.DIRECTION_HORIZONTAL,e.DIRECTION_VERTICAL=ee.DIRECTION_VERTICAL,e.DIRECTION_ALL=ee.DIRECTION_ALL,e}()}); | ||
//# sourceMappingURL=flicking.pkgd.min.js.map |
{ | ||
"name": "@egjs/flicking", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"main": "dist/flicking.js", | ||
@@ -35,2 +35,3 @@ "module": "dist/flicking.esm.js", | ||
"demo:deploy": "npm run build && npm run jsdoc && npm run demo:prebuild && gh-pages -d demo/_site --add --remote upstream", | ||
"demo:deploy-plugin": "npm run build && npm run demo:prebuild && gh-pages -d demo/_site/release/plugins --dest=./release/plugins --add --remote upstream", | ||
"demo:deploy-origin": "npm run build && npm run jsdoc && npm run demo:prebuild && gh-pages -d demo/_site --add --remote origin", | ||
@@ -37,0 +38,0 @@ "demo:updateVersion": "echo $npm_package_version > demo/_data/version.yml", |
@@ -8,3 +8,3 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
@@ -171,3 +171,3 @@ (function (global, factory) { | ||
Plugin.consts = consts; | ||
Plugin.VERSION = "2.4.2"; | ||
Plugin.VERSION = "2.4.3"; | ||
return Plugin; | ||
@@ -174,0 +174,0 @@ }(); |
@@ -8,5 +8,5 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["exports","@egjs/flicking"],e):e((t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin={}),t.eg.Flicking)}(this,function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}var i=e.utils,s=i.extend(i.extend({},e.consts),{DIRECTION_NONE:e.DIRECTION_NONE,DIRECTION_LEFT:e.DIRECTION_LEFT,DIRECTION_RIGHT:e.DIRECTION_RIGHT,DIRECTION_UP:e.DIRECTION_UP,DIRECTION_DOWN:e.DIRECTION_DOWN,DIRECTION_HORIZONTAL:e.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:e.DIRECTION_VERTICAL,DIRECTION_ALL:e.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var e=t.prototype;return e.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},e.$componentDidMount=function(){return this},e.$componentWillUnmount=function(){var e=this;Object.keys(this).forEach(function(t){e[t]=null})},e.getInstanceConf=function(){return this.$$._conf},e.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},e._onFlick=function(t){var e=t.pos,i=t.distance||e-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,i)},e._onFlickEnd=function(t){var e=(t.direction&s.DIRECTION_LEFT?"next":t.direction&s.DIRECTION_RIGHT&&"prev")||"";e&&this.arrange&&this.arrange(e),this.onFlickEnd&&this.onFlickEnd(t)},e._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=i,t.consts=s,t.VERSION="2.4.2",t}(),r=function(e){function t(t){return e.call(this,{selector:t})||this}n(t,e);var i=t.prototype;return i.$componentMount=function(){return this.details=o.utils.toArray(this.$$.$wrapper.querySelectorAll(this.options.selector)),this._build(),this.resize(),this},i._build=function(){this.details=[this.details.pop()].concat(this.details)},i._setSelected=function(t,e){var i=o.utils;i.classList(i.css(this.details[t],{opacity:""}),"selected",e)},i.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},i.arrange=function(t){"resize"!==t&&(this.details="next"===t?this.details.concat(this.details.shift()):[this.details.pop()].concat(this.details)),this._setSelected(1,!0),/next|resize/.test(t)&&this._setSelected(0,!1),/prev|resize/.test(t)&&this._setSelected(2,!1)},i.onFlick=function(t,e){var i=t.pos%this.size/this.size,n=o.utils;if(!(Math.abs(e)>=this.size)){var s=0<e&&i<=.5&&1-2*i||e<0&&.5<i&&2*(i-.5);void 0!==s&&n.css(this.details[1],{opacity:s})}},i.onRestore=function(){this.arrange("resize")},i.get=function(){return this.details[1]},t}(o),c=function(e){function t(t){return e.call(this,{selector:t})||this}n(t,e);var i=t.prototype;return i.$componentMount=function(){var e=this;return this.imgs=this.$$.getAllElements().map(function(t){return t.querySelector(e.options.selector)}),this.resize(),this._build(),this},i._build=function(){var n=this,s=o.utils,r=this._getCurrIndex();s.css(this.getInstanceConf().panel.$list,{overflow:"hidden"}),this.imgs.forEach(function(t,e){var i=-50;e<r?i=50:r===e&&(i=0),n.useWillChange&&s.css(t,{willChange:"transform"}),n._setTranslate(t,i+"%",0)})},i._setTranslate=function(t,e,i){return t&&o.utils.css(t,{transform:o.utils.translate.apply(null,this.$$._getDataByDirection([e,i]).concat(this.useLayerHack))}),t},i._getCurrIndex=function(){return this.getInstanceConf().panel.currIndex},i._getPanel=function(){var t=this._getCurrIndex();return{prev:this.imgs[t-1],curr:this.imgs[t],next:this.imgs[t+1]}},i.arrange=function(t){this.$$.options.circular&&"resize"!==t&&(this.imgs="next"===t?this.imgs.concat(this.imgs.shift()):[this.imgs.pop()].concat(this.imgs));var e=this._getPanel();this._setTranslate(e.curr,0,0),/next|resize/.test(t)&&this._setTranslate(e.next,"50%",0),/prev|resize/.test(t)&&this._setTranslate(e.prev,"-50%",0)},i.onFlick=function(t,e){var i=this,n=t.pos,s=this.size,r=n%s/2,o=-(s/2-r);if(!(Math.abs(e)>=s)){var c=this._getPanel(),a=[];0<e&&c.next?(a.push({el:c.curr,x:r}),a.push({el:c.next,x:o})):e<0&&c.prev&&(a.push({el:c.curr,x:o}),a.push({el:c.prev,x:r})),a.forEach(function(t){return i._setTranslate(t.el,t.x+"px",0)})}},i.onRestore=function(){this.arrange("resize")},i.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},i.get=function(){return this.imgs[this._getCurrIndex()]},t}(o);t.OpacityEffect=r,t.ParallaxEffect=c,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["exports","@egjs/flicking"],e):e((t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin={}),t.eg.Flicking)}(this,function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}var i=e.utils,s=i.extend(i.extend({},e.consts),{DIRECTION_NONE:e.DIRECTION_NONE,DIRECTION_LEFT:e.DIRECTION_LEFT,DIRECTION_RIGHT:e.DIRECTION_RIGHT,DIRECTION_UP:e.DIRECTION_UP,DIRECTION_DOWN:e.DIRECTION_DOWN,DIRECTION_HORIZONTAL:e.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:e.DIRECTION_VERTICAL,DIRECTION_ALL:e.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var e=t.prototype;return e.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},e.$componentDidMount=function(){return this},e.$componentWillUnmount=function(){var e=this;Object.keys(this).forEach(function(t){e[t]=null})},e.getInstanceConf=function(){return this.$$._conf},e.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},e._onFlick=function(t){var e=t.pos,i=t.distance||e-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,i)},e._onFlickEnd=function(t){var e=(t.direction&s.DIRECTION_LEFT?"next":t.direction&s.DIRECTION_RIGHT&&"prev")||"";e&&this.arrange&&this.arrange(e),this.onFlickEnd&&this.onFlickEnd(t)},e._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=i,t.consts=s,t.VERSION="2.4.3",t}(),r=function(e){function t(t){return e.call(this,{selector:t})||this}n(t,e);var i=t.prototype;return i.$componentMount=function(){return this.details=o.utils.toArray(this.$$.$wrapper.querySelectorAll(this.options.selector)),this._build(),this.resize(),this},i._build=function(){this.details=[this.details.pop()].concat(this.details)},i._setSelected=function(t,e){var i=o.utils;i.classList(i.css(this.details[t],{opacity:""}),"selected",e)},i.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},i.arrange=function(t){"resize"!==t&&(this.details="next"===t?this.details.concat(this.details.shift()):[this.details.pop()].concat(this.details)),this._setSelected(1,!0),/next|resize/.test(t)&&this._setSelected(0,!1),/prev|resize/.test(t)&&this._setSelected(2,!1)},i.onFlick=function(t,e){var i=t.pos%this.size/this.size,n=o.utils;if(!(Math.abs(e)>=this.size)){var s=0<e&&i<=.5&&1-2*i||e<0&&.5<i&&2*(i-.5);void 0!==s&&n.css(this.details[1],{opacity:s})}},i.onRestore=function(){this.arrange("resize")},i.get=function(){return this.details[1]},t}(o),c=function(e){function t(t){return e.call(this,{selector:t})||this}n(t,e);var i=t.prototype;return i.$componentMount=function(){var e=this;return this.imgs=this.$$.getAllElements().map(function(t){return t.querySelector(e.options.selector)}),this.resize(),this._build(),this},i._build=function(){var n=this,s=o.utils,r=this._getCurrIndex();s.css(this.getInstanceConf().panel.$list,{overflow:"hidden"}),this.imgs.forEach(function(t,e){var i=-50;e<r?i=50:r===e&&(i=0),n.useWillChange&&s.css(t,{willChange:"transform"}),n._setTranslate(t,i+"%",0)})},i._setTranslate=function(t,e,i){return t&&o.utils.css(t,{transform:o.utils.translate.apply(null,this.$$._getDataByDirection([e,i]).concat(this.useLayerHack))}),t},i._getCurrIndex=function(){return this.getInstanceConf().panel.currIndex},i._getPanel=function(){var t=this._getCurrIndex();return{prev:this.imgs[t-1],curr:this.imgs[t],next:this.imgs[t+1]}},i.arrange=function(t){this.$$.options.circular&&"resize"!==t&&(this.imgs="next"===t?this.imgs.concat(this.imgs.shift()):[this.imgs.pop()].concat(this.imgs));var e=this._getPanel();this._setTranslate(e.curr,0,0),/next|resize/.test(t)&&this._setTranslate(e.next,"50%",0),/prev|resize/.test(t)&&this._setTranslate(e.prev,"-50%",0)},i.onFlick=function(t,e){var i=this,n=t.pos,s=this.size,r=n%s/2,o=-(s/2-r);if(!(Math.abs(e)>=s)){var c=this._getPanel(),a=[];0<e&&c.next?(a.push({el:c.curr,x:r}),a.push({el:c.next,x:o})):e<0&&c.prev&&(a.push({el:c.curr,x:o}),a.push({el:c.prev,x:r})),a.forEach(function(t){return i._setTranslate(t.el,t.x+"px",0)})}},i.onRestore=function(){this.arrange("resize")},i.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},i.get=function(){return this.imgs[this._getCurrIndex()]},t}(o);t.OpacityEffect=r,t.ParallaxEffect=c,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=all.min.js.map |
@@ -8,5 +8,5 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["@egjs/flicking"],i):(t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin=t.eg.Flicking.plugin||{},t.eg.Flicking.plugin.OpacityEffect=i(t.eg.Flicking))}(this,function(t){"use strict";var i=t.utils,e=i.extend(i.extend({},t.consts),{DIRECTION_NONE:t.DIRECTION_NONE,DIRECTION_LEFT:t.DIRECTION_LEFT,DIRECTION_RIGHT:t.DIRECTION_RIGHT,DIRECTION_UP:t.DIRECTION_UP,DIRECTION_DOWN:t.DIRECTION_DOWN,DIRECTION_HORIZONTAL:t.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:t.DIRECTION_VERTICAL,DIRECTION_ALL:t.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var i=t.prototype;return i.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},i.$componentDidMount=function(){return this},i.$componentWillUnmount=function(){var i=this;Object.keys(this).forEach(function(t){i[t]=null})},i.getInstanceConf=function(){return this.$$._conf},i.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},i._onFlick=function(t){var i=t.pos,e=t.distance||i-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,e)},i._onFlickEnd=function(t){var i=(t.direction&e.DIRECTION_LEFT?"next":t.direction&e.DIRECTION_RIGHT&&"prev")||"";i&&this.arrange&&this.arrange(i),this.onFlickEnd&&this.onFlickEnd(t)},i._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=i,t.consts=e,t.VERSION="2.4.2",t}();return function(i){var t,e;function n(t){return i.call(this,{selector:t})||this}e=i,(t=n).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var s=n.prototype;return s.$componentMount=function(){return this.details=o.utils.toArray(this.$$.$wrapper.querySelectorAll(this.options.selector)),this._build(),this.resize(),this},s._build=function(){this.details=[this.details.pop()].concat(this.details)},s._setSelected=function(t,i){var e=o.utils;e.classList(e.css(this.details[t],{opacity:""}),"selected",i)},s.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},s.arrange=function(t){"resize"!==t&&(this.details="next"===t?this.details.concat(this.details.shift()):[this.details.pop()].concat(this.details)),this._setSelected(1,!0),/next|resize/.test(t)&&this._setSelected(0,!1),/prev|resize/.test(t)&&this._setSelected(2,!1)},s.onFlick=function(t,i){var e=t.pos%this.size/this.size,n=o.utils;if(!(Math.abs(i)>=this.size)){var s=0<i&&e<=.5&&1-2*e||i<0&&.5<e&&2*(e-.5);void 0!==s&&n.css(this.details[1],{opacity:s})}},s.onRestore=function(){this.arrange("resize")},s.get=function(){return this.details[1]},n}(o)}); | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["@egjs/flicking"],i):(t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin=t.eg.Flicking.plugin||{},t.eg.Flicking.plugin.OpacityEffect=i(t.eg.Flicking))}(this,function(t){"use strict";var i=t.utils,e=i.extend(i.extend({},t.consts),{DIRECTION_NONE:t.DIRECTION_NONE,DIRECTION_LEFT:t.DIRECTION_LEFT,DIRECTION_RIGHT:t.DIRECTION_RIGHT,DIRECTION_UP:t.DIRECTION_UP,DIRECTION_DOWN:t.DIRECTION_DOWN,DIRECTION_HORIZONTAL:t.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:t.DIRECTION_VERTICAL,DIRECTION_ALL:t.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var i=t.prototype;return i.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},i.$componentDidMount=function(){return this},i.$componentWillUnmount=function(){var i=this;Object.keys(this).forEach(function(t){i[t]=null})},i.getInstanceConf=function(){return this.$$._conf},i.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},i._onFlick=function(t){var i=t.pos,e=t.distance||i-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,e)},i._onFlickEnd=function(t){var i=(t.direction&e.DIRECTION_LEFT?"next":t.direction&e.DIRECTION_RIGHT&&"prev")||"";i&&this.arrange&&this.arrange(i),this.onFlickEnd&&this.onFlickEnd(t)},i._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=i,t.consts=e,t.VERSION="2.4.3",t}();return function(i){var t,e;function n(t){return i.call(this,{selector:t})||this}e=i,(t=n).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var s=n.prototype;return s.$componentMount=function(){return this.details=o.utils.toArray(this.$$.$wrapper.querySelectorAll(this.options.selector)),this._build(),this.resize(),this},s._build=function(){this.details=[this.details.pop()].concat(this.details)},s._setSelected=function(t,i){var e=o.utils;e.classList(e.css(this.details[t],{opacity:""}),"selected",i)},s.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},s.arrange=function(t){"resize"!==t&&(this.details="next"===t?this.details.concat(this.details.shift()):[this.details.pop()].concat(this.details)),this._setSelected(1,!0),/next|resize/.test(t)&&this._setSelected(0,!1),/prev|resize/.test(t)&&this._setSelected(2,!1)},s.onFlick=function(t,i){var e=t.pos%this.size/this.size,n=o.utils;if(!(Math.abs(i)>=this.size)){var s=0<i&&e<=.5&&1-2*e||i<0&&.5<e&&2*(e-.5);void 0!==s&&n.css(this.details[1],{opacity:s})}},s.onRestore=function(){this.arrange("resize")},s.get=function(){return this.details[1]},n}(o)}); | ||
//# sourceMappingURL=OpacityEffect.min.js.map |
@@ -8,5 +8,5 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["@egjs/flicking"],n):(t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin=t.eg.Flicking.plugin||{},t.eg.Flicking.plugin.ParallaxEffect=n(t.eg.Flicking))}(this,function(t){"use strict";var n=t.utils,e=n.extend(n.extend({},t.consts),{DIRECTION_NONE:t.DIRECTION_NONE,DIRECTION_LEFT:t.DIRECTION_LEFT,DIRECTION_RIGHT:t.DIRECTION_RIGHT,DIRECTION_UP:t.DIRECTION_UP,DIRECTION_DOWN:t.DIRECTION_DOWN,DIRECTION_HORIZONTAL:t.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:t.DIRECTION_VERTICAL,DIRECTION_ALL:t.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var n=t.prototype;return n.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},n.$componentDidMount=function(){return this},n.$componentWillUnmount=function(){var n=this;Object.keys(this).forEach(function(t){n[t]=null})},n.getInstanceConf=function(){return this.$$._conf},n.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},n._onFlick=function(t){var n=t.pos,e=t.distance||n-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,e)},n._onFlickEnd=function(t){var n=(t.direction&e.DIRECTION_LEFT?"next":t.direction&e.DIRECTION_RIGHT&&"prev")||"";n&&this.arrange&&this.arrange(n),this.onFlickEnd&&this.onFlickEnd(t)},n._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=n,t.consts=e,t.VERSION="2.4.2",t}();return function(n){var t,e;function i(t){return n.call(this,{selector:t})||this}e=n,(t=i).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var s=i.prototype;return s.$componentMount=function(){var n=this;return this.imgs=this.$$.getAllElements().map(function(t){return t.querySelector(n.options.selector)}),this.resize(),this._build(),this},s._build=function(){var i=this,s=o.utils,r=this._getCurrIndex();s.css(this.getInstanceConf().panel.$list,{overflow:"hidden"}),this.imgs.forEach(function(t,n){var e=-50;n<r?e=50:r===n&&(e=0),i.useWillChange&&s.css(t,{willChange:"transform"}),i._setTranslate(t,e+"%",0)})},s._setTranslate=function(t,n,e){return t&&o.utils.css(t,{transform:o.utils.translate.apply(null,this.$$._getDataByDirection([n,e]).concat(this.useLayerHack))}),t},s._getCurrIndex=function(){return this.getInstanceConf().panel.currIndex},s._getPanel=function(){var t=this._getCurrIndex();return{prev:this.imgs[t-1],curr:this.imgs[t],next:this.imgs[t+1]}},s.arrange=function(t){this.$$.options.circular&&"resize"!==t&&(this.imgs="next"===t?this.imgs.concat(this.imgs.shift()):[this.imgs.pop()].concat(this.imgs));var n=this._getPanel();this._setTranslate(n.curr,0,0),/next|resize/.test(t)&&this._setTranslate(n.next,"50%",0),/prev|resize/.test(t)&&this._setTranslate(n.prev,"-50%",0)},s.onFlick=function(t,n){var e=this,i=t.pos,s=this.size,r=i%s/2,o=-(s/2-r);if(!(Math.abs(n)>=s)){var c=this._getPanel(),u=[];0<n&&c.next?(u.push({el:c.curr,x:r}),u.push({el:c.next,x:o})):n<0&&c.prev&&(u.push({el:c.curr,x:o}),u.push({el:c.prev,x:r})),u.forEach(function(t){return e._setTranslate(t.el,t.x+"px",0)})}},s.onRestore=function(){this.arrange("resize")},s.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},s.get=function(){return this.imgs[this._getCurrIndex()]},i}(o)}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/flicking")):"function"==typeof define&&define.amd?define(["@egjs/flicking"],n):(t.eg=t.eg||{},t.eg.Flicking=t.eg.Flicking||{},t.eg.Flicking.plugin=t.eg.Flicking.plugin||{},t.eg.Flicking.plugin.ParallaxEffect=n(t.eg.Flicking))}(this,function(t){"use strict";var n=t.utils,e=n.extend(n.extend({},t.consts),{DIRECTION_NONE:t.DIRECTION_NONE,DIRECTION_LEFT:t.DIRECTION_LEFT,DIRECTION_RIGHT:t.DIRECTION_RIGHT,DIRECTION_UP:t.DIRECTION_UP,DIRECTION_DOWN:t.DIRECTION_DOWN,DIRECTION_HORIZONTAL:t.DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:t.DIRECTION_VERTICAL,DIRECTION_ALL:t.DIRECTION_ALL}),o=function(){var t=function(){function t(t){void 0===t&&(t={}),this.options=t}var n=t.prototype;return n.$componentWillMount=function(t){return this.$$=t,this.useWillChange="transform"===t.$container.style.willChange,this.useLayerHack=this.getInstanceConf().useLayerHack,this.bindEvents(),this.$componentMount(),this.$componentDidMount(),this},n.$componentDidMount=function(){return this},n.$componentWillUnmount=function(){var n=this;Object.keys(this).forEach(function(t){n[t]=null})},n.getInstanceConf=function(){return this.$$._conf},n.bindEvents=function(){this.$$.on({flick:this._onFlick.bind(this),flickEnd:this._onFlickEnd.bind(this),restore:this._onRestore.bind(this)})},n._onFlick=function(t){var n=t.pos,e=t.distance||n-this.$$._conf.panel.size;this.onFlick&&this.onFlick(t,e)},n._onFlickEnd=function(t){var n=(t.direction&e.DIRECTION_LEFT?"next":t.direction&e.DIRECTION_RIGHT&&"prev")||"";n&&this.arrange&&this.arrange(n),this.onFlickEnd&&this.onFlickEnd(t)},n._onRestore=function(t){this.onRestore&&this.onRestore(t)},t}();return t.utils=n,t.consts=e,t.VERSION="2.4.3",t}();return function(n){var t,e;function i(t){return n.call(this,{selector:t})||this}e=n,(t=i).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var s=i.prototype;return s.$componentMount=function(){var n=this;return this.imgs=this.$$.getAllElements().map(function(t){return t.querySelector(n.options.selector)}),this.resize(),this._build(),this},s._build=function(){var i=this,s=o.utils,r=this._getCurrIndex();s.css(this.getInstanceConf().panel.$list,{overflow:"hidden"}),this.imgs.forEach(function(t,n){var e=-50;n<r?e=50:r===n&&(e=0),i.useWillChange&&s.css(t,{willChange:"transform"}),i._setTranslate(t,e+"%",0)})},s._setTranslate=function(t,n,e){return t&&o.utils.css(t,{transform:o.utils.translate.apply(null,this.$$._getDataByDirection([n,e]).concat(this.useLayerHack))}),t},s._getCurrIndex=function(){return this.getInstanceConf().panel.currIndex},s._getPanel=function(){var t=this._getCurrIndex();return{prev:this.imgs[t-1],curr:this.imgs[t],next:this.imgs[t+1]}},s.arrange=function(t){this.$$.options.circular&&"resize"!==t&&(this.imgs="next"===t?this.imgs.concat(this.imgs.shift()):[this.imgs.pop()].concat(this.imgs));var n=this._getPanel();this._setTranslate(n.curr,0,0),/next|resize/.test(t)&&this._setTranslate(n.next,"50%",0),/prev|resize/.test(t)&&this._setTranslate(n.prev,"-50%",0)},s.onFlick=function(t,n){var e=this,i=t.pos,s=this.size,r=i%s/2,o=-(s/2-r);if(!(Math.abs(n)>=s)){var c=this._getPanel(),u=[];0<n&&c.next?(u.push({el:c.curr,x:r}),u.push({el:c.next,x:o})):n<0&&c.prev&&(u.push({el:c.curr,x:o}),u.push({el:c.prev,x:r})),u.forEach(function(t){return e._setTranslate(t.el,t.x+"px",0)})}},s.onRestore=function(){this.arrange("resize")},s.resize=function(){this.size=this.getInstanceConf().panel.size,this.onRestore("resize")},s.get=function(){return this.imgs[this._getCurrIndex()]},i}(o)}); | ||
//# sourceMappingURL=ParallaxEffect.min.js.map |
@@ -8,3 +8,3 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
@@ -171,3 +171,3 @@ (function (global, factory) { | ||
Plugin.consts = consts; | ||
Plugin.VERSION = "2.4.2"; | ||
Plugin.VERSION = "2.4.3"; | ||
return Plugin; | ||
@@ -174,0 +174,0 @@ }(); |
@@ -8,3 +8,3 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
@@ -171,3 +171,3 @@ (function (global, factory) { | ||
Plugin.consts = consts; | ||
Plugin.VERSION = "2.4.2"; | ||
Plugin.VERSION = "2.4.3"; | ||
return Plugin; | ||
@@ -174,0 +174,0 @@ }(); |
@@ -8,3 +8,3 @@ /* | ||
@version 2.4.2 | ||
@version 2.4.3 | ||
*/ | ||
@@ -167,3 +167,3 @@ import Flicking from '@egjs/flicking'; | ||
Plugin.consts = consts; | ||
Plugin.VERSION = "2.4.2"; | ||
Plugin.VERSION = "2.4.3"; | ||
return Plugin; | ||
@@ -170,0 +170,0 @@ }(); |
import Flicking from "@egjs/flicking"; | ||
class Plugin { | ||
declare class Plugin { | ||
constructor(options: any); | ||
@@ -6,0 +6,0 @@ resize(): void; |
{ | ||
"name": "@egjs/flicking-plugins", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "module": "./dist/plugins.esm.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5494745
132
32312
4