vendor: 6,750 bytes, lines 1-26
1(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=global||self,factory(global.window=global.window||{}));}(this,(function(exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;} 2function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} 3return self;} 4/*! 5 * GSAP 3.12.5 6 * https://gsap.com 7 * 8 * @license Copyright 2008-2024, GreenSock. All rights reserved. 9 * Subject to the terms at https://gsap.com/standard-license or for 10 * Club GSAP members, the agreement issued with that membership. 11 * @author: Jack Doyle, [email protected] 12 */ 13var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:false,delay:0},_suppressOverwrites,_reverting,_context,_bigNum=1e8,_tinyNum=1/_bigNum,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function _isString(value){return typeof value==="string";},_isFunction=function _isFunction(value){return typeof value==="function";},_isNumber=function _isNumber(value){return typeof value==="number";},_isUndefined=function _isUndefined(value){return typeof value==="undefined";},_isObject=function _isObject(value){return typeof value==="object";},_isNotFalse=function _isNotFalse(value){return value!==false;},_windowExists=function _windowExists(){return typeof window!=="undefined";},_isFuncOrString=function _isFuncOrString(value){return _isFunction(value)||_isString(value);},_isTypedArray=typeof ArrayBuffer==="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win,_coreInitted,_doc,_globals={},_installScope={},_coreReady,_install=function _install(scope){return(_installScope=_merge(scope,_globals))&&gsap;},_missingPlugin=function _missingPlugin(property,value){return console.warn("Invalid property",property,"set to",value,"Missing plugin? gsap.registerPlugin()");},_warn=function _warn(message,suppress){return!suppress&&console.warn(message);},_addGlobal=function _addGlobal(name,obj){return name&&(_globals[name]=obj)&&_installScope&&(_installScope[name]=obj)||_globals;},_emptyFunc=function _emptyFunc(){return 0;},_startAtRevertConfig={suppressEvents:true,isStart:true,kill:false},_revertConfigNoKill={suppressEvents:true,kill:false},_revertConfig={suppressEvents:true},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function _harness(targets){var target=targets[0],harnessPlugin,i;_isObject(target)||_isFunction(target)||(targets=[targets]);if(!(harnessPlugin=(target._gsap||{}).harness)){i=_harnessPlugins.length;while(i--&&!_harnessPlugins[i].targetTest(target)){} 14harnessPlugin=_harnessPlugins[i];} 15i=targets.length;while(i--){targets[i]&&(targets[i]._gsap||(targets[i]._gsap=new GSCache(targets[i],harnessPlugin)))||targets.splice(i,1);} 16return targets;},_getCache=function _getCache(target){return target._gsap||_harness(toArray(target))[0]._gsap;},_getProperty=function _getProperty(target,property,v){return(v=target[property])&&_isFunction(v)?target[property]():_isUndefined(v)&&target.getAttribute&&target.getAttribute(property)||v;},_forEachName=function _forEachName(names,func){return(names=names.split(",")).forEach(func)||names;},_round=function _round(value){return Math.round(value*100000)/100000||0;},_roundPrecise=function _roundPrecise(value){return Math.round(value*10000000)/10000000||0;},_parseRelative=function _parseRelative(start,value){var operator=value.charAt(0),end=parseFloat(value.substr(2));start=parseFloat(start);return operator==="+"?start+end:operator==="-"?start-end:operator==="*"?start*end:start/end;},_arrayContainsAny=function _arrayContainsAny(toSearch,toFind){var l=toFind.length,i=0;for(;toSearch.indexOf(toFind[i])<0&&++i<l;){} 17return i<l;},_lazyRender=function _lazyRender(){var l=_lazyTweens.length,a=_lazyTweens.slice(0),i,tween;_lazyLookup={};_lazyTweens.length=0;for(i=0;i<l;i++){tween=a[i];tween&&tween._lazy&&(tween.render(tween._lazy[0],tween._lazy[1],true)._lazy=0);}},_lazySafeRender=function _lazySafeRender(animation,time,suppressEvents,force){_lazyTweens.length&&!_reverting&&_lazyRender();animation.render(time,suppressEvents,force||_reverting&&time<0&&(animation._initted||animation._startAt));_lazyTweens.length&&!_reverting&&_lazyRender();},_numericIfPossible=function _numericIfPossible(value){var n=parseFloat(value);return(n||n===0)&&(value+"").match(_delimitedValueExp).length<2?n:_isString(value)?value.trim():value;},_passThrough=function _passThrough(p){return p;},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults){p in obj||(obj[p]=defaults[p]);} 18return obj;},_setKeyframeDefaults=function _setKeyframeDefaults(excludeDuration){return function(obj,defaults){for(var p in defaults){p in obj||p==="duration"&&excludeDuration||p==="ease"||(obj[p]=defaults[p]);}};},_merge=function _merge(base,toMerge){for(var p in toMerge){base[p]=toMerge[p];} 19return base;},_mergeDeep=function _mergeDeep(base,toMerge){for(var p in toMerge){p!=="__proto__"&&p!=="constructor"&&p!=="prototype"&&(base[p]=_isObject(toMerge[p])?_mergeDeep(base[p]||(base[p]={}),toMerge[p]):toMerge[p]);} 20return base;},_copyExcluding=function _copyExcluding(obj,excluding){var copy={},p;for(p in obj){p in excluding||(copy[p]=obj[p]);} 21return copy;},_inheritDefaults=function _inheritDefaults(vars){var parent=vars.parent||_globalTimeline,func=vars.keyframes?_setKeyframeDefaults(_isArray(vars.keyframes)):_setDefaults;if(_isNotFalse(vars.inherit)){while(parent){func(vars,parent.vars.defaults);parent=parent.parent||parent._dp;}} 22return vars;},_arraysMatch=function _arraysMatch(a1,a2){var i=a1.length,match=i===a2.length;while(match&&i--&&a1[i]===a2[i]){} 23return i<0;},_addLinkedListItem=function _addLinkedListItem(parent,child,firstProp,lastProp,sortBy){if(firstProp===void 0){firstProp="_first";} 24if(lastProp===void 0){lastProp="_last";} 25var prev=parent[lastProp],t;if(sortBy){t=child[sortBy];while(prev&&prev[sortBy]>t){prev=prev._prev;}} 26if(prev){child._next=prev._next;prev._next=child;}else{child._next=parent[firstProp];parent[firstProp]=child;}
vendor: 13,907 bytes, lines 27-59
27if(child._next){child._next._prev=child;}else{parent[lastProp]=child;} 28child._prev=prev;child.parent=child._dp=parent;return child;},_removeLinkedListItem=function _removeLinkedListItem(parent,child,firstProp,lastProp){if(firstProp===void 0){firstProp="_first";} 29if(lastProp===void 0){lastProp="_last";} 30var prev=child._prev,next=child._next;if(prev){prev._next=next;}else if(parent[firstProp]===child){parent[firstProp]=next;} 31if(next){next._prev=prev;}else if(parent[lastProp]===child){parent[lastProp]=prev;} 32child._next=child._prev=child.parent=null;},_removeFromParent=function _removeFromParent(child,onlyIfParentHasAutoRemove){child.parent&&(!onlyIfParentHasAutoRemove||child.parent.autoRemoveChildren)&&child.parent.remove&&child.parent.remove(child);child._act=0;},_uncache=function _uncache(animation,child){if(animation&&(!child||child._end>animation._dur||child._start<0)){var a=animation;while(a){a._dirty=1;a=a.parent;}} 33return animation;},_recacheAncestors=function _recacheAncestors(animation){var parent=animation.parent;while(parent&&parent.parent){parent._dirty=1;parent.totalDuration();parent=parent.parent;} 34return animation;},_rewindStartAt=function _rewindStartAt(tween,totalTime,suppressEvents,force){return tween._startAt&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween.vars.immediateRender&&!tween.vars.autoRevert||tween._startAt.render(totalTime,true,force));},_hasNoPausedAncestors=function _hasNoPausedAncestors(animation){return!animation||animation._ts&&_hasNoPausedAncestors(animation.parent);},_elapsedCycleDuration=function _elapsedCycleDuration(animation){return animation._repeat?_animationCycle(animation._tTime,animation=animation.duration()+animation._rDelay)*animation:0;},_animationCycle=function _animationCycle(tTime,cycleDuration){var whole=Math.floor(tTime/=cycleDuration);return tTime&&whole===tTime?whole-1:whole;},_parentToChildTotalTime=function _parentToChildTotalTime(parentTime,child){return(parentTime-child._start)*child._ts+(child._ts>=0?0:child._dirty?child.totalDuration():child._tDur);},_setEnd=function _setEnd(animation){return animation._end=_roundPrecise(animation._start+(animation._tDur/Math.abs(animation._ts||animation._rts||_tinyNum)||0));},_alignPlayhead=function _alignPlayhead(animation,totalTime){var parent=animation._dp;if(parent&&parent.smoothChildTiming&&animation._ts){animation._start=_roundPrecise(parent._time-(animation._ts>0?totalTime/animation._ts:((animation._dirty?animation.totalDuration():animation._tDur)-totalTime)/-animation._ts));_setEnd(animation);parent._dirty||_uncache(parent,animation);} 35return animation;},_postAddChecks=function _postAddChecks(timeline,child){var t;if(child._time||!child._dur&&child._initted||child._start<timeline._time&&(child._dur||!child.add)){t=_parentToChildTotalTime(timeline.rawTime(),child);if(!child._dur||_clamp(0,child.totalDuration(),t)-child._tTime>_tinyNum){child.render(t,true);}} 36if(_uncache(timeline,child)._dp&&timeline._initted&&timeline._time>=timeline._dur&&timeline._ts){if(timeline._dur<timeline.duration()){t=timeline;while(t._dp){t.rawTime()>=0&&t.totalTime(t._tTime);t=t._dp;}} 37timeline._zTime=-_tinyNum;}},_addToTimeline=function _addToTimeline(timeline,child,position,skipChecks){child.parent&&_removeFromParent(child);child._start=_roundPrecise((_isNumber(position)?position:position||timeline!==_globalTimeline?_parsePosition(timeline,position,child):timeline._time)+child._delay);child._end=_roundPrecise(child._start+(child.totalDuration()/Math.abs(child.timeScale())||0));_addLinkedListItem(timeline,child,"_first","_last",timeline._sort?"_start":0);_isFromOrFromStart(child)||(timeline._recent=child);skipChecks||_postAddChecks(timeline,child);timeline._ts<0&&_alignPlayhead(timeline,timeline._tTime);return timeline;},_scrollTrigger=function _scrollTrigger(animation,trigger){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",trigger))&&_globals.ScrollTrigger.create(trigger,animation);},_attemptInitTween=function _attemptInitTween(tween,time,force,suppressEvents,tTime){_initTween(tween,time,tTime);if(!tween._initted){return 1;} 38if(!force&&tween._pt&&!_reverting&&(tween._dur&&tween.vars.lazy!==false||!tween._dur&&tween.vars.lazy)&&_lastRenderedFrame!==_ticker.frame){_lazyTweens.push(tween);tween._lazy=[tTime,suppressEvents];return 1;}},_parentPlayheadIsBeforeStart=function _parentPlayheadIsBeforeStart(_ref){var parent=_ref.parent;return parent&&parent._ts&&parent._initted&&!parent._lock&&(parent.rawTime()<0||_parentPlayheadIsBeforeStart(parent));},_isFromOrFromStart=function _isFromOrFromStart(_ref2){var data=_ref2.data;return data==="isFromStart"||data==="isStart";},_renderZeroDurationTween=function _renderZeroDurationTween(tween,totalTime,suppressEvents,force){var prevRatio=tween.ratio,ratio=totalTime<0||!totalTime&&(!tween._start&&_parentPlayheadIsBeforeStart(tween)&&!(!tween._initted&&_isFromOrFromStart(tween))||(tween._ts<0||tween._dp._ts<0)&&!_isFromOrFromStart(tween))?0:1,repeatDelay=tween._rDelay,tTime=0,pt,iteration,prevIteration;if(repeatDelay&&tween._repeat){tTime=_clamp(0,tween._tDur,totalTime);iteration=_animationCycle(tTime,repeatDelay);tween._yoyo&&iteration&1&&(ratio=1-ratio);if(iteration!==_animationCycle(tween._tTime,repeatDelay)){prevRatio=1-ratio;tween.vars.repeatRefresh&&tween._initted&&tween.invalidate();}} 39if(ratio!==prevRatio||_reverting||force||tween._zTime===_tinyNum||!totalTime&&tween._zTime){if(!tween._initted&&_attemptInitTween(tween,totalTime,force,suppressEvents,tTime)){return;} 40prevIteration=tween._zTime;tween._zTime=totalTime||(suppressEvents?_tinyNum:0);suppressEvents||(suppressEvents=totalTime&&!prevIteration);tween.ratio=ratio;tween._from&&(ratio=1-ratio);tween._time=0;tween._tTime=tTime;pt=tween._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next;} 41totalTime<0&&_rewindStartAt(tween,totalTime,suppressEvents,true);tween._onUpdate&&!suppressEvents&&_callback(tween,"onUpdate");tTime&&tween._repeat&&!suppressEvents&&tween.parent&&_callback(tween,"onRepeat");if((totalTime>=tween._tDur||totalTime<0)&&tween.ratio===ratio){ratio&&_removeFromParent(tween,1);if(!suppressEvents&&!_reverting){_callback(tween,ratio?"onComplete":"onReverseComplete",true);tween._prom&&tween._prom();}}}else if(!tween._zTime){tween._zTime=totalTime;}},_findNextPauseTween=function _findNextPauseTween(animation,prevTime,time){var child;if(time>prevTime){child=animation._first;while(child&&child._start<=time){if(child.data==="isPause"&&child._start>prevTime){return child;} 42child=child._next;}}else{child=animation._last;while(child&&child._start>=time){if(child.data==="isPause"&&child._start<prevTime){return child;} 43child=child._prev;}}},_setDuration=function _setDuration(animation,duration,skipUncache,leavePlayhead){var repeat=animation._repeat,dur=_roundPrecise(duration)||0,totalProgress=animation._tTime/animation._tDur;totalProgress&&!leavePlayhead&&(animation._time*=dur/animation._dur);animation._dur=dur;animation._tDur=!repeat?dur:repeat<0?1e10:_roundPrecise(dur*(repeat+1)+animation._rDelay*repeat);totalProgress>0&&!leavePlayhead&&_alignPlayhead(animation,animation._tTime=animation._tDur*totalProgress);animation.parent&&_setEnd(animation);skipUncache||_uncache(animation.parent,animation);return animation;},_onUpdateTotalDuration=function _onUpdateTotalDuration(animation){return animation instanceof Timeline?_uncache(animation):_setDuration(animation,animation._dur);},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function _parsePosition(animation,position,percentAnimation){var labels=animation.labels,recent=animation._recent||_zeroPosition,clippedDuration=animation.duration()>=_bigNum?recent.endTime(false):animation._dur,i,offset,isPercent;if(_isString(position)&&(isNaN(position)||position in labels)){offset=position.charAt(0);isPercent=position.substr(-1)==="%";i=position.indexOf("=");if(offset==="<"||offset===">"){i>=0&&(position=position.replace(/=/,""));return(offset==="<"?recent._start:recent.endTime(recent._repeat>=0))+(parseFloat(position.substr(1))||0)*(isPercent?(i<0?recent:percentAnimation).totalDuration()/100:1);} 44if(i<0){position in labels||(labels[position]=clippedDuration);return labels[position];} 45offset=parseFloat(position.charAt(i-1)+position.substr(i+1));if(isPercent&&percentAnimation){offset=offset/100*(_isArray(percentAnimation)?percentAnimation[0]:percentAnimation).totalDuration();} 46return i>1?_parsePosition(animation,position.substr(0,i-1),percentAnimation)+offset:clippedDuration+offset;} 47return position==null?clippedDuration:+position;},_createTweenType=function _createTweenType(type,params,timeline){var isLegacy=_isNumber(params[1]),varsIndex=(isLegacy?2:1)+(type<2?0:1),vars=params[varsIndex],irVars,parent;isLegacy&&(vars.duration=params[1]);vars.parent=timeline;if(type){irVars=vars;parent=timeline;while(parent&&!("immediateRender"in irVars)){irVars=parent.vars.defaults||{};parent=_isNotFalse(parent.vars.inherit)&&parent.parent;} 48vars.immediateRender=_isNotFalse(irVars.immediateRender);type<2?vars.runBackwards=1:vars.startAt=params[varsIndex-1];} 49return new Tween(params[0],vars,params[varsIndex+1]);},_conditionalReturn=function _conditionalReturn(value,func){return value||value===0?func(value):func;},_clamp=function _clamp(min,max,value){return value<min?min:value>max?max:value;},getUnit=function getUnit(value,v){return!_isString(value)||!(v=_unitExp.exec(value))?"":v[1];},clamp=function clamp(min,max,value){return _conditionalReturn(value,function(v){return _clamp(min,max,v);});},_slice=[].slice,_isArrayLike=function _isArrayLike(value,nonEmpty){return value&&_isObject(value)&&"length"in value&&(!nonEmpty&&!value.length||value.length-1 in value&&_isObject(value[0]))&&!value.nodeType&&value!==_win;},_flatten=function _flatten(ar,leaveStrings,accumulator){if(accumulator===void 0){accumulator=[];} 50return ar.forEach(function(value){var _accumulator;return _isString(value)&&!leaveStrings||_isArrayLike(value,1)?(_accumulator=accumulator).push.apply(_accumulator,toArray(value)):accumulator.push(value);})||accumulator;},toArray=function toArray(value,scope,leaveStrings){return _context&&!scope&&_context.selector?_context.selector(value):_isString(value)&&!leaveStrings&&(_coreInitted||!_wake())?_slice.call((scope||_doc).querySelectorAll(value),0):_isArray(value)?_flatten(value,leaveStrings):_isArrayLike(value)?_slice.call(value,0):value?[value]:[];},selector=function selector(value){value=toArray(value)[0]||_warn("Invalid scope")||{};return function(v){var el=value.current||value.nativeElement||value;return toArray(v,el.querySelectorAll?el:el===value?_warn("Invalid scope")||_doc.createElement("div"):value);};},shuffle=function shuffle(a){return a.sort(function(){return.5-Math.random();});},distribute=function distribute(v){if(_isFunction(v)){return v;} 51var vars=_isObject(v)?v:{each:v},ease=_parseEase(vars.ease),from=vars.from||0,base=parseFloat(vars.base)||0,cache={},isDecimal=from>0&&from<1,ratios=isNaN(from)||isDecimal,axis=vars.axis,ratioX=from,ratioY=from;if(_isString(from)){ratioX=ratioY={center:.5,edges:.5,end:1}[from]||0;}else if(!isDecimal&&ratios){ratioX=from[0];ratioY=from[1];} 52return function(i,target,a){var l=(a||vars).length,distances=cache[l],originX,originY,x,y,d,j,max,min,wrapAt;if(!distances){wrapAt=vars.grid==="auto"?0:(vars.grid||[1,_bigNum])[1];if(!wrapAt){max=-_bigNum;while(max<(max=a[wrapAt++].getBoundingClientRect().left)&&wrapAt<l){} 53wrapAt<l&&wrapAt--;} 54distances=cache[l]=[];originX=ratios?Math.min(wrapAt,l)*ratioX-.5:from%wrapAt;originY=wrapAt===_bigNum?0:ratios?l*ratioY/wrapAt-.5:from/wrapAt|0;max=0;min=_bigNum;for(j=0;j<l;j++){x=j%wrapAt-originX;y=originY-(j/wrapAt|0);distances[j]=d=!axis?_sqrt(x*x+y*y):Math.abs(axis==="y"?y:x);d>max&&(max=d);d<min&&(min=d);} 55from==="random"&&shuffle(distances);distances.max=max-min;distances.min=min;distances.v=l=(parseFloat(vars.amount)||parseFloat(vars.each)*(wrapAt>l?l-1:!axis?Math.max(wrapAt,l/wrapAt):axis==="y"?l/wrapAt:wrapAt)||0)*(from==="edges"?-1:1);distances.b=l<0?base-l:base;distances.u=getUnit(vars.amount||vars.each)||0;ease=ease&&l<0?_invertEase(ease):ease;} 56l=(distances[i]-distances.min)/distances.max||0;return _roundPrecise(distances.b+(ease?ease(l):l)*distances.v)+distances.u;};},_roundModifier=function _roundModifier(v){var p=Math.pow(10,((v+"").split(".")[1]||"").length);return function(raw){var n=_roundPrecise(Math.round(parseFloat(raw)/v)*v*p);return(n-n%1)/p+(_isNumber(raw)?0:getUnit(raw));};},snap=function snap(snapTo,value){var isArray=_isArray(snapTo),radius,is2D;if(!isArray&&_isObject(snapTo)){radius=isArray=snapTo.radius||_bigNum;if(snapTo.values){snapTo=toArray(snapTo.values);if(is2D=!_isNumber(snapTo[0])){radius*=radius;}}else{snapTo=_roundModifier(snapTo.increment);}} 57return _conditionalReturn(value,!isArray?_roundModifier(snapTo):_isFunction(snapTo)?function(raw){is2D=snapTo(raw);return Math.abs(is2D-raw)<=radius?is2D:raw;}:function(raw){var x=parseFloat(is2D?raw.x:raw),y=parseFloat(is2D?raw.y:0),min=_bigNum,closest=0,i=snapTo.length,dx,dy;while(i--){if(is2D){dx=snapTo[i].x-x;dy=snapTo[i].y-y;dx=dx*dx+dy*dy;}else{dx=Math.abs(snapTo[i]-x);} 58if(dx<min){min=dx;closest=i;}} 59closest=!radius||min<=radius?snapTo[closest]:raw;return is2D||closest===raw||_isNumber(raw)?closest:closest+getUnit(raw);});},random=function random(min,max,roundingIncrement,returnFunction){return _conditionalReturn(_isArray(min)?!max:roundingIncrement===true?!!(roundingIncrement=0):!returnFunction,function(){return _isArray(min)?min[~~(Math.random()*min.length)]:(roundingIncrement=roundingIncrement||1e-5)&&(returnFunction=roundingIncrement<1?Math.pow(10,(roundingIncrement+"").length-2):1)&&Math.floor(Math.round((min-roundingIncrement/2+Math.random()*(max-min+roundingIncrement*.99))/roundingIncrement)*roundingIncrement*returnFunction)/returnFunction;});},pipe=function pipe(){for(var _len=arguments.length,functions=new Array(_len),_
vendor: 4,780 bytes, lines 59-70
59key=0;_key<_len;_key++){functions[_key]=arguments[_key];} 60return function(value){return functions.reduce(function(v,f){return f(v);},value);};},unitize=function unitize(func,unit){return function(value){return func(parseFloat(value))+(unit||getUnit(value));};},normalize=function normalize(min,max,value){return mapRange(min,max,0,1,value);},_wrapArray=function _wrapArray(a,wrapper,value){return _conditionalReturn(value,function(index){return a[~~wrapper(index)];});},wrap=function wrap(min,max,value){var range=max-min;return _isArray(min)?_wrapArray(min,wrap(0,min.length),max):_conditionalReturn(value,function(value){return(range+(value-min)%range)%range+min;});},wrapYoyo=function wrapYoyo(min,max,value){var range=max-min,total=range*2;return _isArray(min)?_wrapArray(min,wrapYoyo(0,min.length-1),max):_conditionalReturn(value,function(value){value=(total+(value-min)%total)%total||0;return min+(value>range?total-value:value);});},_replaceRandom=function _replaceRandom(value){var prev=0,s="",i,nums,end,isArray;while(~(i=value.indexOf("random(",prev))){end=value.indexOf(")",i);isArray=value.charAt(i+7)==="[";nums=value.substr(i+7,end-i-7).match(isArray?_delimitedValueExp:_strictNumExp);s+=value.substr(prev,i-prev)+random(isArray?nums:+nums[0],isArray?0:+nums[1],+nums[2]||1e-5);prev=end+1;} 61return s+value.substr(prev,value.length-prev);},mapRange=function mapRange(inMin,inMax,outMin,outMax,value){var inRange=inMax-inMin,outRange=outMax-outMin;return _conditionalReturn(value,function(value){return outMin+((value-inMin)/inRange*outRange||0);});},interpolate=function interpolate(start,end,progress,mutate){var func=isNaN(start+end)?0:function(p){return(1-p)*start+p*end;};if(!func){var isString=_isString(start),master={},p,i,interpolators,l,il;progress===true&&(mutate=1)&&(progress=null);if(isString){start={p:start};end={p:end};}else if(_isArray(start)&&!_isArray(end)){interpolators=[];l=start.length;il=l-2;for(i=1;i<l;i++){interpolators.push(interpolate(start[i-1],start[i]));} 62l--;func=function func(p){p*=l;var i=Math.min(il,~~p);return interpolators[i](p-i);};progress=end;}else if(!mutate){start=_merge(_isArray(start)?[]:{},start);} 63if(!interpolators){for(p in end){_addPropTween.call(master,start,p,"get",end[p]);} 64func=function func(p){return _renderPropTweens(p,master)||(isString?start.p:start);};}} 65return _conditionalReturn(progress,func);},_getLabelInDirection=function _getLabelInDirection(timeline,fromTime,backward){var labels=timeline.labels,min=_bigNum,p,distance,label;for(p in labels){distance=labels[p]-fromTime;if(distance<0===!!backward&&distance&&min>(distance=Math.abs(distance))){label=p;min=distance;}} 66return label;},_callback=function _callback(animation,type,executeLazyFirst){var v=animation.vars,callback=v[type],prevContext=_context,context=animation._ctx,params,scope,result;if(!callback){return;} 67params=v[type+"Params"];scope=v.callbackScope||animation;executeLazyFirst&&_lazyTweens.length&&_lazyRender();context&&(_context=context);result=params?callback.apply(scope,params):callback.call(scope);_context=prevContext;return result;},_interrupt=function _interrupt(animation){_removeFromParent(animation);animation.scrollTrigger&&animation.scrollTrigger.kill(!!_reverting);animation.progress()<1&&_callback(animation,"onInterrupt");return animation;},_quickTween,_registerPluginQueue=[],_createPlugin=function _createPlugin(config){if(!config)return;config=!config.name&&config["default"]||config;if(_windowExists()||config.headless){var name=config.name,isFunc=_isFunction(config),Plugin=name&&!isFunc&&config.init?function(){this._props=[];}:config,instanceDefaults={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},statics={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};_wake();if(config!==Plugin){if(_plugins[name]){return;} 68_setDefaults(Plugin,_setDefaults(_copyExcluding(config,instanceDefaults),statics));_merge(Plugin.prototype,_merge(instanceDefaults,_copyExcluding(config,statics)));_plugins[Plugin.prop=name]=Plugin;if(config.targetTest){_harnessPlugins.push(Plugin);_reservedProps[name]=1;} 69name=(name==="css"?"CSS":name.charAt(0).toUpperCase()+name.substr(1))+"Plugin";} 70_addGlobal(name,Plugin);config.register&&config.register(gsap,Plugin,PropTween);}else{_registerPluginQueue.push(config);}},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function _hue(h,m1,m2){h+=h<0?1:h>1?-1:0;
vendor: 3,799 bytes, lines 70-82
70return(h*6<1?m1+(m2-m1)*h*6:h<.5?m2:h*3<2?m1+(m2-m1)*(2/3-h)*6:m1)*_255+.5|0;},splitColor=function splitColor(v,toHSL,forceAlpha){var a=!v?_colorLookup.black:_isNumber(v)?[v>>16,v>>8&_255,v&_255]:0,r,g,b,h,s,l,max,min,d,wasHSL;if(!a){if(v.substr(-1)===","){v=v.substr(0,v.length-1);} 71if(_colorLookup[v]){a=_colorLookup[v];}else if(v.charAt(0)==="#"){if(v.length<6){r=v.charAt(1);g=v.charAt(2);b=v.charAt(3);v="#"+r+r+g+g+b+b+(v.length===5?v.charAt(4)+v.charAt(4):"");} 72if(v.length===9){a=parseInt(v.substr(1,6),16);return[a>>16,a>>8&_255,a&_255,parseInt(v.substr(7),16)/255];} 73v=parseInt(v.substr(1),16);a=[v>>16,v>>8&_255,v&_255];}else if(v.substr(0,3)==="hsl"){a=wasHSL=v.match(_strictNumExp);if(!toHSL){h=+a[0]%360/360;s=+a[1]/100;l=+a[2]/100;g=l<=.5?l*(s+1):l+s-l*s;r=l*2-g;a.length>3&&(a[3]*=1);a[0]=_hue(h+1/3,r,g);a[1]=_hue(h,r,g);a[2]=_hue(h-1/3,r,g);}else if(~v.indexOf("=")){a=v.match(_numExp);forceAlpha&&a.length<4&&(a[3]=1);return a;}}else{a=v.match(_strictNumExp)||_colorLookup.transparent;} 74a=a.map(Number);} 75if(toHSL&&!wasHSL){r=a[0]/_255;g=a[1]/_255;b=a[2]/_255;max=Math.max(r,g,b);min=Math.min(r,g,b);l=(max+min)/2;if(max===min){h=s=0;}else{d=max-min;s=l>0.5?d/(2-max-min):d/(max+min);h=max===r?(g-b)/d+(g<b?6:0):max===g?(b-r)/d+2:(r-g)/d+4;h*=60;} 76a[0]=~~(h+.5);a[1]=~~(s*100+.5);a[2]=~~(l*100+.5);} 77forceAlpha&&a.length<4&&(a[3]=1);return a;},_colorOrderData=function _colorOrderData(v){var values=[],c=[],i=-1;v.split(_colorExp).forEach(function(v){var a=v.match(_numWithUnitExp)||[];values.push.apply(values,a);c.push(i+=a.length+1);});values.c=c;return values;},_formatColors=function _formatColors(s,toHSL,orderMatchData){var result="",colors=(s+result).match(_colorExp),type=toHSL?"hsla(":"rgba(",i=0,c,shell,d,l;if(!colors){return s;} 78colors=colors.map(function(color){return(color=splitColor(color,toHSL,1))&&type+(toHSL?color[0]+","+color[1]+"%,"+color[2]+"%,"+color[3]:color.join(","))+")";});if(orderMatchData){d=_colorOrderData(s);c=orderMatchData.c;if(c.join(result)!==d.c.join(result)){shell=s.replace(_colorExp,"1").split(_numWithUnitExp);l=shell.length-1;for(;i<l;i++){result+=shell[i]+(~c.indexOf(i)?colors.shift()||type+"0,0,0,0)":(d.length?d:colors.length?colors:orderMatchData).shift());}}} 79if(!shell){shell=s.split(_colorExp);l=shell.length-1;for(;i<l;i++){result+=shell[i]+colors[i];}} 80return result+shell[l];},_colorExp=function(){var s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",p;for(p in _colorLookup){s+="|"+p+"\\b";} 81return new RegExp(s+")","gi");}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function _colorStringFilter(a){var combined=a.join(" "),toHSL;_colorExp.lastIndex=0;if(_colorExp.test(combined)){toHSL=_hslExp.test(combined);a[1]=_formatColors(a[1],toHSL);a[0]=_formatColors(a[0],toHSL,_colorOrderData(a[1]));return true;}},_tickerActive,_ticker=function(){var _getTime=Date.now,_lagThreshold=500,_adjustedLag=33,_startTime=_getTime(),_lastUpdate=_startTime,_gap=1000/240,_nextTime=_gap,_listeners=[],_id,_req,_raf,_self,_delta,_i,_tick=function _tick(v){var elapsed=_getTime()-_lastUpdate,manual=v===true,overlap,dispatch,time,frame;(elapsed>_lagThreshold||elapsed<0)&&(_startTime+=elapsed-_adjustedLag);_lastUpdate+=elapsed;time=_lastUpdate-_startTime;overlap=time-_nextTime;if(overlap>0||manual){frame=++_self.frame;_delta=time-_self.time*1000;_self.time=time=time/1000;_nextTime+=overlap+(overlap>=_gap?4:_gap-overlap);dispatch=1;} 82manual||(_id=_req(_tick));if(dispatch){for(_i=0;_i<_listeners.length;_i++){_listeners[_i](time,_delta,frame,v);}}};_self={time:0,frame:0,tick:function tick(){_tick(true);},deltaRatio:function deltaRatio(fps){return _delta/(1000/(fps||60));},wake:function wake(){if(_coreReady){if(!_coreInitted&&_windowExists()){_win=_coreInitted=window;_doc=_win.document||{};_globals.gsap=gsap;
vendor: 4,970 bytes, lines 82-88
82(_win.gsapVersions||(_win.gsapVersions=[])).push(gsap.version);_install(_installScope||_win.GreenSockGlobals||!_win.gsap&&_win||{});_registerPluginQueue.forEach(_createPlugin);} 83_raf=typeof requestAnimationFrame!=="undefined"&&requestAnimationFrame;_id&&_self.sleep();_req=_raf||function(f){return setTimeout(f,_nextTime-_self.time*1000+1|0);};_tickerActive=1;_tick(2);}},sleep:function sleep(){(_raf?cancelAnimationFrame:clearTimeout)(_id);_tickerActive=0;_req=_emptyFunc;},lagSmoothing:function lagSmoothing(threshold,adjustedLag){_lagThreshold=threshold||Infinity;_adjustedLag=Math.min(adjustedLag||33,_lagThreshold);},fps:function fps(_fps){_gap=1000/(_fps||240);_nextTime=_self.time*1000+_gap;},add:function add(callback,once,prioritize){var func=once?function(t,d,f,v){callback(t,d,f,v);_self.remove(func);}:callback;_self.remove(callback);_listeners[prioritize?"unshift":"push"](func);_wake();return func;},remove:function remove(callback,i){~(i=_listeners.indexOf(callback))&&_listeners.splice(i,1)&&_i>=i&&_i--;},_listeners:_listeners};return _self;}(),_wake=function _wake(){return!_tickerActive&&_ticker.wake();},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function _parseObjectInString(value){var obj={},split=value.substr(1,value.length-3).split(":"),key=split[0],i=1,l=split.length,index,val,parsedVal;for(;i<l;i++){val=split[i];index=i!==l-1?val.lastIndexOf(","):val.length;parsedVal=val.substr(0,index);obj[key]=isNaN(parsedVal)?parsedVal.replace(_quotesExp,"").trim():+parsedVal;key=val.substr(index+1).trim();} 84return obj;},_valueInParentheses=function _valueInParentheses(value){var open=value.indexOf("(")+1,close=value.indexOf(")"),nested=value.indexOf("(",open);return value.substring(open,~nested&&nested<close?value.indexOf(")",close+1):close);},_configEaseFromString=function _configEaseFromString(name){var split=(name+"").split("("),ease=_easeMap[split[0]];return ease&&split.length>1&&ease.config?ease.config.apply(null,~name.indexOf("{")?[_parseObjectInString(split[1])]:_valueInParentheses(name).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(name)?_easeMap._CE("",name):ease;},_invertEase=function _invertEase(ease){return function(p){return 1-ease(1-p);};},_propagateYoyoEase=function _propagateYoyoEase(timeline,isYoyo){var child=timeline._first,ease;while(child){if(child instanceof Timeline){_propagateYoyoEase(child,isYoyo);}else if(child.vars.yoyoEase&&(!child._yoyo||!child._repeat)&&child._yoyo!==isYoyo){if(child.timeline){_propagateYoyoEase(child.timeline,isYoyo);}else{ease=child._ease;child._ease=child._yEase;child._yEase=ease;child._yoyo=isYoyo;}} 85child=child._next;}},_parseEase=function _parseEase(ease,defaultEase){return!ease?defaultEase:(_isFunction(ease)?ease:_easeMap[ease]||_configEaseFromString(ease))||defaultEase;},_insertEase=function _insertEase(names,easeIn,easeOut,easeInOut){if(easeOut===void 0){easeOut=function easeOut(p){return 1-easeIn(1-p);};} 86if(easeInOut===void 0){easeInOut=function easeInOut(p){return p<.5?easeIn(p*2)/2:1-easeIn((1-p)*2)/2;};} 87var ease={easeIn:easeIn,easeOut:easeOut,easeInOut:easeInOut},lowercaseName;_forEachName(names,function(name){_easeMap[name]=_globals[name]=ease;_easeMap[lowercaseName=name.toLowerCase()]=easeOut;for(var p in ease){_easeMap[lowercaseName+(p==="easeIn"?".in":p==="easeOut"?".out":".inOut")]=_easeMap[name+"."+p]=ease[p];}});return ease;},_easeInOutFromOut=function _easeInOutFromOut(easeOut){return function(p){return p<.5?(1-easeOut(1-p*2))/2:.5+easeOut((p-.5)*2)/2;};},_configElastic=function _configElastic(type,amplitude,period){var p1=amplitude>=1?amplitude:1,p2=(period||(type?.3:.45))/(amplitude<1?amplitude:1),p3=p2/_2PI*(Math.asin(1/p1)||0),easeOut=function easeOut(p){return p===1?1:p1*Math.pow(2,-10*p)*_sin((p-p3)*p2)+1;},ease=type==="out"?easeOut:type==="in"?function(p){return 1-easeOut(1-p);}:_easeInOutFromOut(easeOut);p2=_2PI/p2;ease.config=function(amplitude,period){return _configElastic(type,amplitude,period);};return ease;},_configBack=function _configBack(type,overshoot){if(overshoot===void 0){overshoot=1.70158;} 88var easeOut=function easeOut(p){return p?--p*p*((overshoot+1)*p+overshoot)+1:0;},ease=type==="out"?easeOut:type==="in"?function(p){return 1-easeOut(1-p);}:_easeInOutFromOut(easeOut);ease.config=function(overshoot){return _configBack(type,overshoot);};return ease;};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(name,i){var power=i<5?i+1:i;_insertEase(name+",Power"+(power-1),i?function(p){return Math.pow(p,power);}:function(p){return p;},function(p){return 1-Math.pow(1-p,power);},function(p){return p<.5?Math.pow(p*2,power)/2:1-Math.pow((1-p)*2,power)/2;});});_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn;_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic());(function(n,c){var n1=1/c,n2=2*n1,n3=2.5*n1,easeOut=function easeOut(p){return p<n1?n*p*p:p<n2?n*Math.pow(p-1.5/c,2)+.75:p<n3?n*(
vendor: 20,921 bytes, lines 88-160
88p-=2.25/c)*p+.9375:n*Math.pow(p-2.625/c,2)+.984375;};_insertEase("Bounce",function(p){return 1-easeOut(1-p);},easeOut);})(7.5625,2.75);_insertEase("Expo",function(p){return p?Math.pow(2,10*(p-1)):0;});_insertEase("Circ",function(p){return-(_sqrt(1-p*p)-1);});_insertEase("Sine",function(p){return p===1?1:-_cos(p*_HALF_PI)+1;});_insertEase("Back",_configBack("in"),_configBack("out"),_configBack());_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function config(steps,immediateStart){if(steps===void 0){steps=1;} 89var p1=1/steps,p2=steps+(immediateStart?0:1),p3=immediateStart?1:0,max=1-_tinyNum;return function(p){return((p2*_clamp(0,max,p)|0)+p3)*p1;};}};_defaults.ease=_easeMap["quad.out"];_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(name){return _callbackNames+=name+","+name+"Params,";});var GSCache=function GSCache(target,harness){this.id=_gsID++;target._gsap=this;this.target=target;this.harness=harness;this.get=harness?harness.get:_getProperty;this.set=harness?harness.getSetter:_getSetter;};var Animation=function(){function Animation(vars){this.vars=vars;this._delay=+vars.delay||0;if(this._repeat=vars.repeat===Infinity?-2:vars.repeat||0){this._rDelay=vars.repeatDelay||0;this._yoyo=!!vars.yoyo||!!vars.yoyoEase;} 90this._ts=1;_setDuration(this,+vars.duration,1,1);this.data=vars.data;if(_context){this._ctx=_context;_context.data.push(this);} 91_tickerActive||_ticker.wake();} 92var _proto=Animation.prototype;_proto.delay=function delay(value){if(value||value===0){this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+value-this._delay);this._delay=value;return this;} 93return this._delay;};_proto.duration=function duration(value){return arguments.length?this.totalDuration(this._repeat>0?value+(value+this._rDelay)*this._repeat:value):this.totalDuration()&&this._dur;};_proto.totalDuration=function totalDuration(value){if(!arguments.length){return this._tDur;} 94this._dirty=0;return _setDuration(this,this._repeat<0?value:(value-this._repeat*this._rDelay)/(this._repeat+1));};_proto.totalTime=function totalTime(_totalTime,suppressEvents){_wake();if(!arguments.length){return this._tTime;} 95var parent=this._dp;if(parent&&parent.smoothChildTiming&&this._ts){_alignPlayhead(this,_totalTime);!parent._dp||parent.parent||_postAddChecks(parent,this);while(parent&&parent.parent){if(parent.parent._time!==parent._start+(parent._ts>=0?parent._tTime/parent._ts:(parent.totalDuration()-parent._tTime)/-parent._ts)){parent.totalTime(parent._tTime,true);} 96parent=parent.parent;} 97if(!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&_totalTime<this._tDur||this._ts<0&&_totalTime>0||!this._tDur&&!_totalTime)){_addToTimeline(this._dp,this,this._start-this._delay);}} 98if(this._tTime!==_totalTime||!this._dur&&!suppressEvents||this._initted&&Math.abs(this._zTime)===_tinyNum||!_totalTime&&!this._initted&&(this.add||this._ptLookup)){this._ts||(this._pTime=_totalTime);_lazySafeRender(this,_totalTime,suppressEvents);} 99return this;};_proto.time=function time(value,suppressEvents){return arguments.length?this.totalTime(Math.min(this.totalDuration(),value+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(value?this._dur:0),suppressEvents):this._time;};_proto.totalProgress=function totalProgress(value,suppressEvents){return arguments.length?this.totalTime(this.totalDuration()*value,suppressEvents):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0;};_proto.progress=function progress(value,suppressEvents){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-value:value)+_elapsedCycleDuration(this),suppressEvents):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0;};_proto.iteration=function iteration(value,suppressEvents){var cycleDuration=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(value-1)*cycleDuration,suppressEvents):this._repeat?_animationCycle(this._tTime,cycleDuration)+1:1;};_proto.timeScale=function timeScale(value,suppressEvents){if(!arguments.length){return this._rts===-_tinyNum?0:this._rts;} 100if(this._rts===value){return this;} 101var tTime=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;this._rts=+value||0;this._ts=this._ps||value===-_tinyNum?0:this._rts;this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,tTime),suppressEvents!==false);_setEnd(this);return _recacheAncestors(this);};_proto.paused=function paused(value){if(!arguments.length){return this._ps;} 102if(this._ps!==value){this._ps=value;if(value){this._pTime=this._tTime||Math.max(-this._delay,this.rawTime());this._ts=this._act=0;}else{_wake();this._ts=this._rts;this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum));}} 103return this;};_proto.startTime=function startTime(value){if(arguments.length){this._start=value;var parent=this.parent||this._dp;parent&&(parent._sort||!this.parent)&&_addToTimeline(parent,this,value-this._delay);return this;} 104return this._start;};_proto.endTime=function endTime(includeRepeats){return this._start+(_isNotFalse(includeRepeats)?this.totalDuration():this.duration())/Math.abs(this._ts||1);};_proto.rawTime=function rawTime(wrapRepeats){var parent=this.parent||this._dp;return!parent?this._tTime:wrapRepeats&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):!this._ts?this._tTime:_parentToChildTotalTime(parent.rawTime(wrapRepeats),this);};_proto.revert=function revert(config){if(config===void 0){config=_revertConfig;} 105var prevIsReverting=_reverting;_reverting=config;if(this._initted||this._startAt){this.timeline&&this.timeline.revert(config);this.totalTime(-0.01,config.suppressEvents);} 106this.data!=="nested"&&config.kill!==false&&this.kill();_reverting=prevIsReverting;return this;};_proto.globalTime=function globalTime(rawTime){var animation=this,time=arguments.length?rawTime:animation.rawTime();while(animation){time=animation._start+time/(Math.abs(animation._ts)||1);animation=animation._dp;} 107return!this.parent&&this._sat?this._sat.globalTime(rawTime):time;};_proto.repeat=function repeat(value){if(arguments.length){this._repeat=value===Infinity?-2:value;return _onUpdateTotalDuration(this);} 108return this._repeat===-2?Infinity:this._repeat;};_proto.repeatDelay=function repeatDelay(value){if(arguments.length){var time=this._time;this._rDelay=value;_onUpdateTotalDuration(this);return time?this.time(time):this;} 109return this._rDelay;};_proto.yoyo=function yoyo(value){if(arguments.length){this._yoyo=value;return this;} 110return this._yoyo;};_proto.seek=function seek(position,suppressEvents){return this.totalTime(_parsePosition(this,position),_isNotFalse(suppressEvents));};_proto.restart=function restart(includeDelay,suppressEvents){return this.play().totalTime(includeDelay?-this._delay:0,_isNotFalse(suppressEvents));};_proto.play=function play(from,suppressEvents){from!=null&&this.seek(from,suppressEvents);return this.reversed(false).paused(false);};_proto.reverse=function reverse(from,suppressEvents){from!=null&&this.seek(from||this.totalDuration(),suppressEvents);return this.reversed(true).paused(false);};_proto.pause=function pause(atTime,suppressEvents){atTime!=null&&this.seek(atTime,suppressEvents);return this.paused(true);};_proto.resume=function resume(){return this.paused(false);};_proto.reversed=function reversed(value){if(arguments.length){!!value!==this.reversed()&&this.timeScale(-this._rts||(value?-_tinyNum:0));return this;} 111return this._rts<0;};_proto.invalidate=function invalidate(){this._initted=this._act=0;this._zTime=-_tinyNum;return this;};_proto.isActive=function isActive(){var parent=this.parent||this._dp,start=this._start,rawTime;return!!(!parent||this._ts&&this._initted&&parent.isActive()&&(rawTime=parent.rawTime(true))>=start&&rawTime<this.endTime(true)-_tinyNum);};_proto.eventCallback=function eventCallback(type,callback,params){var vars=this.vars;if(arguments.length>1){if(!callback){delete vars[type];}else{vars[type]=callback;params&&(vars[type+"Params"]=params);type==="onUpdate"&&(this._onUpdate=callback);} 112return this;} 113return vars[type];};_proto.then=function then(onFulfilled){var self=this;return new Promise(function(resolve){var f=_isFunction(onFulfilled)?onFulfilled:_passThrough,_resolve=function _resolve(){var _then=self.then;self.then=null;_isFunction(f)&&(f=f(self))&&(f.then||f===self)&&(self.then=_then);resolve(f);self.then=_then;};if(self._initted&&self.totalProgress()===1&&self._ts>=0||!self._tTime&&self._ts<0){_resolve();}else{self._prom=_resolve;}});};_proto.kill=function kill(){_interrupt(this);};return Animation;}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:false,parent:null,_initted:false,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:false,_rts:1});var Timeline=function(_Animation){_inheritsLoose(Timeline,_Animation);function Timeline(vars,position){var _this;if(vars===void 0){vars={};} 114_this=_Animation.call(this,vars)||this;_this.labels={};_this.smoothChildTiming=!!vars.smoothChildTiming;_this.autoRemoveChildren=!!vars.autoRemoveChildren;_this._sort=_isNotFalse(vars.sortChildren);_globalTimeline&&_addToTimeline(vars.parent||_globalTimeline,_assertThisInitialized(_this),position);vars.reversed&&_this.reverse();vars.paused&&_this.paused(true);vars.scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this),vars.scrollTrigger);return _this;} 115var _proto2=Timeline.prototype;_proto2.to=function to(targets,vars,position){_createTweenType(0,arguments,this);return this;};_proto2.from=function from(targets,vars,position){_createTweenType(1,arguments,this);return this;};_proto2.fromTo=function fromTo(targets,fromVars,toVars,position){_createTweenType(2,arguments,this);return this;};_proto2.set=function set(targets,vars,position){vars.duration=0;vars.parent=this;_inheritDefaults(vars).repeatDelay||(vars.repeat=0);vars.immediateRender=!!vars.immediateRender;new Tween(targets,vars,_parsePosition(this,position),1);return this;};_proto2.call=function call(callback,params,position){return _addToTimeline(this,Tween.delayedCall(0,callback,params),position);};_proto2.staggerTo=function staggerTo(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams){vars.duration=duration;vars.stagger=vars.stagger||stagger;vars.onComplete=onCompleteAll;vars.onCompleteParams=onCompleteAllParams;vars.parent=this;new Tween(targets,vars,_parsePosition(this,position));return this;};_proto2.staggerFrom=function staggerFrom(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams){vars.runBackwards=1;_inheritDefaults(vars).immediateRender=_isNotFalse(vars.immediateRender);return this.staggerTo(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams);};_proto2.staggerFromTo=function staggerFromTo(targets,duration,fromVars,toVars,stagger,position,onCompleteAll,onCompleteAllParams){toVars.startAt=fromVars;_inheritDefaults(toVars).immediateRender=_isNotFalse(toVars.immediateRender);return this.staggerTo(targets,duration,toVars,stagger,position,onCompleteAll,onCompleteAllParams);};_proto2.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._dirty?this.totalDuration():this._tDur,dur=this._dur,tTime=totalTime<=0?0:_roundPrecise(totalTime),crossingStart=this._zTime<0!==totalTime<0&&(this._initted||!dur),time,child,next,iteration,cycleDuration,prevPaused,pauseTween,timeScale,prevStart,prevIteration,yoyo,isYoyo;this!==_globalTimeline&&tTime>tDur&&totalTime>=0&&(tTime=tDur);if(tTime!==this._tTime||force||crossingStart){if(prevTime!==this._time&&dur){tTime+=this._time-prevTime;totalTime+=this._time-prevTime;} 116time=tTime;prevStart=this._start;timeScale=this._ts;prevPaused=!timeScale;if(crossingStart){dur||(prevTime=this._zTime);(totalTime||!suppressEvents)&&(this._zTime=totalTime);} 117if(this._repeat){yoyo=this._yoyo;cycleDuration=dur+this._rDelay;if(this._repeat<-1&&totalTime<0){return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force);} 118time=_roundPrecise(tTime%cycleDuration);if(tTime===tDur){iteration=this._repeat;time=dur;}else{iteration=~~(tTime/cycleDuration);if(iteration&&iteration===tTime/cycleDuration){time=dur;iteration--;} 119time>dur&&(time=dur);} 120prevIteration=_animationCycle(this._tTime,cycleDuration);!prevTime&&this._tTime&&prevIteration!==iteration&&this._tTime-prevIteration*cycleDuration-this._dur<=0&&(prevIteration=iteration);if(yoyo&&iteration&1){time=dur-time;isYoyo=1;} 121if(iteration!==prevIteration&&!this._lock){var rewinding=yoyo&&prevIteration&1,doesWrap=rewinding===(yoyo&&iteration&1);iteration<prevIteration&&(rewinding=!rewinding);prevTime=rewinding?0:tTime%dur?dur:tTime;this._lock=1;this.render(prevTime||(isYoyo?0:_roundPrecise(iteration*cycleDuration)),suppressEvents,!dur)._lock=0;this._tTime=tTime;!suppressEvents&&this.parent&&_callback(this,"onRepeat");this.vars.repeatRefresh&&!isYoyo&&(this.invalidate()._lock=1);if(prevTime&&prevTime!==this._time||prevPaused!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act){return this;} 122dur=this._dur;tDur=this._tDur;if(doesWrap){this._lock=2;prevTime=rewinding?dur:-0.0001;this.render(prevTime,true);this.vars.repeatRefresh&&!isYoyo&&this.invalidate();} 123this._lock=0;if(!this._ts&&!prevPaused){return this;} 124_propagateYoyoEase(this,isYoyo);}} 125if(this._hasPause&&!this._forcing&&this._lock<2){pauseTween=_findNextPauseTween(this,_roundPrecise(prevTime),_roundPrecise(time));if(pauseTween){tTime-=time-(time=pauseTween._start);}} 126this._tTime=tTime;this._time=time;this._act=!timeScale;if(!this._initted){this._onUpdate=this.vars.onUpdate;this._initted=1;this._zTime=totalTime;prevTime=0;} 127if(!prevTime&&time&&!suppressEvents&&!iteration){_callback(this,"onStart");if(this._tTime!==tTime){return this;}} 128if(time>=prevTime&&totalTime>=0){child=this._first;while(child){next=child._next;if((child._act||time>=child._start)&&child._ts&&pauseTween!==child){if(child.parent!==this){return this.render(totalTime,suppressEvents,force);} 129child.render(child._ts>0?(time-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(time-child._start)*child._ts,suppressEvents,force);if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0;next&&(tTime+=this._zTime=-_tinyNum);break;}} 130child=next;}}else{child=this._last;var adjustedTime=totalTime<0?totalTime:time;while(child){next=child._prev;if((child._act||adjustedTime<=child._end)&&child._ts&&pauseTween!==child){if(child.parent!==this){return this.render(totalTime,suppressEvents,force);} 131child.render(child._ts>0?(adjustedTime-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(adjustedTime-child._start)*child._ts,suppressEvents,force||_reverting&&(child._initted||child._startAt));if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0;next&&(tTime+=this._zTime=adjustedTime?-_tinyNum:_tinyNum);break;}} 132child=next;}} 133if(pauseTween&&!suppressEvents){this.pause();pauseTween.render(time>=prevTime?0:-_tinyNum)._zTime=time>=prevTime?1:-1;if(this._ts){this._start=prevStart;_setEnd(this);return this.render(totalTime,suppressEvents,force);}} 134this._onUpdate&&!suppressEvents&&_callback(this,"onUpdate",true);if(tTime===tDur&&this._tTime>=this.totalDuration()||!tTime&&prevTime)if(prevStart===this._start||Math.abs(timeScale)!==Math.abs(this._ts))if(!this._lock){(totalTime||!dur)&&(tTime===tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1);if(!suppressEvents&&!(totalTime<0&&!prevTime)&&(tTime||prevTime||!tDur)){_callback(this,tTime===tDur&&totalTime>=0?"onComplete":"onReverseComplete",true);this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom();}}} 135return this;};_proto2.add=function add(child,position){var _this2=this;_isNumber(position)||(position=_parsePosition(this,position,child));if(!(child instanceof Animation)){if(_isArray(child)){child.forEach(function(obj){return _this2.add(obj,position);});return this;} 136if(_isString(child)){return this.addLabel(child,position);} 137if(_isFunction(child)){child=Tween.delayedCall(0,child);}else{return this;}} 138return this!==child?_addToTimeline(this,child,position):this;};_proto2.getChildren=function getChildren(nested,tweens,timelines,ignoreBeforeTime){if(nested===void 0){nested=true;} 139if(tweens===void 0){tweens=true;} 140if(timelines===void 0){timelines=true;} 141if(ignoreBeforeTime===void 0){ignoreBeforeTime=-_bigNum;} 142var a=[],child=this._first;while(child){if(child._start>=ignoreBeforeTime){if(child instanceof Tween){tweens&&a.push(child);}else{timelines&&a.push(child);nested&&a.push.apply(a,child.getChildren(true,tweens,timelines));}} 143child=child._next;} 144return a;};_proto2.getById=function getById(id){var animations=this.getChildren(1,1,1),i=animations.length;while(i--){if(animations[i].vars.id===id){return animations[i];}}};_proto2.remove=function remove(child){if(_isString(child)){return this.removeLabel(child);} 145if(_isFunction(child)){return this.killTweensOf(child);} 146_removeLinkedListItem(this,child);if(child===this._recent){this._recent=this._last;} 147return _uncache(this);};_proto2.totalTime=function totalTime(_totalTime2,suppressEvents){if(!arguments.length){return this._tTime;} 148this._forcing=1;if(!this._dp&&this._ts){this._start=_roundPrecise(_ticker.time-(this._ts>0?_totalTime2/this._ts:(this.totalDuration()-_totalTime2)/-this._ts));} 149_Animation.prototype.totalTime.call(this,_totalTime2,suppressEvents);this._forcing=0;return this;};_proto2.addLabel=function addLabel(label,position){this.labels[label]=_parsePosition(this,position);return this;};_proto2.removeLabel=function removeLabel(label){delete this.labels[label];return this;};_proto2.addPause=function addPause(position,callback,params){var t=Tween.delayedCall(0,callback||_emptyFunc,params);t.data="isPause";this._hasPause=1;return _addToTimeline(this,t,_parsePosition(this,position));};_proto2.removePause=function removePause(position){var child=this._first;position=_parsePosition(this,position);while(child){if(child._start===position&&child.data==="isPause"){_removeFromParent(child);} 150child=child._next;}};_proto2.killTweensOf=function killTweensOf(targets,props,onlyActive){var tweens=this.getTweensOf(targets,onlyActive),i=tweens.length;while(i--){_overwritingTween!==tweens[i]&&tweens[i].kill(targets,props);} 151return this;};_proto2.getTweensOf=function getTweensOf(targets,onlyActive){var a=[],parsedTargets=toArray(targets),child=this._first,isGlobalTime=_isNumber(onlyActive),children;while(child){if(child instanceof Tween){if(_arrayContainsAny(child._targets,parsedTargets)&&(isGlobalTime?(!_overwritingTween||child._initted&&child._ts)&&child.globalTime(0)<=onlyActive&&child.globalTime(child.totalDuration())>onlyActive:!onlyActive||child.isActive())){a.push(child);}}else if((children=child.getTweensOf(parsedTargets,onlyActive)).length){a.push.apply(a,children);} 152child=child._next;} 153return a;};_proto2.tweenTo=function tweenTo(position,vars){vars=vars||{};var tl=this,endTime=_parsePosition(tl,position),_vars=vars,startAt=_vars.startAt,_onStart=_vars.onStart,onStartParams=_vars.onStartParams,immediateRender=_vars.immediateRender,initted,tween=Tween.to(tl,_setDefaults({ease:vars.ease||"none",lazy:false,immediateRender:false,time:endTime,overwrite:"auto",duration:vars.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale())||_tinyNum,onStart:function onStart(){tl.pause();if(!initted){var duration=vars.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale());tween._dur!==duration&&_setDuration(tween,duration,0,1).render(tween._time,true,true);initted=1;} 154_onStart&&_onStart.apply(tween,onStartParams||[]);}},vars));return immediateRender?tween.render(0):tween;};_proto2.tweenFromTo=function tweenFromTo(fromPosition,toPosition,vars){return this.tweenTo(toPosition,_setDefaults({startAt:{time:_parsePosition(this,fromPosition)}},vars));};_proto2.recent=function recent(){return this._recent;};_proto2.nextLabel=function nextLabel(afterTime){if(afterTime===void 0){afterTime=this._time;} 155return _getLabelInDirection(this,_parsePosition(this,afterTime));};_proto2.previousLabel=function previousLabel(beforeTime){if(beforeTime===void 0){beforeTime=this._time;} 156return _getLabelInDirection(this,_parsePosition(this,beforeTime),1);};_proto2.currentLabel=function currentLabel(value){return arguments.length?this.seek(value,true):this.previousLabel(this._time+_tinyNum);};_proto2.shiftChildren=function shiftChildren(amount,adjustLabels,ignoreBeforeTime){if(ignoreBeforeTime===void 0){ignoreBeforeTime=0;} 157var child=this._first,labels=this.labels,p;while(child){if(child._start>=ignoreBeforeTime){child._start+=amount;child._end+=amount;} 158child=child._next;} 159if(adjustLabels){for(p in labels){if(labels[p]>=ignoreBeforeTime){labels[p]+=amount;}}} 160return _uncache(this);};
vendor: 5,435 bytes, lines 160-182
160_proto2.invalidate=function invalidate(soft){var child=this._first;this._lock=0;while(child){child.invalidate(soft);child=child._next;} 161return _Animation.prototype.invalidate.call(this,soft);};_proto2.clear=function clear(includeLabels){if(includeLabels===void 0){includeLabels=true;} 162var child=this._first,next;while(child){next=child._next;this.remove(child);child=next;} 163this._dp&&(this._time=this._tTime=this._pTime=0);includeLabels&&(this.labels={});return _uncache(this);};_proto2.totalDuration=function totalDuration(value){var max=0,self=this,child=self._last,prevStart=_bigNum,prev,start,parent;if(arguments.length){return self.timeScale((self._repeat<0?self.duration():self.totalDuration())/(self.reversed()?-value:value));} 164if(self._dirty){parent=self.parent;while(child){prev=child._prev;child._dirty&&child.totalDuration();start=child._start;if(start>prevStart&&self._sort&&child._ts&&!self._lock){self._lock=1;_addToTimeline(self,child,start-child._delay,1)._lock=0;}else{prevStart=start;} 165if(start<0&&child._ts){max-=start;if(!parent&&!self._dp||parent&&parent.smoothChildTiming){self._start+=start/self._ts;self._time-=start;self._tTime-=start;} 166self.shiftChildren(-start,false,-1e999);prevStart=0;} 167child._end>max&&child._ts&&(max=child._end);child=prev;} 168_setDuration(self,self===_globalTimeline&&self._time>max?self._time:max,1,1);self._dirty=0;} 169return self._tDur;};Timeline.updateRoot=function updateRoot(time){if(_globalTimeline._ts){_lazySafeRender(_globalTimeline,_parentToChildTotalTime(time,_globalTimeline));_lastRenderedFrame=_ticker.frame;} 170if(_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var child=_globalTimeline._first;if(!child||!child._ts)if(_config.autoSleep&&_ticker._listeners.length<2){while(child&&!child._ts){child=child._next;} 171child||_ticker.sleep();}}};return Timeline;}(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function _addComplexStringPropTween(target,prop,start,end,setter,stringFilter,funcParam){var pt=new PropTween(this._pt,target,prop,0,1,_renderComplexString,null,setter),index=0,matchIndex=0,result,startNums,color,endNum,chunk,startNum,hasRandom,a;pt.b=start;pt.e=end;start+="";end+="";if(hasRandom=~end.indexOf("random(")){end=_replaceRandom(end);} 172if(stringFilter){a=[start,end];stringFilter(a,target,prop);start=a[0];end=a[1];} 173startNums=start.match(_complexStringNumExp)||[];while(result=_complexStringNumExp.exec(end)){endNum=result[0];chunk=end.substring(index,result.index);if(color){color=(color+1)%5;}else if(chunk.substr(-5)==="rgba("){color=1;} 174if(endNum!==startNums[matchIndex++]){startNum=parseFloat(startNums[matchIndex-1])||0;pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum.charAt(1)==="="?_parseRelative(startNum,endNum)-startNum:parseFloat(endNum)-startNum,m:color&&color<4?Math.round:0};index=_complexStringNumExp.lastIndex;}} 175pt.c=index<end.length?end.substring(index,end.length):"";pt.fp=funcParam;if(_relExp.test(end)||hasRandom){pt.e=0;} 176this._pt=pt;return pt;},_addPropTween=function _addPropTween(target,prop,start,end,index,targets,modifier,stringFilter,funcParam,optional){_isFunction(end)&&(end=end(index||0,target,targets));var currentValue=target[prop],parsedStart=start!=="get"?start:!_isFunction(currentValue)?currentValue:funcParam?target[prop.indexOf("set")||!_isFunction(target["get"+prop.substr(3)])?prop:"get"+prop.substr(3)](funcParam):target[prop](),setter=!_isFunction(currentValue)?_setterPlain:funcParam?_setterFuncWithParam:_setterFunc,pt;if(_isString(end)){if(~end.indexOf("random(")){end=_replaceRandom(end);} 177if(end.charAt(1)==="="){pt=_parseRelative(parsedStart,end)+(getUnit(parsedStart)||0);if(pt||pt===0){end=pt;}}} 178if(!optional||parsedStart!==end||_forceAllPropTweens){if(!isNaN(parsedStart*end)&&end!==""){pt=new PropTween(this._pt,target,prop,+parsedStart||0,end-(parsedStart||0),typeof currentValue==="boolean"?_renderBoolean:_renderPlain,0,setter);funcParam&&(pt.fp=funcParam);modifier&&pt.modifier(modifier,this,target);return this._pt=pt;} 179!currentValue&&!(prop in target)&&_missingPlugin(prop,end);return _addComplexStringPropTween.call(this,target,prop,parsedStart,end,setter,stringFilter||_config.stringFilter,funcParam);}},_processVars=function _processVars(vars,index,target,targets,tween){_isFunction(vars)&&(vars=_parseFuncOrString(vars,tween,index,target,targets));if(!_isObject(vars)||vars.style&&vars.nodeType||_isArray(vars)||_isTypedArray(vars)){return _isString(vars)?_parseFuncOrString(vars,tween,index,target,targets):vars;} 180var copy={},p;for(p in vars){copy[p]=_parseFuncOrString(vars[p],tween,index,target,targets);} 181return copy;},_checkPlugin=function _checkPlugin(property,vars,tween,index,target,targets){var plugin,pt,ptLookup,i;if(_plugins[property]&&(plugin=new _plugins[property]()).init(target,plugin.rawVars?vars[property]:_processVars(vars[property],index,target,targets,tween),tween,index,targets)!==false){tween._pt=pt=new PropTween(tween._pt,target,property,0,1,plugin.render,plugin,0,plugin.priority);if(tween!==_quickTween){ptLookup=tween._ptLookup[tween._targets.indexOf(target)];i=plugin._props.length;while(i--){ptLookup[plugin._props[i]]=pt;}}} 182return plugin;},_overwritingTween,_forceAllPropTweens,_initTween=function _initTween(tween,time,tTime){var vars=tween.vars,ease=vars.ease,startAt=vars.startAt,immediateRender=vars.immediateRender,lazy=vars.lazy,onUpdate=vars.onUp
vendor: 5,094 bytes, lines 182-195
182date,runBackwards=vars.runBackwards,yoyoEase=vars.yoyoEase,keyframes=vars.keyframes,autoRevert=vars.autoRevert,dur=tween._dur,prevStartAt=tween._startAt,targets=tween._targets,parent=tween.parent,fullTargets=parent&&parent.data==="nested"?parent.vars.targets:targets,autoOverwrite=tween._overwrite==="auto"&&!_suppressOverwrites,tl=tween.timeline,cleanVars,i,p,pt,target,hasPriority,gsData,harness,plugin,ptLookup,index,harnessVars,overwritten;tl&&(!keyframes||!ease)&&(ease="none");tween._ease=_parseEase(ease,_defaults.ease);tween._yEase=yoyoEase?_invertEase(_parseEase(yoyoEase===true?ease:yoyoEase,_defaults.ease)):0;if(yoyoEase&&tween._yoyo&&!tween._repeat){yoyoEase=tween._yEase;tween._yEase=tween._ease;tween._ease=yoyoEase;} 183tween._from=!tl&&!!vars.runBackwards;if(!tl||keyframes&&!vars.stagger){harness=targets[0]?_getCache(targets[0]).harness:0;harnessVars=harness&&vars[harness.prop];cleanVars=_copyExcluding(vars,_reservedProps);if(prevStartAt){prevStartAt._zTime<0&&prevStartAt.progress(1);time<0&&runBackwards&&immediateRender&&!autoRevert?prevStartAt.render(-1,true):prevStartAt.revert(runBackwards&&dur?_revertConfigNoKill:_startAtRevertConfig);prevStartAt._lazy=0;} 184if(startAt){_removeFromParent(tween._startAt=Tween.set(targets,_setDefaults({data:"isStart",overwrite:false,parent:parent,immediateRender:true,lazy:!prevStartAt&&_isNotFalse(lazy),startAt:null,delay:0,onUpdate:onUpdate&&function(){return _callback(tween,"onUpdate");},stagger:0},startAt)));tween._startAt._dp=0;tween._startAt._sat=tween;time<0&&(_reverting||!immediateRender&&!autoRevert)&&tween._startAt.revert(_revertConfigNoKill);if(immediateRender){if(dur&&time<=0&&tTime<=0){time&&(tween._zTime=time);return;}}}else if(runBackwards&&dur){if(!prevStartAt){time&&(immediateRender=false);p=_setDefaults({overwrite:false,data:"isFromStart",lazy:immediateRender&&!prevStartAt&&_isNotFalse(lazy),immediateRender:immediateRender,stagger:0,parent:parent},cleanVars);harnessVars&&(p[harness.prop]=harnessVars);_removeFromParent(tween._startAt=Tween.set(targets,p));tween._startAt._dp=0;tween._startAt._sat=tween;time<0&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween._startAt.render(-1,true));tween._zTime=time;if(!immediateRender){_initTween(tween._startAt,_tinyNum,_tinyNum);}else if(!time){return;}}} 185tween._pt=tween._ptCache=0;lazy=dur&&_isNotFalse(lazy)||lazy&&!dur;for(i=0;i<targets.length;i++){target=targets[i];gsData=target._gsap||_harness(targets)[i]._gsap;tween._ptLookup[i]=ptLookup={};_lazyLookup[gsData.id]&&_lazyTweens.length&&_lazyRender();index=fullTargets===targets?i:fullTargets.indexOf(target);if(harness&&(plugin=new harness()).init(target,harnessVars||cleanVars,tween,index,fullTargets)!==false){tween._pt=pt=new PropTween(tween._pt,target,plugin.name,0,1,plugin.render,plugin,0,plugin.priority);plugin._props.forEach(function(name){ptLookup[name]=pt;});plugin.priority&&(hasPriority=1);} 186if(!harness||harnessVars){for(p in cleanVars){if(_plugins[p]&&(plugin=_checkPlugin(p,cleanVars,tween,index,target,fullTargets))){plugin.priority&&(hasPriority=1);}else{ptLookup[p]=pt=_addPropTween.call(tween,target,p,"get",cleanVars[p],index,fullTargets,0,vars.stringFilter);}}} 187tween._op&&tween._op[i]&&tween.kill(target,tween._op[i]);if(autoOverwrite&&tween._pt){_overwritingTween=tween;_globalTimeline.killTweensOf(target,ptLookup,tween.globalTime(time));overwritten=!tween.parent;_overwritingTween=0;} 188tween._pt&&lazy&&(_lazyLookup[gsData.id]=1);} 189hasPriority&&_sortPropTweensByPriority(tween);tween._onInit&&tween._onInit(tween);} 190tween._onUpdate=onUpdate;tween._initted=(!tween._op||tween._pt)&&!overwritten;keyframes&&time<=0&&tl.render(_bigNum,true,true);},_updatePropTweens=function _updatePropTweens(tween,property,value,start,startIsRelative,ratio,time,skipRecursion){var ptCache=(tween._pt&&tween._ptCache||(tween._ptCache={}))[property],pt,rootPT,lookup,i;if(!ptCache){ptCache=tween._ptCache[property]=[];lookup=tween._ptLookup;i=tween._targets.length;while(i--){pt=lookup[i][property];if(pt&&pt.d&&pt.d._pt){pt=pt.d._pt;while(pt&&pt.p!==property&&pt.fp!==property){pt=pt._next;}} 191if(!pt){_forceAllPropTweens=1;tween.vars[property]="+=0";_initTween(tween,time);_forceAllPropTweens=0;return skipRecursion?_warn(property+" not eligible for reset"):1;} 192ptCache.push(pt);}} 193i=ptCache.length;while(i--){rootPT=ptCache[i];pt=rootPT._pt||rootPT;pt.s=(start||start===0)&&!startIsRelative?start:pt.s+(start||0)+ratio*pt.c;pt.c=value-pt.s;rootPT.e&&(rootPT.e=_round(value)+getUnit(rootPT.e));rootPT.b&&(rootPT.b=pt.s+getUnit(rootPT.b));}},_addAliasesToVars=function _addAliasesToVars(targets,vars){var harness=targets[0]?_getCache(targets[0]).harness:0,propertyAliases=harness&&harness.aliases,copy,p,i,aliases;if(!propertyAliases){return vars;} 194copy=_merge({},vars);for(p in propertyAliases){if(p in copy){aliases=propertyAliases[p].split(",");i=aliases.length;while(i--){copy[aliases[i]]=copy[p];}}} 195return copy;},_parseKeyframe=function _parseKeyframe(prop,obj,allProps,easeEach){var ease=obj.ease||easeEach||"power1.inOut",p,a;if(_isArray(obj)){a=allProps[prop]||(allProps[prop]=[]);
vendor: 4,496 bytes, lines 195-206
195obj.forEach(function(value,i){return a.push({t:i/(obj.length-1)*100,v:value,e:ease});});}else{for(p in obj){a=allProps[p]||(allProps[p]=[]);p==="ease"||a.push({t:parseFloat(prop),v:obj[p],e:ease});}}},_parseFuncOrString=function _parseFuncOrString(value,tween,i,target,targets){return _isFunction(value)?value.call(tween,i,target,targets):_isString(value)&&~value.indexOf("random(")?_replaceRandom(value):value;},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",function(name){return _staggerPropsToSkip[name]=1;});var Tween=function(_Animation2){_inheritsLoose(Tween,_Animation2);function Tween(targets,vars,position,skipInherit){var _this3;if(typeof vars==="number"){position.duration=vars;vars=position;position=null;} 196_this3=_Animation2.call(this,skipInherit?vars:_inheritDefaults(vars))||this;var _this3$vars=_this3.vars,duration=_this3$vars.duration,delay=_this3$vars.delay,immediateRender=_this3$vars.immediateRender,stagger=_this3$vars.stagger,overwrite=_this3$vars.overwrite,keyframes=_this3$vars.keyframes,defaults=_this3$vars.defaults,scrollTrigger=_this3$vars.scrollTrigger,yoyoEase=_this3$vars.yoyoEase,parent=vars.parent||_globalTimeline,parsedTargets=(_isArray(targets)||_isTypedArray(targets)?_isNumber(targets[0]):"length"in vars)?[targets]:toArray(targets),tl,i,copy,l,p,curTarget,staggerFunc,staggerVarsToMerge;_this3._targets=parsedTargets.length?_harness(parsedTargets):_warn("GSAP target "+targets+" not found. https://gsap.com",!_config.nullTargetWarn)||[];_this3._ptLookup=[];_this3._overwrite=overwrite;if(keyframes||stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){vars=_this3.vars;tl=_this3.timeline=new Timeline({data:"nested",defaults:defaults||{},targets:parent&&parent.data==="nested"?parent.vars.targets:parsedTargets});tl.kill();tl.parent=tl._dp=_assertThisInitialized(_this3);tl._start=0;if(stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){l=parsedTargets.length;staggerFunc=stagger&&distribute(stagger);if(_isObject(stagger)){for(p in stagger){if(~_staggerTweenProps.indexOf(p)){staggerVarsToMerge||(staggerVarsToMerge={});staggerVarsToMerge[p]=stagger[p];}}} 197for(i=0;i<l;i++){copy=_copyExcluding(vars,_staggerPropsToSkip);copy.stagger=0;yoyoEase&&(copy.yoyoEase=yoyoEase);staggerVarsToMerge&&_merge(copy,staggerVarsToMerge);curTarget=parsedTargets[i];copy.duration=+_parseFuncOrString(duration,_assertThisInitialized(_this3),i,curTarget,parsedTargets);copy.delay=(+_parseFuncOrString(delay,_assertThisInitialized(_this3),i,curTarget,parsedTargets)||0)-_this3._delay;if(!stagger&&l===1&©.delay){_this3._delay=delay=copy.delay;_this3._start+=delay;copy.delay=0;} 198tl.to(curTarget,copy,staggerFunc?staggerFunc(i,curTarget,parsedTargets):0);tl._ease=_easeMap.none;} 199tl.duration()?duration=delay=0:_this3.timeline=0;}else if(keyframes){_inheritDefaults(_setDefaults(tl.vars.defaults,{ease:"none"}));tl._ease=_parseEase(keyframes.ease||vars.ease||"none");var time=0,a,kf,v;if(_isArray(keyframes)){keyframes.forEach(function(frame){return tl.to(parsedTargets,frame,">");});tl.duration();}else{copy={};for(p in keyframes){p==="ease"||p==="easeEach"||_parseKeyframe(p,keyframes[p],copy,keyframes.easeEach);} 200for(p in copy){a=copy[p].sort(function(a,b){return a.t-b.t;});time=0;for(i=0;i<a.length;i++){kf=a[i];v={ease:kf.e,duration:(kf.t-(i?a[i-1].t:0))/100*duration};v[p]=kf.v;tl.to(parsedTargets,v,time);time+=v.duration;}} 201tl.duration()<duration&&tl.to({},{duration:duration-tl.duration()});}} 202duration||_this3.duration(duration=tl.duration());}else{_this3.timeline=0;} 203if(overwrite===true&&!_suppressOverwrites){_overwritingTween=_assertThisInitialized(_this3);_globalTimeline.killTweensOf(parsedTargets);_overwritingTween=0;} 204_addToTimeline(parent,_assertThisInitialized(_this3),position);vars.reversed&&_this3.reverse();vars.paused&&_this3.paused(true);if(immediateRender||!duration&&!keyframes&&_this3._start===_roundPrecise(parent._time)&&_isNotFalse(immediateRender)&&_hasNoPausedAncestors(_assertThisInitialized(_this3))&&parent.data!=="nested"){_this3._tTime=-_tinyNum;_this3.render(Math.max(0,-delay)||0);} 205scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this3),scrollTrigger);return _this3;} 206var _proto3=Tween.prototype;_proto3.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._tDur,dur=this._dur,isNegative=totalTime<0,tTime=totalTime>
vendor: 2,828 bytes, lines 206-221
206tDur-_tinyNum&&!isNegative?tDur:totalTime<_tinyNum?0:totalTime,time,pt,iteration,cycleDuration,prevIteration,isYoyo,ratio,timeline,yoyoEase;if(!dur){_renderZeroDurationTween(this,totalTime,suppressEvents,force);}else if(tTime!==this._tTime||!totalTime||force||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==isNegative){time=tTime;timeline=this.timeline;if(this._repeat){cycleDuration=dur+this._rDelay;if(this._repeat<-1&&isNegative){return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force);} 207time=_roundPrecise(tTime%cycleDuration);if(tTime===tDur){iteration=this._repeat;time=dur;}else{iteration=~~(tTime/cycleDuration);if(iteration&&iteration===_roundPrecise(tTime/cycleDuration)){time=dur;iteration--;} 208time>dur&&(time=dur);} 209isYoyo=this._yoyo&&iteration&1;if(isYoyo){yoyoEase=this._yEase;time=dur-time;} 210prevIteration=_animationCycle(this._tTime,cycleDuration);if(time===prevTime&&!force&&this._initted&&iteration===prevIteration){this._tTime=tTime;return this;} 211if(iteration!==prevIteration){timeline&&this._yEase&&_propagateYoyoEase(timeline,isYoyo);if(this.vars.repeatRefresh&&!isYoyo&&!this._lock&&this._time!==cycleDuration&&this._initted){this._lock=force=1;this.render(_roundPrecise(cycleDuration*iteration),true).invalidate()._lock=0;}}} 212if(!this._initted){if(_attemptInitTween(this,isNegative?totalTime:time,force,suppressEvents,tTime)){this._tTime=0;return this;} 213if(prevTime!==this._time&&!(force&&this.vars.repeatRefresh&&iteration!==prevIteration)){return this;} 214if(dur!==this._dur){return this.render(totalTime,suppressEvents,force);}} 215this._tTime=tTime;this._time=time;if(!this._act&&this._ts){this._act=1;this._lazy=0;} 216this.ratio=ratio=(yoyoEase||this._ease)(time/dur);if(this._from){this.ratio=ratio=1-ratio;} 217if(time&&!prevTime&&!suppressEvents&&!iteration){_callback(this,"onStart");if(this._tTime!==tTime){return this;}} 218pt=this._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next;} 219timeline&&timeline.render(totalTime<0?totalTime:timeline._dur*timeline._ease(time/this._dur),suppressEvents,force)||this._startAt&&(this._zTime=totalTime);if(this._onUpdate&&!suppressEvents){isNegative&&_rewindStartAt(this,totalTime,suppressEvents,force);_callback(this,"onUpdate");} 220this._repeat&&iteration!==prevIteration&&this.vars.onRepeat&&!suppressEvents&&this.parent&&_callback(this,"onRepeat");if((tTime===this._tDur||!tTime)&&this._tTime===tTime){isNegative&&!this._onUpdate&&_rewindStartAt(this,totalTime,true,true);(totalTime||!dur)&&(tTime===this._tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1);if(!suppressEvents&&!(isNegative&&!prevTime)&&(tTime||prevTime||isYoyo)){_callback(this,tTime===tDur?"onComplete":"onReverseComplete",true);this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom();}}} 221return this;};_proto3.targets=function targets(){return this._targets;};
vendor: 21,690 bytes, lines 221-265
221_proto3.invalidate=function invalidate(soft){(!soft||!this.vars.runBackwards)&&(this._startAt=0);this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0;this._ptLookup=[];this.timeline&&this.timeline.invalidate(soft);return _Animation2.prototype.invalidate.call(this,soft);};_proto3.resetTo=function resetTo(property,value,start,startIsRelative,skipRecursion){_tickerActive||_ticker.wake();this._ts||this.play();var time=Math.min(this._dur,(this._dp._time-this._start)*this._ts),ratio;this._initted||_initTween(this,time);ratio=this._ease(time/this._dur);if(_updatePropTweens(this,property,value,start,startIsRelative,ratio,time,skipRecursion)){return this.resetTo(property,value,start,startIsRelative,1);} 222_alignPlayhead(this,0);this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0);return this.render(0);};_proto3.kill=function kill(targets,vars){if(vars===void 0){vars="all";} 223if(!targets&&(!vars||vars==="all")){this._lazy=this._pt=0;return this.parent?_interrupt(this):this;} 224if(this.timeline){var tDur=this.timeline.totalDuration();this.timeline.killTweensOf(targets,vars,_overwritingTween&&_overwritingTween.vars.overwrite!==true)._first||_interrupt(this);this.parent&&tDur!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/tDur,0,1);return this;} 225var parsedTargets=this._targets,killingTargets=targets?toArray(targets):parsedTargets,propTweenLookup=this._ptLookup,firstPT=this._pt,overwrittenProps,curLookup,curOverwriteProps,props,p,pt,i;if((!vars||vars==="all")&&_arraysMatch(parsedTargets,killingTargets)){vars==="all"&&(this._pt=0);return _interrupt(this);} 226overwrittenProps=this._op=this._op||[];if(vars!=="all"){if(_isString(vars)){p={};_forEachName(vars,function(name){return p[name]=1;});vars=p;} 227vars=_addAliasesToVars(parsedTargets,vars);} 228i=parsedTargets.length;while(i--){if(~killingTargets.indexOf(parsedTargets[i])){curLookup=propTweenLookup[i];if(vars==="all"){overwrittenProps[i]=vars;props=curLookup;curOverwriteProps={};}else{curOverwriteProps=overwrittenProps[i]=overwrittenProps[i]||{};props=vars;} 229for(p in props){pt=curLookup&&curLookup[p];if(pt){if(!("kill"in pt.d)||pt.d.kill(p)===true){_removeLinkedListItem(this,pt,"_pt");} 230delete curLookup[p];} 231if(curOverwriteProps!=="all"){curOverwriteProps[p]=1;}}}} 232this._initted&&!this._pt&&firstPT&&_interrupt(this);return this;};Tween.to=function to(targets,vars){return new Tween(targets,vars,arguments[2]);};Tween.from=function from(targets,vars){return _createTweenType(1,arguments);};Tween.delayedCall=function delayedCall(delay,callback,params,scope){return new Tween(callback,0,{immediateRender:false,lazy:false,overwrite:false,delay:delay,onComplete:callback,onReverseComplete:callback,onCompleteParams:params,onReverseCompleteParams:params,callbackScope:scope});};Tween.fromTo=function fromTo(targets,fromVars,toVars){return _createTweenType(2,arguments);};Tween.set=function set(targets,vars){vars.duration=0;vars.repeatDelay||(vars.repeat=0);return new Tween(targets,vars);};Tween.killTweensOf=function killTweensOf(targets,props,onlyActive){return _globalTimeline.killTweensOf(targets,props,onlyActive);};return Tween;}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});_forEachName("staggerTo,staggerFrom,staggerFromTo",function(name){Tween[name]=function(){var tl=new Timeline(),params=_slice.call(arguments,0);params.splice(name==="staggerFromTo"?5:4,0,0);return tl[name].apply(tl,params);};});var _setterPlain=function _setterPlain(target,property,value){return target[property]=value;},_setterFunc=function _setterFunc(target,property,value){return target[property](value);},_setterFuncWithParam=function _setterFuncWithParam(target,property,value,data){return target[property](data.fp,value);},_setterAttribute=function _setterAttribute(target,property,value){return target.setAttribute(property,value);},_getSetter=function _getSetter(target,property){return _isFunction(target[property])?_setterFunc:_isUndefined(target[property])&&target.setAttribute?_setterAttribute:_setterPlain;},_renderPlain=function _renderPlain(ratio,data){return data.set(data.t,data.p,Math.round((data.s+data.c*ratio)*1000000)/1000000,data);},_renderBoolean=function _renderBoolean(ratio,data){return data.set(data.t,data.p,!!(data.s+data.c*ratio),data);},_renderComplexString=function _renderComplexString(ratio,data){var pt=data._pt,s="";if(!ratio&&data.b){s=data.b;}else if(ratio===1&&data.e){s=data.e;}else{while(pt){s=pt.p+(pt.m?pt.m(pt.s+pt.c*ratio):Math.round((pt.s+pt.c*ratio)*10000)/10000)+s;pt=pt._next;} 233s+=data.c;} 234data.set(data.t,data.p,s,data);},_renderPropTweens=function _renderPropTweens(ratio,data){var pt=data._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next;}},_addPluginModifier=function _addPluginModifier(modifier,tween,target,property){var pt=this._pt,next;while(pt){next=pt._next;pt.p===property&&pt.modifier(modifier,tween,target);pt=next;}},_killPropTweensOf=function _killPropTweensOf(property){var pt=this._pt,hasNonDependentRemaining,next;while(pt){next=pt._next;if(pt.p===property&&!pt.op||pt.op===property){_removeLinkedListItem(this,pt,"_pt");}else if(!pt.dep){hasNonDependentRemaining=1;} 235pt=next;} 236return!hasNonDependentRemaining;},_setterWithModifier=function _setterWithModifier(target,property,value,data){data.mSet(target,property,data.m.call(data.tween,value,data.mt),data);},_sortPropTweensByPriority=function _sortPropTweensByPriority(parent){var pt=parent._pt,next,pt2,first,last;while(pt){next=pt._next;pt2=first;while(pt2&&pt2.pr>pt.pr){pt2=pt2._next;} 237if(pt._prev=pt2?pt2._prev:last){pt._prev._next=pt;}else{first=pt;} 238if(pt._next=pt2){pt2._prev=pt;}else{last=pt;} 239pt=next;} 240parent._pt=first;};var PropTween=function(){function PropTween(next,target,prop,start,change,renderer,data,setter,priority){this.t=target;this.s=start;this.c=change;this.p=prop;this.r=renderer||_renderPlain;this.d=data||this;this.set=setter||_setterPlain;this.pr=priority||0;this._next=next;if(next){next._prev=this;}} 241var _proto4=PropTween.prototype;_proto4.modifier=function modifier(func,tween,target){this.mSet=this.mSet||this.set;this.set=_setterWithModifier;this.m=func;this.mt=target;this.tween=tween;};return PropTween;}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(name){return _reservedProps[name]=1;});_globals.TweenMax=_globals.TweenLite=Tween;_globals.TimelineLite=_globals.TimelineMax=Timeline;_globalTimeline=new Timeline({sortChildren:false,defaults:_defaults,autoRemoveChildren:true,id:"root",smoothChildTiming:true});_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function _dispatch(type){return(_listeners[type]||_emptyArray).map(function(f){return f();});},_onMediaChange=function _onMediaChange(){var time=Date.now(),matches=[];if(time-_lastMediaTime>2){_dispatch("matchMediaInit");_media.forEach(function(c){var queries=c.queries,conditions=c.conditions,match,p,anyMatch,toggled;for(p in queries){match=_win.matchMedia(queries[p]).matches;match&&(anyMatch=1);if(match!==conditions[p]){conditions[p]=match;toggled=1;}} 242if(toggled){c.revert();anyMatch&&matches.push(c);}});_dispatch("matchMediaRevert");matches.forEach(function(c){return c.onMatch(c,function(func){return c.add(null,func);});});_lastMediaTime=time;_dispatch("matchMedia");}};var Context=function(){function Context(func,scope){this.selector=scope&&selector(scope);this.data=[];this._r=[];this.isReverted=false;this.id=_contextID++;func&&this.add(func);} 243var _proto5=Context.prototype;_proto5.add=function add(name,func,scope){if(_isFunction(name)){scope=func;func=name;name=_isFunction;} 244var self=this,f=function f(){var prev=_context,prevSelector=self.selector,result;prev&&prev!==self&&prev.data.push(self);scope&&(self.selector=selector(scope));_context=self;result=func.apply(self,arguments);_isFunction(result)&&self._r.push(result);_context=prev;self.selector=prevSelector;self.isReverted=false;return result;};self.last=f;return name===_isFunction?f(self,function(func){return self.add(null,func);}):name?self[name]=f:f;};_proto5.ignore=function ignore(func){var prev=_context;_context=null;func(this);_context=prev;};_proto5.getTweens=function getTweens(){var a=[];this.data.forEach(function(e){return e instanceof Context?a.push.apply(a,e.getTweens()):e instanceof Tween&&!(e.parent&&e.parent.data==="nested")&&a.push(e);});return a;};_proto5.clear=function clear(){this._r.length=this.data.length=0;};_proto5.kill=function kill(revert,matchMedia){var _this4=this;if(revert){(function(){var tweens=_this4.getTweens(),i=_this4.data.length,t;while(i--){t=_this4.data[i];if(t.data==="isFlip"){t.revert();t.getChildren(true,true,false).forEach(function(tween){return tweens.splice(tweens.indexOf(tween),1);});}} 245tweens.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-Infinity,t:t};}).sort(function(a,b){return b.g-a.g||-Infinity;}).forEach(function(o){return o.t.revert(revert);});i=_this4.data.length;while(i--){t=_this4.data[i];if(t instanceof Timeline){if(t.data!=="nested"){t.scrollTrigger&&t.scrollTrigger.revert();t.kill();}}else{!(t instanceof Tween)&&t.revert&&t.revert(revert);}} 246_this4._r.forEach(function(f){return f(revert,_this4);});_this4.isReverted=true;})();}else{this.data.forEach(function(e){return e.kill&&e.kill();});} 247this.clear();if(matchMedia){var i=_media.length;while(i--){_media[i].id===this.id&&_media.splice(i,1);}}};_proto5.revert=function revert(config){this.kill(config||{});};return Context;}();var MatchMedia=function(){function MatchMedia(scope){this.contexts=[];this.scope=scope;_context&&_context.data.push(this);} 248var _proto6=MatchMedia.prototype;_proto6.add=function add(conditions,func,scope){_isObject(conditions)||(conditions={matches:conditions});var context=new Context(0,scope||this.scope),cond=context.conditions={},mq,p,active;_context&&!context.selector&&(context.selector=_context.selector);this.contexts.push(context);func=context.add("onMatch",func);context.queries=conditions;for(p in conditions){if(p==="all"){active=1;}else{mq=_win.matchMedia(conditions[p]);if(mq){_media.indexOf(context)<0&&_media.push(context);(cond[p]=mq.matches)&&(active=1);mq.addListener?mq.addListener(_onMediaChange):mq.addEventListener("change",_onMediaChange);}}} 249active&&func(context,function(f){return context.add(null,f);});return this;};_proto6.revert=function revert(config){this.kill(config||{});};_proto6.kill=function kill(revert){this.contexts.forEach(function(c){return c.kill(revert,true);});};return MatchMedia;}();var _gsap={registerPlugin:function registerPlugin(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];} 250args.forEach(function(config){return _createPlugin(config);});},timeline:function timeline(vars){return new Timeline(vars);},getTweensOf:function getTweensOf(targets,onlyActive){return _globalTimeline.getTweensOf(targets,onlyActive);},getProperty:function getProperty(target,property,unit,uncache){_isString(target)&&(target=toArray(target)[0]);var getter=_getCache(target||{}).get,format=unit?_passThrough:_numericIfPossible;unit==="native"&&(unit="");return!target?target:!property?function(property,unit,uncache){return format((_plugins[property]&&_plugins[property].get||getter)(target,property,unit,uncache));}:format((_plugins[property]&&_plugins[property].get||getter)(target,property,unit,uncache));},quickSetter:function quickSetter(target,property,unit){target=toArray(target);if(target.length>1){var setters=target.map(function(t){return gsap.quickSetter(t,property,unit);}),l=setters.length;return function(value){var i=l;while(i--){setters[i](value);}};} 251target=target[0]||{};var Plugin=_plugins[property],cache=_getCache(target),p=cache.harness&&(cache.harness.aliases||{})[property]||property,setter=Plugin?function(value){var p=new Plugin();_quickTween._pt=0;p.init(target,unit?value+unit:value,_quickTween,0,[target]);p.render(1,p);_quickTween._pt&&_renderPropTweens(1,_quickTween);}:cache.set(target,p);return Plugin?setter:function(value){return setter(target,p,unit?value+unit:value,cache,1);};},quickTo:function quickTo(target,property,vars){var _merge2;var tween=gsap.to(target,_merge((_merge2={},_merge2[property]="+=0.1",_merge2.paused=true,_merge2),vars||{})),func=function func(value,start,startIsRelative){return tween.resetTo(property,value,start,startIsRelative);};func.tween=tween;return func;},isTweening:function isTweening(targets){return _globalTimeline.getTweensOf(targets,true).length>0;},defaults:function defaults(value){value&&value.ease&&(value.ease=_parseEase(value.ease,_defaults.ease));return _mergeDeep(_defaults,value||{});},config:function config(value){return _mergeDeep(_config,value||{});},registerEffect:function registerEffect(_ref3){var name=_ref3.name,effect=_ref3.effect,plugins=_ref3.plugins,defaults=_ref3.defaults,extendTimeline=_ref3.extendTimeline;(plugins||"").split(",").forEach(function(pluginName){return pluginName&&!_plugins[pluginName]&&!_globals[pluginName]&&_warn(name+" effect requires "+pluginName+" plugin.");});_effects[name]=function(targets,vars,tl){return effect(toArray(targets),_setDefaults(vars||{},defaults),tl);};if(extendTimeline){Timeline.prototype[name]=function(targets,vars,position){return this.add(_effects[name](targets,_isObject(vars)?vars:(position=vars)&&{},this),position);};}},registerEase:function registerEase(name,ease){_easeMap[name]=_parseEase(ease);},parseEase:function parseEase(ease,defaultEase){return arguments.length?_parseEase(ease,defaultEase):_easeMap;},getById:function getById(id){return _globalTimeline.getById(id);},exportRoot:function exportRoot(vars,includeDelayedCalls){if(vars===void 0){vars={};} 252var tl=new Timeline(vars),child,next;tl.smoothChildTiming=_isNotFalse(vars.smoothChildTiming);_globalTimeline.remove(tl);tl._dp=0;tl._time=tl._tTime=_globalTimeline._time;child=_globalTimeline._first;while(child){next=child._next;if(includeDelayedCalls||!(!child._dur&&child instanceof Tween&&child.vars.onComplete===child._targets[0])){_addToTimeline(tl,child,child._start-child._delay);} 253child=next;} 254_addToTimeline(_globalTimeline,tl,0);return tl;},context:function context(func,scope){return func?new Context(func,scope):_context;},matchMedia:function matchMedia(scope){return new MatchMedia(scope);},matchMediaRefresh:function matchMediaRefresh(){return _media.forEach(function(c){var cond=c.conditions,found,p;for(p in cond){if(cond[p]){cond[p]=false;found=1;}} 255found&&c.revert();})||_onMediaChange();},addEventListener:function addEventListener(type,callback){var a=_listeners[type]||(_listeners[type]=[]);~a.indexOf(callback)||a.push(callback);},removeEventListener:function removeEventListener(type,callback){var a=_listeners[type],i=a&&a.indexOf(callback);i>=0&&a.splice(i,1);},utils:{wrap:wrap,wrapYoyo:wrapYoyo,distribute:distribute,random:random,snap:snap,normalize:normalize,getUnit:getUnit,clamp:clamp,splitColor:splitColor,toArray:toArray,selector:selector,mapRange:mapRange,pipe:pipe,unitize:unitize,interpolate:interpolate,shuffle:shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween:PropTween,globals:_addGlobal,Tween:Tween,Timeline:Timeline,Animation:Animation,getCache:_getCache,_removeLinkedListItem:_removeLinkedListItem,reverting:function reverting(){return _reverting;},context:function context(toAdd){if(toAdd&&_context){_context.data.push(toAdd);toAdd._ctx=_context;} 256return _context;},suppressOverwrites:function suppressOverwrites(value){return _suppressOverwrites=value;}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(name){return _gsap[name]=Tween[name];});_ticker.add(Timeline.updateRoot);_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function _getPluginPropTween(plugin,prop){var pt=plugin._pt;while(pt&&pt.p!==prop&&pt.op!==prop&&pt.fp!==prop){pt=pt._next;} 257return pt;},_addModifiers=function _addModifiers(tween,modifiers){var targets=tween._targets,p,i,pt;for(p in modifiers){i=targets.length;while(i--){pt=tween._ptLookup[i][p];if(pt&&(pt=pt.d)){if(pt._pt){pt=_getPluginPropTween(pt,p);} 258pt&&pt.modifier&&pt.modifier(modifiers[p],tween,targets[i],p);}}}},_buildModifierPlugin=function _buildModifierPlugin(name,modifier){return{name:name,rawVars:1,init:function init(target,vars,tween){tween._onInit=function(tween){var temp,p;if(_isString(vars)){temp={};_forEachName(vars,function(name){return temp[name]=1;});vars=temp;} 259if(modifier){temp={};for(p in vars){temp[p]=modifier(vars[p]);} 260vars=temp;} 261_addModifiers(tween,vars);};}};};var gsap=_gsap.registerPlugin({name:"attr",init:function init(target,vars,tween,index,targets){var p,pt,v;this.tween=tween;for(p in vars){v=target.getAttribute(p)||"";pt=this.add(target,"setAttribute",(v||0)+"",vars[p],index,targets,0,0,p);pt.op=p;pt.b=v;this._props.push(p);}},render:function render(ratio,data){var pt=data._pt;while(pt){_reverting?pt.set(pt.t,pt.p,pt.b,pt):pt.r(ratio,pt.d);pt=pt._next;}}},{name:"endArray",init:function init(target,value){var i=value.length;while(i--){this.add(target,i,target[i]||0,value[i],0,0,0,0,0,1);}}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.5";_coreReady=1;_windowExists()&&_wake();var Power0=_easeMap.Power0,Power1=_easeMap.Power1,Power2=_easeMap.Power2,Power3=_easeMap.Power3,Power4=_easeMap.Power4,Linear=_easeMap.Linear,Quad=_easeMap.Quad,Cubic=_easeMap.Cubic,Quart=_easeMap.Quart,Quint=_easeMap.Quint,Strong=_easeMap.Strong,Elastic=_easeMap.Elastic,Back=_easeMap.Back,SteppedEase=_easeMap.SteppedEase,Bounce=_easeMap.Bounce,Sine=_easeMap.Sine,Expo=_easeMap.Expo,Circ=_easeMap.Circ;var _win$1,_doc$1,_docElement,_pluginInitted,_tempDiv,_tempDivStyler,_recentSetterPlugin,_reverting$1,_windowExists$1=function _windowExists(){return typeof window!=="undefined";},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum$1=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function _renderCSSProp(ratio,data){return data.set(data.t,data.p,Math.round((data.s+data.c*ratio)*10000)/10000+data.u,data);},_renderPropWithEnd=function _renderPropWithEnd(ratio,data){return data.set(data.t,data.p,ratio===1?data.e:Math.round((data.s+data.c*ratio)*10000)/10000+data.u,data);},_renderCSSPropWithBeginning=function _renderCSSPropWithBeginning(ratio,data){return data.set(data.t,data.p,ratio?Math.round((data.s+data.c*ratio)*10000)/10000+data.u:data.b,data);},_renderRoundedCSSProp=function _renderRoundedCSSProp(ratio,data){var value=data.s+data.c*ratio;data.set(data.t,data.p,~~(value+(value<0?-.5:.5))+data.u,data);},_renderNonTweeningValue=function _renderNonTweeningValue(ratio,data){return data.set(data.t,data.p,ratio?data.e:data.b,data);},_renderNonTweeningValueOnlyAtEnd=function _renderNonTweeningValueOnlyAtEnd(ratio,data){return data.set(data.t,data.p,ratio!==1?data.b:data.e,data);},_setterCSSStyle=function _setterCSSStyle(target,property,value){return target.style[property]=value;},_setterCSSProp=function _setterCSSProp(target,property,value){return target.style.setProperty(property,value);},_setterTransform=function _setterTransform(target,property,value){return target._gsap[property]=value;},_setterScale=function _setterScale(target,property,value){return target._gsap.scaleX=target._gsap.scaleY=value;},_setterScaleWithRender=function _setterScaleWithRender(target,property,value,data,ratio){var cache=target._gsap;cache.scaleX=cache.scaleY=value;cache.renderTransform(ratio,cache);},_setterTransformWithRender=function _setterTransformWithRender(target,property,value,data,ratio){var cache=target._gsap;cache[property]=value;cache.renderTransform(ratio,cache);},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function _saveStyle(property,isNotCSS){var _this=this;var target=this.target,style=target.style,cache=target._gsap;if(property in _transformProps&&style){this.tfm=this.tfm||{};if(property!=="transform"){property=_propertyAliases[property]||property;~property.indexOf(",")?property.split(",").forEach(function(a){return _this.tfm[a]=_get(target,a);}):this.tfm[property]=cache.x?cache[property]:_get(target,property);property===_transformOriginProp&&(this.tfm.zOrigin=cache.zOrigin);}else{return _propertyAliases.transform.split(",").forEach(function(p){return _saveStyle.call(_this,p,isNotCSS);});} 262if(this.props.indexOf(_transformProp)>=0){return;} 263if(cache.svg){this.svgo=target.getAttribute("data-svg-origin");this.props.push(_transformOriginProp,isNotCSS,"");} 264property=_transformProp;} 265(style||isNotCSS)&&this.props.push(property,isNotCSS,style[property]);},_removeIndependentTransforms=function _removeIndependentTransforms(style){if(style.translate){style.removeProperty("translate");style.removeProperty("scale");style.removeProperty("rotate");}},_revertStyle=function _revertStyle(){var props=this.props,target=this.target,style=target.style,cache=target._gsap,i,p;for(i=0;i<props.length;i+=3){props[i+1]?target[props[i]]=props[i+2]:props[i+2]?style[props[i]]=props[i+2]:style.removeProperty(props[i].substr(0,2)==="--"?props[i]:props[i].replace(_capsExp,"-$1").toLowerCase());}
266if(this.tfm){for(p in this.tfm){cache[p]=this.tfm[p];} 267if(cache.svg){cache.renderTransform();target.setAttribute("data-svg-origin",this.svgo||"");} 268i=_reverting$1();if((!i||!i.isStart)&&!style[_transformProp]){_removeIndependentTransforms(style);if(cache.zOrigin&&style[_transformOriginProp]){style[_transformOriginProp]+=" "+cache.zOrigin+"px";cache.zOrigin=0;cache.renderTransform();} 269cache.uncache=1;}}},_getStyleSaver=function _getStyleSaver(target,properties){var saver={target:target,props:[],revert:_revertStyle,save:_saveStyle};target._gsap||gsap.core.getCache(target);properties&&properties.split(",").forEach(function(p){return saver.save(p);});return saver;},_supports3D,_createElement=function _createElement(type,ns){var e=_doc$1.createElementNS?_doc$1.createElementNS((ns||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),type):_doc$1.createElement(type);return e&&e.style?e:_doc$1.createElement(type);},_getComputedProperty=function _getComputedProperty(target,property,skipPrefixFallback){var cs=getComputedStyle(target);return cs[property]||cs.getPropertyValue(property.replace(_capsExp,"-$1").toLowerCase())||cs.getPropertyValue(property)||!skipPrefixFallback&&_getComputedProperty(target,_checkPropPrefix(property)||property,1)||"";},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function _checkPropPrefix(property,element,preferPrefix){var e=element||_tempDiv,s=e.style,i=5;if(property in s&&!preferPrefix){return property;} 270property=property.charAt(0).toUpperCase()+property.substr(1);while(i--&&!(_prefixes[i]+property in s)){} 271return i<0?null:(i===3?"ms":i>=0?_prefixes[i]:"")+property;},_initCore=function _initCore(){if(_windowExists$1()&&window.document){_win$1=window;_doc$1=_win$1.document;_docElement=_doc$1.documentElement;_tempDiv=_createElement("div")||{style:{}};_tempDivStyler=_createElement("div");_transformProp=_checkPropPrefix(_transformProp);_transformOriginProp=_transformProp+"Origin";_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0";_supports3D=!!_checkPropPrefix("perspective");_reverting$1=gsap.core.reverting;_pluginInitted=1;}},_getBBoxHack=function _getBBoxHack(swapIfPossible){var svg=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),oldParent=this.parentNode,oldSibling=this.nextSibling,oldCSS=this.style.cssText,bbox;_docElement.appendChild(svg);svg.appendChild(this);this.style.display="block";if(swapIfPossible){try{bbox=this.getBBox();this._gsapBBox=this.getBBox;this.getBBox=_getBBoxHack;}catch(e){}}else if(this._gsapBBox){bbox=this._gsapBBox();} 272if(oldParent){if(oldSibling){oldParent.insertBefore(this,oldSibling);}else{oldParent.appendChild(this);}} 273_docElement.removeChild(svg);this.style.cssText=oldCSS;return bbox;},_getAttributeFallbacks=function _getAttributeFallbacks(target,attributesArray){var i=attributesArray.length;while(i--){if(target.hasAttribute(attributesArray[i])){return target.getAttribute(attributesArray[i]);}}},_getBBox=function _getBBox(target){var bounds;try{bounds=target.getBBox();}catch(error){bounds=_getBBoxHack.call(target,true);} 274bounds&&(bounds.width||bounds.height)||target.getBBox===_getBBoxHack||(bounds=_getBBoxHack.call(target,true));return bounds&&!bounds.width&&!bounds.x&&!bounds.y?{x:+_getAttributeFallbacks(target,["x","cx","x1"])||0,y:+_getAttributeFallbacks(target,["y","cy","y1"])||0,width:0,height:0}:bounds;},_isSVG=function _isSVG(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&_getBBox(e));},_removeProperty=function _removeProperty(target,property){if(property){var style=target.style,first2Chars;if(property in _transformProps&&property!==_transformOriginProp){property=_transformProp;} 275if(style.removeProperty){first2Chars=property.substr(0,2);if(first2Chars==="ms"||property.substr(0,6)==="webkit"){property="-"+property;} 276style.removeProperty(first2Chars==="--"?property:property.replace(_capsExp,"-$1").toLowerCase());}else{style.removeAttribute(property);}}},_addNonTweeningPT=function _addNonTweeningPT(plugin,target,property,beginning,end,onlySetAtEnd){var pt=new PropTween(plugin._pt,target,property,0,1,onlySetAtEnd?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);plugin._pt=pt;pt.b=beginning;pt.e=end;plugin._props.push(property);return pt;},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function _convertToUnit(target,property,value,unit){var curValue=parseFloat(value)||0,curUnit=(value+"").trim().substr((curValue+"").length)||"px",style=_tempDiv.style,horizontal=_horizontalExp.test(property),isRo
vendor: 4,657 bytes, lines 276-291
276otSVG=target.tagName.toLowerCase()==="svg",measureProperty=(isRootSVG?"client":"offset")+(horizontal?"Width":"Height"),amount=100,toPixels=unit==="px",toPercent=unit==="%",px,parent,cache,isSVG;if(unit===curUnit||!curValue||_nonConvertibleUnits[unit]||_nonConvertibleUnits[curUnit]){return curValue;} 277curUnit!=="px"&&!toPixels&&(curValue=_convertToUnit(target,property,value,"px"));isSVG=target.getCTM&&_isSVG(target);if((toPercent||curUnit==="%")&&(_transformProps[property]||~property.indexOf("adius"))){px=isSVG?target.getBBox()[horizontal?"width":"height"]:target[measureProperty];return _round(toPercent?curValue/px*amount:curValue/100*px);} 278style[horizontal?"width":"height"]=amount+(toPixels?curUnit:unit);parent=~property.indexOf("adius")||unit==="em"&&target.appendChild&&!isRootSVG?target:target.parentNode;if(isSVG){parent=(target.ownerSVGElement||{}).parentNode;} 279if(!parent||parent===_doc$1||!parent.appendChild){parent=_doc$1.body;} 280cache=parent._gsap;if(cache&&toPercent&&cache.width&&horizontal&&cache.time===_ticker.time&&!cache.uncache){return _round(curValue/cache.width*amount);}else{if(toPercent&&(property==="height"||property==="width")){var v=target.style[property];target.style[property]=amount+unit;px=target[measureProperty];v?target.style[property]=v:_removeProperty(target,property);}else{(toPercent||curUnit==="%")&&!_nonStandardLayouts[_getComputedProperty(parent,"display")]&&(style.position=_getComputedProperty(target,"position"));parent===target&&(style.position="static");parent.appendChild(_tempDiv);px=_tempDiv[measureProperty];parent.removeChild(_tempDiv);style.position="absolute";} 281if(horizontal&&toPercent){cache=_getCache(parent);cache.time=_ticker.time;cache.width=parent[measureProperty];}} 282return _round(toPixels?px*curValue/amount:px&&curValue?amount/px*curValue:0);},_get=function _get(target,property,unit,uncache){var value;_pluginInitted||_initCore();if(property in _propertyAliases&&property!=="transform"){property=_propertyAliases[property];if(~property.indexOf(",")){property=property.split(",")[0];}} 283if(_transformProps[property]&&property!=="transform"){value=_parseTransform(target,uncache);value=property!=="transformOrigin"?value[property]:value.svg?value.origin:_firstTwoOnly(_getComputedProperty(target,_transformOriginProp))+" "+value.zOrigin+"px";}else{value=target.style[property];if(!value||value==="auto"||uncache||~(value+"").indexOf("calc(")){value=_specialProps[property]&&_specialProps[property](target,property,unit)||_getComputedProperty(target,property)||_getProperty(target,property)||(property==="opacity"?1:0);}} 284return unit&&!~(value+"").trim().indexOf(" ")?_convertToUnit(target,property,value,unit)+unit:value;},_tweenComplexCSSString=function _tweenComplexCSSString(target,prop,start,end){if(!start||start==="none"){var p=_checkPropPrefix(prop,target,1),s=p&&_getComputedProperty(target,p,1);if(s&&s!==start){prop=p;start=s;}else if(prop==="borderColor"){start=_getComputedProperty(target,"borderTopColor");}} 285var pt=new PropTween(this._pt,target.style,prop,0,1,_renderComplexString),index=0,matchIndex=0,a,result,startValues,startNum,color,startValue,endValue,endNum,chunk,endUnit,startUnit,endValues;pt.b=start;pt.e=end;start+="";end+="";if(end==="auto"){startValue=target.style[prop];target.style[prop]=end;end=_getComputedProperty(target,prop)||end;startValue?target.style[prop]=startValue:_removeProperty(target,prop);} 286a=[start,end];_colorStringFilter(a);start=a[0];end=a[1];startValues=start.match(_numWithUnitExp)||[];endValues=end.match(_numWithUnitExp)||[];if(endValues.length){while(result=_numWithUnitExp.exec(end)){endValue=result[0];chunk=end.substring(index,result.index);if(color){color=(color+1)%5;}else if(chunk.substr(-5)==="rgba("||chunk.substr(-5)==="hsla("){color=1;} 287if(endValue!==(startValue=startValues[matchIndex++]||"")){startNum=parseFloat(startValue)||0;startUnit=startValue.substr((startNum+"").length);endValue.charAt(1)==="="&&(endValue=_parseRelative(startNum,endValue)+startUnit);endNum=parseFloat(endValue);endUnit=endValue.substr((endNum+"").length);index=_numWithUnitExp.lastIndex-endUnit.length;if(!endUnit){endUnit=endUnit||_config.units[prop]||startUnit;if(index===end.length){end+=endUnit;pt.e+=endUnit;}} 288if(startUnit!==endUnit){startNum=_convertToUnit(target,prop,startValue,endUnit)||0;} 289pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum-startNum,m:color&&color<4||prop==="zIndex"?Math.round:0};}} 290pt.c=index<end.length?end.substring(index,end.length):"";}else{pt.r=prop==="display"&&end==="none"?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;} 291_relExp.test(end)&&(pt.e=0);this._pt=pt;return pt;}
vendor: 2,730 bytes, lines 291-296
291,_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function _convertKeywordsToPercentages(value){var split=value.split(" "),x=split[0],y=split[1]||"50%";if(x==="top"||x==="bottom"||y==="left"||y==="right"){value=x;x=y;y=value;} 292split[0]=_keywordToPercent[x]||x;split[1]=_keywordToPercent[y]||y;return split.join(" ");},_renderClearProps=function _renderClearProps(ratio,data){if(data.tween&&data.tween._time===data.tween._dur){var target=data.t,style=target.style,props=data.u,cache=target._gsap,prop,clearTransforms,i;if(props==="all"||props===true){style.cssText="";clearTransforms=1;}else{props=props.split(",");i=props.length;while(--i>-1){prop=props[i];if(_transformProps[prop]){clearTransforms=1;prop=prop==="transformOrigin"?_transformOriginProp:_transformProp;} 293_removeProperty(target,prop);}} 294if(clearTransforms){_removeProperty(target,_transformProp);if(cache){cache.svg&&target.removeAttribute("transform");_parseTransform(target,1);cache.uncache=1;_removeIndependentTransforms(style);}}}},_specialProps={clearProps:function clearProps(plugin,target,property,endValue,tween){if(tween.data!=="isFromStart"){var pt=plugin._pt=new PropTween(plugin._pt,target,property,0,0,_renderClearProps);pt.u=endValue;pt.pr=-10;pt.tween=tween;plugin._props.push(property);return 1;}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function _isNullTransform(value){return value==="matrix(1, 0, 0, 1, 0, 0)"||value==="none"||!value;},_getComputedTransformMatrixAsArray=function _getComputedTransformMatrixAsArray(target){var matrixString=_getComputedProperty(target,_transformProp);return _isNullTransform(matrixString)?_identity2DMatrix:matrixString.substr(7).match(_numExp).map(_round);},_getMatrix=function _getMatrix(target,force2D){var cache=target._gsap||_getCache(target),style=target.style,matrix=_getComputedTransformMatrixAsArray(target),parent,nextSibling,temp,addedToDOM;if(cache.svg&&target.getAttribute("transform")){temp=target.transform.baseVal.consolidate().matrix;matrix=[temp.a,temp.b,temp.c,temp.d,temp.e,temp.f];return matrix.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:matrix;}else if(matrix===_identity2DMatrix&&!target.offsetParent&&target!==_docElement&&!cache.svg){temp=style.display;style.display="block";parent=target.parentNode;if(!parent||!target.offsetParent){addedToDOM=1;nextSibling=target.nextElementSibling;_docElement.appendChild(target);} 295matrix=_getComputedTransformMatrixAsArray(target);temp?style.display=temp:_removeProperty(target,"display");if(addedToDOM){nextSibling?parent.insertBefore(target,nextSibling):parent?parent.appendChild(target):_docElement.removeChild(target);}} 296return force2D&&matrix.length>
vendor: 8,399 bytes, lines 296-321
2966?[matrix[0],matrix[1],matrix[4],matrix[5],matrix[12],matrix[13]]:matrix;},_applySVGOrigin=function _applySVGOrigin(target,origin,originIsAbsolute,smooth,matrixArray,pluginToAddPropTweensTo){var cache=target._gsap,matrix=matrixArray||_getMatrix(target,true),xOriginOld=cache.xOrigin||0,yOriginOld=cache.yOrigin||0,xOffsetOld=cache.xOffset||0,yOffsetOld=cache.yOffset||0,a=matrix[0],b=matrix[1],c=matrix[2],d=matrix[3],tx=matrix[4],ty=matrix[5],originSplit=origin.split(" "),xOrigin=parseFloat(originSplit[0])||0,yOrigin=parseFloat(originSplit[1])||0,bounds,determinant,x,y;if(!originIsAbsolute){bounds=_getBBox(target);xOrigin=bounds.x+(~originSplit[0].indexOf("%")?xOrigin/100*bounds.width:xOrigin);yOrigin=bounds.y+(~(originSplit[1]||originSplit[0]).indexOf("%")?yOrigin/100*bounds.height:yOrigin);}else if(matrix!==_identity2DMatrix&&(determinant=a*d-b*c)){x=xOrigin*(d/determinant)+yOrigin*(-c/determinant)+(c*ty-d*tx)/determinant;y=xOrigin*(-b/determinant)+yOrigin*(a/determinant)-(a*ty-b*tx)/determinant;xOrigin=x;yOrigin=y;} 297if(smooth||smooth!==false&&cache.smooth){tx=xOrigin-xOriginOld;ty=yOrigin-yOriginOld;cache.xOffset=xOffsetOld+(tx*a+ty*c)-tx;cache.yOffset=yOffsetOld+(tx*b+ty*d)-ty;}else{cache.xOffset=cache.yOffset=0;} 298cache.xOrigin=xOrigin;cache.yOrigin=yOrigin;cache.smooth=!!smooth;cache.origin=origin;cache.originIsAbsolute=!!originIsAbsolute;target.style[_transformOriginProp]="0px 0px";if(pluginToAddPropTweensTo){_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOrigin",xOriginOld,xOrigin);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOrigin",yOriginOld,yOrigin);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOffset",xOffsetOld,cache.xOffset);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOffset",yOffsetOld,cache.yOffset);} 299target.setAttribute("data-svg-origin",xOrigin+" "+yOrigin);},_parseTransform=function _parseTransform(target,uncache){var cache=target._gsap||new GSCache(target);if("x"in cache&&!uncache&&!cache.uncache){return cache;} 300var style=target.style,invertedScaleX=cache.scaleX<0,px="px",deg="deg",cs=getComputedStyle(target),origin=_getComputedProperty(target,_transformOriginProp)||"0",x,y,z,scaleX,scaleY,rotation,rotationX,rotationY,skewX,skewY,perspective,xOrigin,yOrigin,matrix,angle,cos,sin,a,b,c,d,a12,a22,t1,t2,t3,a13,a23,a33,a42,a43,a32;x=y=z=rotation=rotationX=rotationY=skewX=skewY=perspective=0;scaleX=scaleY=1;cache.svg=!!(target.getCTM&&_isSVG(target));if(cs.translate){if(cs.translate!=="none"||cs.scale!=="none"||cs.rotate!=="none"){style[_transformProp]=(cs.translate!=="none"?"translate3d("+(cs.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(cs.rotate!=="none"?"rotate("+cs.rotate+") ":"")+(cs.scale!=="none"?"scale("+cs.scale.split(" ").join(",")+") ":"")+(cs[_transformProp]!=="none"?cs[_transformProp]:"");} 301style.scale=style.rotate=style.translate="none";} 302matrix=_getMatrix(target,cache.svg);if(cache.svg){if(cache.uncache){t2=target.getBBox();origin=cache.xOrigin-t2.x+"px "+(cache.yOrigin-t2.y)+"px";t1="";}else{t1=!uncache&&target.getAttribute("data-svg-origin");} 303_applySVGOrigin(target,t1||origin,!!t1||cache.originIsAbsolute,cache.smooth!==false,matrix);} 304xOrigin=cache.xOrigin||0;yOrigin=cache.yOrigin||0;if(matrix!==_identity2DMatrix){a=matrix[0];b=matrix[1];c=matrix[2];d=matrix[3];x=a12=matrix[4];y=a22=matrix[5];if(matrix.length===6){scaleX=Math.sqrt(a*a+b*b);scaleY=Math.sqrt(d*d+c*c);rotation=a||b?_atan2(b,a)*_RAD2DEG:0;skewX=c||d?_atan2(c,d)*_RAD2DEG+rotation:0;skewX&&(scaleY*=Math.abs(Math.cos(skewX*_DEG2RAD)));if(cache.svg){x-=xOrigin-(xOrigin*a+yOrigin*c);y-=yOrigin-(xOrigin*b+yOrigin*d);}}else{a32=matrix[6];a42=matrix[7];a13=matrix[8];a23=matrix[9];a33=matrix[10];a43=matrix[11];x=matrix[12];y=matrix[13];z=matrix[14];angle=_atan2(a32,a33);rotationX=angle*_RAD2DEG;if(angle){cos=Math.cos(-angle);sin=Math.sin(-angle);t1=a12*cos+a13*sin;t2=a22*cos+a23*sin;t3=a32*cos+a33*sin;a13=a12*-sin+a13*cos;a23=a22*-sin+a23*cos;a33=a32*-sin+a33*cos;a43=a42*-sin+a43*cos;a12=t1;a22=t2;a32=t3;} 305angle=_atan2(-c,a33);rotationY=angle*_RAD2DEG;if(angle){cos=Math.cos(-angle);sin=Math.sin(-angle);t1=a*cos-a13*sin;t2=b*cos-a23*sin;t3=c*cos-a33*sin;a43=d*sin+a43*cos;a=t1;b=t2;c=t3;} 306angle=_atan2(b,a);rotation=angle*_RAD2DEG;if(angle){cos=Math.cos(angle);sin=Math.sin(angle);t1=a*cos+b*sin;t2=a12*cos+a22*sin;b=b*cos-a*sin;a22=a22*cos-a12*sin;a=t1;a12=t2;} 307if(rotationX&&Math.abs(rotationX)+Math.abs(rotation)>359.9){rotationX=rotation=0;rotationY=180-rotationY;} 308scaleX=_round(Math.sqrt(a*a+b*b+c*c));scaleY=_round(Math.sqrt(a22*a22+a32*a32));angle=_atan2(a12,a22);skewX=Math.abs(angle)>0.0002?angle*_RAD2DEG:0;perspective=a43?1/(a43<0?-a43:a43):0;} 309if(cache.svg){t1=target.getAttribute("transform");cache.forceCSS=target.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(target,_transformProp));t1&&target.setAttribute("transform",t1);}} 310if(Math.abs(skewX)>90&&Math.abs(skewX)<270){if(invertedScaleX){scaleX*=-1;skewX+=rotation<=0?180:-180;rotation+=rotation<=0?180:-180;}else{scaleY*=-1;skewX+=skewX<=0?180:-180;}} 311uncache=uncache||cache.uncache;cache.x=x-((cache.xPercent=x&&(!uncache&&cache.xPercent||(Math.round(target.offsetWidth/2)===Math.round(-x)?-50:0)))?target.offsetWidth*cache.xPercent/100:0)+px;cache.y=y-((cache.yPercent=y&&(!uncache&&cache.yPercent||(Math.round(target.offsetHeight/2)===Math.round(-y)?-50:0)))?target.offsetHeight*cache.yPercent/100:0)+px;cache.z=z+px;cache.scaleX=_round(scaleX);cache.scaleY=_round(scaleY);cache.rotation=_round(rotation)+deg;cache.rotationX=_round(rotationX)+deg;cache.rotationY=_round(rotationY)+deg;cache.skewX=skewX+deg;cache.skewY=skewY+deg;cache.transformPerspective=perspective+px;if(cache.zOrigin=parseFloat(origin.split(" ")[2])||!uncache&&cache.zOrigin||0){style[_transformOriginProp]=_firstTwoOnly(origin);} 312cache.xOffset=cache.yOffset=0;cache.force3D=_config.force3D;cache.renderTransform=cache.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms;cache.uncache=0;return cache;},_firstTwoOnly=function _firstTwoOnly(value){return(value=value.split(" "))[0]+" "+value[1];},_addPxTranslate=function _addPxTranslate(target,start,value){var unit=getUnit(start);return _round(parseFloat(start)+parseFloat(_convertToUnit(target,"x",value+"px",unit)))+unit;},_renderNon3DTransforms=function _renderNon3DTransforms(ratio,cache){cache.z="0px";cache.rotationY=cache.rotationX="0deg";cache.force3D=0;_renderCSSTransforms(ratio,cache);},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function _renderCSSTransforms(ratio,cache){var _ref=cache||this,xPercent=_ref.xPercent,yPercent=_ref.yPercent,x=_ref.x,y=_ref.y,z=_ref.z,rotation=_ref.rotation,rotationY=_ref.rotationY,rotationX=_ref.rotationX,skewX=_ref.skewX,skewY=_ref.skewY,scaleX=_ref.scaleX,scaleY=_ref.scaleY,transformPerspective=_ref.transformPerspective,force3D=_ref.force3D,target=_ref.target,zOrigin=_ref.zOrigin,transforms="",use3D=force3D==="auto"&&ratio&&ratio!==1||force3D===true;if(zOrigin&&(rotationX!==_zeroDeg||rotationY!==_zeroDeg)){var angle=parseFloat(rotationY)*_DEG2RAD,a13=Math.sin(angle),a33=Math.cos(angle),cos;angle=parseFloat(rotationX)*_DEG2RAD;cos=Math.cos(angle);x=_addPxTranslate(target,x,a13*cos*-zOrigin);y=_addPxTranslate(target,y,-Math.sin(angle)*-zOrigin);z=_addPxTranslate(target,z,a33*cos*-zOrigin+zOrigin);} 313if(transformPerspective!==_zeroPx){transforms+="perspective("+transformPerspective+_endParenthesis;} 314if(xPercent||yPercent){transforms+="translate("+xPercent+"%, "+yPercent+"%) ";} 315if(use3D||x!==_zeroPx||y!==_zeroPx||z!==_zeroPx){transforms+=z!==_zeroPx||use3D?"translate3d("+x+", "+y+", "+z+") ":"translate("+x+", "+y+_endParenthesis;} 316if(rotation!==_zeroDeg){transforms+="rotate("+rotation+_endParenthesis;} 317if(rotationY!==_zeroDeg){transforms+="rotateY("+rotationY+_endParenthesis;} 318if(rotationX!==_zeroDeg){transforms+="rotateX("+rotationX+_endParenthesis;} 319if(skewX!==_zeroDeg||skewY!==_zeroDeg){transforms+="skew("+skewX+", "+skewY+_endParenthesis;} 320if(scaleX!==1||scaleY!==1){transforms+="scale("+scaleX+", "+scaleY+_endParenthesis;} 321target.style[_transformProp]=transforms||"translate(0, 0)";},_renderSVGTransforms=function _renderSVGTransforms(ratio,cache){var _ref2=cache||this,xPercent=_ref2.xPercent,yPercent=_ref2.yPercent,x=_ref2.x,y=_ref2.y,rotation=_ref2.rotation,skewX=_ref2.skewX,skewY=_ref2.skewY,scaleX=_ref2.scaleX,scaleY=_ref2.scaleY,target=_ref2.target,xOr
vendor: 4,473 bytes, lines 321-333
321igin=_ref2.xOrigin,yOrigin=_ref2.yOrigin,xOffset=_ref2.xOffset,yOffset=_ref2.yOffset,forceCSS=_ref2.forceCSS,tx=parseFloat(x),ty=parseFloat(y),a11,a21,a12,a22,temp;rotation=parseFloat(rotation);skewX=parseFloat(skewX);skewY=parseFloat(skewY);if(skewY){skewY=parseFloat(skewY);skewX+=skewY;rotation+=skewY;} 322if(rotation||skewX){rotation*=_DEG2RAD;skewX*=_DEG2RAD;a11=Math.cos(rotation)*scaleX;a21=Math.sin(rotation)*scaleX;a12=Math.sin(rotation-skewX)*-scaleY;a22=Math.cos(rotation-skewX)*scaleY;if(skewX){skewY*=_DEG2RAD;temp=Math.tan(skewX-skewY);temp=Math.sqrt(1+temp*temp);a12*=temp;a22*=temp;if(skewY){temp=Math.tan(skewY);temp=Math.sqrt(1+temp*temp);a11*=temp;a21*=temp;}} 323a11=_round(a11);a21=_round(a21);a12=_round(a12);a22=_round(a22);}else{a11=scaleX;a22=scaleY;a21=a12=0;} 324if(tx&&!~(x+"").indexOf("px")||ty&&!~(y+"").indexOf("px")){tx=_convertToUnit(target,"x",x,"px");ty=_convertToUnit(target,"y",y,"px");} 325if(xOrigin||yOrigin||xOffset||yOffset){tx=_round(tx+xOrigin-(xOrigin*a11+yOrigin*a12)+xOffset);ty=_round(ty+yOrigin-(xOrigin*a21+yOrigin*a22)+yOffset);} 326if(xPercent||yPercent){temp=target.getBBox();tx=_round(tx+xPercent/100*temp.width);ty=_round(ty+yPercent/100*temp.height);} 327temp="matrix("+a11+","+a21+","+a12+","+a22+","+tx+","+ty+")";target.setAttribute("transform",temp);forceCSS&&(target.style[_transformProp]=temp);},_addRotationalPropTween=function _addRotationalPropTween(plugin,target,property,startNum,endValue){var cap=360,isString=_isString(endValue),endNum=parseFloat(endValue)*(isString&&~endValue.indexOf("rad")?_RAD2DEG:1),change=endNum-startNum,finalValue=startNum+change+"deg",direction,pt;if(isString){direction=endValue.split("_")[1];if(direction==="short"){change%=cap;if(change!==change%(cap/2)){change+=change<0?cap:-cap;}} 328if(direction==="cw"&&change<0){change=(change+cap*_bigNum$1)%cap-~~(change/cap)*cap;}else if(direction==="ccw"&&change>0){change=(change-cap*_bigNum$1)%cap-~~(change/cap)*cap;}} 329plugin._pt=pt=new PropTween(plugin._pt,target,property,startNum,change,_renderPropWithEnd);pt.e=finalValue;pt.u="deg";plugin._props.push(property);return pt;},_assign=function _assign(target,source){for(var p in source){target[p]=source[p];} 330return target;},_addRawTransformPTs=function _addRawTransformPTs(plugin,transforms,target){var startCache=_assign({},target._gsap),exclude="perspective,force3D,transformOrigin,svgOrigin",style=target.style,endCache,p,startValue,endValue,startNum,endNum,startUnit,endUnit;if(startCache.svg){startValue=target.getAttribute("transform");target.setAttribute("transform","");style[_transformProp]=transforms;endCache=_parseTransform(target,1);_removeProperty(target,_transformProp);target.setAttribute("transform",startValue);}else{startValue=getComputedStyle(target)[_transformProp];style[_transformProp]=transforms;endCache=_parseTransform(target,1);style[_transformProp]=startValue;} 331for(p in _transformProps){startValue=startCache[p];endValue=endCache[p];if(startValue!==endValue&&exclude.indexOf(p)<0){startUnit=getUnit(startValue);endUnit=getUnit(endValue);startNum=startUnit!==endUnit?_convertToUnit(target,p,startValue,endUnit):parseFloat(startValue);endNum=parseFloat(endValue);plugin._pt=new PropTween(plugin._pt,endCache,p,startNum,endNum-startNum,_renderCSSProp);plugin._pt.u=endUnit||0;plugin._props.push(p);}} 332_assign(endCache,startCache);};_forEachName("padding,margin,Width,Radius",function(name,index){var t="Top",r="Right",b="Bottom",l="Left",props=(index<3?[t,r,b,l]:[t+l,t+r,b+r,b+l]).map(function(side){return index<2?name+side:"border"+side+name;});_specialProps[index>1?"border"+name:name]=function(plugin,target,property,endValue,tween){var a,vars;if(arguments.length<4){a=props.map(function(prop){return _get(plugin,prop,property);});vars=a.join(" ");return vars.split(a[0]).length===5?a[0]:vars;} 333a=(endValue+"").split(" ");vars={};props.forEach(function(prop,i){return vars[prop]=a[i]=a[i]||a[(i-1)/2|0];});plugin.init(target,vars,tween);};});var CSSPlugin={name:"css",register:_initCore,targetTest:function targetTest(target){return target.style&&target.nodeType;},init:function init(target,vars,tween,index,targets){var props=this._props,style=target.style,startAt=tween.vars.startAt,startValue,endValue,endNum,startNum,type,specialProp,p,startUnit,endUnit,relative,isTransformRelated,transformPropTween,cache,smooth,hasPriority,inlineProps;_pluginInitted||_initCore();this.styles=this.styles||_getStyleSaver(target);inlineProps=this.styles.props;this.tween=tween;
vendor: 6,507 bytes, lines 333-347
333for(p in vars){if(p==="autoRound"){continue;} 334endValue=vars[p];if(_plugins[p]&&_checkPlugin(p,vars,tween,index,target,targets)){continue;} 335type=typeof endValue;specialProp=_specialProps[p];if(type==="function"){endValue=endValue.call(tween,index,target,targets);type=typeof endValue;} 336if(type==="string"&&~endValue.indexOf("random(")){endValue=_replaceRandom(endValue);} 337if(specialProp){specialProp(this,target,p,endValue,tween)&&(hasPriority=1);}else if(p.substr(0,2)==="--"){startValue=(getComputedStyle(target).getPropertyValue(p)+"").trim();endValue+="";_colorExp.lastIndex=0;if(!_colorExp.test(startValue)){startUnit=getUnit(startValue);endUnit=getUnit(endValue);} 338endUnit?startUnit!==endUnit&&(startValue=_convertToUnit(target,p,startValue,endUnit)+endUnit):startUnit&&(endValue+=startUnit);this.add(style,"setProperty",startValue,endValue,index,targets,0,0,p);props.push(p);inlineProps.push(p,0,style[p]);}else if(type!=="undefined"){if(startAt&&p in startAt){startValue=typeof startAt[p]==="function"?startAt[p].call(tween,index,target,targets):startAt[p];_isString(startValue)&&~startValue.indexOf("random(")&&(startValue=_replaceRandom(startValue));getUnit(startValue+"")||startValue==="auto"||(startValue+=_config.units[p]||getUnit(_get(target,p))||"");(startValue+"").charAt(1)==="="&&(startValue=_get(target,p));}else{startValue=_get(target,p);} 339startNum=parseFloat(startValue);relative=type==="string"&&endValue.charAt(1)==="="&&endValue.substr(0,2);relative&&(endValue=endValue.substr(2));endNum=parseFloat(endValue);if(p in _propertyAliases){if(p==="autoAlpha"){if(startNum===1&&_get(target,"visibility")==="hidden"&&endNum){startNum=0;} 340inlineProps.push("visibility",0,style.visibility);_addNonTweeningPT(this,style,"visibility",startNum?"inherit":"hidden",endNum?"inherit":"hidden",!endNum);} 341if(p!=="scale"&&p!=="transform"){p=_propertyAliases[p];~p.indexOf(",")&&(p=p.split(",")[0]);}} 342isTransformRelated=p in _transformProps;if(isTransformRelated){this.styles.save(p);if(!transformPropTween){cache=target._gsap;cache.renderTransform&&!vars.parseTransform||_parseTransform(target,vars.parseTransform);smooth=vars.smoothOrigin!==false&&cache.smooth;transformPropTween=this._pt=new PropTween(this._pt,style,_transformProp,0,1,cache.renderTransform,cache,0,-1);transformPropTween.dep=1;} 343if(p==="scale"){this._pt=new PropTween(this._pt,cache,"scaleY",cache.scaleY,(relative?_parseRelative(cache.scaleY,relative+endNum):endNum)-cache.scaleY||0,_renderCSSProp);this._pt.u=0;props.push("scaleY",p);p+="X";}else if(p==="transformOrigin"){inlineProps.push(_transformOriginProp,0,style[_transformOriginProp]);endValue=_convertKeywordsToPercentages(endValue);if(cache.svg){_applySVGOrigin(target,endValue,0,smooth,0,this);}else{endUnit=parseFloat(endValue.split(" ")[2])||0;endUnit!==cache.zOrigin&&_addNonTweeningPT(this,cache,"zOrigin",cache.zOrigin,endUnit);_addNonTweeningPT(this,style,p,_firstTwoOnly(startValue),_firstTwoOnly(endValue));} 344continue;}else if(p==="svgOrigin"){_applySVGOrigin(target,endValue,1,smooth,0,this);continue;}else if(p in _rotationalProperties){_addRotationalPropTween(this,cache,p,startNum,relative?_parseRelative(startNum,relative+endValue):endValue);continue;}else if(p==="smoothOrigin"){_addNonTweeningPT(this,cache,"smooth",cache.smooth,endValue);continue;}else if(p==="force3D"){cache[p]=endValue;continue;}else if(p==="transform"){_addRawTransformPTs(this,endValue,target);continue;}}else if(!(p in style)){p=_checkPropPrefix(p)||p;} 345if(isTransformRelated||(endNum||endNum===0)&&(startNum||startNum===0)&&!_complexExp.test(endValue)&&p in style){startUnit=(startValue+"").substr((startNum+"").length);endNum||(endNum=0);endUnit=getUnit(endValue)||(p in _config.units?_config.units[p]:startUnit);startUnit!==endUnit&&(startNum=_convertToUnit(target,p,startValue,endUnit));this._pt=new PropTween(this._pt,isTransformRelated?cache:style,p,startNum,(relative?_parseRelative(startNum,relative+endNum):endNum)-startNum,!isTransformRelated&&(endUnit==="px"||p==="zIndex")&&vars.autoRound!==false?_renderRoundedCSSProp:_renderCSSProp);this._pt.u=endUnit||0;if(startUnit!==endUnit&&endUnit!=="%"){this._pt.b=startValue;this._pt.r=_renderCSSPropWithBeginning;}}else if(!(p in style)){if(p in target){this.add(target,p,startValue||target[p],relative?relative+endValue:endValue,index,targets);}else if(p!=="parseTransform"){_missingPlugin(p,endValue);continue;}}else{_tweenComplexCSSString.call(this,target,p,startValue,relative?relative+endValue:endValue);} 346isTransformRelated||(p in style?inlineProps.push(p,0,style[p]):inlineProps.push(p,1,startValue||target[p]));props.push(p);}} 347hasPriority&&_sortPropTweensByPriority(this);},render:function render(ratio,data){if(data.tween._time||!_reverting$1()){var pt=data._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next;}}else{data.styles.revert();}},get:_get,aliases:_propertyAliases,getSetter:function getSetter(target,property,plugin){var p=_propertyAliases[property];p&&p.indexOf(",")<0&&(property=p);return property in _transformProps&&property!==_transformOriginProp&&(target._gsap.x||_get(target,"x"))?plugin&&_recentSetterPlugin===plugin?property==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=plugin||{})&&(property==="scale"?_setterScaleWithRender:_setterTransformWithRender):target.style&&!_isUndefined(target.style[property])?_setterCSSStyle:~property.indexOf("-")?_setterCSSProp:_getSetter(target,property);},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}};gsap.utils.checkPrefix=_checkPropPrefix;gsap.core.getStyleSaver=_getStyleSaver;(function(positionAndScale,rotation,others,aliases){var all=_forEachName(positionAndScale+","+rotation+","+others,function(name){_transformProps[name]=1;});_forEachName(rotation,function(name){_config.units[name]="deg";_rotationalProperties[name]=1;});_propertyAliases[all[13]]=positionAndScale+","+rotation;_forEachName(aliases,function(name){var split=name.split(":");_propertyAliases[split[1]]=all[split[0]];});})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(name){_config.units[name]="px";});gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap,TweenMaxWithCSS=gsapWithCSS.core.Tween;exports.Back=Back;
vendor: 137,690 bytes, lines 347-766
347exports.Bounce=Bounce;exports.CSSPlugin=CSSPlugin;exports.Circ=Circ;exports.Cubic=Cubic;exports.Elastic=Elastic;exports.Expo=Expo;exports.Linear=Linear;exports.Power0=Power0;exports.Power1=Power1;exports.Power2=Power2;exports.Power3=Power3;exports.Power4=Power4;exports.Quad=Quad;exports.Quart=Quart;exports.Quint=Quint;exports.Sine=Sine;exports.SteppedEase=SteppedEase;exports.Strong=Strong;exports.TimelineLite=Timeline;exports.TimelineMax=Timeline;exports.TweenLite=Tween;exports.TweenMax=TweenMaxWithCSS;exports.default=gsapWithCSS;exports.gsap=gsapWithCSS;if(typeof(window)==='undefined'||window!==exports){Object.defineProperty(exports,'__esModule',{value:true});}else{delete window.default;}}))); 348/*! 349 * matter-js 0.20.0 by @liabru 350 * http://brm.io/matter-js/ 351 * License MIT 352 * 353 * The MIT License (MIT) 354 * 355 * Copyright (c) Liam Brummitt and contributors. 356 * 357 * Permission is hereby granted, free of charge, to any person obtaining a copy 358 * of this software and associated documentation files (the "Software"), to deal 359 * in the Software without restriction, including without limitation the rights 360 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 361 * copies of the Software, and to permit persons to whom the Software is 362 * furnished to do so, subject to the following conditions: 363 * 364 * The above copyright notice and this permission notice shall be included in 365 * all copies or substantial portions of the Software. 366 * 367 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 368 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 369 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 370 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 371 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 372 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 373 * THE SOFTWARE. 374 */ 375(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object') 376module.exports=factory();else if(typeof define==='function'&&define.amd) 377define("Matter",[],factory);else if(typeof exports==='object') 378exports["Matter"]=factory();else 379root["Matter"]=factory();})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports;} 380var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports;} 381__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter});}};__webpack_require__.r=function(exports){if(typeof Symbol!=='undefined'&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'});} 382Object.defineProperty(exports,'__esModule',{value:true});};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if((mode&4)&&typeof value==='object'&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,'default',{enumerable:true,value:value});if(mode&2&&typeof value!='string')for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key];}.bind(null,key));return ns;};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module['default'];}:function getModuleExports(){return module;};__webpack_require__.d(getter,'a',getter);return getter;};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=20);}) 383([(function(module,exports){var Common={};module.exports=Common;(function(){Common._baseDelta=1000/60;Common._nextId=0;Common._seed=0;Common._nowStartTime=+(new Date());Common._warnedOnce={};Common._decomp=null;Common.extend=function(obj,deep){var argsStart,args,deepClone;if(typeof deep==='boolean'){argsStart=2;deepClone=deep;}else{argsStart=1;deepClone=true;} 384for(var i=argsStart;i<arguments.length;i++){var source=arguments[i];if(source){for(var prop in source){if(deepClone&&source[prop]&&source[prop].constructor===Object){if(!obj[prop]||obj[prop].constructor===Object){obj[prop]=obj[prop]||{};Common.extend(obj[prop],deepClone,source[prop]);}else{obj[prop]=source[prop];}}else{obj[prop]=source[prop];}}}} 385return obj;};Common.clone=function(obj,deep){return Common.extend({},deep,obj);};Common.keys=function(obj){if(Object.keys) 386return Object.keys(obj);var keys=[];for(var key in obj) 387keys.push(key);return keys;};Common.values=function(obj){var values=[];if(Object.keys){var keys=Object.keys(obj);for(var i=0;i<keys.length;i++){values.push(obj[keys[i]]);} 388return values;} 389for(var key in obj) 390values.push(obj[key]);return values;};Common.get=function(obj,path,begin,end){path=path.split('.').slice(begin,end);for(var i=0;i<path.length;i+=1){obj=obj[path[i]];} 391return obj;};Common.set=function(obj,path,val,begin,end){var parts=path.split('.').slice(begin,end);Common.get(obj,path,0,-1)[parts[parts.length-1]]=val;return val;};Common.shuffle=function(array){for(var i=array.length-1;i>0;i--){var j=Math.floor(Common.random()*(i+1));var temp=array[i];array[i]=array[j];array[j]=temp;} 392return array;};Common.choose=function(choices){return choices[Math.floor(Common.random()*choices.length)];};Common.isElement=function(obj){if(typeof HTMLElement!=='undefined'){return obj instanceof HTMLElement;} 393return!!(obj&&obj.nodeType&&obj.nodeName);};Common.isArray=function(obj){return Object.prototype.toString.call(obj)==='[object Array]';};Common.isFunction=function(obj){return typeof obj==="function";};Common.isPlainObject=function(obj){return typeof obj==='object'&&obj.constructor===Object;};Common.isString=function(obj){return toString.call(obj)==='[object String]';};Common.clamp=function(value,min,max){if(value<min) 394return min;if(value>max) 395return max;return value;};Common.sign=function(value){return value<0?-1:1;};Common.now=function(){if(typeof window!=='undefined'&&window.performance){if(window.performance.now){return window.performance.now();}else if(window.performance.webkitNow){return window.performance.webkitNow();}} 396if(Date.now){return Date.now();} 397return(new Date())-Common._nowStartTime;};Common.random=function(min,max){min=(typeof min!=="undefined")?min:0;max=(typeof max!=="undefined")?max:1;return min+_seededRandom()*(max-min);};var _seededRandom=function(){Common._seed=(Common._seed*9301+49297)%233280;return Common._seed/233280;};Common.colorToNumber=function(colorString){colorString=colorString.replace('#','');if(colorString.length==3){colorString=colorString.charAt(0)+colorString.charAt(0) 398+colorString.charAt(1)+colorString.charAt(1) 399+colorString.charAt(2)+colorString.charAt(2);} 400return parseInt(colorString,16);};Common.logLevel=1;Common.log=function(){if(console&&Common.logLevel>0&&Common.logLevel<=3){console.log.apply(console,['matter-js:'].concat(Array.prototype.slice.call(arguments)));}};Common.info=function(){if(console&&Common.logLevel>0&&Common.logLevel<=2){console.info.apply(console,['matter-js:'].concat(Array.prototype.slice.call(arguments)));}};Common.warn=function(){if(console&&Common.logLevel>0&&Common.logLevel<=3){console.warn.apply(console,['matter-js:'].concat(Array.prototype.slice.call(arguments)));}};Common.warnOnce=function(){var message=Array.prototype.slice.call(arguments).join(' ');if(!Common._warnedOnce[message]){Common.warn(message);Common._warnedOnce[message]=true;}};Common.deprecated=function(obj,prop,warning){obj[prop]=Common.chain(function(){Common.warnOnce('ð deprecated ð ',warning);},obj[prop]);};Common.nextId=function(){return Common._nextId++;};Common.indexOf=function(haystack,needle){if(haystack.indexOf) 401return haystack.indexOf(needle);for(var i=0;i<haystack.length;i++){if(haystack[i]===needle) 402return i;} 403return-1;};Common.map=function(list,func){if(list.map){return list.map(func);} 404var mapped=[];for(var i=0;i<list.length;i+=1){mapped.push(func(list[i]));} 405return mapped;};Common.topologicalSort=function(graph){var result=[],visited=[],temp=[];for(var node in graph){if(!visited[node]&&!temp[node]){Common._topologicalSort(node,visited,temp,graph,result);}} 406return result;};Common._topologicalSort=function(node,visited,temp,graph,result){var neighbors=graph[node]||[];temp[node]=true;for(var i=0;i<neighbors.length;i+=1){var neighbor=neighbors[i];if(temp[neighbor]){continue;} 407if(!visited[neighbor]){Common._topologicalSort(neighbor,visited,temp,graph,result);}} 408temp[node]=false;visited[node]=true;result.push(node);};Common.chain=function(){var funcs=[];for(var i=0;i<arguments.length;i+=1){var func=arguments[i];if(func._chained){funcs.push.apply(funcs,func._chained);}else{funcs.push(func);}} 409var chain=function(){var lastResult,args=new Array(arguments.length);for(var i=0,l=arguments.length;i<l;i++){args[i]=arguments[i];} 410for(i=0;i<funcs.length;i+=1){var result=funcs[i].apply(lastResult,args);if(typeof result!=='undefined'){lastResult=result;}} 411return lastResult;};chain._chained=funcs;return chain;};Common.chainPathBefore=function(base,path,func){return Common.set(base,path,Common.chain(func,Common.get(base,path)));};Common.chainPathAfter=function(base,path,func){return Common.set(base,path,Common.chain(Common.get(base,path),func));};Common.setDecomp=function(decomp){Common._decomp=decomp;};Common.getDecomp=function(){var decomp=Common._decomp;try{if(!decomp&&typeof window!=='undefined'){decomp=window.decomp;} 412if(!decomp&&typeof global!=='undefined'){decomp=global.decomp;}}catch(e){decomp=null;} 413return decomp;};})();}),(function(module,exports){var Bounds={};module.exports=Bounds;(function(){Bounds.create=function(vertices){var bounds={min:{x:0,y:0},max:{x:0,y:0}};if(vertices) 414Bounds.update(bounds,vertices);return bounds;};Bounds.update=function(bounds,vertices,velocity){bounds.min.x=Infinity;bounds.max.x=-Infinity;bounds.min.y=Infinity;bounds.max.y=-Infinity;for(var i=0;i<vertices.length;i++){var vertex=vertices[i];if(vertex.x>bounds.max.x)bounds.max.x=vertex.x;if(vertex.x<bounds.min.x)bounds.min.x=vertex.x;if(vertex.y>bounds.max.y)bounds.max.y=vertex.y;if(vertex.y<bounds.min.y)bounds.min.y=vertex.y;} 415if(velocity){if(velocity.x>0){bounds.max.x+=velocity.x;}else{bounds.min.x+=velocity.x;} 416if(velocity.y>0){bounds.max.y+=velocity.y;}else{bounds.min.y+=velocity.y;}}};Bounds.contains=function(bounds,point){return point.x>=bounds.min.x&&point.x<=bounds.max.x&&point.y>=bounds.min.y&&point.y<=bounds.max.y;};Bounds.overlaps=function(boundsA,boundsB){return(boundsA.min.x<=boundsB.max.x&&boundsA.max.x>=boundsB.min.x&&boundsA.max.y>=boundsB.min.y&&boundsA.min.y<=boundsB.max.y);};Bounds.translate=function(bounds,vector){bounds.min.x+=vector.x;bounds.max.x+=vector.x;bounds.min.y+=vector.y;bounds.max.y+=vector.y;};Bounds.shift=function(bounds,position){var deltaX=bounds.max.x-bounds.min.x,deltaY=bounds.max.y-bounds.min.y;bounds.min.x=position.x;bounds.max.x=position.x+deltaX;bounds.min.y=position.y;bounds.max.y=position.y+deltaY;};})();}),(function(module,exports){var Vector={};module.exports=Vector;(function(){Vector.create=function(x,y){return{x:x||0,y:y||0};};Vector.clone=function(vector){return{x:vector.x,y:vector.y};};Vector.magnitude=function(vector){return Math.sqrt((vector.x*vector.x)+(vector.y*vector.y));};Vector.magnitudeSquared=function(vector){return(vector.x*vector.x)+(vector.y*vector.y);};Vector.rotate=function(vector,angle,output){var cos=Math.cos(angle),sin=Math.sin(angle);if(!output)output={};var x=vector.x*cos-vector.y*sin;output.y=vector.x*sin+vector.y*cos;output.x=x;return output;};Vector.rotateAbout=function(vector,angle,point,output){var cos=Math.cos(angle),sin=Math.sin(angle);if(!output)output={};var x=point.x+((vector.x-point.x)*cos-(vector.y-point.y)*sin);output.y=point.y+((vector.x-point.x)*sin+(vector.y-point.y)*cos);output.x=x;return output;};Vector.normalise=function(vector){var magnitude=Vector.magnitude(vector);if(magnitude===0) 417return{x:0,y:0};return{x:vector.x/magnitude,y:vector.y/magnitude};};Vector.dot=function(vectorA,vectorB){return(vectorA.x*vectorB.x)+(vectorA.y*vectorB.y);};Vector.cross=function(vectorA,vectorB){return(vectorA.x*vectorB.y)-(vectorA.y*vectorB.x);};Vector.cross3=function(vectorA,vectorB,vectorC){return(vectorB.x-vectorA.x)*(vectorC.y-vectorA.y)-(vectorB.y-vectorA.y)*(vectorC.x-vectorA.x);};Vector.add=function(vectorA,vectorB,output){if(!output)output={};output.x=vectorA.x+vectorB.x;output.y=vectorA.y+vectorB.y;return output;};Vector.sub=function(vectorA,vectorB,output){if(!output)output={};output.x=vectorA.x-vectorB.x;output.y=vectorA.y-vectorB.y;return output;};Vector.mult=function(vector,scalar){return{x:vector.x*scalar,y:vector.y*scalar};};Vector.div=function(vector,scalar){return{x:vector.x/scalar,y:vector.y/scalar};};Vector.perp=function(vector,negate){negate=negate===true?-1:1;return{x:negate*-vector.y,y:negate*vector.x};};Vector.neg=function(vector){return{x:-vector.x,y:-vector.y};};Vector.angle=function(vectorA,vectorB){return Math.atan2(vectorB.y-vectorA.y,vectorB.x-vectorA.x);};Vector._temp=[Vector.create(),Vector.create(),Vector.create(),Vector.create(),Vector.create(),Vector.create()];})();}),(function(module,exports,__webpack_require__){var Vertices={};module.exports=Vertices;var Vector=__webpack_require__(2);var Common=__webpack_require__(0);(function(){Vertices.create=function(points,body){var vertices=[];for(var i=0;i<points.length;i++){var point=points[i],vertex={x:point.x,y:point.y,index:i,body:body,isInternal:false};vertices.push(vertex);} 418return vertices;};Vertices.fromPath=function(path,body){var pathPattern=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,points=[];path.replace(pathPattern,function(match,x,y){points.push({x:parseFloat(x),y:parseFloat(y)});});return Vertices.create(points,body);};Vertices.centre=function(vertices){var area=Vertices.area(vertices,true),centre={x:0,y:0},cross,temp,j;for(var i=0;i<vertices.length;i++){j=(i+1)%vertices.length;cross=Vector.cross(vertices[i],vertices[j]);temp=Vector.mult(Vector.add(vertices[i],vertices[j]),cross);centre=Vector.add(centre,temp);} 419return Vector.div(centre,6*area);};Vertices.mean=function(vertices){var average={x:0,y:0};for(var i=0;i<vertices.length;i++){average.x+=vertices[i].x;average.y+=vertices[i].y;} 420return Vector.div(average,vertices.length);};Vertices.area=function(vertices,signed){var area=0,j=vertices.length-1;for(var i=0;i<vertices.length;i++){area+=(vertices[j].x-vertices[i].x)*(vertices[j].y+vertices[i].y);j=i;} 421if(signed) 422return area/2;return Math.abs(area)/2;};Vertices.inertia=function(vertices,mass){var numerator=0,denominator=0,v=vertices,cross,j;for(var n=0;n<v.length;n++){j=(n+1)%v.length;cross=Math.abs(Vector.cross(v[j],v[n]));numerator+=cross*(Vector.dot(v[j],v[j])+Vector.dot(v[j],v[n])+Vector.dot(v[n],v[n]));denominator+=cross;} 423return(mass/6)*(numerator/denominator);};Vertices.translate=function(vertices,vector,scalar){scalar=typeof scalar!=='undefined'?scalar:1;var verticesLength=vertices.length,translateX=vector.x*scalar,translateY=vector.y*scalar,i;for(i=0;i<verticesLength;i++){vertices[i].x+=translateX;vertices[i].y+=translateY;} 424return vertices;};Vertices.rotate=function(vertices,angle,point){if(angle===0) 425return;var cos=Math.cos(angle),sin=Math.sin(angle),pointX=point.x,pointY=point.y,verticesLength=vertices.length,vertex,dx,dy,i;for(i=0;i<verticesLength;i++){vertex=vertices[i];dx=vertex.x-pointX;dy=vertex.y-pointY;vertex.x=pointX+(dx*cos-dy*sin);vertex.y=pointY+(dx*sin+dy*cos);} 426return vertices;};Vertices.contains=function(vertices,point){var pointX=point.x,pointY=point.y,verticesLength=vertices.length,vertex=vertices[verticesLength-1],nextVertex;for(var i=0;i<verticesLength;i++){nextVertex=vertices[i];if((pointX-vertex.x)*(nextVertex.y-vertex.y) 427+(pointY-vertex.y)*(vertex.x-nextVertex.x)>0){return false;} 428vertex=nextVertex;} 429return true;};Vertices.scale=function(vertices,scaleX,scaleY,point){if(scaleX===1&&scaleY===1) 430return vertices;point=point||Vertices.centre(vertices);var vertex,delta;for(var i=0;i<vertices.length;i++){vertex=vertices[i];delta=Vector.sub(vertex,point);vertices[i].x=point.x+delta.x*scaleX;vertices[i].y=point.y+delta.y*scaleY;} 431return vertices;};Vertices.chamfer=function(vertices,radius,quality,qualityMin,qualityMax){if(typeof radius==='number'){radius=[radius];}else{radius=radius||[8];} 432quality=(typeof quality!=='undefined')?quality:-1;qualityMin=qualityMin||2;qualityMax=qualityMax||14;var newVertices=[];for(var i=0;i<vertices.length;i++){var prevVertex=vertices[i-1>=0?i-1:vertices.length-1],vertex=vertices[i],nextVertex=vertices[(i+1)%vertices.length],currentRadius=radius[i<radius.length?i:radius.length-1];if(currentRadius===0){newVertices.push(vertex);continue;} 433var prevNormal=Vector.normalise({x:vertex.y-prevVertex.y,y:prevVertex.x-vertex.x});var nextNormal=Vector.normalise({x:nextVertex.y-vertex.y,y:vertex.x-nextVertex.x});var diagonalRadius=Math.sqrt(2*Math.pow(currentRadius,2)),radiusVector=Vector.mult(Common.clone(prevNormal),currentRadius),midNormal=Vector.normalise(Vector.mult(Vector.add(prevNormal,nextNormal),0.5)),scaledVertex=Vector.sub(vertex,Vector.mult(midNormal,diagonalRadius));var precision=quality;if(quality===-1){precision=Math.pow(currentRadius,0.32)*1.75;} 434precision=Common.clamp(precision,qualityMin,qualityMax);if(precision%2===1) 435precision+=1;var alpha=Math.acos(Vector.dot(prevNormal,nextNormal)),theta=alpha/precision;for(var j=0;j<precision;j++){newVertices.push(Vector.add(Vector.rotate(radiusVector,theta*j),scaledVertex));}} 436return newVertices;};Vertices.clockwiseSort=function(vertices){var centre=Vertices.mean(vertices);vertices.sort(function(vertexA,vertexB){return Vector.angle(centre,vertexA)-Vector.angle(centre,vertexB);});return vertices;};Vertices.isConvex=function(vertices){var flag=0,n=vertices.length,i,j,k,z;if(n<3) 437return null;for(i=0;i<n;i++){j=(i+1)%n;k=(i+2)%n;z=(vertices[j].x-vertices[i].x)*(vertices[k].y-vertices[j].y);z-=(vertices[j].y-vertices[i].y)*(vertices[k].x-vertices[j].x);if(z<0){flag|=1;}else if(z>0){flag|=2;} 438if(flag===3){return false;}} 439if(flag!==0){return true;}else{return null;}};Vertices.hull=function(vertices){var upper=[],lower=[],vertex,i;vertices=vertices.slice(0);vertices.sort(function(vertexA,vertexB){var dx=vertexA.x-vertexB.x;return dx!==0?dx:vertexA.y-vertexB.y;});for(i=0;i<vertices.length;i+=1){vertex=vertices[i];while(lower.length>=2&&Vector.cross3(lower[lower.length-2],lower[lower.length-1],vertex)<=0){lower.pop();} 440lower.push(vertex);} 441for(i=vertices.length-1;i>=0;i-=1){vertex=vertices[i];while(upper.length>=2&&Vector.cross3(upper[upper.length-2],upper[upper.length-1],vertex)<=0){upper.pop();} 442upper.push(vertex);} 443upper.pop();lower.pop();return upper.concat(lower);};})();}),(function(module,exports,__webpack_require__){var Body={};module.exports=Body;var Vertices=__webpack_require__(3);var Vector=__webpack_require__(2);var Sleeping=__webpack_require__(7);var Common=__webpack_require__(0);var Bounds=__webpack_require__(1);var Axes=__webpack_require__(11);(function(){Body._timeCorrection=true;Body._inertiaScale=4;Body._nextCollidingGroupId=1;Body._nextNonCollidingGroupId=-1;Body._nextCategory=0x0001;Body._baseDelta=1000/60;Body.create=function(options){var defaults={id:Common.nextId(),type:'body',label:'Body',parts:[],plugin:{},angle:0,vertices:Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:false,isStatic:false,isSleeping:false,motion:0,sleepThreshold:60,density:0.001,restitution:0,friction:0.1,frictionStatic:0.5,frictionAir:0.01,collisionFilter:{category:0x0001,mask:0xFFFFFFFF,group:0},slop:0.05,timeScale:1,render:{visible:true,opacity:1,strokeStyle:null,fillStyle:null,lineWidth:null,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0}},events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inertia:0,deltaTime:1000/60,_original:null};var body=Common.extend(defaults,options);_initProperties(body,options);return body;};Body.nextGroup=function(isNonColliding){if(isNonColliding) 444return Body._nextNonCollidingGroupId--;return Body._nextCollidingGroupId++;};Body.nextCategory=function(){Body._nextCategory=Body._nextCategory<<1;return Body._nextCategory;};var _initProperties=function(body,options){options=options||{};Body.set(body,{bounds:body.bounds||Bounds.create(body.vertices),positionPrev:body.positionPrev||Vector.clone(body.position),anglePrev:body.anglePrev||body.angle,vertices:body.vertices,parts:body.parts||[body],isStatic:body.isStatic,isSleeping:body.isSleeping,parent:body.parent||body});Vertices.rotate(body.vertices,body.angle,body.position);Axes.rotate(body.axes,body.angle);Bounds.update(body.bounds,body.vertices,body.velocity);Body.set(body,{axes:options.axes||body.axes,area:options.area||body.area,mass:options.mass||body.mass,inertia:options.inertia||body.inertia});var defaultFillStyle=(body.isStatic?'#14151f':Common.choose(['#f19648','#f5d259','#f55a3c','#063e7b','#ececd1'])),defaultStrokeStyle=body.isStatic?'#555':'#ccc',defaultLineWidth=body.isStatic&&body.render.fillStyle===null?1:0;body.render.fillStyle=body.render.fillStyle||defaultFillStyle;body.render.strokeStyle=body.render.strokeStyle||defaultStrokeStyle;body.render.lineWidth=body.render.lineWidth||defaultLineWidth;body.render.sprite.xOffset+=-(body.bounds.min.x-body.position.x)/(body.bounds.max.x-body.bounds.min.x);body.render.sprite.yOffset+=-(body.bounds.min.y-body.position.y)/(body.bounds.max.y-body.bounds.min.y);};Body.set=function(body,settings,value){var property;if(typeof settings==='string'){property=settings;settings={};settings[property]=value;} 445for(property in settings){if(!Object.prototype.hasOwnProperty.call(settings,property)) 446continue;value=settings[property];switch(property){case'isStatic':Body.setStatic(body,value);break;case'isSleeping':Sleeping.set(body,value);break;case'mass':Body.setMass(body,value);break;case'density':Body.setDensity(body,value);break;case'inertia':Body.setInertia(body,value);break;case'vertices':Body.setVertices(body,value);break;case'position':Body.setPosition(body,value);break;case'angle':Body.setAngle(body,value);break;case'velocity':Body.setVelocity(body,value);break;case'angularVelocity':Body.setAngularVelocity(body,value);break;case'speed':Body.setSpeed(body,value);break;case'angularSpeed':Body.setAngularSpeed(body,value);break;case'parts':Body.setParts(body,value);break;case'centre':Body.setCentre(body,value);break;default:body[property]=value;}}};Body.setStatic=function(body,isStatic){for(var i=0;i<body.parts.length;i++){var part=body.parts[i];if(isStatic){if(!part.isStatic){part._original={restitution:part.restitution,friction:part.friction,mass:part.mass,inertia:part.inertia,density:part.density,inverseMass:part.inverseMass,inverseInertia:part.inverseInertia};} 447part.restitution=0;part.friction=1;part.mass=part.inertia=part.density=Infinity;part.inverseMass=part.inverseInertia=0;part.positionPrev.x=part.position.x;part.positionPrev.y=part.position.y;part.anglePrev=part.angle;part.angularVelocity=0;part.speed=0;part.angularSpeed=0;part.motion=0;}else if(part._original){part.restitution=part._original.restitution;part.friction=part._original.friction;part.mass=part._original.mass;part.inertia=part._original.inertia;part.density=part._original.density;part.inverseMass=part._original.inverseMass;part.inverseInertia=part._original.inverseInertia;part._original=null;} 448part.isStatic=isStatic;}};Body.setMass=function(body,mass){var moment=body.inertia/(body.mass/6);body.inertia=moment*(mass/6);body.inverseInertia=1/body.inertia;body.mass=mass;body.inverseMass=1/body.mass;body.density=body.mass/body.area;};Body.setDensity=function(body,density){Body.setMass(body,density*body.area);body.density=density;};Body.setInertia=function(body,inertia){body.inertia=inertia;body.inverseInertia=1/body.inertia;};Body.setVertices=function(body,vertices){if(vertices[0].body===body){body.vertices=vertices;}else{body.vertices=Vertices.create(vertices,body);} 449body.axes=Axes.fromVertices(body.vertices);body.area=Vertices.area(body.vertices);Body.setMass(body,body.density*body.area);var centre=Vertices.centre(body.vertices);Vertices.translate(body.vertices,centre,-1);Body.setInertia(body,Body._inertiaScale*Vertices.inertia(body.vertices,body.mass));Vertices.translate(body.vertices,body.position);Bounds.update(body.bounds,body.vertices,body.velocity);};Body.setParts=function(body,parts,autoHull){var i;parts=parts.slice(0);body.parts.length=0;body.parts.push(body);body.parent=body;for(i=0;i<parts.length;i++){var part=parts[i];if(part!==body){part.parent=body;body.parts.push(part);}} 450if(body.parts.length===1) 451return;autoHull=typeof autoHull!=='undefined'?autoHull:true;if(autoHull){var vertices=[];for(i=0;i<parts.length;i++){vertices=vertices.concat(parts[i].vertices);} 452Vertices.clockwiseSort(vertices);var hull=Vertices.hull(vertices),hullCentre=Vertices.centre(hull);Body.setVertices(body,hull);Vertices.translate(body.vertices,hullCentre);} 453var total=Body._totalProperties(body);body.area=total.area;body.parent=body;body.position.x=total.centre.x;body.position.y=total.centre.y;body.positionPrev.x=total.centre.x;body.positionPrev.y=total.centre.y;Body.setMass(body,total.mass);Body.setInertia(body,total.inertia);Body.setPosition(body,total.centre);};Body.setCentre=function(body,centre,relative){if(!relative){body.positionPrev.x=centre.x-(body.position.x-body.positionPrev.x);body.positionPrev.y=centre.y-(body.position.y-body.positionPrev.y);body.position.x=centre.x;body.position.y=centre.y;}else{body.positionPrev.x+=centre.x;body.positionPrev.y+=centre.y;body.position.x+=centre.x;body.position.y+=centre.y;}};Body.setPosition=function(body,position,updateVelocity){var delta=Vector.sub(position,body.position);if(updateVelocity){body.positionPrev.x=body.position.x;body.positionPrev.y=body.position.y;body.velocity.x=delta.x;body.velocity.y=delta.y;body.speed=Vector.magnitude(delta);}else{body.positionPrev.x+=delta.x;body.positionPrev.y+=delta.y;} 454for(var i=0;i<body.parts.length;i++){var part=body.parts[i];part.position.x+=delta.x;part.position.y+=delta.y;Vertices.translate(part.vertices,delta);Bounds.update(part.bounds,part.vertices,body.velocity);}};Body.setAngle=function(body,angle,updateVelocity){var delta=angle-body.angle;if(updateVelocity){body.anglePrev=body.angle;body.angularVelocity=delta;body.angularSpeed=Math.abs(delta);}else{body.anglePrev+=delta;} 455for(var i=0;i<body.parts.length;i++){var part=body.parts[i];part.angle+=delta;Vertices.rotate(part.vertices,delta,body.position);Axes.rotate(part.axes,delta);Bounds.update(part.bounds,part.vertices,body.velocity);if(i>0){Vector.rotateAbout(part.position,delta,body.position,part.position);}}};Body.setVelocity=function(body,velocity){var timeScale=body.deltaTime/Body._baseDelta;body.positionPrev.x=body.position.x-velocity.x*timeScale;body.positionPrev.y=body.position.y-velocity.y*timeScale;body.velocity.x=(body.position.x-body.positionPrev.x)/timeScale;body.velocity.y=(body.position.y-body.positionPrev.y)/timeScale;body.speed=Vector.magnitude(body.velocity);};Body.getVelocity=function(body){var timeScale=Body._baseDelta/body.deltaTime;return{x:(body.position.x-body.positionPrev.x)*timeScale,y:(body.position.y-body.positionPrev.y)*timeScale};};Body.getSpeed=function(body){return Vector.magnitude(Body.getVelocity(body));};Body.setSpeed=function(body,speed){Body.setVelocity(body,Vector.mult(Vector.normalise(Body.getVelocity(body)),speed));};Body.setAngularVelocity=function(body,velocity){var timeScale=body.deltaTime/Body._baseDelta;body.anglePrev=body.angle-velocity*timeScale;body.angularVelocity=(body.angle-body.anglePrev)/timeScale;body.angularSpeed=Math.abs(body.angularVelocity);};Body.getAngularVelocity=function(body){return(body.angle-body.anglePrev)*Body._baseDelta/body.deltaTime;};Body.getAngularSpeed=function(body){return Math.abs(Body.getAngularVelocity(body));};Body.setAngularSpeed=function(body,speed){Body.setAngularVelocity(body,Common.sign(Body.getAngularVelocity(body))*speed);};Body.translate=function(body,translation,updateVelocity){Body.setPosition(body,Vector.add(body.position,translation),updateVelocity);};Body.rotate=function(body,rotation,point,updateVelocity){if(!point){Body.setAngle(body,body.angle+rotation,updateVelocity);}else{var cos=Math.cos(rotation),sin=Math.sin(rotation),dx=body.position.x-point.x,dy=body.position.y-point.y;Body.setPosition(body,{x:point.x+(dx*cos-dy*sin),y:point.y+(dx*sin+dy*cos)},updateVelocity);Body.setAngle(body,body.angle+rotation,updateVelocity);}};Body.scale=function(body,scaleX,scaleY,point){var totalArea=0,totalInertia=0;point=point||body.position;for(var i=0;i<body.parts.length;i++){var part=body.parts[i];Vertices.scale(part.vertices,scaleX,scaleY,point);part.axes=Axes.fromVertices(part.vertices);part.area=Vertices.area(part.vertices);Body.setMass(part,body.density*part.area);Vertices.translate(part.vertices,{x:-part.position.x,y:-part.position.y});Body.setInertia(part,Body._inertiaScale*Vertices.inertia(part.vertices,part.mass));Vertices.translate(part.vertices,{x:part.position.x,y:part.position.y});if(i>0){totalArea+=part.area;totalInertia+=part.inertia;} 456part.position.x=point.x+(part.position.x-point.x)*scaleX;part.position.y=point.y+(part.position.y-point.y)*scaleY;Bounds.update(part.bounds,part.vertices,body.velocity);} 457if(body.parts.length>1){body.area=totalArea;if(!body.isStatic){Body.setMass(body,body.density*totalArea);Body.setInertia(body,totalInertia);}} 458if(body.circleRadius){if(scaleX===scaleY){body.circleRadius*=scaleX;}else{body.circleRadius=null;}}};Body.update=function(body,deltaTime){deltaTime=(typeof deltaTime!=='undefined'?deltaTime:(1000/60))*body.timeScale;var deltaTimeSquared=deltaTime*deltaTime,correction=Body._timeCorrection?deltaTime/(body.deltaTime||deltaTime):1;var frictionAir=1-body.frictionAir*(deltaTime/Common._baseDelta),velocityPrevX=(body.position.x-body.positionPrev.x)*correction,velocityPrevY=(body.position.y-body.positionPrev.y)*correction;body.velocity.x=(velocityPrevX*frictionAir)+(body.force.x/body.mass)*deltaTimeSquared;body.velocity.y=(velocityPrevY*frictionAir)+(body.force.y/body.mass)*deltaTimeSquared;body.positionPrev.x=body.position.x;body.positionPrev.y=body.position.y;body.position.x+=body.velocity.x;body.position.y+=body.velocity.y;body.deltaTime=deltaTime;body.angularVelocity=((body.angle-body.anglePrev)*frictionAir*correction)+(body.torque/body.inertia)*deltaTimeSquared;body.anglePrev=body.angle;body.angle+=body.angularVelocity;for(var i=0;i<body.parts.length;i++){var part=body.parts[i];Vertices.translate(part.vertices,body.velocity);if(i>0){part.position.x+=body.velocity.x;part.position.y+=body.velocity.y;} 459if(body.angularVelocity!==0){Vertices.rotate(part.vertices,body.angularVelocity,body.position);Axes.rotate(part.axes,body.angularVelocity);if(i>0){Vector.rotateAbout(part.position,body.angularVelocity,body.position,part.position);}} 460Bounds.update(part.bounds,part.vertices,body.velocity);}};Body.updateVelocities=function(body){var timeScale=Body._baseDelta/body.deltaTime,bodyVelocity=body.velocity;bodyVelocity.x=(body.position.x-body.positionPrev.x)*timeScale;bodyVelocity.y=(body.position.y-body.positionPrev.y)*timeScale;body.speed=Math.sqrt((bodyVelocity.x*bodyVelocity.x)+(bodyVelocity.y*bodyVelocity.y));body.angularVelocity=(body.angle-body.anglePrev)*timeScale;body.angularSpeed=Math.abs(body.angularVelocity);};Body.applyForce=function(body,position,force){var offset={x:position.x-body.position.x,y:position.y-body.position.y};body.force.x+=force.x;body.force.y+=force.y;body.torque+=offset.x*force.y-offset.y*force.x;};Body._totalProperties=function(body){var properties={mass:0,area:0,inertia:0,centre:{x:0,y:0}};for(var i=body.parts.length===1?0:1;i<body.parts.length;i++){var part=body.parts[i],mass=part.mass!==Infinity?part.mass:1;properties.mass+=mass;properties.area+=part.area;properties.inertia+=part.inertia;properties.centre=Vector.add(properties.centre,Vector.mult(part.position,mass));} 461properties.centre=Vector.div(properties.centre,properties.mass);return properties;};})();}),(function(module,exports,__webpack_require__){var Events={};module.exports=Events;var Common=__webpack_require__(0);(function(){Events.on=function(object,eventNames,callback){var names=eventNames.split(' '),name;for(var i=0;i<names.length;i++){name=names[i];object.events=object.events||{};object.events[name]=object.events[name]||[];object.events[name].push(callback);} 462return callback;};Events.off=function(object,eventNames,callback){if(!eventNames){object.events={};return;} 463if(typeof eventNames==='function'){callback=eventNames;eventNames=Common.keys(object.events).join(' ');} 464var names=eventNames.split(' ');for(var i=0;i<names.length;i++){var callbacks=object.events[names[i]],newCallbacks=[];if(callback&&callbacks){for(var j=0;j<callbacks.length;j++){if(callbacks[j]!==callback) 465newCallbacks.push(callbacks[j]);}} 466object.events[names[i]]=newCallbacks;}};Events.trigger=function(object,eventNames,event){var names,name,callbacks,eventClone;var events=object.events;if(events&&Common.keys(events).length>0){if(!event) 467event={};names=eventNames.split(' ');for(var i=0;i<names.length;i++){name=names[i];callbacks=events[name];if(callbacks){eventClone=Common.clone(event,false);eventClone.name=name;eventClone.source=object;for(var j=0;j<callbacks.length;j++){callbacks[j].apply(object,[eventClone]);}}}}};})();}),(function(module,exports,__webpack_require__){var Composite={};module.exports=Composite;var Events=__webpack_require__(5);var Common=__webpack_require__(0);var Bounds=__webpack_require__(1);var Body=__webpack_require__(4);(function(){Composite.create=function(options){return Common.extend({id:Common.nextId(),type:'composite',parent:null,isModified:false,bodies:[],constraints:[],composites:[],label:'Composite',plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},options);};Composite.setModified=function(composite,isModified,updateParents,updateChildren){composite.isModified=isModified;if(isModified&&composite.cache){composite.cache.allBodies=null;composite.cache.allConstraints=null;composite.cache.allComposites=null;} 468if(updateParents&&composite.parent){Composite.setModified(composite.parent,isModified,updateParents,updateChildren);} 469if(updateChildren){for(var i=0;i<composite.composites.length;i++){var childComposite=composite.composites[i];Composite.setModified(childComposite,isModified,updateParents,updateChildren);}}};Composite.add=function(composite,object){var objects=[].concat(object);Events.trigger(composite,'beforeAdd',{object:object});for(var i=0;i<objects.length;i++){var obj=objects[i];switch(obj.type){case'body':if(obj.parent!==obj){Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)');break;} 470Composite.addBody(composite,obj);break;case'constraint':Composite.addConstraint(composite,obj);break;case'composite':Composite.addComposite(composite,obj);break;case'mouseConstraint':Composite.addConstraint(composite,obj.constraint);break;}} 471Events.trigger(composite,'afterAdd',{object:object});return composite;};Composite.remove=function(composite,object,deep){var objects=[].concat(object);Events.trigger(composite,'beforeRemove',{object:object});for(var i=0;i<objects.length;i++){var obj=objects[i];switch(obj.type){case'body':Composite.removeBody(composite,obj,deep);break;case'constraint':Composite.removeConstraint(composite,obj,deep);break;case'composite':Composite.removeComposite(composite,obj,deep);break;case'mouseConstraint':Composite.removeConstraint(composite,obj.constraint);break;}} 472Events.trigger(composite,'afterRemove',{object:object});return composite;};Composite.addComposite=function(compositeA,compositeB){compositeA.composites.push(compositeB);compositeB.parent=compositeA;Composite.setModified(compositeA,true,true,false);return compositeA;};Composite.removeComposite=function(compositeA,compositeB,deep){var position=Common.indexOf(compositeA.composites,compositeB);if(position!==-1){var bodies=Composite.allBodies(compositeB);Composite.removeCompositeAt(compositeA,position);for(var i=0;i<bodies.length;i++){bodies[i].sleepCounter=0;}} 473if(deep){for(var i=0;i<compositeA.composites.length;i++){Composite.removeComposite(compositeA.composites[i],compositeB,true);}} 474return compositeA;};Composite.removeCompositeAt=function(composite,position){composite.composites.splice(position,1);Composite.setModified(composite,true,true,false);return composite;};Composite.addBody=function(composite,body){composite.bodies.push(body);Composite.setModified(composite,true,true,false);return composite;};Composite.removeBody=function(composite,body,deep){var position=Common.indexOf(composite.bodies,body);if(position!==-1){Composite.removeBodyAt(composite,position);body.sleepCounter=0;} 475if(deep){for(var i=0;i<composite.composites.length;i++){Composite.removeBody(composite.composites[i],body,true);}} 476return composite;};Composite.removeBodyAt=function(composite,position){composite.bodies.splice(position,1);Composite.setModified(composite,true,true,false);return composite;};Composite.addConstraint=function(composite,constraint){composite.constraints.push(constraint);Composite.setModified(composite,true,true,false);return composite;};Composite.removeConstraint=function(composite,constraint,deep){var position=Common.indexOf(composite.constraints,constraint);if(position!==-1){Composite.removeConstraintAt(composite,position);} 477if(deep){for(var i=0;i<composite.composites.length;i++){Composite.removeConstraint(composite.composites[i],constraint,true);}} 478return composite;};Composite.removeConstraintAt=function(composite,position){composite.constraints.splice(position,1);Composite.setModified(composite,true,true,false);return composite;};Composite.clear=function(composite,keepStatic,deep){if(deep){for(var i=0;i<composite.composites.length;i++){Composite.clear(composite.composites[i],keepStatic,true);}} 479if(keepStatic){composite.bodies=composite.bodies.filter(function(body){return body.isStatic;});}else{composite.bodies.length=0;} 480composite.constraints.length=0;composite.composites.length=0;Composite.setModified(composite,true,true,false);return composite;};Composite.allBodies=function(composite){if(composite.cache&&composite.cache.allBodies){return composite.cache.allBodies;} 481var bodies=[].concat(composite.bodies);for(var i=0;i<composite.composites.length;i++) 482bodies=bodies.concat(Composite.allBodies(composite.composites[i]));if(composite.cache){composite.cache.allBodies=bodies;} 483return bodies;};Composite.allConstraints=function(composite){if(composite.cache&&composite.cache.allConstraints){return composite.cache.allConstraints;} 484var constraints=[].concat(composite.constraints);for(var i=0;i<composite.composites.length;i++) 485constraints=constraints.concat(Composite.allConstraints(composite.composites[i]));if(composite.cache){composite.cache.allConstraints=constraints;} 486return constraints;};Composite.allComposites=function(composite){if(composite.cache&&composite.cache.allComposites){return composite.cache.allComposites;} 487var composites=[].concat(composite.composites);for(var i=0;i<composite.composites.length;i++) 488composites=composites.concat(Composite.allComposites(composite.composites[i]));if(composite.cache){composite.cache.allComposites=composites;} 489return composites;};Composite.get=function(composite,id,type){var objects,object;switch(type){case'body':objects=Composite.allBodies(composite);break;case'constraint':objects=Composite.allConstraints(composite);break;case'composite':objects=Composite.allComposites(composite).concat(composite);break;} 490if(!objects) 491return null;object=objects.filter(function(object){return object.id.toString()===id.toString();});return object.length===0?null:object[0];};Composite.move=function(compositeA,objects,compositeB){Composite.remove(compositeA,objects);Composite.add(compositeB,objects);return compositeA;};Composite.rebase=function(composite){var objects=Composite.allBodies(composite).concat(Composite.allConstraints(composite)).concat(Composite.allComposites(composite));for(var i=0;i<objects.length;i++){objects[i].id=Common.nextId();} 492return composite;};Composite.translate=function(composite,translation,recursive){var bodies=recursive?Composite.allBodies(composite):composite.bodies;for(var i=0;i<bodies.length;i++){Body.translate(bodies[i],translation);} 493return composite;};Composite.rotate=function(composite,rotation,point,recursive){var cos=Math.cos(rotation),sin=Math.sin(rotation),bodies=recursive?Composite.allBodies(composite):composite.bodies;for(var i=0;i<bodies.length;i++){var body=bodies[i],dx=body.position.x-point.x,dy=body.position.y-point.y;Body.setPosition(body,{x:point.x+(dx*cos-dy*sin),y:point.y+(dx*sin+dy*cos)});Body.rotate(body,rotation);} 494return composite;};Composite.scale=function(composite,scaleX,scaleY,point,recursive){var bodies=recursive?Composite.allBodies(composite):composite.bodies;for(var i=0;i<bodies.length;i++){var body=bodies[i],dx=body.position.x-point.x,dy=body.position.y-point.y;Body.setPosition(body,{x:point.x+dx*scaleX,y:point.y+dy*scaleY});Body.scale(body,scaleX,scaleY);} 495return composite;};Composite.bounds=function(composite){var bodies=Composite.allBodies(composite),vertices=[];for(var i=0;i<bodies.length;i+=1){var body=bodies[i];vertices.push(body.bounds.min,body.bounds.max);} 496return Bounds.create(vertices);};})();}),(function(module,exports,__webpack_require__){var Sleeping={};module.exports=Sleeping;var Body=__webpack_require__(4);var Events=__webpack_require__(5);var Common=__webpack_require__(0);(function(){Sleeping._motionWakeThreshold=0.18;Sleeping._motionSleepThreshold=0.08;Sleeping._minBias=0.9;Sleeping.update=function(bodies,delta){var timeScale=delta/Common._baseDelta,motionSleepThreshold=Sleeping._motionSleepThreshold;for(var i=0;i<bodies.length;i++){var body=bodies[i],speed=Body.getSpeed(body),angularSpeed=Body.getAngularSpeed(body),motion=speed*speed+angularSpeed*angularSpeed;if(body.force.x!==0||body.force.y!==0){Sleeping.set(body,false);continue;} 497var minMotion=Math.min(body.motion,motion),maxMotion=Math.max(body.motion,motion);body.motion=Sleeping._minBias*minMotion+(1-Sleeping._minBias)*maxMotion;if(body.sleepThreshold>0&&body.motion<motionSleepThreshold){body.sleepCounter+=1;if(body.sleepCounter>=body.sleepThreshold/timeScale){Sleeping.set(body,true);}}else if(body.sleepCounter>0){body.sleepCounter-=1;}}};Sleeping.afterCollisions=function(pairs){var motionSleepThreshold=Sleeping._motionSleepThreshold;for(var i=0;i<pairs.length;i++){var pair=pairs[i];if(!pair.isActive) 498continue;var collision=pair.collision,bodyA=collision.bodyA.parent,bodyB=collision.bodyB.parent;if((bodyA.isSleeping&&bodyB.isSleeping)||bodyA.isStatic||bodyB.isStatic) 499continue;if(bodyA.isSleeping||bodyB.isSleeping){var sleepingBody=(bodyA.isSleeping&&!bodyA.isStatic)?bodyA:bodyB,movingBody=sleepingBody===bodyA?bodyB:bodyA;if(!sleepingBody.isStatic&&movingBody.motion>motionSleepThreshold){Sleeping.set(sleepingBody,false);}}}};Sleeping.set=function(body,isSleeping){var wasSleeping=body.isSleeping;if(isSleeping){body.isSleeping=true;body.sleepCounter=body.sleepThreshold;body.positionImpulse.x=0;body.positionImpulse.y=0;body.positionPrev.x=body.position.x;body.positionPrev.y=body.position.y;body.anglePrev=body.angle;body.speed=0;body.angularSpeed=0;body.motion=0;if(!wasSleeping){Events.trigger(body,'sleepStart');}}else{body.isSleeping=false;body.sleepCounter=0;if(wasSleeping){Events.trigger(body,'sleepEnd');}}};})();}),(function(module,exports,__webpack_require__){var Collision={};module.exports=Collision;var Vertices=__webpack_require__(3);var Pair=__webpack_require__(9);(function(){var _supports=[];var _overlapAB={overlap:0,axis:null};var _overlapBA={overlap:0,axis:null};Collision.create=function(bodyA,bodyB){return{pair:null,collided:false,bodyA:bodyA,bodyB:bodyB,parentA:bodyA.parent,parentB:bodyB.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0};};Collision.collides=function(bodyA,bodyB,pairs){Collision._overlapAxes(_overlapAB,bodyA.vertices,bodyB.vertices,bodyA.axes);if(_overlapAB.overlap<=0){return null;} 500Collision._overlapAxes(_overlapBA,bodyB.vertices,bodyA.vertices,bodyB.axes);if(_overlapBA.overlap<=0){return null;} 501var pair=pairs&&pairs.table[Pair.id(bodyA,bodyB)],collision;if(!pair){collision=Collision.create(bodyA,bodyB);collision.collided=true;collision.bodyA=bodyA.id<bodyB.id?bodyA:bodyB;collision.bodyB=bodyA.id<bodyB.id?bodyB:bodyA;collision.parentA=collision.bodyA.parent;collision.parentB=collision.bodyB.parent;}else{collision=pair.collision;} 502bodyA=collision.bodyA;bodyB=collision.bodyB;var minOverlap;if(_overlapAB.overlap<_overlapBA.overlap){minOverlap=_overlapAB;}else{minOverlap=_overlapBA;} 503var normal=collision.normal,tangent=collision.tangent,penetration=collision.penetration,supports=collision.supports,depth=minOverlap.overlap,minAxis=minOverlap.axis,normalX=minAxis.x,normalY=minAxis.y,deltaX=bodyB.position.x-bodyA.position.x,deltaY=bodyB.position.y-bodyA.position.y;if(normalX*deltaX+normalY*deltaY>=0){normalX=-normalX;normalY=-normalY;} 504normal.x=normalX;normal.y=normalY;tangent.x=-normalY;tangent.y=normalX;penetration.x=normalX*depth;penetration.y=normalY*depth;collision.depth=depth;var supportsB=Collision._findSupports(bodyA,bodyB,normal,1),supportCount=0;if(Vertices.contains(bodyA.vertices,supportsB[0])){supports[supportCount++]=supportsB[0];} 505if(Vertices.contains(bodyA.vertices,supportsB[1])){supports[supportCount++]=supportsB[1];} 506if(supportCount<2){var supportsA=Collision._findSupports(bodyB,bodyA,normal,-1);if(Vertices.contains(bodyB.vertices,supportsA[0])){supports[supportCount++]=supportsA[0];} 507if(supportCount<2&&Vertices.contains(bodyB.vertices,supportsA[1])){supports[supportCount++]=supportsA[1];}} 508if(supportCount===0){supports[supportCount++]=supportsB[0];} 509collision.supportCount=supportCount;return collision;};Collision._overlapAxes=function(result,verticesA,verticesB,axes){var verticesALength=verticesA.length,verticesBLength=verticesB.length,verticesAX=verticesA[0].x,verticesAY=verticesA[0].y,verticesBX=verticesB[0].x,verticesBY=verticesB[0].y,axesLength=axes.length,overlapMin=Number.MAX_VALUE,overlapAxisNumber=0,overlap,overlapAB,overlapBA,dot,i,j;for(i=0;i<axesLength;i++){var axis=axes[i],axisX=axis.x,axisY=axis.y,minA=verticesAX*axisX+verticesAY*axisY,minB=verticesBX*axisX+verticesBY*axisY,maxA=minA,maxB=minB;for(j=1;j<verticesALength;j+=1){dot=verticesA[j].x*axisX+verticesA[j].y*axisY;if(dot>maxA){maxA=dot;}else if(dot<minA){minA=dot;}} 510for(j=1;j<verticesBLength;j+=1){dot=verticesB[j].x*axisX+verticesB[j].y*axisY;if(dot>maxB){maxB=dot;}else if(dot<minB){minB=dot;}} 511overlapAB=maxA-minB;overlapBA=maxB-minA;overlap=overlapAB<overlapBA?overlapAB:overlapBA;if(overlap<overlapMin){overlapMin=overlap;overlapAxisNumber=i;if(overlap<=0){break;}}} 512result.axis=axes[overlapAxisNumber];result.overlap=overlapMin;};Collision._findSupports=function(bodyA,bodyB,normal,direction){var vertices=bodyB.vertices,verticesLength=vertices.length,bodyAPositionX=bodyA.position.x,bodyAPositionY=bodyA.position.y,normalX=normal.x*direction,normalY=normal.y*direction,vertexA=vertices[0],vertexB=vertexA,nearestDistance=normalX*(bodyAPositionX-vertexB.x)+normalY*(bodyAPositionY-vertexB.y),vertexC,distance,j;for(j=1;j<verticesLength;j+=1){vertexB=vertices[j];distance=normalX*(bodyAPositionX-vertexB.x)+normalY*(bodyAPositionY-vertexB.y);if(distance<nearestDistance){nearestDistance=distance;vertexA=vertexB;}} 513vertexC=vertices[(verticesLength+vertexA.index-1)%verticesLength];nearestDistance=normalX*(bodyAPositionX-vertexC.x)+normalY*(bodyAPositionY-vertexC.y);vertexB=vertices[(vertexA.index+1)%verticesLength];if(normalX*(bodyAPositionX-vertexB.x)+normalY*(bodyAPositionY-vertexB.y)<nearestDistance){_supports[0]=vertexA;_supports[1]=vertexB;return _supports;} 514_supports[0]=vertexA;_supports[1]=vertexC;return _supports;};})();}),(function(module,exports,__webpack_require__){var Pair={};module.exports=Pair;var Contact=__webpack_require__(16);(function(){Pair.create=function(collision,timestamp){var bodyA=collision.bodyA,bodyB=collision.bodyB;var pair={id:Pair.id(bodyA,bodyB),bodyA:bodyA,bodyB:bodyB,collision:collision,contacts:[Contact.create(),Contact.create()],contactCount:0,separation:0,isActive:true,isSensor:bodyA.isSensor||bodyB.isSensor,timeCreated:timestamp,timeUpdated:timestamp,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};Pair.update(pair,collision,timestamp);return pair;};Pair.update=function(pair,collision,timestamp){var supports=collision.supports,supportCount=collision.supportCount,contacts=pair.contacts,parentA=collision.parentA,parentB=collision.parentB;pair.isActive=true;pair.timeUpdated=timestamp;pair.collision=collision;pair.separation=collision.depth;pair.inverseMass=parentA.inverseMass+parentB.inverseMass;pair.friction=parentA.friction<parentB.friction?parentA.friction:parentB.friction;pair.frictionStatic=parentA.frictionStatic>parentB.frictionStatic?parentA.frictionStatic:parentB.frictionStatic;pair.restitution=parentA.restitution>parentB.restitution?parentA.restitution:parentB.restitution;pair.slop=parentA.slop>parentB.slop?parentA.slop:parentB.slop;pair.contactCount=supportCount;collision.pair=pair;var supportA=supports[0],contactA=contacts[0],supportB=supports[1],contactB=contacts[1];if(contactB.vertex===supportA||contactA.vertex===supportB){contacts[1]=contactA;contacts[0]=contactA=contactB;contactB=contacts[1];} 515contactA.vertex=supportA;contactB.vertex=supportB;};Pair.setActive=function(pair,isActive,timestamp){if(isActive){pair.isActive=true;pair.timeUpdated=timestamp;}else{pair.isActive=false;pair.contactCount=0;}};Pair.id=function(bodyA,bodyB){return bodyA.id<bodyB.id?bodyA.id.toString(36)+':'+bodyB.id.toString(36):bodyB.id.toString(36)+':'+bodyA.id.toString(36);};})();}),(function(module,exports,__webpack_require__){var Constraint={};module.exports=Constraint;var Vertices=__webpack_require__(3);var Vector=__webpack_require__(2);var Sleeping=__webpack_require__(7);var Bounds=__webpack_require__(1);var Axes=__webpack_require__(11);var Common=__webpack_require__(0);(function(){Constraint._warming=0.4;Constraint._torqueDampen=1;Constraint._minLength=0.000001;Constraint.create=function(options){var constraint=options;if(constraint.bodyA&&!constraint.pointA) 516constraint.pointA={x:0,y:0};if(constraint.bodyB&&!constraint.pointB) 517constraint.pointB={x:0,y:0};var initialPointA=constraint.bodyA?Vector.add(constraint.bodyA.position,constraint.pointA):constraint.pointA,initialPointB=constraint.bodyB?Vector.add(constraint.bodyB.position,constraint.pointB):constraint.pointB,length=Vector.magnitude(Vector.sub(initialPointA,initialPointB));constraint.length=typeof constraint.length!=='undefined'?constraint.length:length;constraint.id=constraint.id||Common.nextId();constraint.label=constraint.label||'Constraint';constraint.type='constraint';constraint.stiffness=constraint.stiffness||(constraint.length>0?1:0.7);constraint.damping=constraint.damping||0;constraint.angularStiffness=constraint.angularStiffness||0;constraint.angleA=constraint.bodyA?constraint.bodyA.angle:constraint.angleA;constraint.angleB=constraint.bodyB?constraint.bodyB.angle:constraint.angleB;constraint.plugin={};var render={visible:true,lineWidth:2,strokeStyle:'#ffffff',type:'line',anchors:true};if(constraint.length===0&&constraint.stiffness>0.1){render.type='pin';render.anchors=false;}else if(constraint.stiffness<0.9){render.type='spring';} 518constraint.render=Common.extend(render,constraint.render);return constraint;};Constraint.preSolveAll=function(bodies){for(var i=0;i<bodies.length;i+=1){var body=bodies[i],impulse=body.constraintImpulse;if(body.isStatic||(impulse.x===0&&impulse.y===0&&impulse.angle===0)){continue;} 519body.position.x+=impulse.x;body.position.y+=impulse.y;body.angle+=impulse.angle;}};Constraint.solveAll=function(constraints,delta){var timeScale=Common.clamp(delta/Common._baseDelta,0,1);for(var i=0;i<constraints.length;i+=1){var constraint=constraints[i],fixedA=!constraint.bodyA||(constraint.bodyA&&constraint.bodyA.isStatic),fixedB=!constraint.bodyB||(constraint.bodyB&&constraint.bodyB.isStatic);if(fixedA||fixedB){Constraint.solve(constraints[i],timeScale);}} 520for(i=0;i<constraints.length;i+=1){constraint=constraints[i];fixedA=!constraint.bodyA||(constraint.bodyA&&constraint.bodyA.isStatic);fixedB=!constraint.bodyB||(constraint.bodyB&&constraint.bodyB.isStatic);if(!fixedA&&!fixedB){Constraint.solve(constraints[i],timeScale);}}};Constraint.solve=function(constraint,timeScale){var bodyA=constraint.bodyA,bodyB=constraint.bodyB,pointA=constraint.pointA,pointB=constraint.pointB;if(!bodyA&&!bodyB) 521return;if(bodyA&&!bodyA.isStatic){Vector.rotate(pointA,bodyA.angle-constraint.angleA,pointA);constraint.angleA=bodyA.angle;} 522if(bodyB&&!bodyB.isStatic){Vector.rotate(pointB,bodyB.angle-constraint.angleB,pointB);constraint.angleB=bodyB.angle;} 523var pointAWorld=pointA,pointBWorld=pointB;if(bodyA)pointAWorld=Vector.add(bodyA.position,pointA);if(bodyB)pointBWorld=Vector.add(bodyB.position,pointB);if(!pointAWorld||!pointBWorld) 524return;var delta=Vector.sub(pointAWorld,pointBWorld),currentLength=Vector.magnitude(delta);if(currentLength<Constraint._minLength){currentLength=Constraint._minLength;} 525var difference=(currentLength-constraint.length)/currentLength,isRigid=constraint.stiffness>=1||constraint.length===0,stiffness=isRigid?constraint.stiffness*timeScale:constraint.stiffness*timeScale*timeScale,damping=constraint.damping*timeScale,force=Vector.mult(delta,difference*stiffness),massTotal=(bodyA?bodyA.inverseMass:0)+(bodyB?bodyB.inverseMass:0),inertiaTotal=(bodyA?bodyA.inverseInertia:0)+(bodyB?bodyB.inverseInertia:0),resistanceTotal=massTotal+inertiaTotal,torque,share,normal,normalVelocity,relativeVelocity;if(damping>0){var zero=Vector.create();normal=Vector.div(delta,currentLength);relativeVelocity=Vector.sub(bodyB&&Vector.sub(bodyB.position,bodyB.positionPrev)||zero,bodyA&&Vector.sub(bodyA.position,bodyA.positionPrev)||zero);normalVelocity=Vector.dot(normal,relativeVelocity);} 526if(bodyA&&!bodyA.isStatic){share=bodyA.inverseMass/massTotal;bodyA.constraintImpulse.x-=force.x*share;bodyA.constraintImpulse.y-=force.y*share;bodyA.position.x-=force.x*share;bodyA.position.y-=force.y*share;if(damping>0){bodyA.positionPrev.x-=damping*normal.x*normalVelocity*share;bodyA.positionPrev.y-=damping*normal.y*normalVelocity*share;} 527torque=(Vector.cross(pointA,force)/resistanceTotal)*Constraint._torqueDampen*bodyA.inverseInertia*(1-constraint.angularStiffness);bodyA.constraintImpulse.angle-=torque;bodyA.angle-=torque;} 528if(bodyB&&!bodyB.isStatic){share=bodyB.inverseMass/massTotal;bodyB.constraintImpulse.x+=force.x*share;bodyB.constraintImpulse.y+=force.y*share;bodyB.position.x+=force.x*share;bodyB.position.y+=force.y*share;if(damping>0){bodyB.positionPrev.x+=damping*normal.x*normalVelocity*share;bodyB.positionPrev.y+=damping*normal.y*normalVelocity*share;} 529torque=(Vector.cross(pointB,force)/resistanceTotal)*Constraint._torqueDampen*bodyB.inverseInertia*(1-constraint.angularStiffness);bodyB.constraintImpulse.angle+=torque;bodyB.angle+=torque;}};Constraint.postSolveAll=function(bodies){for(var i=0;i<bodies.length;i++){var body=bodies[i],impulse=body.constraintImpulse;if(body.isStatic||(impulse.x===0&&impulse.y===0&&impulse.angle===0)){continue;} 530Sleeping.set(body,false);for(var j=0;j<body.parts.length;j++){var part=body.parts[j];Vertices.translate(part.vertices,impulse);if(j>0){part.position.x+=impulse.x;part.position.y+=impulse.y;} 531if(impulse.angle!==0){Vertices.rotate(part.vertices,impulse.angle,body.position);Axes.rotate(part.axes,impulse.angle);if(j>0){Vector.rotateAbout(part.position,impulse.angle,body.position,part.position);}} 532Bounds.update(part.bounds,part.vertices,body.velocity);} 533impulse.angle*=Constraint._warming;impulse.x*=Constraint._warming;impulse.y*=Constraint._warming;}};Constraint.pointAWorld=function(constraint){return{x:(constraint.bodyA?constraint.bodyA.position.x:0) 534+(constraint.pointA?constraint.pointA.x:0),y:(constraint.bodyA?constraint.bodyA.position.y:0) 535+(constraint.pointA?constraint.pointA.y:0)};};Constraint.pointBWorld=function(constraint){return{x:(constraint.bodyB?constraint.bodyB.position.x:0) 536+(constraint.pointB?constraint.pointB.x:0),y:(constraint.bodyB?constraint.bodyB.position.y:0) 537+(constraint.pointB?constraint.pointB.y:0)};};Constraint.currentLength=function(constraint){var pointAX=(constraint.bodyA?constraint.bodyA.position.x:0) 538+(constraint.pointA?constraint.pointA.x:0);var pointAY=(constraint.bodyA?constraint.bodyA.position.y:0) 539+(constraint.pointA?constraint.pointA.y:0);var pointBX=(constraint.bodyB?constraint.bodyB.position.x:0) 540+(constraint.pointB?constraint.pointB.x:0);var pointBY=(constraint.bodyB?constraint.bodyB.position.y:0) 541+(constraint.pointB?constraint.pointB.y:0);var deltaX=pointAX-pointBX;var deltaY=pointAY-pointBY;return Math.sqrt(deltaX*deltaX+deltaY*deltaY);};})();}),(function(module,exports,__webpack_require__){var Axes={};module.exports=Axes;var Vector=__webpack_require__(2);var Common=__webpack_require__(0);(function(){Axes.fromVertices=function(vertices){var axes={};for(var i=0;i<vertices.length;i++){var j=(i+1)%vertices.length,normal=Vector.normalise({x:vertices[j].y-vertices[i].y,y:vertices[i].x-vertices[j].x}),gradient=(normal.y===0)?Infinity:(normal.x/normal.y);gradient=gradient.toFixed(3).toString();axes[gradient]=normal;} 542return Common.values(axes);};Axes.rotate=function(axes,angle){if(angle===0) 543return;var cos=Math.cos(angle),sin=Math.sin(angle);for(var i=0;i<axes.length;i++){var axis=axes[i],xx;xx=axis.x*cos-axis.y*sin;axis.y=axis.x*sin+axis.y*cos;axis.x=xx;}};})();}),(function(module,exports,__webpack_require__){var Bodies={};module.exports=Bodies;var Vertices=__webpack_require__(3);var Common=__webpack_require__(0);var Body=__webpack_require__(4);var Bounds=__webpack_require__(1);var Vector=__webpack_require__(2);(function(){Bodies.rectangle=function(x,y,width,height,options){options=options||{};var rectangle={label:'Rectangle Body',position:{x:x,y:y},vertices:Vertices.fromPath('L 0 0 L '+width+' 0 L '+width+' '+height+' L 0 '+height)};if(options.chamfer){var chamfer=options.chamfer;rectangle.vertices=Vertices.chamfer(rectangle.vertices,chamfer.radius,chamfer.quality,chamfer.qualityMin,chamfer.qualityMax);delete options.chamfer;} 544return Body.create(Common.extend({},rectangle,options));};Bodies.trapezoid=function(x,y,width,height,slope,options){options=options||{};if(slope>=1){Common.warn('Bodies.trapezoid: slope parameter must be < 1.');} 545slope*=0.5;var roof=(1-(slope*2))*width;var x1=width*slope,x2=x1+roof,x3=x2+x1,verticesPath;if(slope<0.5){verticesPath='L 0 0 L '+x1+' '+(-height)+' L '+x2+' '+(-height)+' L '+x3+' 0';}else{verticesPath='L 0 0 L '+x2+' '+(-height)+' L '+x3+' 0';} 546var trapezoid={label:'Trapezoid Body',position:{x:x,y:y},vertices:Vertices.fromPath(verticesPath)};if(options.chamfer){var chamfer=options.chamfer;trapezoid.vertices=Vertices.chamfer(trapezoid.vertices,chamfer.radius,chamfer.quality,chamfer.qualityMin,chamfer.qualityMax);delete options.chamfer;} 547return Body.create(Common.extend({},trapezoid,options));};Bodies.circle=function(x,y,radius,options,maxSides){options=options||{};var circle={label:'Circle Body',circleRadius:radius};maxSides=maxSides||25;var sides=Math.ceil(Math.max(10,Math.min(maxSides,radius)));if(sides%2===1) 548sides+=1;return Bodies.polygon(x,y,sides,radius,Common.extend({},circle,options));};Bodies.polygon=function(x,y,sides,radius,options){options=options||{};if(sides<3) 549return Bodies.circle(x,y,radius,options);var theta=2*Math.PI/sides,path='',offset=theta*0.5;for(var i=0;i<sides;i+=1){var angle=offset+(i*theta),xx=Math.cos(angle)*radius,yy=Math.sin(angle)*radius;path+='L '+xx.toFixed(3)+' '+yy.toFixed(3)+' ';} 550var polygon={label:'Polygon Body',position:{x:x,y:y},vertices:Vertices.fromPath(path)};if(options.chamfer){var chamfer=options.chamfer;polygon.vertices=Vertices.chamfer(polygon.vertices,chamfer.radius,chamfer.quality,chamfer.qualityMin,chamfer.qualityMax);delete options.chamfer;} 551return Body.create(Common.extend({},polygon,options));};Bodies.fromVertices=function(x,y,vertexSets,options,flagInternal,removeCollinear,minimumArea,removeDuplicatePoints){var decomp=Common.getDecomp(),canDecomp,body,parts,isConvex,isConcave,vertices,i,j,k,v,z;canDecomp=Boolean(decomp&&decomp.quickDecomp);options=options||{};parts=[];flagInternal=typeof flagInternal!=='undefined'?flagInternal:false;removeCollinear=typeof removeCollinear!=='undefined'?removeCollinear:0.01;minimumArea=typeof minimumArea!=='undefined'?minimumArea:10;removeDuplicatePoints=typeof removeDuplicatePoints!=='undefined'?removeDuplicatePoints:0.01;if(!Common.isArray(vertexSets[0])){vertexSets=[vertexSets];} 552for(v=0;v<vertexSets.length;v+=1){vertices=vertexSets[v];isConvex=Vertices.isConvex(vertices);isConcave=!isConvex;if(isConcave&&!canDecomp){Common.warnOnce('Bodies.fromVertices: Install the \'poly-decomp\' library and use Common.setDecomp or provide \'decomp\' as a global to decompose concave vertices.');} 553if(isConvex||!canDecomp){if(isConvex){vertices=Vertices.clockwiseSort(vertices);}else{vertices=Vertices.hull(vertices);} 554parts.push({position:{x:x,y:y},vertices:vertices});}else{var concave=vertices.map(function(vertex){return[vertex.x,vertex.y];});decomp.makeCCW(concave);if(removeCollinear!==false) 555decomp.removeCollinearPoints(concave,removeCollinear);if(removeDuplicatePoints!==false&&decomp.removeDuplicatePoints) 556decomp.removeDuplicatePoints(concave,removeDuplicatePoints);var decomposed=decomp.quickDecomp(concave);for(i=0;i<decomposed.length;i++){var chunk=decomposed[i];var chunkVertices=chunk.map(function(vertices){return{x:vertices[0],y:vertices[1]};});if(minimumArea>0&&Vertices.area(chunkVertices)<minimumArea) 557continue;parts.push({position:Vertices.centre(chunkVertices),vertices:chunkVertices});}}} 558for(i=0;i<parts.length;i++){parts[i]=Body.create(Common.extend(parts[i],options));} 559if(flagInternal){var coincident_max_dist=5;for(i=0;i<parts.length;i++){var partA=parts[i];for(j=i+1;j<parts.length;j++){var partB=parts[j];if(Bounds.overlaps(partA.bounds,partB.bounds)){var pav=partA.vertices,pbv=partB.vertices;for(k=0;k<partA.vertices.length;k++){for(z=0;z<partB.vertices.length;z++){var da=Vector.magnitudeSquared(Vector.sub(pav[(k+1)%pav.length],pbv[z])),db=Vector.magnitudeSquared(Vector.sub(pav[k],pbv[(z+1)%pbv.length]));if(da<coincident_max_dist&&db<coincident_max_dist){pav[k].isInternal=true;pbv[z].isInternal=true;}}}}}}} 560if(parts.length>1){body=Body.create(Common.extend({parts:parts.slice(0)},options));Body.setPosition(body,{x:x,y:y});return body;}else{return parts[0];}};})();}),(function(module,exports,__webpack_require__){var Detector={};module.exports=Detector;var Common=__webpack_require__(0);var Collision=__webpack_require__(8);(function(){Detector.create=function(options){var defaults={bodies:[],collisions:[],pairs:null};return Common.extend(defaults,options);};Detector.setBodies=function(detector,bodies){detector.bodies=bodies.slice(0);};Detector.clear=function(detector){detector.bodies=[];detector.collisions=[];};Detector.collisions=function(detector){var pairs=detector.pairs,bodies=detector.bodies,bodiesLength=bodies.length,canCollide=Detector.canCollide,collides=Collision.collides,collisions=detector.collisions,collisionIndex=0,i,j;bodies.sort(Detector._compareBoundsX);for(i=0;i<bodiesLength;i++){var bodyA=bodies[i],boundsA=bodyA.bounds,boundXMax=bodyA.bounds.max.x,boundYMax=bodyA.bounds.max.y,boundYMin=bodyA.bounds.min.y,bodyAStatic=bodyA.isStatic||bodyA.isSleeping,partsALength=bodyA.parts.length,partsASingle=partsALength===1;for(j=i+1;j<bodiesLength;j++){var bodyB=bodies[j],boundsB=bodyB.bounds;if(boundsB.min.x>boundXMax){break;} 561if(boundYMax<boundsB.min.y||boundYMin>boundsB.max.y){continue;} 562if(bodyAStatic&&(bodyB.isStatic||bodyB.isSleeping)){continue;} 563if(!canCollide(bodyA.collisionFilter,bodyB.collisionFilter)){continue;} 564var partsBLength=bodyB.parts.length;if(partsASingle&&partsBLength===1){var collision=collides(bodyA,bodyB,pairs);if(collision){collisions[collisionIndex++]=collision;}}else{var partsAStart=partsALength>1?1:0,partsBStart=partsBLength>1?1:0;for(var k=partsAStart;k<partsALength;k++){var partA=bodyA.parts[k],boundsA=partA.bounds;for(var z=partsBStart;z<partsBLength;z++){var partB=bodyB.parts[z],boundsB=partB.bounds;if(boundsA.min.x>boundsB.max.x||boundsA.max.x<boundsB.min.x||boundsA.max.y<boundsB.min.y||boundsA.min.y>boundsB.max.y){continue;} 565var collision=collides(partA,partB,pairs);if(collision){collisions[collisionIndex++]=collision;}}}}}} 566if(collisions.length!==collisionIndex){collisions.length=collisionIndex;} 567return collisions;};Detector.canCollide=function(filterA,filterB){if(filterA.group===filterB.group&&filterA.group!==0) 568return filterA.group>0;return(filterA.mask&filterB.category)!==0&&(filterB.mask&filterA.category)!==0;};Detector._compareBoundsX=function(bodyA,bodyB){return bodyA.bounds.min.x-bodyB.bounds.min.x;};})();}),(function(module,exports,__webpack_require__){var Mouse={};module.exports=Mouse;var Common=__webpack_require__(0);(function(){Mouse.create=function(element){var mouse={};if(!element){Common.log('Mouse.create: element was undefined, defaulting to document.body','warn');} 569mouse.element=element||document.body;mouse.absolute={x:0,y:0};mouse.position={x:0,y:0};mouse.mousedownPosition={x:0,y:0};mouse.mouseupPosition={x:0,y:0};mouse.offset={x:0,y:0};mouse.scale={x:1,y:1};mouse.wheelDelta=0;mouse.button=-1;mouse.pixelRatio=parseInt(mouse.element.getAttribute('data-pixel-ratio'),10)||1;mouse.sourceEvents={mousemove:null,mousedown:null,mouseup:null,mousewheel:null};mouse.mousemove=function(event){var position=Mouse._getRelativeMousePosition(event,mouse.element,mouse.pixelRatio),touches=event.changedTouches;if(touches){mouse.button=0;event.preventDefault();} 570mouse.absolute.x=position.x;mouse.absolute.y=position.y;mouse.position.x=mouse.absolute.x*mouse.scale.x+mouse.offset.x;mouse.position.y=mouse.absolute.y*mouse.scale.y+mouse.offset.y;mouse.sourceEvents.mousemove=event;};mouse.mousedown=function(event){var position=Mouse._getRelativeMousePosition(event,mouse.element,mouse.pixelRatio),touches=event.changedTouches;if(touches){mouse.button=0;event.preventDefault();}else{mouse.button=event.button;} 571mouse.absolute.x=position.x;mouse.absolute.y=position.y;mouse.position.x=mouse.absolute.x*mouse.scale.x+mouse.offset.x;mouse.position.y=mouse.absolute.y*mouse.scale.y+mouse.offset.y;mouse.mousedownPosition.x=mouse.position.x;mouse.mousedownPosition.y=mouse.position.y;mouse.sourceEvents.mousedown=event;};mouse.mouseup=function(event){var position=Mouse._getRelativeMousePosition(event,mouse.element,mouse.pixelRatio),touches=event.changedTouches;if(touches){event.preventDefault();} 572mouse.button=-1;mouse.absolute.x=position.x;mouse.absolute.y=position.y;mouse.position.x=mouse.absolute.x*mouse.scale.x+mouse.offset.x;mouse.position.y=mouse.absolute.y*mouse.scale.y+mouse.offset.y;mouse.mouseupPosition.x=mouse.position.x;mouse.mouseupPosition.y=mouse.position.y;mouse.sourceEvents.mouseup=event;};mouse.mousewheel=function(event){mouse.wheelDelta=Math.max(-1,Math.min(1,event.wheelDelta||-event.detail));event.preventDefault();mouse.sourceEvents.mousewheel=event;};Mouse.setElement(mouse,mouse.element);return mouse;};Mouse.setElement=function(mouse,element){mouse.element=element;element.addEventListener('mousemove',mouse.mousemove,{passive:true});element.addEventListener('mousedown',mouse.mousedown,{passive:true});element.addEventListener('mouseup',mouse.mouseup,{passive:true});element.addEventListener('wheel',mouse.mousewheel,{passive:false});element.addEventListener('touchmove',mouse.mousemove,{passive:false});element.addEventListener('touchstart',mouse.mousedown,{passive:false});element.addEventListener('touchend',mouse.mouseup,{passive:false});};Mouse.clearSourceEvents=function(mouse){mouse.sourceEvents.mousemove=null;mouse.sourceEvents.mousedown=null;mouse.sourceEvents.mouseup=null;mouse.sourceEvents.mousewheel=null;mouse.wheelDelta=0;};Mouse.setOffset=function(mouse,offset){mouse.offset.x=offset.x;mouse.offset.y=offset.y;mouse.position.x=mouse.absolute.x*mouse.scale.x+mouse.offset.x;mouse.position.y=mouse.absolute.y*mouse.scale.y+mouse.offset.y;};Mouse.setScale=function(mouse,scale){mouse.scale.x=scale.x;mouse.scale.y=scale.y;mouse.position.x=mouse.absolute.x*mouse.scale.x+mouse.offset.x;mouse.position.y=mouse.absolute.y*mouse.scale.y+mouse.offset.y;};Mouse._getRelativeMousePosition=function(event,element,pixelRatio){var elementBounds=element.getBoundingClientRect(),rootNode=(document.documentElement||document.body.parentNode||document.body),scrollX=(window.pageXOffset!==undefined)?window.pageXOffset:rootNode.scrollLeft,scrollY=(window.pageYOffset!==undefined)?window.pageYOffset:rootNode.scrollTop,touches=event.changedTouches,x,y;if(touches){x=touches[0].pageX-elementBounds.left-scrollX;y=touches[0].pageY-elementBounds.top-scrollY;}else{x=event.pageX-elementBounds.left-scrollX;y=event.pageY-elementBounds.top-scrollY;} 573return{x:x/(element.clientWidth/(element.width||element.clientWidth)*pixelRatio),y:y/(element.clientHeight/(element.height||element.clientHeight)*pixelRatio)};};})();}),(function(module,exports,__webpack_require__){var Plugin={};module.exports=Plugin;var Common=__webpack_require__(0);(function(){Plugin._registry={};Plugin.register=function(plugin){if(!Plugin.isPlugin(plugin)){Common.warn('Plugin.register:',Plugin.toString(plugin),'does not implement all required fields.');} 574if(plugin.name in Plugin._registry){var registered=Plugin._registry[plugin.name],pluginVersion=Plugin.versionParse(plugin.version).number,registeredVersion=Plugin.versionParse(registered.version).number;if(pluginVersion>registeredVersion){Common.warn('Plugin.register:',Plugin.toString(registered),'was upgraded to',Plugin.toString(plugin));Plugin._registry[plugin.name]=plugin;}else if(pluginVersion<registeredVersion){Common.warn('Plugin.register:',Plugin.toString(registered),'can not be downgraded to',Plugin.toString(plugin));}else if(plugin!==registered){Common.warn('Plugin.register:',Plugin.toString(plugin),'is already registered to different plugin object');}}else{Plugin._registry[plugin.name]=plugin;} 575return plugin;};Plugin.resolve=function(dependency){return Plugin._registry[Plugin.dependencyParse(dependency).name];};Plugin.toString=function(plugin){return typeof plugin==='string'?plugin:(plugin.name||'anonymous')+'@'+(plugin.version||plugin.range||'0.0.0');};Plugin.isPlugin=function(obj){return obj&&obj.name&&obj.version&&obj.install;};Plugin.isUsed=function(module,name){return module.used.indexOf(name)>-1;};Plugin.isFor=function(plugin,module){var parsed=plugin.for&&Plugin.dependencyParse(plugin.for);return!plugin.for||(module.name===parsed.name&&Plugin.versionSatisfies(module.version,parsed.range));};Plugin.use=function(module,plugins){module.uses=(module.uses||[]).concat(plugins||[]);if(module.uses.length===0){Common.warn('Plugin.use:',Plugin.toString(module),'does not specify any dependencies to install.');return;} 576var dependencies=Plugin.dependencies(module),sortedDependencies=Common.topologicalSort(dependencies),status=[];for(var i=0;i<sortedDependencies.length;i+=1){if(sortedDependencies[i]===module.name){continue;} 577var plugin=Plugin.resolve(sortedDependencies[i]);if(!plugin){status.push('â '+sortedDependencies[i]);continue;} 578if(Plugin.isUsed(module,plugin.name)){continue;} 579if(!Plugin.isFor(plugin,module)){Common.warn('Plugin.use:',Plugin.toString(plugin),'is for',plugin.for,'but installed on',Plugin.toString(module)+'.');plugin._warned=true;} 580if(plugin.install){plugin.install(module);}else{Common.warn('Plugin.use:',Plugin.toString(plugin),'does not specify an install function.');plugin._warned=true;} 581if(plugin._warned){status.push('ð¶ '+Plugin.toString(plugin));delete plugin._warned;}else{status.push('â '+Plugin.toString(plugin));} 582module.used.push(plugin.name);} 583if(status.length>0){Common.info(status.join(' '));}};Plugin.dependencies=function(module,tracked){var parsedBase=Plugin.dependencyParse(module),name=parsedBase.name;tracked=tracked||{};if(name in tracked){return;} 584module=Plugin.resolve(module)||module;tracked[name]=Common.map(module.uses||[],function(dependency){if(Plugin.isPlugin(dependency)){Plugin.register(dependency);} 585var parsed=Plugin.dependencyParse(dependency),resolved=Plugin.resolve(dependency);if(resolved&&!Plugin.versionSatisfies(resolved.version,parsed.range)){Common.warn('Plugin.dependencies:',Plugin.toString(resolved),'does not satisfy',Plugin.toString(parsed),'used by',Plugin.toString(parsedBase)+'.');resolved._warned=true;module._warned=true;}else if(!resolved){Common.warn('Plugin.dependencies:',Plugin.toString(dependency),'used by',Plugin.toString(parsedBase),'could not be resolved.');module._warned=true;} 586return parsed.name;});for(var i=0;i<tracked[name].length;i+=1){Plugin.dependencies(tracked[name][i],tracked);} 587return tracked;};Plugin.dependencyParse=function(dependency){if(Common.isString(dependency)){var pattern=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;if(!pattern.test(dependency)){Common.warn('Plugin.dependencyParse:',dependency,'is not a valid dependency string.');} 588return{name:dependency.split('@')[0],range:dependency.split('@')[1]||'*'};} 589return{name:dependency.name,range:dependency.range||dependency.version};};Plugin.versionParse=function(range){var pattern=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;if(!pattern.test(range)){Common.warn('Plugin.versionParse:',range,'is not a valid version or range.');} 590var parts=pattern.exec(range);var major=Number(parts[4]);var minor=Number(parts[5]);var patch=Number(parts[6]);return{isRange:Boolean(parts[1]||parts[2]),version:parts[3],range:range,operator:parts[1]||parts[2]||'',major:major,minor:minor,patch:patch,parts:[major,minor,patch],prerelease:parts[7],number:major*1e8+minor*1e4+patch};};Plugin.versionSatisfies=function(version,range){range=range||'*';var r=Plugin.versionParse(range),v=Plugin.versionParse(version);if(r.isRange){if(r.operator==='*'||version==='*'){return true;} 591if(r.operator==='>'){return v.number>r.number;} 592if(r.operator==='>='){return v.number>=r.number;} 593if(r.operator==='~'){return v.major===r.major&&v.minor===r.minor&&v.patch>=r.patch;} 594if(r.operator==='^'){if(r.major>0){return v.major===r.major&&v.number>=r.number;} 595if(r.minor>0){return v.minor===r.minor&&v.patch>=r.patch;} 596return v.patch===r.patch;}} 597return version===range||version==='*';};})();}),(function(module,exports){var Contact={};module.exports=Contact;(function(){Contact.create=function(vertex){return{vertex:vertex,normalImpulse:0,tangentImpulse:0};};})();}),(function(module,exports,__webpack_require__){var Engine={};module.exports=Engine;var Sleeping=__webpack_require__(7);var Resolver=__webpack_require__(18);var Detector=__webpack_require__(13);var Pairs=__webpack_require__(19);var Events=__webpack_require__(5);var Composite=__webpack_require__(6);var Constraint=__webpack_require__(10);var Common=__webpack_require__(0);var Body=__webpack_require__(4);(function(){Engine._deltaMax=1000/60;Engine.create=function(options){options=options||{};var defaults={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:false,events:[],plugin:{},gravity:{x:0,y:1,scale:0.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}};var engine=Common.extend(defaults,options);engine.world=options.world||Composite.create({label:'World'});engine.pairs=options.pairs||Pairs.create();engine.detector=options.detector||Detector.create();engine.detector.pairs=engine.pairs;engine.grid={buckets:[]};engine.world.gravity=engine.gravity;engine.broadphase=engine.grid;engine.metrics={};return engine;};Engine.update=function(engine,delta){var startTime=Common.now();var world=engine.world,detector=engine.detector,pairs=engine.pairs,timing=engine.timing,timestamp=timing.timestamp,i;if(delta>Engine._deltaMax){Common.warnOnce('Matter.Engine.update: delta argument is recommended to be less than or equal to',Engine._deltaMax.toFixed(3),'ms.');} 598delta=typeof delta!=='undefined'?delta:Common._baseDelta;delta*=timing.timeScale;timing.timestamp+=delta;timing.lastDelta=delta;var event={timestamp:timing.timestamp,delta:delta};Events.trigger(engine,'beforeUpdate',event);var allBodies=Composite.allBodies(world),allConstraints=Composite.allConstraints(world);if(world.isModified){Detector.setBodies(detector,allBodies);Composite.setModified(world,false,false,true);} 599if(engine.enableSleeping) 600Sleeping.update(allBodies,delta);Engine._bodiesApplyGravity(allBodies,engine.gravity);if(delta>0){Engine._bodiesUpdate(allBodies,delta);} 601Events.trigger(engine,'beforeSolve',event);Constraint.preSolveAll(allBodies);for(i=0;i<engine.constraintIterations;i++){Constraint.solveAll(allConstraints,delta);} 602Constraint.postSolveAll(allBodies);var collisions=Detector.collisions(detector);Pairs.update(pairs,collisions,timestamp);if(engine.enableSleeping) 603Sleeping.afterCollisions(pairs.list);if(pairs.collisionStart.length>0){Events.trigger(engine,'collisionStart',{pairs:pairs.collisionStart,timestamp:timing.timestamp,delta:delta});} 604var positionDamping=Common.clamp(20/engine.positionIterations,0,1);Resolver.preSolvePosition(pairs.list);for(i=0;i<engine.positionIterations;i++){Resolver.solvePosition(pairs.list,delta,positionDamping);} 605Resolver.postSolvePosition(allBodies);Constraint.preSolveAll(allBodies);for(i=0;i<engine.constraintIterations;i++){Constraint.solveAll(allConstraints,delta);} 606Constraint.postSolveAll(allBodies);Resolver.preSolveVelocity(pairs.list);for(i=0;i<engine.velocityIterations;i++){Resolver.solveVelocity(pairs.list,delta);} 607Engine._bodiesUpdateVelocities(allBodies);if(pairs.collisionActive.length>0){Events.trigger(engine,'collisionActive',{pairs:pairs.collisionActive,timestamp:timing.timestamp,delta:delta});} 608if(pairs.collisionEnd.length>0){Events.trigger(engine,'collisionEnd',{pairs:pairs.collisionEnd,timestamp:timing.timestamp,delta:delta});} 609Engine._bodiesClearForces(allBodies);Events.trigger(engine,'afterUpdate',event);engine.timing.lastElapsed=Common.now()-startTime;return engine;};Engine.merge=function(engineA,engineB){Common.extend(engineA,engineB);if(engineB.world){engineA.world=engineB.world;Engine.clear(engineA);var bodies=Composite.allBodies(engineA.world);for(var i=0;i<bodies.length;i++){var body=bodies[i];Sleeping.set(body,false);body.id=Common.nextId();}}};Engine.clear=function(engine){Pairs.clear(engine.pairs);Detector.clear(engine.detector);};Engine._bodiesClearForces=function(bodies){var bodiesLength=bodies.length;for(var i=0;i<bodiesLength;i++){var body=bodies[i];body.force.x=0;body.force.y=0;body.torque=0;}};Engine._bodiesApplyGravity=function(bodies,gravity){var gravityScale=typeof gravity.scale!=='undefined'?gravity.scale:0.001,bodiesLength=bodies.length;if((gravity.x===0&&gravity.y===0)||gravityScale===0){return;} 610for(var i=0;i<bodiesLength;i++){var body=bodies[i];if(body.isStatic||body.isSleeping) 611continue;body.force.y+=body.mass*gravity.y*gravityScale;body.force.x+=body.mass*gravity.x*gravityScale;}};Engine._bodiesUpdate=function(bodies,delta){var bodiesLength=bodies.length;for(var i=0;i<bodiesLength;i++){var body=bodies[i];if(body.isStatic||body.isSleeping) 612continue;Body.update(body,delta);}};Engine._bodiesUpdateVelocities=function(bodies){var bodiesLength=bodies.length;for(var i=0;i<bodiesLength;i++){Body.updateVelocities(bodies[i]);}};})();}),(function(module,exports,__webpack_require__){var Resolver={};module.exports=Resolver;var Vertices=__webpack_require__(3);var Common=__webpack_require__(0);var Bounds=__webpack_require__(1);(function(){Resolver._restingThresh=2;Resolver._restingThreshTangent=Math.sqrt(6);Resolver._positionDampen=0.9;Resolver._positionWarming=0.8;Resolver._frictionNormalMultiplier=5;Resolver._frictionMaxStatic=Number.MAX_VALUE;Resolver.preSolvePosition=function(pairs){var i,pair,contactCount,pairsLength=pairs.length;for(i=0;i<pairsLength;i++){pair=pairs[i];if(!pair.isActive) 613continue;contactCount=pair.contactCount;pair.collision.parentA.totalContacts+=contactCount;pair.collision.parentB.totalContacts+=contactCount;}};Resolver.solvePosition=function(pairs,delta,damping){var i,pair,collision,bodyA,bodyB,normal,contactShare,positionImpulse,positionDampen=Resolver._positionDampen*(damping||1),slopDampen=Common.clamp(delta/Common._baseDelta,0,1),pairsLength=pairs.length;for(i=0;i<pairsLength;i++){pair=pairs[i];if(!pair.isActive||pair.isSensor) 614continue;collision=pair.collision;bodyA=collision.parentA;bodyB=collision.parentB;normal=collision.normal;pair.separation=collision.depth+normal.x*(bodyB.positionImpulse.x-bodyA.positionImpulse.x) 615+normal.y*(bodyB.positionImpulse.y-bodyA.positionImpulse.y);} 616for(i=0;i<pairsLength;i++){pair=pairs[i];if(!pair.isActive||pair.isSensor) 617continue;collision=pair.collision;bodyA=collision.parentA;bodyB=collision.parentB;normal=collision.normal;positionImpulse=pair.separation-pair.slop*slopDampen;if(bodyA.isStatic||bodyB.isStatic) 618positionImpulse*=2;if(!(bodyA.isStatic||bodyA.isSleeping)){contactShare=positionDampen/bodyA.totalContacts;bodyA.positionImpulse.x+=normal.x*positionImpulse*contactShare;bodyA.positionImpulse.y+=normal.y*positionImpulse*contactShare;} 619if(!(bodyB.isStatic||bodyB.isSleeping)){contactShare=positionDampen/bodyB.totalContacts;bodyB.positionImpulse.x-=normal.x*positionImpulse*contactShare;bodyB.positionImpulse.y-=normal.y*positionImpulse*contactShare;}}};Resolver.postSolvePosition=function(bodies){var positionWarming=Resolver._positionWarming,bodiesLength=bodies.length,verticesTranslate=Vertices.translate,boundsUpdate=Bounds.update;for(var i=0;i<bodiesLength;i++){var body=bodies[i],positionImpulse=body.positionImpulse,positionImpulseX=positionImpulse.x,positionImpulseY=positionImpulse.y,velocity=body.velocity;body.totalContacts=0;if(positionImpulseX!==0||positionImpulseY!==0){for(var j=0;j<body.parts.length;j++){var part=body.parts[j];verticesTranslate(part.vertices,positionImpulse);boundsUpdate(part.bounds,part.vertices,velocity);part.position.x+=positionImpulseX;part.position.y+=positionImpulseY;} 620body.positionPrev.x+=positionImpulseX;body.positionPrev.y+=positionImpulseY;if(positionImpulseX*velocity.x+positionImpulseY*velocity.y<0){positionImpulse.x=0;positionImpulse.y=0;}else{positionImpulse.x*=positionWarming;positionImpulse.y*=positionWarming;}}}};Resolver.preSolveVelocity=function(pairs){var pairsLength=pairs.length,i,j;for(i=0;i<pairsLength;i++){var pair=pairs[i];if(!pair.isActive||pair.isSensor) 621continue;var contacts=pair.contacts,contactCount=pair.contactCount,collision=pair.collision,bodyA=collision.parentA,bodyB=collision.parentB,normal=collision.normal,tangent=collision.tangent;for(j=0;j<contactCount;j++){var contact=contacts[j],contactVertex=contact.vertex,normalImpulse=contact.normalImpulse,tangentImpulse=contact.tangentImpulse;if(normalImpulse!==0||tangentImpulse!==0){var impulseX=normal.x*normalImpulse+tangent.x*tangentImpulse,impulseY=normal.y*normalImpulse+tangent.y*tangentImpulse;if(!(bodyA.isStatic||bodyA.isSleeping)){bodyA.positionPrev.x+=impulseX*bodyA.inverseMass;bodyA.positionPrev.y+=impulseY*bodyA.inverseMass;bodyA.anglePrev+=bodyA.inverseInertia*((contactVertex.x-bodyA.position.x)*impulseY 622-(contactVertex.y-bodyA.position.y)*impulseX);} 623if(!(bodyB.isStatic||bodyB.isSleeping)){bodyB.positionPrev.x-=impulseX*bodyB.inverseMass;bodyB.positionPrev.y-=impulseY*bodyB.inverseMass;bodyB.anglePrev-=bodyB.inverseInertia*((contactVertex.x-bodyB.position.x)*impulseY 624-(contactVertex.y-bodyB.position.y)*impulseX);}}}}};Resolver.solveVelocity=function(pairs,delta){var timeScale=delta/Common._baseDelta,timeScaleSquared=timeScale*timeScale,timeScaleCubed=timeScaleSquared*timeScale,restingThresh=-Resolver._restingThresh*timeScale,restingThreshTangent=Resolver._restingThreshTangent,frictionNormalMultiplier=Resolver._frictionNormalMultiplier*timeScale,frictionMaxStatic=Resolver._frictionMaxStatic,pairsLength=pairs.length,tangentImpulse,maxFriction,i,j;for(i=0;i<pairsLength;i++){var pair=pairs[i];if(!pair.isActive||pair.isSensor) 625continue;var collision=pair.collision,bodyA=collision.parentA,bodyB=collision.parentB,normalX=collision.normal.x,normalY=collision.normal.y,tangentX=collision.tangent.x,tangentY=collision.tangent.y,inverseMassTotal=pair.inverseMass,friction=pair.friction*pair.frictionStatic*frictionNormalMultiplier,contacts=pair.contacts,contactCount=pair.contactCount,contactShare=1/contactCount;var bodyAVelocityX=bodyA.position.x-bodyA.positionPrev.x,bodyAVelocityY=bodyA.position.y-bodyA.positionPrev.y,bodyAAngularVelocity=bodyA.angle-bodyA.anglePrev,bodyBVelocityX=bodyB.position.x-bodyB.positionPrev.x,bodyBVelocityY=bodyB.position.y-bodyB.positionPrev.y,bodyBAngularVelocity=bodyB.angle-bodyB.anglePrev;for(j=0;j<contactCount;j++){var contact=contacts[j],contactVertex=contact.vertex;var offsetAX=contactVertex.x-bodyA.position.x,offsetAY=contactVertex.y-bodyA.position.y,offsetBX=contactVertex.x-bodyB.position.x,offsetBY=contactVertex.y-bodyB.position.y;var velocityPointAX=bodyAVelocityX-offsetAY*bodyAAngularVelocity,velocityPointAY=bodyAVelocityY+offsetAX*bodyAAngularVelocity,velocityPointBX=bodyBVelocityX-offsetBY*bodyBAngularVelocity,velocityPointBY=bodyBVelocityY+offsetBX*bodyBAngularVelocity;var relativeVelocityX=velocityPointAX-velocityPointBX,relativeVelocityY=velocityPointAY-velocityPointBY;var normalVelocity=normalX*relativeVelocityX+normalY*relativeVelocityY,tangentVelocity=tangentX*relativeVelocityX+tangentY*relativeVelocityY;var normalOverlap=pair.separation+normalVelocity;var normalForce=Math.min(normalOverlap,1);normalForce=normalOverlap<0?0:normalForce;var frictionLimit=normalForce*friction;if(tangentVelocity<-frictionLimit||tangentVelocity>frictionLimit){maxFriction=(tangentVelocity>0?tangentVelocity:-tangentVelocity);tangentImpulse=pair.friction*(tangentVelocity>0?1:-1)*timeScaleCubed;if(tangentImpulse<-maxFriction){tangentImpulse=-maxFriction;}else if(tangentImpulse>maxFriction){tangentImpulse=maxFriction;}}else{tangentImpulse=tangentVelocity;maxFriction=frictionMaxStatic;} 626var oAcN=offsetAX*normalY-offsetAY*normalX,oBcN=offsetBX*normalY-offsetBY*normalX,share=contactShare/(inverseMassTotal+bodyA.inverseInertia*oAcN*oAcN+bodyB.inverseInertia*oBcN*oBcN);var normalImpulse=(1+pair.restitution)*normalVelocity*share;tangentImpulse*=share;if(normalVelocity<restingThresh){contact.normalImpulse=0;}else{var contactNormalImpulse=contact.normalImpulse;contact.normalImpulse+=normalImpulse;if(contact.normalImpulse>0)contact.normalImpulse=0;normalImpulse=contact.normalImpulse-contactNormalImpulse;} 627if(tangentVelocity<-restingThreshTangent||tangentVelocity>restingThreshTangent){contact.tangentImpulse=0;}else{var contactTangentImpulse=contact.tangentImpulse;contact.tangentImpulse+=tangentImpulse;if(contact.tangentImpulse<-maxFriction)contact.tangentImpulse=-maxFriction;if(contact.tangentImpulse>maxFriction)contact.tangentImpulse=maxFriction;tangentImpulse=contact.tangentImpulse-contactTangentImpulse;} 628var impulseX=normalX*normalImpulse+tangentX*tangentImpulse,impulseY=normalY*normalImpulse+tangentY*tangentImpulse;if(!(bodyA.isStatic||bodyA.isSleeping)){bodyA.positionPrev.x+=impulseX*bodyA.inverseMass;bodyA.positionPrev.y+=impulseY*bodyA.inverseMass;bodyA.anglePrev+=(offsetAX*impulseY-offsetAY*impulseX)*bodyA.inverseInertia;} 629if(!(bodyB.isStatic||bodyB.isSleeping)){bodyB.positionPrev.x-=impulseX*bodyB.inverseMass;bodyB.positionPrev.y-=impulseY*bodyB.inverseMass;bodyB.anglePrev-=(offsetBX*impulseY-offsetBY*impulseX)*bodyB.inverseInertia;}}}};})();}),(function(module,exports,__webpack_require__){var Pairs={};module.exports=Pairs;var Pair=__webpack_require__(9);var Common=__webpack_require__(0);(function(){Pairs.create=function(options){return Common.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},options);};Pairs.update=function(pairs,collisions,timestamp){var pairUpdate=Pair.update,pairCreate=Pair.create,pairSetActive=Pair.setActive,pairsTable=pairs.table,pairsList=pairs.list,pairsListLength=pairsList.length,pairsListIndex=pairsListLength,collisionStart=pairs.collisionStart,collisionEnd=pairs.collisionEnd,collisionActive=pairs.collisionActive,collisionsLength=collisions.length,collisionStartIndex=0,collisionEndIndex=0,collisionActiveIndex=0,collision,pair,i;for(i=0;i<collisionsLength;i++){collision=collisions[i];pair=collision.pair;if(pair){if(pair.isActive){collisionActive[collisionActiveIndex++]=pair;} 630pairUpdate(pair,collision,timestamp);}else{pair=pairCreate(collision,timestamp);pairsTable[pair.id]=pair;collisionStart[collisionStartIndex++]=pair;pairsList[pairsListIndex++]=pair;}} 631pairsListIndex=0;pairsListLength=pairsList.length;for(i=0;i<pairsListLength;i++){pair=pairsList[i];if(pair.timeUpdated>=timestamp){pairsList[pairsListIndex++]=pair;}else{pairSetActive(pair,false,timestamp);if(pair.collision.bodyA.sleepCounter>0&&pair.collision.bodyB.sleepCounter>0){pairsList[pairsListIndex++]=pair;}else{collisionEnd[collisionEndIndex++]=pair;delete pairsTable[pair.id];}}} 632if(pairsList.length!==pairsListIndex){pairsList.length=pairsListIndex;} 633if(collisionStart.length!==collisionStartIndex){collisionStart.length=collisionStartIndex;} 634if(collisionEnd.length!==collisionEndIndex){collisionEnd.length=collisionEndIndex;} 635if(collisionActive.length!==collisionActiveIndex){collisionActive.length=collisionActiveIndex;}};Pairs.clear=function(pairs){pairs.table={};pairs.list.length=0;pairs.collisionStart.length=0;pairs.collisionActive.length=0;pairs.collisionEnd.length=0;return pairs;};})();}),(function(module,exports,__webpack_require__){var Matter=module.exports=__webpack_require__(21);Matter.Axes=__webpack_require__(11);Matter.Bodies=__webpack_require__(12);Matter.Body=__webpack_require__(4);Matter.Bounds=__webpack_require__(1);Matter.Collision=__webpack_require__(8);Matter.Common=__webpack_require__(0);Matter.Composite=__webpack_require__(6);Matter.Composites=__webpack_require__(22);Matter.Constraint=__webpack_require__(10);Matter.Contact=__webpack_require__(16);Matter.Detector=__webpack_require__(13);Matter.Engine=__webpack_require__(17);Matter.Events=__webpack_require__(5);Matter.Grid=__webpack_require__(23);Matter.Mouse=__webpack_require__(14);Matter.MouseConstraint=__webpack_require__(24);Matter.Pair=__webpack_require__(9);Matter.Pairs=__webpack_require__(19);Matter.Plugin=__webpack_require__(15);Matter.Query=__webpack_require__(25);Matter.Render=__webpack_require__(26);Matter.Resolver=__webpack_require__(18);Matter.Runner=__webpack_require__(27);Matter.SAT=__webpack_require__(28);Matter.Sleeping=__webpack_require__(7);Matter.Svg=__webpack_require__(29);Matter.Vector=__webpack_require__(2);Matter.Vertices=__webpack_require__(3);Matter.World=__webpack_require__(30);Matter.Engine.run=Matter.Runner.run;Matter.Common.deprecated(Matter.Engine,'run','Engine.run ⤠use Matter.Runner.run(engine) instead');}),(function(module,exports,__webpack_require__){var Matter={};module.exports=Matter;var Plugin=__webpack_require__(15);var Common=__webpack_require__(0);(function(){Matter.name='matter-js';Matter.version=true?"0.20.0":undefined;Matter.uses=[];Matter.used=[];Matter.use=function(){Plugin.use(Matter,Array.prototype.slice.call(arguments));};Matter.before=function(path,func){path=path.replace(/^Matter./,'');return Common.chainPathBefore(Matter,path,func);};Matter.after=function(path,func){path=path.replace(/^Matter./,'');return Common.chainPathAfter(Matter,path,func);};})();}),(function(module,exports,__webpack_require__){var Composites={};module.exports=Composites;var Composite=__webpack_require__(6);var Constraint=__webpack_require__(10);var Common=__webpack_require__(0);var Body=__webpack_require__(4);var Bodies=__webpack_require__(12);var deprecated=Common.deprecated;(function(){Composites.stack=function(x,y,columns,rows,columnGap,rowGap,callback){var stack=Composite.create({label:'Stack'}),currentX=x,currentY=y,lastBody,i=0;for(var row=0;row<rows;row++){var maxHeight=0;for(var column=0;column<columns;column++){var body=callback(currentX,currentY,column,row,lastBody,i);if(body){var bodyHeight=body.bounds.max.y-body.bounds.min.y,bodyWidth=body.bounds.max.x-body.bounds.min.x;if(bodyHeight>maxHeight) 636maxHeight=bodyHeight;Body.translate(body,{x:bodyWidth*0.5,y:bodyHeight*0.5});currentX=body.bounds.max.x+columnGap;Composite.addBody(stack,body);lastBody=body;i+=1;}else{currentX+=columnGap;}} 637currentY+=maxHeight+rowGap;currentX=x;} 638return stack;};Composites.chain=function(composite,xOffsetA,yOffsetA,xOffsetB,yOffsetB,options){var bodies=composite.bodies;for(var i=1;i<bodies.length;i++){var bodyA=bodies[i-1],bodyB=bodies[i],bodyAHeight=bodyA.bounds.max.y-bodyA.bounds.min.y,bodyAWidth=bodyA.bounds.max.x-bodyA.bounds.min.x,bodyBHeight=bodyB.bounds.max.y-bodyB.bounds.min.y,bodyBWidth=bodyB.bounds.max.x-bodyB.bounds.min.x;var defaults={bodyA:bodyA,pointA:{x:bodyAWidth*xOffsetA,y:bodyAHeight*yOffsetA},bodyB:bodyB,pointB:{x:bodyBWidth*xOffsetB,y:bodyBHeight*yOffsetB}};var constraint=Common.extend(defaults,options);Composite.addConstraint(composite,Constraint.create(constraint));} 639composite.label+=' Chain';return composite;};Composites.mesh=function(composite,columns,rows,crossBrace,options){var bodies=composite.bodies,row,col,bodyA,bodyB,bodyC;for(row=0;row<rows;row++){for(col=1;col<columns;col++){bodyA=bodies[(col-1)+(row*columns)];bodyB=bodies[col+(row*columns)];Composite.addConstraint(composite,Constraint.create(Common.extend({bodyA:bodyA,bodyB:bodyB},options)));} 640if(row>0){for(col=0;col<columns;col++){bodyA=bodies[col+((row-1)*columns)];bodyB=bodies[col+(row*columns)];Composite.addConstraint(composite,Constraint.create(Common.extend({bodyA:bodyA,bodyB:bodyB},options)));if(crossBrace&&col>0){bodyC=bodies[(col-1)+((row-1)*columns)];Composite.addConstraint(composite,Constraint.create(Common.extend({bodyA:bodyC,bodyB:bodyB},options)));} 641if(crossBrace&&col<columns-1){bodyC=bodies[(col+1)+((row-1)*columns)];Composite.addConstraint(composite,Constraint.create(Common.extend({bodyA:bodyC,bodyB:bodyB},options)));}}}} 642composite.label+=' Mesh';return composite;};Composites.pyramid=function(x,y,columns,rows,columnGap,rowGap,callback){return Composites.stack(x,y,columns,rows,columnGap,rowGap,function(stackX,stackY,column,row,lastBody,i){var actualRows=Math.min(rows,Math.ceil(columns/2)),lastBodyWidth=lastBody?lastBody.bounds.max.x-lastBody.bounds.min.x:0;if(row>actualRows) 643return;row=actualRows-row;var start=row,end=columns-1-row;if(column<start||column>end) 644return;if(i===1){Body.translate(lastBody,{x:(column+(columns%2===1?1:-1))*lastBodyWidth,y:0});} 645var xOffset=lastBody?column*lastBodyWidth:0;return callback(x+xOffset+column*columnGap,stackY,column,row,lastBody,i);});};Composites.newtonsCradle=function(x,y,number,size,length){var newtonsCradle=Composite.create({label:'Newtons Cradle'});for(var i=0;i<number;i++){var separation=1.9,circle=Bodies.circle(x+i*(size*separation),y+length,size,{inertia:Infinity,restitution:1,friction:0,frictionAir:0.0001,slop:1}),constraint=Constraint.create({pointA:{x:x+i*(size*separation),y:y},bodyB:circle});Composite.addBody(newtonsCradle,circle);Composite.addConstraint(newtonsCradle,constraint);} 646return newtonsCradle;};deprecated(Composites,'newtonsCradle','Composites.newtonsCradle ⤠moved to newtonsCradle example');Composites.car=function(x,y,width,height,wheelSize){var group=Body.nextGroup(true),wheelBase=20,wheelAOffset=-width*0.5+wheelBase,wheelBOffset=width*0.5-wheelBase,wheelYOffset=0;var car=Composite.create({label:'Car'}),body=Bodies.rectangle(x,y,width,height,{collisionFilter:{group:group},chamfer:{radius:height*0.5},density:0.0002});var wheelA=Bodies.circle(x+wheelAOffset,y+wheelYOffset,wheelSize,{collisionFilter:{group:group},friction:0.8});var wheelB=Bodies.circle(x+wheelBOffset,y+wheelYOffset,wheelSize,{collisionFilter:{group:group},friction:0.8});var axelA=Constraint.create({bodyB:body,pointB:{x:wheelAOffset,y:wheelYOffset},bodyA:wheelA,stiffness:1,length:0});var axelB=Constraint.create({bodyB:body,pointB:{x:wheelBOffset,y:wheelYOffset},bodyA:wheelB,stiffness:1,length:0});Composite.addBody(car,body);Composite.addBody(car,wheelA);Composite.addBody(car,wheelB);Composite.addConstraint(car,axelA);Composite.addConstraint(car,axelB);return car;};deprecated(Composites,'car','Composites.car ⤠moved to car example');Composites.softBody=function(x,y,columns,rows,columnGap,rowGap,crossBrace,particleRadius,particleOptions,constraintOptions){particleOptions=Common.extend({inertia:Infinity},particleOptions);constraintOptions=Common.extend({stiffness:0.2,render:{type:'line',anchors:false}},constraintOptions);var softBody=Composites.stack(x,y,columns,rows,columnGap,rowGap,function(stackX,stackY){return Bodies.circle(stackX,stackY,particleRadius,particleOptions);});Composites.mesh(softBody,columns,rows,crossBrace,constraintOptions);softBody.label='Soft Body';return softBody;};deprecated(Composites,'softBody','Composites.softBody ⤠moved to softBody and cloth examples');})();}),(function(module,exports,__webpack_require__){var Grid={};module.exports=Grid;var Pair=__webpack_require__(9);var Common=__webpack_require__(0);var deprecated=Common.deprecated;(function(){Grid.create=function(options){var defaults={buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return Common.extend(defaults,options);};Grid.update=function(grid,bodies,engine,forceUpdate){var i,col,row,world=engine.world,buckets=grid.buckets,bucket,bucketId,gridChanged=false;for(i=0;i<bodies.length;i++){var body=bodies[i];if(body.isSleeping&&!forceUpdate) 647continue;if(world.bounds&&(body.bounds.max.x<world.bounds.min.x||body.bounds.min.x>world.bounds.max.x||body.bounds.max.y<world.bounds.min.y||body.bounds.min.y>world.bounds.max.y)) 648continue;var newRegion=Grid._getRegion(grid,body);if(!body.region||newRegion.id!==body.region.id||forceUpdate){if(!body.region||forceUpdate) 649body.region=newRegion;var union=Grid._regionUnion(newRegion,body.region);for(col=union.startCol;col<=union.endCol;col++){for(row=union.startRow;row<=union.endRow;row++){bucketId=Grid._getBucketId(col,row);bucket=buckets[bucketId];var isInsideNewRegion=(col>=newRegion.startCol&&col<=newRegion.endCol&&row>=newRegion.startRow&&row<=newRegion.endRow);var isInsideOldRegion=(col>=body.region.startCol&&col<=body.region.endCol&&row>=body.region.startRow&&row<=body.region.endRow);if(!isInsideNewRegion&&isInsideOldRegion){if(isInsideOldRegion){if(bucket) 650Grid._bucketRemoveBody(grid,bucket,body);}} 651if(body.region===newRegion||(isInsideNewRegion&&!isInsideOldRegion)||forceUpdate){if(!bucket) 652bucket=Grid._createBucket(buckets,bucketId);Grid._bucketAddBody(grid,bucket,body);}}} 653body.region=newRegion;gridChanged=true;}} 654if(gridChanged) 655grid.pairsList=Grid._createActivePairsList(grid);};deprecated(Grid,'update','Grid.update ⤠replaced by Matter.Detector');Grid.clear=function(grid){grid.buckets={};grid.pairs={};grid.pairsList=[];};deprecated(Grid,'clear','Grid.clear ⤠replaced by Matter.Detector');Grid._regionUnion=function(regionA,regionB){var startCol=Math.min(regionA.startCol,regionB.startCol),endCol=Math.max(regionA.endCol,regionB.endCol),startRow=Math.min(regionA.startRow,regionB.startRow),endRow=Math.max(regionA.endRow,regionB.endRow);return Grid._createRegion(startCol,endCol,startRow,endRow);};Grid._getRegion=function(grid,body){var bounds=body.bounds,startCol=Math.floor(bounds.min.x/grid.bucketWidth),endCol=Math.floor(bounds.max.x/grid.bucketWidth),startRow=Math.floor(bounds.min.y/grid.bucketHeight),endRow=Math.floor(bounds.max.y/grid.bucketHeight);return Grid._createRegion(startCol,endCol,startRow,endRow);};Grid._createRegion=function(startCol,endCol,startRow,endRow){return{id:startCol+','+endCol+','+startRow+','+endRow,startCol:startCol,endCol:endCol,startRow:startRow,endRow:endRow};};Grid._getBucketId=function(column,row){return'C'+column+'R'+row;};Grid._createBucket=function(buckets,bucketId){var bucket=buckets[bucketId]=[];return bucket;};Grid._bucketAddBody=function(grid,bucket,body){var gridPairs=grid.pairs,pairId=Pair.id,bucketLength=bucket.length,i;for(i=0;i<bucketLength;i++){var bodyB=bucket[i];if(body.id===bodyB.id||(body.isStatic&&bodyB.isStatic)) 656continue;var id=pairId(body,bodyB),pair=gridPairs[id];if(pair){pair[2]+=1;}else{gridPairs[id]=[body,bodyB,1];}} 657bucket.push(body);};Grid._bucketRemoveBody=function(grid,bucket,body){var gridPairs=grid.pairs,pairId=Pair.id,i;bucket.splice(Common.indexOf(bucket,body),1);var bucketLength=bucket.length;for(i=0;i<bucketLength;i++){var pair=gridPairs[pairId(body,bucket[i])];if(pair) 658pair[2]-=1;}};Grid._createActivePairsList=function(grid){var pair,gridPairs=grid.pairs,pairKeys=Common.keys(gridPairs),pairKeysLength=pairKeys.length,pairs=[],k;for(k=0;k<pairKeysLength;k++){pair=gridPairs[pairKeys[k]];if(pair[2]>0){pairs.push(pair);}else{delete gridPairs[pairKeys[k]];}} 659return pairs;};})();}),(function(module,exports,__webpack_require__){var MouseConstraint={};module.exports=MouseConstraint;var Vertices=__webpack_require__(3);var Sleeping=__webpack_require__(7);var Mouse=__webpack_require__(14);var Events=__webpack_require__(5);var Detector=__webpack_require__(13);var Constraint=__webpack_require__(10);var Composite=__webpack_require__(6);var Common=__webpack_require__(0);var Bounds=__webpack_require__(1);(function(){MouseConstraint.create=function(engine,options){var mouse=(engine?engine.mouse:null)||(options?options.mouse:null);if(!mouse){if(engine&&engine.render&&engine.render.canvas){mouse=Mouse.create(engine.render.canvas);}else if(options&&options.element){mouse=Mouse.create(options.element);}else{mouse=Mouse.create();Common.warn('MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected');}} 660var constraint=Constraint.create({label:'Mouse Constraint',pointA:mouse.position,pointB:{x:0,y:0},length:0.01,stiffness:0.1,angularStiffness:1,render:{strokeStyle:'#90EE90',lineWidth:3}});var defaults={type:'mouseConstraint',mouse:mouse,element:null,body:null,constraint:constraint,collisionFilter:{category:0x0001,mask:0xFFFFFFFF,group:0}};var mouseConstraint=Common.extend(defaults,options);Events.on(engine,'beforeUpdate',function(){var allBodies=Composite.allBodies(engine.world);MouseConstraint.update(mouseConstraint,allBodies);MouseConstraint._triggerEvents(mouseConstraint);});return mouseConstraint;};MouseConstraint.update=function(mouseConstraint,bodies){var mouse=mouseConstraint.mouse,constraint=mouseConstraint.constraint,body=mouseConstraint.body;if(mouse.button===0){if(!constraint.bodyB){for(var i=0;i<bodies.length;i++){body=bodies[i];if(Bounds.contains(body.bounds,mouse.position)&&Detector.canCollide(body.collisionFilter,mouseConstraint.collisionFilter)){for(var j=body.parts.length>1?1:0;j<body.parts.length;j++){var part=body.parts[j];if(Vertices.contains(part.vertices,mouse.position)){constraint.pointA=mouse.position;constraint.bodyB=mouseConstraint.body=body;constraint.pointB={x:mouse.position.x-body.position.x,y:mouse.position.y-body.position.y};constraint.angleB=body.angle;Sleeping.set(body,false);Events.trigger(mouseConstraint,'startdrag',{mouse:mouse,body:body});break;}}}}}else{Sleeping.set(constraint.bodyB,false);constraint.pointA=mouse.position;}}else{constraint.bodyB=mouseConstraint.body=null;constraint.pointB=null;if(body) 661Events.trigger(mouseConstraint,'enddrag',{mouse:mouse,body:body});}};MouseConstraint._triggerEvents=function(mouseConstraint){var mouse=mouseConstraint.mouse,mouseEvents=mouse.sourceEvents;if(mouseEvents.mousemove) 662Events.trigger(mouseConstraint,'mousemove',{mouse:mouse});if(mouseEvents.mousedown) 663Events.trigger(mouseConstraint,'mousedown',{mouse:mouse});if(mouseEvents.mouseup) 664Events.trigger(mouseConstraint,'mouseup',{mouse:mouse});Mouse.clearSourceEvents(mouse);};})();}),(function(module,exports,__webpack_require__){var Query={};module.exports=Query;var Vector=__webpack_require__(2);var Collision=__webpack_require__(8);var Bounds=__webpack_require__(1);var Bodies=__webpack_require__(12);var Vertices=__webpack_require__(3);(function(){Query.collides=function(body,bodies){var collisions=[],bodiesLength=bodies.length,bounds=body.bounds,collides=Collision.collides,overlaps=Bounds.overlaps;for(var i=0;i<bodiesLength;i++){var bodyA=bodies[i],partsALength=bodyA.parts.length,partsAStart=partsALength===1?0:1;if(overlaps(bodyA.bounds,bounds)){for(var j=partsAStart;j<partsALength;j++){var part=bodyA.parts[j];if(overlaps(part.bounds,bounds)){var collision=collides(part,body);if(collision){collisions.push(collision);break;}}}}} 665return collisions;};Query.ray=function(bodies,startPoint,endPoint,rayWidth){rayWidth=rayWidth||1e-100;var rayAngle=Vector.angle(startPoint,endPoint),rayLength=Vector.magnitude(Vector.sub(startPoint,endPoint)),rayX=(endPoint.x+startPoint.x)*0.5,rayY=(endPoint.y+startPoint.y)*0.5,ray=Bodies.rectangle(rayX,rayY,rayLength,rayWidth,{angle:rayAngle}),collisions=Query.collides(ray,bodies);for(var i=0;i<collisions.length;i+=1){var collision=collisions[i];collision.body=collision.bodyB=collision.bodyA;} 666return collisions;};Query.region=function(bodies,bounds,outside){var result=[];for(var i=0;i<bodies.length;i++){var body=bodies[i],overlaps=Bounds.overlaps(body.bounds,bounds);if((overlaps&&!outside)||(!overlaps&&outside)) 667result.push(body);} 668return result;};Query.point=function(bodies,point){var result=[];for(var i=0;i<bodies.length;i++){var body=bodies[i];if(Bounds.contains(body.bounds,point)){for(var j=body.parts.length===1?0:1;j<body.parts.length;j++){var part=body.parts[j];if(Bounds.contains(part.bounds,point)&&Vertices.contains(part.vertices,point)){result.push(body);break;}}}} 669return result;};})();}),(function(module,exports,__webpack_require__){var Render={};module.exports=Render;var Body=__webpack_require__(4);var Common=__webpack_require__(0);var Composite=__webpack_require__(6);var Bounds=__webpack_require__(1);var Events=__webpack_require__(5);var Vector=__webpack_require__(2);var Mouse=__webpack_require__(14);(function(){var _requestAnimationFrame,_cancelAnimationFrame;if(typeof window!=='undefined'){_requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(function(){callback(Common.now());},1000/60);};_cancelAnimationFrame=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;} 670Render._goodFps=30;Render._goodDelta=1000/60;Render.create=function(options){var defaults={engine:null,element:null,canvas:null,mouse:null,frameRequestId:null,timing:{historySize:60,delta:0,deltaHistory:[],lastTime:0,lastTimestamp:0,lastElapsed:0,timestampElapsed:0,timestampElapsedHistory:[],engineDeltaHistory:[],engineElapsedHistory:[],engineUpdatesHistory:[],elapsedHistory:[]},options:{width:800,height:600,pixelRatio:1,background:'#14151f',wireframeBackground:'#14151f',wireframeStrokeStyle:'#bbb',hasBounds:!!options.bounds,enabled:true,wireframes:true,showSleeping:true,showDebug:false,showStats:false,showPerformance:false,showBounds:false,showVelocity:false,showCollisions:false,showSeparations:false,showAxes:false,showPositions:false,showAngleIndicator:false,showIds:false,showVertexNumbers:false,showConvexHulls:false,showInternalEdges:false,showMousePosition:false}};var render=Common.extend(defaults,options);if(render.canvas){render.canvas.width=render.options.width||render.canvas.width;render.canvas.height=render.options.height||render.canvas.height;} 671render.mouse=options.mouse;render.engine=options.engine;render.canvas=render.canvas||_createCanvas(render.options.width,render.options.height);render.context=render.canvas.getContext('2d');render.textures={};render.bounds=render.bounds||{min:{x:0,y:0},max:{x:render.canvas.width,y:render.canvas.height}};render.controller=Render;render.options.showBroadphase=false;if(render.options.pixelRatio!==1){Render.setPixelRatio(render,render.options.pixelRatio);} 672if(Common.isElement(render.element)){render.element.appendChild(render.canvas);} 673return render;};Render.run=function(render){(function loop(time){render.frameRequestId=_requestAnimationFrame(loop);_updateTiming(render,time);Render.world(render,time);render.context.setTransform(render.options.pixelRatio,0,0,render.options.pixelRatio,0,0);if(render.options.showStats||render.options.showDebug){Render.stats(render,render.context,time);} 674if(render.options.showPerformance||render.options.showDebug){Render.performance(render,render.context,time);} 675render.context.setTransform(1,0,0,1,0,0);})();};Render.stop=function(render){_cancelAnimationFrame(render.frameRequestId);};Render.setPixelRatio=function(render,pixelRatio){var options=render.options,canvas=render.canvas;if(pixelRatio==='auto'){pixelRatio=_getPixelRatio(canvas);} 676options.pixelRatio=pixelRatio;canvas.setAttribute('data-pixel-ratio',pixelRatio);canvas.width=options.width*pixelRatio;canvas.height=options.height*pixelRatio;canvas.style.width=options.width+'px';canvas.style.height=options.height+'px';};Render.setSize=function(render,width,height){render.options.width=width;render.options.height=height;render.bounds.max.x=render.bounds.min.x+width;render.bounds.max.y=render.bounds.min.y+height;if(render.options.pixelRatio!==1){Render.setPixelRatio(render,render.options.pixelRatio);}else{render.canvas.width=width;render.canvas.height=height;}};Render.lookAt=function(render,objects,padding,center){center=typeof center!=='undefined'?center:true;objects=Common.isArray(objects)?objects:[objects];padding=padding||{x:0,y:0};var bounds={min:{x:Infinity,y:Infinity},max:{x:-Infinity,y:-Infinity}};for(var i=0;i<objects.length;i+=1){var object=objects[i],min=object.bounds?object.bounds.min:(object.min||object.position||object),max=object.bounds?object.bounds.max:(object.max||object.position||object);if(min&&max){if(min.x<bounds.min.x) 677bounds.min.x=min.x;if(max.x>bounds.max.x) 678bounds.max.x=max.x;if(min.y<bounds.min.y) 679bounds.min.y=min.y;if(max.y>bounds.max.y) 680bounds.max.y=max.y;}} 681var width=(bounds.max.x-bounds.min.x)+2*padding.x,height=(bounds.max.y-bounds.min.y)+2*padding.y,viewHeight=render.canvas.height,viewWidth=render.canvas.width,outerRatio=viewWidth/viewHeight,innerRatio=width/height,scaleX=1,scaleY=1;if(innerRatio>outerRatio){scaleY=innerRatio/outerRatio;}else{scaleX=outerRatio/innerRatio;} 682render.options.hasBounds=true;render.bounds.min.x=bounds.min.x;render.bounds.max.x=bounds.min.x+width*scaleX;render.bounds.min.y=bounds.min.y;render.bounds.max.y=bounds.min.y+height*scaleY;if(center){render.bounds.min.x+=width*0.5-(width*scaleX)*0.5;render.bounds.max.x+=width*0.5-(width*scaleX)*0.5;render.bounds.min.y+=height*0.5-(height*scaleY)*0.5;render.bounds.max.y+=height*0.5-(height*scaleY)*0.5;} 683render.bounds.min.x-=padding.x;render.bounds.max.x-=padding.x;render.bounds.min.y-=padding.y;render.bounds.max.y-=padding.y;if(render.mouse){Mouse.setScale(render.mouse,{x:(render.bounds.max.x-render.bounds.min.x)/render.canvas.width,y:(render.bounds.max.y-render.bounds.min.y)/render.canvas.height});Mouse.setOffset(render.mouse,render.bounds.min);}};Render.startViewTransform=function(render){var boundsWidth=render.bounds.max.x-render.bounds.min.x,boundsHeight=render.bounds.max.y-render.bounds.min.y,boundsScaleX=boundsWidth/render.options.width,boundsScaleY=boundsHeight/render.options.height;render.context.setTransform(render.options.pixelRatio/boundsScaleX,0,0,render.options.pixelRatio/boundsScaleY,0,0);render.context.translate(-render.bounds.min.x,-render.bounds.min.y);};Render.endViewTransform=function(render){render.context.setTransform(render.options.pixelRatio,0,0,render.options.pixelRatio,0,0);};Render.world=function(render,time){var startTime=Common.now(),engine=render.engine,world=engine.world,canvas=render.canvas,context=render.context,options=render.options,timing=render.timing;var allBodies=Composite.allBodies(world),allConstraints=Composite.allConstraints(world),background=options.wireframes?options.wireframeBackground:options.background,bodies=[],constraints=[],i;var event={timestamp:engine.timing.timestamp};Events.trigger(render,'beforeRender',event);if(render.currentBackground!==background) 684_applyBackground(render,background);context.globalCompositeOperation='source-in';context.fillStyle="transparent";context.fillRect(0,0,canvas.width,canvas.height);context.globalCompositeOperation='source-over';if(options.hasBounds){for(i=0;i<allBodies.length;i++){var body=allBodies[i];if(Bounds.overlaps(body.bounds,render.bounds)) 685bodies.push(body);} 686for(i=0;i<allConstraints.length;i++){var constraint=allConstraints[i],bodyA=constraint.bodyA,bodyB=constraint.bodyB,pointAWorld=constraint.pointA,pointBWorld=constraint.pointB;if(bodyA)pointAWorld=Vector.add(bodyA.position,constraint.pointA);if(bodyB)pointBWorld=Vector.add(bodyB.position,constraint.pointB);if(!pointAWorld||!pointBWorld) 687continue;if(Bounds.contains(render.bounds,pointAWorld)||Bounds.contains(render.bounds,pointBWorld)) 688constraints.push(constraint);} 689Render.startViewTransform(render);if(render.mouse){Mouse.setScale(render.mouse,{x:(render.bounds.max.x-render.bounds.min.x)/render.options.width,y:(render.bounds.max.y-render.bounds.min.y)/render.options.height});Mouse.setOffset(render.mouse,render.bounds.min);}}else{constraints=allConstraints;bodies=allBodies;if(render.options.pixelRatio!==1){render.context.setTransform(render.options.pixelRatio,0,0,render.options.pixelRatio,0,0);}} 690if(!options.wireframes||(engine.enableSleeping&&options.showSleeping)){Render.bodies(render,bodies,context);}else{if(options.showConvexHulls) 691Render.bodyConvexHulls(render,bodies,context);Render.bodyWireframes(render,bodies,context);} 692if(options.showBounds) 693Render.bodyBounds(render,bodies,context);if(options.showAxes||options.showAngleIndicator) 694Render.bodyAxes(render,bodies,context);if(options.showPositions) 695Render.bodyPositions(render,bodies,context);if(options.showVelocity) 696Render.bodyVelocity(render,bodies,context);if(options.showIds) 697Render.bodyIds(render,bodies,context);if(options.showSeparations) 698Render.separations(render,engine.pairs.list,context);if(options.showCollisions) 699Render.collisions(render,engine.pairs.list,context);if(options.showVertexNumbers) 700Render.vertexNumbers(render,bodies,context);if(options.showMousePosition) 701Render.mousePosition(render,render.mouse,context);Render.constraints(constraints,context);if(options.hasBounds){Render.endViewTransform(render);} 702Events.trigger(render,'afterRender',event);timing.lastElapsed=Common.now()-startTime;};Render.stats=function(render,context,time){var engine=render.engine,world=engine.world,bodies=Composite.allBodies(world),parts=0,width=55,height=44,x=0,y=0;for(var i=0;i<bodies.length;i+=1){parts+=bodies[i].parts.length;} 703var sections={'Part':parts,'Body':bodies.length,'Cons':Composite.allConstraints(world).length,'Comp':Composite.allComposites(world).length,'Pair':engine.pairs.list.length};context.fillStyle='#0e0f19';context.fillRect(x,y,width*5.5,height);context.font='12px Arial';context.textBaseline='top';context.textAlign='right';for(var key in sections){var section=sections[key];context.fillStyle='#aaa';context.fillText(key,x+width,y+8);context.fillStyle='#eee';context.fillText(section,x+width,y+26);x+=width;}};Render.performance=function(render,context){var engine=render.engine,timing=render.timing,deltaHistory=timing.deltaHistory,elapsedHistory=timing.elapsedHistory,timestampElapsedHistory=timing.timestampElapsedHistory,engineDeltaHistory=timing.engineDeltaHistory,engineUpdatesHistory=timing.engineUpdatesHistory,engineElapsedHistory=timing.engineElapsedHistory,lastEngineUpdatesPerFrame=engine.timing.lastUpdatesPerFrame,lastEngineDelta=engine.timing.lastDelta;var deltaMean=_mean(deltaHistory),elapsedMean=_mean(elapsedHistory),engineDeltaMean=_mean(engineDeltaHistory),engineUpdatesMean=_mean(engineUpdatesHistory),engineElapsedMean=_mean(engineElapsedHistory),timestampElapsedMean=_mean(timestampElapsedHistory),rateMean=(timestampElapsedMean/deltaMean)||0,neededUpdatesPerFrame=Math.round(deltaMean/lastEngineDelta),fps=(1000/deltaMean)||0;var graphHeight=4,gap=12,width=60,height=34,x=10,y=69;context.fillStyle='#0e0f19';context.fillRect(0,50,gap*5+width*6+22,height);Render.status(context,x,y,width,graphHeight,deltaHistory.length,Math.round(fps)+' fps',fps/Render._goodFps,function(i){return(deltaHistory[i]/deltaMean)-1;});Render.status(context,x+gap+width,y,width,graphHeight,engineDeltaHistory.length,lastEngineDelta.toFixed(2)+' dt',Render._goodDelta/lastEngineDelta,function(i){return(engineDeltaHistory[i]/engineDeltaMean)-1;});Render.status(context,x+(gap+width)*2,y,width,graphHeight,engineUpdatesHistory.length,lastEngineUpdatesPerFrame+' upf',Math.pow(Common.clamp((engineUpdatesMean/neededUpdatesPerFrame)||1,0,1),4),function(i){return(engineUpdatesHistory[i]/engineUpdatesMean)-1;});Render.status(context,x+(gap+width)*3,y,width,graphHeight,engineElapsedHistory.length,engineElapsedMean.toFixed(2)+' ut',1-(lastEngineUpdatesPerFrame*engineElapsedMean/Render._goodFps),function(i){return(engineElapsedHistory[i]/engineElapsedMean)-1;});Render.status(context,x+(gap+width)*4,y,width,graphHeight,elapsedHistory.length,elapsedMean.toFixed(2)+' rt',1-(elapsedMean/Render._goodFps),function(i){return(elapsedHistory[i]/elapsedMean)-1;});Render.status(context,x+(gap+width)*5,y,width,graphHeight,timestampElapsedHistory.length,rateMean.toFixed(2)+' x',rateMean*rateMean*rateMean,function(i){return(((timestampElapsedHistory[i]/deltaHistory[i])/rateMean)||0)-1;});};Render.status=function(context,x,y,width,height,count,label,indicator,plotY){context.strokeStyle='#888';context.fillStyle='#444';context.lineWidth=1;context.fillRect(x,y+7,width,1);context.beginPath();context.moveTo(x,y+7-height*Common.clamp(0.4*plotY(0),-2,2));for(var i=0;i<width;i+=1){context.lineTo(x+i,y+7-(i<count?height*Common.clamp(0.4*plotY(i),-2,2):0));} 704context.stroke();context.fillStyle='hsl('+Common.clamp(25+95*indicator,0,120)+',100%,60%)';context.fillRect(x,y-7,4,4);context.font='12px Arial';context.textBaseline='middle';context.textAlign='right';context.fillStyle='#eee';context.fillText(label,x+width,y-5);};Render.constraints=function(constraints,context){var c=context;for(var i=0;i<constraints.length;i++){var constraint=constraints[i];if(!constraint.render.visible||!constraint.pointA||!constraint.pointB) 705continue;var bodyA=constraint.bodyA,bodyB=constraint.bodyB,start,end;if(bodyA){start=Vector.add(bodyA.position,constraint.pointA);}else{start=constraint.pointA;} 706if(constraint.render.type==='pin'){c.beginPath();c.arc(start.x,start.y,3,0,2*Math.PI);c.closePath();}else{if(bodyB){end=Vector.add(bodyB.position,constraint.pointB);}else{end=constraint.pointB;} 707c.beginPath();c.moveTo(start.x,start.y);if(constraint.render.type==='spring'){var delta=Vector.sub(end,start),normal=Vector.perp(Vector.normalise(delta)),coils=Math.ceil(Common.clamp(constraint.length/5,12,20)),offset;for(var j=1;j<coils;j+=1){offset=j%2===0?1:-1;c.lineTo(start.x+delta.x*(j/coils)+normal.x*offset*4,start.y+delta.y*(j/coils)+normal.y*offset*4);}} 708c.lineTo(end.x,end.y);} 709if(constraint.render.lineWidth){c.lineWidth=constraint.render.lineWidth;c.strokeStyle=constraint.render.strokeStyle;c.stroke();} 710if(constraint.render.anchors){c.fillStyle=constraint.render.strokeStyle;c.beginPath();c.arc(start.x,start.y,3,0,2*Math.PI);c.arc(end.x,end.y,3,0,2*Math.PI);c.closePath();c.fill();}}};Render.bodies=function(render,bodies,context){var c=context,engine=render.engine,options=render.options,showInternalEdges=options.showInternalEdges||!options.wireframes,body,part,i,k;for(i=0;i<bodies.length;i++){body=bodies[i];if(!body.render.visible) 711continue;for(k=body.parts.length>1?1:0;k<body.parts.length;k++){part=body.parts[k];if(!part.render.visible) 712continue;if(options.showSleeping&&body.isSleeping){c.globalAlpha=0.5*part.render.opacity;}else if(part.render.opacity!==1){c.globalAlpha=part.render.opacity;} 713if(part.render.sprite&&part.render.sprite.texture&&!options.wireframes){var sprite=part.render.sprite,texture=_getTexture(render,sprite.texture);c.translate(part.position.x,part.position.y);c.rotate(part.angle);c.drawImage(texture,texture.width*-sprite.xOffset*sprite.xScale,texture.height*-sprite.yOffset*sprite.yScale,texture.width*sprite.xScale,texture.height*sprite.yScale);c.rotate(-part.angle);c.translate(-part.position.x,-part.position.y);}else{if(part.circleRadius){c.beginPath();c.arc(part.position.x,part.position.y,part.circleRadius,0,2*Math.PI);}else{c.beginPath();c.moveTo(part.vertices[0].x,part.vertices[0].y);for(var j=1;j<part.vertices.length;j++){if(!part.vertices[j-1].isInternal||showInternalEdges){c.lineTo(part.vertices[j].x,part.vertices[j].y);}else{c.moveTo(part.vertices[j].x,part.vertices[j].y);} 714if(part.vertices[j].isInternal&&!showInternalEdges){c.moveTo(part.vertices[(j+1)%part.vertices.length].x,part.vertices[(j+1)%part.vertices.length].y);}} 715c.lineTo(part.vertices[0].x,part.vertices[0].y);c.closePath();} 716if(!options.wireframes){c.fillStyle=part.render.fillStyle;if(part.render.lineWidth){c.lineWidth=part.render.lineWidth;c.strokeStyle=part.render.strokeStyle;c.stroke();} 717c.fill();}else{c.lineWidth=1;c.strokeStyle=render.options.wireframeStrokeStyle;c.stroke();}} 718c.globalAlpha=1;}}};Render.bodyWireframes=function(render,bodies,context){var c=context,showInternalEdges=render.options.showInternalEdges,body,part,i,j,k;c.beginPath();for(i=0;i<bodies.length;i++){body=bodies[i];if(!body.render.visible) 719continue;for(k=body.parts.length>1?1:0;k<body.parts.length;k++){part=body.parts[k];c.moveTo(part.vertices[0].x,part.vertices[0].y);for(j=1;j<part.vertices.length;j++){if(!part.vertices[j-1].isInternal||showInternalEdges){c.lineTo(part.vertices[j].x,part.vertices[j].y);}else{c.moveTo(part.vertices[j].x,part.vertices[j].y);} 720if(part.vertices[j].isInternal&&!showInternalEdges){c.moveTo(part.vertices[(j+1)%part.vertices.length].x,part.vertices[(j+1)%part.vertices.length].y);}} 721c.lineTo(part.vertices[0].x,part.vertices[0].y);}} 722c.lineWidth=1;c.strokeStyle=render.options.wireframeStrokeStyle;c.stroke();};Render.bodyConvexHulls=function(render,bodies,context){var c=context,body,part,i,j,k;c.beginPath();for(i=0;i<bodies.length;i++){body=bodies[i];if(!body.render.visible||body.parts.length===1) 723continue;c.moveTo(body.vertices[0].x,body.vertices[0].y);for(j=1;j<body.vertices.length;j++){c.lineTo(body.vertices[j].x,body.vertices[j].y);} 724c.lineTo(body.vertices[0].x,body.vertices[0].y);} 725c.lineWidth=1;c.strokeStyle='rgba(255,255,255,0.2)';c.stroke();};Render.vertexNumbers=function(render,bodies,context){var c=context,i,j,k;for(i=0;i<bodies.length;i++){var parts=bodies[i].parts;for(k=parts.length>1?1:0;k<parts.length;k++){var part=parts[k];for(j=0;j<part.vertices.length;j++){c.fillStyle='rgba(255,255,255,0.2)';c.fillText(i+'_'+j,part.position.x+(part.vertices[j].x-part.position.x)*0.8,part.position.y+(part.vertices[j].y-part.position.y)*0.8);}}}};Render.mousePosition=function(render,mouse,context){var c=context;c.fillStyle='rgba(255,255,255,0.8)';c.fillText(mouse.position.x+' '+mouse.position.y,mouse.position.x+5,mouse.position.y-5);};Render.bodyBounds=function(render,bodies,context){var c=context,engine=render.engine,options=render.options;c.beginPath();for(var i=0;i<bodies.length;i++){var body=bodies[i];if(body.render.visible){var parts=bodies[i].parts;for(var j=parts.length>1?1:0;j<parts.length;j++){var part=parts[j];c.rect(part.bounds.min.x,part.bounds.min.y,part.bounds.max.x-part.bounds.min.x,part.bounds.max.y-part.bounds.min.y);}}} 726if(options.wireframes){c.strokeStyle='rgba(255,255,255,0.08)';}else{c.strokeStyle='rgba(0,0,0,0.1)';} 727c.lineWidth=1;c.stroke();};Render.bodyAxes=function(render,bodies,context){var c=context,engine=render.engine,options=render.options,part,i,j,k;c.beginPath();for(i=0;i<bodies.length;i++){var body=bodies[i],parts=body.parts;if(!body.render.visible) 728continue;if(options.showAxes){for(j=parts.length>1?1:0;j<parts.length;j++){part=parts[j];for(k=0;k<part.axes.length;k++){var axis=part.axes[k];c.moveTo(part.position.x,part.position.y);c.lineTo(part.position.x+axis.x*20,part.position.y+axis.y*20);}}}else{for(j=parts.length>1?1:0;j<parts.length;j++){part=parts[j];for(k=0;k<part.axes.length;k++){c.moveTo(part.position.x,part.position.y);c.lineTo((part.vertices[0].x+part.vertices[part.vertices.length-1].x)/2,(part.vertices[0].y+part.vertices[part.vertices.length-1].y)/2);}}}} 729if(options.wireframes){c.strokeStyle='indianred';c.lineWidth=1;}else{c.strokeStyle='rgba(255, 255, 255, 0.4)';c.globalCompositeOperation='overlay';c.lineWidth=2;} 730c.stroke();c.globalCompositeOperation='source-over';};Render.bodyPositions=function(render,bodies,context){var c=context,engine=render.engine,options=render.options,body,part,i,k;c.beginPath();for(i=0;i<bodies.length;i++){body=bodies[i];if(!body.render.visible) 731continue;for(k=0;k<body.parts.length;k++){part=body.parts[k];c.arc(part.position.x,part.position.y,3,0,2*Math.PI,false);c.closePath();}} 732if(options.wireframes){c.fillStyle='indianred';}else{c.fillStyle='rgba(0,0,0,0.5)';} 733c.fill();c.beginPath();for(i=0;i<bodies.length;i++){body=bodies[i];if(body.render.visible){c.arc(body.positionPrev.x,body.positionPrev.y,2,0,2*Math.PI,false);c.closePath();}} 734c.fillStyle='rgba(255,165,0,0.8)';c.fill();};Render.bodyVelocity=function(render,bodies,context){var c=context;c.beginPath();for(var i=0;i<bodies.length;i++){var body=bodies[i];if(!body.render.visible) 735continue;var velocity=Body.getVelocity(body);c.moveTo(body.position.x,body.position.y);c.lineTo(body.position.x+velocity.x,body.position.y+velocity.y);} 736c.lineWidth=3;c.strokeStyle='cornflowerblue';c.stroke();};Render.bodyIds=function(render,bodies,context){var c=context,i,j;for(i=0;i<bodies.length;i++){if(!bodies[i].render.visible) 737continue;var parts=bodies[i].parts;for(j=parts.length>1?1:0;j<parts.length;j++){var part=parts[j];c.font="12px Arial";c.fillStyle='rgba(255,255,255,0.5)';c.fillText(part.id,part.position.x+10,part.position.y-10);}}};Render.collisions=function(render,pairs,context){var c=context,options=render.options,pair,collision,corrected,bodyA,bodyB,i,j;c.beginPath();for(i=0;i<pairs.length;i++){pair=pairs[i];if(!pair.isActive) 738continue;collision=pair.collision;for(j=0;j<pair.contactCount;j++){var contact=pair.contacts[j],vertex=contact.vertex;c.rect(vertex.x-1.5,vertex.y-1.5,3.5,3.5);}} 739if(options.wireframes){c.fillStyle='rgba(255,255,255,0.7)';}else{c.fillStyle='orange';} 740c.fill();c.beginPath();for(i=0;i<pairs.length;i++){pair=pairs[i];if(!pair.isActive) 741continue;collision=pair.collision;if(pair.contactCount>0){var normalPosX=pair.contacts[0].vertex.x,normalPosY=pair.contacts[0].vertex.y;if(pair.contactCount===2){normalPosX=(pair.contacts[0].vertex.x+pair.contacts[1].vertex.x)/2;normalPosY=(pair.contacts[0].vertex.y+pair.contacts[1].vertex.y)/2;} 742if(collision.bodyB===collision.supports[0].body||collision.bodyA.isStatic===true){c.moveTo(normalPosX-collision.normal.x*8,normalPosY-collision.normal.y*8);}else{c.moveTo(normalPosX+collision.normal.x*8,normalPosY+collision.normal.y*8);} 743c.lineTo(normalPosX,normalPosY);}} 744if(options.wireframes){c.strokeStyle='rgba(255,165,0,0.7)';}else{c.strokeStyle='orange';} 745c.lineWidth=1;c.stroke();};Render.separations=function(render,pairs,context){var c=context,options=render.options,pair,collision,corrected,bodyA,bodyB,i,j;c.beginPath();for(i=0;i<pairs.length;i++){pair=pairs[i];if(!pair.isActive) 746continue;collision=pair.collision;bodyA=collision.bodyA;bodyB=collision.bodyB;var k=1;if(!bodyB.isStatic&&!bodyA.isStatic)k=0.5;if(bodyB.isStatic)k=0;c.moveTo(bodyB.position.x,bodyB.position.y);c.lineTo(bodyB.position.x-collision.penetration.x*k,bodyB.position.y-collision.penetration.y*k);k=1;if(!bodyB.isStatic&&!bodyA.isStatic)k=0.5;if(bodyA.isStatic)k=0;c.moveTo(bodyA.position.x,bodyA.position.y);c.lineTo(bodyA.position.x+collision.penetration.x*k,bodyA.position.y+collision.penetration.y*k);} 747if(options.wireframes){c.strokeStyle='rgba(255,165,0,0.5)';}else{c.strokeStyle='orange';} 748c.stroke();};Render.inspector=function(inspector,context){var engine=inspector.engine,selected=inspector.selected,render=inspector.render,options=render.options,bounds;if(options.hasBounds){var boundsWidth=render.bounds.max.x-render.bounds.min.x,boundsHeight=render.bounds.max.y-render.bounds.min.y,boundsScaleX=boundsWidth/render.options.width,boundsScaleY=boundsHeight/render.options.height;context.scale(1/boundsScaleX,1/boundsScaleY);context.translate(-render.bounds.min.x,-render.bounds.min.y);} 749for(var i=0;i<selected.length;i++){var item=selected[i].data;context.translate(0.5,0.5);context.lineWidth=1;context.strokeStyle='rgba(255,165,0,0.9)';context.setLineDash([1,2]);switch(item.type){case'body':bounds=item.bounds;context.beginPath();context.rect(Math.floor(bounds.min.x-3),Math.floor(bounds.min.y-3),Math.floor(bounds.max.x-bounds.min.x+6),Math.floor(bounds.max.y-bounds.min.y+6));context.closePath();context.stroke();break;case'constraint':var point=item.pointA;if(item.bodyA) 750point=item.pointB;context.beginPath();context.arc(point.x,point.y,10,0,2*Math.PI);context.closePath();context.stroke();break;} 751context.setLineDash([]);context.translate(-0.5,-0.5);} 752if(inspector.selectStart!==null){context.translate(0.5,0.5);context.lineWidth=1;context.strokeStyle='rgba(255,165,0,0.6)';context.fillStyle='rgba(255,165,0,0.1)';bounds=inspector.selectBounds;context.beginPath();context.rect(Math.floor(bounds.min.x),Math.floor(bounds.min.y),Math.floor(bounds.max.x-bounds.min.x),Math.floor(bounds.max.y-bounds.min.y));context.closePath();context.stroke();context.fill();context.translate(-0.5,-0.5);} 753if(options.hasBounds) 754context.setTransform(1,0,0,1,0,0);};var _updateTiming=function(render,time){var engine=render.engine,timing=render.timing,historySize=timing.historySize,timestamp=engine.timing.timestamp;timing.delta=time-timing.lastTime||Render._goodDelta;timing.lastTime=time;timing.timestampElapsed=timestamp-timing.lastTimestamp||0;timing.lastTimestamp=timestamp;timing.deltaHistory.unshift(timing.delta);timing.deltaHistory.length=Math.min(timing.deltaHistory.length,historySize);timing.engineDeltaHistory.unshift(engine.timing.lastDelta);timing.engineDeltaHistory.length=Math.min(timing.engineDeltaHistory.length,historySize);timing.timestampElapsedHistory.unshift(timing.timestampElapsed);timing.timestampElapsedHistory.length=Math.min(timing.timestampElapsedHistory.length,historySize);timing.engineUpdatesHistory.unshift(engine.timing.lastUpdatesPerFrame);timing.engineUpdatesHistory.length=Math.min(timing.engineUpdatesHistory.length,historySize);timing.engineElapsedHistory.unshift(engine.timing.lastElapsed);timing.engineElapsedHistory.length=Math.min(timing.engineElapsedHistory.length,historySize);timing.elapsedHistory.unshift(timing.lastElapsed);timing.elapsedHistory.length=Math.min(timing.elapsedHistory.length,historySize);};var _mean=function(values){var result=0;for(var i=0;i<values.length;i+=1){result+=values[i];} 755return(result/values.length)||0;};var _createCanvas=function(width,height){var canvas=document.createElement('canvas');canvas.width=width;canvas.height=height;canvas.oncontextmenu=function(){return false;};canvas.onselectstart=function(){return false;};return canvas;};var _getPixelRatio=function(canvas){var context=canvas.getContext('2d'),devicePixelRatio=window.devicePixelRatio||1,backingStorePixelRatio=context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||context.backingStorePixelRatio||1;return devicePixelRatio/backingStorePixelRatio;};var _getTexture=function(render,imagePath){var image=render.textures[imagePath];if(image) 756return image;image=render.textures[imagePath]=new Image();image.src=imagePath;return image;};var _applyBackground=function(render,background){var cssBackground=background;if(/(jpg|gif|png)$/.test(background)) 757cssBackground='url('+background+')';render.canvas.style.background=cssBackground;render.canvas.style.backgroundSize="contain";render.currentBackground=background;};})();}),(function(module,exports,__webpack_require__){var Runner={};module.exports=Runner;var Events=__webpack_require__(5);var Engine=__webpack_require__(17);var Common=__webpack_require__(0);(function(){Runner._maxFrameDelta=1000/15;Runner._frameDeltaFallback=1000/60;Runner._timeBufferMargin=1.5;Runner._elapsedNextEstimate=1;Runner._smoothingLowerBound=0.1;Runner._smoothingUpperBound=0.9;Runner.create=function(options){var defaults={delta:1000/60,frameDelta:null,frameDeltaSmoothing:true,frameDeltaSnapping:true,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1000/30,lastUpdatesDeferred:0,enabled:true};var runner=Common.extend(defaults,options);runner.fps=0;return runner;};Runner.run=function(runner,engine){runner.timeBuffer=Runner._frameDeltaFallback;(function onFrame(time){runner.frameRequestId=Runner._onNextFrame(runner,onFrame);if(time&&runner.enabled){Runner.tick(runner,engine,time);}})();return runner;};Runner.tick=function(runner,engine,time){var tickStartTime=Common.now(),engineDelta=runner.delta,updateCount=0;var frameDelta=time-runner.timeLastTick;if(!frameDelta||!runner.timeLastTick||frameDelta>Math.max(Runner._maxFrameDelta,runner.maxFrameTime)){frameDelta=runner.frameDelta||Runner._frameDeltaFallback;} 758if(runner.frameDeltaSmoothing){runner.frameDeltaHistory.push(frameDelta);runner.frameDeltaHistory=runner.frameDeltaHistory.slice(-runner.frameDeltaHistorySize);var deltaHistorySorted=runner.frameDeltaHistory.slice(0).sort();var deltaHistoryWindow=runner.frameDeltaHistory.slice(deltaHistorySorted.length*Runner._smoothingLowerBound,deltaHistorySorted.length*Runner._smoothingUpperBound);var frameDeltaSmoothed=_mean(deltaHistoryWindow);frameDelta=frameDeltaSmoothed||frameDelta;} 759if(runner.frameDeltaSnapping){frameDelta=1000/Math.round(1000/frameDelta);} 760runner.frameDelta=frameDelta;runner.timeLastTick=time;runner.timeBuffer+=runner.frameDelta;runner.timeBuffer=Common.clamp(runner.timeBuffer,0,runner.frameDelta+engineDelta*Runner._timeBufferMargin);runner.lastUpdatesDeferred=0;var maxUpdates=runner.maxUpdates||Math.ceil(runner.maxFrameTime/engineDelta);var event={timestamp:engine.timing.timestamp};Events.trigger(runner,'beforeTick',event);Events.trigger(runner,'tick',event);var updateStartTime=Common.now();while(engineDelta>0&&runner.timeBuffer>=engineDelta*Runner._timeBufferMargin){Events.trigger(runner,'beforeUpdate',event);Engine.update(engine,engineDelta);Events.trigger(runner,'afterUpdate',event);runner.timeBuffer-=engineDelta;updateCount+=1;var elapsedTimeTotal=Common.now()-tickStartTime,elapsedTimeUpdates=Common.now()-updateStartTime,elapsedNextEstimate=elapsedTimeTotal+Runner._elapsedNextEstimate*elapsedTimeUpdates/updateCount;if(updateCount>=maxUpdates||elapsedNextEstimate>runner.maxFrameTime){runner.lastUpdatesDeferred=Math.round(Math.max(0,(runner.timeBuffer/engineDelta)-Runner._timeBufferMargin));break;}} 761engine.timing.lastUpdatesPerFrame=updateCount;Events.trigger(runner,'afterTick',event);if(runner.frameDeltaHistory.length>=100){if(runner.lastUpdatesDeferred&&Math.round(runner.frameDelta/engineDelta)>maxUpdates){Common.warnOnce('Matter.Runner: runner reached runner.maxUpdates, see docs.');}else if(runner.lastUpdatesDeferred){Common.warnOnce('Matter.Runner: runner reached runner.maxFrameTime, see docs.');} 762if(typeof runner.isFixed!=='undefined'){Common.warnOnce('Matter.Runner: runner.isFixed is now redundant, see docs.');} 763if(runner.deltaMin||runner.deltaMax){Common.warnOnce('Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs.');} 764if(runner.fps!==0){Common.warnOnce('Matter.Runner: runner.fps was replaced by runner.delta, see docs.');}}};Runner.stop=function(runner){Runner._cancelNextFrame(runner);};Runner._onNextFrame=function(runner,callback){if(typeof window!=='undefined'&&window.requestAnimationFrame){runner.frameRequestId=window.requestAnimationFrame(callback);}else{throw new Error('Matter.Runner: missing required global window.requestAnimationFrame.');} 765return runner.frameRequestId;};Runner._cancelNextFrame=function(runner){if(typeof window!=='undefined'&&window.cancelAnimationFrame){window.cancelAnimationFrame(runner.frameRequestId);}else{throw new Error('Matter.Runner: missing required global window.cancelAnimationFrame.');}};var _mean=function(values){var result=0,valuesLength=values.length;for(var i=0;i<valuesLength;i+=1){result+=values[i];} 766return(result/valuesLength)||0;};})();}),(function(module,exports,__webpack_require__){var SAT={};module.exports=SAT;var Collision=__webpack_require__(8);var Common=__webpack_require__(0);var deprecated=Common.deprecated;(function(){SAT.collides=function(bodyA,bodyB){return Collision.collides(bodyA,bodyB);};deprecated(SAT,'collides','SAT.collides ⤠replaced by Collision.collides');})();}),(function(module,exports,__webpack_require__){var Svg={};module.exports=Svg;var Bounds=__webpack_require__(1);
766var Common=__webpack_require__(0);(function(){Svg.pathToVertices=function(path,sampleLength){if(typeof window!=='undefined'&&!('SVGPathSeg'in window)){Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.');} 767var i,il,total,point,segment,segments,segmentsQueue,lastSegment,lastPoint,segmentIndex,points=[],lx,ly,length=0,x=0,y=0;sampleLength=sampleLength||15;var addPoint=function(px,py,pathSegType){var isRelative=pathSegType%2===1&&pathSegType>1;if(!lastPoint||px!=lastPoint.x||py!=lastPoint.y){if(lastPoint&&isRelative){lx=lastPoint.x;ly=lastPoint.y;}else{lx=0;ly=0;} 768var point={x:lx+px,y:ly+py};if(isRelative||!lastPoint){lastPoint=point;} 769points.push(point);x=lx+px;y=ly+py;}};var addSegmentPoint=function(segment){var segType=segment.pathSegTypeAsLetter.toUpperCase();if(segType==='Z') 770return;switch(segType){case'M':case'L':case'T':case'C':case'S':case'Q':x=segment.x;y=segment.y;break;case'H':x=segment.x;break;case'V':y=segment.y;break;} 771addPoint(x,y,segment.pathSegType);};Svg._svgPathToAbsolute(path);total=path.getTotalLength();segments=[];for(i=0;i<path.pathSegList.numberOfItems;i+=1) 772segments.push(path.pathSegList.getItem(i));segmentsQueue=segments.concat();while(length<total){segmentIndex=path.getPathSegAtLength(length);segment=segments[segmentIndex];if(segment!=lastSegment){while(segmentsQueue.length&&segmentsQueue[0]!=segment) 773addSegmentPoint(segmentsQueue.shift());lastSegment=segment;} 774switch(segment.pathSegTypeAsLetter.toUpperCase()){case'C':case'T':case'S':case'Q':case'A':point=path.getPointAtLength(length);addPoint(point.x,point.y,0);break;} 775length+=sampleLength;} 776for(i=0,il=segmentsQueue.length;i<il;++i) 777addSegmentPoint(segmentsQueue[i]);return points;};Svg._svgPathToAbsolute=function(path){var x0,y0,x1,y1,x2,y2,segs=path.pathSegList,x=0,y=0,len=segs.numberOfItems;for(var i=0;i<len;++i){var seg=segs.getItem(i),segType=seg.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(segType)){if('x'in seg)x=seg.x;if('y'in seg)y=seg.y;}else{if('x1'in seg)x1=x+seg.x1;if('x2'in seg)x2=x+seg.x2;if('y1'in seg)y1=y+seg.y1;if('y2'in seg)y2=y+seg.y2;if('x'in seg)x+=seg.x;if('y'in seg)y+=seg.y;switch(segType){case'm':segs.replaceItem(path.createSVGPathSegMovetoAbs(x,y),i);break;case'l':segs.replaceItem(path.createSVGPathSegLinetoAbs(x,y),i);break;case'h':segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x),i);break;case'v':segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y),i);break;case'c':segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x,y,x1,y1,x2,y2),i);break;case's':segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x,y,x2,y2),i);break;case'q':segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x,y,x1,y1),i);break;case't':segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x,y),i);break;case'a':segs.replaceItem(path.createSVGPathSegArcAbs(x,y,seg.r1,seg.r2,seg.angle,seg.largeArcFlag,seg.sweepFlag),i);break;case'z':case'Z':x=x0;y=y0;break;}} 778if(segType=='M'||segType=='m'){x0=x;y0=y;}}};})();}),(function(module,exports,__webpack_require__){var World={};module.exports=World;var Composite=__webpack_require__(6);var Common=__webpack_require__(0);(function(){World.create=Composite.create;World.add=Composite.add;World.remove=Composite.remove;World.clear=Composite.clear;World.addComposite=Composite.addComposite;World.addBody=Composite.addBody;World.addConstraint=Composite.addConstraint;})();})]);});(function(root,factory){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=factory();}else if(typeof define==="function"&&define.amd){define(factory);}else{root.fitty=factory();}})(typeof self!=="undefined"?self:this,function(){"use strict";return function(win){if(!win)return;function toArray(list){return[].slice.call(list);} 779function extend(target){target=target||{};for(var i=1;i<arguments.length;i++){var src=arguments[i];if(!src)continue;for(var k in src){if(Object.prototype.hasOwnProperty.call(src,k)){target[k]=src[k];}}} 780return target;} 781function createCustomEvent(name,detail){try{return new CustomEvent(name,{detail:detail});}catch(e){var ev=document.createEvent("CustomEvent");ev.initCustomEvent(name,false,false,detail);return ev;}} 782var DIRTY_INIT=0;var DIRTY_MUTATION=1;var DIRTY_LAYOUT=2;var DIRTY_FORCE=3;var instances=[];var rafId=null;var requestTick="requestAnimationFrame"in win?function(opts){opts=opts||{sync:false};win.cancelAnimationFrame(rafId);function run(){var activeDirty=instances.filter(function(item){return item.dirty&&item.active;});return process(activeDirty);} 783if(opts.sync)return run();rafId=win.requestAnimationFrame(run);}:function(){};function markAllDirty(type){return function(opts){instances.forEac
783h(function(item){item.dirty=type;});requestTick(opts);};} 784function process(batch){batch.filter(function(item){return!item.styleComputed;}).forEach(function(item){item.styleComputed=computeStyle(item);});batch.filter(needsPreStyleFix).forEach(applyStyles);var toLayout=batch.filter(needsLayout);toLayout.forEach(calcLayout);toLayout.forEach(function(item){applyStyles(item);clean(item);});toLayout.forEach(dispatchFitEvent);} 785function clean(item){item.dirty=DIRTY_INIT;return item.dirty;} 786function calcLayout(item){item.availableWidth=item.element.parentNode.clientWidth;item.currentWidth=item.element.scrollWidth;item.previousFontSize=item.currentFontSize;var scaled=(item.availableWidth/item.currentWidth)*item.previousFontSize;var clamped=Math.min(Math.max(item.minSize,scaled),item.maxSize);item.currentFontSize=clamped;item.whiteSpace=item.multiLine&&item.currentFontSize===item.minSize?"normal":"nowrap";} 787function needsLayout(item){return(item.dirty!==DIRTY_LAYOUT||(item.dirty===DIRTY_LAYOUT&&item.element.parentNode.clientWidth!==item.availableWidth));} 788function computeStyle(item){var cs=win.getComputedStyle(item.element,null);item.currentFontSize=parseFloat(cs.getPropertyValue("font-size"));item.display=cs.getPropertyValue("display");item.whiteSpace=cs.getPropertyValue("white-space");return true;} 789function needsPreStyleFix(item){var changed=false;if(!item.preStyleTestCompleted){if(/inline-/.test(item.display)){changed=true;item.display="inline-block";} 790if(item.whiteSpace!=="nowrap"){changed=true;item.whiteSpace="nowrap";} 791item.preStyleTestCompleted=true;} 792return changed;} 793function applyStyles(item){item.element.style.whiteSpace=item.whiteSpace;item.element.style.display=item.display;item.element.style.fontSize=item.currentFontSize+"px";} 794function dispatchFitEvent(item){var detail={oldValue:item.previousFontSize,newValue:item.currentFontSize,scaleFactor:item.currentFontSize/item.previousFontSize};item.element.dispatchEvent(createCustomEvent("fit",detail));} 795function onMutation(item,dirtyType){return function(opts){item.dirty=dirtyType;if(item.active)requestTick(opts);};} 796function unsubscribe(item){return function(){instances=instances.filter(function(x){return x.element!==item.element;});if(item.observeMutations&&item.observer){item.observer.disconnect();} 797item.element.style.whiteSpace=item.originalStyle.whiteSpace;item.element.style.display=item.originalStyle.display;item.element.style.fontSize=item.originalStyle.fontSize;};} 798function unfreeze(item){return function(){if(!item.active){item.active=true;requestTick();}};} 799function freeze(item){return function(){item.active=false;};} 800function observeMutations(item){if(item.observeMutations){item.observer=new MutationObserver(onMutation(item,DIRTY_MUTATION));item.observer.observe(item.element,item.observeMutations);}} 801var defaults={minSize:16,maxSize:512,multiLine:true,observeMutations:"MutationObserver"in win&&{subtree:true,childList:true,characterData:true}};var windowDelayTimer=null;function onWindowResize(){win.clearTimeout(windowDelayTimer);windowDelayTimer=win.setTimeout(markAllDirty(DIRTY_LAYOUT),api.observeWindowDelay);} 802var windowEvents=["resize","orientationchange"];function createInstances(elements,options){var config=extend({},defaults,options);var result=elements.map(function(el){var item=extend({},config,{element:el,active:true});item.originalStyle={whiteSpace:item.element.style.whiteSpace,display:item.element.style.display,fontSize:item.element.style.fontSize};observeMutations(item);item.newbie=true;item.dirty=true;instances.push(item);return{element:el,fit:onMutation(item,DIRTY_FORCE),unfreeze:unfreeze(item),freeze:freeze(item),unsubscribe:unsubscribe(item)};});requestTick();return result;} 803function api(input,options){options=options||{};if(typeof input==="string"){return createInstances(toArray(document.querySelectorAll(input)),options);} 804return createInstances([input],options)[0];} 805Object.defineProperty(api,"observeWindow",{set:function(enabled){var method=(enabled?"add":"remove")+"EventListener";windowEvents.forEach(function(evt){win[method](evt,onWindowResize);});}});api.observeWindow=true;api.observeWindowDelay=100;api.fitAll=markAllDirty(DIRTY_FORCE);return api;}(typeof window==="undefined"?null:window);});"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} 806function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}} 807function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;} 808function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");
808return _typeof(key)==="symbol"?key:String(key);} 809function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);} 810function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);} 811(function(global,factory){(typeof exports==="undefined"?"undefined":_typeof(exports))==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Lenis=factory());})(void 0,function(){'use strict';var version="1.1.9";function clamp(min,input,max){return Math.max(min,Math.min(input,max));} 812function lerp(x,y,t){return(1-t)*x+t*y;} 813function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt));} 814function modulo(n,d){return(n%d+d)%d;} 815var Animate=function(){function Animate(){_classCallCheck(this,Animate);this.isRunning=false;this.value=0;this.from=0;this.to=0;this.duration=0;this.currentTime=0;} 816_createClass(Animate,[{key:"advance",value:function advance(deltaTime){var _a;if(!this.isRunning)return;var completed=false;if(this.duration&&this.easing){this.currentTime+=deltaTime;var linearProgress=clamp(0,this.currentTime/this.duration,1);completed=linearProgress>=1;var easedProgress=completed?1:this.easing(linearProgress);this.value=this.from+(this.to-this.from)*easedProgress;}else if(this.lerp){this.value=damp(this.value,this.to,this.lerp*60,deltaTime);if(Math.round(this.value)===this.to){this.value=this.to;completed=true;}}else{this.value=this.to;completed=true;} 817if(completed){this.stop();} 818(_a=this.onUpdate)===null||_a===void 0?void 0:_a.call(this,this.value,completed);}},{key:"stop",value:function stop(){this.isRunning=false;}},{key:"fromTo",value:function fromTo(from,to,_ref){var lerp=_ref.lerp,duration=_ref.duration,easing=_ref.easing,onStart=_ref.onStart,onUpdate=_ref.onUpdate;this.from=this.value=from;this.to=to;this.lerp=lerp;this.duration=duration;this.easing=easing;this.currentTime=0;this.isRunning=true;onStart===null||onStart===void 0?void 0:onStart();this.onUpdate=onUpdate;}}]);return Animate;}();function debounce(callback,delay){var timer;return function(){var args=arguments;var context=this;clearTimeout(timer);timer=setTimeout(function(){callback.apply(context,args);},delay);};} 819var Dimensions=function(){function Dimensions(){var _this=this;var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},wrapper=_ref2.wrapper,content=_ref2.content,_ref2$autoResize=_ref2.autoResize,autoResize=_ref2$autoResize===void 0?true:_ref2$autoResize,_ref2$debounce=_ref2.debounce,debounceValue=_ref2$debounce===void 0?250:_ref2$debounce;_classCallCheck(this,Dimensions);this.width=0;this.height=0;this.scrollWidth=0;this.scrollHeight=0;this.resize=function(){_this.onWrapperResize();_this.onContentResize();};this.onWrapperResize=function(){if(_this.wrapper===window){_this.width=window.innerWidth;_this.height=window.innerHeight;}else if(_this.wrapper instanceof HTMLElement){_this.width=_this.wrapper.clientWidth;_this.height=_this.wrapper.clientHeight;}};this.onContentResize=function(){if(_this.wrapper===window){_this.scrollHeight=_this.content.scrollHeight;_this.scrollWidth=_this.content.scrollWidth;}else if(_this.wrapper instanceof HTMLElement){_this.scrollHeight=_this.wrapper.scrollHeight;_this.scrollWidth=_this.wrapper.scrollWidth;}};this.wrapper=wrapper;this.content=content;if(autoResize){this.debouncedResize=debounce(this.resize,debounceValue);if(this.wrapper===window){window.addEventListener('resize',this.debouncedResize,false);}else{this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize);this.wrapperResizeObserver.observe(this.wrapper);} 820this.contentResizeObserver=new ResizeObserver(this.debouncedResize);this.contentResizeObserver.observe(this.content);} 821this.resize();} 822_createClass(Dimensions,[{key:"destroy",value:function destroy(){var _a,_b;(_a=this.wrapperResizeObserver)===null||_a===void 0?void 0:_a.disconnect();(_b=this.contentResizeObserver)===null||_b===void 0?void 0:_b.disconnect();window.removeEventListener('resize',this.debouncedResize,false);}},{key:"limit",get:function get(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height};}}]);return Dimensions;}();var Emitter=function(){function Emitter(){_classCallCheck(this,Emitter);this.events={};} 823_createClass(Emitter,[{key:"emit",value:function emit(event){var callbacks=this.events[event]||[];for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];} 824for(var i=0,length=callbacks.length;i<length;
824i++){callbacks[i].apply(callbacks,args);}}},{key:"on",value:function on(event,callback){var _this2=this;var _a;((_a=this.events[event])===null||_a===void 0?void 0:_a.push(callback))||(this.events[event]=[callback]);return function(){var _a;_this2.events[event]=(_a=_this2.events[event])===null||_a===void 0?void 0:_a.filter(function(i){return callback!==i;});};}},{key:"off",value:function off(event,callback){var _a;this.events[event]=(_a=this.events[event])===null||_a===void 0?void 0:_a.filter(function(i){return callback!==i;});}},{key:"destroy",value:function destroy(){this.events={};}}]);return Emitter;}();var LINE_HEIGHT=100/6;var VirtualScroll=function(){function VirtualScroll(element,_ref3){var _this3=this;var _ref3$wheelMultiplier=_ref3.wheelMultiplier,wheelMultiplier=_ref3$wheelMultiplier===void 0?1:_ref3$wheelMultiplier,_ref3$touchMultiplier=_ref3.touchMultiplier,touchMultiplier=_ref3$touchMultiplier===void 0?1:_ref3$touchMultiplier;_classCallCheck(this,VirtualScroll);this.lastDelta={x:0,y:0};this.windowWidth=0;this.windowHeight=0;this.onTouchStart=function(event){var _ref4=event.targetTouches?event.targetTouches[0]:event,clientX=_ref4.clientX,clientY=_ref4.clientY;_this3.touchStart.x=clientX;_this3.touchStart.y=clientY;_this3.lastDelta={x:0,y:0};_this3.emitter.emit('scroll',{deltaX:0,deltaY:0,event:event});};this.onTouchMove=function(event){var _a,_b,_c,_d;var _ref5=event.targetTouches?event.targetTouches[0]:event,clientX=_ref5.clientX,clientY=_ref5.clientY;var deltaX=-(clientX-((_b=(_a=_this3.touchStart)===null||_a===void 0?void 0:_a.x)!==null&&_b!==void 0?_b:0))*_this3.touchMultiplier;var deltaY=-(clientY-((_d=(_c=_this3.touchStart)===null||_c===void 0?void 0:_c.y)!==null&&_d!==void 0?_d:0))*_this3.touchMultiplier;_this3.touchStart.x=clientX;_this3.touchStart.y=clientY;_this3.lastDelta={x:deltaX,y:deltaY};_this3.emitter.emit('scroll',{deltaX:deltaX,deltaY:deltaY,event:event});};this.onTouchEnd=function(event){_this3.emitter.emit('scroll',{deltaX:_this3.lastDelta.x,deltaY:_this3.lastDelta.y,event:event});};this.onWheel=function(event){var deltaX=event.deltaX,deltaY=event.deltaY,deltaMode=event.deltaMode;var multiplierX=deltaMode===1?LINE_HEIGHT:deltaMode===2?_this3.windowWidth:1;var multiplierY=deltaMode===1?LINE_HEIGHT:deltaMode===2?_this3.windowHeight:1;deltaX*=multiplierX;deltaY*=multiplierY;deltaX*=_this3.wheelMultiplier;deltaY*=_this3.wheelMultiplier;_this3.emitter.emit('scroll',{deltaX:deltaX,deltaY:deltaY,event:event});};this.onWindowResize=function(){_this3.windowWidth=window.innerWidth;_this3.windowHeight=window.innerHeight;};this.element=element;this.wheelMultiplier=wheelMultiplier;this.touchMultiplier=touchMultiplier;this.touchStart={x:null,y:null};this.emitter=new Emitter();window.addEventListener('resize',this.onWindowResize,false);this.onWindowResize();this.element.addEventListener('wheel',this.onWheel,{passive:false});this.element.addEventListener('touchstart',this.onTouchStart,{passive:false});this.element.addEventListener('touchmove',this.onTouchMove,{passive:false});this.element.addEventListener('touchend',this.onTouchEnd,{passive:false});} 825_createClass(VirtualScroll,[{key:"on",value:function on(event,callback){return this.emitter.on(event,callback);}},{key:"destroy",value:function destroy(){this.emitter.destroy();window.removeEventListener('resize',this.onWindowResize,false);this.element.removeEventListener('wheel',this.onWheel);this.element.removeEventListener('touchstart',this.onTouchStart);this.element.removeEventListener('touchmove',this.onTouchMove);this.element.removeEventListener('touchend',this.onTouchEnd);}}]);return VirtualScroll;}();var Lenis=function(){function Lenis(){var _this4=this;var _ref6=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref6$wrapper=_ref6.wrapper,wrapper=_ref6$wrapper===void 0?window:_ref6$wrapper,_ref6$content=_ref6.content,content=_ref6$content===void 0?document.documentElement:_ref6$content,_ref6$wheelEventsTarg=_ref6.wheelEventsTarget,wheelEventsTarget=_ref6$wheelEventsTarg===void 0?wrapper:_ref6$wheelEventsTarg,_ref6$eventsTarget=_ref6.eventsTarget,eventsTarget=_ref6$eventsTarget===void 0?wheelEventsTarget:_ref6$eventsTarget,_ref6$smoothWheel=_ref6.smoothWheel,smoothWheel=_ref6$smoothWheel===void 0?true:_ref6$smoothWheel,_ref6$syncTouch=_ref6.syncTouch,syncTouch=_ref6$syncTouch===void 0?false:_ref6$syncTouch,_ref6$syncTouchLerp=_ref6.syncTouchLerp,syncTouchLerp=_ref6$syncTouchLerp===void 0?0.075:_ref6$syncTouchLerp,_ref6$touchInertiaMul=_ref6.touchInertiaMultiplier,touchInertiaMultiplier=_ref6$touchInertiaMul===void 0?35:_ref6$touchInertiaMul,duration=_ref6.duration,_ref6$easing=_ref6.easing,easing=_ref6$easing===void 0?function(t){return Math.min(1,1.001-Math.pow(2,-10*t));}:_ref6$easing,_ref6$lerp=_ref6.lerp,lerp=_ref6$lerp===void 0?0.1:_ref6$lerp,_ref6$infinite=_ref6.infinite,infinite=_ref6$infinite===void 0?false:_ref6$infinite,_ref6$orientation=_ref6.orientation,orientation=_ref6$orientation===void 0?'vertical':_ref6$orientation,_ref6$gestureOrientat=_ref6.gestureOrientation,gestureOrientation=_ref6$gestureOrientat===void 0?'vertical':_ref6$gestureOrientat,_ref6$touchMultiplier=_ref6.touchMultiplier,touchMultiplier=_ref6$touchMultiplier===void 0?1:_ref6$touchMultiplier,_ref6$wheelMultiplier=_ref6.wheelMultiplier,wheelMultiplier=_ref6$wheelMultiplier===void 0?1:_ref6$wheelMultiplier,_ref6$autoResize=_ref6.autoResize,autoResize=_ref6$autoResize===void 0?true:_ref6$autoResize,prevent=_ref6.prevent,virtualScroll=_ref6.virtualScroll,_ref6$__experimental_=_ref6.__experimental__naiveDimensions,__experimental__naiveDimensions=_ref6$__experimental_===void 0?false:_ref6$__experimental_;_classCallCheck(this,Lenis);this.__isScrolling=false;this.__isStopped=false;this.__isLocked=false;this.userData={};this.lastVelocity=0;this.velocity=0;this.direction=0;this.onPointerDown=function(event){if(event.button===1){_this4.reset();}};this.onVirtualScroll=function(data){if(typeof _this4.options.virtualScroll==='function'&&_this4.options.virtualScroll(data)===false)return;var deltaX=data.deltaX,deltaY=data.deltaY,event=data.event;_this4.emitter.emit('virtual-scroll',{deltaX:deltaX,deltaY:deltaY,event:event});if(event.ctrlKey)return;var isTouch=event.type.includes('touch');var isWheel=event.type.includes('wheel');_this4.isTouching=event.type==='touchstart'||event.type==='touchmove';var isTapToStop=_this4.options.syncTouch&&isTouch&&event.type==='touchstart'&&!_this4.isStopped&&!_this4.isLocked;if(isTapToStop){_this4.reset();return;} 826var isClick=deltaX===0&&deltaY===0;var isUnknownGesture=_this4.options.gestureOrientation==='vertical'&&deltaY===0||_this4.options.gestureOrientation==='horizontal'&&deltaX===0;if(isClick||isUnknownGesture){return;} 827var composedPath=event.composedPath();composedPath=composedPath.slice(0,composedPath.indexOf(_this4.rootElement));var prevent=_this4.options.prevent;if(!!composedPath.find(function(node){var _a,_b,_c,_d,_e;return node instanceof Element&&(typeof prevent==='function'&&(prevent===null||prevent===void 0?void 0:prevent(node))||((_a=node.hasAttribute)===null||_a===void 0?void 0:_a.call(node,'data-lenis-prevent'))||isTouch&&((_b=node.hasAttribute)===null||_b===void 0?void 0:_b.call(node,'data-lenis-prevent-touch'))||isWheel&&((_c=node.hasAttribute)===null||_c===void 0?void 0:_c.call(node,'data-lenis-prevent-wheel'))||((_d=node.classList)===null||_d===void 0?void 0:_d.contains('lenis'))&&!((_e=node.classList)===null||_e===void 0?void 0:_e.contains('lenis-stopped')));}))return;if(_this4.isStopped||_this4.isLocked){event.preventDefault();return;} 828var isSmooth=_this4.options.syncTouch&&isTouch||_this4.options.smoothWheel&&isWheel;if(!isSmooth){_this4.isScrolling='native';_this4.animate.stop();return;} 829event.preventDefault();var delta=deltaY;if(_this4.options.gestureOrientation==='both'){delta=Math.abs(deltaY)>Math.abs(deltaX)?deltaY:deltaX;}else if(_this4.options.gestureOrientation==='horizontal'){delta=deltaX;} 830var syncTouch=isTouch&&_this4.options.syncTouch;var isTouchEnd=isTouch&&event.type==='touchend';var hasTouchInertia=isTouchEnd&&Math.abs(delta)>5;
830if(hasTouchInertia){delta=_this4.velocity*_this4.options.touchInertiaMultiplier;} 831_this4.scrollTo(_this4.targetScroll+delta,Object.assign({programmatic:false},syncTouch?{lerp:hasTouchInertia?_this4.options.syncTouchLerp:1}:{lerp:_this4.options.lerp,duration:_this4.options.duration,easing:_this4.options.easing}));};this.onNativeScroll=function(){clearTimeout(_this4.__resetVelocityTimeout);delete _this4.__resetVelocityTimeout;if(_this4.__preventNextNativeScrollEvent){delete _this4.__preventNextNativeScrollEvent;return;} 832if(_this4.isScrolling===false||_this4.isScrolling==='native'){var lastScroll=_this4.animatedScroll;_this4.animatedScroll=_this4.targetScroll=_this4.actualScroll;_this4.lastVelocity=_this4.velocity;_this4.velocity=_this4.animatedScroll-lastScroll;_this4.direction=Math.sign(_this4.animatedScroll-lastScroll);_this4.isScrolling='native';_this4.emit();if(_this4.velocity!==0){_this4.__resetVelocityTimeout=setTimeout(function(){_this4.lastVelocity=_this4.velocity;_this4.velocity=0;_this4.isScrolling=false;_this4.emit();},400);}}};window.lenisVersion=version;if(!wrapper||wrapper===document.documentElement||wrapper===document.body){wrapper=window;} 833this.options={wrapper:wrapper,content:content,wheelEventsTarget:wheelEventsTarget,eventsTarget:eventsTarget,smoothWheel:smoothWheel,syncTouch:syncTouch,syncTouchLerp:syncTouchLerp,touchInertiaMultiplier:touchInertiaMultiplier,duration:duration,easing:easing,lerp:lerp,infinite:infinite,gestureOrientation:gestureOrientation,orientation:orientation,touchMultiplier:touchMultiplier,wheelMultiplier:wheelMultiplier,autoResize:autoResize,prevent:prevent,virtualScroll:virtualScroll,__experimental__naiveDimensions:__experimental__naiveDimensions};this.animate=new Animate();this.emitter=new Emitter();this.dimensions=new Dimensions({wrapper:wrapper,content:content,autoResize:autoResize});this.updateClassName();this.userData={};this.time=0;this.velocity=this.lastVelocity=0;this.isLocked=false;this.isStopped=false;this.isScrolling=false;this.targetScroll=this.animatedScroll=this.actualScroll;this.options.wrapper.addEventListener('scroll',this.onNativeScroll,false);this.options.wrapper.addEventListener('pointerdown',this.onPointerDown,false);this.virtualScroll=new VirtualScroll(eventsTarget,{touchMultiplier:touchMultiplier,wheelMultiplier:wheelMultiplier});this.virtualScroll.on('scroll',this.onVirtualScroll);} 834_createClass(Lenis,[{key:"destroy",value:function destroy(){this.emitter.destroy();this.options.wrapper.removeEventListener('scroll',this.onNativeScroll,false);this.options.wrapper.removeEventListener('pointerdown',this.onPointerDown,false);this.virtualScroll.destroy();this.dimensions.destroy();this.cleanUpClassName();}},{key:"on",value:function on(event,callback){return this.emitter.on(event,callback);}},{key:"off",value:function off(event,callback){return this.emitter.off(event,callback);}},{key:"setScroll",value:function setScroll(scroll){if(this.isHorizontal){this.rootElement.scrollLeft=scroll;}else{this.rootElement.scrollTop=scroll;}}},{key:"resize",value:function resize(){this.dimensions.resize();}},{key:"emit",value:function emit(){this.emitter.emit('scroll',this);}},{key:"reset",value:function reset(){this.isLocked=false;this.isScrolling=false;this.animatedScroll=this.targetScroll=this.actualScroll;this.lastVelocity=this.velocity=0;this.animate.stop();}},{key:"start",value:function start(){if(!this.isStopped)return;this.isStopped=false;this.reset();}},{key:"stop",value:function stop(){if(this.isStopped)return;this.isStopped=true;this.animate.stop();this.reset();}},{key:"raf",value:function raf(time){var deltaTime=time-(this.time||time);this.time=time;this.animate.advance(deltaTime*0.001);}},{key:"scrollTo",value:function scrollTo(target){var _this5=this;var _ref7=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref7$offset=_ref7.offset,offset=_ref7$offset===void 0?0:_ref7$offset,_ref7$immediate=_ref7.immediate,immediate=_ref7$immediate===void 0?false:_ref7$immediate,_ref7$lock=_ref7.lock,lock=_ref7$lock===void 0?false:_ref7$lock,_ref7$duration=_ref7.duration,duration=_ref7$duration===void 0?this.options.duration:_ref7$duration,_ref7$easing=_ref7.easing,easing=_ref7$easing===void 0?this.options.easing:_ref7$easing,_ref7$lerp=_ref7.lerp,lerp=_ref7$lerp===void 0?this.options.lerp:_ref7$lerp,_onStart=_ref7.onStart,onComplete=_ref7.onComplete,_ref7$force=_ref7.force,force=_ref7$force===void 0?false:_ref7$force,_ref7$programmatic=_ref7.programmatic,programmatic=_ref7$programmatic===void 0?true:_ref7$programmatic,_ref7$userData=_ref7.userData,userData=_ref7$userData===void 0?{}:_ref7$userData;if((this.isStopped||this.isLocked)&&!force)return;if(typeof target==='string'&&['top','left','start'].includes(target)){target=0;}else if(typeof target==='string'&&['bottom','right','end'].includes(target)){target=this.limit;}else{var node;if(typeof target==='string'){node=document.querySelector(target);}else if(target instanceof HTMLElement&&(target===null||target===void 0?void 0:target.nodeType)){node=target;} 835if(node){if(this.options.wrapper!==window){var wrapperRect=this.rootElement.getBoundingClientRect();offset-=this.isHorizontal?wrapperRect.left:wrapperRect.top;} 836var rect=node.getBoundingClientRect();target=(this.isHorizontal?rect.left:rect.top)+this.animatedScroll;}} 837if(typeof target!=='number')return;target+=offset;target=Math.round(target);if(this.options.infinite){if(programmatic){this.targetScroll=this.animatedScroll=this.scroll;}}else{target=clamp(0,target,this.limit);} 838if(target===this.targetScroll)return;this.userData=userData;if(immediate){this.animatedScroll=this.targetScroll=target;this.setScroll(this.scroll);this.reset();this.preventNextNativeScrollEvent();
838this.emit();onComplete===null||onComplete===void 0?void 0:onComplete(this);this.userData={};return;} 839if(!programmatic){this.targetScroll=target;} 840this.animate.fromTo(this.animatedScroll,target,{duration:duration,easing:easing,lerp:lerp,onStart:function onStart(){if(lock)_this5.isLocked=true;_this5.isScrolling='smooth';_onStart===null||_onStart===void 0?void 0:_onStart(_this5);},onUpdate:function onUpdate(value,completed){_this5.isScrolling='smooth';_this5.lastVelocity=_this5.velocity;_this5.velocity=value-_this5.animatedScroll;_this5.direction=Math.sign(_this5.velocity);_this5.animatedScroll=value;_this5.setScroll(_this5.scroll);if(programmatic){_this5.targetScroll=value;} 841if(!completed)_this5.emit();if(completed){_this5.reset();_this5.emit();onComplete===null||onComplete===void 0?void 0:onComplete(_this5);_this5.userData={};_this5.preventNextNativeScrollEvent();}}});}},{key:"preventNextNativeScrollEvent",value:function preventNextNativeScrollEvent(){var _this6=this;this.__preventNextNativeScrollEvent=true;requestAnimationFrame(function(){delete _this6.__preventNextNativeScrollEvent;});}},{key:"rootElement",get:function get(){return this.options.wrapper===window?document.documentElement:this.options.wrapper;}},{key:"limit",get:function get(){if(this.options.__experimental__naiveDimensions){if(this.isHorizontal){return this.rootElement.scrollWidth-this.rootElement.clientWidth;}else{return this.rootElement.scrollHeight-this.rootElement.clientHeight;}}else{return this.dimensions.limit[this.isHorizontal?'x':'y'];}}},{key:"isHorizontal",get:function get(){return this.options.orientation==='horizontal';}},{key:"actualScroll",get:function get(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop;}},{key:"scroll",get:function get(){return this.options.infinite?modulo(this.animatedScroll,this.limit):this.animatedScroll;}},{key:"progress",get:function get(){return this.limit===0?1:this.scroll/this.limit;}},{key:"isScrolling",get:function get(){return this.__isScrolling;},set:function set(value){if(this.__isScrolling!==value){this.__isScrolling=value;this.updateClassName();}}},{key:"isStopped",get:function get(){return this.__isStopped;},set:function set(value){if(this.__isStopped!==value){this.__isStopped=value;this.updateClassName();}}},{key:"isLocked",get:function get(){return this.__isLocked;},set:function set(value){if(this.__isLocked!==value){this.__isLocked=value;this.updateClassName();}}},{key:"isSmooth",get:function get(){return this.isScrolling==='smooth';}},{key:"className",get:function get(){var className='lenis';if(this.isStopped)className+=' lenis-stopped';if(this.isLocked)className+=' lenis-locked';if(this.isScrolling)className+=' lenis-scrolling';if(this.isScrolling==='smooth')className+=' lenis-smooth';return className;}},{key:"updateClassName",value:function updateClassName(){this.cleanUpClassName();this.rootElement.className="".concat(this.rootElement.className," ").concat(this.className).trim();}},{key:"cleanUpClassName",value:function cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,'').trim();}}]);return Lenis;}();return Lenis;});(function(window,$){"use strict";var counter=0,$headCache=$('head'),oldBigText=window.BigText,oldjQueryMethod=$.fn.bigtext,BigText={DEBUG_MODE:false,DEFAULT_MIN_FONT_SIZE_PX:null,DEFAULT_MAX_FONT_SIZE_PX:1056,GLOBAL_STYLE_ID:'bigtext-style',STYLE_ID:'bigtext-id',LINE_CLASS_PREFIX:'bigtext-line',EXEMPT_CLASS:'bigtext-exempt',noConflict:function(restore) 842{if(restore){$.fn.bigtext=oldjQueryMethod;window.BigText=oldBigText;} 843return BigText;},supports:{wholeNumberFontSizeOnly:(function(){if(!('getComputedStyle'in window)){return true;} 844var test=$('<div/>').css({position:'absolute','font-size':'14.1px'}).insertBefore($('script').eq(0)),computedStyle=window.getComputedStyle(test[0],null);var ret=computedStyle&&computedStyle.getPropertyValue('font-size')==='14px';test.remove();return ret;})()},init:function(){if(!$('#'+BigText.GLOBAL_STYLE_ID).length){$headCache.append(BigText.generateStyleTag(BigText.GLOBAL_STYLE_ID,['.bigtext * { white-space: nowrap; } .bigtext > * { display: block; }
844','.bigtext .'+BigText.EXEMPT_CLASS+', .bigtext .'+BigText.EXEMPT_CLASS+' * { white-space: normal; }']));}},bindResize:function(eventName,resizeFunction){var timeoutId;$(window).off(eventName).on(eventName,function(){if(timeoutId){clearTimeout(timeoutId);} 845timeoutId=setTimeout(resizeFunction,100);});},getStyleId:function(id) 846{return BigText.STYLE_ID+'-'+id;},generateStyleTag:function(id,css) 847{return $('<style>'+css.join('\n')+'</style>').attr('id',id);},clearCss:function(id) 848{var styleId=BigText.getStyleId(id);$('#'+styleId).remove();},generateCss:function(id,linesFontSizes,lineWordSpacings,minFontSizes) 849{var css=[];BigText.clearCss(id);for(var j=0,k=linesFontSizes.length;j<k;j++){css.push('#'+id+' .'+BigText.LINE_CLASS_PREFIX+j+' {'+ 850(minFontSizes[j]?' white-space: normal;':'')+ 851(linesFontSizes[j]?' font-size: '+linesFontSizes[j]+'px;':'')+ 852(lineWordSpacings[j]?' word-spacing: '+lineWordSpacings[j]+'px;':'')+'}');} 853return BigText.generateStyleTag(BigText.getStyleId(id),css);},jQueryMethod:function(options) 854{BigText.init();options=$.extend({minfontsize:BigText.DEFAULT_MIN_FONT_SIZE_PX,maxfontsize:BigText.DEFAULT_MAX_FONT_SIZE_PX,childSelector:'',resize:true},options||{});this.each(function() 855{var $t=$(this).addClass('bigtext'),maxWidth=$t.width(),id=$t.attr('id'),$children=options.childSelector?$t.find(options.childSelector):$t.children();if(!id){id='bigtext-id'+(counter++);$t.attr('id',id);} 856if(options.resize){BigText.bindResize('resize.bigtext-event-'+id,function() 857{BigText.jQueryMethod.call($('#'+id),options);});} 858BigText.clearCss(id);$children.addClass(function(lineNumber,className) 859{return[className.replace(new RegExp('\\b'+BigText.LINE_CLASS_PREFIX+'\\d+\\b'),''),BigText.LINE_CLASS_PREFIX+lineNumber].join(' ');});var sizes=BigText.calculateSizes($t,$children,maxWidth,options.maxfontsize,options.minfontsize);$headCache.append(BigText.generateCss(id,sizes.fontSizes,sizes.wordSpacings,sizes.minFontSizes));});return this.trigger('bigtext:complete');},testLineDimensions:function($line,maxWidth,property,size,interval,units,previousWidth) 860{var width;previousWidth=typeof previousWidth==='number'?previousWidth:0;$line.css(property,size+units);width=$line.width();if(width>=maxWidth){$line.css(property,'');if(width===maxWidth){return{match:'exact',size:parseFloat((parseFloat(size)-0.1).toFixed(3))};} 861var under=maxWidth-previousWidth,over=width-maxWidth;return{match:'estimate',size:parseFloat((parseFloat(size)-(property==='word-spacing'&&previousWidth&&(over<under)?0:interval)).toFixed(3))};} 862return width;},calculateSizes:function($t,$children,maxWidth,maxFontSize,minFontSize) 863{var $c=$t.clone(true).addClass('bigtext-cloned').css({fontFamily:$t.css('font-family'),textTransform:$t.css('text-transform'),wordSpacing:$t.css('word-spacing'),letterSpacing:$t.css('letter-spacing'),position:'absolute',left:BigText.DEBUG_MODE?0:-9999,top:BigText.DEBUG_MODE?0:-9999}).appendTo(document.body);var fontSizes=[],wordSpacings=[],minFontSizes=[],ratios=[];$children.css('float','left').each(function(){var $line=$(this),intervals=BigText.supports.wholeNumberFontSizeOnly?[8,4,1]:[8,4,1,0.1],lineMax,newFontSize;if($line.hasClass(BigText.EXEMPT_CLASS)){fontSizes.push(null);ratios.push(null);minFontSizes.push(false);return;} 864var autoGuessSubtraction=32,currentFontSize=parseFloat($line.css('font-size')),ratio=($line.width()/currentFontSize).toFixed(6);newFontSize=parseInt(maxWidth/ratio,10)-autoGuessSubtraction;outer:for(var m=0,n=intervals.length;m<n;m++){inner:for(var j=1,k=10;j<=k;j++){if(newFontSize+j*intervals[m]>maxFontSize){newFontSize=maxFontSize;break outer;} 865lineMax=BigText.testLineDimensions($line,maxWidth,'font-size',newFontSize+j*intervals[m],intervals[m],'px',lineMax);if(typeof lineMax!=='number'){newFontSize=lineMax.size;if(lineMax.match==='exact'){break outer;} 866break inner;}}} 867ratios.push(maxWidth/newFontSize);if(newFontSize>maxFontSize){fontSizes.push(maxFontSize);minFontSizes.push(false);}else if(!!minFontSize&&newFontSize<minFontSize){fontSizes.push(minFontSize);minFontSizes.push(true);}else{fontSizes.push(newFontSize);minFontSizes.push(false);}}).each(function(lineNumber){var $line=$(this),wordSpacing=0,interval=1,maxWordSpacing;if($line.hasClass(BigText.EXEMPT_CLASS)){wordSpacings.push(null);return;} 868$line.css('font-size',fontSizes[lineNumber]+'px');for(var m=1,n=3;m<n;m+=interval){maxWordSpacing=BigText.testLineDimensions($line,maxWidth,'word-spacing',m,interval,'px',maxWordSpacing);if(typeof maxWordSpacing!=='number'){wordSpacing=maxWordSpacing.size;break;}} 869$line.css('font-size','');wordSpacings.push(wordSpacing);}).removeAttr('style');if(!BigText.DEBUG_MODE){$c.remove();}else{$c.css({'background-color':'rgba(255,255,255,.4)'});}
vendor: 21,006 bytes, lines 870-967
870return{fontSizes:fontSizes,wordSpacings:wordSpacings,ratios:ratios,minFontSizes:minFontSizes};}};$.fn.bigtext=BigText.jQueryMethod;window.BigText=BigText;})(this,jQuery); 871/*! 872 * Isotope PACKAGED v3.0.6 873 * 874 * Licensed GPLv3 for open source use 875 * or Isotope Commercial License for commercial use 876 * 877 * https://isotope.metafizzy.co 878 * Copyright 2010-2018 Metafizzy 879 */ 880(function(window,factory){if(typeof define=='function'&&define.amd){define('jquery-bridget/jquery-bridget',['jquery'],function(jQuery){return factory(window,jQuery);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('jquery'));}else{window.jQueryBridget=factory(window,window.jQuery);}}(window,function factory(window,jQuery){'use strict';var arraySlice=Array.prototype.slice;var console=window.console;var logError=typeof console=='undefined'?function(){}:function(message){console.error(message);};function jQueryBridget(namespace,PluginClass,$){$=$||jQuery||window.jQuery;if(!$){return;} 881if(!PluginClass.prototype.option){PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts)){return;} 882this.options=$.extend(true,this.options,opts);};} 883$.fn[namespace]=function(arg0){if(typeof arg0=='string'){var args=arraySlice.call(arguments,1);return methodCall(this,arg0,args);} 884plainCall(this,arg0);return this;};function methodCall($elems,methodName,args){var returnValue;var pluginMethodStr='$().'+namespace+'("'+methodName+'")';$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(!instance){logError(namespace+' not initialized. Cannot call methods, i.e. '+ 885pluginMethodStr);return;} 886var method=instance[methodName];if(!method||methodName.charAt(0)=='_'){logError(pluginMethodStr+' is not a valid method');return;} 887var value=method.apply(instance,args);returnValue=returnValue===undefined?value:returnValue;});return returnValue!==undefined?returnValue:$elems;} 888function plainCall($elems,options){$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(instance){instance.option(options);instance._init();}else{instance=new PluginClass(elem,options);$.data(elem,namespace,instance);}});} 889updateJQuery($);} 890function updateJQuery($){if(!$||($&&$.bridget)){return;} 891$.bridget=jQueryBridget;} 892updateJQuery(jQuery||window.jQuery);return jQueryBridget;}));(function(global,factory){if(typeof define=='function'&&define.amd){define('ev-emitter/ev-emitter',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{global.EvEmitter=factory();}}(typeof window!='undefined'?window:this,function(){function EvEmitter(){} 893var proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener){return;} 894var events=this._events=this._events||{};var listeners=events[eventName]=events[eventName]||[];if(listeners.indexOf(listener)==-1){listeners.push(listener);} 895return this;};proto.once=function(eventName,listener){if(!eventName||!listener){return;} 896this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{};var onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};onceListeners[listener]=true;return this;};proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;} 897var index=listeners.indexOf(listener);if(index!=-1){listeners.splice(index,1);} 898return this;};proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;} 899listeners=listeners.slice(0);args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];for(var i=0;i<listeners.length;i++){var listener=listeners[i] 900var isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener];} 901listener.apply(this,args);} 902return this;};proto.allOff=function(){delete this._events;delete this._onceEvents;};return EvEmitter;})); 903/*! 904 * getSize v2.0.3 905 * measure size of elements 906 * MIT license 907 */ 908(function(window,factory){if(typeof define=='function'&&define.amd){define('get-size/get-size',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{window.getSize=factory();}})(window,function factory(){'use strict';function getStyleSize(value){var num=parseFloat(value);var isValid=value.indexOf('%')==-1&&!isNaN(num);return isValid&#} 909function noop(){} 910var logError=typeof console=='undefined'?noop:function(message){console.error(message);};var measurements=['paddingLeft','paddingRight','paddingTop','paddingBottom','marginLeft','marginRight','marginTop','marginBottom','borderLeftWidth','borderRightWidth','borderTopWidth','borderBottomWidth'];var measurementsLength=measurements.length;function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0;} 911return size;} 912function getStyle(elem){var style=getComputedStyle(elem);if(!style){logError('Style returned '+style+'. Are you running this code in a hidden iframe on Firefox? '+'See https://bit.ly/getsizebug1');} 913return style;} 914var isSetup=false;var isBoxSizeOuter;function setup(){if(isSetup){return;} 915isSetup=true;var div=document.createElement('div');div.style.width='200px';div.style.padding='1px 2px 3px 4px';div.style.borderStyle='solid';div.style.borderWidth='1px 2px 3px 4px';div.style.boxSizing='border-box';var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=Math.round(getStyleSize(style.width))==200;getSize.isBoxSizeOuter=isBoxSizeOuter;body.removeChild(div);} 916function getSize(elem){setup();if(typeof elem=='string'){elem=document.querySelector(elem);} 917if(!elem||typeof elem!='object'||!elem.nodeType){return;} 918var style=getStyle(elem);if(style.display=='none'){return getZeroSize();} 919var size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=style.boxSizing=='border-box';for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];var value=style[measurement];var num=parseFloat(value);size[measurement]=!isNaN(num)?num:0;} 920var paddingWidth=size.paddingLeft+size.paddingRight;var paddingHeight=size.paddingTop+size.paddingBottom;var marginWidth=size.marginLeft+size.marginRight;var marginHeight=size.marginTop+size.marginBottom;var borderWidth=size.borderLeftWidth+size.borderRightWidth;var borderHeight=size.borderTopWidth+size.borderBottomWidth;var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;var styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+ 921(isBorderBoxSizeOuter?0:paddingWidth+borderWidth);} 922var styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+ 923(isBorderBoxSizeOuter?0:paddingHeight+borderHeight);} 924size.innerWidth=size.width-(paddingWidth+borderWidth);size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size;} 925return getSize;});(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('desandro-matches-selector/matches-selector',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{window.matchesSelector=factory();}}(window,function factory(){'use strict';var matchesMethod=(function(){var ElemProto=window.Element.prototype;if(ElemProto.matches){return'matches';} 926if(ElemProto.matchesSelector){return'matchesSelector';} 927var prefixes=['webkit','moz','ms','o'];for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i];var method=prefix+'MatchesSelector';if(ElemProto[method]){return method;}}})();return function matchesSelector(elem,selector){return elem[matchesMethod](selector);};}));(function(window,factory){if(typeof define=='function'&&define.amd){define('fizzy-ui-utils/utils',['desandro-matches-selector/matches-selector'],function(matchesSelector){return factory(window,matchesSelector);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('desandro-matches-selector'));}else{window.fizzyUIUtils=factory(window,window.matchesSelector);}}(window,function factory(window,matchesSelector){var utils={};utils.extend=function(a,b){for(var prop in b){a[prop]=b[prop];} 928return a;};utils.modulo=function(num,div){return((num%div)+div)%div;};var arraySlice=Array.prototype.slice;utils.makeArray=function(obj){if(Array.isArray(obj)){return obj;} 929if(obj===null||obj===undefined){return[];} 930var isArrayLike=typeof obj=='object'&&typeof obj.length=='number';if(isArrayLike){return arraySlice.call(obj);} 931return[obj];};utils.removeFrom=function(ary,obj){var index=ary.indexOf(obj);if(index!=-1){ary.splice(index,1);}};utils.getParent=function(elem,selector){while(elem.parentNode&&elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector)){return elem;}}};utils.getQueryElement=function(elem){if(typeof elem=='string'){return document.querySelector(elem);} 932return elem;};utils.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];elems.forEach(function(elem){if(!(elem instanceof HTMLElement)&&!SiteParameters.is_frontend_editor){return;} 933if(!selector){ffElems.push(elem);return;} 934if(matchesSelector(elem,selector)){ffElems.push(elem);} 935var childElems=elem.querySelectorAll(selector);for(var i=0;i<childElems.length;i++){ffElems.push(childElems[i]);}});return ffElems;};utils.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;var method=_class.prototype[methodName];var timeoutName=methodName+'Timeout';_class.prototype[methodName]=function(){var timeout=this[timeoutName];clearTimeout(timeout);var args=arguments;var _this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args);delete _this[timeoutName];},threshold);};};utils.docReady=function(callback){var readyState=document.readyState;if(readyState=='complete'||readyState=='interactive'){setTimeout(callback);}else{document.addEventListener('DOMContentLoaded',callback);}};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+'-'+$2;}).toLowerCase();};var console=window.console;utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){var dashedNamespace=utils.toDashed(namespace);var dataAttr='data-'+dashedNamespace;var dataAttrElems=document.querySelectorAll('['+dataAttr+']');var jsDashElems=document.querySelectorAll('.js-'+dashedNamespace);var elems=utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems));var dataOptionsAttr=dataAttr+'-options';var jQuery=window.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr);var options;try{options=attr&&JSON.parse(attr);}catch(error){if(console){console.error('Error parsing '+dataAttr+' on '+elem.className+': '+error);} 936return;} 937var instance=new WidgetClass(elem,options);if(jQuery){jQuery.data(elem,namespace,instance);}});});};return utils;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('outlayer/item',['ev-emitter/ev-emitter','get-size/get-size'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('ev-emitter'),require('get-size'));}else{window.Outlayer={};window.Outlayer.Item=factory(window.EvEmitter,window.getSize);}}(window,function factory(EvEmitter,getSize){'use strict';function isEmptyObj(obj){for(var prop in obj){return false;} 938prop=null;return true;} 939var docElemStyle=document.documentElement.style;var transitionProperty=typeof docElemStyle.transition=='string'?'transition':'WebkitTransition';var transformProperty=typeof docElemStyle.transform=='string'?'transform':'WebkitTransform';var transitionEndEvent={WebkitTransition:'webkitTransitionEnd',transition:'transitionend'}[transitionProperty];var vendorProperties={transform:transformProperty,transition:transitionProperty,transitionDuration:transitionProperty+'Duration',transitionProperty:transitionProperty+'Property',transitionDelay:transitionProperty+'Delay'};function Item(element,layout){if(!element){return;} 940this.element=element;this.layout=layout;this.position={x:0,y:0};this._create();} 941var proto=Item.prototype=Object.create(EvEmitter.prototype);proto.constructor=Item;proto._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:'absolute'});};proto.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};proto.getSize=function(){this.size=getSize(this.element);};proto.css=function(style){var elemStyle=this.element.style;for(var prop in style){var supportedProp=vendorProperties[prop]||prop;elemStyle[supportedProp]=style[prop];}};proto.getPosition=function(){var style=getComputedStyle(this.element);var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');var xValue=style[isOriginLeft?'left':'right'];var yValue=style[isOriginTop?'top':'bottom'];var x=parseFloat(xValue);var y=parseFloat(yValue);var layoutSize=this.layout.size;if(xValue.indexOf('%')!=-1){x=(x/100)*layoutSize.width;} 942if(yValue.indexOf('%')!=-1){y=(y/100)*layoutSize.height;} 943x=isNaN(x)?0:x;y=isNaN(y)?0:y;x-=isOriginLeft?layoutSize.paddingLeft:layoutSize.paddingRight;y-=isOriginTop?layoutSize.paddingTop:layoutSize.paddingBottom;this.position.x=x;this.position.y=y;};proto.layoutPosition=function(){var layoutSize=this.layout.size;var style={};var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');var xPadding=isOriginLeft?'paddingLeft':'paddingRight';var xProperty=isOriginLeft?'left':'right';var xResetProperty=isOriginLeft?'right':'left';var x=this.position.x+layoutSize[xPadding];style[xProperty]=this.getXValue(x);style[xResetProperty]='';var yPadding=isOriginTop?'paddingTop':'paddingBottom';var yProperty=isOriginTop?'top':'bottom';var yResetProperty=isOriginTop?'bottom':'top';var y=this.position.y+layoutSize[yPadding];style[yProperty]=this.getYValue(y);style[yResetProperty]='';this.css(style);this.emitEvent('layout',[this]);};proto.getXValue=function(x){var isHorizontal=this.layout._getOption('horizontal');return this.layout.options.percentPosition&&!isHorizontal?((x/this.layout.size.width)*100)+'%':x+'px';};proto.getYValue=function(y){var isHorizontal=this.layout._getOption('horizontal');return this.layout.options.percentPosition&&isHorizontal?((y/this.layout.size.height)*100)+'%':y+'px';};proto._transitionTo=function(x,y){this.getPosition();var curX=this.position.x;var curY=this.position.y;var didNotMove=x==this.position.x&&y==this.position.y;this.setPosition(x,y);if(didNotMove&&!this.isTransitioning){this.layoutPosition();return;} 944var transX=x-curX;var transY=y-curY;var transitionStyle={};transitionStyle.transform=this.getTranslate(transX,transY);this.transition({to:transitionStyle,onTransitionEnd:{transform:this.layoutPosition},isCleaning:true});};proto.getTranslate=function(x,y){var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');x=isOriginLeft?x:-x;y=isOriginTop?y:-y;return'translate3d('+x+'px, '+y+'px, 0)';};proto.goTo=function(x,y){this.setPosition(x,y);this.layoutPosition();};proto.moveTo=proto._transitionTo;proto.setPosition=function(x,y){this.position.x=parseFloat(x);this.position.y=parseFloat(y);};proto._nonTransition=function(args){this.css(args.to);if(args.isCleaning){this._removeStyles(args.to);} 945for(var prop in args.onTransitionEnd){args.onTransitionEnd[prop].call(this);}};proto.transition=function(args){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(args);return;} 946var _transition=this._transn;for(var prop in args.onTransitionEnd){_transition.onEnd[prop]=args.onTransitionEnd[prop];} 947for(prop in args.to){_transition.ingProperties[prop]=true;if(args.isCleaning){_transition.clean[prop]=true;}} 948if(args.from){this.css(args.from);var h=this.element.offsetHeight;h=null;} 949this.enableTransition(args.to);this.css(args.to);this.isTransitioning=true;};function toDashedAll(str){return str.replace(/([A-Z])/g,function($1){return'-'+$1.toLowerCase();});} 950var transitionProps='opacity,'+toDashedAll(transformProperty);proto.enableTransition=function(){if(this.isTransitioning){return;} 951var duration=this.layout.options.transitionDuration;duration=typeof duration=='number'?duration+'ms':duration;this.css({transitionProperty:transitionProps,transitionDuration:duration,transitionDelay:this.staggerDelay||0});this.element.addEventListener(transitionEndEvent,this,false);};proto.onwebkitTransitionEnd=function(event){this.ontransitionend(event);};proto.onotransitionend=function(event){this.ontransitionend(event);};var dashedVendorProperties={'-webkit-transform':'transform'};proto.ontransitionend=function(event){if(event.target!==this.element){return;} 952var _transition=this._transn;var propertyName=dashedVendorProperties[event.propertyName]||event.propertyName;delete _transition.ingProperties[propertyName];if(isEmptyObj(_transition.ingProperties)){this.disableTransition();} 953if(propertyName in _transition.clean){this.element.style[event.propertyName]='';delete _transition.clean[propertyName];} 954if(propertyName in _transition.onEnd){var onTransitionEnd=_transition.onEnd[propertyName];onTransitionEnd.call(this);delete _transition.onEnd[propertyName];} 955this.emitEvent('transitionEnd',[this]);};proto.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(transitionEndEvent,this,false);this.isTransitioning=false;};proto._removeStyles=function(style){var cleanStyle={};for(var prop in style){cleanStyle[prop]='';} 956this.css(cleanStyle);};var cleanTransitionStyle={transitionProperty:'',transitionDuration:'',transitionDelay:''};proto.removeTransitionStyles=function(){this.css(cleanTransitionStyle);};proto.stagger=function(delay){delay=isNaN(delay)?0:delay;this.staggerDelay=delay+'ms';};proto.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:''});this.emitEvent('remove',[this]);};proto.remove=function(){if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return;} 957this.once('transitionEnd',function(){this.removeElem();});this.hide();};proto.reveal=function(){delete this.isHidden;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('visibleStyle');onTransitionEnd[transitionEndProperty]=this.onRevealTransitionEnd;this.transition({from:options.hiddenStyle,to:options.visibleStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};proto.onRevealTransitionEnd=function(){if(!this.isHidden){this.emitEvent('reveal');}};proto.getHideRevealTransitionEndProperty=function(styleProperty){var optionStyle=this.layout.options[styleProperty];if(optionStyle.opacity){return'opacity';} 958for(var prop in optionStyle){return prop;}};proto.hide=function(){this.isHidden=true;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('hiddenStyle');onTransitionEnd[transitionEndProperty]=this.onHideTransitionEnd;this.transition({from:options.visibleStyle,to:options.hiddenStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};proto.onHideTransitionEnd=function(){if(this.isHidden){this.css({display:'none'});this.emitEvent('hide');}};proto.destroy=function(){this.css({position:'',left:'',right:'',top:'',bottom:'',transition:'',transform:''});};return Item;})); 959/*! 960 * Outlayer v2.1.1 961 * the brains and guts of a layout library 962 * MIT license 963 */ 964(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('outlayer/outlayer',['ev-emitter/ev-emitter','get-size/get-size','fizzy-ui-utils/utils','./item'],function(EvEmitter,getSize,utils,Item){return factory(window,EvEmitter,getSize,utils,Item);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('ev-emitter'),require('get-size'),require('fizzy-ui-utils'),require('./item'));}else{window.Outlayer=factory(window,window.EvEmitter,window.getSize,window.fizzyUIUtils,window.Outlayer.Item);}}(window,function factory(window,EvEmitter,getSize,utils,Item){'use strict';var console=window.console;var jQuery=window.jQuery;var noop=function(){};var GUID=0;var instances={};function Outlayer(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){if(console){console.error('Bad element for '+this.constructor.namespace+': '+(queryElement||element));} 965return;} 966this.element=queryElement;if(jQuery){this.$element=jQuery(this.element);} 967this.options=utils.extend({},this.constructor.defaults);this.option(options);var id=++GUID;this.element.outlayerGUID=id;instances[id]=this;this._create();var isInitLayout=this._getOption('initLayout');if(isInitLayout){this.layout();}}
vendor: 7,962 bytes, lines 967-991
967 968Outlayer.namespace='outlayer';Outlayer.Item=Item;Outlayer.defaults={containerStyle:{position:'relative'},initLayout:true,originLeft:true,originTop:true,resize:true,resizeContainer:true,transitionDuration:'0.4s',hiddenStyle:{opacity:0,transform:'scale(0.001)'},visibleStyle:{opacity:1,transform:'scale(1)'}};var proto=Outlayer.prototype;utils.extend(proto,EvEmitter.prototype);proto.option=function(opts){utils.extend(this.options,opts);};proto._getOption=function(option){var oldOption=this.constructor.compatOptions[option];return oldOption&&this.options[oldOption]!==undefined?this.options[oldOption]:this.options[option];};Outlayer.compatOptions={initLayout:'isInitLayout',horizontal:'isHorizontal',layoutInstant:'isLayoutInstant',originLeft:'isOriginLeft',originTop:'isOriginTop',resize:'isResizeBound',resizeContainer:'isResizingContainer'};proto._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);utils.extend(this.element.style,this.options.containerStyle);var canBindResize=this._getOption('resize');if(canBindResize){this.bindResize();}};proto.reloadItems=function(){this.items=this._itemize(this.element.children);};proto._itemize=function(elems){var itemElems=this._filterFindItemElements(elems);var Item=this.constructor.Item;var items=[];for(var i=0;i<itemElems.length;i++){var elem=itemElems[i];var item=new Item(elem,this);items.push(item);} 969return items;};proto._filterFindItemElements=function(elems){return utils.filterFindElements(elems,this.options.itemSelector);};proto.getItemElements=function(){return this.items.map(function(item){return item.element;});};proto.layout=function(){this._resetLayout();this._manageStamps();var layoutInstant=this._getOption('layoutInstant');var isInstant=layoutInstant!==undefined?layoutInstant:!this._isLayoutInited;this.layoutItems(this.items,isInstant);this._isLayoutInited=true;};proto._init=proto.layout;proto._resetLayout=function(){this.getSize();};proto.getSize=function(){this.size=getSize(this.element);};proto._getMeasurement=function(measurement,size){var option=this.options[measurement];var elem;if(!option){this[measurement]=0;}else{if(typeof option=='string'){elem=this.element.querySelector(option);}else if(option instanceof HTMLElement){elem=option;} 970this[measurement]=elem?getSize(elem)[size]:option;}};proto.layoutItems=function(items,isInstant){items=this._getItemsForLayout(items);this._layoutItems(items,isInstant);this._postLayout();};proto._getItemsForLayout=function(items){return items.filter(function(item){return!item.isIgnored;});};proto._layoutItems=function(items,isInstant){this._emitCompleteOnItems('layout',items);if(!items||!items.length){return;} 971var queue=[];items.forEach(function(item){var position=this._getItemLayoutPosition(item);position.item=item;position.isInstant=isInstant||item.isLayoutInstant;queue.push(position);},this);this._processLayoutQueue(queue);};proto._getItemLayoutPosition=function(){return{x:0,y:0};};proto._processLayoutQueue=function(queue){this.updateStagger();queue.forEach(function(obj,i){this._positionItem(obj.item,obj.x,obj.y,obj.isInstant,i);},this);};proto.updateStagger=function(){var stagger=this.options.stagger;if(stagger===null||stagger===undefined){this.stagger=0;return;} 972this.stagger=getMilliseconds(stagger);return this.stagger;};proto._positionItem=function(item,x,y,isInstant,i){if(isInstant){item.goTo(x,y);}else{item.stagger(i*this.stagger);item.moveTo(x,y);}};proto._postLayout=function(){this.resizeContainer();};proto.resizeContainer=function(){var isResizingContainer=this._getOption('resizeContainer');if(!isResizingContainer){return;} 973var size=this._getContainerSize();if(size){this._setContainerMeasure(size.width,true);this._setContainerMeasure(size.height,false);}};proto._getContainerSize=noop;proto._setContainerMeasure=function(measure,isWidth){if(measure===undefined){return;} 974var elemSize=this.size;if(elemSize.isBorderBox){measure+=isWidth?elemSize.paddingLeft+elemSize.paddingRight+ 975elemSize.borderLeftWidth+elemSize.borderRightWidth:elemSize.paddingBottom+elemSize.paddingTop+ 976elemSize.borderTopWidth+elemSize.borderBottomWidth;} 977measure=Math.max(measure,0);this.element.style[isWidth?'width':'height']=measure+'px';};proto._emitCompleteOnItems=function(eventName,items){var _this=this;function onComplete(){_this.dispatchEvent(eventName+'Complete',null,[items]);} 978var count=items.length;if(!items||!count){onComplete();return;} 979var doneCount=0;function tick(){doneCount++;if(doneCount==count){onComplete();}} 980items.forEach(function(item){item.once(eventName,tick);});};proto.dispatchEvent=function(type,event,args){var emitArgs=event?[event].concat(args):args;this.emitEvent(type,emitArgs);if(jQuery){this.$element=this.$element||jQuery(this.element);if(event){var $event=jQuery.Event(event);$event.type=type;this.$element.trigger($event,args);}else{this.$element.trigger(type,args);}}};proto.ignore=function(elem){var item=this.getItem(elem);if(item){item.isIgnored=true;}};proto.unignore=function(elem){var item=this.getItem(elem);if(item){delete item.isIgnored;}};proto.stamp=function(elems){elems=this._find(elems);if(!elems){return;} 981this.stamps=this.stamps.concat(elems);elems.forEach(this.ignore,this);};proto.unstamp=function(elems){elems=this._find(elems);if(!elems){return;} 982elems.forEach(function(elem){utils.removeFrom(this.stamps,elem);this.unignore(elem);},this);};proto._find=function(elems){if(!elems){return;} 983if(typeof elems=='string'){elems=this.element.querySelectorAll(elems);} 984elems=utils.makeArray(elems);return elems;};proto._manageStamps=function(){if(!this.stamps||!this.stamps.length){return;} 985this._getBoundingRect();this.stamps.forEach(this._manageStamp,this);};proto._getBoundingRect=function(){var boundingRect=this.element.getBoundingClientRect();var size=this.size;this._boundingRect={left:boundingRect.left+size.paddingLeft+size.borderLeftWidth,top:boundingRect.top+size.paddingTop+size.borderTopWidth,right:boundingRect.right-(size.paddingRight+size.borderRightWidth),bottom:boundingRect.bottom-(size.paddingBottom+size.borderBottomWidth)};};proto._manageStamp=noop;proto._getElementOffset=function(elem){var boundingRect=elem.getBoundingClientRect();var thisRect=this._boundingRect;var size=getSize(elem);var offset={left:boundingRect.left-thisRect.left-size.marginLeft,top:boundingRect.top-thisRect.top-size.marginTop,right:thisRect.right-boundingRect.right-size.marginRight,bottom:thisRect.bottom-boundingRect.bottom-size.marginBottom};return offset;};proto.handleEvent=utils.handleEvent;proto.bindResize=function(){window.addEventListener('resize',this);this.isResizeBound=true;};proto.unbindResize=function(){window.removeEventListener('resize',this);this.isResizeBound=false;};proto.onresize=function(){this.resize();};utils.debounceMethod(Outlayer,'onresize',100);proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return;} 986this.layout();};proto.needsResizeLayout=function(){var size=getSize(this.element);var hasSizes=this.size&&size;return hasSizes&&size.innerWidth!==this.size.innerWidth;};proto.addItems=function(elems){var items=this._itemize(elems);if(items.length){this.items=this.items.concat(items);} 987return items;};proto.appended=function(elems){var items=this.addItems(elems);if(!items.length){return;} 988this.layoutItems(items,true);this.reveal(items);};proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return;} 989var previousItems=this.items.slice(0);this.items=items.concat(previousItems);this._resetLayout();this._manageStamps();this.layoutItems(items,true);this.reveal(items);this.layoutItems(previousItems);};proto.reveal=function(items){this._emitCompleteOnItems('reveal',items);if(!items||!items.length){return;} 990var stagger=this.updateStagger();items.forEach(function(item,i){item.stagger(i*stagger);item.reveal();});};proto.hide=function(items){this._emitCompleteOnItems('hide',items);if(!items||!items.length){return;} 991var stagger=this.updateStagger();
vendor: 22,936 bytes, lines 991-1075
991items.forEach(function(item,i){item.stagger(i*stagger);item.hide();});};proto.revealItemElements=function(elems){var items=this.getItems(elems);this.reveal(items);};proto.hideItemElements=function(elems){var items=this.getItems(elems);this.hide(items);};proto.getItem=function(elem){for(var i=0;i<this.items.length;i++){var item=this.items[i];if(item.element==elem){return item;}}};proto.getItems=function(elems){elems=utils.makeArray(elems);var items=[];elems.forEach(function(elem){var item=this.getItem(elem);if(item){items.push(item);}},this);return items;};proto.remove=function(elems){var removeItems=this.getItems(elems);this._emitCompleteOnItems('remove',removeItems);if(!removeItems||!removeItems.length){return;} 992removeItems.forEach(function(item){item.remove();utils.removeFrom(this.items,item);},this);};proto.destroy=function(){var style=this.element.style;style.height='';style.position='';style.width='';this.items.forEach(function(item){item.destroy();});this.unbindResize();var id=this.element.outlayerGUID;delete instances[id];delete this.element.outlayerGUID;if(jQuery){jQuery.removeData(this.element,this.constructor.namespace);}};Outlayer.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.outlayerGUID;return id&&instances[id];};Outlayer.create=function(namespace,options){var Layout=subclass(Outlayer);Layout.defaults=utils.extend({},Outlayer.defaults);utils.extend(Layout.defaults,options);Layout.compatOptions=utils.extend({},Outlayer.compatOptions);Layout.namespace=namespace;Layout.data=Outlayer.data;Layout.Item=subclass(Item);utils.htmlInit(Layout,namespace);if(jQuery&&jQuery.bridget){jQuery.bridget(namespace,Layout);} 993return Layout;};function subclass(Parent){function SubClass(){Parent.apply(this,arguments);} 994SubClass.prototype=Object.create(Parent.prototype);SubClass.prototype.constructor=SubClass;return SubClass;} 995var msUnits={ms:1,s:1000};function getMilliseconds(time){if(typeof time=='number'){return time;} 996var matches=time.match(/(^\d*\.?\d*)(\w*)/);var num=matches&&matches[1];var unit=matches&&matches[2];if(!num.length){return 0;} 997num=parseFloat(num);var mult=msUnits[unit]||1;return num*mult;} 998Outlayer.Item=Item;return Outlayer;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('isotope-layout/js/item',['outlayer/outlayer'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('outlayer'));}else{window.Isotope=window.Isotope||{};window.Isotope.Item=factory(window.Outlayer);}}(window,function factory(Outlayer){'use strict';function Item(){Outlayer.Item.apply(this,arguments);} 999var proto=Item.prototype=Object.create(Outlayer.Item.prototype);var _create=proto._create;proto._create=function(){this.id=this.layout.itemGUID++;_create.call(this);this.sortData={};};proto.updateSortData=function(){if(this.isIgnored){return;} 1000this.sortData.id=this.id;this.sortData['original-order']=this.id;this.sortData.random=Math.random();var getSortData=this.layout.options.getSortData;var sorters=this.layout._sorters;for(var key in getSortData){var sorter=sorters[key];this.sortData[key]=sorter(this.element,this);}};var _destroy=proto.destroy;proto.destroy=function(){_destroy.apply(this,arguments);this.css({display:''});};return Item;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('isotope-layout/js/layout-mode',['get-size/get-size','outlayer/outlayer'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('get-size'),require('outlayer'));}else{window.Isotope=window.Isotope||{};window.Isotope.LayoutMode=factory(window.getSize,window.Outlayer);}}(window,function factory(getSize,Outlayer){'use strict';function LayoutMode(isotope){this.isotope=isotope;if(isotope){this.options=isotope.options[this.namespace];this.element=isotope.element;this.items=isotope.filteredItems;this.size=isotope.size;}} 1001var proto=LayoutMode.prototype;var facadeMethods=['_resetLayout','_getItemLayoutPosition','_manageStamp','_getContainerSize','_getElementOffset','needsResizeLayout','_getOption'];facadeMethods.forEach(function(methodName){proto[methodName]=function(){return Outlayer.prototype[methodName].apply(this.isotope,arguments);};});proto.needsVerticalResizeLayout=function(){var size=getSize(this.isotope.element);var hasSizes=this.isotope.size&&size;return hasSizes&&size.innerHeight!=this.isotope.size.innerHeight;};proto._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments);};proto.getColumnWidth=function(){this.getSegmentSize('column','Width');};proto.getRowHeight=function(){this.getSegmentSize('row','Height');};proto.getSegmentSize=function(segment,size){var segmentName=segment+size;var outerSize='outer'+size;this._getMeasurement(segmentName,outerSize);if(this[segmentName]){return;} 1002var firstItemSize=this.getFirstItemSize();this[segmentName]=firstItemSize&&firstItemSize[outerSize]||this.isotope.size['inner'+size];};proto.getFirstItemSize=function(){var firstItem=this.isotope.filteredItems[0];return firstItem&&firstItem.element&&getSize(firstItem.element);};proto.layout=function(){this.isotope.layout.apply(this.isotope,arguments);};proto.getSize=function(){this.isotope.getSize();this.size=this.isotope.size;};LayoutMode.modes={};LayoutMode.create=function(namespace,options){function Mode(){LayoutMode.apply(this,arguments);} 1003Mode.prototype=Object.create(proto);Mode.prototype.constructor=Mode;if(options){Mode.options=options;} 1004Mode.prototype.namespace=namespace;LayoutMode.modes[namespace]=Mode;return Mode;};return LayoutMode;})); 1005/*! 1006 * Masonry v4.2.1 1007 * Cascading grid layout library 1008 * https://masonry.desandro.com 1009 * MIT License 1010 * by David DeSandro 1011 */ 1012(function(window,factory){if(typeof define=='function'&&define.amd){define('masonry-layout/masonry',['outlayer/outlayer','get-size/get-size'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('outlayer'),require('get-size'));}else{window.Masonry=factory(window.Outlayer,window.getSize);}}(window,function factory(Outlayer,getSize){var Masonry=Outlayer.create('masonry');Masonry.compatOptions.fitWidth='isFitWidth';var proto=Masonry.prototype;proto._resetLayout=function(){this.getSize();this._getMeasurement('columnWidth','outerWidth');this._getMeasurement('gutter','outerWidth');this.measureColumns();this.colYs=[];for(var i=0;i<this.cols;i++){this.colYs.push(0);} 1013this.maxY=0;this.horizontalColIndex=0;};proto.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var firstItem=this.items[0];var firstItemElem=firstItem&&firstItem.element;this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth||this.containerWidth;} 1014var columnWidth=this.columnWidth+=this.gutter;var containerWidth=this.containerWidth+this.gutter;var cols=containerWidth/columnWidth;var excess=columnWidth-containerWidth%columnWidth;var mathMethod=excess&&excess<1?'round':'floor';cols=Math[mathMethod](cols);this.cols=Math.max(cols,1);};proto.getContainerWidth=function(){var isFitWidth=this._getOption('fitWidth');var container=isFitWidth?this.element.parentNode:this.element;var size=getSize(container);this.containerWidth=size&&size.innerWidth;};proto._getItemLayoutPosition=function(item){item.getSize();var remainder=item.size.outerWidth%this.columnWidth;var mathMethod=remainder&&remainder<1?'round':'ceil';var colSpan=Math[mathMethod](item.size.outerWidth/this.columnWidth);colSpan=Math.min(colSpan,this.cols);var colPosMethod=this.options.horizontalOrder?'_getHorizontalColPosition':'_getTopColPosition';var colPosition=this[colPosMethod](colSpan,item);var position={x:this.columnWidth*colPosition.col,y:colPosition.y};var setHeight=colPosition.y+item.size.outerHeight;var setMax=colSpan+colPosition.col;for(var i=colPosition.col;i<setMax;i++){this.colYs[i]=setHeight;} 1015return position;};proto._getTopColPosition=function(colSpan){var colGroup=this._getTopColGroup(colSpan);var minimumY=Math.min.apply(Math,colGroup);return{col:colGroup.indexOf(minimumY),y:minimumY,};};proto._getTopColGroup=function(colSpan){if(colSpan<2){return this.colYs;} 1016var colGroup=[];var groupCount=this.cols+1-colSpan;for(var i=0;i<groupCount;i++){colGroup[i]=this._getColGroupY(i,colSpan);} 1017return colGroup;};proto._getColGroupY=function(col,colSpan){if(colSpan<2){return this.colYs[col];} 1018var groupColYs=this.colYs.slice(col,col+colSpan);return Math.max.apply(Math,groupColYs);};proto._getHorizontalColPosition=function(colSpan,item){var col=this.horizontalColIndex%this.cols;var isOver=colSpan>1&&col+colSpan>this.cols;col=isOver?0:col;var hasSize=item.size.outerWidth&&item.size.outerHeight;this.horizontalColIndex=hasSize?col+colSpan:this.horizontalColIndex;return{col:col,y:this._getColGroupY(col,colSpan),};};proto._manageStamp=function(stamp){var stampSize=getSize(stamp);var offset=this._getElementOffset(stamp);var isOriginLeft=this._getOption('originLeft');var firstX=isOriginLeft?offset.left:offset.right;var lastX=firstX+stampSize.outerWidth;var firstCol=Math.floor(firstX/this.columnWidth);firstCol=Math.max(0,firstCol);var lastCol=Math.floor(lastX/this.columnWidth);lastCol-=lastX%this.columnWidth?0:1;lastCol=Math.min(this.cols-1,lastCol);var isOriginTop=this._getOption('originTop');var stampMaxY=(isOriginTop?offset.top:offset.bottom)+ 1019stampSize.outerHeight;for(var i=firstCol;i<=lastCol;i++){this.colYs[i]=Math.max(stampMaxY,this.colYs[i]);}};proto._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var size={height:this.maxY};if(this._getOption('fitWidth')){size.width=this._getContainerFitWidth();} 1020return size;};proto._getContainerFitWidth=function(){var unusedCols=0;var i=this.cols;while(--i){if(this.colYs[i]!==0){break;} 1021unusedCols++;} 1022return(this.cols-unusedCols)*this.columnWidth-this.gutter;};proto.needsResizeLayout=function(){var previousWidth=this.containerWidth;this.getContainerWidth();return previousWidth!=this.containerWidth;};return Masonry;})); 1023/*! 1024 * Masonry layout mode 1025 * sub-classes Masonry 1026 * https://masonry.desandro.com 1027 */ 1028(function(window,factory){if(typeof define=='function'&&define.amd){define('isotope-layout/js/layout-modes/masonry',['../layout-mode','masonry-layout/masonry'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('../layout-mode'),require('masonry-layout'));}else{factory(window.Isotope.LayoutMode,window.Masonry);}}(window,function factory(LayoutMode,Masonry){'use strict';var MasonryMode=LayoutMode.create('masonry');var proto=MasonryMode.prototype;var keepModeMethods={_getElementOffset:true,layout:true,_getMeasurement:true};for(var method in Masonry.prototype){if(!keepModeMethods[method]){proto[method]=Masonry.prototype[method];}} 1029var measureColumns=proto.measureColumns;proto.measureColumns=function(){this.items=this.isotope.filteredItems;measureColumns.call(this);};var _getOption=proto._getOption;proto._getOption=function(option){if(option=='fitWidth'){return this.options.isFitWidth!==undefined?this.options.isFitWidth:this.options.fitWidth;} 1030return _getOption.apply(this.isotope,arguments);};return MasonryMode;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('isotope-layout/js/layout-modes/fit-rows',['../layout-mode'],factory);}else if(typeof exports=='object'){module.exports=factory(require('../layout-mode'));}else{factory(window.Isotope.LayoutMode);}}(window,function factory(LayoutMode){'use strict';var FitRows=LayoutMode.create('fitRows');var proto=FitRows.prototype;proto._resetLayout=function(){this.x=0;this.y=0;this.maxY=0;this._getMeasurement('gutter','outerWidth');};proto._getItemLayoutPosition=function(item){item.getSize();var itemWidth=item.size.outerWidth+this.gutter;var containerWidth=this.isotope.size.innerWidth+this.gutter;if(this.x!==0&&itemWidth+this.x>containerWidth){this.x=0;this.y=this.maxY;} 1031var position={x:this.x,y:this.y};this.maxY=Math.max(this.maxY,this.y+item.size.outerHeight);this.x+=itemWidth;return position;};proto._getContainerSize=function(){return{height:this.maxY};};return FitRows;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('isotope-layout/js/layout-modes/vertical',['../layout-mode'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('../layout-mode'));}else{factory(window.Isotope.LayoutMode);}}(window,function factory(LayoutMode){'use strict';var Vertical=LayoutMode.create('vertical',{horizontalAlignment:0});var proto=Vertical.prototype;proto._resetLayout=function(){this.y=0;};proto._getItemLayoutPosition=function(item){item.getSize();var x=(this.isotope.size.innerWidth-item.size.outerWidth)*this.options.horizontalAlignment;var y=this.y;this.y+=item.size.outerHeight;return{x:x,y:y};};proto._getContainerSize=function(){return{height:this.y};};return Vertical;})); 1032/*! 1033 * Isotope v3.0.6 1034 * 1035 * Licensed GPLv3 for open source use 1036 * or Isotope Commercial License for commercial use 1037 * 1038 * https://isotope.metafizzy.co 1039 * Copyright 2010-2018 Metafizzy 1040 */ 1041(function(window,factory){if(typeof define=='function'&&define.amd){define(['outlayer/outlayer','get-size/get-size','desandro-matches-selector/matches-selector','fizzy-ui-utils/utils','isotope-layout/js/item','isotope-layout/js/layout-mode','isotope-layout/js/layout-modes/masonry','isotope-layout/js/layout-modes/fit-rows','isotope-layout/js/layout-modes/vertical'],function(Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){return factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('outlayer'),require('get-size'),require('desandro-matches-selector'),require('fizzy-ui-utils'),require('isotope-layout/js/item'),require('isotope-layout/js/layout-mode'),require('isotope-layout/js/layout-modes/masonry'),require('isotope-layout/js/layout-modes/fit-rows'),require('isotope-layout/js/layout-modes/vertical'));}else{window.Isotope=factory(window,window.Outlayer,window.getSize,window.matchesSelector,window.fizzyUIUtils,window.Isotope.Item,window.Isotope.LayoutMode);}}(window,function factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){var jQuery=window.jQuery;var trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s+|\s+$/g,'');};var Isotope=Outlayer.create('isotope',{layoutMode:'masonry',isJQueryFiltering:true,sortAscending:true});Isotope.Item=Item;Isotope.LayoutMode=LayoutMode;var proto=Isotope.prototype;proto._create=function(){this.itemGUID=0;this._sorters={};this._getSorters();Outlayer.prototype._create.call(this);this.modes={};this.filteredItems=this.items;this.sortHistory=['original-order'];for(var name in LayoutMode.modes){this._initLayoutMode(name);}};proto.reloadItems=function(){this.itemGUID=0;Outlayer.prototype.reloadItems.call(this);};proto._itemize=function(){var items=Outlayer.prototype._itemize.apply(this,arguments);for(var i=0;i<items.length;i++){var item=items[i];item.id=this.itemGUID++;} 1042this._updateItemsSortData(items);return items;};proto._initLayoutMode=function(name){var Mode=LayoutMode.modes[name];var initialOpts=this.options[name]||{};this.options[name]=Mode.options?utils.extend(Mode.options,initialOpts):initialOpts;this.modes[name]=new Mode(this);};proto.layout=function(){if(!this._isLayoutInited&&this._getOption('initLayout')){this.arrange();return;} 1043this._layout();};proto._layout=function(){var isInstant=this._getIsInstant();this._resetLayout();this._manageStamps();this.layoutItems(this.filteredItems,isInstant);this._isLayoutInited=true;};proto.arrange=function(opts){this.option(opts);this._getIsInstant();var filtered=this._filter(this.items);this.filteredItems=filtered.matches;this._bindArrangeComplete();if(this._isInstant){this._noTransition(this._hideReveal,[filtered]);}else{this._hideReveal(filtered);} 1044this._sort();this._layout();};proto._init=proto.arrange;proto._hideReveal=function(filtered){this.reveal(filtered.needReveal);this.hide(filtered.needHide);};proto._getIsInstant=function(){var isLayoutInstant=this._getOption('layoutInstant');var isInstant=isLayoutInstant!==undefined?isLayoutInstant:!this._isLayoutInited;this._isInstant=isInstant;return isInstant;};proto._bindArrangeComplete=function(){var isLayoutComplete,isHideComplete,isRevealComplete;var _this=this;function arrangeParallelCallback(){if(isLayoutComplete&&isHideComplete&&isRevealComplete){_this.dispatchEvent('arrangeComplete',null,[_this.filteredItems]);}} 1045this.once('layoutComplete',function(){isLayoutComplete=true;arrangeParallelCallback();});this.once('hideComplete',function(){isHideComplete=true;arrangeParallelCallback();});this.once('revealComplete',function(){isRevealComplete=true;arrangeParallelCallback();});};proto._filter=function(items){var filter=this.options.filter;filter=filter||'*';var matches=[];var hiddenMatched=[];var visibleUnmatched=[];var test=this._getFilterTest(filter);for(var i=0;i<items.length;i++){var item=items[i];if(item.isIgnored){continue;} 1046var isMatched=test(item);if(isMatched){matches.push(item);} 1047if(isMatched&&item.isHidden){hiddenMatched.push(item);}else if(!isMatched&&!item.isHidden){visibleUnmatched.push(item);}} 1048return{matches:matches,needReveal:hiddenMatched,needHide:visibleUnmatched};};proto._getFilterTest=function(filter){if(jQuery&&this.options.isJQueryFiltering){return function(item){return jQuery(item.element).is(filter);};} 1049if(typeof filter=='function'){return function(item){return filter(item.element);};} 1050return function(item){return matchesSelector(item.element,filter);};};proto.updateSortData=function(elems){var items;if(elems){elems=utils.makeArray(elems);items=this.getItems(elems);}else{items=this.items;} 1051this._getSorters();this._updateItemsSortData(items);};proto._getSorters=function(){var getSortData=this.options.getSortData;for(var key in getSortData){var sorter=getSortData[key];this._sorters[key]=mungeSorter(sorter);}};proto._updateItemsSortData=function(items){var len=items&&items.length;for(var i=0;len&&i<len;i++){var item=items[i];item.updateSortData();}};var mungeSorter=(function(){function mungeSorter(sorter){if(typeof sorter!='string'){return sorter;} 1052var args=trim(sorter).split(' ');var query=args[0];var attrMatch=query.match(/^\[(.+)\]$/);var attr=attrMatch&&attrMatch[1];var getValue=getValueGetter(attr,query);var parser=Isotope.sortDataParsers[args[1]];sorter=parser?function(elem){return elem&&parser(getValue(elem));}:function(elem){return elem&&getValue(elem);};return sorter;} 1053function getValueGetter(attr,query){if(attr){return function getAttribute(elem){return elem.getAttribute(attr);};} 1054return function getChildText(elem){var child=elem.querySelector(query);return child&&child.textContent;};} 1055return mungeSorter;})();Isotope.sortDataParsers={'parseInt':function(val){return parseInt(val,10);},'parseFloat':function(val){return parseFloat(val);}};proto._sort=function(){if(!this.options.sortBy){return;} 1056var sortBys=utils.makeArray(this.options.sortBy);if(!this._getIsSameSortBy(sortBys)){this.sortHistory=sortBys.concat(this.sortHistory);} 1057var itemSorter=getItemSorter(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(itemSorter);};proto._getIsSameSortBy=function(sortBys){for(var i=0;i<sortBys.length;i++){if(sortBys[i]!=this.sortHistory[i]){return false;}} 1058return true;};function getItemSorter(sortBys,sortAsc){return function sorter(itemA,itemB){for(var i=0;i<sortBys.length;i++){var sortBy=sortBys[i];var a=itemA.sortData[sortBy];var b=itemB.sortData[sortBy];if(a>b||a<b){var isAscending=sortAsc[sortBy]!==undefined?sortAsc[sortBy]:sortAsc;var direction=isAscending?1:-1;return(a>b?1:-1)*direction;}} 1059return 0;};} 1060proto._mode=function(){var layoutMode=this.options.layoutMode;var mode=this.modes[layoutMode];if(!mode){throw new Error('No layout mode: '+layoutMode);} 1061mode.options=this.options[layoutMode];return mode;};proto._resetLayout=function(){Outlayer.prototype._resetLayout.call(this);this._mode()._resetLayout();};proto._getItemLayoutPosition=function(item){return this._mode()._getItemLayoutPosition(item);};proto._manageStamp=function(stamp){this._mode()._manageStamp(stamp);};proto._getContainerSize=function(){return this._mode()._getContainerSize();};proto.needsResizeLayout=function(){return this._mode().needsResizeLayout();};proto.appended=function(elems){var items=this.addItems(elems);if(!items.length){return;} 1062var filteredItems=this._filterRevealAdded(items);this.filteredItems=this.filteredItems.concat(filteredItems);};proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return;} 1063this._resetLayout();this._manageStamps();var filteredItems=this._filterRevealAdded(items);this.layoutItems(this.filteredItems);this.filteredItems=filteredItems.concat(this.filteredItems);this.items=items.concat(this.items);};proto._filterRevealAdded=function(items){var filtered=this._filter(items);this.hide(filtered.needHide);this.reveal(filtered.matches);this.layoutItems(filtered.matches,true);return filtered.matches;};proto.insert=function(elems){var items=this.addItems(elems);if(!items.length){return;} 1064var i,item;var len=items.length;for(i=0;i<len;i++){item=items[i];this.element.appendChild(item.element);} 1065var filteredInsertItems=this._filter(items).matches;for(i=0;i<len;i++){items[i].isLayoutInstant=true;} 1066this.arrange();for(i=0;i<len;i++){delete items[i].isLayoutInstant;} 1067this.reveal(filteredInsertItems);};var _remove=proto.remove;proto.remove=function(elems){elems=utils.makeArray(elems);var removeItems=this.getItems(elems);_remove.call(this,elems);var len=removeItems&&removeItems.length;for(var i=0;len&&i<len;i++){var item=removeItems[i];utils.removeFrom(this.filteredItems,item);}};proto.shuffle=function(){for(var i=0;i<this.items.length;i++){var item=this.items[i];item.sortData.random=Math.random();} 1068this.options.sortBy='random';this._sort();this._layout();};proto._noTransition=function(fn,args){var transitionDuration=this.options.transitionDuration;this.options.transitionDuration=0;var returnValue=fn.apply(this,args);this.options.transitionDuration=transitionDuration;return returnValue;};proto.getFilteredItemElements=function(){return this.filteredItems.map(function(item){return item.element;});};return Isotope;})); 1069/*! 1070 * Packery layout mode PACKAGED v2.0.1 1071 * sub-classes Packery 1072 */ 1073(function(window,factory){if(typeof define=='function'&&define.amd){define('packery/js/rect',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{window.Packery=window.Packery||{};window.Packery.Rect=factory();}}(window,function factory(){function Rect(props){for(var prop in Rect.defaults){this[prop]=Rect.defaults[prop];} 1074for(prop in props){this[prop]=props[prop];}} 1075Rect.defaults={x:0,y:0,width:0,height:0};var proto=Rect.prototype;proto.contains=function(rect){var otherWidth=rect.width||0;var otherHeight=rect.height||0;return this.x<=rect.x&&this.y<=rect.y&&this.x+this.width>=rect.x+otherWidth&&this.y+this.height>
vendor: 13,549 bytes, lines 1075-1119
1075=rect.y+otherHeight;};proto.overlaps=function(rect){var thisRight=this.x+this.width;var thisBottom=this.y+this.height;var rectRight=rect.x+rect.width;var rectBottom=rect.y+rect.height;return this.x<rectRight&&thisRight>rect.x&&this.y<rectBottom&&thisBottom>rect.y;};proto.getMaximalFreeRects=function(rect){if(!this.overlaps(rect)){return false;} 1076var freeRects=[];var freeRect;var thisRight=this.x+this.width;var thisBottom=this.y+this.height;var rectRight=rect.x+rect.width;var rectBottom=rect.y+rect.height;if(this.y<rect.y){freeRect=new Rect({x:this.x,y:this.y,width:this.width,height:rect.y-this.y});freeRects.push(freeRect);} 1077if(thisRight>rectRight){freeRect=new Rect({x:rectRight,y:this.y,width:thisRight-rectRight,height:this.height});freeRects.push(freeRect);} 1078if(thisBottom>rectBottom){freeRect=new Rect({x:this.x,y:rectBottom,width:this.width,height:thisBottom-rectBottom});freeRects.push(freeRect);} 1079if(this.x<rect.x){freeRect=new Rect({x:this.x,y:this.y,width:rect.x-this.x,height:this.height});freeRects.push(freeRect);} 1080return freeRects;};proto.canFit=function(rect){return this.width>=rect.width&&this.height>=rect.height;};return Rect;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('packery/js/packer',['./rect'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('./rect'));}else{var Packery=window.Packery=window.Packery||{};Packery.Packer=factory(Packery.Rect);}}(window,function factory(Rect){function Packer(width,height,sortDirection){this.width=width||0;this.height=height||0;this.sortDirection=sortDirection||'downwardLeftToRight';this.reset();} 1081var proto=Packer.prototype;proto.reset=function(){this.spaces=[];var initialSpace=new Rect({x:0,y:0,width:this.width,height:this.height});this.spaces.push(initialSpace);this.sorter=sorters[this.sortDirection]||sorters.downwardLeftToRight;};proto.pack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i];if(space.canFit(rect)){this.placeInSpace(rect,space);break;}}};proto.columnPack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i];var canFitInSpaceColumn=space.x<=rect.x&&space.x+space.width>=rect.x+rect.width&&space.height>=rect.height-0.01;if(canFitInSpaceColumn){rect.y=space.y;this.placed(rect);break;}}};proto.rowPack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i];var canFitInSpaceRow=space.y<=rect.y&&space.y+space.height>=rect.y+rect.height&&space.width>=rect.width-0.01;if(canFitInSpaceRow){rect.x=space.x;this.placed(rect);break;}}};proto.placeInSpace=function(rect,space){rect.x=space.x;rect.y=space.y;this.placed(rect);};proto.placed=function(rect){var revisedSpaces=[];for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i];var newSpaces=space.getMaximalFreeRects(rect);if(newSpaces){revisedSpaces.push.apply(revisedSpaces,newSpaces);}else{revisedSpaces.push(space);}} 1082this.spaces=revisedSpaces;this.mergeSortSpaces();};proto.mergeSortSpaces=function(){Packer.mergeRects(this.spaces);this.spaces.sort(this.sorter);};proto.addSpace=function(rect){this.spaces.push(rect);this.mergeSortSpaces();};Packer.mergeRects=function(rects){var i=0;var rect=rects[i];rectLoop:while(rect){var j=0;var compareRect=rects[i+j];while(compareRect){if(compareRect==rect){j++;}else if(compareRect.contains(rect)){rects.splice(i,1);rect=rects[i];continue rectLoop;}else if(rect.contains(compareRect)){rects.splice(i+j,1);}else{j++;} 1083compareRect=rects[i+j];} 1084i++;rect=rects[i];} 1085return rects;};var sorters={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x;},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y;}};return Packer;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('packery/js/item',['outlayer/outlayer','./rect'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('outlayer'),require('./rect'));}else{window.Packery.Item=factory(window.Outlayer,window.Packery.Rect);}}(window,function factory(Outlayer,Rect){var docElemStyle=document.documentElement.style;var transformProperty=typeof docElemStyle.transform=='string'?'transform':'WebkitTransform';var Item=function PackeryItem(){Outlayer.Item.apply(this,arguments);};var proto=Item.prototype=Object.create(Outlayer.Item.prototype);var __create=proto._create;proto._create=function(){__create.call(this);this.rect=new Rect();};var _moveTo=proto.moveTo;proto.moveTo=function(x,y){var dx=Math.abs(this.position.x-x);var dy=Math.abs(this.position.y-y);var canHackGoTo=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&dx<1&&dy<1;if(canHackGoTo){this.goTo(x,y);return;} 1086_moveTo.apply(this,arguments);};proto.enablePlacing=function(){this.removeTransitionStyles();if(this.isTransitioning&&transformProperty){this.element.style[transformProperty]='none';} 1087this.isTransitioning=false;this.getSize();this.layout._setRectSize(this.element,this.rect);this.isPlacing=true;};proto.disablePlacing=function(){this.isPlacing=false;};proto.removeElem=function(){this.element.parentNode.removeChild(this.element);this.layout.packer.addSpace(this.rect);this.emitEvent('remove',[this]);};proto.showDropPlaceholder=function(){var dropPlaceholder=this.dropPlaceholder;if(!dropPlaceholder){dropPlaceholder=this.dropPlaceholder=document.createElement('div');dropPlaceholder.className='packery-drop-placeholder';dropPlaceholder.style.position='absolute';} 1088dropPlaceholder.style.width=this.size.width+'px';dropPlaceholder.style.height=this.size.height+'px';this.positionDropPlaceholder();this.layout.element.appendChild(dropPlaceholder);};proto.positionDropPlaceholder=function(){this.dropPlaceholder.style[transformProperty]='translate('+ 1089this.rect.x+'px, '+this.rect.y+'px)';};proto.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder);};return Item;})); 1090/*! 1091 * Packery v2.0.0 1092 * Gapless, draggable grid layouts 1093 * 1094 * Licensed GPLv3 for open source use 1095 * or Packery Commercial License for commercial use 1096 * 1097 * http://packery.metafizzy.co 1098 * Copyright 2016 Metafizzy 1099 */ 1100(function(window,factory){if(typeof define=='function'&&define.amd){define('packery/js/packery',['get-size/get-size','outlayer/outlayer','./rect','./packer','./item'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('get-size'),require('outlayer'),require('./rect'),require('./packer'),require('./item'));}else{window.Packery=factory(window.getSize,window.Outlayer,window.Packery.Rect,window.Packery.Packer,window.Packery.Item);}}(window,function factory(getSize,Outlayer,Rect,Packer,Item){Rect.prototype.canFit=function(rect){return this.width>=rect.width-1&&this.height>=rect.height-1;};var Packery=Outlayer.create('packery');Packery.Item=Item;var proto=Packery.prototype;proto._create=function(){Outlayer.prototype._create.call(this);this.packer=new Packer();this.shiftPacker=new Packer();this.isEnabled=true;this.dragItemCount=0;var _this=this;this.handleDraggabilly={dragStart:function(){_this.itemDragStart(this.element);},dragMove:function(){_this.itemDragMove(this.element,this.position.x,this.position.y);},dragEnd:function(){_this.itemDragEnd(this.element);}};this.handleUIDraggable={start:function handleUIDraggableStart(event,ui){if(!ui){return;} 1101_this.itemDragStart(event.currentTarget);},drag:function handleUIDraggableDrag(event,ui){if(!ui){return;} 1102_this.itemDragMove(event.currentTarget,ui.position.left,ui.position.top);},stop:function handleUIDraggableStop(event,ui){if(!ui){return;} 1103_this.itemDragEnd(event.currentTarget);}};};proto._resetLayout=function(){this.getSize();this._getMeasurements();var width,height,sortDirection;if(this._getOption('horizontal')){width=Infinity;height=this.size.innerHeight+this.gutter;sortDirection='rightwardTopToBottom';}else{width=this.size.innerWidth+this.gutter;height=Infinity;sortDirection='downwardLeftToRight';} 1104this.packer.width=this.shiftPacker.width=width;this.packer.height=this.shiftPacker.height=height;this.packer.sortDirection=this.shiftPacker.sortDirection=sortDirection;this.packer.reset();this.maxY=0;this.maxX=0;};proto._getMeasurements=function(){this._getMeasurement('columnWidth','width');this._getMeasurement('rowHeight','height');this._getMeasurement('gutter','width');};proto._getItemLayoutPosition=function(item){this._setRectSize(item.element,item.rect);if(this.isShifting||this.dragItemCount>0){var packMethod=this._getPackMethod();this.packer[packMethod](item.rect);}else{this.packer.pack(item.rect);} 1105this._setMaxXY(item.rect);return item.rect;};proto.shiftLayout=function(){this.isShifting=true;this.layout();delete this.isShifting;};proto._getPackMethod=function(){return this._getOption('horizontal')?'rowPack':'columnPack';};proto._setMaxXY=function(rect){this.maxX=Math.max(rect.x+rect.width,this.maxX);this.maxY=Math.max(rect.y+rect.height,this.maxY);};proto._setRectSize=function(elem,rect){var size=getSize(elem);var w=size.outerWidth;var h=size.outerHeight;if(w||h){w=this._applyGridGutter(w,this.columnWidth);h=this._applyGridGutter(h,this.rowHeight);} 1106rect.width=Math.min(w,this.packer.width);rect.height=Math.min(h,this.packer.height);};proto._applyGridGutter=function(measurement,gridSize){if(!gridSize){return measurement+this.gutter;} 1107gridSize+=this.gutter;var remainder=measurement%gridSize;var mathMethod=remainder&&remainder<1?'round':'ceil';measurement=Math[mathMethod](measurement/gridSize)*gridSize;return measurement;};proto._getContainerSize=function(){if(this._getOption('horizontal')){return{width:this.maxX-this.gutter};}else{return{height:this.maxY-this.gutter};}};proto._manageStamp=function(elem){var item=this.getItem(elem);var rect;if(item&&item.isPlacing){rect=item.rect;}else{var offset=this._getElementOffset(elem);rect=new Rect({x:this._getOption('originLeft')?offset.left:offset.right,y:this._getOption('originTop')?offset.top:offset.bottom});} 1108this._setRectSize(elem,rect);this.packer.placed(rect);this._setMaxXY(rect);};function verticalSorter(a,b){return a.position.y-b.position.y||a.position.x-b.position.x;} 1109function horizontalSorter(a,b){return a.position.x-b.position.x||a.position.y-b.position.y;} 1110proto.sortItemsByPosition=function(){var sorter=this._getOption('horizontal')?horizontalSorter:verticalSorter;this.items.sort(sorter);};proto.fit=function(elem,x,y){var item=this.getItem(elem);if(!item){return;} 1111this.stamp(item.element);item.enablePlacing();this.updateShiftTargets(item);x=x===undefined?item.rect.x:x;y=y===undefined?item.rect.y:y;this.shift(item,x,y);this._bindFitEvents(item);item.moveTo(item.rect.x,item.rect.y);this.shiftLayout();this.unstamp(item.element);this.sortItemsByPosition();item.disablePlacing();};proto._bindFitEvents=function(item){var _this=this;var ticks=0;function onLayout(){ticks++;if(ticks!=2){return;} 1112_this.dispatchEvent('fitComplete',null,[item]);} 1113item.once('layout',onLayout);this.once('layoutComplete',onLayout);};proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return;} 1114if(this.options.shiftPercentResize){this.resizeShiftPercentLayout();}else{this.layout();}};proto.needsResizeLayout=function(){var size=getSize(this.element);var innerSize=this._getOption('horizontal')?'innerHeight':'innerWidth';return size[innerSize]!=this.size[innerSize];};proto.resizeShiftPercentLayout=function(){var items=this._getItemsForLayout(this.items);var isHorizontal=this._getOption('horizontal');var coord=isHorizontal?'y':'x';var measure=isHorizontal?'height':'width';var segmentName=isHorizontal?'rowHeight':'columnWidth';var innerSize=isHorizontal?'innerHeight':'innerWidth';var previousSegment=this[segmentName];previousSegment=previousSegment&&previousSegment+this.gutter;if(previousSegment){this._getMeasurements();var currentSegment=this[segmentName]+this.gutter;items.forEach(function(item){var seg=Math.round(item.rect[coord]/previousSegment);item.rect[coord]=seg*currentSegment;});}else{var currentSize=getSize(this.element)[innerSize]+this.gutter;var previousSize=this.packer[measure];items.forEach(function(item){item.rect[coord]=(item.rect[coord]/previousSize)*currentSize;});} 1115this.shiftLayout();};proto.itemDragStart=function(elem){if(!this.isEnabled){return;} 1116this.stamp(elem);var item=this.getItem(elem);if(!item){return;} 1117item.enablePlacing();item.showDropPlaceholder();this.dragItemCount++;this.updateShiftTargets(item);};proto.updateShiftTargets=function(dropItem){this.shiftPacker.reset();this._getBoundingRect();var isOriginLeft=this._getOption('originLeft');var isOriginTop=this._getOption('originTop');this.stamps.forEach(function(stamp){var item=this.getItem(stamp);if(item&&item.isPlacing){return;} 1118var offset=this._getElementOffset(stamp);var rect=new Rect({x:isOriginLeft?offset.left:offset.right,y:isOriginTop?offset.top:offset.bottom});this._setRectSize(stamp,rect);this.shiftPacker.placed(rect);},this);var isHorizontal=this._getOption('horizontal');var segmentName=isHorizontal?'rowHeight':'columnWidth';var measure=isHorizontal?'height':'width';this.shiftTargetKeys=[];this.shiftTargets=[];var boundsSize;var segment=this[segmentName];segment=segment&&segment+this.gutter;if(segment){var segmentSpan=Math.ceil(dropItem.rect[measure]/segment);var segs=Math.floor((this.shiftPacker[measure]+this.gutter)/segment);boundsSize=(segs-segmentSpan)*segment;for(var i=0;i<segs;i++){this._addShiftTarget(i*segment,0,boundsSize);}}else{boundsSize=(this.shiftPacker[measure]+this.gutter)-dropItem.rect[measure];this._addShiftTarget(0,0,boundsSize);} 1119var items=this._getItemsForLayout(this.items);var packMethod=this._getPackMethod();
1119items.forEach(function(item){var rect=item.rect;this._setRectSize(item.element,rect);this.shiftPacker[packMethod](rect);this._addShiftTarget(rect.x,rect.y,boundsSize);var cornerX=isHorizontal?rect.x+rect.width:rect.x;var cornerY=isHorizontal?rect.y:rect.y+rect.height;this._addShiftTarget(cornerX,cornerY,boundsSize);if(segment){var segSpan=Math.round(rect[measure]/segment);for(var i=1;i<segSpan;i++){var segX=isHorizontal?cornerX:rect.x+segment*i;var segY=isHorizontal?rect.y+segment*i:cornerY;this._addShiftTarget(segX,segY,boundsSize);}}},this);};proto._addShiftTarget=function(x,y,boundsSize){var checkCoord=this._getOption('horizontal')?y:x;if(checkCoord!==0&&checkCoord>boundsSize){return;} 1120var key=x+','+y;var hasKey=this.shiftTargetKeys.indexOf(key)!=-1;if(hasKey){return;} 1121this.shiftTargetKeys.push(key);this.shiftTargets.push({x:x,y:y});};proto.shift=function(item,x,y){var shiftPosition;var minDistance=Infinity;var position={x:x,y:y};this.shiftTargets.forEach(function(target){var distance=getDistance(target,position);if(distance<minDistance){shiftPosition=target;minDistance=distance;}});item.rect.x=shiftPosition.x;item.rect.y=shiftPosition.y;};function getDistance(a,b){var dx=b.x-a.x;var dy=b.y-a.y;return Math.sqrt(dx*dx+dy*dy);} 1122var DRAG_THROTTLE_TIME=120;proto.itemDragMove=function(elem,x,y){var item=this.isEnabled&&this.getItem(elem);if(!item){return;} 1123x-=this.size.paddingLeft;y-=this.size.paddingTop;var _this=this;function onDrag(){_this.shift(item,x,y);item.positionDropPlaceholder();_this.layout();} 1124var now=new Date();if(this._itemDragTime&&now-this._itemDragTime<DRAG_THROTTLE_TIME){clearTimeout(this.dragTimeout);this.dragTimeout=setTimeout(onDrag,DRAG_THROTTLE_TIME);}else{onDrag();this._itemDragTime=now;}};proto.itemDragEnd=function(elem){var item=this.isEnabled&&this.getItem(elem);if(!item){return;} 1125clearTimeout(this.dragTimeout);item.element.classList.add('is-positioning-post-drag');var completeCount=0;var _this=this;function onDragEndLayoutComplete(){completeCount++;if(completeCount!=2){return;} 1126item.element.classList.remove('is-positioning-post-drag');item.hideDropPlaceholder();_this.dispatchEvent('dragItemPositioned',null,[item]);} 1127item.once('layout',onDragEndLayoutComplete);this.once('layoutComplete',onDragEndLayoutComplete);item.moveTo(item.rect.x,item.rect.y);this.layout();this.dragItemCount=Math.max(0,this.dragItemCount-1);this.sortItemsByPosition();item.disablePlacing();this.unstamp(item.element);};proto.bindDraggabillyEvents=function(draggie){this._bindDraggabillyEvents(draggie,'on');};proto.unbindDraggabillyEvents=function(draggie){this._bindDraggabillyEvents(draggie,'off');};proto._bindDraggabillyEvents=function(draggie,method){var handlers=this.handleDraggabilly;draggie[method]('dragStart',handlers.dragStart);draggie[method]('dragMove',handlers.dragMove);draggie[method]('dragEnd',handlers.dragEnd);};proto.bindUIDraggableEvents=function($elems){this._bindUIDraggableEvents($elems,'on');};proto.unbindUIDraggableEvents=function($elems){this._bindUIDraggableEvents($elems,'off');};proto._bindUIDraggableEvents=function($elems,method){var handlers=this.handleUIDraggable;$elems 1128[method]('dragstart',handlers.start) 1129[method]('drag',handlers.drag) 1130[method]('dragstop',handlers.stop);};var _destroy=proto.destroy;proto.destroy=function(){_destroy.apply(this,arguments);this.isEnabled=false;};Packery.Rect=Rect;Packery.Packer=Packer;return Packery;})); 1131/*! 1132 * Packery layout mode v2.0.1 1133 * sub-classes Packery 1134 */ 1135(function(window,factory){if(typeof define=='function'&&define.amd){define(['isotope-layout/js/layout-mode','packery/js/packery'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('isotope-layout/js/layout-mode'),require('packery'));}else{factory(window.Isotope.LayoutMode,window.Packery);}}(window,function factor(LayoutMode,Packery){var PackeryMode=LayoutMode.create('packery');var proto=PackeryMode.prototype;var keepModeMethods={_getElementOffset:true,_getMeasurement:true};for(var method in Packery.prototype){if(!keepModeMethods[method]){proto[method]=Packery.prototype[method];}} 1136var _resetLayout=proto._resetLayout;proto._resetLayout=function(){this.packer=this.packer||new Packery.Packer();this.shiftPacker=this.shiftPacker||new Packery.Packer();_resetLayout.apply(this,arguments);};var _getItemLayoutPosition=proto._getItemLayoutPosition;proto._getItemLayoutPosition=function(item){item.rect=item.rect||new Packery.Rect();return _getItemLayoutPosition.call(this,item);};var _needsResizeLayout=proto.needsResizeLayout;proto.needsResizeLayout=function(){if(this._getOption('horizontal')){return this.needsVerticalResizeLayout();}else{return _needsResizeLayout.call(this);}};var _getOption=proto._getOption;proto._getOption=function(option){if(option=='horizontal'){return this.options.isHorizontal!==undefined?this.options.isHorizontal:this.options.horizontal;} 1137return _getOption.apply(this.isotope,arguments);};return PackeryMode;})); 1138/*! 1139 * cellsByRows layout mode for Isotope 1140 * v1.1.3 1141 * http://isotope.metafizzy.co/layout-modes/cellsbyrow.html 1142 */ 1143(function(window,factory){if(typeof define==='function'&&define.amd){define(['isotope/js/layout-mode'],factory);}else if(typeof exports==='object'){module.exports=factory(require('isotope-layout/js/layout-mode'));}else{factory(window.Isotope.LayoutMode);}}(window,function factory(LayoutMode){'use strict';var CellsByRow=LayoutMode.create('cellsByRow');var proto=CellsByRow.prototype;proto._resetLayout=function(){this.itemIndex=0;this.getColumnWidth();this.getRowHeight();this.cols=Math.floor(this.isotope.size.innerWidth/this.columnWidth);this.cols=Math.max(this.cols,1);};proto._getItemLayoutPosition=function(item){item.getSize();var col=this.itemIndex%this.cols;var row=Math.floor(this.itemIndex/this.cols);var x=(col+0.5)*this.columnWidth-item.size.outerWidth/2;var y=(row+0.5)*this.rowHeight-item.size.outerHeight/2;this.itemIndex++;return{x:x,y:y};};proto._getContainerSize=function(){return{height:Math.ceil(this.itemIndex/this.cols)*this.rowHeight};};return CellsByRow;})); 1144/*! 1145 -------------------------------- 1146 Infinite Scroll 1147 -------------------------------- 1148 + https://github.com/paulirish/infinite-scroll 1149 + version 2.1.0 1150 + Copyright 2011/12 Paul Irish & Luke Shumard 1151 + Licensed under the MIT license 1152 1153 + Documentation: http://infinite-scroll.com/ 1154*/ 1155(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else{factory(jQuery);}}(function($,undefined){'use strict';
1155$.infinitescroll=function infscr(options,callback,element){this.element=$(element);if(!this._create(options,callback)){this.failed=true;}};$.infinitescroll.defaults={loading:{finished:undefined,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:'data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBFAJNv1DVV01MAdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJghQSwT40PgfAl4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA40AqVCIhG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAUKABwALAcABADOAAsAAAX/IPd0D2dyRCoUp/k8gpHOKtseR9yiSmGbuBykler9XLAhkbDavXTL5k2oqFqNOxzUZPU5YYZd1XsD72rZpBjbeh52mSNnMSC8lwblKZGwi+0QfIJ8CncnCoCDgoVnBHmKfByGJimPkIwtiAeBkH6ZHJaKmCeVnKKTHIihg5KNq4uoqmEtcRUtEREMBggtEr4QDrjCuRC8h7/BwxENeicSF8DKy82pyNLMOxzWygzFmdvD2L3P0dze4+Xh1Arkyepi7dfFvvTtLQkZBC0T/FX3CRgCMOBHsJ+EHYQY7OinAGECgQsB+Lu3AOK+CewcWjwxQeJBihtNGHSoQOE+iQ3//4XkwBBhRZMcUS6YSXOAwIL8PGqEaSJCiYt9SNoCmnJPAgUVLChdaoFBURN8MAzl2PQphwQLfDFd6lTowglHve6rKpbjhK7/pG5VinZP1qkiz1rl4+tr2LRwWU64cFEihwEtZgbgR1UiHaMVvxpOSwBA37kzGz9e8G+B5MIEKLutOGEsAH2ATQwYfTmuX8aETWdGPZmiZcccNSzeTCA1Sw0bdiitC7LBWgu8jQr8HRzqgpK6gX88QbrB14z/kF+ELpwB8eVQj/JkqdylAudji/+ts3039vEEfK8Vz2dlvxZKG0CmbkKDBvllRd6fCzDvBLKBDSCeffhRJEFebFk1k/Mv9jVIoIJZSeBggwUaNeB+Qk34IE0cXlihcfRxkOAJFFhwGmKlmWDiakZhUJtnLBpnWWcnKaAZcxI0piFGGLBm1mc90kajSCveeBVWKeYEoU2wqeaQi0PetoE+rr14EpVC7oAbAUHqhYExbn2XHHsVqbcVew9tx8+XJKk5AZsqqdlddGpqAKdbAYBn1pcczmSTdWvdmZ17c1b3FZ99vnTdCRFM8OEcAhLwm1NdXnWcBBSMRWmfkWZqVlsmLIiAp/o1gGV2vpS4lalGYsUOqXrddcKCmK61aZ8SjEpUpVFVoCpTj4r661Km7kBHjrDyc1RAIQAAIfkEBQoAGwAsBwAEAM4ACwAABf/gtmUCd4goQQgFKj6PYKi0yrrbc8i4ohQt12EHcal+MNSQiCP8gigdz7iCioaCIvUmZLp8QBzW0EN2vSlCuDtFKaq4RyHzQLEKZNdiQDhRDVooCwkbfm59EAmKi4SGIm+AjIsKjhsqB4mSjT2IOIOUnICeCaB/mZKFNTSRmqVpmJqklSqskq6PfYYCDwYHDC4REQwGCBLGxxIQDsHMwhAIX8bKzcENgSLGF9PU1j3Sy9zX2NrgzQziChLk1BHWxcjf7N046tvN82715czn9Pryz6Ilc4ACj4EBOCZM8KEnAYYADBRKnACAYUMFv1wotIhCEcaJCisqwJFgAUSQGyX/kCSVUUTIdKMwJlyo0oXHlhskwrTJciZHEXsgaqS4s6PJiCAr1uzYU8kBBSgnWFqpoMJMUjGtDmUwkmfVmVypakWhEKvXsS4nhLW5wNjVroJIoc05wSzTr0PtiigpYe4EC2vj4iWrFu5euWIMRBhacaVJhYQBEFjA9jHjyQ0xEABwGceGAZYjY0YBOrRLCxUp29QM+bRkx5s7ZyYgVbTqwwti2ybJ+vLtDYpycyZbYOlptxdx0kV+V7lC5iJAyyRrwYKxAdiz82ng0/jnAdMJFz0cPi104Ec1Vj9/M6F173vKL/feXv156dw11tlqeMMnv4V5Ap53GmjQQH97nFfg+IFiucfgRX5Z8KAgbUlQ4IULIlghhhdOSB6AgX0IVn8eReghen3NRIBsRgnH4l4LuEidZBjwRpt6NM5WGwoW0KSjCwX6yJSMab2GwwAPDXfaBCtWpluRTQqC5JM5oUZAjUNS+VeOLWpJEQ7VYQANW0INJSZVDFSnZphjSikfmzE5N4EEbQI1QJmnWXCmHulRp2edwDXF43txukenJwvI9xyg9Q26Z3MzGUcBYFEChZh6DVTq34AU8Iflh51Sd+CnKFYQ6mmZkhqfBKfSxZWqA9DZanWjxmhrWwi0qtCrt/43K6WqVjjpmhIqgEGvculaGKklKstAACEAACH5BAUKABwALAcABADOAAsAAAX/ICdyQmaMYyAUqPgIBiHPxNpy79kqRXH8wAPsRmDdXpAWgWdEIYm2llCHqjVHU+jjJkwqBTecwItShMXkEfNWSh8e1NGAcLgpDGlRgk7EJ/6Ae3VKfoF/fDuFhohVeDeCfXkcCQqDVQcQhn+VNDOYmpSWaoqBlUSfmowjEA+iEAEGDRGztAwGCDcXEA60tXEiCrq8vREMEBLIyRLCxMWSH
1155MzExnbRvQ2Sy7vN0zvVtNfU2tLY3rPgLdnDvca4VQS/Cpk3ABwSLQkYAQwT/P309vcI7OvXr94jBQMJ/nskkGA/BQBRLNDncAIAiDcG6LsxAWOLiQzmeURBKWSLCQbv/1F0eDGinJUKR47YY1IEgQASKk7Yc7ACRwZm7mHweRJoz59BJUogisKCUaFMR0x4SlJBVBFTk8pZivTR0K73rN5wqlXEAq5Fy3IYgHbEzQ0nLy4QSoCjXLoom96VOJEeCosK5n4kkFfqXjl94wa+l1gvAcGICbewAOAxY8l/Ky/QhAGz4cUkGxu2HNozhwMGBnCUqUdBg9UuW9eUynqSwLHIBujePef1ZGQZXcM+OFuEBeBhi3OYgLyqcuaxbT9vLkf4SeqyWxSQpKGB2gQpm1KdWbu72rPRzR9Ne2Nu9Kzr/1Jqj0yD/fvqP4aXOt5sW/5qsXXVcv1Nsp8IBUAmgswGF3llGgeU1YVXXKTN1FlhWFXW3gIE+DVChApysACHHo7Q4A35lLichh+ROBmLKAzgYmYEYDAhCgxKGOOMn4WR4kkDaoBBOxJtdNKQxFmg5JIWIBnQc07GaORfUY4AEkdV6jHlCEISSZ5yTXpp1pbGZbkWmcuZmQCaE6iJ0FhjMaDjTMsgZaNEHFRAQVp3bqXnZED1qYcECOz5V6BhSWCoVJQIKuKQi2KFKEkEFAqoAo7uYSmO3jk61wUUMKmknJ4SGimBmAa0qVQBhAAAIfkEBQoAGwAsBwAEAM4ACwAABf/gJm5FmRlEqhJC+bywgK5pO4rHI0D3pii22+Mg6/0Ej96weCMAk7cDkXf7lZTTnrMl7eaYoy10JN0ZFdco0XAuvKI6qkgVFJXYNwjkIBcNBgR8TQoGfRsJCRuCYYQQiI+ICosiCoGOkIiKfSl8mJkHZ4U9kZMbKaI3pKGXmJKrngmug4WwkhA0lrCBWgYFCCMQFwoQDRHGxwwGCBLMzRLEx8iGzMMO0cYNeCMKzBDW19lnF9DXDIY/48Xg093f0Q3s1dcR8OLe8+Y91OTv5wrj7o7B+7VNQqABIoRVCMBggsOHE36kSoCBIcSH3EbFangxogJYFi8CkJhqQciLJEf/LDDJEeJIBT0GsOwYUYJGBS0fjpQAMidGmyVP6sx4Y6VQhzs9VUwkwqaCCh0tmKoFtSMDmBOf9phg4SrVrROuasRQAaxXpVUhdsU6IsECZlvX3kwLUWzRt0BHOLTbNlbZG3vZinArge5Dvn7wbqtQkSYAAgtKmnSsYKVKo2AfW048uaPmG386i4Q8EQMBAIAnfB7xBxBqvapJ9zX9WgRS2YMpnvYMGdPK3aMjt/3dUcNI4blpj7iwkMFWDXDvSmgAlijrt9RTR78+PS6z1uAJZIe93Q8g5zcsWCi/4Y+C8bah5zUv3vv89uft30QP23punGCx5954oBBwnwYaNCDY/wYrsYeggnM9B2Fpf8GG2CEUVWhbWAtGouEGDy7Y4IEJVrbSiXghqGKIo7z1IVcXIkKWWR361QOLWWnIhwERpLaaCCee5iMBGJQmJGyPFTnbkfHVZGRtIGrg5HALEJAZbu39BuUEUmq1JJQIPtZilY5hGeSWsSk52G9XqsmgljdIcABytq13HyIM6RcUA+r1qZ4EBF3WHWB29tBgAzRhEGhig8KmqKFv8SeCeo+mgsF7YFXa1qWSbkDpom/mqR1PmHCqJ3fwNRVXjC7S6CZhFVCQ2lWvZiirhQq42SACt25IK2hv8TprriUV1usGgeka7LFcNmCldMLi6qZMgFLgpw16Cipb7bC1knXsBiEAACH5BAUKABsALAcABADOAAsAAAX/4FZsJPkUmUGsLCEUTywXglFuSg7fW1xAvNWLF6sFFcPb42C8EZCj24EJdCp2yoegWsolS0Uu6fmamg8n8YYcLU2bXSiRaXMGvqV6/KAeJAh8VgZqCX+BexCFioWAYgqNi4qAR4ORhRuHY408jAeUhAmYYiuVlpiflqGZa5CWkzc5fKmbbhIpsAoQDRG8vQwQCBLCwxK6vb5qwhfGxxENahvCEA7NzskSy7vNzzzK09W/PNHF1NvX2dXcN8K55cfh69Luveol3vO8zwi4Yhj+AQwmCBw4IYclDAAJDlQggVOChAoLKkgFkSCAHDwWLKhIEOONARsDKryogFPIiAUb/95gJNIiw4wnI778GFPhzBKFOAq8qLJEhQpiNArjMcHCmlTCUDIouTKBhApELSxFWiGiVKY4E2CAekPgUphDu0742nRrVLJZnyrFSqKQ2ohoSYAMW6IoDpNJ4bLdILTnAj8KUF7UeENjAKuDyxIgOuGiOI0EBBMgLNew5AUrDTMGsFixwBIaNCQuAXJB57qNJ2OWm2Aj4skwCQCIyNkhhtMkdsIuodE0AN4LJDRgfLPtn5YDLdBlraAByuUbBgxQwICxMOnYpVOPej074OFdlfc0TqC62OIbcppHjV4o+LrieWhfT8JC/I/T6W8oCl29vQ0XjLdBaA3s1RcPBO7lFvpX8BVoG4O5jTXRQRDuJ6FDTzEWF1/BCZhgbyAKE9qICYLloQYOFtahVRsWYlZ4KQJHlwHS/IYaZ6sZd9tmu5HQm2xi1UaTbzxYwJk/wBF5g5EEYOBZeEfGZmNdFyFZmZIR4jikbLThlh5kUUVJGmRT7sekkziRWUIACABk3T4qCsedgO4xhgGcY7q5pHJ4klBBTQRJ0CeHcoYHHUh6wgfdn9uJdSdMiebGJ0zUPTcoS286FCkrZxnYoYYKWLkBowhQoBeaOlZAgVhLidrXqg2G
1155iqpQpZ4apwSwRtjqrB3muoF9BboaXKmshlqWqsWiGt2wphJkQbAU5hoCACH5BAUKABsALAcABADOAAsAAAX/oGFw2WZuT5oZROsSQnGaKjRvilI893MItlNOJ5v5gDcFrHhKIWcEYu/xFEqNv6B1N62aclysF7fsZYe5aOx2yL5aAUGSaT1oTYMBwQ5VGCAJgYIJCnx1gIOBhXdwiIl7d0p2iYGQUAQBjoOFSQR/lIQHnZ+Ue6OagqYzSqSJi5eTpTxGcjcSChANEbu8DBAIEsHBChe5vL13G7fFuscRDcnKuM3H0La3EA7Oz8kKEsXazr7Cw9/Gztar5uHHvte47MjktznZ2w0G1+D3BgirAqJmJMAQgMGEgwgn5Ei0gKDBhBMALGRYEOJBb5QcWlQo4cbAihZz3GgIMqFEBSM1/4ZEOWPAgpIIJXYU+PIhRG8ja1qU6VHlzZknJNQ6UanCjQkWCIGSUGEjAwVLjc44+DTqUQtPPS5gejUrTa5TJ3g9sWCr1BNUWZI161StiQUDmLYdGfesibQ3XMq1OPYthrwuA2yU2LBs2cBHIypYQPPlYAKFD5cVvNPtW8eVGbdcQADATsiNO4cFAPkvHpedPzc8kUcPgNGgZ5RNDZG05reoE9s2vSEP79MEGiQGy1qP8LA4ZcdtsJE48ONoLTBtTV0B9LsTnPceoIDBDQvS7W7vfjVY3q3eZ4A339J4eaAmKqU/sV58HvJh2RcnIBsDUw0ABqhBA5aV5V9XUFGiHfVeAiWwoFgJJrIXRH1tEMiDFV4oHoAEGlaWhgIGSGBO2nFomYY3mKjVglidaNYJGJDkWW2xxTfbjCbVaOGNqoX2GloR8ZeTaECS9pthRGJH2g0b3Agbk6hNANtteHD2GJUucfajCQBy5OOTQ25ZgUPvaVVQmbKh9510/qQpwXx3SQdfk8tZJOd5b6JJFplT3ZnmmX3qd5l1eg5q00HrtUkUn0AKaiGjClSAgKLYZcgWXwocGRcCFGCKwSB6ceqphwmYRUFYT/1WKlOdUpipmxW0mlCqHjYkAaeoZlqrqZ4qd+upQKaapn/AmgAegZ8KUtYtFAQQAgAh+QQFCgAbACwHAAQAzgALAAAF/+C2PUcmiCiZGUTrEkKBis8jQEquKwU5HyXIbEPgyX7BYa5wTNmEMwWsSXsqFbEh8DYs9mrgGjdK6GkPY5GOeU6ryz7UFopSQEzygOGhJBjoIgMDBAcBM0V/CYqLCQqFOwobiYyKjn2TlI6GKC2YjJZknouaZAcQlJUHl6eooJwKooobqoewrJSEmyKdt59NhRKFMxLEEA4RyMkMEAjDEhfGycqAG8TQx9IRDRDE3d3R2ctD1RLg0ttKEnbY5wZD3+zJ6M7X2RHi9Oby7u/r9g38UFjTh2xZJBEBMDAboogAgwkQI07IMUORwocSJwCgWDFBAIwZOaJIsOBjRogKJP8wTODw5ESVHVtm3AhzpEeQElOuNDlTZ0ycEUWKWFASqEahGwYUPbnxoAgEdlYSqDBkgoUNClAlIHbSAoOsqCRQnQHxq1axVb06FWFxLIqyaze0Tft1JVqyE+pWXMD1pF6bYl3+HTqAWNW8cRUFzmih0ZAAB2oGKukSAAGGRHWJgLiR6AylBLpuHKKUMlMCngMpDSAa9QIUggZVVvDaJobLeC3XZpvgNgCmtPcuwP3WgmXSq4do0DC6o2/guzcseECtUoO0hmcsGKDgOt7ssBd07wqesAIGZC1YIBa7PQHvb1+SFo+++HrJSQfB33xfav3i5eX3Hnb4CTJgegEq8tH/YQEOcIJzbm2G2EoYRLgBXFpVmFYDcREV4HIcnmUhiGBRouEMJGJGzHIspqgdXxK0yCKHRNXoIX4uorCdTyjkyNtdPWrA4Up82EbAbzMRxxZRR54WXVLDIRmRcag5d2R6ugl3ZXzNhTecchpMhIGVAKAYpgJjjsSklBEd99maZoo535ZvdamjBEpusJyctg3h4X8XqodBMx0tiNeg/oGJaKGABpogS40KSqiaEgBqlQWLUtqoVQnytekEjzo0hHqhRorppOZt2p923M2AAV+oBtpAnnPNoB6HaU6mAAIU+IXmi3j2mtFXuUoHKwXpzVrsjcgGOauKEjQrwq157hitGq2NoWmjh7z6Wmxb0m5w66+2VRAuXN/yFUAIACH5BAUKABsALAcABADOAAsAAAX/4CZuRiaM45MZqBgIRbs9AqTcuFLE7VHLOh7KB5ERdjJaEaU4ClO/lgKWjKKcMiJQ8KgumcieVdQMD8cbBeuAkkC6LYLhOxoQ2PF5Ys9PKPBMen17f0CCg4VSh32JV4t8jSNqEIOEgJKPlkYBlJWRInKdiJdkmQlvKAsLBxdABA4RsbIMBggtEhcQsLKxDBC2TAS6vLENdJLDxMZAubu8vjIbzcQRtMzJz79S08oQEt/guNiyy7fcvMbh4OezdAvGrakLAQwyABsELQkY9BP+//ckyPDD4J9BfAMh1GsBoImMeQUN+lMgUJ9CiRMa5msxoB9Gh/o8GmxYMZXIgxtR/yQ46S/gQAURR0pDwYDfywoyLPip5AdnCwsMFPBU4BPFhKBDi444quCmDKZOfwZ9KEGpCKgcN1jdALSpPqIYsabS+nSqvqplvYqQYAeDPgwKwjaMtiDl0oaqUAyo+3TuWwUAMPpVCfee0cEjVBGQq2ABx7oTWmQk4FglZMGN9fGVDMCuiH2AOVOu/PmyxM630gwM0CCn6q8LjVJ8GXvpa5Uwn95OTC/nNxkda1/dLSK475IjCD6dHbK1ZOa4hXP9DXs5chJ00UpVm5xo2qRpoxptwF2E4/IbJpB/SDz9+q9b1aNfQH08+p4a8uvX8B53fLP+ycAfemjsRUBgp1H20K+BghHgVgt1GXZXZpZ5lt4ECjxYR4ScUWiShEtZqBiIInRGWnERNnjiBglw+JyGnxUmGowsyiiZg189lNtPGACjV2+S9UjbU0JWF6SPvEk3QZEqsZYTk3UAaRSUnznJI5LmESCdBVSyaOWUWLK4I5gDUYVeV1T9l+FZClCAUVA09uSmRHBCKAECFEhW51ht6rnmWBXkaR+NjuHpJ40D3DmnQXt2F+ihZxlqVKOfQRACACH5BAUKABwALAcABADOAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7',msg:null,msgText:'<em>Loading the next set of posts...</em>',selector:null,speed:'fast',start:undefined},state:{isDuringAjax:false,isInvalidPage:false,isDestroyed:false,isDone:false,isPaused:false,isBeyondMaxPage:false,currPage:1},debug:false,behavior:undefined,binder:$(window),nextSelector:'div.navigation a:first',navSelector:'div.navigation',contentSelector:null,extraScrollPx:150,itemSelector:'div.post',animate:false,pathParse:undefined,dataType:'html',appendCallback:true,bufferPx:40,errorCallback:function(){}
1155,infid:0,pixelsFromNavToBottom:undefined,path:undefined,prefill:false,maxPage:undefined};$.infinitescroll.prototype={_binding:function infscr_binding(binding){var instance=this,opts=instance.options;opts.v='2.0b2.120520';if(!!opts.behavior&&this['_binding_'+opts.behavior]!==undefined){this['_binding_'+opts.behavior].call(this);return;} 1156if(binding!=='bind'&&binding!=='unbind'){this._debug('Binding value '+binding+' not valid');return false;} 1157if(binding==='unbind'){(this.options.binder).unbind('smartscroll.infscr.'+instance.options.infid);}else{(this.options.binder)[binding]('smartscroll.infscr.'+instance.options.infid,function(){instance.scroll();});} 1158this._debug('Binding',binding);},_create:function infscr_create(options,callback){var opts=$.extend(true,{},$.infinitescroll.defaults,options);this.options=opts;var $window=$(window);var instance=this;if(!instance._validate(options)){return false;} 1159var path=$(opts.nextSelector).attr('href');if(!path){this._debug('Navigation selector not found');return false;} 1160opts.path=opts.path||this._determinepath(path);opts.contentSelector=opts.contentSelector||this.element;opts.loading.selector=opts.loading.selector||opts.contentSelector;opts.loading.msg=opts.loading.msg||$('<div id="infscr-loading"><img alt="Loading..." src="'+opts.loading.img+'" /><div>'+opts.loading.msgText+'</div></div>');(new Image()).src=opts.loading.img;if(opts.pixelsFromNavToBottom===undefined){opts.pixelsFromNavToBottom=$(document).height()-$(opts.navSelector).offset().top;this._debug('pixelsFromNavToBottom: '+opts.pixelsFromNavToBottom);} 1161var self=this;opts.loading.start=opts.loading.start||function(){$(opts.navSelector).hide();opts.loading.msg.appendTo(opts.loading.selector).show(opts.loading.speed,$.proxy(function(){this.beginAjax(opts);},self));};opts.loading.finished=opts.loading.finished||function(){if(!opts.state.isBeyondMaxPage) 1162opts.loading.msg.fadeOut(opts.loading.speed);};opts.callback=function(instance,data,url){if(!!opts.behavior&&instance['_callback_'+opts.behavior]!==undefined){instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0],data,url);} 1163if(callback){callback.call($(opts.contentSelector)[0],data,opts,url);} 1164if(opts.prefill){$window.bind('resize.infinite-scroll',instance._prefill);}};if(options.debug){if(Function.prototype.bind&&(typeof console==='object'||typeof console==='function')&&typeof console.log==='object'){['log','info','warn','error','assert','dir','clear','profile','profileEnd'].forEach(function(method){console[method]=this.call(console[method],console);},Function.prototype.bind);}} 1165this._setup();if(opts.prefill){this._prefill();} 1166return true;},_prefill:function infscr_prefill(){var instance=this;var $window=$(window);function needsPrefill(){return($(instance.options.contentSelector).height()<=$window.height());} 1167this._prefill=function(){if(needsPrefill()){instance.scroll();} 1168$window.bind('resize.infinite-scroll',function(){if(needsPrefill()){$window.unbind('resize.infinite-scroll');instance.scroll();}});};this._prefill();},_debug:function infscr_debug(){if(true!==this.options.debug){return;} 1169if(typeof console!=='undefined'&&typeof console.log==='function'){if((Array.prototype.slice.call(arguments)).length===1&&typeof Array.prototype.slice.call(arguments)[0]==='string'){console.log((Array.prototype.slice.call(arguments)).toString());}else{console.log(Array.prototype.slice.call(arguments));}}else if(!Function.prototype.bind&&typeof console!=='undefined'&&typeof console.log==='object'){Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments));}},_determinepath:function infscr_determinepath(path){var opts=this.options;if(!!opts.behavior&&this['_determinepath_'+opts.behavior]!==undefined){return this['_determinepath_'+opts.behavior].call(this,path);} 1170var url=new URL(path);var pathname=url.pathname;var hasNumber=/\d/.test(pathname);if(!!opts.pathParse){this._debug('pathParse manual');return opts.pathParse(path,this.options.state.currPage+1);}else if(hasNumber&&path.match(/(\?|\&)(upage=)(\d+)/)){var parts=path.split(/(\?|\&)(upage=)(\d+)/);return[parts[0]+parts[1]+parts[2],parts[4]];}else if(path.match(/^(.*?)\b2\b(.*?$)/)){path=path.match(/^(.*?)\b2\b(.*?$)/).slice(1);}else if(path.match(/^(.*?)2(.*?$)/)){if(path.match(/^(.*?page=)2(\/.*|$)/)){path=path.match(/^(.*?page=)2(\/.*|$)/).slice(1);return path;} 1171path=path.match(/^(.*?)2(.*?$)/).slice(1);}else{if(path.match(/^(.*?page=)1(\/.*|$)/)){path=path.match(/^(.*?page=)1(\/.*|$)/).slice(1);return path;}else{this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");opts.state.isInvalidPage=true;}} 1172this._debug('determinePath',path);return path;},_error:function infscr_error(xhr){var opts=this.options;if(!!opts.behavior&&this['_error_'+opts.behavior]!==undefined){this['_error_'+opts.behavior].call(this,xhr);return;} 1173if(xhr!=='destroy'&&xhr!=='end'){xhr='unknown';}
1174this._debug('Error',xhr);if(xhr==='end'||opts.state.isBeyondMaxPage){this._showdonemsg();} 1175opts.state.isDone=true;opts.state.currPage=1;opts.state.isPaused=false;opts.state.isBeyondMaxPage=false;this._binding('unbind');},_loadcallback:function infscr_loadcallback(box,data,url){var opts=this.options,callback=this.options.callback,result=(opts.state.isDone)?'done':(!opts.appendCallback)?'no-append':'append',frag;if(!!opts.behavior&&this['_loadcallback_'+opts.behavior]!==undefined){this['_loadcallback_'+opts.behavior].call(this,box,data);return;} 1176switch(result){case'done':this._showdonemsg();return false;case'no-append':if(opts.dataType==='html'){data='<div>'+data+'</div>';data=$(data).find(opts.itemSelector);} 1177if(data.length===0){return this._error('end');} 1178break;case'append':var children=box.children();if(children.length===0){return this._error('end');} 1179frag=document.createDocumentFragment();while(box[0].firstChild){frag.appendChild(box[0].firstChild);} 1180this._debug('contentSelector',$(opts.contentSelector)[0]);$(opts.contentSelector)[0].appendChild(frag);data=children.get();break;} 1181opts.loading.finished.call($(opts.contentSelector)[0],opts);if(opts.animate){var scrollTo=$(window).scrollTop()+$(opts.loading.msg).height()+opts.extraScrollPx+'px';$('html,body').animate({scrollTop:scrollTo},800,function(){opts.state.isDuringAjax=false;});} 1182if(!opts.animate){opts.state.isDuringAjax=false;} 1183callback(this,data,url);if(opts.prefill){this._prefill();}},_nearbottom:function infscr_nearbottom(){var opts=this.options,pixelsFromWindowBottomToBottom=0+$(document).height()-(opts.binder.scrollTop())-$(window).height();if(!!opts.behavior&&this['_nearbottom_'+opts.behavior]!==undefined){return this['_nearbottom_'+opts.behavior].call(this);} 1184this._debug('math:',pixelsFromWindowBottomToBottom,opts.pixelsFromNavToBottom);return(pixelsFromWindowBottomToBottom-opts.bufferPx<opts.pixelsFromNavToBottom);},_pausing:function infscr_pausing(pause){var opts=this.options;if(!!opts.behavior&&this['_pausing_'+opts.behavior]!==undefined){this['_pausing_'+opts.behavior].call(this,pause);return;} 1185if(pause!=='pause'&&pause!=='resume'&&pause!==null){this._debug('Invalid argument. Toggling pause value instead');} 1186pause=(pause&&(pause==='pause'||pause==='resume'))?pause:'toggle';switch(pause){case'pause':opts.state.isPaused=true;break;case'resume':opts.state.isPaused=false;break;case'toggle':opts.state.isPaused=!opts.state.isPaused;break;} 1187this._debug('Paused',opts.state.isPaused);return false;},_setup:function infscr_setup(){var opts=this.options;if(!!opts.behavior&&this['_setup_'+opts.behavior]!==undefined){this['_setup_'+opts.behavior].call(this);return;} 1188this._binding('bind');return false;},_showdonemsg:function infscr_showdonemsg(){var opts=this.options;if(!!opts.behavior&&this['_showdonemsg_'+opts.behavior]!==undefined){this['_showdonemsg_'+opts.behavior].call(this);return;} 1189opts.loading.msg.find('img').hide().parent().find('div').html(opts.loading.finishedMsg).animate({opacity:1},2000,function(){$(this).parent().fadeOut(opts.loading.speed);});opts.errorCallback.call($(opts.contentSelector)[0],'done');},_validate:function infscr_validate(opts){for(var key in opts){if(key.indexOf&&key.indexOf('Selector')>-1&&$(opts[key]).length===0){this._debug('Your '+key+' found no elements.');return false;}} 1190return true;},bind:function infscr_bind(){this._binding('bind');},destroy:function infscr_destroy(){this.options.state.isDestroyed=true;this.options.loading.finished();return this._error('destroy');},pause:function infscr_pause(){this._pausing('pause');},resume:function infscr_resume(){this._pausing('resume');},beginAjax:function infscr_ajax(opts){var instance=this,path=opts.path,box,desturl,method,condition;opts.state.currPage++;if(opts.maxPage!==undefined&&opts.state.currPage>opts.maxPage){opts.state.isBeyondMaxPage=true;this.destroy();return;} 1191box=$(opts.contentSelector).is('table, tbody')?$('<tbody/>'):$('<div/>');desturl=(typeof path==='function')?path(opts.state.currPage):path.join(opts.state.currPage);instance._debug('heading into ajax',desturl);method=(opts.dataType==='html'||opts.dataType==='json')?opts.dataType:'html+callback';if(opts.appendCallback&&opts.dataType==='html'){method+='+callback';}
1192switch(method){case'html+callback':instance._debug('Using HTML via .load() method');box.load(desturl+' '+opts.itemSelector,undefined,function infscr_ajax_callback(responseText){instance._loadcallback(box,responseText,desturl);});break;case'html':instance._debug('Using '+(method.toUpperCase())+' via $.ajax() method');$.ajax({url:desturl,dataType:opts.dataType,complete:function infscr_ajax_callback(jqXHR,textStatus){condition=(typeof(jqXHR.isResolved)!=='undefined')?(jqXHR.isResolved()):(textStatus==='success'||textStatus==='notmodified');if(condition){instance._loadcallback(box,jqXHR.responseText,desturl);}else{instance._error('end');}}});break;case'json':instance._debug('Using '+(method.toUpperCase())+' via $.ajax() method');$.ajax({dataType:'json',type:'GET',url:desturl,success:function(data,textStatus,jqXHR){condition=(typeof(jqXHR.isResolved)!=='undefined')?(jqXHR.isResolved()):(textStatus==='success'||textStatus==='notmodified');if(opts.appendCallback){if(opts.template!==undefined){var theData=opts.template(data);box.append(theData);if(condition){instance._loadcallback(box,theData);}else{instance._error('end');}}else{instance._debug('template must be defined.');instance._error('end');}}else{if(condition){instance._loadcallback(box,data,desturl);}else{instance._error('end');}}},error:function(){instance._debug('JSON ajax request failed.');instance._error('end');}});break;}},retrieve:function infscr_retrieve(pageNum){pageNum=pageNum||null;var instance=this,opts=instance.options;if(!!opts.behavior&&this['retrieve_'+opts.behavior]!==undefined){this['retrieve_'+opts.behavior].call(this,pageNum);return;} 1193if(opts.state.isDestroyed){this._debug('Instance is destroyed');return false;} 1194opts.state.isDuringAjax=true;opts.loading.start.call($(opts.contentSelector)[0],opts);},scroll:function infscr_scroll(){var opts=this.options,state=opts.state;if(!!opts.behavior&&this['scroll_'+opts.behavior]!==undefined){this['scroll_'+opts.behavior].call(this);return;} 1195if(state.isDuringAjax||state.isInvalidPage||state.isDone||state.isDestroyed||state.isPaused){return;} 1196if(!this._nearbottom()){return;} 1197this.retrieve();},toggle:function infscr_toggle(){this._pausing();},unbind:function infscr_unbind(){this._binding('unbind');},update:function infscr_options(key){if($.isPlainObject(key)){this.options=$.extend(true,this.options,key);}}};$.fn.infinitescroll=function infscr_init(options,callback){var thisCall=typeof options;switch(thisCall){case'string':var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,'infinitescroll');if(!instance){return false;} 1198if(!$.isFunction(instance[options])||options.charAt(0)==='_'){return false;} 1199instance[options].apply(instance,args);});break;case'object':this.each(function(){var instance=$.data(this,'infinitescroll');if(instance){instance.update(options);}else{instance=new $.infinitescroll(options,callback,this);if(!instance.failed){$.data(this,'infinitescroll',instance);}}});break;} 1200return this;};var event=$.event,scrollTimeout;event.special.smartscroll={setup:function(){$(this).bind('scroll',event.special.smartscroll.handler);},teardown:function(){$(this).unbind('scroll',event.special.smartscroll.handler);},handler:function(event,execAsap){var context=this,args=arguments;event.type='smartscroll';if(scrollTimeout){clearTimeout(scrollTimeout);} 1201scrollTimeout=setTimeout(function(){$(context).trigger('smartscroll',args);},execAsap==='execAsap'?0:100);}};$.fn.smartscroll=function(fn){return fn?this.bind('smartscroll',fn):this.trigger('smartscroll',['execAsap']);};})); 1202/*! 1203Waypoints - 4.0.1 1204Copyright © 2011-2016 Caleb Troughton 1205Licensed under the MIT license. 1206https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 1207*/ 1208(function(){'use strict' 1209var keyCounter=0 1210var allWaypoints={} 1211function Waypoint(options){if(!options){throw new Error('No options passed to Waypoint constructor')} 1212if(!options.element){throw new Error('No element option passed to Waypoint constructor')} 1213if(!options.handler){throw new Error('No handler option passed to Waypoint constructor')} 1214this.key='waypoint-'+keyCounter 1215this.options=Waypoint.Adapter.extend({},Waypoint.defaults,options) 1216this.element=this.options.element 1217this.adapter=new Waypoint.Adapter(this.element) 1218this.callback=options.handler 1219this.axis=this.options.horizontal?'horizontal':'vertical' 1220this.enabled=this.options.enabled 1221this.triggerPoint=null 1222this.group=Waypoint.Group.findOrCreate({name:this.options.group,axis:this.axis}) 1223this.context=Waypoint.Context.findOrCreateByElement(this.options.context) 1224if(Waypoint.offsetAliases[this.options.offset]){this.options.offset=Waypoint.offsetAliases[this.options.offset]} 1225this.group.add(this) 1226this.context.add(this) 1227allWaypoints[this.key]=this 1228keyCounter+=1} 1229Waypoint.prototype.queueTrigger=function(direction){this.group.queueTrigger(this,direction)} 1230Waypoint.prototype.trigger=function(args){if(!this.enabled){return} 1231if(this.callback){this.callback.apply(this,args)}} 1232Waypoint.prototype.destroy=function(){this.context.remove(this) 1233this.group.remove(this) 1234delete allWaypoints[this.key]} 1235Waypoint.prototype.disable=function(){this.enabled=false 1236return this} 1237Waypoint.prototype.enable=function(){this.context.refresh() 1238this.enabled=true 1239return this} 1240Waypoint.prototype.next=function(){return this.group.next(this)} 1241Waypoint.prototype.previous=function(){return this.group.previous(this)} 1242Waypoint.invokeAll=function(method){var allWaypointsArray=[]
1243for(var waypointKey in allWaypoints){allWaypointsArray.push(allWaypoints[waypointKey])} 1244for(var i=0,end=allWaypointsArray.length;i<end;i++){allWaypointsArray[i][method]()}} 1245Waypoint.destroyAll=function(){Waypoint.invokeAll('destroy')} 1246Waypoint.disableAll=function(){Waypoint.invokeAll('disable')} 1247Waypoint.enableAll=function(){Waypoint.Context.refreshAll() 1248for(var waypointKey in allWaypoints){allWaypoints[waypointKey].enabled=true} 1249return this} 1250Waypoint.refreshAll=function(){Waypoint.Context.refreshAll()} 1251Waypoint.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight} 1252Waypoint.viewportWidth=function(){return document.documentElement.clientWidth} 1253Waypoint.adapters=[] 1254Waypoint.defaults={context:window,continuous:true,enabled:true,group:'default',horizontal:false,offset:0} 1255Waypoint.offsetAliases={'bottom-in-view':function(){return this.context.innerHeight()-this.adapter.outerHeight()},'right-in-view':function(){return this.context.innerWidth()-this.adapter.outerWidth()}} 1256window.Waypoint=Waypoint}());(function(){'use strict' 1257function requestAnimationFrameShim(callback){window.setTimeout(callback,1000/60)} 1258var keyCounter=0 1259var contexts={} 1260var Waypoint=window.Waypoint 1261var oldWindowLoad=window.onload 1262function Context(element){this.element=element 1263this.Adapter=Waypoint.Adapter 1264this.adapter=new this.Adapter(element) 1265this.key='waypoint-context-'+keyCounter 1266this.didScroll=false 1267this.didResize=false 1268this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()} 1269this.waypoints={vertical:{},horizontal:{}} 1270element.waypointContextKey=this.key 1271contexts[element.waypointContextKey]=this 1272keyCounter+=1 1273if(!Waypoint.windowContext){Waypoint.windowContext=true 1274Waypoint.windowContext=new Context(window)} 1275this.createThrottledScrollHandler() 1276this.createThrottledResizeHandler()} 1277Context.prototype.add=function(waypoint){var axis=waypoint.options.horizontal?'horizontal':'vertical' 1278this.waypoints[axis][waypoint.key]=waypoint 1279this.refresh()} 1280Context.prototype.checkEmpty=function(){var horizontalEmpty=this.Adapter.isEmptyObject(this.waypoints.horizontal) 1281var verticalEmpty=this.Adapter.isEmptyObject(this.waypoints.vertical) 1282var isWindow=this.element==this.element.window 1283if(horizontalEmpty&&verticalEmpty&&!isWindow){this.adapter.off('.waypoints') 1284delete contexts[this.key]}} 1285Context.prototype.createThrottledResizeHandler=function(){var self=this 1286function resizeHandler(){self.handleResize() 1287self.didResize=false} 1288this.adapter.on('resize.waypoints',function(){if(!self.didResize){self.didResize=true 1289Waypoint.requestAnimationFrame(resizeHandler)}})} 1290Context.prototype.createThrottledScrollHandler=function(){var self=this 1291function scrollHandler(){self.handleScroll() 1292self.didScroll=false} 1293this.adapter.on('scroll.waypoints',function(){if(!self.didScroll||Waypoint.isTouch){self.didScroll=true 1294Waypoint.requestAnimationFrame(scrollHandler)}})} 1295Context.prototype.handleResize=function(){Waypoint.Context.refreshAll()} 1296Context.prototype.handleScroll=function(){var triggeredGroups={} 1297var axes={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:'right',backward:'left'},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:'down',backward:'up'}} 1298for(var axisKey in axes){var axis=axes[axisKey] 1299var isForward=axis.newScroll>axis.oldScroll 1300var direction=isForward?axis.forward:axis.backward 1301for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey] 1302if(waypoint.triggerPoint===null){continue} 1303var wasBeforeTriggerPoint=axis.oldScroll<waypoint.triggerPoint 1304var nowAfterTriggerPoint=axis.newScroll>=waypoint.triggerPoint 1305var crossedForward=wasBeforeTriggerPoint&&nowAfterTriggerPoint 1306var crossedBackward=!wasBeforeTriggerPoint&&!nowAfterTriggerPoint 1307if(crossedForward||crossedBackward){waypoint.queueTrigger(direction) 1308triggeredGroups[waypoint.group.id]=waypoint.group}}} 1309for(var groupKey in triggeredGroups){triggeredGroups[groupKey].flushTriggers()} 1310this.oldScroll={x:axes.horizontal.newScroll,y:axes.vertical.newScroll}} 1311Context.prototype.innerHeight=function(){if(this.element==this.element.window){return Waypoint.viewportHe
1311ight()} 1312return this.adapter.innerHeight()} 1313Context.prototype.remove=function(waypoint){delete this.waypoints[waypoint.axis][waypoint.key] 1314this.checkEmpty()} 1315Context.prototype.innerWidth=function(){if(this.element==this.element.window){return Waypoint.viewportWidth()} 1316return this.adapter.innerWidth()} 1317Context.prototype.destroy=function(){var allWaypoints=[] 1318for(var axis in this.waypoints){for(var waypointKey in this.waypoints[axis]){allWaypoints.push(this.waypoints[axis][waypointKey])}} 1319for(var i=0,end=allWaypoints.length;i<end;i++){allWaypoints[i].destroy()}} 1320Context.prototype.refresh=function(){var isWindow=this.element==this.element.window 1321var contextOffset=isWindow?undefined:this.adapter.offset() 1322var triggeredGroups={} 1323var axes 1324this.handleScroll() 1325axes={horizontal:{contextOffset:isWindow?0:contextOffset.left,contextScroll:isWindow?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:'right',backward:'left',offsetProp:'left'},vertical:{contextOffset:isWindow?0:contextOffset.top,contextScroll:isWindow?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:'down',backward:'up',offsetProp:'top'}} 1326for(var axisKey in axes){var axis=axes[axisKey] 1327for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey] 1328var adjustment=waypoint.options.offset 1329var oldTriggerPoint=waypoint.triggerPoint 1330var elementOffset=0 1331var freshWaypoint=oldTriggerPoint==null 1332var contextModifier,wasBeforeScroll,nowAfterScroll 1333var triggeredBackward,triggeredForward 1334if(waypoint.element!==waypoint.element.window){elementOffset=waypoint.adapter.offset()[axis.offsetProp]} 1335if(typeof adjustment==='function'){adjustment=adjustment.apply(waypoint)} 1336else if(typeof adjustment==='string'){adjustment=parseFloat(adjustment) 1337if(waypoint.options.offset.indexOf('%')>-1){adjustment=Math.ceil(axis.contextDimension*adjustment/100)}} 1338contextModifier=axis.contextScroll-axis.contextOffset 1339waypoint.triggerPoint=Math.floor(elementOffset+contextModifier-adjustment) 1340wasBeforeScroll=oldTriggerPoint<axis.oldScroll 1341nowAfterScroll=waypoint.triggerPoint>=axis.oldScroll 1342triggeredBackward=wasBeforeScroll&&nowAfterScroll 1343triggeredForward=!wasBeforeScroll&&!nowAfterScroll 1344if(!freshWaypoint&&triggeredBackward){waypoint.queueTrigger(axis.backward) 1345triggeredGroups[waypoint.group.id]=waypoint.group} 1346else if(!freshWaypoint&&triggeredForward){waypoint.queueTrigger(axis.forward) 1347triggeredGroups[waypoint.group.id]=waypoint.group} 1348else if(freshWaypoint&&axis.oldScroll>=waypoint.triggerPoint){waypoint.queueTrigger(axis.forward) 1349triggeredGroups[waypoint.group.id]=waypoint.group}}} 1350Waypoint.requestAnimationFrame(function(){for(var groupKey in triggeredGroups){triggeredGroups[groupKey].flushTriggers()}}) 1351return this} 1352Context.findOrCreateByElement=function(element){return Context.findByElement(element)||new Context(element)} 1353Context.refreshAll=function(){for(var contextId in contexts){contexts[contextId].refresh()}} 1354Context.findByElement=function(element){return contexts[element.waypointContextKey]} 1355window.onload=function(){if(oldWindowLoad){oldWindowLoad()} 1356Context.refreshAll()} 1357Waypoint.requestAnimationFrame=function(callback){var requestFn=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||requestAnimationFrameShim 1358requestFn.call(window,callback)} 1359Waypoint.Context=Context}());(function(){'use strict' 1360function byTriggerPoint(a,b){return a.triggerPoint-b.triggerPoint} 1361function byReverseTriggerPoint(a,b){return b.triggerPoint-a.triggerPoint} 1362var groups={vertical:{},horizontal:{}} 1363var Waypoint=window.Waypoint 1364function Group(options){this.name=options.name 1365this.axis=options.axis 1366this.id=this.name+'-'+this.axis 1367this.waypoints=[] 1368this.clearTriggerQueues() 1369groups[this.axis][this.name]=this} 1370Group.prototype.add=function(waypoint){this.waypoints.push(waypoint)} 1371Group.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}} 1372Group.prototype.flushTriggers=function(){for(var direction in this.triggerQueues){var waypoints=this.triggerQueues[direction] 1373var reverse=direction==='up'||direction==='left' 1374waypoints.sort(reverse?byReverseTriggerPoint:byTriggerPoint) 1375for(var i=0,end=waypoints.length;i<end;i+=1){var waypoint=waypoints[i] 1376if(waypoint.options.continuous||i===waypoints.length-1){waypoint.trigger([direction])}}} 1377this.clearTriggerQueues()} 1378Group.prototype.next=function(waypoint){this.waypoints.sort(byTriggerPoint) 1379var index=Waypoint.Adapter.inArray(waypoint,this.waypoints) 1380var isLast=index===this.waypoints.length-1 1381return isLast?null:this.waypoints[index+1]} 1382Group.prototype.previous=function(waypoint){this.waypoints.sort(byTriggerPoint) 1383var index=Waypoint.Adapter.inArray(waypoint,this.waypoints) 1384return index?this.waypoints[index-1]:null} 1385Group.prototype.queueTrigger=function(waypoint,direction){this.triggerQueues[direction].push(waypoint)} 1386Group.prototype.remove=function(waypoint){var index=Waypoint.Adapter.inArray(waypoint,this.waypoints) 1387if(index>-1){this.waypoints.splice(index,1)}} 1388Group.prototype.first=function(){return this.waypoints[0]} 1389Group.prototype.last=function(){return this.waypoints[this.waypoints.length-1]} 1390Group.findOrCreate=function(options){return groups[options.axis][options.name]||new Group(options)} 1391Waypoint.Group=Group}());(function(){'use strict' 1392var $=window.jQuery 1393var Waypoint=window.Waypoint 1394function JQueryAdapter(element){this.$element=$(element)}
1395$.each(['innerHeight','innerWidth','off','offset','on','outerHeight','outerWidth','scrollLeft','scrollTop'],function(i,method){JQueryAdapter.prototype[method]=function(){var args=Array.prototype.slice.call(arguments) 1396return this.$element[method].apply(this.$element,args)}}) 1397$.each(['extend','inArray','isEmptyObject'],function(i,method){JQueryAdapter[method]=$[method]}) 1398Waypoint.adapters.push({name:'jquery',Adapter:JQueryAdapter}) 1399Waypoint.Adapter=JQueryAdapter}());(function(){'use strict' 1400var Waypoint=window.Waypoint 1401function createExtension(framework){return function(){var waypoints=[] 1402var overrides=arguments[0] 1403if(framework.isFunction(arguments[0])){overrides=framework.extend({},arguments[1]) 1404overrides.handler=arguments[0]} 1405this.each(function(){var options=framework.extend({},overrides,{element:this}) 1406if(typeof options.context==='string'){options.context=framework(this).closest(options.context)[0]} 1407waypoints.push(new Waypoint(options))}) 1408return waypoints}} 1409if(window.jQuery){window.jQuery.fn.waypoint=createExtension(window.jQuery)} 1410if(window.Zepto){window.Zepto.fn.waypoint=createExtension(window.Zepto)}}()); 1411/*! 1412Waypoints Inview Shortcut - 4.0.1 1413Copyright © 2011-2016 Caleb Troughton 1414Licensed under the MIT license. 1415https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 1416*/ 1417(function(){'use strict' 1418function noop(){} 1419var Waypoint=window.Waypoint 1420function Inview(options){this.options=Waypoint.Adapter.extend({},Inview.defaults,options) 1421this.axis=this.options.horizontal?'horizontal':'vertical' 1422this.waypoints=[] 1423this.element=this.options.element 1424this.createWaypoints()} 1425Inview.prototype.createWaypoints=function(){var configs={vertical:[{down:'enter',up:'exited',offset:'100%'},{down:'entered',up:'exit',offset:'bottom-in-view'},{down:'exit',up:'entered',offset:0},{down:'exited',up:'enter',offset:function(){return-this.adapter.outerHeight()}}],horizontal:[{right:'enter',left:'exited',offset:'100%'},{right:'entered',left:'exit',offset:'right-in-view'},{right:'exit',left:'entered',offset:0},{right:'exited',left:'enter',offset:function(){return-this.adapter.outerWidth()}}]} 1426for(var i=0,end=configs[this.axis].length;i<end;i++){var config=configs[this.axis][i] 1427this.createWaypoint(config)}} 1428Inview.prototype.createWaypoint=function(config){var self=this 1429this.waypoints.push(new Waypoint({context:this.options.context,element:this.options.element,enabled:this.options.enabled,handler:(function(config){return function(direction){self.options[config[direction]].call(self,direction)}}(config)),offset:config.offset,horizontal:this.options.horizontal}))} 1430Inview.prototype.destroy=function(){for(var i=0,end=this.waypoints.length;i<end;i++){this.waypoints[i].destroy()} 1431this.waypoints=[]} 1432Inview.prototype.disable=function(){for(var i=0,end=this.waypoints.length;i<end;i++){this.waypoints[i].disable()}} 1433Inview.prototype.enable=function(){for(var i=0,end=this.waypoints.length;i<end;i++){this.waypoints[i].enable()}} 1434Inview.defaults={context:window,enabled:true,enter:noop,entered:noop,exit:noop,exited:noop} 1435Waypoint.Inview=Inview}());(function($){var menuTrees=[],IE=!!window.createPopup,IElt9=IE&&!document.defaultView,IElt8=IE&&!document.querySelector,IE6=IE&&typeof document.documentElement.currentStyle.minWidth=='undefined',mouse=false,mouseDetectionEnabled=false;function initMouseDetection(disable){if(!mouseDetectionEnabled&&!disable){var firstTime=true,lastMove=null;$(document).bind({'mousemove.smartmenus_mouse':function(e){var thisMove={x:e.pageX,y:e.pageY,timeStamp:new Date().getTime()};if(lastMove){var deltaX=Math.abs(lastMove.x-thisMove.x),deltaY=Math.abs(lastMove.y-thisMove.y);if((deltaX>0||deltaY>0)&&deltaX<=2&&deltaY<=2&&thisMove.timeStamp-lastMove.timeStamp<=300){mouse=true;if(firstTime){var $a=$(e.target).closest('a');if($a.is('a')){$.each(menuTrees,function(){if($.contains(this.$root[0],$a[0])){this.itemEnter({currentTarget:$a[0]});return false;}});} 1436firstTime=false;}}} 1437lastMove=thisMove;},'touchstart.smartmenus_mouse pointerover.smartmenus_mouse MSPointerOver.smartmenus_mouse':function(e){if(!/^(4|mouse|pen)$/.test(e.originalEvent.pointerType)){mouse=false;}}});mouseDetectionEnabled=true;}else if(mouseDetectionEnabled&&disable){$(document).unbind('.smartmenus_mouse');mouseDetectionEnabled=false;}};$.SmartMenus=function(elm,options){this.$root=$(elm);this.opts=options;this.rootId='';this.$subArrow=null;this.subMenus=[];this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=false;this.zIndexInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=false;this.$disableOverlay=null;this.lastLevel=0;this.init();};$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll();});},destroy:function(){while(menuTrees.length){menuTrees[0].destroy();} 1438initMouseDetection(true);},prototype:{init:function(refresh){var self=this;if(!refresh){menuTrees.push(this);this.rootId=(new Date().getTime()+Math.random()+'').replace(/\D/g,'');if(this.$root.hasClass('sm-rtl')){this.opts.rightToLeftSubMenus=true;} 1439this.$root.data('smartmenus',this).attr('data-smartmenus-id',this.rootId).dataSM('level',1).bind({'mouseover.smartmenus':$.proxy(this.rootOver,this),'mouseout.smartmenus':$.proxy(this.rootOut,this)}).delegate('a, div.logo-container',{'mouseenter.smartmenus':$.proxy(this.itemEnter,this),'mouseleave.
1439smartmenus':$.proxy(this.itemLeave,this),'mousedown.smartmenus':$.proxy(this.itemDown,this),'focus.smartmenus':$.proxy(this.itemFocus,this),'blur.smartmenus':$.proxy(this.itemBlur,this),'click.smartmenus':$.proxy(this.itemClick,this),'touchend.smartmenus':$.proxy(this.itemTouchEnd,this)});var eNamespace='.smartmenus'+this.rootId;if(this.opts.hideOnClick){$(document).on('touchstart'+eNamespace,$.proxy(this.docTouchStart,this)).on('touchmove'+eNamespace,$.proxy(this.docTouchMove,this)).on('touchend'+eNamespace,$.proxy(this.docTouchEnd,this)).on('click'+eNamespace,$.proxy(this.docClick,this));} 1440$(window).on('resize'+eNamespace+' orientationchange'+eNamespace,$.proxy(this.winResize,this));var $vmenu=$('body.vmenu .vmenu-container');if(!$vmenu.length&&UNCODE.wwidth>UNCODE.mediaQuery){$(window).on('scroll'+eNamespace+' orientationchange'+eNamespace,$.proxy(this.winResize,this));} 1441if(this.opts.subIndicators){this.$subArrow=$('<span/>').addClass('sub-arrow');if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText);}} 1442initMouseDetection();} 1443this.$firstSub=this.$root.find('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').each(function(){self.menuInit($(this));}).eq(0);this.$firstLink=this.$root.find('a').eq(0);if(this.opts.markCurrentItem){var reDefaultDoc=/(index|default)\.[^#\?\/]*/i,reHash=/#.*/,locHref=window.location.href.replace(reDefaultDoc,''),locHrefNoHash=locHref.replace(reHash,'');this.$root.find('a').each(function(){var href=this.href.replace(reDefaultDoc,''),$this=$(this);if(href==locHref||href==locHrefNoHash){$this.addClass('current');if(self.opts.markCurrentTree){$this.parents('li').each(function(){var $this=$(this);if($this.dataSM('sub')){$this.children('a').addClass('current');}});}}});}},destroy:function(){this.menuHideAll();this.$root.removeData('smartmenus').removeAttr('data-smartmenus-id').removeDataSM('level').unbind('.smartmenus').undelegate('.smartmenus');var eNamespace='.smartmenus'+this.rootId;$(document).unbind(eNamespace);$(window).unbind(eNamespace);if(this.opts.subIndicators){this.$subArrow=null;} 1444var self=this;$.each(this.subMenus,function(){if(this.hasClass('mega-menu')){this.find('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').removeDataSM('in-mega');} 1445if(this.dataSM('shown-before')){if(IElt8){this.children().css({styleFloat:'',width:''});} 1446if(self.opts.subMenusMinWidth||self.opts.subMenusMaxWidth){if(!IE6){this.css({width:'',minWidth:'',maxWidth:''}).removeClass('sm-nowrap');}else{this.css({width:'',overflowX:'',overflowY:''}).children().children('a').css('white-space','');}} 1447if(this.dataSM('scroll-arrows')){this.dataSM('scroll-arrows').remove();} 1448this.css({zIndex:'',top:'',left:'',marginLeft:'',marginTop:'',display:''});} 1449if(self.opts.subIndicators){this.dataSM('parent-a').removeClass('has-submenu').children('span.sub-arrow').remove();} 1450this.removeDataSM('shown-before').removeDataSM('ie-shim').removeDataSM('scroll-arrows').removeDataSM('parent-a').removeDataSM('level').removeDataSM('beforefirstshowfired').parent().removeDataSM('sub');});if(this.opts.markCurrentItem){this.$root.find('a.current').removeClass('current');} 1451this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null;} 1452menuTrees.splice($.inArray(this,menuTrees),1);},disable:function(noOverlay){if(!this.disabled){this.menuHideAll();if(!noOverlay&&!this.opts.isPopup&&this.$root.is(':visible')){var pos=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:'absolute',top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex()+1,opacity:0}).appendTo(document.body);} 1453this.disabled=true;}},docClick:function(e){if(this.visibleSubMenus.length&&!$.contains(this.$root[0],e.target)||$(e.target).is('a:not([data-filter])')){this.menuHideAll($(e.target));}},docTouchEnd:function(e){if(!this.lastTouch){return;} 1454if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!$.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0;} 1455var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll($(e.target));},350);} 1456this.lastTouch=null;},docTouchMove:function(e){if(!this.lastTouch){return;} 1457var touchPoint=e.originalEvent.touches[0];this.lastTouch.x2=touchPoint.pageX;this.lastTouch.y2=touchPoint.pageY;},docTouchStart:function(e){var touchPoint=e.originalEvent.touches[0];this.lastTouch={x1:touchPoint.pageX,y1:touchPoint.pageY,target:touchPoint.target};},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null;} 1458this.disabled=false;}},getHeight:function($elm){return this.getOffset($elm,true);},getOffset:function($elm,height){var old,$win=$(window),winW=$win.width();if($elm.css('display')=='none'){old={position:$elm[0].style.position,visibility:$elm[0].style.visibility};$elm.css({position:'absolute',visibility:'hidden'}).show();if(($('body').hasClass('menu-mobile-off-canvas')&&winW<960&&$elm.closest('.main-menu-container').length)||(($('body').hasClass('vmenu-offcanvas-overlay')||$('body').hasClass('vmenu'))&&winW>=960&&$elm.closest('.main-menu-container').length&&!$elm.closest('.menu-horizontal-inner').length)){$elm.closest('li').addClass('smartmenu-open-item');}} 1459var defaultView=$elm[0].ownerDocument.defaultView,compStyle=defaultView&&defaultView.getComputedStyle&&defaultView.getComputedStyle($elm[0],null),val=compStyle&&parseFloat(compStyle[height?'height':'width']);if(val){val+=parseFloat(compStyle[height?'paddingTop':'paddingLeft']) 1460+parseFloat(compStyle[height?'paddingBottom':'paddingRight']) 1461+parseInt(compStyle[height?'borderTopWidth':'borderLeftWidth']) 1462+parseInt(compStyle[height?'borderBottomWidth':'borderRightWidth']);}else{val=height?$elm[0].offsetHeight:$elm[0].offsetWidth;} 1463if(old){$elm.hide().css(old);} 1464return val;},getWidth:function($elm){return this.getOffset($elm);},getStartZIndex:function(){var zIndex=parseInt(this.$root.css('z-index'));return!isNaN(zIndex)?zIndex:1;},handleEvents:function(){return!this.disabled&&this.isCSSOn();},handleItemEvents:function($a){return this.handleEvents()&&!this.isLinkInMegaMenu($a);},isCollapsible:function(){return this.$firstSub.css('position')=='static';},isCSSOn:function(){return this.$firstLink.css('display')=='block'||this.$firstLink.css('display')=='flex'||this.$firstLink.css('display')=='inline-flex'||this.$firstLink.css('display')=='table-cell'||this.$firstLink.css('display')=='inline';},isFixed:function(){return this.$root.css('position')=='fixed';},isLinkInMegaMenu:function($a){return!$a.parent().parent().dataSM('level');},isTouchMode:function(){return!mouse||this.isCollapsible();},itemActivate:function($a,$show){var $li=$a.parent(),$ul=$li.parent(),level=$ul.dataSM('level'),winh=$(window).height();if(level>1&&(!this.activatedItems[level-2]||this.activatedItems[level-2][0]!=$ul.dataSM('parent-a')[0])){var self=this;$($ul.parentsUntil('[data-smartmenus-id]','ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').get().reverse()).add($ul).each(function(){self.itemActivate($(this).dataSM('parent-a'));});} 1465if(this.visibleSubMenus.length>level){for(var i=this.visibleSubMenus.length-1,l=!this.activatedItems[level-1]||this.activatedItems[level-1][0]!=$a[0]?level-1:level;i>l;i--){this.lastLevel=level;if(typeof $show==='undefined'&&this.isCollapsible()){this.menuHide(this.visibleSubMenus[i],$a);return;}else{this.menuHide(this.visibleSubMenus[i]);}}
1465} 1466this.activatedItems[level-1]=$a;this.visibleSubMenus[level-1]=$ul;if(this.$root.triggerHandler('activate.smapi',$a[0])===false){return;} 1467var $sub=$li.dataSM('sub');if($sub&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){var aRect=$a[0].getBoundingClientRect();if((aRect.y<0||aRect.y>winh)&&this.isCollapsible()&&(this.lastLevel===this.activatedItems.length)){setTimeout(function(){var currentScroll=$a.closest('.main-menu-container').scrollTop();$a.closest('.main-menu-container').scrollTop(currentScroll+aRect.y);},1);} 1468this.menuShow($sub);}},itemBlur:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1469this.$root.triggerHandler('blur.smapi',$a[0]);},itemClick:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1470$a.removeDataSM('mousedown');if(this.$root.triggerHandler('click.smapi',$a[0])===false){return false;} 1471var $sub=$a.parent().dataSM('sub');if(this.isTouchMode()){if($a.dataSM('href')){$a.attr('href',$a.dataSM('href')).removeDataSM('href');} 1472if($sub&&(!$sub.dataSM('shown-before')||!$sub.is(':visible'))){this.itemActivate($a);if($sub.is(':visible')){return false;}}}else if(this.opts.showOnClick&&$a.parent().parent().dataSM('level')==1&&$sub){this.clickActivated=true;this.menuShow($sub);return false;} 1473if($a.hasClass('disabled')){return false;} 1474if(this.$root.triggerHandler('select.smapi',$a[0])===false){return false;}},itemDown:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1475$a.dataSM('mousedown',true);},itemEnter:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1476if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0;} 1477var self=this;this.showTimeout=setTimeout(function(){self.itemActivate($a);},this.opts.showOnClick&&$a.parent().parent().dataSM('level')==1?1:this.opts.showTimeout);} 1478this.$root.triggerHandler('mouseenter.smapi',$a[0]);},itemFocus:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1479if((!this.isTouchMode()||!$a.dataSM('mousedown'))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=$a[0])){this.itemActivate($a);} 1480this.$root.triggerHandler('focus.smapi',$a[0]);},itemLeave:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1481if(!this.isTouchMode()){if($a[0].blur){$a[0].blur();} 1482if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0;}} 1483$a.removeDataSM('mousedown');this.$root.triggerHandler('mouseleave.smapi',$a[0]);},itemTouchEnd:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return;} 1484var $sub=$a.parent().dataSM('sub');if($a.attr('href').charAt(0)!=='#'&&$sub&&(!$sub.dataSM('shown-before')||!$sub.is(':visible'))){$a.dataSM('href',$a.attr('href'));$a.attr('href','#');}},menuFixLayout:function($ul){if(!$ul.dataSM('shown-before')){$ul.hide().dataSM('shown-before',true);if(IElt8){$ul.children().css({styleFloat:'left',width:'100%'});}}},menuHide:function($sub,$show){if(this.$root.triggerHandler('beforehide.smapi',$sub[0])===false){return;} 1485$sub.stop(true,true);if($sub.is(':visible')){var self=this;var complete=function(){if(IElt9){$sub.parent().css('z-index','');}else{$sub.css('z-index','');} 1486if(typeof $show!=='undefined'){self.itemActivate($show,true)}};if(this.isCollapsible()){if(this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,$sub,complete);}else{$sub.hide(this.opts.collapsibleHideDuration,complete);}}else{if(this.opts.hideFunction){this.opts.hideFunction.call(this,$sub,complete);}else{$sub.hide(this.opts.hideDuration,complete);}} 1487if($sub.dataSM('ie-shim')){$sub.dataSM('ie-shim').remove();} 1488if($sub.dataSM('scroll')){$sub.unbind('.smartmenus_scroll').removeDataSM('scroll').dataSM('scroll-arrows').hide();} 1489$sub.dataSM('parent-a').removeClass('highlighted');var level=$sub.dataSM('level');this.activatedItems.splice(level-1,1);this.visibleSubMenus.splice(level-1,1);this.$root.triggerHandler('hide.smapi',$sub[0]);}},menuHideAll:function($item){if($item!=undefined&&$item.parent().hasClass('menu-item')&&!$item.parent().hasClass('menu-item-has-children'))return;var $win=$(window),winW=$win.width();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0;} 1490for(var i=this.visibleSubMenus.length-1;i>0;i--){if(this.visibleSubMenus[i].closest('.smartmenu-open-item').length){if($item!=undefined&&$item.closest('.smartmenu-open-item').length){this.menuHide(this.visibleSubMenus[i]);$(this.visibleSubMenus[i]).closest('.smartmenu-open-item').removeClass('smartmenu-open-item');}else{return;}}else{this.menuHide(this.visibleSubMenus[i]);}}
1490 1491if(this.opts.isPopup){this.$root.stop(true,true);if(this.$root.is(':visible')){if(this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root);}else{this.$root.hide(this.opts.hideDuration);} 1492if(this.$root.dataSM('ie-shim')){this.$root.dataSM('ie-shim').remove();}}} 1493this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=false;this.zIndexInc=0;},menuIframeShim:function($ul){if(IE&&this.opts.overlapControlsInIE&&!$ul.dataSM('ie-shim')){$ul.dataSM('ie-shim',$('<iframe/>').attr({src:'javascript:0',tabindex:-9}).css({position:'absolute',top:'auto',left:'0',opacity:0,border:'0'}));}},menuInit:function($ul){if(!$ul.dataSM('in-mega')){this.subMenus.push($ul);if($ul.hasClass('mega-menu')){$ul.find('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').dataSM('in-mega',true);} 1494var level=2,par=$ul[0];while(par!=null&&par.parentNode!=null&&(par=par.parentNode.parentNode)!=this.$root[0]){level++;} 1495$ul.dataSM('parent-a',$ul.prevAll('a').eq(-1)).dataSM('level',level).parent().dataSM('sub',$ul);if(this.opts.subIndicators){$ul.dataSM('parent-a').addClass('has-submenu')[this.opts.subIndicatorsPos](this.$subArrow.clone());}} 1496if($('.vc_row[data-parent].has-bg',$ul).length&&!$('.vc_row[data-parent]:not(.has-bg)',$ul).length){$ul.addClass('has-bg-items');}},menuPosition:function($sub){var fixIE=$('html.ie').length;var $a=$sub.dataSM('parent-a'),$li=$sub.parent(),$ul=$sub.parent().parent(),$container=$ul.closest('.row-menu-inner').length?($('body').hasClass('megamenu-side-to-side')?$ul.closest('.row-menu'):$ul.closest('.row-menu-inner')):$ul.closest('.uncol'),level=$sub.dataSM('level'),subW=this.getWidth($sub),subH=this.getHeight($sub),itemOffset=$a.offset(),itemX=itemOffset.left,itemY=itemOffset.top,itemW=this.getWidth($a),itemH=this.getHeight($a),$win=$(window),winX=$win.scrollLeft(),winY=$win.scrollTop(),winW=$win.width(),winH=$win.height(),containerW=$container.width(),containerOffsetX=containerW+((winW-containerW)/2),horizontalParent=$ul.hasClass('sm')&&!$ul.hasClass('sm-vertical'),subOffsetX=level==2?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,subOffsetY=level==2?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY,x,y,leftPos;if(horizontalParent){x=this.opts.rightToLeftSubMenus?itemW-subW-subOffsetX:subOffsetX;y=this.opts.bottomToTopSubMenus?-subH-subOffsetY:itemH+subOffsetY;}else{x=this.opts.rightToLeftSubMenus?subOffsetX-subW:subW-subOffsetX;y=this.opts.bottomToTopSubMenus?itemH-subOffsetY-subH:subOffsetY;} 1497if(this.opts.keepInViewport&&!this.isCollapsible()){if(this.isFixed()){itemX-=winX;itemY-=winY;winX=winY=0;} 1498var absX=itemX+x,absY=itemY+y;if(this.opts.rightToLeftSubMenus&&absX<winX){x=horizontalParent?winX-absX+x:itemW-subOffsetX;}else if(!this.opts.rightToLeftSubMenus&&absX+subW>winX+containerOffsetX){x=horizontalParent?winX+containerOffsetX-subW-absX+x:subOffsetX-subW;} 1499if(!horizontalParent){if(subH<winH&&absY+subH>winY+winH){y+=winY+winH-subH-absY;}else if(subH>=winH||absY<winY){y+=winY-absY;}} 1500if(mouse&&(horizontalParent&&(absY+subH>winY+winH+0.49||absY<winY)||!horizontalParent&&subH>winH+0.49)){var self=this;if(!$sub.dataSM('scroll-arrows')){$sub.dataSM('scroll-arrows',$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){self.menuScroll($sub,$(this).hasClass('scroll-up'));},mouseleave:function(e){self.menuScrollStop($sub);self.menuScrollOut($sub,e);},'mousewheel DOMMouseScroll':function(e){e.preventDefault();}}).insertAfter($sub));} 1501var vportY=winY-(itemY+itemH);$sub.dataSM('scroll',{vportY:vportY,subH:subH,winH:winH,step:1}).bind({'mouseover.smartmenus_scroll':function(e){self.menuScrollOver($sub,e);},'mouseout.smartmenus_scroll':function(e){self.menuScrollOut($sub,e);},'mousewheel.smartmenus_scroll DOMMouseScroll.smartmenus_scroll':function(e){self.menuScrollMousewheel($sub,e);}}).dataSM('scroll-arrows').css({top:'auto',left:'0',marginLeft:x+(parseInt($sub.css('border-left-width'))||0),width:this.getWidth($sub)-(parseInt($sub.css('border-left-width'))||0)-(parseInt($sub.css('border-right-width'))||0),zIndex:this.getStartZIndex()+this.zIndexInc}).eq(0).css('margin-top',vportY).end().eq(1).css('margin-top',vportY+winH-this.getHeight($sub.dataSM('scroll-arrows').eq(1))).end().eq(horizontalParent&&this.opts.bottomToTopSubMenus?0:1).show();}} 1502if(!$sub.closest('.menu-accordion').length){var rightPos='auto';if($sub.closest('.grid-filters').length){if($sub.closest('.text-right').length){leftPos='0px';rightPos='auto';}else{leftPos='auto';rightPos='0px';} 1503x=0;}else{if($sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)').length&&$sub.closest('.row-menu').is('.limit-width')&&level===2){var parentContW=$sub.closest('.menu-container').width();$sub.css({width:parentContW});$sub.addClass('need-focus');leftPos=-1*(parseFloat($sub.closest('ul.menu-smart').offset().left)-parseFloat($sub.closest('.menu-container').offset().left));x=0;}else if($sub.hasClass('mega-menu-inner')||$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)').length){$sub.css({width:containerW});$sub.addClass('need-focus');leftPos=-1*(parseFloat($sub.closest('ul.menu-smart').offset().left)-parseFloat($sub.closest('.row-menu').offset().left));if(!$('body').hasClass('megamenu-side-to-side')){leftPos+=parseFloat($sub.closest('.row-menu-inner').css('paddingLeft'));} 1504x=0;}else{if($sub.is('.block-wrapper-parent')&&!$sub.find('.col-custom-width').length&&!$sub.find('.row-parent-limit').length&&level===2){leftPos=($li.position().left-((UNCODE.wwidth-$sub.outerWidth())/2))+'px';}else{leftPos=(level>2?$li.position().left-parseFloat($li.closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').css('paddingLeft')):$li.position().left)+'px';} 1505x=(level>2&&x>=0)?x+1:x-1;}}} 1506$sub.css({top:(level>2)?$a[0].offsetTop:(fixIE?itemH:'100%'),left:leftPos,right:rightPos,marginLeft:x,marginTop:(level>2)?0:y-itemH+($sub.closest('.menu-borders').length&&!$sub.closest('.menu-borders.needs-after').length?1:0)});this.menuIframeShim($sub);if($sub.dataSM('ie-shim')){$sub.dataSM('ie-shim').css({zIndex:$sub.css('z-index'),width:subW,height:subH,marginLeft:x,marginTop:y-itemH+($sub.closest('.menu-mini').length?0:1)});}},menuScroll:function($sub,up,wheel){var y=parseFloat($sub.css('margin-top')),scroll=$sub.dataSM('scroll'),navH=$('.navbar-main').outerHeight(),end=scroll.vportY+(up?navH+54:scroll.winH-scroll.subH),step=wheel||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor($sub.dataSM('scroll').step);
1506$sub.add($sub.dataSM('ie-shim')).css('margin-top',Math.abs(end-y)>step?y+(up?step:-step):end);y=parseFloat($sub.css('margin-top'));if(up&&y+scroll.subH>scroll.vportY+scroll.winH||!up&&y<scroll.vportY){$sub.dataSM('scroll-arrows').eq(up?1:0).show();} 1507if(!wheel&&this.opts.scrollAccelerate&&$sub.dataSM('scroll').step<this.opts.scrollStep){$sub.dataSM('scroll').step+=0.5;} 1508if(Math.abs(y-end)<1){$sub.dataSM('scroll-arrows').eq(up?0:1).hide();$sub.dataSM('scroll').step=1;}else if(!wheel){var self=this;this.scrollTimeout=setTimeout(function(){self.menuScroll($sub,up);},this.opts.scrollInterval);}},menuScrollMousewheel:function($sub,e){var $closestSub=$(e.target).closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');while($closestSub.dataSM('in-mega')){$closestSub=$closestSub.parent().closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');} 1509if($closestSub[0]==$sub[0]){var up=(e.originalEvent.wheelDelta||-e.originalEvent.detail)>0;if($sub.dataSM('scroll-arrows').eq(up?0:1).is(':visible')){this.menuScroll($sub,up,true);}} 1510if(!$sub.hasClass('mega-menu-inner')&&!$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)')){e.preventDefault();}},menuScrollOut:function($sub,e){var reClass=/^scroll-(up|down)/,$closestSub=$(e.relatedTarget).closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');while($closestSub.dataSM('in-mega')){$closestSub=$closestSub.parent().closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');} 1511if(!reClass.test((e.relatedTarget||'').className)&&($sub[0]!=e.relatedTarget&&!$.contains($sub[0],e.relatedTarget)||$closestSub[0]!=$sub[0])){$sub.dataSM('scroll-arrows').css('visibility','hidden');}},menuScrollOver:function($sub,e){var reClass=/^scroll-(up|down)/,$closestSub=$(e.target).closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');while($closestSub.dataSM('in-mega')){$closestSub=$closestSub.parent().closest('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)');} 1512if(!reClass.test(e.target.className)&&$closestSub[0]==$sub[0]){$sub.dataSM('scroll-arrows').css('visibility','visible');}},menuScrollStop:function($sub){if(this.scrollTimeout){clearTimeout(this.scrollTimeout);this.scrollTimeout=0;$sub.dataSM('scroll').step=1;}},menuShow:function($sub){if(!$sub.dataSM('beforefirstshowfired')){$sub.dataSM('beforefirstshowfired',true);if(this.$root.triggerHandler('beforefirstshow.smapi',$sub[0])===false){return;}} 1513if(this.isCollapsible()){this.$root.triggerHandler('beforecollapse.smapi',$sub[0]);} 1514if(this.$root.triggerHandler('beforeshow.smapi',$sub[0])===false){return;} 1515this.menuFixLayout($sub);$sub.stop(true,true);if(!$sub.is(':visible')){$sub.css({'visibility':'visible','pointer-events':'auto',});var zIndex=this.getStartZIndex()+(++this.zIndexInc);if(IElt9){$sub.parent().css('z-index',zIndex);}else{$sub.css('z-index',zIndex);} 1516if(this.opts.keepHighlighted||this.isCollapsible()){if($sub.dataSM('parent-a').attr('data-type')!='title') 1517$sub.dataSM('parent-a').addClass('highlighted');} 1518if(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth){if(!IElt8){$sub.css({width:($sub.hasClass('mega-menu-inner')||$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)'))?$('.box-container').outerWidth()+'px':'auto',minWidth:'',maxWidth:''}).addClass('sm-nowrap');if(this.opts.subMenusMinWidth){$sub.css('min-width',this.opts.subMenusMinWidth);} 1519if(this.opts.subMenusMaxWidth){var noMaxWidth=this.getWidth($sub);if(!$sub.hasClass('mega-menu-inner')&&!$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)')){$sub.css('max-width',this.opts.subMenusMaxWidth);} 1520if(noMaxWidth>this.getWidth($sub)){$sub.removeClass('sm-nowrap').css('width',this.opts.subMenusMaxWidth);}}}else{$sub.children().css('styleFloat','none');if(IE6){$sub.width(this.opts.subMenusMinWidth?this.opts.subMenusMinWidth:1).children().children('a').css('white-space','nowrap');}else{$sub.css({width:($sub.hasClass('mega-menu-inner')||$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)'))?$('.box-container').outerWidth()+'px':'auto',minWidth:'',maxWidth:''}).addClass('sm-nowrap');if(this.opts.subMenusMinWidth){$sub.css('min-width',this.opts.subMenusMinWidth);}} 1521if(this.opts.subMenusMaxWidth){var noMaxWidth=$sub.width();if(IE6){var maxWidth=$sub.css({width:this.opts.subMenusMaxWidth,overflowX:'hidden',overflowY:'hidden'}).width();if(noMaxWidth>maxWidth){$sub.css({width:maxWidth,overflowX:'visible',overflowY:'visible'}).children().children('a').css('white-space','');}
1521else{$sub.css({width:noMaxWidth,overflowX:'visible',overflowY:'visible'});}}else{if(!$sub.hasClass('mega-menu-inner')&&!$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)')){$sub.css('max-width',this.opts.subMenusMaxWidth);} 1522if(noMaxWidth>$sub.width()){$sub.removeClass('sm-nowrap').css('width',this.opts.subMenusMaxWidth);}else{$sub.width(noMaxWidth);}}}else{$sub.width($sub.width());} 1523$sub.children().css('styleFloat','left');}} 1524if(((($sub.hasClass('mega-menu-inner')||$sub.find('[data-parent="true"]:not(.limit-width):not(.row-parent-limit)'))&&$('body').hasClass('scrollable-megamenu')))&&UNCODE.wwidth>UNCODE.mediaQuery){var $nav=$('.navbar-main'),navH=0,navTop=0,$vmenu=$('body.vmenu .vmenu-container, body.menu-overlay .vmenu-container, body.menu-offcanvas .vmenu-container');if($nav.length&&typeof $nav[0]!=='undefined'){var navRect=$nav[0].getBoundingClientRect();navH=navRect.height;navTop=navRect.top;} 1525if(!$vmenu.length){$sub.css({maxHeight:UNCODE.wheight-navH});if($('.megamenu-block-wrapper',$sub).length){$sub.find('> li').addClass('has-scroll').css({maxHeight:UNCODE.wheight-navH});}}} 1526this.menuPosition($sub);if($sub.dataSM('ie-shim')){$sub.dataSM('ie-shim').insertBefore($sub);} 1527var complete=function(){$sub.css('overflow','');};if(this.isCollapsible()){if(this.opts.collapsibleShowFunction){this.opts.collapsibleShowFunction.call(this,$sub,complete);}else{$sub.show(this.opts.collapsibleShowDuration,complete);}}else{if(this.opts.showFunction){this.opts.showFunction.call(this,$sub,complete);}else{$sub.show(this.opts.showDuration,complete);}} 1528this.visibleSubMenus[$sub.dataSM('level')-1]=$sub;this.$root.triggerHandler('show.smapi',$sub[0]);}},popupHide:function(noHideTimeout){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0;} 1529var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll();},noHideTimeout?1:this.opts.hideTimeout);},popupShow:function(left,top){if(!this.opts.isPopup){alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');return;} 1530if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0;} 1531this.menuFixLayout(this.$root);this.$root.stop(true,true);if(!this.$root.is(':visible')){this.$root.css({left:left,top:top});this.menuIframeShim(this.$root);if(this.$root.dataSM('ie-shim')){this.$root.dataSM('ie-shim').css({zIndex:this.$root.css('z-index'),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:left,top:top}).insertBefore(this.$root);} 1532if(this.opts.showFunction){this.opts.showFunction.call(this,this.$root);}else{this.$root.show(this.opts.showDuration);} 1533this.visibleSubMenus[0]=this.$root;}},refresh:function(){this.menuHideAll();this.$root.find('ul:not(.nav-tabs):not(.unmenu-block):not(.unmenu-block *)').each(function(){var $this=$(this);if($this.dataSM('scroll-arrows')){$this.dataSM('scroll-arrows').remove();}}).removeDataSM('in-mega').removeDataSM('shown-before').removeDataSM('ie-shim').removeDataSM('scroll-arrows').removeDataSM('parent-a').removeDataSM('level').removeDataSM('beforefirstshowfired');this.$root.find('a.has-submenu').removeClass('has-submenu').parent().removeDataSM('sub');if(this.opts.subIndicators){this.$root.find('span.sub-arrow').remove();} 1534if(this.opts.markCurrentItem){this.$root.find('a.current').removeClass('current');} 1535this.subMenus=[];this.init(true);},rootOut:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0]){return;} 1536if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0;} 1537if(!this.opts.showOnClick||!this.opts.hideOnClick){var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll();},this.opts.hideTimeout);}},rootOver:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0]){return;} 1538if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0;}},winResize:function(e){if(!this.handleEvents()){if(this.$disableOverlay){var pos=this.$root.offset();this.$disableOverlay.css({top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()});} 1539return;} 1540if(!this.isCollapsible()&&(!('onorientationchange'in window)||e.type=='orientationchange')){if(this.activatedItems.length){this.activatedItems[this.activatedItems.length-1][0].blur();} 1541this.menuHideAll();}}}});$.fn.dataSM=function(key,val){if(val){return this.data(key+'_smartmenus',val);} 1542return this.data(key+'_smartmenus');} 1543$.fn.removeDataSM=function(key){return this.removeData(key+'_smartmenus');} 1544$.fn.smartmenus=function(options){if(typeof options=='string'){var args=arguments,method=options;Array.prototype.shift.call(args);return this.each(function(){var smartmenus=$(this).data('smartmenus');if(smartmenus&&smartmenus[method]){smartmenus[method].apply(smartmenus,args);}});} 1545var opts=$.extend({},$.fn.smartmenus.defaults,options);return this.each(function(){new $.SmartMenus(this,opts);});}
1546$.fn.smartmenus.defaults={isPopup:false,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:false,subMenusMaxWidth:false,subIndicators:true,subIndicatorsPos:'prepend',subIndicatorsText:'+',scrollStep:30,scrollInterval:30,scrollAccelerate:true,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function($ul,complete){$ul.fadeOut(200,complete);},collapsibleShowDuration:0,collapsibleShowFunction:function($ul,complete){$ul.slideDown(200,complete);},collapsibleHideDuration:0,collapsibleHideFunction:function($ul,complete){$ul.slideUp(200,complete);},showOnClick:false,hideOnClick:true,keepInViewport:true,keepHighlighted:true,markCurrentItem:false,markCurrentTree:true,rightToLeftSubMenus:false,bottomToTopSubMenus:false,overlapControlsInIE:true};})(jQuery);(function(factory){if(typeof define==="function"&&define.amd){define(['jquery'],function($){return factory($);});}else if(typeof module==="object"&&typeof module.exports==="object"){module.exports=factory(require('jquery'));}else{factory(jQuery);}})(function($){if(typeof $.easing!=='undefined'){$.easing['jswing']=$.easing['swing'];} 1547var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=(2*PI)/3,c5=(2*PI)/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x;}else if(x<2/d1){return n1*(x-=(1.5/d1))*x+.75;}else if(x<2.5/d1){return n1*(x-=(2.25/d1))*x+.9375;}else{return n1*(x-=(2.625/d1))*x+.984375;}} 1548$.extend($.easing,{def:'easeOutQuad',swing:function(x){return $.easing[$.easing.def](x);},easeInQuad:function(x){return x*x;},easeOutQuad:function(x){return 1-(1-x)*(1-x);},easeInOutQuad:function(x){return x<0.5?2*x*x:1-pow(-2*x+2,2)/2;},easeInCubic:function(x){return x*x*x;},easeOutCubic:function(x){return 1-pow(1-x,3);},easeInOutCubic:function(x){return x<0.5?4*x*x*x:1-pow(-2*x+2,3)/2;},easeInQuart:function(x){return x*x*x*x;},easeOutQuart:function(x){return 1-pow(1-x,4);},easeInOutQuart:function(x){return x<0.5?8*x*x*x*x:1-pow(-2*x+2,4)/2;},easeInQuint:function(x){return x*x*x*x*x;},easeOutQuint:function(x){return 1-pow(1-x,5);},easeInOutQuint:function(x){return x<0.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2;},easeInSine:function(x){return 1-cos(x*PI/2);},easeOutSine:function(x){return sin(x*PI/2);},easeInOutSine:function(x){return-(cos(PI*x)-1)/2;},easeInExpo:function(x){return x===0?0:pow(2,10*x-10);},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x);},easeInOutExpo:function(x){return x===0?0:x===1?1:x<0.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2;},easeInCirc:function(x){return 1-sqrt(1-pow(x,2));},easeOutCirc:function(x){return sqrt(1-pow(x-1,2));},easeInOutCirc:function(x){return x<0.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2;},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4);},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-0.75)*c4)+1;},easeInOutElastic:function(x){return x===0?0:x===1?1:x<0.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1;},easeInBack:function(x){return c3*x*x*x-c1*x*x;},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2);},easeInOutBack:function(x){return x<0.5?(pow(2*x,2)*((c2+1)*2*x-c2))/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2;},easeInBounce:function(x){return 1-bounceOut(1-x);},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<0.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2;}});return $;}); 1549/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 1550 * Licensed under the MIT License (LICENSE.txt). 1551 * 1552 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 1553 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 1554 * Thanks to: Seamus Leahy for adding deltaX and deltaY 1555 * 1556 * Version: 3.0.6 1557 * 1558 * Requires: 1.2.2+ 1559 */ 1560(function($){var types=['DOMMouseScroll','mousewheel'];if($.event.fixHooks){for(var i=types.length;i;){$.event.fixHooks[types[--i]]=$.event.mouseHooks;}} 1561$.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var i=types.length;i;){this.addEventListener(types[--i],handler,false);}}else{this.onmousewheel=handler;}},teardown:function(){if(this.removeEventListener){for(var i=types.length;i;){this.removeEventListener(types[--i],handler,false);}}else{this.onmousewheel=null;}}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1
1561),delta=0,returnValue=true,deltaX=0,deltaY=0;event=$.event.fix(orgEvent);event.type="mousewheel";if(orgEvent.wheelDelta){delta=orgEvent.wheelDelta/120;} 1562if(orgEvent.detail){delta=-orgEvent.detail/3;} 1563deltaY=delta;if(orgEvent.axis!==undefined&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaY=0;deltaX=-1*delta;} 1564if(orgEvent.wheelDeltaY!==undefined){deltaY=orgEvent.wheelDeltaY/120;} 1565if(orgEvent.wheelDeltaX!==undefined){deltaX=-1*orgEvent.wheelDeltaX/120;} 1566args.unshift(event,delta,deltaX,deltaY);return($.event.dispatch||$.event.handle).apply(this,args);}})(jQuery);(function($,window,undefined){var extensions={flash:['swf'],image:['bmp','gif','jpeg','jpg','png','tiff','tif','jfif','jpe','webp'],iframe:['asp','aspx','cgi','cfm','htm','html','jsp','php','pl','php3','php4','php5','phtml','rb','rhtml','shtml','txt'],video:['avi','mov','mpg','mpeg','movie','mp4','webm','ogv','ogg','3gp','m4v']},$win=$(window),$doc=$(document),browser,transform,gpuAcceleration,fullScreenApi='',userAgent=navigator.userAgent||navigator.vendor||window.opera,supportTouch="ontouchstart"in window||navigator.msMaxTouchPoints||(navigator.maxTouchPoints&&navigator.userAgent.indexOf('Windows')>-1),ishybrid=navigator.maxTouchPoints&&navigator.userAgent.indexOf('Windows')>-1,isMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0,4)),clickEvent=ishybrid?"itap.iLightBox click.iLightBox":supportTouch?"itap.iLightBox":"click.iLightBox",touchStartEvent=ishybrid?"touchstart.iLightBox mousedown.iLightBox":supportTouch?"touchstart.iLightBox":"mousedown.iLightBox",touchStopEvent=ishybrid?"touchend.iLightBox mouseup.iLightBox":supportTouch?"touchend.iLightBox":"mouseup.iLightBox",touchMoveEvent=ishybrid?"touchmove.iLightBox mousemove.iLightBox":supportTouch?"touchmove.iLightBox":"mousemove.iLightBox",abs=Math.abs,sqrt=Math.sqrt,round=Math.round,max=Math.max,min=Math.min,floor=Math.floor,random=Math.random,pluginspages={quicktime:'http://www.apple.com/quicktime/download',flash:'http://www.adobe.com/go/getflash'},iLightBox=function(el,options,items,instant){var iL=this;iL.options=options,iL.selector=options.selector||el,iL.context=document,iL.instant=instant;if(items.length<1)iL.attachItems();else iL.items=items;iL.vars={total:iL.items.length,start:0,current:null,next:null,prev:null,BODY:$('body'),loadRequests:0,overlay:$('<div class="ilightbox-overlay"></div>'),loader:$('<div class="ilightbox-loader"><div></div></div>'),toolbar:$('<div class="ilightbox-toolbar"></div>'),innerToolbar:$('<div class="ilightbox-inner-toolbar"></div>'),title:$('<div class="ilightbox-title"></div>
1566'),closeButton:$('<a class="ilightbox-close" title="'+iL.options.text.close+'"></a>'),fullScreenButton:$('<a class="ilightbox-fullscreen" title="'+iL.options.text.enterFullscreen+'"></a>'),innerPlayButton:$('<a class="ilightbox-play" title="'+iL.options.text.slideShow+'"></a>'),innerNextButton:$('<a class="ilightbox-next-button" title="'+iL.options.text.next+'"></a>'),innerPrevButton:$('<a class="ilightbox-prev-button" title="'+iL.options.text.previous+'"></a>'),holder:$('<div class="ilightbox-holder'+(supportTouch?' supportTouch':'')+'" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextPhoto:$('<div class="ilightbox-holder'+(supportTouch?' supportTouch':'')+' ilightbox-next" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),prevPhoto:$('<div class="ilightbox-holder'+(supportTouch?' supportTouch':'')+' ilightbox-prev" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextButton:$('<a class="ilightbox-button ilightbox-next-button" ondragstart="return false;" title="'+iL.options.text.next+'"><span></span></a>'),prevButton:$('<a class="ilightbox-button ilightbox-prev-button" ondragstart="return false;" title="'+iL.options.text.previous+'"><span></span></a>'),thumbnails:$('<div class="ilightbox-thumbnails" ondragstart="return false;"><div class="ilightbox-thumbnails-container"><a class="ilightbox-thumbnails-dragger"></a><div class="ilightbox-thumbnails-grid"></div></div></div>'),thumbs:false,nextLock:false,prevLock:false,hashLock:false,isMobile:false,mobileMaxWidth:980,isInFullScreen:false,isSwipe:false,mouseID:0,cycleID:0,isPaused:0,captionHeight:39,};iL.vars.hideableElements=iL.vars.nextButton.add(iL.vars.prevButton);iL.normalizeItems();iL.availPlugins();iL.options.startFrom=(iL.options.startFrom>0&&iL.options.startFrom>=iL.vars.total)?iL.vars.total-1:iL.options.startFrom;iL.options.startFrom=(iL.options.randomStart)?floor(random()*iL.vars.total):iL.options.startFrom;iL.vars.start=iL.options.startFrom;if(instant)iL.instantCall();else iL.patchItemsEvents();if(iL.options.linkId){iL.hashChangeHandler();$win.iLightBoxHashChange(function(){iL.hashChangeHandler();});} 1567if(supportTouch){var RegExp=/(click|mouseenter|mouseleave|mouseover|mouseout)/ig,replace="itap";iL.options.caption.show=iL.options.caption.show.replace(RegExp,replace),iL.options.caption.hide=iL.options.caption.hide.replace(RegExp,replace),iL.options.social.show=iL.options.social.show.replace(RegExp,replace),iL.options.social.hide=iL.options.social.hide.replace(RegExp,replace);} 1568if(iL.options.controls.arrows||$(window).width()<UNCODE.mediaQuery){$.extend(iL.options.styles,{nextOffsetX:($(window).width()>UNCODE.mediaQuery)?36:4,prevOffsetX:($(window).width()>UNCODE.mediaQuery)?36:4,nextOpacity:0,prevOpacity:0});}};iLightBox.prototype={showLoader:function(){var iL=this;iL.vars.loadRequests+=1;if(iL.options.path.toLowerCase()=="horizontal")iL.vars.loader.addClass('ilightbox-show').stop().animate({opacity:'1'},iL.options.show.speed,'easeOutCirc');else iL.vars.loader.addClass('ilightbox-show').stop().animate({opacity:'1'},iL.options.show.speed,'easeOutCirc');},hideLoader:function(){var iL=this;iL.vars.loadRequests-=1;iL.vars.loadRequests=(iL.vars.loadRequests<0)?0:iL.vars.loadRequests;if(iL.options.path.toLowerCase()=="horizontal"){if(iL.vars.loadRequests<=0)iL.vars.loader.removeClass('ilightbox-show').stop().animate({opacity:'0'},iL.options.show.speed,'easeInCirc');}else{if(iL.vars.loadRequests<=0)iL.vars.loader.removeClass('ilightbox-show').stop().animate({opacity:'0'},iL.options.show.speed,'easeInCirc');}},createUI:function(){var iL=this;iL.ui={currentElement:iL.vars.holder,nextElement:iL.vars.nextPhoto,prevElement:iL.vars.prevPhoto,currentItem:iL.vars.current,nextItem:iL.vars.next,prevItem:iL.vars.prev,hide:function(){iL.closeAction();},refresh:function(){(arguments.length>0)?iL.repositionPhoto(true):iL.repositionPhoto();},fullscreen:function(){iL.fullScreenAction();}};},attachItems:function(){var iL=this,itemsObject=new Array(),items=new Array();$(iL.selector,iL.context).each(function(){var t=$(this),URL=t.attr(iL.options.attr)||null,options=t.data("options")&&eval("({"+t.data("options")+"})")||{},caption=t.data('caption'),title=t.data('title'),type=t.data('type')||getTypeByExtension(URL),clone=t.data('lbox-clone')||false;if(type===false){return;} 1569if(t.data('lbox-clone')!=undefined)return;if(typeof t.attr('data-album')!='undefined'&&t.attr('data-album')!=''){var ALBUM_URLS=JSON.parse(t.attr('data-album')),URL_i,URLS_LENGHT=ALBUM_URLS.length;for(URL_i=0;URL_i<URLS_LENGHT;URL_i++){if(typeof ALBUM_URLS[URL_i].url!=='undefined'&&ALBUM_URLS[URL_i].url!=''){var item_opts='width:'+ALBUM_URLS[URL_i].width+',height:'+ALBUM_URLS[URL_i].height+',thumbnail: \''+ALBUM_URLS[URL_i].thumbnail+'\'';item_opts=item_opts&&eval("({"+item_opts+"})")||{}
1569,items.push({URL:ALBUM_URLS[URL_i].url,caption:ALBUM_URLS[URL_i].caption,title:ALBUM_URLS[URL_i].title,type:getTypeByExtension(ALBUM_URLS[URL_i].url),options:item_opts,clone:clone});var newT=t;newT.attr('href',ALBUM_URLS[URL_i].url);if(!iL.instant)itemsObject.push(newT);}}}else{items.push({URL:URL,caption:caption,title:title,type:type,options:options,clone:clone});} 1570if(iL.vars!=undefined)iL.vars.total=items.length;if(!iL.instant)itemsObject.push(t);});iL.items=items,iL.itemsObject=itemsObject;},normalizeItems:function(){var iL=this,newItems=new Array();$.each(iL.items,function(key,val){if(typeof val=="string")val={url:val};var URL=val.url||val.URL||null,options=val.options||{},caption=val.caption||null,title=val.title||null,type=(val.type)?val.type.toLowerCase():getTypeByExtension(URL),ext=(typeof URL!='object')?getExtension(URL):'';options.thumbnail=options.thumbnail||((type=="image")?URL:null),options.videoType=options.videoType||null,options.skin=options.skin||iL.options.skin,options.width=options.width||null,options.height=options.height||null,options.mousewheel=(typeof options.mousewheel!='undefined')?options.mousewheel:true,options.swipe=(typeof options.swipe!='undefined')?options.swipe:true,options.social=(typeof options.social!='undefined')?options.social:iL.options.social.buttons&&$.extend({},{},iL.options.social.buttons);if(type=="video"){options.html5video=(typeof options.html5video!='undefined')?options.html5video:{};options.html5video.webm=options.html5video.webm||options.html5video.WEBM||null;options.html5video.controls=(typeof options.html5video.controls!='undefined')?options.html5video.controls:"controls";options.html5video.preload=options.html5video.preload||"metadata";options.html5video.autoplay=(typeof options.html5video.autoplay!='undefined')?options.html5video.autoplay:false;options.html5video.loop=(typeof options.html5video.loop!='undefined')?options.html5video.loop:false;} 1571if(!options.width||!options.height){if(type=="video")options.width=1280,options.height=720;else if(type=="iframe")options.width='100%',options.height='90%';else if(type=="flash")options.width=1280,options.height=720;} 1572delete val.url;val.index=key;val.URL=URL;val.caption=caption;val.title=title;val.type=type;val.options=options;val.ext=ext;newItems.push(val);});iL.items=newItems;},instantCall:function(){var iL=this,key=iL.vars.start;iL.vars.current=key;iL.vars.next=(iL.items[key+1])?key+1:null;iL.vars.prev=(iL.items[key-1])?key-1:null;iL.addContents();iL.patchEvents();},addContents:function(){var iL=this,vars=iL.vars,opts=iL.options,viewport=getViewport(),path=opts.path.toLowerCase(),recognizingItems=vars.total>0&&iL.items.filter(function(e,i,arr){return['image','flash','video'].indexOf(e.type)===-1&&typeof e.recognized==='undefined'&&(opts.smartRecognition||e.options.smartRecognition);}),needRecognition=recognizingItems.length>0;if(opts.mobileOptimizer&&!opts.innerToolbar) 1573vars.isMobile=viewport.width<=vars.mobileMaxWidth;vars.overlay.addClass(opts.skin).hide().css('opacity',opts.overlay.opacity);if(opts.linkId) 1574vars.overlay[0].setAttribute('linkid',opts.linkId);if(opts.controls.toolbar){vars.toolbar.addClass(opts.skin).append(vars.closeButton);if(opts.controls.fullscreen) 1575vars.toolbar.append(vars.fullScreenButton);if(opts.controls.slideshow) 1576vars.toolbar.append(vars.innerPlayButton);if(vars.total>1) 1577vars.toolbar.append(vars.innerPrevButton).append(vars.innerNextButton);} 1578vars.BODY.addClass('ilightbox-noscroll').append(vars.overlay).append(vars.loader).append(vars.holder).append(vars.nextPhoto).append(vars.prevPhoto);if(!opts.innerToolbar) 1579vars.BODY.append(vars.toolbar);if(opts.controls.arrows) 1580vars.BODY.append(vars.nextButton).append(vars.prevButton);if(opts.controls.thumbnail&&vars.total>1){vars.BODY.append(vars.thumbnails);vars.thumbnails.addClass(opts.skin).addClass('ilightbox-'+path);$('div.ilightbox-thumbnails-grid',vars.thumbnails).empty();vars.thumbs=true;} 1581var loaderCss=(opts.path.toLowerCase()=="horizontal")?{left:parseInt((viewport.width/2)-(vars.loader.outerWidth()/2))}:{top:parseInt((viewport.height/2)-(vars.loader.outerHeight()/2))};vars.loader.addClass(opts.skin).css(loaderCss);vars.nextButton.add(vars.prevButton).addClass(opts.skin);if(path=="horizontal") 1582vars.loader.add(vars.nextButton).add(vars.prevButton).addClass('horizontal');vars.BODY[vars.isMobile?'addClass':'removeClass']('isMobile');if(!opts.infinite){vars.prevButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');
1582if(vars.current==0) 1583vars.prevButton.add(vars.innerPrevButton).addClass('disabled');if(vars.current>=vars.total-1) 1584vars.nextButton.add(vars.innerNextButton).addClass('disabled');} 1585if(opts.show.effect){vars.overlay.stop().fadeIn(opts.show.speed);vars.toolbar.stop().fadeIn(opts.show.speed);}else{vars.overlay.show();vars.toolbar.show();} 1586var length=recognizingItems.length;if(needRecognition){iL.showLoader();$.each(recognizingItems,function(key,val){var resultFnc=function(result){var key=-1,filter=iL.items.filter(function(e,i,arr){if(e.URL==result.url) 1587key=i;return e.URL==result.url;}),self=iL.items[key];if(result) 1588$.extend(true,self,{URL:result.source,type:result.type,recognized:true,options:{html5video:result.html5video,width:(result.type=="image")?0:(result.width||self.width),height:(result.type=="image")?0:(result.height||self.height),thumbnail:self.options.thumbnail||result.thumbnail}});length--;if(length==0){iL.hideLoader();vars.dontGenerateThumbs=false;iL.generateThumbnails();if(opts.show.effect) 1589setTimeout(function(){iL.generateBoxes();},opts.show.speed);else 1590iL.generateBoxes();}};iL.ogpRecognition(this,resultFnc);});} 1591else{if(opts.show.effect) 1592setTimeout(function(){iL.generateBoxes();},opts.show.speed);else 1593iL.generateBoxes();} 1594iL.createUI();window.iLightBox={close:function(){iL.closeAction();},fullscreen:function(){iL.fullScreenAction();},moveNext:function(){iL.moveTo('next');},movePrev:function(){iL.moveTo('prev');},goTo:function(index){iL.goTo(index);},refresh:function(){iL.refresh();},reposition:function(){(arguments.length>0)?iL.repositionPhoto(true):iL.repositionPhoto();},setOption:function(options){iL.setOption(options);},destroy:function(){iL.closeAction();iL.dispatchItemsEvents();}};if(opts.linkId){vars.hashLock=true;window.location.hash=opts.linkId+'/'+vars.current;setTimeout(function(){vars.hashLock=false;},55);} 1595if(!opts.slideshow.startPaused){iL.resume();vars.innerPlayButton.removeClass('ilightbox-play').addClass('ilightbox-pause');} 1596if(typeof iL.options.callback.onOpen=='function')iL.options.callback.onOpen.call(iL);},loadContent:function(obj,opt,speed){var iL=this,holder,item;iL.createUI();obj.speed=speed||iL.options.effects.loadedFadeSpeed;if(opt=='current'){if(!obj.options.mousewheel)iL.vars.lockWheel=true;else iL.vars.lockWheel=false;if(!obj.options.swipe)iL.vars.lockSwipe=true;else iL.vars.lockSwipe=false;} 1597switch(opt){case'current':holder=iL.vars.holder,item=iL.vars.current;break;case'next':holder=iL.vars.nextPhoto,item=iL.vars.next;break;case'prev':holder=iL.vars.prevPhoto,item=iL.vars.prev;break;} 1598holder.removeAttr('style class').addClass('ilightbox-holder'+(supportTouch?' supportTouch':'')).addClass(obj.options.skin);$('div.ilightbox-inner-toolbar',holder).remove();if(obj.title||iL.options.innerToolbar){var innerToolbar=iL.vars.innerToolbar.clone();if(obj.title&&iL.options.show.title){var title=iL.vars.title.clone();title.empty().html(obj.title);innerToolbar.append(title);} 1599if(iL.options.innerToolbar){innerToolbar.append((iL.vars.total>1)?iL.vars.toolbar.clone():iL.vars.toolbar);} 1600holder.prepend(innerToolbar);} 1601iL.loadSwitcher(obj,holder,item,opt);},loadSwitcher:function(obj,holder,item,opt){var iL=this,opts=iL.options,api={element:holder,position:item};switch(obj.type){case'image':if(typeof opts.callback.onBeforeLoad=='function')opts.callback.onBeforeLoad.call(iL,iL.ui,item);if(typeof obj.options.onBeforeLoad=='function')obj.options.onBeforeLoad.call(iL,api);iL.loadImage(obj.URL,function(img){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);var width=(img)?img.width:400,height=(img)?img.height:200;holder.data({naturalWidth:width,naturalHeight:height});$('div.ilightbox-container',holder).empty().append((img)?'<img src="'+obj.URL+'" class="ilightbox-image" />':'<span class="ilightbox-alert">'+opts.errors.loadImage+'</span>');if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);iL.configureHolder(obj,opt,holder);});break;
1601case'video':holder.data({naturalWidth:obj.options.width,naturalHeight:obj.options.height});if(opt==='current'){iL.addContent(holder,obj);if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);}else{$('div.ilightbox-container',holder).empty();} 1602iL.configureHolder(obj,opt,holder);break;case'iframe':holder.data({naturalWidth:obj.options.width,naturalHeight:obj.options.height});iL.configureHolder(obj,opt,holder);if(opt==='current'){var el=iL.addContent(holder,obj);if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);if(typeof opts.callback.onBeforeLoad=='function')opts.callback.onBeforeLoad.call(iL,iL.ui,item);if(typeof obj.options.onBeforeLoad=='function')obj.options.onBeforeLoad.call(iL,api);el.bind('load',function(){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);el.unbind('load');});}else{$('div.ilightbox-container',holder).empty();} 1603break;case'inline':var el=$(obj.URL),content=iL.addContent(holder,obj),images=findImageInElement(holder);holder.data({naturalWidth:(iL.items[item].options.width||el.outerWidth()),naturalHeight:(iL.items[item].options.height||el.outerHeight())});content.children().eq(0).show();if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);if(typeof opts.callback.onBeforeLoad=='function')opts.callback.onBeforeLoad.call(iL,iL.ui,item);if(typeof obj.options.onBeforeLoad=='function')obj.options.onBeforeLoad.call(iL,api);iL.loadImage(images,function(){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);iL.configureHolder(obj,opt,holder);});break;case'flash':var el=iL.addContent(holder,obj);holder.data({naturalWidth:(iL.items[item].options.width||el.outerWidth()),naturalHeight:(iL.items[item].options.height||el.outerHeight())});if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);iL.configureHolder(obj,opt,holder);break;case'ajax':var ajax=obj.options.ajax||{};if(typeof opts.callback.onBeforeLoad=='function')opts.callback.onBeforeLoad.call(iL,iL.ui,item);if(typeof obj.options.onBeforeLoad=='function')obj.options.onBeforeLoad.call(iL,api);iL.showLoader();$.ajax({url:obj.URL||opts.ajaxSetup.url,data:ajax.data||null,dataType:ajax.dataType||"html",type:ajax.type||opts.ajaxSetup.type,cache:ajax.cache||opts.ajaxSetup.cache,crossDomain:ajax.crossDomain||opts.ajaxSetup.crossDomain,global:ajax.global||opts.ajaxSetup.global,ifModified:ajax.ifModified||opts.ajaxSetup.ifModified,username:ajax.username||opts.ajaxSetup.username,password:ajax.password||opts.ajaxSetup.password,beforeSend:ajax.beforeSend||opts.ajaxSetup.beforeSend,complete:ajax.complete||opts.ajaxSetup.complete,success:function(data,textStatus,jqXHR){iL.hideLoader();var el=$(data),container=$('div.ilightbox-container',holder),elWidth=iL.items[item].options.width||parseInt(el[0].getAttribute('width')),elHeight=iL.items[item].options.height||parseInt(el[0].getAttribute('height')),css=(el[0].getAttribute('width')&&el[0].getAttribute('height'))?{'overflow':'hidden'}:{};container.empty().append($('<div class="ilightbox-wrapper"></div>').css(css).html(el));holder.show().data({naturalWidth:(elWidth||container.outerWidth()),naturalHeight:(elHeight||container.outerHeight())}).hide();if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);var images=findImageInElement(holder);iL.loadImage(images,function(){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);iL.configureHolder(obj,opt,holder);});opts.ajaxSetup.success(data,textStatus,jqXHR);if(typeof ajax.success=='function')ajax.success(data,textStatus,jqXHR);},error:function(jqXHR,textStatus,errorThrown){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);iL.hideLoader();$('div.ilightbox-container',holder).empty().append('<span class="ilightbox-alert">'+opts.errors.loadContents+'</span>');iL.configureHolder(obj,opt,holder);opts.ajaxSetup.error(jqXHR,textStatus,errorThrown);if(typeof ajax.error=='function')ajax.error(jqXHR,textStatus,errorThrown);}});break;case'html':var object=obj.URL,el 1604container=$('div.ilightbox-container',holder);if(object[0].nodeName)el=object.clone();else{var dom=$(object);if(dom.selector)el=$('<div>'+dom+'</div>');else el=dom;} 1605var elWidth=iL.items[item].options.width||parseInt(el.attr('width')),elHeight=iL.items[item].options.height||parseInt(el.attr('height'));iL.addContent(holder,obj);
1605el.appendTo(document.documentElement).hide();if(typeof opts.callback.onRender=='function')opts.callback.onRender.call(iL,iL.ui,item);if(typeof obj.options.onRender=='function')obj.options.onRender.call(iL,api);var images=findImageInElement(holder);if(typeof opts.callback.onBeforeLoad=='function')opts.callback.onBeforeLoad.call(iL,iL.ui,item);if(typeof obj.options.onBeforeLoad=='function')obj.options.onBeforeLoad.call(iL,api);iL.loadImage(images,function(){if(typeof opts.callback.onAfterLoad=='function')opts.callback.onAfterLoad.call(iL,iL.ui,item);if(typeof obj.options.onAfterLoad=='function')obj.options.onAfterLoad.call(iL,api);holder.show().data({naturalWidth:(elWidth||container.outerWidth()),naturalHeight:(elHeight||container.outerHeight())}).hide();el.remove();iL.configureHolder(obj,opt,holder);});break;}},configureHolder:function(obj,opt,holder){var iL=this,vars=iL.vars,opts=iL.options;if(opt!="current")(opt=="next")?holder.addClass('ilightbox-next'):holder.addClass('ilightbox-prev');if(opt=="current") 1606var item=vars.current;else if(opt=="next") 1607var opacity=opts.styles.nextOpacity,item=vars.next;else 1608var opacity=opts.styles.prevOpacity,item=vars.prev;var api={element:holder,position:item};iL.items[item].options.width=iL.items[item].options.width||0,iL.items[item].options.height=iL.items[item].options.height||0;if(opt=="current"){if(opts.show.effect)holder.css(transform,gpuAcceleration).fadeIn(obj.speed,function(){holder.css(transform,'');if(obj.caption){iL.setCaption(obj,holder);var caption=$('div.ilightbox-caption',holder),percent=parseInt((caption.outerHeight()/holder.outerHeight())*100);if(opts.caption.start&percent<=50)caption.fadeIn(opts.effects.fadeSpeed);} 1609var social=obj.options.social;if(social){iL.setSocial(social,obj.URL,holder);if(opts.social.start)$('div.ilightbox-social',holder).fadeIn(opts.effects.fadeSpeed);} 1610iL.generateThumbnails();if(typeof opts.callback.onShow=='function')opts.callback.onShow.call(iL,iL.ui,item);if(typeof obj.options.onShow=='function')obj.options.onShow.call(iL,api);});else{holder.show();iL.generateThumbnails();if(typeof opts.callback.onShow=='function')opts.callback.onShow.call(iL,iL.ui,item);if(typeof obj.options.onShow=='function')obj.options.onShow.call(iL,api);}}else{if(opts.show.effect)holder.fadeTo(obj.speed,opacity,function(){if(opt=="next")vars.nextLock=false;else vars.prevLock=false;iL.generateThumbnails();if(typeof opts.callback.onShow=='function')opts.callback.onShow.call(iL,iL.ui,item);if(typeof obj.options.onShow=='function')obj.options.onShow.call(iL,api);});else{holder.css({opacity:opacity}).show();if(opt=="next")vars.nextLock=false;else vars.prevLock=false;iL.generateThumbnails();if(typeof opts.callback.onShow=='function')opts.callback.onShow.call(iL,iL.ui,item);if(typeof obj.options.onShow=='function')obj.options.onShow.call(iL,api);}} 1611setTimeout(function(){iL.repositionPhoto();},0);},generateBoxes:function(){var iL=this,vars=iL.vars,opts=iL.options;if(opts.infinite&&vars.total>=3){if(vars.current==vars.total-1)vars.next=0;if(vars.current==0)vars.prev=vars.total-1;}else opts.infinite=false;if(typeof iL.items[vars.current]=='undefined') 1612vars.current=0;iL.loadContent(iL.items[vars.current],'current',opts.show.speed);if(iL.items[vars.next])iL.loadContent(iL.items[vars.next],'next',opts.show.speed);if(iL.items[vars.prev])iL.loadContent(iL.items[vars.prev],'prev',opts.show.speed);},generateThumbnails:function(){var iL=this,vars=iL.vars,opts=iL.options,timeOut=null;if(vars.thumbs&&!iL.vars.dontGenerateThumbs){var thumbnails=vars.thumbnails,container=$('div.ilightbox-thumbnails-container',thumbnails),grid=$('div.ilightbox-thumbnails-grid',container),i=0;grid.removeAttr('style').empty();$.each(iL.items,function(key,val){var isActive=(vars.current==key)?'ilightbox-active':'',opacity=(vars.current==key)?opts.thumbnails.activeOpacity:opts.thumbnails.normalOpacity,thumb=val.options.thumbnail,thumbnail=$('<div class="ilightbox-thumbnail"></div>'),icon=$('<div class="ilightbox-thumbnail-icon"></div>');thumbnail.css({opacity:0}).addClass(isActive);if((val.type=="video"||val.type=="flash")&&typeof val.options.icon=='undefined'){icon.addClass('ilightbox-thumbn
1612ail-video');thumbnail.append(icon);}else if(val.options.icon){icon.addClass('ilightbox-thumbnail-'+val.options.icon);thumbnail.append(icon);} 1613if(thumb)iL.loadImage(thumb,function(img){i++;if(img)thumbnail.data({naturalWidth:img.width,naturalHeight:img.height}).append('<img src="'+thumb+'" border="0" />');else thumbnail.data({naturalWidth:opts.thumbnails.maxWidth,naturalHeight:opts.thumbnails.maxHeight});clearTimeout(timeOut);timeOut=setTimeout(function(){iL.positionThumbnails(thumbnails,container,grid);},20);setTimeout(function(){thumbnail.fadeTo(opts.effects.loadedFadeSpeed,opacity);},i*20);});grid.append(thumbnail);});iL.vars.dontGenerateThumbs=true;}},positionThumbnails:function(thumbnails,container,grid){var iL=this,vars=iL.vars,opts=iL.options,viewport=getViewport(),path=opts.path.toLowerCase();if(!thumbnails)thumbnails=vars.thumbnails;if(!container)container=$('div.ilightbox-thumbnails-container',thumbnails);if(!grid)grid=$('div.ilightbox-thumbnails-grid',container);var thumbs=$('.ilightbox-thumbnail',grid),widthAvail=(path=='horizontal')?viewport.width-opts.styles.pageOffsetX:thumbs.eq(0).outerWidth()-opts.styles.pageOffsetX,heightAvail=(path=='horizontal')?thumbs.eq(0).outerHeight()-opts.styles.pageOffsetY:viewport.height-opts.styles.pageOffsetY,gridWidth=(path=='horizontal')?0:widthAvail,gridHeight=(path=='horizontal')?heightAvail:0,active=$('.ilightbox-active',grid),gridCss={},css={};if(arguments.length<3){thumbs.css({opacity:opts.thumbnails.normalOpacity});active.css({opacity:opts.thumbnails.activeOpacity});} 1614thumbs.each(function(i){var t=$(this),data=t.data(),width=(path=='horizontal')?0:opts.thumbnails.maxWidth;height=(path=='horizontal')?opts.thumbnails.maxHeight:0;dims=iL.getNewDimenstions(width,height,data.naturalWidth,data.naturalHeight,true);t.css({width:dims.width,height:dims.height});if(path=='horizontal')t.css({'float':'left'});(path=='horizontal')?(gridWidth+=t.outerWidth()):(gridHeight+=t.outerHeight());});gridCss={width:gridWidth,height:gridHeight};grid.css(gridCss);gridCss={};var gridOffset=grid.offset(),activeOffset=(active.length)?active.offset():{top:parseInt(heightAvail/2),left:parseInt(widthAvail/2)};gridOffset.top=(gridOffset.top-$doc.scrollTop()),gridOffset.left=(gridOffset.left-$doc.scrollLeft()),activeOffset.top=(activeOffset.top-gridOffset.top-$doc.scrollTop()),activeOffset.left=(activeOffset.left-gridOffset.left-$doc.scrollLeft());(path=='horizontal')?(gridCss.top=0,gridCss.left=parseInt((widthAvail/2)-activeOffset.left-(active.outerWidth()/2))):(gridCss.top=parseInt(((heightAvail/2)-activeOffset.top-(active.outerHeight()/2))),gridCss.left=0);if(arguments.length<3)grid.stop().animate(gridCss,opts.effects.repositionSpeed,'easeOutCirc');else grid.css(gridCss);},loadImage:function(image,callback){if(!$.isArray(image))image=[image];var iL=this,length=image.length;if(length>0){iL.showLoader();$.each(image,function(index,value){var img=new Image();img.onload=function(){length-=1;if(length==0){iL.hideLoader();callback(img);}};img.onerror=img.onabort=function(){length-=1;if(length==0){iL.hideLoader();callback(false);}};img.src=image[index];});}else callback(false);},patchItemsEvents:function(){var iL=this,vars=iL.vars,clickEvent=ishybrid?"itap.iL click.iL":supportTouch?"itap.iL":"click.iL",vEvent=ishybrid?"click.iL itap.iL":supportTouch?"click.iL":"itap.iL";if(iL.context&&iL.selector){var $items=$(iL.selector,iL.context);$(iL.context).on(clickEvent,iL.selector,function(){var $this=$(this),key=typeof $(this).data('lb-index')!==''&&$(this).closest('.owl-item').length?$(this).data('lb-index'):$items.index($this);if(UNCODE.isMobile){var isCarousel=$this.closest('.owl-carousel');if(isCarousel.length){if(isCarousel.hasClass('owl-translating'))return false;}} 1615vars.current=key;vars.next=iL.items[key+1]?key+1:null;vars.prev=iL.items[key-1]?key-1:null;if(vars.BODY.hasClass('fp-slide-scrolling')) 1616return false;iL.addContents();iL.patchEvents();return false;}).on(vEvent,iL.selector,function(){return false;});}else 1617$.each(iL.itemsObject,function(key,val){val.on(clickEvent,function(){vars.current=key;vars.next=iL.items[key+1]?key+1:null;vars.prev=iL.items[key-1]?key-1:null;iL.addContents();iL.patchEvents();return false;}).on(vEvent,function(){return false;});});},dispatchItemsEvents:function(){var iL=this,vars=iL.vars,opts=iL.options;if(iL.context&&iL.selector) 1618$(iL.context).off('.iL',iL.selector);else 1619$.each(iL.itemsObject,function(key,val){val.off('.iL');});},refresh:function(){var iL=this;iL.dispatchItemsEvents();iL.attachItems();iL.normalizeItems();iL.patchItemsEvents();},patchEvents:function(){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),holders=$('.ilightbox-holder'),fullscreenEvent=fullScreenApi.fullScreenEventName+'.iLightBox',durationThreshold=1000,horizontalDistanceThreshold=verticalDistanceThreshold=100,buttonsArray=[vars.nextButton[0],vars.prevButton[0],vars.nextButton[0].firstChild,vars.prevButton[0].firstChild];$win.bind('resize.iLightBox',function(){var viewport=getViewport();if(opts.mobileOptimizer&&!opts.innerToolbar)vars.isMobile=viewport.width<=vars.mobileMaxWidth;vars.BODY[vars.isMobile?'addClass':'removeClass']('isMobile');iL.repositionPhoto(null);if(supportTouch){clearTimeout(vars.setTime);vars.setTime=setTimeout(function(){var scrollTop=getScrollXY().y;window.scrollTo(0,scrollTop-30);window.scrollTo(0,scrollTop+30);window.scrollTo(0,scrollTop);},2000);} 1620if(vars.thumbs)iL.positionThumbnails();}).bind('keydown.iLightBox',function(event){if(opts.controls.keyboard){switch(event.keyCode){case 13:if(event.shiftKey&&opts.keyboard.shift_enter)iL.fullScreenAction();break;
1620case 27:if(opts.keyboard.esc)iL.closeAction();break;case 37:if(opts.keyboard.left&&!vars.lockKey)iL.moveTo('prev');break;case 38:if(opts.keyboard.up&&!vars.lockKey)iL.moveTo('prev');break;case 39:if(opts.keyboard.right&&!vars.lockKey)iL.moveTo('next');break;case 40:if(opts.keyboard.down&&!vars.lockKey)iL.moveTo('next');break;}}});if(fullScreenApi.supportsFullScreen)$win.bind(fullscreenEvent,function(){iL.doFullscreen();});var holderEventsArr=[opts.caption.show+'.iLightBox',opts.caption.hide+'.iLightBox',opts.social.show+'.iLightBox',opts.social.hide+'.iLightBox'].filter(function(e,i,arr){return arr.lastIndexOf(e)===i;}),holderEvents="";$.each(holderEventsArr,function(key,val){if(key!=0)holderEvents+=' ';holderEvents+=val;});$doc.on(clickEvent,'.ilightbox-overlay',function(){if(opts.overlay.blur)iL.closeAction();}).on(clickEvent,'.ilightbox-next, .ilightbox-next-button',function(){iL.moveTo('next');}).on(clickEvent,'.ilightbox-prev, .ilightbox-prev-button',function(){iL.moveTo('prev');}).on(clickEvent,'.ilightbox-thumbnail',function(){var t=$(this),thumbs=$('.ilightbox-thumbnail',vars.thumbnails),index=thumbs.index(t);if(index!=vars.current)iL.goTo(index);}).on(holderEvents,'.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)',function(e){var caption=$('div.ilightbox-caption',vars.holder),social=$('div.ilightbox-social',vars.holder),fadeSpeed=opts.effects.fadeSpeed;if(vars.nextLock||vars.prevLock){if(e.type==opts.caption.show&&!caption.is(':visible'))caption.fadeIn(fadeSpeed);else if(e.type==opts.caption.hide&&caption.is(':visible'))caption.fadeOut(fadeSpeed);if(e.type==opts.social.show&&!social.is(':visible'))social.fadeIn(fadeSpeed);else if(e.type==opts.social.hide&&social.is(':visible'))social.fadeOut(fadeSpeed);}else{if(e.type==opts.caption.show&&!caption.is(':visible'))caption.stop().fadeIn(fadeSpeed);else if(e.type==opts.caption.hide&&caption.is(':visible'))caption.stop().fadeOut(fadeSpeed);if(e.type==opts.social.show&&!social.is(':visible'))social.stop().fadeIn(fadeSpeed);else if(e.type==opts.social.hide&&social.is(':visible'))social.stop().fadeOut(fadeSpeed);}}).on('mouseenter.iLightBox mouseleave.iLightBox','.ilightbox-wrapper',function(e){if(e.type=='mouseenter')vars.lockWheel=true;else vars.lockWheel=false;}).on(clickEvent,'.ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause',function(){var t=$(this);if(t.hasClass('ilightbox-fullscreen'))iL.fullScreenAction();else if(t.hasClass('ilightbox-play')){iL.resume();t.addClass('ilightbox-pause').removeClass('ilightbox-play');}else if(t.hasClass('ilightbox-pause')){iL.pause();t.addClass('ilightbox-play').removeClass('ilightbox-pause');}else iL.closeAction();}).on(touchMoveEvent,'.ilightbox-overlay, .ilightbox-thumbnails-container',function(e){e.preventDefault();});function mouseMoveHandler(e){if(!vars.isMobile){if(!vars.mouseID){vars.hideableElements.show();} 1621vars.mouseID=clearTimeout(vars.mouseID);if(buttonsArray.indexOf(e.target)===-1) 1622vars.mouseID=setTimeout(function(){vars.hideableElements.hide();vars.mouseID=clearTimeout(vars.mouseID);},3000);}} 1623if(opts.controls.arrows&&!supportTouch)$doc.on('mousemove.iLightBox',mouseMoveHandler);if(opts.controls.slideshow&&opts.slideshow.pauseOnHover)$doc.on('mouseenter.iLightBox mouseleave.iLightBox','.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)',function(e){if(e.type=='mouseenter'&&vars.cycleID)iL.pause();else if(e.type=='mouseleave'&&vars.isPaused)iL.resume();});var switchers=$('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails'),delay=false;if(opts.controls.mousewheel)switchers.on('mousewheel.iLightBox',function(event,delta){event.preventDefault();if(delay)return;delay=true;if(!vars.lockWheel){event.preventDefault();if(delta<0){iL.moveTo('next');}else if(delta>0){iL.moveTo('prev');}} 1624setTimeout(function(){delay=false;},2000);});if(opts.controls.swipe)holders.on(touchStartEvent,function(event){if(vars.nextLock||vars.prevLock||vars.total==1||vars.lockSwipe)return;vars.BODY.addClass('ilightbox-closedhand');var data=event.originalEvent.touches?event.originalEvent.touches[0]:event,scrollTop=$doc.scrollTop(),scrollLeft=$doc.scrollLeft(),offsets=[holders.eq(0).offset(),holders.eq(1).offset(),holders.eq(2).offset()],offSet=[{top:offsets[0].top-scrollTop,left:offsets[0].left-scrollLeft},{top:offsets[1].top-scrollTop,left:offsets[1].left-scrollLeft},{top:offsets[2].top-scrollTop,left:offsets[2].left-scrollLeft}],start={time:(new Date()).getTime(),coords:[data.pageX-scrollLeft,data.pageY-scrollTop]},stop;function moveEachHandler(i){var t=$(this),offset=offSet[i],scroll=[(start.coords[0]-stop.coords[0]),(start.coords[1]-stop.coords[1])];t[0].style[path=="horizontal"?'left':'top']=(path=="horizontal"?offset.left-scroll[0]:offset.top-scroll[1])+'px';} 1625function moveHandler(event){if(!start)return;var data=event.originalEvent.touches?event.originalEvent.touches[0]:event;stop={time:(new Date()).getTime(),coords:[data.pageX-scrollLeft,data.pageY-scrollTop]};
1625holders.each(moveEachHandler);event.preventDefault();} 1626function repositionHolders(){holders.each(function(){var t=$(this),offset=t.data('offset')||{top:t.offset().top-scrollTop,left:t.offset().left-scrollLeft},top=offset.top,left=offset.left;t.css(transform,gpuAcceleration).stop().animate({top:top,left:left},500,'easeOutCirc',function(){t.css(transform,'');});});} 1627holders.bind(touchMoveEvent,moveHandler);$doc.one(touchStopEvent,function(event){holders.unbind(touchMoveEvent,moveHandler);vars.BODY.removeClass('ilightbox-closedhand');if(start&&stop){if(path=="horizontal"&&stop.time-start.time<durationThreshold&&abs(start.coords[0]-stop.coords[0])>horizontalDistanceThreshold&&abs(start.coords[1]-stop.coords[1])<verticalDistanceThreshold){if(start.coords[0]>stop.coords[0]){if(vars.current==vars.total-1&&!opts.infinite)repositionHolders();else{vars.isSwipe=true;iL.moveTo('next');}}else{if(vars.current==0&&!opts.infinite)repositionHolders();else{vars.isSwipe=true;iL.moveTo('prev');}}}else if(path=="vertical"&&stop.time-start.time<durationThreshold&&abs(start.coords[1]-stop.coords[1])>horizontalDistanceThreshold&&abs(start.coords[0]-stop.coords[0])<verticalDistanceThreshold){if(start.coords[1]>stop.coords[1]){if(vars.current==vars.total-1&&!opts.infinite)repositionHolders();else{vars.isSwipe=true;iL.moveTo('next');}}else{if(vars.current==0&&!opts.infinite)repositionHolders();else{vars.isSwipe=true;iL.moveTo('prev');}}}else repositionHolders();} 1628start=stop=undefined;});});},goTo:function(index){var iL=this,vars=iL.vars,opts=iL.options,diff=(index-vars.current);if(opts.infinite){if(index==vars.total-1&&vars.current==0)diff=-1;if(vars.current==vars.total-1&&index==0)diff=1;} 1629if(diff==1)iL.moveTo('next');else if(diff==-1)iL.moveTo('prev');else{if(vars.nextLock||vars.prevLock)return false;if(typeof opts.callback.onBeforeChange=='function')opts.callback.onBeforeChange.call(iL,iL.ui);if(opts.linkId){vars.hashLock=true;window.location.hash=opts.linkId+'/'+index;} 1630if(iL.items[index]){if(!iL.items[index].options.mousewheel)vars.lockWheel=true;else iL.vars.lockWheel=false;if(!iL.items[index].options.swipe)vars.lockSwipe=true;else vars.lockSwipe=false;} 1631$.each([vars.holder,vars.nextPhoto,vars.prevPhoto],function(key,val){val.css(transform,gpuAcceleration).fadeOut(opts.effects.loadedFadeSpeed);});vars.current=index;vars.next=index+1;vars.prev=index-1;iL.createUI();setTimeout(function(){iL.generateBoxes();},opts.effects.loadedFadeSpeed+50);$('.ilightbox-thumbnail',vars.thumbnails).removeClass('ilightbox-active').eq(index).addClass('ilightbox-active');iL.positionThumbnails();if(opts.linkId)setTimeout(function(){vars.hashLock=false;},55);if(!opts.infinite){vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');if(vars.current==0){vars.prevButton.add(vars.innerPrevButton).addClass('disabled');} 1632if(vars.current>=vars.total-1){vars.nextButton.add(vars.innerNextButton).addClass('disabled');}} 1633iL.resetCycle();if(typeof opts.callback.onAfterChange=='function')opts.callback.onAfterChange.call(iL,iL.ui);}},moveTo:function(side){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),viewport=getViewport(),switchSpeed=opts.effects.switchSpeed;if(vars.nextLock||vars.prevLock)return false;else{var item=(side=="next")?vars.next:vars.prev;if(opts.linkId){vars.hashLock=true;window.location.hash=opts.linkId+'/'+item;} 1634if(side=="next"){if(!iL.items[item])return false;var firstHolder=vars.nextPhoto,secondHolder=vars.holder,lastHolder=vars.prevPhoto,firstClass='ilightbox-prev',secondClass='ilightbox-next';}else if(side=="prev"){if(!iL.items[item])return false;var firstHolder=vars.prevPhoto,secondHolder=vars.holder,lastHolder=vars.nextPhoto,firstClass='ilightbox-next',secondClass='ilightbox-prev';} 1635if(typeof opts.callback.onBeforeChange=='function') 1636opts.callback.onBeforeChange.call(iL,iL.ui);(side=="next")?vars.nextLock=true:vars.prevLock=true;var captionFirst=$('div.ilightbox-caption',secondHolder),socialFirst=$('div.ilightbox-social',secondHolder);if(captionFirst.length) 1637captionFirst.stop().fadeOut(switchSpeed,function(){$(this).remove();});if(socialFirst.length) 1638socialFirst.stop().fadeOut(switchSpeed,function(){$(this).remove();});if(iL.items[item].caption){iL.setCaption(iL.items[item],firstHolder);var caption=$('div.ilightbox-caption',firstHolder),percent=parseInt((caption.outerHeight()/firstHolder.outerHeight())*100);if(opts.caption.start&&percent<=50)caption.fadeIn(switchSpeed);} 1639var social=iL.items[item].options.social;if(social){iL.setSocial(social,iL.items[item].URL,firstHolder);if(opts.social.start)$('div.ilightbox-social',firstHolder).fadeIn(opts.effects.fade
1639Speed);} 1640$.each([firstHolder,secondHolder,lastHolder],function(key,val){val.removeClass('ilightbox-next ilightbox-prev');});var firstOffset=firstHolder.data('offset'),winW=(viewport.width-(opts.styles.pageOffsetX)),winH=(viewport.height-(opts.styles.pageOffsetY)),width=firstOffset.newDims.width,height=firstOffset.newDims.height,thumbsOffset=firstOffset.thumbsOffset,diff=firstOffset.diff,top=parseInt((winH/2)-(height/2)-diff.H-(thumbsOffset.H/2)),left=parseInt((winW/2)-(width/2)-diff.W-(thumbsOffset.W/2));var secondOffset=secondHolder.data('offset'),object=secondOffset.object;firstHolder.show().css(transform,gpuAcceleration).animate({top:top,left:left,opacity:1},switchSpeed,(vars.isSwipe)?'easeOutCirc':'easeInOutCirc',function(){firstHolder.css(transform,'');});$('div.ilightbox-container',firstHolder).animate({width:width,height:height},switchSpeed,(vars.isSwipe)?'easeOutCirc':'easeInOutCirc');diff=secondOffset.diff;width=secondOffset.newDims.width,height=secondOffset.newDims.height;width=parseInt(width*opts.styles[side=='next'?'prevScale':'nextScale']),height=parseInt(height*opts.styles[side=='next'?'prevScale':'nextScale']),top=(path=='horizontal')?parseInt((winH/2)-object.offsetY-(height/2)-diff.H-(thumbsOffset.H/2)):parseInt(winH-object.offsetX-diff.H-(thumbsOffset.H/2));if(side=='prev') 1641left=(path=='horizontal')?parseInt(winW-object.offsetX-diff.W-(thumbsOffset.W/2)):parseInt((winW/2)-(width/2)-diff.W-object.offsetY-(thumbsOffset.W/2));else{top=(path=='horizontal')?top:parseInt(object.offsetX-diff.H-height-(thumbsOffset.H/2)),left=(path=='horizontal')?parseInt(object.offsetX-diff.W-width-(thumbsOffset.W/2)):parseInt((winW/2)-object.offsetY-(width/2)-diff.W-(thumbsOffset.W/2));} 1642$('div.ilightbox-container',secondHolder).animate({width:width,height:height},switchSpeed,(vars.isSwipe)?'easeOutCirc':'easeInOutCirc');secondHolder.addClass(firstClass).css(transform,gpuAcceleration).animate({top:top,left:left,opacity:opts.styles.prevOpacity,},switchSpeed,(vars.isSwipe)?'easeOutCirc':'easeInOutCirc',function(){secondHolder.css(transform,'');$('.ilightbox-thumbnail',vars.thumbnails).removeClass('ilightbox-active').eq(item).addClass('ilightbox-active');iL.positionThumbnails();if(iL.items[item]){if(!iL.items[item].options.mousewheel)vars.lockWheel=true;else vars.lockWheel=false;if(!iL.items[item].options.swipe)vars.lockSwipe=true;else vars.lockSwipe=false;} 1643vars.isSwipe=false;if(['iframe','video'].indexOf(iL.items[vars.current].type)!==-1){$('div.ilightbox-container',secondHolder).empty();} 1644if(side=="next"){vars.nextPhoto=lastHolder,vars.prevPhoto=secondHolder,vars.holder=firstHolder;vars.nextPhoto.hide();vars.next=vars.next+1,vars.prev=vars.current,vars.current=vars.current+1;if(opts.infinite){if(vars.current>vars.total-1)vars.current=0;if(vars.current==vars.total-1)vars.next=0;if(vars.current==0)vars.prev=vars.total-1;} 1645iL.createUI();if(!iL.items[vars.next]) 1646vars.nextLock=false;else 1647iL.loadContent(iL.items[vars.next],'next');}else{vars.prevPhoto=lastHolder;vars.nextPhoto=secondHolder;vars.holder=firstHolder;vars.prevPhoto.hide();vars.next=vars.current;vars.current=vars.prev;vars.prev=vars.current-1;if(opts.infinite){if(vars.current==vars.total-1)vars.next=0;if(vars.current==0)vars.prev=vars.total-1;} 1648iL.createUI();if(!iL.items[vars.prev]) 1649vars.prevLock=false;else 1650iL.loadContent(iL.items[vars.prev],'prev');} 1651if(['iframe','video'].indexOf(iL.items[vars.current].type)!==-1){iL.loadContent(iL.items[vars.current],'current');} 1652if(opts.linkId)setTimeout(function(){vars.hashLock=false;},55);if(!opts.infinite){vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');if(vars.current==0) 1653vars.prevButton.add(vars.innerPrevButton).addClass('disabled');if(vars.current>=vars.total-1) 1654vars.nextButton.add(vars.innerNextButton).addClass('disabled');} 1655iL.repositionPhoto();iL.resetCycle();if(typeof opts.callback.onAfterChange=='function') 1656opts.callback.onAfterChange.call(iL,iL.ui);});top=(path=='horizontal')?getPixel(lastHolder,'top'):((side=="next")?parseInt(-(winH/2)-lastHolder.outerHeight()):parseInt(top*2)),left=(path=='horizontal')?((side=="next")?parseInt(-(winW/2)-lastHolder.outerWidth()):parseInt(left*2)):getPixel(lastHolder,'left');lastHolder.css(transform,gpuAcceleration).animate({top:top,left:left,opacity:opts.styles.nextOpacity},switchSpeed,(vars.isSwipe)?'easeOutCirc':'easeInOutCirc',function(){lastHolder.css(transform,'');}).addClass(secondClass);}},setCaption:function(obj,target){var iL=this,caption=$('<div class="ilightbox-caption"></div>');if(obj.caption){caption.html(obj.caption);$('div.ilightbox-container',target).append(caption);}},normalizeSocial:function(obj,url){var iL=this,vars=iL.vars,opts=iL.options,baseURL=window.location.href;$.each(obj,function(key,value){if(!value) 1657return true;var item=key.toLowerCase(),source,text;switch(item){case'facebook':source="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",text="Share on Facebook";break;case'twitter':source="http://twitter.com/home?status={URL}",text="Share on Twitter";break;case'digg':source="http://digg.com/submit?phase=2&url={URL}",text="Share on Digg";break;case'reddit':source="http://reddit.com/submit?url={URL}",text="Share on reddit";break;} 1658obj[key]={URL:value.URL&&absolutizeURI(baseURL,value.URL)||opts.linkId&&window.location.href||typeof url!=='string'&&baseURL||url&&absolutizeURI(baseURL,url)||baseURL,source:value.source||source||value.URL&&absolutizeURI(baseURL,value.URL)||url&&absolutizeURI(baseURL,url),text:value.text||text||"Share on "+key,width:(typeof(value.width)!='undefined'&&!isNaN(value.width))?parseInt(value.width):640,height:value.height||360};});return obj;},setSocial:function(obj,url,target){var iL=this,socialBar=$('<div class="ilightbox-social"></div>'),buttons='<ul>';obj=iL.normalizeSocial(obj,url);$.each(obj,function(key,value){var item=key.toLowerCase(),source=value.source.replace(/\{URL\}/g,encodeURIComponent(value.URL).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+'));buttons+='<li class="'+key+'"><a href="'+source+'" onclick="javascript:window.open(this.href'+((value.width<=0||value.height<=0)?'':', \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height='+value.height+',width='+value.width+',left=40,top=40\'')+');return false;" title="'+value.text+'" target="_blank"></a></li>';});buttons+='</ul>';socialBar.html(buttons);$('div.ilightbox-container',target).append(socialBar);},fullScreenAction:function(){var iL=this,vars=iL.vars;if(fullScreenApi.supportsFullScreen){if(fullScreenApi.isFullScreen())fullScreenApi.cancelFullScreen(document.documentElement);else fullScreenApi.requestFullScreen(document.documentElement);}else{iL.doFullscreen();}},doFullscreen:function(){var iL=this,vars=iL.vars,viewport=getViewport(),opts=iL.options;if(opts.fullAlone){var currentHolder=vars.holder,current=iL.items[vars.current],windowWidth=viewport.width,windowHeight=viewport.height,elements=[currentHolder,vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.overlay,vars.toolbar,vars.thumbnails,vars.loader],hideElements=[vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.loader,vars.thumbnails];if(!vars.isInFullScreen){vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=true;vars.overlay.css({opacity:1});$.each(hideElements,function(i,element){element.hide();});vars.fullScreenButton.attr('title',opts.text.exitFullscreen);if(opts.fullStretchTypes.indexOf(current.type)!=-1)currentHolder.data({naturalWi
1658dthOld:currentHolder.data('naturalWidth'),naturalHeightOld:currentHolder.data('naturalHeight'),naturalWidth:windowWidth,naturalHeight:windowHeight});else{var viewport=current.options.fullViewPort||opts.fullViewPort||'',newWidth=windowWidth,newHeight=windowHeight,width=currentHolder.data('naturalWidth'),height=currentHolder.data('naturalHeight');if(viewport.toLowerCase()=='fill'){newHeight=(newWidth/width)*height;if(newHeight<windowHeight){newWidth=(windowHeight/height)*width,newHeight=windowHeight;}}else if(viewport.toLowerCase()=='fit'){var dims=iL.getNewDimenstions(newWidth,newHeight,width,height,true);newWidth=dims.width,newHeight=dims.height;}else if(viewport.toLowerCase()=='stretch'){newWidth=newWidth,newHeight=newHeight;}else{var scale=(width>newWidth||height>newHeight)?true:false,dims=iL.getNewDimenstions(newWidth,newHeight,width,height,scale);newWidth=dims.width,newHeight=dims.height;} 1659currentHolder.data({naturalWidthOld:currentHolder.data('naturalWidth'),naturalHeightOld:currentHolder.data('naturalHeight'),naturalWidth:newWidth,naturalHeight:newHeight});} 1660$.each(elements,function(key,val){val.addClass('ilightbox-fullscreen');});if(typeof opts.callback.onEnterFullScreen=='function')opts.callback.onEnterFullScreen.call(iL,iL.ui);}else{vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=false;vars.overlay.css({opacity:iL.options.overlay.opacity});$.each(hideElements,function(i,element){element.show();});vars.fullScreenButton.attr('title',opts.text.enterFullscreen);currentHolder.data({naturalWidth:currentHolder.data('naturalWidthOld'),naturalHeight:currentHolder.data('naturalHeightOld'),naturalWidthOld:null,naturalHeightOld:null});$.each(elements,function(key,val){val.removeClass('ilightbox-fullscreen');});if(typeof opts.callback.onExitFullScreen=='function')opts.callback.onExitFullScreen.call(iL,iL.ui);}}else{if(!vars.isInFullScreen)vars.isInFullScreen=true;else vars.isInFullScreen=false;} 1661iL.repositionPhoto(true);},closeAction:function(){var iL=this,vars=iL.vars,opts=iL.options;$win.unbind('.iLightBox');$doc.off('.iLightBox');if(vars.isInFullScreen)fullScreenApi.cancelFullScreen(document.documentElement);$('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails').off('.iLightBox');if(opts.hide.effect)vars.overlay.stop().fadeOut(opts.hide.speed,function(){vars.overlay.remove();vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox');});else{vars.overlay.remove();vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox');} 1662var fadeOuts=[vars.toolbar,vars.holder,vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.loader,vars.thumbnails];$.each(fadeOuts,function(i,element){element.removeAttr('style').remove();});vars.dontGenerateThumbs=vars.isInFullScreen=false;window.iLightBox=null;if(opts.linkId){vars.hashLock=true;removeHash();setTimeout(function(){vars.hashLock=false;},55);} 1663vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');if(typeof opts.callback.onHide=='function')opts.callback.onHide.call(iL,iL.ui);},repositionPhoto:function(){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),viewport=getViewport(),winWidth=viewport.width,winHeight=viewport.height;if(viewport.width<UNCODE.mediaQuery)opts.styles.nextOffsetX=0;var thumbsOffsetW=(vars.isInFullScreen&&opts.fullAlone||vars.isMobile)?0:((path=='horizontal')?0:vars.thumbnails.outerWidth()),thumbsOffsetH=vars.isMobile?vars.toolbar.outerHeight():((vars.isInFullScreen&&opts.fullAlone)?0:((path=='horizontal')?vars.thumbnails.outerHeight():0)),width=(vars.isInFullScreen&&opts.fullAlone)?winWidth:(winWidth-(opts.styles.pageOffsetX)),height=(vars.isInFullScreen&&opts.fullAlone)?winHeight:(winHeight-(opts.styles.pageOffsetY)),offsetW=(path=='horizontal')?parseInt((iL.items[vars.next]||iL.items[vars.prev])?((opts.styles.nextOffsetX+opts.styles.prevOffsetX))*2:(((width/10)<=30)?30:(width/10))):parseInt(((width/10)<=30)?30:(width/10))+thumbsOffsetW,offsetH=(path=='horizontal')?parseInt(((height/10)<=30)?30:(height/10))+thumbsOffsetH:parseInt((iL.items[vars.next]||iL.items[vars.prev])?((opts.styles.nextOffsetX+opts.styles.prevOffsetX))*2:(((height/10)<=30)?30:(height/10)));var elObject={type:'current',width:width,height:height,item:iL.items[vars.current],offsetW:offsetW,offsetH:offsetH,thumbsOffsetW
1663:thumbsOffsetW,thumbsOffsetH:thumbsOffsetH,animate:arguments.length,holder:vars.holder};iL.repositionEl(elObject);if(iL.items[vars.next]){elObject=$.extend(elObject,{type:'next',item:iL.items[vars.next],offsetX:opts.styles.nextOffsetX,offsetY:opts.styles.nextOffsetY,holder:vars.nextPhoto});iL.repositionEl(elObject);} 1664if(iL.items[vars.prev]){elObject=$.extend(elObject,{type:'prev',item:iL.items[vars.prev],offsetX:opts.styles.nextOffsetX,offsetY:opts.styles.prevOffsetY,holder:vars.prevPhoto});iL.repositionEl(elObject);} 1665var loaderCss=(path=="horizontal")?{left:parseInt((width/2)-(vars.loader.outerWidth()/2))}:{top:parseInt((height/2)-(vars.loader.outerHeight()/2))};vars.loader.css(loaderCss);},repositionEl:function(obj){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),widthAvail=(obj.type=='current')?((vars.isInFullScreen&&opts.fullAlone)?obj.width:(obj.width-obj.offsetW)):(obj.width-obj.offsetW),heightAvail=(obj.type=='current')?((vars.isInFullScreen&&opts.fullAlone)?obj.height:(obj.height-obj.offsetH)):(obj.height-obj.offsetH),itemParent=obj.item,item=obj.item.options,holder=obj.holder,offsetX=obj.offsetX||0,offsetY=obj.offsetY||0,toolbarHeight=$('.ilightbox-inner-toolbar',holder).length?parseInt($('.ilightbox-inner-toolbar',holder).outerHeight()):0,thumbsOffsetW=obj.thumbsOffsetW,thumbsOffsetH=obj.thumbsOffsetH;if(obj.type=='current'){if(typeof item.width=='number'&&item.width)widthAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort))?widthAvail:((item.width>widthAvail)?widthAvail:item.width);if(typeof item.height=='number'&&item.height)heightAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort))?heightAvail:((item.height>heightAvail)?heightAvail:item.height);}else{if(typeof item.width=='number'&&item.width)widthAvail=(item.width>widthAvail)?widthAvail:item.width;if(typeof item.height=='number'&&item.height)heightAvail=(item.height>heightAvail)?heightAvail:item.height;} 1666heightAvail=parseInt(heightAvail-toolbarHeight);var width=(typeof item.width=='string'&&item.width.indexOf('%')!=-1)?percentToValue(parseInt(item.width.replace('%','')),obj.width):holder.data('naturalWidth'),height=(typeof item.height=='string'&&item.height.indexOf('%')!=-1)?percentToValue(parseInt(item.height.replace('%','')),obj.height):holder.data('naturalHeight');var dims=((typeof item.width=='string'&&item.width.indexOf('%')!=-1||typeof item.height=='string'&&item.height.indexOf('%')!=-1)?{width:width,height:height}:iL.getNewDimenstions(widthAvail,heightAvail,width,height)),newDims=$.extend({},dims,{});if(obj.type=='prev'||obj.type=='next') 1667width=parseInt(dims.width*((obj.type=='next')?opts.styles.nextScale:opts.styles.prevScale)),height=parseInt(dims.height*((obj.type=='next')?opts.styles.nextScale:opts.styles.prevScale));else 1668width=dims.width,height=dims.height;var widthDiff=parseInt((getPixel(holder,'padding-left')+getPixel(holder,'padding-right')+getPixel(holder,'border-left-width')+getPixel(holder,'border-right-width'))/2),heightDiff=parseInt((getPixel(holder,'padding-top')+getPixel(holder,'padding-bottom')+getPixel(holder,'border-top-width')+getPixel(holder,'border-bottom-width')+($('.ilightbox-inner-toolbar',holder).outerHeight()||0))/2);switch(obj.type){case'current':var top=parseInt((obj.height/2)-(height/2)-heightDiff-(thumbsOffsetH/2)),left=parseInt((obj.width/2)-(width/2)-widthDiff-(thumbsOffsetW/2));break;case'next':var top=(path=='horizontal')?parseInt((obj.height/2)-offsetY-(height/2)-heightDiff-(thumbsOffsetH/2)):parseInt(obj.height-offsetX-heightDiff-(thumbsOffsetH/2)),left=(path=='horizontal')?parseInt(obj.width-offsetX-widthDiff-(thumbsOffsetW/2)):parseInt((obj.width/2)-(width/2)-widthDiff-offsetY-(thumbsOffsetW/2));break;case'prev':var top=(path=='horizontal')?parseInt((obj.height/2)-offsetY-(height/2)-heightDiff-(thumbsOffsetH/2)):parseInt(offsetX-heightDiff-height-(thumbsOffsetH/2)),left=(path=='horizontal')?parseInt(offsetX-widthDiff-width-(thumbsOffsetW/2)):parseInt((obj.width/2)-offsetY-(width/2)-widthDiff-(thumbsOffsetW/2));break;} 1669holder.data('offset',{top:top,left:left,newDims:newDims,diff:{W:widthDiff,H:heightDiff},thumbsOffset:{W:thumbsOffsetW,H:thumbsOffsetH},object:obj});var opacityMobile;if(isMobile){opacityMobile={opacity:1,top:top,left:left};}
1669else{opacityMobile={top:top,left:left};} 1670if(obj.animate>0&&opts.effects.reposition){holder.css(transform,gpuAcceleration).stop().animate(opacityMobile,opts.effects.repositionSpeed,'easeOutCirc',function(){holder.css(transform,'');});$('div.ilightbox-container',holder).stop().animate({width:width,height:height},opts.effects.repositionSpeed,'easeOutCirc');$('div.ilightbox-inner-toolbar',holder).stop().animate({width:width},opts.effects.repositionSpeed,'easeOutCirc',function(){$(this).css('overflow','visible');});}else{holder.css(opacityMobile);$('div.ilightbox-container',holder).css({width:width,height:height});$('div.ilightbox-inner-toolbar',holder).css({width:width});}},resume:function(priority){var iL=this,vars=iL.vars,opts=iL.options;if(!opts.slideshow.pauseTime||opts.controls.slideshow&&vars.total<=1||priority<vars.isPaused){return;} 1671vars.isPaused=0;if(vars.cycleID){vars.cycleID=clearTimeout(vars.cycleID);} 1672vars.cycleID=setTimeout(function(){if(vars.current==vars.total-1)iL.goTo(0);else iL.moveTo('next');},opts.slideshow.pauseTime);},pause:function(priority){var iL=this,vars=iL.vars,opts=iL.options;if(priority<vars.isPaused){return;} 1673vars.isPaused=priority||100;if(vars.cycleID){vars.cycleID=clearTimeout(vars.cycleID);}},resetCycle:function(){var iL=this,vars=iL.vars,opts=iL.options;if(opts.controls.slideshow&&vars.cycleID&&!vars.isPaused){iL.resume();}},getNewDimenstions:function(width,height,width_old,height_old,thumb){var iL=this;if(!width)factor=height/height_old;else if(!height)factor=width/width_old;else factor=min(width/width_old,height/height_old);if(!thumb){if(factor>iL.options.maxScale)factor=iL.options.maxScale;else if(factor<iL.options.minScale)factor=iL.options.minScale;} 1674var final_width=(iL.options.keepAspectRatio)?round(width_old*factor):width,final_height=(iL.options.keepAspectRatio)?round(height_old*factor):height;return{width:final_width,height:final_height,ratio:factor};},setOption:function(options){var iL=this;iL.options=$.extend(true,iL.options,options||{});iL.refresh();},availPlugins:function(){var iL=this,testEl=document.createElement("video");iL.plugins={flash:!isMobile,quicktime:(parseInt(PluginDetect.getVersion("QuickTime"))>=0)?true:false,html5H264:!!(testEl.canPlayType&&testEl.canPlayType('video/mp4').replace(/no/,'')),html5WebM:!!(testEl.canPlayType&&testEl.canPlayType('video/webm').replace(/no/,'')),html5Vorbis:!!(testEl.canPlayType&&testEl.canPlayType('video/ogg').replace(/no/,'')),html5QuickTime:!!(testEl.canPlayType&&testEl.canPlayType('video/quicktime').replace(/no/,''))};},addContent:function(element,obj){var iL=this,el;switch(obj.type){case'video':var HTML5=false,videoType=obj.videoType,html5video=obj.options.html5video;if(((videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v')||html5video.h264)&&iL.plugins.html5H264) 1675obj.ext='mp4',obj.URL=html5video.h264||obj.URL;else if(html5video.webm&&iL.plugins.html5WebM) 1676obj.ext='webm',obj.URL=html5video.webm||obj.URL;else if(html5video.ogg&&iL.plugins.html5Vorbis) 1677obj.ext='ogv',obj.URL=html5video.ogg||obj.URL;if(iL.plugins.html5H264&&(videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v'))HTML5=true,videoType="video/mp4";else if(iL.plugins.html5WebM&&(videoType=='video/webm'||obj.ext=='webm'))HTML5=true,videoType="video/webm";else if(iL.plugins.html5Vorbis&&(videoType=='video/ogg'||obj.ext=='ogv'))HTML5=true,videoType="video/ogg";else if(iL.plugins.html5QuickTime&&(videoType=='video/quicktime'||obj.ext=='mov'||obj.ext=='qt'))HTML5=true,videoType="video/quicktime";if(HTML5){el=$('<video />',{"width":"100%","height":"100%","preload":html5video.preload,"autoplay":html5video.autoplay,"loop":html5video.loop,"poster":html5video.poster,"controls":html5video.controls,"controlslist":"nodownload"}).append($('<source />',{"src":obj.URL,"type":videoType}));}else{if(!iL.plugins.quicktime)el=$('<span />',{"class":"ilightbox-alert",html:iL.options.errors.missingPlugin.replace('{pluginspage}',pluginspages.quicktime).replace('{type}','QuickTime')});else{el=$('<object />',{"type":"video/quicktime","pluginspage":pluginspages.quicktime}).attr({"data":obj.URL,"width":"100%","height":"100%"}).append($('<param />',{"name":"src","value":obj.URL})).append($('<param />',{"name":"autoplay","value":"false"})).append($('<param />',{"name":"loop","value":"false"})).append($('<param />',{"name":"scale","value":"tofit"}));if(browser.msie)el=QT_GenerateOBJECTText(obj.URL,'100%','100%','','SCALE','tofit','AUTOPLAY','false','LOOP','fal
1677se');}} 1678break;case'flash':if(!iL.plugins.flash)el=$('<span />',{"class":"ilightbox-alert",html:iL.options.errors.missingPlugin.replace('{pluginspage}',pluginspages.flash).replace('{type}','Adobe Flash player')});else{var flashvars="",i=0;if(obj.options.flashvars)$.each(obj.options.flashvars,function(k,v){if(i!=0)flashvars+="&";flashvars+=k+"="+encodeURIComponent(v);i++;});else flashvars=null;el=$('<embed />').attr({"type":"application/x-shockwave-flash","src":obj.URL,"width":(typeof obj.options.width=='number'&&obj.options.width&&iL.options.minScale=='1'&&iL.options.maxScale=='1')?obj.options.width:"100%","height":(typeof obj.options.height=='number'&&obj.options.height&&iL.options.minScale=='1'&&iL.options.maxScale=='1')?obj.options.height:"100%","quality":"high","bgcolor":"#000000","play":"true","loop":"true","menu":"true","wmode":"transparent","scale":"showall","allowScriptAccess":"always","allowFullScreen":"true","flashvars":flashvars,"fullscreen":"yes"});} 1679break;case'iframe':el=$('<iframe />').attr({"width":(typeof obj.options.width=='number'&&obj.options.width&&iL.options.minScale=='1'&&iL.options.maxScale=='1')?obj.options.width:"100%","height":(typeof obj.options.height=='number'&&obj.options.height&&iL.options.minScale=='1'&&iL.options.maxScale=='1')?obj.options.height:"100%",src:obj.URL,frameborder:0,'hspace':0,'vspace':0,'scrolling':supportTouch?'auto':'scroll','webkitAllowFullScreen':'','mozallowfullscreen':'','allowFullScreen':''});break;case'inline':el=$('<div class="ilightbox-wrapper"></div>').html($(obj.URL).clone(true));break;case'html':var object=obj.URL,el;if(object[0].nodeName){el=$('<div class="ilightbox-wrapper"></div>').html(object);}else{var dom=$(obj.URL),html=(dom.selector)?$('<div>'+dom+'</div>'):dom;el=$('<div class="ilightbox-wrapper"></div>').html(html);} 1680break;} 1681$('div.ilightbox-container',element).empty().html(el);if(el[0].tagName.toLowerCase()==='video'&&browser.webkit)setTimeout(function(){var src=el[0].currentSrc+'?'+floor(random()*30000);el[0].currentSrc=src;el[0].src=src;});return el;},ogpRecognition:function(obj,callback){var iL=this,url=obj.URL;iL.showLoader();doAjax(url,function(data){iL.hideLoader();if(data){var object=new Object();object.length=false,object.url=data.url;if(data.status==200){var result=data.results,type=result.type,source=result.source;object.source=source.src,object.width=source.width&&parseInt(source.width)||0,object.height=source.height&&parseInt(source.height)||0,object.type=type,object.thumbnail=source.thumbnail||result.images&&result.images[0],object.html5video=result.html5video||{},object.length=true;if(source.type=='application/x-shockwave-flash')object.type="flash";else if(source.type.indexOf("video/")!=-1)object.type="video";else if(source.type.indexOf("/html")!=-1)object.type="iframe";else if(source.type.indexOf("image/")!=-1)object.type="image";}else if(typeof data.response!='undefined') 1682throw data.response;callback.call(this,object.length?object:false);}});},hashChangeHandler:function(url){var iL=this,vars=iL.vars,opts=iL.options,URL=url||window.location.href,hash=parseURI(URL).hash,split=hash.split('/'),index=split[1];if(vars.hashLock||('#'+opts.linkId!=split[0]&&hash.length>1))return;if(index){var target=split[1]||0;if(iL.items[target]){var overlay=$('.ilightbox-overlay');if(overlay.length&&overlay.attr('linkid')==opts.linkId){iL.goTo(target);}else{iL.itemsObject[target].trigger(ishybrid?"itap click":supportTouch?'itap':'click');}}else{var overlay=$('.ilightbox-overlay');if(overlay.length)iL.closeAction();}}else{var overlay=$('.ilightbox-overlay');if(overlay.length)iL.closeAction();}}};function getPixel($element,property){return parseInt($element.css(property),10)||0;} 1683function within(number,min,max){return number<min?min:number>max?max:number;} 1684function getViewport(){var e=window,a='inner';if(!('innerWidth'in window)){a='client';e=document.documentElement||document.body;} 1685return{width:e[a+'Width'],height:e[a+'Height']}} 1686function removeHash(){var scroll=getScrollXY();history.replaceState({},document.title,window.location.pathname+window.location.search);window.scrollTo(scroll.x,scroll.y);} 1687function doAjax(url,callback){var url="//ilightbox.net/getSource/jsonp.php?url="+encodeURIComponent(url).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A');$.ajax({url:url,dataType:'jsonp'});iLCallback=function(data){callback.call(this,data);};} 1688function findImageInElement(element){var elements=$('*',element),imagesArr=new Array();elements.each(function(){var url="",element=this;if($(element).css("background-image")!="none"){url=$(element).css("background-image");}else if(typeof($(element).attr("src"))!="undefined"&&element.nodeName.toLowerCase()=="img"){url=$(element).attr("src");} 1689if(url.indexOf("gradient")==-1){url=url.replace(/url\(\"/g,"");url=url.replace(/url\(/g,"");url=url.replace(/\"\)/g,"");url=url.replace(/\)/g,"");var urls=url.split(",");for(var i=0;i<urls.length;i++){if(urls[i].length>0&&$.inArray(urls[i],imagesArr)==-1){var extra="";if(browser.msie&&browser.version<9){extra="?"+floor(random()*3000);} 1690imagesArr.push(urls[i]+extra);}}}});return imagesArr;} 1691function getExtension(URL){if(URL!==null){var ext=URL.indexOf('?')!==-1?URL.split('?')[0]:URL;ext=ext.split('.').pop().toLowerCase();return ext;}} 1692function getTypeByExtension(URL){var type,ext=getExtension(URL);if(URL==undefined){return false;} 1693if(extensions.image.indexOf(ext)!==-1)type='image';else if(extensions.flash.indexOf(ext)!==-1)type='flash';else if(extensions.video.indexOf(ext)!==-1)type='video';else if(ext.substring(0,1)=="#")type='inline';else type='iframe';return type;} 1694function percentToValue(percent,total){return parseInt((total/100)*percent);} 1695function parseURI(url){var m=String(url).replace(/^\s+|\s+$/g,'').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return(m?{href:m[0]||'',protocol:m[1]||'',authority:m[2]||'',host:m[3]||'',hostname:m[4]||'',port:m[5]||'',pathname:m[6]||'',search:m[7]||'',hash:m[8]||''}:null);} 1696function absolutizeURI(base,href){var iL=this;function removeDotSegments(input){var output=[];input.replace(/^(\.\.?(\/|$))+/,'').replace(/\/(\.(\/|$))+/g,'/').replace(/\/\.\.$/,'/../').replace(/\/?[^\/]*/g,function(p){if(p==='/..'){output.pop();}else{output.push(p);}});return output.join('').replace(/^\//,input.charAt(0)==='/'?'/':'');} 1697href=parseURI(href||'');base=parseURI(base||'');return!href||!base?null:(href.protocol||base.protocol)+ 1698(href.protocol||href.authority?href.authority:base.authority)+ 1699removeDotSegments(href.protocol||href.authority||href.pathname.charAt(0)==='/'?href.pathname:(href.pathname?((base.authority&&!base.pathname?'/':'')+base.pathname.slice(0,base.pathname.lastIndexOf('/')+1)+href.pathname):base.pathname))+ 1700(href.protocol||href.authority||href.pathname?href.search:(href.search||base.search))+ 1701href.hash;} 1702function version_compare(v1,v2,operator){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var i=0,x=0,compare=0,vm={'dev':-6,'alpha':-5,'a':-5,'beta':-4,'b':-4,'RC':-3,'rc':-3,'#':-2,'p':1,'pl':1},prepVersion=function(v){v=(''+v).replace(/[_\-+]/g,'.');v=v.replace(/([^.\d]+)/g,'.$1.').replace(/\.{2,}/g,'.');return(!v.length?[-8]:v.split('.'));},numVersion=function(v){return!v?0:(isNaN(v)?vm[v]||-7:parseInt(v,10));};v1=prepVersion(v1);v2=prepVersion(v2);x=max(v1.length,v2.length);for(i=0;i<x;i++){if(v1[i]==v2[i]){continue;} 1703v1[i]=numVersion(v1[i]);v2[i]=numVersion(v2[i]);if(v1[i]<v2[i]){compare=-1;break;}else if(v1[i]>v2[i]){compare=1;break;}} 1704if(!operator){return compare;} 1705switch(operator){case'>':case'gt':return(compare>0);case'>=':case'ge':return(compare>=0);case'<=':case'le':return(compare<=0);case'==':case'=':case'eq':return(compare===0);case'<>':case'!=':case'ne':return(compare!==0);case'':case'<':case'lt':return(compare<0);default:return null;}} 1706$.fn.iLightBox=function(){var args=arguments,opt=($.isPlainObject(args[0]))?args[0]:args[1],items=($.isArray(args[0])||typeof args[0]=='string')?args[0]:args[1];if(!opt)opt={};var options=$.extend(true,{attr:'href',path:'vertical',skin:'dark',linkId:false,infinite:false,startFrom:0,randomStart:false,keepAspectRatio:true,maxScale:1,minScale:.2,innerToolbar:false,smartRecognition:false,mobileOptimizer:true,fullAlone:true,fullViewPort:null,fullStretchTypes:'flash, video',overlay:{blur:true,opacity:.85},controls:{arrows:false,slideshow:false,toolbar:true,fullscreen:true,thumbnail:true,keyboard:true,mousewheel:true,swipe:true},keyboard:{left:true,right:true,up:true,down:true,esc:true,shift_enter
1706:true},show:{effect:true,speed:300,title:true},hide:{effect:true,speed:300},caption:{start:true,show:'mouseenter',hide:'mouseleave'},social:{start:true,show:'mouseenter',hide:'mouseleave',buttons:false},styles:{pageOffsetX:0,pageOffsetY:0,nextOffsetX:45,nextOffsetY:0,nextOpacity:1,nextScale:1,prevOffsetX:45,prevOffsetY:0,prevOpacity:1,prevScale:1},thumbnails:{maxWidth:120,maxHeight:80,normalOpacity:1,activeOpacity:.6},effects:{reposition:true,repositionSpeed:200,switchSpeed:500,loadedFadeSpeed:180,fadeSpeed:200},slideshow:{pauseTime:5000,pauseOnHover:false,startPaused:true},text:{close:"Press Esc to close",enterFullscreen:"Enter Fullscreen (Shift+Enter)",exitFullscreen:"Exit Fullscreen (Shift+Enter)",slideShow:"Slideshow",next:"Next",previous:"Previous"},errors:{loadImage:"An error occurred when trying to load photo.",loadContents:"An error occurred when trying to load contents.",missingPlugin:"The content your are attempting to view requires the <a href='{pluginspage}' target='_blank'>{type} plugin<\/a>."},ajaxSetup:{url:'',beforeSend:function(jqXHR,settings){},cache:false,complete:function(jqXHR,textStatus){},crossDomain:false,error:function(jqXHR,textStatus,errorThrown){},success:function(data,textStatus,jqXHR){},global:true,ifModified:false,username:null,password:null,type:'GET'},callback:{}},opt);var instant=($.isArray(items)||typeof items=='string')?true:false;items=$.isArray(items)?items:new Array();if(typeof args[0]=='string')items[0]=args[0];if(version_compare($.fn.jquery,'1.8','>=')){var iLB=new iLightBox($(this),options,items,instant);return{close:function(){iLB.closeAction();},fullscreen:function(){iLB.fullScreenAction();},moveNext:function(){iLB.moveTo('next');},movePrev:function(){iLB.moveTo('prev');},goTo:function(index){iLB.goTo(index);},refresh:function(){iLB.refresh();},reposition:function(){(arguments.length>0)?iLB.repositionPhoto(true):iLB.repositionPhoto();},setOption:function(options){iLB.setOption(options);},destroy:function(){iLB.closeAction();iLB.dispatchItemsEvents();}};}else{throw"The jQuery version that was loaded is too old. iLightBox requires jQuery 1.8+";}};$.iLightBox=function(){return $.fn.iLightBox(arguments[0],arguments[1]);};function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;} 1707return{x:scrOfX,y:scrOfY};} 1708(function(){$.each(("touchstart touchmove touchend "+"tap taphold "+"swipe swipeleft swiperight "+"scrollstart scrollstop").split(" "),function(i,name){$.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var tapSettings={startEvent:'touchstart.iTap',endEvent:'touchend.iTap'};$.event.special.itap={setup:function(){var self=this,$self=$(this),start,stop;$self.bind(tapSettings.startEvent,function(event){start=getScrollXY();$self.one(tapSettings.endEvent,function(event){stop=getScrollXY();var orgEvent=event||window.event;event=$.event.fix(orgEvent);event.type="itap";if((start&&stop)&&(start.x==stop.x&&start.y==stop.y))($.event.dispatch||$.event.handle).call(self,event);start=stop=undefined;});});},teardown:function(){$(this).unbind(tapSettings.startEvent);}};}());(function(){fullScreenApi={supportsFullScreen:false,isFullScreen:function(){return false;},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:'',prefix:''},browserPrefixes='webkit moz o ms khtml'.split(' ');if(typeof document.cancelFullScreen!='undefined'){fullScreenApi.supportsFullScreen=true;}else{for(var i=0,il=browserPrefixes.length;i<il;i++){fullScreenApi.prefix=browserPrefixes[i];if(typeof document[fullScreenApi.prefix+'CancelFullScreen']!='undefined'){fullScreenApi.supportsFullScreen=true;break;}}} 1709if(fullScreenApi.supportsFullScreen){fullScreenApi.fullScreenEventName=fullScreenApi.prefix+'fullscreenchange';fullScreenApi.isFullScreen=function(){switch(this.prefix){case'':return document.fullScreen;case'webkit':return document.webkitIsFullScreen;default:return document[this.prefix+'FullScreen'];}} 1710fullScreenApi.requestFullScreen=function(el){return(this.prefix==='')?el.requestFullScreen():el[this.prefix+'RequestFullScreen']();} 1711fullScreenApi.cancelFullScreen=function(el){return(this.prefix==='')?document.cancelFullScreen():document[this.prefix+'CancelFullScreen']();}}}());(function(){function uaMatch(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};} 1712var matched=uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;} 1713if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}}());(function(){var prefixes=['','webkit','moz','ms','o'];var el=document.createElement('div');function testProp(prop){for(var p=0,pl=prefixes.length;p<pl;p++){var prefixedProp=prefixes[p]?prefixes[p]+prop.charAt(0).toUpperCase()+prop.slice(1):prop;if(el.style[prefixedProp]!==undefined){return prefixedProp;}}} 1714transform=testProp('transform')||'';gpuAcceleration=testProp('perspective')?'translateZ(0) ':'';}());var PluginDetect={version:"0.7.9",name:"PluginDetect",handler:function(c,b,a){return function(){c(b,a)}},openTag:"<",isDefined:function(b){return typeof b!="undefined"},isArray:function(b){return(/array/i).test(Object.prototype.toString.call(b))},isFunc:function(b){return typeof b=="function"},isString:function(b){return typeof b=="string"},isNum:function(b){return typeof b=="number"},isStrNum:function(b){return(typeof b=="string"&&(/\d/).test(b))},getNumRegx:/[\d][\d\.\_,-]*/,splitNumRegx:/[\.\_,-]/g,getNum:function(b,c){var d=this,a=d.isStrNum(b)?(d.isDefined(c)?new RegExp(c):d.getNumRegx).exec(b):null;return a?a[0]:null},compareNums:function(h,f,d){var e=this,c,b,a,g=parseInt;if(e.isStrNum(h)&&e.isStrNum(f)){if(e.isDefined(d)&&d.compareNums){return d.compareNums(h,f)}c=h.split(e.splitNumRegx);b=f.split(e.splitNumRegx);for(a=0;a<min(c.length,b.length);a++){if(g(c[a],10)>g(b[a],10)){return 1}if(g(c[a],10)<g(b[a],10)){return-1}}}return 0},formatNum:function(b,c){var d=this,a,e;if(!d.isStrNum(b)){return null}if(!d.isNum(c)){c=4}c--;e=b.replace(/\s/g,"").split(d.splitNumRegx).concat(["0","0","0","0"]);for(a=0;a<4;
1714a++){if(/^(0+)(.+)$/.test(e[a])){e[a]=RegExp.$2}if(a>c||!(/\d/).test(e[a])){e[a]="0"}}return e.slice(0,4).join(",")},$$hasMimeType:function(a){return function(c){if(!a.isIE&&c){var f,e,b,d=a.isArray(c)?c:(a.isString(c)?[c]:[]);for(b=0;b<d.length;b++){if(a.isString(d[b])&&/[^\s]/.test(d[b])){f=navigator.mimeTypes[d[b]];e=f?f.enabledPlugin:0;if(e&&(e.name||e.description)){return f}}}}return null}},findNavPlugin:function(l,e,c){var j=this,h=new RegExp(l,"i"),d=(!j.isDefined(e)||e)?/\d/:0,k=c?new RegExp(c,"i"):0,a=navigator.plugins,g="",f,b,m;for(f=0;f<a.length;f++){m=a[f].description||g;b=a[f].name||g;if((h.test(m)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))||(h.test(b)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))){if(!k||!(k.test(m)||k.test(b))){return a[f]}}}return null},getMimeEnabledPlugin:function(k,m,c){var e=this,f,b=new RegExp(m,"i"),h="",g=c?new RegExp(c,"i"):0,a,l,d,j=e.isString(k)?[k]:k;for(d=0;d<j.length;d++){if((f=e.hasMimeType(j[d]))&&(f=f.enabledPlugin)){l=f.description||h;a=f.name||h;if(b.test(l)||b.test(a)){if(!g||!(g.test(l)||g.test(a))){return f}}}}return 0},getPluginFileVersion:function(f,b){var h=this,e,d,g,a,c=-1;if(h.OS>2||!f||!f.version||!(e=h.getNum(f.version))){return b}if(!b){return e}e=h.formatNum(e);b=h.formatNum(b);d=b.split(h.splitNumRegx);g=e.split(h.splitNumRegx);for(a=0;a<d.length;a++){if(c>-1&&a>c&&d[a]!="0"){return b}if(g[a]!=d[a]){if(c==-1){c=a}if(d[a]!="0"){return b}}}return e},AXO:window.ActiveXObject,getAXO:function(a){var f=null,d,b=this,c={};try{f=new b.AXO(a)}catch(d){}return f},convertFuncs:function(f){var a,g,d,b=/^[\$][\$]/,c=this;for(a in f){if(b.test(a)){try{g=a.slice(2);if(g.length>0&&!f[g]){f[g]=f[a](f);delete f[a]}}catch(d){}}}},initObj:function(e,b,d){var a,c;if(e){if(e[b[0]]==1||d){for(a=0;a<b.length;a=a+2){e[b[a]]=b[a+1]}}for(a in e){c=e[a];if(c&&c[b[0]]==1){this.initObj(c,b)}}}},initScript:function(){var d=this,a=navigator,h,i=document,l=a.userAgent||"",j=a.vendor||"",b=a.platform||"",k=a.product||"";d.initObj(d,["$",d]);for(h in d.Plugins){if(d.Plugins[h]){d.initObj(d.Plugins[h],["$",d,"$$",d.Plugins[h]],1)}}d.convertFuncs(d);d.OS=100;if(b){var g=["Win",1,"Mac",2,"Linux",3,"FreeBSD",4,"iPhone",21.1,"iPod",21.2,"iPad",21.3,"Win.*CE",22.1,"Win.*Mobile",22.2,"Pocket\\s*PC",22.3,"",100];for(h=g.length-2;h>=0;h=h-2){if(g[h]&&new RegExp(g[h],"i").test(b)){d.OS=g[h+1];break}}};d.head=i.getElementsByTagName("head")[0]||i.getElementsByTagName("body")[0]||i.body||null;d.isIE=new Function("return/*@cc_on!@*/!1")();d.verIE=d.isIE&&(/MSIE\s*(\d+\.?\d*)/i).test(l)?parseFloat(RegExp.$1,10):null;d.verIEfull=null;d.docModeIE=null;if(d.isIE){var f,n,c=document.createElement("div");try{c.style.behavior="url(#default#clientcaps)";d.verIEfull=(c.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid")).replace(/,/g,".")}catch(f){}n=parseFloat(d.verIEfull||"0",10);d.docModeIE=i.documentMode||((/back/i).test(i.compatMode||"")?5:n)||d.verIE;d.verIE=n||d.docModeIE};d.ActiveXEnabled=false;if(d.isIE){var h,m=["Msxml2.XMLHTTP","Msxml2.DOMDocument","Microsoft.XMLDOM","ShockwaveFlash.ShockwaveFlash","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary","wmplayer.ocx"];for(h=0;h<m.length;h++){if(d.getAXO(m[h])){d.ActiveXEnabled=true;break}}};d.isGecko=(/Gecko/i).test(k)&&(/Gecko\s*\/\s*\d/i).test(l);
1714d.verGecko=d.isGecko?d.formatNum((/rv\s*\:\s*([\.\,\d]+)/i).test(l)?RegExp.$1:"0.9"):null;d.isChrome=(/Chrome\s*\/\s*(\d[\d\.]*)/i).test(l);d.verChrome=d.isChrome?d.formatNum(RegExp.$1):null;d.isSafari=((/Apple/i).test(j)||(!j&&!d.isChrome))&&(/Safari\s*\/\s*(\d[\d\.]*)/i).test(l);d.verSafari=d.isSafari&&(/Version\s*\/\s*(\d[\d\.]*)/i).test(l)?d.formatNum(RegExp.$1):null;d.isOpera=(/Opera\s*[\/]?\s*(\d+\.?\d*)/i).test(l);d.verOpera=d.isOpera&&((/Version\s*\/\s*(\d+\.?\d*)/i).test(l)||1)?parseFloat(RegExp.$1,10):null;d.addWinEvent("load",d.handler(d.runWLfuncs,d))},init:function(d){var c=this,b,d,a={status:-3,plugin:0};if(!c.isString(d)){return a}if(d.length==1){c.getVersionDelimiter=d;return a}d=d.toLowerCase().replace(/\s/g,"");b=c.Plugins[d];if(!b||!b.getVersion){return a}a.plugin=b;if(!c.isDefined(b.installed)){b.installed=null;b.version=null;b.version0=null;b.getVersionDone=null;b.pluginName=d}c.garbage=false;if(c.isIE&&!c.ActiveXEnabled&&d!=="java"){a.status=-2;return a}a.status=1;return a},fPush:function(b,a){var c=this;if(c.isArray(a)&&(c.isFunc(b)||(c.isArray(b)&&b.length>0&&c.isFunc(b[0])))){a.push(b)}},callArray:function(b){var c=this,a;if(c.isArray(b)){for(a=0;a<b.length;a++){if(b[a]===null){return}c.call(b[a]);b[a]=null}}},call:function(c){var b=this,a=b.isArray(c)?c.length:-1;if(a>0&&b.isFunc(c[0])){c[0](b,a>1?c[1]:0,a>2?c[2]:0,a>3?c[3]:0)}else{if(b.isFunc(c)){c(b)}}},getVersionDelimiter:",",$$getVersion:function(a){return function(g,d,c){var e=a.init(g),f,b,h={};if(e.status<0){return null};f=e.plugin;if(f.getVersionDone!=1){f.getVersion(null,d,c);if(f.getVersionDone===null){f.getVersionDone=1}}a.cleanup();b=(f.version||f.version0);b=b?b.replace(a.splitNumRegx,a.getVersionDelimiter):b;return b}},cleanup:function(){var a=this;if(a.garbage&&a.isDefined(window.CollectGarbage)){window.CollectGarbage()}},isActiveXObject:function(d,b){var f=this,a=false,g,c='<object width="1" height="1" style="display:none" '+d.getCodeBaseVersion(b)+">"+d.HTML+f.openTag+"/object>";if(!f.head){return a}f.head.insertBefore(document.createElement("object"),f.head.firstChild);f.head.firstChild.outerHTML=c;try{f.head.firstChild.classid=d.classID}catch(g){}try{if(f.head.firstChild.object){a=true}}catch(g){}try{if(a&&f.head.firstChild.readyState<4){f.garbage=true}}catch(g){}f.head.removeChild(f.head.firstChild);return a},codebaseSearch:function(f,b){var c=this;if(!c.ActiveXEnabled||!f){return null}if(f.BIfuncs&&f.BIfuncs.length&&f.BIfuncs[f.BIfuncs.length-1]!==null){c.callArray(f.BIfuncs)}var d,o=f.SEARCH,k={};if(c.isStrNum(b)){if(o.match&&o.min&&c.compareNums(b,o.min)<=0){return true}if(o.match&&o.max&&c.compareNums(b,o.max)>=0){return false}d=c.isActiveXObject(f,b);if(d&&(!o.min||c.compareNums(b,o.min)>0)){o.min=b}if(!d&&(!o.max||c.compareNums(b,o.max)<0)){o.max=b}return d};var e=[0,0,0,0],l=[].concat(o.digits),a=o.min?1:0,j,i,h,g,m,n=function(p,r){var q=[].concat(e);q[p]=r;return c.isActiveXObject(f,q.join(","))};if(o.max){g=o.max.split(c.splitNumRegx);for(j=0;j<g.length;j++){g[j]=parseInt(g[j],10)}if(g[0]<l[0]){l[0]=g[0]}}if(o.min){m=o.min.split(c.splitNumRegx);for(j=0;j<m.length;j++){m[j]=parseInt(m[j],10)}if(m[0]>e[0]){e[0]=m[0]}}if(m&&g){for(j=1;j<m.length;j++){if(m[j-1]!=g[j-1]){break}if(g[j]<l[j]){l[j]=g[j]}if(m[j]>e[j]){e[j]=m[j]}}}if(o.max){for(j=1;j<l.length;j++){if(g[j]>0&&l[j]==0&&l[j-1]<o.digits[j-1]){l[j-1]+=1;break}}};for(j=0;j<l.length;j++){h={};for(i=0;i<20;i++){if(l[j]-e[j]<1){break}d=round((l[j]+e[j])/2);if(h["a"+d]){break}h["a"+d]=1;if(n(j,d)){e[j]=d;a=1}else{l[j]=d}}l[j]=e[j];if(!a&&n(j,e[j])){a=1};if(!a){break}};return a?e.join(","):null},addWinEvent:function(d,c){var e=this,a=window,b;if(e.isFunc(c)){if(a.addEventListener){a.addEventListener(d,c,false)}else{if(a.attachEvent){a.attachEvent("on"+d,c)}else{b=a["on"+d];a["on"+d]=e.winHandler(c,b)}}}},winHandler:function(d,c){return function(){d();if(typeof c=="function"){c()}}},WLfuncs0:[],WLfuncs:[],runWLfuncs:function(a){var b={};a.winLoaded=true;a.callArray(a.WLfuncs0);a.callArray(a.WLfuncs);if(a.onDoneEmptyDiv){a.onDoneEmptyDiv()}},winLoaded:false,$$onWindowLoaded:function(a){return function(b){if(a.winLoaded){a.call(b)}else{a.fPush(b,a.WLfuncs)}}},div:null,divID:"plugindetect",divWidth:50,pluginSize:1,emptyDiv:function(){var d=this,b,h,c,a,f,g;if(d.div&&d.div.childNodes){for(b=d.div.childNodes.length-1;b>=0;b--){c=d.div.childNodes[b];if(c&&c.childNodes){for(h=c.childNodes.length-1;h>=0;h--){g=c.childNodes[h];try{c.removeChild(g)}catch(f){}}}if(c){try{d.div.removeChild(c)}catch(f){}}}}if(!d.div){a=document.getElementById(d.divID);if(a){d.div=a}}if(d.div&&d.div.parentNode){try{d.div.parentNode.removeChild(d.div)}catch(f){}d.div=null}},DONEfuncs:[],onDoneEmptyDiv:function(){var c=this,a,b;if(!c.winLoaded){return}if(c.WLfuncs&&c.WLfuncs.length&&c.WLfuncs[c.WLfuncs.length-1]!==null){return}for(a in c){b=c[a];if(b&&b.funcs){if(b.OTF==3){return}if(b.funcs.length&&b.funcs[b.funcs.length-1]!==null){return}}}for(a=0;a<c.DONEfuncs.length;a++){c.callArray(c.DONEfuncs)}
1714c.emptyDiv()},getWidth:function(c){if(c){var a=c.scrollWidth||c.offsetWidth,b=this;if(b.isNum(a)){return a}}return-1},getTagStatus:function(m,g,a,b){var c=this,f,k=m.span,l=c.getWidth(k),h=a.span,j=c.getWidth(h),d=g.span,i=c.getWidth(d);if(!k||!h||!d||!c.getDOMobj(m)){return-2}if(j<i||l<0||j<0||i<0||i<=c.pluginSize||c.pluginSize<1){return 0}if(l>=i){return-1}try{if(l==c.pluginSize&&(!c.isIE||c.getDOMobj(m).readyState==4)){if(!m.winLoaded&&c.winLoaded){return 1}if(m.winLoaded&&c.isNum(b)){if(!c.isNum(m.count)){m.count=b}if(b-m.count>=10){return 1}}}}catch(f){}return 0},getDOMobj:function(g,a){var f,d=this,c=g?g.span:0,b=c&&c.firstChild?1:0;try{if(b&&a){d.div.focus()}}catch(f){}return b?c.firstChild:null},setStyle:function(b,g){var f=b.style,a,d,c=this;if(f&&g){for(a=0;a<g.length;a=a+2){try{f[g[a]]=g[a+1]}catch(d){}}}},insertDivInBody:function(i,g){var f,c=this,h="pd33993399",b=null,d=g?window.top.document:window.document,a=d.getElementsByTagName("body")[0]||d.body;if(!a){try{d.write('<div id="'+h+'">.'+c.openTag+"/div>");b=d.getElementById(h)}catch(f){}}a=d.getElementsByTagName("body")[0]||d.body;if(a){a.insertBefore(i,a.firstChild);if(b){a.removeChild(b)}}},insertHTML:function(f,b,g,a,k){var l,m=document,j=this,p,o=m.createElement("span"),n,i;var c=["outlineStyle","none","borderStyle","none","padding","0px","margin","0px","visibility","visible"];var h="outline-style:none;border-style:none;padding:0px;margin:0px;visibility:visible;";if(!j.isDefined(a)){a=""}if(j.isString(f)&&(/[^\s]/).test(f)){f=f.toLowerCase().replace(/\s/g,"");p=j.openTag+f+' width="'+j.pluginSize+'" height="'+j.pluginSize+'" ';p+='style="'+h+'display:inline;" ';for(n=0;n<b.length;n=n+2){if(/[^\s]/.test(b[n+1])){p+=b[n]+'="'+b[n+1]+'" '}}p+=">";for(n=0;n<g.length;n=n+2){if(/[^\s]/.test(g[n+1])){p+=j.openTag+'param name="'+g[n]+'" value="'+g[n+1]+'" />'}}p+=a+j.openTag+"/"+f+">"}else{p=a}if(!j.div){i=m.getElementById(j.divID);if(i){j.div=i}else{j.div=m.createElement("div");j.div.id=j.divID}j.setStyle(j.div,c.concat(["width",j.divWidth+"px","height",(j.pluginSize+3)+"px","fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","block"]));if(!i){j.setStyle(j.div,["position","absolute","right","0px","top","0px"]);j.insertDivInBody(j.div)}}if(j.div&&j.div.parentNode){j.setStyle(o,c.concat(["fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","inline"]));try{o.innerHTML=p}catch(l){};try{j.div.appendChild(o)}catch(l){};return{span:o,winLoaded:j.winLoaded,tagName:f,outerHTML:p}}return{span:null,winLoaded:j.winLoaded,tagName:"",outerHTML:p}},Plugins:{quicktime:{mimeType:["video/quicktime","application/x-quicktimeplayer","image/x-macpaint","image/x-quicktime"],progID:"QuickTimeCheckObject.QuickTimeCheck.1",progID0:"QuickTime.QuickTime",classID:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",minIEver:7,HTML:'<param name="src" value="" /><param name="controller" value="false" />',getCodeBaseVersion:function(a){return'codebase="#version='+a+'"'},SEARCH:{min:0,max:0,match:0,digits:[16,128,128,0]},getVersion:function(c){var f=this,d=f.$,a=null,e=null,b;if(!d.isIE){if(d.hasMimeType(f.mimeType)){e=d.OS!=3?d.findNavPlugin("QuickTime.*Plug-?in",0):null;if(e&&e.name){a=d.getNum(e.name)}}}else{if(d.isStrNum(c)){b=c.split(d.splitNumRegx);if(b.length>3&&parseInt(b[3],10)>0){b[3]="9999"}c=b.join(",")}if(d.isStrNum(c)&&d.verIE>=f.minIEver&&f.canUseIsMin()>0){f.installed=f.isMin(c);f.getVersionDone=0;return}f.getVersionDone=1;if(!a&&d.verIE>=f.minIEver){a=f.CDBASE2VER(d.codebaseSearch(f))}if(!a){e=d.getAXO(f.progID);if(e&&e.QuickTimeVersion){a=e.QuickTimeVersion.toString(16);a=parseInt(a.charAt(0),16)+"."+parseInt(a.charAt(1),16)+"."+parseInt(a.charAt(2),16)}}}f.installed=a?1:(e?0:-1);f.version=d.formatNum(a,3)},cdbaseUpper:["7,60,0,0","0,0,0,0"],cdbaseLower:["7,50,0,0",null],cdbase2ver:[function(c,b){var a=b.split(c.$.splitNumRegx);return[a[0],a[1].charAt(0),a[1].charAt(1),a[2]].join(",")},null],CDBASE2VER:function(f){var e=this,c=e.$,b,a=e.cdbaseUpper,d=e.cdbaseLower;
1714if(f){f=c.formatNum(f);for(b=0;b<a.length;b++){if(a[b]&&c.compareNums(f,a[b])<0&&d[b]&&c.compareNums(f,d[b])>=0&&e.cdbase2ver[b]){return e.cdbase2ver[b](e,f)}}}return f},canUseIsMin:function(){var f=this,d=f.$,b,c=f.canUseIsMin,a=f.cdbaseUpper,e=f.cdbaseLower;if(!c.value){c.value=-1;for(b=0;b<a.length;b++){if(a[b]&&d.codebaseSearch(f,a[b])){c.value=1;break}if(e[b]&&d.codebaseSearch(f,e[b])){c.value=-1;break}}}f.SEARCH.match=c.value==1?1:0;return c.value},isMin:function(c){var b=this,a=b.$;return a.codebaseSearch(b,c)?0.7:-1}},flash:{mimeType:"application/x-shockwave-flash",progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var b=function(i){if(!i){return null}var e=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(i);return e?e[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null};var j=this,g=j.$,k,h,l=null,c=null,a=null,f,m,d;if(!g.isIE){m=g.hasMimeType(j.mimeType);if(m){f=g.getDOMobj(g.insertHTML("object",["type",j.mimeType],[],"",j));try{l=g.getNum(f.GetVariable("$version"))}catch(k){}}if(!l){d=m?m.enabledPlugin:null;if(d&&d.description){l=b(d.description)}if(l){l=g.getPluginFileVersion(d,l)}}}else{for(h=15;h>2;h--){c=g.getAXO(j.progID+"."+h);if(c){a=h.toString();break}}if(!c){c=g.getAXO(j.progID)}if(a=="6"){try{c.AllowScriptAccess="always"}catch(k){return"6,0,21,0"}}try{l=b(c.GetVariable("$version"))}catch(k){}if(!l&&a){l=a}}j.installed=l?1:-1;j.version=g.formatNum(l);return true}},shockwave:{mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var a=null,b=null,g,f,d=this,c=d.$;if(!c.isIE){f=c.findNavPlugin("Shockwave\\s*for\\s*Director");if(f&&f.description&&c.hasMimeType(d.mimeType)){a=c.getNum(f.description)}if(a){a=c.getPluginFileVersion(f,a)}}else{try{b=c.getAXO(d.progID).ShockwaveVersion("")}catch(g){}if(c.isString(b)&&b.length>0){a=c.getNum(b)}else{if(c.getAXO(d.progID+".8")){a="8"}else{if(c.getAXO(d.progID+".7")){a="7"}else{if(c.getAXO(d.progID+".1")){a="6"}}}}}d.installed=a?1:-1;d.version=c.formatNum(a)}},zz:0}};PluginDetect.initScript();var gArgCountErr='The "%%" function requires an even number of arguments.\nArguments should be in the form "atttributeName", "attributeValue", ...',gTagAttrs=null,gQTGeneratorVersion=1;function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(a,b){b=b.replace("%%",a);alert(b)}function _QTAddAttribute(a,b,c){var d;d=gTagAttrs[a+b];null==d&&(d=gTagAttrs[b]);return null!=d?(0==b.indexOf(a)&&null==c&&(c=b.substring(a.length)),null==c&&(c=b),c+'="'+d+'" '):""}function _QTAddObjectAttr(a,b){if(0==a.indexOf("emb#"))return"";0==a.indexOf("obj#")&&null==b&&(b=a.substring(4));return _QTAddAttribute("obj#",a,b)}function _QTAddEmbedAttr(a,b){if(0==a.indexOf("obj#"))return"";0==a.indexOf("emb#")&&null==b&&(b=a.substring(4));return _QTAddAttribute("emb#",a,b)}function _QTAddObjectParam(a,b){var c,d="",e=b?" />":">";-1==a.indexOf("emb#")&&(c=gTagAttrs["obj#"+a],null==c&&(c=gTagAttrs[a]),0==a.indexOf("obj#")&&(a=a.substring(4)),null!=c&&(d=' <param name="'+a+'" value="'+c+'"'+e+"\n"));return d}function _QTDeleteTagAttrs(){for(var a=0;a<arguments.length;a++){var b=arguments[a];delete gTagAttrs[b];delete gTagAttrs["emb#"+b];delete gTagAttrs["obj#"+b]}}function _QTGenerate(a,b,c){if(4>c.length||0!=c.length%2)return _QTComplain(a,gArgCountErr),"";gTagAttrs=[];gTagAttrs.src=c[0];gTagAttrs.width=c[1];gTagAttrs.height=c[2];gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/";a=c[3];if(null==a||""==a)a="6,0,2,0";gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+a;for(var d,e=4;e<c.length;e+=2)d=c[e].toLowerCase(),a=c[e+1],"name"==d||"id"==d?gTagAttrs.name=a:gTagAttrs[d]=a;c="<object "+_QTAddObjectAttr("classid")+_QTAddObjectAttr("width")+_QTAddObjectAttr("height")+_QTAddObjectAttr("codebase")+_QTAddObjectAttr("name","id")+_QTAddObjectAttr("tabindex")+_QTAddObjectAttr("hspace")+_QTAddObjectAttr("vspace")+_QTAddObjectAttr("border")+_QTAddObjectAttr("align")+_QTAddObjectAttr("class")+_QTAddObjectAttr("title")+_QTAddObjectAttr("accesskey")+_QTAddObjectAttr("noexternaldata")+">\n"+_QTAddObjectParam("src",b);e=" <embed "+_QTAddEmbedAttr("src")+_QTAddEmbedAttr("width")+_QTAddEmbedAttr("height")+_QTAddEmbedAttr("pluginspage")+_QTAddEmbedAttr("name")+_QTAddEmbedAttr("align")+_QTAddEmbedAttr("tabindex");_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex","hspace","vspace","border","align","noexternaldata","class","title","accesskey");for(d in gTagAttrs)a=gTagAttrs[d],null!=a&&(e+=_QTAddEmbedAttr(d),c+=_QTAddObjectParam(d,b));return c+e+"> </embed>\n</object>"}function QT_GenerateOBJECTText(){return _QTGenerate("QT_GenerateOBJECTText",!1,arguments)};(function(){function e(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var k=document,b,f=$.event.special,p=k.documentMode,m="oniLightBoxHashChange"in window&&(void 0===p||7<p);$.fn.iLightBoxHashChange=function(a){return a?this.bind("iLightBoxHashChange",a):this.trigger("iLightBoxHashChange")};$.fn.iLightBoxHashChange.delay=50;f.iLightBoxHashChange=$.extend(f.iLightBoxHashChange,{setup:function(){if(m)return!1;$(b.start)},teardown:function(){if(m)return!1;$(b.stop)}});b=function(){function a(){var c=e(),d=f(l);c!==l?(n(l=c,d),$(window).trigger("iLightBoxHashChange")):d!==l&&(location.href=location.href.replace(/#.*/,"")+d);g=setTimeout(a,$.fn.iLightBoxHashChange.delay)}var h={},g,l=e(),b=function(c){return c},n=b,f=b;h.start=function(){g||a()};h.stop=function(){g&&clearTimeout(g);g=void 0};browser.msie&&!m&&function(){var c,d;h.start=function(){c||(d=(d=$.fn.iLightBoxHashChange.src)&&d+e(),c=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||n(e());a()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,k.onpropertychange=function(){try{"title"===event.propertyName&&(c.document.title=k.title)}catch(a){}})};h.stop=b;f=function(){return e(c.location.href)};n=function(a,d){var b=c.document,e=$.fn.iLightBoxHashChange.domain;
1714a!==d&&(b.title=k.title,b.open(),e&&b.write('<script>document.domain="'+e+'"\x3c/script>'),b.close(),c.location.hash=a)}}();return h}()})();if(!Array.prototype.filter){Array.prototype.filter=function(fun){"use strict";if(this==null) 1715throw new TypeError();var t=Object(this);var len=t.length>>>0;if(typeof fun!="function") 1716throw new TypeError();var res=[];var thisp=arguments[1];for(var i=0;i<len;i++){if(i in t){var val=t[i];if(fun.call(thisp,val,i,t)) 1717res.push(val);}} 1718return res;};} 1719if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null){throw new TypeError('"this" is null or not defined');} 1720var O=Object(this);var len=O.length>>>0;if(len===0){return-1;} 1721var n=+fromIndex||0;if(abs(n)===Infinity){n=0;} 1722if(n>=len){return-1;} 1723k=max(n>=0?n:len-abs(n),0);while(k<len){var kValue;if(k in O&&O[k]===searchElement){return k;} 1724k++;} 1725return-1;};} 1726if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(searchElement){"use strict";if(this==null) 1727throw new TypeError();var t=Object(this);var len=t.length>>>0;if(len===0) 1728return-1;var n=len;if(arguments.length>1){n=Number(arguments[1]);if(n!=n) 1729n=0;else if(n!=0&&n!=(1/0)&&n!=-(1/0)) 1730n=(n>0||-1)*floor(abs(n));} 1731var k=n>=0?min(n,len-1):len-abs(n);for(;k>=0;k--){if(k in t&&t[k]===searchElement) 1732return k;} 1733return-1;};}})(jQuery,this); 1734/*! 1735 * lightgallery | 2.5.0 | June 13th 2022 1736 * http://www.lightgalleryjs.com/ 1737 * Copyright (c) 2020 Sachin Neravath; 1738 * @license GPLv3 1739 */ 1740(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lightGallery=factory());}(this,(function(){'use strict'; 1741/*! ***************************************************************************** 1742 Copyright (c) Microsoft Corporation. 1743 1744 Permission to use, copy, modify, and/or distribute this software for any 1745 purpose with or without fee is hereby granted. 1746 1747 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 1748 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1749 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 1750 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1751 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 1752 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1753 PERFORMANCE OF THIS SOFTWARE. 1754 ***************************************************************************** */ 1755var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 1756return t;};return __assign.apply(this,arguments);};function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++) 1757for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++) 1758r[k]=a[j];return r;} 1759var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpdateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var lightGalleryCoreSettings={mode:'lg-slide',easing:'ease',speed:400,licenseKey:'0000-0000-000-0000',height:'100%',width:'100%',addClass:'',startClass:'lg-start-zoom',backdropDuration:300,container:'',startAnimationDuration:400,zoomFromOrigin:true,hideBarsDelay:0,showBarsAfter:10000,slideDelay:0,supportLegacyBrowser:true,allowMediaOverlap:false,videoMaxSize:'1280-720',loadYouTubePoster:true,defaultCaptionHeight:0,ariaLabelledby:'',ariaDescribedby:'',resetScrollPosition:true,hideScrollbar:false,closable:true,swipeToClose:true,closeOnTap:true,showCloseIcon:true,showMaximizeIcon:false,loop:true,escKey:true,keyPress:true,trapFocus:true,controls:true,slideEndAnimation:true,hideControlOnEnd:false,mousewheel:false,getCaptionFromTitleOrAlt:true,appendSubHtmlTo:'.lg-sub-html',subHtmlSelectorRelative:false,preload:2,numberOfSlideItemsInDom:10,selector:'',selectWithin:'',nextHtml:'',prevHtml:'',index:0,iframeWidth:'100%',iframeHeight:'100%',iframeMaxWidth:'100%',iframeMaxHeight:'100%',download:true,counter:true,appendCounterTo:'.lg-toolbar',swipeThreshold:50,enableSwipe:true,enableDrag:true,dynamic:false,dynamicEl:[],extraProps:[],exThumbImage:'',isMobile:undefined,mobileSettings:{controls:false,showCloseIcon:false,download:false,},plugins:[],strings:{closeGallery:'Close gallery',toggleMaximize:'Toggle maximize',previousSlide:'Previous slide',nextSlide:'Next slide',download:'Download',playVideo:'Play video',},};function initLgPolyfills(){(function(){if(typeof window.CustomEvent==='function') 1760return false;function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:null,};var evt=document.createEvent('CustomEvent');evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt;} 1761window.CustomEvent=CustomEvent;})();(function(){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;}})();} 1762var lgQuery=(function(){function lgQuery(selector){this.cssVenderPrefixes=['TransitionDuration','TransitionTimingFunction','Transform','Transition',];this.selector=this._getSelector(selector);this.firstElement=this._getFirstEl();return this;} 1763lgQuery.generateUUID=function(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=(Math.random()*16)|0,v=c=='x'?r:(r&0x3)|0x8;return v.toString(16);});};lgQuery.prototype._getSelector=function(selector,context){if(context===void 0){context=document;} 1764if(typeof selector!=='string'){return selector;} 1765context=context||document;var fl=selector.substring(0,1);if(fl==='#'){return context.querySelector(selector);} 1766else{return context.querySelectorAll(selector);}};lgQuery.prototype._each=function(func){if(!this.selector){return this;} 1767if(this.selector.length!==undefined){[].forEach.call(this.selector,func);} 1768else{func(this.selector,0);} 1769return this;};lgQuery.prototype._setCssVendorPrefix=function(el,cssProperty,value){var property=cssProperty.replace(/-([a-z])/gi,function(s,group1){return group1.toUpperCase();});if(this.cssVenderPrefixes.indexOf(property)!==-1){el.style[property.charAt(0).toLowerCase()+property.slice(1)]=value;el.style['webkit'+property]=value;el.style['moz'+property]=value;el.style['ms'+property]=value;el.style['o'+property]=value;} 1770else{el.style[property]=value;}};lgQuery.prototype._getFirstEl=function(){if(this.selector&&this.selector.length!==undefined){return this.selector[0];} 1771else{return this.selector;}};lgQuery.prototype.isEventMatched=function(event,eventName){var eventNamespace=eventName.split('.');return event.split('.').filter(function(e){return e;}).every(function(e){return eventNamespace.indexOf(e)!==-1;});};lgQuery.prototype.attr=function(attr,value){if(value===undefined){if(!this.firstElement){return'';} 1772return this.firstElement.getAttribute(attr);} 1773this._each(function(el){el.setAttribute(attr,value);});return this;};lgQuery.prototype.find=function(selector){return $LG(this._getSelector(selector,this.selector));};lgQuery.prototype.first=function(){if(this.selector&&this.selector.length!==undefined){return $LG(this.selector[0]);} 1774else{return $LG(this.selector);}};lgQuery.prototype.eq=function(index){return $LG(this.selector[index]);};lgQuery.prototype.parent=function(){return $LG(this.selector.parentElement);};lgQuery.prototype.get=function(){return this._getFirstEl();};lgQuery.prototype.removeAttr=function(attributes){var attrs=attributes.split(' ');
vendor: 5,980 bytes, lines 1774-1803
1774this._each(function(el){attrs.forEach(function(attr){return el.removeAttribute(attr);});});return this;};lgQuery.prototype.wrap=function(className){if(!this.firstElement){return this;} 1775var wrapper=document.createElement('div');wrapper.className=className;this.firstElement.parentNode.insertBefore(wrapper,this.firstElement);this.firstElement.parentNode.removeChild(this.firstElement);wrapper.appendChild(this.firstElement);return this;};lgQuery.prototype.addClass=function(classNames){if(classNames===void 0){classNames='';} 1776this._each(function(el){classNames.split(' ').forEach(function(className){if(className){el.classList.add(className);}});});return this;};lgQuery.prototype.removeClass=function(classNames){this._each(function(el){classNames.split(' ').forEach(function(className){if(className){el.classList.remove(className);}});});return this;};lgQuery.prototype.hasClass=function(className){if(!this.firstElement){return false;} 1777return this.firstElement.classList.contains(className);};lgQuery.prototype.hasAttribute=function(attribute){if(!this.firstElement){return false;} 1778return this.firstElement.hasAttribute(attribute);};lgQuery.prototype.toggleClass=function(className){if(!this.firstElement){return this;} 1779if(this.hasClass(className)){this.removeClass(className);} 1780else{this.addClass(className);} 1781return this;};lgQuery.prototype.css=function(property,value){var _this=this;this._each(function(el){_this._setCssVendorPrefix(el,property,value);});return this;};lgQuery.prototype.on=function(events,listener){var _this=this;if(!this.selector){return this;} 1782events.split(' ').forEach(function(event){if(!Array.isArray(lgQuery.eventListeners[event])){lgQuery.eventListeners[event]=[];} 1783lgQuery.eventListeners[event].push(listener);_this.selector.addEventListener(event.split('.')[0],listener);});return this;};lgQuery.prototype.once=function(event,listener){var _this=this;this.on(event,function(){_this.off(event);listener(event);});return this;};lgQuery.prototype.off=function(event){var _this=this;if(!this.selector){return this;} 1784Object.keys(lgQuery.eventListeners).forEach(function(eventName){if(_this.isEventMatched(event,eventName)){lgQuery.eventListeners[eventName].forEach(function(listener){_this.selector.removeEventListener(eventName.split('.')[0],listener);});lgQuery.eventListeners[eventName]=[];}});return this;};lgQuery.prototype.trigger=function(event,detail){if(!this.firstElement){return this;} 1785var customEvent=new CustomEvent(event.split('.')[0],{detail:detail||null,});this.firstElement.dispatchEvent(customEvent);return this;};lgQuery.prototype.load=function(url){var _this=this;fetch(url).then(function(res){return res.text();}).then(function(html){_this.selector.innerHTML=html;});return this;};lgQuery.prototype.html=function(html){if(html===undefined){if(!this.firstElement){return'';} 1786return this.firstElement.innerHTML;} 1787this._each(function(el){el.innerHTML=html;});return this;};lgQuery.prototype.append=function(html){this._each(function(el){if(typeof html==='string'){el.insertAdjacentHTML('beforeend',html);} 1788else{el.appendChild(html);}});return this;};lgQuery.prototype.prepend=function(html){this._each(function(el){el.insertAdjacentHTML('afterbegin',html);});return this;};lgQuery.prototype.remove=function(){this._each(function(el){el.parentNode.removeChild(el);});return this;};lgQuery.prototype.empty=function(){this._each(function(el){el.innerHTML='';});return this;};lgQuery.prototype.scrollTop=function(scrollTop){if(scrollTop!==undefined){document.body.scrollTop=scrollTop;document.documentElement.scrollTop=scrollTop;return this;} 1789else{return(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);}};lgQuery.prototype.scrollLeft=function(scrollLeft){if(scrollLeft!==undefined){document.body.scrollLeft=scrollLeft;document.documentElement.scrollLeft=scrollLeft;return this;} 1790else{return(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0);}};lgQuery.prototype.offset=function(){if(!this.firstElement){return{left:0,top:0,};} 1791var rect=this.firstElement.getBoundingClientRect();var bodyMarginLeft=$LG('body').style().marginLeft;return{left:rect.left-parseFloat(bodyMarginLeft)+this.scrollLeft(),top:rect.top+this.scrollTop(),};};lgQuery.prototype.style=function(){if(!this.firstElement){return{};} 1792return(this.firstElement.currentStyle||window.getComputedStyle(this.firstElement));};lgQuery.prototype.width=function(){var style=this.style();return(this.firstElement.clientWidth- 1793parseFloat(style.paddingLeft)- 1794parseFloat(style.paddingRight));};lgQuery.prototype.height=function(){var style=this.style();return(this.firstElement.clientHeight- 1795parseFloat(style.paddingTop)- 1796parseFloat(style.paddingBottom));};lgQuery.eventListeners={};return lgQuery;}());function $LG(selector){initLgPolyfills();return new lgQuery(selector);} 1797var defaultDynamicOptions=['src','sources','subHtml','subHtmlUrl','html','video','poster','slideName','responsive','srcset','sizes','iframe','downloadUrl','download','width','facebookShareUrl','tweetText','iframeTitle','twitterShareUrl','pinterestShareUrl','pinterestText','fbHtml','disqusIdentifier','disqusUrl',];function convertToData(attr){if(attr==='href'){return'src';} 1798attr=attr.replace('data-','');attr=attr.charAt(0).toLowerCase()+attr.slice(1);attr=attr.replace(/-([a-z])/g,function(g){return g[1].toUpperCase();});return attr;} 1799var utils={getSize:function(el,container,spacing,defaultLgSize,galleryItem){if(spacing===void 0){spacing=0;} 1800var LGel=$LG(el);var lgSize=LGel.attr('data-lg-size')||defaultLgSize;if(typeof galleryItem.size&&galleryItem.size!=null){lgSize=galleryItem.size;} 1801if(!lgSize){return;} 1802var isResponsiveSizes=lgSize.split(',');if(isResponsiveSizes[1]){var wWidth=window.innerWidth;for(var i=0;i<isResponsiveSizes.length;i++){var size_1=isResponsiveSizes[i];var responsiveWidth=parseInt(size_1.split('-')[2],10);if(responsiveWidth>wWidth){lgSize=size_1;break;} 1803if(i===isResponsiveSizes.length-1){lgSize=size_1;}}
vendor: 3,141 bytes, lines 1803-1830
1803} 1804var size=lgSize.split('-');var width=parseInt(size[0],10);var height=parseInt(size[1],10);var cWidth=container.width();var cHeight=container.height()-spacing;var maxWidth=Math.min(cWidth,width);var maxHeight=Math.min(cHeight,height);var ratio=Math.min(maxWidth/width,maxHeight/height);return{width:width*ratio,height:height*ratio};},getTransform:function(el,container,top,bottom,imageSize){if(!imageSize){return;} 1805var LGel=$LG(el).find('img').first();if(!LGel.get()){return;} 1806var containerRect=container.get().getBoundingClientRect();var wWidth=containerRect.width;var wHeight=container.height()-(top+bottom);var elWidth=LGel.width();var elHeight=LGel.height();var elStyle=LGel.style();var x=(wWidth-elWidth)/2- 1807LGel.offset().left+ 1808(parseFloat(elStyle.paddingLeft)||0)+ 1809(parseFloat(elStyle.borderLeft)||0)+ 1810$LG(window).scrollLeft()+ 1811containerRect.left;var y=(wHeight-elHeight)/2- 1812LGel.offset().top+ 1813(parseFloat(elStyle.paddingTop)||0)+ 1814(parseFloat(elStyle.borderTop)||0)+ 1815$LG(window).scrollTop()+ 1816top;var scX=elWidth/imageSize.width;var scY=elHeight/imageSize.height;var transform='translate3d('+ 1817(x*=-1)+'px, '+ 1818(y*=-1)+'px, 0) scale3d('+ 1819scX+', '+ 1820scY+', 1)';return transform;},getIframeMarkup:function(iframeWidth,iframeHeight,iframeMaxWidth,iframeMaxHeight,src,iframeTitle){var title=iframeTitle?'title="'+iframeTitle+'"':'';return"<div class=\"lg-video-cont lg-has-iframe\" style=\"width:"+iframeWidth+"; max-width:"+iframeMaxWidth+"; height: "+iframeHeight+"; max-height:"+iframeMaxHeight+"\">\n <iframe class=\"lg-object\" frameborder=\"0\" "+title+" src=\""+src+"\" allowfullscreen=\"true\"></iframe>\n </div>";},getImgMarkup:function(index,src,altAttr,srcset,sizes,sources){var srcsetAttr=srcset?"srcset=\""+srcset+"\"":'';var sizesAttr=sizes?"sizes=\""+sizes+"\"":'';var imgMarkup="<img "+altAttr+" "+srcsetAttr+" "+sizesAttr+" class=\"lg-object lg-image\" data-index=\""+index+"\" src=\""+src+"\" />";var sourceTag='';if(sources){var sourceObj=typeof sources==='string'?JSON.parse(sources):sources;sourceTag=sourceObj.map(function(source){var attrs='';Object.keys(source).forEach(function(key){attrs+=" "+key+"=\""+source[key]+"\"";});return"<source "+attrs+"></source>";});} 1821return""+sourceTag+imgMarkup;},getResponsiveSrc:function(srcItms){var rsWidth=[];var rsSrc=[];var src='';for(var i=0;i<srcItms.length;i++){var _src=srcItms[i].split(' ');if(_src[0]===''){_src.splice(0,1);} 1822rsSrc.push(_src[0]);rsWidth.push(_src[1]);} 1823var wWidth=window.innerWidth;for(var j=0;j<rsWidth.length;j++){if(parseInt(rsWidth[j],10)>wWidth){src=rsSrc[j];break;}} 1824return src;},isImageLoaded:function(img){if(!img) 1825return false;if(!img.complete){return false;} 1826if(img.naturalWidth===0){return false;} 1827return true;},getVideoPosterMarkup:function(_poster,dummyImg,videoContStyle,playVideoString,_isVideo){var videoClass='';if(_isVideo&&_isVideo.youtube){videoClass='lg-has-youtube';} 1828else if(_isVideo&&_isVideo.vimeo){videoClass='lg-has-vimeo';} 1829else{videoClass='lg-has-html5';} 1830return"<div class=\"lg-video-cont "+videoClass+"\" style=\""+videoContStyle+"\">\n <div class=\"lg-video-play-button\">
vendor: 21,267 bytes, lines 1830-1902
1830\n <svg\n viewBox=\"0 0 20 20\"\n preserveAspectRatio=\"xMidYMid\"\n focusable=\"false\"\n aria-labelledby=\""+playVideoString+"\"\n role=\"img\"\n class=\"lg-video-play-icon\"\n >\n <title>"+playVideoString+"</title>\n <polygon class=\"lg-video-play-icon-inner\" points=\"1,0 20,10 1,20\"></polygon>\n </svg>\n <svg class=\"lg-video-play-icon-bg\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle></svg>\n <svg class=\"lg-video-play-icon-circle\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle>\n </svg>\n </div>\n "+(dummyImg||'')+"\n <img class=\"lg-object lg-video-poster\" src=\""+_poster+"\" />\n </div>";},getFocusableElements:function(container){var elements=container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');var visibleElements=[].filter.call(elements,function(element){var style=window.getComputedStyle(element);return style.display!=='none'&&style.visibility!=='hidden';});return visibleElements;},getDynamicOptions:function(items,extraProps,getCaptionFromTitleOrAlt,exThumbImage){var dynamicElements=[];var availableDynamicOptions=__spreadArrays(defaultDynamicOptions,extraProps);[].forEach.call(items,function(item){var dynamicEl={};for(var i=0;i<item.attributes.length;i++){var attr=item.attributes[i];if(attr.specified){var dynamicAttr=convertToData(attr.name);var label='';if(availableDynamicOptions.indexOf(dynamicAttr)>-1){label=dynamicAttr;} 1831if(label){dynamicEl[label]=attr.value;}}} 1832var currentItem=$LG(item);var alt=currentItem.find('img').first().attr('alt')||currentItem.attr('data-alt');var title=currentItem.attr('title');var thumb=exThumbImage&¤tItem.attr(exThumbImage)?currentItem.attr(exThumbImage):currentItem.find('img').first().attr('src');dynamicEl.thumb=thumb;if(getCaptionFromTitleOrAlt&&!dynamicEl.subHtml){dynamicEl.subHtml=title||'';} 1833dynamicEl.alt=alt||title;var inlineType=currentItem.attr('data-type');dynamicEl.type=inlineType;dynamicElements.push(dynamicEl);});return dynamicElements;},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);},isVideo:function(src,isHTML5VIdeo,index){if(!src||src.match(/\.(mp4|m4v|ogg|webm)$/)){if(isHTML5VIdeo){return{html5:true,};} 1834else{console.warn('lightGallery :- data-src is not provided on slide item '+ 1835(index+1)+'. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/');return;}} 1836var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i);var vimeo=src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i);var wistia=src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(youtube){return{youtube:youtube,};} 1837else if(vimeo){return{vimeo:vimeo,};} 1838else if(wistia){return{wistia:wistia,};}},};var lgId=0;var LightGallery=(function(){function LightGallery(element,options){this.lgOpened=false;this.index=0;this.plugins=[];this.lGalleryOn=false;this.lgBusy=false;this.currentItemsInDom=[];this.prevScrollTop=0;this.bodyPaddingRight=0;this.isDummyImageRemoved=false;this.dragOrSwipeEnabled=false;this.mediaContainerPosition={top:0,bottom:0,};if(!element){return this;} 1839lgId++;this.lgId=lgId;this.el=element;this.LGel=$LG(element);this.generateSettings(options);this.buildModules();if(this.settings.dynamic&&this.settings.dynamicEl!==undefined&&!Array.isArray(this.settings.dynamicEl)){throw'When using dynamic mode, you must also define dynamicEl as an Array.';} 1840this.galleryItems=this.getItems();this.normalizeSettings();this.init();return this;} 1841LightGallery.prototype.generateSettings=function(options){this.settings=__assign(__assign({},lightGalleryCoreSettings),options);if(this.settings.isMobile&&typeof this.settings.isMobile==='function'?this.settings.isMobile():utils.isMobile()){var mobileSettings=__assign(__assign({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=__assign(__assign({},this.settings),mobileSettings);}};LightGallery.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation){this.settings.hideControlOnEnd=false;} 1842if(!this.settings.closable){this.settings.swipeToClose=false;} 1843this.zoomFromOrigin=this.settings.zoomFromOrigin;if(this.settings.dynamic){this.zoomFromOrigin=false;} 1844if(!this.settings.container){this.settings.container=document.body;} 1845this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length);};LightGallery.prototype.init=function(){var _this=this;this.addSlideVideoInfo(this.galleryItems);this.buildStructure();this.LGel.trigger(lGEvents.init,{instance:this,});if(this.settings.keyPress){this.keyPress();} 1846setTimeout(function(){_this.enableDrag();_this.enableSwipe();_this.triggerPosterClick();},50);this.arrow();if(this.settings.mousewheel){this.mousewheel();} 1847if(!this.settings.dynamic){this.openGalleryOnItemClick();}};LightGallery.prototype.openGalleryOnItemClick=function(){var _this=this;var _loop_1=function(index){var element=this_1.items[index];var $element=$LG(element);var uuid=lgQuery.generateUUID();$element.attr('data-lg-id',uuid).on("click.lgcustom-item-"+uuid,function(e){e.preventDefault();var currentItemIndex=_this.settings.index||index;_this.openGallery(currentItemIndex,element);});};var this_1=this;for(var index=0;index<this.items.length;index++){_loop_1(index);}};LightGallery.prototype.buildModules=function(){var _this=this;this.settings.plugins.forEach(function(plugin){_this.plugins.push(new plugin(_this,$LG));});};LightGallery.prototype.validateLicense=function(){if(!this.settings.licenseKey){console.warn('Please provide a valid license key');} 1848else if(this.settings.licenseKey==='0000-0000-000-0000'){console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use");}};LightGallery.prototype.getSlideItem=function(index){return $LG(this.getSlideItemId(index));};LightGallery.prototype.getSlideItemId=function(index){return"#lg-item-"+this.lgId+"-"+index;};LightGallery.prototype.getIdName=function(id){return id+"-"+this.lgId;};LightGallery.prototype.getElementById=function(id){return $LG("#"+this.getIdName(id));};LightGallery.prototype.manageSingleSlideClassName=function(){if(this.galleryItems.length<2){this.outer.addClass('lg-single-item');} 1849else{this.outer.removeClass('lg-single-item');}};LightGallery.prototype.buildStructure=function(){var _this=this;var container=this.$container&&this.$container.get();if(container){return;} 1850var controls='';var subHtmlCont='';if(this.settings.controls){controls="<button type=\"button\" id=\""+this.getIdName('lg-prev')+"\" aria-label=\""+this.settings.strings['previousSlide']+"\" class=\"lg-prev lg-icon\"> "+this.settings.prevHtml+" </button>\n <button type=\"button\" id=\""+this.getIdName('lg-next')+"\" aria-label=\""+this.settings.strings['nextSlide']+"\" class=\"lg-next lg-icon\"> "+this.settings.nextHtml+" </button>";} 1851if(this.settings.appendSubHtmlTo!=='.lg-item'){subHtmlCont='<div class="lg-sub-html" role="status" aria-live="polite"></div>';} 1852var addClasses='';if(this.settings.allowMediaOverlap){addClasses+='lg-media-overlap ';} 1853var ariaLabelledby=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':'';var ariaDescribedby=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':'';var containerClassName="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?'lg-inline':'');var closeIcon=this.settings.closable&&this.settings.showCloseIcon?"<button type=\"button\" aria-label=\""+this.settings.strings['closeGallery']+"\" id=\""+this.getIdName('lg-close')+"\" class=\"lg-close lg-icon\"></button>":'';var maximizeIcon=this.settings.showMaximizeIcon?"<button type=\"button\" aria-label=\""+this.settings.strings['toggleMaximize']+"\" id=\""+this.getIdName('lg-maximize')+"\" class=\"lg-maximize lg-icon\"></button>":'';var template="\n <div class=\""+containerClassName+"\" id=\""+this.getIdName('lg-container')+"\" tabindex=\"-1\" aria-modal=\"true\" "+ariaLabelledby+" "+ariaDescribedby+" role=\"dialog\"\n >\n <div id=\""+this.getIdName('lg-backdrop')+"\" class=\"lg-backdrop\"></div>\n\n <div id=\""+this.getIdName('lg-outer')+"\" class=\"lg-outer lg-use-css3 lg-css3 lg-hide-items "+addClasses+" \">\n\n <div id=\""+this.getIdName('lg-content')+"\" class=\"lg-content\">\n <div id=\""+this.getIdName('lg-inner')+"\" class=\"lg-inner\">\n </div>\n "+controls+"\n </div>\n <div id=\""+this.getIdName('lg-toolbar')+"\" class=\"lg-toolbar lg-group\">\n "+maximizeIcon+"\n "+closeIcon+"\n </div>\n "+(this.settings.appendSubHtmlTo==='.lg-outer'?subHtmlCont:'')+"\n <div id=\""+this.getIdName('lg-components')+"\" class=\"lg-components\">\n "+(this.settings.appendSubHtmlTo==='.lg-sub-html'?subHtmlCont:'')+"\n </div>\n </div>\n </div>\n ";$LG(this.settings.container).append(template);if(document.body!==this.settings.container){$LG(this.settings.container).css('position','relative');} 1854this.outer=this.getElementById('lg-outer');this.$lgComponents=this.getElementById('lg-components');this.$backdrop=this.getElementById('lg-backdrop');this.$container=this.getElementById('lg-container');this.$inner=this.getElementById('lg-inner');this.$content=this.getElementById('lg-content');this.$toolbar=this.getElementById('lg-toolbar');this.$backdrop.css('transition-duration',this.settings.backdropDuration+'ms');var outerClassNames=this.settings.mode+" ";this.manageSingleSlideClassName();if(this.settings.enableDrag){outerClassNames+='lg-grab ';} 1855this.outer.addClass(outerClassNames);this.$inner.css('transition-timing-function',this.settings.easing);this.$inner.css('transition-duration',this.settings.speed+'ms');if(this.settings.download){this.$toolbar.append("<a id=\""+this.getIdName('lg-download')+"\" target=\"_blank\" rel=\"noopener\" aria-label=\""+this.settings.strings['download']+"\" download class=\"lg-download lg-icon\"></a>");} 1856this.counter();$LG(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){_this.refreshOnResize();});this.hideBars();this.manageCloseGallery();this.toggleMaximize();this.initModules();};LightGallery.prototype.refreshOnResize=function(){if(this.lgOpened){var currentGalleryItem=this.galleryItems[this.index];var __slideVideoInfo=currentGalleryItem.__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var _a=this.mediaContainerPosition,top_1=_a.top,bottom=_a.bottom;this.currentImageSize=utils.getSize(this.items[this.index],this.outer,top_1+bottom,__slideVideoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);if(__slideVideoInfo){this.resizeVideoSlide(this.index,this.currentImageSize);} 1857if(this.zoomFromOrigin&&!this.isDummyImageRemoved){var imgStyle=this.getDummyImgStyles(this.currentImageSize);this.outer.find('.lg-current .lg-dummy-img').first().attr('style',imgStyle);} 1858this.LGel.trigger(lGEvents.containerResize);}};LightGallery.prototype.resizeVideoSlide=function(index,imageSize){var lgVideoStyle=this.getVideoContStyle(imageSize);var currentSlide=this.getSlideItem(index);currentSlide.find('.lg-video-cont').attr('style',lgVideoStyle);};LightGallery.prototype.updateSlides=function(items,index){if(this.index>items.length-1){this.index=items.length-1;} 1859if(items.length===1){this.index=0;} 1860if(!items.length){this.closeGallery();return;} 1861var currentSrc=this.galleryItems[index].src;this.galleryItems=items;this.updateControls();this.$inner.empty();this.currentItemsInDom=[];var _index=0;this.galleryItems.some(function(galleryItem,itemIndex){if(galleryItem.src===currentSrc){_index=itemIndex;return true;} 1862return false;});this.currentItemsInDom=this.organizeSlideItems(_index,-1);this.loadContent(_index,true);this.getSlideItem(_index).addClass('lg-current');this.index=_index;this.updateCurrentCounter(_index);this.LGel.trigger(lGEvents.updateSlides);};LightGallery.prototype.getItems=function(){this.items=[];if(!this.settings.dynamic){if(this.settings.selector==='this'){this.items.push(this.el);} 1863else if(this.settings.selector){if(typeof this.settings.selector==='string'){if(this.settings.selectWithin){var selectWithin=$LG(this.settings.selectWithin);this.items=selectWithin.find(this.settings.selector).get();} 1864else{this.items=this.el.querySelectorAll(this.settings.selector);}} 1865else{this.items=this.settings.selector;}} 1866else{this.items=this.el.children;} 1867return utils.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage);} 1868else{return this.settings.dynamicEl||[];}};LightGallery.prototype.shouldHideScrollbar=function(){return(this.settings.hideScrollbar&&document.body===this.settings.container);};LightGallery.prototype.hideScrollbar=function(){if(!this.shouldHideScrollbar()){return;} 1869this.bodyPaddingRight=parseFloat($LG('body').style().paddingRight);var bodyRect=document.documentElement.getBoundingClientRect();var scrollbarWidth=window.innerWidth-bodyRect.width;$LG(document.body).css('padding-right',scrollbarWidth+this.bodyPaddingRight+'px');$LG(document.body).addClass('lg-overlay-open');};LightGallery.prototype.resetScrollBar=function(){if(!this.shouldHideScrollbar()){return;} 1870$LG(document.body).css('padding-right',this.bodyPaddingRight+'px');$LG(document.body).removeClass('lg-overlay-open');};LightGallery.prototype.openGallery=function(index,element){var _this=this;if(index===void 0){index=this.settings.index;} 1871if(this.lgOpened) 1872return;this.lgOpened=true;this.outer.removeClass('lg-hide-items');this.hideScrollbar();this.$container.addClass('lg-show');var itemsToBeInsertedToDom=this.getItemsToBeInsertedToDom(index,index);this.currentItemsInDom=itemsToBeInsertedToDom;var items='';itemsToBeInsertedToDom.forEach(function(item){items=items+("<div id=\""+item+"\" class=\"lg-item\"></div>");});this.$inner.append(items);this.addHtml(index);var transform='';this.mediaContainerPosition=this.getMediaContainerPosition();var _a=this.mediaContainerPosition,top=_a.top,bottom=_a.bottom;if(!this.settings.allowMediaOverlap){this.setMediaContainerPosition(top,bottom);} 1873var __slideVideoInfo=this.galleryItems[index].__slideVideoInfo;if(this.zoomFromOrigin&&element){this.currentImageSize=utils.getSize(element,this.outer,top+bottom,__slideVideoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);transform=utils.getTransform(element,this.outer,top,bottom,this.currentImageSize);} 1874if(!this.zoomFromOrigin||!transform){this.outer.addClass(this.settings.startClass);this.getSlideItem(index).removeClass('lg-complete');} 1875var timeout=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){_this.outer.addClass('lg-components-open');},timeout);this.index=index;this.LGel.trigger(lGEvents.beforeOpen,{galleryItems:this.galleryItems,items:this.items,outer:this.outer,});this.getSlideItem(index).addClass('lg-current');this.lGalleryOn=false;this.prevScrollTop=$LG(window).scrollTop();setTimeout(function(){if(_this.zoomFromOrigin&&transform){var currentSlide_1=_this.getSlideItem(index);currentSlide_1.css('transform',transform);setTimeout(function(){currentSlide_1.addClass('lg-start-progress lg-start-end-progress').css('transition-duration',_this.settings.startAnimationDuration+'ms');_this.outer.addClass('lg-zoom-from-image');});setTimeout(function(){currentSlide_1.css('transform','translate3d(0, 0, 0)');},100);} 1876setTimeout(function(){_this.$backdrop.addClass('in');_this.$container.addClass('lg-show-in');},10);setTimeout(function(){if(_this.settings.trapFocus&&document.body===_this.settings.container){_this.trapFocus();}},_this.settings.backdropDuration+50);if(!_this.zoomFromOrigin||!transform){setTimeout(function(){_this.outer.addClass('lg-visible');},_this.settings.backdropDuration);} 1877_this.slide(index,false,false,false);_this.LGel.trigger(lGEvents.afterOpen);});if(document.body===this.settings.container){$LG('html').addClass('lg-on');}};LightGallery.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap){return{top:0,bottom:0,};} 1878var top=this.$toolbar.get().clientHeight||0;var subHtml=this.outer.find('.lg-components .lg-sub-html').get();var captionHeight=this.settings.defaultCaptionHeight||(subHtml&&subHtml.clientHeight)||0;var thumbContainer=this.outer.find('.lg-thumb-outer').get();var thumbHeight=thumbContainer?thumbContainer.clientHeight:0;var bottom=thumbHeight+captionHeight;bottom=bottom<55?55:bottom;return{top:top,bottom:bottom,};};LightGallery.prototype.setMediaContainerPosition=function(top,bottom){if(top===void 0){top=0;} 1879if(bottom===void 0){bottom=0;} 1880this.$content.css('top',top+'px').css('bottom',bottom+'px');};LightGallery.prototype.hideBars=function(){var _this=this;setTimeout(function(){_this.outer.removeClass('lg-hide-items');if(_this.settings.hideBarsDelay>0){_this.outer.on('mousemove.lg click.lg touchstart.lg',function(){_this.outer.removeClass('lg-hide-items');clearTimeout(_this.hideBarTimeout);_this.hideBarTimeout=setTimeout(function(){_this.outer.addClass('lg-hide-items');},_this.settings.hideBarsDelay);});_this.outer.trigger('mousemove.lg');}},this.settings.showBarsAfter);};LightGallery.prototype.initPictureFill=function($img){if(this.settings.supportLegacyBrowser){try{picturefill({elements:[$img.get()],});} 1881catch(e){console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.');}}};LightGallery.prototype.counter=function(){if(this.settings.counter){var counterHtml="<div class=\"lg-counter\" role=\"status\" aria-live=\"polite\">\n <span id=\""+this.getIdName('lg-counter-current')+"\" class=\"lg-counter-current\">"+(this.index+1)+" </span> /\n <span id=\""+this.getIdName('lg-counter-all')+"\" class=\"lg-counter-all\">"+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(counterHtml);}};LightGallery.prototype.addHtml=function(index){var subHtml;var subHtmlUrl;if(this.galleryItems[index].subHtmlUrl){subHtmlUrl=this.galleryItems[index].subHtmlUrl;} 1882else{subHtml=this.galleryItems[index].subHtml;} 1883if(!subHtmlUrl){if(subHtml){var fL=subHtml.substring(0,1);if(fL==='.'||fL==='#'){if(this.settings.subHtmlSelectorRelative&&!this.settings.dynamic){subHtml=$LG(this.items).eq(index).find(subHtml).first().html();} 1884else{subHtml=$LG(subHtml).first().html();}}} 1885else{subHtml='';}} 1886if(this.settings.appendSubHtmlTo!=='.lg-item'){if(subHtmlUrl){this.outer.find('.lg-sub-html').load(subHtmlUrl);} 1887else{this.outer.find('.lg-sub-html').html(subHtml);}} 1888else{var currentSlide=$LG(this.getSlideItemId(index));if(subHtmlUrl){currentSlide.load(subHtmlUrl);} 1889else{currentSlide.append("<div class=\"lg-sub-html\">"+subHtml+"</div>");}} 1890if(typeof subHtml!=='undefined'&&subHtml!==null){if(subHtml===''){this.outer.find(this.settings.appendSubHtmlTo).addClass('lg-empty-html');} 1891else{this.outer.find(this.settings.appendSubHtmlTo).removeClass('lg-empty-html');}} 1892this.LGel.trigger(lGEvents.afterAppendSubHtml,{index:index,});};LightGallery.prototype.preload=function(index){for(var i=1;i<=this.settings.preload;i++){if(i>=this.galleryItems.length-index){break;} 1893this.loadContent(index+i,false);} 1894for(var j=1;j<=this.settings.preload;j++){if(index-j<0){break;} 1895this.loadContent(index-j,false);}};LightGallery.prototype.getDummyImgStyles=function(imageSize){if(!imageSize) 1896return'';return"width:"+imageSize.width+"px;\n margin-left: -"+imageSize.width/2+"px;\n margin-top: -"+imageSize.height/2+"px;\n height:"+imageSize.height+"px";};LightGallery.prototype.getVideoContStyle=function(imageSize){if(!imageSize) 1897return'';return"width:"+imageSize.width+"px;\n height:"+imageSize.height+"px";};LightGallery.prototype.getDummyImageContent=function($currentSlide,index,alt){var $currentItem;if(!this.settings.dynamic){$currentItem=$LG(this.items).eq(index);} 1898if($currentItem){var _dummyImgSrc=void 0;if(!this.settings.exThumbImage){_dummyImgSrc=$currentItem.find('img').first().attr('src');} 1899else{_dummyImgSrc=$currentItem.attr(this.settings.exThumbImage);} 1900if(!_dummyImgSrc) 1901return'';var imgStyle=this.getDummyImgStyles(this.currentImageSize);var dummyImgContent="<img "+alt+" style=\""+imgStyle+"\" class=\"lg-dummy-img\" src=\""+_dummyImgSrc+"\" />";$currentSlide.addClass('lg-first-slide');this.outer.addClass('lg-first-slide-loading');return dummyImgContent;} 1902return'';};
1902LightGallery.prototype.setImgMarkup=function(src,$currentSlide,index){var currentGalleryItem=this.galleryItems[index];var alt=currentGalleryItem.alt,srcset=currentGalleryItem.srcset,sizes=currentGalleryItem.sizes,sources=currentGalleryItem.sources;var imgContent='';var altAttr=alt?'alt="'+alt+'"':'';if(this.isFirstSlideWithZoomAnimation()){imgContent=this.getDummyImageContent($currentSlide,index,altAttr);} 1903else{imgContent=utils.getImgMarkup(index,src,altAttr,srcset,sizes,sources);} 1904var imgMarkup="<picture class=\"lg-img-wrap\"> "+imgContent+"</picture>";$currentSlide.prepend(imgMarkup);};LightGallery.prototype.onSlideObjectLoad=function($slide,isHTML5VideoWithoutPoster,onLoad,onError){var mediaObject=$slide.find('.lg-object').first();if(utils.isImageLoaded(mediaObject.get())||isHTML5VideoWithoutPoster){onLoad();} 1905else{mediaObject.on('load.lg error.lg',function(){onLoad&&onLoad();});mediaObject.on('error.lg',function(){onError&&onError();});}};LightGallery.prototype.onLgObjectLoad=function(currentSlide,index,delay,speed,isFirstSlide,isHTML5VideoWithoutPoster){var _this=this;var $item=_this.galleryItems[index],type=$item.type;if(typeof $item.src!=='undefined'){var inline_id=$item.src.replace('#',''),$inline=document.getElementById(inline_id),inline_html;if(type==='inline'&&inline_id!=null&&typeof $inline!=='undefined'){inline_html=$inline.innerHTML;}else{inline_html='';}} 1906this.onSlideObjectLoad(currentSlide,true,function(){_this.triggerSlideItemLoad(currentSlide,index,delay,speed,isFirstSlide);},function(){currentSlide.addClass('lg-complete lg-complete_');
vendor: 27,812 bytes, lines 1906-2017
1906if(inline_html!==''){currentSlide.html(inline_html);}else{currentSlide.html('<span class="lg-error-msg">Oops... Failed to load content...</span>');}});};LightGallery.prototype.triggerSlideItemLoad=function($currentSlide,index,delay,speed,isFirstSlide){var _this=this;var currentGalleryItem=this.galleryItems[index];var _speed=isFirstSlide&&this.getSlideType(currentGalleryItem)==='video'&&!currentGalleryItem.poster?speed:0;setTimeout(function(){$currentSlide.addClass('lg-complete lg-complete_');_this.LGel.trigger(lGEvents.slideItemLoad,{index:index,delay:delay||0,isFirstSlide:isFirstSlide,});},_speed);};LightGallery.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize);};LightGallery.prototype.addSlideVideoInfo=function(items){var _this=this;items.forEach(function(element,index){element.__slideVideoInfo=utils.isVideo(element.src,!!element.video,index);if(element.__slideVideoInfo&&_this.settings.loadYouTubePoster&&!element.poster&&element.__slideVideoInfo.youtube){element.poster="//img.youtube.com/vi/"+element.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg";}});};LightGallery.prototype.loadContent=function(index,rec){var _this=this;var currentGalleryItem=this.galleryItems[index];var $currentSlide=$LG(this.getSlideItemId(index));var poster=currentGalleryItem.poster,srcset=currentGalleryItem.srcset,sizes=currentGalleryItem.sizes,sources=currentGalleryItem.sources;var src=currentGalleryItem.src;var video=currentGalleryItem.video;var _html5Video=video&&typeof video==='string'?JSON.parse(video):video;if(currentGalleryItem.responsive){var srcDyItms=currentGalleryItem.responsive.split(',');src=utils.getResponsiveSrc(srcDyItms)||src;} 1907var videoInfo=currentGalleryItem.__slideVideoInfo;var lgVideoStyle='';var iframe=!!currentGalleryItem.iframe;var isFirstSlide=!this.lGalleryOn;var delay=0;if(isFirstSlide){if(this.zoomFromOrigin&&this.currentImageSize){delay=this.settings.startAnimationDuration+10;} 1908else{delay=this.settings.backdropDuration+10;}} 1909if(!$currentSlide.hasClass('lg-loaded')){if(videoInfo){var _a=this.mediaContainerPosition,top_2=_a.top,bottom=_a.bottom;var videoSize=utils.getSize(this.items[index],this.outer,top_2+bottom,videoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);lgVideoStyle=this.getVideoContStyle(videoSize);} 1910if(iframe){var markup=utils.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,src,currentGalleryItem.iframeTitle);$currentSlide.prepend(markup);} 1911else if(poster){var dummyImg='';var hasStartAnimation=isFirstSlide&&this.zoomFromOrigin&&this.currentImageSize;if(hasStartAnimation){dummyImg=this.getDummyImageContent($currentSlide,index,'');} 1912var markup=utils.getVideoPosterMarkup(poster,dummyImg||'',lgVideoStyle,this.settings.strings['playVideo'],videoInfo);$currentSlide.prepend(markup);} 1913else if(videoInfo||this.getSlideType(currentGalleryItem)==='audio'){if(!_html5Video){var markup="<div class=\"lg-video-cont \" style=\""+lgVideoStyle+"\"></div>";} 1914$currentSlide.prepend(markup);} 1915else{var $item=_this.galleryItems[index],type=$item.type;if(typeof $item.src!=='undefined'){var inline_id=$item.src.replace('#',''),$inline=document.getElementById(inline_id),inline_html;if(type==='inline'&&inline_id!=null&&typeof $inline!=='undefined'){inline_html=$inline.innerHTML;}else{inline_html='';}} 1916if(inline_html!==''){$currentSlide.html(inline_html);}else{this.setImgMarkup(src,$currentSlide,index);if(srcset||sources){var $img=$currentSlide.find('.lg-object');this.initPictureFill($img);}}} 1917if(poster||videoInfo){this.LGel.trigger(lGEvents.hasVideo,{index:index,src:src,html5Video:_html5Video,hasPoster:!!poster,});} 1918this.LGel.trigger(lGEvents.afterAppendSlide,{index:index});if(this.lGalleryOn&&this.settings.appendSubHtmlTo==='.lg-item'){this.addHtml(index);}} 1919var _speed=0;if(delay&&!$LG(document.body).hasClass('lg-from-hash')){_speed=delay;} 1920if(this.isFirstSlideWithZoomAnimation()){setTimeout(function(){$currentSlide.removeClass('lg-start-end-progress lg-start-progress').removeAttr('style');},this.settings.startAnimationDuration+100);if(!$currentSlide.hasClass('lg-loaded')){setTimeout(function(){if(_this.getSlideType(currentGalleryItem)==='image'){var alt=currentGalleryItem.alt;var altAttr=alt?'alt="'+alt+'"':'';$currentSlide.find('.lg-img-wrap').append(utils.getImgMarkup(index,src,altAttr,srcset,sizes,currentGalleryItem.sources));if(srcset||sources){var $img=$currentSlide.find('.lg-object');_this.initPictureFill($img);}} 1921if(_this.getSlideType(currentGalleryItem)==='image'||(_this.getSlideType(currentGalleryItem)==='video'&&poster)){_this.onLgObjectLoad($currentSlide,index,delay,_speed,true,false);_this.onSlideObjectLoad($currentSlide,!!(videoInfo&&videoInfo.html5&&!poster),function(){_this.loadContentOnFirstSlideLoad(index,$currentSlide,_speed);},function(){_this.loadContentOnFirstSlideLoad(index,$currentSlide,_speed);});}},this.settings.startAnimationDuration+100);}} 1922$currentSlide.addClass('lg-loaded');if(!this.isFirstSlideWithZoomAnimation()||(this.getSlideType(currentGalleryItem)==='video'&&!poster)){this.onLgObjectLoad($currentSlide,index,delay,_speed,isFirstSlide,!!((videoInfo&&videoInfo.html5&&!poster)||this.getSlideType(currentGalleryItem)==='audio'));} 1923if((!this.zoomFromOrigin||!this.currentImageSize)&&$currentSlide.hasClass('lg-complete_')&&!this.lGalleryOn){setTimeout(function(){$currentSlide.addClass('lg-complete');},this.settings.backdropDuration);} 1924this.lGalleryOn=true;if(rec===true){if(!$currentSlide.hasClass('lg-complete_')){$currentSlide.find('.lg-object').first().on('load.lg error.lg',function(){_this.preload(index);});} 1925else{this.preload(index);}}};LightGallery.prototype.loadContentOnFirstSlideLoad=function(index,$currentSlide,speed){var _this=this;setTimeout(function(){$currentSlide.find('.lg-dummy-img').remove();$currentSlide.removeClass('lg-first-slide');_this.outer.removeClass('lg-first-slide-loading');_this.isDummyImageRemoved=true;_this.preload(index);},speed+300);};LightGallery.prototype.getItemsToBeInsertedToDom=function(index,prevIndex,numberOfItems){var _this=this;if(numberOfItems===void 0){numberOfItems=0;} 1926var itemsToBeInsertedToDom=[];var possibleNumberOfItems=Math.max(numberOfItems,3);possibleNumberOfItems=Math.min(possibleNumberOfItems,this.galleryItems.length);var prevIndexItem="lg-item-"+this.lgId+"-"+prevIndex;if(this.galleryItems.length<=3){this.galleryItems.forEach(function(_element,index){itemsToBeInsertedToDom.push("lg-item-"+_this.lgId+"-"+index);});return itemsToBeInsertedToDom;} 1927if(index<(this.galleryItems.length-1)/2){for(var idx=index;idx>index-possibleNumberOfItems/2&&idx>=0;idx--){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+idx);} 1928var numberOfExistingItems=itemsToBeInsertedToDom.length;for(var idx=0;idx<possibleNumberOfItems-numberOfExistingItems;idx++){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(index+idx+1));}} 1929else{for(var idx=index;idx<=this.galleryItems.length-1&&idx<index+possibleNumberOfItems/2;idx++){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+idx);} 1930var numberOfExistingItems=itemsToBeInsertedToDom.length;for(var idx=0;idx<possibleNumberOfItems-numberOfExistingItems;idx++){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(index-idx-1));}} 1931if(this.settings.loop){if(index===this.galleryItems.length-1){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+0);} 1932else if(index===0){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1));}} 1933if(itemsToBeInsertedToDom.indexOf(prevIndexItem)===-1){itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+prevIndex);} 1934return itemsToBeInsertedToDom;};LightGallery.prototype.organizeSlideItems=function(index,prevIndex){var _this=this;var itemsToBeInsertedToDom=this.getItemsToBeInsertedToDom(index,prevIndex,this.settings.numberOfSlideItemsInDom);itemsToBeInsertedToDom.forEach(function(item){if(_this.currentItemsInDom.indexOf(item)===-1){_this.$inner.append("<div id=\""+item+"\" class=\"lg-item\"></div>");}});this.currentItemsInDom.forEach(function(item){if(itemsToBeInsertedToDom.indexOf(item)===-1){$LG("#"+item).remove();}});return itemsToBeInsertedToDom;};LightGallery.prototype.getPreviousSlideIndex=function(){var prevIndex=0;try{var currentItemId=this.outer.find('.lg-current').first().attr('id');prevIndex=parseInt(currentItemId.split('-')[3])||0;} 1935catch(error){prevIndex=0;} 1936return prevIndex;};LightGallery.prototype.setDownloadValue=function(index){if(this.settings.download){var currentGalleryItem=this.galleryItems[index];var hideDownloadBtn=currentGalleryItem.downloadUrl===false||currentGalleryItem.downloadUrl==='false';if(hideDownloadBtn){this.outer.addClass('lg-hide-download');} 1937else{var $download=this.getElementById('lg-download');this.outer.removeClass('lg-hide-download');$download.attr('href',currentGalleryItem.downloadUrl||currentGalleryItem.src);if(currentGalleryItem.download){if(typeof currentGalleryItem.video!=='undefined'&¤tGalleryItem.video){var currentVideo=JSON.parse(currentGalleryItem.video),download_name=currentVideo.source[0].src;$download.attr('href',download_name).removeAttr('download');}else{var download_url=currentGalleryItem.downloadUrl||currentGalleryItem.src,download_name=download_url.substring(download_url.lastIndexOf('/')+1);$download.attr('download',download_name);}}}}};LightGallery.prototype.makeSlideAnimation=function(direction,currentSlideItem,previousSlideItem){var _this=this;if(this.lGalleryOn){previousSlideItem.addClass('lg-slide-progress');} 1938setTimeout(function(){_this.outer.addClass('lg-no-trans');_this.outer.find('.lg-item').removeClass('lg-prev-slide lg-next-slide');if(direction==='prev'){currentSlideItem.addClass('lg-prev-slide');previousSlideItem.addClass('lg-next-slide');} 1939else{currentSlideItem.addClass('lg-next-slide');previousSlideItem.addClass('lg-prev-slide');} 1940setTimeout(function(){_this.outer.find('.lg-item').removeClass('lg-current');currentSlideItem.addClass('lg-current');_this.outer.removeClass('lg-no-trans');},50);},this.lGalleryOn?this.settings.slideDelay:0);};LightGallery.prototype.slide=function(index,fromTouch,fromThumb,direction){var _this=this;var prevIndex=this.getPreviousSlideIndex();this.currentItemsInDom=this.organizeSlideItems(index,prevIndex);if(this.lGalleryOn&&prevIndex===index){return;} 1941var numberOfGalleryItems=this.galleryItems.length;if(!this.lgBusy){if(this.settings.counter){this.updateCurrentCounter(index);} 1942var currentSlideItem=this.getSlideItem(index);var previousSlideItem_1=this.getSlideItem(prevIndex);var currentGalleryItem=this.galleryItems[index];var videoInfo=currentGalleryItem.__slideVideoInfo;this.outer.attr('data-lg-slide-type',this.getSlideType(currentGalleryItem));this.setDownloadValue(index);if(videoInfo){var _a=this.mediaContainerPosition,top_3=_a.top,bottom=_a.bottom;var videoSize=utils.getSize(this.items[index],this.outer,top_3+bottom,videoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);this.resizeVideoSlide(index,videoSize);} 1943this.LGel.trigger(lGEvents.beforeSlide,{prevIndex:prevIndex,index:index,fromTouch:!!fromTouch,fromThumb:!!fromThumb,currentSlide:currentSlideItem,previousSlide:previousSlideItem_1,info:currentGalleryItem,item:this.items[index]});this.lgBusy=true;clearTimeout(this.hideBarTimeout);this.arrowDisable(index);if(!direction){if(index<prevIndex){direction='prev';} 1944else if(index>prevIndex){direction='next';}} 1945if(!fromTouch){this.makeSlideAnimation(direction,currentSlideItem,previousSlideItem_1);} 1946else{this.outer.find('.lg-item').removeClass('lg-prev-slide lg-current lg-next-slide');var touchPrev=void 0;var touchNext=void 0;if(numberOfGalleryItems>2){touchPrev=index-1;touchNext=index+1;if(index===0&&prevIndex===numberOfGalleryItems-1){touchNext=0;touchPrev=numberOfGalleryItems-1;} 1947else if(index===numberOfGalleryItems-1&&prevIndex===0){touchNext=0;touchPrev=numberOfGalleryItems-1;}} 1948else{touchPrev=0;touchNext=1;} 1949if(direction==='prev'){this.getSlideItem(touchNext).addClass('lg-next-slide');} 1950else{this.getSlideItem(touchPrev).addClass('lg-prev-slide');} 1951currentSlideItem.addClass('lg-current');} 1952if(!this.lGalleryOn){this.loadContent(index,true);} 1953else{setTimeout(function(){_this.loadContent(index,true);if(_this.settings.appendSubHtmlTo!=='.lg-item'){_this.addHtml(index);}},this.settings.speed+50+(fromTouch?0:this.settings.slideDelay));} 1954setTimeout(function(){_this.lgBusy=false;previousSlideItem_1.removeClass('lg-slide-progress');_this.LGel.trigger(lGEvents.afterSlide,{prevIndex:prevIndex,index:index,fromTouch:fromTouch,fromThumb:fromThumb,});},(this.lGalleryOn?this.settings.speed+100:100)+(fromTouch?0:this.settings.slideDelay));} 1955this.index=index;};LightGallery.prototype.updateCurrentCounter=function(index){this.getElementById('lg-counter-current').html(index+1+'');};LightGallery.prototype.updateCounterTotal=function(){this.getElementById('lg-counter-all').html(this.galleryItems.length+'');};LightGallery.prototype.getSlideType=function(item){if(item.__slideVideoInfo){return'video';} 1956else if(item.iframe){return'iframe';} 1957else if(typeof item.src!==''&&item.src.search(/.mp3|.m4a/i)>-1){return'audio';} 1958else{return'image';}};LightGallery.prototype.touchMove=function(startCoords,endCoords,e){var distanceX=endCoords.pageX-startCoords.pageX;var distanceY=endCoords.pageY-startCoords.pageY;var allowSwipe=false;if(this.swipeDirection){allowSwipe=true;} 1959else{if(Math.abs(distanceX)>15){this.swipeDirection='horizontal';allowSwipe=true;} 1960else if(Math.abs(distanceY)>15){this.swipeDirection='vertical';allowSwipe=true;}} 1961if(!allowSwipe){return;} 1962var $currentSlide=this.getSlideItem(this.index);if(this.swipeDirection==='horizontal'){e===null||e===void 0?void 0:e.preventDefault();this.outer.addClass('lg-dragging');this.setTranslate($currentSlide,distanceX,0);var width=$currentSlide.get().offsetWidth;var slideWidthAmount=(width*15)/100;var gutter=slideWidthAmount-Math.abs((distanceX*10)/100);this.setTranslate(this.outer.find('.lg-prev-slide').first(),-width+distanceX-gutter,0);this.setTranslate(this.outer.find('.lg-next-slide').first(),width+distanceX+gutter,0);} 1963else if(this.swipeDirection==='vertical'){if(this.settings.swipeToClose){e===null||e===void 0?void 0:e.preventDefault();this.$container.addClass('lg-dragging-vertical');var opacity=1-Math.abs(distanceY)/window.innerHeight;this.$backdrop.css('opacity',opacity);var scale=1-Math.abs(distanceY)/(window.innerWidth*2);this.setTranslate($currentSlide,0,distanceY,scale,scale);if(Math.abs(distanceY)>100){this.outer.addClass('lg-hide-items').removeClass('lg-components-open');}}}};LightGallery.prototype.touchEnd=function(endCoords,startCoords,event){var _this=this;var distance;if(this.settings.mode!=='lg-slide'){this.outer.addClass('lg-slide');} 1964setTimeout(function(){_this.$container.removeClass('lg-dragging-vertical');_this.outer.removeClass('lg-dragging lg-hide-items').addClass('lg-components-open');var triggerClick=true;if(_this.swipeDirection==='horizontal'){distance=endCoords.pageX-startCoords.pageX;var distanceAbs=Math.abs(endCoords.pageX-startCoords.pageX);if(distance<0&&distanceAbs>_this.settings.swipeThreshold){_this.goToNextSlide(true);triggerClick=false;} 1965else if(distance>0&&distanceAbs>_this.settings.swipeThreshold){_this.goToPrevSlide(true);triggerClick=false;}} 1966else if(_this.swipeDirection==='vertical'){distance=Math.abs(endCoords.pageY-startCoords.pageY);if(_this.settings.closable&&_this.settings.swipeToClose&&distance>100){_this.closeGallery();return;} 1967else{_this.$backdrop.css('opacity',1);}} 1968_this.outer.find('.lg-item').removeAttr('style');if(triggerClick&&Math.abs(endCoords.pageX-startCoords.pageX)<5){var target=$LG(event.target);if(_this.isPosterElement(target)){_this.LGel.trigger(lGEvents.posterClick);}} 1969_this.swipeDirection=undefined;});setTimeout(function(){if(!_this.outer.hasClass('lg-dragging')&&_this.settings.mode!=='lg-slide'){_this.outer.removeClass('lg-slide');}},this.settings.speed+100);};LightGallery.prototype.enableSwipe=function(){var _this=this;var startCoords={};var endCoords={};var isMoved=false;var isSwiping=false;if(this.settings.enableSwipe){this.$inner.on('touchstart.lg',function(e){_this.dragOrSwipeEnabled=true;var $item=_this.getSlideItem(_this.index);if(($LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))&&!_this.outer.hasClass('lg-zoomed')&&!_this.lgBusy&&e.targetTouches.length===1){isSwiping=true;_this.touchAction='swipe';_this.manageSwipeClass();startCoords={pageX:e.targetTouches[0].pageX,pageY:e.targetTouches[0].pageY,};}});this.$inner.on('touchmove.lg',function(e){if(isSwiping&&_this.touchAction==='swipe'&&e.targetTouches.length===1){endCoords={pageX:e.targetTouches[0].pageX,pageY:e.targetTouches[0].pageY,};_this.touchMove(startCoords,endCoords,e);isMoved=true;}});this.$inner.on('touchend.lg',function(event){if(_this.touchAction==='swipe'){if(isMoved){isMoved=false;_this.touchEnd(endCoords,startCoords,event);} 1970else if(isSwiping){var target=$LG(event.target);if(_this.isPosterElement(target)){_this.LGel.trigger(lGEvents.posterClick);}} 1971_this.touchAction=undefined;isSwiping=false;}});}};LightGallery.prototype.enableDrag=function(){var _this=this;var startCoords={};var endCoords={};var isDraging=false;var isMoved=false;if(this.settings.enableDrag){this.outer.on('mousedown.lg',function(e){_this.dragOrSwipeEnabled=true;var $item=_this.getSlideItem(_this.index);if($LG(e.target).hasClass('lg-item')||$item.get().contains(e.target)){if(!_this.outer.hasClass('lg-zoomed')&&!_this.lgBusy){e.preventDefault();if(!_this.lgBusy){_this.manageSwipeClass();startCoords={pageX:e.pageX,pageY:e.pageY,};isDraging=true;_this.outer.get().scrollLeft+=1;_this.outer.get().scrollLeft-=1;_this.outer.removeClass('lg-grab').addClass('lg-grabbing');_this.LGel.trigger(lGEvents.dragStart);}}}});$LG(window).on("mousemove.lg.global"+this.lgId,function(e){if(isDraging&&_this.lgOpened){isMoved=true;endCoords={pageX:e.pageX,pageY:e.pageY,};_this.touchMove(startCoords,endCoords);_this.LGel.trigger(lGEvents.dragMove);}});$LG(window).on("mouseup.lg.global"+this.lgId,function(event){if(!_this.lgOpened){return;} 1972var target=$LG(event.target);if(isMoved){isMoved=false;_this.touchEnd(endCoords,startCoords,event);_this.LGel.trigger(lGEvents.dragEnd);} 1973else if(_this.isPosterElement(target)){_this.LGel.trigger(lGEvents.posterClick);} 1974if(isDraging){isDraging=false;_this.outer.removeClass('lg-grabbing').addClass('lg-grab');}});}};LightGallery.prototype.triggerPosterClick=function(){var _this=this;this.$inner.on('click.lg',function(event){if(!_this.dragOrSwipeEnabled&&_this.isPosterElement($LG(event.target))){_this.LGel.trigger(lGEvents.posterClick);}});};LightGallery.prototype.manageSwipeClass=function(){var _touchNext=this.index+1;var _touchPrev=this.index-1;if(this.settings.loop&&this.galleryItems.length>2){if(this.index===0){_touchPrev=this.galleryItems.length-1;} 1975else if(this.index===this.galleryItems.length-1){_touchNext=0;}} 1976this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide');if(_touchPrev>-1){this.getSlideItem(_touchPrev).addClass('lg-prev-slide');} 1977this.getSlideItem(_touchNext).addClass('lg-next-slide');};LightGallery.prototype.goToNextSlide=function(fromTouch){var _this=this;var _loop=this.settings.loop;if(fromTouch&&this.galleryItems.length<3){_loop=false;} 1978if(!this.lgBusy){if(this.index+1<this.galleryItems.length){this.index++;this.LGel.trigger(lGEvents.beforeNextSlide,{index:this.index,});this.slide(this.index,!!fromTouch,false,'next');} 1979else{if(_loop){this.index=0;this.LGel.trigger(lGEvents.beforeNextSlide,{index:this.index,});this.slide(this.index,!!fromTouch,false,'next');} 1980else if(this.settings.slideEndAnimation&&!fromTouch){this.outer.addClass('lg-right-end');setTimeout(function(){_this.outer.removeClass('lg-right-end');},400);}}}};LightGallery.prototype.goToPrevSlide=function(fromTouch){var _this=this;var _loop=this.settings.loop;if(fromTouch&&this.galleryItems.length<3){_loop=false;} 1981if(!this.lgBusy){if(this.index>0){this.index--;this.LGel.trigger(lGEvents.beforePrevSlide,{index:this.index,fromTouch:fromTouch,});this.slide(this.index,!!fromTouch,false,'prev');} 1982else{if(_loop){this.index=this.galleryItems.length-1;this.LGel.trigger(lGEvents.beforePrevSlide,{index:this.index,fromTouch:fromTouch,});this.slide(this.index,!!fromTouch,false,'prev');} 1983else if(this.settings.slideEndAnimation&&!fromTouch){this.outer.addClass('lg-left-end');setTimeout(function(){_this.outer.removeClass('lg-left-end');},400);}}}};LightGallery.prototype.keyPress=function(){var _this=this;$LG(window).on("keydown.lg.global"+this.lgId,function(e){if(_this.lgOpened&&_this.settings.escKey===true&&e.keyCode===27){e.preventDefault();if(_this.settings.allowMediaOverlap&&_this.outer.hasClass('lg-can-toggle')&&_this.outer.hasClass('lg-components-open')){_this.outer.removeClass('lg-components-open');} 1984else{_this.closeGallery();}} 1985if(_this.lgOpened&&_this.galleryItems.length>1){if(e.keyCode===37){e.preventDefault();_this.goToPrevSlide();} 1986if(e.keyCode===39){e.preventDefault();_this.goToNextSlide();}}});};LightGallery.prototype.arrow=function(){var _this=this;this.getElementById('lg-prev').on('click.lg',function(){_this.goToPrevSlide();});this.getElementById('lg-next').on('click.lg',function(){_this.goToNextSlide();});};LightGallery.prototype.arrowDisable=function(index){if(!this.settings.loop&&this.settings.hideControlOnEnd){var $prev=this.getElementById('lg-prev');var $next=this.getElementById('lg-next');if(index+1===this.galleryItems.length){$next.attr('disabled','disabled').addClass('disabled');} 1987else{$next.removeAttr('disabled').removeClass('disabled');} 1988if(index===0){$prev.attr('disabled','disabled').addClass('disabled');} 1989else{$prev.removeAttr('disabled').removeClass('disabled');}}};LightGallery.prototype.setTranslate=function($el,xValue,yValue,scaleX,scaleY){if(scaleX===void 0){scaleX=1;} 1990if(scaleY===void 0){scaleY=1;} 1991$el.css('transform','translate3d('+ 1992xValue+'px, '+ 1993yValue+'px, 0px) scale3d('+ 1994scaleX+', '+ 1995scaleY+', 1)');};LightGallery.prototype.mousewheel=function(){var _this=this;var lastCall=0;this.outer.on('wheel.lg',function(e){if(!e.deltaY||_this.galleryItems.length<2){return;} 1996e.preventDefault();var now=new Date().getTime();if(now-lastCall<1000){return;} 1997lastCall=now;if(e.deltaY>0){_this.goToNextSlide();} 1998else if(e.deltaY<0){_this.goToPrevSlide();}});};LightGallery.prototype.isSlideElement=function(target){return(target.hasClass('lg-outer')||target.hasClass('lg-item')||target.hasClass('lg-img-wrap'));};LightGallery.prototype.isPosterElement=function(target){var playButton=this.getSlideItem(this.index).find('.lg-video-play-button').get();return(target.hasClass('lg-video-poster')||target.hasClass('lg-video-play-button')||(playButton&&playButton.contains(target.get())));};LightGallery.prototype.toggleMaximize=function(){var _this=this;this.getElementById('lg-maximize').on('click.lg',function(){_this.$container.toggleClass('lg-inline');_this.refreshOnResize();});};LightGallery.prototype.invalidateItems=function(){for(var index=0;index<this.items.length;index++){var element=this.items[index];var $element=$LG(element);$element.off("click.lgcustom-item-"+$element.attr('data-lg-id'));}};LightGallery.prototype.trapFocus=function(){var _this=this;this.$container.get().focus({preventScroll:true,});$LG(window).on("keydown.lg.global"+this.lgId,function(e){if(!_this.lgOpened){return;} 1999var isTabPressed=e.key==='Tab'||e.keyCode===9;if(!isTabPressed){return;} 2000var focusableEls=utils.getFocusableElements(_this.$container.get());var firstFocusableEl=focusableEls[0];var lastFocusableEl=focusableEls[focusableEls.length-1];if(e.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();e.preventDefault();}} 2001else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();e.preventDefault();}}});};LightGallery.prototype.manageCloseGallery=function(){var _this=this;if(!this.settings.closable) 2002return;var mousedown=false;this.getElementById('lg-close').on('click.lg',function(){_this.closeGallery();});if(this.settings.closeOnTap){this.outer.on('mousedown.lg',function(e){var target=$LG(e.target);if(_this.isSlideElement(target)){mousedown=true;} 2003else{mousedown=false;}});this.outer.on('mousemove.lg',function(){mousedown=false;});this.outer.on('mouseup.lg',function(e){var target=$LG(e.target);if(_this.isSlideElement(target)&&mousedown){if(!_this.outer.hasClass('lg-dragging')){_this.closeGallery();}}});}};LightGallery.prototype.closeGallery=function(force){var _this=this;if(!this.lgOpened||(!this.settings.closable&&!force)){return 0;} 2004this.LGel.trigger(lGEvents.beforeClose);if(this.settings.resetScrollPosition&&!this.settings.hideScrollbar){$LG(window).scrollTop(this.prevScrollTop);} 2005var currentItem=this.items[this.index];var transform;if(this.zoomFromOrigin&¤tItem){var _a=this.mediaContainerPosition,top_4=_a.top,bottom=_a.bottom;var _b=this.galleryItems[this.index],__slideVideoInfo=_b.__slideVideoInfo,poster=_b.poster;var imageSize=utils.getSize(currentItem,this.outer,top_4+bottom,__slideVideoInfo&&poster&&this.settings.videoMaxSize,this.galleryItems[this.index]);transform=utils.getTransform(currentItem,this.outer,top_4,bottom,imageSize);} 2006if(this.zoomFromOrigin&&transform){this.outer.addClass('lg-closing lg-zoom-from-image');this.getSlideItem(this.index).addClass('lg-start-end-progress').css('transition-duration',this.settings.startAnimationDuration+'ms').css('transform',transform);} 2007else{this.outer.addClass('lg-hide-items');this.outer.removeClass('lg-zoom-from-image');} 2008this.destroyModules();this.lGalleryOn=false;this.isDummyImageRemoved=false;this.zoomFromOrigin=this.settings.zoomFromOrigin;clearTimeout(this.hideBarTimeout);this.hideBarTimeout=false;$LG('html').removeClass('lg-on');this.outer.removeClass('lg-visible lg-components-open');this.$backdrop.removeClass('in').css('opacity',0);var removeTimeout=this.zoomFromOrigin&&transform?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;this.$container.removeClass('lg-show-in');setTimeout(function(){if(_this.zoomFromOrigin&&transform){_this.outer.removeClass('lg-zoom-from-image');} 2009_this.$container.removeClass('lg-show');_this.resetScrollBar();_this.$backdrop.removeAttr('style').css('transition-duration',_this.settings.backdropDuration+'ms');_this.outer.removeClass("lg-closing "+_this.settings.startClass);_this.getSlideItem(_this.index).removeClass('lg-start-end-progress');_this.$inner.empty();if(_this.lgOpened){_this.LGel.trigger(lGEvents.afterClose,{instance:_this,});} 2010if(_this.$container.get()){_this.$container.get().blur();} 2011_this.lgOpened=false;},removeTimeout+100);return removeTimeout+100;};LightGallery.prototype.initModules=function(){this.plugins.forEach(function(module){try{module.init();} 2012catch(err){console.warn("lightGallery:- make sure lightGallery module is properly initiated");}});};LightGallery.prototype.destroyModules=function(destroy){this.plugins.forEach(function(module){try{if(destroy){module.destroy();} 2013else{module.closeGallery&&module.closeGallery();}} 2014catch(err){console.warn("lightGallery:- make sure lightGallery module is properly destroyed");}});};LightGallery.prototype.refresh=function(galleryItems){if(!this.settings.dynamic){this.invalidateItems();} 2015if(galleryItems){this.galleryItems=galleryItems;} 2016else{this.galleryItems=this.getItems();} 2017this.updateControls();this.openGalleryOnItemClick();this.LGel.trigger(lGEvents.updateSlides);};LightGallery.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems);this.updateCounterTotal();this.manageSingleSlideClassName();};LightGallery.prototype.destroy=function(){var _this=this;var closeTimeout=this.closeGallery(true);setTimeout(function(){_this.destroyModules(true);if(!_this.settings.dynamic){_this.invalidateItems();}
2018$LG(window).off(".lg.global"+_this.lgId);_this.LGel.off('.lg');_this.$container.remove();},closeTimeout);return closeTimeout;};return LightGallery;}());function lightGallery(el,options){return new LightGallery(el,options);} 2019return lightGallery;}))); 2020/*! 2021 * lightgallery | 2.5.0 | June 13th 2022 2022 * http://www.lightgalleryjs.com/ 2023 * Copyright (c) 2020 Sachin Neravath; 2024 * @license GPLv3 2025 */ 2026(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgZoom=factory());}(this,(function(){'use strict'; 2027/*! ***************************************************************************** 2028 Copyright (c) Microsoft Corporation. 2029 2030 Permission to use, copy, modify, and/or distribute this software for any 2031 purpose with or without fee is hereby granted. 2032 2033 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2034 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2035 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2036 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2037 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2038 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2039 PERFORMANCE OF THIS SOFTWARE. 2040 ***************************************************************************** */ 2041var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2042return t;};return __assign.apply(this,arguments);};var zoomSettings={scale:1,zoom:true,actualSize:true,showZoomInOutIcons:false,actualSizeIcons:{zoomIn:'lg-zoom-in',zoomOut:'lg-zoom-out',},enableZoomAfter:300,zoomPluginStrings:{zoomIn:'Zoom in',zoomOut:'Zoom out',viewActualSize:'View actual size',},};var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpdateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var Zoom=(function(){function Zoom(instance,$LG){this.core=instance;this.$LG=$LG;this.settings=__assign(__assign({},zoomSettings),this.core.settings);return this;} 2043Zoom.prototype.buildTemplates=function(){var zoomIcons=this.settings.showZoomInOutIcons?"<button id=\""+this.core.getIdName('lg-zoom-in')+"\" type=\"button\" aria-label=\""+this.settings.zoomPluginStrings['zoomIn']+"\" class=\"lg-zoom-in lg-icon\"></button><button id=\""+this.core.getIdName('lg-zoom-out')+"\" type=\"button\" aria-label=\""+this.settings.zoomPluginStrings['zoomIn']+"\" class=\"lg-zoom-out lg-icon\"></button>":'';if(this.settings.actualSize){zoomIcons+="<button id=\""+this.core.getIdName('lg-actual-size')+"\" type=\"button\" aria-label=\""+this.settings.zoomPluginStrings['viewActualSize']+"\" class=\""+this.settings.actualSizeIcons.zoomIn+" lg-icon\"></button>";} 2044this.core.outer.addClass('lg-use-transition-for-zoom');this.core.$toolbar.first().append(zoomIcons);};Zoom.prototype.enableZoom=function(event){var _this=this;var _speed=this.settings.enableZoomAfter+event.detail.delay;if(this.$LG('body').first().hasClass('lg-from-hash')&&event.detail.delay){_speed=0;} 2045else{this.$LG('body').first().removeClass('lg-from-hash');} 2046this.zoomableTimeout=setTimeout(function(){if(!_this.isImageSlide()){return;} 2047_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');if(event.detail.index===_this.core.index){_this.setZoomEssentials();}},_speed+30);};Zoom.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(lGEvents.slideItemLoad+".zoom",this.enableZoom.bind(this));};Zoom.prototype.getModifier=function(rotateValue,axis,el){var originalRotate=rotateValue;rotateValue=Math.abs(rotateValue);var transformValues=this.getCurrentTransform(el);if(!transformValues){return 1;} 2048var modifier=1;if(axis==='X'){var flipHorizontalValue=Math.sign(parseFloat(transformValues[0]));if(rotateValue===0||rotateValue===180){modifier=1;}
2049else if(rotateValue===90){if((originalRotate===-90&&flipHorizontalValue===1)||(originalRotate===90&&flipHorizontalValue===-1)){modifier=-1;} 2050else{modifier=1;}} 2051modifier=modifier*flipHorizontalValue;} 2052else{var flipVerticalValue=Math.sign(parseFloat(transformValues[3]));if(rotateValue===0||rotateValue===180){modifier=1;} 2053else if(rotateValue===90){var sinX=parseFloat(transformValues[1]);var sinMinusX=parseFloat(transformValues[2]);modifier=Math.sign(sinX*sinMinusX*originalRotate*flipVerticalValue);} 2054modifier=modifier*flipVerticalValue;} 2055return modifier;};Zoom.prototype.getImageSize=function($image,rotateValue,axis){var imageSizes={y:'offsetHeight',x:'offsetWidth',};if(Math.abs(rotateValue)===90){if(axis==='x'){axis='y';} 2056else{axis='x';}} 2057return $image[imageSizes[axis]];};Zoom.prototype.getDragCords=function(e,rotateValue){if(rotateValue===90){return{x:e.pageY,y:e.pageX,};} 2058else{return{x:e.pageX,y:e.pageY,};}};Zoom.prototype.getSwipeCords=function(e,rotateValue){var x=e.targetTouches[0].pageX;var y=e.targetTouches[0].pageY;if(rotateValue===90){return{x:y,y:x,};} 2059else{return{x:x,y:y,};}};Zoom.prototype.getDragAllowedAxises=function(rotateValue,scale){scale=scale||this.scale||1;var allowY=this.imageYSize*scale>this.containerRect.height;var allowX=this.imageXSize*scale>this.containerRect.width;if(rotateValue===90){return{allowX:allowY,allowY:allowX,};} 2060else{return{allowX:allowX,allowY:allowY,};}};Zoom.prototype.getCurrentTransform=function(el){if(!el){return;} 2061var st=window.getComputedStyle(el,null);var tm=st.getPropertyValue('-webkit-transform')||st.getPropertyValue('-moz-transform')||st.getPropertyValue('-ms-transform')||st.getPropertyValue('-o-transform')||st.getPropertyValue('transform')||'none';if(tm!=='none'){return tm.split('(')[1].split(')')[0].split(',');} 2062return;};Zoom.prototype.getCurrentRotation=function(el){if(!el){return 0;} 2063var values=this.getCurrentTransform(el);if(values){return Math.round(Math.atan2(parseFloat(values[1]),parseFloat(values[0]))*(180/Math.PI));} 2064return 0;};Zoom.prototype.setZoomEssentials=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var rotateEl=this.core.getSlideItem(this.core.index).find('.lg-img-rotate').first().get();this.rotateValue=this.getCurrentRotation(rotateEl);this.imageYSize=this.getImageSize($image.get(),this.rotateValue,'y');this.imageXSize=this.getImageSize($image.get(),this.rotateValue,'x');this.containerRect=this.core.outer.get().getBoundingClientRect();this.modifierX=this.getModifier(this.rotateValue,'X',rotateEl);this.modifierY=this.getModifier(this.rotateValue,'Y',rotateEl);};Zoom.prototype.zoomImage=function(scale){var offsetX=(this.containerRect.width-this.imageXSize)/2+ 2065this.containerRect.left;var _a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom;var topBottomSpacing=Math.abs(top-bottom)/2;var offsetY=(this.containerRect.height- 2066this.imageYSize- 2067topBottomSpacing*this.modifierX)/2+ 2068this.scrollTop+ 2069this.containerRect.top;var originalX;var originalY;if(scale===1){this.positionChanged=false;} 2070var dragAllowedAxises=this.getDragAllowedAxises(Math.abs(this.rotateValue),scale);var allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX;if(this.positionChanged){originalX=this.left/(this.scale-1);originalY=this.top/(this.scale-1);this.pageX=Math.abs(originalX)+offsetX;this.pageY=Math.abs(originalY)+offsetY;this.positionChanged=false;} 2071var possibleSwipeCords=this.getPossibleSwipeDragCords(this.rotateValue,scale);var _x=offsetX-this.pageX;var _y=offsetY-this.pageY;var x=(scale-1)*_x;var y=(scale-1)*_y;if(allowX){if(this.isBeyondPossibleLeft(x,possibleSwipeCords.minX)){x=possibleSwipeCords.minX;} 2072else if(this.isBeyondPossibleRight(x,possibleSwipeCords.maxX)){x=possibleSwipeCords.maxX;}} 2073else{if(scale>1){if(x<possibleSwipeCords.minX){x=possibleSwipeCords.minX;} 2074else if(x>possibleSwipeCords.maxX){x=possibleSwipeCords.maxX;}}} 2075if(allowY){if(this.isBeyondPossibleTop(y,possibleSwipeCords.minY)){y=possibleSwipeCords.minY;} 2076else if(this.isBeyondPossibleBottom(y,possibleSwipeCords.maxY)){y=possibleSwipeCords.maxY;}} 2077else{if(scale>1){if(y<possibleSwipeCords.minY){y=possibleSwipeCords.minY;} 2078else if(y>possibleSwipeCords.maxY){y=possibleSwipeCords.maxY;}}} 2079this.setZoomStyles({x:x,y:y,scale:scale,});};Zoom.prototype.setZoomStyles=function(style){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var $dummyImage=this.core.outer.find('.lg-current .lg-dummy-img').first();var $imageWrap=$image.parent();this.scale=style.scale;$image.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');$dummyImage.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');var transform='translate3d('+style.x+'px, '+style.y+'px, 0)';$imageWrap.css('transform',transform);this.left=style.x;this.top=style.y;};Zoom.prototype.setActualSize=function(index,event){var _this=this;if(!this.isImageSlide()||this.core.outer.hasClass('lg-first-slide-loading')){return;} 2080var scale=this.getCurrentImageActualSizeScale();if(this.core.outer.hasClass('lg-zoomed')){this.scale=1;} 2081else{this.scale=this.getScale(scale);} 2082this.setPageCords(event);this.beginZoom(this.scale);this.zoomImage(this.scale);setTimeout(function(){_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');},10);};
2082Zoom.prototype.getNaturalWidth=function(index){var $image=this.core.getSlideItem(index).find('.lg-image').first();var naturalWidth=this.core.galleryItems[index].width;return naturalWidth?parseFloat(naturalWidth):$image.get().naturalWidth;};Zoom.prototype.getActualSizeScale=function(naturalWidth,width){var _scale;var scale;if(naturalWidth>width){_scale=naturalWidth/width;scale=_scale||2;} 2083else{scale=1;} 2084return scale;};Zoom.prototype.getCurrentImageActualSizeScale=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var width=$image.get().offsetWidth;var naturalWidth=this.getNaturalWidth(this.core.index)||width;return this.getActualSizeScale(naturalWidth,width);};Zoom.prototype.getPageCords=function(event){var cords={};if(event){cords.x=event.pageX||event.targetTouches[0].pageX;cords.y=event.pageY||event.targetTouches[0].pageY;} 2085else{var containerRect=this.core.outer.get().getBoundingClientRect();cords.x=containerRect.width/2+containerRect.left;cords.y=containerRect.height/2+this.scrollTop+containerRect.top;} 2086return cords;};Zoom.prototype.setPageCords=function(event){var pageCords=this.getPageCords(event);this.pageX=pageCords.x;this.pageY=pageCords.y;};Zoom.prototype.beginZoom=function(scale){this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');if(scale>1){this.core.outer.addClass('lg-zoomed');var $actualSize=this.core.getElementById('lg-actual-size');$actualSize.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut);} 2087else{this.resetZoom();} 2088return scale>1;};Zoom.prototype.getScale=function(scale){var actualSizeScale=this.getCurrentImageActualSizeScale();if(scale<1){scale=1;} 2089else if(scale>actualSizeScale){scale=actualSizeScale;} 2090return scale;};Zoom.prototype.init=function(){var _this=this;if(!this.settings.zoom){return;} 2091this.buildTemplates();this.enableZoomOnSlideItemLoad();var tapped=null;this.core.outer.on('dblclick.lg',function(event){if(!_this.$LG(event.target).hasClass('lg-image')){return;} 2092_this.setActualSize(_this.core.index,event);});this.core.outer.on('touchstart.lg',function(event){var $target=_this.$LG(event.target);if(event.targetTouches.length===1&&$target.hasClass('lg-image')){if(!tapped){tapped=setTimeout(function(){tapped=null;},300);} 2093else{clearTimeout(tapped);tapped=null;event.preventDefault();_this.setActualSize(_this.core.index,event);}}});this.core.LGel.on(lGEvents.containerResize+".zoom "+lGEvents.rotateRight+".zoom "+lGEvents.rotateLeft+".zoom "+lGEvents.flipHorizontal+".zoom "+lGEvents.flipVertical+".zoom",function(){if(!_this.core.lgOpened||!_this.isImageSlide()) 2094return;_this.setPageCords();_this.setZoomEssentials();_this.zoomImage(_this.scale);});this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){if(!_this.core.lgOpened) 2095return;_this.scrollTop=_this.$LG(window).scrollTop();});this.core.getElementById('lg-zoom-out').on('click.lg',function(){if(_this.core.outer.find('.lg-current .lg-image').get()){_this.scale-=_this.settings.scale;_this.scale=_this.getScale(_this.scale);_this.beginZoom(_this.scale);_this.zoomImage(_this.scale);}});this.core.getElementById('lg-zoom-in').on('click.lg',function(){_this.zoomIn();});this.core.getElementById('lg-actual-size').on('click.lg',function(){_this.setActualSize(_this.core.index);});this.core.LGel.on(lGEvents.beforeOpen+".zoom",function(){_this.core.outer.find('.lg-item').removeClass('lg-zoomable');});this.core.LGel.on(lGEvents.afterOpen+".zoom",function(){_this.scrollTop=_this.$LG(window).scrollTop();_this.pageX=_this.core.outer.width()/2;_this.pageY=_this.core.outer.height()/2+_this.scrollTop;_this.scale=1;});this.core.LGel.on(lGEvents.afterSlide+".zoom",function(event){var prevIndex=event.detail.prevIndex;_this.scale=1;_this.positionChanged=false;_this.resetZoom(prevIndex);if(_this.isImageSlide()){_this.setZoomEssentials();}});this.zoomDrag();this.pinchZoom();this.zoomSwipe();this.zoomableTimeout=false;this.positionChanged=false;};Zoom.prototype.zoomIn=function(scale){if(!this.isImageSlide()){return;} 2096if(scale){this.scale=scale;} 2097else{this.scale+=this.settings.scale;} 2098this.scale=this.getScale(this.scale);this.beginZoom(this.scale);this.zoomImage(this.scale);};Zoom.prototype.resetZoom=function(index){this.core.outer.removeClass('lg-zoomed lg-zoom-drag-transition');var $actualSize=this.core.getElementById('lg-actual-size');var $item=this.core.getSlideItem(index!==undefined?index:this.core.index);$actualSize.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn);$item.find('.lg-img-wrap').first().removeAttr('style');$item.find('.lg-image').first().removeAttr('style');this.scale=1;this.left=0;this.top=0;this.setPageCords();};Zoom.prototype.getTouchDistance=function(e){return Math.sqrt((e.targetTouches[0].pageX-e.targetTouches[1].pageX)*(e.targetTouches[0].pageX-e.targetTouches[1].pageX)+ 2099(e.targetTouches[0].pageY-e.targetTouches[1].pageY)*(e.targetTouches[0].pageY-e.targetTouches[1].pageY));};Zoom.prototype.pinchZoom=function(){var _this=this;var startDist=0;var pinchStarted=false;var initScale=1;var $item=this.core.getSlideItem(this.core.index);this.core.$inner.on('touchstart.lg',function(e){$item=_this.core.getSlideItem(_this.core.index);if(!_this.isImageSlide()){return;} 2100if(e.targetTouches.length===2&&!_this.core.outer.hasClass('lg-first-slide-loading')&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){initScale=_this.scale||1;_this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');_this.core.touchAction='pinch';startDist=_this.getTouchDistance(e);}});this.core.$inner.on('touchmove.lg',function(e){if(e.targetTouches.length===2&&_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){e.preventDefault();var endDist=_this.getTouchDistance(e);var distance=startDist-endDist;if(!pinchStarted&&Math.abs(distance)>5){pinchStarted=true;} 2101if(pinchStarted){_this.scale=Math.max(1,initScale+-distance*0.008);_this.zoomImage(_this.scale);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){pinchStarted=false;startDist=0;if(_this.scale<=1){_this.resetZoom();}
2102else{_this.scale=_this.getScale(_this.scale);_this.zoomImage(_this.scale);_this.core.outer.addClass('lg-zoomed');} 2103_this.core.touchAction=undefined;}});};Zoom.prototype.touchendZoom=function(startCoords,endCoords,allowX,allowY,touchDuration,rotateValue){var distanceXnew=endCoords.x-startCoords.x;var distanceYnew=endCoords.y-startCoords.y;var speedX=Math.abs(distanceXnew)/touchDuration+1;var speedY=Math.abs(distanceYnew)/touchDuration+1;if(speedX>2){speedX+=1;} 2104if(speedY>2){speedY+=1;} 2105distanceXnew=distanceXnew*speedX;distanceYnew=distanceYnew*speedY;var _LGel=this.core.getSlideItem(this.core.index).find('.lg-img-wrap').first();var distance={};distance.x=this.left+distanceXnew*this.modifierX;distance.y=this.top+distanceYnew*this.modifierY;var possibleSwipeCords=this.getPossibleSwipeDragCords(rotateValue);if(Math.abs(distanceXnew)>15||Math.abs(distanceYnew)>15){if(allowY){if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){distance.y=possibleSwipeCords.minY;} 2106else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){distance.y=possibleSwipeCords.maxY;}} 2107if(allowX){if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){distance.x=possibleSwipeCords.minX;} 2108else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){distance.x=possibleSwipeCords.maxX;}} 2109if(allowY){this.top=distance.y;} 2110else{distance.y=this.top;} 2111if(allowX){this.left=distance.x;} 2112else{distance.x=this.left;} 2113this.setZoomSwipeStyles(_LGel,distance);this.positionChanged=true;}};Zoom.prototype.getZoomSwipeCords=function(startCoords,endCoords,allowX,allowY,possibleSwipeCords){var distance={};if(allowY){distance.y=this.top+(endCoords.y-startCoords.y)*this.modifierY;if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){var diffMinY=possibleSwipeCords.minY-distance.y;distance.y=possibleSwipeCords.minY-diffMinY/6;} 2114else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){var diffMaxY=distance.y-possibleSwipeCords.maxY;distance.y=possibleSwipeCords.maxY+diffMaxY/6;}} 2115else{distance.y=this.top;} 2116if(allowX){distance.x=this.left+(endCoords.x-startCoords.x)*this.modifierX;if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){var diffMinX=possibleSwipeCords.minX-distance.x;distance.x=possibleSwipeCords.minX-diffMinX/6;} 2117else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){var difMaxX=distance.x-possibleSwipeCords.maxX;distance.x=possibleSwipeCords.maxX+difMaxX/6;}} 2118else{distance.x=this.left;} 2119return distance;};Zoom.prototype.isBeyondPossibleLeft=function(x,minX){return x>=minX;};Zoom.prototype.isBeyondPossibleRight=function(x,maxX){return x<=maxX;};Zoom.prototype.isBeyondPossibleTop=function(y,minY){return y>=minY;};Zoom.prototype.isBeyondPossibleBottom=function(y,maxY){return y<=maxY;};Zoom.prototype.isImageSlide=function(){var currentItem=this.core.galleryItems[this.core.index];return this.core.getSlideType(currentItem)==='image';};Zoom.prototype.getPossibleSwipeDragCords=function(rotateValue,scale){var dataScale=scale||this.scale||1;var elDataScale=Math.abs(dataScale);var _a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom;var topBottomSpacing=Math.abs(top-bottom)/2;var minY=(this.imageYSize-this.containerRect.height)/2+ 2120topBottomSpacing*this.modifierX;var maxY=this.containerRect.height-this.imageYSize*elDataScale+minY;var minX=(this.imageXSize-this.containerRect.width)/2;var maxX=this.containerRect.width-this.imageXSize*elDataScale+minX;var possibleSwipeCords={minY:minY,maxY:maxY,minX:minX,maxX:maxX,};if(Math.abs(rotateValue)===90){possibleSwipeCords={minY:minX,maxY:maxX,minX:minY,maxX:maxY,};} 2121return possibleSwipeCords;};Zoom.prototype.setZoomSwipeStyles=function(LGel,distance){LGel.css('transform','translate3d('+distance.x+'px, '+distance.y+'px, 0)');};Zoom.prototype.zoomSwipe=function(){var _this=this;var startCoords={};var endCoords={};var isMoved=false;var allowX=false;var allowY=false;var startTime=new Date();var endTime=new Date();var possibleSwipeCords;var _LGel;var $item=this.core.getSlideItem(this.core.index);this.core.$inner.on('touchstart.lg',function(e){if(!_this.isImageSlide()){return;} 2122$item=_this.core.getSlideItem(_this.core.index);if((_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))&&e.targetTouches.length===1&&_this.core.outer.hasClass('lg-zoomed')){e.preventDefault();startTime=new Date();_this.core.touchAction='zoomSwipe';_LGel=_this.core.getSlideItem(_this.core.index).find('.lg-img-wrap').first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY;allowX=dragAllowedAxises.allowX;
2122if(allowX||allowY){startCoords=_this.getSwipeCords(e,Math.abs(_this.rotateValue));} 2123possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue);_this.core.outer.addClass('lg-zoom-dragging lg-zoom-drag-transition');}});this.core.$inner.on('touchmove.lg',function(e){if(e.targetTouches.length===1&&_this.core.touchAction==='zoomSwipe'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){e.preventDefault();_this.core.touchAction='zoomSwipe';endCoords=_this.getSwipeCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);if(Math.abs(endCoords.x-startCoords.x)>15||Math.abs(endCoords.y-startCoords.y)>15){isMoved=true;_this.setZoomSwipeStyles(_LGel,distance);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='zoomSwipe'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){_this.core.touchAction=undefined;_this.core.outer.removeClass('lg-zoom-dragging');if(!isMoved){return;} 2124isMoved=false;endTime=new Date();var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);}});};Zoom.prototype.zoomDrag=function(){var _this=this;var startCoords={};var endCoords={};var isDragging=false;var isMoved=false;var allowX=false;var allowY=false;var startTime;var endTime;var possibleSwipeCords;var _LGel;this.core.outer.on('mousedown.lg.zoom',function(e){if(!_this.isImageSlide()){return;} 2125var $item=_this.core.getSlideItem(_this.core.index);if(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target)){startTime=new Date();_LGel=_this.core.getSlideItem(_this.core.index).find('.lg-img-wrap').first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY;allowX=dragAllowedAxises.allowX;if(_this.core.outer.hasClass('lg-zoomed')){if(_this.$LG(e.target).hasClass('lg-object')&&(allowX||allowY)){e.preventDefault();startCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue);isDragging=true;_this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;_this.core.outer.removeClass('lg-grab').addClass('lg-grabbing lg-zoom-drag-transition lg-zoom-dragging');}}}});this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){isMoved=true;endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);_this.setZoomSwipeStyles(_LGel,distance);}});this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){endTime=new Date();isDragging=false;_this.core.outer.removeClass('lg-zoom-dragging');if(isMoved&&(startCoords.x!==endCoords.x||startCoords.y!==endCoords.y)){endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);} 2126isMoved=false;} 2127_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');});};Zoom.prototype.closeGallery=function(){this.resetZoom();};Zoom.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId);this.core.LGel.off('.lg.zoom');this.core.LGel.off('.zoom');clearTimeout(this.zoomableTimeout);this.zoomableTimeout=false;};return Zoom;}());return Zoom;}))); 2128/*! 2129 * lightgallery | 2.5.0 | June 13th 2022 2130 * http://www.lightgalleryjs.com/ 2131 * Copyright (c) 2020 Sachin Neravath; 2132 * @license GPLv3 2133 */ 2134(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgFullscreen=factory());}(this,(function(){'use strict'; 2135/*! ***************************************************************************** 2136 Copyright (c) Microsoft Corporation. 2137 2138 Permission to use, copy, modify, and/or distribute this software for any 2139 purpose with or without fee is hereby granted. 2140 2141 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2142 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2143 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2144 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2145 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2146 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2147 PERFORMANCE OF THIS SOFTWARE. 2148 ***************************************************************************** */ 2149var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2150return t;};return __assign.apply(this,arguments);};var fullscreenSettings={fullScreen:true,fullscreenPluginStrings:{toggleFullscreen:'Toggle Fullscreen',},};var FullScreen=(function(){function FullScreen(instance,$LG){this.core=instance;this.$LG=$LG;this.settings=__assign(__assign({},fullscreenSettings),this.core.settings);return this;} 2151FullScreen.prototype.init=function(){var fullScreen='';if(this.settings.fullScreen){if(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled&&!document.mozFullScreenEnabled&&!document.msFullscreenEnabled){return;} 2152else{fullScreen="<button type=\"button\" aria-label=\""+this.settings.fullscreenPluginStrings['toggleFullscreen']+"\" class=\"lg-fullscreen lg-icon\"></button>";this.core.$toolbar.append(fullScreen);this.fullScreen();}}};FullScreen.prototype.isFullScreen=function(){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement);};FullScreen.prototype.requestFullscreen=function(){var el=document.documentElement;if(el.requestFullscreen){el.requestFullscreen();} 2153else if(el.msRequestFullscreen){el.msRequestFullscreen();} 2154else if(el.mozRequestFullScreen){el.mozRequestFullScreen();} 2155else if(el.webkitRequestFullscreen){el.webkitRequestFullscreen();}};FullScreen.prototype.exitFullscreen=function(){if(document.exitFullscreen){document.exitFullscreen();} 2156else if(document.msExitFullscreen){document.msExitFullscreen();} 2157else if(document.mozCancelFullScreen){document.mozCancelFullScreen();} 2158else if(document.webkitExitFullscreen){document.webkitExitFullscreen();}};FullScreen.prototype.fullScreen=function(){var _this=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,function(){if(!_this.core.lgOpened) 2159return;_this.core.outer.toggleClass('lg-fullscreen-on');});this.core.outer.find('.lg-fullscreen').first().on('click.lg',function(){if(_this.isFullScreen()){_this.exitFullscreen();} 2160else{_this.requestFullscreen();}});};FullScreen.prototype.closeGallery=function(){if(this.isFullScreen()){this.exitFullscreen();}};FullScreen.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId);};return FullScreen;}());return FullScreen;}))); 2161/*! 2162 * lightgallery | 2.5.0 | June 13th 2022 2163 * http://www.lightgalleryjs.com/ 2164 * Copyright (c) 2020 Sachin Neravath; 2165 * @license GPLv3 2166 */ 2167(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgHash=factory());}(this,(function(){'use strict'; 2168/*! ***************************************************************************** 2169 Copyright (c) Microsoft Corporation. 2170 2171 Permission to use, copy, modify, and/or distribute this software for any 2172 purpose with or without fee is hereby granted. 2173 2174 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2175 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2176 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2177 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2178 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2179 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2180 PERFORMANCE OF THIS SOFTWARE. 2181 ***************************************************************************** */ 2182var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2183return t;};return __assign.apply(this,arguments);};var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpd
2183ateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var hashSettings={hash:true,galleryId:'1',customSlideName:false,};var Hash=(function(){function Hash(instance,$LG){this.core=instance;this.$LG=$LG;this.settings=__assign(__assign({},hashSettings),this.core.settings);return this;} 2184Hash.prototype.init=function(){var _this=this;if(!this.settings.hash){return;} 2185this.oldHash=window.location.hash;setTimeout(function(){_this.buildFromHash();},100);this.core.LGel.on(lGEvents.afterSlide+".hash",this.onAfterSlide.bind(this));this.core.LGel.on(lGEvents.afterClose+".hash",this.onCloseAfter.bind(this));this.$LG(window).on("hashchange.lg.hash.global"+this.core.lgId,this.onHashchange.bind(this));};Hash.prototype.onAfterSlide=function(event){var slideName=this.core.galleryItems[event.detail.index].slideName;slideName=this.settings.customSlideName?slideName||event.detail.index:event.detail.index;if(history.replaceState){history.replaceState(null,'',window.location.pathname+ 2186window.location.search+'#lg='+ 2187this.settings.galleryId+'&slide='+ 2188slideName);} 2189else{window.location.hash='lg='+this.settings.galleryId+'&slide='+slideName;}};Hash.prototype.getIndexFromUrl=function(hash){if(hash===void 0){hash=window.location.hash;} 2190var slideName=hash.split('&slide=')[1];var _idx=0;if(this.settings.customSlideName){for(var index=0;index<this.core.galleryItems.length;index++){var dynamicEl=this.core.galleryItems[index];if(dynamicEl.slideName===slideName){_idx=index;break;}}} 2191else{_idx=parseInt(slideName,10);} 2192return isNaN(_idx)?0:_idx;};Hash.prototype.buildFromHash=function(){var _hash=window.location.hash;if(_hash.indexOf('lg='+this.settings.galleryId+'&')>0){this.$LG(document.body).addClass('lg-from-hash');var index=this.getIndexFromUrl(_hash);this.core.openGallery(index);return true;}};Hash.prototype.onCloseAfter=function(){if(this.oldHash&&this.oldHash.indexOf('lg='+this.settings.galleryId)<0){if(history.replaceState){history.replaceState(null,'',this.oldHash);} 2193else{window.location.hash=this.oldHash;}} 2194else{if(history.replaceState){history.replaceState(null,document.title,window.location.pathname+window.location.search);} 2195else{window.location.hash='';}}};Hash.prototype.onHashchange=function(){if(!this.core.lgOpened) 2196return;var _hash=window.location.hash;var index=this.getIndexFromUrl(_hash);if(_hash.indexOf('lg='+this.settings.galleryId)>-1){this.core.slide(index,false,false);} 2197else if(this.core.lGalleryOn){this.core.closeGallery();}};Hash.prototype.closeGallery=function(){if(this.settings.hash){this.$LG(document.body).removeClass('lg-from-hash');}};Hash.prototype.destroy=function(){this.core.LGel.off('.lg.hash');this.core.LGel.off('.hash');this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId);};return Hash;}());return Hash;}))); 2198/*! 2199 * lightgallery | 2.5.0 | June 13th 2022 2200 * http://www.lightgalleryjs.com/ 2201 * Copyright (c) 2020 Sachin Neravath; 2202 * @license GPLv3 2203 */ 2204(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgShare=factory());}(this,(function(){'use strict'; 2205/*! ***************************************************************************** 2206 Copyright (c) Microsoft Corporation. 2207 2208 Permission to use, copy, modify, and/or distribute this software for any 2209 purpose with or without fee is hereby granted. 2210 2211 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2212 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2213 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2214 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2215 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2216 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2217 PERFORMANCE OF THIS SOFTWARE. 2218 ***************************************************************************** */ 2219var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2220return t;};return __assign.apply(this,arguments);};function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++) 2221for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++) 2222r[k]=a[j];return r;} 2223var shareSettings={share:true,facebook:true,facebookDropdownText:'Facebook',twitter:true,twitterDropdownText:'Twitter',pinterest:true,pinterestDropdownText:'Pinterest',additionalShareOptions:[],sharePluginStrings:{share:'Share'},};function getFacebookShareLink(galleryItem){var facebookBaseUrl='//www.facebook.com/sharer/sharer.php?u=';return(facebookBaseUrl+ 2224encodeURIComponent(galleryItem.facebookShareUrl||window.location.href));} 2225function getTwitterShareLink(galleryItem){var twitterBaseUrl='//twitter.com/intent/tweet?text=';var url=encodeURIComponent(galleryItem.twitterShareUrl||window.location.href);var text=galleryItem.tweetText;return twitterBaseUrl+text+'&url='+url;} 2226function getPinterestShareLink(galleryItem){var pinterestBaseUrl='http://www.pinterest.com/pin/create/button/?url=';var description=galleryItem.pinterestText;var media=encodeURIComponent(galleryItem.src);var url=encodeURIComponent(galleryItem.pinterestShareUrl||window.location.href);return(pinterestBaseUrl+ 2227url+'&media='+ 2228media+'&description='+ 2229description);} 2230var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpd
2230ateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var Share=(function(){function Share(instance){this.shareOptions=[];this.core=instance;this.settings=__assign(__assign({},shareSettings),this.core.settings);return this;} 2231Share.prototype.init=function(){if(!this.settings.share){return;} 2232this.shareOptions=__spreadArrays(this.getDefaultShareOptions(),this.settings.additionalShareOptions);this.setLgShareMarkup();this.core.outer.find('.lg-share .lg-dropdown').append(this.getShareListHtml());this.core.LGel.on(lGEvents.afterSlide+".share",this.onAfterSlide.bind(this));};Share.prototype.getShareListHtml=function(){var shareHtml='';this.shareOptions.forEach(function(shareOption){shareHtml+=shareOption.dropdownHTML;});return shareHtml;};Share.prototype.setLgShareMarkup=function(){var _this=this;this.core.$toolbar.append("<button type=\"button\" aria-label=\""+this.settings.sharePluginStrings['share']+"\" aria-haspopup=\"true\" aria-expanded=\"false\" class=\"lg-share lg-icon\">\n <ul class=\"lg-dropdown\" style=\"position: absolute;\"></ul></button>");this.core.outer.append('<div class="lg-dropdown-overlay"></div>');var $shareButton=this.core.outer.find('.lg-share');$shareButton.first().on('click.lg',function(){_this.core.outer.toggleClass('lg-dropdown-active');if(_this.core.outer.hasClass('lg-dropdown-active')){_this.core.outer.attr('aria-expanded',true);} 2233else{_this.core.outer.attr('aria-expanded',false);}});this.core.outer.find('.lg-dropdown-overlay').first().on('click.lg',function(){_this.core.outer.removeClass('lg-dropdown-active');_this.core.outer.attr('aria-expanded',false);});};Share.prototype.onAfterSlide=function(event){var _this=this;var index=event.detail.index;var currentItem=this.core.galleryItems[index];setTimeout(function(){_this.shareOptions.forEach(function(shareOption){var selector=shareOption.selector;_this.core.outer.find(selector).attr('href',shareOption.generateLink(currentItem));});},100);};Share.prototype.getShareListItemHTML=function(type,text){return"<li><a class=\"lg-share-"+type+"\" rel=\"noopener\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">"+text+"</span></a></li>";};Share.prototype.getDefaultShareOptions=function(){return __spreadArrays((this.settings.facebook?[{type:'facebook',generateLink:getFacebookShareLink,dropdownHTML:this.getShareListItemHTML('facebook',this.settings.facebookDropdownText),selector:'.lg-share-facebook',},]:[]),(this.settings.twitter?[{type:'twitter',generateLink:getTwitterShareLink,dropdownHTML:this.getShareListItemHTML('twitter',this.settings.twitterDropdownText),selector:'.lg-share-twitter',},]:[]),(this.settings.pinterest?[{type:'pinterest',generateLink:getPinterestShareLink,dropdownHTML:this.getShareListItemHTML('pinterest',this.settings.pinterestDropdownText),selector:'.lg-share-pinterest',},]:[]));};Share.prototype.destroy=function(){this.core.outer.find('.lg-dropdown-overlay').remove();this.core.outer.find('.lg-share').remove();this.core.LGel.off('.lg.share');this.core.LGel.off('.share');};return Share;}());return Share;}))); 2234/*! 2235 * lightgallery | 2.5.0 | June 13th 2022 2236 * http://www.lightgalleryjs.com/ 2237 * Copyright (c) 2020 Sachin Neravath; 2238 * @license GPLv3 2239 */ 2240(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgThumbnail=factory());}(this,(function(){'use strict'; 2241/*! ***************************************************************************** 2242 Copyright (c) Microsoft Corporation. 2243 2244 Permission to use, copy, modify, and/or distribute this software for any 2245 purpose with or without fee is hereby granted. 2246 2247 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2248 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2249 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2250 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2251 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2252 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2253 PERFORMANCE OF THIS SOFTWARE. 2254 ***************************************************************************** */ 2255var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2256return t;};return __assign.apply(this,arguments);};var thumbnailsSettings={thumbnail:true,animateThumb:true,currentPagerPosition:'middle',alignThumbnails:'middle',thumbWidth:100,thumbHe
2256ight:'80px',thumbMargin:5,appendThumbnailsTo:'.lg-components',toggleThumb:false,enableThumbDrag:true,enableThumbSwipe:true,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:true,youTubeThumbSize:1,thumbnailPluginStrings:{toggleThumbnails:'Toggle thumbnails',},};var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpdateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var Thumbnail=(function(){function Thumbnail(instance,$LG){this.thumbOuterWidth=0;this.thumbTotalWidth=0;this.translateX=0;this.thumbClickable=false;this.core=instance;this.$LG=$LG;return this;} 2257Thumbnail.prototype.init=function(){this.settings=__assign(__assign({},thumbnailsSettings),this.core.settings);this.thumbOuterWidth=0;this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin);this.translateX=0;this.setAnimateThumbStyles();if(!this.core.settings.allowMediaOverlap){this.settings.toggleThumb=false;} 2258if(this.settings.thumbnail){this.build();if(this.settings.animateThumb){if(this.settings.enableThumbDrag){this.enableThumbDrag();} 2259if(this.settings.enableThumbSwipe){this.enableThumbSwipe();} 2260this.thumbClickable=false;} 2261else{this.thumbClickable=true;} 2262this.toggleThumbBar();this.thumbKeyPress();}};Thumbnail.prototype.build=function(){var _this=this;this.setThumbMarkup();this.manageActiveClassOnSlideChange();this.$lgThumb.first().on('click.lg touchend.lg',function(e){var $target=_this.$LG(e.target);if(!$target.hasAttribute('data-lg-item-id')){return;} 2263setTimeout(function(){if(_this.thumbClickable&&!_this.core.lgBusy){var index=parseInt($target.attr('data-lg-item-id'));_this.core.slide(index,false,true,false);}},50);});this.core.LGel.on(lGEvents.beforeSlide,function(event){var index=event.detail.index;_this.animateThumb(index);});this.core.LGel.on(lGEvents.beforeOpen,function(){_this.thumbOuterWidth=_this.core.outer.get().offsetWidth;});this.core.LGel.on(lGEvents.updateSlides,function(){_this.rebuildThumbnails();});this.core.LGel.on(lGEvents.containerResize,function(){if(!_this.core.lgOpened) 2264return;setTimeout(function(){_this.thumbOuterWidth=_this.core.outer.get().offsetWidth;_this.animateThumb(_this.core.index);_this.thumbOuterWidth=_this.core.outer.get().offsetWidth;},50);});};Thumbnail.prototype.setThumbMarkup=function(){var thumbOuterClassNames='lg-thumb-outer ';if(this.settings.alignThumbnails){thumbOuterClassNames+="lg-thumb-align-"+this.settings.alignThumbnails;} 2265var html="<div class=\""+thumbOuterClassNames+"\">\n <div class=\"lg-thumb lg-group\">\n </div>\n </div>";this.core.outer.addClass('lg-has-thumb');if(this.settings.appendThumbnailsTo==='.lg-components'){this.core.$lgComponents.append(html);} 2266else{this.core.outer.append(html);} 2267this.$thumbOuter=this.core.outer.find('.lg-thumb-outer').first();this.$lgThumb=this.core.outer.find('.lg-thumb').first();if(this.settings.animateThumb){this.core.outer.find('.lg-thumb').css('transition-duration',this.core.settings.speed+'ms').css('width',this.thumbTotalWidth+'px').css('position','relative');} 2268this.setThumbItemHtml(this.core.galleryItems);};Thumbnail.prototype.enableThumbDrag=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0,},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0,};var isDragging=false;this.$thumbOuter.addClass('lg-grab');this.core.outer.find('.lg-thumb').first().on('mousedown.lg.thumb',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.startX=e.pageX;thumbDragUtils.startTime=new Date();_this.thumbClickable=false;isDragging=true;_this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');}});this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened) 2269return;if(isDragging){thumbDragUtils.cords.endX=e.pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){if(!_this.core.lgOpened) 2270return;if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);} 2271else{_this.thumbClickable=true;} 2272if(isDragging){isDragging=false;_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');}});};Thumbnail.prototype.enableThumbSwipe=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0,},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0,};this.$lgThumb.on('touchstart.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.startX=e.targetTouches[0].pageX;_this.thumbClickable=false;thumbDragUtils.startTime=new Date();}});this.$lgThumb.on('touchmove.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.endX=e.targetTouches[0].pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$lgThumb.on('touchend.lg',function(){if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);} 2273else{_this.thumbClickable=true;}});};Thumbnail.prototype.rebuildThumbnails=function(){var _this=this;this.$thumbOuter.addClass('lg-rebuilding-thumbnails');setTimeout(function(){_this.thumbTotalWidth=_this.core.galleryItems.length*(_this.settings.thumbWidth+_this.settings.thumbMargin);_this.$lgThumb.css('width',_this.thumbTotalWidth+'px');_this.$lgThumb.empty();_this.setThumbItemHtml(_this.core.galleryItems);_this.animateThumb(_this.core.index);},50);setTimeout(function(){_this.$thumbOuter.removeClass('lg-rebuilding-thumbnails');},200);};Thumbnail.prototype.setTranslate=function(value){this.$lgThumb.css('transform','translate3d(-'+value+'px, 0px, 0px)');};Thumbnail.prototype.getPossibleTransformX=function(left){if(left>this.thumbTotalWidth-this.thumbOuterWidth){left=this.thumbTotalWidth-this.thumbOuterWidth;} 2274if(left<0){left=0;} 2275return left;};Thumbnail.prototype.animateThumb=function(index){this.$lgThumb.css('transition-duration',this.core.settings.speed+'ms');if(this.settings.animateThumb){var position=0;switch(this.settings.currentPagerPosition){case'left':position=0;break;case'middle':position=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case'right':position=this.thumbOuterWidth-this.settings.thumbWidth;} 2276this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*index- 22771- 2278position;if(this.translateX>this.thumbTotalWidth-this.thumbOuterWidth){this.translateX=this.thumbTotalWidth-this.thumbOuterWidth;} 2279if(this.translateX<0){this.translateX=0;} 2280this.setTranslate(this.translateX);}};Thumbnail.prototype.onThumbTouchMove=function(thumbDragUtils){thumbDragUtils.newTranslateX=this.translateX;thumbDragUtils.isMoved=true;thumbDragUtils.touchMoveTime=new Date().valueOf();thumbDragUtils.newTranslateX-=thumbDragUtils.cords.endX-thumbDragUtils.cords.startX;thumbDragUtils.newTranslateX=this.getPossibleTransformX(thumbDragUtils.newTranslateX);this.setTranslate(thumbDragUtils.newTranslateX);this.$thumbOuter.addClass('lg-dragging');return thumbDragUtils;};Thumbnail.prototype.onThumbTouchEnd=function(thumbDragUtils){thumbDragUtils.isMoved=false;thumbDragUtils.endTime=new Date();this.$thumbOuter.removeClass('lg-dragging');var touchDuration=thumbDragUtils.endTime.valueOf()- 2281thumbDragUtils.startTime.valueOf();var distanceXnew=thumbDragUtils.cords.endX-thumbDragUtils.cords.startX;var speedX=Math.abs(distanceXnew)/touchDuration;if(speedX>0.15&&thumbDragUtils.endTime.valueOf()-thumbDragUtils.touchMoveTime<30){speedX+=1;if(speedX>2){speedX+=1;} 2282speedX=speedX+ 2283speedX*(Math.abs(distanceXnew)/this.thumbOuterWidth);this.$lgThumb.css('transition-duration',Math.min(speedX-1,2)+'settings');distanceXnew=distanceXnew*speedX;this.translateX=this.getPossibleTransformX(this.translateX-distanceXnew);this.setTranslate(this.translateX);} 2284else{this.translateX=thumbDragUtils.newTranslateX;} 2285if(Math.abs(thumbDragUtils.cords.endX-thumbDragUtils.cords.startX)<this.settings.thumbnailSwipeThreshold){this.thumbClickable=true;} 2286return thumbDragUtils;};Thumbnail.prototype.getThumbHtml=function(thumb,index,alt){var slideVideoInfo=this.core.galleryItems[index].__slideVideoInfo||{};var thumbImg,altTh=this.core.galleryItems[index].subHtml,altApp='';
2286if(slideVideoInfo.youtube){if(this.settings.loadYouTubeThumbnail){thumbImg='//img.youtube.com/vi/'+ 2287slideVideoInfo.youtube[1]+'/'+ 2288this.settings.youTubeThumbSize+'.jpg';} 2289else{thumbImg=thumb;}} 2290else{thumbImg=thumb;} 2291if(altTh){altTh=altTh.replace(/<\/?[^>]+(>|$)/g,"");altApp='alt=\"'+altTh+' \" ';}else if(typeof alt!=='undefined'){altApp='alt=\"'+alt+' \" ';} 2292if(thumbImg){return"<div data-lg-item-id=\""+index+"\" class=\"lg-thumb-item "+(index===this.core.index?' active':'')+"\" \n style=\"width:"+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+";\n margin-right: "+this.settings.thumbMargin+"px;\">\n <img data-lg-item-id=\""+index+"\" "+altApp+"src=\""+thumbImg+"\" />\n </div>";}else{return"<div data-lg-item-id=\""+index+"\" class=\"lg-thumb-item "+(index===this.core.index?' active':'')+"\" \n style=\"width:"+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+";\n margin-right: "+this.settings.thumbMargin+"px;\">\n </div>";}};Thumbnail.prototype.getThumbItemHtml=function(items){var thumbList='';for(var i=0;i<items.length;i++){thumbList+=this.getThumbHtml(items[i].thumb,i,items[i].alt);} 2293return thumbList;};Thumbnail.prototype.setThumbItemHtml=function(items){var thumbList=this.getThumbItemHtml(items);this.$lgThumb.html(thumbList);};Thumbnail.prototype.setAnimateThumbStyles=function(){if(this.settings.animateThumb){this.core.outer.addClass('lg-animate-thumb');}};Thumbnail.prototype.manageActiveClassOnSlideChange=function(){var _this=this;this.core.LGel.on(lGEvents.beforeSlide,function(event){var $thumb=_this.core.outer.find('.lg-thumb-item');var index=event.detail.index;$thumb.removeClass('active');$thumb.eq(index).addClass('active');});};Thumbnail.prototype.toggleThumbBar=function(){var _this=this;if(this.settings.toggleThumb){this.core.outer.addClass('lg-can-toggle');this.core.$toolbar.append('<button type="button" aria-label="'+ 2294this.settings.thumbnailPluginStrings['toggleThumbnails']+'" class="lg-toggle-thumb lg-icon"></button>');this.core.outer.find('.lg-toggle-thumb').first().on('click.lg',function(){_this.core.outer.toggleClass('lg-components-open');});}};Thumbnail.prototype.thumbKeyPress=function(){var _this=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened||!_this.settings.toggleThumb) 2295return;if(e.keyCode===38){e.preventDefault();_this.core.outer.addClass('lg-components-open');} 2296else if(e.keyCode===40){e.preventDefault();_this.core.outer.removeClass('lg-components-open');}});};Thumbnail.prototype.destroy=function(){if(this.settings.thumbnail){this.$LG(window).off(".lg.thumb.global"+this.core.lgId);this.core.LGel.off('.lg.thumb');this.core.LGel.off('.thumb');this.$thumbOuter.remove();this.core.outer.removeClass('lg-has-thumb');}};return Thumbnail;}());return Thumbnail;}))); 2297/*! 2298 * lightgallery | 2.5.0 | June 13th 2022 2299 * http://www.lightgalleryjs.com/ 2300 * Copyright (c) 2020 Sachin Neravath; 2301 * @license GPLv3 2302 */ 2303(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.lgVideo=factory());}(this,(function(){'use strict'; 2304/*! ***************************************************************************** 2305 Copyright (c) Microsoft Corporation. 2306 2307 Permission to use, copy, modify, and/or distribute this software for any 2308 purpose with or without fee is hereby granted. 2309 2310 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2311 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2312 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2313 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2314 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2315 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2316 PERFORMANCE OF THIS SOFTWARE. 2317 ***************************************************************************** */ 2318var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];} 2319return t;};return __assign.apply(this,arguments);};var videoSettings={autoplayFirstVideo:true,youTubePlayerParams:false,vimeoPlayerParams:false,wistiaPlayerParams:false,gotoNextSlideOnVideoEnd:true,autoplayVideoOnSlide:false,videojs:false,videojsTheme:'',videojsOptions:{},};var lGEvents={afterAppendSlide:'lgAfterAppendSlide',init:'lgInit',hasVideo:'lgHasVideo',containerResize:'lgContainerResize',updateSlides:'lgUpd
2319ateSlides',afterAppendSubHtml:'lgAfterAppendSubHtml',beforeOpen:'lgBeforeOpen',afterOpen:'lgAfterOpen',slideItemLoad:'lgSlideItemLoad',beforeSlide:'lgBeforeSlide',afterSlide:'lgAfterSlide',posterClick:'lgPosterClick',dragStart:'lgDragStart',dragMove:'lgDragMove',dragEnd:'lgDragEnd',beforeNextSlide:'lgBeforeNextSlide',beforePrevSlide:'lgBeforePrevSlide',beforeClose:'lgBeforeClose',afterClose:'lgAfterClose',rotateLeft:'lgRotateLeft',rotateRight:'lgRotateRight',flipHorizontal:'lgFlipHorizontal',flipVertical:'lgFlipVertical',autoplay:'lgAutoplay',autoplayStart:'lgAutoplayStart',autoplayStop:'lgAutoplayStop',};var param=function(obj){return Object.keys(obj).map(function(k){return encodeURIComponent(k)+'='+encodeURIComponent(obj[k]);}).join('&');};var getVimeoURLParams=function(defaultParams,videoInfo){if(!videoInfo||!videoInfo.vimeo) 2320return'';var urlParams=videoInfo.vimeo[2]||'';var defaultPlayerParams=defaultParams&&Object.keys(defaultParams).length!==0?'&'+param(defaultParams):'';var urlWithHash=videoInfo.vimeo[0].split('/').pop()||'';var urlWithHashWithParams=urlWithHash.split('?')[0]||'';var hash=urlWithHashWithParams.split('#')[0];var isPrivate=videoInfo.vimeo[1]!==hash;if(isPrivate){urlParams=urlParams.replace("/"+hash,'');} 2321urlParams=urlParams[0]=='?'?'&'+urlParams.slice(1):urlParams||'';var vimeoPlayerParams='?autoplay=0';if(videoInfo.autoplay!==''){vimeoPlayerParams=vimeoPlayerParams.replace(new RegExp('([?&])autoplay=(.*?)(&|$)'),'$1$3');vimeoPlayerParams=vimeoPlayerParams.replace(new RegExp('([?&])autoplay(&|$)'),'$1$2');}else{if(typeof SiteParameters!=='undefined'&&typeof SiteParameters.vimeoPlayerParams!=='undefined'&&SiteParameters.vimeoPlayerParams!==''){vimeoPlayerParams=SiteParameters.vimeoPlayerParams;}} 2322if(videoInfo.muted!==''){vimeoPlayerParams+='&muted='+(videoInfo.muted==='yes');}else{if(urlParams.indexOf('muted=')<0&&vimeoPlayerParams.indexOf('muted=')<0){vimeoPlayerParams+='&muted=1';}} 2323vimeoPlayerParams+=(isPrivate?"&h="+hash:'')+defaultPlayerParams+urlParams;return vimeoPlayerParams;};var Video=(function(){function Video(instance){this.core=instance;this.settings=__assign(__assign({},videoSettings),this.core.settings);return this;} 2324Video.prototype.init=function(){var _this=this;this.core.LGel.on(lGEvents.hasVideo+".video",this.onHasVideo.bind(this));this.core.LGel.on(lGEvents.posterClick+".video",function(){var $el=_this.core.getSlideItem(_this.core.index);_this.loadVideoOnPosterClick($el);});this.core.LGel.on(lGEvents.slideItemLoad+".video",this.onSlideItemLoad.bind(this));this.core.LGel.on(lGEvents.beforeSlide+".video",this.onBeforeSlide.bind(this));this.core.LGel.on(lGEvents.afterSlide+".video",this.onAfterSlide.bind(this));};Video.prototype.onSlideItemLoad=function(event){var _this=this;var _a=event.detail,isFirstSlide=_a.isFirstSlide,index=_a.index;if(this.settings.autoplayFirstVideo&&isFirstSlide&&index===this.core.index){setTimeout(function(){_this.loadAndPlayVideo(index);},200);} 2325if(!isFirstSlide&&this.settings.autoplayVideoOnSlide&&index===this.core.index){setTimeout(function(){_this.loadAndPlayVideo(index);},500);}};Video.prototype.onHasVideo=function(event){var _a=event.detail,index=_a.index,src=_a.src,html5Video=_a.html5Video,hasPoster=_a.hasPoster;if(!hasPoster){this.appendVideos(this.core.getSlideItem(index),{src:src,addClass:'lg-object',index:index,html5Video:html5Video,autoplay:event.target.getAttribute('data-lb-autoplay'),muted:event.target.getAttribute('data-lb-muted'),});this.gotoNextSlideOnVideoEnd(src,index);}};Video.prototype.onBeforeSlide=function(event){if(this.core.lGalleryOn){var prevIndex=event.detail.prevIndex;this.pauseVideo(prevIndex);} 2326var _a=event.detail,index=_a.index;var $slide=this.core.getSlideItem(index);var iframe=$slide.selector.querySelector('iframe');if(iframe!=null){var data_play=iframe.getAttribute('data-autoplay');if(typeof data_play!=='undefined'&&data_play==='1'){this.loadAndPlayVideo(index);var videoInfo=this.core.galleryItems[index].__slideVideoInfo||{},$videoElement=this.core.getSlideItem(index).find('.lg-video-object').first();if(videoInfo.vimeo){var vimeoPlayer=new Vimeo.Player($videoElement.get());vimeoPlayer.on('play',function(){vimeoPlayer.setCurrentTime(0);});}else if(videoInfo.youtube){try{$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"seekTo\",\"args\":[0, true]}",'*');} 2327catch(e){console.warn(e);}}}}};Video.prototype.onAfterSlide=function(event){var _this=this;var _a=event.detail,index=_a.index,prevIndex=_a.prevIndex;var $slide=this.core.getSlideItem(index);if(this.settings.autoplayVideoOnSlide&&index!==prevIndex){if($slide.hasClass('lg-complete')){setTimeout(function(){_this.loadAndPlayVideo(index);},100);}}};Video.prototype.loadAndPlayVideo=function(index){var $slide=this.core.getSlideItem(index);var currentGalleryItem=this.core.galleryItems[index];if(currentGalleryItem.poster){this.loadVideoOnPosterClick($slide,true);} 2328else{var iframe=$slide.selector.querySelector('iframe');if(iframe!=null){var data_play=iframe.getAttribute('data-autoplay');if(typeof data_play!=='undefined'){if(data_play==='1'&&this.core.index==index){this.playVideo(index);}else{this.pauseVideo(index);}}}}};Video.prototype.playVideo=function(index){this.controlVideo(index,'play');};Video.prototype.pauseVideo=function(index){this.controlVideo(index,'pause');};Video.prototype.getVideoHtml=function(src,addClass,index,html5Video,autoplay,muted){var video='';var videoInfo=this.core.galleryItems[index].__slideVideoInfo||{};var currentGalleryItem=this.core.galleryItems[index];var videoTitle=currentGalleryItem.title||currentGalleryItem.alt;videoTitle=videoTitle?'title="'+videoTitle+'"':'';var commonIframeProps="allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";if(videoInfo.youtube){var videoId='lg-youtube'+index;var slideUrlParams=videoInfo.youtube[2]?videoInfo.youtube[2]+'&':'';
2328var youTubePlayerParams="?"+slideUrlParams+"wmode=opaque&enablejsapi=1";if((slideUrlParams.indexOf('autoplay=')<0&&youTubePlayerParams.indexOf('autoplay=')<0)){youTubePlayerParams+='&autoplay=0';} 2329if(slideUrlParams.indexOf('mute=')<0&&youTubePlayerParams.indexOf('mute=')<0){youTubePlayerParams+='&mute=1';} 2330var data_video='';if(autoplay!==''){youTubePlayerParams=youTubePlayerParams.replace(new RegExp('([?&])autoplay=(.*?)(&|$)'),'$1$3');youTubePlayerParams=youTubePlayerParams.replace(new RegExp('([?&])autoplay'),'$1');data_video=' data-autoplay="'+(autoplay==='yes'?1:0)+'"';} 2331youTubePlayerParams=youTubePlayerParams.replace(new RegExp('([?&])mute=(.*?)(&|$)'),'$1$3');youTubePlayerParams=youTubePlayerParams.replace('??','?');var playerParams=youTubePlayerParams+ 2332(this.settings.youTubePlayerParams?'&'+param(this.settings.youTubePlayerParams):'');var nocookie=typeof SiteParameters.uncode_nocookie!=='undefined'?SiteParameters.uncode_nocookie:'';video="<iframe allow=\"autoplay\""+data_video+" id="+videoId+" class=\"lg-video-object lg-youtube "+addClass+"\" "+videoTitle+" src=\"//www.youtube"+nocookie+".com/embed/"+(videoInfo.youtube[1]+playerParams)+"\" "+commonIframeProps+"></iframe>";var tag=document.createElement('script');tag.src="//www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);var ytIframeplayer,setMute=muted==='yes'?0:100;window.onYouTubePlayerAPIReady=function(){ytIframeplayer=new YT.Player(videoId,{videoId:videoInfo.youtube[1],events:{'onReady':function(event){event.target.setVolume(setMute);}}});}} 2333else if(videoInfo.vimeo){var videoId='lg-vimeo'+index;videoInfo.autoplay=autoplay;videoInfo.muted=muted;var playerParams=getVimeoURLParams(this.settings.vimeoPlayerParams,videoInfo);var data_video='';if(autoplay!==''){data_video=' data-autoplay="'+(autoplay==='yes'?1:0)+'"';} 2334video="<iframe allow=\"autoplay\""+data_video+" id="+videoId+" class=\"lg-video-object lg-vimeo "+addClass+"\" "+videoTitle+" src=\"//player.vimeo.com/video/"+(videoInfo.vimeo[1]+playerParams)+"\" "+commonIframeProps+"></iframe>";} 2335else if(videoInfo.wistia){var wistiaId='lg-wistia'+index;var playerParams=param(this.settings.wistiaPlayerParams);playerParams=playerParams?'?'+playerParams:'';video="<iframe allow=\"autoplay\" id=\""+wistiaId+"\" src=\"//fast.wistia.net/embed/iframe/"+(videoInfo.wistia[4]+playerParams)+"\" "+videoTitle+" class=\"wistia_embed lg-video-object lg-wistia "+addClass+"\" name=\"wistia_embed\" "+commonIframeProps+"></iframe>";} 2336else if(videoInfo.html5){var html5VideoMarkup='';for(var i=0;i<html5Video.source.length;i++){html5VideoMarkup+="<source src=\""+html5Video.source[i].src+"\" type=\""+html5Video.source[i].type+"\">";} 2337if(html5Video.tracks){var _loop_1=function(i){var trackAttributes='';var track=html5Video.tracks[i];Object.keys(track||{}).forEach(function(key){trackAttributes+=key+"=\""+track[key]+"\" ";});html5VideoMarkup+="<track "+trackAttributes+">";};for(var i=0;i<html5Video.tracks.length;i++){_loop_1(i);}} 2338var html5VideoAttrs_1='';var videoAttributes_1=html5Video.attributes||{};Object.keys(videoAttributes_1||{}).forEach(function(key){html5VideoAttrs_1+=key+"=\""+videoAttributes_1[key]+"\" ";});video="<video class=\"lg-video-object lg-html5 "+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+' ':'')+" "+(this.settings.videojs?' video-js':'')+"\" "+html5VideoAttrs_1+">\n "+html5VideoMarkup+"\n Your browser does not support HTML5 video.\n </video>";} 2339return video;};Video.prototype.appendVideos=function(el,videoParams){var _a;var videoHtml=this.getVideoHtml(videoParams.src,videoParams.addClass,videoParams.index,videoParams.html5Video,videoParams.autoplay,videoParams.muted);el.find('.lg-video-cont').append(videoHtml);var $videoElement=el.find('.lg-video-object').first();if(videoParams.html5Video){$videoElement.on('mousedown.lg.video',function(e){e.stopPropagation();});} 2340if(this.settings.videojs&&((_a=this.core.galleryItems[videoParams.index].__slideVideoInfo)===null||_a===void 0?void 0:_a.html5)){try{return videojs($videoElement.get(),this.settings.videojsOptions);} 2341catch(e){console.warn('lightGallery:- Make sure you have included videojs');}}};Video.prototype.gotoNextSlideOnVideoEnd=function(src,index){var _this=this;var $videoElement=this.core.getSlideItem(index).find('.lg-video-object').first();var videoInfo=this.core.galleryItems[index].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd){if(videoInfo.html5){$videoElement.on('ended',function(){_this.core.goToNextSlide();});} 2342else if(videoInfo.vimeo){try{new Vimeo.Player($videoElement.get()).on('ended',function(){_this.core.goToNextSlide();});} 2343catch(e){console.warn('lightGallery:- Make sure you have included //github.com/vimeo/player.js');}} 2344else if(videoInfo.wistia){try{window._wq=window._wq||[];
2344window._wq.push({id:$videoElement.attr('id'),onReady:function(video){video.bind('end',function(){_this.core.goToNextSlide();});},});} 2345catch(e){console.warn('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');}}}};Video.prototype.controlVideo=function(index,action){var $videoElement=this.core.getSlideItem(index).find('.lg-video-object').first();var videoInfo=this.core.galleryItems[index].__slideVideoInfo||{};if(!$videoElement.get()) 2346return;if(videoInfo.youtube){try{$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\""+action+"Video\",\"args\":\"\"}",'*');} 2347catch(e){console.warn("lightGallery:- "+e);}} 2348else if(videoInfo.vimeo){try{new Vimeo.Player($videoElement.get())[action]();} 2349catch(e){console.warn('lightGallery:- Make sure you have included //github.com/vimeo/player.js');}} 2350else if(videoInfo.html5){if(this.settings.videojs){try{videojs($videoElement.get())[action]();} 2351catch(e){console.warn('lightGallery:- Make sure you have included videojs');}} 2352else{$videoElement.get()[action]();}} 2353else if(videoInfo.wistia){try{window._wq=window._wq||[];
2353window._wq.push({id:$videoElement.attr('id'),onReady:function(video){video[action]();},});} 2354catch(e){console.warn('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');}}};Video.prototype.loadVideoOnPosterClick=function($el,forcePlay){var _this=this;if(!$el.hasClass('lg-video-loaded')){if(!$el.hasClass('lg-has-video')){$el.addClass('lg-has-video');var _html=void 0;var _src=this.core.galleryItems[this.core.index].src;var video=this.core.galleryItems[this.core.index].video;if(video){_html=typeof video==='string'?JSON.parse(video):video;} 2355var videoJsPlayer_1=this.appendVideos($el,{src:_src,addClass:'',index:this.core.index,html5Video:_html,});this.gotoNextSlideOnVideoEnd(_src,this.core.index);var $tempImg=$el.find('.lg-object').first().get();$el.find('.lg-video-cont').first().append($tempImg);$el.addClass('lg-video-loading');videoJsPlayer_1&&videoJsPlayer_1.ready(function(){videoJsPlayer_1.on('loadedmetadata',function(){_this.onVideoLoadAfterPosterClick($el,_this.core.index);});});$el.find('.lg-video-object').first().on('load.lg error.lg loadedmetadata.lg',function(){setTimeout(function(){_this.onVideoLoadAfterPosterClick($el,_this.core.index);},50);});} 2356else{this.playVideo(this.core.index);}} 2357else if(forcePlay){this.playVideo(this.core.index);}};Video.prototype.onVideoLoadAfterPosterClick=function($el,index){$el.addClass('lg-video-loaded');this.playVideo(index);};Video.prototype.destroy=function(){this.core.LGel.off('.lg.video');this.core.LGel.off('.video');};return Video;}());return Video;}))); 2358/*! @vimeo/player v2.17.1 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */ 2359!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function c(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function s(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(c(i))return i.replace("http:","https:");if(r)throw new TypeError("â".concat(r,"â is not a valid video id."));throw new TypeError("â".concat(i,"â is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o,a,u,l,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(l(this,"_id","_WeakMap_"+v()+"."+v()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function h(e,t){if(!m(e)||!a.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function v(){return Math.random().toString().substring(2)}function m(e){return Object(e)===e}(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:f).WeakMap||(a=Object.prototype.hasOwnProperty,u=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),l=function(e,t,n){u?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n},o.WeakMap=(l(d.prototype,"delete",function(e){if(h(this,"delete"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),l(d.prototype,"get",function(e){if(h(this,"get"),m(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),l(d.prototype,"has",function(e){if(h(this,"has"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),l(d.prototype,"set",function(e,t){if(h(this,"set"),!m(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:l(e,this._id,[e,t]),this}),l(d,"_polyfill",!0),d));var p,y=(function(e){var t,n,r;r=function(){var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function l(e,t){this.fn=e,this.self=t,this.next=void 0}function c(e,t){r.add(e,t),n=n||u(r.drain)}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)!function(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=s(e))?c(function(){var t=new m(r);try{n.call(e,function(){d.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(r.msg=e,r.state=1,0<r.chain.length&&c(f,r))}catch(e){h.call(new m(r),e)}}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&c(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function m(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new p(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&c(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){d.call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var g=t({},"constructor",y,!(r={add:function(e,t){a=new l(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(y.prototype=g,"__NPO__",0,!1),t(y,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(y,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(y,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(y,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),y},(n=f)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(p={exports:{}}
2359),p.exports),g=new WeakMap;function w(e,t,n){var r=g.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),g.set(e.element,r)}function b(e,t){return(g.get(e.element)||{})[t]||[]}function k(e,t,n){var r=g.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],g.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),g.set(e.element,r),r[t]&&0===r[t].length}function E(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function T(e,t,n){var r,o;e.element.contentWindow&&e.element.contentWindow.postMessage&&(r={method:t},void 0!==n&&(r.value=n),8<=(o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")))&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin))}function P(n,r){var t,e,o=[];(r=E(r)).event?("error"===r.event&&b(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),k(n,r.data.method,e)}),o=b(n,"event:".concat(r.event)),t=r.data):!r.method||(e=function(e,t){var n=b(e,t);if(n.length<1)return!1;var r=n.shift();return k(e,t,r),r}(n,r.method))&&(o.push(e),t=r.value),o.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var M=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function _(r,e){var t=1<arguments.length&&void 0!==e?e:{};return M.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function N(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function F(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!c(i))throw new TypeError("â".concat(i,"â is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return N(e,u),void n(new Error("â".concat(i,"â is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("â".concat(i,"â is not embeddable.")));else n(new Error("â".concat(i,"â was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}var x,C,j,A=new WeakMap,S=new WeakMap,q={},Player=function(){function Player(u){var e,t,l=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"===u.nodeName||(t=u.querySelector("iframe"))&&(u=t),"IFRAME"===u.nodeName&&!c(u.getAttribute("src")||""))throw new Error("The player element passed isnât a Vimeo embed.");if(A.has(u))return A.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r,o=new y(function(i,a){var e;l._onMessage=function(e){if(c(e.origin)&&l.element.contentWindow===e.source){"*"===l.origin&&(l.origin=e.origin);var t=E(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}
vendor: 5,252 bytes, line 2359
2359var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return l.element.setAttribute("data-ready","true"),void i();P(l,t)}},l._window.addEventListener("message",l._onMessage),"IFRAME"!==l.element.nodeName&&F(s(e=_(u,n)),e,u).then(function(e){var t,n,r,o=N(e,u);return l.element=o,l._originalElement=u,t=u,n=o,r=g.get(t),g.set(n,r),g.delete(t),A.set(l.element,l),e}).catch(a)});return S.set(this,o),A.set(this.element,this),"IFRAME"===this.element.nodeName&&T(this,"ping"),q.isEnabled&&(r=function(){return q.exit()},this.fullscreenchangeHandler=function(){(q.isFullscreen?w:k)(l,"event:exitFullscreen",r),l.ready().then(function(){T(l,"fullscreenchange",q.isFullscreen)})},q.on("fullscreenchange",this.fullscreenchangeHandler)),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new y(function(e,t){return r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new y(function(e,t){return n=i(n,"get"),r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new y(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){w(o,n,{resolve:e,reject:t}),T(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===b(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),w(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");k(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=S.get(this)||new y(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return y.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return q.isEnabled?q.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return q.isEnabled?q.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return q.isEnabled?y.resolve(q.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var n=this;return new y(function(e){var t;S.delete(n),A.delete(n.element),n._originalElement&&(A.delete(n._originalElement),n._originalElement.removeAttribute("data-vimeo-initialized")),n.element&&"IFRAME"===n.element.nodeName&&n.element.parentNode&&(n.element.parentNode.parentNode&&n._originalElement&&n._originalElement!==n.element.parentNode?n.element.parentNode.parentNode.removeChild(n.element.parentNode):n.element.parentNode.removeChild(n.element)),n.element&&"DIV"===n.element.nodeName&&n.element.parentNode&&(n.element.removeAttribute("data-vimeo-initialized"),(t=n.element.querySelector("iframe"))&&t.parentNode&&(t.parentNode.parentNode&&n._originalElement&&n._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))),n._window.removeEventListener("message",n._onMessage),q.isEnabled&&q.off("fullscreenchange",n.fullscreenchangeHandler),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}
2359},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(x=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),C={fullscreenchange:x.fullscreenchange,fullscreenerror:x.fullscreenerror},j={request:function(o){return new Promise(function(e,t){function n(){j.off("fullscreenchange",n),e()}j.on("fullscreenchange",n);var r=(o=o||document.documentElement)[x.requestFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},exit:function(){return new Promise(function(t,e){var n,r;j.isFullscreen?(n=function e(){j.off("fullscreenchange",e),t()},j.on("fullscreenchange",n),(r=document[x.exitFullscreen]())instanceof Promise&&r.then(n).catch(e)):t()})},on:function(e,t){var n=C[e];n&&document.addEventListener(n,t)},off:function(e,t){var n=C[e];n&&document.removeEventListener(n,t)}},Object.defineProperties(j,{isFullscreen:{get:function(){return Boolean(document[x.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[x.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[x.fullscreenEnabled])}}}),q=j,function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=_(t);F(s(e),e,t).then(function(e){return N(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}}
2359))}(),function(e){var u=0<arguments.length&&void 0!==e?e:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",function(e){if(c(e.origin)){var t=E(e.data);if(t&&"ready"===t.event)for(var n,r=u.querySelectorAll("iframe"),o=0;o<r.length;o++){var i=r[o],a=i.contentWindow===e.source;n=i.src,/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(n)&&a&&new Player(i).callMethod("appendVideoMetadata",window.location.href)}}}))}()),Player});;(function($,window,document,undefined){function Owl(element,options){this.settings=null;this.options=$.extend({},Owl.Defaults,options);this.$element=$(element);this._handlers={};this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._widths=[];this._invalidated={};this._pipe=[];this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null};this._states={current:{},tags:{'initializing':['busy'],'animating':['busy'],'dragging':['interacting']}};$.each(['onResize','onThrottledResize'],$.proxy(function(i,handler){this._handlers[handler]=$.proxy(this[handler],this);},this));$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key.charAt(0).toLowerCase()+key.slice(1)]=new plugin(this);},this));$.each(Owl.Workers,$.proxy(function(priority,worker){this._pipe.push({'filter':worker.filter,'run':$.proxy(worker.run,this)});},this));this.setup();this.initialize();} 2360Owl.Defaults={items:3,loop:false,center:false,rewind:false,mouseDrag:true,touchDrag:true,pullDrag:true,freeDrag:false,margin:0,stagePadding:0,merge:false,mergeFit:true,autoWidth:false,startPosition:0,rtl:false,smartSpeed:250,fluidSpeed:false,dragEndSpeed:false,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,fallbackEasing:'swing',info:false,nestedItemSelector:false,itemSelector:false,itemElement:'div',stageElement:'div',refreshClass:'owl-refresh',loadedClass:'owl-loaded',loadingClass:'owl-loading',rtlClass:'owl-rtl',responsiveClass:'owl-responsive',dragClass:'owl-drag',itemClass:'owl-item',stageClass:'owl-stage',stageOuterClass:'owl-stage-outer',grabClass:'owl-grab'};Owl.Width={Default:'default',Inner:'inner',Outer:'outer'};Owl.Type={Event:'event',State:'state'};Owl.Plugins={};Owl.Workers=[{filter:['width','settings'],run:function(){this._width=(this.$element.closest('.px-gutter').length)?12*Math.ceil(this.$element.width()/12):this.$element.width();}},{filter:['width','items','settings'],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)];}},{filter:['items','settings'],run:function(){this.$stage.children('.cloned').remove();}},{filter:['width','items','settings'],run:function(cache){var margin=this.settings.margin||'',grid=!this.settings.autoWidth,rtl=this.settings.rtl,css={'width':'auto','margin-left':rtl?margin:'','margin-right':rtl?'':margin};!grid&&this.$stage.children().css(css);cache.css=css;}},{filter:['width','items','settings'],run:function(cache){var width=Math.round((this.width()/this.settings.items).toFixed(3)-this.settings.margin),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[];cache.items={merge:false,width:width};while(iterator--){merge=this._mergers[iterator];merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge;cache.items.merge=merge>1||cache.items.merge;widths[iterator]=!grid?this._items[iterator].width():width*merge;} 2361this._widths=widths;}},{filter:['items','settings'],run:function(){var clones=[],items=this._items,settings=this.settings,view=Math.max(settings.items*2,4),size=Math.ceil(items.length/2)*2,repeat=settings.loop&&items.length?settings.rewind?view:Math.max(view,size):0,append='',prepend='';repeat/=2;while(repeat--){clones.push(this.normalize(clones.length/2,true));append=append+items[clones[clones.length-1]][0].outerHTML;clones.push(this.normalize(items.length-1-(clones.length-1)/2,true));prepend=items[clones[clones.length-1]][0].outerHTML+prepend;} 2362this._clones=clones;$(append).addClass('cloned').appendTo(this.$stage);$(prepend).addClass('cloned').prependTo(this.$stage);}},{filter:['width','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,size=this._clones.length+this._items.length,iterator=-1,previous=0,current=0,coordinates=[];
vendor: 15,707 bytes, lines 2362-2409
2362while(++iterator<size){previous=coordinates[iterator-1]||0;current=this._widths[this.relative(iterator)]+this.settings.margin;coordinates.push(previous+current*rtl);} 2363this._coordinates=coordinates;}},{filter:['width','items','settings'],run:function(){var stagePadding=(this._width<480&&this.settings.stagePadding>0)?41:(this._width*this.settings.stagePadding)/200,padding=stagePadding,coordinates=this._coordinates,css={'width':Math.ceil(Math.abs(coordinates[coordinates.length-1]))+padding*2,'padding-left':padding||'','padding-right':padding||''};this.$stage.css(css);}},{filter:['width','items','settings'],run:function(cache){var iterator=this._coordinates.length,grid=!this.settings.autoWidth,items=this.$stage.children();if(grid&&cache.items.merge){while(iterator--){cache.css.width=this._widths[this.relative(iterator)];items.eq(iterator).css(cache.css);}}else if(grid){cache.css.width=cache.items.width;items.css(cache.css);}}},{filter:['items'],run:function(){this._coordinates.length<1&&this.$stage.removeAttr('style');}},{filter:['width','items','settings'],run:function(cache){cache.current=cache.current?this.$stage.children().index(cache.current):0;cache.current=Math.max(this.minimum(),Math.min(this.maximum(),cache.current));this.reset(cache.current);}},{filter:['position'],run:function(){this.animate(this.coordinates(this._current));}},{filter:['width','position','items','settings'],run:function(){var stagePadding=(this._width<480&&this.settings.stagePadding>0)?41:(this._width*this.settings.stagePadding)/200,rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++){inner=this._coordinates[i-1]||0;outer=Math.abs(this._coordinates[i])+padding*rtl;if((this.op(inner,'<=',begin)&&(this.op(inner,'>',end)))||(this.op(outer,'<',begin)&&this.op(outer,'>',end))){matches.push(i);}} 2364this.$stage.children('.active').removeClass('active');this.$stage.children(':eq('+matches.join('), :eq(')+')').addClass('active');if(this.settings.center){this.$stage.children('.center').removeClass('center');this.$stage.children().eq(this.current()).addClass('center');}}}];Owl.prototype.initialize=function(){this.enter('initializing');this.trigger('initialize');this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl);if(this.settings.autoWidth&&!this.is('pre-loading')){var imgs,nestedSelector,width;imgs=this.$element.find('img');nestedSelector=this.settings.nestedItemSelector?'.'+this.settings.nestedItemSelector:undefined;width=this.$element.children(nestedSelector).width();if(imgs.length&&width<=0){this.preloadAutoWidthImages(imgs);}} 2365this.$element.addClass(this.options.loadingClass);this.$stage=$('<'+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>');if(this.settings.itemSelector){this.$element.prepend(this.$stage.parent());this.replace(this.$element.find(' > '+this.settings.itemSelector).not(this.$stage.parent()));}else{this.$element.append(this.$stage.parent());this.replace(this.$element.children().not(this.$stage.parent()));} 2366if(this.$element.is(':visible')){this.refresh();}else{this.invalidate('width');} 2367this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass);this.registerEventHandlers();this.leave('initializing');this.trigger('initialized');};Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;if(!overwrites){settings=$.extend({},this.options);}else{$.each(overwrites,function(breakpoint){if(breakpoint<=viewport&&breakpoint>match){match=Number(breakpoint);}});settings=$.extend({},this.options,overwrites[match]);delete settings.responsive;if(settings.responsiveClass){this.$element.attr('class',this.$element.attr('class').replace(new RegExp('('+this.options.responsiveClass+'-)\\S+\\s','g'),'$1'+match));}} 2368if(this.settings===null||this._breakpoint!==match){this.trigger('change',{property:{name:'settings',value:settings}});this._breakpoint=match;this.settings=settings;this.invalidate('settings');this.trigger('changed',{property:{name:'settings',value:this.settings}});}};Owl.prototype.optionsLogic=function(){if(this.settings.autoWidth){this.settings.stagePadding=false;this.settings.merge=false;}};Owl.prototype.prepare=function(item,index){var event=this.trigger('prepare',{content:item});if(!event.data){event.data=$('<'+this.settings.itemElement+'/>').addClass(this.options.itemClass).attr('data-index',index+1).append(item)} 2369this.trigger('prepared',{content:event.data});return event.data;};Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n){if(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0){this._pipe[i].run(cache);} 2370i++;} 2371this._invalidated={};!this.is('valid')&&this.enter('valid');};Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;var stagePadding=(this._width<480&&this.settings.stagePadding>0)?41:(this._width*this.settings.stagePadding)/200;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-stagePadding*2+this.settings.margin;}};Owl.prototype.refresh=function(){this.enter('refreshing');this.trigger('refresh');this.setup();this.optionsLogic();this.$element.addClass(this.options.refreshClass);this.update();this.$element.removeClass(this.options.refreshClass);this.leave('refreshing');this.trigger('refreshed');};Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer);this.resizeTimer=window.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate);};Owl.prototype.onResize=function(){if(!this._items.length){return false;} 2372if(this._width===this.$element.width()){return false;} 2373if(!this.$element.is(':visible')){return false;} 2374this.enter('resizing');if(this.trigger('resize').isDefaultPrevented()){this.leave('resizing');return false;} 2375this.invalidate('width');this.refresh();this.leave('resizing');this.trigger('resized');};Owl.prototype.registerEventHandlers=function(){if($.support.transition){this.$stage.on($.support.transition.end+'.owl.core',$.proxy(this.onTransitionEnd,this));} 2376if(this.settings.responsive!==false){this.on(window,'resize',this._handlers.onThrottledResize);} 2377if(this.settings.mouseDrag){this.$element.addClass(this.options.dragClass);this.$stage.on('mousedown.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('dragstart.owl.core selectstart.owl.core',function(){return false});} 2378if(this.settings.touchDrag){this.$stage.on('touchstart.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('touchcancel.owl.core',$.proxy(this.onDragEnd,this));}};Owl.prototype.onDragStart=function(event){var stage=null;if(event.which===3){return;} 2379if($.support.transform){stage=this.$stage.css('transform').replace(/.*\(|\)| /g,'').split(',');stage={x:stage[stage.length===16?12:4],y:stage[stage.length===16?13:5]};}else{stage=this.$stage.position();stage={x:this.settings.rtl?stage.left+this.$stage.width()-this.width()+this.settings.margin:stage.left,y:stage.top};} 2380if(this.is('animating')){$.support.transform?this.animate(stage.x):this.$stage.stop() 2381this.invalidate('position');} 2382this.$element.toggleClass(this.options.grabClass,event.type==='mousedown');this.speed(0);this._drag.time=new Date().getTime();this._drag.target=$(event.target);this._drag.stage.start=stage;this._drag.stage.current=stage;this._drag.pointer=this.pointer(event);$(document).on('mouseup.owl.core touchend.owl.core',$.proxy(this.onDragEnd,this));$(document).one('mousemove.owl.core touchmove.owl.core',$.proxy(function(event){var delta=this.difference(this._drag.pointer,this.pointer(event));$(document).on('mousemove.owl.core touchmove.owl.core',$.proxy(this.onDragMove,this));if(Math.abs(delta.x)<Math.abs(delta.y)&&this.is('valid')){return;} 2383event.preventDefault();this.enter('dragging');this.trigger('drag');},this));};Owl.prototype.onDragMove=function(event){var minimum=null,maximum=null,pull=null,delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this.difference(this._drag.stage.start,delta);if(!this.is('dragging')){return;} 2384event.preventDefault();if(this.settings.loop){minimum=this.coordinates(this.minimum());maximum=this.coordinates(this.maximum()+1)-minimum;stage.x=(((stage.x-minimum)%maximum+maximum)%maximum)+minimum;}else{minimum=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum());maximum=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum());pull=this.settings.pullDrag?-1*delta.x/5:0;stage.x=Math.max(Math.min(stage.x,minimum+pull),maximum+pull);} 2385this._drag.stage.current=stage;this.animate(stage.x);};Owl.prototype.onDragEnd=function(event){var delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this._drag.stage.current,direction=delta.x>0^this.settings.rtl?'left':'right';$(document).off('.owl.core');this.$element.removeClass(this.options.grabClass);if(delta.x!==0&&this.is('dragging')||!this.is('valid')){this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);this.current(this.closest(stage.x,delta.x!==0?direction:this._drag.direction));this.invalidate('position');this.update();this._drag.direction=direction;if(Math.abs(delta.x)>3||new Date().getTime()-this._drag.time>300){this._drag.target.one('click.owl.core',function(){return false;});}} 2386if(!this.is('dragging')){return;} 2387this.leave('dragging');this.trigger('dragged');};Owl.prototype.closest=function(coordinate,direction){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();if(!this.settings.freeDrag){$.each(coordinates,$.proxy(function(index,value){if(coordinate>value-pull&&coordinate<value+pull){position=index;}else if(this.op(coordinate,'<',value)&&this.op(coordinate,'>',coordinates[index+1]||value-width)){position=direction==='left'?index+1:index;} 2388return position===-1;},this));} 2389if(!this.settings.loop){if(this.op(coordinate,'>',coordinates[this.minimum()])){position=coordinate=this.minimum();}else if(this.op(coordinate,'<',coordinates[this.maximum()])){position=coordinate=this.maximum();}} 2390return position;};Owl.prototype.animate=function(coordinate){var animate=this.speed()>0;this.is('animating')&&this.onTransitionEnd();if(animate){this.enter('animating');this.trigger('translate');} 2391if($.support.transform3d&&$.support.transition){this.$stage.css({transform:'translate3d('+coordinate+'px,0px,0px)',transition:(this.speed()/1000)+'s'});}else if(animate){this.$stage.animate({left:coordinate+'px'},this.speed(),this.settings.fallbackEasing,$.proxy(this.onTransitionEnd,this));}else{this.$stage.css({left:coordinate+'px'});}};Owl.prototype.is=function(state){return this._states.current[state]&&this._states.current[state]>0;};Owl.prototype.current=function(position){if(position===undefined){return this._current;} 2392if(this._items.length===0){return undefined;} 2393position=this.normalize(position);if(this._current!==position){var event=this.trigger('change',{property:{name:'position',value:position}});if(event.data!==undefined){position=this.normalize(event.data);} 2394this._current=position;this.invalidate('position');this.trigger('changed',{property:{name:'position',value:this._current}});} 2395return this._current;};Owl.prototype.invalidate=function(part){if($.type(part)==='string'){this._invalidated[part]=true;this.is('valid')&&this.leave('valid');} 2396return $.map(this._invalidated,function(v,i){return i});};Owl.prototype.reset=function(position){position=this.normalize(position);if(position===undefined){return;} 2397this._speed=0;this._current=position;this.suppress(['translate','translated']);this.animate(this.coordinates(position));this.release(['translate','translated']);};Owl.prototype.normalize=function(position,relative){var n=this._items.length,m=relative?0:this._clones.length;if(!$.isNumeric(position)||n<1){position=undefined;}else if(position<0||position>=n+m){position=((position-m/2)%n+n)%n+m/2;} 2398return position;};Owl.prototype.relative=function(position){position-=this._clones.length/2;return this.normalize(position,true);};Owl.prototype.maximum=function(relative){var settings=this.settings,maximum=this._coordinates.length,boundary=Math.abs(this._coordinates[maximum-1])-this._width,i=-1,j;if(settings.loop){maximum=this._clones.length/2+this._items.length-1;}else if(settings.autoWidth||settings.merge){while(maximum-i>1){Math.abs(this._coordinates[j=maximum+i>>1])<boundary?i=j:maximum=j;}}else if(settings.center){maximum=this._items.length-1;}else{maximum=this._items.length-settings.items;} 2399if(relative){maximum-=this._clones.length/2;} 2400return Math.max(maximum,0);};Owl.prototype.minimum=function(relative){return relative?0:this._clones.length/2;};Owl.prototype.items=function(position){if(position===undefined){return this._items.slice();} 2401position=this.normalize(position,true);return this._items[position];};Owl.prototype.mergers=function(position){if(position===undefined){return this._mergers.slice();} 2402position=this.normalize(position,true);return this._mergers[position];};Owl.prototype.clones=function(position){var odd=this._clones.length/2,even=odd+this._items.length,map=function(index){return index%2===0?even+index/2:odd-(index+1)/2};if(position===undefined){return $.map(this._clones,function(v,i){return map(i)});} 2403return $.map(this._clones,function(v,i){return v===position?map(i):null});};Owl.prototype.speed=function(speed){if(speed!==undefined){this._speed=speed;} 2404return this._speed;};Owl.prototype.coordinates=function(position){var coordinate=null;if(position===undefined){return $.map(this._coordinates,$.proxy(function(coordinate,index){return this.coordinates(index);},this));} 2405if(this.settings.center){coordinate=this._coordinates[position];coordinate+=(this.width()-coordinate+(this._coordinates[position-1]||0))/2*(this.settings.rtl?-1:1);}else{coordinate=this._coordinates[position-1]||0;} 2406return coordinate;};Owl.prototype.duration=function(from,to,factor){return Math.min(Math.max(Math.abs(to-from),1),6)*Math.abs((factor||this.settings.smartSpeed));};Owl.prototype.to=function(position,speed){var current=this.current(),revert=null,distance=position-this.relative(current),direction=(distance>0)-(distance<0),items=this._items.length,minimum=this.minimum(),maximum=this.maximum();if(this.settings.loop){if(!this.settings.rewind&&Math.abs(distance)>items/2){distance+=direction*-1*items;} 2407position=current+distance;revert=((position-minimum)%items+items)%items+minimum;if(revert!==position&&revert-distance<=maximum&&revert-distance>0){current=revert-distance;position=revert;this.reset(current);}}else if(this.settings.rewind){maximum+=1;position=(position%maximum+maximum)%maximum;}else{position=Math.max(minimum,Math.min(maximum,position));} 2408this.speed(this.duration(current,position,speed));this.current(position);if(this.$element.is(':visible')){this.update();}};Owl.prototype.next=function(speed){speed=speed||false;this.to(this.relative(this.current())+1,speed);};Owl.prototype.prev=function(speed){speed=speed||false;this.to(this.relative(this.current())-1,speed);};Owl.prototype.onTransitionEnd=function(event){if(event!==undefined){event.stopPropagation();if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){return false;}} 2409this.leave('animating');this.trigger('translated');};Owl.prototype.viewport=function(){var width;if(this.options.responsiveBaseElement!==window){width=$(this.options.responsiveBaseElement).width();}else if(window.innerWidth){width=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){
vendor: 4,092 bytes, lines 2409-2416
2409width=document.documentElement.clientWidth;}else{throw'Can not detect viewport width.';} 2410return width;};Owl.prototype.replace=function(content){this.$stage.empty();this._items=[];if(content){content=(content instanceof jQuery)?content:$(content);} 2411if(this.settings.nestedItemSelector){content=content.find('.'+this.settings.nestedItemSelector);} 2412content.filter(function(){return this.nodeType===1;}).each($.proxy(function(index,item){item=this.prepare(item,index);this.$stage.append(item);this._items.push(item);this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1);},this));this.reset($.isNumeric(this.settings.startPosition)?this.settings.startPosition:0);this.invalidate('items');};Owl.prototype.add=function(content,position){var current=this.relative(this._current);position=position===undefined?this._items.length:this.normalize(position,true);content=content instanceof jQuery?content:$(content);this.trigger('add',{content:content,position:position});content=this.prepare(content,this._items[current].index());if(this._items.length===0||position===this._items.length){this._items.length===0&&this.$stage.append(content);this._items.length!==0&&this._items[position-1].after(content);this._items.push(content);this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge')*1||1);}else{this._items[position].before(content);this._items.splice(position,0,content);this._mergers.splice(position,0,content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge')*1||1);} 2413this._items[current]&&this.reset(this._items[current].index());this.invalidate('items');this.trigger('added',{content:content,position:position});};Owl.prototype.remove=function(position){position=this.normalize(position,true);if(position===undefined){return;} 2414this.trigger('remove',{content:this._items[position],position:position});this._items[position].remove();this._items.splice(position,1);this._mergers.splice(position,1);this.invalidate('items');this.trigger('removed',{content:null,position:position});};Owl.prototype.preloadAutoWidthImages=function(images){images.each($.proxy(function(i,element){this.enter('pre-loading');element=$(element);$(new Image()).one('load',$.proxy(function(e){element.attr('src',e.target.src);element.css('opacity',1);this.leave('pre-loading');!this.is('pre-loading')&&!this.is('initializing')&&this.refresh();},this)).attr('src',element.attr('src')||element.attr('data-src')||element.attr('data-src-retina'));},this));};Owl.prototype.destroy=function(){this.$element.off('.owl.core');this.$stage.off('.owl.core');$(document).off('.owl.core');if(this.settings.responsive!==false){window.clearTimeout(this.resizeTimer);this.off(window,'resize',this._handlers.onThrottledResize);} 2415for(var i in this._plugins){this._plugins[i].destroy();} 2416this.$stage.children('.cloned').remove();this.$stage.unwrap();this.$stage.children().contents().unwrap();this.$stage.children().unwrap();this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr('class',this.$element.attr('class').replace(new RegExp(this.options.responsiveClass+'-\\S+\\s','g'),'')).removeData('owl.carousel');};Owl.prototype.op=function(a,o,b){var rtl=this.settings.rtl;switch(o){case'<':return rtl?a>b:a<b;case'>':return rtl?a<b:a>b;case'>=':return rtl?a<=b:a>=b;case'<=':return rtl?a>=b:a<=b;default:break;}};Owl.prototype.on=function(element,event,listener,capture){if(element.addEventListener){element.addEventListener(event,listener,capture);}else if(element.attachEvent){element.attachEvent('on'+event,listener);}};Owl.prototype.off=function(element,event,listener,capture){if(element.removeEventListener){element.removeEventListener(event,listener,capture);}else if(element.detachEvent){element.detachEvent('on'+event,listener);}};Owl.prototype.trigger=function(name,data,namespace,state,enter){var status={item:{count:this._items.length,index:this.current()}}
vendor: 23,534 bytes, lines 2416-2464
2416,handler=$.camelCase($.grep(['on',name,namespace],function(v){return v}).join('-').toLowerCase()),event=$.Event([name,'owl',namespace||'carousel'].join('.').toLowerCase(),$.extend({relatedTarget:this},status,data));if(!this._supress[name]){$.each(this._plugins,function(name,plugin){if(plugin.onTrigger){plugin.onTrigger(event);}});this.register({type:Owl.Type.Event,name:name});this.$element.trigger(event);if(this.settings&&typeof this.settings[handler]==='function'){this.settings[handler].call(this,event);}} 2417return event;};Owl.prototype.enter=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){if(this._states.current[name]===undefined){this._states.current[name]=0;} 2418this._states.current[name]++;},this));};Owl.prototype.leave=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){this._states.current[name]--;},this));};Owl.prototype.register=function(object){if(object.type===Owl.Type.Event){if(!$.event.special[object.name]){$.event.special[object.name]={};} 2419if(!$.event.special[object.name].owl){var _default=$.event.special[object.name]._default;$.event.special[object.name]._default=function(e){if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){return _default.apply(this,arguments);} 2420return e.namespace&&e.namespace.indexOf('owl')>-1;};$.event.special[object.name].owl=true;}}else if(object.type===Owl.Type.State){if(!this._states.tags[object.name]){this._states.tags[object.name]=object.tags;}else{this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags);} 2421this._states.tags[object.name]=$.grep(this._states.tags[object.name],$.proxy(function(tag,i){return $.inArray(tag,this._states.tags[object.name])===i;},this));}};Owl.prototype.suppress=function(events){$.each(events,$.proxy(function(index,event){this._supress[event]=true;},this));};Owl.prototype.release=function(events){$.each(events,$.proxy(function(index,event){delete this._supress[event];},this));};Owl.prototype.pointer=function(event){var result={x:null,y:null};event=event.originalEvent||event||window.event;event=event.touches&&event.touches.length?event.touches[0]:event.changedTouches&&event.changedTouches.length?event.changedTouches[0]:event;if(event.pageX){result.x=event.pageX;result.y=event.pageY;}else{result.x=event.clientX;result.y=event.clientY;} 2422return result;};Owl.prototype.difference=function(first,second){return{x:first.x-second.x,y:first.y-second.y};};$.fn.owlCarousel=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data('owl.carousel');if(!data){data=new Owl(this,typeof option=='object'&&option);$this.data('owl.carousel',data);$.each(['next','prev','to','destroy','refresh','replace','add','remove'],function(i,event){data.register({type:Owl.Type.Event,name:event});data.$element.on(event+'.owl.carousel.core',$.proxy(function(e){if(e.namespace&&e.relatedTarget!==this){this.suppress([event]);data[event].apply(this,[].slice.call(arguments,1));this.release([event]);}},data));});} 2423if(typeof option=='string'&&option.charAt(0)!=='_'){data[option].apply(data,args);}});};$.fn.owlCarousel.Constructor=Owl;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var AutoRefresh=function(carousel){this._core=carousel;this._interval=null;this._visible=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoRefresh){this.watch();}},this)};this._core.options=$.extend({},AutoRefresh.Defaults,this._core.options);this._core.$element.on(this._handlers);};AutoRefresh.Defaults={autoRefresh:true,autoRefreshInterval:500};AutoRefresh.prototype.watch=function(){if(this._interval){return;} 2424this._visible=this._core.$element.is(':visible');this._interval=window.setInterval($.proxy(this.refresh,this),this._core.settings.autoRefreshInterval);};AutoRefresh.prototype.refresh=function(){if(this._core.$element.is(':visible')===this._visible||this._core.$element.closest('.drop-menu').length){return;} 2425this._visible=!this._visible;this._core.$element.toggleClass('owl-hidden',!this._visible);this._visible&&(this._core.invalidate('width')&&this._core.refresh());};AutoRefresh.prototype.destroy=function(){var handler,property;window.clearInterval(this._interval);for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);} 2426for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Lazy=function(carousel){this._core=carousel;this._loaded=[];this._handlers={'initialized.owl.carousel change.owl.carousel':$.proxy(function(e){if(!e.namespace){return;} 2427if(!this._core.settings||!this._core.settings.lazyLoad){return;} 2428if((e.property&&e.property.name=='position')||e.type=='initialized'){var settings=this._core.settings,n=(settings.center&&Math.ceil(settings.items/2)||settings.items),i=((settings.center&&n*-1)||0),position=((e.property&&e.property.value)||this._core.current())+i,clones=this._core.clones().length,load=$.proxy(function(i,v){this.load(v)},this);while(i++<n){this.load(clones/2+this._core.relative(position));clones&&$.each(this._core.clones(this._core.relative(position)),load);position++;}}},this)};this._core.options=$.extend({},Lazy.Defaults,this._core.options);this._core.$element.on(this._handlers);} 2429Lazy.Defaults={lazyLoad:false} 2430Lazy.prototype.load=function(position){var $item=this._core.$stage.children().eq(position),$elements=$item&&$item.find('.owl-lazy');if(!$elements||$.inArray($item.get(0),this._loaded)>-1){return;} 2431$elements.each($.proxy(function(index,element){var $element=$(element),image,url=(window.devicePixelRatio>1&&$element.attr('data-src-retina'))||$element.attr('data-src');this._core.trigger('load',{element:$element,url:url},'lazy');if($element.is('img')){$element.one('load.owl.lazy',$.proxy(function(){$element.css('opacity',1);this._core.trigger('loaded',{element:$element,url:url},'lazy');},this)).attr('src',url);}else{image=new Image();image.onload=$.proxy(function(){$element.css({'background-image':'url('+url+')','opacity':'1'});this._core.trigger('loaded',{element:$element,url:url},'lazy');},this);image.src=url;}},this));this._loaded.push($item.get(0));} 2432Lazy.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this._core.$element.off(handler,this.handlers[handler]);} 2433for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var AutoHeight=function(carousel){this._core=carousel;this._handlers={'initialized.owl.carousel refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight){this.update();}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.property.name=='position'){this.update();}},this),'loaded.owl.lazy':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.element.closest('.'+this._core.settings.itemClass).index()===this._core.current()){this.update();}},this)};this._core.options=$.extend({},AutoHeight.Defaults,this._core.options);this._core.$element.on(this._handlers);};AutoHeight.Defaults={autoHeight:false,autoHeightClass:'owl-height'};AutoHeight.prototype.update=function(){var start=this._core._current,end=start+this._core.settings.items,visible=this._core.$stage.children().toArray().slice(start,end);heights=[],maxheight=0;$.each(visible,function(index,item){heights.push($(item).height());});maxheight=Math.max.apply(null,heights);this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass);};AutoHeight.prototype.destroy=function(){var handler,property;for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);} 2434for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Video=function(carousel){this._core=carousel;this._videos={};this._playing=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace){this._core.register({type:'state',name:'playing',tags:['interacting']});}},this),'resize.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){e.preventDefault();}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.is('resizing')){this._core.$stage.find('.cloned .owl-video-frame').remove();}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'&&this._playing){this.stop();}},this),'prepared.owl.carousel':$.proxy(function(e){if(!e.namespace){return;} 2435var $element=$(e.content).find('.owl-video');if($element.length){$element.css('display','none');this.fetch($element,$(e.content));}},this)};this._core.options=$.extend({},Video.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on('click.owl.video','.owl-video-play-icon',$.proxy(function(e){this.play(e);},this));};Video.Defaults={video:false,videoHeight:false,videoWidth:false};Video.prototype.fetch=function(target,item){var type=target.attr('data-vimeo-id')?'vimeo':'youtube',id=target.attr('data-vimeo-id')||target.attr('data-youtube-id'),width=target.attr('data-width')||this._core.settings.videoWidth,height=target.attr('data-height')||this._core.settings.videoHeight,url=target.attr('href');if(url){id=url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1){type='youtube';}else if(id[3].indexOf('vimeo')>-1){type='vimeo';}else{throw new Error('Video URL not supported.');} 2436id=id[6];}else{throw new Error('Missing video URL.');} 2437this._videos[url]={type:type,id:id,width:width,height:height};item.attr('data-video',url);this.thumbnail(target,this._videos[url]);};Video.prototype.thumbnail=function(target,video){var tnLink,icon,path,dimensions=video.width&&video.height?'style="width:'+video.width+'px;height:'+video.height+'px;"':'',customTn=target.find('img'),srcType='src',lazyClass='',settings=this._core.settings,create=function(path){icon='<div class="owl-video-play-icon"></div>';if(settings.lazyLoad){tnLink='<div class="owl-video-tn '+lazyClass+'" '+srcType+'="'+path+'"></div>';}else{tnLink='<div class="owl-video-tn" style="opacity:1;background-image:url('+path+')"></div>';} 2438target.after(tnLink);target.after(icon);};target.wrap('<div class="owl-video-wrapper"'+dimensions+'></div>');if(this._core.settings.lazyLoad){srcType='data-src';lazyClass='owl-lazy';} 2439if(customTn.length){create(customTn.attr(srcType));customTn.remove();return false;} 2440if(video.type==='youtube'){path="//img.youtube.com/vi/"+video.id+"/hqdefault.jpg";create(path);}else if(video.type==='vimeo'){$.ajax({type:'GET',url:'//vimeo.com/api/v2/video/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data[0].thumbnail_large;create(path);}});}};Video.prototype.stop=function(){this._core.trigger('stop',null,'video');this._playing.find('.owl-video-frame').remove();this._playing.removeClass('owl-video-playing');this._playing=null;this._core.leave('playing');this._core.trigger('stopped',null,'video');};Video.prototype.play=function(event){var target=$(event.target),item=target.closest('.'+this._core.settings.itemClass),video=this._videos[item.attr('data-video')],width=video.width||'100%',height=video.height||this._core.$stage.height(),html;if(this._playing){return;} 2441this._core.enter('playing');this._core.trigger('play',null,'video');item=this._core.items(this._core.relative(item.index()));this._core.reset(item.index());if(video.type==='youtube'){html='<iframe width="'+width+'" height="'+height+'" src="//www.youtube.com/embed/'+ 2442video.id+'?autoplay=1&v='+video.id+'" frameborder="0" allowfullscreen></iframe>';}else if(video.type==='vimeo'){html='<iframe src="//player.vimeo.com/video/'+video.id+'?autoplay=1" width="'+width+'" height="'+height+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';} 2443$('<div class="owl-video-frame">'+html+'</div>').insertAfter(item.find('.owl-video'));this._playing=item.addClass('owl-video-playing');};Video.prototype.isInFullScreen=function(){var element=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;return element&&$(element).parent().hasClass('owl-video-frame');};Video.prototype.destroy=function(){var handler,property;this._core.$element.off('click.owl.video');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);} 2444for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Video=Video;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Animate=function(scope){this.core=scope;this.core.options=$.extend({},Animate.Defaults,this.core.options);this.swapping=true;this.previous=undefined;this.next=undefined;this.handlers={'change.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.previous=this.core.current();this.next=e.property.value;}},this),'drag.owl.carousel dragged.owl.carousel translated.owl.carousel':$.proxy(function(e){if(e.namespace){this.swapping=e.type=='translated';}},this),'translate.owl.carousel':$.proxy(function(e){if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){this.swap();}},this)};this.core.$element.on(this.handlers);};Animate.Defaults={animateOut:false,animateIn:false};Animate.prototype.swap=function(){if(this.core.settings.items!==1){return;} 2445if(!$.support.animation||!$.support.transition){return;} 2446this.core.speed(0);var left,clear=$.proxy(this.clear,this),previous=this.core.$stage.children().eq(this.previous),next=this.core.$stage.children().eq(this.next),incoming=this.core.settings.animateIn,outgoing=this.core.settings.animateOut;if(this.core.current()===this.previous){return;} 2447if(outgoing){left=this.core.coordinates(this.previous)-this.core.coordinates(this.next);previous.css({'left':left+'px'}).addClass('animated owl-animated-out').addClass(outgoing).on($.support.animation.end,clear);} 2448if(incoming){next.addClass('animated owl-animated-in').addClass(incoming).on($.support.animation.end,clear);}};Animate.prototype.clear=function(e){if($(e.target).hasClass('animated')){$(e.target).css({'left':''}).removeClass('animated owl-animated-out owl-animated-in').removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.onTransitionEnd();}};Animate.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this.core.$element.off(handler,this.handlers[handler]);} 2449for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Animate=Animate;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Autoplay=function(carousel){this._core=carousel;this._interval=null;this._paused=false;this._handlers={'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='settings'){if(this._core.settings.autoplay){this.play();}else{this.stop();}}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoplay){this.play();}},this),'play.owl.autoplay':$.proxy(function(e,t,s){if(e.namespace){this.play(t,s);}},this),'stop.owl.autoplay':$.proxy(function(e){if(e.namespace){this.stop();}},this),'mouseover.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.pause();}},this),'mouseleave.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.play();}},this)};this._core.$element.on(this._handlers);this._core.options=$.extend({},Autoplay.Defaults,this._core.options);};Autoplay.Defaults={autoplay:false,autoplayTimeout:5000,autoplayHoverPause:false,autoplaySpeed:false};Autoplay.prototype.play=function(timeout,speed){this._paused=false;if(this._core.is('rotating')){return;} 2450this._core.enter('rotating');this._interval=window.setInterval($.proxy(function(){if(this._paused||this._core.is('busy')||this._core.is('interacting')||document.hidden){return;} 2451this._core.next(speed||this._core.settings.autoplaySpeed);},this),timeout||this._core.settings.autoplayTimeout);};Autoplay.prototype.stop=function(){if(!this._core.is('rotating')){return;} 2452window.clearInterval(this._interval);this._core.leave('rotating');};Autoplay.prototype.pause=function(){if(!this._core.is('rotating')){return;} 2453this._paused=true;};Autoplay.prototype.destroy=function(){var handler,property;this.stop();for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);} 2454for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Navigation=function(carousel){this._core=carousel;this._initialized=false;this._pages=[];this._controls={};this._templates=[];this.$element=this._core.$element;this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to};this._handlers={'prepared.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.push('<div class="'+this._core.settings.dotClass+'">'+ 2455$(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot')+'</div>');}},this),'added.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,0,this._templates.pop());}},this),'remove.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,1);}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.draw();}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&!this._initialized){this._core.trigger('initialize',null,'navigation');this.initialize();this.update();this.draw();this._initialized=true;this._core.trigger('initialized',null,'navigation');}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._initialized){this._core.trigger('refresh',null,'navigation');this.update();this.draw();this._core.trigger('refreshed',null,'navigation');}},this)};this._core.options=$.extend({},Navigation.Defaults,this._core.options);this.$element.on(this._handlers);};Navigation.Defaults={nav:false,navText:['prev','next'],navSpeed:false,navElement:'button type="button"',navContainer:false,navContainerClass:'owl-nav',navClass:['owl-prev','owl-next'],slideBy:1,dotClass:'owl-dot',dotsClass:'owl-dots',dots:true,dotsEach:false,dotsData:false,dotsSpeed:false,dotsContainer:false};Navigation.prototype.initialize=function(){var override,settings=this._core.settings;this._controls.$relative=(settings.navContainer?$(settings.navContainer):$('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');this._controls.$previous=$('<'+settings.navElement[0]+'>').addClass(settings.navClass[0]).html(settings.navText[0]).prependTo(this._controls.$relative).on('click',$.proxy(function(e){this.prev(settings.navSpeed);},this));this._controls.$next=$('<'+settings.navElement[1]+'>').addClass(settings.navClass[1]).html(settings.navText[1]).appendTo(this._controls.$relative).on('click',$.proxy(function(e){this.next(settings.navSpeed);},this));if(!settings.dotsData){this._templates=[$('<button>').addClass(settings.dotClass).append($('<span>')).prop('outerHTML')];} 2456this._controls.$absolute=(settings.dotsContainer?$(settings.dotsContainer):$('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');this._controls.$absolute.on('click','div, button',$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$absolute)?$(e.target).index():$(e.target).parent().index();e.preventDefault();this.to(index,settings.dotsSpeed);},this));for(override in this._overrides){this._core[override]=$.proxy(this[override],this);}};Navigation.prototype.destroy=function(){var handler,control,property,override;for(handler in this._handlers){this.$element.off(handler,this._handlers[handler]);} 2457for(control in this._controls){this._controls[control].remove();} 2458for(override in this.overides){this._core[override]=this._overrides[override];} 2459for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};Navigation.prototype.update=function(){var i,j,k,lower=this._core.clones().length/2,upper=lower+this._core.items().length,maximum=this._core.maximum(true),settings=this._core.settings,size=settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items;if(settings.slideBy!=='page'){settings.slideBy=Math.min(settings.slideBy,settings.items);} 2460if(settings.dots||settings.slideBy=='page'){this._pages=[];for(i=lower,j=0,k=0;i<upper;i++){if(j>=size||j===0){this._pages.push({start:Math.min(maximum,i-lower),end:i-lower+size-1});if(Math.min(maximum,i-lower)===maximum){break;} 2461j=0,++k;} 2462j+=this._core.mergers(this._core.relative(i));}}};Navigation.prototype.draw=function(){var difference,settings=this._core.settings,disabled=this._core.items().length<=settings.items,index=this._core.relative(this._core.current()),loop=settings.loop||settings.rewind;this._controls.$relative.toggleClass('disabled',!settings.nav||disabled);if(settings.nav){this._controls.$previous.toggleClass('disabled',!loop&&index<=this._core.minimum(true));this._controls.$next.toggleClass('disabled',!loop&&index>=this._core.maximum(true));} 2463this._controls.$absolute.toggleClass('disabled',!settings.dots||disabled);if(settings.dots){difference=this._pages.length-this._controls.$absolute.children().length;if(settings.dotsData&&difference!==0){this._controls.$absolute.html(this._templates.join(''));}else if(difference>0){this._controls.$absolute.append(new Array(difference+1).join(this._templates[0]));}else if(difference<0){this._controls.$absolute.children().slice(difference).remove();} 2464this._controls.$absolute.find('.active').removeClass('active');this._controls.$absolute.children().eq($.inArray(this.current(),this._pages)).addClass('active');}};Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items)};};Navigation.prototype.current=function(){var current=this._core.relative(this._core.current());return $.grep(this._pages,$.proxy(function(page,index){return page.start<=current&&page.end>=current;},this)).pop();};Navigation.prototype.getPosition=function(successor){var position,length,settings=this._core.settings;if(settings.slideBy=='page'){position=$.inArray(this.current(),this._pages);length=this._pages.length;successor?++position:--position;
vendor: 4,232 bytes, lines 2464-2475
2464position=this._pages[((position%length)+length)%length].start;}else{position=this._core.relative(this._core.current());length=this._core.items().length;successor?position+=settings.slideBy:position-=settings.slideBy;} 2465return position;};Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(true),speed);};Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(false),speed);};Navigation.prototype.to=function(position,speed,standard){var length;if(!standard){length=this._pages.length;$.proxy(this._overrides.to,this._core)(this._pages[((position%length)+length)%length].start,speed);}else{$.proxy(this._overrides.to,this._core)(position,speed);}};$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Hash=function(carousel){this._core=carousel;this._hashes={};this.$element=this._core.$element;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.startPosition==='URLHash'){$(window).trigger('hashchange.owl.navigation');}},this),'prepared.owl.carousel':$.proxy(function(e){if(e.namespace){var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');if(!hash){return;} 2466this._hashes[hash]=e.content;}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'){var current=this._core.items(this._core.relative(this._core.current())),hash=$.map(this._hashes,function(item,hash){return item===current?hash:null;}).join();if(!hash||window.location.hash.slice(1)===hash){return;} 2467window.location.hash=hash;}},this)};this._core.options=$.extend({},Hash.Defaults,this._core.options);this.$element.on(this._handlers);};Hash.Defaults={URLhashListener:false};Hash.prototype.destroy=function(){var handler,property;$(window).off('hashchange.owl.navigation');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);} 2468for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var style=$('<support>').get(0).style,prefixes='Webkit Moz O ms'.split(' '),events={transition:{end:{WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd',transition:'transitionend'}},animation:{end:{WebkitAnimation:'webkitAnimationEnd',MozAnimation:'animationend',OAnimation:'oAnimationEnd',animation:'animationend'}}},tests={csstransforms:function(){return!!test('transform');},csstransforms3d:function(){return!!test('perspective');},csstransitions:function(){return!!test('transition');},cssanimations:function(){return!!test('animation');}};function test(property,prefixed){var result=false,upper=property.charAt(0).toUpperCase()+property.slice(1);$.each((property+' '+prefixes.join(upper+' ')+upper).split(' '),function(i,property){if(style[property]!==undefined){result=prefixed?property:true;return false;}});return result;} 2469function prefixed(property){return test(property,true);} 2470if(tests.csstransitions()){$.support.transition=new String(prefixed('transition')) 2471$.support.transition.end=events.transition.end[$.support.transition];} 2472if(tests.cssanimations()){$.support.animation=new String(prefixed('animation')) 2473$.support.animation.end=events.animation.end[$.support.animation];} 2474if(tests.csstransforms()){$.support.transform=new String(prefixed('transform'));$.support.transform3d=tests.csstransforms3d();}})(window.Zepto||window.jQuery,window,document);(function(window,document,undefined){var absPos=function(element){var offsetLeft,offsetTop;offsetLeft=offsetTop=0;if(element.offsetParent){do{offsetLeft+=element.offsetLeft;offsetTop+=element.offsetTop;}while(element=element.offsetParent);} 2475return[offsetLeft,offsetTop];};var ProgressCircle=function(params){this.canvas=params.canvas;this.minRadius=params.minRadius||15;this.arcWidth=params.arcWidth||5;this.gapWidth=params.gapWidth||3;this.centerX=params.centerX||this.canvas.width/2;this.centerY=params.centerY||this.canvas.height/2;
2475this.infoLineLength=params.infoLineLength||60;this.horizLineLength=params.horizLineLength||10;this.infoLineAngleInterval=params.infoLineAngleInterval||Math.PI/8;this.infoLineBaseAngle=params.infoLineBaseAngle||Math.PI/6;this.context=this.canvas.getContext('2d');this.width=this.canvas.width;this.height=this.canvas.height;this.circles=[];this.runningCount=0;};ProgressCircle.prototype={constructor:ProgressCircle,addEntry:function(params){this.circles.push(new Circle({canvas:this.canvas,context:this.context,centerX:this.centerX,centerY:this.centerY,innerRadius:this.minRadius+this.circles.length*(this.gapWidth+this.arcWidth),arcWidth:this.arcWidth,infoLineLength:this.infoLineLength,horizLineLength:this.horizLineLength,id:this.circles.length,fillColor:params.fillColor,outlineColor:params.outlineColor,progressListener:params.progressListener,infoListener:params.infoListener,infoLineAngle:this.infoLineBaseAngle+ 2476this.circles.length*this.infoLineAngleInterval,}));return this;},start:function(interval){var self=this;this.timer=setInterval(function(){self._update();},interval||33);return this;},stop:function(){clearTimeout(this.timer);},_update:function(){this._clear();this.circles.forEach(function(circle,idx,array){circle.update();});return this;},_clear:function(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);return this;},};var Circle=function(params){this.id=params.id;this.canvas=params.canvas;this.context=params.context;this.centerX=params.centerX;this.centerY=params.centerY;this.arcWidth=params.arcWidth;this.innerRadius=params.innerRadius||0;this.fillColor=params.fillColor||'#fff';this.outlineColor=params.outlineColor||this.fillColor;this.progressListener=params.progressListener;
2476this.infoLineLength=params.infoLineLength||250;this.horizLineLength=params.horizLineLength||50;this.infoListener=params.infoListener;this.infoLineAngle=params.infoLineAngle;this.outerRadius=this.innerRadius+this.arcWidth;if(!this.infoListener)return;var angle=this.infoLineAngle,arcDistance=(this.innerRadius+this.outerRadius)/2,sinA=Math.sin(angle),cosA=Math.cos(angle);this.infoLineStartX=this.centerX+sinA*arcDistance;this.infoLineStartY=this.centerY-cosA*arcDistance;this.infoLineMidX=this.centerX+sinA*this.infoLineLength;this.infoLineMidY=this.centerY-cosA*this.infoLineLength;this.infoLineEndX=this.infoLineMidX+ 2477(sinA<0?-this.horizLineLength:this.horizLineLength);this.infoLineEndY=this.infoLineMidY;var infoText=document.createElement('div'),style=infoText.style;style.color=this.fillColor;style.position='absolute';style.left=this.infoLineEndX+absPos(this.canvas)[0]+'px';infoText.className='ProgressCircleInfo';infoText.id='progress_circle_info_'+this.id;document.body.appendChild(infoText);this.infoText=infoText;};Circle.prototype={constructor:Circle,update:function(){this.progress=this.progressListener();this._draw();if(this.infoListener){this.info=this.infoListener();this._drawInfo();}},_draw:function(){var ctx=this.context,ANGLE_OFFSET=-Math.PI/2,startAngle=0+ANGLE_OFFSET,endAngle=startAngle+this.progress*Math.PI*2,x=this.centerX,y=this.centerY,innerRadius=this.innerRadius-this.arcWidth-1,outerRadius=this.outerRadius-this.arcWidth-1;if(innerRadius<0) 2478return;ctx.fillStyle=this.fillColor;ctx.strokeStyle=this.outlineColor;ctx.beginPath();ctx.arc(x,y,innerRadius,startAngle,endAngle,false);ctx.arc(x,y,outerRadius,endAngle,startAngle,true);ctx.closePath();ctx.stroke();ctx.fill();return this;},_drawInfo:function(){var pointList,lineHeight;pointList=[[this.infoLineStartX,this.infoLineStartY],[this.infoLineMidX,this.infoLineMidY],[this.infoLineEndX,this.infoLineEndY],];this._drawSegments(pointList,false);this.infoText.innerHTML=this.info;lineHeight=this.infoText.offsetHeight;this.infoText.style.top=this.infoLineEndY+ 2479absPos(this.canvas)[1]-lineHeight/2+'px';return this;},_drawSegments:function(pointList,close){var ctx=this.context;ctx.beginPath();ctx.moveTo(pointList[0][0],pointList[0][1]);for(var i=1;i<pointList.length;++i){ctx.lineTo(pointList[i][0],pointList[i][1]);} 2480if(close){ctx.closePath();} 2481ctx.stroke();},};window.ProgressCircle=ProgressCircle;})(window,document);(function($){var VcChart=function(element,options){this.el=element;this.$el=$(this.el);var $this=this;$this.options=$.extend({color:'wpb_button',units:'',width:'',label_selector:'.vc_pie_chart_value',back_selector:'.vc_pie_chart_back',responsive:true},options);$this.init();};VcChart.prototype={constructor:VcChart,_progress_v:0,animated:false,colors:{'wpb_button':'rgba(247, 247, 247, 1)','btn-primary':'rgba(0, 136, 204, 1)','btn-info':'rgba(88, 185, 218, 1)','btn-success':'rgba(106, 177, 101, 1)','btn-warning':'rgba(255, 153, 0, 1)','btn-danger':'rgba(255, 103, 91, 1)','btn-inverse':'rgba(85, 85, 85, 1)'},init:function(){this.setupColor();this.value=this.$el.data('pie-value')/100;this.label_value=this.$el.data('pie-label-value')||this.$el.data('pie-value');this.$wrapper=$('.vc_pie_wrapper',this.$el);this.$label=$(this.options.label_selector,this.$el);this.$back=$(this.options.back_selector,this.$el);this.$canvas=this.$el.find('canvas');this.arcWidth=this.$el.data('pie-width')*2;this.draw();this.setWayPoint();if(this.options.responsive===true)this.setResponsive();if(UNCODE.isMobile)this._progress_v=this.value;},setupColor:function(){if(typeof this.options.color!=='undefined'){this.color=this.options.color;}else this.color='rgba(247, 247, 247, 0.2)';},setResponsive:function(){var that=this;if(!UNCODE.isMobile){$(window).resize(function(){if(that.animated===true)that.circle.stop();that.draw(true);});}},draw:function(redraw){var w=this.$el.addClass('vc_ready').width()*2,border_w=this.arcWidth,radius;if(!w)w=this.$el.parents(':visible').first().width()-2;radius=w/2;this.$wrapper.css({"width":(w/2)+"px"});this.$label.css({"width":(w/2),"height":(w/2),"line-height":(w/2)+"px"});this.$back.css({"width":(w/2),"height":(w/2)});this.$canvas.attr({"width":w+"px","height":w+"px"});this.$el.addClass('vc_ready');this.circle=new ProgressCircle({canvas:this.$canvas.get(0),minRadius:radius,arcWidth:border_w});if(redraw===true&&this.animated===true){this._progress_v=this.value;this.circle.addEntry({fillColor:this.color,progressListener:$.proxy(this.setProgress,this)}).start();}},setProgress:function(){if(this._progress_v>=this.value){this.circle.stop();this.animated=true;this.$label.html(this.label_value+this.options.units);return this._progress_v;} 2482this._progress_v+=0.01;if(!isNaN(this.label_value)){var label_value=this._progress_v/this.value*this.label_value;var val=Math.round(label_value)+this.options.units;this.$label.html(val);}else this.$label.html(this.label_value+this.options.units);return this._progress_v;},animate:function(){if(this.animated!==true){this.circle.addEntry({fillColor:this.color,progressListener:$.proxy(this.setProgress,this)}).start(10);}},setWayPoint:function(){if(typeof $.fn.waypoint!=='undefined'&&!UNCODE.isMobile){this.$el.waypoint($.proxy(this.animate,this),{offset:'85%'});}else{this.animate();}}};$.fn.vcChat=function(option,value){return this.each(function(){var $this=$(this),data=$this.data('vc_chart'),options=typeof option==='object'?option:{color:$this.data('pie-color'),units:$this.data('pie-units')};if(typeof option=='undefined')$this.data('vc_chart',(data=new VcChart(this,options)));if(typeof option=='string')data[option](value);});};if(typeof window['vc_pieChart']!=='function'){window.vc_pieChart=function(){$('.vc_pie_chart:visible:not(.vc_ready)').vcChat();}} 2483$(document).ready(function(){!window.vc_iframe&&vc_pieChart();$('.nav-tabs a').on('shown.bs.tab',function(e){var $cont=$(e.target).closest('.tab-container'),$active=$('.tab-pane.active',$cont);$('.vc_pie_chart:not(.vc_ready)',$active).vcChat();});$('.panel-collapse').on('shown.bs.collapse',function(e){$('.vc_pie_chart:not(.vc_ready)',e.target).vcChat();})});})(window.jQuery);function uncode_progress_bar(){jQuery.each(jQuery('.vc_progress_bar'),function(index,val){if(UNCODE.isUnmodalOpen&&!val.closest('#unmodal-content')){return;} 2484if(!UNCODE.isMobile){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById('unmodal-content'):window,element:val,handler:function(){var element=jQuery(this.element);element.find('.vc_single_bar').each(function(index){var $this=jQuery(this),bar=$this.find('.vc_bar'),val=bar.data('percentage-value');setTimeout(function(){bar.css({"width":val+'%'});},index*200);});},offset:'80%'});}else{var element=jQuery(val);element.find('.vc_single_bar').each(function(index){var $this=jQuery(this),bar=$this.find('.vc_bar'),val=bar.data('percentage-value');setTimeout(function(){bar.css({"width":val+'%'});},index*200);});}});};uncode_progress_bar(); 2485/*! 2486 * jquery.counterup.js 1.0 2487 * 2488 * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal 2489 * Released under the GPL v2 License 2490 * 2491 * Date: Nov 26, 2013 2492 */ 2493(function($){"use strict";$.fn.counterUp=function(options){var settings=$.extend({'time':400,'delay':10},options);return this.each(function(){var $this=$(this);var $settings=settings;var counterUpper=function(){var nums=[];var divisions=$settings.time/$settings.delay;var numReal=$this.attr('data-val'),num=numReal;var isComma=/[0-9]+,[0-9]+/.test(num);num=num.replace(/,/g,'');var isInt=/^[0-9]+$/.test(num);var isFloat=/^[0-9]+\.[0-9]+$/.test(num);var decimalPlaces=isFloat?(num.split('.')[1]||[]).length:0;for(var i=divisions;i>=1;i--){var newNum=parseInt(num/divisions*i);if(isFloat){newNum=parseFloat(num/divisions*i).toFixed(decimalPlaces);} 2494if(isComma){while(/(\d+)(\d{3})/.test(newNum.toString())){newNum=newNum.toString().replace(/(\d+)(\d{3})/,'$1'+','+'$2');}} 2495nums.unshift(newNum);} 2496nums.push(numReal);$this.data('counterup-nums',nums);$this.text('0');var f=function(){if($this.data('counterup-nums')!=null){$this.text($this.data('counterup-nums').shift());if($this.data('counterup-nums').length){setTimeout($this.data('counterup-func'),$settings.delay);}else{delete $this.data('counterup-nums');$this.data('counterup-nums',null);$this.data('counterup-func',null);}}};$this.data('counterup-func',f);
vendor: 4,917 bytes, lines 2496-2532
2496setTimeout($this.data('counterup-func'),$settings.delay);};new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById('unmodal-content'):window,element:this,handler:function(){counterUpper();if(!UNCODE.isUnmodalOpen){this.destroy();}},offset:'100%'});});};})(jQuery); 2497/*! 2498 * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/) 2499 * Copyright (c) 2016 Edson Hilios 2500 * 2501 * Permission is hereby granted, free of charge, to any person obtaining a copy of 2502 * this software and associated documentation files (the "Software"), to deal in 2503 * the Software without restriction, including without limitation the rights to 2504 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 2505 * the Software, and to permit persons to whom the Software is furnished to do so, 2506 * subject to the following conditions: 2507 * 2508 * The above copyright notice and this permission notice shall be included in all 2509 * copies or substantial portions of the Software. 2510 * 2511 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2512 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 2513 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 2514 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 2515 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2516 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2517 */ 2518(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{factory(jQuery);}})(function($){"use strict";var instances=[],matchers=[],defaultOptions={precision:100,elapse:false,defer:false};matchers.push(/^[0-9]*$/.source);matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers=new RegExp(matchers.join("|"));function parseDateString(dateString){if(dateString instanceof Date){return dateString;} 2519if(String(dateString).match(matchers)){if(String(dateString).match(/^[0-9]*$/)){dateString=Number(dateString);} 2520if(String(dateString).match(/\-/)){dateString=String(dateString).replace(/\-/g,"/");} 2521return new Date(dateString);}else{throw new Error("Couldn't cast `"+dateString+"` to a date object.");}} 2522var DIRECTIVE_KEY_MAP={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"};function escapedRegExp(str){var sanitize=str.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(sanitize);} 2523function strftime(offsetObject){return function(format){var directives=format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(directives){for(var i=0,len=directives.length;i<len;++i){var directive=directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),regexp=escapedRegExp(directive[0]),modifier=directive[1]||"",plural=directive[3]||"",value=null;directive=directive[2];if(DIRECTIVE_KEY_MAP.hasOwnProperty(directive)){value=DIRECTIVE_KEY_MAP[directive];value=Number(offsetObject[value]);} 2524if(value!==null){if(modifier==="!"){value=pluralize(plural,value);} 2525if(modifier===""){if(value<10){value="0"+value.toString();}} 2526format=format.replace(regexp,value.toString());}}} 2527format=format.replace(/%%/,"%");return format;};} 2528function pluralize(format,count){var plural="s",singular="";if(format){format=format.replace(/(:|;|\s)/gi,"").split(/\,/);if(format.length===1){plural=format[0];}else{singular=format[0];plural=format[1];}} 2529if(Math.abs(count)>1){return plural;}else{return singular;}} 2530var Countdown=function(el,finalDate,options){this.el=el;this.$el=$(el);this.interval=null;this.offset={};this.options=$.extend({},defaultOptions);this.instanceNumber=instances.length;instances.push(this);this.$el.data("countdown-instance",this.instanceNumber);if(options){if(typeof options==="function"){this.$el.on("update.countdown",options);this.$el.on("stoped.countdown",options);this.$el.on("finish.countdown",options);}else{this.options=$.extend({},defaultOptions,options);}} 2531this.setFinalDate(finalDate);if(this.options.defer===false){this.start();}};$.extend(Countdown.prototype,{start:function(){if(this.interval!==null){clearInterval(this.interval);} 2532var self=this;this.update();this.interval=setInterval(function(){self.update.call(self);},this.options.precision);},stop:function(){clearInterval(this.interval);this.interval=null;this.dispatchEvent("stoped");},toggle:function(){if(this.interval){this.stop();}else{this.start();}},pause:function(){this.stop();},resume:function(){this.start();},remove:function(){this.stop.call(this);instances[this.instanceNumber]=null;delete this.$el.data().countdownInstance;},setFinalDate:function(value){this.finalDate=parseDateString(value);},update:function(){if(this.$el.closest("html").length===0){this.remove();return;}
2533var hasEventsAttached=$._data(this.el,"events")!==undefined,now=new Date(),newTotalSecsLeft;newTotalSecsLeft=this.finalDate.getTime()-now.getTime();newTotalSecsLeft=Math.ceil(newTotalSecsLeft/1e3);newTotalSecsLeft=!this.options.elapse&&newTotalSecsLeft<0?0:Math.abs(newTotalSecsLeft);if(this.totalSecsLeft===newTotalSecsLeft||!hasEventsAttached){return;}else{this.totalSecsLeft=newTotalSecsLeft;} 2534this.elapsed=now>=this.finalDate;this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-now.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft};if(!this.options.elapse&&this.totalSecsLeft===0){this.stop();this.dispatchEvent("finish");}else{this.dispatchEvent("update");}},dispatchEvent:function(eventName){var event=$.Event(eventName+".countdown");event.finalDate=this.finalDate;event.elapsed=this.elapsed;event.offset=$.extend({},this.offset);event.strftime=strftime(this.offset);this.$el.trigger(event);}});$.fn.countdown=function(){var argumentsArray=Array.prototype.slice.call(arguments,0);return this.each(function(){var instanceNumber=$(this).data("countdown-instance");if(instanceNumber!==undefined){var instance=instances[instanceNumber],method=argumentsArray[0];if(Countdown.prototype.hasOwnProperty(method)){instance[method].apply(instance,argumentsArray.slice(1));}else if(String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i)===null){instance.setFinalDate.call(instance,method);instance.start();}else{$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,method));}}else{new Countdown(this,argumentsArray[0],argumentsArray[1]);}});};});!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Share=e()}}(function(){var define,module,exports;function getStyles(config){};var ShareUtils;if((!("classList"in document.documentElement))&&Object.defineProperty&&typeof HTMLElement!=="undefined"){Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){var ret,self,update;update=function(fn){return function(value){var classes,index;classes=self.className.split(/\s+/);index=classes.indexOf(value);fn(classes,index,value);self.className=classes.join(" ");};};self=this;ret={add:update(function(classes,index,value){~index||classes.push(value);}),remove:update(function(classes,index){~index&&classes.splice(index,1);}),toggle:update(function(classes,index,value){if(~index){classes.splice(index,1);}else{classes.push(value);}}),contains:function(value){return!!~self.className.split(/\s+/).indexOf(value);},item:function(i){return self.className.split(/\s+/)[i]||null;}};Object.defineProperty(ret,"length",{get:function(){return self.className.split(/\s+/).length;}});return ret;}});} 2535String.prototype.to_rfc3986=function(){var tmp;tmp=encodeURIComponent(this);return tmp.replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16);});};ShareUtils=(function(){function ShareUtils(){} 2536ShareUtils.prototype.extend=function(to,from,overwrite){var hasProp,prop;for(prop in from){hasProp=to[prop]!==undefined;if(hasProp&&typeof from[prop]==="object"){this.extend(to[prop],from[prop],overwrite);}else{if(overwrite||!hasProp){to[prop]=from[prop];}}}};ShareUtils.prototype.hide=function(el){return el.style.display="none";};ShareUtils.prototype.show=function(el){return el.style.display="block";};ShareUtils.prototype.has_class=function(el,class_name){return el.classList.contains(class_name);};ShareUtils.prototype.add_class=function(el,class_name){return el.classList.add(class_name);};ShareUtils.prototype.remove_class=function(el,class_name){return el.classList.remove(class_name);};ShareUtils.prototype.is_encoded=function(str){str=str.to_rfc3986();return decodeURIComponent(str)!==str;};ShareUtils.prototype.encode=function(str){if(typeof str==="undefined"||this.is_encoded(str)){return str;}else{return str.to_rfc3986();}};ShareUtils.prototype.popup=function(url,params){var k,popup,qs,v;if(params==null){params={};} 2537popup={width:500,height:350};
2537popup.top=(screen.height/2)-(popup.height/2);popup.left=(screen.width/2)-(popup.width/2);qs=((function(){var _results;_results=[];for(k in params){v=params[k];_results.push(""+k+"="+(this.encode(v)));} 2538return _results;}).call(this)).join('&');if(qs){qs="?"+qs;} 2539return window.open(url+qs,'targetWindow',"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left="+popup.left+",top="+popup.top+",width="+popup.width+",height="+popup.height);};return ShareUtils;})();var Share,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;};Share=(function(_super){__extends(Share,_super);function Share(element,options){this.element=element;this.el={head:document.getElementsByTagName('head')[0],body:document.getElementsByTagName('body')[0]};this.config={enabled_networks:0,protocol:['http','https'].indexOf(window.location.href.split(':')[0])===-1?'https://':'//',url:window.location.href.replace("&","%26"),caption:null,title:this.default_title(),image:this.default_image(),description:this.default_description(),ui:{flyout:'top center',button_text:'Share',button_font:true,icon_font:true},networks:{twitter:{enabled:true,url:null,title:null,description:null},facebook:{enabled:true,load_sdk:true,url:null,app_id:null,title:null,caption:null,description:null,image:null},threads:{enabled:true,url:null,title:null,description:null},bluesky:{enabled:true,url:null,title:null,description:null},pinterest:{enabled:true,url:null,image:null,description:null},reddit:{enabled:true,url:null,title:null},linkedin:{enabled:true,url:null,title:null,description:null},xing:{enabled:true,url:null,title:null,image:null,description:null},whatsapp:{enabled:true,title:null,url:null},email:{enabled:true,title:null,description:null,url:null}}};this.setup(element,options);return this;} 2540Share.prototype.setup=function(element,opts){var index,instance,instances,_i,_len;instances=document.querySelectorAll(element);this.extend(this.config,opts,true);this.set_global_configuration();this.normalize_network_configuration();if(this.config.ui.icon_font){this.inject_icons();} 2541if(this.config.ui.button_font){this.inject_fonts();} 2542if(this.config.networks.facebook.enabled&&this.config.networks.facebook.load_sdk){this.inject_facebook_sdk();} 2543for(index=_i=0,_len=instances.length;_i<_len;index=++_i){instance=instances[index];this.setup_instance(element,index);}};Share.prototype.setup_instance=function(element,index){var button,instance,label,network,networks,_i,_len,_results,_this=this;instance=document.querySelectorAll(element)[index];this.hide(instance);this.add_class(instance,"sharer-"+index);instance=document.querySelectorAll(element)[index];this.inject_css(instance);this.inject_html(instance);this.show(instance);label=instance.getElementsByTagName("label")[0];button=instance.getElementsByClassName("social")[0];networks=instance.getElementsByTagName('li');this.add_class(button,"networks-"+this.config.enabled_networks);label.addEventListener("click",function(){return _this.event_toggle(button);});_this=this;_results=[];for(index=_i=0,_len=networks.length;_i<_len;index=++_i){network=networks[index];_results.push(network.addEventListener("click",function(){_this.event_network(instance,this);return _this.event_close(button);}));} 2544return _results;};Share.prototype.event_toggle=function(button){if(this.has_class(button,"active")){return this.event_close(button);}else{return this.event_open(button);}};Share.prototype.event_open=function(button){if(this.has_class(button,"load")){this.remove_class(button,"load");} 2545return this.add_class(button,"active");};Share.prototype.event_close=function(button){return this.remove_class(button,"active");};Share.prototype.event_network=function(instance,network){var name;name=network.getAttribute("data-network");this.hook("before",name,instance);this["network_"+name]();return this.hook("after",name,instance);};Share.prototype.open=function(){return this["public"]("open");};Share.prototype.close=function(){return this["public"]("close");};Share.prototype.toggle=function(){return this["public"]("toggle");};Share.prototype["public"]=function(action){var button,index,instance,_i,_len,_ref,_results;_ref=document.querySelectorAll(this.element);_results=[];for(index=_i=0,_len=_ref.length;_i<_len;index=++_i){instance=_ref[index];button=instance.getElementsByClassName("social")[0];_results.push(this["event_"+action](button));} 2546return _results;};Share.prototype.network_facebook=function(){if(this.config.networks.facebook.load_sdk){if(!window.FB){return console.error("The Facebook JS SDK hasn't loaded yet.");} 2547return FB.ui({method:'feed',name:this.config.networks.facebook.title,link:this.config.networks.facebook.url,picture:this.config.networks.facebook.image,caption:this.config.networks.facebook.caption,description:this.config.networks.facebook.description});}else{return this.popup('https://www.facebook.com/sharer/sharer.php',{u:this.config.networks.facebook.url});}};Share.prototype.network_threads=function(){return this.popup('https://threads.net/intent/post',{text:this.config.networks.threads.title,url:this.config.networks.threads.url});};Share.prototype.network_bluesky=function(){return this.popup('https://bsky.app/intent/compose',{text:this.config.networks.bluesky.title+' '+this.config.networks.bluesky.url});};Share.prototype.network_twitter=function(){return this.popup('https://twitter.com/intent/tweet',{text:this.config.networks.twitter.title,url:this.config.networks.twitter.url});};Share.prototype.network_pinterest=function(){return this.popup('https://www.pinterest.com/pin/create/button',{url:this.config.networks.pinterest.url,media:this.config.networks.pinterest.image,description:this.config.networks.pinterest.description});};Share.prototype.network_linkedin=function(){return this.popup('https://www.linkedin.com/shareArticle',{url:this.config.networks.linkedin.url,title:this.config.networks.linkedin.title,summary:this.config.networks.linkedin.description});} 2548Share.prototype.network_xing=function(){return this.popup('https://www.xing.com/spi/shares/new',{url:this.config.networks.xing.url,image:this.config.networks.xing.image,title:this.config.networks.xing.title,summary:this.config.networks.xing.description});} 2549Share.prototype.network_whatsapp=function(){return this.popup('https://api.whatsapp.com/se
2549nd',{text:this.config.networks.whatsapp.title+'%20'+this.config.networks.whatsapp.url,});} 2550Share.prototype.network_email=function(){return this.popup('mailto:',{subject:this.config.networks.email.title,body:this.config.networks.email.url+'%0A%0A'+this.config.networks.email.description,});};Share.prototype.inject_icons=function(){};Share.prototype.inject_fonts=function(){};Share.prototype.inject_stylesheet=function(url){var link;if(!this.el.head.querySelector("link[href=\""+url+"\"]")){link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("href",url);return this.el.head.appendChild(link);}};Share.prototype.inject_css=function(instance){var css,meta,selector,style;selector="."+(instance.getAttribute('class').split(" ").join("."));if(!this.el.head.querySelector("meta[name='sharer"+selector+"']")){this.config.selector=selector;css=getStyles(this.config);style=document.createElement("style");style.type="text/css";if(style.styleSheet){style.styleSheet.cssText=css;}else{style.appendChild(document.createTextNode(css));} 2551this.el.head.appendChild(style);delete this.config.selector;meta=document.createElement("meta");meta.setAttribute("name","sharer"+selector);return this.el.head.appendChild(meta);}};Share.prototype.inject_html=function(instance){return instance.innerHTML="<label class='social-export'><span>"+this.config.ui.button_text+"</span></label><div class='social load "+this.config.ui.flyout+"'><ul><li class='social-facebook' data-network='facebook' tabindex='0'></li><li class='social-twitter' data-network='twitter' tabindex='0'></li><li class='social-threads' data-network='threads' tabindex='0'></li><li class='social-pinterest' data-network='pinterest' tabindex='0'></li><li class='social-linkedin' data-network='linkedin' tabindex='0'></li><li class='social-whatsapp' data-network='whatsapp' tabindex='0'></li><li class='social-bluesky' data-network='bluesky' tabindex='0'></li><li class='social-xing' data-network='xing' tabindex='0'></li><li class='social-paper-plane' data-network='email' tabindex='0'></li></ul></div>";};Share.prototype.inject_facebook_sdk=function(){var fb_root,script;if(!window.FB&&this.config.networks.facebook.app_id&&!this.el.body.querySelector('#fb-root')){script=document.createElement("script");script.text="window.fbAsyncInit=function(){FB.init({appId:'"+this.config.networks.facebook.app_id+"',status:true,xfbml:true})};(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n)){return}r=e.createElement(t);r.id=n;r.src='"+this.config.protocol+"connect.facebook.net/en_US/all.js';i.parentNode.insertBefore(r,i)})(document,'script','facebook-jssdk')";fb_root=document.createElement("div");fb_root.id="fb-root";this.el.body.appendChild(fb_root);return this.el.body.appendChild(script);}};Share.prototype.hook=function(type,network,instance){var fn,opts;fn=this.config.networks[network][type];if(typeof fn==="function"){opts=fn.call(this.config.networks[network],instance);if(opts!==void 0){opts=this.normalize_filter_config_updates(opts);this.extend(this.config.networks[network],opts,true);this.normalize_network_configuration();}}};Share.prototype.default_title=function(){var content;if(content=document.querySelector('meta[property="og:title"]')||document.querySelector('meta[name="twitter:title"]')){return encodeURIComponent(content.getAttribute('content'));}else if(content=document.querySelector('title')){return encodeURIComponent(content.innerText);}};Share.prototype.default_image=function(){var content;if(content=document.querySelector('meta[property="og:image"]')||document.querySelector('meta[name="twitter:image"]')){return content.getAttribute('content');}};Share.prototype.default_description=function(){var content;if(content=document.querySelector('meta[property="og:description"]')||document.querySelector('meta[name="twitter:description"]')||document.querySelector('meta[name="description"]')){return encodeURIComponent(content.getAttribute('content'));}else{return'';}};Share.prototype.set_global_configuration=function(){var display,network,option,options,_ref,_results;_ref=this.config.networks;_results=[];
2551for(network in _ref){options=_ref[network];for(option in options){if(this.config.networks[network][option]==null){this.config.networks[network][option]=this.config[option];}} 2552if(this.config.networks[network].enabled){display='block';this.config.enabled_networks+=1;}else{display='none';} 2553_results.push(this.config.networks[network].display=display);} 2554return _results;};Share.prototype.normalize_network_configuration=function(){if(!this.config.networks.facebook.app_id){this.config.networks.facebook.load_sdk=false;} 2555if(!this.is_encoded(this.config.networks.twitter.description)){this.config.networks.twitter.description=encodeURIComponent(this.config.networks.twitter.description);} 2556if(typeof this.config.networks.facebook.app_id==='number'){return this.config.networks.facebook.app_id=this.config.networks.facebook.app_id.toString();}};Share.prototype.normalize_filter_config_updates=function(opts){if(this.config.networks.facebook.app_id!==opts.app_id){console.warn("You are unable to change the Facebook app_id after the button has been initialized. Please-in-out update your Facebook filters accordingly.");delete opts.app_id;} 2557if(this.config.networks.facebook.load_sdk!==opts.load_sdk){console.warn("You are unable to change the Facebook load_sdk option after the button has been initialized. Please-in-out update your Facebook filters accordingly.");delete opts.app_id;} 2558return opts;};return Share;})(ShareUtils);return Share;});(function(){var $,win;$=this.jQuery||window.jQuery;win=$(window);$.fn.stick_in_parent=function(opts){var doc,elm,enable_bottoming,fn,i,inner_scrolling,len,manual_spacer,offset_top,outer_width,parent_selector,recalc_every,sticky_class;if(opts==null){opts={};} 2559sticky_class=opts.sticky_class,inner_scrolling=opts.inner_scrolling,recalc_every=opts.recalc_every,parent_selector=opts.parent,offset_top=opts.offset_top,manual_spacer=opts.spacer,enable_bottoming=opts.bottoming;if(offset_top==null){offset_top=0;} 2560if(parent_selector==null){parent_selector=void 0;} 2561if(inner_scrolling==null){inner_scrolling=true;} 2562if(sticky_class==null){sticky_class="is_stuck";} 2563doc=$(document);if(enable_bottoming==null){enable_bottoming=true;} 2564outer_width=function(el){var _el,computed,w;if(window.getComputedStyle){_el=el[0];computed=window.getComputedStyle(el[0]);w=parseFloat(computed.getPropertyValue("width"))+parseFloat(computed.getPropertyValue("margin-left"))+parseFloat(computed.getPropertyValue("margin-right"));if(computed.getPropertyValue("box-sizing")!=="border-box"){w+=parseFloat(computed.getPropertyValue("border-left-width"))+parseFloat(computed.getPropertyValue("border-right-width"))+parseFloat(computed.getPropertyValue("padding-left"))+parseFloat(computed.getPropertyValue("padding-right"));} 2565return w;}else{return el.outerWidth(true);}};fn=function(elm,padding_bottom,parent_top,parent_height,top,height,el_float,detached){var bottomed,detach,fixed,last_pos,last_scroll_height,offset,parent,recalc,recalc_and_tick,recalc_counter,spacer,tick;if(elm.data("sticky_kit")){return;} 2566elm.data("sticky_kit",true);last_scroll_height=doc.height();parent=elm.parent();if(parent_selector!=null){parent=parent.closest(parent_selector);} 2567if(!parent.length){throw"failed to find stick parent";} 2568fixed=false;bottomed=false;spacer=manual_spacer!=null?manual_spacer&&elm.closest(manual_spacer):$("<div />");if(spacer){spacer.css('position',elm.css('position'));} 2569recalc=function(){var border_top,padding_top,restore;if(detached){return;} 2570last_scroll_height=doc.height();border_top=parseInt(parent.css("border-top-width"),10);padding_top=parseInt(parent.css("padding-top"),10);padding_bottom=parseInt(parent.css("padding-bottom"),10);parent_top=parent.offset().top+border_top+padding_top;parent_height=parent.height();if(fixed){fixed=false;bottomed=false;if(manual_spacer==null){elm.insertAfter(spacer);spacer.detach();} 2571elm.css({position:"",top:"",width:"",bottom:""}).removeClass(sticky_class);restore=true;} 2572top=elm.offset().top-(parseInt(elm.css("margin-top"),10)||0)-offset_top;height=elm.outerHeight(true);el_float=elm.css("float");if(spacer){spacer.css({width:outer_width(elm),height:height,display:elm.css("display"),"vertical-align":elm.css("vertical-align"),"float":el_float});} 2573if(restore){return tick();}};recalc();if(height===parent_height){return;} 2574last_pos=void 0;offset=offset_top;recalc_counter=recalc_every;tick=function(){var css,delta,recalced,scroll,will_bottom,win_height;if(detached){return;} 2575recalced=false;if(recalc_counter!=null){recalc_counter-=1;if(recalc_counter<=0){recalc_counter=recalc_every;recalc();recalced=true;}} 2576if(!recalced&&doc.height()!==last_scroll_height){recalc();recalced=true;} 2577scroll=win.scrollTop();if(last_pos!=null){delta=scroll-last_pos;} 2578last_pos=scroll;if(fixed){if(enable_bottoming){will_bottom=scroll+height+offset>parent_height+parent_top;if(bottomed&&!will_bottom){bottomed=false;elm.css({position:"fixed",bottom:"",top:offset}).trigger("sticky_kit:unbottom");}} 2579if(scroll<top){fixed=false;offset=offset_top;if(manual_spacer==null){if(el_float==="left"||el_float==="right"){elm.insertAfter(spacer);} 2580spacer.detach();} 2581css={position:"",width:"",top:""};elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick");} 2582if(inner_scrolling){win_height=win.height();if(height+offset_top>win_height){if(!bottomed){offset-=delta;offset=Math.max(win_height-height,offset);offset=Math.min(offset_top,offset);if(fixed){elm.css({top:offset+"px"});}}}}}else{if(scroll>top){fixed=true;css={position:"fixed",top:offset};css.width=elm.css("box-sizing")==="border-box"?elm.outerWidth()+"px":elm.width()+"px";elm.css(css).addClass(sticky_class);if(manual_spacer==null){elm.after(spacer);if(el_float==="left"||el_float==="right"){spacer.append(elm);}} 2583elm.trigger("sticky_kit:stick");}} 2584if(fixed&&enable_bottoming){if(will_bottom==null){will_bottom=scroll+height+offset>parent_height+parent_top;} 2585if(!bottomed&&will_bottom){bottomed=true;if(parent.css("position")==="static"){parent.css({position:"relative"});} 2586return elm.css({position:"absolute",bottom:padding_bottom,top:"auto"}).trigger("sticky_kit:bottom");}}};recalc_and_tick=function(){recalc();return tick();};detach=function(){detached=true;win.off("touchmove",tick);win.off("scroll",tick);win.off("resize",recalc_and_tick);$(document.body).off("sticky_kit:recalc",recalc_and_tick);elm.off("sticky_kit:detach",detach);elm.removeData("sticky_kit");elm.css({position:"",bottom:"",top:"",width:""});parent.position("position","");if(fixed){if(manual_spacer==null){if(el_float==="left"||el_float==="right"){elm.insertAfter(spacer);} 2587spacer.remove();} 2588return elm.removeClass(sticky_class);}};win.on("touchmove",tick);win.on("scroll",tick);win.on("resize",recalc_and_tick);$(document.body).on("sticky_kit:recalc",recalc_and_tick);elm.on("sticky_kit:detach",detach);return setTimeout(tick,0);};for(i=0,len=this.length;i<len;i++){elm=this[i];fn($(elm));} 2589return this;};}).call(this);BootstrapTabHistory={options:{defaultAnchorYOffset:0,defaultChanger:'replace',defaultUpdateURL:false,showTabsBasedOnAnchor:true}};(function(){'use strict';jQuery(function(){if(history&&history.pushState&&history.replaceState){var bootstrapTabHistory=history.state&&history.state.bootstrapTabHistory;if(bootstrapTabHistory){showTabsBasedOnState(bootstrapTabHistory);}else{showTabsBasedOnAnchor();} 2590backfillHistoryState();jQuery(document).on('shown.bs.tab show.bs.collapse',onShownTab);jQuery(window).on('popstate',onPopState);}else{showTabsBasedOnAnchor();}});var showingTabsBasedOnState=false;function backfillHistoryState(){var newState=null;jQuery('li.active > [data-tab-history], .panel-title.active [data-tab-history]').each(function(){var $activeTabElement=jQuery(this);var selector=getTabSelector($activeTabElement);if(selector){var tabGroup=getTabGroup($activeTabElement);if(tabGroup){newState=createNewHistoryState(newState||history.state,tabGroup,selector);}}});if(newState){history.replaceState(newState,'',null);}} 2591function createNewHistoryState(existingState,tabGroup,selector){var newState=jQuery.extend(true,{},existingState,{bootstrapTabHistory:{}});newState.bootstrapTabHistory[tabGroup]=selector;return newState;} 2592function getTabGroup($tab){return parseTruthyAttributeValue($tab.data('tab-history'));} 2593function getTabSelector($tab){return $tab.data('target')||$tab.attr('href');} 2594function onShownTab(shownEvt){if(!showingTabsBasedOnState){var $activatedTab=jQuery(shownEvt.target);if($activatedTab.hasClass('panel-collapse')) 2595$activatedTab=$activatedTab.closest('.panel').find('a');var selector=getTabSelector($activatedTab);if(selector){var tabGroup=getTabGroup($activatedTab);if(tabGroup){var historyChanger=$activatedTab.data('tab-history-changer')||BootstrapTabHistory.options.defaultChanger;var newState=createNewHistoryState(history.state,tabGroup,selector);var updateURL=(function($activatedTab){if(selector[0]==='#'){var elementUpdateURLOption=parseTruthyAttributeValue($activatedTab.data('tab-history-update-url'));if(elementUpdateURLOption===undefined){return BootstrapTabHistory.options.defaultUpdateURL;}else{return elementUpdateURLOption;}}else{return false;}})($activatedTab);switch(historyChanger){case'push':history.pushState(newState,'',updateURL?selector:null);break;case'replace':history.replaceState(newState,'',updateURL?selector:null);break;default:throw new Error('Unknown tab-history-changer: '+historyChanger);}}}}} 2596function onPopState(){var bootstrapTabHistory=history.state&&history.state.bootstrapTabHistory;if(bootstrapTabHistory){showTabsBasedOnState(bootstrapTabHistory);}}
2596 2597function parseTruthyAttributeValue(value){if(value){return value;}else if(value===''){return true;}else{return value;}} 2598function showTabsBasedOnAnchor(){if(BootstrapTabHistory.options.showTabsBasedOnAnchor){var anchor=window.location&&window.location.hash;if(anchor){var $tabElement=showTabForSelector(anchor);if($tabElement&&window.addEventListener&&window.removeEventListener){var anchorYOffset=(function($tabElement){var elementSetting=$tabElement.data('tab-history-anchor-y-offset');if(elementSetting===undefined){return BootstrapTabHistory.options.defaultAnchorYOffset;}else{return elementSetting;}})($tabElement);if(anchorYOffset||anchorYOffset===0){var scrollListener=function resetAnchorScroll(){window.removeEventListener('scroll',scrollListener);window.scrollTo(0,anchorYOffset);};window.addEventListener('scroll',scrollListener);}}}}} 2599function showTabForSelector(selector){var $tabElement=(function(selector){var $ret=null;jQuery('[data-toggle="tab"], [data-toggle="pill"], [data-toggle="collapse"]').each(function(){var $potentialTab=jQuery(this);if(($potentialTab.attr('href')===selector||$potentialTab.data('target')===selector)&&getTabGroup($potentialTab)){$ret=$potentialTab;return false;}else{return null;}});return $ret;})(selector);if($tabElement){if(!$tabElement.parent().hasClass('active')){$tabElement.trigger('click');}} 2600return $tabElement;} 2601function showTabsBasedOnState(bootstrapTabHistory){showingTabsBasedOnState=true;try{for(var k in bootstrapTabHistory){if(bootstrapTabHistory.hasOwnProperty(k)){showTabForSelector(bootstrapTabHistory[k]);}}}finally{showingTabsBasedOnState=false;}}})(); 2602/*! 2603 * justifiedGallery - v3.8.1 2604 * http://miromannino.github.io/Justified-Gallery/ 2605 * Copyright (c) 2020 Miro Mannino 2606 * Licensed under the MIT license. 2607 */ 2608(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');} 2609else{jQuery=require('jquery')(root);}} 2610factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function($){var JustifiedGallery=function($gallery,settings){this.settings=settings;this.checkSettings();this.imgAnalyzerTimeout=null;this.entries=null;this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0};this.lastFetchedEntry=null;this.lastAnalyzedIndex=-1;this.yield={every:2,flushed:0};this.border=settings.border>=0?settings.border:settings.margins;this.maxRowHeight=this.retrieveMaxRowHeight();this.suffixRanges=this.retrieveSuffixRanges();this.offY=this.border;this.rows=0;this.spinner={phase:0,timeSlot:150,$el:$('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null};this.scrollBarOn=false;this.checkWidthIntervalId=null;this.galleryWidth=$gallery.width();this.$gallery=$gallery;};JustifiedGallery.prototype.getSuffix=function(width,height){var longestSide,i;longestSide=(width>height)?width:height;for(i=0;i<this.suffixRanges.length;i++){if(longestSide<=this.suffixRanges[i]){return this.settings.sizeRangeSuffixes[this.suffixRanges[i]];}} 2611return this.settings.sizeRangeSuffixes[this.suffixRanges[i-1]];};JustifiedGallery.prototype.removeSuffix=function(str,suffix){return str.substring(0,str.length-suffix.length);};JustifiedGallery.prototype.endsWith=function(str,suffix){return str.indexOf(suffix,str.length-suffix.length)!==-1;};JustifiedGallery.prototype.getUsedSuffix=function(str){for(var si in this.settings.sizeRangeSuffixes){if(this.settings.sizeRangeSuffixes.hasOwnProperty(si)){if(this.settings.sizeRangeSuffixes[si].length===0)continue;if(this.endsWith(str,this.settings.sizeRangeSuffixes[si]))return this.settings.sizeRangeSuffixes[si];}} 2612return'';};JustifiedGallery.prototype.newSrc=function(imageSrc,imgWidth,imgHeight,image){var newImageSrc;if(this.settings.thumbnailPath){newImageSrc=this.settings.thumbnailPath(imageSrc,imgWidth,imgHeight,image);}else{var matchRes=imageSrc.match(this.settings.extension);var ext=(matchRes!==null)?matchRes[0]:'';newImageSrc=imageSrc.replace(this.settings.extension,'');newImageSrc=this.removeSuffix(newImageSrc,this.getUsedSuffix(newImageSrc));newImageSrc+=this.getSuffix(imgWidth,imgHeight)+ext;} 2613return newImageSrc;};JustifiedGallery.prototype.showImg=function($entry,callback){if(this.settings.cssAnimation){$entry.addClass('jg-entry-v
vendor: 21,554 bytes, lines 2613-2656
2613isible');if(callback)callback();}else{$entry.stop().fadeTo(this.settings.imagesAnimationDuration,1.0,callback);$entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1.0,callback);}};JustifiedGallery.prototype.extractImgSrcFromImage=function($image){var imageSrc=$image.data('safe-src');var imageSrcLoc='data-safe-src';if(typeof imageSrc==='undefined'){var imageCurrentSrc=$image[0].currentSrc;if(imageCurrentSrc){imageSrc=imageCurrentSrc;}else{imageSrc=$image.attr('src');} 2614imageSrcLoc='src';} 2615$image.data('jg.originalSrc',imageSrc);$image.data('jg.src',imageSrc);$image.data('jg.originalSrcLoc',imageSrcLoc);return imageSrc;};JustifiedGallery.prototype.imgFromEntry=function($entry){var $img=$entry.find(this.settings.imgSelector);if($img.length===0)$img=$entry.find('.t-entry-visual-cont img');return $img.length===0?null:$img;};JustifiedGallery.prototype.captionFromEntry=function($entry){var $caption=$entry.find('> .jg-caption');return $caption.length===0?null:$caption;};JustifiedGallery.prototype.displayEntry=function($entry,x,y,imgWidth,imgHeight,rowHeight){$entry.width(imgWidth);$entry.height(Math.floor(rowHeight));$entry.css('top',Math.floor(y));$entry.css('left',x);var $image=this.imgFromEntry($entry);if($image!==null){$image.css('width',imgWidth);$image.css('height',imgHeight);$image.css('margin-left',-imgWidth/2);$image.css('margin-top',-imgHeight/2);var imageSrc=$image.data('jg.src');if(imageSrc){imageSrc=this.newSrc(imageSrc,imgWidth,imgHeight,$image[0]);$image.one('error',function(){this.resetImgSrc($image);});var loadNewImage=function(){$image.attr('src',imageSrc);};if($entry.data('jg.loaded')==='skipped'&&imageSrc){this.onImageEvent(imageSrc,(function(){this.showImg($entry,loadNewImage);$entry.data('jg.loaded',true);}).bind(this));}else{this.showImg($entry,loadNewImage);}}}else{this.showImg($entry);} 2616this.displayEntryCaption($entry);};JustifiedGallery.prototype.displayEntryCaption=function($entry){var $image=this.imgFromEntry($entry);if($image!==null&&this.settings.captions){var $imgCaption=this.captionFromEntry($entry);if($imgCaption===null){var caption=$image.attr('alt');if(!this.isValidCaption(caption))caption=$entry.attr('title');if(this.isValidCaption(caption)){$imgCaption=$('<div class="jg-caption">'+caption+'</div>');$entry.append($imgCaption);$entry.data('jg.createdCaption',true);}} 2617if($imgCaption!==null){if(!this.settings.cssAnimation)$imgCaption.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity);this.addCaptionEventsHandlers($entry);}}else{this.removeCaptionEventsHandlers($entry);}};JustifiedGallery.prototype.isValidCaption=function(caption){return(typeof caption!=='undefined'&&caption.length>0);};JustifiedGallery.prototype.onEntryMouseEnterForCaption=function(eventObject){var $caption=this.captionFromEntry($(eventObject.currentTarget));if(this.settings.cssAnimation){$caption.addClass('jg-caption-visible').removeClass('jg-caption-hidden');}else{$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity);}};JustifiedGallery.prototype.onEntryMouseLeaveForCaption=function(eventObject){var $caption=this.captionFromEntry($(eventObject.currentTarget));if(this.settings.cssAnimation){$caption.removeClass('jg-caption-visible').removeClass('jg-caption-hidden');}else{$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity);}};JustifiedGallery.prototype.addCaptionEventsHandlers=function($entry){var captionMouseEvents=$entry.data('jg.captionMouseEvents');if(typeof captionMouseEvents==='undefined'){captionMouseEvents={mouseenter:$.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:$.proxy(this.onEntryMouseLeaveForCaption,this)};$entry.on('mouseenter',undefined,undefined,captionMouseEvents.mouseenter);$entry.on('mouseleave',undefined,undefined,captionMouseEvents.mouseleave);$entry.data('jg.captionMouseEvents',captionMouseEvents);}};JustifiedGallery.prototype.removeCaptionEventsHandlers=function($entry){var captionMouseEvents=$entry.data('jg.captionMouseEvents');if(typeof captionMouseEvents!=='undefined'){$entry.off('mouseenter',undefined,captionMouseEvents.mouseenter);$entry.off('mouseleave',undefined,captionMouseEvents.mouseleave);$entry.removeData('jg.captionMouseEvents');}};JustifiedGallery.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[];this.buildingRow.aspectRatio=0;this.buildingRow.width=0;};JustifiedGallery.prototype.prepareBuildingRow=function(isLastRow,hiddenRow){var i,$entry,imgAspectRatio,newImgW,newImgH,justify=true;var minHeight=0;var availableWidth=this.galleryWidth-2*this.border-((this.buildingRow.entriesBuff.length-1)*this.settings.margins);var rowHeight=Math.floor(availableWidth/this.buildingRow.aspectRatio);var defaultRowHeight=this.settings.rowHeight;var justifiable=this.buildingRow.width/availableWidth>this.settings.justifyThreshold;if(hiddenRow||(isLastRow&&this.settings.lastRow==='hide'&&!justifiable)){for(i=0;i<this.buildingRow.entriesBuff.length;i++){$entry=this.buildingRow.entriesBuff[i];if(this.settings.cssAnimation) 2618$entry.removeClass('jg-entry-visible');else{$entry.stop().fadeTo(0,0.1);$entry.find('> img, > a > img').fadeTo(0,0);}} 2619return-1;} 2620if(isLastRow&&!justifiable&&this.settings.lastRow!=='justify'&&this.settings.lastRow!=='hide'){justify=false;if(this.rows>0){defaultRowHeight=(this.offY-this.border-this.settings.margins*this.rows)/this.rows;justify=defaultRowHeight*this.buildingRow.aspectRatio/availableWidth>this.settings.justifyThreshold;}} 2621for(i=0;i<this.buildingRow.entriesBuff.length;i++){$entry=this.buildingRow.entriesBuff[i];imgAspectRatio=$entry.data('jg.width')/$entry.data('jg.height');if(justify){newImgW=(i===this.buildingRow.entriesBuff.length-1)?availableWidth:rowHeight*imgAspectRatio;newImgH=rowHeight;}else{newImgW=defaultRowHeight*imgAspectRatio;newImgH=defaultRowHeight;} 2622availableWidth-=Math.round(newImgW);$entry.data('jg.jwidth',Math.round(newImgW));$entry.data('jg.jheight',Math.ceil(newImgH));if(i===0||minHeight>newImgH)minHeight=newImgH;} 2623this.buildingRow.height=minHeight;return justify;};JustifiedGallery.prototype.flushRow=function(isLastRow,hiddenRow){var settings=this.settings;var $entry,buildingRowRes,offX=this.border,i;buildingRowRes=this.prepareBuildingRow(isLastRow,hiddenRow);if(hiddenRow||(isLastRow&&settings.lastRow==='hide'&&buildingRowRes===-1)){this.clearBuildingRow();return;} 2624if(this.maxRowHeight){if(this.maxRowHeight<this.buildingRow.height)this.buildingRow.height=this.maxRowHeight;} 2625if(isLastRow&&(settings.lastRow==='center'||settings.lastRow==='right')){var availableWidth=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*settings.margins;for(i=0;i<this.buildingRow.entriesBuff.length;i++){$entry=this.buildingRow.entriesBuff[i];availableWidth-=$entry.data('jg.jwidth');} 2626if(settings.lastRow==='center') 2627offX+=Math.round(availableWidth/2);else if(settings.lastRow==='right') 2628offX+=availableWidth;} 2629var lastEntryIdx=this.buildingRow.entriesBuff.length-1;for(i=0;i<=lastEntryIdx;i++){$entry=this.buildingRow.entriesBuff[this.settings.rtl?lastEntryIdx-i:i];this.displayEntry($entry,offX,this.offY,$entry.data('jg.jwidth'),$entry.data('jg.jheight'),this.buildingRow.height);offX+=$entry.data('jg.jwidth')+settings.margins;} 2630this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border;this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight());if(!isLastRow||(this.buildingRow.height<=settings.rowHeight&&buildingRowRes)){this.offY+=this.buildingRow.height+settings.margins;this.rows+=1;this.clearBuildingRow();this.settings.triggerEvent.call(this,'jg.rowflush');}};var galleryPrevStaticHeight=0;JustifiedGallery.prototype.rememberGalleryHeight=function(){galleryPrevStaticHeight=this.$gallery.height();this.$gallery.height(galleryPrevStaticHeight);};JustifiedGallery.prototype.setGalleryTempHeight=function(height){galleryPrevStaticHeight=Math.max(height,galleryPrevStaticHeight);this.$gallery.height(galleryPrevStaticHeight);};JustifiedGallery.prototype.setGalleryFinalHeight=function(height){galleryPrevStaticHeight=height;this.$gallery.height(height);};JustifiedGallery.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval($.proxy(function(){if(!this.$gallery.is(":visible"))return;var galleryWidth=parseFloat(this.$gallery.width());if(Math.abs(galleryWidth-this.galleryWidth)>this.settings.refreshSensitivity){this.galleryWidth=galleryWidth;this.rewind();this.rememberGalleryHeight();this.startImgAnalyzer(true);}},this),this.settings.refreshTime);};JustifiedGallery.prototype.isSpinnerActive=function(){return this.spinner.intervalId!==null;};JustifiedGallery.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight();};JustifiedGallery.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId);this.spinner.intervalId=null;this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight());this.spinner.$el.detach();};JustifiedGallery.prototype.startLoadingSpinnerAnimation=function(){var spinnerContext=this.spinner;var $spinnerPoints=spinnerContext.$el.find('span');clearInterval(spinnerContext.intervalId);this.$gallery.append(spinnerContext.$el);this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight());spinnerContext.intervalId=setInterval(function(){if(spinnerContext.phase<$spinnerPoints.length){$spinnerPoints.eq(spinnerContext.phase).fadeTo(spinnerContext.timeSlot,1);}else{$spinnerPoints.eq(spinnerContext.phase-$spinnerPoints.length).fadeTo(spinnerContext.timeSlot,0);} 2631spinnerContext.phase=(spinnerContext.phase+1)%($spinnerPoints.length*2);},spinnerContext.timeSlot);};JustifiedGallery.prototype.rewind=function(){this.lastFetchedEntry=null;this.lastAnalyzedIndex=-1;this.offY=this.border;this.rows=0;this.clearBuildingRow();};JustifiedGallery.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+', div:not(.jg-spinner)';};JustifiedGallery.prototype.getAllEntries=function(){var selector=this.getSelectorWithoutSpinner();return this.$gallery.children(selector).toArray();};JustifiedGallery.prototype.updateEntries=function(norewind){var newEntries;if(norewind&&this.lastFetchedEntry!=null){var selector=this.getSelectorWithoutSpinner();newEntries=$(this.lastFetchedEntry).nextAll(selector).toArray();}else{this.entries=[];newEntries=this.getAllEntries();} 2632if(newEntries.length>0){if($.isFunction(this.settings.sort)){newEntries=this.sortArray(newEntries);}else if(this.settings.randomize){newEntries=this.shuffleArray(newEntries);} 2633this.lastFetchedEntry=newEntries[newEntries.length-1];if(this.settings.filter){newEntries=this.filterArray(newEntries);}else{this.resetFilters(newEntries);}} 2634this.entries=this.entries.concat(newEntries);return true;};JustifiedGallery.prototype.insertToGallery=function(entries){var that=this;$.each(entries,function(){$(this).appendTo(that.$gallery);});};JustifiedGallery.prototype.shuffleArray=function(a){var i,j,temp;for(i=a.length-1;i>0;i--){j=Math.floor(Math.random()*(i+1));temp=a[i];a[i]=a[j];a[j]=temp;} 2635this.insertToGallery(a);return a;};JustifiedGallery.prototype.sortArray=function(a){a.sort(this.settings.sort);this.insertToGallery(a);return a;};JustifiedGallery.prototype.resetFilters=function(a){for(var i=0;i<a.length;i++)$(a[i]).removeClass('jg-filtered');};JustifiedGallery.prototype.filterArray=function(a){var settings=this.settings;if($.type(settings.filter)==='string'){return a.filter(function(el){var $el=$(el);if($el.is(settings.filter)){$el.removeClass('jg-filtered');return true;}else{$el.addClass('jg-filtered').removeClass('jg-visible');return false;}});}else if($.isFunction(settings.filter)){var filteredArr=a.filter(settings.filter);for(var i=0;i<a.length;i++){if(filteredArr.indexOf(a[i])===-1){$(a[i]).addClass('jg-filtered').removeClass('jg-visible');}else{$(a[i]).removeClass('jg-filtered');}} 2636return filteredArr;}};JustifiedGallery.prototype.resetImgSrc=function($img){if($img.data('jg.originalSrcLoc')==='src'){$img.attr('src',$img.data('jg.originalSrc'));}else{$img.attr('src','');}};JustifiedGallery.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId);this.stopImgAnalyzerStarter();$.each(this.getAllEntries(),$.proxy(function(_,entry){var $entry=$(entry);$entry.css('width','');$entry.css('height','');$entry.css('top','');$entry.css('left','');$entry.data('jg.loaded',undefined);$entry.removeClass('jg-entry jg-filtered jg-entry-visible');var $img=this.imgFromEntry($entry);if($img){$img.css('width','');$img.css('height','');$img.css('margin-left','');$img.css('margin-top','');this.resetImgSrc($img);$img.data('jg.originalSrc',undefined);$img.data('jg.originalSrcLoc',undefined);$img.data('jg.src',undefined);} 2637this.removeCaptionEventsHandlers($entry);var $caption=this.captionFromEntry($entry);if($entry.data('jg.createdCaption')){$entry.data('jg.createdCaption',undefined);if($caption!==null)$caption.remove();}else{if($caption!==null)$caption.fadeTo(0,1);}},this));this.$gallery.css('height','');this.$gallery.removeClass('justified-gallery');this.$gallery.data('jg.controller',undefined);this.settings.triggerEvent.call(this,'jg.destroy');};JustifiedGallery.prototype.analyzeImages=function(isForResize){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var $entry=$(this.entries[i]);if($entry.data('jg.loaded')===true||$entry.data('jg.loaded')==='skipped'){var availableWidth=this.galleryWidth-2*this.border-((this.buildingRow.entriesBuff.length-1)*this.settings.margins);var imgAspectRatio=$entry.data('jg.width')/$entry.data('jg.height');this.buildingRow.entriesBuff.push($entry);this.buildingRow.aspectRatio+=imgAspectRatio;this.buildingRow.width+=imgAspectRatio*this.settings.rowHeight;this.lastAnalyzedIndex=i;if(availableWidth/(this.buildingRow.aspectRatio+imgAspectRatio)<this.settings.rowHeight){this.flushRow(false,this.settings.maxRowsCount>0&&this.rows===this.settings.maxRowsCount);if(++this.yield.flushed>=this.yield.every){this.startImgAnalyzer(isForResize);return;}}}else if($entry.data('jg.loaded')!=='error'){return;}} 2638if(this.buildingRow.entriesBuff.length>0){this.flushRow(true,this.settings.maxRowsCount>0&&this.rows===this.settings.maxRowsCount);} 2639if(this.isSpinnerActive()){this.stopLoadingSpinnerAnimation();} 2640this.stopImgAnalyzerStarter();this.setGalleryFinalHeight(this.galleryHeightToSet);this.settings.triggerEvent.call(this,isForResize?'jg.resize':'jg.complete');};JustifiedGallery.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0;if(this.imgAnalyzerTimeout!==null){clearTimeout(this.imgAnalyzerTimeout);this.imgAnalyzerTimeout=null;}};JustifiedGallery.prototype.startImgAnalyzer=function(isForResize){var that=this;this.stopImgAnalyzerStarter();this.imgAnalyzerTimeout=setTimeout(function(){that.analyzeImages(isForResize);},0.001);};JustifiedGallery.prototype.onImageEvent=function(imageSrc,onLoad,onError){if(!onLoad&&!onError)return;var memImage=new Image();var $memImage=$(memImage);if(onLoad){$memImage.one('load',function(){$memImage.off('load error');onLoad(memImage);});} 2641if(onError){$memImage.one('error',function(){$memImage.off('load error');onError(memImage);});} 2642memImage.src=imageSrc;};JustifiedGallery.prototype.init=function(){var imagesToLoad=false,skippedImages=false,that=this;$.each(this.entries,function(index,entry){var $entry=$(entry);var $image=that.imgFromEntry($entry);$entry.addClass('jg-entry');if($entry.data('jg.loaded')!==true&&$entry.data('jg.loaded')!=='skipped'){if(that.settings.rel!==null)$entry.attr('rel',that.settings.rel);if(that.settings.target!==null)$entry.attr('target',that.settings.target);if($image!==null){var imageSrc=that.extractImgSrcFromImage($image);if(that.settings.waitThumbnailsLoad===false||!imageSrc){var width=parseFloat($image.attr('width'));var height=parseFloat($image.attr('height'));if($image.prop('tagName')==='svg'){width=parseFloat($image[0].getBBox().width);height=parseFloat($image[0].getBBox().height);} 2643if(!isNaN(width)&&!isNaN(height)){$entry.data('jg.width',width);$entry.data('jg.height',height);$entry.data('jg.loaded','skipped');skippedImages=true;that.startImgAnalyzer(false);return true;}} 2644$entry.data('jg.loaded',false);imagesToLoad=true;if(!that.isSpinnerActive())that.startLoadingSpinnerAnimation();that.onImageEvent(imageSrc,function(loadImg){$entry.data('jg.width',loadImg.width);$entry.data('jg.height',loadImg.height);$entry.data('jg.loaded',true);that.startImgAnalyzer(false);},function(){$entry.data('jg.loaded','error');that.startImgAnalyzer(false);});}else{$entry.data('jg.loaded',true);$entry.data('jg.width',$entry.width()|parseFloat($entry.css('width'))|1);$entry.data('jg.height',$entry.height()|parseFloat($entry.css('height'))|1);}}});if(!imagesToLoad&&!skippedImages)this.startImgAnalyzer(false);this.checkWidth();};JustifiedGallery.prototype.checkOrConvertNumber=function(settingContainer,settingName){if($.type(settingContainer[settingName])==='string'){settingContainer[settingName]=parseFloat(settingContainer[settingName]);} 2645if($.type(settingContainer[settingName])==='number'){if(isNaN(settingContainer[settingName]))throw'invalid number for '+settingName;}else{throw settingName+' must be a number';}};JustifiedGallery.prototype.checkSizeRangesSuffixes=function(){if($.type(this.settings.sizeRangeSuffixes)!=='object'){throw'sizeRangeSuffixes must be defined and must be an object';} 2646var suffixRanges=[];for(var rangeIdx in this.settings.sizeRangeSuffixes){if(this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx))suffixRanges.push(rangeIdx);} 2647var newSizeRngSuffixes={0:''};for(var i=0;i<suffixRanges.length;i++){if($.type(suffixRanges[i])==='string'){try{var numIdx=parseInt(suffixRanges[i].replace(/^[a-z]+/,''),10);newSizeRngSuffixes[numIdx]=this.settings.sizeRangeSuffixes[suffixRanges[i]];}catch(e){throw'sizeRangeSuffixes keys must contains correct numbers ('+e+')';}}else{newSizeRngSuffixes[suffixRanges[i]]=this.settings.sizeRangeSuffixes[suffixRanges[i]];}} 2648this.settings.sizeRangeSuffixes=newSizeRngSuffixes;};JustifiedGallery.prototype.retrieveMaxRowHeight=function(){var newMaxRowHeight=null;var rowHeight=this.settings.rowHeight;if($.type(this.settings.maxRowHeight)==='string'){if(this.settings.maxRowHeight.match(/^[0-9]+%$/)){newMaxRowHeight=rowHeight*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100;}else{newMaxRowHeight=parseFloat(this.settings.maxRowHeight);}}else if($.type(this.settings.maxRowHeight)==='number'){newMaxRowHeight=this.settings.maxRowHeight;}else if(this.settings.maxRowHeight===false||this.settings.maxRowHeight==null){return null;}else{throw'maxRowHeight must be a number or a percentage';} 2649if(isNaN(newMaxRowHeight))throw'invalid number for maxRowHeight';if(newMaxRowHeight<rowHeight)newMaxRowHeight=rowHeight;return newMaxRowHeight;};JustifiedGallery.prototype.checkSettings=function(){this.checkSizeRangesSuffixes();this.checkOrConvertNumber(this.settings,'rowHeight');this.checkOrConvertNumber(this.settings,'margins');this.checkOrConvertNumber(this.settings,'border');this.checkOrConvertNumber(this.settings,'maxRowsCount');var lastRowModes=['justify','nojustify','left','center','right','hide'];if(lastRowModes.indexOf(this.settings.lastRow)===-1){throw'lastRow must be one of: '+lastRowModes.join(', ');} 2650this.checkOrConvertNumber(this.settings,'justifyThreshold');if(this.settings.justifyThreshold<0||this.settings.justifyThreshold>1){throw'justifyThreshold must be in the interval [0,1]';} 2651if($.type(this.settings.cssAnimation)!=='boolean'){throw'cssAnimation must be a boolean';} 2652if($.type(this.settings.captions)!=='boolean')throw'captions must be a boolean';this.checkOrConvertNumber(this.settings.captionSettings,'animationDuration');this.checkOrConvertNumber(this.settings.captionSettings,'visibleOpacity');if(this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1){throw'captionSettings.visibleOpacity must be in the interval [0, 1]';} 2653this.checkOrConvertNumber(this.settings.captionSettings,'nonVisibleOpacity');if(this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1){throw'captionSettings.nonVisibleOpacity must be in the interval [0, 1]';} 2654this.checkOrConvertNumber(this.settings,'imagesAnimationDuration');this.checkOrConvertNumber(this.settings,'refreshTime');this.checkOrConvertNumber(this.settings,'refreshSensitivity');if($.type(this.settings.randomize)!=='boolean')throw'randomize must be a boolean';if($.type(this.settings.selector)!=='string')throw'selector must be a string';if(this.settings.sort!==false&&!$.isFunction(this.settings.sort)){throw'sort must be false or a comparison function';} 2655if(this.settings.filter!==false&&!$.isFunction(this.settings.filter)&&$.type(this.settings.filter)!=='string'){throw'filter must be false, a string or a filter function';}};JustifiedGallery.prototype.retrieveSuffixRanges=function(){var suffixRanges=[];for(var rangeIdx in this.settings.sizeRangeSuffixes){if(this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx))suffixRanges.push(parseInt(rangeIdx,10));} 2656suffixRanges.sort(function(a,b){return a>b?1:a<b?-1:0;});return suffixRanges;};JustifiedGallery.prototype.updateSettings=function(newSettings){this.settings=$.extend({},this.settings,newSettings);this.checkSettings();this.border=this.settings.border>=0?this.settings.border:this.settings.margins;this.maxRowHeight=this.retrieveMaxRowHeight();this.suffixRanges=this.retrieveSuffixRanges();};JustifiedGallery.prototype.defaults={sizeRangeSuffixes:{}
2656,thumbnailPath:undefined,rowHeight:120,maxRowHeight:false,maxRowsCount:0,margins:1,border:-1,lastRow:'nojustify',justifyThreshold:0.90,waitThumbnailsLoad:true,captions:true,cssAnimation:true,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:0.7,nonVisibleOpacity:0.0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:false,rtl:false,sort:false,filter:false,selector:'a',imgSelector:'> img, > a > img, > svg, > a > svg',triggerEvent:function(event){this.$gallery.trigger(event);}};$.fn.justifiedGallery=function(arg){return this.each(function(index,gallery){var $gallery=$(gallery);$gallery.addClass('justified-gallery');var controller=$gallery.data('jg.controller');if(typeof controller==='undefined'){if(typeof arg!=='undefined'&&arg!==null&&$.type(arg)!=='object'){if(arg==='destroy')return;throw'The argument must be an object';} 2657controller=new JustifiedGallery($gallery,$.extend({},JustifiedGallery.prototype.defaults,arg));$gallery.data('jg.controller',controller);}else if(arg==='norewind'){}else if(arg==='destroy'){controller.destroy();return;}else{controller.updateSettings(arg);controller.rewind();} 2658if(!controller.updateEntries(arg==='norewind'))return;controller.init();});};})); 2659/*! 2660* Customized version of iScroll.js 0.0.1 2661* It fixes bugs affecting its integration with fullpage.js 2662*/ 2663/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */ 2664(function(window,document,Math){var rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};var utils=(function(){var me={};var _elementStyle=document.createElement('div').style;var _vendor=(function(){var vendors=['t','webkitT','MozT','msT','OT'],transform,i=0,l=vendors.length;for(;i<l;i++){transform=vendors[i]+'ransform';if(transform in _elementStyle)return vendors[i].substr(0,vendors[i].length-1);} 2665return false;})();function _prefixStyle(style){if(_vendor===false)return false;if(_vendor==='')return style;return _vendor+style.charAt(0).toUpperCase()+style.substr(1);} 2666me.getTime=Date.now||function getTime(){return new Date().getTime();};me.extend=function(target,obj){for(var i in obj){target[i]=obj[i];}};me.addEvent=function(el,type,fn,capture){el.addEventListener(type,fn,!!capture);};me.removeEvent=function(el,type,fn,capture){el.removeEventListener(type,fn,!!capture);};me.prefixPointerEvent=function(pointerEvent){return window.MSPointerEvent?'MSPointer'+pointerEvent.charAt(7).toUpperCase()+pointerEvent.substr(8):pointerEvent;};me.momentum=function(current,start,time,lowerMargin,wrapperSize,deceleration){var distance=current-start,speed=Math.abs(distance)/time,destination,duration;deceleration=deceleration===undefined?0.0006:deceleration;destination=current+(speed*speed)/(2*deceleration)*(distance<0?-1:1);duration=speed/deceleration;if(destination<lowerMargin){destination=wrapperSize?lowerMargin-(wrapperSize/2.5*(speed/8)):lowerMargin;distance=Math.abs(destination-current);duration=distance/speed;}else if(destination>0){destination=wrapperSize?wrapperSize/2.5*(speed/8):0;distance=Math.abs(current)+destination;duration=distance/speed;} 2667return{destination:Math.round(destination),duration:duration};};var _transform=_prefixStyle('transform');me.extend(me,{hasTransform:_transform!==false,hasPerspective:_prefixStyle('perspective')in _elementStyle,hasTouch:'ontouchstart'in window,hasPointer:!!(window.PointerEvent||window.MSPointerEvent),hasTransition:_prefixStyle('transition')in _elementStyle});me.isBadAndroid=(function(){var appVersion=window.navigator.appVersion;if(/Android/.test(appVersion)&&!(/Chrome\/\d/.test(appVersion))){var safariVersion=appVersion.match(/Safari\/(\d+.\d)/);if(safariVersion&&typeof safariVersion==="object"&&safariVersion.length>=2){return parseFloat(safariVersion[1])<535.19;}else{return true;}}else{return false;}})();me.extend(me.style={},{transform:_transform,transitionTimingFunction:_prefixStyle('transitionTimingFunction'),transitionDuration:_prefixStyle('transitionDuration'),transitionDelay:_prefixStyle('transitionDelay'),transformOrigin:_prefixStyle('transformOrigin')});
vendor: 19,872 bytes, lines 2667-2749
2667me.hasClass=function(e,c){var re=new RegExp("(^|\\s)"+c+"(\\s|$)");return re.test(e.className);};me.addClass=function(e,c){if(me.hasClass(e,c)){return;} 2668var newclass=e.className.split(' ');newclass.push(c);e.className=newclass.join(' ');};me.removeClass=function(e,c){if(!me.hasClass(e,c)){return;} 2669var re=new RegExp("(^|\\s)"+c+"(\\s|$)",'g');e.className=e.className.replace(re,' ');};me.offset=function(el){var left=-el.offsetLeft,top=-el.offsetTop;while(el=el.offsetParent){left-=el.offsetLeft;top-=el.offsetTop;} 2670return{left:left,top:top};};me.preventDefaultException=function(el,exceptions){for(var i in exceptions){if(exceptions[i].test(el[i])){return true;}} 2671return false;};me.extend(me.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3});me.extend(me.ease={},{quadratic:{style:'cubic-bezier(0.25, 0.46, 0.45, 0.94)',fn:function(k){return k*(2-k);}},circular:{style:'cubic-bezier(0.1, 0.57, 0.1, 1)',fn:function(k){return Math.sqrt(1-(--k*k));}},back:{style:'cubic-bezier(0.175, 0.885, 0.32, 1.275)',fn:function(k){var b=4;return(k=k-1)*k*((b+1)*k+b)+1;}},bounce:{style:'',fn:function(k){if((k/=1)<(1/2.75)){return 7.5625*k*k;}else if(k<(2/2.75)){return 7.5625*(k-=(1.5/2.75))*k+0.75;}else if(k<(2.5/2.75)){return 7.5625*(k-=(2.25/2.75))*k+0.9375;}else{return 7.5625*(k-=(2.625/2.75))*k+0.984375;}}},elastic:{style:'',fn:function(k){var f=0.22,e=0.4;if(k===0){return 0;} 2672if(k==1){return 1;} 2673return(e*Math.pow(2,-10*k)*Math.sin((k-f/4)*(2*Math.PI)/f)+1);}}});me.tap=function(e,eventName){var ev=document.createEvent('Event');ev.initEvent(eventName,true,true);ev.pageX=e.pageX;ev.pageY=e.pageY;e.target.dispatchEvent(ev);};me.click=function(e){var target=e.target,ev;if(!(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName)){ev=document.createEvent(window.MouseEvent?'MouseEvents':'Event');ev.initEvent('click',true,true);ev.view=e.view||window;ev.detail=1;ev.screenX=target.screenX||0;ev.screenY=target.screenY||0;ev.clientX=target.clientX||0;ev.clientY=target.clientY||0;ev.ctrlKey=!!e.ctrlKey;ev.altKey=!!e.altKey;ev.shiftKey=!!e.shiftKey;ev.metaKey=!!e.metaKey;ev.button=0;ev.relatedTarget=null;ev._constructed=true;target.dispatchEvent(ev);}};return me;})();function IScroll(el,options){this.wrapper=typeof el=='string'?document.querySelector(el):el;this.scroller=this.wrapper.children[0];this.scrollerStyle=this.scroller.style;this.options={resizeScrollbars:true,mouseWheelSpeed:20,snapThreshold:0.334,disablePointer:!utils.hasPointer,disableTouch:utils.hasPointer||!utils.hasTouch,disableMouse:utils.hasPointer||utils.hasTouch,startX:0,startY:0,scrollY:true,directionLockThreshold:5,momentum:true,bounce:true,bounceTime:600,bounceEasing:'',preventDefault:true,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/},HWCompositing:true,useTransition:true,useTransform:true,bindToWrapper:typeof window.onmousedown==="undefined"};for(var i in options){this.options[i]=options[i];} 2674this.translateZ=this.options.HWCompositing&&utils.hasPerspective?' translateZ(0)':'';this.options.useTransition=utils.hasTransition&&this.options.useTransition;this.options.useTransform=utils.hasTransform&&this.options.useTransform;this.options.eventPassthrough=this.options.eventPassthrough===true?'vertical':this.options.eventPassthrough;this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault;this.options.scrollY=this.options.eventPassthrough=='vertical'?false:this.options.scrollY;this.options.scrollX=this.options.eventPassthrough=='horizontal'?false:this.options.scrollX;this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough;this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold;this.options.bounceEasing=typeof this.options.bounceEasing=='string'?utils.ease[this.options.bounceEasing]||utils.ease.circular:this.options.bounceEasing;this.options.resizePolling=this.options.resizePolling===undefined?60:this.options.resizePolling;if(this.options.tap===true){this.options.tap='tap';} 2675if(!this.options.useTransition&&!this.options.useTransform){if(!(/relative|absolute/i).test(this.scrollerStyle.position)){this.scrollerStyle.position="relative";}} 2676if(this.options.shrinkScrollbars=='scale'){this.options.useTransition=false;} 2677this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1;this.x=0;this.y=0;this.directionX=0;this.directionY=0;this._events={};this._init();this.refresh();this.scrollTo(this.options.startX,this.options.startY);this.enable();} 2678IScroll.prototype={version:'5.2.0',_init:function(){this._initEvents();if(this.options.scrollbars||this.options.indicators){this._initIndicators();} 2679if(this.options.mouseWheel){this._initWheel();} 2680if(this.options.snap){this._initSnap();} 2681if(this.options.keyBindings){this._initKeys();}},destroy:function(){this._initEvents(true);clearTimeout(this.resizeTimeout);this.resizeTimeout=null;this._execEvent('destroy');},_transitionEnd:function(e){if(e.target!=this.scroller||!this.isInTransition){return;} 2682this._transitionTime();if(!this.resetPosition(this.options.bounceTime)){this.isInTransition=false;this._execEvent('scrollEnd');}},_start:function(e){if(utils.eventType[e.type]!=1){var button;if(!e.which){button=(e.button<2)?0:((e.button==4)?1:2);}else{button=e.button;} 2683if(button!==0){return;}} 2684if(!this.enabled||(this.initiated&&utils.eventType[e.type]!==this.initiated)){return;} 2685if(this.options.preventDefault&&!utils.isBadAndroid&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)){e.preventDefault();} 2686var point=e.touches?e.touches[0]:e,pos;this.initiated=utils.eventType[e.type];this.moved=false;this.distX=0;this.distY=0;this.directionX=0;this.directionY=0;this.directionLocked=0;this.startTime=utils.getTime();if(this.options.useTransition&&this.isInTransition){this._transitionTime();this.isInTransition=false;pos=this.getComputedPosition();this._translate(Math.round(pos.x),Math.round(pos.y));this._execEvent('scrollEnd');}else if(!this.options.useTransition&&this.isAnimating){this.isAnimating=false;this._execEvent('scrollEnd');} 2687this.startX=this.x;this.startY=this.y;this.absStartX=this.x;this.absStartY=this.y;this.pointX=point.pageX;this.pointY=point.pageY;this._execEvent('beforeScrollStart');},_move:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated){return;} 2688if(this.options.preventDefault){e.preventDefault();} 2689var point=e.touches?e.touches[0]:e,deltaX=point.pageX-this.pointX,deltaY=point.pageY-this.pointY,timestamp=utils.getTime(),newX,newY,absDistX,absDistY;this.pointX=point.pageX;this.pointY=point.pageY;this.distX+=deltaX;this.distY+=deltaY;absDistX=Math.abs(this.distX);absDistY=Math.abs(this.distY);if(timestamp-this.endTime>300&&(absDistX<10&&absDistY<10)){return;} 2690if(!this.directionLocked&&!this.options.freeScroll){if(absDistX>absDistY+this.options.directionLockThreshold){this.directionLocked='h';}else if(absDistY>=absDistX+this.options.directionLockThreshold){this.directionLocked='v';}else{this.directionLocked='n';}} 2691if(this.directionLocked=='h'){if(this.options.eventPassthrough=='vertical'){e.preventDefault();}else if(this.options.eventPassthrough=='horizontal'){this.initiated=false;return;} 2692deltaY=0;}else if(this.directionLocked=='v'){if(this.options.eventPassthrough=='horizontal'){e.preventDefault();}else if(this.options.eventPassthrough=='vertical'){this.initiated=false;return;} 2693deltaX=0;} 2694deltaX=this.hasHorizontalScroll?deltaX:0;deltaY=this.hasVerticalScroll?deltaY:0;newX=this.x+deltaX;newY=this.y+deltaY;if(newX>0||newX<this.maxScrollX){newX=this.options.bounce?this.x+deltaX/3:newX>0?0:this.maxScrollX;} 2695if(newY>0||newY<this.maxScrollY){newY=this.options.bounce?this.y+deltaY/3:newY>0?0:this.maxScrollY;} 2696this.directionX=deltaX>0?-1:deltaX<0?1:0;this.directionY=deltaY>0?-1:deltaY<0?1:0;if(!this.moved){this._execEvent('scrollStart');} 2697this.moved=true;this._translate(newX,newY);if(timestamp-this.startTime>300){this.startTime=timestamp;this.startX=this.x;this.startY=this.y;}},_end:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated){return;} 2698if(this.options.preventDefault&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)){e.preventDefault();} 2699var point=e.changedTouches?e.changedTouches[0]:e,momentumX,momentumY,duration=utils.getTime()-this.startTime,newX=Math.round(this.x),newY=Math.round(this.y),distanceX=Math.abs(newX-this.startX),distanceY=Math.abs(newY-this.startY),time=0,easing='';this.isInTransition=0;this.initiated=0;this.endTime=utils.getTime();if(this.resetPosition(this.options.bounceTime)){return;} 2700this.scrollTo(newX,newY);if(!this.moved){if(this.options.tap){utils.tap(e,this.options.tap);} 2701if(this.options.click){utils.click(e);} 2702this._execEvent('scrollCancel');return;} 2703if(this._events.flick&&duration<200&&distanceX<100&&distanceY<100){this._execEvent('flick');return;} 2704if(this.options.momentum&&duration<300){momentumX=this.hasHorizontalScroll?utils.momentum(this.x,this.startX,duration,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:newX,duration:0};momentumY=this.hasVerticalScroll?utils.momentum(this.y,this.startY,duration,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:newY,duration:0};newX=momentumX.destination;newY=momentumY.destination;time=Math.max(momentumX.duration,momentumY.duration);this.isInTransition=1;} 2705if(this.options.snap){var snap=this._nearestSnap(newX,newY);this.currentPage=snap;time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(newX-snap.x),1000),Math.min(Math.abs(newY-snap.y),1000)),300);newX=snap.x;newY=snap.y;this.directionX=0;this.directionY=0;easing=this.options.bounceEasing;} 2706if(newX!=this.x||newY!=this.y){if(newX>0||newX<this.maxScrollX||newY>0||newY<this.maxScrollY){easing=utils.ease.quadratic;} 2707this.scrollTo(newX,newY,time,easing);return;} 2708this._execEvent('scrollEnd');},_resize:function(){var that=this;clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout(function(){that.refresh();},this.options.resizePolling);},resetPosition:function(time){var x=this.x,y=this.y;time=time||0;if(!this.hasHorizontalScroll||this.x>0){x=0;}else if(this.x<this.maxScrollX){x=this.maxScrollX;} 2709if(!this.hasVerticalScroll||this.y>0){y=0;}else if(this.y<this.maxScrollY){y=this.maxScrollY;} 2710if(x==this.x&&y==this.y){return false;} 2711this.scrollTo(x,y,time,this.options.bounceEasing);return true;},disable:function(){this.enabled=false;},enable:function(){this.enabled=true;},refresh:function(){var rf=this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth;this.wrapperHeight=this.wrapper.clientHeight;this.scrollerWidth=this.scroller.offsetWidth;this.scrollerHeight=this.scroller.offsetHeight;this.maxScrollX=this.wrapperWidth-this.scrollerWidth;this.maxScrollY=this.wrapperHeight-this.scrollerHeight;this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0;this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0;if(!this.hasHorizontalScroll){this.maxScrollX=0;this.scrollerWidth=this.wrapperWidth;} 2712if(!this.hasVerticalScroll){this.maxScrollY=0;this.scrollerHeight=this.wrapperHeight;} 2713this.endTime=0;this.directionX=0;this.directionY=0;this.wrapperOffset=utils.offset(this.wrapper);this._execEvent('refresh');this.resetPosition();},on:function(type,fn){if(!this._events[type]){this._events[type]=[];} 2714this._events[type].push(fn);},off:function(type,fn){if(!this._events[type]){return;} 2715var index=this._events[type].indexOf(fn);if(index>-1){this._events[type].splice(index,1);}},_execEvent:function(type){if(!this._events[type]){return;} 2716var i=0,l=this._events[type].length;if(!l){return;} 2717for(;i<l;i++){this._events[type][i].apply(this,[].slice.call(arguments,1));}},scrollBy:function(x,y,time,easing){x=this.x+x;y=this.y+y;time=time||0;this.scrollTo(x,y,time,easing);},scrollTo:function(x,y,time,easing){easing=easing||utils.ease.circular;this.isInTransition=this.options.useTransition&&time>0;var transitionType=this.options.useTransition&&easing.style;if(!time||transitionType){if(transitionType){this._transitionTimingFunction(easing.style);this._transitionTime(time);} 2718this._translate(x,y);}else{this._animate(x,y,time,easing.fn);}},scrollToElement:function(el,time,offsetX,offsetY,easing){el=el.nodeType?el:this.scroller.querySelector(el);if(!el){return;} 2719var pos=utils.offset(el);pos.left-=this.wrapperOffset.left;pos.top-=this.wrapperOffset.top;if(offsetX===true){offsetX=Math.round(el.offsetWidth/2-this.wrapper.offsetWidth/2);} 2720if(offsetY===true){offsetY=Math.round(el.offsetHeight/2-this.wrapper.offsetHeight/2);} 2721pos.left-=offsetX||0;pos.top-=offsetY||0;pos.left=pos.left>0?0:pos.left<this.maxScrollX?this.maxScrollX:pos.left;pos.top=pos.top>0?0:pos.top<this.maxScrollY?this.maxScrollY:pos.top;time=time===undefined||time===null||time==='auto'?Math.max(Math.abs(this.x-pos.left),Math.abs(this.y-pos.top)):time;this.scrollTo(pos.left,pos.top,time,easing);},_transitionTime:function(time){if(!this.options.useTransition){return;} 2722time=time||0;var durationProp=utils.style.transitionDuration;if(!durationProp){return;} 2723this.scrollerStyle[durationProp]=time+'ms';if(!time&&utils.isBadAndroid){this.scrollerStyle[durationProp]='0.0001ms';var self=this;rAF(function(){if(self.scrollerStyle[durationProp]==='0.0001ms'){self.scrollerStyle[durationProp]='0s';}});} 2724if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].transitionTime(time);}}},_transitionTimingFunction:function(easing){this.scrollerStyle[utils.style.transitionTimingFunction]=easing;if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].transitionTimingFunction(easing);}}},_translate:function(x,y){if((" "+this.wrapper.className+" ").replace(/[\n\t]/g," ").indexOf(" no-scrolloverflow ")>-1) 2725return false;if(this.options.useTransform){this.scrollerStyle[utils.style.transform]='translate('+x+'px,'+y+'px)'+this.translateZ;}else{x=Math.round(x);y=Math.round(y);this.scrollerStyle.left=x+'px';this.scrollerStyle.top=y+'px';} 2726this.x=x;this.y=y;if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].updatePosition();}} 2727var uncodevent=new CustomEvent('fp-slide-scroll');window.dispatchEvent(uncodevent);},_initEvents:function(remove){var eventType=remove?utils.removeEvent:utils.addEvent,target=this.options.bindToWrapper?this.wrapper:window;eventType(window,'orientationchange',this);eventType(window,'resize',this);if(this.options.click){eventType(this.wrapper,'click',this,true);} 2728if(!this.options.disableMouse){eventType(this.wrapper,'mousedown',this);eventType(target,'mousemove',this);eventType(target,'mousecancel',this);eventType(target,'mouseup',this);} 2729if(utils.hasPointer&&!this.options.disablePointer){eventType(this.wrapper,utils.prefixPointerEvent('pointerdown'),this);eventType(target,utils.prefixPointerEvent('pointermove'),this);eventType(target,utils.prefixPointerEvent('pointercancel'),this);eventType(target,utils.prefixPointerEvent('pointerup'),this);} 2730if(utils.hasTouch&&!this.options.disableTouch){eventType(this.wrapper,'touchstart',this);eventType(target,'touchmove',this);eventType(target,'touchcancel',this);eventType(target,'touchend',this);} 2731eventType(this.scroller,'transitionend',this);eventType(this.scroller,'webkitTransitionEnd',this);eventType(this.scroller,'oTransitionEnd',this);eventType(this.scroller,'MSTransitionEnd',this);},getComputedPosition:function(){var matrix=window.getComputedStyle(this.scroller,null),x,y;if(this.options.useTransform){matrix=matrix[utils.style.transform].split(')')[0].split(', ');x=+(matrix[12]||matrix[4]);y=+(matrix[13]||matrix[5]);}else{x=+matrix.left.replace(/[^-\d.]/g,'');y=+matrix.top.replace(/[^-\d.]/g,'');} 2732return{x:x,y:y};},_initIndicators:function(){var interactive=this.options.interactiveScrollbars,customStyle=typeof this.options.scrollbars!='string',indicators=[],indicator;var that=this;this.indicators=[];if(this.options.scrollbars){if(this.options.scrollY){indicator={el:createDefaultScrollbar('v',interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:true,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:false};this.wrapper.appendChild(indicator.el);indicators.push(indicator);} 2733if(this.options.scrollX){indicator={el:createDefaultScrollbar('h',interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:true,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:false};this.wrapper.appendChild(indicator.el);indicators.push(indicator);}} 2734if(this.options.indicators){indicators=indicators.concat(this.options.indicators);} 2735for(var i=indicators.length;i--;){this.indicators.push(new Indicator(this,indicators[i]));} 2736function _indicatorsMap(fn){if(that.indicators){for(var i=that.indicators.length;i--;){fn.call(that.indicators[i]);}}} 2737if(this.options.fadeScrollbars){this.on('scrollEnd',function(){_indicatorsMap(function(){this.fade();});});this.on('scrollCancel',function(){_indicatorsMap(function(){this.fade();});});this.on('scrollStart',function(){_indicatorsMap(function(){this.fade(1);});});this.on('beforeScrollStart',function(){_indicatorsMap(function(){this.fade(1,true);});});} 2738this.on('refresh',function(){_indicatorsMap(function(){this.refresh();});});this.on('destroy',function(){_indicatorsMap(function(){this.destroy();});delete this.indicators;});},_initWheel:function(){utils.addEvent(this.wrapper,'wheel',this);utils.addEvent(this.wrapper,'mousewheel',this);utils.addEvent(this.wrapper,'DOMMouseScroll',this);this.on('destroy',function(){clearTimeout(this.wheelTimeout);this.wheelTimeout=null;utils.removeEvent(this.wrapper,'wheel',this);utils.removeEvent(this.wrapper,'mousewheel',this);utils.removeEvent(this.wrapper,'DOMMouseScroll',this);});},_wheel:function(e){if(!this.enabled){return;} 2739var wheelDeltaX,wheelDeltaY,newX,newY,that=this;if(this.wheelTimeout===undefined){that._execEvent('scrollStart');} 2740clearTimeout(this.wheelTimeout);this.wheelTimeout=setTimeout(function(){if(!that.options.snap){that._execEvent('scrollEnd');} 2741that.wheelTimeout=undefined;},400);if('deltaX'in e){if(e.deltaMode===1){wheelDeltaX=-e.deltaX*this.options.mouseWheelSpeed;wheelDeltaY=-e.deltaY*this.options.mouseWheelSpeed;}else{wheelDeltaX=-e.deltaX;wheelDeltaY=-e.deltaY;}}else if('wheelDeltaX'in e){wheelDeltaX=e.wheelDeltaX/120*this.options.mouseWheelSpeed;wheelDeltaY=e.wheelDeltaY/120*this.options.mouseWheelSpeed;}else if('wheelDelta'in e){wheelDeltaX=wheelDeltaY=e.wheelDelta/120*this.options.mouseWheelSpeed;}else if('detail'in e){wheelDeltaX=wheelDeltaY=-e.detail/3*this.options.mouseWheelSpeed;}else{return;} 2742wheelDeltaX*=this.options.invertWheelDirection;wheelDeltaY*=this.options.invertWheelDirection;if(!this.hasVerticalScroll){wheelDeltaX=wheelDeltaY;wheelDeltaY=0;} 2743if(this.options.snap){newX=this.currentPage.pageX;newY=this.currentPage.pageY;if(wheelDeltaX>0){newX--;}else if(wheelDeltaX<0){newX++;} 2744if(wheelDeltaY>0){newY--;}else if(wheelDeltaY<0){newY++;} 2745this.goToPage(newX,newY);return;} 2746newX=this.x+Math.round(this.hasHorizontalScroll?wheelDeltaX:0);newY=this.y+Math.round(this.hasVerticalScroll?wheelDeltaY:0);this.directionX=wheelDeltaX>0?-1:wheelDeltaX<0?1:0;this.directionY=wheelDeltaY>0?-1:wheelDeltaY<0?1:0;if(newX>0){newX=0;}else if(newX<this.maxScrollX){newX=this.maxScrollX;} 2747if(newY>0){newY=0;}else if(newY<this.maxScrollY){newY=this.maxScrollY;} 2748this.scrollTo(newX,newY,0);},_initSnap:function(){this.currentPage={};if(typeof this.options.snap=='string'){this.options.snap=this.scroller.querySelectorAll(this.options.snap);} 2749this.on('refresh',function(){var i=0,l,m=0,n,cx,cy,x=0,y,stepX=this.options.snapStepX||this.wrapperW
vendor: 4,493 bytes, lines 2749-2772
2749idth,stepY=this.options.snapStepY||this.wrapperHeight,el;this.pages=[];if(!this.wrapperWidth||!this.wrapperHeight||!this.scrollerWidth||!this.scrollerHeight){return;} 2750if(this.options.snap===true){cx=Math.round(stepX/2);cy=Math.round(stepY/2);while(x>-this.scrollerWidth){this.pages[i]=[];l=0;y=0;while(y>-this.scrollerHeight){this.pages[i][l]={x:Math.max(x,this.maxScrollX),y:Math.max(y,this.maxScrollY),width:stepX,height:stepY,cx:x-cx,cy:y-cy};y-=stepY;l++;} 2751x-=stepX;i++;}}else{el=this.options.snap;l=el.length;n=-1;for(;i<l;i++){if(i===0||el[i].offsetLeft<=el[i-1].offsetLeft){m=0;n++;} 2752if(!this.pages[m]){this.pages[m]=[];} 2753x=Math.max(-el[i].offsetLeft,this.maxScrollX);y=Math.max(-el[i].offsetTop,this.maxScrollY);cx=x-Math.round(el[i].offsetWidth/2);cy=y-Math.round(el[i].offsetHeight/2);this.pages[m][n]={x:x,y:y,width:el[i].offsetWidth,height:el[i].offsetHeight,cx:cx,cy:cy};if(x>this.maxScrollX){m++;}}} 2754this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0);if(this.options.snapThreshold%1===0){this.snapThresholdX=this.options.snapThreshold;this.snapThresholdY=this.options.snapThreshold;}else{this.snapThresholdX=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold);this.snapThresholdY=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold);}});this.on('flick',function(){var time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.x-this.startX),1000),Math.min(Math.abs(this.y-this.startY),1000)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,time);});},_nearestSnap:function(x,y){if(!this.pages.length){return{x:0,y:0,pageX:0,pageY:0};} 2755var i=0,l=this.pages.length,m=0;if(Math.abs(x-this.absStartX)<this.snapThresholdX&&Math.abs(y-this.absStartY)<this.snapThresholdY){return this.currentPage;} 2756if(x>0){x=0;}else if(x<this.maxScrollX){x=this.maxScrollX;} 2757if(y>0){y=0;}else if(y<this.maxScrollY){y=this.maxScrollY;} 2758for(;i<l;i++){if(x>=this.pages[i][0].cx){x=this.pages[i][0].x;break;}} 2759l=this.pages[i].length;for(;m<l;m++){if(y>=this.pages[0][m].cy){y=this.pages[0][m].y;break;}} 2760if(i==this.currentPage.pageX){i+=this.directionX;if(i<0){i=0;}else if(i>=this.pages.length){i=this.pages.length-1;} 2761x=this.pages[i][0].x;} 2762if(m==this.currentPage.pageY){m+=this.directionY;if(m<0){m=0;}else if(m>=this.pages[0].length){m=this.pages[0].length-1;} 2763y=this.pages[0][m].y;} 2764return{x:x,y:y,pageX:i,pageY:m};},goToPage:function(x,y,time,easing){easing=easing||this.options.bounceEasing;if(x>=this.pages.length){x=this.pages.length-1;}else if(x<0){x=0;} 2765if(y>=this.pages[x].length){y=this.pages[x].length-1;}else if(y<0){y=0;} 2766var posX=this.pages[x][y].x,posY=this.pages[x][y].y;time=time===undefined?this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(posX-this.x),1000),Math.min(Math.abs(posY-this.y),1000)),300):time;this.currentPage={x:posX,y:posY,pageX:x,pageY:y};this.scrollTo(posX,posY,time,easing);},next:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x++;if(x>=this.pages.length&&this.hasVerticalScroll){x=0;y++;} 2767this.goToPage(x,y,time,easing);},prev:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x--;if(x<0&&this.hasVerticalScroll){x=0;y--;} 2768this.goToPage(x,y,time,easing);},_initKeys:function(e){var keys={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};var i;if(typeof this.options.keyBindings=='object'){for(i in this.options.keyBindings){if(typeof this.options.keyBindings[i]=='string'){this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0);}}}else{this.options.keyBindings={};} 2769for(i in keys){this.options.keyBindings[i]=this.options.keyBindings[i]||keys[i];} 2770utils.addEvent(window,'keydown',this);this.on('destroy',function(){utils.removeEvent(window,'keydown',this);});},_key:function(e){if(!this.enabled){return;} 2771var snap=this.options.snap,newX=snap?this.currentPage.pageX:this.x,newY=snap?this.currentPage.pageY:this.y,now=utils.getTime(),prevTime=this.keyTime||0,acceleration=0.250,pos;if(this.options.useTransition&&this.isInTransition){pos=this.getComputedPosition();this._translate(Math.round(pos.x),Math.round(pos.y));this.isInTransition=false;} 2772this.keyAcceleration=now-prevTime<200?Math.min(this.keyAcceleration+acceleration,50):0;switch(e.keyCode){case this.options.keyBindings.pageUp:if(this.hasHorizontalScroll&&!this.hasVerticalScroll){newX+=snap?1:this.wrapperW
vendor: 9,133 bytes, lines 2772-2806
2772idth;}else{newY+=snap?1:this.wrapperHeight;} 2773break;case this.options.keyBindings.pageDown:if(this.hasHorizontalScroll&&!this.hasVerticalScroll){newX-=snap?1:this.wrapperWidth;}else{newY-=snap?1:this.wrapperHeight;} 2774break;case this.options.keyBindings.end:newX=snap?this.pages.length-1:this.maxScrollX;newY=snap?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:newX=0;newY=0;break;case this.options.keyBindings.left:newX+=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:newY+=snap?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:newX-=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:newY-=snap?1:5+this.keyAcceleration>>0;break;default:return;} 2775if(snap){this.goToPage(newX,newY);return;} 2776if(newX>0){newX=0;this.keyAcceleration=0;}else if(newX<this.maxScrollX){newX=this.maxScrollX;this.keyAcceleration=0;} 2777if(newY>0){newY=0;this.keyAcceleration=0;}else if(newY<this.maxScrollY){newY=this.maxScrollY;this.keyAcceleration=0;} 2778this.scrollTo(newX,newY,0);this.keyTime=now;},_animate:function(destX,destY,duration,easingFn){var that=this,startX=this.x,startY=this.y,startTime=utils.getTime(),destTime=startTime+duration;function step(){var now=utils.getTime(),newX,newY,easing;if(now>=destTime){that.isAnimating=false;that._translate(destX,destY);if(!that.resetPosition(that.options.bounceTime)){that._execEvent('scrollEnd');} 2779return;} 2780now=(now-startTime)/duration;easing=easingFn(now);newX=(destX-startX)*easing+startX;newY=(destY-startY)*easing+startY;that._translate(newX,newY);if(that.isAnimating){rAF(step);}} 2781this.isAnimating=true;step();},handleEvent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'MSPointerDown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'MSPointerMove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'MSPointerUp':case'mouseup':case'touchcancel':case'pointercancel':case'MSPointerCancel':case'mousecancel':this._end(e);break;case'orientationchange':case'resize':this._resize();break;case'transitionend':case'webkitTransitionEnd':case'oTransitionEnd':case'MSTransitionEnd':this._transitionEnd(e);break;case'wheel':case'DOMMouseScroll':case'mousewheel':this._wheel(e);break;case'keydown':this._key(e);break;case'click':if(this.enabled&&!e._constructed){e.preventDefault();e.stopPropagation();} 2782break;}}};function createDefaultScrollbar(direction,interactive,type){var scrollbar=document.createElement('div'),indicator=document.createElement('div');if(type===true){scrollbar.style.cssText='position:absolute;z-index:9999';indicator.style.cssText='-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px';} 2783indicator.className='iScrollIndicator';if(direction=='h'){if(type===true){scrollbar.style.cssText+=';height:7px;left:2px;right:2px;bottom:0';indicator.style.height='100%';} 2784scrollbar.className='iScrollHorizontalScrollbar';}else{if(type===true){scrollbar.style.cssText+=';width:7px;bottom:2px;top:2px;right:1px';indicator.style.width='100%';} 2785scrollbar.className='iScrollVerticalScrollbar';} 2786scrollbar.style.cssText+=';overflow:hidden';if(!interactive){scrollbar.style.pointerEvents='none';} 2787scrollbar.appendChild(indicator);return scrollbar;} 2788function Indicator(scroller,options){this.wrapper=typeof options.el=='string'?document.querySelector(options.el):options.el;this.wrapperStyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorStyle=this.indicator.style;this.scroller=scroller;this.options={listenX:true,listenY:true,interactive:false,resize:true,defaultScrollbars:false,shrink:false,fade:false,speedRatioX:0,speedRatioY:0};for(var i in options){this.options[i]=options[i];} 2789this.sizeRatioX=1;this.sizeRatioY=1;this.maxPosX=0;this.maxPosY=0;if(this.options.interactive){if(!this.options.disableTouch){utils.addEvent(this.indicator,'touchstart',this);utils.addEvent(window,'touchend',this);} 2790if(!this.options.disablePointer){utils.addEvent(this.indicator,utils.prefixPointerEvent('pointerdown'),this);utils.addEvent(window,utils.prefixPointerEvent('pointerup'),this);} 2791if(!this.options.disableMouse){utils.addEvent(this.indicator,'mousedown',this);utils.addEvent(window,'mouseup',this);}} 2792if(this.options.fade){this.wrapperStyle[utils.style.transform]=this.scroller.translateZ;var durationProp=utils.style.transitionDuration;if(!durationProp){return;} 2793this.wrapperStyle[durationProp]=utils.isBadAndroid?'0.0001ms':'0ms';var self=this;if(utils.isBadAndroid){rAF(function(){if(self.wrapperStyle[durationProp]==='0.0001ms'){self.wrapperStyle[durationProp]='0s';}});} 2794this.wrapperStyle.opacity='0';}} 2795Indicator.prototype={handleEvent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'MSPointerDown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'MSPointerMove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'MSPointerUp':case'mouseup':case'touchcancel':case'pointercancel':case'MSPointerCancel':case'mousecancel':this._end(e);break;}},destroy:function(){if(this.options.fadeScrollbars){clearTimeout(this.fadeTimeout);this.fadeTimeout=null;} 2796if(this.options.interactive){utils.removeEvent(this.indicator,'touchstart',this);utils.removeEvent(this.indicator,utils.prefixPointerEvent('pointerdown'),this);utils.removeEvent(this.indicator,'mousedown',this);utils.removeEvent(window,'touchmove',this);utils.removeEvent(window,utils.prefixPointerEvent('pointermove'),this);utils.removeEvent(window,'mousemove',this);utils.removeEvent(window,'touchend',this);utils.removeEvent(window,utils.prefixPointerEvent('pointerup'),this);utils.removeEvent(window,'mouseup',this);} 2797if(this.options.defaultScrollbars){this.wrapper.parentNode.removeChild(this.wrapper);}},_start:function(e){var point=e.touches?e.touches[0]:e;e.preventDefault();e.stopPropagation();this.transitionTime();this.initiated=true;this.moved=false;this.lastPointX=point.pageX;this.lastPointY=point.pageY;this.startTime=utils.getTime();if(!this.options.disableTouch){utils.addEvent(window,'touchmove',this);} 2798if(!this.options.disablePointer){utils.addEvent(window,utils.prefixPointerEvent('pointermove'),this);} 2799if(!this.options.disableMouse){utils.addEvent(window,'mousemove',this);} 2800this.scroller._execEvent('beforeScrollStart');},_move:function(e){var point=e.touches?e.touches[0]:e,deltaX,deltaY,newX,newY,timestamp=utils.getTime();if(!this.moved){this.scroller._execEvent('scrollStart');} 2801this.moved=true;deltaX=point.pageX-this.lastPointX;this.lastPointX=point.pageX;deltaY=point.pageY-this.lastPointY;this.lastPointY=point.pageY;newX=this.x+deltaX;newY=this.y+deltaY;this._pos(newX,newY);e.preventDefault();e.stopPropagation();},_end:function(e){if(!this.initiated){return;} 2802this.initiated=false;e.preventDefault();e.stopPropagation();utils.removeEvent(window,'touchmove',this);utils.removeEvent(window,utils.prefixPointerEvent('pointermove'),this);utils.removeEvent(window,'mousemove',this);if(this.scroller.options.snap){var snap=this.scroller._nearestSnap(this.scroller.x,this.scroller.y);var time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-snap.x),1000),Math.min(Math.abs(this.scroller.y-snap.y),1000)),300);if(this.scroller.x!=snap.x||this.scroller.y!=snap.y){this.scroller.directionX=0;this.scroller.directionY=0;this.scroller.currentPage=snap;this.scroller.scrollTo(snap.x,snap.y,time,this.scroller.options.bounceEasing);}} 2803if(this.moved){this.scroller._execEvent('scrollEnd');}},transitionTime:function(time){time=time||0;var durationProp=utils.style.transitionDuration;if(!durationProp){return;} 2804this.indicatorStyle[durationProp]=time+'ms';if(!time&&utils.isBadAndroid){this.indicatorStyle[durationProp]='0.0001ms';var self=this;rAF(function(){if(self.indicatorStyle[durationProp]==='0.0001ms'){self.indicatorStyle[durationProp]='0s';}});}},transitionTimingFunction:function(easing){this.indicatorStyle[utils.style.transitionTimingFunction]=easing;},refresh:function(){this.transitionTime();if(this.options.listenX&&!this.options.listenY){this.indicatorStyle.display=this.scroller.hasHorizontalScroll?'block':'none';}else if(this.options.listenY&&!this.options.listenX){this.indicatorStyle.display=this.scroller.hasVerticalScroll?'block':'none';}else{this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?'block':'none';} 2805if(this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll){utils.addClass(this.wrapper,'iScrollBothScrollbars');utils.removeClass(this.wrapper,'iScrollLoneScrollbar');if(this.options.defaultScrollbars&&this.options.customStyle){if(this.options.listenX){this.wrapper.style.right='8px';}else{this.wrapper.style.bottom='8px';}}}else{utils.removeClass(this.wrapper,'iScrollBothScrollbars');utils.addClass(this.wrapper,'iScrollLoneScrollbar');if(this.options.defaultScrollbars&&this.options.customStyle){if(this.options.listenX){this.wrapper.style.right='2px';}else{this.wrapper.style.bottom='2px';}}} 2806var r=this.wrapper.offsetHeight;
vendor: 4,176 bytes, lines 2806-2827
2806if(this.options.listenX){this.wrapperWidth=this.wrapper.clientWidth;if(this.options.resize){this.indicatorWidth=Math.max(Math.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8);this.indicatorStyle.width=this.indicatorWidth+'px';}else{this.indicatorWidth=this.indicator.clientWidth;} 2807this.maxPosX=this.wrapperWidth-this.indicatorWidth;if(this.options.shrink=='clip'){this.minBoundaryX=-this.indicatorWidth+8;this.maxBoundaryX=this.wrapperWidth-8;}else{this.minBoundaryX=0;this.maxBoundaryX=this.maxPosX;} 2808this.sizeRatioX=this.options.speedRatioX||(this.scroller.maxScrollX&&(this.maxPosX/this.scroller.maxScrollX));} 2809if(this.options.listenY){this.wrapperHeight=this.wrapper.clientHeight;if(this.options.resize){this.indicatorHeight=Math.max(Math.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8);this.indicatorStyle.height=this.indicatorHeight+'px';}else{this.indicatorHeight=this.indicator.clientHeight;} 2810this.maxPosY=this.wrapperHeight-this.indicatorHeight;if(this.options.shrink=='clip'){this.minBoundaryY=-this.indicatorHeight+8;this.maxBoundaryY=this.wrapperHeight-8;}else{this.minBoundaryY=0;this.maxBoundaryY=this.maxPosY;} 2811this.maxPosY=this.wrapperHeight-this.indicatorHeight;this.sizeRatioY=this.options.speedRatioY||(this.scroller.maxScrollY&&(this.maxPosY/this.scroller.maxScrollY));} 2812this.updatePosition();},updatePosition:function(){var x=this.options.listenX&&Math.round(this.sizeRatioX*this.scroller.x)||0,y=this.options.listenY&&Math.round(this.sizeRatioY*this.scroller.y)||0;if(!this.options.ignoreBoundaries){if(x<this.minBoundaryX){if(this.options.shrink=='scale'){this.width=Math.max(this.indicatorWidth+x,8);this.indicatorStyle.width=this.width+'px';} 2813x=this.minBoundaryX;}else if(x>this.maxBoundaryX){if(this.options.shrink=='scale'){this.width=Math.max(this.indicatorWidth-(x-this.maxPosX),8);this.indicatorStyle.width=this.width+'px';x=this.maxPosX+this.indicatorWidth-this.width;}else{x=this.maxBoundaryX;}}else if(this.options.shrink=='scale'&&this.width!=this.indicatorWidth){this.width=this.indicatorWidth;this.indicatorStyle.width=this.width+'px';} 2814if(y<this.minBoundaryY){if(this.options.shrink=='scale'){this.height=Math.max(this.indicatorHeight+y*3,8);this.indicatorStyle.height=this.height+'px';} 2815y=this.minBoundaryY;}else if(y>this.maxBoundaryY){if(this.options.shrink=='scale'){this.height=Math.max(this.indicatorHeight-(y-this.maxPosY)*3,8);this.indicatorStyle.height=this.height+'px';y=this.maxPosY+this.indicatorHeight-this.height;}else{y=this.maxBoundaryY;}}else if(this.options.shrink=='scale'&&this.height!=this.indicatorHeight){this.height=this.indicatorHeight;this.indicatorStyle.height=this.height+'px';}} 2816this.x=x;this.y=y;if(this.scroller.options.useTransform){this.indicatorStyle[utils.style.transform]='translate('+x+'px,'+y+'px)'+this.scroller.translateZ;}else{this.indicatorStyle.left=x+'px';this.indicatorStyle.top=y+'px';}},_pos:function(x,y){if(x<0){x=0;}else if(x>this.maxPosX){x=this.maxPosX;} 2817if(y<0){y=0;}else if(y>this.maxPosY){y=this.maxPosY;} 2818x=this.options.listenX?Math.round(x/this.sizeRatioX):this.scroller.x;y=this.options.listenY?Math.round(y/this.sizeRatioY):this.scroller.y;this.scroller.scrollTo(x,y);},fade:function(val,hold){if(hold&&!this.visible){return;} 2819clearTimeout(this.fadeTimeout);this.fadeTimeout=null;var time=val?250:500,delay=val?0:300;val=val?'1':'0';this.wrapperStyle[utils.style.transitionDuration]=time+'ms';this.fadeTimeout=setTimeout((function(val){this.wrapperStyle.opacity=val;this.visible=+val;}).bind(this,val),delay);}};IScroll.utils=utils;if(typeof module!='undefined'&&module.exports){module.exports=IScroll;}else if(typeof define=='function'&&define.amd){define(function(){return IScroll;});}else{window.IScroll=IScroll;}})(window,document,Math); 2820/*! 2821 * fullPage 2.9.4 2822 * https://github.com/alvarotrigo/fullPage.js 2823 * @license MIT licensed 2824 * 2825 * Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo 2826 */ 2827(function(global,factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],function($){return factory($,global,global.document,global.Math);});}
2827else if(typeof exports==="object"&&exports){module.exports=factory(require('jquery'),global,global.document,global.Math);}else{factory(jQuery,global,global.document,global.Math);}})(typeof window!=='undefined'?window:this,function($,window,document,Math,undefined){'use strict';var WRAPPER='fullpage-wrapper';var WRAPPER_SEL='.'+WRAPPER;var SCROLLABLE='fp-scrollable';var SCROLLABLE_SEL='.'+SCROLLABLE;var RESPONSIVE='fp-responsive';var NO_TRANSITION='fp-notransition';var DESTROYED='fp-destroyed';var ENABLED='fp-enabled';var VIEWING_PREFIX='fp-viewing';var ACTIVE='active';var ACTIVE_SEL='.'+ACTIVE;var COMPLETELY='fp-completely';var COMPLETELY_SEL='.'+COMPLETELY;var SECTION_DEFAULT_SEL='.section';var SECTION='fp-section';var SECTION_SEL='.'+SECTION;var SECTION_ACTIVE_SEL=SECTION_SEL+ACTIVE_SEL;var SECTION_FIRST_SEL=SECTION_SEL+':first';var SECTION_LAST_SEL=SECTION_SEL+':last';var TABLE_CELL='fp-tableCell';var TABLE_CELL_SEL='.'+TABLE_CELL;var AUTO_HEIGHT='fp-auto-height';var AUTO_HEIGHT_SEL='.fp-auto-height';var NORMAL_SCROLL='fp-normal-scroll';var NORMAL_SCROLL_SEL='.fp-normal-scroll';var SECTION_NAV='fp-nav';var SECTION_NAV_SEL='#'+SECTION_NAV;var SECTION_NAV_TOOLTIP='fp-tooltip';var SECTION_NAV_TOOLTIP_SEL='.'+SECTION_NAV_TOOLTIP;var SHOW_ACTIVE_TOOLTIP='fp-show-active';var SLIDE_DEFAULT_SEL='.slide';var SLIDE='fp-slide';var SLIDE_SEL='.'+SLIDE;var SLIDE_ACTIVE_SEL=SLIDE_SEL+ACTIVE_SEL;var SLIDES_WRAPPER='fp-slides';var SLIDES_WRAPPER_SEL='.'+SLIDES_WRAPPER;var SLIDES_CONTAINER='fp-slidesContainer';var SLIDES_CONTAINER_SEL='.'+SLIDES_CONTAINER;var TABLE='fp-table';var SLIDES_NAV='fp-slidesNav';var SLIDES_NAV_SEL='.'+SLIDES_NAV;var SLIDES_NAV_LINK_SEL=SLIDES_NAV_SEL+' a';var SLIDES_ARROW='fp-controlArrow';var SLIDES_ARROW_SEL='.'+SLIDES_ARROW;var SLIDES_PREV='fp-prev';var SLIDES_PREV_SEL='.'+SLIDES_PREV;var SLIDES_ARROW_PREV=SLIDES_ARROW+' '+SLIDES_PREV;var SLIDES_ARROW_PREV_SEL=SLIDES_ARROW_SEL+SLIDES_PREV_SEL;var SLIDES_NEXT='fp-next';var SLIDES_NEXT_SEL='.'+SLIDES_NEXT;var SLIDES_ARROW_NEXT=SLIDES_ARROW+' '+SLIDES_NEXT;var SLIDES_ARROW_NEXT_SEL=SLIDES_ARROW_SEL+SLIDES_NEXT_SEL;var $window=$(window);var $document=$(document);var iscrollOptions={scrollbars:true,mouseWheel:true,hideScrollbars:false,fadeScrollbars:false,disableMouse:true,interactiveScrollbars:true,bounce:false,};$.fn.fullpage=function(options){if($('html').hasClass(ENABLED)){displayWarnings();return;} 2828var $htmlBody=$('html, body');var $body=$('body');var FP=$.fn.fullpage;options=$.extend({menu:false,anchors:[],lockAnchors:false,navigation:false,navigationPosition:'right',navigationTooltips:[],showActiveTooltip:false,slidesNavigation:false,slidesNavPosition:'bottom',scrollBar:false,hybrid:false,css3:true,scrollingSpeed:700,autoScrolling:true,fitToSection:true,fitToSectionDelay:1000,easing:'easeInOutCubic',easingcss3:'ease',loopBottom:false,loopTop:false,loopHorizontal:true,continuousVertical:false,continuousHorizontal:false,scrollHorizontally:false,interlockedSlides:false,dragAndMove:false,offsetSections:false,resetSliders:false,fadingEffect:false,normalScrollElements:null,scrollOverflow:false,scrollOverflowReset:false,scrollOverflowHandler:iscrollHandler,scrollOverflowOptions:null,touchSensitivity:5,normalScrollElementTouchThreshold:5,bigSectionsDestination:null,keyboardScrolling:true,animateAnchor:true,recordHistory:true,controlArrows:true,controlArrowColor:'#fff',verticalCentered:true,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,responsiveSlides:false,parallax:false,parallaxOptions:{type:'reveal',percentage:62,property:'translate'},sectionSelector:SECTION_DEFAULT_SEL,slideSelector:SLIDE_DEFAULT_SEL,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null,afterResponsive:null,lazyLoading:true},options);var slideMoving=false;var isTouchDevice=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);var isTouch=(('ontouchstart'in window)||(navigator.msMaxTouchPoints>0)||(navigator.maxTouchPoints));var container=$(this);var windowsHeight=$window.height();var isResizing=false;var isWindowFocused=true;var lastScrolledDestiny;var lastScrolledSlide;var canScroll=true;var scrollings=[];var controlPressed;var startingSection;var isScrollAllowed={};isScrollAllowed.m={'up':true,'down':true,'left':true,'right':true};isScrollAllowed.k=$.extend(true,{},isScrollAllowed.m);var MSPointer=getMSPointer();var events={touchmove:'ontouchmove'in window?'touchmove':MSPointer.move,touchstart:'ontouchstart'in window?'touchstart':MSPointer.down};var g_supportsPassive=false;try{var opts=Object.defineProperty({},'passive',{get:function(){g_supportsPassive=true;}});window.addEventListener("testPassive",null,opts);window.removeEventListener("testPassive",null,opts);}catch(e){} 2829var resizeId;var afterSectionLoadsId;var afterSlideLoadsId;var scrollId;var scrollId2;
2829var keydownId;var originals=$.extend(true,{},options);var $masthead=$('#masthead');var hideMenu=!$('body').hasClass('vmenu')&&$('body').hasClass('uncode-fp-menu-hide')?true:false;var menuHeight=$masthead.hasClass('menu-transparent')||hideMenu?0:UNCODE.menuHeight;var bodyBorder=UNCODE.bodyBorder;var adminBarHeight=UNCODE.adminBarHeight;displayWarnings();iscrollOptions.click=isTouch;iscrollOptions=$.extend(iscrollOptions,options.scrollOverflowOptions);$.extend($.easing,{easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;}});function setAutoScrolling(value,type){if(!value){silentScroll(0);} 2830setVariableState('autoScrolling',value,type);var element=$(SECTION_ACTIVE_SEL);if(options.autoScrolling&&!options.scrollBar){$htmlBody.css({'overflow':'hidden !important','height':'100%'});container.css({'-ms-touch-action':'none','touch-action':'none'});if(element.length){silentScroll(element.position().top);}}else{$htmlBody.css({'overflow':'visible !important','height':'initial'});container.css({'-ms-touch-action':'','touch-action':''});if(element.length){$htmlBody.scrollTop(element.position().top);}}} 2831function setRecordHistory(value,type){setVariableState('recordHistory',value,type);} 2832function setScrollingSpeed(value,type){setVariableState('scrollingSpeed',value,type);} 2833function setFitToSection(value,type){setVariableState('fitToSection',value,type);} 2834function setLockAnchors(value){options.lockAnchors=value;} 2835function setMouseWheelScrolling(value){if(value){addMouseWheelHandler();addMiddleWheelHandler();}else{removeMouseWheelHandler();removeMiddleWheelHandler();}} 2836function setAllowScrolling(value,directions){if(typeof directions!=='undefined'){directions=directions.replace(/ /g,'').split(',');$.each(directions,function(index,direction){setIsScrollAllowed(value,direction,'m');});} 2837else if(value){setMouseWheelScrolling(true);addTouchHandler();}else{setMouseWheelScrolling(false);removeTouchHandler();}} 2838function setKeyboardScrolling(value,directions){if(typeof directions!=='undefined'){directions=directions.replace(/ /g,'').split(',');$.each(directions,function(index,direction){setIsScrollAllowed(value,direction,'k');});}else{options.keyboardScrolling=value;}} 2839function moveSectionUp(){var prev=$(SECTION_ACTIVE_SEL).prev(SECTION_SEL);if(!prev.length&&(options.loopTop||options.continuousVertical)){prev=$(SECTION_SEL).last();} 2840if(prev.length){scrollPage(prev,null,true);}} 2841function moveSectionDown(){var next=$(SECTION_ACTIVE_SEL).next(SECTION_SEL);if(!next.length&&(options.loopBottom||options.continuousVertical)){next=$(SECTION_SEL).first();} 2842if(next.length){scrollPage(next,null,false);}} 2843function silentMoveTo(sectionAnchor,slideAnchor){setScrollingSpeed(0,'internal');moveTo(sectionAnchor,slideAnchor);setScrollingSpeed(originals.scrollingSpeed,'internal');} 2844function moveTo(sectionAnchor,slideAnchor){var destiny=getSectionByAnchor(sectionAnchor);if(typeof slideAnchor!=='undefined'){scrollPageAndSlide(sectionAnchor,slideAnchor);}else if(destiny.length>0){scrollPage(destiny);}} 2845function moveSlideRight(section){moveSlide('right',section);} 2846function moveSlideLeft(section){moveSlide('left',section);} 2847function reBuild(resizing){if(container.hasClass(DESTROYED)){return;} 2848isResizing=true;windowsHeight=$window.height();$(SECTION_SEL).each(function(){var slidesWrap=$(this).find(SLIDES_WRAPPER_SEL);var slides=$(this).find(SLIDE_SEL);if(options.verticalCentered){$(this).find(TABLE_CELL_SEL).css('height',getTableHeight($(this))+'px');} 2849$(this).css('height',windowsHeight+'px');if(options.scrollOverflow){if(slides.length){slides.each(function(){createScrollBar($(this));});}else{createScrollBar($(this));}} 2850if(slides.length>1){landscapeScroll(slidesWrap,slidesWrap.find(SLIDE_ACTIVE_SEL));}});var activeSection=$(SECTION_ACTIVE_SEL);var sectionIndex=activeSection.index(SECTION_SEL);if(sectionIndex){silentMoveTo(sectionIndex+1);} 2851isResizing=false;$.isFunction(options.afterResize)&&resizing&&options.afterResize.call(container,getTableHeight());$.isFunction(options.afterReBuild)&&!resizing&&options.afterReBuild.call(container);} 2852function setResponsive(active){var isResponsive=$body.hasClass(RESPONSIVE);if(active){if(!isResponsive){setAutoScrolling(false,'internal');
2852setFitToSection(false,'internal');$(SECTION_NAV_SEL).hide();$body.addClass(RESPONSIVE);$.isFunction(options.afterResponsive)&&options.afterResponsive.call(container,active);}} 2853else if(isResponsive){setAutoScrolling(originals.autoScrolling,'internal');setFitToSection(originals.autoScrolling,'internal');$(SECTION_NAV_SEL).show();$body.removeClass(RESPONSIVE);$.isFunction(options.afterResponsive)&&options.afterResponsive.call(container,active);}} 2854if($(this).length){FP.setAutoScrolling=setAutoScrolling;FP.setRecordHistory=setRecordHistory;FP.setScrollingSpeed=setScrollingSpeed;FP.setFitToSection=setFitToSection;FP.setLockAnchors=setLockAnchors;FP.setMouseWheelScrolling=setMouseWheelScrolling;FP.setAllowScrolling=setAllowScrolling;FP.setKeyboardScrolling=setKeyboardScrolling;FP.moveSectionUp=moveSectionUp;FP.moveSectionDown=moveSectionDown;FP.silentMoveTo=silentMoveTo;FP.moveTo=moveTo;FP.moveSlideRight=moveSlideRight;FP.moveSlideLeft=moveSlideLeft;FP.fitToSection=fitToSection;FP.reBuild=reBuild;FP.setResponsive=setResponsive;FP.destroy=destroy;init();bindEvents();} 2855function init(){if(options.css3){options.css3=support3d();} 2856options.scrollBar=options.scrollBar||options.hybrid;setOptionsFromDOM();prepareDom();setAllowScrolling(true);setAutoScrolling(options.autoScrolling,'internal');responsive();setBodyClass();} 2857function bindEvents(){$window.on('hashchange',hashChangeHandler).blur(blurHandler).resize(resizeHandler);$document.keydown(keydownHandler).keyup(keyUpHandler).on('click touchstart',SECTION_NAV_SEL+' a',sectionBulletHandler).on('click touchstart',SLIDES_NAV_LINK_SEL,slideBulletHandler).on('click',SECTION_NAV_TOOLTIP_SEL,tooltipTextHandler);$(SECTION_SEL).on('click touchstart',SLIDES_ARROW_SEL,slideArrowHandler);if(options.normalScrollElements){$document.on('mouseenter',options.normalScrollElements,function(){setMouseWheelScrolling(false);});$document.on('mouseleave',options.normalScrollElements,function(){setMouseWheelScrolling(true);});}} 2858function setOptionsFromDOM(){var sections=container.find(options.sectionSelector);if(!options.anchors.length){options.anchors=sections.filter('[data-anchor]').map(function(){return $(this).data('anchor').toString();}).get();} 2859if(!options.navigationTooltips.length){options.navigationTooltips=sections.filter('[data-tooltip]').map(function(){return $(this).data('tooltip').toString();}).get();}} 2860function prepareDom(){container.css({'height':'100%','position':'relative'});container.addClass(WRAPPER);$('html').addClass(ENABLED);windowsHeight=$window.height();container.removeClass(DESTROYED);addInternalSelectors();$(SECTION_SEL).each(function(index){var section=$(this);var slides=section.find(SLIDE_SEL);var numSlides=slides.length;styleSection(section,index);styleMenu(section,index);if(numSlides>0){styleSlides(section,slides,numSlides);}else{if(options.verticalCentered){addTableClass(section);}}});if(options.fixedElements&&options.css3){$(options.fixedElements).appendTo($body);} 2861if(options.navigation){addVerticalNavigation();} 2862enableYoutubeAPI();
2862if(options.scrollOverflow){if(document.readyState==='complete'){createScrollBarHandler();} 2863$window.on('load',createScrollBarHandler);}else{afterRenderActions();}} 2864function styleSlides(section,slides,numSlides){var sliderWidth=numSlides*100;var slideWidth=100/numSlides;slides.wrapAll('<div class="'+SLIDES_CONTAINER+'" />');slides.parent().wrap('<div class="'+SLIDES_WRAPPER+'" />');section.find(SLIDES_CONTAINER_SEL).css('width',sliderWidth+'%');if(numSlides>1){if(options.controlArrows){createSlideArrows(section);} 2865if(options.slidesNavigation){addSlidesNavigation(section,numSlides);}} 2866slides.each(function(index){$(this).css('width',slideWidth+'%');if(options.verticalCentered){addTableClass($(this));}});var startingSlide=section.find(SLIDE_ACTIVE_SEL);if(startingSlide.length&&($(SECTION_ACTIVE_SEL).index(SECTION_SEL)!==0||($(SECTION_ACTIVE_SEL).index(SECTION_SEL)===0&&startingSlide.index()!==0))){silentLandscapeScroll(startingSlide,'internal');}else{slides.eq(0).addClass(ACTIVE);}} 2867function styleSection(section,index){if(!index&&$(SECTION_ACTIVE_SEL).length===0){section.addClass(ACTIVE);} 2868startingSection=$(SECTION_ACTIVE_SEL);section.css('height',windowsHeight+'px');if(options.paddingTop){section.css('padding-top',options.paddingTop);} 2869if(options.paddingBottom){section.css('padding-bottom',options.paddingBottom);} 2870if(typeof options.sectionsColor[index]!=='undefined'){section.css('background-color',options.sectionsColor[index]);} 2871if(typeof options.anchors[index]!=='undefined'){section.attr('data-anchor',options.anchors[index]);}} 2872function styleMenu(section,index){if(typeof options.anchors[index]!=='undefined'){if(section.hasClass(ACTIVE)){activateMenuAndNav(options.anchors[index],index);}} 2873if(options.menu&&options.css3&&$(options.menu).closest(WRAPPER_SEL).length){$(options.menu).appendTo($body);}} 2874function addInternalSelectors(){container.find(options.sectionSelector).addClass(SECTION);container.find(options.slideSelector).addClass(SLIDE);} 2875function createSlideArrows(section){section.find(SLIDES_WRAPPER_SEL).after('<div class="'+SLIDES_ARROW_PREV+'"></div><div class="'+SLIDES_ARROW_NEXT+'"></div>');if(options.controlArrowColor!='#fff'){section.find(SLIDES_ARROW_NEXT_SEL).css('border-color','transparent transparent transparent '+options.controlArrowColor);section.find(SLIDES_ARROW_PREV_SEL).css('border-color','transparent '+options.controlArrowColor+' transparent transparent');} 2876if(!options.loopHorizontal){section.find(SLIDES_ARROW_PREV_SEL).hide();}} 2877function addVerticalNavigation(){$body.append('<div id="'+SECTION_NAV+'"><ul></ul></div>');var nav=$(SECTION_NAV_SEL);nav.addClass(function(){return options.showActiveTooltip?SHOW_ACTIVE_TOOLTIP+' '+options.navigationPosition:options.navigationPosition;});for(var i=0;i<$(SECTION_SEL).length;i++){var link='';if(options.anchors.length){link=options.anchors[i];} 2878var li='<li><a href="#'+link+'"><span></span></a>';var tooltip=options.navigationTooltips[i];if(typeof tooltip!=='undefined'&&tooltip!==''){li+='<div class="'+SECTION_NAV_TOOLTIP+' '+options.navigationPosition+'">'+tooltip+'</div>';} 2879li+='</li>';nav.find('ul').append(li);} 2880$(SECTION_NAV_SEL).css('margin-top','-'+($(SECTION_NAV_SEL).height()/2)+'px');$(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);} 2881function createScrollBarHandler(){$(SECTION_SEL).each(function(){var slides=$(this).find(SLIDE_SEL);if(slides.length){slides.each(function(){createScrollBar($(this));});}else{createScrollBar($(this));}});afterRenderActions();} 2882function enableYoutubeAPI(){container.find('iframe[src*="youtube.com/embed/"]').each(function(){addURLParam($(this),'enablejsapi=1');});} 2883function addURLParam(element,newParam){var originalSrc=element.attr('src');element.attr('src',originalSrc+getUrlParamSign(originalSrc)+newParam);} 2884function getUrlParamSign(url){return(!/\?/.test(url))?'?':'&';} 2885function afterRenderActions(){var section=$(SECTION_ACTIVE_SEL);section.addClass(COMPLETELY);if(options.scrollOverflowHandler.afterRender){options.scrollOverflowHandler.afterRender(section);} 2886lazyLoad(section);playMedia(section);options.scrollOverflowHandler.afterLoad();if(isDestinyTheStartingSection()){$.isFunction(options.afterLoad)&&options.afterLoad.call(section,section.data('anchor'),(section.index(SECTION_SEL)+1));} 2887$.isFunction(options.afterRender)&&options.afterRender.call(container,getTableHeight());} 2888function isDestinyTheStartingSection(){var anchors=window.location.hash.replace('#','').split('/');var destinationSection=getSectionByAnchor(decodeURIComponent(anchors[0]));return!destinationSection.length||destinationSection.length&&destinationSection.index()===startingSection.index();} 2889var isScrolling=false;var lastScroll=0;function scrollHandler(){var currentSection;if(!options.autoScrolling||options.scrollBar){var currentScroll=$window.scrollTop();var scrollDirection=getScrollDirection(currentScroll);var visibleSectionIndex=0;var screen_mid=currentScroll+($window.height()/2.0);var isAtBottom=$body.height()-$window.height()===currentScroll;var sections=document.querySelectorAll(SECTION_SEL);if(isAtBottom){visibleSectionIndex=sections.length-1;} 2890else if(!currentScroll){visibleSectionIndex=0;} 2891else{for(var i=0;i<sections.length;++i){var section=sections[i];if(section.offsetTop<=screen_mid) 2892{visibleSectionIndex=i;}}}
2893if(isCompletelyInViewPort(scrollDirection)){if(!$(SECTION_ACTIVE_SEL).hasClass(COMPLETELY)){$(SECTION_ACTIVE_SEL).addClass(COMPLETELY).siblings().removeClass(COMPLETELY);}} 2894currentSection=$(sections).eq(visibleSectionIndex);if(!currentSection.hasClass(ACTIVE)){isScrolling=true;var leavingSection=$(SECTION_ACTIVE_SEL);var leavingSectionIndex=leavingSection.index(SECTION_SEL)+1;var yMovement=getYmovement(currentSection);var anchorLink=currentSection.data('anchor');var sectionIndex=currentSection.index(SECTION_SEL)+1;var activeSlide=currentSection.find(SLIDE_ACTIVE_SEL);var slideIndex;var slideAnchorLink;if(activeSlide.length){slideAnchorLink=activeSlide.data('anchor');slideIndex=activeSlide.index();} 2895if(canScroll){currentSection.addClass(ACTIVE).siblings().removeClass(ACTIVE);$.isFunction(options.onLeave)&&options.onLeave.call(leavingSection,leavingSectionIndex,sectionIndex,yMovement);$.isFunction(options.afterLoad)&&options.afterLoad.call(currentSection,anchorLink,sectionIndex);stopMedia(leavingSection);lazyLoad(currentSection);playMedia(currentSection);activateMenuAndNav(anchorLink,sectionIndex-1);if(options.anchors.length){lastScrolledDestiny=anchorLink;} 2896setState(slideIndex,slideAnchorLink,anchorLink,sectionIndex);} 2897clearTimeout(scrollId);scrollId=setTimeout(function(){isScrolling=false;},100);} 2898if(options.fitToSection){clearTimeout(scrollId2);scrollId2=setTimeout(function(){if(options.fitToSection){fitToSection();}},options.fitToSectionDelay);}}} 2899function fitToSection(){if(canScroll){isResizing=true;scrollPage($(SECTION_ACTIVE_SEL));isResizing=false;}} 2900function isCompletelyInViewPort(movement){var top=$(SECTION_ACTIVE_SEL).position().top;var bottom=top+$window.height();if(movement=='up'){return bottom>=($window.scrollTop()+$window.height());} 2901return top<=$window.scrollTop();} 2902function getScrollDirection(currentScroll){var direction=currentScroll>lastScroll?'down':'up';lastScroll=currentScroll;previousDestTop=currentScroll;return direction;} 2903function scrolling(type,scrollable){if(!isScrollAllowed.m[type]){return;} 2904var check=(type==='down')?'bottom':'top';var scrollSection=(type==='down')?moveSectionDown:moveSectionUp;if(scrollable.length>0){if(options.scrollOverflowHandler.isScrolled(check,scrollable)){scrollSection();}else{return true;}}else{scrollSection();}} 2905function preventBouncing(event){var e=event.originalEvent;if(!checkParentForNormalScrollElement(event.target)&&options.autoScrolling&&isReallyTouch(e)&&isScrollAllowed.m.up){event.preventDefault();}} 2906var touchStartY=0;var touchStartX=0;var touchEndY=0;var touchEndX=0;function touchMoveHandler(event){var e=event.originalEvent;var activeSection=$(e.target).closest(SECTION_SEL);if(!checkParentForNormalScrollElement(event.target)&&isReallyTouch(e)){if(options.autoScrolling){event.preventDefault();} 2907var scrollable=options.scrollOverflowHandler.scrollable(activeSection);var touchEvents=getEventsPage(e);touchEndY=touchEvents.y;touchEndX=touchEvents.x;if(activeSection.find(SLIDES_WRAPPER_SEL).length&&Math.abs(touchStartX-touchEndX)>(Math.abs(touchStartY-touchEndY))){if(!slideMoving&&Math.abs(touchStartX-touchEndX)>($window.outerWidth()/100*options.touchSensitivity)){if(touchStartX>touchEndX){if(isScrollAllowed.m.right){moveSlideRight(activeSection);}}else{if(isScrollAllowed.m.left){moveSlideLeft(activeSection);}}}} 2908else if(options.autoScrolling&&canScroll){if(Math.abs(touchStartY-touchEndY)>($window.height()/100*options.touchSensitivity)){if(touchStartY>touchEndY){scrolling('down',scrollable);}else if(touchEndY>touchStartY){scrolling('up',scrollable);}}}}} 2909function checkParentForNormalScrollElement(el,hop){hop=hop||0;var parent=$(el).parent();if(hop<options.normalScrollElementTouchThreshold&&parent.is(options.normalScrollElements)){return true;}else if(hop==options.normalScrollElementTouchThreshold){return false;}else{return checkParentForNormalScrollElement(parent,++hop);}} 2910function isReallyTouch(e){return typeof e.pointerType==='undefined'||e.pointerType!='mouse';} 2911function touchStartHandler(event){var e=event.originalEvent;if(options.fitToSection){$htmlBody.stop();} 2912if(isReallyTouch(e)){var touchEvents=getEventsPage(e);touchStartY=touchEvents.y;touchStartX=touchEvents.x;}} 2913function getAverage(elements,number){var sum=0;var lastElements=elements.slice(Math.max(elements.length-number,1));for(var i=0;i<lastElements.length;i++){sum=sum+lastElements[i];} 2914return Math.ceil(sum/number);} 2915var prevTime=new Date().getTime();function MouseWheelHandler(e){var curTime=new Date().getTime();var isNormalScroll=$(COMPLETELY_SEL).hasClass(NORMAL_SCROLL);if(options.autoScrolling&&!controlPressed&&!isNormalScroll){e=e||window.event;var value=e.wheelDelta||-e.deltaY||-e.detail;var delta=Math.max(-1,Math.min(1,value));var horizontalDetection=typeof e.wheelDeltaX!=='undefined'||typeof e.deltaX!=='undefined';var isScrollingVertically=(Math.abs(e.wheelDeltaX)<Math.abs(e.wheelDelta))||(Math.abs(e.deltaX)<Math.abs(e.deltaY)||!horizontalDetection);if(scrollings.length>149){scrollings.shift();} 2916scrollings.push(Math.abs(value));if(options.scrollBar){e.preventDefault?e.preventDefault():e.returnValue=false;} 2917var activeSection=$(SECTION_ACTIVE_SEL);var scrollable=options.scrollOverflowHandler.scrollable(activeSection);var timeDiff=curTime-prevTime;prevTime=curTime;if(timeDiff>200){scrollings=[];} 2918if(canScroll){var averageEnd=getAverage(scrollings,10);var averageMiddle=getAverage(scrollings,70);var isAccelerating=averageEnd>=averageMiddle;if(isAccelerating&&isScrollingVertically){if(delta<0){scrolling('down',scrollable);}else{scrolling('up',scrollable);}}} 2919return false;} 2920if(options.fitToSection){$htmlBody.stop();}} 2921function moveSlide(direction,section){var activeSection=typeof section==='undefined'?$(SECTION_ACTIVE_SEL):section;var slides=activeSection.find(SLIDES_WRAPPER_SEL);var numSlides=slides.find(SLIDE_SEL).length;if(!slides.length||slideMoving||numSlides<2){return;} 2922var currentSlide=slides.find(SLIDE_ACTIVE_SEL);var destiny=null;if(direction==='left'){destiny=currentSlide.prev(SLIDE_SEL);}else{destiny=currentSlide.next(SLIDE_SEL);} 2923if(!destiny.length){if(!options.loopHorizontal)return;if(direction==='left'){destiny=currentSlide.siblings(':last');}else{destiny=currentSlide.siblings(':first');}} 2924slideMoving=true;
2924landscapeScroll(slides,destiny,direction);} 2925function keepSlidesPosition(){$(SLIDE_ACTIVE_SEL).each(function(){silentLandscapeScroll($(this),'internal');});} 2926var previousDestTop=0;function getDestinationPosition(element){var elemPosition=element.position();var position=elemPosition.top;var isScrollingDown=elemPosition.top>previousDestTop;var sectionBottom=position-windowsHeight+element.outerHeight();var bigSectionsDestination=options.bigSectionsDestination;var containerH=container.outerHeight();var containerPosition=container.offset();if(!$masthead.hasClass('menu-transparent')&&$('body').hasClass('uncode-fp-menu-shrink')&&!element.is(':first-child')) 2927position+=18;if((containerH+menuHeight+bodyBorder+adminBarHeight-windowsHeight)<position||(isResizing&&element.is(':last-child'))){position=sectionBottom+menuHeight+bodyBorder*2+adminBarHeight;} 2928previousDestTop=position;return position;} 2929function scrollPage(element,callback,isMovementUp){if(typeof element==='undefined'){return;} 2930var dtop=getDestinationPosition(element);var slideAnchorLink;var slideIndex;var v={element:element,callback:callback,isMovementUp:isMovementUp,dtop:dtop,yMovement:getYmovement(element),anchorLink:element.data('anchor'),sectionIndex:element.index(SECTION_SEL),activeSlide:element.find(SLIDE_ACTIVE_SEL),activeSection:$(SECTION_ACTIVE_SEL),leavingSection:$(SECTION_ACTIVE_SEL).index(SECTION_SEL)+1,localIsResizing:isResizing};if((v.activeSection.is(element)&&!isResizing)||(options.scrollBar&&$window.scrollTop()===v.dtop&&!element.hasClass(AUTO_HEIGHT))){return;} 2931if(v.activeSlide.length){slideAnchorLink=v.activeSlide.data('anchor');slideIndex=v.activeSlide.index();} 2932if(options.autoScrolling&&options.continuousVertical&&typeof(v.isMovementUp)!=="undefined"&&((!v.isMovementUp&&v.yMovement=='up')||(v.isMovementUp&&v.yMovement=='down'))){v=createInfiniteSections(v);} 2933if($.isFunction(options.onLeave)&&!v.localIsResizing){if(options.onLeave.call(v.activeSection,v.leavingSection,(v.sectionIndex+1),v.yMovement)===false){return;}} 2934if(!v.localIsResizing){stopMedia(v.activeSection);} 2935options.scrollOverflowHandler.beforeLeave();element.addClass(ACTIVE).siblings().removeClass(ACTIVE);lazyLoad(element);options.scrollOverflowHandler.onLeave();canScroll=false;setState(slideIndex,slideAnchorLink,v.anchorLink,v.sectionIndex);performMovement(v);lastScrolledDestiny=v.anchorLink;activateMenuAndNav(v.anchorLink,v.sectionIndex);} 2936function performMovement(v){if(options.css3&&options.autoScrolling&&!options.scrollBar){var translate3d='translate3d(0px, -'+Math.round(v.dtop)+'px, 0px)';transformContainer(translate3d,true);if(options.scrollingSpeed){clearTimeout(afterSectionLoadsId);afterSectionLoadsId=setTimeout(function(){afterSectionLoads(v);},options.scrollingSpeed);}else{afterSectionLoads(v);}} 2937else{var scrollSettings=getScrollSettings(v);$(scrollSettings.element).animate(scrollSettings.options,options.scrollingSpeed,options.easing).promise().done(function(){if(options.scrollBar){setTimeout(function(){afterSectionLoads(v);},30);}else{afterSectionLoads(v);}});}} 2938function getScrollSettings(v){var scroll={};if(options.autoScrolling&&!options.scrollBar){scroll.options={'top':-v.dtop};scroll.element=WRAPPER_SEL;}else{scroll.options={'scrollTop':v.dtop};scroll.element='html, body';} 2939return scroll;} 2940function createInfiniteSections(v){if(!v.isMovementUp){$(SECTION_ACTIVE_SEL).after(v.activeSection.prevAll(SECTION_SEL).get().reverse());} 2941else{$(SECTION_ACTIVE_SEL).before(v.activeSection.nextAll(SECTION_SEL));} 2942silentScroll($(SECTION_ACTIVE_SEL).position().top);keepSlidesPosition();v.wrapAroundElements=v.activeSection;v.dtop=v.element.position().top;v.yMovement=getYmovement(v.element);return v;} 2943function continuousVerticalFixSectionOrder(v){if(!v.wrapAroundElements||!v.wrapAroundElements.length){return;} 2944if(v.isMovementUp){$(SECTION_FIRST_SEL).before(v.wrapAroundElements);} 2945else{$(SECTION_LAST_SEL).after(v.wrapAroundElements);} 2946silentScroll($(SECTION_ACTIVE_SEL).position().top);keepSlidesPosition();} 2947function afterSectionLoads(v){continuousVerticalFixSectionOrder(v);$.isFunction(options.afterLoad)&&!v.localIsResizing&&options.afterLoad.call(v.element,v.anchorLink,(v.sectionIndex+1));options.scrollOverflowHandler.afterLoad();if(!v.localIsResizing){playMedia(v.element);} 2948v.element.addClass(COMPLETELY).siblings().removeClass(COMPLETELY);canScroll=true;$.isFunction(v.callback)&&v.callback.call(this);} 2949function setSrc(element,attribute){element.attr(attribute,element.data(attribute)).removeAttr('data-'+attribute);} 2950function lazyLoad(destiny){if(!options.lazyLoading){return;} 2951var panel=getSlideOrSection(destiny);var element;panel.find('img[data-src], img[data-srcset], source[data-src], audio[data-src], iframe[data-src]').each(function(){element=$(this);$.each(['src','srcset'],function(index,type){var attribute=element.attr('data-'+type);if(typeof attribute!=='undefined'&&attribute){setSrc(element,type);}});if(element.is('source')){element.closest('video').get(0).load();}});} 2952function playMedia(destiny){var panel=getSlideOrSection(destiny);panel.find('video, audio').each(function(){var element=$(this).get(0);if(element.hasAttribute('data-autoplay')&&typeof element.play==='function'){element.play();}});panel.find('iframe[src*="youtube.com/embed/"]').each(function(){var element=$(this).get(0);if(element.hasAttribute('data-autoplay')){playYoutube(element);} 2953element.onload=function(){if(element.hasAttribute('data-autoplay')){playYoutube(element);}};});} 2954function playYoutube(element){element.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');} 2955function stopMedia(destiny){var panel=getSlideOrSection(destiny);panel.find('video, audio').each(function(){var element=$(this).get(0);if(!element.hasAttribute('data-keepplaying')&&typeof element.pause==='function'){element.pause();}});panel.find('iframe[src*="youtube.com/embed/"]').each(function(){var element=$(this).get(0);if(/youtube\.com\/embed\//.test($(this).attr('src'))&&!element.hasAttribute('data-keepplaying')){$(this).get(0).contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');}});} 2956function getSlideOrSection(destiny){var slide=destiny.find(SLIDE_ACTIVE_SEL);if(slide.length){destiny=$(slide);} 2957return destiny;} 2958function scrollToAnchor(){var value=window.location.hash.replace('#','').split('/');var sectionAnchor=decodeURIComponent(value[0]);var slideAnchor=decodeURIComponent(value[1]);if(sectionAnchor){if(options.animateAnchor){scrollPageAndSlide(sectionAnchor,slideAnchor);}else{silentMoveTo(sectionAnchor,slideAnchor);}}} 2959function hashChangeHandler(){if(!isScrolling&&!options.lockAnchors){var value=window.location.hash.replace('#','').split('/');var sectionAnchor=decodeURIComponent(value[0]);var slideAnchor=decodeURIComponent(value[1]);var isFirstSlideMove=(typeof lastScrolledDestiny==='undefined');var isFirstScrollMove=(typeof lastScrolledDestiny==='undefined'&&typeof slideAnchor==='undefined'&&!slideMoving);if(sectionAnchor.length){if((sectionAnchor&§ionAnchor!==lastScrolledDestiny)&&!isFirstSlideMove||isFirstScrollMove||(!slideMoving&&lastScrolledSlide!=slideAnchor)){scrollPageAndSlide(sectionAnchor,slideAnchor);}}}} 2960function keydownHandler(e){clearTimeout(keydownId);var activeElement=$(':focus');if(!activeElement.is('textarea')&&!activeElement.is('input')&&!activeElement.is('select')&&activeElement.attr('contentEditable')!=="true"&&activeElement.attr('contentEditable')!==''&&options.keyboardScrolling&&options.autoScrolling){var keyCode=e.which;
2960var keyControls=[40,38,32,33,34];if($.inArray(keyCode,keyControls)>-1){e.preventDefault();} 2961controlPressed=e.ctrlKey;keydownId=setTimeout(function(){onkeydown(e);},150);}} 2962function tooltipTextHandler(){$(this).prev().trigger('click');} 2963function keyUpHandler(e){if(isWindowFocused){controlPressed=e.ctrlKey;}} 2964function mouseDownHandler(e){if(e.which==2){oldPageY=e.pageY;container.on('mousemove',mouseMoveHandler);}} 2965function mouseUpHandler(e){if(e.which==2){container.off('mousemove');}} 2966function slideArrowHandler(){var section=$(this).closest(SECTION_SEL);if($(this).hasClass(SLIDES_PREV)){if(isScrollAllowed.m.left){moveSlideLeft(section);}}else{if(isScrollAllowed.m.right){moveSlideRight(section);}}} 2967function blurHandler(){isWindowFocused=false;controlPressed=false;} 2968function sectionBulletHandler(e){e.preventDefault();var index=$(this).parent().index();scrollPage($(SECTION_SEL).eq(index));} 2969function slideBulletHandler(e){e.preventDefault();var slides=$(this).closest(SECTION_SEL).find(SLIDES_WRAPPER_SEL);var destiny=slides.find(SLIDE_SEL).eq($(this).closest('li').index());landscapeScroll(slides,destiny);} 2970function onkeydown(e){var shiftPressed=e.shiftKey;if(!canScroll&&[37,39].indexOf(e.which)<0){return;} 2971switch(e.which){case 38:case 33:if(isScrollAllowed.k.up){moveSectionUp();} 2972break;case 32:if(shiftPressed&&isScrollAllowed.k.up){moveSectionUp();break;} 2973case 40:case 34:if(isScrollAllowed.k.down){moveSectionDown();} 2974break;case 36:if(isScrollAllowed.k.up){moveTo(1);} 2975break;case 35:if(isScrollAllowed.k.down){moveTo($(SECTION_SEL).length);} 2976break;case 37:if(isScrollAllowed.k.left){moveSlideLeft();} 2977break;case 39:if(isScrollAllowed.k.right){moveSlideRight();} 2978break;default:return;}} 2979var oldPageY=0;function mouseMoveHandler(e){if(canScroll){if(e.pageY<oldPageY&&isScrollAllowed.m.up){moveSectionUp();} 2980else if(e.pageY>oldPageY&&isScrollAllowed.m.down){moveSectionDown();}} 2981oldPageY=e.pageY;} 2982function landscapeScroll(slides,destiny,direction){var section=slides.closest(SECTION_SEL);var v={slides:slides,destiny:destiny,direction:direction,destinyPos:destiny.position(),slideIndex:destiny.index(),section:section,sectionIndex:section.index(SECTION_SEL),anchorLink:section.data('anchor'),slidesNav:section.find(SLIDES_NAV_SEL),slideAnchor:getAnchor(destiny),prevSlide:section.find(SLIDE_ACTIVE_SEL),prevSlideIndex:section.find(SLIDE_ACTIVE_SEL).index(),localIsResizing:isResizing};v.xMovement=getXmovement(v.prevSlideIndex,v.slideIndex);v.direction=v.direction?v.direction:v.xMovement;if(!v.localIsResizing){canScroll=false;} 2983if(options.onSlideLeave){if(!v.localIsResizing&&v.xMovement!=='none'){if($.isFunction(options.onSlideLeave)){if(options.onSlideLeave.call(v.prevSlide,v.anchorLink,(v.sectionIndex+1),v.prevSlideIndex,v.xMovement,v.slideIndex)===false){slideMoving=false;return;}}}} 2984destiny.addClass(ACTIVE).siblings().removeClass(ACTIVE);if(!v.localIsResizing){stopMedia(v.prevSlide);lazyLoad(destiny);} 2985if(!options.loopHorizontal&&options.controlArrows){section.find(SLIDES_ARROW_PREV_SEL).toggle(v.slideIndex!==0);section.find(SLIDES_ARROW_NEXT_SEL).toggle(!destiny.is(':last-child'));} 2986if(section.hasClass(ACTIVE)&&!v.localIsResizing){setState(v.slideIndex,v.slideAnchor,v.anchorLink,v.sectionIndex);} 2987performHorizontalMove(slides,v,true);} 2988function afterSlideLoads(v){activeSlidesNavigation(v.slidesNav,v.slideIndex);if(!v.localIsResizing){$.isFunction(options.afterSlideLoad)&&options.afterSlideLoad.call(v.destiny,v.anchorLink,(v.sectionIndex+1),v.slideAnchor,v.slideIndex);canScroll=true;playMedia(v.destiny);} 2989slideMoving=false;} 2990function performHorizontalMove(slides,v,fireCallback){var destinyPos=v.destinyPos;if(options.css3){var translate3d='translate3d(-'+Math.round(destinyPos.left)+'px, 0px, 0px)';addAnimation(slides.find(SLIDES_CONTAINER_SEL)).css(getTransforms(translate3d),v);afterSlideLoadsId=setTimeout(function(){fireCallback&&afterSlideLoads(v);},options.scrollingSpeed,options.easing);}else{slides.animate({scrollLeft:Math.round(destinyPos.left)},options.scrollingSpeed,options.easing,function(){fireCallback&&afterSlideLoads(v);});}} 2991function activeSlidesNavigation(slidesNav,slideIndex){slidesNav.find(ACTIVE_SEL).removeClass(ACTIVE);slidesNav.find('li').eq(slideIndex).find('a').addClass(ACTIVE);} 2992var previousHeight=windowsHeight;function resizeHandler(){responsive();if(isTouchDevice){var activeElement=$(document.activeElement);if(!activeElement.is('textarea')&&!activeElement.is('input')&&!activeElement.is('select')){var currentHeight=$window.height();if(Math.abs(currentHeight-previousHeight)>(20*Math.max(previousHeight,currentHeight)/100)){reBuild(true);previousHeight=currentHeight;}}}else{clearTimeout(resizeId);resizeId=setTimeout(function(){reBuild(true);},350);}} 2993function responsive(){var widthLimit=options.responsive||options.responsiveWidth;var heightLimit=options.responsiveHeight;var isBreakingPointWidth=widthLimit&&$window.outerWidth()<widthLimit;var isBreakingPointHeight=heightLimit&&$window.height()<heightLimit;if(widthLimit&&heightLimit){setResponsive(isBreakingPointWidth||isBreakingPointHeight);} 2994else if(widthLimit){setResponsive(isBreakingPointWidth);} 2995else if(heightLimit){setResponsive(isBreakingPointHeight);}} 2996function addAnimation(container,element){var transition='all '+options.scrollingSpeed+'ms '+options.easingcss3;container.removeClass(NO_TRANSITION);return container.css({'-webkit-transition':transition,'transition':transition});} 2997function removeAnimation(element){return element.addClass(NO_TRANSITION);} 2998function activateNavDots(name,sectionIndex){if(options.navigation){$(SECTION_NAV_SEL).find(ACTIVE_SEL).removeClass(ACTIVE);if(name){$(SECTION_NAV_SEL).find('a[href="#'+name+'"]').addClass(ACTIVE);}else{$(SECTION_NAV_SEL).find('li').eq(sectionIndex).find('a').addClass(ACTIVE);}}} 2999function activateMenuElement(name){if(options.menu){$(options.menu).find(ACTIVE_SEL).removeClass(ACTIVE);$(options.menu).find('[data-menuanchor="'+name+'"]').addClass(ACTIVE);}} 3000function activateMenuAndNav(anchor,index){activateMenuElement(anchor);activateNavDots(anchor,index);} 3001function getYmovement(destiny){var fromIndex=$(SECTION_ACTIVE_SEL).index(SECTION_SEL);var toIndex=destiny.index(SECTION_SEL);if(fromIndex==toIndex){return'none';} 3002if(fromIndex>toIndex){return'up';} 3003return'down';} 3004function getXmovement(fromIndex,toIndex){if(fromIndex==toIndex){return'none';} 3005if(fromIndex>toIndex){return'left';} 3006return'right';} 3007function createScrollBar(element){if(element.hasClass('fp-noscroll'))return;element.css('overflow','hidden');var scrollOverflowHandler=options.scrollOverflowHandler;var wrap=scrollOverflowHandler.wrapContent();var section=element.closest(SECTION_SEL);var scrollable=scrollOverflowHandler.scrollable(element);var contentHeight;if(scrollable.length){contentHeight=scrollOverflowHandler.scrollHeight(element);}else{contentHeight=element.get(0).scrollHeight;if(options.verticalCentered){contentHeight=element.find(TABLE_CELL_SEL).get(0).scrollHeight;}} 3008var scrollHeight=windowsHeight-parseInt(section.css('padding-bottom'))-parseInt(section.css('padding-top'));if(contentHeight>scrollHeight){if(scrollable.length){scrollOverflowHandler.update(element,scrollHeight);} 3009else{if(options.verticalCentered){element.find(TABLE_CELL_SEL).wrapInner(wrap);}else{element.wrapInner(wrap);} 3010scrollOverflowHandler.create(element,scrollHeight);}} 3011else{scrollOverflowHandler.remove(element);} 3012element.css('overflow','');} 3013function addTableClass(element){if(!element.hasClass(TABLE)){element.addClass(TABLE).wrapInner('<div class="'+TABLE_CELL+'" style="height:'+getTableHeight(element)+'px;" />');}} 3014function getTableHeight(element){var sectionHeight=windowsHeight;if(options.paddingTop||options.paddingBottom){var section=element;if(!section.hasClass(SECTION)){section=element.closest(SECTION_SEL);} 3015var paddings=parseInt(section.css('padding-top'))+parseInt(section.css('padding-bottom'));sectionHeight=(windowsHeight-paddings);} 3016return sectionHeight;} 3017function transformContainer(translate3d,animated){if(animated){addAnimation(container);}else{removeAnimation(container);} 3018container.css(getTransforms(translate3d));setTimeout(function(){container.removeClass(NO_TRANSITION);},10);} 3019function getSectionByAnchor(sectionAnchor){if(!sectionAnchor)return[];var section=container.find(SECTION_SEL+'[data-anchor="'+sectionAnchor+'"]');
3019if(!section.length){section=$(SECTION_SEL).eq(sectionAnchor-1);} 3020return section;} 3021function getSlideByAnchor(slideAnchor,section){var slides=section.find(SLIDES_WRAPPER_SEL);var slide=slides.find(SLIDE_SEL+'[data-anchor="'+slideAnchor+'"]');if(!slide.length){slide=slides.find(SLIDE_SEL).eq(slideAnchor);} 3022return slide;} 3023function scrollPageAndSlide(destiny,slide){var section=getSectionByAnchor(destiny);if(!section.length)return;if(typeof slide==='undefined'){slide=0;} 3024if(destiny!==lastScrolledDestiny&&!section.hasClass(ACTIVE)){scrollPage(section,function(){scrollSlider(section,slide);});} 3025else{scrollSlider(section,slide);}} 3026function scrollSlider(section,slideAnchor){if(typeof slideAnchor!=='undefined'){var slides=section.find(SLIDES_WRAPPER_SEL);var destiny=getSlideByAnchor(slideAnchor,section);if(destiny.length){landscapeScroll(slides,destiny);}}} 3027function addSlidesNavigation(section,numSlides){section.append('<div class="'+SLIDES_NAV+'"><ul></ul></div>');var nav=section.find(SLIDES_NAV_SEL);nav.addClass(options.slidesNavPosition);for(var i=0;i<numSlides;i++){nav.find('ul').append('<li><a href="#"><span></span></a></li>');} 3028nav.css('margin-left','-'+(nav.width()/2)+'px');nav.find('li').first().find('a').addClass(ACTIVE);} 3029function setState(slideIndex,slideAnchor,anchorLink,sectionIndex){var sectionHash='';if(options.anchors.length&&!options.lockAnchors){if(slideIndex){if(typeof anchorLink!=='undefined'){sectionHash=anchorLink;} 3030if(typeof slideAnchor==='undefined'){slideAnchor=slideIndex;} 3031lastScrolledSlide=slideAnchor;setUrlHash(sectionHash+'/'+slideAnchor);}else if(typeof slideIndex!=='undefined'){lastScrolledSlide=slideAnchor;setUrlHash(anchorLink);} 3032else{setUrlHash(anchorLink);}} 3033setBodyClass();} 3034function setUrlHash(url){if(typeof SiteParameters.slide_footer!='undefined'&&url==SiteParameters.slide_footer) 3035return false;if(options.recordHistory){location.hash=url;}else{return false;}} 3036function getAnchor(element){var anchor=element.data('anchor');var index=element.index();if(typeof anchor==='undefined'){anchor=index;} 3037return anchor;} 3038function setBodyClass(){var section=$(SECTION_ACTIVE_SEL);var slide=section.find(SLIDE_ACTIVE_SEL);var sectionAnchor=getAnchor(section);var slideAnchor=getAnchor(slide);var text=String(sectionAnchor);if(slide.length){text=text+'-'+slideAnchor;} 3039text=text.replace('/','-').replace('#','');var classRe=new RegExp('\\b\\s?'+VIEWING_PREFIX+'-[^\\s]+\\b',"g");$body[0].className=$body[0].className.replace(classRe,'');$body.addClass(VIEWING_PREFIX+'-'+text);} 3040function support3d(){var el=document.createElement('p'),has3d,transforms={'webkitTransform':'-webkit-transform','OTransform':'-o-transform','msTransform':'-ms-transform','MozTransform':'-moz-transform','transform':'transform'};document.body.insertBefore(el,null);for(var t in transforms){if(el.style[t]!==undefined){el.style[t]='translate3d(1px,1px,1px)';has3d=window.getComputedStyle(el).getPropertyValue(transforms[t]);}} 3041document.body.removeChild(el);return(has3d!==undefined&&has3d.length>0&&has3d!=='none');} 3042function removeMouseWheelHandler(){if(document.addEventListener){document.removeEventListener('mousewheel',MouseWheelHandler,false);document.removeEventListener('wheel',MouseWheelHandler,false);document.removeEventListener('MozMousePixelScroll',MouseWheelHandler,false);}else{document.detachEvent('onmousewheel',MouseWheelHandler);}} 3043function addMouseWheelHandler(){var prefix='';var _addEventListener;if(window.addEventListener){_addEventListener="addEventListener";}else{_addEventListener="attachEvent";prefix='on';} 3044var support='onwheel'in document.createElement('div')?'wheel':document.onmousewheel!==undefined?'mousewheel':'DOMMouseScroll';var passiveEvent=g_supportsPassive?{passive:false}:false;if(support=='DOMMouseScroll'){document[_addEventListener](prefix+'MozMousePixelScroll',MouseWheelHandler,passiveEvent);} 3045else{document[_addEventListener](prefix+support,MouseWheelHandler,passiveEvent);}} 3046function addMiddleWheelHandler(){container.on('mousedown',mouseDownHandler).on('mouseup',mouseUpHandler);} 3047function removeMiddleWheelHandler(){container.off('mousedown',mouseDownHandler).off('mouseup',mouseUpHandler);} 3048function addTouchHandler(){if(isTouchDevice||isTouch){if(options.autoScrolling){$body.off(events.touchmove).on(events.touchmove,preventBouncing);} 3049$(WRAPPER_SEL).off(events.touchstart).on(events.touchstart,touchStartHandler).off(events.touchmove).on(events.touchmove,touchMoveHandler);}} 3050function removeTouchHandler(){if(isTouchDevice||isTouch){$(WRAPPER_SEL).off(events.touchstart).off(events.touchmove);}} 3051function getMSPointer(){var pointer;if(window.PointerEvent){pointer={down:'pointerdown',move:'pointermove'};} 3052else{pointer={down:'MSPointerDown',move:'MSPointerMove'};} 3053return pointer;} 3054function getEventsPage(e){var events=[];events.y=(typeof e.pageY!=='undefined'&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY);events.x=(typeof e.pageX!=='undefined'&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX);if(isTouch&&isReallyTouch(e)&&options.scrollBar){events.y=e.touches[0].pageY;events.x=e.touches[0].pageX;} 3055return events;} 3056function silentLandscapeScroll(activeSlide,noCallbacks){setScrollingSpeed(0,'internal');if(typeof noCallbacks!=='undefined'){isResizing=true;}
3057landscapeScroll(activeSlide.closest(SLIDES_WRAPPER_SEL),activeSlide);if(typeof noCallbacks!=='undefined'){isResizing=false;} 3058setScrollingSpeed(originals.scrollingSpeed,'internal');} 3059function silentScroll(top){var roundedTop=Math.round(top);if(options.css3&&options.autoScrolling&&!options.scrollBar){var translate3d='translate3d(0px, -'+roundedTop+'px, 0px)';transformContainer(translate3d,false);} 3060else if(options.autoScrolling&&!options.scrollBar){container.css('top',-roundedTop);} 3061else{$htmlBody.scrollTop(roundedTop);}} 3062function getTransforms(translate3d){return{'-webkit-transform':translate3d,'-moz-transform':translate3d,'-ms-transform':translate3d,'transform':translate3d};} 3063function setIsScrollAllowed(value,direction,type){switch(direction){case'up':isScrollAllowed[type].up=value;break;case'down':isScrollAllowed[type].down=value;break;case'left':isScrollAllowed[type].left=value;break;case'right':isScrollAllowed[type].right=value;break;case'all':if(type=='m'){setAllowScrolling(value);}else{setKeyboardScrolling(value);}}} 3064function destroy(all){setAutoScrolling(false,'internal');setAllowScrolling(false);setKeyboardScrolling(false);container.addClass(DESTROYED);clearTimeout(afterSlideLoadsId);clearTimeout(afterSectionLoadsId);clearTimeout(resizeId);clearTimeout(scrollId);clearTimeout(scrollId2);$window.off('scroll',scrollHandler).off('hashchange',hashChangeHandler).off('resize',resizeHandler);$document.off('click touchstart',SECTION_NAV_SEL+' a').off('mouseenter',SECTION_NAV_SEL+' li').off('mouseleave',SECTION_NAV_SEL+' li').off('click touchstart',SLIDES_NAV_LINK_SEL).off('mouseover',options.normalScrollElements).off('mouseout',options.normalScrollElements);$(SECTION_SEL).off('click touchstart',SLIDES_ARROW_SEL);clearTimeout(afterSlideLoadsId);clearTimeout(afterSectionLoadsId);if(all){destroyStructure();}} 3065function destroyStructure(){silentScroll(0);container.find('img[data-src], source[data-src], audio[data-src], iframe[data-src]').each(function(){setSrc($(this),'src');});container.find('img[data-srcset]').each(function(){setSrc($(this),'srcset');});$(SECTION_NAV_SEL+', '+SLIDES_NAV_SEL+', '+SLIDES_ARROW_SEL).remove();$(SECTION_SEL).css({'height':'','background-color':'','padding':''});$(SLIDE_SEL).css({'width':''});container.css({'height':'','position':'','-ms-touch-action':'','touch-action':''});$htmlBody.css({'overflow':'','height':''});$('html').removeClass(ENABLED);$body.removeClass(RESPONSIVE);$.each($body.get(0).className.split(/\s+/),function(index,className){if(className.indexOf(VIEWING_PREFIX)===0){$body.removeClass(className);}});$(SECTION_SEL+', '+SLIDE_SEL).each(function(){options.scrollOverflowHandler.remove($(this));$(this).removeClass(TABLE+' '+ACTIVE);});removeAnimation(container);container.find(TABLE_CELL_SEL+', '+SLIDES_CONTAINER_SEL+', '+SLIDES_WRAPPER_SEL).each(function(){$(this).replaceWith(this.childNodes);});container.css({'-webkit-transition':'none','transition':'none'});$htmlBody.scrollTop(0);var usedSelectors=[SECTION,SLIDE,SLIDES_CONTAINER];$.each(usedSelectors,function(index,value){$('.'+value).removeClass(value);});} 3066function setVariableState(variable,value,type){options[variable]=value;if(type!=='internal'){originals[variable]=value;}} 3067function displayWarnings(){var extensions=['fadingEffect','continuousHorizontal','scrollHorizontally','interlockedSlides','resetSliders','responsiveSlides','offsetSections','dragAndMove','scrollOverflowReset','parallax'];$.each(extensions,function(index,extension){if(options[extension]){showError('warn','fullpage.js extensions require jquery.fullpage.extensions.min.js file instead of the usual jquery.fullpage.js. Requested: '+extension);}});$.each(options.anchors,function(index,name){var nameAttr=$document.find('[name]').filter(function(){return $(this).attr('name')&&$(this).attr('name').toLowerCase()==name.toLowerCase();});var idAttr=$document.find('[id]').filter(function(){return $(this).attr('id')&&$(this).attr('id').toLowerCase()==name.toLowerCase();});if(idAttr.length||nameAttr.length){showError('error','data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).');idAttr.length&&showError('error','"'+name+'" is is being used by another element `id` property');nameAttr.length&&showError('error','"'+name+'" is is being used by another element `name` property');}});} 3068function showError(type,text){console&&console[type]&&console[type]('fullPage: '+text);}};if(typeof IScroll!=='undefined'){IScroll.prototype.wheelOn=function(){this.wrapper.addEventListener('wheel',this);this.wrapper.addEventListener('mousewheel',this);this.wrapper.addEventListener('DOMMouseScroll',this);};IScroll.prototype.wheelOff=function(){this.wrapper.removeEventListener('wheel',this);this.wrapper.removeEventListener('mousewheel',this);this.wrapper.removeEventListener('DOMMouseScroll',this);};} 3069var iscrollHandler={refreshId:null,iScrollInstances:[],toggleWheel:function(value){var scrollable=$(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);scrollable.each(function(){var iScrollInstance=$(this).data('iscrollInstance');if(typeof iScrollInstance!=='undefined'&&iScrollInstance){if(value){iScrollInstance.wheelOn();} 3070else{iScrollInstance.wheelOff();}}});},onLeave:function(){iscrollHandler.toggleWheel(false);},beforeLeave:function(){iscrollHandler.onLeave()},afterLoad:function(){iscrollHandler.toggleWheel(true);},create:function(element,scrollHeight){var scrollable=element.find(SCROLLABLE_SEL);scrollable.height(scrollHeight);scrollable.each(function(){var $this=$(this);var iScrollInstance=$this.data('iscrollInstance');if(iScrollInstance){$.each(iscrollHandler.iScrollInstances,function(){$(this).destroy();});} 3071iScrollInstance=new IScroll($this.get(0),iscrollOptions);iscrollHandler.iScrollInstances.push(iScrollInstance);iScrollInstance.wheelOff();$this.data('iscrollInstance',iScrollInstance);});},isScrolled:function(type,scrollable){var scroller=scrollable.data('iscrollInstance');if(!scroller){return true;} 3072var uncode_body_borders=parseFloat($('.body-borders').attr('data-border'))||0;if(type==='top'){return scroller.y>=0&&!scrollable.scrollTop();}else if(type==='bottom'){return(0-scroller.y)+scrollable.scrollTop()+1+(uncode_body_borders*2)+scrollable.innerHe
vendor: 18,952 bytes, lines 3072-3116
3072ight()>=scrollable[0].scrollHeight;}},scrollable:function(activeSection){if(activeSection.find(SLIDES_WRAPPER_SEL).length){return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL);} 3073return activeSection.find(SCROLLABLE_SEL);},scrollHeight:function(element){return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight;},remove:function(element){var scrollable=element.find(SCROLLABLE_SEL);if(scrollable.length){var iScrollInstance=scrollable.data('iscrollInstance');iScrollInstance.destroy();scrollable.data('iscrollInstance',null);} 3074element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap();},update:function(element,scrollHeight){clearTimeout(iscrollHandler.refreshId);iscrollHandler.refreshId=setTimeout(function(){$.each(iscrollHandler.iScrollInstances,function(){$(this).get(0).refresh();});},150);element.find(SCROLLABLE_SEL).css('height',scrollHeight+'px').parent().css('height',scrollHeight+'px');},wrapContent:function(){return'<div class="'+SCROLLABLE+'"><div class="fp-scroller"></div></div>';}};});(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=global||self,factory(global.window=global.window||{}));}(this,(function(exports){'use strict';function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}} 3075function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;} 3076/*! 3077 * Observer 3.12.5 3078 * https://gsap.com 3079 * 3080 * @license Copyright 2008-2024, GreenSock. All rights reserved. 3081 * Subject to the terms at https://gsap.com/standard-license or for 3082 * Club GSAP members, the agreement issued with that membership. 3083 * @author: Jack Doyle, [email protected] 3084 */ 3085var gsap,_coreInitted,_clamp,_win,_doc,_docEl,_body,_isTouch,_pointerType,ScrollTrigger,_root,_normalizer,_eventTypes,_context,_getGSAP=function _getGSAP(){return gsap||typeof window!=="undefined"&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap;},_startup=1,_observers=[],_scrollers=[],_proxies=[],_getTime=Date.now,_bridge=function _bridge(name,value){return value;},_integrate=function _integrate(){var core=ScrollTrigger.core,data=core.bridge||{},scrollers=core._scrollers,proxies=core._proxies;scrollers.push.apply(scrollers,_scrollers);proxies.push.apply(proxies,_proxies);_scrollers=scrollers;_proxies=proxies;_bridge=function _bridge(name,value){return data[name](value);};},_getProxyProp=function _getProxyProp(element,property){return~_proxies.indexOf(element)&&_proxies[_proxies.indexOf(element)+1][property];},_isViewport=function _isViewport(el){return!!~_root.indexOf(el);},_addListener=function _addListener(element,type,func,passive,capture){return element.addEventListener(type,func,{passive:passive!==false,capture:!!capture});},_removeListener=function _removeListener(element,type,func,capture){return element.removeEventListener(type,func,!!capture);},_scrollLeft="scrollLeft",_scrollTop="scrollTop",_onScroll=function _onScroll(){return _normalizer&&_normalizer.isPressed||_scrollers.cache++;},_scrollCacheFunc=function _scrollCacheFunc(f,doNotCache){var cachingFunc=function cachingFunc(value){if(value||value===0){_startup&&(_win.history.scrollRestoration="manual");var isNormalizing=_normalizer&&_normalizer.isPressed;value=cachingFunc.v=Math.round(value)||(_normalizer&&_normalizer.iOS?1:0);f(value);cachingFunc.cacheID=_scrollers.cache;isNormalizing&&_bridge("ss",value);}else if(doNotCache||_scrollers.cache!==cachingFunc.cacheID||_bridge("ref")){cachingFunc.cacheID=_scrollers.cache;cachingFunc.v=f();} 3086return cachingFunc.v+cachingFunc.offset;};cachingFunc.offset=0;return f&&cachingFunc;},_horizontal={s:_scrollLeft,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:_scrollCacheFunc(function(value){return arguments.length?_win.scrollTo(value,_vertical.sc()):_win.pageXOffset||_doc[_scrollLeft]||_docEl[_scrollLeft]||_body[_scrollLeft]||0;})},_vertical={s:_scrollTop,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:_horizontal,sc:_scrollCacheFunc(function(value){return arguments.length?_win.scrollTo(_horizontal.sc(),value):_win.pageYOffset||_doc[_scrollTop]||_docEl[_scrollTop]||_body[_scrollTop]||0;})},_getTarget=function _getTarget(t,self){return(self&&self._ctx&&self._ctx.selector||gsap.utils.toArray)(t)[0]||(typeof t==="string"&&gsap.config().nullTargetWarn!==false?console.warn("Element not found:",t):null);},_getScrollFunc=function _getScrollFunc(element,_ref){var s=_ref.s,sc=_ref.sc;_isViewport(element)&&(element=_doc.scrollingElement||_docEl);var i=_scrollers.indexOf(element),offset=sc===_vertical.sc?1:2;!~i&&(i=_scrollers.push(element)-1);_scrollers[i+offset]||_addListener(element,"scroll",_onScroll);var prev=_scrollers[i+offset],func=prev||(_scrollers[i+offset]=_scrollCacheFunc(_getProxyProp(element,s),true)||(_isViewport(element)?sc:_scrollCacheFunc(function(value){return arguments.length?element[s]=value:element[s];})));func.target=element;prev||(func.smooth=gsap.getProperty(element,"scrollBehavior")==="smooth");return func;},_getVelocityProp=function _getVelocityProp(value,minTimeRefresh,useDelta){var v1=value,v2=value,t1=_getTime(),t2=t1,min=minTimeRefresh||50,dropToZeroTime=Math.max(500,min*3),update=function update(value,force){var t=_getTime();if(force||t-t1>min){v2=v1;v1=value;t2=t1;t1=t;}else if(useDelta){v1+=value;}else{v1=v2+(value-v2)/(t-t2)*(t1-t2);}},reset=function reset(){v2=v1=useDelta?0:v1;t2=t1=0;},getVelocity=function getVelocity(latestValue){var tOld=t2,vOld=v2,t=_getTime();(latestValue||latestValue===0)&&latestValue!==v1&&update(latestValue);return t1===t2||t-t2>dropToZeroTime?0:(v1+(useDelta?vOld:-vOld))/((useDelta?t:t1)-tOld)*1000;};return{update:update,reset:reset,getVelocity:getVelocity};},_getEvent=function _getEvent(e,preventDefault){preventDefault&&!e._gsapAllow&&e.preventDefault();return e.changedTouches?e.changedTouches[0]:e;},_getAbsoluteMax=function _getAbsoluteMax(a){var max=Math.max.apply(Math,a),min=Math.min.apply(Math,a);return Math.abs(max)>=Math.abs(min)?max:min;},_setScrollTrigger=function _setScrollTrigger(){ScrollTrigger=gsap.core.globals().ScrollTrigger;ScrollTrigger&&ScrollTrigger.core&&_integrate();},_initCore=function _initCore(core){gsap=core||_getGSAP();if(!_coreInitted&&gsap&&typeof document!=="undefined"&&document.body){_win=window;_doc=document;_docEl=_doc.documentElement;_body=_doc.body;_root=[_win,_doc,_docEl,_body];_clamp=gsap.utils.clamp;_context=gsap.core.context||function(){};_pointerType="onpointerenter"in _body?"pointer":"mouse";_isTouch=Observer.isTouch=_win.matchMedia&&_win.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in _win||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0;_eventTypes=Observer.eventTypes=("ontouchstart"in _docEl?"touchstart,touchmove,touchcancel,touchend":!("onpointerdown"in _docEl)?"mousedown,mousemove,mouseup,mouseup":"pointerdown,pointermove,pointercancel,pointerup").split(",");setTimeout(function(){return _startup=0;},500);_setScrollTrigger();_coreInitted=1;} 3087return _coreInitted;};_horizontal.op=_vertical;_scrollers.cache=0;var Observer=function(){function Observer(vars){this.init(vars);} 3088var _proto=Observer.prototype;_proto.init=function init(vars){_coreInitted||_initCore(gsap)||console.warn("Please gsap.registerPlugin(Observer)");ScrollTrigger||_setScrollTrigger();var tolerance=vars.tolerance,dragMinimum=vars.dragMinimum,type=vars.type,target=vars.target,lineHeight=vars.lineHeight,debounce=vars.debounce,preventDefault=vars.preventDefault,onStop=vars.onStop,onStopDelay=vars.onStopDelay,ignore=vars.ignore,wheelSpeed=vars.wheelSpeed,event=vars.event,onDragStart=vars.onDragStart,onDragEnd=vars.onDragEnd,onDrag=vars.onDrag,onPress=vars.onPress,onRelease=vars.onRelease,onRight=vars.onRight,onLeft=vars.onLeft,onUp=vars.onUp,onDown=vars.onDown,onChangeX=vars.onChangeX,onChangeY=vars.onChangeY,onChange=vars.onChange,onToggleX=vars.onToggleX,onToggleY=vars.onToggleY,onHover=vars.onHover,onHoverEnd=vars.onHoverEnd,onMove=vars.onMove,ignoreCheck=vars.ignoreCheck,isNormalizer=vars.isNormalizer,onGestureStart=vars.onGestureStart,onGestureEnd=vars.onGestureEnd,onWheel=vars.onWheel,onEnable=vars.onEnable,onDisable=vars.onDisable,onClick=vars.onClick,scrollSpeed=vars.scrollSpeed,capture=vars.capture,allowClicks=vars.allowClicks,lockAxis=vars.lockAxis,onLockAxis=vars.onLockAxis;this.target=target=_getTarget(target)||_docEl;this.vars=vars;ignore&&(ignore=gsap.utils.toArray(ignore));tolerance=tolerance||1e-9;dragMinimum=dragMinimum||0;wheelSpeed=wheelSpeed||1;scrollSpeed=scrollSpeed||1;type=type||"wheel,touch,pointer";debounce=debounce!==false;lineHeight||(lineHeight=parseFloat(_win.getComputedStyle(_body).lineHeight)||22);var id,onStopDelayedCall,dragged,moved,wheeled,locked,axis,self=this,prevDeltaX=0,prevDeltaY=0,passive=vars.passive||!preventDefault,scrollFuncX=_getScrollFunc(target,_horizontal),scrollFuncY=_getScrollFunc(target,_vertical),scrollX=scrollFuncX(),scrollY=scrollFuncY(),limitToTouch=~type.indexOf("touch")&&!~type.indexOf("pointer")&&_eventTypes[0]==="pointerdown",isViewport=_isViewport(target),ownerDoc=target.ownerDocument||_doc,deltaX=[0,0,0],deltaY=[0,0,0],onClickTime=0,clickCapture=function clickCapture(){return onClickTime=_getTime();},_ignoreCheck=function _ignoreCheck(e,isPointerOrTouch){return(self.event=e)&&ignore&&~ignore.indexOf(e.target)||isPointerOrTouch&&limitToTouch&&e.pointerType!=="touch"||ignoreCheck&&ignoreCheck(e,isPointerOrTouch);},onStopFunc=function onStopFunc(){self._vx.reset();self._vy.reset();onStopDelayedCall.pause();onStop&&onStop(self);},update=function update(){var dx=self.deltaX=_getAbsoluteMax(deltaX),dy=self.deltaY=_getAbsoluteMax(deltaY),changedX=Math.abs(dx)>=tolerance,changedY=Math.abs(dy)>=tolerance;onChange&&(changedX||changedY)&&onChange(self,dx,dy,deltaX,deltaY);if(changedX){onRight&&self.deltaX>0&&onRight(self);onLeft&&self.deltaX<0&&onLeft(self);onChangeX&&onChangeX(self);onToggleX&&self.deltaX<0!==prevDeltaX<0&&onToggleX(self);prevDeltaX=self.deltaX;deltaX[0]=deltaX[1]=deltaX[2]=0;} 3089if(changedY){onDown&&self.deltaY>0&&onDown(self);onUp&&self.deltaY<0&&onUp(self);onChangeY&&onChangeY(self);onToggleY&&self.deltaY<0!==prevDeltaY<0&&onToggleY(self);prevDeltaY=self.deltaY;deltaY[0]=deltaY[1]=deltaY[2]=0;} 3090if(moved||dragged){onMove&&onMove(self);if(dragged){onDrag(self);dragged=false;} 3091moved=false;} 3092locked&&!(locked=false)&&onLockAxis&&onLockAxis(self);if(wheeled){onWheel(self);wheeled=false;} 3093id=0;},onDelta=function onDelta(x,y,index){deltaX[index]+=x;deltaY[index]+=y;self._vx.update(x);self._vy.update(y);debounce?id||(id=requestAnimationFrame(update)):update();},onTouchOrPointerDelta=function onTouchOrPointerDelta(x,y){if(lockAxis&&!axis){self.axis=axis=Math.abs(x)>Math.abs(y)?"x":"y";locked=true;} 3094if(axis!=="y"){deltaX[2]+=x;self._vx.update(x,true);} 3095if(axis!=="x"){deltaY[2]+=y;self._vy.update(y,true);} 3096debounce?id||(id=requestAnimationFrame(update)):update();},_onDrag=function _onDrag(e){if(_ignoreCheck(e,1)){return;} 3097e=_getEvent(e,preventDefault);var x=e.clientX,y=e.clientY,dx=x-self.x,dy=y-self.y,isDragging=self.isDragging;self.x=x;self.y=y;if(isDragging||Math.abs(self.startX-x)>=dragMinimum||Math.abs(self.startY-y)>=dragMinimum){onDrag&&(dragged=true);isDragging||(self.isDragging=true);onTouchOrPointerDelta(dx,dy);isDragging||onDragStart&&onDragStart(self);}},_onPress=self.onPress=function(e){if(_ignoreCheck(e,1)||e&&e.button){return;} 3098self.axis=axis=null;onStopDelayedCall.pause();self.isPressed=true;e=_getEvent(e);prevDeltaX=prevDeltaY=0;self.startX=self.x=e.clientX;self.startY=self.y=e.clientY;self._vx.reset();self._vy.reset();_addListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,passive,true);self.deltaX=self.deltaY=0;onPress&&onPress(self);},_onRelease=self.onRelease=function(e){if(_ignoreCheck(e,1)){return;} 3099_removeListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,true);var isTrackingDrag=!isNaN(self.y-self.startY),wasDragging=self.isDragging,isDragNotClick=wasDragging&&(Math.abs(self.x-self.startX)>3||Math.abs(self.y-self.startY)>3),eventData=_getEvent(e);if(!isDragNotClick&&isTrackingDrag){self._vx.reset();self._vy.reset();if(preventDefault&&allowClicks){gsap.delayedCall(0.08,function(){if(_getTime()-onClickTime>300&&!e.defaultPrevented){if(e.target.click){e.target.click();}else if(ownerDoc.createEvent){var syntheticEvent=ownerDoc.createEvent("MouseEvents");syntheticEvent.initMouseEvent("click",true,true,_win,1,eventData.screenX,eventData.screenY,eventData.clientX,eventData.clientY,false,false,false,false,0,null);e.target.dispatchEvent(syntheticEvent);}}});}} 3100self.isDragging=self.isGesturing=self.isPressed=false;onStop&&wasDragging&&!isNormalizer&&onStopDelayedCall.restart(true);onDragEnd&&wasDragging&&onDragEnd(self);onRelease&&onRelease(self,isDragNotClick);},_onGestureStart=function _onGestureStart(e){return e.touches&&e.touches.length>1&&(self.isGesturing=true)&&onGestureStart(e,self.isDragging);},_onGestureEnd=function _onGestureEnd(){return(self.isGesturing=false)||onGestureEnd(self);},onScroll=function onScroll(e){if(_ignoreCheck(e)){return;} 3101var x=scrollFuncX(),y=scrollFuncY();onDelta((x-scrollX)*scrollSpeed,(y-scrollY)*scrollSpeed,1);scrollX=x;scrollY=y;onStop&&onStopDelayedCall.restart(true);},_onWheel=function _onWheel(e){if(_ignoreCheck(e)){return;} 3102e=_getEvent(e,preventDefault);onWheel&&(wheeled=true);var multiplier=(e.deltaMode===1?lineHeight:e.deltaMode===2?_win.innerHeight:1)*wheelSpeed;onDelta(e.deltaX*multiplier,e.deltaY*multiplier,0);onStop&&!isNormalizer&&onStopDelayedCall.restart(true);},_onMove=function _onMove(e){if(_ignoreCheck(e)){return;} 3103var x=e.clientX,y=e.clientY,dx=x-self.x,dy=y-self.y;self.x=x;self.y=y;moved=true;onStop&&onStopDelayedCall.restart(true);(dx||dy)&&onTouchOrPointerDelta(dx,dy);},_onHover=function _onHover(e){self.event=e;onHover(self);},_onHoverEnd=function _onHoverEnd(e){self.event=e;onHoverEnd(self);},_onClick=function _onClick(e){return _ignoreCheck(e)||_getEvent(e,preventDefault)&&onClick(self);};onStopDelayedCall=self._dc=gsap.delayedCall(onStopDelay||0.25,onStopFunc).pause();self.deltaX=self.deltaY=0;self._vx=_getVelocityProp(0,50,true);self._vy=_getVelocityProp(0,50,true);self.scrollX=scrollFuncX;self.scrollY=scrollFuncY;self.isDragging=self.isGesturing=self.isPressed=false;_context(this);self.enable=function(e){if(!self.isEnabled){_addListener(isViewport?ownerDoc:target,"scroll",_onScroll);type.indexOf("scroll")>=0&&_addListener(isViewport?ownerDoc:target,"scroll",onScroll,passive,capture);type.indexOf("wheel")>=0&&_addListener(target,"wheel",_onWheel,passive,capture);if(type.indexOf("touch")>=0&&_isTouch||type.indexOf("pointer")>=0){_addListener(target,_eventTypes[0],_onPress,passive,capture);_addListener(ownerDoc,_eventTypes[2],_onRelease);_addListener(ownerDoc,_eventTypes[3],_onRelease);allowClicks&&_addListener(target,"click",clickCapture,true,true);onClick&&_addListener(target,"click",_onClick);onGestureStart&&_addListener(ownerDoc,"gesturestart",_onGestureStart);onGestureEnd&&_addListener(ownerDoc,"gestureend",_onGestureEnd);onHover&&_addListener(target,_pointerType+"enter",_onHover);onHoverEnd&&_addListener(target,_pointerType+"leave",_onHoverEnd);onMove&&_addListener(target,_pointerType+"move",_onMove);} 3104self.isEnabled=true;e&&e.type&&_onPress(e);onEnable&&onEnable(self);} 3105return self;};self.disable=function(){if(self.isEnabled){_observers.filter(function(o){return o!==self&&_isViewport(o.target);}).length||_removeListener(isViewport?ownerDoc:target,"scroll",_onScroll);if(self.isPressed){self._vx.reset();self._vy.reset();_removeListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,true);} 3106_removeListener(isViewport?ownerDoc:target,"scroll",onScroll,capture);_removeListener(target,"wheel",_onWheel,capture);_removeListener(target,_eventTypes[0],_onPress,capture);_removeListener(ownerDoc,_eventTypes[2],_onRelease);_removeListener(ownerDoc,_eventTypes[3],_onRelease);_removeListener(target,"click",clickCapture,true);_removeListener(target,"click",_onClick);_removeListener(ownerDoc,"gesturestart",_onGestureStart);_removeListener(ownerDoc,"gestureend",_onGestureEnd);_removeListener(target,_pointerType+"enter",_onHover);_removeListener(target,_pointerType+"leave",_onHoverEnd);_removeListener(target,_pointerType+"move",_onMove);self.isEnabled=self.isPressed=self.isDragging=false;onDisable&&onDisable(self);}};self.kill=self.revert=function(){self.disable();var i=_observers.indexOf(self);i>=0&&_observers.splice(i,1);_normalizer===self&&(_normalizer=0);};_observers.push(self);isNormalizer&&_isViewport(target)&&(_normalizer=self);self.enable(event);};_createClass(Observer,[{key:"velocityX",get:function get(){return this._vx.getVelocity();}},{key:"velocityY",get:function get(){return this._vy.getVelocity();}}]);return Observer;}();Observer.version="3.12.5";Observer.create=function(vars){return new Observer(vars);};Observer.register=_initCore;Observer.getAll=function(){return _observers.slice();};Observer.getById=function(id){return _observers.filter(function(o){return o.vars.id===id;})[0];};_getGSAP()&&gsap.registerPlugin(Observer); 3107/*! 3108 * ScrollTrigger 3.12.5 3109 * https://gsap.com 3110 * 3111 * @license Copyright 2008-2024, GreenSock. All rights reserved. 3112 * Subject to the terms at https://gsap.com/standard-license or for 3113 * Club GSAP members, the agreement issued with that membership. 3114 * @author: Jack Doyle, [email protected] 3115 */ 3116var gsap$1,_coreInitted$1,_win$1,_doc$1,_docEl$1,_body$1,_root$1,_resizeDelay,_toArray,_clamp$1,_time2,_syncInterval,_refreshing,_pointerIsDown,_transformProp,_i,_prevWidth,_prevHeight,_autoRefresh,_sort,_suppressOverwrites,_ignoreResize,_normalizer$1,_ignoreMobileResize,_baseScreenHeight,_baseScreenWidth,_fixIOSBug,_context$1,_scrollRestoration,_div100vh,_100vh,_isReverted,_clampingMax,_limitCallbacks,_startup$1=1,_getTime$1=Date.now,_time1=_getTime$1(),_lastScrollTime=0,_enabled=0,_parseClamp=function _parseClamp(value,type,self){var clamp=_isString(value)&&(value.substr(0,6)==="clamp("||value.indexOf("max")>-1);self["_"+type+"Clamp"]=clamp;return clamp?value.substr(6,value.length-7):value;},_keepClamp=function _keepClamp(value,clamp){return clamp&&(!_isString(value)||value.substr(0,6)!=="clamp(")?"clamp("+value+")":value;},_rafBugFix=function _rafBugFix(){return _enabled&&requestAnimationFrame(_rafBugFix);},_pointerDownHandler=function _pointerDownHandler(){return _pointerIsDown=1;},_pointerUpHandler=function _pointerUpHandler(){return _pointerIsDown=0;},_passThrough=function _passThrough(v){return v;}
vendor: 15,652 bytes, lines 3116-3138
3116,_round=function _round(value){return Math.round(value*100000)/100000||0;},_windowExists=function _windowExists(){return typeof window!=="undefined";},_getGSAP$1=function _getGSAP(){return gsap$1||_windowExists()&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1;},_isViewport$1=function _isViewport(e){return!!~_root$1.indexOf(e);},_getViewportDimension=function _getViewportDimension(dimensionProperty){return(dimensionProperty==="Height"?_100vh:_win$1["inner"+dimensionProperty])||_docEl$1["client"+dimensionProperty]||_body$1["client"+dimensionProperty];},_getBoundsFunc=function _getBoundsFunc(element){return _getProxyProp(element,"getBoundingClientRect")||(_isViewport$1(element)?function(){_winOffsets.width=_win$1.innerWidth;_winOffsets.height=_100vh;return _winOffsets;}:function(){return _getBounds(element);});},_getSizeFunc=function _getSizeFunc(scroller,isViewport,_ref){var d=_ref.d,d2=_ref.d2,a=_ref.a;return(a=_getProxyProp(scroller,"getBoundingClientRect"))?function(){return a()[d];}:function(){return(isViewport?_getViewportDimension(d2):scroller["client"+d2])||0;};},_getOffsetsFunc=function _getOffsetsFunc(element,isViewport){return!isViewport||~_proxies.indexOf(element)?_getBoundsFunc(element):function(){return _winOffsets;};},_maxScroll=function _maxScroll(element,_ref2){var s=_ref2.s,d2=_ref2.d2,d=_ref2.d,a=_ref2.a;return Math.max(0,(s="scroll"+d2)&&(a=_getProxyProp(element,s))?a()-_getBoundsFunc(element)()[d]:_isViewport$1(element)?(_docEl$1[s]||_body$1[s])-_getViewportDimension(d2):element[s]-element["offset"+d2]);},_iterateAutoRefresh=function _iterateAutoRefresh(func,events){for(var i=0;i<_autoRefresh.length;i+=3){(!events||~events.indexOf(_autoRefresh[i+1]))&&func(_autoRefresh[i],_autoRefresh[i+1],_autoRefresh[i+2]);}},_isString=function _isString(value){return typeof value==="string";},_isFunction=function _isFunction(value){return typeof value==="function";},_isNumber=function _isNumber(value){return typeof value==="number";},_isObject=function _isObject(value){return typeof value==="object";},_endAnimation=function _endAnimation(animation,reversed,pause){return animation&&animation.progress(reversed?0:1)&&pause&&animation.pause();},_callback=function _callback(self,func){if(self.enabled){var result=self._ctx?self._ctx.add(function(){return func(self);}):func(self);result&&result.totalTime&&(self.callbackAnimation=result);}},_abs=Math.abs,_left="left",_top="top",_right="right",_bottom="bottom",_width="width",_height="height",_Right="Right",_Left="Left",_Top="Top",_Bottom="Bottom",_padding="padding",_margin="margin",_Width="Width",_Height="Height",_px="px",_getComputedStyle=function _getComputedStyle(element){return _win$1.getComputedStyle(element);},_makePositionable=function _makePositionable(element){var position=_getComputedStyle(element).position;element.style.position=position==="absolute"||position==="fixed"?position:"relative";},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults){p in obj||(obj[p]=defaults[p]);} 3117return obj;},_getBounds=function _getBounds(element,withoutTransforms){var tween=withoutTransforms&&_getComputedStyle(element)[_transformProp]!=="matrix(1, 0, 0, 1, 0, 0)"&&gsap$1.to(element,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),bounds=element.getBoundingClientRect();tween&&tween.progress(0).kill();return bounds;},_getSize=function _getSize(element,_ref3){var d2=_ref3.d2;return element["offset"+d2]||element["client"+d2]||0;},_getLabelRatioArray=function _getLabelRatioArray(timeline){var a=[],labels=timeline.labels,duration=timeline.duration(),p;for(p in labels){a.push(labels[p]/duration);} 3118return a;},_getClosestLabel=function _getClosestLabel(animation){return function(value){return gsap$1.utils.snap(_getLabelRatioArray(animation),value);};},_snapDirectional=function _snapDirectional(snapIncrementOrArray){var snap=gsap$1.utils.snap(snapIncrementOrArray),a=Array.isArray(snapIncrementOrArray)&&snapIncrementOrArray.slice(0).sort(function(a,b){return a-b;});return a?function(value,direction,threshold){if(threshold===void 0){threshold=1e-3;} 3119var i;if(!direction){return snap(value);} 3120if(direction>0){value-=threshold;for(i=0;i<a.length;i++){if(a[i]>=value){return a[i];}} 3121return a[i-1];}else{i=a.length;value+=threshold;while(i--){if(a[i]<=value){return a[i];}}} 3122return a[0];}:function(value,direction,threshold){if(threshold===void 0){threshold=1e-3;} 3123var snapped=snap(value);return!direction||Math.abs(snapped-value)<threshold||snapped-value<0===direction<0?snapped:snap(direction<0?value-snapIncrementOrArray:value+snapIncrementOrArray);};},_getLabelAtDirection=function _getLabelAtDirection(timeline){return function(value,st){return _snapDirectional(_getLabelRatioArray(timeline))(value,st.direction);};},_multiListener=function _multiListener(func,element,types,callback){return types.split(",").forEach(function(type){return func(element,type,callback);});},_addListener$1=function _addListener(element,type,func,nonPassive,capture){return element.addEventListener(type,func,{passive:!nonPassive,capture:!!capture});},_removeListener$1=function _removeListener(element,type,func,capture){return element.removeEventListener(type,func,!!capture);},_wheelListener=function _wheelListener(func,el,scrollFunc){scrollFunc=scrollFunc&&scrollFunc.wheelHandler;if(scrollFunc){func(el,"wheel",scrollFunc);func(el,"touchmove",scrollFunc);}},_markerDefaults={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},_defaults={toggleActions:"play",anticipatePin:0},_keywords={top:0,left:0,center:0.5,bottom:1,right:1},_offsetToPx=function _offsetToPx(value,size){if(_isString(value)){var eqIndex=value.indexOf("="),relative=~eqIndex?+(value.charAt(eqIndex-1)+1)*parseFloat(value.substr(eqIndex+1)):0;if(~eqIndex){value.indexOf("%")>eqIndex&&(relative*=size/100);value=value.substr(0,eqIndex-1);} 3124value=relative+(value in _keywords?_keywords[value]*size:~value.indexOf("%")?parseFloat(value)*size/100:parseFloat(value)||0);} 3125return value;},_createMarker=function _createMarker(type,name,container,direction,_ref4,offset,matchWidthEl,containerAnimation){var startColor=_ref4.startColor,endColor=_ref4.endColor,fontSize=_ref4.fontSize,indent=_ref4.indent,fontWeight=_ref4.fontWeight;var e=_doc$1.createElement("div"),useFixedPosition=_isViewport$1(container)||_getProxyProp(container,"pinType")==="fixed",isScroller=type.indexOf("scroller")!==-1,parent=useFixedPosition?_body$1:container,isStart=type.indexOf("start")!==-1,color=isStart?startColor:endColor,css="border-color:"+color+";font-size:"+fontSize+";color:"+color+";font-weight:"+fontWeight+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";css+="position:"+((isScroller||containerAnimation)&&useFixedPosition?"fixed;":"absolute;");(isScroller||containerAnimation||!useFixedPosition)&&(css+=(direction===_vertical?_right:_bottom)+":"+(offset+parseFloat(indent))+"px;");matchWidthEl&&(css+="box-sizing:border-box;text-align:left;width:"+matchWidthEl.offsetWidth+"px;");e._isStart=isStart;e.setAttribute("class","gsap-marker-"+type+(name?" marker-"+name:""));e.style.cssText=css;e.innerText=name||name===0?type+"-"+name:type;parent.children[0]?parent.insertBefore(e,parent.children[0]):parent.appendChild(e);e._offset=e["offset"+direction.op.d2];_positionMarker(e,0,direction,isStart);return e;},_positionMarker=function _positionMarker(marker,start,direction,flipped){var vars={display:"block"},side=direction[flipped?"os2":"p2"],oppositeSide=direction[flipped?"p2":"os2"];marker._isFlipped=flipped;vars[direction.a+"Percent"]=flipped?-100:0;vars[direction.a]=flipped?"1px":0;vars["border"+side+_Width]=1;vars["border"+oppositeSide+_Width]=0;vars[direction.p]=start+"px";gsap$1.set(marker,vars);},_triggers=[],_ids={},_rafID,_sync=function _sync(){return _getTime$1()-_lastScrollTime>34&&(_rafID||(_rafID=requestAnimationFrame(_updateAll)));},_onScroll$1=function _onScroll(){if(!_normalizer$1||!_normalizer$1.isPressed||_normalizer$1.startX>_body$1.clientWidth){_scrollers.cache++;if(_normalizer$1){_rafID||(_rafID=requestAnimationFrame(_updateAll));}else{_updateAll();} 3126_lastScrollTime||_dispatch("scrollStart");_lastScrollTime=_getTime$1();}},_setBaseDimensions=function _setBaseDimensions(){_baseScreenWidth=_win$1.innerWidth;_baseScreenHeight=_win$1.innerHeight;},_onResize=function _onResize(){_scrollers.cache++;!_refreshing&&!_ignoreResize&&!_doc$1.fullscreenElement&&!_doc$1.webkitFullscreenElement&&(!_ignoreMobileResize||_baseScreenWidth!==_win$1.innerWidth||Math.abs(_win$1.innerHeight-_baseScreenHeight)>_win$1.innerHeight*0.25)&&_resizeDelay.restart(true);},_listeners={},_emptyArray=[],_softRefresh=function _softRefresh(){return _removeListener$1(ScrollTrigger$1,"scrollEnd",_softRefresh)||_refreshAll(true);},_dispatch=function _dispatch(type){return _listeners[type]&&_listeners[type].map(function(f){return f();})||_emptyArray;},_savedStyles=[],_revertRecorded=function _revertRecorded(media){for(var i=0;i<_savedStyles.length;i+=5){if(!media||_savedStyles[i+4]&&_savedStyles[i+4].query===media){_savedStyles[i].style.cssText=_savedStyles[i+1];_savedStyles[i].getBBox&&_savedStyles[i].setAttribute("transform",_savedStyles[i+2]||"");_savedStyles[i+3].uncache=1;}}},_revertAll=function _revertAll(kill,media){var trigger;for(_i=0;_i<_triggers.length;_i++){trigger=_triggers[_i];if(trigger&&(!media||trigger._ctx===media)){if(kill){trigger.kill(1);}else{trigger.revert(true,true);}}} 3127_isReverted=true;media&&_revertRecorded(media);media||_dispatch("revert");},_clearScrollMemory=function _clearScrollMemory(scrollRestoration,force){_scrollers.cache++;(force||!_refreshingAll)&&_scrollers.forEach(function(obj){return _isFunction(obj)&&obj.cacheID++&&(obj.rec=0);});_isString(scrollRestoration)&&(_win$1.history.scrollRestoration=_scrollRestoration=scrollRestoration);},_refreshingAll,_refreshID=0,_queueRefreshID,_queueRefreshAll=function _queueRefreshAll(){if(_queueRefreshID!==_refreshID){var id=_queueRefreshID=_refreshID;requestAnimationFrame(function(){return id===_refreshID&&_refreshAll(true);});}},_refresh100vh=function _refresh100vh(){_body$1.appendChild(_div100vh);_100vh=!_normalizer$1&&_div100vh.offsetHeight||_win$1.innerHeight;_body$1.removeChild(_div100vh);},_hideAllMarkers=function _hideAllMarkers(hide){return _toArray(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(el){return el.style.display=hide?"none":"block";});},_refreshAll=function _refreshAll(force,skipRevert){if(_lastScrollTime&&!force&&!_isReverted){_addListener$1(ScrollTrigger$1,"scrollEnd",_softRefresh);return;} 3128_refresh100vh();_refreshingAll=ScrollTrigger$1.isRefreshing=true;_scrollers.forEach(function(obj){return _isFunction(obj)&&++obj.cacheID&&(obj.rec=obj());});var refreshInits=_dispatch("refreshInit");_sort&&ScrollTrigger$1.sort();skipRevert||_revertAll();_scrollers.forEach(function(obj){if(_isFunction(obj)){obj.smooth&&(obj.target.style.scrollBehavior="auto");obj(0);}});_triggers.slice(0).forEach(function(t){return t.refresh();});_isReverted=false;_triggers.forEach(function(t){if(t._subPinOffset&&t.pin){var prop=t.vars.horizontal?"offsetWidth":"offsetHeight",original=t.pin[prop];t.revert(true,1);t.adjustPinSpacing(t.pin[prop]-original);t.refresh();}});_clampingMax=1;_hideAllMarkers(true);_triggers.forEach(function(t){var max=_maxScroll(t.scroller,t._dir),endClamp=t.vars.end==="max"||t._endClamp&&t.end>max,startClamp=t._startClamp&&t.start>=max;(endClamp||startClamp)&&t.setPositions(startClamp?max-1:t.start,endClamp?Math.max(startClamp?max:t.start+1,max):t.end,true);});_hideAllMarkers(false);_clampingMax=0;refreshInits.forEach(function(result){return result&&result.render&&result.render(-1);});_scrollers.forEach(function(obj){if(_isFunction(obj)){obj.smooth&&requestAnimationFrame(function(){return obj.target.style.scrollBehavior="smooth";});obj.rec&&obj(obj.rec);}});_clearScrollMemory(_scrollRestoration,1);_resizeDelay.pause();_refreshID++;_refreshingAll=2;_updateAll(2);_triggers.forEach(function(t){return _isFunction(t.vars.onRefresh)&&t.vars.onRefresh(t);});_refreshingAll=ScrollTrigger$1.isRefreshing=false;_dispatch("refresh");},_lastScroll=0,_direction=1,_primary,_updateAll=function _updateAll(force){if(force===2||!_refreshingAll&&!_isReverted){ScrollTrigger$1.isUpdating=true;_primary&&_primary.update(0);var l=_triggers.length,time=_getTime$1(),recordVelocity=time-_time1>=50,scroll=l&&_triggers[0].scroll();_direction=_lastScroll>scroll?-1:1;_refreshingAll||(_lastScroll=scroll);if(recordVelocity){if(_lastScrollTime&&!_pointerIsDown&&time-_lastScrollTime>200){_lastScrollTime=0;_dispatch("scrollEnd");} 3129_time2=_time1;_time1=time;} 3130if(_direction<0){_i=l;while(_i-->0){_triggers[_i]&&_triggers[_i].update(0,recordVelocity);} 3131_direction=1;}else{for(_i=0;_i<l;_i++){_triggers[_i]&&_triggers[_i].update(0,recordVelocity);}} 3132ScrollTrigger$1.isUpdating=false;} 3133_rafID=0;},_propNamesToCopy=[_left,_top,_bottom,_right,_margin+_Bottom,_margin+_Right,_margin+_Top,_margin+_Left,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],_stateProps=_propNamesToCopy.concat([_width,_height,"boxSizing","max"+_Width,"max"+_Height,"position",_margin,_padding,_padding+_Top,_padding+_Right,_padding+_Bottom,_padding+_Left]),_swapPinOut=function _swapPinOut(pin,spacer,state){_setState(state);var cache=pin._gsap;if(cache.spacerIsNative){_setState(cache.spacerState);}else if(pin._gsap.swappedIn){var parent=spacer.parentNode;if(parent){parent.insertBefore(pin,spacer);parent.removeChild(spacer);}} 3134pin._gsap.swappedIn=false;},_swapPinIn=function _swapPinIn(pin,spacer,cs,spacerState){if(!pin._gsap.swappedIn){var i=_propNamesToCopy.length,spacerStyle=spacer.style,pinStyle=pin.style,p;while(i--){p=_propNamesToCopy[i];spacerStyle[p]=cs[p];} 3135spacerStyle.position=cs.position==="absolute"?"absolute":"relative";cs.display==="inline"&&(spacerStyle.display="inline-block");pinStyle[_bottom]=pinStyle[_right]="auto";spacerStyle.flexBasis=cs.flexBasis||"auto";spacerStyle.overflow="visible";spacerStyle.boxSizing="border-box";spacerStyle[_width]=_getSize(pin,_horizontal)+_px;spacerStyle[_height]=_getSize(pin,_vertical)+_px;spacerStyle[_padding]=pinStyle[_margin]=pinStyle[_top]=pinStyle[_left]="0";_setState(spacerState);pinStyle[_width]=pinStyle["max"+_Width]=cs[_width];pinStyle[_height]=pinStyle["max"+_Height]=cs[_height];pinStyle[_padding]=cs[_padding];if(pin.parentNode!==spacer){pin.parentNode.insertBefore(spacer,pin);spacer.appendChild(pin);} 3136pin._gsap.swappedIn=true;}},_capsExp=/([A-Z])/g,_setState=function _setState(state){if(state){var style=state.t.style,l=state.length,i=0,p,value;(state.t._gsap||gsap$1.core.getCache(state.t)).uncache=1;for(;i<l;i+=2){value=state[i+1];p=state[i];if(value){style[p]=value;}else if(style[p]){style.removeProperty(p.replace(_capsExp,"-$1").toLowerCase());}}}},_getState=function _getState(element){var l=_stateProps.length,style=element.style,state=[],i=0;for(;i<l;i++){state.push(_stateProps[i],style[_stateProps[i]]);} 3137state.t=element;return state;},_copyState=function _copyState(state,override,omitOffsets){var result=[],l=state.length,i=omitOffsets?8:0,p;for(;i<l;i+=2){p=state[i];result.push(p,p in override?override[p]:state[i+1]);} 3138result.t=state.t;return result;},_winOffsets={left:0,top:0},_parsePosition=function _parsePosition(value,trigger,scrollerSize,direction,scroll,marker,markerScroller,self,scrollerBounds,borderWidth,useFixedPosition,scrollerMa
vendor: 5,007 bytes, lines 3138-3149
3138x,containerAnimation,clampZeroProp){_isFunction(value)&&(value=value(self));if(_isString(value)&&value.substr(0,3)==="max"){value=scrollerMax+(value.charAt(4)==="="?_offsetToPx("0"+value.substr(3),scrollerSize):0);} 3139var time=containerAnimation?containerAnimation.time():0,p1,p2,element;containerAnimation&&containerAnimation.seek(0);isNaN(value)||(value=+value);if(!_isNumber(value)){_isFunction(trigger)&&(trigger=trigger(self));var offsets=(value||"0").split(" "),bounds,localOffset,globalOffset,display;element=_getTarget(trigger,self)||_body$1;bounds=_getBounds(element)||{};if((!bounds||!bounds.left&&!bounds.top)&&_getComputedStyle(element).display==="none"){display=element.style.display;element.style.display="block";bounds=_getBounds(element);display?element.style.display=display:element.style.removeProperty("display");} 3140localOffset=_offsetToPx(offsets[0],bounds[direction.d]);globalOffset=_offsetToPx(offsets[1]||"0",scrollerSize);value=bounds[direction.p]-scrollerBounds[direction.p]-borderWidth+localOffset+scroll-globalOffset;markerScroller&&_positionMarker(markerScroller,globalOffset,direction,scrollerSize-globalOffset<20||markerScroller._isStart&&globalOffset>20);scrollerSize-=scrollerSize-globalOffset;}else{containerAnimation&&(value=gsap$1.utils.mapRange(containerAnimation.scrollTrigger.start,containerAnimation.scrollTrigger.end,0,scrollerMax,value));markerScroller&&_positionMarker(markerScroller,scrollerSize,direction,true);} 3141if(clampZeroProp){self[clampZeroProp]=value||-0.001;value<0&&(value=0);} 3142if(marker){var position=value+scrollerSize,isStart=marker._isStart;p1="scroll"+direction.d2;_positionMarker(marker,position,direction,isStart&&position>20||!isStart&&(useFixedPosition?Math.max(_body$1[p1],_docEl$1[p1]):marker.parentNode[p1])<=position+1);if(useFixedPosition){scrollerBounds=_getBounds(markerScroller);useFixedPosition&&(marker.style[direction.op.p]=scrollerBounds[direction.op.p]-direction.op.m-marker._offset+_px);}} 3143if(containerAnimation&&element){p1=_getBounds(element);containerAnimation.seek(scrollerMax);p2=_getBounds(element);containerAnimation._caScrollDist=p1[direction.p]-p2[direction.p];value=value/containerAnimation._caScrollDist*scrollerMax;} 3144containerAnimation&&containerAnimation.seek(time);return containerAnimation?value:Math.round(value);},_prefixExp=/(webkit|moz|length|cssText|inset)/i,_reparent=function _reparent(element,parent,top,left){if(element.parentNode!==parent){var style=element.style,p,cs;if(parent===_body$1){element._stOrig=style.cssText;cs=_getComputedStyle(element);for(p in cs){if(!+p&&!_prefixExp.test(p)&&cs[p]&&typeof style[p]==="string"&&p!=="0"){style[p]=cs[p];}} 3145style.top=top;style.left=left;}else{style.cssText=element._stOrig;} 3146gsap$1.core.getCache(element).uncache=1;parent.appendChild(element);}},_interruptionTracker=function _interruptionTracker(getValueFunc,initialValue,onInterrupt){var last1=initialValue,last2=last1;return function(value){var current=Math.round(getValueFunc());if(current!==last1&¤t!==last2&&Math.abs(current-last1)>3&&Math.abs(current-last2)>3){value=current;onInterrupt&&onInterrupt();} 3147last2=last1;last1=value;return value;};},_shiftMarker=function _shiftMarker(marker,direction,value){var vars={};vars[direction.p]="+="+value;gsap$1.set(marker,vars);},_getTweenCreator=function _getTweenCreator(scroller,direction){var getScroll=_getScrollFunc(scroller,direction),prop="_scroll"+direction.p2,getTween=function getTween(scrollTo,vars,initialValue,change1,change2){var tween=getTween.tween,onComplete=vars.onComplete,modifiers={};initialValue=initialValue||getScroll();var checkForInterruption=_interruptionTracker(getScroll,initialValue,function(){tween.kill();getTween.tween=0;});change2=change1&&change2||0;change1=change1||scrollTo-initialValue;tween&&tween.kill();vars[prop]=scrollTo;vars.inherit=false;vars.modifiers=modifiers;modifiers[prop]=function(){return checkForInterruption(initialValue+change1*tween.ratio+change2*tween.ratio*tween.ratio);};vars.onUpdate=function(){_scrollers.cache++;getTween.tween&&_updateAll();};vars.onComplete=function(){getTween.tween=0;onComplete&&onComplete.call(tween);};tween=getTween.tween=gsap$1.to(scroller,vars);return tween;};scroller[prop]=getScroll;getScroll.wheelHandler=function(){return getTween.tween&&getTween.tween.kill()&&(getTween.tween=0);};_addListener$1(scroller,"wheel",getScroll.wheelHandler);ScrollTrigger$1.isTouch&&_addListener$1(scroller,"touchmove",getScroll.wheelHandler);return getTween;};var ScrollTrigger$1=function(){function ScrollTrigger(vars,animation){_coreInitted$1||ScrollTrigger.register(gsap$1)||console.warn("Please gsap.registerPlugin(ScrollTrigger)");_context$1(this);this.init(vars,animation);} 3148var _proto=ScrollTrigger.prototype;_proto.init=function init(vars,animation){this.progress=this.start=0;this.vars&&this.kill(true,true);if(!_enabled){this.update=this.refresh=this.kill=_passThrough;return;} 3149vars=_setDefaults(_isString(vars)||_isNumber(vars)||vars.nodeType?{trigger:vars}:vars,_defaults);
vendor: 4,167 bytes, lines 3149-3151
3149var _vars=vars,onUpdate=_vars.onUpdate,toggleClass=_vars.toggleClass,id=_vars.id,onToggle=_vars.onToggle,onRefresh=_vars.onRefresh,scrub=_vars.scrub,trigger=_vars.trigger,pin=_vars.pin,pinSpacing=_vars.pinSpacing,invalidateOnRefresh=_vars.invalidateOnRefresh,anticipatePin=_vars.anticipatePin,onScrubComplete=_vars.onScrubComplete,onSnapComplete=_vars.onSnapComplete,once=_vars.once,snap=_vars.snap,pinReparent=_vars.pinReparent,pinSpacer=_vars.pinSpacer,containerAnimation=_vars.containerAnimation,fastScrollEnd=_vars.fastScrollEnd,preventOverlaps=_vars.preventOverlaps,direction=vars.horizontal||vars.containerAnimation&&vars.horizontal!==false?_horizontal:_vertical,isToggle=!scrub&&scrub!==0,scroller=_getTarget(vars.scroller||_win$1),scrollerCache=gsap$1.core.getCache(scroller),isViewport=_isViewport$1(scroller),useFixedPosition=("pinType"in vars?vars.pinType:_getProxyProp(scroller,"pinType")||isViewport&&"fixed")==="fixed",callbacks=[vars.onEnter,vars.onLeave,vars.onEnterBack,vars.onLeaveBack],toggleActions=isToggle&&vars.toggleActions.split(" "),markers="markers"in vars?vars.markers:_defaults.markers,borderWidth=isViewport?0:parseFloat(_getComputedStyle(scroller)["border"+direction.p2+_Width])||0,self=this,onRefreshInit=vars.onRefreshInit&&function(){return vars.onRefreshInit(self);},getScrollerSize=_getSizeFunc(scroller,isViewport,direction),getScrollerOffsets=_getOffsetsFunc(scroller,isViewport),lastSnap=0,lastRefresh=0,prevProgress=0,scrollFunc=_getScrollFunc(scroller,direction),tweenTo,pinCache,snapFunc,scroll1,scroll2,start,end,markerStart,markerEnd,markerStartTrigger,markerEndTrigger,markerVars,executingOnRefresh,change,pinOriginalState,pinActiveState,pinState,spacer,offset,pinGetter,pinSetter,pinStart,pinChange,spacingStart,spacerState,markerStartSetter,pinMoves,markerEndSetter,cs,snap1,snap2,scrubTween,scrubSmooth,snapDurClamp,snapDelayedCall,prevScroll,prevAnimProgress,caMarkerSetter,customRevertReturn;self._startClamp=self._endClamp=false;self._dir=direction;anticipatePin*=45;self.scroller=scroller;self.scroll=containerAnimation?containerAnimation.time.bind(containerAnimation):scrollFunc;scroll1=scrollFunc();self.vars=vars;animation=animation||vars.animation;if("refreshPriority"in vars){_sort=1;vars.refreshPriority===-9999&&(_primary=self);} 3150scrollerCache.tweenScroll=scrollerCache.tweenScroll||{top:_getTweenCreator(scroller,_vertical),left:_getTweenCreator(scroller,_horizontal)};self.tweenTo=tweenTo=scrollerCache.tweenScroll[direction.p];self.scrubDuration=function(value){scrubSmooth=_isNumber(value)&&value;if(!scrubSmooth){scrubTween&&scrubTween.progress(1).kill();scrubTween=0;}else{scrubTween?scrubTween.duration(value):scrubTween=gsap$1.to(animation,{ease:"expo",totalProgress:"+=0",inherit:false,duration:scrubSmooth,paused:true,onComplete:function onComplete(){return onScrubComplete&&onScrubComplete(self);}});}};if(animation){animation.vars.lazy=false;animation._initted&&!self.isReverted||animation.vars.immediateRender!==false&&vars.immediateRender!==false&&animation.duration()&&animation.render(0,true,true);self.animation=animation.pause();animation.scrollTrigger=self;self.scrubDuration(scrub);snap1=0;id||(id=animation.vars.id);} 3151if(snap){if(!_isObject(snap)||snap.push){snap={snapTo:snap};}"scrollBehavior"in _body$1.style&&gsap$1.set(isViewport?[_body$1,_docEl$1]:scroller,{scrollBehavior:"auto"});_scrollers.forEach(function(o){return _isFunction(o)&&o.target===(isViewport?_doc$1.scrollingElement||_docEl$1:scroller)&&(o.smooth=false);});snapFunc=_isFunction(snap.snapTo)?snap.snapTo:snap.snapTo==="labels"?_getClosestLabel(animation):snap.snapTo==="labelsDirectional"?_getLabelAtDirection(animation):snap.directional!==false?function(value,st){return _snapDirectional(snap.snapTo)(value,_getTime$1()-lastRefresh<500?0:st.direction);}:gsap$1.utils.snap(snap.snapTo);snapDurClamp=snap.duration||{min:0.1,max:2};snapDurClamp=_isObject(snapDurClamp)?_clamp$1(snapDurClamp.min,snapDurClamp.max):_clamp$1(snapDurClamp,snapDurClamp);snapDelayedCall=gsap$1.delayedCall(snap.delay||scrubSmooth/2||0.1,function(){var scroll=scrollFunc(),refreshedRecently=_getTime$1()-lastRefresh<500,tween=tweenTo.tween;
vendor: 9,635 bytes, lines 3151-3177
3151if((refreshedRecently||Math.abs(self.getVelocity())<10)&&!tween&&!_pointerIsDown&&lastSnap!==scroll){var progress=(scroll-start)/change,totalProgress=animation&&!isToggle?animation.totalProgress():progress,velocity=refreshedRecently?0:(totalProgress-snap2)/(_getTime$1()-_time2)*1000||0,change1=gsap$1.utils.clamp(-progress,1-progress,_abs(velocity/2)*velocity/0.185),naturalEnd=progress+(snap.inertia===false?0:change1),endValue,endScroll,_snap=snap,onStart=_snap.onStart,_onInterrupt=_snap.onInterrupt,_onComplete=_snap.onComplete;endValue=snapFunc(naturalEnd,self);_isNumber(endValue)||(endValue=naturalEnd);endScroll=Math.round(start+endValue*change);if(scroll<=end&&scroll>=start&&endScroll!==scroll){if(tween&&!tween._initted&&tween.data<=_abs(endScroll-scroll)){return;} 3152if(snap.inertia===false){change1=endValue-progress;} 3153tweenTo(endScroll,{duration:snapDurClamp(_abs(Math.max(_abs(naturalEnd-totalProgress),_abs(endValue-totalProgress))*0.185/velocity/0.05||0)),ease:snap.ease||"power3",data:_abs(endScroll-scroll),onInterrupt:function onInterrupt(){return snapDelayedCall.restart(true)&&_onInterrupt&&_onInterrupt(self);},onComplete:function onComplete(){self.update();lastSnap=scrollFunc();if(animation){scrubTween?scrubTween.resetTo("totalProgress",endValue,animation._tTime/animation._tDur):animation.progress(endValue);} 3154snap1=snap2=animation&&!isToggle?animation.totalProgress():self.progress;onSnapComplete&&onSnapComplete(self);_onComplete&&_onComplete(self);}},scroll,change1*change,endScroll-scroll-change1*change);onStart&&onStart(self,tweenTo.tween);}}else if(self.isActive&&lastSnap!==scroll){snapDelayedCall.restart(true);}}).pause();} 3155id&&(_ids[id]=self);trigger=self.trigger=_getTarget(trigger||pin!==true&&pin);customRevertReturn=trigger&&trigger._gsap&&trigger._gsap.stRevert;customRevertReturn&&(customRevertReturn=customRevertReturn(self));pin=pin===true?trigger:_getTarget(pin);_isString(toggleClass)&&(toggleClass={targets:trigger,className:toggleClass});if(pin){pinSpacing===false||pinSpacing===_margin||(pinSpacing=!pinSpacing&&pin.parentNode&&pin.parentNode.style&&_getComputedStyle(pin.parentNode).display==="flex"?false:_padding);self.pin=pin;pinCache=gsap$1.core.getCache(pin);if(!pinCache.spacer){if(pinSpacer){pinSpacer=_getTarget(pinSpacer);pinSpacer&&!pinSpacer.nodeType&&(pinSpacer=pinSpacer.current||pinSpacer.nativeElement);pinCache.spacerIsNative=!!pinSpacer;pinSpacer&&(pinCache.spacerState=_getState(pinSpacer));} 3156pinCache.spacer=spacer=pinSpacer||_doc$1.createElement("div");spacer.classList.add("pin-spacer");id&&spacer.classList.add("pin-spacer-"+id);pinCache.pinState=pinOriginalState=_getState(pin);}else{pinOriginalState=pinCache.pinState;} 3157vars.force3D!==false&&gsap$1.set(pin,{force3D:true});self.spacer=spacer=pinCache.spacer;cs=_getComputedStyle(pin);spacingStart=cs[pinSpacing+direction.os2];pinGetter=gsap$1.getProperty(pin);pinSetter=gsap$1.quickSetter(pin,direction.a,_px);_swapPinIn(pin,spacer,cs);pinState=_getState(pin);} 3158if(markers){markerVars=_isObject(markers)?_setDefaults(markers,_markerDefaults):_markerDefaults;markerStartTrigger=_createMarker("scroller-start",id,scroller,direction,markerVars,0);markerEndTrigger=_createMarker("scroller-end",id,scroller,direction,markerVars,0,markerStartTrigger);offset=markerStartTrigger["offset"+direction.op.d2];var content=_getTarget(_getProxyProp(scroller,"content")||scroller);markerStart=this.markerStart=_createMarker("start",id,content,direction,markerVars,offset,0,containerAnimation);markerEnd=this.markerEnd=_createMarker("end",id,content,direction,markerVars,offset,0,containerAnimation);containerAnimation&&(caMarkerSetter=gsap$1.quickSetter([markerStart,markerEnd],direction.a,_px));if(!useFixedPosition&&!(_proxies.length&&_getProxyProp(scroller,"fixedMarkers")===true)){_makePositionable(isViewport?_body$1:scroller);gsap$1.set([markerStartTrigger,markerEndTrigger],{force3D:true});markerStartSetter=gsap$1.quickSetter(markerStartTrigger,direction.a,_px);markerEndSetter=gsap$1.quickSetter(markerEndTrigger,direction.a,_px);}} 3159if(containerAnimation){var oldOnUpdate=containerAnimation.vars.onUpdate,oldParams=containerAnimation.vars.onUpdateParams;containerAnimation.eventCallback("onUpdate",function(){self.update(0,0,1);oldOnUpdate&&oldOnUpdate.apply(containerAnimation,oldParams||[]);});} 3160self.previous=function(){return _triggers[_triggers.indexOf(self)-1];};self.next=function(){return _triggers[_triggers.indexOf(self)+1];};self.revert=function(revert,temp){if(!temp){return self.kill(true);} 3161var r=revert!==false||!self.enabled,prevRefreshing=_refreshing;if(r!==self.isReverted){if(r){prevScroll=Math.max(scrollFunc(),self.scroll.rec||0);prevProgress=self.progress;prevAnimProgress=animation&&animation.progress();} 3162markerStart&&[markerStart,markerEnd,markerStartTrigger,markerEndTrigger].forEach(function(m){return m.style.display=r?"none":"block";});if(r){_refreshing=self;self.update(r);} 3163if(pin&&(!pinReparent||!self.isActive)){if(r){_swapPinOut(pin,spacer,pinOriginalState);}else{_swapPinIn(pin,spacer,_getComputedStyle(pin),spacerState);}} 3164r||self.update(r);_refreshing=prevRefreshing;self.isReverted=r;}};self.refresh=function(soft,force,position,pinOffset){if((_refreshing||!self.enabled)&&!force){return;} 3165if(pin&&soft&&_lastScrollTime){_addListener$1(ScrollTrigger,"scrollEnd",_softRefresh);return;} 3166!_refreshingAll&&onRefreshInit&&onRefreshInit(self);_refreshing=self;if(tweenTo.tween&&!position){tweenTo.tween.kill();tweenTo.tween=0;} 3167scrubTween&&scrubTween.pause();invalidateOnRefresh&&animation&&animation.revert({kill:false}).invalidate();self.isReverted||self.revert(true,true);self._subPinOffset=false;var size=getScrollerSize(),scrollerBounds=getScrollerOffsets(),max=containerAnimation?containerAnimation.duration():_maxScroll(scroller,direction),isFirstRefresh=change<=0.01,offset=0,otherPinOffset=pinOffset||0,parsedEnd=_isObject(position)?position.end:vars.end,parsedEndTrigger=vars.endTrigger||trigger,parsedStart=_isObject(position)?position.start:vars.start||(vars.start===0||!trigger?0:pin?"0 0":"0 100%"),pinnedContainer=self.pinnedContainer=vars.pinnedContainer&&_getTarget(vars.pinnedContainer,self),triggerIndex=trigger&&Math.max(0,_triggers.indexOf(self))||0,i=triggerIndex,cs,bounds,scroll,isVertical,override,curTrigger,curPin,oppositeScroll,initted,revertedPins,forcedOverflow,markerStartOffset,markerEndOffset;if(markers&&_isObject(position)){markerStartOffset=gsap$1.getProperty(markerStartTrigger,direction.p);markerEndOffset=gsap$1.getProperty(markerEndTrigger,direction.p);} 3168while(i--){curTrigger=_triggers[i];curTrigger.end||curTrigger.refresh(0,1)||(_refreshing=self);curPin=curTrigger.pin;if(curPin&&(curPin===trigger||curPin===pin||curPin===pinnedContainer)&&!curTrigger.isReverted){revertedPins||(revertedPins=[]);revertedPins.unshift(curTrigger);curTrigger.revert(true,true);} 3169if(curTrigger!==_triggers[i]){triggerIndex--;i--;}} 3170_isFunction(parsedStart)&&(parsedStart=parsedStart(self));parsedStart=_parseClamp(parsedStart,"start",self);start=_parsePosition(parsedStart,trigger,size,direction,scrollFunc(),markerStart,markerStartTrigger,self,scrollerBounds,borderWidth,useFixedPosition,max,containerAnimation,self._startClamp&&"_startClamp")||(pin?-0.001:0);_isFunction(parsedEnd)&&(parsedEnd=parsedEnd(self));if(_isString(parsedEnd)&&!parsedEnd.indexOf("+=")){if(~parsedEnd.indexOf(" ")){parsedEnd=(_isString(parsedStart)?parsedStart.split(" ")[0]:"")+parsedEnd;}else{offset=_offsetToPx(parsedEnd.substr(2),size);parsedEnd=_isString(parsedStart)?parsedStart:(containerAnimation?gsap$1.utils.mapRange(0,containerAnimation.duration(),containerAnimation.scrollTrigger.start,containerAnimation.scrollTrigger.end,start):start)+offset;parsedEndTrigger=trigger;}} 3171parsedEnd=_parseClamp(parsedEnd,"end",self);end=Math.max(start,_parsePosition(parsedEnd||(parsedEndTrigger?"100% 0":max),parsedEndTrigger,size,direction,scrollFunc()+offset,markerEnd,markerEndTrigger,self,scrollerBounds,borderWidth,useFixedPosition,max,containerAnimation,self._endClamp&&"_endClamp"))||-0.001;offset=0;i=triggerIndex;while(i--){curTrigger=_triggers[i];curPin=curTrigger.pin;if(curPin&&curTrigger.start-curTrigger._pinPush<=start&&!containerAnimation&&curTrigger.end>0){cs=curTrigger.end-(self._startClamp?Math.max(0,curTrigger.start):curTrigger.start);if((curPin===trigger&&curTrigger.start-curTrigger._pinPush<start||curPin===pinnedContainer)&&isNaN(parsedStart)){offset+=cs*(1-curTrigger.progress);} 3172curPin===pin&&(otherPinOffset+=cs);}} 3173start+=offset;end+=offset;self._startClamp&&(self._startClamp+=offset);if(self._endClamp&&!_refreshingAll){self._endClamp=end||-0.001;end=Math.min(end,_maxScroll(scroller,direction));} 3174change=end-start||(start-=0.01)&&0.001;if(isFirstRefresh){prevProgress=gsap$1.utils.clamp(0,1,gsap$1.utils.normalize(start,end,prevScroll));} 3175self._pinPush=otherPinOffset;if(markerStart&&offset){cs={};cs[direction.a]="+="+offset;pinnedContainer&&(cs[direction.p]="-="+scrollFunc());gsap$1.set([markerStart,markerEnd],cs);} 3176if(pin&&!(_clampingMax&&self.end>=_maxScroll(scroller,direction))){cs=_getComputedStyle(pin);isVertical=direction===_vertical;scroll=scrollFunc();pinStart=parseFloat(pinGetter(direction.a))+otherPinOffset;if(!max&&end>1){forcedOverflow=(isViewport?_doc$1.scrollingElement||_docEl$1:scroller).style;forcedOverflow={style:forcedOverflow,value:forcedOverflow["overflow"+direction.a.toUpperCase()]};if(isViewport&&_getComputedStyle(_body$1)["overflow"+direction.a.toUpperCase()]!=="scroll"){forcedOverflow.style["overflow"+direction.a.toUpperCase()]="scroll";}} 3177_swapPinIn(pin,spacer,cs);pinState=_getState(pin);bounds=_getBounds(pin,true);
vendor: 8,985 bytes, lines 3177-3200
3177oppositeScroll=useFixedPosition&&_getScrollFunc(scroller,isVertical?_horizontal:_vertical)();if(pinSpacing){spacerState=[pinSpacing+direction.os2,change+otherPinOffset+_px];spacerState.t=spacer;i=pinSpacing===_padding?_getSize(pin,direction)+change+otherPinOffset:0;if(i){spacerState.push(direction.d,i+_px);spacer.style.flexBasis!=="auto"&&(spacer.style.flexBasis=i+_px);} 3178_setState(spacerState);if(pinnedContainer){_triggers.forEach(function(t){if(t.pin===pinnedContainer&&t.vars.pinSpacing!==false){t._subPinOffset=true;}});} 3179useFixedPosition&&scrollFunc(prevScroll);}else{i=_getSize(pin,direction);i&&spacer.style.flexBasis!=="auto"&&(spacer.style.flexBasis=i+_px);} 3180if(useFixedPosition){override={top:bounds.top+(isVertical?scroll-start:oppositeScroll)+_px,left:bounds.left+(isVertical?oppositeScroll:scroll-start)+_px,boxSizing:"border-box",position:"fixed"};override[_width]=override["max"+_Width]=Math.ceil(bounds.width)+_px;override[_height]=override["max"+_Height]=Math.ceil(bounds.height)+_px;override[_margin]=override[_margin+_Top]=override[_margin+_Right]=override[_margin+_Bottom]=override[_margin+_Left]="0";override[_padding]=cs[_padding];override[_padding+_Top]=cs[_padding+_Top];override[_padding+_Right]=cs[_padding+_Right];override[_padding+_Bottom]=cs[_padding+_Bottom];override[_padding+_Left]=cs[_padding+_Left];pinActiveState=_copyState(pinOriginalState,override,pinReparent);_refreshingAll&&scrollFunc(0);} 3181if(animation){initted=animation._initted;_suppressOverwrites(1);animation.render(animation.duration(),true,true);pinChange=pinGetter(direction.a)-pinStart+change+otherPinOffset;pinMoves=Math.abs(change-pinChange)>1;useFixedPosition&&pinMoves&&pinActiveState.splice(pinActiveState.length-2,2);animation.render(0,true,true);initted||animation.invalidate(true);animation.parent||animation.totalTime(animation.totalTime());_suppressOverwrites(0);}else{pinChange=change;} 3182forcedOverflow&&(forcedOverflow.value?forcedOverflow.style["overflow"+direction.a.toUpperCase()]=forcedOverflow.value:forcedOverflow.style.removeProperty("overflow-"+direction.a));}else if(trigger&&scrollFunc()&&!containerAnimation){bounds=trigger.parentNode;while(bounds&&bounds!==_body$1){if(bounds._pinOffset){start-=bounds._pinOffset;end-=bounds._pinOffset;} 3183bounds=bounds.parentNode;}} 3184revertedPins&&revertedPins.forEach(function(t){return t.revert(false,true);});self.start=start;self.end=end;scroll1=scroll2=_refreshingAll?prevScroll:scrollFunc();if(!containerAnimation&&!_refreshingAll){scroll1<prevScroll&&scrollFunc(prevScroll);self.scroll.rec=0;} 3185self.revert(false,true);lastRefresh=_getTime$1();if(snapDelayedCall){lastSnap=-1;snapDelayedCall.restart(true);} 3186_refreshing=0;animation&&isToggle&&(animation._initted||prevAnimProgress)&&animation.progress()!==prevAnimProgress&&animation.progress(prevAnimProgress||0,true).render(animation.time(),true,true);if(isFirstRefresh||prevProgress!==self.progress||containerAnimation||invalidateOnRefresh){animation&&!isToggle&&animation.totalProgress(containerAnimation&&start<-0.001&&!prevProgress?gsap$1.utils.normalize(start,end,0):prevProgress,true);self.progress=isFirstRefresh||(scroll1-start)/change===prevProgress?0:prevProgress;} 3187pin&&pinSpacing&&(spacer._pinOffset=Math.round(self.progress*pinChange));scrubTween&&scrubTween.invalidate();if(!isNaN(markerStartOffset)){markerStartOffset-=gsap$1.getProperty(markerStartTrigger,direction.p);markerEndOffset-=gsap$1.getProperty(markerEndTrigger,direction.p);_shiftMarker(markerStartTrigger,direction,markerStartOffset);_shiftMarker(markerStart,direction,markerStartOffset-(pinOffset||0));_shiftMarker(markerEndTrigger,direction,markerEndOffset);_shiftMarker(markerEnd,direction,markerEndOffset-(pinOffset||0));} 3188isFirstRefresh&&!_refreshingAll&&self.update();if(onRefresh&&!_refreshingAll&&!executingOnRefresh){executingOnRefresh=true;onRefresh(self);executingOnRefresh=false;}};self.getVelocity=function(){return(scrollFunc()-scroll2)/(_getTime$1()-_time2)*1000||0;};self.endAnimation=function(){_endAnimation(self.callbackAnimation);if(animation){scrubTween?scrubTween.progress(1):!animation.paused()?_endAnimation(animation,animation.reversed()):isToggle||_endAnimation(animation,self.direction<0,1);}};self.labelToScroll=function(label){return animation&&animation.labels&&(start||self.refresh()||start)+animation.labels[label]/animation.duration()*change||0;};self.getTrailing=function(name){var i=_triggers.indexOf(self),a=self.direction>0?_triggers.slice(0,i).reverse():_triggers.slice(i+1);return(_isString(name)?a.filter(function(t){return t.vars.preventOverlaps===name;}):a).filter(function(t){return self.direction>0?t.end<=start:t.start>=end;});};self.update=function(reset,recordVelocity,forceFake){if(containerAnimation&&!forceFake&&!reset){return;} 3189var scroll=_refreshingAll===true?prevScroll:self.scroll(),p=reset?0:(scroll-start)/change,clipped=p<0?0:p>1?1:p||0,prevProgress=self.progress,isActive,wasActive,toggleState,action,stateChanged,toggled,isAtMax,isTakingAction;if(recordVelocity){scroll2=scroll1;scroll1=containerAnimation?scrollFunc():scroll;if(snap){snap2=snap1;snap1=animation&&!isToggle?animation.totalProgress():clipped;}} 3190if(anticipatePin&&pin&&!_refreshing&&!_startup$1&&_lastScrollTime){if(!clipped&&start<scroll+(scroll-scroll2)/(_getTime$1()-_time2)*anticipatePin){clipped=0.0001;}else if(clipped===1&&end>scroll+(scroll-scroll2)/(_getTime$1()-_time2)*anticipatePin){clipped=0.9999;}} 3191if(clipped!==prevProgress&&self.enabled){isActive=self.isActive=!!clipped&&clipped<1;wasActive=!!prevProgress&&prevProgress<1;toggled=isActive!==wasActive;stateChanged=toggled||!!clipped!==!!prevProgress;self.direction=clipped>prevProgress?1:-1;self.progress=clipped;if(stateChanged&&!_refreshing){toggleState=clipped&&!prevProgress?0:clipped===1?1:prevProgress===1?2:3;if(isToggle){action=!toggled&&toggleActions[toggleState+1]!=="none"&&toggleActions[toggleState+1]||toggleActions[toggleState];isTakingAction=animation&&(action==="complete"||action==="reset"||action in animation);}} 3192preventOverlaps&&(toggled||isTakingAction)&&(isTakingAction||scrub||!animation)&&(_isFunction(preventOverlaps)?preventOverlaps(self):self.getTrailing(preventOverlaps).forEach(function(t){return t.endAnimation();}));if(!isToggle){if(scrubTween&&!_refreshing&&!_startup$1){scrubTween._dp._time-scrubTween._start!==scrubTween._time&&scrubTween.render(scrubTween._dp._time-scrubTween._start);if(scrubTween.resetTo){scrubTween.resetTo("totalProgress",clipped,animation._tTime/animation._tDur);}else{scrubTween.vars.totalProgress=clipped;scrubTween.invalidate().restart();}}else if(animation){animation.totalProgress(clipped,!!(_refreshing&&(lastRefresh||reset)));}} 3193if(pin){reset&&pinSpacing&&(spacer.style[pinSpacing+direction.os2]=spacingStart);if(!useFixedPosition){pinSetter(_round(pinStart+pinChange*clipped));}else if(stateChanged){isAtMax=!reset&&clipped>prevProgress&&end+1>scroll&&scroll+1>=_maxScroll(scroller,direction);if(pinReparent){if(!reset&&(isActive||isAtMax)){var bounds=_getBounds(pin,true),_offset=scroll-start;_reparent(pin,_body$1,bounds.top+(direction===_vertical?_offset:0)+_px,bounds.left+(direction===_vertical?0:_offset)+_px);}else{_reparent(pin,spacer);}} 3194_setState(isActive||isAtMax?pinActiveState:pinState);pinMoves&&clipped<1&&isActive||pinSetter(pinStart+(clipped===1&&!isAtMax?pinChange:0));}} 3195snap&&!tweenTo.tween&&!_refreshing&&!_startup$1&&snapDelayedCall.restart(true);toggleClass&&(toggled||once&&clipped&&(clipped<1||!_limitCallbacks))&&_toArray(toggleClass.targets).forEach(function(el){return el.classList[isActive||once?"add":"remove"](toggleClass.className);});onUpdate&&!isToggle&&!reset&&onUpdate(self);if(stateChanged&&!_refreshing){if(isToggle){if(isTakingAction){if(action==="complete"){animation.pause().totalProgress(1);}else if(action==="reset"){animation.restart(true).pause();}else if(action==="restart"){animation.restart(true);}else{animation[action]();}} 3196onUpdate&&onUpdate(self);} 3197if(toggled||!_limitCallbacks){onToggle&&toggled&&_callback(self,onToggle);callbacks[toggleState]&&_callback(self,callbacks[toggleState]);once&&(clipped===1?self.kill(false,1):callbacks[toggleState]=0);if(!toggled){toggleState=clipped===1?1:3;callbacks[toggleState]&&_callback(self,callbacks[toggleState]);}} 3198if(fastScrollEnd&&!isActive&&Math.abs(self.getVelocity())>(_isNumber(fastScrollEnd)?fastScrollEnd:2500)){_endAnimation(self.callbackAnimation);scrubTween?scrubTween.progress(1):_endAnimation(animation,action==="reverse"?1:!clipped,1);}}else if(isToggle&&onUpdate&&!_refreshing){onUpdate(self);}} 3199if(markerEndSetter){var n=containerAnimation?scroll/containerAnimation.duration()*(containerAnimation._caScrollDist||0):scroll;markerStartSetter(n+(markerStartTrigger._isFlipped?1:0));markerEndSetter(n);} 3200caMarkerSetter&&caMarkerSetter(-scroll/containerAnimation.duration()*(containerAnimation._caScrollDist||0));};self.enable=function(reset,refresh){if(!self.enabled){self.enabled=true;_addListener$1(scroller,"resize",_onResize);
vendor: 6,732 bytes, lines 3200-3211
3200isViewport||_addListener$1(scroller,"scroll",_onScroll$1);onRefreshInit&&_addListener$1(ScrollTrigger,"refreshInit",onRefreshInit);if(reset!==false){self.progress=prevProgress=0;scroll1=scroll2=lastSnap=scrollFunc();} 3201refresh!==false&&self.refresh();}};self.getTween=function(snap){return snap&&tweenTo?tweenTo.tween:scrubTween;};self.setPositions=function(newStart,newEnd,keepClamp,pinOffset){if(containerAnimation){var st=containerAnimation.scrollTrigger,duration=containerAnimation.duration(),_change=st.end-st.start;newStart=st.start+_change*newStart/duration;newEnd=st.start+_change*newEnd/duration;} 3202self.refresh(false,false,{start:_keepClamp(newStart,keepClamp&&!!self._startClamp),end:_keepClamp(newEnd,keepClamp&&!!self._endClamp)},pinOffset);self.update();};self.adjustPinSpacing=function(amount){if(spacerState&&amount){var i=spacerState.indexOf(direction.d)+1;spacerState[i]=parseFloat(spacerState[i])+amount+_px;spacerState[1]=parseFloat(spacerState[1])+amount+_px;_setState(spacerState);}};self.disable=function(reset,allowAnimation){if(self.enabled){reset!==false&&self.revert(true,true);self.enabled=self.isActive=false;allowAnimation||scrubTween&&scrubTween.pause();prevScroll=0;pinCache&&(pinCache.uncache=1);onRefreshInit&&_removeListener$1(ScrollTrigger,"refreshInit",onRefreshInit);if(snapDelayedCall){snapDelayedCall.pause();tweenTo.tween&&tweenTo.tween.kill()&&(tweenTo.tween=0);} 3203if(!isViewport){var i=_triggers.length;while(i--){if(_triggers[i].scroller===scroller&&_triggers[i]!==self){return;}} 3204_removeListener$1(scroller,"resize",_onResize);isViewport||_removeListener$1(scroller,"scroll",_onScroll$1);}}};self.kill=function(revert,allowAnimation){self.disable(revert,allowAnimation);scrubTween&&!allowAnimation&&scrubTween.kill();id&&delete _ids[id];var i=_triggers.indexOf(self);i>=0&&_triggers.splice(i,1);i===_i&&_direction>0&&_i--;i=0;_triggers.forEach(function(t){return t.scroller===self.scroller&&(i=1);});i||_refreshingAll||(self.scroll.rec=0);if(animation){animation.scrollTrigger=null;revert&&animation.revert({kill:false});allowAnimation||animation.kill();} 3205markerStart&&[markerStart,markerEnd,markerStartTrigger,markerEndTrigger].forEach(function(m){return m.parentNode&&m.parentNode.removeChild(m);});_primary===self&&(_primary=0);if(pin){pinCache&&(pinCache.uncache=1);i=0;_triggers.forEach(function(t){return t.pin===pin&&i++;});i||(pinCache.spacer=0);} 3206vars.onKill&&vars.onKill(self);};_triggers.push(self);self.enable(false,false);customRevertReturn&&customRevertReturn(self);if(animation&&animation.add&&!change){var updateFunc=self.update;self.update=function(){self.update=updateFunc;start||end||self.refresh();};gsap$1.delayedCall(0.01,self.update);change=0.01;start=end=0;}else{self.refresh();} 3207pin&&_queueRefreshAll();};ScrollTrigger.register=function register(core){if(!_coreInitted$1){gsap$1=core||_getGSAP$1();_windowExists()&&window.document&&ScrollTrigger.enable();_coreInitted$1=_enabled;} 3208return _coreInitted$1;};ScrollTrigger.defaults=function defaults(config){if(config){for(var p in config){_defaults[p]=config[p];}} 3209return _defaults;};ScrollTrigger.disable=function disable(reset,kill){_enabled=0;_triggers.forEach(function(trigger){return trigger[kill?"kill":"disable"](reset);});_removeListener$1(_win$1,"wheel",_onScroll$1);_removeListener$1(_doc$1,"scroll",_onScroll$1);clearInterval(_syncInterval);_removeListener$1(_doc$1,"touchcancel",_passThrough);_removeListener$1(_body$1,"touchstart",_passThrough);_multiListener(_removeListener$1,_doc$1,"pointerdown,touchstart,mousedown",_pointerDownHandler);_multiListener(_removeListener$1,_doc$1,"pointerup,touchend,mouseup",_pointerUpHandler);_resizeDelay.kill();_iterateAutoRefresh(_removeListener$1);for(var i=0;i<_scrollers.length;i+=3){_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+1]);_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+2]);}};ScrollTrigger.enable=function enable(){_win$1=window;_doc$1=document;_docEl$1=_doc$1.documentElement;_body$1=_doc$1.body;if(gsap$1){_toArray=gsap$1.utils.toArray;_clamp$1=gsap$1.utils.clamp;_context$1=gsap$1.core.context||_passThrough;_suppressOverwrites=gsap$1.core.suppressOverwrites||_passThrough;_scrollRestoration=_win$1.history.scrollRestoration||"auto";_lastScroll=_win$1.pageYOffset;gsap$1.core.globals("ScrollTrigger",ScrollTrigger);if(_body$1){_enabled=1;_div100vh=document.createElement("div");_div100vh.style.height="100vh";_div100vh.style.position="absolute";_refresh100vh();_rafBugFix();Observer.register(gsap$1);ScrollTrigger.isTouch=Observer.isTouch;_fixIOSBug=Observer.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent);_ignoreMobileResize=Observer.isTouch===1;_addListener$1(_win$1,"wheel",_onScroll$1);_root$1=[_win$1,_doc$1,_docEl$1,_body$1];if(gsap$1.matchMedia){ScrollTrigger.matchMedia=function(vars){var mm=gsap$1.matchMedia(),p;for(p in vars){mm.add(p,vars[p]);} 3210return mm;};gsap$1.addEventListener("matchMediaInit",function(){return _revertAll();});gsap$1.addEventListener("matchMediaRevert",function(){return _revertRecorded();});gsap$1.addEventListener("matchMedia",function(){_refreshAll(0,1);_dispatch("matchMedia");});gsap$1.matchMedia("(orientation: portrait)",function(){_setBaseDimensions();return _setBaseDimensions;});}else{console.warn("Requires GSAP 3.11.0 or later");} 3211_setBaseDimensions();_addListener$1(_doc$1,"scroll",_onScroll$1);var bodyStyle=_body$1.style,border=bodyStyle.borderTopStyle,AnimationProto=gsap$1.core.Animation.prototype,bounds,i;AnimationProto.revert||Object.defineProperty(AnimationProto,"revert",{value:function value(){return this.time(-0.01,true);}});bodyStyle.borderTopStyle="solid";bounds=_getBounds(_body$1);_vertical.m=Math.round(bounds.top+_vertical.sc())||0;_horizontal.m=Math.round(bounds.left+_horizontal.sc())||0;border?bodyStyle.borderTopStyle=border:bodyStyle.removeProperty("border-top-style");_syncInterval=setInterval(_sync,250);gsap$1.delayedCall(0.5,function(){return _startup$1=0;});_addListener$1(_doc$1,"touchcancel",_passThrough);_addListener$1(_body$1,"touchstart",_passThrough);_multiListener(_addListener$1,_doc$1,"pointerdown,touchstart,mousedown",_pointerDownHandler);_multiListener(_addListener$1,_doc$1,"pointerup,touchend,mouseup",_pointerUpHandler);_transformProp=gsap$1.utils.checkPrefix("transform");_stateProps.push(_transformProp);_coreInitted$1=_getTime$1();_resizeDelay=gsap$1.delayedCall(0.2,_refreshAll).pause();_autoRefresh=[_doc$1,"visibilitychange",function(){var w=_win$1.innerWidth,h=_win$1.innerHeight;if(_doc$1.hidden){_prevWidth=w;_prevHeight=h;}else if(_prevWidth!==w||_prevHeight!==h){_onResize();}},_doc$1,"DOMContentLoaded",_refreshAll,_win$1,"load",_refreshAll,_win$1,"resize",_onResize];_iterateAutoRefresh(_addListener$1);
vendor: 4,731 bytes, lines 3211-3213
3211_triggers.forEach(function(trigger){return trigger.enable(0,1);});for(i=0;i<_scrollers.length;i+=3){_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+1]);_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+2]);}}}};ScrollTrigger.config=function config(vars){"limitCallbacks"in vars&&(_limitCallbacks=!!vars.limitCallbacks);var ms=vars.syncInterval;ms&&clearInterval(_syncInterval)||(_syncInterval=ms)&&setInterval(_sync,ms);"ignoreMobileResize"in vars&&(_ignoreMobileResize=ScrollTrigger.isTouch===1&&vars.ignoreMobileResize);if("autoRefreshEvents"in vars){_iterateAutoRefresh(_removeListener$1)||_iterateAutoRefresh(_addListener$1,vars.autoRefreshEvents||"none");_ignoreResize=(vars.autoRefreshEvents+"").indexOf("resize")===-1;}};ScrollTrigger.scrollerProxy=function scrollerProxy(target,vars){var t=_getTarget(target),i=_scrollers.indexOf(t),isViewport=_isViewport$1(t);if(~i){_scrollers.splice(i,isViewport?6:2);} 3212if(vars){isViewport?_proxies.unshift(_win$1,vars,_body$1,vars,_docEl$1,vars):_proxies.unshift(t,vars);}};ScrollTrigger.clearMatchMedia=function clearMatchMedia(query){_triggers.forEach(function(t){return t._ctx&&t._ctx.query===query&&t._ctx.kill(true,true);});};ScrollTrigger.isInViewport=function isInViewport(element,ratio,horizontal){var bounds=(_isString(element)?_getTarget(element):element).getBoundingClientRect(),offset=bounds[horizontal?_width:_height]*ratio||0;return horizontal?bounds.right-offset>0&&bounds.left+offset<_win$1.innerWidth:bounds.bottom-offset>0&&bounds.top+offset<_win$1.innerHeight;};ScrollTrigger.positionInViewport=function positionInViewport(element,referencePoint,horizontal){_isString(element)&&(element=_getTarget(element));var bounds=element.getBoundingClientRect(),size=bounds[horizontal?_width:_height],offset=referencePoint==null?size/2:referencePoint in _keywords?_keywords[referencePoint]*size:~referencePoint.indexOf("%")?parseFloat(referencePoint)*size/100:parseFloat(referencePoint)||0;return horizontal?(bounds.left+offset)/_win$1.innerWidth:(bounds.top+offset)/_win$1.innerHeight;};ScrollTrigger.killAll=function killAll(allowListeners){_triggers.slice(0).forEach(function(t){return t.vars.id!=="ScrollSmoother"&&t.kill();});if(allowListeners!==true){var listeners=_listeners.killAll||[];_listeners={};listeners.forEach(function(f){return f();});}};return ScrollTrigger;}();ScrollTrigger$1.version="3.12.5";ScrollTrigger$1.saveStyles=function(targets){return targets?_toArray(targets).forEach(function(target){if(target&&target.style){var i=_savedStyles.indexOf(target);i>=0&&_savedStyles.splice(i,5);_savedStyles.push(target,target.style.cssText,target.getBBox&&target.getAttribute("transform"),gsap$1.core.getCache(target),_context$1());}}):_savedStyles;};ScrollTrigger$1.revert=function(soft,media){return _revertAll(!soft,media);};ScrollTrigger$1.create=function(vars,animation){return new ScrollTrigger$1(vars,animation);};ScrollTrigger$1.refresh=function(safe){return safe?_onResize():(_coreInitted$1||ScrollTrigger$1.register())&&_refreshAll(true);};ScrollTrigger$1.update=function(force){return++_scrollers.cache&&_updateAll(force===true?2:0);};ScrollTrigger$1.clearScrollMemory=_clearScrollMemory;ScrollTrigger$1.maxScroll=function(element,horizontal){return _maxScroll(element,horizontal?_horizontal:_vertical);};ScrollTrigger$1.getScrollFunc=function(element,horizontal){return _getScrollFunc(_getTarget(element),horizontal?_horizontal:_vertical);};ScrollTrigger$1.getById=function(id){return _ids[id];};ScrollTrigger$1.getAll=function(){return _triggers.filter(function(t){return t.vars.id!=="ScrollSmoother";});};ScrollTrigger$1.isScrolling=function(){return!!_lastScrollTime;};ScrollTrigger$1.snapDirectional=_snapDirectional;ScrollTrigger$1.addEventListener=function(type,callback){var a=_listeners[type]||(_listeners[type]=[]);~a.indexOf(callback)||a.push(callback);};ScrollTrigger$1.removeEventListener=function(type,callback){var a=_listeners[type],i=a&&a.indexOf(callback);i>=0&&a.splice(i,1);};ScrollTrigger$1.batch=function(targets,vars){var result=[],varsCopy={},interval=vars.interval||0.016,batchMax=vars.batchMax||1e9,proxyCallback=function proxyCallback(type,callback){var elements=[],triggers=[],delay=gsap$1.delayedCall(interval,function(){callback(elements,triggers);elements=[];triggers=[];}).pause();return function(self){elements.length||delay.restart(true);elements.push(self.trigger);triggers.push(self);batchMax<=elements.length&&delay.progress(1);};},p;for(p in vars){varsCopy[p]=p.substr(0,2)==="on"&&_isFunction(vars[p])&&p!=="onRefreshInit"?proxyCallback(p,vars[p]):vars[p];} 3213if(_isFunction(batchMax)){batchMax=batchMax();_addListener$1(ScrollTrigger$1,"refresh",function(){return batchMax=vars.batchMax();});}
vendor: 9,924 bytes, lines 3214-3236
3214_toArray(targets).forEach(function(target){var config={};for(p in varsCopy){config[p]=varsCopy[p];} 3215config.trigger=target;result.push(ScrollTrigger$1.create(config));});return result;};var _clampScrollAndGetDurationMultiplier=function _clampScrollAndGetDurationMultiplier(scrollFunc,current,end,max){current>max?scrollFunc(max):current<0&&scrollFunc(0);return end>max?(max-current)/(end-current):end<0?current/(current-end):1;},_allowNativePanning=function _allowNativePanning(target,direction){if(direction===true){target.style.removeProperty("touch-action");}else{target.style.touchAction=direction===true?"auto":direction?"pan-"+direction+(Observer.isTouch?" pinch-zoom":""):"none";} 3216target===_docEl$1&&_allowNativePanning(_body$1,direction);},_overflow={auto:1,scroll:1},_nestedScroll=function _nestedScroll(_ref5){var event=_ref5.event,target=_ref5.target,axis=_ref5.axis;var node=(event.changedTouches?event.changedTouches[0]:event).target,cache=node._gsap||gsap$1.core.getCache(node),time=_getTime$1(),cs;if(!cache._isScrollT||time-cache._isScrollT>2000){while(node&&node!==_body$1&&(node.scrollHeight<=node.clientHeight&&node.scrollWidth<=node.clientWidth||!(_overflow[(cs=_getComputedStyle(node)).overflowY]||_overflow[cs.overflowX]))){node=node.parentNode;} 3217cache._isScroll=node&&node!==target&&!_isViewport$1(node)&&(_overflow[(cs=_getComputedStyle(node)).overflowY]||_overflow[cs.overflowX]);cache._isScrollT=time;} 3218if(cache._isScroll||axis==="x"){event.stopPropagation();event._gsapAllow=true;}},_inputObserver=function _inputObserver(target,type,inputs,nested){return Observer.create({target:target,capture:true,debounce:false,lockAxis:true,type:type,onWheel:nested=nested&&_nestedScroll,onPress:nested,onDrag:nested,onScroll:nested,onEnable:function onEnable(){return inputs&&_addListener$1(_doc$1,Observer.eventTypes[0],_captureInputs,false,true);},onDisable:function onDisable(){return _removeListener$1(_doc$1,Observer.eventTypes[0],_captureInputs,true);}});},_inputExp=/(input|label|select|textarea)/i,_inputIsFocused,_captureInputs=function _captureInputs(e){var isInput=_inputExp.test(e.target.tagName);if(isInput||_inputIsFocused){e._gsapAllow=true;_inputIsFocused=isInput;}},_getScrollNormalizer=function _getScrollNormalizer(vars){_isObject(vars)||(vars={});vars.preventDefault=vars.isNormalizer=vars.allowClicks=true;vars.type||(vars.type="wheel,touch");vars.debounce=!!vars.debounce;vars.id=vars.id||"normalizer";var _vars2=vars,normalizeScrollX=_vars2.normalizeScrollX,momentum=_vars2.momentum,allowNestedScroll=_vars2.allowNestedScroll,onRelease=_vars2.onRelease,self,maxY,target=_getTarget(vars.target)||_docEl$1,smoother=gsap$1.core.globals().ScrollSmoother,smootherInstance=smoother&&smoother.get(),content=_fixIOSBug&&(vars.content&&_getTarget(vars.content)||smootherInstance&&vars.content!==false&&!smootherInstance.smooth()&&smootherInstance.content()),scrollFuncY=_getScrollFunc(target,_vertical),scrollFuncX=_getScrollFunc(target,_horizontal),scale=1,initialScale=(Observer.isTouch&&_win$1.visualViewport?_win$1.visualViewport.scale*_win$1.visualViewport.width:_win$1.outerWidth)/_win$1.innerWidth,wheelRefresh=0,resolveMomentumDuration=_isFunction(momentum)?function(){return momentum(self);}:function(){return momentum||2.8;},lastRefreshID,skipTouchMove,inputObserver=_inputObserver(target,vars.type,true,allowNestedScroll),resumeTouchMove=function resumeTouchMove(){return skipTouchMove=false;},scrollClampX=_passThrough,scrollClampY=_passThrough,updateClamps=function updateClamps(){maxY=_maxScroll(target,_vertical);scrollClampY=_clamp$1(_fixIOSBug?1:0,maxY);normalizeScrollX&&(scrollClampX=_clamp$1(0,_maxScroll(target,_horizontal)));lastRefreshID=_refreshID;},removeContentOffset=function removeContentOffset(){content._gsap.y=_round(parseFloat(content._gsap.y)+scrollFuncY.offset)+"px";content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(content._gsap.y)+", 0, 1)";scrollFuncY.offset=scrollFuncY.cacheID=0;},ignoreDrag=function ignoreDrag(){if(skipTouchMove){requestAnimationFrame(resumeTouchMove);var offset=_round(self.deltaY/2),scroll=scrollClampY(scrollFuncY.v-offset);if(content&&scroll!==scrollFuncY.v+scrollFuncY.offset){scrollFuncY.offset=scroll-scrollFuncY.v;var y=_round((parseFloat(content&&content._gsap.y)||0)-scrollFuncY.offset);content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+y+", 0, 1)";content._gsap.y=y+"px";scrollFuncY.cacheID=_scrollers.cache;_updateAll();} 3219return true;} 3220scrollFuncY.offset&&removeContentOffset();skipTouchMove=true;},tween,startScrollX,startScrollY,onStopDelayedCall,onResize=function onResize(){updateClamps();if(tween.isActive()&&tween.vars.scrollY>maxY){scrollFuncY()>maxY?tween.progress(1)&&scrollFuncY(maxY):tween.resetTo("scrollY",maxY);}};content&&gsap$1.set(content,{y:"+=0"});vars.ignoreCheck=function(e){return _fixIOSBug&&e.type==="touchmove"&&ignoreDrag()||scale>1.05&&e.type!=="touchstart"||self.isGesturing||e.touches&&e.touches.length>1;};vars.onPress=function(){skipTouchMove=false;var prevScale=scale;scale=_round((_win$1.visualViewport&&_win$1.visualViewport.scale||1)/initialScale);tween.pause();prevScale!==scale&&_allowNativePanning(target,scale>1.01?true:normalizeScrollX?false:"x");startScrollX=scrollFuncX();startScrollY=scrollFuncY();updateClamps();lastRefreshID=_refreshID;};vars.onRelease=vars.onGestureStart=function(self,wasDragging){scrollFuncY.offset&&removeContentOffset();if(!wasDragging){onStopDelayedCall.restart(true);}else{_scrollers.cache++;var dur=resolveMomentumDuration(),currentScroll,endScroll;if(normalizeScrollX){currentScroll=scrollFuncX();endScroll=currentScroll+dur*0.05*-self.velocityX/0.227;dur*=_clampScrollAndGetDurationMultiplier(scrollFuncX,currentScroll,endScroll,_maxScroll(target,_horizontal));tween.vars.scrollX=scrollClampX(endScroll);} 3221currentScroll=scrollFuncY();endScroll=currentScroll+dur*0.05*-self.velocityY/0.227;dur*=_clampScrollAndGetDurationMultiplier(scrollFuncY,currentScroll,endScroll,_maxScroll(target,_vertical));tween.vars.scrollY=scrollClampY(endScroll);tween.invalidate().duration(dur).play(0.01);if(_fixIOSBug&&tween.vars.scrollY>=maxY||currentScroll>=maxY-1){gsap$1.to({},{onUpdate:onResize,duration:dur});}} 3222onRelease&&onRelease(self);};vars.onWheel=function(){tween._ts&&tween.pause();if(_getTime$1()-wheelRefresh>1000){lastRefreshID=0;wheelRefresh=_getTime$1();}};vars.onChange=function(self,dx,dy,xArray,yArray){_refreshID!==lastRefreshID&&updateClamps();dx&&normalizeScrollX&&scrollFuncX(scrollClampX(xArray[2]===dx?startScrollX+(self.startX-self.x):scrollFuncX()+dx-xArray[1]));if(dy){scrollFuncY.offset&&removeContentOffset();var isTouch=yArray[2]===dy,y=isTouch?startScrollY+self.startY-self.y:scrollFuncY()+dy-yArray[1],yClamped=scrollClampY(y);isTouch&&y!==yClamped&&(startScrollY+=yClamped-y);scrollFuncY(yClamped);} 3223(dy||dx)&&_updateAll();};vars.onEnable=function(){_allowNativePanning(target,normalizeScrollX?false:"x");ScrollTrigger$1.addEventListener("refresh",onResize);_addListener$1(_win$1,"resize",onResize);if(scrollFuncY.smooth){scrollFuncY.target.style.scrollBehavior="auto";scrollFuncY.smooth=scrollFuncX.smooth=false;} 3224inputObserver.enable();};vars.onDisable=function(){_allowNativePanning(target,true);_removeListener$1(_win$1,"resize",onResize);ScrollTrigger$1.removeEventListener("refresh",onResize);inputObserver.kill();};vars.lockAxis=vars.lockAxis!==false;self=new Observer(vars);self.iOS=_fixIOSBug;_fixIOSBug&&!scrollFuncY()&&scrollFuncY(1);_fixIOSBug&&gsap$1.ticker.add(_passThrough);onStopDelayedCall=self._dc;tween=gsap$1.to(self,{ease:"power4",paused:true,inherit:false,scrollX:normalizeScrollX?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:_interruptionTracker(scrollFuncY,scrollFuncY(),function(){return tween.pause();})},onUpdate:_updateAll,onComplete:onStopDelayedCall.vars.onComplete});return self;};ScrollTrigger$1.sort=function(func){return _triggers.sort(func||function(a,b){return(a.vars.refreshPriority||0)*-1e6+a.start-(b.start+(b.vars.refreshPriority||0)*-1e6);});};ScrollTrigger$1.observe=function(vars){return new Observer(vars);};ScrollTrigger$1.normalizeScroll=function(vars){if(typeof vars==="undefined"){return _normalizer$1;} 3225if(vars===true&&_normalizer$1){return _normalizer$1.enable();} 3226if(vars===false){_normalizer$1&&_normalizer$1.kill();_normalizer$1=vars;return;} 3227var normalizer=vars instanceof Observer?vars:_getScrollNormalizer(vars);_normalizer$1&&_normalizer$1.target===normalizer.target&&_normalizer$1.kill();_isViewport$1(normalizer.target)&&(_normalizer$1=normalizer);return normalizer;};ScrollTrigger$1.core={_getVelocityProp:_getVelocityProp,_inputObserver:_inputObserver,_scrollers:_scrollers,_proxies:_proxies,bridge:{ss:function ss(){_lastScrollTime||_dispatch("scrollStart");_lastScrollTime=_getTime$1();},ref:function ref(){return _refreshing;}}};_getGSAP$1()&&gsap$1.registerPlugin(ScrollTrigger$1);exports.ScrollTrigger=ScrollTrigger$1;exports.default=ScrollTrigger$1;if(typeof(window)==='undefined'||window!==exports){Object.defineProperty(exports,'__esModule',{value:true});}else{delete window.default;}}))); 3228/*! 3229 * CustomEase 3.12.7 3230 * https://gsap.com 3231 * 3232 * @license Copyright 2025, GreenSock. All rights reserved. 3233 * Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership. 3234 * @author: Jack Doyle, [email protected] 3235 */ 3236(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=global||self,factory(global.window=global.window||{}));}(this,(function(exports){'use strict';var _svgPathExp=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,_scientific=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,_DEG2RAD=Math.PI/180,_sin=Math.sin,_cos=Math.cos,_abs=Math.abs,_sqrt=Math.sqrt,_isNumber=function _isNumber(value){return typeof value==="number";}
vendor: 17,405 bytes, lines 3236-3325
3236,_roundingNum=1e5,_round=function _round(value){return Math.round(value*_roundingNum)/_roundingNum||0;};function transformRawPath(rawPath,a,b,c,d,tx,ty){var j=rawPath.length,segment,l,i,x,y;while(--j>-1){segment=rawPath[j];l=segment.length;for(i=0;i<l;i+=2){x=segment[i];y=segment[i+1];segment[i]=x*a+y*c+tx;segment[i+1]=x*b+y*d+ty;}} 3237rawPath._dirty=1;return rawPath;} 3238function arcToSegment(lastX,lastY,rx,ry,angle,largeArcFlag,sweepFlag,x,y){if(lastX===x&&lastY===y){return;} 3239rx=_abs(rx);ry=_abs(ry);var angleRad=angle%360*_DEG2RAD,cosAngle=_cos(angleRad),sinAngle=_sin(angleRad),PI=Math.PI,TWOPI=PI*2,dx2=(lastX-x)/2,dy2=(lastY-y)/2,x1=cosAngle*dx2+sinAngle*dy2,y1=-sinAngle*dx2+cosAngle*dy2,x1_sq=x1*x1,y1_sq=y1*y1,radiiCheck=x1_sq/(rx*rx)+y1_sq/(ry*ry);if(radiiCheck>1){rx=_sqrt(radiiCheck)*rx;ry=_sqrt(radiiCheck)*ry;} 3240var rx_sq=rx*rx,ry_sq=ry*ry,sq=(rx_sq*ry_sq-rx_sq*y1_sq-ry_sq*x1_sq)/(rx_sq*y1_sq+ry_sq*x1_sq);if(sq<0){sq=0;} 3241var coef=(largeArcFlag===sweepFlag?-1:1)*_sqrt(sq),cx1=coef*(rx*y1/ry),cy1=coef*-(ry*x1/rx),sx2=(lastX+x)/2,sy2=(lastY+y)/2,cx=sx2+(cosAngle*cx1-sinAngle*cy1),cy=sy2+(sinAngle*cx1+cosAngle*cy1),ux=(x1-cx1)/rx,uy=(y1-cy1)/ry,vx=(-x1-cx1)/rx,vy=(-y1-cy1)/ry,temp=ux*ux+uy*uy,angleStart=(uy<0?-1:1)*Math.acos(ux/_sqrt(temp)),angleExtent=(ux*vy-uy*vx<0?-1:1)*Math.acos((ux*vx+uy*vy)/_sqrt(temp*(vx*vx+vy*vy)));isNaN(angleExtent)&&(angleExtent=PI);if(!sweepFlag&&angleExtent>0){angleExtent-=TWOPI;}else if(sweepFlag&&angleExtent<0){angleExtent+=TWOPI;} 3242angleStart%=TWOPI;angleExtent%=TWOPI;var segments=Math.ceil(_abs(angleExtent)/(TWOPI/4)),rawPath=[],angleIncrement=angleExtent/segments,controlLength=4/3*_sin(angleIncrement/2)/(1+_cos(angleIncrement/2)),ma=cosAngle*rx,mb=sinAngle*rx,mc=sinAngle*-ry,md=cosAngle*ry,i;for(i=0;i<segments;i++){angle=angleStart+i*angleIncrement;x1=_cos(angle);y1=_sin(angle);ux=_cos(angle+=angleIncrement);uy=_sin(angle);rawPath.push(x1-controlLength*y1,y1+controlLength*x1,ux+controlLength*uy,uy-controlLength*ux,ux,uy);} 3243for(i=0;i<rawPath.length;i+=2){x1=rawPath[i];y1=rawPath[i+1];rawPath[i]=x1*ma+y1*mc+cx;rawPath[i+1]=x1*mb+y1*md+cy;} 3244rawPath[i-2]=x;rawPath[i-1]=y;return rawPath;} 3245function stringToRawPath(d){var a=(d+"").replace(_scientific,function(m){var n=+m;return n<0.0001&&n>-0.0001?0:n;}).match(_svgPathExp)||[],path=[],relativeX=0,relativeY=0,twoThirds=2/3,elements=a.length,points=0,errorMessage="ERROR: malformed path: "+d,i,j,x,y,command,isRelative,segment,startX,startY,difX,difY,beziers,prevCommand,flag1,flag2,line=function line(sx,sy,ex,ey){difX=(ex-sx)/3;difY=(ey-sy)/3;segment.push(sx+difX,sy+difY,ex-difX,ey-difY,ex,ey);};if(!d||!isNaN(a[0])||isNaN(a[1])){console.log(errorMessage);return path;} 3246for(i=0;i<elements;i++){prevCommand=command;if(isNaN(a[i])){command=a[i].toUpperCase();isRelative=command!==a[i];}else{i--;} 3247x=+a[i+1];y=+a[i+2];if(isRelative){x+=relativeX;y+=relativeY;} 3248if(!i){startX=x;startY=y;} 3249if(command==="M"){if(segment){if(segment.length<8){path.length-=1;}else{points+=segment.length;}} 3250relativeX=startX=x;relativeY=startY=y;segment=[x,y];path.push(segment);i+=2;command="L";}else if(command==="C"){if(!segment){segment=[0,0];} 3251if(!isRelative){relativeX=relativeY=0;} 3252segment.push(x,y,relativeX+a[i+3]*1,relativeY+a[i+4]*1,relativeX+=a[i+5]*1,relativeY+=a[i+6]*1);i+=6;}else if(command==="S"){difX=relativeX;difY=relativeY;if(prevCommand==="C"||prevCommand==="S"){difX+=relativeX-segment[segment.length-4];difY+=relativeY-segment[segment.length-3];} 3253if(!isRelative){relativeX=relativeY=0;} 3254segment.push(difX,difY,x,y,relativeX+=a[i+3]*1,relativeY+=a[i+4]*1);i+=4;}else if(command==="Q"){difX=relativeX+(x-relativeX)*twoThirds;difY=relativeY+(y-relativeY)*twoThirds;if(!isRelative){relativeX=relativeY=0;} 3255relativeX+=a[i+3]*1;relativeY+=a[i+4]*1;segment.push(difX,difY,relativeX+(x-relativeX)*twoThirds,relativeY+(y-relativeY)*twoThirds,relativeX,relativeY);i+=4;}else if(command==="T"){difX=relativeX-segment[segment.length-4];difY=relativeY-segment[segment.length-3];segment.push(relativeX+difX,relativeY+difY,x+(relativeX+difX*1.5-x)*twoThirds,y+(relativeY+difY*1.5-y)*twoThirds,relativeX=x,relativeY=y);i+=2;}else if(command==="H"){line(relativeX,relativeY,relativeX=x,relativeY);i+=1;}else if(command==="V"){line(relativeX,relativeY,relativeX,relativeY=x+(isRelative?relativeY-relativeX:0));i+=1;}else if(command==="L"||command==="Z"){if(command==="Z"){x=startX;y=startY;segment.closed=true;} 3256if(command==="L"||_abs(relativeX-x)>0.5||_abs(relativeY-y)>0.5){line(relativeX,relativeY,x,y);if(command==="L"){i+=2;}} 3257relativeX=x;relativeY=y;}else if(command==="A"){flag1=a[i+4];flag2=a[i+5];difX=a[i+6];difY=a[i+7];j=7;if(flag1.length>1){if(flag1.length<3){difY=difX;difX=flag2;j--;}else{difY=flag2;difX=flag1.substr(2);j-=2;} 3258flag2=flag1.charAt(1);flag1=flag1.charAt(0);} 3259beziers=arcToSegment(relativeX,relativeY,+a[i+1],+a[i+2],+a[i+3],+flag1,+flag2,(isRelative?relativeX:0)+difX*1,(isRelative?relativeY:0)+difY*1);i+=j;if(beziers){for(j=0;j<beziers.length;j++){segment.push(beziers[j]);}} 3260relativeX=segment[segment.length-2];relativeY=segment[segment.length-1];}else{console.log(errorMessage);}} 3261i=segment.length;if(i<6){path.pop();i=0;}else if(segment[0]===segment[i-2]&&segment[1]===segment[i-1]){segment.closed=true;} 3262path.totalPoints=points+i;return path;} 3263function rawPathToString(rawPath){if(_isNumber(rawPath[0])){rawPath=[rawPath];} 3264var result="",l=rawPath.length,sl,s,i,segment;for(s=0;s<l;s++){segment=rawPath[s];result+="M"+_round(segment[0])+","+_round(segment[1])+" C";sl=segment.length;for(i=2;i<sl;i++){result+=_round(segment[i++])+","+_round(segment[i++])+" "+_round(segment[i++])+","+_round(segment[i++])+" "+_round(segment[i++])+","+_round(segment[i])+" ";} 3265if(segment.closed){result+="z";}} 3266return result;} 3267/*! 3268 * CustomEase 3.12.7 3269 * https://gsap.com 3270 * 3271 * @license Copyright 2008-2025, GreenSock. All rights reserved. 3272 * Subject to the terms at https://gsap.com/standard-license or for 3273 * Club GSAP members, the agreement issued with that membership. 3274 * @author: Jack Doyle, [email protected] 3275 */ 3276var gsap,_coreInitted,_getGSAP=function _getGSAP(){return gsap||typeof window!=="undefined"&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap;},_initCore=function _initCore(){gsap=_getGSAP();if(gsap){gsap.registerEase("_CE",CustomEase.create);_coreInitted=1;}else{console.warn("Please gsap.registerPlugin(CustomEase)");}},_bigNum=1e20,_round$1=function _round(value){return~~(value*1000+(value<0?-.5:.5))/1000;},_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,_needsParsingExp=/[cLlsSaAhHvVtTqQ]/g,_findMinimum=function _findMinimum(values){var l=values.length,min=_bigNum,i;for(i=1;i<l;i+=6){+values[i]<min&&(min=+values[i]);} 3277return min;},_normalize=function _normalize(values,height,originY){if(!originY&&originY!==0){originY=Math.max(+values[values.length-1],+values[1]);} 3278var tx=+values[0]*-1,ty=-originY,l=values.length,sx=1/(+values[l-2]+tx),sy=-height||(Math.abs(+values[l-1]-+values[1])<0.01*(+values[l-2]-+values[0])?_findMinimum(values)+ty:+values[l-1]+ty),i;if(sy){sy=1/sy;}else{sy=-sx;} 3279for(i=0;i<l;i+=2){values[i]=(+values[i]+tx)*sx;values[i+1]=(+values[i+1]+ty)*sy;}},_bezierToPoints=function _bezierToPoints(x1,y1,x2,y2,x3,y3,x4,y4,threshold,points,index){var x12=(x1+x2)/2,y12=(y1+y2)/2,x23=(x2+x3)/2,y23=(y2+y3)/2,x34=(x3+x4)/2,y34=(y3+y4)/2,x123=(x12+x23)/2,y123=(y12+y23)/2,x234=(x23+x34)/2,y234=(y23+y34)/2,x1234=(x123+x234)/2,y1234=(y123+y234)/2,dx=x4-x1,dy=y4-y1,d2=Math.abs((x2-x4)*dy-(y2-y4)*dx),d3=Math.abs((x3-x4)*dy-(y3-y4)*dx),length;if(!points){points=[{x:x1,y:y1},{x:x4,y:y4}];index=1;} 3280points.splice(index||points.length-1,0,{x:x1234,y:y1234});if((d2+d3)*(d2+d3)>threshold*(dx*dx+dy*dy)){length=points.length;_bezierToPoints(x1,y1,x12,y12,x123,y123,x1234,y1234,threshold,points,index);_bezierToPoints(x1234,y1234,x234,y234,x34,y34,x4,y4,threshold,points,index+1+(points.length-length));} 3281return points;};var CustomEase=function(){function CustomEase(id,data,config){_coreInitted||_initCore();this.id=id;this.setData(data,config);} 3282var _proto=CustomEase.prototype;_proto.setData=function setData(data,config){config=config||{};data=data||"0,0,1,1";var values=data.match(_numExp),closest=1,points=[],lookup=[],precision=config.precision||1,fast=precision<=1,l,a1,a2,i,inc,j,point,prevPoint,p;this.data=data;if(_needsParsingExp.test(data)||~data.indexOf("M")&&data.indexOf("C")<0){values=stringToRawPath(data)[0];} 3283l=values.length;if(l===4){values.unshift(0,0);values.push(1,1);l=8;}else if((l-2)%6){throw"Invalid CustomEase";} 3284if(+values[0]!==0||+values[l-2]!==1){_normalize(values,config.height,config.originY);} 3285this.segment=values;for(i=2;i<l;i+=6){a1={x:+values[i-2],y:+values[i-1]};a2={x:+values[i+4],y:+values[i+5]};points.push(a1,a2);_bezierToPoints(a1.x,a1.y,+values[i],+values[i+1],+values[i+2],+values[i+3],a2.x,a2.y,1/(precision*200000),points,points.length-1);} 3286l=points.length;for(i=0;i<l;i++){point=points[i];prevPoint=points[i-1]||point;if((point.x>prevPoint.x||prevPoint.y!==point.y&&prevPoint.x===point.x||point===prevPoint)&&point.x<=1){prevPoint.cx=point.x-prevPoint.x;prevPoint.cy=point.y-prevPoint.y;prevPoint.n=point;prevPoint.nx=point.x;if(fast&&i>1&&Math.abs(prevPoint.cy/prevPoint.cx-points[i-2].cy/points[i-2].cx)>2){fast=0;} 3287if(prevPoint.cx<closest){if(!prevPoint.cx){prevPoint.cx=0.001;if(i===l-1){prevPoint.x-=0.001;closest=Math.min(closest,0.001);fast=0;}}else{closest=prevPoint.cx;}}}else{points.splice(i--,1);l--;}} 3288l=1/closest+1|0;inc=1/l;j=0;point=points[0];if(fast){for(i=0;i<l;i++){p=i*inc;if(point.nx<p){point=points[++j];} 3289a1=point.y+(p-point.x)/point.cx*point.cy;lookup[i]={x:p,cx:inc,y:a1,cy:0,nx:9};if(i){lookup[i-1].cy=a1-lookup[i-1].y;}} 3290j=points[points.length-1];lookup[l-1].cy=j.y-a1;lookup[l-1].cx=j.x-lookup[lookup.length-1].x;}else{for(i=0;i<l;i++){if(point.nx<i*inc){point=points[++j];} 3291lookup[i]=point;} 3292if(j<points.length-1){lookup[i-1]=points[points.length-2];}} 3293this.ease=function(p){var point=lookup[p*l|0]||lookup[l-1];if(point.nx<p){point=point.n;} 3294return point.y+(p-point.x)/point.cx*point.cy;};this.ease.custom=this;this.id&&gsap&&gsap.registerEase(this.id,this.ease);return this;};_proto.getSVGData=function getSVGData(config){return CustomEase.getSVGData(this,config);};CustomEase.create=function create(id,data,config){return new CustomEase(id,data,config).ease;};CustomEase.register=function register(core){gsap=core;_initCore();};CustomEase.get=function get(id){return gsap.parseEase(id);};CustomEase.getSVGData=function getSVGData(ease,config){config=config||{};var width=config.width||100,height=config.height||100,x=config.x||0,y=(config.y||0)+height,e=gsap.utils.toArray(config.path)[0],a,slope,i,inc,tx,ty,precision,threshold,prevX,prevY;if(config.invert){height=-height;y=0;} 3295if(typeof ease==="string"){ease=gsap.parseEase(ease);} 3296if(ease.custom){ease=ease.custom;} 3297if(ease instanceof CustomEase){a=rawPathToString(transformRawPath([ease.segment],width,0,0,-height,x,y));}else{a=[x,y];precision=Math.max(5,(config.precision||1)*200);inc=1/precision;precision+=2;threshold=5/precision;prevX=_round$1(x+inc*width);prevY=_round$1(y+ease(inc)*-height);slope=(prevY-y)/(prevX-x);for(i=2;i<precision;i++){tx=_round$1(x+i*inc*width);ty=_round$1(y+ease(i*inc)*-height);if(Math.abs((ty-prevY)/(tx-prevX)-slope)>threshold||i===precision-1){a.push(prevX,prevY);slope=(ty-prevY)/(tx-prevX);} 3298prevX=tx;prevY=ty;} 3299a="M"+a.join(",");} 3300e&&e.setAttribute("d",a);return a;};return CustomEase;}();CustomEase.version="3.12.7";CustomEase.headless=true;_getGSAP()&&gsap.registerPlugin(CustomEase);exports.CustomEase=CustomEase;exports.default=CustomEase;Object.defineProperty(exports,'__esModule',{value:true});})));(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=global||self,factory(global.window=global.window||{}));}(this,(function(exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;} 3301function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} 3302return self;} 3303var _doc,_win,_docElement,_body,_divContainer,_svgContainer,_identityMatrix,_gEl,_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_hasOffsetBug,_setDoc=function _setDoc(element){var doc=element.ownerDocument||element;if(!(_transformProp in element.style)&&"msTransform"in element.style){_transformProp="msTransform";_transformOriginProp=_transformProp+"Origin";} 3304while(doc.parentNode&&(doc=doc.parentNode)){} 3305_win=window;_identityMatrix=new Matrix2D();if(doc){_doc=doc;_docElement=doc.documentElement;_body=doc.body;_gEl=_doc.createElementNS("http://www.w3.org/2000/svg","g");_gEl.style.transform="none";var d1=doc.createElement("div"),d2=doc.createElement("div"),root=doc&&(doc.body||doc.firstElementChild);if(root&&root.appendChild){root.appendChild(d1);d1.appendChild(d2);d1.setAttribute("style","position:static;transform:translate3d(0,0,1px)");_hasOffsetBug=d2.offsetParent!==d1;root.removeChild(d1);}} 3306return doc;},_forceNonZeroScale=function _forceNonZeroScale(e){var a,cache;while(e&&e!==_body){cache=e._gsap;cache&&cache.uncache&&cache.get(e,"x");if(cache&&!cache.scaleX&&!cache.scaleY&&cache.renderTransform){cache.scaleX=cache.scaleY=1e-4;cache.renderTransform(1,cache);a?a.push(cache):a=[cache];} 3307e=e.parentNode;} 3308return a;},_svgTemps=[],_divTemps=[],_getDocScrollTop=function _getDocScrollTop(){return _win.pageYOffset||_doc.scrollTop||_docElement.scrollTop||_body.scrollTop||0;},_getDocScrollLeft=function _getDocScrollLeft(){return _win.pageXOffset||_doc.scrollLeft||_docElement.scrollLeft||_body.scrollLeft||0;},_svgOwner=function _svgOwner(element){return element.ownerSVGElement||((element.tagName+"").toLowerCase()==="svg"?element:null);},_isFixed=function _isFixed(element){if(_win.getComputedStyle(element).position==="fixed"){return true;} 3309element=element.parentNode;if(element&&element.nodeType===1){return _isFixed(element);}},_createSibling=function _createSibling(element,i){if(element.parentNode&&(_doc||_setDoc(element))){var svg=_svgOwner(element),ns=svg?svg.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",type=svg?i?"rect":"g":"div",x=i!==2?0:100,y=i===3?100:0,css="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",e=_doc.createElementNS?_doc.createElementNS(ns.replace(/^https/,"http"),type):_doc.createElement(type);if(i){if(!svg){if(!_divContainer){_divContainer=_createSibling(element);_divContainer.style.cssText=css;} 3310e.style.cssText=css+"width:0.1px;height:0.1px;top:"+y+"px;left:"+x+"px";_divContainer.appendChild(e);}else{_svgContainer||(_svgContainer=_createSibling(element));e.setAttribute("width",0.01);e.setAttribute("height",0.01);e.setAttribute("transform","translate("+x+","+y+")");_svgContainer.appendChild(e);}} 3311return e;} 3312throw"Need document and parent.";},_consolidate=function _consolidate(m){var c=new Matrix2D(),i=0;for(;i<m.numberOfItems;i++){c.multiply(m.getItem(i).matrix);} 3313return c;},_getCTM=function _getCTM(svg){var m=svg.getCTM(),transform;if(!m){transform=svg.style[_transformProp];svg.style[_transformProp]="none";svg.appendChild(_gEl);m=_gEl.getCTM();svg.removeChild(_gEl);transform?svg.style[_transformProp]=transform:svg.style.removeProperty(_transformProp.replace(/([A-Z])/g,"-$1").toLowerCase());} 3314return m||_identityMatrix.clone();},_placeSiblings=function _placeSiblings(element,adjustGOffset){var svg=_svgOwner(element),isRootSVG=element===svg,siblings=svg?_svgTemps:_divTemps,parent=element.parentNode,container,m,b,x,y,cs;if(element===_win){return element;} 3315siblings.length||siblings.push(_createSibling(element,1),_createSibling(element,2),_createSibling(element,3));container=svg?_svgContainer:_divContainer;if(svg){if(isRootSVG){b=_getCTM(element);x=-b.e/b.a;y=-b.f/b.d;m=_identityMatrix;}else if(element.getBBox){b=element.getBBox();m=element.transform?element.transform.baseVal:{};m=!m.numberOfItems?_identityMatrix:m.numberOfItems>1?_consolidate(m):m.getItem(0).matrix;x=m.a*b.x+m.c*b.y;y=m.b*b.x+m.d*b.y;}else{m=new Matrix2D();x=y=0;} 3316if(adjustGOffset&&element.tagName.toLowerCase()==="g"){x=y=0;} 3317(isRootSVG?svg:parent).appendChild(container);container.setAttribute("transform","matrix("+m.a+","+m.b+","+m.c+","+m.d+","+(m.e+x)+","+(m.f+y)+")");}else{x=y=0;if(_hasOffsetBug){m=element.offsetParent;b=element;while(b&&(b=b.parentNode)&&b!==m&&b.parentNode){if((_win.getComputedStyle(b)[_transformProp]+"").length>4){x=b.offsetLeft;y=b.offsetTop;b=0;}}} 3318cs=_win.getComputedStyle(element);if(cs.position!=="absolute"&&cs.position!=="fixed"){m=element.offsetParent;while(parent&&parent!==m){x+=parent.scrollLeft||0;y+=parent.scrollTop||0;parent=parent.parentNode;}} 3319b=container.style;b.top=element.offsetTop-y+"px";b.left=element.offsetLeft-x+"px";b[_transformProp]=cs[_transformProp];b[_transformOriginProp]=cs[_transformOriginProp];b.position=cs.position==="fixed"?"fixed":"absolute";element.parentNode.appendChild(container);} 3320return container;},_setMatrix=function _setMatrix(m,a,b,c,d,e,f){m.a=a;m.b=b;m.c=c;m.d=d;m.e=e;m.f=f;return m;};var Matrix2D=function(){function Matrix2D(a,b,c,d,e,f){if(a===void 0){a=1;} 3321if(b===void 0){b=0;} 3322if(c===void 0){c=0;} 3323if(d===void 0){d=1;} 3324if(e===void 0){e=0;} 3325if(f===void 0){f=0;}
vendor: 2,046 bytes, lines 3326-3331
3326_setMatrix(this,a,b,c,d,e,f);} 3327var _proto=Matrix2D.prototype;_proto.inverse=function inverse(){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f,determinant=a*d-b*c||1e-10;return _setMatrix(this,d/determinant,-b/determinant,-c/determinant,a/determinant,(c*f-d*e)/determinant,-(a*f-b*e)/determinant);};_proto.multiply=function multiply(matrix){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f,a2=matrix.a,b2=matrix.c,c2=matrix.b,d2=matrix.d,e2=matrix.e,f2=matrix.f;return _setMatrix(this,a2*a+c2*c,a2*b+c2*d,b2*a+d2*c,b2*b+d2*d,e+e2*a+f2*c,f+e2*b+f2*d);};_proto.clone=function clone(){return new Matrix2D(this.a,this.b,this.c,this.d,this.e,this.f);};_proto.equals=function equals(matrix){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f;return a===matrix.a&&b===matrix.b&&c===matrix.c&&d===matrix.d&&e===matrix.e&&f===matrix.f;};_proto.apply=function apply(point,decoratee){if(decoratee===void 0){decoratee={};} 3328var x=point.x,y=point.y,a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f;decoratee.x=x*a+y*c+e||0;decoratee.y=x*b+y*d+f||0;return decoratee;};return Matrix2D;}();function getGlobalMatrix(element,inverse,adjustGOffset,includeScrollInFixed){if(!element||!element.parentNode||(_doc||_setDoc(element)).documentElement===element){return new Matrix2D();} 3329var zeroScales=_forceNonZeroScale(element),svg=_svgOwner(element),temps=svg?_svgTemps:_divTemps,container=_placeSiblings(element,adjustGOffset),b1=temps[0].getBoundingClientRect(),b2=temps[1].getBoundingClientRect(),b3=temps[2].getBoundingClientRect(),parent=container.parentNode,isFixed=!includeScrollInFixed&&_isFixed(element),m=new Matrix2D((b2.left-b1.left)/100,(b2.top-b1.top)/100,(b3.left-b1.left)/100,(b3.top-b1.top)/100,b1.left+(isFixed?0:_getDocScrollLeft()),b1.top+(isFixed?0:_getDocScrollTop()));parent.removeChild(container);if(zeroScales){b1=zeroScales.length;while(b1--){b2=zeroScales[b1];b2.scaleX=b2.scaleY=0;b2.renderTransform(1,b2);}} 3330return inverse?m.inverse():m;} 3331var gsap,_win$1,_doc$1,_docElement$1,_body$1,_tempDiv,_placeholderDiv,_
vendor: 13,933 bytes, lines 3331-3375
3331coreInitted,_checkPrefix,_toArray,_supportsPassive,_isTouchDevice,_touchEventLookup,_isMultiTouching,_isAndroid,InertiaPlugin,_defaultCursor,_supportsPointer,_context,_getStyleSaver,_dragCount=0,_windowExists=function _windowExists(){return typeof window!=="undefined";},_getGSAP=function _getGSAP(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap;},_isFunction=function _isFunction(value){return typeof value==="function";},_isObject=function _isObject(value){return typeof value==="object";},_isUndefined=function _isUndefined(value){return typeof value==="undefined";},_emptyFunc=function _emptyFunc(){return false;},_transformProp$1="transform",_transformOriginProp$1="transformOrigin",_round=function _round(value){return Math.round(value*10000)/10000;},_isArray=Array.isArray,_createElement=function _createElement(type,ns){var e=_doc$1.createElementNS?_doc$1.createElementNS((ns||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),type):_doc$1.createElement(type);return e.style?e:_doc$1.createElement(type);},_RAD2DEG=180/Math.PI,_bigNum=1e20,_identityMatrix$1=new Matrix2D(),_getTime=Date.now||function(){return new Date().getTime();},_renderQueue=[],_lookup={},_lookupCount=0,_clickableTagExp=/^(?:a|input|textarea|button|select)$/i,_lastDragTime=0,_temp1={},_windowProxy={},_copy=function _copy(obj,factor){var copy={},p;for(p in obj){copy[p]=factor?obj[p]*factor:obj[p];} 3332return copy;},_extend=function _extend(obj,defaults){for(var p in defaults){if(!(p in obj)){obj[p]=defaults[p];}} 3333return obj;},_setTouchActionForAllDescendants=function _setTouchActionForAllDescendants(elements,value){var i=elements.length,children;while(i--){value?elements[i].style.touchAction=value:elements[i].style.removeProperty("touch-action");children=elements[i].children;children&&children.length&&_setTouchActionForAllDescendants(children,value);}},_renderQueueTick=function _renderQueueTick(){return _renderQueue.forEach(function(func){return func();});},_addToRenderQueue=function _addToRenderQueue(func){_renderQueue.push(func);if(_renderQueue.length===1){gsap.ticker.add(_renderQueueTick);}},_renderQueueTimeout=function _renderQueueTimeout(){return!_renderQueue.length&&gsap.ticker.remove(_renderQueueTick);},_removeFromRenderQueue=function _removeFromRenderQueue(func){var i=_renderQueue.length;while(i--){if(_renderQueue[i]===func){_renderQueue.splice(i,1);}} 3334gsap.to(_renderQueueTimeout,{overwrite:true,delay:15,duration:0,onComplete:_renderQueueTimeout,data:"_draggable"});},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults){if(!(p in obj)){obj[p]=defaults[p];}} 3335return obj;},_addListener=function _addListener(element,type,func,capture){if(element.addEventListener){var touchType=_touchEventLookup[type];capture=capture||(_supportsPassive?{passive:false}:null);element.addEventListener(touchType||type,func,capture);touchType&&type!==touchType&&element.addEventListener(type,func,capture);}},_removeListener=function _removeListener(element,type,func,capture){if(element.removeEventListener){var touchType=_touchEventLookup[type];element.removeEventListener(touchType||type,func,capture);touchType&&type!==touchType&&element.removeEventListener(type,func,capture);}},_preventDefault=function _preventDefault(event){event.preventDefault&&event.preventDefault();event.preventManipulation&&event.preventManipulation();},_hasTouchID=function _hasTouchID(list,ID){var i=list.length;while(i--){if(list[i].identifier===ID){return true;}}},_onMultiTouchDocumentEnd=function _onMultiTouchDocumentEnd(event){_isMultiTouching=event.touches&&_dragCount<event.touches.length;_removeListener(event.target,"touchend",_onMultiTouchDocumentEnd);},_onMultiTouchDocument=function _onMultiTouchDocument(event){_isMultiTouching=event.touches&&_dragCount<event.touches.length;_addListener(event.target,"touchend",_onMultiTouchDocumentEnd);},_getDocScrollTop$1=function _getDocScrollTop(doc){return _win$1.pageYOffset||doc.scrollTop||doc.documentElement.scrollTop||doc.body.scrollTop||0;},_getDocScrollLeft$1=function _getDocScrollLeft(doc){return _win$1.pageXOffset||doc.scrollLeft||doc.documentElement.scrollLeft||doc.body.scrollLeft||0;},_addScrollListener=function _addScrollListener(e,callback){_addListener(e,"scroll",callback);if(!_isRoot(e.parentNode)){_addScrollListener(e.parentNode,callback);}},_removeScrollListener=function _removeScrollListener(e,callback){_removeListener(e,"scroll",callback);if(!_isRoot(e.parentNode)){_removeScrollListener(e.parentNode,callback);}},_isRoot=function _isRoot(e){return!!(!e||e===_docElement$1||e.nodeType===9||e===_doc$1.body||e===_win$1||!e.nodeType||!e.parentNode);},_getMaxScroll=function _getMaxScroll(element,axis){var dim=axis==="x"?"Width":"Height",scroll="scroll"+dim,client="client"+dim;return Math.max(0,_isRoot(element)?Math.max(_docElement$1[scroll],_body$1[scroll])-(_win$1["inner"+dim]||_docElement$1[client]||_body$1[client]):element[scroll]-element[client]);},_recordMaxScrolls=function _recordMaxScrolls(e,skipCurrent){var x=_getMaxScroll(e,"x"),y=_getMaxScroll(e,"y");if(_isRoot(e)){e=_windowProxy;}else{_recordMaxScrolls(e.parentNode,skipCurrent);} 3336e._gsMaxScrollX=x;e._gsMaxScrollY=y;if(!skipCurrent){e._gsScrollX=e.scrollLeft||0;e._gsScrollY=e.scrollTop||0;}},_setStyle=function _setStyle(element,property,value){var style=element.style;if(!style){return;} 3337if(_isUndefined(style[property])){property=_checkPrefix(property,element)||property;} 3338if(value==null){style.removeProperty&&style.removeProperty(property.replace(/([A-Z])/g,"-$1").toLowerCase());}else{style[property]=value;}},_getComputedStyle=function _getComputedStyle(element){return _win$1.getComputedStyle(element instanceof Element?element:element.host||(element.parentNode||{}).host||element);},_tempRect={},_parseRect=function _parseRect(e){if(e===_win$1){_tempRect.left=_tempRect.top=0;_tempRect.width=_tempRect.right=_docElement$1.clientWidth||e.innerWidth||_body$1.clientWidth||0;_tempRect.height=_tempRect.bottom=(e.innerHeight||0)-20<_docElement$1.clientHeight?_docElement$1.clientHeight:e.innerHeight||_body$1.clientHeight||0;return _tempRect;} 3339var doc=e.ownerDocument||_doc$1,r=!_isUndefined(e.pageX)?{left:e.pageX-_getDocScrollLeft$1(doc),top:e.pageY-_getDocScrollTop$1(doc),right:e.pageX-_getDocScrollLeft$1(doc)+1,bottom:e.pageY-_getDocScrollTop$1(doc)+1}:!e.nodeType&&!_isUndefined(e.left)&&!_isUndefined(e.top)?e:_toArray(e)[0].getBoundingClientRect();if(_isUndefined(r.right)&&!_isUndefined(r.width)){r.right=r.left+r.width;r.bottom=r.top+r.height;}else if(_isUndefined(r.width)){r={width:r.right-r.left,height:r.bottom-r.top,right:r.right,left:r.left,bottom:r.bottom,top:r.top};} 3340return r;},_dispatchEvent=function _dispatchEvent(target,type,callbackName){var vars=target.vars,callback=vars[callbackName],listeners=target._listeners[type],result;if(_isFunction(callback)){result=callback.apply(vars.callbackScope||target,vars[callbackName+"Params"]||[target.pointerEvent]);} 3341if(listeners&&target.dispatchEvent(type)===false){result=false;} 3342return result;},_getBounds=function _getBounds(target,context){var e=_toArray(target)[0],top,left,offset;if(!e.nodeType&&e!==_win$1){if(!_isUndefined(target.left)){offset={x:0,y:0};return{left:target.left-offset.x,top:target.top-offset.y,width:target.width,height:target.height};} 3343left=target.min||target.minX||target.minRotation||0;top=target.min||target.minY||0;return{left:left,top:top,width:(target.max||target.maxX||target.maxRotation||0)-left,height:(target.max||target.maxY||0)-top};} 3344return _getElementBounds(e,context);},_point1={},_getElementBounds=function _getElementBounds(element,context){context=_toArray(context)[0];var isSVG=element.getBBox&&element.ownerSVGElement,doc=element.ownerDocument||_doc$1,left,right,top,bottom,matrix,p1,p2,p3,p4,bbox,width,height,cs;if(element===_win$1){top=_getDocScrollTop$1(doc);left=_getDocScrollLeft$1(doc);right=left+(doc.documentElement.clientWidth||element.innerWidth||doc.body.clientWidth||0);bottom=top+((element.innerHeight||0)-20<doc.documentElement.clientHeight?doc.documentElement.clientHeight:element.innerHeight||doc.body.clientHeight||0);}else if(context===_win$1||_isUndefined(context)){return element.getBoundingClientRect();}else{left=top=0;if(isSVG){bbox=element.getBBox();width=bbox.width;height=bbox.height;}else{if(element.viewBox&&(bbox=element.viewBox.baseVal)){left=bbox.x||0;top=bbox.y||0;width=bbox.width;height=bbox.height;} 3345if(!width){cs=_getComputedStyle(element);bbox=cs.boxSizing==="border-box";width=(parseFloat(cs.width)||element.clientWidth||0)+(bbox?0:parseFloat(cs.borderLeftWidth)+parseFloat(cs.borderRightWidth));height=(parseFloat(cs.height)||element.clientHeight||0)+(bbox?0:parseFloat(cs.borderTopWidth)+parseFloat(cs.borderBottomWidth));}} 3346right=width;bottom=height;} 3347if(element===context){return{left:left,top:top,width:right-left,height:bottom-top};} 3348matrix=getGlobalMatrix(context,true).multiply(getGlobalMatrix(element));p1=matrix.apply({x:left,y:top});p2=matrix.apply({x:right,y:top});p3=matrix.apply({x:right,y:bottom});p4=matrix.apply({x:left,y:bottom});left=Math.min(p1.x,p2.x,p3.x,p4.x);top=Math.min(p1.y,p2.y,p3.y,p4.y);return{left:left,top:top,width:Math.max(p1.x,p2.x,p3.x,p4.x)-left,height:Math.max(p1.y,p2.y,p3.y,p4.y)-top};},_parseInertia=function _parseInertia(draggable,snap,max,min,factor,forceZeroVelocity){var vars={},a,i,l;if(snap){if(factor!==1&&snap instanceof Array){vars.end=a=[];l=snap.length;if(_isObject(snap[0])){for(i=0;i<l;i++){a[i]=_copy(snap[i],factor);}}else{for(i=0;i<l;i++){a[i]=snap[i]*factor;}} 3349max+=1.1;min-=1.1;}else if(_isFunction(snap)){vars.end=function(value){var result=snap.call(draggable,value),copy,p;if(factor!==1){if(_isObject(result)){copy={};for(p in result){copy[p]=result[p]*factor;} 3350result=copy;}else{result*=factor;}} 3351return result;};}else{vars.end=snap;}} 3352if(max||max===0){vars.max=max;} 3353if(min||min===0){vars.min=min;} 3354if(forceZeroVelocity){vars.velocity=0;} 3355return vars;},_isClickable=function _isClickable(element){var data;return!element||!element.getAttribute||element===_body$1?false:(data=element.getAttribute("data-clickable"))==="true"||data!=="false"&&(_clickableTagExp.test(element.nodeName+"")||element.getAttribute("contentEditable")==="true")?true:_isClickable(element.parentNode);},_setSelectable=function _setSelectable(elements,selectable){var i=elements.length,e;while(i--){e=elements[i];e.ondragstart=e.onselectstart=selectable?null:_emptyFunc;gsap.set(e,{lazy:true,userSelect:selectable?"text":"none"});}},_isFixed$1=function _isFixed(element){if(_getComputedStyle(element).position==="fixed"){return true;} 3356element=element.parentNode;if(element&&element.nodeType===1){return _isFixed(element);}},_supports3D,_addPaddingBR,ScrollProxy=function ScrollProxy(element,vars){element=gsap.utils.toArray(element)[0];vars=vars||{};var content=document.createElement("div"),style=content.style,node=element.firstChild,offsetTop=0,offsetLeft=0,prevTop=element.scrollTop,prevLeft=element.scrollLeft,scrollWidth=element.scrollWidth,scrollHeight=element.scrollHeight,extraPadRight=0,maxLeft=0,maxTop=0,elementWidth,elementHeight,contentHeight,nextNode,transformStart,transformEnd;if(_supports3D&&vars.force3D!==false){transformStart="translate3d(";transformEnd="px,0px)";}else if(_transformProp$1){transformStart="translate(";transformEnd="px)";} 3357this.scrollTop=function(value,force){if(!arguments.length){return-this.top();} 3358this.top(-value,force);};this.scrollLeft=function(value,force){if(!arguments.length){return-this.left();} 3359this.left(-value,force);};this.left=function(value,force){if(!arguments.length){return-(element.scrollLeft+offsetLeft);} 3360var dif=element.scrollLeft-prevLeft,oldOffset=offsetLeft;if((dif>2||dif<-2)&&!force){prevLeft=element.scrollLeft;gsap.killTweensOf(this,{left:1,scrollLeft:1});this.left(-prevLeft);if(vars.onKill){vars.onKill();} 3361return;} 3362value=-value;if(value<0){offsetLeft=value-0.5|0;value=0;}else if(value>maxLeft){offsetLeft=value-maxLeft|0;value=maxLeft;}else{offsetLeft=0;} 3363if(offsetLeft||oldOffset){if(!this._skip){style[_transformProp$1]=transformStart+-offsetLeft+"px,"+-offsetTop+transformEnd;} 3364if(offsetLeft+extraPadRight>=0){style.paddingRight=offsetLeft+extraPadRight+"px";}} 3365element.scrollLeft=value|0;prevLeft=element.scrollLeft;};this.top=function(value,force){if(!arguments.length){return-(element.scrollTop+offsetTop);} 3366var dif=element.scrollTop-prevTop,oldOffset=offsetTop;if((dif>2||dif<-2)&&!force){prevTop=element.scrollTop;gsap.killTweensOf(this,{top:1,scrollTop:1});this.top(-prevTop);if(vars.onKill){vars.onKill();} 3367return;} 3368value=-value;if(value<0){offsetTop=value-0.5|0;value=0;}else if(value>maxTop){offsetTop=value-maxTop|0;value=maxTop;}else{offsetTop=0;} 3369if(offsetTop||oldOffset){if(!this._skip){style[_transformProp$1]=transformStart+-offsetLeft+"px,"+-offsetTop+transformEnd;}} 3370element.scrollTop=value|0;prevTop=element.scrollTop;};this.maxScrollTop=function(){return maxTop;};this.maxScrollLeft=function(){return maxLeft;};this.disable=function(){node=content.firstChild;while(node){nextNode=node.nextSibling;element.appendChild(node);node=nextNode;} 3371if(element===content.parentNode){element.removeChild(content);}};this.enable=function(){node=element.firstChild;if(node===content){return;} 3372while(node){nextNode=node.nextSibling;content.appendChild(node);node=nextNode;} 3373element.appendChild(content);this.calibrate();};this.calibrate=function(force){var widthMatches=element.clientWidth===elementWidth,cs,x,y;prevTop=element.scrollTop;prevLeft=element.scrollLeft;if(widthMatches&&element.clientHeight===elementHeight&&content.offsetHeight===contentHeight&&scrollWidth===element.scrollWidth&&scrollHeight===element.scrollHeight&&!force){return;} 3374if(offsetTop||offsetLeft){x=this.left();y=this.top();this.left(-element.scrollLeft);this.top(-element.scrollTop);} 3375cs=_getComputedStyle(element);if(!widthMatches||force){style.display="block";style.width="auto";style.paddingRight="0px";
vendor: 4,913 bytes, lines 3375-3382
3375extraPadRight=Math.max(0,element.scrollWidth-element.clientWidth);if(extraPadRight){extraPadRight+=parseFloat(cs.paddingLeft)+(_addPaddingBR?parseFloat(cs.paddingRight):0);}} 3376style.display="inline-block";style.position="relative";style.overflow="visible";style.verticalAlign="top";style.boxSizing="content-box";style.width="100%";style.paddingRight=extraPadRight+"px";if(_addPaddingBR){style.paddingBottom=cs.paddingBottom;} 3377elementWidth=element.clientWidth;elementHeight=element.clientHeight;scrollWidth=element.scrollWidth;scrollHeight=element.scrollHeight;maxLeft=element.scrollWidth-elementWidth;maxTop=element.scrollHeight-elementHeight;contentHeight=content.offsetHeight;style.display="block";if(x||y){this.left(x);this.top(y);}};this.content=content;this.element=element;this._skip=false;this.enable();},_initCore=function _initCore(required){if(_windowExists()&&document.body){var nav=window&&window.navigator;_win$1=window;_doc$1=document;_docElement$1=_doc$1.documentElement;_body$1=_doc$1.body;_tempDiv=_createElement("div");_supportsPointer=!!window.PointerEvent;_placeholderDiv=_createElement("div");_placeholderDiv.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab";_defaultCursor=_placeholderDiv.style.cursor==="grab"?"grab":"move";_isAndroid=nav&&nav.userAgent.toLowerCase().indexOf("android")!==-1;_isTouchDevice="ontouchstart"in _docElement$1&&"orientation"in _win$1||nav&&(nav.MaxTouchPoints>0||nav.msMaxTouchPoints>0);_addPaddingBR=function(){var div=_createElement("div"),child=_createElement("div"),childStyle=child.style,parent=_body$1,val;childStyle.display="inline-block";childStyle.position="relative";div.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden";div.appendChild(child);parent.appendChild(div);val=child.offsetHeight+18>div.scrollHeight;parent.removeChild(div);return val;}();_touchEventLookup=function(types){var standard=types.split(","),converted=("onpointerdown"in _tempDiv?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in _tempDiv?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":types).split(","),obj={},i=4;while(--i>-1){obj[standard[i]]=converted[i];obj[converted[i]]=standard[i];} 3378try{_docElement$1.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){_supportsPassive=1;}}));}catch(e){} 3379return obj;}("touchstart,touchmove,touchend,touchcancel");_addListener(_doc$1,"touchcancel",_emptyFunc);_addListener(_win$1,"touchmove",_emptyFunc);_body$1&&_body$1.addEventListener("touchstart",_emptyFunc);_addListener(_doc$1,"contextmenu",function(){for(var p in _lookup){if(_lookup[p].isPressed){_lookup[p].endDrag();}}});gsap=_coreInitted=_getGSAP();} 3380if(gsap){InertiaPlugin=gsap.plugins.inertia;_context=gsap.core.context||function(){};_checkPrefix=gsap.utils.checkPrefix;_transformProp$1=_checkPrefix(_transformProp$1);_transformOriginProp$1=_checkPrefix(_transformOriginProp$1);_toArray=gsap.utils.toArray;_getStyleSaver=gsap.core.getStyleSaver;_supports3D=!!_checkPrefix("perspective");}else if(required){console.warn("Please gsap.registerPlugin(Draggable)");}};var EventDispatcher=function(){function EventDispatcher(target){this._listeners={};this.target=target||this;} 3381var _proto=EventDispatcher.prototype;_proto.addEventListener=function addEventListener(type,callback){var list=this._listeners[type]||(this._listeners[type]=[]);if(!~list.indexOf(callback)){list.push(callback);}};_proto.removeEventListener=function removeEventListener(type,callback){var list=this._listeners[type],i=list&&list.indexOf(callback);i>=0&&list.splice(i,1);};_proto.dispatchEvent=function dispatchEvent(type){var _this=this;var result;(this._listeners[type]||[]).forEach(function(callback){return callback.call(_this,{type:type,target:_this.target})===false&&(result=false);});return result;};return EventDispatcher;}();var Draggable=function(_EventDispatcher){_inheritsLoose(Draggable,_EventDispatcher);function Draggable(target,vars){var _this2;_this2=_EventDispatcher.call(this)||this;_coreInitted||_initCore(1);target=_toArray(target)[0];_this2.styles=_getStyleSaver&&_getStyleSaver(target,"transform,left,top");if(!InertiaPlugin){InertiaPlugin=gsap.plugins.inertia;} 3382_this2.vars=vars=_copy(vars||{});_this2.target=target;_this2.x=_this2.y=_this2.rotation=0;_this2.dragResistance=parseFloat(vars.dragResistance)||0;_this2.edgeResistance=isNaN(vars.edgeResistance)?1:parseFloat(vars.edgeResistance)||0;_this2.lockAxis=vars.lockAxis;_this2.autoScroll=vars.autoScroll||0;_this2.lockedAxis=null;_this2.allowEventDefault=!!vars.allowEventDefault;gsap.getProperty(target,"x");var type=(vars.type||"x,y").toLowerCase(),xyMode=~type.indexOf("x")||~type.indexOf("y"),rotationMode=type.indexOf("rotation")!==-1,xProp=rotationMode?"rotation":xyMode?"x":"left",yProp=xyMode?"y":"top",allowX=!!(~type.indexOf("x")||~type.indexOf("left")||t
vendor: 18,053 bytes, lines 3382-3454
3382ype==="scroll"),allowY=!!(~type.indexOf("y")||~type.indexOf("top")||type==="scroll"),minimumMovement=vars.minimumMovement||2,self=_assertThisInitialized(_this2),triggers=_toArray(vars.trigger||vars.handle||target),killProps={},dragEndTime=0,checkAutoScrollBounds=false,autoScrollMarginTop=vars.autoScrollMarginTop||40,autoScrollMarginRight=vars.autoScrollMarginRight||40,autoScrollMarginBottom=vars.autoScrollMarginBottom||40,autoScrollMarginLeft=vars.autoScrollMarginLeft||40,isClickable=vars.clickableTest||_isClickable,clickTime=0,gsCache=target._gsap||gsap.core.getCache(target),isFixed=_isFixed$1(target),getPropAsNum=function getPropAsNum(property,unit){return parseFloat(gsCache.get(target,property,unit));},ownerDoc=target.ownerDocument||_doc$1,enabled,scrollProxy,startPointerX,startPointerY,startElementX,startElementY,hasBounds,hasDragCallback,hasMoveCallback,maxX,minX,maxY,minY,touch,touchID,rotationOrigin,dirty,old,snapX,snapY,snapXY,isClicking,touchEventTarget,matrix,interrupted,allowNativeTouchScrolling,touchDragAxis,isDispatching,clickDispatch,trustedClickDispatch,isPreventingDefault,innerMatrix,dragged,onContextMenu=function onContextMenu(e){_preventDefault(e);e.stopImmediatePropagation&&e.stopImmediatePropagation();return false;},render=function render(suppressEvents){if(self.autoScroll&&self.isDragging&&(checkAutoScrollBounds||dirty)){var e=target,autoScrollFactor=self.autoScroll*15,parent,isRoot,rect,pointerX,pointerY,changeX,changeY,gap;checkAutoScrollBounds=false;_windowProxy.scrollTop=_win$1.pageYOffset!=null?_win$1.pageYOffset:ownerDoc.documentElement.scrollTop!=null?ownerDoc.documentElement.scrollTop:ownerDoc.body.scrollTop;_windowProxy.scrollLeft=_win$1.pageXOffset!=null?_win$1.pageXOffset:ownerDoc.documentElement.scrollLeft!=null?ownerDoc.documentElement.scrollLeft:ownerDoc.body.scrollLeft;pointerX=self.pointerX-_windowProxy.scrollLeft;pointerY=self.pointerY-_windowProxy.scrollTop;while(e&&!isRoot){isRoot=_isRoot(e.parentNode);parent=isRoot?_windowProxy:e.parentNode;rect=isRoot?{bottom:Math.max(_docElement$1.clientHeight,_win$1.innerHeight||0),right:Math.max(_docElement$1.clientWidth,_win$1.innerWidth||0),left:0,top:0}:parent.getBoundingClientRect();changeX=changeY=0;if(allowY){gap=parent._gsMaxScrollY-parent.scrollTop;if(gap<0){changeY=gap;}else if(pointerY>rect.bottom-autoScrollMarginBottom&&gap){checkAutoScrollBounds=true;changeY=Math.min(gap,autoScrollFactor*(1-Math.max(0,rect.bottom-pointerY)/autoScrollMarginBottom)|0);}else if(pointerY<rect.top+autoScrollMarginTop&&parent.scrollTop){checkAutoScrollBounds=true;changeY=-Math.min(parent.scrollTop,autoScrollFactor*(1-Math.max(0,pointerY-rect.top)/autoScrollMarginTop)|0);} 3383if(changeY){parent.scrollTop+=changeY;}} 3384if(allowX){gap=parent._gsMaxScrollX-parent.scrollLeft;if(gap<0){changeX=gap;}else if(pointerX>rect.right-autoScrollMarginRight&&gap){checkAutoScrollBounds=true;changeX=Math.min(gap,autoScrollFactor*(1-Math.max(0,rect.right-pointerX)/autoScrollMarginRight)|0);}else if(pointerX<rect.left+autoScrollMarginLeft&&parent.scrollLeft){checkAutoScrollBounds=true;changeX=-Math.min(parent.scrollLeft,autoScrollFactor*(1-Math.max(0,pointerX-rect.left)/autoScrollMarginLeft)|0);} 3385if(changeX){parent.scrollLeft+=changeX;}} 3386if(isRoot&&(changeX||changeY)){_win$1.scrollTo(parent.scrollLeft,parent.scrollTop);setPointerPosition(self.pointerX+changeX,self.pointerY+changeY);} 3387e=parent;}} 3388if(dirty){var x=self.x,y=self.y;if(rotationMode){self.deltaX=x-parseFloat(gsCache.rotation);self.rotation=x;gsCache.rotation=x+"deg";gsCache.renderTransform(1,gsCache);}else{if(scrollProxy){if(allowY){self.deltaY=y-scrollProxy.top();scrollProxy.top(y);} 3389if(allowX){self.deltaX=x-scrollProxy.left();scrollProxy.left(x);}}else if(xyMode){if(allowY){self.deltaY=y-parseFloat(gsCache.y);gsCache.y=y+"px";} 3390if(allowX){self.deltaX=x-parseFloat(gsCache.x);gsCache.x=x+"px";} 3391gsCache.renderTransform(1,gsCache);}else{if(allowY){self.deltaY=y-parseFloat(target.style.top||0);target.style.top=y+"px";} 3392if(allowX){self.deltaX=x-parseFloat(target.style.left||0);target.style.left=x+"px";}}} 3393if(hasDragCallback&&!suppressEvents&&!isDispatching){isDispatching=true;if(_dispatchEvent(self,"drag","onDrag")===false){if(allowX){self.x-=self.deltaX;} 3394if(allowY){self.y-=self.deltaY;} 3395render(true);} 3396isDispatching=false;}} 3397dirty=false;},syncXY=function syncXY(skipOnUpdate,skipSnap){var x=self.x,y=self.y,snappedValue,cs;if(!target._gsap){gsCache=gsap.core.getCache(target);} 3398gsCache.uncache&&gsap.getProperty(target,"x");if(xyMode){self.x=parseFloat(gsCache.x);self.y=parseFloat(gsCache.y);}else if(rotationMode){self.x=self.rotation=parseFloat(gsCache.rotation);}else if(scrollProxy){self.y=scrollProxy.top();self.x=scrollProxy.left();}else{self.y=parseFloat(target.style.top||(cs=_getComputedStyle(target))&&cs.top)||0;self.x=parseFloat(target.style.left||(cs||{}).left)||0;} 3399if((snapX||snapY||snapXY)&&!skipSnap&&(self.isDragging||self.isThrowing)){if(snapXY){_temp1.x=self.x;_temp1.y=self.y;snappedValue=snapXY(_temp1);if(snappedValue.x!==self.x){self.x=snappedValue.x;dirty=true;} 3400if(snappedValue.y!==self.y){self.y=snappedValue.y;dirty=true;}} 3401if(snapX){snappedValue=snapX(self.x);if(snappedValue!==self.x){self.x=snappedValue;if(rotationMode){self.rotation=snappedValue;} 3402dirty=true;}} 3403if(snapY){snappedValue=snapY(self.y);if(snappedValue!==self.y){self.y=snappedValue;} 3404dirty=true;}} 3405dirty&&render(true);if(!skipOnUpdate){self.deltaX=self.x-x;self.deltaY=self.y-y;_dispatchEvent(self,"throwupdate","onThrowUpdate");}},buildSnapFunc=function buildSnapFunc(snap,min,max,factor){if(min==null){min=-_bigNum;} 3406if(max==null){max=_bigNum;} 3407if(_isFunction(snap)){return function(n){var edgeTolerance=!self.isPressed?1:1-self.edgeResistance;return snap.call(self,(n>max?max+(n-max)*edgeTolerance:n<min?min+(n-min)*edgeTolerance:n)*factor)*factor;};} 3408if(_isArray(snap)){return function(n){var i=snap.length,closest=0,absDif=_bigNum,val,dif;while(--i>-1){val=snap[i];dif=val-n;if(dif<0){dif=-dif;} 3409if(dif<absDif&&val>=min&&val<=max){closest=i;absDif=dif;}} 3410return snap[closest];};} 3411return isNaN(snap)?function(n){return n;}:function(){return snap*factor;};},buildPointSnapFunc=function buildPointSnapFunc(snap,minX,maxX,minY,maxY,radius,factor){radius=radius&&radius<_bigNum?radius*radius:_bigNum;if(_isFunction(snap)){return function(point){var edgeTolerance=!self.isPressed?1:1-self.edgeResistance,x=point.x,y=point.y,result,dx,dy;point.x=x=x>maxX?maxX+(x-maxX)*edgeTolerance:x<minX?minX+(x-minX)*edgeTolerance:x;point.y=y=y>maxY?maxY+(y-maxY)*edgeTolerance:y<minY?minY+(y-minY)*edgeTolerance:y;result=snap.call(self,point);if(result!==point){point.x=result.x;point.y=result.y;} 3412if(factor!==1){point.x*=factor;point.y*=factor;} 3413if(radius<_bigNum){dx=point.x-x;dy=point.y-y;if(dx*dx+dy*dy>radius){point.x=x;point.y=y;}} 3414return point;};} 3415if(_isArray(snap)){return function(p){var i=snap.length,closest=0,minDist=_bigNum,x,y,point,dist;while(--i>-1){point=snap[i];x=point.x-p.x;y=point.y-p.y;dist=x*x+y*y;if(dist<minDist){closest=i;minDist=dist;}} 3416return minDist<=radius?snap[closest]:p;};} 3417return function(n){return n;};},calculateBounds=function calculateBounds(){var bounds,targetBounds,snap,snapIsRaw;hasBounds=false;if(scrollProxy){scrollProxy.calibrate();self.minX=minX=-scrollProxy.maxScrollLeft();self.minY=minY=-scrollProxy.maxScrollTop();self.maxX=maxX=self.maxY=maxY=0;hasBounds=true;}else if(!!vars.bounds){bounds=_getBounds(vars.bounds,target.parentNode);if(rotationMode){self.minX=minX=bounds.left;self.maxX=maxX=bounds.left+bounds.width;self.minY=minY=self.maxY=maxY=0;}else if(!_isUndefined(vars.bounds.maxX)||!_isUndefined(vars.bounds.maxY)){bounds=vars.bounds;self.minX=minX=bounds.minX;self.minY=minY=bounds.minY;self.maxX=maxX=bounds.maxX;self.maxY=maxY=bounds.maxY;}else{targetBounds=_getBounds(target,target.parentNode);self.minX=minX=Math.round(getPropAsNum(xProp,"px")+bounds.left-targetBounds.left);self.minY=minY=Math.round(getPropAsNum(yProp,"px")+bounds.top-targetBounds.top);self.maxX=maxX=Math.round(minX+(bounds.width-targetBounds.width));self.maxY=maxY=Math.round(minY+(bounds.height-targetBounds.height));} 3418if(minX>maxX){self.minX=maxX;self.maxX=maxX=minX;minX=self.minX;} 3419if(minY>maxY){self.minY=maxY;self.maxY=maxY=minY;minY=self.minY;} 3420if(rotationMode){self.minRotation=minX;self.maxRotation=maxX;} 3421hasBounds=true;} 3422if(vars.liveSnap){snap=vars.liveSnap===true?vars.snap||{}:vars.liveSnap;snapIsRaw=_isArray(snap)||_isFunction(snap);if(rotationMode){snapX=buildSnapFunc(snapIsRaw?snap:snap.rotation,minX,maxX,1);snapY=null;}else{if(snap.points){snapXY=buildPointSnapFunc(snapIsRaw?snap:snap.points,minX,maxX,minY,maxY,snap.radius,scrollProxy?-1:1);}else{if(allowX){snapX=buildSnapFunc(snapIsRaw?snap:snap.x||snap.left||snap.scrollLeft,minX,maxX,scrollProxy?-1:1);} 3423if(allowY){snapY=buildSnapFunc(snapIsRaw?snap:snap.y||snap.top||snap.scrollTop,minY,maxY,scrollProxy?-1:1);}}}}},onThrowComplete=function onThrowComplete(){self.isThrowing=false;_dispatchEvent(self,"throwcomplete","onThrowComplete");},onThrowInterrupt=function onThrowInterrupt(){self.isThrowing=false;},animate=function animate(inertia,forceZeroVelocity){var snap,snapIsRaw,tween,overshootTolerance;if(inertia&&InertiaPlugin){if(inertia===true){snap=vars.snap||vars.liveSnap||{};snapIsRaw=_isArray(snap)||_isFunction(snap);inertia={resistance:(vars.throwResistance||vars.resistance||1000)/(rotationMode?10:1)};if(rotationMode){inertia.rotation=_parseInertia(self,snapIsRaw?snap:snap.rotation,maxX,minX,1,forceZeroVelocity);}else{if(allowX){inertia[xProp]=_parseInertia(self,snapIsRaw?snap:snap.points||snap.x||snap.left,maxX,minX,scrollProxy?-1:1,forceZeroVelocity||self.lockedAxis==="x");} 3424if(allowY){inertia[yProp]=_parseInertia(self,snapIsRaw?snap:snap.points||snap.y||snap.top,maxY,minY,scrollProxy?-1:1,forceZeroVelocity||self.lockedAxis==="y");} 3425if(snap.points||_isArray(snap)&&_isObject(snap[0])){inertia.linkedProps=xProp+","+yProp;inertia.radius=snap.radius;}}} 3426self.isThrowing=true;overshootTolerance=!isNaN(vars.overshootTolerance)?vars.overshootTolerance:vars.edgeResistance===1?0:1-self.edgeResistance+0.2;if(!inertia.duration){inertia.duration={max:Math.max(vars.minDuration||0,"maxDuration"in vars?vars.maxDuration:2),min:!isNaN(vars.minDuration)?vars.minDuration:overshootTolerance===0||_isObject(inertia)&&inertia.resistance>1000?0:0.5,overshoot:overshootTolerance};} 3427self.tween=tween=gsap.to(scrollProxy||target,{inertia:inertia,data:"_draggable",inherit:false,onComplete:onThrowComplete,onInterrupt:onThrowInterrupt,onUpdate:vars.fastMode?_dispatchEvent:syncXY,onUpdateParams:vars.fastMode?[self,"onthrowupdate","onThrowUpdate"]:snap&&snap.radius?[false,true]:[]});if(!vars.fastMode){if(scrollProxy){scrollProxy._skip=true;} 3428tween.render(1e9,true,true);syncXY(true,true);self.endX=self.x;self.endY=self.y;if(rotationMode){self.endRotation=self.x;} 3429tween.play(0);syncXY(true,true);if(scrollProxy){scrollProxy._skip=false;}}}else if(hasBounds){self.applyBounds();}},updateMatrix=function updateMatrix(shiftStart){var start=matrix,p;matrix=getGlobalMatrix(target.parentNode,true);if(shiftStart&&self.isPressed&&!matrix.equals(start||new Matrix2D())){p=start.inverse().apply({x:startPointerX,y:startPointerY});matrix.apply(p,p);startPointerX=p.x;startPointerY=p.y;} 3430if(matrix.equals(_identityMatrix$1)){matrix=null;}},recordStartPositions=function recordStartPositions(){var edgeTolerance=1-self.edgeResistance,offsetX=isFixed?_getDocScrollLeft$1(ownerDoc):0,offsetY=isFixed?_getDocScrollTop$1(ownerDoc):0,parsedOrigin,x,y;if(xyMode){gsCache.x=getPropAsNum(xProp,"px")+"px";gsCache.y=getPropAsNum(yProp,"px")+"px";gsCache.renderTransform();} 3431updateMatrix(false);_point1.x=self.pointerX-offsetX;_point1.y=self.pointerY-offsetY;matrix&&matrix.apply(_point1,_point1);startPointerX=_point1.x;startPointerY=_point1.y;if(dirty){setPointerPosition(self.pointerX,self.pointerY);render(true);} 3432innerMatrix=getGlobalMatrix(target);if(scrollProxy){calculateBounds();startElementY=scrollProxy.top();startElementX=scrollProxy.left();}else{if(isTweening()){syncXY(true,true);calculateBounds();}else{self.applyBounds();} 3433if(rotationMode){parsedOrigin=target.ownerSVGElement?[gsCache.xOrigin-target.getBBox().x,gsCache.yOrigin-target.getBBox().y]:(_getComputedStyle(target)[_transformOriginProp$1]||"0 0").split(" ");rotationOrigin=self.rotationOrigin=getGlobalMatrix(target).apply({x:parseFloat(parsedOrigin[0])||0,y:parseFloat(parsedOrigin[1])||0});syncXY(true,true);x=self.pointerX-rotationOrigin.x-offsetX;y=rotationOrigin.y-self.pointerY+offsetY;startElementX=self.x;startElementY=self.y=Math.atan2(y,x)*_RAD2DEG;}else{startElementY=getPropAsNum(yProp,"px");startElementX=getPropAsNum(xProp,"px");}} 3434if(hasBounds&&edgeTolerance){if(startElementX>maxX){startElementX=maxX+(startElementX-maxX)/edgeTolerance;}else if(startElementX<minX){startElementX=minX-(minX-startElementX)/edgeTolerance;} 3435if(!rotationMode){if(startElementY>maxY){startElementY=maxY+(startElementY-maxY)/edgeTolerance;}else if(startElementY<minY){startElementY=minY-(minY-startElementY)/edgeTolerance;}}} 3436self.startX=startElementX=_round(startElementX);self.startY=startElementY=_round(startElementY);},isTweening=function isTweening(){return self.tween&&self.tween.isActive();},removePlaceholder=function removePlaceholder(){if(_placeholderDiv.parentNode&&!isTweening()&&!self.isDragging){_placeholderDiv.parentNode.removeChild(_placeholderDiv);}},onPress=function onPress(e,force){var i;if(!enabled||self.isPressed||!e||(e.type==="mousedown"||e.type==="pointerdown")&&!force&&_getTime()-clickTime<30&&_touchEventLookup[self.pointerEvent.type]){isPreventingDefault&&e&&enabled&&_preventDefault(e);return;} 3437interrupted=isTweening();dragged=false;self.pointerEvent=e;if(_touchEventLookup[e.type]){touchEventTarget=~e.type.indexOf("touch")?e.currentTarget||e.target:ownerDoc;_addListener(touchEventTarget,"touchend",onRelease);_addListener(touchEventTarget,"touchmove",onMove);_addListener(touchEventTarget,"touchcancel",onRelease);_addListener(ownerDoc,"touchstart",_onMultiTouchDocument);}else{touchEventTarget=null;_addListener(ownerDoc,"mousemove",onMove);} 3438touchDragAxis=null;if(!_supportsPointer||!touchEventTarget){_addListener(ownerDoc,"mouseup",onRelease);e&&e.target&&_addListener(e.target,"mouseup",onRelease);} 3439isClicking=isClickable.call(self,e.target)&&vars.dragClickables===false&&!force;if(isClicking){_addListener(e.target,"change",onRelease);_dispatchEvent(self,"pressInit","onPressInit");_dispatchEvent(self,"press","onPress");_setSelectable(triggers,true);isPreventingDefault=false;return;} 3440allowNativeTouchScrolling=!touchEventTarget||allowX===allowY||self.vars.allowNativeTouchScrolling===false||self.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2)?false:allowX?"y":"x";isPreventingDefault=!allowNativeTouchScrolling&&!self.allowEventDefault;if(isPreventingDefault){_preventDefault(e);_addListener(_win$1,"touchforcechange",_preventDefault);} 3441if(e.changedTouches){e=touch=e.changedTouches[0];touchID=e.identifier;}else if(e.pointerId){touchID=e.pointerId;}else{touch=touchID=null;} 3442_dragCount++;_addToRenderQueue(render);startPointerY=self.pointerY=e.pageY;startPointerX=self.pointerX=e.pageX;_dispatchEvent(self,"pressInit","onPressInit");if(allowNativeTouchScrolling||self.autoScroll){_recordMaxScrolls(target.parentNode);} 3443if(target.parentNode&&self.autoScroll&&!scrollProxy&&!rotationMode&&target.parentNode._gsMaxScrollX&&!_placeholderDiv.parentNode&&!target.getBBox){_placeholderDiv.style.width=target.parentNode.scrollWidth+"px";target.parentNode.appendChild(_placeholderDiv);} 3444recordStartPositions();self.tween&&self.tween.kill();self.isThrowing=false;gsap.killTweensOf(scrollProxy||target,killProps,true);scrollProxy&&gsap.killTweensOf(target,{scrollTo:1},true);self.tween=self.lockedAxis=null;if(vars.zIndexBoost||!rotationMode&&!scrollProxy&&vars.zIndexBoost!==false){target.style.zIndex=Draggable.zIndex++;} 3445self.isPressed=true;hasDragCallback=!!(vars.onDrag||self._listeners.drag);hasMoveCallback=!!(vars.onMove||self._listeners.move);if(vars.cursor!==false||vars.activeCursor){i=triggers.length;while(--i>-1){gsap.set(triggers[i],{cursor:vars.activeCursor||vars.cursor||(_defaultCursor==="grab"?"grabbing":_defaultCursor)});}} 3446_dispatchEvent(self,"press","onPress");},onMove=function onMove(e){var originalEvent=e,touches,pointerX,pointerY,i,dx,dy;if(!enabled||_isMultiTouching||!self.isPressed||!e){isPreventingDefault&&e&&enabled&&_preventDefault(e);return;} 3447self.pointerEvent=e;touches=e.changedTouches;if(touches){e=touches[0];if(e!==touch&&e.identifier!==touchID){i=touches.length;while(--i>-1&&(e=touches[i]).identifier!==touchID&&e.target!==target){} 3448if(i<0){return;}}}else if(e.pointerId&&touchID&&e.pointerId!==touchID){return;} 3449if(touchEventTarget&&allowNativeTouchScrolling&&!touchDragAxis){_point1.x=e.pageX-(isFixed?_getDocScrollLeft$1(ownerDoc):0);_point1.y=e.pageY-(isFixed?_getDocScrollTop$1(ownerDoc):0);matrix&&matrix.apply(_point1,_point1);pointerX=_point1.x;pointerY=_point1.y;dx=Math.abs(pointerX-startPointerX);dy=Math.abs(pointerY-startPointerY);if(dx!==dy&&(dx>minimumMovement||dy>minimumMovement)||_isAndroid&&allowNativeTouchScrolling===touchDragAxis){touchDragAxis=dx>dy&&allowX?"x":"y";if(allowNativeTouchScrolling&&touchDragAxis!==allowNativeTouchScrolling){_addListener(_win$1,"touchforcechange",_preventDefault);} 3450if(self.vars.lockAxisOnTouchScroll!==false&&allowX&&allowY){self.lockedAxis=touchDragAxis==="x"?"y":"x";_isFunction(self.vars.onLockAxis)&&self.vars.onLockAxis.call(self,originalEvent);} 3451if(_isAndroid&&allowNativeTouchScrolling===touchDragAxis){onRelease(originalEvent);return;}}} 3452if(!self.allowEventDefault&&(!allowNativeTouchScrolling||touchDragAxis&&allowNativeTouchScrolling!==touchDragAxis)&&originalEvent.cancelable!==false){_preventDefault(originalEvent);isPreventingDefault=true;}else if(isPreventingDefault){isPreventingDefault=false;} 3453if(self.autoScroll){checkAutoScrollBounds=true;} 3454setPointerPosition(e.pageX,e.pageY,hasMoveCallback);},setPointerPosition=function setPointerPosition(pointerX,pointerY,invokeOnM
vendor: 2,227 bytes, lines 3454-3468
3454ove){var dragTolerance=1-self.dragResistance,edgeTolerance=1-self.edgeResistance,prevPointerX=self.pointerX,prevPointerY=self.pointerY,prevStartElementY=startElementY,prevX=self.x,prevY=self.y,prevEndX=self.endX,prevEndY=self.endY,prevEndRotation=self.endRotation,prevDirty=dirty,xChange,yChange,x,y,dif,temp;self.pointerX=pointerX;self.pointerY=pointerY;if(isFixed){pointerX-=_getDocScrollLeft$1(ownerDoc);pointerY-=_getDocScrollTop$1(ownerDoc);} 3455if(rotationMode){y=Math.atan2(rotationOrigin.y-pointerY,pointerX-rotationOrigin.x)*_RAD2DEG;dif=self.y-y;if(dif>180){startElementY-=360;self.y=y;}else if(dif<-180){startElementY+=360;self.y=y;} 3456if(self.x!==startElementX||Math.abs(startElementY-y)>minimumMovement){self.y=y;x=startElementX+(startElementY-y)*dragTolerance;}else{x=startElementX;}}else{if(matrix){temp=pointerX*matrix.a+pointerY*matrix.c+matrix.e;pointerY=pointerX*matrix.b+pointerY*matrix.d+matrix.f;pointerX=temp;} 3457yChange=pointerY-startPointerY;xChange=pointerX-startPointerX;if(yChange<minimumMovement&&yChange>-minimumMovement){yChange=0;} 3458if(xChange<minimumMovement&&xChange>-minimumMovement){xChange=0;} 3459if((self.lockAxis||self.lockedAxis)&&(xChange||yChange)){temp=self.lockedAxis;if(!temp){self.lockedAxis=temp=allowX&&Math.abs(xChange)>Math.abs(yChange)?"y":allowY?"x":null;if(temp&&_isFunction(self.vars.onLockAxis)){self.vars.onLockAxis.call(self,self.pointerEvent);}} 3460if(temp==="y"){yChange=0;}else if(temp==="x"){xChange=0;}} 3461x=_round(startElementX+xChange*dragTolerance);y=_round(startElementY+yChange*dragTolerance);} 3462if((snapX||snapY||snapXY)&&(self.x!==x||self.y!==y&&!rotationMode)){if(snapXY){_temp1.x=x;_temp1.y=y;temp=snapXY(_temp1);x=_round(temp.x);y=_round(temp.y);} 3463if(snapX){x=_round(snapX(x));} 3464if(snapY){y=_round(snapY(y));}} 3465if(hasBounds){if(x>maxX){x=maxX+Math.round((x-maxX)*edgeTolerance);}else if(x<minX){x=minX+Math.round((x-minX)*edgeTolerance);} 3466if(!rotationMode){if(y>maxY){y=Math.round(maxY+(y-maxY)*edgeTolerance);}else if(y<minY){y=Math.round(minY+(y-minY)*edgeTolerance);}}} 3467if(self.x!==x||self.y!==y&&!rotationMode){if(rotationMode){self.endRotation=self.x=self.endX=x;dirty=true;}else{if(allowY){self.y=self.endY=y;dirty=true;} 3468if(allowX){self.x=self.endX=x;dirty=true;}}
vendor: 11,195 bytes, lines 3469-3512
3469if(!invokeOnMove||_dispatchEvent(self,"move","onMove")!==false){if(!self.isDragging&&self.isPressed){self.isDragging=dragged=true;_dispatchEvent(self,"dragstart","onDragStart");}}else{self.pointerX=prevPointerX;self.pointerY=prevPointerY;startElementY=prevStartElementY;self.x=prevX;self.y=prevY;self.endX=prevEndX;self.endY=prevEndY;self.endRotation=prevEndRotation;dirty=prevDirty;}}},onRelease=function onRelease(e,force){if(!enabled||!self.isPressed||e&&touchID!=null&&!force&&(e.pointerId&&e.pointerId!==touchID&&e.target!==target||e.changedTouches&&!_hasTouchID(e.changedTouches,touchID))){isPreventingDefault&&e&&enabled&&_preventDefault(e);return;} 3470self.isPressed=false;var originalEvent=e,wasDragging=self.isDragging,isContextMenuRelease=self.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2),placeholderDelayedCall=gsap.delayedCall(0.001,removePlaceholder),touches,i,syntheticEvent,eventTarget,syntheticClick;if(touchEventTarget){_removeListener(touchEventTarget,"touchend",onRelease);_removeListener(touchEventTarget,"touchmove",onMove);_removeListener(touchEventTarget,"touchcancel",onRelease);_removeListener(ownerDoc,"touchstart",_onMultiTouchDocument);}else{_removeListener(ownerDoc,"mousemove",onMove);} 3471_removeListener(_win$1,"touchforcechange",_preventDefault);if(!_supportsPointer||!touchEventTarget){_removeListener(ownerDoc,"mouseup",onRelease);e&&e.target&&_removeListener(e.target,"mouseup",onRelease);} 3472dirty=false;if(wasDragging){dragEndTime=_lastDragTime=_getTime();self.isDragging=false;} 3473_removeFromRenderQueue(render);if(isClicking&&!isContextMenuRelease){if(e){_removeListener(e.target,"change",onRelease);self.pointerEvent=originalEvent;} 3474_setSelectable(triggers,false);_dispatchEvent(self,"release","onRelease");_dispatchEvent(self,"click","onClick");isClicking=false;return;} 3475i=triggers.length;while(--i>-1){_setStyle(triggers[i],"cursor",vars.cursor||(vars.cursor!==false?_defaultCursor:null));} 3476_dragCount--;if(e){touches=e.changedTouches;if(touches){e=touches[0];if(e!==touch&&e.identifier!==touchID){i=touches.length;while(--i>-1&&(e=touches[i]).identifier!==touchID&&e.target!==target){} 3477if(i<0&&!force){return;}}} 3478self.pointerEvent=originalEvent;self.pointerX=e.pageX;self.pointerY=e.pageY;} 3479if(isContextMenuRelease&&originalEvent){_preventDefault(originalEvent);isPreventingDefault=true;_dispatchEvent(self,"release","onRelease");}else if(originalEvent&&!wasDragging){isPreventingDefault=false;if(interrupted&&(vars.snap||vars.bounds)){animate(vars.inertia||vars.throwProps);} 3480_dispatchEvent(self,"release","onRelease");if((!_isAndroid||originalEvent.type!=="touchmove")&&originalEvent.type.indexOf("cancel")===-1){_dispatchEvent(self,"click","onClick");if(_getTime()-clickTime<300){_dispatchEvent(self,"doubleclick","onDoubleClick");} 3481eventTarget=originalEvent.target||target;clickTime=_getTime();syntheticClick=function syntheticClick(){if(clickTime!==clickDispatch&&self.enabled()&&!self.isPressed&&!originalEvent.defaultPrevented){if(eventTarget.click){eventTarget.click();}else if(ownerDoc.createEvent){syntheticEvent=ownerDoc.createEvent("MouseEvents");syntheticEvent.initMouseEvent("click",true,true,_win$1,1,self.pointerEvent.screenX,self.pointerEvent.screenY,self.pointerX,self.pointerY,false,false,false,false,0,null);eventTarget.dispatchEvent(syntheticEvent);}}};if(!_isAndroid&&!originalEvent.defaultPrevented){gsap.delayedCall(0.05,syntheticClick);}}}else{animate(vars.inertia||vars.throwProps);if(!self.allowEventDefault&&originalEvent&&(vars.dragClickables!==false||!isClickable.call(self,originalEvent.target))&&wasDragging&&(!allowNativeTouchScrolling||touchDragAxis&&allowNativeTouchScrolling===touchDragAxis)&&originalEvent.cancelable!==false){isPreventingDefault=true;_preventDefault(originalEvent);}else{isPreventingDefault=false;} 3482_dispatchEvent(self,"release","onRelease");} 3483isTweening()&&placeholderDelayedCall.duration(self.tween.duration());wasDragging&&_dispatchEvent(self,"dragend","onDragEnd");return true;},updateScroll=function updateScroll(e){if(e&&self.isDragging&&!scrollProxy){var parent=e.target||target.parentNode,deltaX=parent.scrollLeft-parent._gsScrollX,deltaY=parent.scrollTop-parent._gsScrollY;if(deltaX||deltaY){if(matrix){startPointerX-=deltaX*matrix.a+deltaY*matrix.c;startPointerY-=deltaY*matrix.d+deltaX*matrix.b;}else{startPointerX-=deltaX;startPointerY-=deltaY;} 3484parent._gsScrollX+=deltaX;parent._gsScrollY+=deltaY;setPointerPosition(self.pointerX,self.pointerY);}}},onClick=function onClick(e){var time=_getTime(),recentlyClicked=time-clickTime<100,recentlyDragged=time-dragEndTime<50,alreadyDispatched=recentlyClicked&&clickDispatch===clickTime,defaultPrevented=self.pointerEvent&&self.pointerEvent.defaultPrevented,alreadyDispatchedTrusted=recentlyClicked&&trustedClickDispatch===clickTime,trusted=e.isTrusted||e.isTrusted==null&&recentlyClicked&&alreadyDispatched;if((alreadyDispatched||recentlyDragged&&self.vars.suppressClickOnDrag!==false)&&e.stopImmediatePropagation){e.stopImmediatePropagation();} 3485if(recentlyClicked&&!(self.pointerEvent&&self.pointerEvent.defaultPrevented)&&(!alreadyDispatched||trusted&&!alreadyDispatchedTrusted)){if(trusted&&alreadyDispatched){trustedClickDispatch=clickTime;} 3486clickDispatch=clickTime;return;} 3487if(self.isPressed||recentlyDragged||recentlyClicked){if(!trusted||!e.detail||!recentlyClicked||defaultPrevented){_preventDefault(e);}} 3488if(!recentlyClicked&&!recentlyDragged&&!dragged){e&&e.target&&(self.pointerEvent=e);_dispatchEvent(self,"click","onClick");}},localizePoint=function localizePoint(p){return matrix?{x:p.x*matrix.a+p.y*matrix.c+matrix.e,y:p.x*matrix.b+p.y*matrix.d+matrix.f}:{x:p.x,y:p.y};};old=Draggable.get(target);old&&old.kill();_this2.startDrag=function(event,align){var r1,r2,p1,p2;onPress(event||self.pointerEvent,true);if(align&&!self.hitTest(event||self.pointerEvent)){r1=_parseRect(event||self.pointerEvent);r2=_parseRect(target);p1=localizePoint({x:r1.left+r1.width/2,y:r1.top+r1.height/2});p2=localizePoint({x:r2.left+r2.width/2,y:r2.top+r2.height/2});startPointerX-=p1.x-p2.x;startPointerY-=p1.y-p2.y;} 3489if(!self.isDragging){self.isDragging=dragged=true;_dispatchEvent(self,"dragstart","onDragStart");}};_this2.drag=onMove;_this2.endDrag=function(e){return onRelease(e||self.pointerEvent,true);};_this2.timeSinceDrag=function(){return self.isDragging?0:(_getTime()-dragEndTime)/1000;};_this2.timeSinceClick=function(){return(_getTime()-clickTime)/1000;};_this2.hitTest=function(target,threshold){return Draggable.hitTest(self.target,target,threshold);};_this2.getDirection=function(from,diagonalThreshold){var mode=from==="velocity"&&InertiaPlugin?from:_isObject(from)&&!rotationMode?"element":"start",xChange,yChange,ratio,direction,r1,r2;if(mode==="element"){r1=_parseRect(self.target);r2=_parseRect(from);} 3490xChange=mode==="start"?self.x-startElementX:mode==="velocity"?InertiaPlugin.getVelocity(target,xProp):r1.left+r1.width/2-(r2.left+r2.width/2);if(rotationMode){return xChange<0?"counter-clockwise":"clockwise";}else{diagonalThreshold=diagonalThreshold||2;yChange=mode==="start"?self.y-startElementY:mode==="velocity"?InertiaPlugin.getVelocity(target,yProp):r1.top+r1.height/2-(r2.top+r2.height/2);ratio=Math.abs(xChange/yChange);direction=ratio<1/diagonalThreshold?"":xChange<0?"left":"right";if(ratio<diagonalThreshold){if(direction!==""){direction+="-";} 3491direction+=yChange<0?"up":"down";}} 3492return direction;};_this2.applyBounds=function(newBounds,sticky){var x,y,forceZeroVelocity,e,parent,isRoot;if(newBounds&&vars.bounds!==newBounds){vars.bounds=newBounds;return self.update(true,sticky);} 3493syncXY(true);calculateBounds();if(hasBounds&&!isTweening()){x=self.x;y=self.y;if(x>maxX){x=maxX;}else if(x<minX){x=minX;} 3494if(y>maxY){y=maxY;}else if(y<minY){y=minY;} 3495if(self.x!==x||self.y!==y){forceZeroVelocity=true;self.x=self.endX=x;if(rotationMode){self.endRotation=x;}else{self.y=self.endY=y;} 3496dirty=true;render(true);if(self.autoScroll&&!self.isDragging){_recordMaxScrolls(target.parentNode);e=target;_windowProxy.scrollTop=_win$1.pageYOffset!=null?_win$1.pageYOffset:ownerDoc.documentElement.scrollTop!=null?ownerDoc.documentElement.scrollTop:ownerDoc.body.scrollTop;_windowProxy.scrollLeft=_win$1.pageXOffset!=null?_win$1.pageXOffset:ownerDoc.documentElement.scrollLeft!=null?ownerDoc.documentElement.scrollLeft:ownerDoc.body.scrollLeft;while(e&&!isRoot){isRoot=_isRoot(e.parentNode);parent=isRoot?_windowProxy:e.parentNode;if(allowY&&parent.scrollTop>parent._gsMaxScrollY){parent.scrollTop=parent._gsMaxScrollY;} 3497if(allowX&&parent.scrollLeft>parent._gsMaxScrollX){parent.scrollLeft=parent._gsMaxScrollX;} 3498e=parent;}}} 3499if(self.isThrowing&&(forceZeroVelocity||self.endX>maxX||self.endX<minX||self.endY>maxY||self.endY<minY)){animate(vars.inertia||vars.throwProps,forceZeroVelocity);}} 3500return self;};_this2.update=function(applyBounds,sticky,ignoreExternalChanges){if(sticky&&self.isPressed){var m=getGlobalMatrix(target),p=innerMatrix.apply({x:self.x-startElementX,y:self.y-startElementY}),m2=getGlobalMatrix(target.parentNode,true);m2.apply({x:m.e-p.x,y:m.f-p.y},p);self.x-=p.x-m2.e;self.y-=p.y-m2.f;render(true);recordStartPositions();} 3501var x=self.x,y=self.y;updateMatrix(!sticky);if(applyBounds){self.applyBounds();}else{dirty&&ignoreExternalChanges&&render(true);syncXY(true);} 3502if(sticky){setPointerPosition(self.pointerX,self.pointerY);dirty&&render(true);} 3503if(self.isPressed&&!sticky&&(allowX&&Math.abs(x-self.x)>0.01||allowY&&Math.abs(y-self.y)>0.01&&!rotationMode)){recordStartPositions();} 3504if(self.autoScroll){_recordMaxScrolls(target.parentNode,self.isDragging);checkAutoScrollBounds=self.isDragging;render(true);_removeScrollListener(target,updateScroll);_addScrollListener(target,updateScroll);} 3505return self;};_this2.enable=function(type){var setVars={lazy:true},id,i,trigger;if(vars.cursor!==false){setVars.cursor=vars.cursor||_defaultCursor;} 3506if(gsap.utils.checkPrefix("touchCallout")){setVars.touchCallout="none";} 3507if(type!=="soft"){_setTouchActionForAllDescendants(triggers,allowX===allowY?"none":vars.allowNativeTouchScrolling&&target.scrollHeight===target.clientHeight===(target.scrollWidth===target.clientHeight)||vars.allowEventDefault?"manipulation":allowX?"pan-y":"pan-x");i=triggers.length;while(--i>-1){trigger=triggers[i];_supportsPointer||_addListener(trigger,"mousedown",onPress);_addListener(trigger,"touchstart",onPress);_addListener(trigger,"click",onClick,true);gsap.set(trigger,setVars);if(trigger.getBBox&&trigger.ownerSVGElement&&allowX!==allowY){gsap.set(trigger.ownerSVGElement,{touchAction:vars.allowNativeTouchScrolling||vars.allowEventDefault?"manipulation":allowX?"pan-y":"pan-x"});} 3508vars.allowContextMenu||_addListener(trigger,"contextmenu",onContextMenu);} 3509_setSelectable(triggers,false);} 3510_addScrollListener(target,updateScroll);enabled=true;if(InertiaPlugin&&type!=="soft"){InertiaPlugin.track(scrollProxy||target,xyMode?"x,y":rotationMode?"rotation":"top,left");} 3511target._gsDragID=id="d"+_lookupCount++;_lookup[id]=self;if(scrollProxy){scrollProxy.enable();scrollProxy.element._gsDragID=id;} 3512(vars.bounds||rotationMode)&&recordStartPositions();vars.bounds&&self.applyBounds();return self;};_this2.disable=function(type){var dragging=self.isDragging,i=triggers.length,trigger;while(--i>
3512-1){_setStyle(triggers[i],"cursor",null);} 3513if(type!=="soft"){_setTouchActionForAllDescendants(triggers,null);i=triggers.length;while(--i>-1){trigger=triggers[i];_setStyle(trigger,"touchCallout",null);_removeListener(trigger,"mousedown",onPress);_removeListener(trigger,"touchstart",onPress);_removeListener(trigger,"click",onClick,true);_removeListener(trigger,"contextmenu",onContextMenu);} 3514_setSelectable(triggers,true);if(touchEventTarget){_removeListener(touchEventTarget,"touchcancel",onRelease);_removeListener(touchEventTarget,"touchend",onRelease);_removeListener(touchEventTarget,"touchmove",onMove);} 3515_removeListener(ownerDoc,"mouseup",onRelease);_removeListener(ownerDoc,"mousemove",onMove);} 3516_removeScrollListener(target,updateScroll);enabled=false;if(InertiaPlugin&&type!=="soft"){InertiaPlugin.untrack(scrollProxy||target,xyMode?"x,y":rotationMode?"rotation":"top,left");self.tween&&self.tween.kill();} 3517scrollProxy&&scrollProxy.disable();_removeFromRenderQueue(render);self.isDragging=self.isPressed=isClicking=false;dragging&&_dispatchEvent(self,"dragend","onDragEnd");return self;};_this2.enabled=function(value,type){return arguments.length?value?self.enable(type):self.disable(type):enabled;};_this2.kill=function(){self.isThrowing=false;self.tween&&self.tween.kill();self.disable();gsap.set(triggers,{clearProps:"userSelect"});delete _lookup[target._gsDragID];return self;};_this2.revert=function(){this.kill();this.styles&&this.styles.revert();};if(~type.indexOf("scroll")){scrollProxy=_this2.scrollProxy=new ScrollProxy(target,_extend({onKill:function onKill(){self.isPressed&&onRelease(null);}},vars));target.style.overflowY=allowY&&!_isTouchDevice?"auto":"hidden";target.style.overflowX=allowX&&!_isTouchDevice?"auto":"hidden";target=scrollProxy.content;} 3518if(rotationMode){killProps.rotation=1;}else{if(allowX){killProps[xProp]=1;} 3519if(allowY){killProps[yProp]=1;}} 3520gsCache.force3D="force3D"in vars?vars.force3D:true;_context(_assertThisInitialized(_this2));_this2.enable();return _this2;} 3521Draggable.register=function register(core){gsap=core;_initCore();};Draggable.create=function create(targets,vars){_coreInitted||_initCore(true);return _toArray(targets).map(function(target){return new Draggable(target,vars);});};Draggable.get=function get(target){return _lookup[(_toArray(target)[0]||{})._gsDragID];};Draggable.timeSinceDrag=function timeSinceDrag(){return(_getTime()-_lastDragTime)/1000;};Draggable.hitTest=function hitTest(obj1,obj2,threshold){if(obj1===obj2){return false;} 3522var r1=_parseRect(obj1),r2=_parseRect(obj2),top=r1.top,left=r1.left,right=r1.right,bottom=r1.bottom,width=r1.width,height=r1.height,isOutside=r2.left>right||r2.right<left||r2.top>bottom||r2.bottom<top,overlap,area,isRatio;if(isOutside||!threshold){return!isOutside;} 3523isRatio=(threshold+"").indexOf("%")!==-1;threshold=parseFloat(threshold)||0;overlap={left:Math.max(left,r2.left),top:Math.max(top,r2.top)};overlap.width=Math.min(right,r2.right)-overlap.left;overlap.height=Math.min(bottom,r2.bottom)-overlap.top;if(overlap.width<0||overlap.height<0){return false;} 3524if(isRatio){threshold*=0.01;area=overlap.width*overlap.height;return area>=width*height*threshold||area>=r2.width*r2.height*threshold;} 3525return overlap.width>threshold&&overlap.height>threshold;};return Draggable;}(EventDispatcher);_setDefaults(Draggable.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:false,isPressed:false});Draggable.zIndex=1000;Draggable.version="3.12.5";_getGSAP()&&gsap.registerPlugin(Draggable);exports.Draggable=Draggable;exports.default=Draggable;if(typeof(window)==='undefined'||window!==exports){Object.defineProperty(exports,'__esModule',{value:true});}else{delete window.default;}})));+function($){'use strict';var Collapse=function(element,options){this.$element=$(element) 3526this.options=$.extend({},Collapse.DEFAULTS,options) 3527this.transitioning=null 3528if(this.options.parent)this.$parent=$(this.options.parent) 3529if(this.options.toggle)this.toggle()} 3530Collapse.DEFAULTS={toggle:true} 3531Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width') 3532return hasWidth?'width':'height'} 3533Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return 3534var startEvent=$.Event('show.bs.collapse') 3535this.$element.trigger(startEvent) 3536if(startEvent.isDefaultPrevented())return 3537var actives=this.$parent&&this.$parent.find('> .panel > .in') 3538if(actives&&actives.length){var hasData=actives.data('bs.collapse') 3539if(hasData&&hasData.transitioning)return 3540var parentNoToggle=this.$parent.data('no-toggle') 3541if(!parentNoToggle){actives.collapse('hide')} 3542hasData||actives.data('bs.collapse',null)} 3543var dimension=this.dimension() 3544this.$element.removeClass('collapse').addClass('collapsing')[dimension](0) 3545this.transitioning=1 3546var complete=function(e){if(e&&e.target!=this.$element[0])return 3547this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('auto') 3548this.transitioning=0 3549this.$element.trigger('shown.bs.collapse')} 3550if(!$.support.transition)return complete.call(this) 3551var scrollSize=$.camelCase(['scroll',dimension].join('-')) 3552this.$element.one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])} 3553Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return 3554var startEvent=$.Event('hide.bs.collapse') 3555this.$element.trigger(startEvent) 3556if(startEvent.isDefaultPrevented())return 3557var dimension=this.dimension() 3558this.$element[dimension](this.$element[dimension]())[0].offsetHeight 3559this.$element.addClass('collapsing').removeClass('collapse').removeClass('in') 3560this.transitioning=1 3561var complete=function(e){if(e&&e.target!=this.$element[0])return 3562this.transitioning=0 3563this.$element.trigger('hidden.bs.collapse').removeClass('collapsing').addClass('collapse')} 3564if(!$.support.transition)return complete.call(this) 3565this.$element 3566[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)} 3567Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()} 3568var old=$.fn.collapse 3569$.fn.collapse=function(option){return this.each(function(){var $this=$(this) 3570var data=$this.data('bs.collapse') 3571var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option) 3572if(!data&&options.toggle&&option=='show')option=!option 3573if(!data)$this.data('bs.collapse',(data=new Collapse(this,options))) 3574if(typeof option=='string')data[option]()})} 3575$.fn.collapse.Constructor=Collapse 3576$.fn.collapse.noConflict=function(){$.fn.collapse=old 3577return this} 3578$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this),href 3579var target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'') 3580var _target=href.replace(/^#/,"");if($('[data-id="'+_target+'"]').length){var $target=$('[data-id="'+_target+'"]')}else{var $target=$(target)} 3581var data=$target.data('bs.collapse') 3582var option=data?'toggle':$this.data() 3583var parent=$this.attr('data-parent') 3584var $parent=parent&&$(parent) 3585if(!data||!data.transitioning){if($parent)$parent.find('[data-toggle="collapse"][data-parent="'+parent+'"]').not($this).addClass('collapsed') 3586$this[$target.hasClass('in')?'addClass':'removeClass']('collapsed')} 3587$target.collapse(option)})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)} 3588Tab.prototype.show=function(){var $this=this.element 3589var $ul=$this.closest('ul:not(.dropdown-menu)') 3590var selector=$this.data('target') 3591if(!selector){selector=$this.attr('href') 3592selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} 3593if($this.parent('li').hasClass('active'))return 3594var previous=$ul.find('.active:last a')[0] 3595var e=$.Event('show.bs.tab',{relatedTarget:previous}) 3596$this.trigger(e) 3597if(e.isDefaultPrevented())return 3598var _target=selector.replace(/^#/,"");if($('[data-id="'+_target+'"]').length) 3599var $target=$('[data-id="'+_target+'"]') 3600else 3601var $target=$(selector) 3602this.activate($this.parent('li'),$ul) 3603this.activate($target,$target.parent(),function(){$this.trigger({type:'shown.bs.tab',relatedTarget:previous})})} 3604Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active').add(container.find('> .active > .active')) 3605var transition=callback&&$.support.transition&&$active.hasClass('fade') 3606function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active') 3607$active.find('.tab-excerpt').slideUp();element.addClass('active') 3608$('.tab-excerpt',element).slideDown();element[0].offsetWidth 3609element.add($active).addClass('in') 3610if(element.parents('.dropdown-menu').length){element.closest('li.dropdown').addClass('active')} 3611if(!element.is('li')){element.closest('.tab-content').find('> .active').not(element).removeClass('active');} 3612callback&&callback()} 3613transition?$active.one($.support.transition.end,next).emulateTransitionEnd(150):next() 3614$active.removeClass('in')} 3615var old=$.fn.tab 3616$.fn.tab=function(option){return this.each(function(){var $this=$(this) 3617var data=$this.data('bs.tab') 3618if(!data)$this.data('bs.tab',(data=new Tab(this))) 3619if(typeof option=='string')data[option]()})} 3620$.fn.tab.Constructor=Tab 3621$.fn.tab.noConflict=function(){$.fn.tab=old 3622return this} 3623$(document).on('click.bs.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault() 3624$(this).tab('show')})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null 3625this.init('tooltip',element,options)} 3626Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0}} 3627Tooltip.prototype.init=function(type,element,options){this.enabled=true
3628this.type=type 3629this.$element=$(element) 3630this.options=this.getOptions(options) 3631this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport) 3632var triggers=this.options.trigger.split(' ') 3633for(var i=triggers.length;i--;){var trigger=triggers[i] 3634if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin' 3635var eventOut=trigger=='hover'?'mouseleave':'focusout' 3636this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this)) 3637this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}} 3638this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()} 3639Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS} 3640Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options) 3641if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}} 3642return options} 3643Tooltip.prototype.getDelegateOptions=function(){var options={} 3644var defaults=this.getDefaults() 3645this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value}) 3646return options} 3647Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type) 3648clearTimeout(self.timeout) 3649self.hoverState='in' 3650if(!self.options.delay||!self.options.delay.show)return self.show() 3651self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)} 3652Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type) 3653clearTimeout(self.timeout) 3654self.hoverState='out' 3655if(!self.options.delay||!self.options.delay.hide)return self.hide() 3656self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)} 3657Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type) 3658if(this.hasContent()&&this.enabled){this.$element.trigger(e) 3659if(e.isDefaultPrevented())return 3660var that=this;var $tip=this.tip() 3661this.setContent() 3662if(this.options.animation)$tip.addClass('fade') 3663var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement 3664var autoToken=/\s?auto?\s?/i 3665var autoPlace=autoToken.test(placement) 3666if(autoPlace)placement=placement.replace(autoToken,'')||'top' 3667$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement) 3668this.options.container?$tip.appendTo($(document).find(this.options.container)):$tip.insertAfter(this.$element) 3669var pos=this.getPosition() 3670var actualWidth=$tip[0].offsetWidth 3671var actualHeight=$tip[0].offsetHeight 3672if(autoPlace){var orgPlacement=placement 3673var $parent=this.$element.parent() 3674var parentDim=this.getPosition($parent) 3675placement=placement=='bottom'&&pos.top+pos.height+actualHeight-parentDim.scroll>parentDim.height?'top':placement=='top'&&pos.top-parentDim.scroll-actualHeight<0?'bottom':placement=='right'&&pos.right+actualWidth>parentDim.width?'left':placement=='left'&&pos.left-actualWidth<parentDim.left?'right':placement 3676$tip.removeClass(orgPlacement).addClass(placement)} 3677var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight) 3678this.applyPlacement(calculatedOffset,placement) 3679this.hoverState=null 3680var complete=function(){that.$element.trigger('shown.bs.'+that.type)} 3681$.support.transition&&this.$tip.hasClass('fade')?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete()}} 3682Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip() 3683var width=$tip[0].offsetWidth 3684var height=$tip[0].offsetHeight 3685var marginTop=parseInt($tip.css('margin-top'),10) 3686var marginLeft=parseInt($tip.css('margin-left'),10) 3687if(isNaN(marginTop))marginTop=0 3688if(isNaN(marginLeft))marginLeft=0 3689offset.top=offset.top+marginTop 3690offset.left=offset.left+marginLeft 3691$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left
3691:Math.round(props.left)})}},offset),0) 3692$tip.addClass('in') 3693var actualWidth=$tip[0].offsetWidth 3694var actualHeight=$tip[0].offsetHeight 3695if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight} 3696var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight) 3697if(delta.left)offset.left+=delta.left 3698else offset.top+=delta.top 3699var arrowDelta=delta.left?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight 3700var arrowPosition=delta.left?'left':'top' 3701var arrowOffsetPosition=delta.left?'offsetWidth':'offsetHeight' 3702$tip.offset(offset) 3703this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],arrowPosition)} 3704Tooltip.prototype.replaceArrow=function(delta,dimension,position){this.arrow().css(position,delta?(50*(1-delta/dimension)+'%'):'')} 3705Tooltip.prototype.setContent=function(){var $tip=this.tip() 3706var title=this.getTitle() 3707$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title) 3708$tip.removeClass('fade in top bottom left right')} 3709Tooltip.prototype.hide=function(){var that=this 3710var $tip=this.tip() 3711var e=$.Event('hide.bs.'+this.type) 3712function complete(){if(that.hoverState!='in')$tip.detach() 3713that.$element.trigger('hidden.bs.'+that.type)} 3714this.$element.trigger(e) 3715if(e.isDefaultPrevented())return 3716$tip.removeClass('in') 3717$.support.transition&&this.$tip.hasClass('fade')?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete() 3718this.hoverState=null 3719return this} 3720Tooltip.prototype.fixTitle=function(){var $e=this.$element 3721if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}} 3722Tooltip.prototype.hasContent=function(){return this.getTitle()} 3723Tooltip.prototype.getPosition=function($element){$element=$element||this.$element 3724var el=$element[0] 3725var isBody=el.tagName=='BODY' 3726return $.extend({},(typeof el.getBoundingClientRect=='function')?el.getBoundingClientRect():null,{scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop(),width:isBody?$(window).width():$element.outerWidth(),height:isBody?$(window).height():$element.outerHeight()},isBody?{top:0,left:0}:$element.offset())} 3727Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}} 3728Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0} 3729if(!this.$viewport)return delta 3730var viewportPadding=this.options.viewport&&this.options.viewport.padding||0 3731var viewportDimensions=this.getPosition(this.$viewport) 3732if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll 3733var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight 3734if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding 3735var rightEdgeOffset=pos.left+viewportPadding+actualWidth 3736if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.width){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}} 3737return delta} 3738Tooltip.prototype.getTitle=function(){var title 3739var $e=this.$element 3740var o=this.options 3741title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title) 3742return title} 3743Tooltip.prototype.tip=function(){return this.$tip=this.$tip||$(this.options.template)} 3744Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow')} 3745Tooltip.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide() 3746this.$element=null 3747this.options=null}} 3748Tooltip.prototype.enable=function(){this.enabled=true} 3749Tooltip.prototype.disable=function(){this.enabled=false} 3750Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled} 3751Tooltip.prototype.toggle=function(e){var self=e?$(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type):this 3752self.tip().hasClass('in')?self.leave(self):self.enter(self)} 3753Tooltip.prototype.destroy=function(){clearTimeout(this.timeout) 3754this.hide().$element.off('.'+this.type).removeData('bs.'+this.type)} 3755var old=$.fn.tooltip 3756$.fn.tooltip=function(option){return this.each(function(){var $this=$(this) 3757var data=$this.data('bs.tooltip') 3758var options=typeof option=='object'&&option 3759if(!data&&option=='destroy')return 3760if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options))) 3761if(typeof option=='string')data[option]()})} 3762$.fn.tooltip.Constructor=Tooltip 3763$.fn.tooltip.noConflict=function(){$.fn.tooltip=old 3764return this}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap') 3765var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'}
vendor: 8,346 bytes, lines 3766-3792
3766for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}} 3767return false} 3768$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this 3769$(this).one($.support.transition.end,function(){called=true}) 3770var callback=function(){if(!called)$($el).trigger($.support.transition.end)} 3771setTimeout(callback,duration) 3772return this} 3773$(function(){$.support.transition=transitionEnd()})}(jQuery);(function(root,factory){if(typeof define==='function'&&define.amd){define([],factory);}else if(typeof module==='object'&&module.exports){module.exports=factory();}else{root.Rellax=factory();}}(typeof window!=="undefined"?window:global,function(){var Rellax=function(el,options){"use strict";var self=Object.create(Rellax.prototype);var posY=0;var screenY=0;var posX=0;var screenX=0;var blocks=[];var pause=true;var loop=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return setTimeout(callback,1000/60);};var loopId=null;var supportsPassive=false;try{var opts=Object.defineProperty({},'passive',{get:function(){supportsPassive=true;}});window.addEventListener("testPassive",null,opts);window.removeEventListener("testPassive",null,opts);}catch(e){} 3774var clearLoop=window.cancelAnimationFrame||window.mozCancelAnimationFrame||clearTimeout;var transformProp=window.transformProp||(function(){var testEl=document.createElement('div');if(testEl.style.transform===null){var vendors=['Webkit','Moz','ms'];for(var vendor in vendors){if(testEl.style[vendors[vendor]+'Transform']!==undefined){return vendors[vendor]+'Transform';}}} 3775return'transform';})();self.options={speed:-2,verticalSpeed:null,horizontalSpeed:null,breakpoints:[576,768,1201],center:false,wrapper:null,relativeToWrapper:false,round:true,vertical:true,horizontal:false,verticalScrollAxis:"y",horizontalScrollAxis:"x",callback:function(){},};if(options){Object.keys(options).forEach(function(key){self.options[key]=options[key];});} 3776function validateCustomBreakpoints(){if(self.options.breakpoints.length===3&&Array.isArray(self.options.breakpoints)){var isAscending=true;var isNumerical=true;var lastVal;self.options.breakpoints.forEach(function(i){if(typeof i!=='number')isNumerical=false;if(lastVal!==null){if(i<lastVal)isAscending=false;} 3777lastVal=i;});if(isAscending&&isNumerical)return;} 3778self.options.breakpoints=[576,768,1201];console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted");} 3779if(options&&options.breakpoints){validateCustomBreakpoints();} 3780if(!el){el='.rellax';} 3781var elements=typeof el==='string'?document.querySelectorAll(el):[el];if(elements.length>0){self.elems=elements;} 3782else{console.warn("Rellax: The elements you're trying to select don't exist.");return;} 3783if(self.options.wrapper){if(!self.options.wrapper.nodeType){var wrapper=document.querySelector(self.options.wrapper);if(wrapper){self.options.wrapper=wrapper;}else{console.warn("Rellax: The wrapper you're trying to use doesn't exist.");return;}}} 3784var currentBreakpoint;var getCurrentBreakpoint=function(w){var bp=self.options.breakpoints;if(w<bp[0])return'xs';if(w>=bp[0]&&w<bp[1])return'sm';if(w>=bp[1]&&w<bp[2])return'md';return'lg';};var cacheBlocks=function(){for(var i=0;i<self.elems.length;i++){var block=createBlock(self.elems[i]);blocks.push(block);}};var init=function(){for(var i=0;i<blocks.length;i++){self.elems[i].style.cssText=blocks[i].style;} 3785blocks=[];screenY=window.innerHeight;screenX=window.innerWidth;currentBreakpoint=getCurrentBreakpoint(screenX);setPosition();cacheBlocks();animate();if(pause){window.addEventListener('resize',init);pause=false;update();}};var createBlock=function(el){var dataPercentage=el.getAttribute('data-rellax-percentage');var dataSpeed=el.getAttribute('data-rellax-speed');var dataXsSpeed=el.getAttribute('data-rellax-xs-speed');var dataMobileSpeed=el.getAttribute('data-rellax-mobile-speed');var dataTabletSpeed=el.getAttribute('data-rellax-tablet-speed');var dataDesktopSpeed=el.getAttribute('data-rellax-desktop-speed');var dataVerticalSpeed=el.getAttribute('data-rellax-vertical-speed');var dataHorizontalSpeed=el.getAttribute('data-rellax-horizontal-speed');var dataVericalScrollAxis=el.getAttribute('data-rellax-vertical-scroll-axis');var dataHorizontalScrollAxis=el.getAttribute('data-rellax-horizontal-scroll-axis');var dataZindex=el.getAttribute('data-rellax-zindex')||0;var dataMin=el.getAttribute('data-rellax-min');var dataMax=el.getAttribute('data-rellax-max');var dataMinX=el.getAttribute('data-rellax-min-x');var dataMaxX=el.getAttribute('data-rellax-max-x');var dataMinY=el.getAttribute('data-rellax-min-y');var dataMaxY=el.getAttribute('data-rellax-max-y');var mapBreakpoints;var breakpoints=true;if(!dataXsSpeed&&!dataMobileSpeed&&!dataTabletSpeed&&!dataDesktopSpeed){breakpoints=false;}else{mapBreakpoints={'xs':dataXsSpeed,'sm':dataMobileSpeed,'md':dataTabletSpeed,'lg':dataDesktopSpeed};} 3786var wrapperPosY=self.options.wrapper?self.options.wrapper.scrollTop:(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);if(self.options.relativeToWrapper){var scrollPosY=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);wrapperPosY=scrollPosY-self.options.wrapper.offsetTop;} 3787var posY=self.options.vertical?(dataPercentage||self.options.center?wrapperPosY:0):0;var posX=self.options.horizontal?(dataPercentage||self.options.center?self.options.wrapper?self.options.wrapper.scrollLeft:(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft):0):0;var blockTop=posY+el.getBoundingClientRect().top;var blockHeight=el.clientHeight||el.offsetHeight||el.scrollHeight;var blockLeft=posX+el.getBoundingClientRect().left;var blockWidth=el.clientWidth||el.offsetWidth||el.scrollWidth;var percentageY=dataPercentage?dataPercentage:(posY-blockTop+screenY)/(blockHeight+screenY);var percentageX=dataPercentage?dataPercentage:(posX-blockLeft+screenX)/(blockWidth+screenX);if(self.options.center){percentageX=0.5;percentageY=0.5;} 3788var speed=(breakpoints&&mapBreakpoints[currentBreakpoint]!==null)?Number(mapBreakpoints[currentBreakpoint]):(dataSpeed?dataSpeed:self.options.speed);var verticalSpeed=dataVerticalSpeed?dataVerticalSpeed:self.options.verticalSpeed;var horizontalSpeed=dataHorizontalSpeed?dataHorizontalSpeed:self.options.horizontalSpeed;var verticalScrollAxis=dataVericalScrollAxis?dataVericalScrollAxis:self.options.verticalScrollAxis;var horizontalScrollAxis=dataHorizontalScrollAxis?dataHorizontalScrollAxis:self.options.horizontalScrollAxis;var bases=updatePosition(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed);var style=el.style.cssText;var transform='';var searchResult=/transform\s*:/i.exec(style);if(searchResult){var index=searchResult.index;var trimmedStyle=style.slice(index);var delimiter=trimmedStyle.indexOf(';');if(delimiter){transform=" "+trimmedStyle.slice(11,delimiter).replace(/\s/g,'');}else{transform=" "+trimmedStyle.slice(11).replace(/\s/g,'');}} 3789return{baseX:bases.x,baseY:bases.y,top:blockTop,left:blockLeft,height:blockHeight,width:blockWidth,speed:speed,verticalSpeed:verticalSpeed,horizontalSpeed:horizontalSpeed,verticalScrollAxis:verticalScrollAxis,horizontalScrollAxis:horizontalScrollAxis,style:style,transform:transform,zindex:dataZindex,min:dataMin,max:dataMax,minX:dataMinX,maxX:dataMaxX,minY:dataMinY,maxY:dataMaxY};};var setPosition=function(){var oldY=posY;var oldX=posX;posY=self.options.wrapper?self.options.wrapper.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;posX=self.options.wrapper?self.options.wrapper.scrollLeft:(document.documentElement||document.body.parentNode||document.body).scrollLeft||window.pageXOffset;if(self.options.relativeToWrapper){var scrollPosY=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;posY=scrollPosY-self.options.wrapper.offsetTop;} 3790if(oldY!=posY&&self.options.vertical){return true;} 3791if(oldX!=posX&&self.options.horizontal){return true;} 3792return false;};var updatePosition=function(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed){var result={};var valueX=((horizontalSpeed?horizontalSpeed:speed)*(100*(1-percentageX
3792)));var valueY=((verticalSpeed?verticalSpeed:speed)*(100*(1-percentageY)));result.x=self.options.round?Math.round(valueX):Math.round(valueX*100)/100;result.y=self.options.round?Math.round(valueY):Math.round(valueY*100)/100;return result;};var deferredUpdate=function(){window.removeEventListener('resize',deferredUpdate);window.removeEventListener('orientationchange',deferredUpdate);(self.options.wrapper?self.options.wrapper:window).removeEventListener('scroll',deferredUpdate);(self.options.wrapper?self.options.wrapper:document).removeEventListener('touchmove',deferredUpdate);loopId=loop(update);};var update=function(){if(setPosition()&&pause===false){animate();loopId=loop(update);}else{loopId=null;window.addEventListener('resize',deferredUpdate);window.addEventListener('orientationchange',deferredUpdate);(self.options.wrapper?self.options.wrapper:window).addEventListener('scroll',deferredUpdate,supportsPassive?{passive:true}:false);(self.options.wrapper?self.options.wrapper:document).addEventListener('touchmove',deferredUpdate,supportsPassive?{passive:true}:false);}};var animate=function(){var positions;for(var i=0;i<self.elems.length;i++){var verticalScrollAxis=blocks[i].verticalScrollAxis.toLowerCase();var horizontalScrollAxis=blocks[i].horizontalScrollAxis.toLowerCase();var verticalScrollX=verticalScrollAxis.indexOf("x")!=-1?posY:0;var verticalScrollY=verticalScrollAxis.indexOf("y")!=-1?posY:0;var horizontalScrollX=horizontalScrollAxis.indexOf("x")!=-1?posX:0;var horizontalScrollY=horizontalScrollAxis.indexOf("y")!=-1?posX:0;var percentageY=((verticalScrollY+horizontalScrollY-blocks[i].top+screenY)/(blocks[i].height+screenY));var percentageX=((verticalScrollX+horizontalScrollX-blocks[i].left+screenX)/(blocks[i].width+screenX));positions=updatePosition(percentageX,percentageY,blocks[i].speed,blocks[i].verticalSpeed,blocks[i].horizontalSpeed);var positionY=positions.y-blocks[i].baseY;var positionX=positions.x-blocks[i].baseX;if(blocks[i].min!==null){if(self.options.vertical&&!self.options.horizontal){positionY=positionY<=blocks[i].min?blocks[i].min:positionY;} 3793if(self.options.horizontal&&!self.options.vertical){positionX=positionX<=blocks[i].min?blocks[i].min:positionX;}} 3794if(blocks[i].minY!=null){positionY=positionY<=blocks[i].minY?blocks[i].minY:positionY;} 3795if(blocks[i].minX!=null){positionX=positionX<=blocks[i].minX?blocks[i].minX:positionX;} 3796if(blocks[i].max!==null){if(self.options.vertical&&!self.options.horizontal){positionY=positionY>=blocks[i].max?blocks[i].max:positionY;} 3797if(self.options.horizontal&&!self.options.vertical){positionX=positionX>=blocks[i].max?blocks[i].max:positionX;}} 3798if(blocks[i].maxY!=null){positionY=positionY>=blocks[i].maxY?blocks[i].maxY:positionY;} 3799if(blocks[i].maxX!=null){positionX=positionX>=blocks[i].maxX?blocks[i].maxX:positionX;} 3800var zindex=blocks[i].zindex;var translate='translate3d('+(self.options.horizontal?positionX:'0')+'px,'+(self.options.vertical?positionY:'0')+'px,'+zindex+'px) '+blocks[i].transform;self.elems[i].style[transformProp]=translate;} 3801self.options.callback(positions);};self.destroy=function(){for(var i=0;i<self.elems.length;i++){self.elems[i].style.cssText=blocks[i].style;} 3802if(!pause){window.removeEventListener('resize',init);pause=true;} 3803clearLoop(loopId);loopId=null;};init();self.refresh=init;return self;};return Rellax;}));var player,OKEvents,options,videoWidth,videoHeight,YTplayers,youtubePlayers=new Array();function onYouTubeIframeAPIReady(){YTplayers=new Array();jQuery('.uncode-video-container.video').each(function(){var playerY;if(jQuery(this).attr('data-provider')=='youtube'){var id=jQuery(this).attr('data-id'),start=jQuery(this).attr('data-start'),end=jQuery(this).attr('data-end');start=typeof start&&start!==null?start:0;end=typeof end&&end!==null?end:0;options=jQuery(window).data('okoptions-'+id);if(typeof options==='undefined'){return true;} 3804options.time=jQuery(this).attr('data-t');playerY=new YT.Player('okplayer-'+id,{videoId:options.video?options.video.id:null,playerVars:{'autohide':1,'autoplay':jQuery(this).hasClass('is-no-control')?options.autoplay:0,'disablekb':1,'cc_load_policy':options.captions,'controls':0,'enablejsapi':1,'fs':0,'modestbranding':1,'origin':window.location.origin||(window.location.protocol+'//'+window.location.hostname),'iv_load_policy':options.annotations,'loop':options.loop,'showinfo':0,'rel':0,'wmode':'opaque','hd':options.hd,'mute':1,'start':start,'end':end},events:{'onReady':OKEvents.yt.ready,'onStateChange':OKEvents.yt.onStateChange,'onError':OKEvents.yt.error}});YTplayers[id]=playerY;playerY.videoId=id;}});} 3805function vimeoPlayerReady(id){options=jQuery(window).data('okoptions-'+id);if(typeof options==='undefined'){return true;} 3806var jIframe=options.jobject,iframe=jIframe[0];jIframe.attr('src',jIframe.data('src'));var playerV=new Vimeo.Player(iframe);playerV.on('loaded',function(e){OKEvents.v.onReady(iframe);var carouselContainer=jQuery(iframe).closest('.owl-carousel');if(carouselContainer.length){UNCODE.owlPlayVideo(carouselContainer);} 3807if(OKEvents.utils.isMobile()){OKEvents.v.onPlay(playerV);}else{playerV.on('play',function(){OKEvents.v.onPlay(playerV);jQuery(window).trigger('okevents.v.play',[playerV]);});playerV.on('pause',function(){OKEvents.v.onPause;jQuery(window).trigger('okevents.v.pause',[playerV]);});playerV.on('ended',function(){OKEvents.v.onFinish 3808jQuery(window).trigger('okevents.v.ended',[playerV]);});} 3809if(options.time!=null){var optsTimeStr=(options.time).replace('t=',''),timeV='';if(/[a-zA-Z]/g.test(optsTimeStr)){var timeArr=optsTimeStr.split(/([^\d.-])/);for(var i=0;i<timeArr.length;i++){if(timeArr[i]==='h'){timeV+=parseFloat(timeArr[i-1])*3600;}else if(timeArr[i]==='m'){timeV+=parseFloat(timeArr[i-1])*60;}else if(timeArr[i]==='s'){timeV+=parseFloat(timeArr[i-1]);}}}else{timeV=optsTimeStr;} 3810playerV.setCurrentTime(timeV);} 3811playerV.setVolume(0);playerV.play();jQuery(iframe).css({visibility:'visible',opacity:1});jQuery(iframe).closest('.uncode-video-container:not(.t-entry-drop)').css('opacity','1');jQuery(iframe).closest('#page-header').addClass('video-started');jQuery(iframe).closest('.background-wrapper').find('.block-bg-blend-mode.not-ie').css('opacity','1');jQuery(window).trigger('okevents.v.loaded',[playerV]);});} 3812OKEvents={yt:{ready:function(event){var id=event.target.videoId,$video=jQuery('#okplayer-'+id),options=jQuery(window).data('okoptions-'+id);if(typeof options==='undefined'){return true;} 3813youtubePlayers[id]=event.target;event.target.setVolume(options.volume);if(options.autoplay===1){if(options.playlist.list){player.loadPlaylist(options.playlist.list,options.playlist.index,options.playlist.startSeconds,options.playlist.suggestedQuality);}else{var inCarousel=$video.closest('.owl-item');
3813if(!inCarousel.length||(inCarousel.length&&inCarousel.hasClass('active'))){if(options.time!=null){event.target.seekTo(parseInt(options.time));} 3814event.target.playVideo();}else{event.target.pauseVideo();}}} 3815OKEvents.utils.isFunction(options.onReady)&&options.onReady(event.target);$video.closest('[data-provider]').on('uncode-resume',function(){if(options.time!=null){event.target.seekTo(parseInt(options.time)).playVideo();}else{event.target.seekTo(0).playVideo();}});$video.closest('[data-provider]').on('uncode-pause',function(){if(options.time!=null){event.target.seekTo(parseInt(options.time)).pauseVideo();}else{event.target.seekTo(0).pauseVideo();}});jQuery(window).trigger('okevents.y.loaded',[event]);},onStateChange:function(event){var id=event.target.videoId,$video=jQuery('#okplayer-'+id),options=jQuery(window).data('okoptions-'+id);if(typeof options==='undefined'||typeof event.target.setVolume==='undefined'){return true;} 3816youtubePlayers[id]=event.target;event.target.setVolume(options.volume);var $fluid=$video.closest('.fluid-object'),$tmb=$video.closest('.tmb'),setTime;switch(event.data){case-1:OKEvents.utils.isFunction(options.unstarted)&&options.unstarted();break;case 0:OKEvents.utils.isFunction(options.onFinished)&&options.onFinished();options.loop&&event.target.playVideo();break;case 1:OKEvents.utils.isFunction(options.onPlay)&&options.onPlay();setTimeout(function(){UNCODE.initVideoComponent(document.body,'.uncode-video-container.video:not(.drop-move), .uncode-video-container.self-video:not(.drop-move)');jQuery('#okplayer-'+id).closest('.uncode-video-container:not(.t-entry-drop)').css('opacity','1');jQuery('#okplayer-'+id).closest('#page-header').addClass('video-started');jQuery('#okplayer-'+id).closest('.background-wrapper').find('.block-bg-blend-mode.not-ie').css('opacity','1');},300);break;case 2:OKEvents.utils.isFunction(options.onPause)&&options.onPause();break;case 3:OKEvents.utils.isFunction(options.buffering)&&options.buffering();break;case 5:OKEvents.utils.isFunction(options.cued)&&options.cued();break;default:throw"OKVideo: received invalid data from YT player.";} 3817jQuery(window).trigger('okevents.y.change',[event]);},error:function(event){throw event;}},v:{onReady:function(target){if(typeof options==='undefined'){return true;} 3818OKEvents.utils.isFunction(options.onReady)&&options.onReady(target);},onPlay:function(player){if(typeof options==='undefined'){return true;} 3819if(!OKEvents.utils.isMobile())player.setVolume(options.volume);OKEvents.utils.isFunction(options.onPlay)&&options.onPlay();jQuery(player.element).closest('.uncode-video-container:not(.t-entry-drop)').css('opacity','1');jQuery(player.element).closest('#page-header').addClass('video-started');jQuery(player.element).closest('.background-wrapper').find('.block-bg-blend-mode.not-ie').css('opacity','1');},onPause:function(){if(typeof options==='undefined'){return true;} 3820OKEvents.utils.isFunction(options.onPause)&&options.onPause();},onFinish:function(){if(typeof options==='undefined'){return true;} 3821OKEvents.utils.isFunction(options.onFinish)&&options.onFinish();}},utils:{isFunction:function(func){if(typeof func==='function'){return true;}else{return false;}},isMobile:function(){if(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)){return true;}else{return false;}}}};'use strict';(function(){'use strict';function Pathformer(element){if(typeof element==='undefined'){throw new Error('Pathformer [constructor]: "element" parameter is required');} 3822if(element.constructor===String){element=document.getElementById(element);if(!element){throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID');}} 3823if(element instanceof window.SVGElement||element instanceof window.SVGGElement||/^svg$/i.test(element.nodeName)){this.el=element;}else{throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');} 3824this.scan(element);} 3825Pathformer.prototype.TYPES=['line','ellipse','circle','polygon','polyline','rect'];Pathformer.prototype.ATTR_WATCH=['cx','cy','points','r','rx','ry','x','x1','x2','y','y1','y2'];Pathformer.prototype.scan=function(svg){var fn,element,pathData,pathDom,elements=svg.querySelectorAll(this.TYPES.join(','));for(var i=0;i<elements.length;i++){element=elements[i];fn=this[element.tagName.toLowerCase()+'ToPath'];pathData=fn(this.parseAttr(element.attributes));pathDom=this.pathMaker(element,pathData);element.parentNode.replaceChild(pathDom,element);}};Pathformer.prototype.lineToPath=function(element){var newElement={}
vendor: 5,492 bytes, lines 3825-3846
3825,x1=element.x1||0,y1=element.y1||0,x2=element.x2||0,y2=element.y2||0;newElement.d='M'+x1+','+y1+'L'+x2+','+y2;return newElement;};Pathformer.prototype.rectToPath=function(element){var newElement={},x=parseFloat(element.x)||0,y=parseFloat(element.y)||0,width=parseFloat(element.width)||0,height=parseFloat(element.height)||0;if(element.rx||element.ry){var rx=parseInt(element.rx,10)||-1,ry=parseInt(element.ry,10)||-1;rx=Math.min(Math.max(rx<0?ry:rx,0),width/2);ry=Math.min(Math.max(ry<0?rx:ry,0),height/2);newElement.d='M '+(x+rx)+','+y+' '+'L '+(x+width-rx)+','+y+' '+'A '+rx+','+ry+',0,0,1,'+(x+width)+','+(y+ry)+' '+'L '+(x+width)+','+(y+height-ry)+' '+'A '+rx+','+ry+',0,0,1,'+(x+width-rx)+','+(y+height)+' '+'L '+(x+rx)+','+(y+height)+' '+'A '+rx+','+ry+',0,0,1,'+x+','+(y+height-ry)+' '+'L '+x+','+(y+ry)+' '+'A '+rx+','+ry+',0,0,1,'+(x+rx)+','+y;} 3826else{newElement.d='M'+x+' '+y+' '+'L'+(x+width)+' '+y+' '+'L'+(x+width)+' '+(y+height)+' '+'L'+x+' '+(y+height)+' Z';} 3827return newElement;};Pathformer.prototype.polylineToPath=function(element){var newElement={},points=element.points.trim().split(' '),i,path;if(element.points.indexOf(',')===-1){var formattedPoints=[];for(i=0;i<points.length;i+=2){formattedPoints.push(points[i]+','+points[i+1]);} 3828points=formattedPoints;} 3829path='M'+points[0];for(i=1;i<points.length;i++){if(points[i].indexOf(',')!==-1){path+='L'+points[i];}} 3830newElement.d=path;return newElement;};Pathformer.prototype.polygonToPath=function(element){var newElement=Pathformer.prototype.polylineToPath(element);newElement.d+='Z';return newElement;};Pathformer.prototype.ellipseToPath=function(element){var newElement={},rx=parseFloat(element.rx)||0,ry=parseFloat(element.ry)||0,cx=parseFloat(element.cx)||0,cy=parseFloat(element.cy)||0,startX=cx-rx,startY=cy,endX=parseFloat(cx)+parseFloat(rx),endY=cy;newElement.d='M'+startX+','+startY+'A'+rx+','+ry+' 0,1,1 '+endX+','+endY+'A'+rx+','+ry+' 0,1,1 '+startX+','+endY;return newElement;};Pathformer.prototype.circleToPath=function(element){var newElement={},r=parseFloat(element.r)||0,cx=parseFloat(element.cx)||0,cy=parseFloat(element.cy)||0,startX=cx-r,startY=cy,endX=parseFloat(cx)+parseFloat(r),endY=cy;newElement.d='M'+startX+','+startY+'A'+r+','+r+' 0,1,1 '+endX+','+endY+'A'+r+','+r+' 0,1,1 '+startX+','+endY;return newElement;};Pathformer.prototype.pathMaker=function(element,pathData){var i,attr,pathTag=document.createElementNS('http://www.w3.org/2000/svg','path');for(i=0;i<element.attributes.length;i++){attr=element.attributes[i];if(this.ATTR_WATCH.indexOf(attr.name)===-1){pathTag.setAttribute(attr.name,attr.value);}} 3831for(i in pathData){pathTag.setAttribute(i,pathData[i]);} 3832return pathTag;};Pathformer.prototype.parseAttr=function(element){var attr,output={};for(var i=0;i<element.length;i++){attr=element[i];if(this.ATTR_WATCH.indexOf(attr.name)!==-1&&attr.value.indexOf('%')!==-1){throw new Error('Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into \'path\' tags. Please use \'viewBox\'.');} 3833output[attr.name]=attr.value;} 3834return output;};'use strict';var setupEnv,requestAnimFrame,cancelAnimFrame,parsePositiveInt;function Vivus(element,options,callback){setupEnv();this.isReady=false;this.setElement(element,options);this.setOptions(options);this.setCallback(callback);if(this.isReady){this.init();}} 3835Vivus.LINEAR=function(x){return x;};Vivus.EASE=function(x){return-Math.cos(x*Math.PI)/2+0.5;};Vivus.EASE_OUT=function(x){return 1-Math.pow(1-x,3);};Vivus.EASE_IN=function(x){return Math.pow(x,3);};Vivus.EASE_OUT_BOUNCE=function(x){var base=-Math.cos(x*(0.5*Math.PI))+1,rate=Math.pow(base,1.5),rateR=Math.pow(1-x,2),progress=-Math.abs(Math.cos(rate*(2.5*Math.PI)))+1;return(1-rateR)+(progress*rateR);};Vivus.prototype.setElement=function(element,options){var onLoad,self;if(typeof element==='undefined'){throw new Error('Vivus [constructor]: "element" parameter is required');} 3836if(element.constructor===String){element=document.getElementById(element);if(!element){throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');}} 3837this.parentEl=element;if(options&&options.file){var self=this;onLoad=function(e){var domSandbox=document.createElement('div');domSandbox.innerHTML=this.responseText;var svgTag=domSandbox.querySelector('svg');if(!svgTag){throw new Error('Vivus [load]: Cannot find the SVG in the loaded file : '+options.file);} 3838self.el=svgTag 3839self.el.setAttribute('width','100%');self.el.setAttribute('height','100%');self.parentEl.appendChild(self.el) 3840self.isReady=true;self.init();self=null;} 3841var oReq=new window.XMLHttpRequest();oReq.addEventListener('load',onLoad);oReq.open('GET',options.file);oReq.send();return;} 3842switch(element.constructor){case window.SVGSVGElement:case window.SVGElement:case window.SVGGElement:this.el=element;this.isReady=true;break;case window.HTMLObjectElement:self=this;onLoad=function(e){if(self.isReady){return;} 3843self.el=element.contentDocument&&element.contentDocument.querySelector('svg');if(!self.el&&e){throw new Error('Vivus [constructor]: object loaded does not contain any SVG');} 3844else if(self.el){if(element.getAttribute('built-by-vivus')){self.parentEl.insertBefore(self.el,element);self.parentEl.removeChild(element);self.el.setAttribute('width','100%');self.el.setAttribute('height','100%');} 3845self.isReady=true;self.init();self=null;}};if(!onLoad()){element.addEventListener('load',onLoad);} 3846break;default:throw new Error('Vivus [constructor]: "element" parameter is not val
3846id (or miss the "file" attribute)');}};Vivus.prototype.setOptions=function(options){var allowedTypes=['delayed','sync','async','nsync','oneByOne','scenario','scenario-sync'];var allowedStarts=['inViewport','manual','autostart'];if(options!==undefined&&options.constructor!==Object){throw new Error('Vivus [constructor]: "options" parameter must be an object');} 3847else{options=options||{};} 3848if(options.type&&allowedTypes.indexOf(options.type)===-1){throw new Error('Vivus [constructor]: '+options.type+' is not an existing animation `type`');} 3849else{this.type=options.type||allowedTypes[0];} 3850if(options.start&&allowedStarts.indexOf(options.start)===-1){throw new Error('Vivus [constructor]: '+options.start+' is not an existing `start` option');} 3851else{this.start=options.start||allowedStarts[0];} 3852this.isIE=(window.navigator.userAgent.indexOf('MSIE')!==-1||window.navigator.userAgent.indexOf('Trident/')!==-1||window.navigator.userAgent.indexOf('Edge/')!==-1);this.duration=parsePositiveInt(options.duration,120);this.delay=parsePositiveInt(options.delay,null);this.delayStart=parsePositiveInt(options.delayStart,null);this.dashGap=parsePositiveInt(options.dashGap,1);this.forceRender=options.hasOwnProperty('forceRender')?!!options.forceRender:this.isIE;this.reverseStack=!!options.reverseStack;this.selfDestroy=!!options.selfDestroy;this.onReady=options.onReady;this.map=[];this.frameLength=this.currentFrame=this.delayUnit=this.speed=this.handle=null;this.ignoreInvisible=options.hasOwnProperty('ignoreInvisible')?!!options.ignoreInvisible:false;this.animTimingFunction=options.animTimingFunction||Vivus.LINEAR;this.pathTimingFunction=options.pathTimingFunction||Vivus.LINEAR;if(this.delay>=this.duration){throw new Error('Vivus [constructor]: delay must be shorter than duration');}};Vivus.prototype.setCallback=function(callback){if(!!callback&&callback.constructor!==Function){throw new Error('Vivus [constructor]: "callback" parameter must be a function');} 3853this.callback=callback||function(){};};Vivus.prototype.mapping=function(){var i,paths,path,pAttrs,pathObj,totalLength,lengthMeter,timePoint;timePoint=totalLength=lengthMeter=0;paths=this.el.querySelectorAll('path');for(i=0;i<paths.length;i++){path=paths[i];if(this.isInvisible(path)){continue;} 3854pathObj={el:path,length:Math.ceil(path.getTotalLength())};if(isNaN(pathObj.length)){if(window.console&&console.warn){console.warn('Vivus [mapping]: cannot retrieve a path element length',path);} 3855continue;} 3856this.map.push(pathObj);path.style.strokeDasharray=pathObj.length+' '+(pathObj.length+this.dashGap*2);path.style.strokeDashoffset=pathObj.length+this.dashGap;pathObj.length+=this.dashGap;totalLength+=pathObj.length;this.renderPath(i);} 3857totalLength=totalLength===0?1:totalLength;this.delay=this.delay===null?this.duration/3:this.delay;this.delayUnit=this.delay/(paths.length>1?paths.length-1:1);if(this.reverseStack){this.map.reverse();} 3858for(i=0;i<this.map.length;i++){pathObj=this.map[i];switch(this.type){case'delayed':pathObj.startAt=this.delayUnit*i;pathObj.duration=this.duration-this.delay;break;case'oneByOne':pathObj.startAt=lengthMeter/totalLength*this.duration;pathObj.duration=pathObj.length/totalLength*this.duration;break;case'sync':case'async':case'nsync':pathObj.startAt=0;pathObj.duration=this.duration;break;case'scenario-sync':path=pathObj.el;pAttrs=this.parseAttr(path);pathObj.startAt=timePoint+(parsePositiveInt(pAttrs['data-delay'],this.delayUnit)||0);pathObj.duration=parsePositiveInt(pAttrs['data-duration'],this.duration);timePoint=pAttrs['data-async']!==undefined?pathObj.startAt:pathObj.startAt+pathObj.duration;this.frameLength=Math.max(this.frameLength,(pathObj.startAt+pathObj.duration));break;case'scenario':path=pathObj.el;pAttrs=this.parseAttr(path);pathObj.startAt=parsePositiveInt(pAttrs['data-start'],this.delayUnit)||0;pathObj.duration=parsePositiveInt(pAttrs['data-duration'],this.duration);this.frameLength=Math.max(this.frameLength,(pathObj.startAt+pathObj.duration));break;} 3859lengthMeter+=pathObj.length;this.frameLength=this.frameLength||this.duration;}};Vivus.prototype.drawer=function(){var self=this;this.currentFrame+=this.speed;if(this.currentFrame<=0){this.stop();this.reset();}else if(this.currentFrame>=this.frameLength){this.stop();this.currentFrame=this.frameLength;this.trace();
3859if(this.selfDestroy){this.destroy();}}else{this.trace();this.handle=requestAnimFrame(function(){self.drawer();});return;} 3860this.callback(this);if(this.instanceCallback){this.instanceCallback(this);this.instanceCallback=null;}};Vivus.prototype.trace=function(){var i,progress,path,currentFrame;currentFrame=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;for(i=0;i<this.map.length;i++){path=this.map[i];progress=(currentFrame-path.startAt)/path.duration;progress=this.pathTimingFunction(Math.max(0,Math.min(1,progress)));if(path.progress!==progress){path.progress=progress;path.el.style.strokeDashoffset=Math.floor(path.length*(1-progress));this.renderPath(i);}}};Vivus.prototype.renderPath=function(index){if(this.forceRender&&this.map&&this.map[index]){var pathObj=this.map[index],newPath=pathObj.el.cloneNode(true);pathObj.el.parentNode.replaceChild(newPath,pathObj.el);pathObj.el=newPath;}};Vivus.prototype.init=function(){this.frameLength=0;this.currentFrame=0;this.map=[];new Pathformer(this.el);this.mapping();this.starter();if(this.onReady){this.onReady(this);}};Vivus.prototype.starter=function(){switch(this.start){case'manual':return;case'autostart':this.play();break;case'inViewport':var self=this,listener=function(){if(self.isInViewport(self.parentEl,1)){self.play();window.removeEventListener('scroll',listener);window.removeEventListener('fp-slide-changed',listener);window.removeEventListener('fp-slide-scroll',listener);}};window.addEventListener('scroll',listener);window.addEventListener('fp-slide-changed',listener);window.addEventListener('fp-slide-scroll',listener);listener();break;}};Vivus.prototype.getStatus=function(){return this.currentFrame===0?'start':this.currentFrame===this.frameLength?'end':'progress';};Vivus.prototype.reset=function(){return this.setFrameProgress(0);};Vivus.prototype.finish=function(){return this.setFrameProgress(1);};Vivus.prototype.setFrameProgress=function(progress){progress=Math.min(1,Math.max(0,progress));this.currentFrame=Math.round(this.frameLength*progress);this.trace();return this;};Vivus.prototype.play=function(speed,callback){this.instanceCallback=null;if(speed&&typeof speed==='function'){this.instanceCallback=speed;speed=null;} 3861else if(speed&&typeof speed!=='number'){throw new Error('Vivus [play]: invalid speed');} 3862if(callback&&typeof(callback)==='function'&&!this.instanceCallback){this.instanceCallback=callback;} 3863this.speed=speed||1;if(!this.handle){var $this=this,delay=(this.delayStart!=null)?this.delayStart:0;setTimeout(function(){$this.drawer();},delay);} 3864return this;};Vivus.prototype.stop=function(){if(this.handle){cancelAnimFrame(this.handle);this.handle=null;} 3865return this;};Vivus.prototype.destroy=function(){this.stop();var i,path;for(i=0;i<this.map.length;i++){path=this.map[i];path.el.style.strokeDashoffset=null;path.el.style.strokeDasharray=null;this.renderPath(i);}};Vivus.prototype.isInvisible=function(el){var rect,ignoreAttr=el.getAttribute('data-ignore');if(ignoreAttr!==null){return ignoreAttr!=='false';} 3866if(this.ignoreInvisible){rect=el.getBoundingClientRect();return!rect.width&&!rect.height;} 3867else{return false;}};Vivus.prototype.parseAttr=function(element){var attr,output={};if(element&&element.attributes){for(var i=0;i<element.attributes.length;i++){attr=element.attributes[i];output[attr.name]=attr.value;}} 3868return output;};Vivus.prototype.isInViewport=function(el,h){var scrolled=this.scrollY(),viewed=scrolled+this.getViewportH(),elBCR=el.getBoundingClientRect(),elHeight=elBCR.height,elTop=scrolled+elBCR.top,elBottom=elTop+elHeight;h=h||0;return(elTop+elHeight*h)<=viewed&&(elBottom)>=scrolled;};Vivus.prototype.getViewportH=function(){var client=this.docElem.clientHeight,inner=window.innerHeight;if(client<inner){return inner;} 3869else{return client;}};Vivus.prototype.scrollY=function(){return window.pageYOffset||this.docElem.scrollTop;};setupEnv=function(){if(Vivus.prototype.docElem){return;} 3870Vivus.prototype.docElem=window.document.documentElement;requestAnimFrame=(function(){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){return window.setTimeout(callback,1000/60);});})();cancelAnimFrame=(function(){return(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(id){return window.clearTimeout(id);});})();};parsePositiveInt=function(value,defaultValue){var output=parseInt(value,10);return(output>=0)?output:defaultValue;};if(typeof define==='function'&&define.amd){define([],function(){return Vivus;});}else if(typeof exports==='object'){module.exports=Vivus;}else{window.Vivus=Vivus;}}());!function(){"use strict";var r=.5*(Math.sqrt(3)-1),e=(3-Math.sqrt(3))/6,t=1/6,a=(Math.sqrt(5)-1)/4,o=(5-Math.sqrt(5))/20;function i(r){var e;e="function"==typeof r?r:r?function(){var r=0,e=0,t=0,a=1,o=(i=4022871197,function(r){r=r.toString();for(var e=0;e<r.length;e++){var t=.02519603282416938*(i+=r.charCodeAt(e));t-=i=t>>>0,i=(t*=i)>>>0,i+=4294967296*(t-=i)}return 2.3283064365386963e-10*(i>>>0)});var i;r=o(" "),e=o(" "),t=o(" ");for(var n=0;n<arguments.length;n++)(r-=o(arguments[n]))<0&&(r+=1),(e-=o(arguments[n]))<0&&(e+=1),(t-=o(arguments[n]))<0&&(t+=1);return o=null,function(){var o=2091639*r+2.3283064365386963e-10*a;return r=e,e=t,t=o-(a=0|o)}}(r):Math.random,this.p=n(e),this.perm=new Uint8Array(512),this.permMod12=new Uint8Array(512);for(var t=0;t<512;t++)this.perm[t]=this.p[255&t],this.permMod12[t]=this.perm[t]%12}function n(r){var e,t=new Uint8Array(256);for(e=0;e<256;e++)t[e]=e;for(e=0;e<255;e++){var a=e+~~(r()*(256-e)),o=t[e];t[e]=t[a],t[a]=o}return t}i.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(t,a){var o,i,n=this.permMod12,f=this.perm,s=this.grad3,v=0,h=0,l=0,u=(t+a)*r,d=Math.floor(t+u),p=Math.floor(a+u),M=(d+p)*e,m=t-(d-M),c=a-(p-M);m>c?(o=1,i=0):(o=0,i=1);var y=m-o+e,w=c-i+e,g=m-1+2*e,A=c-1+2*e,x=255&d,q=255&p,D=.5-m*m-c*c;if(D>=0){var S=3*n[x+f[q]];v=(D*=D)*D*(s[S]*m+s[S+1]*c)}var U=.5-y*y-w*w;if(U>=0){var b=3*n[x+o+f[q+i]];h=(U*=U)*U*(s[b]*y+s[b+1]*w)}var F=.5-g*g-A*A;if(F>=0){var N=3*n[x+1+f[q+1]];l=(F*=F)*F*(s[N]*g+s[N+1]*A)}return 70*(v+h+l)},noise3D:function(r,e,a){var o,i,n,f,s,v,h,l,u,d,p=this.permMod12,M=this.perm,m=this.grad3,c=(r+e+a)*(1/3),y=Math.floor(r+c),w=Math.floor(e+c),g=Math.floor(a+c),A=(y+w+g)*t,x=r-(y-A),q=e-(w-A),D=a-(g-A);x>=q?q>=D?(s=1,v=0,h=0,l=1,u=1,d=0):x>=D?(s=1,v=0,h=0,l=1,u=0,d=1):(s=0,v=0,h=1,l=1,u=0,d=1):q<D?(s=0,v=0,h=1,l=0,u=1,d=1):x<D?(s=0,v=1,h=0,l=0,u=1,d=1):(s=0,v=1,h=0,l=1,u=1,d=0);var S=x-s+t,U=q-v+t,b=D-h+t,F=x-l+2*t,N=q-u+2*t,C=D-d+2*t,P=x-1+.5,T=q-1+.5,_=D-1+.5,j=255&y,k=255&w,z=255&g,B=.6-x*x-q*q-D*D;if(B<0)o=0;else{var E=3*p[j+M[k+M[z]]];
3870o=(B*=B)*B*(m[E]*x+m[E+1]*q+m[E+2]*D)}var G=.6-S*S-U*U-b*b;if(G<0)i=0;else{var H=3*p[j+s+M[k+v+M[z+h]]];i=(G*=G)*G*(m[H]*S+m[H+1]*U+m[H+2]*b)}var I=.6-F*F-N*N-C*C;if(I<0)n=0;else{var J=3*p[j+l+M[k+u+M[z+d]]];n=(I*=I)*I*(m[J]*F+m[J+1]*N+m[J+2]*C)}var K=.6-P*P-T*T-_*_;if(K<0)f=0;else{var L=3*p[j+1+M[k+1+M[z+1]]];f=(K*=K)*K*(m[L]*P+m[L+1]*T+m[L+2]*_)}return 32*(o+i+n+f)},noise4D:function(r,e,t,i){var n,f,s,v,h,l,u,d,p,M,m,c,y,w,g,A,x,q=this.perm,D=this.grad4,S=(r+e+t+i)*a,U=Math.floor(r+S),b=Math.floor(e+S),F=Math.floor(t+S),N=Math.floor(i+S),C=(U+b+F+N)*o,P=r-(U-C),T=e-(b-C),_=t-(F-C),j=i-(N-C),k=0,z=0,B=0,E=0;P>T?k++:z++,P>_?k++:B++,P>j?k++:E++,T>_?z++:B++,T>j?z++:E++,_>j?B++:E++;var G=P-(l=k>=3?1:0)+o,H=T-(u=z>=3?1:0)+o,I=_-(d=B>=3?1:0)+o,J=j-(p=E>=3?1:0)+o,K=P-(M=k>=2?1:0)+2*o,L=T-(m=z>=2?1:0)+2*o,O=_-(c=B>=2?1:0)+2*o,Q=j-(y=E>=2?1:0)+2*o,R=P-(w=k>=1?1:0)+3*o,V=T-(g=z>=1?1:0)+3*o,W=_-(A=B>=1?1:0)+3*o,X=j-(x=E>=1?1:0)+3*o,Y=P-1+4*o,Z=T-1+4*o,$=_-1+4*o,rr=j-1+4*o,er=255&U,tr=255&b,ar=255&F,or=255&N,ir=.6-P*P-T*T-_*_-j*j;if(ir<0)n=0;else{var nr=q[er+q[tr+q[ar+q[or]]]]%32*4;n=(ir*=ir)*ir*(D[nr]*P+D[nr+1]*T+D[nr+2]*_+D[nr+3]*j)}var fr=.6-G*G-H*H-I*I-J*J;if(fr<0)f=0;else{var sr=q[er+l+q[tr+u+q[ar+d+q[or+p]]]]%32*4;f=(fr*=fr)*fr*(D[sr]*G+D[sr+1]*H+D[sr+2]*I+D[sr+3]*J)}var vr=.6-K*K-L*L-O*O-Q*Q;if(vr<0)s=0;else{var hr=q[er+M+q[tr+m+q[ar+c+q[or+y]]]]%32*4;s=(vr*=vr)*vr*(D[hr]*K+D[hr+1]*L+D[hr+2]*O+D[hr+3]*Q)}var lr=.6-R*R-V*V-W*W-X*X;if(lr<0)v=0;else{var ur=q[er+w+q[tr+g+q[ar+A+q[or+x]]]]%32*4;v=(lr*=lr)*lr*(D[ur]*R+D[ur+1]*V+D[ur+2]*W+D[ur+3]*X)}var dr=.6-Y*Y-Z*Z-$*$-rr*rr;if(dr<0)h=0;else{var pr=q[er+1+q[tr+1+q[ar+1+q[or+1]]]]%32*4;h=(dr*=dr)*dr*(D[pr]*Y+D[pr+1]*Z+D[pr+2]*$+D[pr+3]*rr)}return 27*(n+f+s+v+h)}},i._buildPermutationTable=n,"undefined"!=typeof define&&define.amd&&define(function(){return i}),"undefined"!=typeof exports?exports.SimplexNoise=i:"undefined"!=typeof window&&(window.SimplexNoise=i),"undefined"!=typeof module&&(module.exports=i)}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.