1(function(h,g){function w(gb,w){function Z(b){return c.preferFlash&&A&&!c.ignoreFlash&&c.flash[b]!==g&&c.flash[b]}function r(b){return function(c){var d=this._s;return d&&d._a?b.call(this,c):null}}this.setupOptions={url:gb||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1E3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0, 2forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"};this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100};this.flash9Options={isMovieStar:null,usePeakData:!1, 3useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus", 4"audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}};this.movieID="sm2-container";this.id=w||"sm2movie";this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.versionNumber="V2.97a.20150601";this.altURL=this.movieURL=this.version=null;this.enabled=this.swfLoaded=!1;this.oMC=null;this.sounds={};this.soundIDs=[];this.didFlashBlock=this.muted=!1;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i}; 5this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1};this.sandbox={};this.html5={usingFlash:null};this.flash={};this.ignoreFlash=this.html5Only=!1;var N,c=this,Oa=null,k=null,aa,u=navigator.userAgent,Pa=h.location.href.toString(),p=document,pa,Qa,qa,m,y=[],O=!1,P=!1,l=!1,B=!1,ra=!1,Q,x,sa,ba,ta,F,H,I,Ra,ua,va,ca,J,da,G,wa,R,xa,ea,K,Sa,ya,Ta,za,Ua,S=null,Aa=null,T,Ba,L,fa,ga,q,U=!1,Ca=!1,Va,Wa,Xa,ha=0,V=null,ia,W=[],X,v=null,Ya,ja,Y,D,ka,Da,Za,t,hb=Array.prototype.slice, 6z=!1,Ea,A,Fa,$a,C,la,ab=0,Ga,Ha=u.match(/(ipad|iphone|ipod)/i),Ia=u.match(/android/i),E=u.match(/msie/i),ib=u.match(/webkit/i),ma=u.match(/safari/i)&&!u.match(/chrome/i),Ja=u.match(/opera/i),na=u.match(/(mobile|pre\/|xoom)/i)||Ha||Ia,bb=!Pa.match(/usehtml5audio/i)&&!Pa.match(/sm2\-ignorebadua/i)&&ma&&!u.match(/silk/i)&&u.match(/OS X 10_6_([3-7])/i),Ka=p.hasFocus!==g?p.hasFocus():null,oa=ma&&(p.hasFocus===g||!p.hasFocus()),cb=!oa,db=/(mp3|mp4|mpa|m4a|m4b)/i,La=p.location?p.location.protocol.match(/http/i): 7null,jb=La?"":"http://",eb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,fb="mpeg4 aac flv mov mp4 m4v f4v m4a m4b mp4v 3gp 3g2".split(" "),kb=new RegExp("\\.("+fb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.useAltURL=!La;var Ma;try{Ma=Audio!==g&&(Ja&&opera!==g&&10>opera.version()?new Audio(null):new Audio).canPlayType!==g}catch(lb){Ma=!1}this.hasHTML5=Ma;this.setup=function(b){var e=!c.url;b!==g&&l&&v&&c.ok(); 8sa(b);if(!z)if(na){if(!c.setupOptions.ignoreMobileRestrictions||c.setupOptions.forceUseGlobalHTML5Audio)W.push(J.globalHTML5),z=!0}else c.setupOptions.forceUseGlobalHTML5Audio&&(W.push(J.globalHTML5),z=!0);if(!Ga&&na)if(c.setupOptions.ignoreMobileRestrictions)W.push(J.ignoreMobile);else if(c.setupOptions.useHTML5Audio=!0,c.setupOptions.preferFlash=!1,Ha)c.ignoreFlash=!0;else if(Ia&&!u.match(/android\s2\.3/i)||!Ia)z=!0;b&&(e&&R&&b.url!==g&&c.beginDelayedInit(),R||b.url===g||"complete"!==p.readyState|| 9setTimeout(G,1));Ga=!0;return c};this.supported=this.ok=function(){return v?l&&!B:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(b){return aa(b)||p[b]||h[b]};this.createSound=function(b,e){function d(){a=fa(a);c.sounds[a.id]=new N(a);c.soundIDs.push(a.id);return c.sounds[a.id]}var a,f=null;if(!l||!c.ok())return!1;e!==g&&(b={id:b,url:e});a=x(b);a.url=ia(a.url);a.id===g&&(a.id=c.setupOptions.idPrefix+ab++);if(q(a.id,!0))return c.sounds[a.id];if(ja(a))f=d(),f._setup_html5(a);else{if(c.html5Only|| 10c.html5.usingFlash&&a.url&&a.url.match(/data\:/i))return d();8<m&&null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(eb)||a.url&&a.url.match(kb)));a=ga(a,void 0);f=d();8===m?k._createSound(a.id,a.loops||1,a.usePolicyFile):(k._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,a.isMovieStar?a.bufferTime:!1,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(f.connected=!0,a.onconnect&&a.onconnect.apply(f))); 11a.serverURL||!a.autoLoad&&!a.autoPlay||f.load(a)}!a.serverURL&&a.autoPlay&&f.play();return f};this.destroySound=function(b,e){if(!q(b))return!1;var d=c.sounds[b],a;d.stop();d._iO={};d.unload();for(a=0;a<c.soundIDs.length;a++)if(c.soundIDs[a]===b){c.soundIDs.splice(a,1);break}e||d.destruct(!0);delete c.sounds[b];return!0};this.load=function(b,e){return q(b)?c.sounds[b].load(e):!1};this.unload=function(b){return q(b)?c.sounds[b].unload():!1};this.onposition=this.onPosition=function(b,e,d,a){return q(b)? 12c.sounds[b].onposition(e,d,a):!1};this.clearOnPosition=function(b,e,d){return q(b)?c.sounds[b].clearOnPosition(e,d):!1};this.start=this.play=function(b,e){var d=null,a=e&&!(e instanceof Object);if(!l||!c.ok())return!1;if(q(b,a))a&&(e={url:e});else{if(!a)return!1;a&&(e={url:e});e&&e.url&&(e.id=b,d=c.createSound(e).play())}null===d&&(d=c.sounds[b].play(e));return d};this.setPosition=function(b,e){return q(b)?c.sounds[b].setPosition(e):!1};this.stop=function(b){return q(b)?c.sounds[b].stop():!1};this.stopAll= 13function(){for(var b in c.sounds)c.sounds.hasOwnProperty(b)&&c.sounds[b].stop()};this.pause=function(b){return q(b)?c.sounds[b].pause():!1};this.pauseAll=function(){var b;for(b=c.soundIDs.length-1;0<=b;b--)c.sounds[c.soundIDs[b]].pause()};this.resume=function(b){return q(b)?c.sounds[b].resume():!1};this.resumeAll=function(){var b;for(b=c.soundIDs.length-1;0<=b;b--)c.sounds[c.soundIDs[b]].resume()};this.togglePause=function(b){return q(b)?c.sounds[b].togglePause():!1};this.setPan=function(b,e){return q(b)? 14c.sounds[b].setPan(e):!1}
14;this.setVolume=function(b,e){var d,a;if(b===g||isNaN(b)||e!==g)return q(b)?c.sounds[b].setVolume(e):!1;d=0;for(a=c.soundIDs.length;d<a;d++)c.sounds[c.soundIDs[d]].setVolume(b)};this.mute=function(b){var e=0;b instanceof String&&(b=null);if(b)return q(b)?c.sounds[b].mute():!1;for(e=c.soundIDs.length-1;0<=e;e--)c.sounds[c.soundIDs[e]].mute();return c.muted=!0};this.muteAll=function(){c.mute()};this.unmute=function(b){b instanceof String&&(b=null);if(b)return q(b)?c.sounds[b].unmute(): 15!1;for(b=c.soundIDs.length-1;0<=b;b--)c.sounds[c.soundIDs[b]].unmute();c.muted=!1;return!0};this.unmuteAll=function(){c.unmute()};this.toggleMute=function(b){return q(b)?c.sounds[b].toggleMute():!1};this.getMemoryUse=function(){var b=0;k&&8!==m&&(b=parseInt(k._getMemoryUse(),10));return b};this.disable=function(b){var e;b===g&&(b=!1);if(B)return!1;B=!0;for(e=c.soundIDs.length-1;0<=e;e--)Ta(c.sounds[c.soundIDs[e]]);Q(b);t.remove(h,"load",H);return!0};this.canPlayMIME=function(b){var e;c.hasHTML5&& 16(e=Y({type:b}));!e&&v&&(e=b&&c.ok()?!!(8<m&&b.match(eb)||b.match(c.mimePattern)):null);return e};this.canPlayURL=function(b){var e;c.hasHTML5&&(e=Y({url:b}));!e&&v&&(e=b&&c.ok()?!!b.match(c.filePattern):null);return e};this.canPlayLink=function(b){return b.type!==g&&b.type&&c.canPlayMIME(b.type)?!0:c.canPlayURL(b.href)};this.getSoundById=function(b,e){return b?c.sounds[b]:null};this.onready=function(b,c){if("function"===typeof b)c||(c=h),ta("onready",b,c),F();else throw T("needFunction","onready"); 17return!0};this.ontimeout=function(b,c){if("function"===typeof b)c||(c=h),ta("ontimeout",b,c),F({type:"ontimeout"});else throw T("needFunction","ontimeout");return!0};this._wD=this._writeDebug=function(b,c){return!0};this._debug=function(){};this.reboot=function(b,e){var d,a,f;for(d=c.soundIDs.length-1;0<=d;d--)c.sounds[c.soundIDs[d]].destruct();if(k)try{E&&(Aa=k.innerHTML),S=k.parentNode.removeChild(k)}catch(g){}Aa=S=v=k=null;c.enabled=R=l=U=Ca=O=P=B=z=c.swfLoaded=!1;c.soundIDs=[];c.sounds={};ab= 180;Ga=!1;if(b)y=[];else for(d in y)if(y.hasOwnProperty(d))for(a=0,f=y[d].length;a<f;a++)y[d][a].fired=!1;c.html5={usingFlash:null};c.flash={};c.html5Only=!1;c.ignoreFlash=!1;h.setTimeout(function(){e||c.beginDelayedInit()},20);return c};this.reset=function(){return c.reboot(!0,!0)};this.getMoviePercent=function(){return k&&"PercentLoaded"in k?k.PercentLoaded():null};this.beginDelayedInit=function(){ra=!0;G();setTimeout(function(){if(Ca)return!1;ea();da();return Ca=!0},20);I()};this.destruct=function(){c.disable(!0)}; 19N=function(b){var e,d,a=this,f,n,h,M,p,r,u=!1,l=[],v=0,y,B,w=null,A;d=e=null;this.sID=this.id=b.id;this.url=b.url;this._iO=this.instanceOptions=this.options=x(b);this.pan=this.options.pan;this.volume=this.options.volume;this.isHTML5=!1;this._a=null;A=this.url?!1:!0;this.id3={};this._debug=function(){};this.load=function(b){var e=null,d;b!==g?a._iO=x(b,a.options):(b=a.options,a._iO=b,w&&w!==a.url&&(a._iO.url=a.url,a.url=null));a._iO.url||(a._iO.url=a.url);a._iO.url=ia(a._iO.url);d=a.instanceOptions= 20a._iO;if(!d.url&&!a.url)return a;
20if(d.url===a.url&&0!==a.readyState&&2!==a.readyState)return 3===a.readyState&&d.onload&&la(a,function(){d.onload.apply(a,[!!a.duration])}),a;a.loaded=!1;a.readyState=1;a.playState=0;a.id3={};if(ja(d))e=a._setup_html5(d),e._called_load||(a._html5_canplay=!1,a.url!==d.url&&(a._a.src=d.url,a.setPosition(0)),a._a.autobuffer="auto",a._a.preload="auto",a._a._called_load=!0);else{if(c.html5Only||a._iO.url&&a._iO.url.match(/data\:/i))return a;try{a.isHTML5=!1,a._iO=ga(fa(d)), 21a._iO.autoPlay&&(a._iO.position||a._iO.from)&&(a._iO.autoPlay=!1),d=a._iO,8===m?k._load(a.id,d.url,d.stream,d.autoPlay,d.usePolicyFile):k._load(a.id,d.url,!!d.stream,!!d.autoPlay,d.loops||1,!!d.autoLoad,d.usePolicyFile)}catch(f){K({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}a.url=d.url;return a};this.unload=function(){0!==a.readyState&&(a.isHTML5?(M(),a._a&&(a._a.pause(),w=ka(a._a))):8===m?k._unload(a.id,"about:blank"):k._unload(a.id),f());return a};this.destruct=function(b){a.isHTML5?(M(),a._a&& 22(a._a.pause(),ka(a._a),z||h(),a._a._s=null,a._a=null)):(a._iO.onfailure=null,k._destroySound(a.id));b||c.destroySound(a.id,!0)};this.start=this.play=function(b,e){var d,f,n,h,Na;f=!0;f=null;e=e===g?!0:e;b||(b={});a.url&&(a._iO.url=a.url);a._iO=x(a._iO,a.options);a._iO=x(b,a._iO);a._iO.url=ia(a._iO.url);a.instanceOptions=a._iO;if(!a.isHTML5&&a._iO.serverURL&&!a.connected)return a.getAutoPlay()||a.setAutoPlay(!0),a;ja(a._iO)&&(a._setup_html5(a._iO),p());1!==a.playState||a.paused||(d=a._iO.multiShot, 23d||(a.isHTML5&&a.setPosition(a._iO.position),f=a));if(null!==f)return f;b.url&&b.url!==a.url&&(a.readyState||a.isHTML5||8!==m||!A?a.load(a._iO):A=!1);a.loaded||(0===a.readyState?(a.isHTML5||c.html5Only?a.isHTML5?a.load(a._iO):f=a:(a._iO.autoPlay=!0,a.load(a._iO)),a.instanceOptions=a._iO):2===a.readyState&&(f=a));if(null!==f)return f;!a.isHTML5&&9===m&&0<a.position&&a.position===a.duration&&(b.position=0);if(a.paused&&0<=a.position&&(!a._iO.serverURL||0<a.position))a.resume();else{a._iO=x(b,a._iO); 24if((!a.isHTML5&&null!==a._iO.position&&0<a._iO.position||null!==a._iO.from&&0<a._iO.from||null!==a._iO.to)&&0===a.instanceCount&&0===a.playState&&!a._iO.serverURL){d=function(){a._iO=x(b,a._iO);a.play(a._iO)};a.isHTML5&&!a._html5_canplay?(a.load({_oncanplay:d}),f=!1):a.isHTML5||a.loaded||a.readyState&&2===a.readyState||(a.load({onload:d}),f=!1);if(null!==f)return f;a._iO=B()}(!a.instanceCount||a._iO.multiShotEvents||a.isHTML5&&a._iO.multiShot&&!z||!a.isHTML5&&8<m&&!a.getAutoPlay())&&a.instanceCount++; 25a._iO.onposition&&0===a.playState&&r(a);a.playState=1;a.paused=!1;a.position=a._iO.position===g||isNaN(a._iO.position)?0:a._iO.position;a.isHTML5||(a._iO=ga(fa(a._iO)));
25a._iO.onplay&&e&&(a._iO.onplay.apply(a),u=!0);a.setVolume(a._iO.volume,!0);a.setPan(a._iO.pan,!0);a.isHTML5?2>a.instanceCount?(p(),f=a._setup_html5(),a.setPosition(a._iO.position),f.play()):(n=new Audio(a._iO.url),h=function(){t.remove(n,"ended",h);a._onfinish(a);ka(n);n=null},Na=function(){t.remove(n,"canplay",Na);try{n.currentTime= 26a._iO.position/1E3}catch(b){}n.play()},t.add(n,"ended",h),a._iO.volume!==g&&(n.volume=Math.max(0,Math.min(1,a._iO.volume/100))),a.muted&&(n.muted=!0),a._iO.position?t.add(n,"canplay",Na):n.play()):(f=k._start(a.id,a._iO.loops||1,9===m?a.position:a.position/1E3,a._iO.multiShot||!1),9!==m||f||a._iO.onplayerror&&a._iO.onplayerror.apply(a))}return a};this.stop=function(b){var c=a._iO;1===a.playState&&(a._onbufferchange(0),a._resetOnPosition(0),a.paused=!1,a.isHTML5||(a.playState=0),y(),c.to&&a.clearOnPosition(c.to), 27a.isHTML5?a._a&&(b=a.position,a.setPosition(0),a.position=b,a._a.pause(),a.playState=0,a._onTimer(),M()):(k._stop(a.id,b),c.serverURL&&a.unload()),a.instanceCount=0,a._iO={},c.onstop&&c.onstop.apply(a));return a};this.setAutoPlay=function(b){a._iO.autoPlay=b;a.isHTML5||(k._setAutoPlay(a.id,b),b&&(a.instanceCount||1!==a.readyState||a.instanceCount++))};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(b){b===g&&(b=0);var c=a.isHTML5?Math.max(b,0):Math.min(a.duration||a._iO.duration, 28Math.max(b,0));a.position=c;b=a.position/1E3;a._resetOnPosition(a.position);a._iO.position=c;if(!a.isHTML5)b=9===m?a.position:b,a.readyState&&2!==a.readyState&&k._setPosition(a.id,b,a.paused||!a.playState,a._iO.multiShot);else if(a._a){if(a._html5_canplay){if(a._a.currentTime!==b)try{a._a.currentTime=b,(0===a.playState||a.paused)&&a._a.pause()}catch(e){}}else if(b)return a;a.paused&&a._onTimer(!0)}return a};this.pause=function(b){if(a.paused||0===a.playState&&1!==a.readyState)return a;a.paused=!0; 29a.isHTML5?(a._setup_html5().pause(),M()):(b||b===g)&&k._pause(a.id,a._iO.multiShot);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){var b=a._iO;if(!a.paused)return a;a.paused=!1;a.playState=1;a.isHTML5?(a._setup_html5().play(),p()):(b.isMovieStar&&!b.serverURL&&a.setPosition(a.position),k._pause(a.id,b.multiShot));!u&&b.onplay?(b.onplay.apply(a),u=!0):b.onresume&&b.onresume.apply(a);return a};this.togglePause=function(){if(0===a.playState)return a.play({position:9!==m||a.isHTML5? 30a.position/1E3:a.position}),a;a.paused?a.resume():a.pause();return a};this.setPan=function(b,c){b===g&&(b=0);c===g&&(c=!1);a.isHTML5||k._setPan(a.id,b);a._iO.pan=b;c||(a.pan=b,a.options.pan=b);return a};this.setVolume=function(b,e){b===g&&(b=100);e===g&&(e=!1);a.isHTML5?a._a&&(c.muted&&!a.muted&&(a.muted=!0,a._a.muted=!0),a._a.volume=Math.max(0,Math.min(1,b/100))):k._setVolume(a.id,c.muted&&!a.muted||a.muted?0:b);a._iO.volume=b;e||(a.volume=b,a.options.volume=b);return a};this.mute=function(){a.muted= 31!0;a.isHTML5?a._a&&(a._a.muted=!0):k._setVolume(a.id,0);return a};this.unmute=function(){a.muted=!1;var b=a._iO.volume!==g;a.isHTML5?a._a&&(a._a.muted=!1):k._setVolume(a.id,b?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=this.onPosition=function(b,c,e){l.push({position:parseInt(b,10),method:c,scope:e!==g?e:a,fired:!1});return a};this.clearOnPosition=function(a,b){var c;a=parseInt(a,10);if(isNaN(a))return!1;for(c=0;c<l.length;c++)a!== 32l[c].position||b&&b!==l[c].method||(l[c].fired&&v--,l.splice(c,1))};this._processOnPosition=function(){var b,c;b=l.length;if(!b||!a.playState||v>=b)return!1;for(--b;0<=b;b--)c=l[b],!c.fired&&a.position>=c.position&&(c.fired=!0,v++,c.method.apply(c.scope,[c.position]));return!0};this._resetOnPosition=function(a){var b,c;b=l.length;if(!b)return!1;for(--b;0<=b;b--)c=l[b],c.fired&&a<=c.position&&(c.fired=!1,v--);return!0};B=function(){var b=a._iO,c=b.from,e=b.to,d,f;f=function(){a.clearOnPosition(e,f); 33a.stop()};d=function(){if(null!==e&&!isNaN(e))a.onPosition(e,f)};null===c||isNaN(c)||(b.position=c,b.multiShot=!1,d());return b};r=function(){var b,c=a._iO.onposition;if(c)for(b in c)if(c.hasOwnProperty(b))a.onPosition(parseInt(b,10),c[b])};
33y=function(){var b,c=a._iO.onposition;if(c)for(b in c)c.hasOwnProperty(b)&&a.clearOnPosition(parseInt(b,10))};p=function(){a.isHTML5&&Va(a)};M=function(){a.isHTML5&&Wa(a)};f=function(b){b||(l=[],v=0);u=!1;a._hasTimer=null;a._a=null;a._html5_canplay=!1;a.bytesLoaded= 34null;a.bytesTotal=null;a.duration=a._iO&&a._iO.duration?a._iO.duration:null;a.durationEstimate=null;a.buffered=[];a.eqData=[];a.eqData.left=[];a.eqData.right=[];a.failures=0;a.isBuffering=!1;a.instanceOptions={};a.instanceCount=0;a.loaded=!1;a.metadata={};a.readyState=0;a.muted=!1;a.paused=!1;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.playState=0;a.position=null;a.id3={}};f();this._onTimer=function(b){var c,f=!1,g={};if(a._hasTimer||b)return a._a&&(b||(0<a.playState||1===a.readyState)&& 35!a.paused)&&(c=a._get_html5_duration(),c!==e&&(e=c,a.duration=c,f=!0),a.durationEstimate=a.duration,c=1E3*a._a.currentTime||0,c!==d&&(d=c,f=!0),(f||b)&&a._whileplaying(c,g,g,g,g)),f};this._get_html5_duration=function(){var b=a._iO;return(b=a._a&&a._a.duration?1E3*a._a.duration:b&&b.duration?b.duration:null)&&!isNaN(b)&&Infinity!==b?b:null};this._apply_loop=function(a,b){a.loop=1<b?"loop":""};this._setup_html5=function(b){b=x(a._iO,b);var c=z?Oa:a._a,e=decodeURI(b.url),d;z?e===decodeURI(Ea)&&(d=!0): 36e===decodeURI(w)&&(d=!0);if(c){if(c._s)if(z)c._s&&c._s.playState&&!d&&c._s.stop();else if(!z&&e===decodeURI(w))return a._apply_loop(c,b.loops),c;d||(w&&f(!1),c.src=b.url,Ea=w=a.url=b.url,c._called_load=!1)}else b.autoLoad||b.autoPlay?(a._a=new Audio(b.url),a._a.load()):a._a=Ja&&10>opera.version()?new Audio(null):new Audio,c=a._a,c._called_load=!1,z&&(Oa=c);a.isHTML5=!0;a._a=c;c._s=a;n();a._apply_loop(c,b.loops);b.autoLoad||b.autoPlay?a.load():(c.autobuffer=!1,c.preload="auto");return c};n=function(){if(a._a._added_events)return!1; 37var b;a._a._added_events=!0;for(b in C)C.hasOwnProperty(b)&&a._a&&a._a.addEventListener(b,C[b],!1);return!0};h=function(){var b;a._a._added_events=!1;for(b in C)C.hasOwnProperty(b)&&a._a&&a._a.removeEventListener(b,C[b],!1)};this._onload=function(b){var c=!!b||!a.isHTML5&&8===m&&a.duration;a.loaded=c;a.readyState=c?3:2;a._onbufferchange(0);a._iO.onload&&la(a,function(){a._iO.onload.apply(a,[c])});return!0};this._onbufferchange=function(b){if(0===a.playState||b&&a.isBuffering||!b&&!a.isBuffering)return!1; 38a.isBuffering=1===b;a._iO.onbufferchange&&a._iO.onbufferchange.apply(a,[b]);return!0};this._onsuspend=function(){a._iO.onsuspend&&a._iO.onsuspend.apply(a);return!0};this._onfailure=function(b,c,e){a.failures++;if(a._iO.onfailure&&1===a.failures)a._iO.onfailure(b,c,e)};this._onwarning=function(b,c,e){if(a._iO.onwarning)a._iO.onwarning(b,c,e)};this._onfinish=function(){var b=a._iO.onfinish;a._onbufferchange(0);a._resetOnPosition(0);a.instanceCount&&(a.instanceCount--,a.instanceCount||(y(),a.playState= 390,a.paused=!1,a.instanceCount=0,a.instanceOptions={},a._iO={},M(),a.isHTML5&&(a.position=0)),(!a.instanceCount||a._iO.multiShotEvents)&&b&&la(a,function(){b.apply(a)}))};this._whileloading=function(b,c,e,d){var f=a._iO;a.bytesLoaded=b;a.bytesTotal=c;a.duration=Math.floor(e);a.bufferLength=d;a.durationEstimate=a.isHTML5||f.isMovieStar?a.duration:f.duration?a.duration>f.duration?a.duration:f.duration:parseInt(a.bytesTotal/a.bytesLoaded*a.duration,10);a.isHTML5||(a.buffered=[{start:0,end:a.duration}]); 40(3!==a.readyState||a.isHTML5)&&f.whileloading&&f.whileloading.apply(a)};this._whileplaying=function(b,c,e,d,f){var n=a._iO;if(isNaN(b)||null===b)return!1;a.position=Math.max(0,b);a._processOnPosition();!a.isHTML5&&8<m&&(n.usePeakData&&c!==g&&c&&(a.peakData={left:c.leftPeak,right:c.rightPeak}),n.useWaveformData&&e!==g&&e&&(a.waveformData={left:e.split(","),right:d.split(",")}),n.useEQData&&f!==g&&f&&f.leftEQ&&(b=f.leftEQ.split(","),a.eqData=b,a.eqData.left=b,f.rightEQ!==g&&f.rightEQ&&(a.eqData.right= 41f.rightEQ.split(","))));1===a.playState&&(a.isHTML5||8!==m||a.position||!a.isBuffering||a._onbufferchange(0),n.whileplaying&&n.whileplaying.apply(a));return!0};this._oncaptiondata=function(b){a.captiondata=b;a._iO.oncaptiondata&&a._iO.oncaptiondata.apply(a,[b])};this._onmetadata=function(b,c){var e={},d,f;d=0;for(f=b.length;d<f;d++)e[b[d]]=c[d];a.metadata=e;a._iO.onmetadata&&a._iO.onmetadata.call(a,a.metadata)};this._onid3=function(b,c){var e=[],d,f;d=0;for(f=b.length;d<f;d++)e[b[d]]=c[d];a.id3=x(a.id3, 42e);a._iO.onid3&&a._iO.onid3.apply(a)};this._onconnect=function(b){b=1===b;if(a.connected=b)a.failures=0,q(a.id)&&(a.getAutoPlay()?a.play(g,a.getAutoPlay()):a._iO.autoLoad&&a.load()),a._iO.onconnect&&a._iO.onconnect.apply(a,[b])};this._ondataerror=function(b){0<a.playState&&a._iO.ondataerror&&a._iO.ondataerror.apply(a)}};xa=function(){return p.body||p.getElementsByTagName("div")[0]};aa=function(b){return p.getElementById(b)};x=function(b,e){var d=b||{},a,f;a=e===g?c.defaultOptions:e;for(f in a)a.hasOwnProperty(f)&&
43d[f]===g&&(d[f]="object"!==typeof a[f]||null===a[f]?a[f]:x(d[f],a[f]));return d};la=function(b,c){b.isHTML5||8!==m?c():h.setTimeout(c,0)};ba={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1};sa=function(b,e){var d,a=!0,f=e!==g,n=c.setupOptions;for(d in b)if(b.hasOwnProperty(d))if("object"!==typeof b[d]||null===b[d]||b[d]instanceof Array||b[d]instanceof RegExp)f&&ba[e]!==g?c[e][d]=b[d]:n[d]!==g?(c.setupOptions[d]=b[d],c[d]=b[d]):ba[d]===g?a=!1:c[d]instanceof Function?c[d].apply(c, 44b[d]instanceof Array?b[d]:[b[d]]):c[d]=b[d];else if(ba[d]===g)a=!1;else return sa(b[d],d);return a};t=function(){function b(a){a=hb.call(a);var b=a.length;d?(a[1]="on"+a[1],3<b&&a.pop()):3===b&&a.push(!1);return a}function c(b,e){var g=b.shift(),h=[a[e]];if(d)g[h](b[0],b[1]);else g[h].apply(g,b)}var d=h.attachEvent,a={add:d?"attachEvent":"addEventListener",remove:d?"detachEvent":"removeEventListener"};return{add:function(){c(b(arguments),"add")},remove:function(){c(b(arguments),"remove")}}}();C={abort:r(function(){}), 45canplay:r(function(){var b=this._s,c;if(b._html5_canplay)return!0;b._html5_canplay=!0;b._onbufferchange(0);c=b._iO.position===g||isNaN(b._iO.position)?null:b._iO.position/1E3;if(this.currentTime!==c)try{this.currentTime=c}catch(d){}b._iO._oncanplay&&b._iO._oncanplay()}),canplaythrough:r(function(){var b=this._s;b.loaded||(b._onbufferchange(0),b._whileloading(b.bytesLoaded,b.bytesTotal,b._get_html5_duration()),b._onload(!0))}),durationchange:r(function(){var b=this._s,c;c=b._get_html5_duration();isNaN(c)|| 46c===b.duration||(b.durationEstimate=b.duration=c)}),ended:r(function(){this._s._onfinish()}),error:r(function(){this._s._onload(!1)}),loadeddata:r(function(){var b=this._s;b._loaded||ma||(b.duration=b._get_html5_duration())}),loadedmetadata:r(function(){}),loadstart:r(function(){this._s._onbufferchange(1)}),play:r(function(){this._s._onbufferchange(0)}),playing:r(function(){this._s._onbufferchange(0)}),progress:r(function(b){var c=this._s,d,a,f=0,f=b.target.buffered;d=b.loaded||0;var g=b.total||1; 47c.buffered=[];if(f&&f.length){d=0;for(a=f.length;d<a;d++)c.buffered.push({start:1E3*f.start(d),end:1E3*f.end(d)});f=1E3*(f.end(0)-f.start(0));d=Math.min(1,f/(1E3*b.target.duration))}isNaN(d)||(c._whileloading(d,g,c._get_html5_duration()),d&&g&&d===g&&C.canplaythrough.call(this,b))}),ratechange:r(function(){}),suspend:r(function(b){var c=this._s;C.progress.call(this,b);c._onsuspend()}),stalled:r(function(){}),timeupdate:r(function(){this._s._onTimer()}),waiting:r(function(){this._s._onbufferchange(1)})}; 48ja=function(b){return b&&(b.type||b.url||b.serverURL)?b.serverURL||b.type&&Z(b.type)?!1:b.type?Y({type:b.type}):Y({url:b.url})||c.html5Only||b.url.match(/data\:/i):!1};ka=function(b){var e;b&&(e=ma?"about:blank":c.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":"about:blank",b.src=e,b._called_unload!==g&&(b._called_load=!1));z&&(Ea=null);return e};Y=function(b){if(!c.useHTML5Audio||!c.hasHTML5)return!1;var e=b.url||null;b=b.type|| 49null;var d=c.audioFormats,a;if(b&&c.html5[b]!==g)return c.html5[b]&&!Z(b);if(!D){D=[];for(a in d)d.hasOwnProperty(a)&&(D.push(a),d[a].related&&(D=D.concat(d[a].related)));D=new RegExp("\\.("+D.join("|")+")(\\?.*)?$","i")}(a=e?e.toLowerCase().match(D):null)&&a.length?a=a[1]:b&&(e=b.indexOf(";"),a=(-1!==e?b.substr(0,e):b).substr(6));a&&c.html5[a]!==g?e=c.html5[a]&&!Z(a):(b="audio/"+a,e=c.html5.canPlayType({type:b}),e=(c.html5[a]=e)&&c.html5[b]&&!Z(b));return e};Za=function(){function b(a){var b,d=b= 50!1;if(!e||"function"!==typeof e.canPlayType)return b;if(a instanceof Array){h=0;for(b=a.length;h<b;h++)if(c.html5[a[h]]||e.canPlayType(a[h]).match(c.html5Test))d=!0,c.html5[a[h]]=!0,c.flash[a[h]]=!!a[h].match(db);b=d}else a=e&&"function"===typeof e.canPlayType?e.canPlayType(a):!1,b=!(!a||!a.match(c.html5Test));return b}if(!c.useHTML5Audio||!c.hasHTML5)return v=c.html5.usingFlash=!0,!1;var e=Audio!==g?Ja&&10>opera.version()?new Audio(null):new Audio:null,d,a,f={},n,h;n=c.audioFormats;for(d in n)if(n.hasOwnProperty(d)&& 51(a="audio/"+d,f[d]=b(n[d].type),f[a]=f[d],d.match(db)?(c.flash[d]=!0,c.flash[a]=!0):(c.flash[d]=!1,c.flash[a]=!1),n[d]&&n[d].related))for(h=n[d].related.length-1;0<=h;h--)f["audio/"+n[d].related[h]]=f[d],c.html5[n[d].related[h]]=f[d],c.flash[n[d].related[h]]=f[d];f.canPlayType=e?b:null;c.html5=x(c.html5,f);c.html5.usingFlash=Ya();v=c.html5.usingFlash;return!0};J={};T=function(){};fa=function(b){8===m&&1<b.loops&&b.stream&&(b.stream=!1);return b};ga=function(b,c){b&&!b.usePolicyFile&&(b.onid3||b.usePeakData|| 52b.useWaveformData||b.useEQData)&&(b.usePolicyFile=!0);return b};pa=function(){return!1};Ta=function(b){for(var c in b)b.hasOwnProperty(c)&&"function"===typeof b[c]&&(b[c]=pa)};za=function(b){b===g&&(b=!1);(B||b)&&c.disable(b)};Ua=function(b){var e=null;if(b)if(b.match(/\.swf(\?.*)?$/i)){if(e=b.substr(b.toLowerCase().lastIndexOf(".swf?")+4))return b}else b.lastIndexOf("/")!==b.length-1&&(b+="/");b=(b&&-1!==b.lastIndexOf("/")?b.substr(0,b.lastIndexOf("/")+1):"./")+c.movieURL;c.noSWFCache&&(b+="?ts="+ 53(new Date).getTime());return b};va=function(){m=parseInt(c.flashVersion,10);8!==m&&9!==m&&(c.flashVersion=m=8);var b=c.debugMode||c.debugFlash?"_debug.swf":".swf";c.useHTML5Audio&&!c.html5Only&&c.audioFormats.mp4.required&&9>m&&(c.flashVersion=m=9);c.version=c.versionNumber+(c.html5Only?" (HTML5-only mode)":9===m?" (AS3/Flash 9)":" (AS2/Flash 8)");8<m?(c.defaultOptions=x(c.defaultOptions,c.flash9Options),c.features.buffering=!0,c.defaultOptions=x(c.defaultOptions,c.movieStarOptions),c.filePatterns.flash9= 54new RegExp("\\.(mp3|"+fb.join("|")+")(\\?.*)?$","i"),c.features.movieStar=!0):c.features.movieStar=!1;c.filePattern=c.filePatterns[8!==m?"flash9":"flash8"];c.movieURL=(8===m?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",b);c.features.peakData=c.features.waveformData=c.features.eqData=8<m};Sa=function(b,c){if(!k)return!1;k._setPolling(b,c)};
54ya=function(){};q=this.getSoundById;L=function(){var b=[];c.debugMode&&b.push("sm2_debug");c.debugFlash&&b.push("flash_debug");c.useHighPerformance&& 55b.push("high_performance");return b.join(" ")};Ba=function(){T("fbHandler");var b=c.getMoviePercent(),e={type:"FLASHBLOCK"};if(c.html5Only)return!1;c.ok()?c.oMC&&(c.oMC.className=[L(),"movieContainer","swf_loaded"+(c.didFlashBlock?" swf_unblocked":"")].join(" ")):(v&&(c.oMC.className=L()+" movieContainer "+(null===b?"swf_timedout":"swf_error")),c.didFlashBlock=!0,F({type:"ontimeout",ignoreInit:!0,error:e}),K(e))};ta=function(b,c,d){y[b]===g&&(y[b]=[]);y[b].push({method:c,scope:d||null,fired:!1})}; 56F=function(b){b||(b={type:c.ok()?"onready":"ontimeout"});if(!l&&b&&!b.ignoreInit||"ontimeout"===b.type&&(c.ok()||B&&!b.ignoreInit))return!1;var e={success:b&&b.ignoreInit?c.ok():!B},d=b&&b.type?y[b.type]||[]:[],a=[],f,e=[e],g=v&&!c.ok();b.error&&(e[0].error=b.error);b=0;for(f=d.length;b<f;b++)!0!==d[b].fired&&a.push(d[b]);if(a.length)for(b=0,f=a.length;b<f;b++)a[b].scope?a[b].method.apply(a[b].scope,e):a[b].method.apply(this,e),g||(a[b].fired=!0);return!0};H=function(){h.setTimeout(function(){c.useFlashBlock&& 57Ba();F();"function"===typeof c.onload&&c.onload.apply(h);c.waitForWindowLoad&&t.add(h,"load",H)},1)};Fa=function(){if(A!==g)return A;var b=!1,c=navigator,d=c.plugins,a,f=h.ActiveXObject;if(d&&d.length)(c=c.mimeTypes)&&c["application/x-shockwave-flash"]&&c["application/x-shockwave-flash"].enabledPlugin&&c["application/x-shockwave-flash"].enabledPlugin.description&&(b=!0);else if(f!==g&&!u.match(/MSAppHost/i)){try{a=new f("ShockwaveFlash.ShockwaveFlash")}catch(n){a=null}b=!!a}return A=b};Ya=function(){var b, 58e,d=c.audioFormats;Ha&&u.match(/os (1|2|3_0|3_1)\s/i)?(c.hasHTML5=!1,c.html5Only=!0,c.oMC&&(c.oMC.style.display="none")):!c.useHTML5Audio||c.html5&&c.html5.canPlayType||(c.hasHTML5=!1);if(c.useHTML5Audio&&c.hasHTML5)for(e in X=!0,d)d.hasOwnProperty(e)&&d[e].required&&(c.html5.canPlayType(d[e].type)?c.preferFlash&&(c.flash[e]||c.flash[d[e].type])&&(b=!0):(X=!1,b=!0));c.ignoreFlash&&(b=!1,X=!0);c.html5Only=c.hasHTML5&&c.useHTML5Audio&&!b;return!c.html5Only};ia=function(b){var e,d,a=0;if(b instanceof 59Array){e=0;for(d=b.length;e<d;e++)if(b[e]instanceof Object){if(c.canPlayMIME(b[e].type)){a=e;break}}else if(c.canPlayURL(b[e])){a=e;break}b[a].url&&(b[a]=b[a].url);b=b[a]}return b};Va=function(b){b._hasTimer||(b._hasTimer=!0,!na&&c.html5PollingInterval&&(null===V&&0===ha&&(V=setInterval(Xa,c.html5PollingInterval)),ha++))};Wa=function(b){b._hasTimer&&(b._hasTimer=!1,!na&&c.html5PollingInterval&&ha--)};Xa=function(){var b;if(null!==V&&!ha)return clearInterval(V),V=null,!1;for(b=c.soundIDs.length-1;0<= 60b;b--)c.sounds[c.soundIDs[b]].isHTML5&&c.sounds[c.soundIDs[b]]._hasTimer&&c.sounds[c.soundIDs[b]]._onTimer()};K=function(b){b=b!==g?b:{};"function"===typeof c.onerror&&c.onerror.apply(h,[{type:b.type!==g?b.type:null}]);b.fatal!==g&&b.fatal&&c.disable()};$a=function(){if(!bb||!Fa())return!1;var b=c.audioFormats,e,d;for(d in b)if(b.hasOwnProperty(d)&&("mp3"===d||"mp4"===d)&&(c.html5[d]=!1,b[d]&&b[d].related))for(e=b[d].related.length-1;0<=e;e--)c.html5[b[d].related[e]]=!1};this._setSandboxType=function(b){}; 61this._externalInterfaceOK=function(b){if(c.swfLoaded)return!1;c.swfLoaded=!0;oa=!1;bb&&$a();setTimeout(qa,E?100:1)};ea=function(b,e){function d(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(O&&P)return!1;if(c.html5Only)return va(),c.oMC=aa(c.movieID),qa(),P=O=!0,!1;var a=e||c.url,f=c.altURL||a,h=xa(),k=L(),m=null,m=p.getElementsByTagName("html")[0],l,r,q,m=m&&m.dir&&m.dir.match(/rtl/i);b=b===g?c.id:b;va();c.url=Ua(La?a:f);e=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode; 62null!==c.wmode&&(u.match(/msie 8/i)||!E&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(W.push(J.spcWmode),c.wmode=null);h={name:b,id:b,src:e,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:jb+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};c.debugFlash&&(h.FlashVars="debug=1");c.wmode||delete h.wmode;if(E)a=p.createElement("div"),r= 63['<object id="'+b+'" data="'+e+'" type="'+h.type+'" title="'+h.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s
63hockwave/cabs/flash/swflash.cab#version=6,0,40,0">',d("movie",e),d("AllowScriptAccess",c.allowScriptAccess),d("quality",h.quality),c.wmode?d("wmode",c.wmode):"",d("bgcolor",c.bgColor),d("hasPriority","true"),c.debugFlash?d("FlashVars",h.FlashVars):"","</object>"].join("");else for(l in a=p.createElement("embed"),h)h.hasOwnProperty(l)&& 64a.setAttribute(l,h[l]);ya();k=L();if(h=xa())if(c.oMC=aa(c.movieID)||p.createElement("div"),c.oMC.id)q=c.oMC.className,c.oMC.className=(q?q+" ":"movieContainer")+(k?" "+k:""),c.oMC.appendChild(a),E&&(l=c.oMC.appendChild(p.createElement("div")),l.className="sm2-object-box",l.innerHTML=r),P=!0;else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+k;l=k=null;c.useFlashBlock||(c.useHighPerformance?k={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(k={position:"absolute", 65width:"6px",height:"6px",top:"-9999px",left:"-9999px"},m&&(k.left=Math.abs(parseInt(k.left,10))+"px")));ib&&(c.oMC.style.zIndex=1E4);if(!c.debugFlash)for(q in k)k.hasOwnProperty(q)&&(c.oMC.style[q]=k[q]);try{E||c.oMC.appendChild(a),h.appendChild(c.oMC),E&&(l=c.oMC.appendChild(p.createElement("div")),l.className="sm2-object-box",l.innerHTML=r),P=!0}catch(t){throw Error(T("domError")+" \n"+t.toString());}}return O=!0};da=function(){if(c.html5Only)return ea(),!1;if(k||!c.url)return!1;k=c.getMovie(c.id); 66k||(S?(E?c.oMC.innerHTML=Aa:c.oMC.appendChild(S),S=null,O=!0):ea(c.id,c.url),k=c.getMovie(c.id));"function"===typeof c.oninitmovie&&setTimeout(c.oninitmovie,1);return!0};I=function(){setTimeout(Ra,1E3)};ua=function(){h.setTimeout(function(){c.setup({preferFlash:!1}).reboot();c.didFlashBlock=!0;c.beginDelayedInit()},1)};Ra=function(){var b,e=!1;if(!c.url||U)return!1;U=!0;t.remove(h,"load",I);if(A&&oa&&!Ka)return!1;l||(b=c.getMoviePercent(),0<b&&100>b&&(e=!0));setTimeout(function(){b=c.getMoviePercent(); 67if(e)return U=!1,h.setTimeout(I,1),!1;!l&&cb&&(null===b?c.useFlashBlock||0===c.flashLoadTimeout?c.useFlashBlock&&Ba():!c.useFlashBlock&&X?ua():F({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}}):0!==c.flashLoadTimeout&&(!c.useFlashBlock&&X?ua():za(!0)))},c.flashLoadTimeout)};ca=function(){if(Ka||!oa)return t.remove(h,"focus",ca),!0;Ka=cb=!0;U=!1;I();t.remove(h,"focus",ca);return!0};Q=function(b){if(l)return!1;if(c.html5Only)return l=!0,H(),!0;var e=!0,d;c.useFlashBlock&&c.flashLoadTimeout&& 68!c.getMoviePercent()||(l=!0);d={type:!A&&v?"NO_FLASH":"INIT_TIMEOUT"};if(B||b)c.useFlashBlock&&c.oMC&&(c.oMC.className=L()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error")),F({type:"ontimeout",error:d,ignoreInit:!0}),K(d),e=!1;B||(c.waitForWindowLoad&&!ra?t.add(h,"load",H):H());return e};Qa=function(){var b,e=c.setupOptions;for(b in e)e.hasOwnProperty(b)&&(c[b]===g?c[b]=e[b]:c[b]!==e[b]&&(c.setupOptions[b]=c[b]))};qa=function(){if(l)return!1;if(c.html5Only)return l||(t.remove(h,"load", 69c.beginDelayedInit),c.enabled=!0,Q()),!0;da();try{k._externalInterfaceTest(!1),Sa(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||k._disableDebug(),c.enabled=!0,c.html5Only||t.add(h,"unload",pa)}catch(b){return K({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),za(!0),Q(),!1}Q();t.remove(h,"load",c.beginDelayedInit);return!0};G=function(){if(R)return!1;R=!0;Qa();ya();!A&&c.hasHTML5&&c.setup({useHTML5Audio:!0,preferFlash:!1});Za();!A&&v&&(W.push(J.needFlash),c.setup({flashLoadTimeout:1})); 70p.removeEventListener&&p.removeEventListener("DOMContentLoaded",G,!1);da();return!0};Da=function(){"complete"===p.readyState&&(G(),p.detachEvent("onreadystatechange",Da));return!0};wa=function(){ra=!0;G();t.remove(h,"load",wa)};Fa();t.add(h,"focus",ca);t.add(h,"load",I);t.add(h,"load",wa);p.addEventListener?p.addEventListener("DOMContentLoaded",G,!1):p.attachEvent?p.attachEvent("onreadystatechange",Da):K({type:"NO_DOM2_EVENTS",fatal:!0})}if(!h||!h.document)throw Error("SoundManager requires a browser with window and document objects."); 71var N=null;h.SM2_DEFER!==g&&SM2_DEFER||(N=new w);"object"===typeof module&&module&&"object"===typeof module.exports?(module.exports.SoundManager=w,module.exports.soundManager=N):"function"===typeof define&&define.amd&&define(function(){return{constructor:w,getInstance:function(g){!h.soundManager&&g instanceof Function&&(g=g(w),g instanceof w&&(h.soundManager=g));return h.soundManager}}});h.SoundManager=w;h.soundManager=N})(window); 72/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 73"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]}
73,n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={}
73,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s}); 74!function($){window.wp&&window.wp.customize||(window.initHoverFX=function(t,e,
74i){var k,A,C,I,z,S,P;function V(t){return{width:"100%",height:Math.abs(parseFloat($(t).outerHeight(!1)))}}A=$(".contentswap-effect"),P=!0,(C=t).resizeEvent=!!i,function(t){$();A.each(function(){var e,h,i,n,r,o,a,s,t,c,u,l,p,d,f,m,g;if((e=$(this)).unbind(".hoverfx"),e.css({width:"",height:""}),h=function(t){z=$(t).attr("class"),S=z.split(" ");for(var e=0;e<=A.length;e++)for(var i in C)S[e]===i&&(I=i);return C?C[I]:k[I]}(e),i=function(t,e){var i;switch(e){case"overlay":i=$(t).find(".swap-inner");break;case"imageSwap":i=$(t).find(".second-image");break;case"caption":i=$(t).find(".swap-inner")}return i}(e,h.contentType),r=e.find(".initial-image"),n=e.find(".overlay"),h.overlayColor=i.css("background-color"),h.innerColor=i.css("background-color"),i.removeAttr("style"),n.removeAttr("style"),r.removeAttr("style"),u=e,l=(c=r).css("margin-left"),p=c.css("margin-right"),d=c.css("margin-top"),f=c.css("margin-bottom"),m=c.css("float"),c.css({float:"none","margin-left":"0px","margin-right":"0px","margin-top":"0px","margin-bottom":"0px"}),u.css({float:m,"margin-left":l,"margin-right":p,"margin-top":d,"margin-bottom":f}),V(e),s=function(t){var e,i="",n=!1;switch(t.toLowerCase()){case"easeinoutback":e="cubic-bezier(0.680, -0.550, 0.265, 1.550)",n="cubic-bezier(0.680, 0, 0.265, 1)";break;case"quick-in":e="cubic-bezier(0.315, -0.185, 0.000, 1.270)",n="cubic-bezier(0.315, 0, 0.000, 1)";break;case"accelerate":e="cubic-bezier(0.885, 0.420, 0.000, 1.270)",n="cubic-bezier(0.885, 0.420, 0.000, 1)";break;case"super-fast":e="cubic-bezier(0.000, 0.870, 0.000, 0.890)";break;case"ease-in-out-back":e="cubic-bezier(0.680, -0.550, 0.265, 1.550)",n="cubic-bezier(0.680, 0, 0.265, 1)";break;case"ease-in-out-expo":e="cubic-bezier(1.000, 0.000, 0.000, 1.000)";break;case"ease-out-back":e="cubic-bezier(0.175, 0.885, 0.320, 1.275)",n="cubic-bezier(0.175, 0.885, 0.320, 1)";break;case"ease-out-circ":e="cubic-bezier(0.075, 0.820, 0.165, 1.000)";break;case"ease-in-back":e="cubic-bezier(0.600, -0.280, 0.735, 0.045)",n="cubic-bezier(0.600, 0, 0.735, 0.045)";break;case"ease-in-circ":n=e="cubic-bezier(0.600, 0.040, 0.980, 0.335)";break;case"ease":e="ease";break;case"ease-in":e="ease-in";break;case"ease-in-out":e="ease-in-out";break;case"ease-out":e="ease-out"}n&&(e=n);for(var r=["-webkit-","-moz-","-o-",""],o=0;o<r.length;o++)i+=r[o]+"transition-timing-function:"+e+";";return i}(h.effectEasing),o=h.contentType,t=i.find(".swap-icons img"),(g=$(t)).parent().css({width:g.width(),height:g.height()}),a="overlay"==o?"all":"margin",r.css("float","none"),"caption"==o){if(0==e.find(".caption-wrap").length){var v=$("<div />").addClass("caption-wrap overlay");i.wrap(v)}n=e.find(".caption-wrap")}else n=e.find(".overlay");function y(t,e,i,n,r){var o,a,s=e||"all",c=h.effectDelay+"ms",u=s+" "+c;t.css({"-webkit-transition":u,"-moz-transition":u,"-o-transition":u,transition:u}),r&&(a=i,(o=t).attr("style",o.attr("style")+a))}n.add(i).css("display","block"),e.addClass(h.effectType);var b=!1;if(0<r.height()){b=!0;var w=V(r);e.css({width:w.width}),"overlay"==o&&y(i,a,s,h.effectDelay,!0)}r.on("load",function(){var t=V($(this));e.css({width:t.width}),"overlay"==o&&i.css({"margin-top":0,"margin-left":Math.abs(t.width-i.outerWidth())/2}),"overlay"==o&&y(i,a,s,h.effectDelay)}),i.css({"background-color":function(t,e,i){if(-1==t.indexOf("#")||-1<t.indexOf("rgb(")||-1<t.indexOf("rgba"))return{rgba:t};var o;o=e?(e/100).toFixed(2):1,t=(t=function(t){var e=/rgb *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3}) *\)/.exec(t);if(e||(e=/rgba *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3}) *, *(0.+[0-9]) *\)/.exec(t)),!e)return t;if(5!=e.length)return t;var i=Math.round(parseFloat(e[1])),n=Math.round(parseFloat(e[2])),r=Math.round(parseFloat(e[3]));return e[4]&&(o=e[4]),"#"+(i+65536).toString(16).substring(3).toUpperCase()+(n+65536).toString(16).substring(3).toUpperCase()+(r+65536).toString(16).substring(3).toUpperCase()}(t)).replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);function r(t){var e=255*t;return Math.floor(e).toString(16)}if(void 0!==i&&n)switch(P){case!0:i.css("background-color","rgba("+[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)].join(",")+","+o+")");break;case!1:i.css({background:"transparent",filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#"+r(o)+n[0].replace("#","")+",endColorstr=#"+r(o)+n[0].replace("#","")+");",zoom:1})}return n?{rgba:"rgba("+[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)].join(",")+","+o+")",fallback:r(o)+n[0].replace("#","")}:null}(h.overlayColor,h.overlayAlpha).rgba}),"overlay"==o&&y(n,"opacity",s,h.effectDelay,!0);var T,_,x={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return!!(x.Android()||x.BlackBerry()||x.iOS()||x.Opera()||x.Windows()||"ontouchstart"in document)}},E=x.any();if(h.link&&(1==E||e.bind("click.hoverfx",function(){"same"===h.openPage?window.location.assign(h.link):window.open(h.link,"_blank")})),"overlay"==o){e.unbind(".caption"),e.addClass("contentswap-overlay");var w=V(r);0<r.height()&&i.css({"margin-top":0,"margin-left":Math.abs(w.width-i.outerWidth())/2})}"caption"==o&&(e.addClass("caption"),"top"==h.direction?(b?n.css({"margin-top":-i.outerHeight()-1+"px",opacity:1}):setTimeout(function(){n.css({"margin-top":-i.outerHeight()-1+"px",opacity:1})},10),setTimeout(function(){n.insertBefore(r)},10)):setTimeout(function(){n.css({opacity:1})},10),"over"==h.captionType?("top"==h.direction?n.css({position:"absolute","z-index":9991}):n.css({"margin-top":"1px"}),y(n,"margin",s,h.effectDelay,!0),T=function(){n.css({"margin-top":-i.outerHeight()+"px"}),"top"==h.direction&&n.css("margin-top",0)},_=function(){n.css({"margin-top":"0px"}),"top"==h.direction&&n.css("margin-top",-i.outerHeight()+"px")}):(y(n,"margin",s,h.effectDelay,!0),y(r,"margin",s,h.effectDelay,!0),T=function(){var t,e;h.captionHeight<=i.outerHeight()&&(t=h.captionHeight,e=i,"auto"==t&&"undefined"==t||e.css("height",parseInt(t)+"px")),"top"==h.direction&&"over"!=h.captionType?n.css({"margin-top":"0px"}):(n.css({"margin-top":-i.outerHeight()}),r.css({"margin-top":-i.outerHeight(),"margin-bottom":i.outerHeight()}))},_=function(){"top"==h.direction?n.css({"margin-top":-i.outerHeight()-1+"px"}):(n.css({"margin-top":"1px"}),r.css({"margin-top":"0px","margin-bottom":"0px"}))}));1==E?(e.addClass("hover"),"caption"==o&&T()):"caption"==o&&e.bind("mouseenter.hoverfx",T).bind("mouseleave.hoverfx",_)})}()})}(jQuery),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.CountUp=e()}
74(this,function(t,e,i){return function(t,e,i,n,r,o){var a=this;if(a.version=function(){return"1.9.1"},a.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e},formattingFn:function(t){var e,i,n,r;if(t=t.toFixed(a.decimals),e=(t+="").split("."),i=e[0],n=1<e.length?a.options.decimal+e[1]:"",r=/(\d+)(\d{3})/,a.options.useGrouping)for(;r.test(i);)i=i.replace(r,"$1"+a.options.separator+"$2");return a.options.numerals.length&&(i=i.replace(/[0-9]/g,function(t){return a.options.numerals[+t]}),n=n.replace(/[0-9]/g,function(t){return a.options.numerals[+t]})),a.options.prefix+i+n+a.options.suffix},prefix:"",suffix:"",numerals:[],onUpdate:!1},o&&"object"==typeof o)for(var s in a.options)o.hasOwnProperty(s)&&null!==o[s]&&(a.options[s]=o[s]);""===a.options.separator&&(a.options.useGrouping=!1);for(var c=0,u=["webkit","moz","ms","o"],h=0;h<u.length&&!window.requestAnimationFrame;++h)window.requestAnimationFrame=window[u[h]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[u[h]+"CancelAnimationFrame"]||window[u[h]+"CancelRequestAnimationFrame"];function l(t){return"number"==typeof t&&!isNaN(t)}window.requestAnimationFrame||(window.requestAnimationFrame=function(t,e){var i=(new Date).getTime(),n=Math.max(0,16-(i-c)),r=window.setTimeout(function(){t(i+n)},n);return c=i+n,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),a.initialize=function(){return!!a.initialized||(a.error="",a.d="string"==typeof t?document.getElementById(t):t,a.d?(a.startVal=Number(e),a.endVal=Number(i),l(a.startVal)&&l(a.endVal)?(a.decimals=Math.max(0,n||0),a.dec=Math.pow(10,a.decimals),a.duration=1e3*Number(r)||4e3,a.countDown=a.startVal>a.endVal,a.frameVal=a.startVal,a.initialized=!0):(a.error="[CountUp] startVal ("+e+") or endVal ("+i+") is not a number",!1)):!(a.error="[CountUp] target is null or undefined"))},a.printValue=function(t){var e=a.options.formattingFn(t);"INPUT"===a.d.tagName?this.d.value=e:"text"===a.d.tagName||"tspan"===a.d.tagName?this.d.textContent=e:this.d.innerHTML=e},a.count=function(t){a.startTime||(a.startTime=t);var e=(a.timestamp=t)-a.startTime;a.remaining=a.duration-e,a.options.useEasing?a.countDown?a.frameVal=a.startVal-a.options.easingFn(e,0,a.startVal-a.endVal,a.duration):a.frameVal=a.options.easingFn(e,a.startVal,a.endVal-a.startVal,a.duration):a.countDown?a.frameVal=a.startVal-(a.startVal-a.endVal)*(e/a.duration):a.frameVal=a.startVal+(a.endVal-a.startVal)*(e/a.duration),a.countDown?a.frameVal=a.frameVal<a.endVal?a.endVal:a.frameVal:a.frameVal=a.frameVal>a.endVal?a.endVal:a.frameVal,a.frameVal=Math.round(a.frameVal*a.dec)/a.dec,a.printValue(a.frameVal),a.options.onUpdate&&a.options.onUpdate(a.frameVal),e<a.duration?a.rAF=requestAnimationFrame(a.count):a.callback&&a.callback()},a.start=function(t){a.initialize()&&(a.callback=t,a.rAF=requestAnimationFrame(a.count))},a.pauseResume=function(){a.paused?(a.paused=!1,delete a.startTime,a.duration=a.remaining,a.startVal=a.frameVal,requestAnimationFrame(a.count)):(a.paused=!0,cancelAnimationFrame(a.rAF))},a.reset=function(){a.paused=!1,delete a.startTime,a.initialized=!1,a.initialize()&&(cancelAnimationFrame(a.rAF),a.printValue(a.startVal))},a.update=function(t){a.initialize()&&(l(t=Number(t))?(a.error="",t!==a.frameVal&&(cancelAnimationFrame(a.rAF),a.paused=!1,delete a.startTime,a.startVal=a.frameVal,a.endVal=t,a.countDown=a.startVal>a.endVal,a.rAF=requestAnimationFrame(a.count))):a.error="[CountUp] update() - new endVal is not a number: "+t)},a.initialize()&&a.printValue(a.startVal)}}),function(t){function i(t,e){var i=jQuery(t),n=jQuery(".header-homepage.cp-video-bg"),r=n.width(),o=n.height();(r=Math.max(r,o))<16*o/9?r=16/9*o:o=9*r/16;var a=-.5*(r-n.width());i.css({width:r,height:o,opacity:1,left:a})}window.addEventListener("resize",function(){var t=document.querySelector("video#wp-custom-header-video")||document.querySelector("iframe#wp-custom-header-video");t&&i(t)}),jQuery(function(){var t=document.querySelector("video#wp-custom-header-video")||document.querySelector("iframe#wp-custom-header-video");t&&i(t)}),__cpVideoElementFirstPlayed=!1,document.addEventListener("wp-custom-header-video-loaded",function(){var t=document.querySelector("video#wp-custom-header-video");t?i(t):document.querySelector("#wp-custom-header").addEventListener("play",function(){var t=document.querySelector("iframe#wp-custom-header-video"),e=document.querySelector("video#wp-custom-header-video")||t;e&&!__cpVideoElementFirstPlayed&&(__cpVideoElementFirstPlayed=!0,i(e))})})}(jQuery),function(o,s,t,T){"use strict";function c(t,e,i){return setTimeout(r(t,i),e)}function n(t,e,i){return!!Array.isArray(t)&&(a(t,i[e],i),!0)}function a(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==T)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function e(n,t,e){var r="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=o.console&&(o.console.warn||o.console.log);return i&&i.call(o.console,r,e),n.apply(this,arguments)}}function i(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&Z(n,i)}function r(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==tt?t.apply(e&&e[0]||T,e):t}function h(t,e){return t===T?e:t}function l(e,t,i){a(f(t),function(t){e.addEventListener(t,i,!1)})}function p(e,t,i){a(f(t),function(t){e.removeEventListener(t,i,!1)})}function _(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function d(t,e){return-1<t.indexOf(e)}function f(t){return t.trim().split(/\s+/g)}
74function m(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function g(t){return Array.prototype.slice.call(t,0)}function v(t,i,e){for(var n=[],r=[],o=0;o<t.length;){var a=i?t[o][i]:t[o];m(r,a)<0&&n.push(t[o]),r[o]=a,o++}return e&&(n=i?n.sort(function(t,e){return t[i]>e[i]}):n.sort()),n}function y(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),o=0;o<J.length;){if((n=(i=J[o])?i+r:e)in t)return n;o++}return T}function b(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||o}function w(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){u(e.options.enable,[e])&&i.handler(t)},this.init()}function x(t,e,i){var n=i.pointers.length,r=i.changedPointers.length,o=e&dt&&n-r==0,a=e&(ft|mt)&&n-r==0;i.isFirst=!!o,i.isFinal=!!a,o&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,r=n.length;i.firstInput||(i.firstInput=E(e)),1<r&&!i.firstMultiple?i.firstMultiple=E(e):1===r&&(i.firstMultiple=!1);var o=i.firstInput,a=i.firstMultiple,s=a?a.center:o.center,c=e.center=k(n);e.timeStamp=nt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=z(s,c),e.distance=I(s,c),u=i,h=e,l=h.center,p=u.offsetDelta||{},d=u.prevDelta||{},f=u.prevInput||{},h.eventType!==dt&&f.eventType!==ft||(d=u.prevDelta={x:f.deltaX||0,y:f.deltaY||0},p=u.offsetDelta={x:l.x,y:l.y}),h.deltaX=d.x+(l.x-p.x),h.deltaY=d.y+(l.y-p.y),e.offsetDirection=C(e.deltaX,e.deltaY);var u,h,l,p,d,f;var m=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=m.x,e.overallVelocityY=m.y,e.overallVelocity=it(m.x)>it(m.y)?m.x:m.y,e.scale=a?(y=a.pointers,b=n,I(b[0],b[1],kt)/I(y[0],y[1],kt)):1,e.rotation=a?(g=a.pointers,v=n,z(v[1],v[0],kt)+z(g[1],g[0],kt)):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(e.eventType!=mt&&(pt<s||a.velocity===T)){var c=e.deltaX-a.deltaX,u=e.deltaY-a.deltaY,h=A(s,c,u);n=h.x,r=h.y,i=it(h.x)>it(h.y)?h.x:h.y,o=C(c,u),t.lastInterval=e}else i=a.velocity,n=a.velocityX,r=a.velocityY,o=a.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=o}(i,e);var g,v;var y,b;var w=t.element;_(e.srcEvent.target,w)&&(w=e.srcEvent.target),e.target=w}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function E(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:et(t.pointers[i].clientX),clientY:et(t.pointers[i].clientY)},i++;return{timeStamp:nt(),pointers:e,center:k(e),deltaX:t.deltaX,deltaY:t.deltaY}}function k(t){var e=t.length;if(1===e)return{x:et(t[0].clientX),y:et(t[0].clientY)};for(var i=0,n=0,r=0;r<e;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:et(i/e),y:et(n/e)}}function A(t,e,i){return{x:e/t||0,y:i/t||0}}function C(t,e){return t===e?gt:it(t)>=it(e)?t<0?vt:yt:e<0?bt:wt}function I(t,e,i){i||(i=Et);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function z(t,e,i){i||(i=Et);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function S(){this.evEl=Ct,this.evWin=It,this.pressed=!1,w.apply(this,arguments)}function P(){this.evEl=Pt,this.evWin=Vt,w.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,w.apply(this,arguments)}function $(){this.evTarget=Rt,this.targetIds={},w.apply(this,arguments)}function F(){w.apply(this,arguments);var t=r(this.handler,this);this.touch=new $(this.manager,t),this.mouse=new S(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function R(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);-1<t&&n.splice(t,1)},Dt)}}function D(t,e){this.manager=t,this.set(e)}function M(t){this.options=Z({},this.defaults,t||{}),this.id=at++,this.manager=null,this.options.enable=h(this.options.enable,!0),this.state=jt,this.simultaneous={},this.requireFail=[]}function W(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}
74function Y(t){return t==wt?"down":t==bt?"up":t==vt?"left":t==yt?"right":""}function O(t,e){var i=e.manager;return i?i.get(t):t}function N(){M.apply(this,arguments)}function X(){N.apply(this,arguments),this.pX=null,this.pY=null}function H(){N.apply(this,arguments)}function q(){M.apply(this,arguments),this._timer=null,this._input=null}function j(){N.apply(this,arguments)}function U(){N.apply(this,arguments)}function L(){M.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function B(t,e){return(e=e||{}).recognizers=h(e.recognizers,B.defaults.preset),new G(t,e)}function G(t,e){var i;this.options=Z({},B.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(ct?P:ut?$:st?F:S))(i,x),this.touchAction=new D(this,this.options.touchAction),Q(this,!0),a(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Q(i,n){var r,o=i.element;o.style&&(a(i.options.cssProps,function(t,e){r=y(o.style,e),n?(i.oldCssProps[r]=o.style[r],o.style[r]=t):o.style[r]=i.oldCssProps[r]||""}),n||(i.oldCssProps={}))}var Z,J=["","webkit","Moz","MS","ms","o"],K=s.createElement("div"),tt="function",et=Math.round,it=Math.abs,nt=Date.now;Z="function"!=typeof Object.assign?function(t){if(t===T||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==T&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}:Object.assign;var rt=e(function(t,e,i){for(var n=Object.keys(e),r=0;r<n.length;)(!i||i&&t[n[r]]===T)&&(t[n[r]]=e[n[r]]),r++;return t},"extend","Use `assign`."),ot=e(function(t,e){return rt(t,e,!0)},"merge","Use `assign`."),at=1,st="ontouchstart"in o,ct=y(o,"PointerEvent")!==T,ut=st&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ht="touch",lt="mouse",pt=25,dt=1,ft=4,mt=8,gt=1,vt=2,yt=4,bt=8,wt=16,Tt=vt|yt,_t=bt|wt,xt=Tt|_t,Et=["x","y"],kt=["clientX","clientY"];w.prototype={handler:function(){},init:function(){this.evEl&&l(this.element,this.evEl,this.domHandler),this.evTarget&&l(this.target,this.evTarget,this.domHandler),this.evWin&&l(b(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(b(this.element),this.evWin,this.domHandler)}};var At={mousedown:dt,mousemove:2,mouseup:ft},Ct="mousedown",It="mousemove mouseup";i(S,w,{handler:function(t){var e=At[t.type];e&dt&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=ft),this.pressed&&(e&ft&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:lt,srcEvent:t}))}});var zt={pointerdown:dt,pointermove:2,pointerup:ft,pointercancel:mt,pointerout:mt},St={2:ht,3:"pen",4:lt,5:"kinect"},Pt="pointerdown",Vt="pointermove pointerup pointercancel";o.MSPointerEvent&&!o.PointerEvent&&(Pt="MSPointerDown",Vt="MSPointerMove MSPointerUp MSPointerCancel"),i(P,w,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=zt[n],o=St[t.pointerType]||t.pointerType,a=o==ht,s=m(e,t.pointerId,"pointerId");r&dt&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):r&(ft|mt)&&(i=!0),s<0||(e[s]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),i&&e.splice(s,1))}});var $t={touchstart:dt,touchmove:2,touchend:ft,touchcancel:mt};i(V,w,{handler:function(t){var e=$t[t.type];if(e===dt&&(this.started=!0),this.started){var i=function(t,e){var i=g(t.touches),n=g(t.changedTouches);return e&(ft|mt)&&(i=v(i.concat(n),"identifier",!0)),[i,n]}.call(this,t,e);e&(ft|mt)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:ht,srcEvent:t})}}});var Ft={touchstart:dt,touchmove:2,touchend:ft,touchcancel:mt},Rt="touchstart touchmove touchend touchcancel";i($,w,{handler:function(t){var e=Ft[t.type],i=function(t,e){var i=g(t.touches),n=this.targetIds;if(e&(2|dt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,o,a=g(t.changedTouches),s=[],c=this.target;if(o=i.filter(function(t){return _(t.target,c)}),e===dt)for(r=0;r<o.length;)n[o[r].identifier]=!0,r++;for(r=0;r<a.length;)n[a[r].identifier]&&s.push(a[r]),e&(ft|mt)&&delete n[a[r].identifier],r++;return s.length?[v(o.concat(s),"identifier",!0),s]:void 0}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:ht,srcEvent:t})}});var Dt=2500;
74i(F,w,{handler:function(t,e,i){var n=i.pointerType==ht,r=i.pointerType==lt;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)(function(t,e){t&dt?(this.primaryTouch=e.changedPointers[0].identifier,R.call(this,e)):t&(ft|mt)&&R.call(this,e)}).call(this,e,i);else if(r&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],o=Math.abs(e-r.x),a=Math.abs(i-r.y);if(o<=25&&a<=25)return!0}return!1}.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Mt=y(K.style,"touchAction"),Wt=Mt!==T,Yt="compute",Ot="manipulation",Nt="none",Xt="pan-x",Ht="pan-y",qt=function(){if(!Wt)return!1;var e={},i=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){e[t]=!i||o.CSS.supports("touch-action",t)}),e}();D.prototype={set:function(t){t==Yt&&(t=this.compute()),Wt&&this.manager.element.style&&qt[t]&&(this.manager.element.style[Mt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return a(this.manager.recognizers,function(t){u(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(d(t,Nt))return Nt;var e=d(t,Xt),i=d(t,Ht);return e&&i?Nt:e||i?e?Xt:Ht:d(t,Ot)?Ot:"auto"}(e.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(!this.manager.session.prevented){var n=this.actions,r=d(n,Nt)&&!qt[Nt],o=d(n,Ht)&&!qt[Ht],a=d(n,Xt)&&!qt[Xt];if(r){var s=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(s&&c&&u)return}return a&&o?void 0:r||o&&i&Tt||a&&i&_t?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var jt=1;M.prototype={defaults:{},set:function(t){return Z(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(n(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=O(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},dropRecognizeWith:function(t){return n(t,"dropRecognizeWith",this)||(t=O(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(n(t,"requireFailure",this))return this;var e=this.requireFail;return-1===m(e,t=O(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(n(t,"dropRequireFailure",this))return this;t=O(t,this);var e=m(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,n=this.state;n<8&&t(i.options.event+W(n)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),8<=n&&t(i.options.event+W(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=32)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|jt)))return!1;t++}return!0},recognize:function(t){var e=Z({},t);return u(this.options.enable,[this,e])?(56&this.state&&(this.state=jt),this.state=this.process(e),void(30&this.state&&this.tryEmit(e))):(this.reset(),void(this.state=32))},process:function(t){},getTouchAction:function(){},reset:function(){}},i(N,M,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=6&e,r=this.attrTest(t);return n&&(i&mt||!r)?16|e:n||r?i&ft?8|e:2&e?4|e:2:32}}),i(X,N,{defaults:{event:"pan",threshold:10,pointers:1,direction:xt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Tt&&e.push(Ht),t&_t&&e.push(Xt),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,r=t.direction,o=t.deltaX,a=t.deltaY;return r&e.direction||(e.direction&Tt?(r=0===o?gt:o<0?vt:yt,i=o!=this.pX,n=Math.abs(t.deltaX)):(r=0===a?gt:a<0?bt:wt,i=a!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,i&&n>e.threshold&&r&e.direction},attrTest:function(t){return N.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Y(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),i(H,N,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Nt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),i(q,M,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!i||t.eventType&(ft|mt)&&!r)this.reset();else if(t.eventType&dt)this.reset(),this._timer=c(function(){this.state=8,this.tryEmit()},e.time,this);else if(t.eventType&ft)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&ft?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=nt(),this.manager.emit(this.options.event,this._input)))}}),i(j,N,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Nt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),i(U,N,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Tt|_t,pointers:1},getTouchAction:function(){return X.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Tt|_t)?e=t.overallVelocity:i&Tt?e=t.overallVelocityX:i&_t&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&it(e)>this.options.velocity&&t.eventType&ft},emit:function(t){var e=Y(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),i(L,M,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ot]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&dt&&0===this.count)return this.failTimeout();if(n&&r&&i){if(t.eventType!=ft)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||I(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=c(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=c(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),B.VERSION="2.0.8",B.defaults={domEvents:!1,touchAction:Yt,enable:!0,inputTarget:null,inputClass:null,preset:[[j,{enable:!1}],[H,{enable:!1},["rotate"]],[U,{direction:Tt}],[X,{direction:Tt},["swipe"]],[L],[L,{event:"doubletap",taps:2},["tap"]],[q]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};G.prototype={set:function(t){return Z(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,n=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var o=0;o<n.length;)i=n[o],2===e.stopped||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(t),!r&&14&i.state&&(r=e.curRecognizer=i),o++}},get:function(t){if(t instanceof M)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(n(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},remove:function(t){if(n(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=m(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==T&&e!==T){var i=this.handlers;return a(f(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==T){var i=this.handlers;return a(f(t),function(t){e?i[t]&&i[t].splice(m(i[t],e),1):delete i[t]}),this}},emit:function(t,e){var i,n,r;this.options.domEvents&&(i=t,n=e,(r=s.createEvent("Event")).initEvent(i,!0,
74!0),(r.gesture=n).target.dispatchEvent(r));var o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var a=0;a<o.length;)o[a](e),a++}},destroy:function(){this.element&&Q(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},Z(B,{INPUT_START:dt,INPUT_MOVE:2,INPUT_END:ft,INPUT_CANCEL:mt,STATE_POSSIBLE:jt,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:gt,DIRECTION_LEFT:vt,DIRECTION_RIGHT:yt,DIRECTION_UP:bt,DIRECTION_DOWN:wt,DIRECTION_HORIZONTAL:Tt,DIRECTION_VERTICAL:_t,DIRECTION_ALL:xt,Manager:G,Input:w,TouchAction:D,TouchInput:$,MouseInput:S,PointerEventInput:P,TouchMouseInput:F,SingleTouchInput:V,Recognizer:M,AttrRecognizer:N,Tap:L,Pan:X,Swipe:U,Pinch:H,Rotate:j,Press:q,on:l,off:p,each:a,merge:ot,extend:rt,assign:Z,inherit:i,bindFn:r,prefixed:y}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=B,"function"==typeof define&&define.amd?define(function(){return B}):"undefined"!=typeof module&&module.exports?module.exports=B:o.Hammer=B}(window,document),function(v,m,y){"use strict";var u=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;v.fn.backstretch=function(o,a){var s,c=arguments;return 0===v(m).scrollTop()&&m.scrollTo(0,0),this.each(function(t){var e=v(this),i=e.data("backstretch");if(i){if("string"==typeof c[0]&&"function"==typeof i[c[0]]){var n=i[c[0]].apply(i,Array.prototype.slice.call(c,1));return n===i&&(n=y),void(n!==y&&((s=s||[])[t]=n))}a=v.extend(i.options,a),i.hasOwnProperty("destroy")&&i.destroy(!0)}if(!o||o&&0===o.length){var r=e.css("background-image");r&&"none"!==r?o=[{url:e.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:v.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}i=new _(this,o,a||{}),e.data("backstretch",i)}),s?1===s.length?s[0]:s:this},v.backstretch=function(t,e){return v("body").backstretch(t,e).data("backstretch")},v.expr[":"].backstretch=function(t){return v(t).data("backstretch")!==y},v.fn.backstretch.defaults={duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var h,l,p,i,d,f,s={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},g=(h=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],n=e;t[n-1]&&parseInt(t[n-1].width,10)>parseInt(i.width,10);)t[n]=t[n-1],--n;t[n]=i}return t},l=function(t,e,i){for(var n,r,o=m.devicePixelRatio||1,a=z(),s=(S(),t<e?"portrait":e<t?"landscape":"square"),c=0,u=0;u<i.length&&("string"==typeof(r=i[u])&&(r=i[u]={url:r}),r.pixelRatio&&"auto"!==r.pixelRatio&&parseFloat(r.pixelRatio)!==o||r.deviceOrientation&&r.deviceOrientation!==a||r.windowOrientation&&r.windowOrientation!==a||r.orientation&&r.orientation!==s||(c=u,n=t,"auto"===r.pixelRatio&&(t*=o),!(r.width>=n)));u++);return i[Math.min(u,c)]},p=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=p(t[i].src,e):t[i]=p(t[i],e);return t},function(t,e){for(var i=t.width(),n=t.height(),r=[],o=function(t,e){return"width"===e?i:"height"===e?n:t},a=0;a<e.length;a++)if(v.isArray(e[a])){e[a]=h(e[a]);var s=l(i,n,e[a]);r.push(s)}else{"string"==typeof e[a]&&(e[a]={url:e[a]});var c=v.extend({},e[a]);c.url=p(c.url,o),r.push(c)}return r}),b=function(t){return u.test(t.url)||t.isVideo},w=(i=[],d=function(t){for(var e=0;e<i.length;e++)if(i[e].src===t.src)return i[e];return i.push(t),t},f=function(t,e,i){"function"==typeof e&&e.call(t,i)},function t(e,i,n,r,o){if(void 0!==e){v.isArray(e)||(e=[e]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(o=arguments[arguments.length-1]),i="function"!=typeof i&&i?i:0,n="function"==typeof n||!n||n<0?e.length:Math.min(n,e.length),r="function"!=typeof r&&r?r:1,i>
74=e.length&&(n=i=0),r<0&&(r=n),r=Math.min(r,n);var a=e.slice(i+r,n-r);if(e=e.slice(i,r),n=e.length)for(var s,c=0,u=function(){++c===n&&(f(e,o,!a),t(a,0,0,r,o))},h=0;h<e.length;h++)b(e[h])||((s=new Image).src=e[h].url,(s=d(s)).complete?u():v(s).on("load error",u));else f(e,o,!0)}}),c=function(t){for(var e=[],i=0;i<t.length;i++)"string"==typeof t[i]?e.push({url:t[i]}):v.isArray(t[i])?e.push(c(t[i])):e.push(T(t[i]));return e},T=function(t,e){return(t.centeredX||t.centeredY)&&(m.console&&m.console.log&&m.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),t.speed!==y&&(m.console&&m.console.log&&m.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),t.resolutionChangeRatioTreshold!==y&&(m.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),t.fadeFirst!==y&&(t.animateFirst=t.fadeFirst),t.fade!==y&&(t.transitionDuration=t.fade,t.transition="fade"),n(t)},n=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(t.alignX!==y||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(t.alignX!==y||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},_=function(t,e,i){this.options=v.extend({},v.fn.backstretch.defaults,i||{}),this.firstShow=!0,T(this.options,!0),this.images=c(v.isArray(e)?e:[e]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=t===document.body;var n=v(m);this.$container=v(t),this.$root=this.isBody?P?n:v(document):this.$container,this.originalImages=this.images,this.images=g(this.options.alwaysTestWindowResolution?n:this.$root,this.originalImages),w(this.images,this.options.start||0,this.options.preload||1);var r=this.$container.children(".backstretch").first();if(this.$wrap=r.length?r:v('<div class="backstretch"></div>').css(this.options.bypassCss?{}:s.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var o=this.$container.css("position"),a=this.$container.css("zIndex");this.$container.css({position:"static"===o?"relative":o,zIndex:"auto"===a?0:a}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&P?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),n.on("resize.backstretch",v.proxy(this.resize,this)).on("orientationchange.backstretch",v.proxy(function(){this.isBody&&0===m.pageYOffset&&(m.scrollTo(0,1),this.resize())},this))};_.prototype={resize:function(){try{var t=this.options.alwaysTestWindowResolution?v(m):this.$root,e=t.width(),i=t.height(),n=e/(this._lastResizeContainerWidth||0),r=i/(this._lastResizeContainerHeight||0),o=this.options.resolutionChangeRatioThreshold||0;if((e!==this._lastResizeContainerWidth||i!==this._lastResizeContainerHeight)&&(Math.abs(n-1)>=o||isNaN(n)||Math.abs(r-1)>=o||isNaN(r))&&(this._lastResizeContainerWidth=e,this._lastResizeContainerHeight=i,this.images=g(t,this.originalImages),this.options.preload&&w(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var a=this;clearTimeout(a._selectAnotherResolutionTimeout),a._selectAnotherResolutionTimeout=setTimeout(function(){a.show(0)},this.options.resolutionRefreshRate)}var s={left:0,top:0,right:"auto",bottom:"auto"},c=this.isBody?this.$root.width():this.$root.innerWidth(),u=this.isBody?m.innerHeight?m.innerHe
74ight:this.$root.height():this.$root.innerHeight(),h=c,l=h/this.$itemWrapper.data("ratio"),p=v.Event("backstretch.resize",{relatedTarget:this.$container[0]}),d=this._currentImage.alignX===y?this.options.alignX:this._currentImage.alignX,f=this._currentImage.alignY===y?this.options.alignY:this._currentImage.alignY;u<=l?s.top=-(l-u)*f:(((h=(l=u)*this.$itemWrapper.data("ratio"))-c)/2,s.left=-(h-c)*d),this.options.bypassCss||this.$wrap.css({width:c,height:u}).find(">.backstretch-item").not(".deleteable").each(function(){v(this).find("img,video,iframe").css({width:h,height:l}).css(s)}),this.$container.trigger(p,this)}catch(t){}return this},show:function(h,l){if(!(Math.abs(h)>this.images.length-1)){var p=this,d=p.$wrap.find(">.backstretch-item").addClass("deleteable"),f=p.videoWrapper,m={relatedTarget:p.$container[0]};p.$container.trigger(v.Event("backstretch.before",m),[p,h]),this.index=h;var t=p.images[h];clearTimeout(p._cycleTimeout),delete p.videoWrapper;var g=b(t);return g?(p.videoWrapper=new x(t),p.$item=p.videoWrapper.$video.css("pointer-events","none")):p.$item=v("<img />"),p.$itemWrapper=v('<div class="backstretch-item">').append(p.$item),this.options.bypassCss?p.$itemWrapper.css({display:"none"}):(p.$itemWrapper.css(s.itemWrapper),p.$item.css(s.item)),p.$item.bind(g?"canplay":"load",function(t){var e=v(this).parent(),i=e.data("options");l&&(i=v.extend({},i,l));var n=this.naturalWidth||this.videoWidth||this.width,r=this.naturalHeight||this.videoHeight||this.height;e.data("ratio",n/r);var o=function(t){return i[t]!==y?i[t]:p.options[t]},a=o("transition"),s=o("transitionEasing"),c=o("transitionDuration"),u=function(){f&&(f.stop(),f.destroy()),d.remove(),!p.paused&&1<p.images.length&&p.cycle(),p.options.bypassCss||p.isBody||p.$container.css("background-image","none"),v(["after","show"]).each(function(){p.$container.trigger(v.Event("backstretch."+this,m),[p,h])}),g&&p.videoWrapper.play()};p.firstShow&&!p.options.animateFirst||!c||!a?(e.show(),u()):function(t){var e=t.transition||"fade";"string"==typeof e&&-1<e.indexOf("|")&&(e=e.split("|")),e instanceof Array&&(e=e[Math.round(Math.random()*(e.length-1))]);var i=t.new,n=t.old?t.old:v([]);switch(e.toString().toLowerCase()){default:case"fade":i.fadeIn({duration:t.duration,complete:t.complete,easing:t.easing||y});break;case"fadeinout":case"fade_in_out":var r=function(){i.fadeIn({duration:t.duration/2,complete:t.complete,easing:t.easing||y})};n.length?n.fadeOut({duration:t.duration/2,complete:r,easing:t.easing||y}):r();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var o=e.match(/^(cover|push)_?(.*)$/),a="left"===o[2]?"right":"right"===o[2]?"left":"down"===o[2]?"top":"up"===o[2]?"bottom":"right",s={display:""},c={};if(s[a]="-100%",c[a]=0,i.css(s).animate(c,{duration:t.duration,complete:function(){i.css(a,""),t.complete.apply(this,arguments)},easing:t.easing||y}),"push"===o[1]&&n.length){var u={};u[a]="100%",n.animate(u,{duration:t.duration,complete:function(){n.css("display","none")},easing:t.easing||y})}}}({new:e,old:d,transition:a,duration:c,easing:s,complete:u}),p.firstShow=!1,p.resize()}),p.$itemWrapper.appendTo(p.$wrap),p.$item.attr("alt",t.alt||""),p.$itemWrapper.data("options",t),g||p.$item.attr("src",t.url),p._currentImage=t,p}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(1<this.images.length){clearTimeout(this._cycleTimeout);var t=this._currentImage&&this._currentImage.duration||this.options.duration,e=b(this._currentImage),i=function(){this.$item.off(".cycle"),this.paused||this.next()};if(e){if(!this._currentImage.loop){var n=0;this.$item.on("playing.cycle",function(){var t=v(this).data("player");clearTimeout(n),n=setTimeout(function(){t.pause(),t.$video.trigger("ended")},1e3*(t.getDuration()-t.getCurrentTime()))}).on("ended.cycle",function(){clearTimeout(n)})}this.$item.on("error.cycle initerror.cycle",v.proxy(i,this))}e&&!this._currentImage.duration?this.$item.on("ended.cycle",v.proxy(i,this)):this._cycleTimeout=setTimeout(v.proxy(i,this),t)}return this},destroy:function(t){v(m).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),t||this.$wrap.remove(),this.$container.removeData("backstretch")}};var x=function(){this.init.apply(this,arguments)};x.prototype.init=function(t){var e,i=this,n=function(){i.$video=e,i.video=e[0]},r="video";if(t.url instanceof Array||!u.test(t.url)||(r="youtube"),"youtube"===(i.type=r)){x.loadYoutubeAPI(),i.ytId=t.url.match(u)[2];var o="https://www.youtube.com/embed/"+i.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(m.location.origin);i.__ytStartMuted=!!t.mute||t.mute===y,e=v("<iframe />").attr({src_to_load:o}).css({border:0,margin:0,padding:0}).data("player",i),t.loop&&e.on("ended.loop",function(){i.__manuallyStopped||i.play()}),i.ytReady=!1,n(),m.YT?(i._initYoutube(),e.trigger("initsuccess")):v(m).one("youtube_api_load",function(){i._initYoutube(),e.trigger("initsuccess")})}
74else{e=v("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!t.loop).prop("muted",!!t.mute||t.mute===y).prop("preload","auto").prop("poster",t.poster||"");for(var a=t.url instanceof Array?t.url:[t.url],s=0;s<a.length;s++){var c=a[s];"string"==typeof c&&(c={src:c}),v("<source>").attr("src",c.src).attr("type",c.type||null).appendTo(e)}e[0].canPlayType&&a.length?e.trigger("initsuccess"):e.trigger("initerror"),n()}},x.prototype._initYoutube=function(){var e=this,i=m.YT;e.$video.attr("src",e.$video.attr("src_to_load")).removeAttr("src_to_load");var t=!!e.$video[0].parentNode;if(!t){var n=v("<div>").css("display","none !important").appendTo(document.body);e.$video.appendTo(n)}var r=new i.Player(e.video,{events:{onReady:function(){e.__ytStartMuted&&r.mute(),t||(e.$video[0].parentNode===n[0]&&e.$video.detach(),n.remove()),e.ytReady=!0,e._updateYoutubeSize(),e.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case i.PlayerState.PLAYING:e.$video.trigger("playing");break;case i.PlayerState.ENDED:e.$video.trigger("ended");break;case i.PlayerState.PAUSED:e.$video.trigger("pause");break;case i.PlayerState.BUFFERING:e.$video.trigger("waiting");break;case i.PlayerState.CUED:e.$video.trigger("canplay")}},onPlaybackQualityChange:function(){e._updateYoutubeSize(),e.$video.trigger("resize")},onError:function(t){e.hasError=!0,e.$video.trigger({type:"error",error:t})}}});return e.ytPlayer=r,e},x.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},x.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},x.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},x.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},x.prototype.destroy=function(){return this.ytPlayer&&this.ytPlayer.destroy(),this.$video.remove(),this},x.prototype.getCurrentTime=function(t){return"youtube"!==this.type?this.video.currentTime:this.ytReady?this.ytPlayer.getCurrentTime():0},x.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},x.prototype.getDuration=function(){return"youtube"!==this.type?this.video.duration:this.ytReady?this.ytPlayer.getDuration():0},x.loadYoutubeAPI=function(){if(!m.YT){v("script[src*=www\\.youtube\\.com\\/iframe_api]").length||v('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo("body");var t=setInterval(function(){m.YT&&m.YT.loaded&&(v(m).trigger("youtube_api_load"),clearTimeout(t))},50)}};var t,e,r,o,a,E,k,A,C,I,z=function(){if("matchMedia"in m){if(m.matchMedia("(orientation: portrait)").matches)return"portrait";if(m.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"},S=function(){return m.innerHeight>m.innerWidth?"portrait":m.innerWidth>m.innerHeight?"landscape":"square"},P=(t=navigator.userAgent,e=navigator.platform,r=t.match(/AppleWebKit\/([0-9]+)/),o=!!r&&r[1],a=t.match(/Fennec\/([0-9]+)/),E=!!a&&a[1],k=t.match(/Opera Mobi\/([0-9]+)/),A=!!k&&k[1],C=t.match(/MSIE ([0-9]+)/),I=!!C&&C[1],!((-1<e.indexOf("iPhone")||-1<e.indexOf("iPad")||-1<e.indexOf("iPod"))&&o&&o<534||m.operamini&&"[object OperaMini]"==={}.toString.call(m.operamini)||k&&A<7458||-1<t.indexOf("Android")&&o&&o<533||E&&E<6||"palmGetResource"in m&&o&&o<534||-1<t.indexOf("MeeGo")&&-1<t.indexOf("NokiaBrowser/8.5.0")||I&&I<=6))}
74(jQuery,window),function(t,e,i){var s=[],n={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){var i=this;setTimeout(function(){e(i[t])},0)},addTest:function(t,e,i){s.push({name:t,fn:e,options:i})},addAsyncTest:function(t){s.push({name:null,fn:t})}},c=function(){};c.prototype=n,c=new c;var u=[];var r=e.documentElement,o="svg"===r.nodeName.toLowerCase();!function(){var t,e,i,n,r,o;for(var a in s)if(s.hasOwnProperty(a)){if(t=[],(e=s[a]).name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(i=0;i<e.options.aliases.length;i++)t.push(e.options.aliases[i].toLowerCase());for(n="function"==typeof e.fn?e.fn():e.fn,r=0;r<t.length;r++)1===(o=t[r].split(".")).length?c[o[0]]=n:(!c[o[0]]||c[o[0]]instanceof Boolean||(c[o[0]]=new Boolean(c[o[0]])),c[o[0]][o[1]]=n),u.push((n?"":"no-")+o.join("-"))}}(),function(t){var e=r.className,i=c._config.classPrefix||"";if(o&&(e=e.baseVal),c._config.enableJSClass){var n=new RegExp("(^|\\s)"+i+"no-js(\\s|$)");e=e.replace(n,"$1"+i+"js$2")}c._config.enableClasses&&(e+=" "+i+t.join(" "+i),o?r.className.baseVal=e:r.className=e)}(u);for(var a=0;a<c._q.length;a++)c._q[a]();t.Modernizr=c}(window,document),function(t){var i={"contentswap-effect":{effectType:"",contentType:"overlay",overflowEnabled:"false",effectDelay:"800",effectEasing:"Ease",overlayColor:"490A3D",innerColor:"ffffff",openPage:"same",name:"",captionType:"490A3D",operationType:"edit",hasls:"true",additionalWrapperClasses:"",direction:"bottom",useSameTemplate:"true"}};jQuery(document).ready(function(){var e=setTimeout(function(){window.initHoverFX&&initHoverFX(i)},10);jQuery(window).resize(function(t){clearTimeout(e),e=setTimeout(function(){window.initHoverFX&&initHoverFX(i,null,t)},150)})})}(jQuery); 75 ; 76(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?<name>[a-z][-a-z0-9_:]*)(?<array>(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}}
76)))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5<t.length&&t.length<16))))throw new o(this)},c=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?<toplevel>[a-z]+)\/(?<sub>[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>
76t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length<parseInt(this.threshold))throw new o(this)},v=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(parseInt(this.threshold)<e.length)throw new o(this)},g=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&i<parseInt(this.threshold))throw new o(this)},x=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)<i)throw new o(this)},b=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)<parseFloat(this.threshold)))))throw new o(this)},y=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)<parseFloat(t)))))throw new o(this)},A=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&t<this.threshold))))throw new o(this)},z=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold<t))))throw new o(this)},$=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),i<parseInt(this.threshold))throw new o(this)},j=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)<i)throw new o(this)},I=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0<s))return!0;if(!e.every((t=>{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})(); 77(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,
77status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>
77(t.closest(".novalidate")||t.querySelectorAll(":where( input, textarea, select ):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</a>`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>
77{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)}
77)))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})(); 78/*! jQuery UI - v1.14.2 - 2026-07-15 79* https://jqueryui.com 80* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js 81* Copyright OpenJS Foundation and other contributors; Licensed MIT */ 82!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";x.ui=x.ui||{};x.ui.version="1.14.2"; 83/*! 84 * jQuery UI Widget 1.14.2 85 * https://jqueryui.com 86 * 87 * Copyright OpenJS Foundation and other contributors 88 * Released under the MIT license. 89 * https://jquery.org/license 90 */var o,n,W,C,s,r,l,a,h,i,f=0,c=Array.prototype.hasOwnProperty,u=Array.prototype.slice;x.cleanData=(o=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");o(t)}),x.widget=function(t,i,e){var n,o,s,r,l={},a=t.split(".")[0];return"__proto__"===(t=t.split(".")[1])||"constructor"===t?x.error("Invalid widget name: "+t):(r=a+"-"+t,e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[r.toLowerCase()]=function(t){return!!x.data(t,r)},x[a]=x[a]||{},n=x[a][t],o=x[a][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}l[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},l,{constructor:o,namespace:a,widgetName:t,widgetFullName:r}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o)}
vendor: 23,026 bytes, lines 90-137
90,x.widget.extend=function(t){for(var e,i,n=u.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],c.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=u.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=f++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}}),x.widget;function E(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function P(t,e){return parseInt(x.css(t,e),10)||0}function H(t){return null!=t&&t===t.window} 91/*! 92 * jQuery UI Position 1.14.2 93 * https://jqueryui.com 94 * 95 * Copyright OpenJS Foundation and other contributors 96 * Released under the MIT license. 97 * https://jquery.org/license 98 * 99 * https://api.jqueryui.com/position/ 100 */ 101W=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,h=/%$/,i=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=H(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(c){var u,d,p,g,m,v,w,y,b,_,t,e;return c&&c.of?(v="string"==typeof(c=x.extend({},c)).of?x(document).find(c.of):x(c.of),w=x.position.getWithinInfo(c.within),y=x.position.getScrollInfo(w),b=(c.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:H(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(c.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(c[this]||"").split(" ");(i=1===i.length?s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],c[this]=[a.exec(i[0])[0],a.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===c.at[0]?m.left+=d:"center"===c.at[0]&&(m.left+=d/2),"bottom"===c.at[1]?m.top+=p:"center"===c.at[1]&&(m.top+=p/2),u=E(_.at,d,p),m.left+=u[0],m.top+=u[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=P(this,"marginLeft"),n=P(this,"marginTop"),o=l+e+P(this,"marginRight")+y.width,s=a+n+P(this,"marginBottom")+y.height,h=x.extend({},m),f=E(_.my,r.outerWidth(),r.outerHeight());"right"===c.my[0]?h.left-=l:"center"===c.my[0]&&(h.left-=l/2),"bottom"===c.my[1]?h.top-=a:"center"===c.my[1]&&(h.top-=a/2),h.left+=f[0],h.top+=f[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[u[0]+f[0],u[1]+f[1]],my:c.my,at:c.at,within:w,elem:r})}),c.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",c.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):i.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}};var t,e; 102/*! 103 * jQuery UI :data 1.14.2 104 * https://jqueryui.com 105 * 106 * Copyright OpenJS Foundation and other contributors 107 * Released under the MIT license. 108 * https://jquery.org/license 109 */x.ui.position,x.extend(x.expr.pseudos,{data:x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}})}),x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}), 110/*! 111 * jQuery UI Focusable 1.14.2 112 * https://jqueryui.com 113 * 114 * Copyright OpenJS Foundation and other contributors 115 * Released under the MIT license. 116 * https://jquery.org/license 117 */ 118x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&"visible"===x(t).css("visibility"))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.ui.focusable,x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=x(this.element.prop("form")),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}}, 119/*! 120 * jQuery UI Legacy jQuery Core patches 1.14.2 121 * https://jqueryui.com 122 * 123 * Copyright OpenJS Foundation and other contributors 124 * Released under the MIT license. 125 * https://jquery.org/license 126 * 127 */ 128x.escapeSelector||(x.escapeSelector=function(t){return CSS.escape(t+"")}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+CSS.escape(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),x.fn.extend({uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}}}); 129/*! 130 * jQuery UI Datepicker 1.14.2 131 * https://jqueryui.com 132 * 133 * Copyright OpenJS Foundation and other contributors 134 * Released under the MIT license. 135 * https://jquery.org/license 136 */ 137!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode"],e):e(jQuery)}(function(V){"use strict";var n;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=a(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,d)}function d(){V.datepicker._isDisabledDatepicker((n.inline?n.dpDiv.parent():n.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function c(e,t){for(var a in V.extend(e,t),t)null==t[a]&&(e[a]=t[a])}return V.extend(V.ui,{datepicker:{version:"1.14.2"}}),V.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return c(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i=e.nodeName.toLowerCase(),s="div"===i||"span"===i;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(V(e),s)).settings=V.extend({},t||{}),"input"===i?this._connectDatepicker(e,a):s&&this._inlineDatepicker(e,a)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var a=V(e);t.append=V([]),t.trigger=V([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),V.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=V("<span>").addClass(this._appendClass).text(i),e[s?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(i=this._get(t,"buttonText"),a=this._get(t,"buttonImage"),this._get(t,"buttonImageOnly")?t.trigger=V("<img>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):(t.trigger=V("<button type='button'>").addClass(this._triggerClass),a?t.trigger.html(V("<img>").attr({src:a,alt:i,title:i})):t.trigger.text(i)),e[s?"before":"after"](t.trigger),t.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===e[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==e[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,a,i,s,r,n;this._get(e,"autoSize")&&!e.inline&&(r=new Date(2009,11,20),(n=this._get(e,"dateFormat")).match(/[DM]/)&&(r.setMonth((t=function(e){for(s=i=a=0;s<e.length;s++)e[s].length>a&&(a=e[s].length,i=s);return i})(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length))},_inlineDatepicker:function(e,t){var a=V(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),V.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n=this._dialogInst;return n||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>
137"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(n=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",n)),c(n.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(n,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(r=document.documentElement.clientWidth,i=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+t,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",n),this},_destroyDatepicker:function(e){var t,a=V(e),i=V.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),V.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),V.datepicker._hideDatepicker(),n===i)&&(n=null,this._curInst=null)},_enableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(e)for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return V.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,a){var i,s,r=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?V.extend({},V.datepicker._defaults):r?"all"===t?V.extend({},r.settings):this._get(r,t):null;i=t||{},"string"==typeof t&&((i={})[t]=a),r&&(this._curInst===r&&this._hideDatepicker(),t=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(r,"min"),s=this._getMinMaxDate(r,"max"),c(r.settings,i),null!==a&&void 0!==i.dateFormat&&void 0===i.minDate&&(r.settings.minDate=this._formatDate(r,a)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(r.settings.maxDate=this._formatDate(r,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(V(e),r),this._autoSize(r),this._setDate(r,t),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,a,i=V.datepicker._getInst(e.target),s=!0,r=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,V.datepicker._datepickerShowing)switch(e.keyCode){case 9:V.datepicker._hideDatepicker(),s=!1;break;case 13:return(a=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",i.dpDiv))[0]&&V.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,a[0]),(a=V.datepicker._get(i,"onSelect"))?(t=V.datepicker._formatDate(i),a.apply(i.input?i.input[0]:null,[t,i])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&V.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&V.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?V.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,a=V.datepicker._getInst(e.target);if(V.datepicker._get(a,"constrainInput"))return a=V.datepicker._possibleChars(V.datepicker._get(a,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!a||-1<a.indexOf(t)},_doKeyUp:function(e){e=V.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{V.datepicker.parseDate(V.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,V.datepicker._getFormatConfig(e))&&(V.datepicker._setDateFromField(e),V.datepicker._updateAlternate(e),V.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,a,i,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=V("input",e.parentNode)[0]),V.datepicker._isDisabledDatepicker(e)||V.datepicker._lastInput===e||(s=V.datepicker._getInst(e),V.datepicker._curInst&&V.datepicker._curInst!==s&&(V.datepicker._curInst.dpDiv.stop(!0,!0),s)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(a=(a=V.datepicker._get(s,"beforeShow"))?a.apply(e,[e,s]):{}
vendor: 28,682 bytes, lines 137-146
137))||(c(s.settings,a),s.lastVal=null,V.datepicker._lastInput=e,V.datepicker._setDateFromField(s),V.datepicker._inDialog&&(e.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(e),V.datepicker._pos[1]+=e.offsetHeight),t=!1,V(e).parents().each(function(){return!(t|="fixed"===V(this).css("position"))}),a={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(s),a=V.datepicker._checkOffset(s,a,t),s.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":t?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),s.inline)||(a=V.datepicker._get(s,"showAnim"),i=V.datepicker._get(s,"duration"),s.dpDiv.css("z-index",function(e){for(var t;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(e.css("zIndex"),10),!isNaN(t))&&0!==t)return t;e=e.parent()}return 0}(V(e))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[a]?s.dpDiv.show(a,V.datepicker._get(s,"showOptions"),i):s.dpDiv[a||"show"](a?i:null),V.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),V.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(n=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,a=this._getNumberOfMonths(e),i=a[1],s=e.dpDiv.find("."+this._dayOverClass+" a"),r=V.datepicker._get(e,"onUpdateDatepicker");0<s.length&&d.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),t=e.yearshtml=null},0)),r&&r.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")},_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,n=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:V(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:V(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-r:0,t.left-=a&&t.left===e.input.offset().left?V(document).scrollLeft():0,t.top-=a&&t.top===e.input.offset().top+n?V(document).scrollTop():0,t.left-=Math.min(t.left,d<t.left+i&&i<d?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,c<t.top+s&&s<c?Math.abs(s+n):0),t},_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||V.expr.pseudos.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(t=V(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,a,i=this._curInst;!i||e&&i!==V.data(e,"datepicker")||this._datepickerShowing&&(e=this._get(i,"showAnim"),a=this._get(i,"duration"),t=function(){V.datepicker._tidyDialog(i)},V.effects&&V.effects.effect[e]?i.dpDiv.hide(e,V.datepicker._get(i,"showOptions"),a,t):i.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?a:null,t),e||t(),this._datepickerShowing=!1,(a=this._get(i,"onClose"))&&a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;V.datepicker._curInst&&(e=V(e.target),t=V.datepicker._getInst(e[0]),!(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||e.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==t)&&V.datepicker._hideDatepicker()},_adjustDate:function(e,t,a){var e=V(e),i=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(i,t,a),this._updateDatepicker(i))},_gotoToday:function(e){var t,e=V(e),a=this._getInst(e[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(t=new Date,a.selectedDay=t.getDate(),a.drawMonth=a.selectedMonth=t.getMonth(),a.drawYear=a.selectedYear=t.getFullYear()),this._notifyChange(a),this._adjustDate(e)},_selectMonthYear:function(e,t,a){var e=V(e),i=this._getInst(e[0]);i["selected"+("M"===a?"Month":"Year")]=i["draw"+("M"===a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(e)},_selectDay:function(e,t,a,i){var s=V(e);V(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=parseInt(V("a",i).attr("data-date")),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=V(e);this._selectDate(e,"")},_selectDate:function(e,t){var a,e=V(e),e=this._getInst(e[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(a=this._get(e,"onSelect"))?a.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,a,i=this._get(e,"altField");i&&(a=this._get(e,"altFormat")||this._get(e,"dateFormat"),t=this._getDate(e),a=this.formatDate(a,t,this._getFormatConfig(e)),V(document).find(i).val(a))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(var a,i,r=0,n=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,n="string"!=typeof n?n:(new Date).getFullYear()%100+parseInt(n,10),d=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,c=(e?e.dayNames:null)||this._defaults.dayNames,o=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,l=(e?e.monthNames:null)||this._defaults.monthNames,h=-1,u=-1,p=-1,g=-1,_=!1,f=function(e){e=y+1<t.length&&t.charAt(y+1)===e;return e&&y++,e},k=function(e){var t=f(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,e=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=s.substring(r).match(e);if(t)return r+=t[0].length,parseInt(t[0],10);throw"Missing number at position "+r},D=function(e,t,a){var i=-1,e=V.map(f(e)?a:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(V.each(e,function(e,t){var a=t[1];if(s.substr(r,a.length).toLowerCase()===a.toLowerCase())return i=t[0],r+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+r},m=function(){if(s.charAt(r)!==t.charAt(y))throw"Unexpected literal at position "+r;r++},y=0;y<t.length;y++)if(_)"'"!==t.charAt(y)||f("'")?m():_=!1;else switch(t.charAt(y)){case"d":p=k("d");break;case"D":D("D",d,c);break;case"o":g=k("o");break;case"m":u=k("m");break;case"M":u=D("M",o,l);break;case"y":h=k("y");break;case"@":h=(i=new Date(k("@"))).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"!":h=(i=new Date((k("!")-this._ticksTo1970)/1e4)).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"'":f("'")?m():_=!0;break;default:m()}if(r<s.length&&(e=s.substr(r),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===h?h=(new Date).getFullYear():h<100&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=n?0:-100)),-1<g)for(u=1,p=g;;){if(p<=(a=this._getDaysInMonth(h,u-1)))break;u++,p-=a}if((i=this._daylightSavingAdjust(new Date(h,u-1,p))).getFullYear()!==h||i.getMonth()+1!==u||i.getDate()!==p)throw"Invalid date";return i},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";function i(e,t,a){var i=""+t;if(l(e))for(;i.length<a;)i="0"+i;return i}function s(e,t,a,i){return(l(e)?i:a)[t]}var r,n=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,d=(a?a.dayNames:null)||this._defaults.dayNames,c=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,o=(a?a.monthNames:null)||this._defaults.monthNames,l=function(e){e=r+1<t.length&&t.charAt(r+1)===e;return e&&r++,e},h="",u=!1;if(e)for(r=0;r<t.length;r++)if(u)"'"!==t.charAt(r)||l("'")?h+=t.charAt(r):u=!1;else switch(t.charAt(r)){case"d":h+=i("d",e.getDate(),2);break;case"D":h+=s("D",e.getDay(),n,d);break;case"o":h+=i("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=i("m",e.getMonth()+1,2);break;case"M":h+=s("M",e.getMonth(),c,o);break;case"y":h+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":u=!0;break;default:h+=t.charAt(r)}return h},_possibleChars:function(t){for(var e="",a=!1,i=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},s=0;s<t.length;s++)if(a)"'"!==t.charAt(s)||i("'")?e+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":a=!0;break;default:e+=t.charAt(s)}return e},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,n=this._getFormatConfig(e);try{r=this.parseDate(a,i,n)||s}catch(e){i=t?"":i}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=i?r.getDate():0,e.currentMonth=i?r.getMonth():0,e.currentYear=i?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(d,e,t){var a,i=null==e||""===e?t:"string"==typeof e?function(e){try{return V.datepicker.parseDate(V.datepicker._get(d,"dateFormat"),e,V.datepicker._getFormatConfig(d))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?V.datepicker._getDate(d):null)||new Date,a=t.getFullYear(),i=t.getMonth(),s=t.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,n=r.exec(e);n;){switch(n[2]||"d"){case"d":case"D":s+=parseInt(n[1],10);break;case"w":case"W":s+=7*parseInt(n[1],10);break;case"m":case"M":i+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i))}n=r.exec(e)}return new Date(a,i,s)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(a=new Date).setDate(a.getDate()+i),a):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var i=!t,s=e.selectedMonth,r=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){V.datepicker._adjustDate(a,-t,"M")},next:function(){V.datepicker._adjustDate(a,+t,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(a)},selectDay:function(){return V.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(a,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,i,s,r,O,L,R,H,n,d,W,c,o,l,h,u,p,g,_,f,k,E,D,m,U,y,P,z,v,M,b,w=new Date,B=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth(),w.getDate())),C=this._get(e,"isRTL"),w=this._get(e,"showButtonPanel"),I=this._get(e,"hideIfNoPrevNext"),x=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),S=this._get(e,"showCurrentAtPos"),F=this._get(e,"stepMonths"),J=1!==Y[0]||1!==Y[1],N=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),T=this._getMinMaxDate(e,"min"),A=this._getMinMaxDate(e,"max"),K=e.drawMonth-S,j=e.drawYear;if(K<0&&(K+=12,j--),A)for(t=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth()-Y[0]*Y[1]+1,A.getDate())),t=T&&t<T?T:t;this._daylightSavingAdjust(new Date(j,K,1))>t;)--K<0&&(K=11,j--);for(e.drawMonth=K,e.drawYear=j,S=this._get(e,"prevText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K-F,1)),this._getFormatConfig(e)):S,a=this._canAdjustMonth(e,-1,j,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML,S=this._get(e,"nextText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K+F,1)),this._getFormatConfig(e)):S,i=this._canAdjustMonth(e,1,j,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:S}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML,F=this._get(e,"currentText"),I=this._get(e,"gotoCurrent")&&e.currentDay?N:B,F=x?this.formatDate(F,I,this._getFormatConfig(e)):F,S="",e.inline||(S=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),x="",w&&(x=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(C?S:"").append(this._isInRange(e,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(F):"").append(C?"":S)[0].outerHTML),s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,r=this._get(e,"showWeek"),O=this._get(e,"dayNames"),L=this._get(e,"dayNamesMin"),R=this._get(e,"monthNames"),H=this._get(e,"monthNamesShort"),n=this._get(e,"beforeShowDay"),d=this._get(e,"showOtherMonths"),W=this._get(e,"selectOtherMonths"),c=this._getDefaultDate(e),o="",h=0;h<Y[0];h++){for(u="",this.maxRows=4,p=0;p<Y[1];p++){if(g=this._daylightSavingAdjust(new Date(j,K,e.selectedDay)),_=" ui-corner-all",f="",J){if(f+="<div class='ui-datepicker-group",1<Y[1])switch(p){case 0:f+=" ui-datepicker-group-first",_=" ui-corner-"+(C?"right":"left");break;case Y[1]-1:f+=" ui-datepicker-group-last",_=" ui-corner-"+(C?"left":"right");break;default:f+=" ui-datepicker-group-middle",_=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+_+"'>"+(/all|left/.test(_)&&0===h?C?i:a:"")+(/all|right/.test(_)&&0===h?C?a:i:"")+this._generateMonthYearHeader(e,K,j,T,A,0<h||0<p,R,H)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=r?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",l=0;l<7;l++)k+="<th scope='col'"+(5<=(l+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+O[E=(l+s)%7]+"'>"+L[E]+"</span></th>";for(f+=k+"</tr></thead><tbody>",m=this._getDaysInMonth(j,K),j===e.selectedYear&&K===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,m)),D=(this._getFirstDayOfMonth(j,K)-s+7)%7,m=Math.ceil((D+m)/7),U=J&&this.maxRows>m?this.maxRows:m,this.maxRows=U,y=this._daylightSavingAdjust(new Date(j,K,1-D)),P=0;P<U;P++){for(f+="<tr>",z=r?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(y)+"</td>":"",l=0;l<7;l++)v=n?n.apply(e.input?e.input[0]:null,[y]):[!0,""],b=(M=y.getMonth()!==K)&&!W||!v[0]||T&&y<T||A&&A<y,z+="<td class='"+(5<=(l+s+6)%7?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(y.getTime()===g.getTime()&&K===e.selectedMonth&&e._keyEvent||c.getTime()===y.getTime()&&c.getTime()===g.getTime()?" "+this._dayOverClass:"")+(b?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!d?"":" "+v[1]+(y.getTime()===N.getTime()?" "+this._currentClass:"")+(y.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(M&&!d||!v[2]?"":" title='"+v[2].replace(/'/g,"'")+"'")+(b?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(M&&!d?" ":b?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===B.getTime()?" ui-state-highlight":"")+(y.getTime()===N.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===N.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);f+=z+"</tr>"}11<++K&&(K=0,j++),u+=f+="</tbody></table>"+(J?"</div>"+(0<Y[0]&&p===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}o+=u}return o+=x,e._keyEvent=!1,o},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),f=this._get(e,"showMonthAfterYear"),k=this._get(e,"selectMonthLabel"),D=this._get(e,"selectYearLabel"),m="<div class='ui-datepicker-title'>",y="";if(r||!g)y+="<span class='ui-datepicker-month'>"+n[t]+"</span>";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+="<select class='ui-datepicker-month' aria-label='"+k+"' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=i.getMonth())&&(!o||l<=s.getMonth())&&(y+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+d[l]+"</option>");y+="</select>"}if(f||(m+=y+(!r&&g&&_?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!_)m+="<span class='ui-datepicker-year'>"+a+"</span>";else{for(n=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),u=(k=function(e){e=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(e)?h:e})(n[0]),p=Math.max(u,k(n[1]||"")),u=i?Math.max(u,i.getFullYear()):u,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+D+"' data-handler='selectYear' data-event='change'>";u<=p;u++)e.yearshtml+="<option value='"+u+"'"+(u===a?" selected='selected'":"")+">"+u+"</option>";e.yearshtml+="</select>",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),f&&(m+=(!r&&g&&_?"":" ")+y),m+="</div>"},_adjustInstDate:function(e,t,a){var i=e.selectedYear+("Y"===a?t:0),s=e.selectedMonth+("M"===a?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),i=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,t)));e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),a=a&&t<a?a:t;return e&&e<a?e:a},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,i){var s=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(a,i+(t<0?t:s[0]*s[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var a,i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),r=null,n=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),a=(new Date).getFullYear(),r=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(r+=a),e[1].match(/[+\-].*/))&&(n+=a),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!r||t.getFullYear()>=r)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),V.fn.datepicker=function(e){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this].concat(t)):V.datepicker._attachDatepicker(this,e)})},V.datepicker=new e,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.14.2",V.datepicker}); 138/*! 139 * jQuery UI Effects 1.14.2 140 * https://jqueryui.com 141 * 142 * Copyright OpenJS Foundation and other contributors 143 * Released under the MIT license. 144 * https://jquery.org/license 145 */ 146!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery-var-for-color","./vendor/jquery-color/jquery.color","./version"],t):t(jQuery)}(function(u){"use strict";var s,o,r,a,c,e,n,i,f,l,d="ui-effects-",p="ui-effects-style",h="ui-effects-animated";function m(t){for(var e,n=t.ownerDocument.defaultView.getComputedStyle(t),i={},o=n.length;o--;)"string"==typeof n[e=n[o]]&&(i[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=n[e]);return i}function g(t,e,n,i){return t={effect:t=u.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(i=e,n=null,e={}),"number"!=typeof e&&!u.fx.speeds[e]||(i=n,n=e,e={}),"function"==typeof n&&(i=n,n=null),e&&u.extend(t,e),n=n||e.duration,t.duration=u.fx.off?0:"number"==typeof n?n:n in u.fx.speeds?u.fx.speeds[n]:u.fx.speeds._default,t.complete=i||e.complete,t}function v(t){return!t||"number"==typeof t||u.fx.speeds[t]||"string"==typeof t&&!u.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function y(t,e){var n=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,n,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?n:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}return u.effects={effect:{}},a=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},u.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){u.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,e,t.end),t.setAttr=!0)}}),u.effects.animateClass=function(o,t,e,n){var s=u.speed(t,e,n);return this.queue(function(){var n=u(this),t=n.attr("class")||"",e=(e=s.children?n.find("*").addBack():n).map(function(){return{el:u(this),start:m(this)}}),i=function(){u.each(a,function(t,e){o[e]&&n[e+"Class"](o[e])})};i(),e=e.map(function(){return this.end=m(this.el[0]),this.diff=function(t,e){var n,i,o={};for(n in e)i=e[n],t[n]===i||c[n]||!u.fx.step[n]&&isNaN(parseFloat(i))||(o[n]=i);return o}(this.start,this.end),this}),n.attr("class",t),e=e.map(function(){var t=this,e=u.Deferred(),n=u.extend({},s,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,n),e.promise()}),u.when.apply(u,e.get()).done(function(){i(),u.each(arguments,function(){var e=this.el;u.each(this.diff,function(t){e.css(t,"")})}),s.complete.call(n[0])})})},u.fn.extend({addClass:(r=u.fn.addClass,function(t,e,n,i){return e?u.effects.animateClass.call(this,{add:t},e,n,i):r.apply(this,arguments)}),removeClass:(o=u.fn.removeClass,function(t,e,n,i){return 1<arguments.length?u.effects.animateClass.call(this,{remove:t},e,n,i):o.apply(this,arguments)}),toggleClass:(s=u.fn.toggleClass,function(t,e,n,i,o){return"boolean"==typeof e||void 0===e?n?u.effects.animateClass.call(this,e?{add:t}:{remove:t},n,i,o):s.apply(this,arguments):u.effects.animateClass.call(this,{toggle:t},e,n,i)}),switchClass:function(t,e,n,i,o){return u.effects.animateClass.call(this,{add:e,remove:t},n,i,o)}}),u.expr&&u.expr.pseudos&&u.expr.pseudos.animated&&(u.expr.pseudos.animated=(e=u.expr.pseudos.animated,function(t){return!!u(t).data(h)||e(t)})),!0===u.uiBackCompat&&u.extend(u.effects,{save:function(t,e){for(var n=0,i=e.length;n<i;n++)null!==e[n]&&t.data(d+e[n],t[0].style[e[n]])},restore:function(t,e){for(var n,i=0,o=e.length;i<o;i++)null!==e[i]&&(n=t.data(d+e[i]),t.css(e[i],n))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var i={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},t=u("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return n.wrap(t),n[0]!==o&&!u.contains(n[0],o)||u(o).trigger("focus"),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):(u.extend(i,{position:n.css("position"),zIndex:n.css("z-index")}),u.each(["top","left","bottom","right"],function(t,e){i[e]=n.css(e),isNaN(parseInt(i[e],10))&&(i[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(i).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!u.contains(t[0],e)||u(e).trigger("focus")),t}}),u.extend(u.effects,{version:"1.14.2",define:function(t,e,n){return n||(n=e,e="effect"),u.effects.effect[t]=n,u.effects.effect[t].mode=e,n},scaledDimensions:function(t,e,n){var i;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(i="horizontal"!==n?(e||100)/100:1,n="vertical"!==n?(e||100)/100:1,{height:t.height()*n,width:t.width()*i,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*i})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left
146:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();1<e&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data(p,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(p)||"",t.removeData(p)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createPlaceholder:function(t){var e,n=t.css("position"),i=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",e=u("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(d+"placeholder",e)),t.css({position:n,left:i.left,top:i.top}),e},removePlaceholder:function(t){var e=d+"placeholder",n=t.data(e);n&&(n.remove(),t.removeData(e))},cleanUp:function(t){u.effects.restoreStyle(t),u.effects.removePlaceholder(t)},setTransition:function(i,t,o,s){return s=s||{},u.each(t,function(t,e){var n=i.cssUnit(e);0<n[0]&&(s[e]=n[0]*o+n[1])}),s}}),u.fn.extend({effect:function(){function t(t){var e=u(this),n=u.effects.mode(e,a)||s;e.data(h,!0),c.push(n),s&&("show"===n||n===s&&"hide"===n)&&e.show(),s&&"none"===n||u.effects.saveStyle(e),"function"==typeof t&&t()}var i=g.apply(this,arguments),o=u.effects.effect[i.effect],s=o.mode,e=i.queue,n=e||"fx",r=i.complete,a=i.mode,c=[];return u.fx.off||!o?a?this[a](i.duration,r):this.each(function(){r&&r.call(this)}):!1===e?this.each(t).each(f):this.queue(n,t).queue(n,f);function f(t){var e=u(this);function n(){"function"==typeof r&&r.call(e[0]),"function"==typeof t&&t()}i.mode=c.shift(),!0!==u.uiBackCompat||s?"none"===i.mode?(e[a](),n()):o.call(e[0],i,function(){e.removeData(h),u.effects.cleanUp(e),"hide"===i.mode&&e.hide(),n()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),n()):o.call(e[0],i,n)}},show:(f=u.fn.show,function(t){return v(t)?f.apply(this,arguments):((t=g.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(i=u.fn.hide,function(t){return v(t)?i.apply(this,arguments):((t=g.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:(n=u.fn.toggle,function(t){return v(t)||"boolean"==typeof t?n.apply(this,arguments):((t=g.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(t){var n=this.css(t),i=[];return u.each(["em","px","%","pt"],function(t,e){0<n.indexOf(e)&&(i=[parseFloat(n),e])}),i},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):y(this.css("clip"),this)},transfer:function(t,e){var n=u(this),i=u(t.to),o="fixed"===i.css("position"),s=u("body"),r=o?s.scrollTop():0,s=o?s.scrollLeft():0,a=i.offset(),a={top:a.top-r,left:a.left-s,height:i.innerHeight(),width:i.innerWidth()},i=n.offset(),c=u("<div class='ui-effects-transfer'></div>");c.appendTo("body").addClass(t.className).css({top:i.top-r,left:i.left-s,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(a,t.duration,t.easing,function(){c.remove(),"function"==typeof e&&e()})}}),u.fx.step.clip=function(t){t.clipInit||(t.start=u(t.elem).cssClip(),"string"==typeof t.end&&(t.end=y(t.end,t.elem)),t.clipInit=!0),u(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},l={},u.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){l[t]=function(t){return Math.pow(t,e+2)}}),u.extend(l,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),u.each(l,function(t,e){u.easing["easeIn"+t]=e,u.easing["easeOut"+t]=function(t){return 1-e(1-t)},u.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}}),u.effects}); 147jQuery(document).ready(function($){(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){'use strict';Number.isNaN=Number.isNaN||function(value){return typeof value==='number'&&value!==value;};function supportsRange(){var input=document.createElement('input');input.setAttribute('type','range');return input.type!=='text';} 148var pluginName='qis',pluginIdentifier=0,hasInputRangeSupport=supportsRange(),defaults={polyfill:true,orientation:'horizontal',rangeClass:'qis',disabledClass:'qis--disabled',activeClass:'qis--active',horizontalClass:'qis--horizontal',verticalClass:'qis--vertical',fillClass:'qis__fill',handleClass:'qis__handle',startEvent:['mousedown','touchstart','pointerdown'],moveEvent:['mousemove','touchmove','pointermove'],endEvent:['mouseup','touchend','pointerup']},constants={orientation:{horizontal:{dimension:'width',direction:'left',directionStyle:'left',coordinate:'x'},vertical:{dimension:'height',direction:'top',directionStyle:'bottom',coordinate:'y'}}};function delay(fn,wait){var args=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return fn.apply(null,args);},wait);} 149function debounce(fn,debounceDuration){debounceDuration=debounceDuration||100;return function(){if(!fn.debouncing){var args=Array.prototype.slice.apply(arguments);fn.lastReturnVal=fn.apply(window,args);fn.debouncing=true;} 150clearTimeout(fn.debounceTimeout);fn.debounceTimeout=setTimeout(function(){fn.debouncing=false;},debounceDuration);return fn.lastReturnVal;};} 151function isHidden(element){return(element&&(element.offsetWidth===0||element.offsetHeight===0||element.open===false));} 152function getHiddenParentNodes(element){var parents=[],node=element.parentNode;while(isHidden(node)){parents.push(node);node=node.parentNode;} 153return parents;} 154function getDimension(element,key){var hiddenParentNodes=getHiddenParentNodes(element),hiddenParentNodesLength=hiddenParentNodes.length,inlineStyle=[],dimension=element[key];function toggleOpenProperty(element){if(typeof element.open!=='undefined'){element.open=(element.open)?false:true;}} 155if(hiddenParentNodesLength){for(var i=0;i<hiddenParentNodesLength;i++){inlineStyle[i]=hiddenParentNodes[i].style.cssText;if(hiddenParentNodes[i].style.setProperty){hiddenParentNodes[i].style.setProperty('display','block','important');}else{hiddenParentNodes[i].style.cssText+=';display: block !important';} 156hiddenParentNodes[i].style.height='0';hiddenParentNodes[i].style.overflow='hidden';hiddenParentNodes[i].style.visibility='hidden';toggleOpenProperty(hiddenParentNodes[i]);} 157dimension=element[key];for(var j=0;j<hiddenParentNodesLength;j++){hiddenParentNodes[j].style.cssText=inlineStyle[j];toggleOpenProperty(hiddenParentNodes[j]);}} 158return dimension;} 159function tryParseFloat(str,defaultValue){var value=parseFloat(str);return Number.isNaN(value)?defaultValue:value;} 160function ucfirst(str){return str.charAt(0).toUpperCase()+str.substr(1);} 161function Plugin(element,options){this.$window=$(window);this.$document=$(document);this.$element=$(element);this.options=$.extend({},defaults,options);this.polyfill=this.options.polyfill;this.orientation=this.$element[0].getAttribute('data-orientation')||this.options.orientation;this.onInit=this.options.onInit;this.onSlide=this.options.onSlide;this.onSlideEnd=this.options.onSlideEnd;this.DIMENSION=constants.orientation[this.orientation].dimension;this.DIRECTION=constants.orientation[this.orientation].direction;this.DIRECTION_STYLE=constants.orientation[this.orientation].directionStyle;this.COORDINATE=constants.orientation[this.orientation].coordinate;if(this.polyfill){if(hasInputRangeSupport){return false;}} 162this.identifier='js-'+pluginName+'-'+(pluginIdentifier++);this.startEvent=this.options.startEvent.join('.'+this.identifier+' ')+'.'+this.identifier;this.moveEvent=this.options.moveEvent.join('.'+this.identifier+' ')+'.'+this.identifier;this.endEvent=this.options.endEvent.join('.'+this.identifier+' ')+'.'+this.identifier;this.toFixed=(this.step+'').replace('.','').length-1;this.$fill=$('<div class="'+this.options.fillClass+'" />');this.$handle=$('<div class="'+this.options.handleClass+'" />');this.$range=$('<div class="'+this.options.rangeClass+' '+this.options[this.orientation+'Class']+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle);this.$element.css({'position':'absolute','width':'1px','height':'1px','overflow':'hidden','opacity':'0'});this.handleDown=$.proxy(this.handleDown,this);this.handleMove=$.proxy(this.handleMove,this);this.handleEnd=$.proxy(this.handleEnd,this);this.init();var _this=this;this.$window.on('resize.'+this.identifier,debounce(function(){delay(function(){_this.update(false,false);},300);},20));this.$document.on(this.startEvent,'#'+this.identifier+':not(.'+this.options.disabledClass+')',this.handleDown);this.$element.on('change.'+this.identifier,function(e,data){if(data&&data.origin===_this.identifier){return;} 163var value=e.target.value,pos=_this.getPositionFromValue(value);_this.setPosition(pos);});}
164Plugin.prototype.init=function(){this.update(true,false);if(this.onInit&&typeof this.onInit==='function'){this.onInit();}};Plugin.prototype.lock=function(args){this.lockvalue=args[0];} 165Plugin.prototype.unlock=function(){this.lockvalue=-1;} 166Plugin.prototype.update=function(updateAttributes,triggerSlide){updateAttributes=updateAttributes||false;if(updateAttributes){this.min=tryParseFloat(this.$element[0].getAttribute('min'),0);this.max=tryParseFloat(this.$element[0].getAttribute('max'),100);this.value=tryParseFloat(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2));this.step=tryParseFloat(this.$element[0].getAttribute('step'),1);} 167this.handleDimension=getDimension(this.$handle[0],'offset'+ucfirst(this.DIMENSION));this.rangeDimension=getDimension(this.$range[0],'offset'+ucfirst(this.DIMENSION));this.maxHandlePos=this.rangeDimension-this.handleDimension;this.grabPos=this.handleDimension/2;this.position=this.getPositionFromValue(this.value);if(this.$element[0].disabled){this.$range.addClass(this.options.disabledClass);}else{this.$range.removeClass(this.options.disabledClass);} 168this.setPosition(this.position,triggerSlide);};Plugin.prototype.handleDown=function(e){e.preventDefault();this.$document.on(this.moveEvent,this.handleMove);this.$document.on(this.endEvent,this.handleEnd);this.$range.addClass(this.options.activeClass);if((' '+e.target.className+' ').replace(/[\n\t]/g,' ').indexOf(this.options.handleClass)>-1){return;} 169var pos=this.getRelativePosition(e),rangePos=this.$range[0].getBoundingClientRect()[this.DIRECTION],handlePos=this.getPositionFromNode(this.$handle[0])-rangePos,setPos=(this.orientation==='vertical')?(this.maxHandlePos-(pos-this.grabPos)):(pos-this.grabPos);this.setPosition(setPos);if(pos>=handlePos&&pos<handlePos+this.handleDimension){this.grabPos=pos-handlePos;}};Plugin.prototype.handleMove=function(e){e.preventDefault();var pos=this.getRelativePosition(e);var setPos=(this.orientation==='vertical')?(this.maxHandlePos-(pos-this.grabPos)):(pos-this.grabPos);this.setPosition(setPos);};Plugin.prototype.handleEnd=function(e){e.preventDefault();this.$document.off(this.moveEvent,this.handleMove);this.$document.off(this.endEvent,this.handleEnd);this.$range.removeClass(this.options.activeClass);this.$element.trigger('change',{origin:this.identifier});if(this.onSlideEnd&&typeof this.onSlideEnd==='function'){this.onSlideEnd(this.position,this.value);}};Plugin.prototype.cap=function(pos,min,max){if(pos<min){return min;} 170if(pos>max){return max;} 171return pos;};Plugin.prototype.setPosition=function(pos,triggerSlide){var value,newPos;if(triggerSlide===undefined){triggerSlide=true;} 172value=this.getValueFromPosition(this.cap(pos,0,this.maxHandlePos));newPos=this.getPositionFromValue(value);this.$fill[0].style[this.DIMENSION]=(newPos+this.grabPos)+'px';this.$handle[0].style[this.DIRECTION_STYLE]=newPos+'px';this.setValue(value);this.position=newPos;this.value=value;if(triggerSlide&&this.onSlide&&typeof this.onSlide==='function'){this.onSlide(newPos,value);}};Plugin.prototype.getPositionFromNode=function(node){var i=0;while(node!==null){i+=node.offsetLeft;node=node.offsetParent;} 173return i;};Plugin.prototype.getRelativePosition=function(e){var ucCoordinate=ucfirst(this.COORDINATE),rangePos=this.$range[0].getBoundingClientRect()[this.DIRECTION],pageCoordinate=0;if(typeof e.originalEvent['client'+ucCoordinate]!=='undefined'){pageCoordinate=e.originalEvent['client'+ucCoordinate];} 174else if(e.originalEvent.touches&&e.originalEvent.touches[0]&&typeof e.originalEvent.touches[0]['client'+ucCoordinate]!=='undefined'){pageCoordinate=e.originalEvent.touches[0]['client'+ucCoordinate];} 175else if(e.currentPoint&&typeof e.currentPoint[this.COORDINATE]!=='undefined'){pageCoordinate=e.currentPoint[this.COORDINATE];} 176return pageCoordinate-rangePos;};Plugin.prototype.getPositionFromValue=function(value){var percentage,pos;percentage=(value-this.min)/(this.max-this.min);pos=(!Number.isNaN(percentage))?percentage*this.maxHandlePos:0;return pos;};Plugin.prototype.getValueFromPosition=function(pos){var percentage,value;percentage=((pos)/(this.maxHandlePos||1));value=this.step*Math.round(percentage*(this.max-this.min)/this.step)+this.min;return Number((value).toFixed(this.toFixed));};Plugin.prototype.setValue=function(value){if(value===this.value&&this.$element[0].value!==''){return;} 177this.$element.val(value).trigger('input',{origin:this.identifier});};Plugin.prototype.destroy=function(){this.$document.off('.'+this.identifier);this.$window.off('.'+this.identifier);this.$element.off('.'+this.identifier).removeAttr('style').removeData('plugin_'+pluginName);if(this.$range&&this.$range.length){this.$range[0].parentNode.removeChild(this.$range[0]);}};$.fn[pluginName]=function(options){var args=Array.prototype.slice.call(arguments,1
177);return this.each(function(){var $this=$(this),data=$this.data('plugin_'+pluginName);if(!data){$this.data('plugin_'+pluginName,(data=new Plugin(this,options)));} 178if(typeof options==='string'){data[options].apply(data,args);}});};return;}));});function qis_force_decimal(n){if(n.toString().split('.')[1]){return n;} 179return n.toFixed(1);} 180var qis_loan_selector='form.qis_form';var qis_slider_selector='div.range';var qis_hidden_output='input.output-hidden';function qis_adjust_downpayment(p,d){var s1=d.find('input[type=range]'),s2=p.find('input[type=range]');s_min=parseFloat(s1.attr('min')),s_max=parseFloat(s1.attr('max')),s_step=parseFloat(s1.attr('step')),new_value=0;for(var s_i=s_min;s_i<=s_max;s_i+=s_step){if(s_i<=s2.val())new_value=s_i;else{break;}} 181if(s1.val()>new_value){s1.qis('lock',new_value);s1.val(new_value);s1.qis('update');s1.change();return true;}else if(s1.val()<new_value){s1.qis('unlock');} 182return false;} 183function qisDPCalculate(e){var $=jQuery,form=$(e).closest(qis_loan_selector),rates=qis__rates[form.attr('id')],sliders=form.find(qis_slider_selector),p=form.find(qis_slider_selector).filter('.qis-slider-principal'),d=form.find(qis_slider_selector).filter('.qis-slider-downpayment'),principal=parseFloat(p.find('input[type=range]').val())||0,downpayment=parseFloat(d.find('input[type=range]').val())||0,s1=d.find('input[type=range]'),s2=p.find('input[type=range]');if(qis_adjust_downpayment(p,d))return;s2.change();} 184function qisCalculate(e){var $=jQuery,form=$(e).closest(qis_loan_selector),rates=qis__rates[form.attr('id')],sliders=form.find(qis_slider_selector),p=form.find(qis_slider_selector).filter('.qis-slider-principal'),t=form.find(qis_slider_selector).filter('.qis-slider-term'),i=form.find(qis_slider_selector).filter('.qis-slider-interest'),d=form.find(qis_slider_selector).filter('.qis-slider-downpayment'),principal=parseFloat(p.find('input[type=range]').val())||0,term=parseFloat(t.find('input[type=range]').val())||((!rates.periodslider)?rates.periodinitial:0),interest=parseFloat(i.find('input[name=loan-interest]').val())||((!rates.interestslider)?1:0),downpayment=parseFloat(d.find('input[type=range]').val())||0;if(rates.terminterface=='button'){var data=$('.termbutton.selected').attr('rel').split(',');data={'term':data[0],'period':data[1]};rates.period=data.period[0].toUpperCase()+data.period.substring(1);rates.periodlabel=rates.period;rates.singleperiodlabel=rates.periodlabel.substring(0,rates.periodlabel.length-1);term=data.term;} 185var sl=d.find('input[type=range]');var s_min=parseFloat(sl.attr('min')),s_max=parseFloat(sl.attr('max')),s_step=parseFloat(sl.attr('step'));if(principal<=downpayment){if(qis_adjust_downpayment(p,d)){downpayment=d.find('input[type=range]').val();}}else{sl.qis('unlock');} 186if($(this).hasClass("output"))return;var nsl=((rates.nosliderlabel)?true:false);var pP=((parseFloat(p.find('input[type=range]').attr('step'))%1!==0)?qis_force_decimal(principal):principal);p.find('output').html(((!nsl)?rates.cb:'')+pP.toString().qis_separator(rates.separator)+((!nsl)?rates.ca:''));if(rates.textinputs!=='slider'){oX=p.find('.output').eq(0);oX.val(pP.toString());oX.attr('recent',oX.val());rates.textamount=parseFloat(oX.val());} 187var dP=((parseFloat(d.find('input[type=range]').attr('step'))%1!==0)?qis_force_decimal(downpayment):downpayment);d.find('output').html(((!nsl)?rates.cb:'')+dP.toString().qis_separator(rates.separator)+((!nsl)?rates.ca:''));if(rates.textinputs!=='slider'){oX=d.find('.output').eq(0);oX.val(dP.toString());oX.attr('recent',oX.val());rates.textdownpayment=parseFloat(oX.val());} 188var periodlabel=rates.period;if(rates.periodlabel)periodlabel=rates.periodlabel;if(rates.singleperiodlabel&&term==1)periodlabel=rates.singleperiodlabel;t.find('output').text(term+((!nsl)?' '+periodlabel:''));if(rates.textinputs!=='slider'){oX=t.find('.output').eq(0);oX.val(term);oX.attr('recent',oX.val());} 189var iP=((parseFloat(i.find('input[type=range]').attr('step'))%1!==0)?qis_force_decimal(interest):interest);i.find('output').text(iP+((!nsl)?'%':''));if(rates.textinputs!=='slider'){oX=i.find('.output').eq(0);oX.val(iP);oX.attr('recent',oX.val());} 190if(principal==0||term==0||interest==0){qisHideOutputs(form);return;} 191qisShowOutputs(form);
191var R=[],cR=0,generic_R=false;if(rates.interestslider){R[0]={'rate':interest};}else if(rates.interestselector){R[0]={'rate':rates['interestrate'+$('input[name=interestselector]:checked').val()]};}else if(rates.interestdropdown){R[0]={'rate':$('select[name=interestdropdown]').val()};}else{var relevant=[];generic_R=[];generic_R[0]=rates.triggers[0];if(typeof rates.triggers[1]!=='undefined')generic_R[1]=rates.triggers[1];else generic_R=false;for(i in rates.triggers){switch(rates.triggertype){case'periodtrigger':if(rates.triggers[i].trigger<=term)relevant.push(Object.create(rates.triggers[i]));break;case'amounttrigger':if(parseInt(rates.triggers[i].amttrigger)<=principal)relevant.push(Object.create(rates.triggers[i]));break;}} 192relevant.sort(function(a,b){var av,bv;switch(rates.triggertype){case'periodtrigger':av=parseFloat(a.trigger);bv=parseFloat(b.trigger);break;case'amounttrigger':av=parseFloat(a.amttrigger);bv=parseFloat(b.amttrigger);break;} 193if(av>bv)return 1;if(av<bv)return-1;return 0;});var triggered=relevant.pop();R[0]=triggered;if(typeof R[0]=='undefined')R[0]={'rate':0};} 194var outputs=[],generics=[];switch(rates.interesttype){case'compound':outputs.push(qis_compound(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_compound(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_compound(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_compound(term,principal,downpayment,rates,generic_R[1].rate));} 195var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_compound(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_compound(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;break;case'amortization':outputs.push(qis_amortization(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_amortization(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_amortization(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_amortization(term,principal,downpayment,rates,generic_R[1].rate));} 196var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_amortization(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_amortization(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;break;case'amortisation':outputs.push(qis_amortisation(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_amortisation(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_amortisation(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_amortisation(term,principal,downpayment,rates,generic_R[1].rate));} 197var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_amortisation(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_amortisation(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;break;case'fixed':outputs.push(qis_fixed(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_fixed(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_fixed(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_fixed(term,principal,downpayment,rates,generic_R[1].rate));} 198var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_fixed(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_fixed(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;break;case'mambu':outputs.push(qis_mambu(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_mambu(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_mambu(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_mambu(term,principal,downpayment,rates,generic_R[1].rate));} 199var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_mambu(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_mambu(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;break;} 200if(!outputs.length){outputs.push(qis_simple(term,principal,downpayment,rates,R[0].rate));if(R[1]!==undefined)outputs.push(qis_simple(term,principal,downpayment,rates,R[1].rate));if(generic_R){generics.push(qis_simple(term,principal,downpayment,rates,generic_R[0].rate));generics.push(qis_simple(term,principal,downpayment,rates,generic_R[1].rate));} 201var multiplier=rates.multiplier;rates.multiplier=52;var weekly=qis_simple(term,principal,downpayment,rates,R[0].rate);rates.multiplier=12;var monthly=qis_simple(term,principal,downpayment,rates,R[0].rate);rates.multiplier=multiplier;} 202if(rates.adminfeewhen=='afterinterest'){qis_adminfee_after(rates,outputs,principal,term);qis_adminfee_after(rates,generics,principal,term);} 203var cb=rates.cb||'';var ca=rates.ca||'';var payment_date=qis_date_add(new Date(),rates.period,term);if(rates.periodformat=='US'){var payment_date_string=("0"+(payment_date.getMonth()+1)).slice(-2)+rates.dateseperator+("0"+payment_date.getDate()).slice(-2)+rates.dateseperator+payment_date.getFullYear();}else if(rates.periodformat=='monthnum'){var payment_date_string=("0"+payment_date.getDate()).slice(-2)+rates.dateseperator+("0"+(payment_date.getMonth()+1)).slice(-2)+rates.dateseperator+payment_date.getFullYear();}else{var payment_date_string=(payment_date.getDate())+rates.dateseperator+qis_month_name(payment_date,rates)+rates.dateseperator+payment_date.getFullYear();} 204if(rates.usegraph){var principal=principal-downpayment;var total=downpayment+ +principal+ +outputs[cR].processing+ +outputs[cR].interest;var graphd=100*downpayment/total;var graphp=100*principal/total;var graphi=100*outputs[cR].interest/total;var graphf=100*outputs[cR].processing/total;if(rates.adminfeewhen=='beforeinterest'){var leftf=graphp+ +graphd;var lefti=leftf+ +graphf;}else{var lefti=graphp+ +graphd;var leftf=lefti+ +graphi;} 205$('.qisBarProgress1').css({'width':graphd+'%'});$('.qisBarProgress2').css({'left':graphd+'%','width':graphp+'%'});$('.qisBarProgress3').css({'left':lefti+'%','width':graphi+'%'});$('.qisBarProgress4').css({'left':leftf+'%','width':graphf+'%'});} 206if(rates.applynowquery){var addterms=rates.querystructure;var calculatorname=$('#calculatorname').val();console.log(formname);if(addterms.length>0){addterms=addterms.replace('&','&');addterms=addterms.replace('[amount]',principal);addterms=addterms.replace('[term]',term);addterms=addterms.replace('[rate]',R[cR].rate);
206if(formname)addterms=addterms.replace('[calculator]',calculatorname);} 207$('#applybutton').attr("href",rates.applynowaction+addterms);} 208form.find('.interestrate').text(R[cR].rate+'%');form.find('.monthlyrate').text((outputs[cR].monthlyrate*100).toFixed(2)+'%');form.find('.dae').text(R[cR].dae+'%');form.find('.current_interest').html(cb+qis_doubledigit(outputs[cR].interest,rates).qis_separator(rates.separator)+ca);form.find('.final_total').html(cb+qis_doubledigit(outputs[cR].total,rates).qis_rounding(rates)+ca);form.find('.repayment').html((cb+qis_doubledigit(outputs[cR].repayment,rates).qis_separator(rates.separator)+ca));form.find('#repayment').html((cb+qis_doubledigit(outputs[cR].repayment,rates).qis_separator(rates.separator)+ca));form.find('.primary_interest').html((cb+qis_doubledigit(outputs[0].interest,rates).qis_separator(rates.separator)+ca));form.find('.primary_total').html((cb+qis_doubledigit(outputs[0].total,rates).qis_separator(rates.separator)+ca));form.find('.discount').html((cb+qis_doubledigit(outputs[0].discount,rates).qis_separator(rates.separator)+ca));form.find('.principle').html(cb+qis_doubledigit(principal,rates).qis_separator(rates.separator)+ca);if(rates.usedownpaymentslider){form.find('.downpayment').html(cb+qis_doubledigit(downpayment,rates).qis_separator(rates.separator)+ca);}else{form.find('.downpayment').html(cb+qis_doubledigit(outputs[0].down,rates).qis_separator(rates.separator)+ca);} 209form.find('.mitigated').html(cb+qis_doubledigit((principal-outputs[0].down),rates).qis_separator(rates.separator)+ca);form.find('.term').text(term+' '+periodlabel);form.find('.repaymentdate').text(payment_date_string);form.find('.weeks').text(term*52/qis_term(rates));form.find('.years').text(Math.round(R[cR].rate*qis_term(rates))+'%');form.find('.weekly').html(cb+qis_doubledigit(weekly.repayment,rates).qis_separator(rates.separator)+ca);form.find('.monthly').html(cb+qis_doubledigit(monthly.repayment,rates).qis_separator(rates.separator)+ca);form.find('.annual').html(cb+qis_doubledigit((monthly.repayment*12),rates).qis_separator(rates.separator)+ca);form.find('.processing').html(cb+qis_doubledigit(outputs[cR].processing,rates).qis_separator(rates.separator)+ca);if(outputs[1]!==undefined){form.find('.secondary_interest').html((cb+qis_doubledigit(outputs[1].interest,rates).qis_separator(rates.separator)+ca));form.find('.secondary_total').html((cb+qis_doubledigit(outputs[1].total,rates).qis_separator(rates.separator)+ca));} 210if(rates.percentarr&&rates.percentarr.length>0){for(j=0;j<rates.percentarr.length;j++){var k=j+1;form.find('.percentages'+k).html(cb+qis_doubledigit((principal*rates.percentarr[j]/100),rates).qis_separator(rates.separator)+ca);}} 211if(generic_R!==false){form.find('.generic_primary').html((cb+qis_doubledigit(generics[0].total,rates).qis_separator(rates.separator)+ca));form.find('.generic_secondary').html((cb+qis_doubledigit(generics[1].total,rates).qis_separator(rates.separator)+ca));} 212form.find('input[name=repayment]').val(qis_doubledigit(outputs[cR].repayment,rates)) 213form.find('input[name=totalamount]').val(qis_doubledigit(outputs[cR].total,rates)) 214form.find('input[name=rate]').val(R[cR].rate)} 215function qis_month_name(payment_date,rates){var month=payment_date.getMonth();var monthname=rates.shortmonths[month];return monthname;} 216function qis_doubledigit(num,rates){if(rates.decimals=='none')return Math.round(num).toString();var n=num.toFixed(2);if(rates.decimals=='float')return n.replace('.00','');return n;} 217function qis_adminfee(rates,P,T){var termfee=0,adminfee=0;if(rates.adminfee&&rates.adminfeewhen=='beforeinterest'){adminfee=P*(rates.adminfeevalue*.01);if(rates.adminfeetype!='percent'){adminfee=rates.adminfeevalue;}} 218if(rates.termfee&&rates.adminfeewhen=='beforeinterest'){termfee=T*(rates.termfeevalue);adminfee=adminfee+termfee;} 219if(adminfee&&adminfee<rates.adminfeemin&&rates.adminfeemin!=false)adminfee=rates.adminfeemin;if(adminfee&&adminfee>rates.adminfeemax&&rates.adminfeemax!=false)adminfee=rates.adminfeemax;return{'total':P+adminfee,'processing':adminfee};} 220function qis_adminfee_after(rates,outputs,P,T){var adminfee=0,termfee=0;for(i in outputs){if(rates.adminfee&&rates.adminfeewhen=='afterinterest'){adminfee=P*(rates.adminfeevalue*.01);if(rates.adminfeetype!='percent'){adminfee=rates.adminfeevalue;}} 221if(rates.termfee&&rates.adminfeewhen=='afterinterest'){termfee=T*(rates.termfeevalue);adminfee=adminfee+termfee;} 222if(adminfee&&adminfee<rates.adminfeemin&&rates.adminfeemin!=false)adminfee=rates.adminfeemin;if(adminfee&&adminfee>rates.adminfeemax&&rates.adminfeemax!=false)adminfee=rates.adminfeemax;outputs[i].total=outputs[i].total+adminfee;outputs[i].repayment=outputs[i].repayment+adminfee/(T*rates.multiplier);outputs[i].processing=adminfee;}} 223function qis_down_payment(rates,principal,downpaymentslider){var downpayment=0;if(rates['usedownpayment']){if(rates.downpaymentfixed)downpayment+=p
223arseFloat(rates.downpaymentfixed);if(rates.downpaymentpercent)downpayment+=parseFloat((principal*rates.downpaymentpercent)/100);} 224if(rates['usedownpaymentslider']){downpayment+=downpaymentslider;} 225return{'original':principal,'mitigated':principal-downpayment,'down':downpayment};} 226function qis_fixed(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var V=rates.multiplier;var N=V*T;var A=rate;var J=(A*.01);var I=P*J;var R=P+I;var D=I*(rates.discount*.01);R=R-D;var M=R/N;return{'repayment':M,'total':R,'interest':I,'discount':D,'processing':preP.processing,'down':DWN.down};} 227function qis_simple(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var A=rate;var V=rates.multiplier;var N=V*T;var R=P*(1+(A*T/100));var I=R-P;var D=I*(rates.discount*.01);R=R-D;var M=R/N;return{'repayment':M,'total':R,'interest':I,'discount':D,'processing':preP.processing,'down':DWN.down};} 228function qis_compound(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var V=rates.multiplier;var N=V*T;var A=rate;var R=P*Math.pow(1+A/100,T);var I=R-P;var D=I*(rates.discount*.01);R=R-D;var M=R/N;return{'repayment':M,'total':R,'interest':I,'discount':D,'processing':preP.processing,'down':DWN.down};} 229function qis_amortisation(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var V=rates.multiplier;var N=V*T;var C=qis_term(rates);var Q=N/C;var A=rate;var J=Math.pow(1+A*.01,1/V)-1;if(J==0)var M=P/Q;else var M=(J*P)/(1-Math.pow(1+J,-Q));var I=((M*Q)-P)/Q;var D=I*(rates.discount*.01);M=M-D;var R=M*Q;return{'repayment':M,'total':R,'interest':R-P,'discount':D*Q,'processing':preP.processing,'down':DWN.down,monthlyrate:J};} 230function qis_amortization(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var V=rates.multiplier;var N=V*T;var C=qis_term(rates);var Q=N/C;var A=rate;var K=A*.01/V;if(K==0)var M=P/Q;else var M=(K*P)/(1-Math.pow(1+K,-Q));var I=((M*Q)-P)/Q;var D=I*(rates.discount*.01);M=M-D;var R=M*Q;return{'repayment':M,'total':R,'interest':R-P,'discount':D*Q,'processing':preP.processing,'down':DWN.down,monthlyrate:K};} 231function qis_mambu(term,principal,downpayment,rates,rate){var DWN=qis_down_payment(rates,principal,downpayment);var preP=qis_adminfee(rates,DWN.mitigated,term);var P=preP.total;var T=term;var A=rate;var V=rates.multiplier;var N=V*T;var R=P*(1+(A*T/100));var I=P*A*12*T/36500;var R=P+I;var D=I*(rates.discount*.01);R=R-D;var M=R/N;return{'repayment':M,'total':R,'interest':I,'discount':D,'processing':preP.processing,'down':DWN.down};} 232function qis_term(rates){var P=rates.period.toLowerCase();if(P=='years')var C=1;if(P=='months')var C=12;if(P=='weeks')var C=52;if(P=='days')var C=365;return C;} 233function qisManual(event){var $=jQuery,form=$(e).closest(qis_loan_selector),rates=qis__rates[form.attr('id')],e=$(this),p=e.closest('div.range'),v=e.val(),s=p.find('input[type=range]'),min=parseFloat(s.attr('min')),max=parseFloat(s.attr('max')),step=parseFloat(s.attr('step'));rates.textamount=parseFloat(v);var caret=getCaretPosition(this);var preFilter=v.replace(/[^0-9.]/g,'').split('.');var filter=preFilter.shift()+(preFilter.length?'.'+preFilter.join(''):'');e.val(filter);v1=parseFloat(e.val());setCaretPosition(e[0],e.val().length-(String(v).length-caret));} 234function qisTest(){var $=jQuery,form=$(e).closest(qis_loan_selector),rates=qis__rates[form.attr('id')],e=$(this),p=e.closest('div.range'),v=parseFloat(e.val()),s=p.find('input[type=range]'),min=parseFloat(s.attr('min')),max=parseFloat(s.attr('max'));if(qisHasEmpty(form))qisHideOutputs(form);else{if(min>v)e.val(min);if(max<v)e.val(max);qisShowOutputs(form);s.val(e.val());s.change();}} 235function qisHasEmpty(f){var $=jQuery,form=f,rates=qis__rates[form.attr('id')],outputs=form.find('.output'),p=outputs.eq(0),t=outputs.eq(1),principal=parseFloat(p.val())||0,term=parseFloat(t.val())||0;if(principal==0||term==0)return true;return false;} 236function qisHideOutputs(f){f.find('.qis-outputs').hide();} 237function qisShowOutputs(f){f.find('.qis-outputs').show();} 238function getCaretPosition(elemId){var iCaretPos=0;
238if(document.selection){elemId.focus();var oSel=document.selection.createRange();oSel.moveStart('character',-elemId.value.length);iCaretPos=oSel.text.length;} 239else if(elemId.selectionStart||elemId.selectionStart=='0')iCaretPos=elemId.selectionStart;return iCaretPos;} 240function setCaretPosition(elemId,caretPos){var elem=elemId;if(elem!=null){if(elem.createTextRange){var range=elem.createTextRange();range.move('character',caretPos);range.select();} 241else{if(elem.selectionStart){elem.focus();elem.setSelectionRange(caretPos,caretPos);} 242else 243elem.focus();}}} 244var qis__bubble='<output class="rangeslider__value-bubble"></output>';function apply_all(){var $=jQuery;$(".apply").hide("slow");$(".toggle-qis").click(function(event){var aurl=qis_application.ajax_url 245if(!qis_application.hasOwnProperty('loaded')){qis_application['loaded']=true;$.post(qis_application.ajax_url,{'action':'qis_capture_application'},function(data){});} 246$(this).next(".apply").slideToggle("slow");event.preventDefault();return false;});$(qis_loan_selector).each(function(){var sliders=$(this).find('[data-qis]'),x=$(this),manualinputs=$(this).find('input.output');sliders.not('[name=loan-downpayment]').qis({polyfill:false,onSlide:function(position,value){qisCalculate(this.$element);}});sliders.filter('[name=loan-downpayment]').qis({polyfill:false,onSlide:function(position,value){qisDPCalculate(this.$element);}});manualinputs.on('input',qisManual);manualinputs.blur(qisTest);var form=$(this),rates=qis__rates[form.attr('id')],buttons=form.find('.circle-control');x.find('.circle-control').click(function(){var holder=$(this).closest('.range'),range=holder.find('input'),newVal=parseFloat(range.val()),step=parseFloat(range.attr('step')),min=parseFloat(range.attr('min')),max=parseFloat(range.attr('max'));if($(this).hasClass('minus')){newVal=newVal-step;if(newVal>min)range.val(newVal);else range.val(min);}else{newVal=newVal+step;if(newVal<max)range.val(newVal);else range.val(max);} 247range.change();});buttons.filter('.circle-down').click(function(){var range=$(this).closest('.range').find('input[type=range]');var v=parseFloat(range.val());var s=parseFloat(range.attr('step'))||1;var m=parseFloat(range.attr('min'));var n=v-s;if(n<m)range.val(m);else range.val(n);range.change();});buttons.filter('.circle-up').click(function(){var range=$(this).closest('.range').find('input[type=range]');var v=parseFloat(range.val());var s=parseFloat(range.attr('step'))||1;var m=parseFloat(range.attr('max'));var n=v+s;if(n>m)range.val(m);else range.val(n);range.change();});rates.textamount=0;manualinputs.change();sliders.qis({polyfill:false,onInit:function(){if(qis__rates[x.attr('id')].usebubble){x.find('.qis__handle').append(qis__bubble);x.find('.qis-slidercenter').remove();}}});form.find('input[name=interestselector]').change(function(){$(sliders[0]).change();});form.find('select').change(function(){$(sliders[0]).change();});$('.hidethis').hide();$(sliders[0]).change();$('.qis_form').find('input[type=text], input[type=password]').keydown(function(e){if(e.keyCode==13){e.preventDefault();e.stopPropagation();}});form.find('.termbutton').click(function(){$(this).closest('.term-buttons').find('.selected').removeClass('selected');$(this).addClass('selected');$(sliders[0]).change();});});$('.qis-register select').click(function(){if($(this).data('focus')==1){$(this).data('focus',0);$(this).blur();} 248else $(this).data('focus',1);});$('.qis-register select').blur(function(){$(this).data('focus',0);});$('.qis_tooltip_toggle').click(function(e){if($(this).find('.qis_tooltip_body').is(':visible')){$('.qis_tooltip_body').hide("slow");} 249else{$('.qis_tooltip_body').hide("slow");$(this).find('.qis_tooltip_body').show("slow");} 250e.preventDefault();e.stopPropagation();});if(typeof qis_form!='undefined'&&qis_form!='N/A'){var topoffset=qis__rates[qis_form].offset 251$('html, body').animate({scrollTop:$('#qis_reload').offset().top-topoffset},1000);} 252$('body').click(function(){$('.qis_tooltip_body').hide("slow");});$('.qis_label_tiny').find('input, textarea').focus(function(){$(this).closest('.qis_label_tiny').addClass('qis_input_content');});$('.qis_label_tiny').find('input, textarea').blur(function(){if(!$(this).val()){$(this).closest('.qis_label_tiny').removeClass('qis_input_content');}});$('.qis_label_tiny').find('input, textarea').each(function(){if($(this).val()){$(this).closest('.qis_label_tiny').addClass('qis_input_content');}});if(!$('#calculators').data('listener')){$('#calculators').on('change',function(){$('#calculator-container').empty();$('#calculator-failure, #calculator-loading, #calculator-container').hide();$('#calculators').prop('disabled',true);$('#calculator-loading').show();
252$.post(qis_application.ajax_url,{'action':'qis_get_calculator','attributes':{'calculator':$(this).val()}},function(data){if(data.success==true){$('#calculator-failure, #calculator-loading, #calculator-container').hide();$('#calculator-container').html(data.data).show();apply_all();}else{$('#calculator-failure, #calculator-loading, #calculator-container').hide();} 253$('#calculators').prop('disabled',false);},'json');});}} 254jQuery(document).ready(function($){apply_all();});function check(){$=jQuery;$("#filechecking").show();$(".submit").hide();} 255function updateValueBubble(pos,value,context){$=jQuery;pos=pos||context.position;value=value||context.value;var $valueBubble=$('.rangeslider__value-bubble',context.$range);var tempPosition=pos+context.grabPos;var position=(tempPosition<=context.handleDimension)?context.handleDimension:(tempPosition>=context.maxHandlePos)?context.maxHandlePos:tempPosition;if($valueBubble.length){$valueBubble[0].style.left=Math.ceil(position)+'px';$valueBubble[0].innerHTML=value;}} 256function qis_date_add(date,interval,units){units=parseFloat(units);var ret=new Date(date);var checkRollover=function(){if(ret.getDate()!=date.getDate())ret.setDate(0);};switch(interval.toLowerCase()){case'years':ret.setFullYear(ret.getFullYear()+units);checkRollover();break;case'quarters':ret.setMonth(ret.getMonth()+3*units);checkRollover();break;case'months':ret.setMonth(ret.getMonth()+units);checkRollover();break;case'weeks':ret.setDate(ret.getDate()+7*units);break;case'days':ret.setDate(ret.getDate()+units);break;case'hours':ret.setTime(ret.getTime()+units*3600000);break;case'minutes':ret.setTime(ret.getTime()+units*60000);break;case'seconds':ret.setTime(ret.getTime()+units*1000);break;default:ret=undefined;break;} 257return ret;} 258String.prototype.qis_separator=function(sr){if(sr=='none')return this;else if(sr=='apostrophe')var s="'";else if(sr=='dot')var s=".";else if(sr=='comma')var s=",";else var s=' ';var str=this.split('.');if(str[0].length>=4){str[0]=str[0].replace(/(\d)(?=(\d{3})+$)/g,'$1'+s);} 259if(sr=='dot')var decimalsdevider=',';else var decimalsdevider='.';return str.join(decimalsdevider);} 260String.prototype.qis_rounding=function(rates){var rr=rates.rounding;var r=1;if(rr=='tenround')var r=10;if(rr=='hundredround')var r=100;if(rr=='thousandround')var r=1000;if(rr=='noround')var num=this;else var num=Math.round(this/r)*r;var rs=rates.separator;if(rs=='none')return num;if(rs=='apostrophe')var s="'";else if(rs=='dot')var s=".";else if(rs=='comma')var s=",";else var s=' ';var str=num.toString().split('.');if(str[0].length>=4){str[0]=str[0].replace(/(\d)(?=(\d{3})+$)/g,'$1'+s);} 261if(rs=='dot')var decimalsdevider=',';else var decimalsdevider='.';return str.join(decimalsdevider);}; 262!function(t,s,e){"use strict";var i=function(t,s){var i=this;this.el=t,this.options={},Object.keys(o).forEach(function(t){i.options[t]=o[t]}),Object.keys(s).forEach(function(t){i.options[t]=s[t]}),this.isInput="input"===this.el.tagName.toLowerCase(),this.attr=this.options.attr,this.showCursor=!this.isInput&&this.options.showCursor,this.elContent=this.attr?this.el.getAttribute(this.attr):this.el.textContent,this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.fadeOut=this.options.fadeOut,this.fadeOutClass=this.options.fadeOutClass,this.fadeOutDelay=this.options.fadeOutDelay,e&&this.options.stringsElement instanceof e?this.stringsElement=this.options.stringsElement[0]:this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};i.prototype={constructor:i,init:function(){var t=this;t.timeout=setTimeout(function(){for(var s=0;s<t.strings.length;++s)t.sequence[s]=s;t.shuffle&&(t.sequence=t.shuffleArray(t.sequence)),t.typewrite(t.strings[t.sequence[t.arrayPos
262]],t.strPos)},t.startDelay)},build:function(){var t=this;(!0===this.showCursor&&(this.cursor=s.createElement("span"),this.cursor.className="typed-cursor",this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)),this.stringsElement)&&(this.strings=[],this.stringsElement.style.display="none",Array.prototype.slice.apply(this.stringsElement.children).forEach(function(s){t.strings.push(s.innerHTML)}));this.init()},typewrite:function(t,s){if(!0!==this.stop){this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor.classList.remove(this.fadeOutClass));var e=Math.round(70*Math.random())+this.typeSpeed,i=this;i.timeout=setTimeout(function(){var e=0,o=t.substr(s);if("^"===o.charAt(0)){var r=1;/^\^\d+/.test(o)&&(r+=(o=/\d+/.exec(o)[0]).length,e=parseInt(o)),t=t.substring(0,s)+t.substring(s+r)}if("html"===i.contentType){var n=t.substr(s).charAt(0);if("<"===n){var a="";for(a="<"===n?">":";";t.substr(s+1).charAt(0)!==a&&(t.substr(s).charAt(0),!(++s+1>t.length)););s++,a}}i.timeout=setTimeout(function(){if(s===t.length){if(i.options.onStringTyped(i.arrayPos),i.arrayPos===i.strings.length-1&&(i.options.callback(),i.curLoop++,!1===i.loop||i.curLoop===i.loopCount))return;i.timeout=setTimeout(function(){i.backspace(t,s)},i.backDelay)}else{0===s&&i.options.preStringTyped(i.arrayPos);var e=t.substr(0,s+1);i.attr?i.el.setAttribute(i.attr,e):i.isInput?i.el.value=e:"html"===i.contentType?i.el.innerHTML=e:i.el.textContent=e,s++,i.typewrite(t,s)}},e)},e)}},backspace:function(t,s){var e=this;if(!0!==this.stop)if(this.fadeOut)this.initFadeOut();else{var i=Math.round(70*Math.random())+this.backSpeed;e.timeout=setTimeout(function(){if("html"===e.contentType&&">"===t.substr(s).charAt(0)){for(;"<"!==t.substr(s-1).charAt(0)&&(t.substr(s).charAt(0),!(--s<0)););s--,"<"}var i=t.substr(0,s);e.replaceText(i),s>e.stopNum?(s--,e.backspace(t,s)):s<=e.stopNum&&(e.arrayPos++,e.arrayPos===e.strings.length?(e.arrayPos=0,e.shuffle&&(e.sequence=e.shuffleArray(e.sequence)),e.init()):e.typewrite(e.strings[e.sequence[e.arrayPos]],s))},i)}},initFadeOut:function(){return self=this,this.el.className+=" "+this.fadeOutClass,this.cursor.className+=" "+this.fadeOutClass,setTimeout(function(){self.arrayPos++,self.replaceText(""),self.typewrite(self.strings[self.sequence[self.arrayPos]],0)},self.fadeOutDelay)},replaceText:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t},shuffleArray:function(t){var s,e,i=t.length;if(i)for(;--i;)s=t[e=Math.floor(Math.random()*(i+1))],t[e]=t[i],t[i]=s;return t},reset:function(){clearInterval(this.timeout);this.el.getAttribute("id");this.el.textContent="",void 0!==this.cursor&&void 0!==this.cursor.parentNode&&this.cursor.parentNode.removeChild(this.cursor),this.strPos=0,this.arrayPos=0,this.curLoop=0,this.options.resetCallback()}},i.new=function(t,e){Array.prototype.slice.apply(s.querySelectorAll(t)).forEach(function(t){var s=t._typed,o="object"==typeof e&&e;s&&s.reset(),t._typed=s=new i(t,o),"string"==typeof e&&s[e]()})},e&&(e.fn.typed=function(t){return this.each(function(){var s=e(this),o=s.data("typed"),r="object"==typeof t&&t;o&&o.reset(),s.data("typed",o=new i(this,r)),"string"==typeof t&&o[t]()})}),t.Typed=i;var o={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback:function(){},preStringTyped:function(){},onStringTyped:function(){},resetCallback:function(){}}}(window,document,window.jQuery); 263(()=>{var n={243(n,t,r){n=r.nmd(n),function(){var r,e="Expected a function",u="__lodash_hash_undefined__",i="__lodash_placeholder__",o=32,f=128,a=1/0,c=9007199254740991,l=NaN,s=4294967295,h=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",o],["partialRight",64],["rearg",256]],p="[object Arguments]",v="[object Array]",_="[object Boolean]",g="[object Date]",y="[object Error]",d="[object Function]",b="[object GeneratorFunction]",w="[object Map]",m="[object Number]",x="[object Object]",j="[object Promise]",A="[object RegExp]",k="[object Set]",O="[object String]",E="[object Symbol]",I="[object WeakMap]",R="[object ArrayBuffer]",S="[object DataView]",z="[object Float32Array]",T="[object Float64Array
vendor: 5,155 bytes, line 263
263]",C="[object Int8Array]",L="[object Int16Array]",W="[object Int32Array]",U="[object Uint8Array]",B="[object Uint8ClampedArray]",$="[object Uint16Array]",D="[object Uint32Array]",M=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp(P.source),K=RegExp(q.source),V=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,nn=RegExp(X.source),tn=/^\s+/,rn=/\s/,en=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,un=/\{\n\/\* \[wrapped with (.+)\] \*/,on=/,? & /,fn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,an=/[()=,{}\[\]\/\s]/,cn=/\\(\\)?/g,ln=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sn=/\w*$/,hn=/^[-+]0x[0-9a-f]+$/i,pn=/^0b[01]+$/i,vn=/^\[object .+?Constructor\]$/,_n=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,yn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,bn=/['\n\r\u2028\u2029\\]/g,wn="\\ud800-\\udfff",mn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xn="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",An="A-Z\\xc0-\\xd6\\xd8-\\xde",kn="\\ufe0e\\ufe0f",On="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",En="["+wn+"]",In="["+On+"]",Rn="["+mn+"]",Sn="\\d+",zn="["+xn+"]",Tn="["+jn+"]",Cn="[^"+wn+On+Sn+xn+jn+An+"]",Ln="\\ud83c[\\udffb-\\udfff]",Wn="[^"+wn+"]",Un="(?:\\ud83c[\\udde6-\\uddff]){2}",Bn="[\\ud800-\\udbff][\\udc00-\\udfff]",$n="["+An+"]",Dn="\\u200d",Mn="(?:"+Tn+"|"+Cn+")",Fn="(?:"+$n+"|"+Cn+")",Nn="(?:['â](?:d|ll|m|re|s|t|ve))?",Pn="(?:['â](?:D|LL|M|RE|S|T|VE))?",qn="(?:"+Rn+"|"+Ln+")?",Zn="["+kn+"]?",Kn=Zn+qn+"(?:"+Dn+"(?:"+[Wn,Un,Bn].join("|")+")"+Zn+qn+")*",Vn="(?:"+[zn,Un,Bn].join("|")+")"+Kn,Gn="(?:"+[Wn+Rn+"?",Rn,Un,Bn,En].join("|")+")",Hn=RegExp("['â]","g"),Jn=RegExp(Rn,"g"),Yn=RegExp(Ln+"(?="+Ln+")|"+Gn+Kn,"g"),Qn=RegExp([$n+"?"+Tn+"+"+Nn+"(?="+[In,$n,"$"].join("|")+")",Fn+"+"+Pn+"(?="+[In,$n+Mn,"$"].join("|")+")",$n+"?"+Mn+"+"+Nn,$n+"+"+Pn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sn,Vn].join("|"),"g"),Xn=RegExp("["+Dn+wn+mn+kn+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,et={};et[z]=et[T]=et[C]=et[L]=et[W]=et[U]=et[B]=et[$]=et[D]=!0,et[p]=et[v]=et[R]=et[_]=et[S]=et[g]=et[y]=et[d]=et[w]=et[m]=et[x]=et[A]=et[k]=et[O]=et[I]=!1;var ut={};ut[p]=ut[v]=ut[R]=ut[S]=ut[_]=ut[g]=ut[z]=ut[T]=ut[C]=ut[L]=ut[W]=ut[w]=ut[m]=ut[x]=ut[A]=ut[k]=ut[O]=ut[E]=ut[U]=ut[B]=ut[$]=ut[D]=!0,ut[y]=ut[d]=ut[I]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,ft=parseInt,at="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,ct="object"==typeof self&&self&&self.Object===Object&&self,lt=at||ct||Function("return this")(),st=t&&!t.nodeType&&t,ht=st&&n&&!n.nodeType&&n,pt=ht&&ht.exports===st,vt=pt&&at.process,_t=function(){try{return ht&&ht.require&&ht.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(n){}}(),gt=_t&&_t.isArrayBuffer,yt=_t&&_t.isDate,dt=_t&&_t.isMap,bt=_t&&_t.isRegExp,wt=_t&&_t.isSet,mt=_t&&_t.isTypedArray;function xt(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function jt(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function At(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function kt(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function Ot(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function Et(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function It(n,t){return!(null==n||!n.length)&&$t(n,t,0)>-1}function Rt(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function St(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function zt(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Tt(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function Ct(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function Lt(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}var Wt=Nt("length");function Ut(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function Bt(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;
vendor: 11,623 bytes, line 263
263)if(t(n[i],i,n))return i;return-1}function $t(n,t,r){return t==t?function(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}(n,t,r):Bt(n,Mt,r)}function Dt(n,t,r,e){for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function Mt(n){return n!=n}function Ft(n,t){var r=null==n?0:n.length;return r?Zt(n,t)/r:l}function Nt(n){return function(t){return null==t?r:t[n]}}function Pt(n){return function(t){return null==n?r:n[t]}}function qt(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function Zt(n,t){for(var e,u=-1,i=n.length;++u<i;){var o=t(n[u]);o!==r&&(e=e===r?o:e+o)}return e}function Kt(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function Vt(n){return n?n.slice(0,lr(n)+1).replace(tn,""):n}function Gt(n){return function(t){return n(t)}}function Ht(n,t){return St(t,function(t){return n[t]})}function Jt(n,t){return n.has(t)}function Yt(n,t){for(var r=-1,e=n.length;++r<e&&$t(t,n[r],0)>-1;);return r}function Qt(n,t){for(var r=n.length;r--&&$t(t,n[r],0)>-1;);return r}var Xt=Pt({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"}),nr=Pt({"&":"&","<":"<",">":">",'"':""","'":"'"});function tr(n){return"\\"+it[n]}function rr(n){return Xn.test(n)}function er(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function ur(n,t){return function(r){return n(t(r))}}function ir(n,t){for(var r=-1,e=n.length,u=0,o=[];++r<e;){var f=n[r];f!==t&&f!==i||(n[r]=i,o[u++]=r)}return o}function or(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function fr(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function ar(n){return rr(n)?function(n){for(var t=Yn.lastIndex=0;Yn.test(n);)++t;return t}(n):Wt(n)}function cr(n){return rr(n)?function(n){return n.match(Yn)||[]}(n):function(n){return n.split("")}(n)}function lr(n){for(var t=n.length;t--&&rn.test(n.charAt(t)););return t}var sr=Pt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hr=function n(t){var rn,wn=(t=null==t?lt:hr.defaults(lt.Object(),t,hr.pick(lt,tt))).Array,mn=t.Date,xn=t.Error,jn=t.Function,An=t.Math,kn=t.Object,On=t.RegExp,En=t.String,In=t.TypeError,Rn=wn.prototype,Sn=jn.prototype,zn=kn.prototype,Tn=t["__core-js_shared__"],Cn=Sn.toString,Ln=zn.hasOwnProperty,Wn=0,Un=(rn=/[^.]+$/.exec(Tn&&Tn.keys&&Tn.keys.IE_PROTO||""))?"Symbol(src)_1."+rn:"",Bn=zn.toString,$n=Cn.call(kn),Dn=lt._,Mn=On("^"+Cn.call(Ln).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fn=pt?t.Buffer:r,Nn=t.Symbol,Pn=t.Uint8Array,qn=Fn?Fn.allocUnsafe:r,Zn=ur(kn.getPrototypeOf,kn),Kn=kn.create,Vn=zn.propertyIsEnumerable,Gn=Rn.splice,Yn=Nn?Nn.isConcatSpreadable:r,Xn=Nn?Nn.iterator:r,it=Nn?Nn.toStringTag:r,at=function(){try{var n=ai(kn,"defineProperty");return n({},"",{}),n}catch(n){}}(),ct=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,st=mn&&mn.now!==lt.Date.now&&mn.now,ht=t.setTimeout!==lt.setTimeout&&t.setTimeout,vt=An.ceil,_t=An.floor,Wt=kn.getOwnPropertySymbols,Pt=Fn?Fn.isBuffer:r,pr=t.isFinite,vr=Rn.join,_r=ur(kn.keys,kn),gr=An.max,yr=An.min,dr=mn.now,br=t.parseInt,wr=An.random,mr=Rn.reverse,xr=ai(t,"DataView"),jr=ai(t,"Map"),Ar=ai(t,"Promise"),kr=ai(t,"Set"),Or=ai(t,"WeakMap"),Er=ai(kn,"create"),Ir=Or&&new Or,Rr={},Sr=Ui(xr),zr=Ui(jr),Tr=Ui(Ar),Cr=Ui(kr),Lr=Ui(Or),Wr=Nn?Nn.prototype:r,Ur=Wr?Wr.valueOf:r,Br=Wr?Wr.toString:r;function $r(n){if(nf(n)&&!Po(n)&&!(n instanceof Nr)){if(n instanceof Fr)return n;if(Ln.call(n,"__wrapped__"))return Bi(n)}return new Fr(n)}var Dr=function(){function n(){}return function(t){if(!Xo(t))return{};if(Kn)return Kn(t);n.prototype=t;var e=new n;return n.prototype=r,e}}();function Mr(){}function Fr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Nr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=s,this.__views__=[]}function Pr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Zr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Kr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Zr;++t<r;)this.add(n[t])}function Vr(n){var t=this.__data__=new qr(n);this.size=t.size}function Gr(n,t){var r=Po(n),e=!r&&No(n),u=!r&&!e&&Vo(n),i=!r&&!e&&!u&&cf(n),o=r||e||u||i,f=o?Kt(n.length,En):[],a=f.length;for(var c in n)!t&&!Ln.call(n,c)||o&&("length"==c||u&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_i(c,a))||f.push(c);return f}function Hr(n){var t=n.length;return t?n[Ze(0,t-1)]:r}function Jr(n,t){return zi(Ou(n),ie(t,0,n.length))}function Yr(n){return zi(Ou(n))}function Qr(n,t,e){(e!==r&&!Do(n[t],e)||e===r&&!(t in n))&&ee(n,t,e)}function Xr(n,t,e){var u=n[t];Ln.call(n,t)&&Do(u,e)&&(e!==r||t in n)||ee(n,t,e)}function ne(n,t){for(var r=n.length;r--;)if(Do(n[r][0],t))return r;return-1}function te(n,t,r,e){return le(n,function(n,u,i){t(e,n,r(n),i)}),e}function re(n,t){return n&&Eu(t,zf(t),n)}function ee(n,t,r){"__proto__"==t&&at?at(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function ue(n,t){for(var e=-1,u=t.length,i=wn(u),o=null==n;++e<u;)i[e]=o?r:Of(n,t[e]);return i}function ie(n,t,e){return n==n&&(e!==r&&(n=n<=e?n:e),t!==r&&(n=n>=t?n:t)),n}function oe(n,t,e,u,i,o){var f,a=1&t,c=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==r)return f;if(!Xo(n))return n;var s=Po(n);if(s){if(f=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Ln.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!a)return Ou(n,f)}else{var h=si(n),v=h==d||h==b;if(Vo(n))return wu(n,a);if(h==x||h==p||v&&!i){if(f=c||v?{}:pi(n),!a)return c?function(n,t){return Eu(n,li(n),t)}(n,function(n,t){return n&&Eu(t,Tf(t),n)}(f,n)):function(n,t){return Eu(n,ci(n),t)}(n,re(f,n))}else{if(!ut[h])return i?n:{};f=function(n,t,r){var e,u=n.constructor;switch(t){case R:return mu(n);case _:case g:return new u(+n);case S:return function(n,t){var r=t?mu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case z:case T:case C:case L:case W:case U:case B:case $:case D:return xu(n,r);case w:return new u;case m:case O:return new u(n);case A:return function(n){var t=new n.constructor(n.source,sn.exec(n));return t.lastIndex=n.lastIndex,t}(n);case k:return new u;case E:return e=n,Ur?kn(Ur.call(e)):{}}}(n,h,a)}}o||(o=new Vr);var y=o.get(n);if(y)return y;o.set(n,f),of(n)?n.forEach(function(r){f.add(oe(r,t,e,r,n,o))}):tf(n)&&n.forEach(function(r,u){f.set(u,oe(r,t,e,u,n,o))});var j=s?r:(l?c?ti:ni:c?Tf:zf)(n);return At(j||n,function(r,u){j&&(r=n[u=r]),Xr(f,u,oe(r,t,e,u,n,o))}),f}function fe(n,t,e){var u=e.length;if(null==n)return!u;for(n=kn(n);u--;){var i=e[u],o=t[i],f=n[i];if(f===r&&!(i in n)||!o(f))return!1}return!0}function ae(n,t,u){if("function"!=typeof n)throw new In(e);return Ei(function(){n.apply(r,u)},t)}function ce(n,t,r,e){var u=-1,i=It,o=!0,f=n.length,a=[],c=t.length;if(!f)return a;r&&(t=St(t,Gt(r))),e?(i=Rt,o=!1):t.length>=200&&(i=Jt,o=!1,t=new Kr(t));n:for(;++u<f;){var l=n[u],s=null==r?l:r(l);if(l=e||0!==l?l:0,o&&s==s){for(var h=c;h--;)if(t[h]===s)continue n;a.push(l)}else i(t,s,e)||a.push(l)}return a}$r.templateSettings={escape:V,evaluate:G,interpolate:H,variable:"",imports:{_:$r}},$r.prototype=Mr.prototype,$r.prototype.constructor=$r,Fr.prototype=Dr(Mr.prototype),Fr.prototype.constructor=Fr,Nr.prototype=Dr(Mr.prototype),Nr.prototype.constructor=Nr,Pr.prototype.clear=function(){this.__data__=Er?Er(null):{},this.size=0},Pr.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},Pr.prototype.get=function(n){var t=this.__data__;if(Er){var e=t[n];return e===u?r:e}return Ln.call(t,n)?t[n]:r},Pr.prototype.has=function(n){var t=this.__data__;return Er?t[n]!==r:Ln.call(t,n)},Pr.prototype.set=function(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=Er&&t===r?u:t,this},qr.prototype.clear=function(){this.__data__=[],this.size=0},qr.prototype.delete=function(n){var t=this.__data__,r=ne(t,n);return!(r<0||(r==t.length-1?t.pop():Gn.call(t,r,1),--this.size,0))},qr.prototype.get=function(n){var t=this.__data__,e=ne(t,n);return e<0?r:t[e][1]},qr.prototype.has=function(n){return ne(this.__data__,n)>-1},qr.prototype.set=function(n,t){var r=this.__data__,e=ne(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},Zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Pr,map:new(jr||qr),string:new Pr}},Zr.prototype.delete=function(n){var t=oi(this,n).delete(n);return this.size-=t?1:0,t},Zr.prototype.get=function(n){return oi(this,n).get(n)},Zr.prototype.has=function(n){return oi(this,n).has(n)},Zr.prototype.set=function(n,t){var r=oi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Kr.prototype.add=Kr.prototype.push=function(n){return this.__data__.set(n,u),this},Kr.prototype.has=function(n){return this.__data__.has(n)},Vr.prototype.clear=function(){this.__data__=new qr,this.size=0},Vr.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},Vr.prototype.get=function(n){return this.__data__.get(n)},Vr.prototype.has=function(n){return this.__data__.has(n)},Vr.prototype.set=function(n,t){var r=this.__data__;if(r instanceof qr){var e=r.__data__;if(!jr||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Zr(e)}return r.set(n,t),this.size=r.size,this};var le=Su(de),se=Su(be,!0);function he(n,t){var r=!0;return le(n,function(n,e,u){return r=!!t(n,e,u)}),r}function pe(n,t,e){for(var u=-1,i=n.length;++u<i;){var o=n[u],f=t(o);if(null!=f&&(a===r?f==f&&!af(f):e(f,a)))var a=f,c=o}return c}function ve(n,t){var r=[];return le(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _e(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=vi),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?_e(f,t-1,r,e,u):zt(u,f):e||(u[u.length]=f)}return u}var ge=zu(),ye=zu(!0);function de(n,t){return n&&ge(n,t,zf)}function be(n,t){return n&&ye(n,t,zf)}function we(n,t){return Et(t,function(t){return Jo(n[t])})}function me(n,t){for(var e=0,u=(t=gu(t,n)).length;null!=n&&e<u;)n=n[Wi(t[e++])];return e&&e==u?n:r}function xe(n,t,r){var e=t(n);return Po(n)?e:zt(e,r(n))}
vendor: 1,821 bytes, line 263
263function je(n){return null==n?n===r?"[object Undefined]":"[object Null]":it&&it in kn(n)?function(n){var t=Ln.call(n,it),e=n[it];try{n[it]=r;var u=!0}catch(n){}var i=Bn.call(n);return u&&(t?n[it]=e:delete n[it]),i}(n):function(n){return Bn.call(n)}(n)}function Ae(n,t){return n>t}function ke(n,t){return null!=n&&Ln.call(n,t)}function Oe(n,t){return null!=n&&t in kn(n)}function Ee(n,t,e){for(var u=e?Rt:It,i=n[0].length,o=n.length,f=o,a=wn(o),c=1/0,l=[];f--;){var s=n[f];f&&t&&(s=St(s,Gt(t))),c=yr(s.length,c),a[f]=!e&&(t||i>=120&&s.length>=120)?new Kr(f&&s):r}s=n[0];var h=-1,p=a[0];n:for(;++h<i&&l.length<c;){var v=s[h],_=t?t(v):v;if(v=e||0!==v?v:0,!(p?Jt(p,_):u(l,_,e))){for(f=o;--f;){var g=a[f];if(!(g?Jt(g,_):u(n[f],_,e)))continue n}p&&p.push(_),l.push(v)}}return l}function Ie(n,t,e){var u=null==(n=Ai(n,t=gu(t,n)))?n:n[Wi(Gi(t))];return null==u?r:xt(u,n,e)}function Re(n){return nf(n)&&je(n)==p}function Se(n,t,e,u,i){return n===t||(null==n||null==t||!nf(n)&&!nf(t)?n!=n&&t!=t:function(n,t,e,u,i,o){var f=Po(n),a=Po(t),c=f?v:si(n),l=a?v:si(t),s=(c=c==p?x:c)==x,h=(l=l==p?x:l)==x,d=c==l;if(d&&Vo(n)){if(!Vo(t))return!1;f=!0,s=!1}if(d&&!s)return o||(o=new Vr),f||cf(n)?Qu(n,t,e,u,i,o):function(n,t,r,e,u,i,o){switch(r){case S:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case R:return!(n.byteLength!=t.byteLength||!i(new Pn(n),new Pn(t)));case _:case g:case m:return Do(+n,+t);case y:return n.name==t.name&&n.message==t.message;case A:case O:return n==t+"";case w:var f=er;case k:var a=1&e;if(f||(f=or),n.size!=t.size&&!a)return!1;var c=o.get(n);if(c)return c==t;e|=2,o.set(n,t);var l=Qu(f(n),f(t),e,u,i,o);return o.delete(n),l;case E:if(Ur)return Ur.call(n)==Ur.call(t)}return!1}(n,t,c,e,u,i,o);if(!(1&e)){var b=s&&Ln.call(n,"__wrapped__"),j=h&&Ln.call(t,"__wrapped__");
vendor: 6,003 bytes, line 263
263if(b||j){var I=b?n.value():n,z=j?t.value():t;return o||(o=new Vr),i(I,z,e,u,o)}}return!!d&&(o||(o=new Vr),function(n,t,e,u,i,o){var f=1&e,a=ni(n),c=a.length;if(c!=ni(t).length&&!f)return!1;for(var l=c;l--;){var s=a[l];if(!(f?s in t:Ln.call(t,s)))return!1}var h=o.get(n),p=o.get(t);if(h&&p)return h==t&&p==n;var v=!0;o.set(n,t),o.set(t,n);for(var _=f;++l<c;){var g=n[s=a[l]],y=t[s];if(u)var d=f?u(y,g,s,t,n,o):u(g,y,s,n,t,o);if(!(d===r?g===y||i(g,y,e,u,o):d)){v=!1;break}_||(_="constructor"==s)}if(v&&!_){var b=n.constructor,w=t.constructor;b==w||!("constructor"in n)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(v=!1)}return o.delete(n),o.delete(t),v}(n,t,e,u,i,o))}(n,t,e,u,Se,i))}function ze(n,t,e,u){var i=e.length,o=i,f=!u;if(null==n)return!o;for(n=kn(n);i--;){var a=e[i];if(f&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++i<o;){var c=(a=e[i])[0],l=n[c],s=a[1];if(f&&a[2]){if(l===r&&!(c in n))return!1}else{var h=new Vr;if(u)var p=u(l,s,c,n,t,h);if(!(p===r?Se(s,l,3,u,h):p))return!1}}return!0}function Te(n){return!(!Xo(n)||(t=n,Un&&Un in t))&&(Jo(n)?Mn:vn).test(Ui(n));var t}function Ce(n){return"function"==typeof n?n:null==n?ea:"object"==typeof n?Po(n)?$e(n[0],n[1]):Be(n):ha(n)}function Le(n){if(!wi(n))return _r(n);var t=[];for(var r in kn(n))Ln.call(n,r)&&"constructor"!=r&&t.push(r);return t}function We(n,t){return n<t}function Ue(n,t){var r=-1,e=Zo(n)?wn(n.length):[];return le(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Be(n){var t=fi(n);return 1==t.length&&t[0][2]?xi(t[0][0],t[0][1]):function(r){return r===n||ze(r,n,t)}}function $e(n,t){return yi(n)&&mi(t)?xi(Wi(n),t):function(e){var u=Of(e,n);return u===r&&u===t?Ef(e,n):Se(t,u,3)}}function De(n,t,e,u,i){n!==t&&ge(t,function(o,f){if(i||(i=new Vr),Xo(o))!function(n,t,e,u,i,o,f){var a=ki(n,e),c=ki(t,e),l=f.get(c);if(l)Qr(n,e,l);else{var s=o?o(a,c,e+"",n,t,f):r,h=s===r;if(h){var p=Po(c),v=!p&&Vo(c),_=!p&&!v&&cf(c);s=c,p||v||_?Po(a)?s=a:Ko(a)?s=Ou(a):v?(h=!1,s=wu(c,!0)):_?(h=!1,s=xu(c,!0)):s=[]:ef(c)||No(c)?(s=a,No(a)?s=yf(a):Xo(a)&&!Jo(a)||(s=pi(c))):h=!1}h&&(f.set(c,s),i(s,c,u,o,f),f.delete(c)),Qr(n,e,s)}}(n,t,f,e,De,u,i);else{var a=u?u(ki(n,f),o,f+"",n,t,i):r;a===r&&(a=o),Qr(n,f,a)}},Tf)}function Me(n,t){var e=n.length;if(e)return _i(t+=t<0?e:0,e)?n[t]:r}function Fe(n,t,r){t=t.length?St(t,function(n){return Po(n)?function(t){return me(t,1===n.length?n[0]:n)}:n}):[ea];var e=-1;t=St(t,Gt(ii()));var u=Ue(n,function(n,r,u){var i=St(t,function(t){return t(n)});return{criteria:i,index:++e,value:n}});return function(n){var t=n.length;for(n.sort(function(n,t){return function(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var a=ju(u[e],i[e]);if(a)return e>=f?a:a*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)});t--;)n[t]=n[t].value;return n}(u)}function Ne(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=me(n,o);r(f,o)&&Je(i,gu(o,n),f)}return i}function Pe(n,t,r,e){var u=e?Dt:$t,i=-1,o=t.length,f=n;for(n===t&&(t=Ou(t)),r&&(f=St(n,Gt(r)));++i<o;)for(var a=0,c=t[i],l=r?r(c):c;(a=u(f,l,a,e))>-1;)f!==n&&Gn.call(f,a,1),Gn.call(n,a,1);return n}function qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;_i(u)?Gn.call(n,u,1):au(n,u)}}return n}function Ze(n,t){return n+_t(wr()*(t-n+1))}function Ke(n,t){var r="";if(!n||t<1||t>c)return r;do{t%2&&(r+=n),(t=_t(t/2))&&(n+=n)}while(t);return r}function Ve(n,t){return Ii(ji(n,t,ea),n+"")}function Ge(n){return Hr(Mf(n))}function He(n,t){var r=Mf(n);return zi(r,ie(t,0,r.length))}function Je(n,t,e,u){if(!Xo(n))return n;for(var i=-1,o=(t=gu(t,n)).length,f=o-1,a=n;null!=a&&++i<o;){var c=Wi(t[i]),l=e;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(i!=f){var s=a[c];(l=u?u(s,c,a):r)===r&&(l=Xo(s)?s:_i(t[i+1])?[]:{})}Xr(a,c,l),a=a[c]}return n}var Ye=Ir?function(n,t){return Ir.set(n,t),n}:ea,Qe=at?function(n,t){return at(n,"toString",{configurable:!0,enumerable:!1,value:na(t),writable:!0})}:ea;function Xe(n){return zi(Mf(n))}function nu(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=wn(u);++e<u;)i[e]=n[e+t];return i}function tu(n,t){var r;return le(n,function(n,e,u){return!(r=t(n,e,u))}),!!r}function ru(n,t,r){var e=0,u=null==n?e:n.length;if("number"==typeof t&&t==t&&u<=2147483647){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!af(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return eu(n,t,ea,r)}function eu(n,t,e,u){var i=0,o=null==n?0:n.length;if(0===o)return 0;for(var f=(t=e(t))!=t,a=null===t,c=af(t),l=t===r;i<o;){var s=_t((i+o)/2),h=e(n[s]),p=h!==r,v=null===h,_=h==h,g=af(h);if(f)var y=u||_;else y=l?_&&(u||p):a?_&&p&&(u||!v):c?_&&p&&!v&&(u||!g):!v&&!g&&(u?h<=t:h<t);y?i=s+1:o=s}return yr(o,4294967294)}function uu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!Do(f,a)){var a=f;i[u++]=0===o?0:o}}return i}function iu(n){return"number"==typeof n?n:af(n)?l:+n}function ou(n){if("string"==typeof n)return n;if(Po(n))return St(n,ou)+"";if(af(n))return Br?Br.call(n):"";var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}function fu(n,t,r){var e=-1,u=It,i=n.length,o=!0,f=[],a=f;if(r)o=!1,u=Rt;else if(i>=200){var c=t?null:Ku(n);if(c)return or(c);o=!1,u=Jt,a=new Kr}else a=t?[]:f;n:for(;++e<i;){var l=n[e],s=t?t(l):l;if(l=r||0!==l?l:0,o&&s==s){for(var h=a.length;h--;)if(a[h]===s)continue n;t&&a.push(s),f.push(l)}else u(a,s,r)||(a!==f&&a.push(s),f.push(l))}return f}function au(n,t){var r=-1,e=(t=gu(t,n)).length;if(!e)return!0;for(;++r<e;){var u=Wi(t[r]);if("__proto__"===u&&!Ln.call(n,"__proto__"))return!1;if(("constructor"===u||"prototype"===u)&&r<e-1)return!1}var i=Ai(n,t);return null==i||delete i[Wi(Gi(t))]}function cu(n,t,r,e){return Je(n,t,r(me(n,t)),e)}function lu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?nu(n,e?0:i,e?i+1:u):nu(n,e?i+1:0,e?u:i)}function su(n,t){var r=n;return r instanceof Nr&&(r=r.value()),Tt(t,function(n,t){return t.func.apply(t.thisArg,zt([n],t.args))},r)}function hu(n,t,r){var e=n.length;
vendor: 7,675 bytes, line 263
263if(e<2)return e?fu(n[0]):[];for(var u=-1,i=wn(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=ce(i[u]||o,n[f],t,r));return fu(_e(i,1),t,r)}function pu(n,t,e){for(var u=-1,i=n.length,o=t.length,f={};++u<i;){var a=u<o?t[u]:r;e(f,n[u],a)}return f}function vu(n){return Ko(n)?n:[]}function _u(n){return"function"==typeof n?n:ea}function gu(n,t){return Po(n)?n:yi(n,t)?[n]:Li(df(n))}var yu=Ve;function du(n,t,e){var u=n.length;return e=e===r?u:e,!t&&e>=u?n:nu(n,t,e)}var bu=ct||function(n){return lt.clearTimeout(n)};function wu(n,t){if(t)return n.slice();var r=n.length,e=qn?qn(r):new n.constructor(r);return n.copy(e),e}function mu(n){var t=new n.constructor(n.byteLength);return new Pn(t).set(new Pn(n)),t}function xu(n,t){var r=t?mu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function ju(n,t){if(n!==t){var e=n!==r,u=null===n,i=n==n,o=af(n),f=t!==r,a=null===t,c=t==t,l=af(t);if(!a&&!l&&!o&&n>t||o&&f&&c&&!a&&!l||u&&f&&c||!e&&c||!i)return 1;if(!u&&!o&&!l&&n<t||l&&e&&i&&!u&&!o||a&&e&&i||!f&&i||!c)return-1}return 0}function Au(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,a=t.length,c=gr(i-o,0),l=wn(a+c),s=!e;++f<a;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;c--;)l[f++]=n[u++];return l}function ku(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,a=-1,c=t.length,l=gr(i-f,0),s=wn(l+c),h=!e;++u<l;)s[u]=n[u];for(var p=u;++a<c;)s[p+a]=t[a];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Ou(n,t){var r=-1,e=n.length;for(t||(t=wn(e));++r<e;)t[r]=n[r];return t}function Eu(n,t,e,u){var i=!e;e||(e={});for(var o=-1,f=t.length;++o<f;){var a=t[o],c=u?u(e[a],n[a],a,e,n):r;c===r&&(c=n[a]),i?ee(e,a,c):Xr(e,a,c)}return e}function Iu(n,t){return function(r,e){var u=Po(r)?jt:te,i=t?t():{};return u(r,n,ii(e,2),i)}}function Ru(n){return Ve(function(t,e){var u=-1,i=e.length,o=i>1?e[i-1]:r,f=i>2?e[2]:r;for(o=n.length>3&&"function"==typeof o?(i--,o):r,f&&gi(e[0],e[1],f)&&(o=i<3?r:o,i=1),t=kn(t);++u<i;){var a=e[u];a&&n(t,a,u,o)}return t})}function Su(n,t){return function(r,e){if(null==r)return r;if(!Zo(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=kn(r);(t?i--:++i<u)&&!1!==e(o[i],i,o););return r}}function zu(n){return function(t,r,e){for(var u=-1,i=kn(t),o=e(t),f=o.length;f--;){var a=o[n?f:++u];if(!1===r(i[a],a,i))break}return t}}function Tu(n){return function(t){var e=rr(t=df(t))?cr(t):r,u=e?e[0]:t.charAt(0),i=e?du(e,1).join(""):t.slice(1);return u[n]()+i}}function Cu(n){return function(t){return Tt(Yf(Pf(t).replace(Hn,"")),n,"")}}function Lu(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Dr(n.prototype),e=n.apply(r,t);return Xo(e)?e:r}}function Wu(n){return function(t,e,u){var i=kn(t);if(!Zo(t)){var o=ii(e,3);t=zf(t),e=function(n){return o(i[n],n,i)}}var f=n(t,e,u);return f>-1?i[o?t[f]:f]:r}}function Uu(n){return Xu(function(t){var u=t.length,i=u,o=Fr.prototype.thru;for(n&&t.reverse();i--;){var f=t[i];if("function"!=typeof f)throw new In(e);if(o&&!a&&"wrapper"==ei(f))var a=new Fr([],!0)}for(i=a?i:u;++i<u;){var c=ei(f=t[i]),l="wrapper"==c?ri(f):r;a=l&&di(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[ei(l[0])].apply(a,l[3]):1==f.length&&di(f)?a[c]():a.thru(f)}return function(){var n=arguments,r=n[0];if(a&&1==n.length&&Po(r))return a.plant(r).value();for(var e=0,i=u?t[e].apply(this,n):r;++e<u;)i=t[e].call(this,i);return i}})}function Bu(n,t,e,u,i,o,a,c,l,s){var h=t&f,p=1&t,v=2&t,_=24&t,g=512&t,y=v?r:Lu(n);return function f(){for(var d=arguments.length,b=wn(d),w=d;w--;)b[w]=arguments[w];if(_)var m=ui(f),x=function(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}(b,m);if(u&&(b=Au(b,u,i,_)),o&&(b=ku(b,o,a,_)),d-=x,_&&d<s){var j=ir(b,m);return qu(n,t,Bu,f.placeholder,e,b,j,c,l,s-d)}var A=p?e:this,k=v?A[n]:n;return d=b.length,c?b=function(n,t){for(var e=n.length,u=yr(t.length,e),i=Ou(n);u--;){var o=t[u];n[u]=_i(o,e)?i[o]:r}return n}(b,c):g&&d>1&&b.reverse(),h&&l<d&&(b.length=l),this&&this!==lt&&this instanceof f&&(k=y||Lu(k)),k.apply(A,b)}}function $u(n,t){return function(r,e){return function(n,t,r,e){return de(n,function(n,u,i){t(e,r(n),u,i)}),e}(r,n,t(e),{})}}function Du(n,t){return function(e,u){var i;if(e===r&&u===r)return t;if(e!==r&&(i=e),u!==r){if(i===r)return u;"string"==typeof e||"string"==typeof u?(e=ou(e),u=ou(u)):(e=iu(e),u=iu(u)),i=n(e,u)}return i}}function Mu(n){return Xu(function(t){return t=St(t,Gt(ii())),Ve(function(r){var e=this;return n(t,function(n){return xt(n,e,r)})})})}function Fu(n,t){var e=(t=t===r?" ":ou(t)).length;if(e<2)return e?Ke(t,n):t;var u=Ke(t,vt(n/ar(t)));return rr(t)?du(cr(u),0,n).join(""):u.slice(0,n)}function Nu(n){return function(t,e,u){return u&&"number"!=typeof u&&gi(t,e,u)&&(e=u=r),t=pf(t),e===r?(e=t,t=0):e=pf(e),function(n,t,r,e){for(var u=-1,i=gr(vt((t-n)/(r||1)),0),o=wn(i);i--;)o[e?i:++u]=n,n+=r;return o}(t,e,u=u===r?t<e?1:-1:pf(u),n)}}function Pu(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=gf(t),r=gf(r)),n(t,r)}}function qu(n,t,e,u,i,f,a,c,l,s){var h=8&t;t|=h?o:64,4&(t&=~(h?64:o))||(t&=-4);var p=[n,t,i,h?f:r,h?a:r,h?r:f,h?r:a,c,l,s],v=e.apply(r,p);return di(n)&&Oi(v,p),v.placeholder=u,Ri(v,n,t)}function Zu(n){var t=An[n];return function(n,r){if(n=gf(n),(r=null==r?0:yr(vf(r),292))&&pr(n)){var e=(df(n)+"e").split("e");return+((e=(df(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return t(n)}}var Ku=kr&&1/or(new kr([,-0]))[1]==a?function(n){return new kr(n)}:aa;function Vu(n){return function(t){var r=si(t);return r==w?er(t):r==k?fr(t):function(n,t){return St(t,function(t){return[t,n[t]]})}(t,n(t))}}function Gu(n,t,u,a,c,l,s,h){var p=2&t;if(!p&&"function"!=typeof n)throw new In(e);var v=a?a.length:0;if(v||(t&=-97,a=c=r),s=s===r?s:gr(vf(s),0),h=h===r?h:vf(h),v-=c?c.length:0,64&t){var _=a,g=c;a=c=r}var y=p?r:ri(n),d=[n,t,u,a,c,_,g,l,s,h];if(y&&function(n,t){var r=n[1],e=t[1],u=r|e,o=u<131,a=e==f&&8==r||e==f&&256==r&&n[7].length<=t[8]||384==e&&t[7].length<=t[8]&&8==r;if(!o&&!a)return n;1&e&&(n[2]=t[2],u|=1&r?0:4);var c=t[3];if(c){var l=n[3];n[3]=l?Au(l,c,t[4]):c,n[4]=l?ir(n[3],i):t[4]}(c=t[5])&&(l=n[5],n[5]=l?ku(l,c,t[6]):c,n[6]=l?ir(n[5],i):t[6]),(c=t[7])&&(n[7]=c),e&f&&(n[8]=null==n[8]?t[8]:yr(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u}(d,y),n=d[0],t=d[1],u=d[2],a=d[3],c=d[4],!(h=d[9]=d[9]===r?p?0:n.length:gr(d[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(n,t,e){var u=Lu(n);return function i(){for(var o=arguments.length,f=wn(o),a=o,c=ui(i);a--;)f[a]=arguments[a];var l=o<3&&f[0]!==c&&f[o-1]!==c?[]:ir(f,c);return(o-=l.length)<e?qu(n,t,Bu,i.placeholder,r,f,l,r,r,e-o):xt(this&&this!==lt&&this instanceof i?u:n,this,f)}}(n,t,h):t!=o&&33!=t||c.length?Bu.apply(r,d):function(n,t,r,e){var u=1&t,i=Lu(n);return function t(){for(var o=-1,f=arguments.length,a=-1,c=e.length,l=wn(c+f),s=this&&this!==lt&&this instanceof t?i:n;++a<c;)l[a]=e[a];for(;f--;)l[a++]=arguments[++o];return xt(s,u?r:this,l)}}(n,t,u,a);else var b=function(n,t,r){var e=1&t,u=Lu(n);return function t(){return(this&&this!==lt&&this instanceof t?u:n).apply(e?r:this,arguments)}}(n,t,u);return Ri((y?Ye:Oi)(b,d),n,t)}function Hu(n,t,e,u){return n===r||Do(n,zn[e])&&!Ln.call(u,e)?t:n}function Ju(n,t,e,u,i,o){return Xo(n)&&Xo(t)&&(o.set(t,n),De(n,t,r,Ju,o),o.delete(t)),n}function Yu(n){return ef(n)?r:n}function Qu(n,t,e,u,i,o){var f=1&e,a=n.length,c=t.length;if(a!=c&&!(f&&c>a))return!1;var l=o.get(n),s=o.get(t);if(l&&s)return l==t&&s==n;var h=-1,p=!0,v=2&e?new Kr:r;
vendor: 30,660 bytes, line 263
263for(o.set(n,t),o.set(t,n);++h<a;){var _=n[h],g=t[h];if(u)var y=f?u(g,_,h,t,n,o):u(_,g,h,n,t,o);if(y!==r){if(y)continue;p=!1;break}if(v){if(!Lt(t,function(n,t){if(!Jt(v,t)&&(_===n||i(_,n,e,u,o)))return v.push(t)})){p=!1;break}}else if(_!==g&&!i(_,g,e,u,o)){p=!1;break}}return o.delete(n),o.delete(t),p}function Xu(n){return Ii(ji(n,r,Pi),n+"")}function ni(n){return xe(n,zf,ci)}function ti(n){return xe(n,Tf,li)}var ri=Ir?function(n){return Ir.get(n)}:aa;function ei(n){for(var t=n.name+"",r=Rr[t],e=Ln.call(Rr,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function ui(n){return(Ln.call($r,"placeholder")?$r:n).placeholder}function ii(){var n=$r.iteratee||ua;return n=n===ua?Ce:n,arguments.length?n(arguments[0],arguments[1]):n}function oi(n,t){var r,e,u=n.__data__;return("string"==(e=typeof(r=t))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?u["string"==typeof t?"string":"hash"]:u.map}function fi(n){for(var t=zf(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,mi(u)]}return t}function ai(n,t){var e=function(n,t){return null==n?r:n[t]}(n,t);return Te(e)?e:r}var ci=Wt?function(n){return null==n?[]:(n=kn(n),Et(Wt(n),function(t){return Vn.call(n,t)}))}:_a,li=Wt?function(n){for(var t=[];n;)zt(t,ci(n)),n=Zn(n);return t}:_a,si=je;function hi(n,t,r){for(var e=-1,u=(t=gu(t,n)).length,i=!1;++e<u;){var o=Wi(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:!!(u=null==n?0:n.length)&&Qo(u)&&_i(o,u)&&(Po(n)||No(n))}function pi(n){return"function"!=typeof n.constructor||wi(n)?{}:Dr(Zn(n))}function vi(n){return Po(n)||No(n)||!!(Yn&&n&&n[Yn])}function _i(n,t){var r=typeof n;return!!(t=t??c)&&("number"==r||"symbol"!=r&&gn.test(n))&&n>-1&&n%1==0&&n<t}function gi(n,t,r){if(!Xo(r))return!1;var e=typeof t;return!!("number"==e?Zo(r)&&_i(t,r.length):"string"==e&&t in r)&&Do(r[t],n)}function yi(n,t){if(Po(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!af(n))||Y.test(n)||!J.test(n)||null!=t&&n in kn(t)}function di(n){var t=ei(n),r=$r[t];if("function"!=typeof r||!(t in Nr.prototype))return!1;if(n===r)return!0;var e=ri(r);return!!e&&n===e[0]}(xr&&si(new xr(new ArrayBuffer(1)))!=S||jr&&si(new jr)!=w||Ar&&si(Ar.resolve())!=j||kr&&si(new kr)!=k||Or&&si(new Or)!=I)&&(si=function(n){var t=je(n),e=t==x?n.constructor:r,u=e?Ui(e):"";if(u)switch(u){case Sr:return S;case zr:return w;case Tr:return j;case Cr:return k;case Lr:return I}return t});var bi=Tn?Jo:ga;function wi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||zn)}function mi(n){return n==n&&!Xo(n)}function xi(n,t){return function(e){return null!=e&&e[n]===t&&(t!==r||n in kn(e))}}function ji(n,t,e){return t=gr(t===r?n.length-1:t,0),function(){for(var r=arguments,u=-1,i=gr(r.length-t,0),o=wn(i);++u<i;)o[u]=r[t+u];u=-1;for(var f=wn(t+1);++u<t;)f[u]=r[u];return f[t]=e(o),xt(n,this,f)}}function Ai(n,t){return t.length<2?n:me(n,nu(t,0,-1))}function ki(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}var Oi=Si(Ye),Ei=ht||function(n,t){return lt.setTimeout(n,t)},Ii=Si(Qe);function Ri(n,t,r){var e=t+"";return Ii(n,function(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(en,"{\n/* [wrapped with "+t+"] */\n")}(e,function(n,t){return At(h,function(r){var e="_."+r[0];t&r[1]&&!It(n,e)&&n.push(e)}),n.sort()}(function(n){var t=n.match(un);return t?t[1].split(on):[]}(e),r)))}function Si(n){var t=0,e=0;return function(){var u=dr(),i=16-(u-e);if(e=u,i>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(r,arguments)}}function zi(n,t){var e=-1,u=n.length,i=u-1;for(t=t===r?u:t;++e<t;){var o=Ze(e,i),f=n[o];n[o]=n[e],n[e]=f}return n.length=t,n}var Ti,Ci,Li=(Ti=Co(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Q,function(n,r,e,u){t.push(e?u.replace(cn,"$1"):r||n)}),t},function(n){return 500===Ci.size&&Ci.clear(),n}),Ci=Ti.cache,Ti);function Wi(n){if("string"==typeof n||af(n))return n;var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}function Ui(n){if(null!=n){try{return Cn.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function Bi(n){if(n instanceof Nr)return n.clone();var t=new Fr(n.__wrapped__,n.__chain__);return t.__actions__=Ou(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var $i=Ve(function(n,t){return Ko(n)?ce(n,_e(t,1,Ko,!0)):[]}),Di=Ve(function(n,t){var e=Gi(t);return Ko(e)&&(e=r),Ko(n)?ce(n,_e(t,1,Ko,!0),ii(e,2)):[]}),Mi=Ve(function(n,t){var e=Gi(t);return Ko(e)&&(e=r),Ko(n)?ce(n,_e(t,1,Ko,!0),r,e):[]});function Fi(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:vf(r);return u<0&&(u=gr(e+u,0)),Bt(n,ii(t,3),u)}function Ni(n,t,e){var u=null==n?0:n.length;if(!u)return-1;var i=u-1;return e!==r&&(i=vf(e),i=e<0?gr(u+i,0):yr(i,u-1)),Bt(n,ii(t,3),i,!0)}function Pi(n){return null!=n&&n.length?_e(n,1):[]}function qi(n){return n&&n.length?n[0]:r}var Zi=Ve(function(n){var t=St(n,vu);return t.length&&t[0]===n[0]?Ee(t):[]}),Ki=Ve(function(n){var t=Gi(n),e=St(n,vu);return t===Gi(e)?t=r:e.pop(),e.length&&e[0]===n[0]?Ee(e,ii(t,2)):[]}),Vi=Ve(function(n){var t=Gi(n),e=St(n,vu);return(t="function"==typeof t?t:r)&&e.pop(),e.length&&e[0]===n[0]?Ee(e,r,t):[]});function Gi(n){var t=null==n?0:n.length;return t?n[t-1]:r}var Hi=Ve(Ji);function Ji(n,t){return n&&n.length&&t&&t.length?Pe(n,t):n}var Yi=Xu(function(n,t){var r=null==n?0:n.length,e=ue(n,t);return qe(n,St(t,function(n){return _i(n,r)?+n:n}).sort(ju)),e});function Qi(n){return null==n?n:mr.call(n)}var Xi=Ve(function(n){return fu(_e(n,1,Ko,!0))}),no=Ve(function(n){var t=Gi(n);return Ko(t)&&(t=r),fu(_e(n,1,Ko,!0),ii(t,2))}),to=Ve(function(n){var t=Gi(n);return t="function"==typeof t?t:r,fu(_e(n,1,Ko,!0),r,t)});function ro(n){if(!n||!n.length)return[];var t=0;return n=Et(n,function(n){if(Ko(n))return t=gr(n.length,t),!0}),Kt(t,function(t){return St(n,Nt(t))})}function eo(n,t){if(!n||!n.length)return[];var e=ro(n);return null==t?e:St(e,function(n){return xt(t,r,n)})}var uo=Ve(function(n,t){return Ko(n)?ce(n,t):[]}),io=Ve(function(n){return hu(Et(n,Ko))}),oo=Ve(function(n){var t=Gi(n);return Ko(t)&&(t=r),hu(Et(n,Ko),ii(t,2))}),fo=Ve(function(n){var t=Gi(n);return t="function"==typeof t?t:r,hu(Et(n,Ko),r,t)}),ao=Ve(ro),co=Ve(function(n){var t=n.length,e=t>1?n[t-1]:r;return e="function"==typeof e?(n.pop(),e):r,eo(n,e)});function lo(n){var t=$r(n);return t.__chain__=!0,t}function so(n,t){return t(n)}var ho=Xu(function(n){var t=n.length,e=t?n[0]:0,u=this.__wrapped__,i=function(t){return ue(t,n)};return!(t>1||this.__actions__.length)&&u instanceof Nr&&_i(e)?((u=u.slice(e,+e+(t?1:0))).__actions__.push({func:so,args:[i],thisArg:r}),new Fr(u,this.__chain__).thru(function(n){return t&&!n.length&&n.push(r),n})):this.thru(i)}),po=Iu(function(n,t,r){Ln.call(n,r)?++n[r]:ee(n,r,1)}),vo=Wu(Fi),_o=Wu(Ni);function go(n,t){return(Po(n)?At:le)(n,ii(t,3))}function yo(n,t){return(Po(n)?kt:se)(n,ii(t,3))}var bo=Iu(function(n,t,r){Ln.call(n,r)?n[r].push(t):ee(n,r,[t])}),wo=Ve(function(n,t,r){var e=-1,u="function"==typeof t,i=Zo(n)?wn(n.length):[];return le(n,function(n){i[++e]=u?xt(t,n,r):Ie(n,t,r)}),i}),mo=Iu(function(n,t,r){ee(n,r,t)});function xo(n,t){return(Po(n)?St:Ue)(n,ii(t,3))}var jo=Iu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ao=Ve(function(n,t){if(null==n)return[];var r=t.length;return r>1&&gi(n,t[0],t[1])?t=[]:r>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Fe(n,_e(t,1),[])}),ko=st||function(){return lt.Date.now()};function Oo(n,t,e){return t=e?r:t,t=n&&null==t?n.length:t,Gu(n,f,r,r,r,r,t)}function Eo(n,t){var u;if("function"!=typeof t)throw new In(e);return n=vf(n),function(){return--n>0&&(u=t.apply(this,arguments)),n<=1&&(t=r),u}}var Io=Ve(function(n,t,r){var e=1;if(r.length){var u=ir(r,ui(Io));e|=o}return Gu(n,e,t,r,u)}),Ro=Ve(function(n,t,r){var e=3;if(r.length){var u=ir(r,ui(Ro));e|=o}return Gu(t,e,n,r,u)});function So(n,t,u){var i,o,f,a,c,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new In(e);function _(t){var e=i,u=o;return i=o=r,s=t,a=n.apply(u,e)}function g(n){var e=n-l;return l===r||e>=t||e<0||p&&n-s>=f}function y(){var n=ko();if(g(n))return d(n);c=Ei(y,function(n){var r=t-(n-l);return p?yr(r,f-(n-s)):r}(n))}function d(n){return c=r,v&&i?_(n):(i=o=r,a)}function b(){var n=ko(),e=g(n);if(i=arguments,o=this,l=n,e){if(c===r)return function(n){return s=n,c=Ei(y,t),h?_(n):a}(l);if(p)return bu(c),c=Ei(y,t),_(l)}return c===r&&(c=Ei(y,t)),a}return t=gf(t)||0,Xo(u)&&(h=!!u.leading,f=(p="maxWait"in u)?gr(gf(u.maxWait)||0,t):f,v="trailing"in u?!!u.trailing:v),b.cancel=function(){c!==r&&bu(c),s=0,i=l=o=c=r},b.flush=function(){return c===r?a:d(ko())},b}var zo=Ve(function(n,t){return ae(n,1,t)}),To=Ve(function(n,t,r){return ae(n,gf(t)||0,r)});function Co(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new In(e);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Co.Cache||Zr),r}function Lo(n){if("function"!=typeof n)throw new In(e);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Co.Cache=Zr;var Wo=yu(function(n,t){var r=(t=1==t.length&&Po(t[0])?St(t[0],Gt(ii())):St(_e(t,1),Gt(ii()))).length;return Ve(function(e){for(var u=-1,i=yr(e.length,r);++u<i;)e[u]=t[u].call(this,e[u]);return xt(n,this,e)})}),Uo=Ve(function(n,t){var e=ir(t,ui(Uo));return Gu(n,o,r,t,e)}),Bo=Ve(function(n,t){var e=ir(t,ui(Bo));return Gu(n,64,r,t,e)}),$o=Xu(function(n,t){return Gu(n,256,r,r,r,t)});function Do(n,t){return n===t||n!=n&&t!=t}var Mo=Pu(Ae),Fo=Pu(function(n,t){return n>=t}),No=Re(function(){return arguments}())?Re:function(n){return nf(n)&&Ln.call(n,"callee")&&!Vn.call(n,"callee")},Po=wn.isArray,qo=gt?Gt(gt):function(n){return nf(n)&&je(n)==R};function Zo(n){return null!=n&&Qo(n.length)&&!Jo(n)}function Ko(n){return nf(n)&&Zo(n)}var Vo=Pt||ga,Go=yt?Gt(yt):function(n){return nf(n)&&je(n)==g};function Ho(n){if(!nf(n))return!1;var t=je(n);return t==y||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!ef(n)}function Jo(n){if(!Xo(n))return!1;var t=je(n);return t==d||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Yo(n){return"number"==typeof n&&n==vf(n)}function Qo(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=c}function Xo(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function nf(n){return null!=n&&"object"==typeof n}var tf=dt?Gt(dt):function(n){return nf(n)&&si(n)==w};function rf(n){return"number"==typeof n||nf(n)&&je(n)==m}function ef(n){if(!nf(n)||je(n)!=x)return!1;var t=Zn(n);if(null===t)return!0;var r=Ln.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Cn.call(r)==$n}var uf=bt?Gt(bt):function(n){return nf(n)&&je(n)==A},of=wt?Gt(wt):function(n){return nf(n)&&si(n)==k};function ff(n){return"string"==typeof n||!Po(n)&&nf(n)&&je(n)==O}function af(n){return"symbol"==typeof n||nf(n)&&je(n)==E}var cf=mt?Gt(mt):function(n){return nf(n)&&Qo(n.length)&&!!et[je(n)]},lf=Pu(We),sf=Pu(function(n,t){return n<=t});function hf(n){if(!n)return[];if(Zo(n))return ff(n)?cr(n):Ou(n);if(Xn&&n[Xn])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Xn]());var t=si(n);return(t==w?er:t==k?or:Mf)(n)}function pf(n){return n?(n=gf(n))===a||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function vf(n){var t=pf(n),r=t%1;return t==t?r?t-r:t:0}function _f(n){return n?ie(vf(n),0,s):0}function gf(n){if("number"==typeof n)return n;if(af(n))return l;if(Xo(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Xo(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=Vt(n);var r=pn.test(n);return r||_n.test(n)?ft(n.slice(2),r?2:8):hn.test(n)?l:+n}function yf(n){return Eu(n,Tf(n))}function df(n){return null==n?"":ou(n)}var bf=Ru(function(n,t){if(wi(t)||Zo(t))Eu(t,zf(t),n);else for(var r in t)Ln.call(t,r)&&Xr(n,r,t[r])}),wf=Ru(function(n,t){Eu(t,Tf(t),n)}),mf=Ru(function(n,t,r,e){Eu(t,Tf(t),n,e)}),xf=Ru(function(n,t,r,e){Eu(t,zf(t),n,e)}),jf=Xu(ue),Af=Ve(function(n,t){n=kn(n);var e=-1,u=t.length,i=u>2?t[2]:r;for(i&&gi(t[0],t[1],i)&&(u=1);++e<u;)for(var o=t[e],f=Tf(o),a=-1,c=f.length;++a<c;){var l=f[a],s=n[l];(s===r||Do(s,zn[l])&&!Ln.call(n,l))&&(n[l]=o[l])}return n}),kf=Ve(function(n){return n.push(r,Ju),xt(Lf,r,n)});function Of(n,t,e){var u=null==n?r:me(n,t);return u===r?e:u}function Ef(n,t){return null!=n&&hi(n,t,Oe)}var If=$u(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Bn.call(t)),n[t]=r},na(ea)),Rf=$u(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Bn.call(t)),Ln.call(n,t)?n[t].push(r):n[t]=[r]},ii),Sf=Ve(Ie);function zf(n){return Zo(n)?Gr(n):Le(n)}function Tf(n){return Zo(n)?Gr(n,!0):function(n){if(!Xo(n))return function(n){var t=[];if(null!=n)for(var r in kn(n))t.push(r);return t}(n);var t=wi(n),r=[];for(var e in n)("constructor"!=e||!t&&Ln.call(n,e))&&r.push(e);return r}(n)}var Cf=Ru(function(n,t,r){De(n,t,r)}),Lf=Ru(function(n,t,r,e){De(n,t,r,e)}),Wf=Xu(function(n,t){var r={};if(null==n)return r;var e=!1;t=St(t,function(t){return t=gu(t,n),e||(e=t.length>1),t}),Eu(n,ti(n),r),e&&(r=oe(r,7,Yu));for(var u=t.length;u--;)au(r,t[u]);return r}),Uf=Xu(function(n,t){return null==n?{}:function(n,t){return Ne(n,t,function(t,r){return Ef(n,r)})}(n,t)});function Bf(n,t){if(null==n)return{};var r=St(ti(n),function(n){return[n]});return t=ii(t),Ne(n,r,function(n,r){return t(n,r[0])})}var $f=Vu(zf),Df=Vu(Tf);function Mf(n){return null==n?[]:Ht(n,zf(n))}var Ff=Cu(function(n,t,r){return t=t.toLowerCase(),n+(r?Nf(t):t)});function Nf(n){return Jf(df(n).toLowerCase())}function Pf(n){return(n=df(n))&&n.replace(yn,Xt).replace(Jn,"")}var qf=Cu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zf=Cu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kf=Tu("toLowerCase"),Vf=Cu(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Gf=Cu(function(n,t,r){return n+(r?" ":"")+Jf(t)}),Hf=Cu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jf=Tu("toUpperCase");function Yf(n,t,e){return n=df(n),(t=e?r:t)===r?function(n){return nt.test(n)}(n)?function(n){return n.match(Qn)||[]}(n):function(n){return n.match(fn)||[]}(n):n.match(t)||[]}var Qf=Ve(function(n,t){try{return xt(n,r,t)}catch(n){return Ho(n)?n:new xn(n)}}),Xf=Xu(function(n,t){return At(t,function(t){t=Wi(t),ee(n,t,Io(n[t],n))}),n});function na(n){return function(){return n}}var ta=Uu(),ra=Uu(!0);function ea(n){return n}function ua(n){return Ce("function"==typeof n?n:oe(n,1))}var ia=Ve(function(n,t){return function(r){return Ie(r,n,t)}}),oa=Ve(function(n,t){return function(r){return Ie(n,r,t)}});function fa(n,t,r){var e=zf(t),u=we(t,e);null!=r||Xo(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=we(t,zf(t)));var i=!(Xo(r)&&"chain"in r&&!r.chain),o=Jo(n);return At(u,function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Ou(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,zt([this.value()],arguments))})}),n}function aa(){}var ca=Mu(St),la=Mu(Ot),sa=Mu(Lt);function ha(n){return yi(n)?Nt(Wi(n)):function(n){return function(t){return me(t,n)}}(n)}var pa=Nu(),va=Nu(!0);function _a(){return[]}function ga(){return!1}var ya,da=Du(function(n,t){return n+t},0),ba=Zu("ceil"),wa=Du(function(n,t){return n/t},1),ma=Zu("floor"),xa=Du(function(n,t){return n*t},1),ja=Zu("round"),Aa=Du(function(n,t){return n-t},0);return $r.after=function(n,t){if("function"!=typeof t)throw new In(e);return n=vf(n),function(){if(--n<1)return t.apply(this,arguments)}},$r.ary=Oo,$r.assign=bf,$r.assignIn=wf,$r.assignInWith=mf,$r.assignWith=xf,$r.at=jf,$r.before=Eo,$r.bind=Io,$r.bindAll=Xf,$r.bindKey=Ro,$r.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Po(n)?n:[n]},$r.chain=lo,$r.chunk=function(n,t,e){t=(e?gi(n,t,e):t===r)?1:gr(vf(t),0);var u=null==n?0:n.length;if(!u||t<1)return[];for(var i=0,o=0,f=wn(vt(u/t));i<u;)f[o++]=nu(n,i,i+=t);return f},$r.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},$r.concat=function(){var n=arguments.length;if(!n)return[];for(var t=wn(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return zt(Po(r)?Ou(r):[r],_e(t,1))},$r.cond=function(n){var t=null==n?0:n.length,r=ii();return n=t?St(n,function(n){if("function"!=typeof n[1])throw new In(e);return[r(n[0]),n[1]]}):[],Ve(function(r){for(var e=-1;++e<t;){var u=n[e];if(xt(u[0],this,r))return xt(u[1],this,r)}})},$r.conforms=function(n){return function(n){var t=zf(n);return function(r){return fe(r,n,t)}}(oe(n,1))},$r.constant=na,$r.countBy=po,$r.create=function(n,t){var r=Dr(n);return null==t?r:re(r,t)},$r.curry=function n(t,e,u){var i=Gu(t,8,r,r,r,r,r,e=u?r:e);return i.placeholder=n.placeholder,i},$r.curryRight=function n(t,e,u){var i=Gu(t,16,r,r,r,r,r,e=u?r:e);return i.placeholder=n.placeholder,i},$r.debounce=So,$r.defaults=Af,$r.defaultsDeep=kf,$r.defer=zo,$r.delay=To,$r.difference=$i,$r.differenceBy=Di,$r.differenceWith=Mi,$r.drop=function(n,t,e){var u=null==n?0:n.length;return u?nu(n,(t=e||t===r?1:vf(t))<0?0:t,u):[]},$r.dropRight=function(n,t,e){var u=null==n?0:n.length;return u?nu(n,0,(t=u-(t=e||t===r?1:vf(t)))<0?0:t):[]},$r.dropRightWhile=function(n,t){return n&&n.length?lu(n,ii(t,3),!0,!0):[]},$r.dropWhile=function(n,t){return n&&n.length?lu(n,ii(t,3),!0):[]},$r.fill=function(n,t,e,u){var i=null==n?0:n.length;return i?(e&&"number"!=typeof e&&gi(n,t,e)&&(e=0,u=i),function(n,t,e,u){var i=n.length;for((e=vf(e))<0&&(e=-e>i?0:i+e),(u=u===r||u>i?i:vf(u))<0&&(u+=i),u=e>u?0:_f(u);e<u;)n[e++]=t;return n}(n,t,e,u)):[]},$r.filter=function(n,t){return(Po(n)?Et:ve)(n,ii(t,3))},$r.flatMap=function(n,t){return _e(xo(n,t),1)},$r.flatMapDeep=function(n,t){return _e(xo(n,t),a)},$r.flatMapDepth=function(n,t,e){return e=e===r?1:vf(e),_e(xo(n,t),e)},$r.flatten=Pi,$r.flattenDeep=function(n){return null!=n&&n.length?_e(n,a):[]},$r.flattenDepth=function(n,t){return null!=n&&n.length?_e(n,t=t===r?1:vf(t)):[]},$r.flip=function(n){return Gu(n,512)},$r.flow=ta,$r.flowRight=ra,$r.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];ee(e,u[0],u[1])}return e},$r.functions=function(n){return null==n?[]:we(n,zf(n))},$r.functionsIn=function(n){return null==n?[]:we(n,Tf(n))},$r.groupBy=bo,$r.initial=function(n){return null!=n&&n.length?nu(n,0,-1):[]},$r.intersection=Zi,$r.intersectionBy=Ki,$r.intersectionWith=Vi,$r.invert=If,$r.invertBy=Rf,$r.invokeMap=wo,$r.iteratee=ua,$r.keyBy=mo,$r.keys=zf,$r.keysIn=Tf,$r.map=xo,$r.mapKeys=function(n,t){var r={};return t=ii(t,3),de(n,function(n,e,u){ee(r,t(n,e,u),n)}),r},$r.mapValues=function(n,t){var r={};return t=ii(t,3),de(n,function(n,e,u){ee(r,e,t(n,e,u))}),r},$r.matches=function(n){return Be(oe(n,1))},$r.matchesProperty=function(n,t){return $e(n,oe(t,1))},$r.memoize=Co,$r.merge=Cf,$r.mergeWith=Lf,$r.method=ia,$r.methodOf=oa,$r.mixin=fa,$r.negate=Lo,$r.nthArg=function(n){return n=vf(n),Ve(function(t){return Me(t,n)})},$r.omit=Wf,$r.omitBy=function(n,t){return Bf(n,Lo(ii(t)))},$r.once=function(n){return Eo(2,n)},$r.orderBy=function(n,t,e,u){return null==n?[]:(Po(t)||(t=null==t?[]:[t]),Po(e=u?r:e)||(e=null==e?[]:[e]),Fe(n,t,e))},$r.over=ca,$r.overArgs=Wo,$r.overEvery=la,$r.overSome=sa,$r.partial=Uo,$r.partialRight=Bo,$r.partition=jo,$r.pick=Uf,$r.pickBy=Bf,$r.property=ha,$r.propertyOf=function(n){return function(t){return null==n?r:me(n,t)}},$r.pull=Hi,$r.pullAll=Ji,$r.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?Pe(n,t,ii(r,2)):n},$r.pullAllWith=function(n,t,e){return n&&n.length&&t&&t.length?Pe(n,t,r,e):n},$r.pullAt=Yi,$r.range=pa,$r.rangeRight=va,$r.rearg=$o,$r.reject=function(n,t){return(Po(n)?Et:ve)(n,Lo(ii(t,3)))},$r.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=ii(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return qe(n,u),r},$r.rest=function(n,t){if("function"!=typeof n)throw new In(e);return Ve(n,t=t===r?t:vf(t))},$r.reverse=Qi,$r.sampleSize=function(n,t,e){return t=(e?gi(n,t,e):t===r)?1:vf(t),(Po(n)?Jr:He)(n,t)},$r.set=function(n,t,r){return null==n?n:Je(n,t,r)},$r.setWith=function(n,t,e,u){return u="function"==typeof u?u:r,null==n?n:Je(n,t,e,u)},$r.shuffle=function(n){return(Po(n)?Yr:Xe)(n)},$r.slice=function(n,t,e){var u=null==n?0:n.length;return u?(e&&"number"!=typeof e&&gi(n,t,e)?(t=0,e=u):(t=null==t?0:vf(t),e=e===r?u:vf(e)),nu(n,t,e)):[]},$r.sortBy=Ao,$r.sortedUniq=function(n){return n&&n.length?uu(n):[]},$r.sortedUniqBy=function(n,t){return n&&n.length?uu(n,ii(t,2)):[]},$r.split=function(n,t,e){return e&&"number"!=typeof e&&gi(n,t,e)&&(t=e=r),(e=e===r?s:e>>>0)?(n=df(n))&&("string"==typeof t||null!=t&&!uf(t))&&!(t=ou(t))&&rr(n)?du(cr(n),0,e):n.split(t,e):[]},$r.spread=function(n,t){if("function"!=typeof n)throw new In(e);return t=null==t?0:gr(vf(t),0),Ve(function(r){var e=r[t],u=du(r,0,t);return e&&zt(u,e),xt(n,this,u)})},$r.tail=function(n){var t=null==n?0:n.length;return t?nu(n,1,t):[]},$r.take=function(n,t,e){return n&&n.length?nu(n,0,(t=e||t===r?1:vf(t))<0?0:t):[]},$r.takeRight=function(n,t,e){var u=null==n?0:n.length;return u?nu(n,(t=u-(t=e||t===r?1:vf(t)))<0?0:t,u):[]},$r.takeRightWhile=function(n,t){return n&&n.length?lu(n,ii(t,3),!1,!0):[]},$r.takeWhile=function(n,t){return n&&n.length?lu(n,ii(t,3)):[]},$r.tap=function(n,t){return t(n),n},$r.throttle=function(n,t,r){var u=!0,i=!0;if("function"!=typeof n)throw new In(e);return Xo(r)&&(u="leading"in r?!!r.leading:u,i="trailing"in r?!!r.trailing:i),So(n,t,{leading:u,maxWait:t,trailing:i})},$r.thru=so,$r.toArray=hf,$r.toPairs=$f,$r.toPairsIn=Df,$r.toPath=function(n){return Po(n)?St(n,Wi):af(n)?[n]:Ou(Li(df(n)))},$r.toPlainObject=yf,$r.transform=function(n,t,r){var e=Po(n),u=e||Vo(n)||cf(n);if(t=ii(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:Xo(n)&&Jo(i)?Dr(Zn(n)):{}}return(u?At:de)(n,function(n,e,u){return t(r,n,e,u)}),r},$r.unary=function(n){return Oo(n,1)},$r.union=Xi,$r.unionBy=no,$r.unionWith=to,$r.uniq=function(n){return n&&n.length?fu(n):[]},$r.uniqBy=function(n,t){return n&&n.length?fu(n,ii(t,2)):[]},$r.uniqWith=function(n,t){return t="function"==typeof t?t:r,n&&n.length?fu(n,r,t):[]},$r.unset=function(n,t){return null==n||au(n,t)},$r.unzip=ro,$r.unzipWith=eo,$r.update=function(n,t,r){return null==n?n:cu(n,t,_u(r))},$r.updateWith=function(n,t,e,u){return u="function"==typeof u?u:r,null==n?n:cu(n,t,_u(e),u)},$r.values=Mf,$r.valuesIn=function(n){return null==n?[]:Ht(n,Tf(n))},$r.without=uo,$r.words=Yf,$r.wrap=function(n,t){return Uo(_u(t),n)},$r.xor=io,$r.xorBy=oo,$r.xorWith=fo,$r.zip=ao,$r.zipObject=function(n,t){return pu(n||[],t||[],Xr)},$r.zipObjectDeep=function(n,t){return pu(n||[],t||[],Je)},$r.zipWith=co,$r.entries=$f,$r.entriesIn=Df,$r.extend=wf,$r.extendWith=mf,fa($r,$r),$r.add=da,$r.attempt=Qf,$r.camelCase=Ff,$r.capitalize=Nf,$r.ceil=ba,$r.clamp=function(n,t,e){return e===r&&(e=t,t=r),e!==r&&(e=(e=gf(e))==e?e:0),t!==r&&(t=(t=gf(t))==t?t:0),ie(gf(n),t,e)},$r.clone=function(n){return oe(n,4)},$r.cloneDeep=function(n){return oe(n,5)},$r.cloneDeepWith=function(n,t){return oe(n,5,t="function"==typeof t?t:r)},$r.cloneWith=function(n,t){return oe(n,4,t="function"==typeof t?t:r)},$r.conformsTo=function(n,t){return null==t||fe(n,t,zf(t))},$r.deburr=Pf,$r.defaultTo=function(n,t){return null==n||n!=n?t:n},$r.divide=wa,$r.endsWith=function(n,t,e){n=df(n),t=ou(t);var u=n.length,i=e=e===r?u:ie(vf(e),0,u);return(e-=t.length)>=0&&n.slice(e,i)==t},$r.eq=Do,$r.escape=function(n){return(n=df(n))&&K.test(n)?n.replace(q,nr):n},$r.escapeRegExp=function(n){return(n=df(n))&&nn.test(n)?n.replace(X,"\\$&"):n},$r.every=function(n,t,e){var u=Po(n)?Ot:he;return e&&gi(n,t,e)&&(t=r),u(n,ii(t,3))},$r.find=vo,$r.findIndex=Fi,$r.findKey=function(n,t){return Ut(n,ii(t,3),de)},$r.findLast=_o,$r.findLastIndex=Ni,$r.findLastKey=function(n,t){return Ut(n,ii(t,3),be)},$r.floor=ma,$r.forEach=go,$r.forEachRight=yo,$r.forIn=function(n,t){return null==n?n:ge(n,ii(t,3),Tf)},$r.forInRight=function(n,t){return null==n?n:ye(n,ii(t,3),Tf)},$r.forOwn=function(n,t){return n&&de(n,ii(t,3))},$r.forOwnRight=function(n,t){return n&&be(n,ii(t,3))},$r.get=Of,$r.gt=Mo,$r.gte=Fo,$r.has=function(n,t){return null!=n&&hi(n,t,ke)},$r.hasIn=Ef,$r.head=qi,$r.identity=ea,$r.includes=function(n,t,r,e){n=Zo(n)?n:Mf(n),r=r&&!e?vf(r):0;var u=n.length;return r<0&&(r=gr(u+r,0)),ff(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&$t(n,t,r)>-1},$r.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:vf(r);return u<0&&(u=gr(e+u,0)),$t(n,t,u)},$r.inRange=function(n,t,e){return t=pf(t),e===r?(e=t,t=0):e=pf(e),function(n,t,r){return n>=yr(t,r)&&n<gr(t,r)}(n=gf(n),t,e)},$r.invoke=Sf,$r.isArguments=No,$r.isArray=Po,$r.isArrayBuffer=qo,$r.isArrayLike=Zo,$r.isArrayLikeObject=Ko,$r.isBoolean=function(n){return!0===n||!1===n||nf(n)&&je(n)==_},$r.isBuffer=Vo,$r.isDate=Go,$r.isElement=function(n){return nf(n)&&1===n.nodeType&&!ef(n)},$r.isEmpty=function(n){if(null==n)return!0;if(Zo(n)&&(Po(n)||"string"==typeof n||"function"==typeof n.splice||Vo(n)||cf(n)||No(n)))return!n.length;var t=si(n);if(t==w||t==k)return!n.size;if(wi(n))return!Le(n).length;for(var r in n)if(Ln.call(n,r))return!1;return!0},$r.isEqual=function(n,t){return Se(n,t)},$r.isEqualWith=function(n,t,e){var u=(e="function"==typeof e?e:r)?e(n,t):r;return u===r?Se(n,t,r,e):!!u},$r.isError=Ho,$r.isFinite=function(n){return"number"==typeof n&&pr(n)},$r.isFunction=Jo,$r.isInteger=Yo,$r.isLength=Qo,$r.isMap=tf,$r.isMatch=function(n,t){return n===t||ze(n,t,fi(t))},$r.isMatchWith=function(n,t,e){return e="function"==typeof e?e:r,ze(n,t,fi(t),e)},$r.isNaN=function(n){return rf(n)&&n!=+n},$r.isNative=function(n){if(bi(n))throw new xn("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Te(n)},$r.isNil=function(n){return null==n},$r.isNull=function(n){return null===n},$r.isNumber=rf,$r.isObject=Xo,$r.isObjectLike=nf,$r.isPlainObject=ef,$r.isRegExp=uf,$r.isSafeInteger=function(n){return Yo(n)&&n>=-9007199254740991&&n<=c},$r.isSet=of,$r.isString=ff,$r.isSymbol=af,$r.isTypedArray=cf,$r.isUndefined=function(n){return n===r},$r.isWeakMap=function(n){return nf(n)&&si(n)==I},$r.isWeakSet=function(n){return nf(n)&&"[object WeakSet]"==je(n)},$r.join=function(n,t){return null==n?"":vr.call(n,t)},$r.kebabCase=qf,$r.last=Gi,$r.lastIndexOf=function(n,t,e){var u=null==n?0:n.length;if(!u)return-1;var i=u;return e!==r&&(i=(i=vf(e))<0?gr(u+i,0):yr(i,u-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,i):Bt(n,Mt,i,!0)},$r.lowerCase=Zf,$r.lowerFirst=Kf,$r.lt=lf,$r.lte=sf,$r.max=function(n){return n&&n.length?pe(n,ea,Ae):r},$r.maxBy=function(n,t){return n&&n.length?pe(n,ii(t,2),Ae):r},$r.mean=function(n){return Ft(n,ea)},$r.meanBy=function(n,t){return Ft(n,ii(t,2))},$r.min=function(n){return n&&n.length?pe(n,ea,We):r},$r.minBy=function(n,t){return n&&n.length?pe(n,ii(t,2),We):r},$r.stubArray=_a,$r.stubFalse=ga,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=xa,$r.nth=function(n,t){return n&&n.length?Me(n,vf(t)):r},$r.noConflict=function(){return lt._===this&&(lt._=Dn),this},$r.noop=aa,$r.now=ko,$r.pad=function(n,t,r){n=df(n);var e=(t=vf(t))?ar(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return Fu(_t(u),r)+n+Fu(vt(u),r)},$r.padEnd=function(n,t,r){n=df(n);var e=(t=vf(t))?ar(n):0;return t&&e<t?n+Fu(t-e,r):n},$r.padStart=function(n,t,r){n=df(n);var e=(t=vf(t))?ar(n):0;return t&&e<t?Fu(t-e,r)+n:n},$r.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),br(df(n).replace(tn,""),t||0)},$r.random=function(n,t,e){if(e&&"boolean"!=typeof e&&gi(n,t,e)&&(t=e=r),e===r&&("boolean"==typeof t?(e=t,t=r):"boolean"==typeof n&&(e=n,n=r)),n===r&&t===r?(n=0,t=1):(n=pf(n),t===r?(t=n,n=0):t=pf(t)),n>t){var u=n;n=t,t=u}if(e||n%1||t%1){var i=wr();return yr(n+i*(t-n+ot("1e-"+((i+"").length-1))),t)}return Ze(n,t)},$r.reduce=function(n,t,r){var e=Po(n)?Tt:qt,u=arguments.length<3;return e(n,ii(t,4),r,u,le)},$r.reduceRight=function(n,t,r){var e=Po(n)?Ct:qt,u=arguments.length<3;return e(n,ii(t,4),r,u,se)},$r.repeat=function(n,t,e){return t=(e?gi(n,t,e):t===r)?1:vf(t),Ke(df(n),t)},$r.replace=function(){var n=arguments,t=df(n[0]);return n.length<3?t:t.replace(n[1],n[2])},$r.result=function(n,t,e){var u=-1,i=(t=gu(t,n)).length;for(i||(i=1,n=r);++u<i;){var o=null==n?r:n[Wi(t[u])];o===r&&(u=i,o=e),n=Jo(o)?o.call(n):o}return n},$r.round=ja,$r.runInContext=n,$r.sample=function(n){return(Po(n)?Hr:Ge)(n)},$r.size=function(n){if(null==n)return 0;if(Zo(n))return ff(n)?ar(n):n.length;var t=si(n);return t==w||t==k?n.size:Le(n).length},$r.snakeCase=Vf,$r.some=function(n,t,e){var u=Po(n)?Lt:tu;return e&&gi(n,t,e)&&(t=r),u(n,ii(t,3))},$r.sortedIndex=function(n,t){return ru(n,t)},$r.sortedIndexBy=function(n,t,r){return eu(n,t,ii(r,2))},$r.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=ru(n,t);if(e<r&&Do(n[e],t))return e}return-1},$r.sortedLastIndex=function(n,t){return ru(n,t,!0)},$r.sortedLastIndexBy=function(n,t,r){return eu(n,t,ii(r,2),!0)},$r.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var r=ru(n,t,!0)-1;if(Do(n[r],t))return r}return-1},$r.startCase=Gf,$r.startsWith=function(n,t,r){return n=df(n),r=null==r?0:ie(vf(r),0,n.length),t=ou(t),n.slice(r,r+t.length)==t},$r.subtract=Aa,$r.sum=function(n){return n&&n.length?Zt(n,ea):0},$r.sumBy=function(n,t){return n&&n.length?Zt(n,ii(t,2)):0},$r.template=function(n,t,e){var u=$r.templateSettings;e&&gi(n,t,e)&&(t=r),n=df(n),t=xf({},t,u,Hu);var i=xf({},t.imports,u.imports,Hu),o=zf(i),f=Ht(i,o);At(o,function(n){if(an.test(n))throw new xn("Invalid `imports` option passed into `_.template`")});var a,c,l=0,s=t.interpolate||dn,h="__p += '",p=On((t.escape||dn).source+"|"+s.source+"|"+(s===H?ln:dn).source+"|"+(t.evaluate||dn).source+"|$","g"),v="//# sourceURL="+(Ln.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";n.replace(p,function(t,r,e,u,i,o){return e||(e=u),h+=n.slice(l,o).replace(bn,tr),r&&(a=!0,h+="' +\n__e("+r+") +\n'"),i&&(c=!0,h+="';\n"+i+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=o+t.length,t}),h+="';\n";var _=Ln.call(t,"variable")&&t.variable;if(_){if(an.test(_))throw new xn("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(c?h.replace(M,""):h).replace(F,"$1").replace(N,"$1;"),h="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
263\n")+h+"return __p\n}";var g=Qf(function(){return jn(o,v+"return "+h).apply(r,f)});if(g.source=h,Ho(g))throw g;return g},$r.times=function(n,t){if((n=vf(n))<1||n>c)return[];var r=s,e=yr(n,s);t=ii(t),n-=s;for(var u=Kt(e,t);++r<n;)t(r);return u},$r.toFinite=pf,$r.toInteger=vf,$r.toLength=_f,$r.toLower=function(n){return df(n).toLowerCase()},$r.toNumber=gf,$r.toSafeInteger=function(n){return n?ie(vf(n),-9007199254740991,c):0===n?n:0},$r.toString=df,$r.toUpper=function(n){return df(n).toUpperCase()},$r.trim=function(n,t,e){if((n=df(n))&&(e||t===r))return Vt(n);if(!n||!(t=ou(t)))return n;var u=cr(n),i=cr(t);return du(u,Yt(u,i),Qt(u,i)+1).join("")},$r.trimEnd=function(n,t,e){if((n=df(n))&&(e||t===r))return n.slice(0,lr(n)+1);if(!n||!(t=ou(t)))return n;var u=cr(n);return du(u,0,Qt(u,cr(t))+1).join("")},$r.trimStart=function(n,t,e){if((n=df(n))&&(e||t===r))return n.replace(tn,"");if(!n||!(t=ou(t)))return n;var u=cr(n);return du(u,Yt(u,cr(t))).join("")},$r.truncate=function(n,t){var e=30,u="...";if(Xo(t)){var i="separator"in t?t.separator:i;e="length"in t?vf(t.length):e,u="omission"in t?ou(t.omission):u}var o=(n=df(n)).length;if(rr(n)){var f=cr(n);o=f.length}if(e>=o)return n;var a=e-ar(u);if(a<1)return u;var c=f?du(f,0,a).join(""):n.slice(0,a);if(i===r)return c+u;if(f&&(a+=c.length-a),uf(i)){if(n.slice(a).search(i)){var l,s=c;for(i.global||(i=On(i.source,df(sn.exec(i))+"g")),i.lastIndex=0;l=i.exec(s);)var h=l.index;c=c.slice(0,h===r?a:h)}}else if(n.indexOf(ou(i),a)!=a){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+u},$r.unescape=function(n){return(n=df(n))&&Z.test(n)?n.replace(P,sr):n},$r.uniqueId=function(n){var t=++Wn;return df(n)+t},$r.upperCase=Hf,$r.upperFirst=Jf,$r.each=go,$r.eachRight=yo,$r.first=qi,fa($r,(ya={},de($r,function(n,t){Ln.call($r.prototype,t)||(ya[t]=n)}),ya),{chain:!1}),$r.VERSION="4.18.1",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){$r[n].placeholder=$r}),At(["drop","take"],function(n,t){Nr.prototype[n]=function(e){e=e===r?1:gr(vf(e),0);var u=this.__filtered__&&!t?new Nr(this):this.clone();return u.__filtered__?u.__takeCount__=yr(e,u.__takeCount__):u.__views__.push({size:yr(e,s),type:n+(u.__dir__<0?"Right":"")}),u},Nr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),At(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Nr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ii(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),At(["head","last"],function(n,t){var r="take"+(t?"Right":"");Nr.prototype[n]=function(){return this[r](1).value()[0]}}),At(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Nr.prototype[n]=function(){return this.__filtered__?new Nr(this):this[r](1)}}),Nr.prototype.compact=function(){return this.filter(ea)},Nr.prototype.find=function(n){return this.filter(n).head()},Nr.prototype.findLast=function(n){return this.reverse().find(n)},Nr.prototype.invokeMap=Ve(function(n,t){return"function"==typeof n?new Nr(this):this.map(function(r){return Ie(r,n,t)})}),Nr.prototype.reject=function(n){return this.filter(Lo(ii(n)))},Nr.prototype.slice=function(n,t){n=vf(n);var e=this;return e.__filtered__&&(n>
vendor: 4,386 bytes, line 263
2630||t<0)?new Nr(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==r&&(e=(t=vf(t))<0?e.dropRight(-t):e.take(t-n)),e)},Nr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Nr.prototype.toArray=function(){return this.take(s)},de(Nr.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),i=$r[u?"take"+("last"==t?"Right":""):t],o=u||/^find/.test(t);i&&($r.prototype[t]=function(){var t=this.__wrapped__,f=u?[1]:arguments,a=t instanceof Nr,c=f[0],l=a||Po(t),s=function(n){var t=i.apply($r,zt([n],f));return u&&h?t[0]:t};l&&e&&"function"==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,_=a&&!p;if(!o&&l){t=_?t:new Nr(this);var g=n.apply(t,f);return g.__actions__.push({func:so,args:[s],thisArg:r}),new Fr(g,h)}return v&&_?n.apply(this,f):(g=this.thru(s),v?u?g.value()[0]:g.value():g)})}),At(["pop","push","shift","sort","splice","unshift"],function(n){var t=Rn[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);$r.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Po(u)?u:[],n)}return this[r](function(r){return t.apply(Po(r)?r:[],n)})}}),de(Nr.prototype,function(n,t){var r=$r[t];if(r){var e=r.name+"";Ln.call(Rr,e)||(Rr[e]=[]),Rr[e].push({name:t,func:r})}}),Rr[Bu(r,2).name]=[{name:"wrapper",func:r}],Nr.prototype.clone=function(){var n=new Nr(this.__wrapped__);return n.__actions__=Ou(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ou(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ou(this.__views__),n},Nr.prototype.reverse=function(){if(this.__filtered__){var n=new Nr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Nr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Po(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=yr(t,n+o);break;case"takeRight":n=gr(n,t-o)}}return{start:n,end:t}}(0,u,this.__views__),o=i.start,f=i.end,a=f-o,c=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=yr(a,this.__takeCount__);if(!r||!e&&u==a&&p==a)return su(n,this.__actions__);var v=[];n:for(;a--&&h<p;){for(var _=-1,g=n[c+=t];++_<s;){var y=l[_],d=y.iteratee,b=y.type,w=d(g);if(2==b)g=w;else if(!w){if(1==b)continue n;break n}}v[h++]=g}return v},$r.prototype.at=ho,$r.prototype.chain=function(){return lo(this)},$r.prototype.commit=function(){return new Fr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===r&&(this.__values__=hf(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?r:this.__values__[this.__index__++]}},$r.prototype.plant=function(n){for(var t,e=this;e instanceof Mr;){var u=Bi(e);u.__index__=0,u.__values__=r,t?i.__wrapped__=u:t=u;var i=u;e=e.__wrapped__}return i.__wrapped__=n,t},$r.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Nr){var t=n;return this.__actions__.length&&(t=new Nr(this)),(t=t.reverse()).__actions__.push({func:so,args:[Qi],thisArg:r}),new Fr(t,this.__chain__)}return this.thru(Qi)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return su(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Xn&&($r.prototype[Xn]=function(){return this}),$r}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(lt._=hr,define(function(){return hr})):ht?((ht.exports=hr)._=hr,st._=hr):lt._=hr}.call(this)}},t={};function r(e){var u=t[e];if(void 0!==u)return u.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return r.d(t,{a:t}),t},r.d=(n,t)=>{for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n),(()=>{"use strict";var n=r(243);function t(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=Array(t);r<t;r++)e[r]=n[r];return e}!function(){function r(){var r;if(!globalThis.wp_consent_type&&!globalThis.wp_fallback_consent_type)return;const e={};let u=!1;var i,o;Object.entries(null!==(r=globalThis._googlesitekitConsentCategoryMap)&&void 0!==r?r:{}
263).forEach(n=>{let r=(a=2,function(n){if(Array.isArray(n))return n}(f=n)||function(n,t){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var e,u,i,o,f=[],a=!0,c=!1;try{if(i=(r=r.call(n)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(e=i.call(r)).done)&&(f.push(e.value),f.length!==t);a=!0);}catch(n){c=!0,u=n}finally{try{if(!a&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw u}}return f}}(f,a)||function(n,r){if(n){if("string"==typeof n)return t(n,r);var e={}.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?t(n,r):void 0}}(f,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1];var f,a;globalThis.wp_has_consent&&globalThis.wp_has_consent(i)&&(o.forEach(n=>{e[n]="granted"}),u=u||!!o.length)}),u&&!(0,n.isEqual)(e,globalThis._googlesitekitConsents)&&(null===(i=(o=globalThis).gtag)||void 0===i||i.call(o,"consent","update",e),globalThis._googlesitekitConsents=e)}globalThis.document.addEventListener("wp_listen_for_consent_change",function(n){if(n.detail){const e={};let u=!1;var t,r;Object.keys(n.detail).forEach(t=>{var r;const i=null===(r=globalThis._googlesitekitConsentCategoryMap)||void 0===r?void 0:r[t];if(i){const r="allow"===n.detail[t]?"granted":"denied";i.forEach(n=>{e[n]=r}),u=!!i.length}}),u&&(null===(t=(r=globalThis).gtag)||void 0===t||t.call(r,"consent","update",e))}}),globalThis.document.addEventListener("wp_consent_type_defined",r),globalThis.document.addEventListener("DOMContentLoaded",()=>{globalThis.waitfor_consent_hook||r()})}()})()})(); 264!function(){var e={795:function(){var e,t;(t=t||(e=[],{getAll:function(){return e},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=null!=t?t:window.performance.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}})).Tween=function(e){var i={},n={},o={},s=1e3,a=!1,r=0,l=null,h=t.Easing.Linear.None,u=t.Interpolation.Linear,p=null,c=!1,d=null,f=null,g=null;for(var m in e)i[m]=parseFloat(e[m],10);this.to=function(e,t){return null!=t&&(s=t),n=e,this},this.start=function(s){for(var h in t.add(this),a=!0,c=!1,l=(null!=s?s:window.performance.now())+r,n){if(n[h]instanceof Array){if(0===n[h].length)continue;n[h]=[e[h]].concat(n[h])}null!=i[h]&&(i[h]=e[h],i[h]instanceof Array==!1&&(i[h]*=1),o[h]=i[h]||0)}return this},this.stop=function(){return a&&(t.remove(this),a=!1,null!=g&&g.call(e)),this},this.complete=function(){return a&&(t.remove(this),a=!1,null!=f&&f.call(e)),this},this.delay=function(e){return r=e,this},this.easing=function(e){return h=null==e?h:e,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return d=e,this},this.onComplete=function(e){return f=e,this},this.onStop=function(e){return g=e,this},this.update=function(t){if(t<l)return!0;for(o in!1===c&&(null!=p&&p.call(e),c=!0),a=(a=(t-l)/s)>1?1:a,r=h(a),n)if(null!=i[o]){var o,a,r,g=i[o]||0,m=n[o];m instanceof Array?e[o]=u(m,r):("string"==typeof m&&(m=m.startsWith("+")||m.startsWith("-")?g+parseFloat(m,10):parseFloat(m,10)),"number"==typeof m&&(e[o]=g+(m-g)*r))}return null!=d&&d.call(e,r),1!==a||(null!=f&&f.call(e),!1)}},t.Easing={Linear:{None:function(e){return e}},Quadratic:{InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)}},Cubic:{InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}},t.Interpolation={Linear:function(e,i){var n=e.length-1,o=n*i,s=Math.floor(o),a=t.Interpolation.Utils.Linear;return i<0?a(e[0],e[1],o):i>1?a(e[n],e[n-1],n-o):a(e[s],e[s+1>n?n:s+1],o-s)},Utils:{Linear:function(e,t,i){return(t-e)*i+e}}},window.TWEEN=t}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}i.amdO={},function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||n(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,i){if(t){if("string"==typeof t)return e(t,i);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,i)}}var o,s,a=new WeakMap,r=new WeakMap;function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e instanceof l)return e;if(!(this instanceof l))return new l(e,t);if(a.set(this,[]),this.length=0,!e)return this;var i=[];return"string"==typeof e?i=e.trim().startsWith("<")&&e.trim().endsWith(">")?(i=Array.from(document.createRange().createContextualFragment(e.trim()).children)).map(function(e){return e.cloneNode(!0)}):Array.from(document.querySelectorAll(e)):e.nodeType||e===window||e===document?i=[e]:void 0!==e.length&&(i=Array.from(e)),this._setElements(i,t),this}function h(){return!0}function u(){return!1}l.prototype._getElements=function(){return a.get(this)||[]},l.prototype._setElements=function(e,i){var n=this;return a.set(this,e),this.length=e.length,Object.keys(this).forEac
264h(function(e){isNaN(e)||delete n[e]}),e.forEach(function(e,o){if(i.hasOwnProperty("class")){var s;(s=e.classList).add.apply(s,t(i.class.trim().split(" ")))}i.hasOwnProperty("id")&&(e.id=i.id),i.hasOwnProperty("title")&&(e.title=i.title),i.hasOwnProperty("html")&&(e.innerHTML=i.html),n[o]=e}),this},l.prototype.on=function(e,t,i){var n,o;return"string"==typeof t&&"function"==typeof i?(o=t,n=i):(n=t,o=null),this._getElements().forEach(function(t){if(o){var i=function(e){if(e.target){var t=e.target.closest(o);t&&(e.originalEvent=e,n.call(t,e))}};t.addEventListener(e,i),t._queryHandlers||(t._queryHandlers={}),t._queryHandlers[e]||(t._queryHandlers[e]=[]),t._queryHandlers[e].push({original:n,wrapped:i,selector:o})}else{var s=function(e){e.originalEvent=e,n.call(t,e)};t.addEventListener(e,s),t._queryHandlers||(t._queryHandlers={}),t._queryHandlers[e]||(t._queryHandlers[e]=[]),t._queryHandlers[e].push({original:n,wrapped:s})}}),this},l.prototype.off=function(){return this._getElements().forEach(function(e){e._queryHandlers&&(Object.keys(e._queryHandlers).forEach(function(t){e._queryHandlers[t].forEach(function(i){e.removeEventListener(t,i.wrapped)})}),e._queryHandlers={})}),this},l.prototype.trigger=function(e){return this._getElements().forEach(function(t){if("string"==typeof e&&"function"==typeof t[e])t[e]();else{var i=new Event(e,{bubbles:!0});t.dispatchEvent(i)}}),this},l.prototype.addClass=function(e){return e&&this._getElements().forEach(function(i){if(i.classList){var n;(n=i.classList).add.apply(n,t(e.trim().split(" ")))}}),this},l.prototype.removeClass=function(e){return e&&this._getElements().forEach(function(i){if(i.classList){var n;(n=i.classList).remove.apply(n,t(e.trim().split(" ")))}}),this},l.prototype.hasClass=function(e){return this._getElements().some(function(t){return t.classList&&t.classList.contains(e)})},l.prototype.toggleClass=function(e,t){return this._getElements().forEach(function(i){void 0===t?i.classList.toggle(e):t?i.classList.add(e):i.classList.remove(e)}),this},l.prototype.css=function(e){var t=["width","height","min-width","min-height","max-width","max-height","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","fontSize","lineHeight"];return this._getElements().forEach(function(i){Object.keys(e).forEach(function(n){var o=e[n];null!=o&&""!==o&&!isNaN(parseFloat(o))&&isFinite(o)&&t.includes(n)&&0!==o&&"0"!==o&&"number"==typeof o&&(o+="px"),i.style[n]=o})}),this},l.prototype.prepend=function(e){return e&&this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("afterbegin",e):e instanceof l?e._getElements().forEach(function(e){t.insertBefore(e,t.firstChild)}):e.nodeType&&t.insertBefore(e,t.firstChild)}),this},l.prototype.append=function(e){return e&&this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("beforeend",e):e instanceof l?e._getElements().forEach(function(e){t.contains(e)||t.appendChild(e)}):e.nodeType&&!t.contains(e)&&t.appendChild(e)}),this},l.prototype.appendTo=function(e){var t=e instanceof l?e._getElements()[0]:"string"==typeof e?document.querySelector(e):e;return t&&this._getElements().forEach(function(e){t.contains(e)||t.appendChild(e)}),this},l.prototype.after=function(e){return this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("afterend",e):e instanceof l?e._getElements().forEach(function(e){t.parentNode.insertBefore(e,t.nextSibling)}):e.nodeType&&t.parentNode.insertBefore(e,t.nextSibling)}),this},l.prototype.html=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].innerHTML:"":(this._getElements().forEach(function(t){t.innerHTML=e}),this)},l.prototype.text=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].textContent:"":(this._getElements().forEach(function(t){t.textContent=e}),this)},l.prototype.find=function(e){var i=[];
264return this._getElements().forEach(function(n){var o=n.querySelectorAll(e);i.push.apply(i,t(Array.from(o)))}),new l(i)},l.prototype.children=function(e){var t=[];return this._getElements().forEach(function(i){Array.from(i.children).forEach(function(i){(!e||i.matches(e))&&t.push(i)})}),new l(t)},l.prototype.is=function(e){return this._getElements().some(function(t){return t.matches(e)})},l.prototype.closest=function(e){var t=[];return this._getElements().forEach(function(i){var n=i.closest(e);n&&!t.includes(n)&&t.push(n)}),new l(t)},l.prototype.contains=function(e){var t=e instanceof l?e._getElements()[0]:e;return this._getElements().some(function(e){return e.contains(t)})},l.prototype.siblings=function(e){var i=[];return this._getElements().forEach(function(n){var o=Array.from(n.parentElement.children).filter(function(e){return e!==n});e&&(o=o.filter(function(t){return t.matches(e)})),i.push.apply(i,t(o))}),new l(i)},l.prototype.parent=function(e){var t=this._getElements().map(function(e){return e.parentElement}).filter(function(e){return null!==e});return e&&(t=t.filter(function(t){return t.matches(e)})),new l(t)},l.prototype.each=function(e){return this._getElements().forEach(function(t,i){e.call(t,i,t)}),this},l.prototype.map=function(e){return this._getElements().map(function(t,i){return e.call(t,i,t)}),this},l.prototype.get=function(){return this._getElements()},l.prototype.attr=function(e,t){return 1==arguments.length?this._getElements()[0]?this._getElements()[0].getAttribute(e):void 0:(void 0===t?this._getElements().forEach(function(t){t.removeAttribute(e)}):this._getElements().forEach(function(i){i.setAttribute(e,t)}),this)},l.prototype.removeAttr=function(e){return this._getElements().forEach(function(t){t.removeAttribute(e)}),this},l.prototype.data=function(e,t){if(void 0===t){var i=this._getElements()[0];if(!i)return;var n=r.get(i)||{};if(void 0!==n[e])return n[e];var o=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return i.dataset[o]}return this._getElements().forEach(function(i){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)i.setAttribute("data-".concat(e),t);else if(null===t){i.removeAttribute("data-".concat(e));var n=r.get(i);n&&void 0!==n[e]&&(delete n[e],r.set(i,n))}else if((void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"){var o=r.get(i)||{};o[e]=t,r.set(i,o)}}),this},l.prototype.height=function(e){if(void 0===e){if(0===this._getElements().length)return 0;var t=this._getElements()[0];return t===window?window.innerHeight:t.offsetHeight}return this._getElements().forEach(function(t){t.style.height="number"==typeof e?e+"px":e}),this},l.prototype.width=function(e){if(void 0===e){if(0===this._getElements().length)return 0;var t=this._getElements()[0];return t===window?window.innerWidth:t.offsetWidth}return this._getElements().forEach(function(t){t.style.width="number"==typeof e?e+"px":e}),this},l.prototype.offset=function(){return{top:this[0].offsetTop,left:this[0].offsetLeft}},l.prototype.remove=function(){return this._getElements().forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this._setElements([]),this},l.prototype.val=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].value:"":(this._getElements().forEach(function(t){t.value=e}),this)},l.prototype.hide=function(){return this._getElements().forEach(function(e){e.style.display="none"}),this},l.prototype.show=function(){return this._getElements().forEach(function(e){e.style.display="block"}),this},l.prototype.ready=function(e){return"loading"!==document.readyState?setTimeout(e):document.addEventListener("DOMContentLoaded",e,{once:!0}),this},l.prototype.scrollTop=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].scrollTop:0:(this._getElements().forEach(function(t){t.scrollTop=e}),this)},l.prototype.change=function(e){return this._getElements().forEach(function(t){t.addEventListener("change",e)}),this},l.prototype.click=function(){return this._getElements().forEach(function(e){"function"==typeof e.click&&e.click()}),this},l.extend=function(e,t){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];if(!t)return{};var a=!0,r=!1,h=void 0;try{for(var u,p=o[Symbol.iterator]();!(a=(u=p.next()).done);a=!0){var c=u.value;if(c){var d=!0,f=!1,g=void 0;try{for(var m,v=Object.entries(c)[Symbol.iterator]();
264!(d=(m=v.next()).done);d=!0){var y,b=(y=m.value,function(e){if(Array.isArray(e))return e}(y)||function(e,t){var i,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,r=!1;try{for(o=o.call(e);!(a=(i=o.next()).done)&&(s.push(i.value),2!==s.length);a=!0);}catch(e){r=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(r)throw n}}return s}}(y,2)||n(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=b[0],P=b[1];if(P instanceof l)t[w]=P;else switch(Object.prototype.toString.call(P)){case"[object Object]":"[object Object]"===Object.prototype.toString.call(t[w])?t[w]=l.extend(t[w],P):t[w]=l.extend({},P);break;case"[object Array]":t[w]=l.extend(Array(P.length),P);break;default:t[w]=P}}}catch(e){f=!0,g=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw g}}}}}catch(e){r=!0,h=e}finally{try{a||null==p.return||p.return()}finally{if(r)throw h}}return t},l.Event=function(e,t){if(!(this instanceof l.Event))return new l.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?h:u,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&l.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this._eventFixed=!0},l.Event.prototype={constructor:l.Event,isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},l.event={fix:function(e){return e._eventFixed?e:new l.Event(e)}};var p={jQuery:null,version:"2.4.37",autoDetectLocation:!0,_isHashTriggered:!1,slug:void 0,locationVar:"dearViewerLocation",locationFile:void 0,MOUSE_CLICK_ACTIONS:{NONE:"none",NAV:"nav"},ARROW_KEYS_ACTIONS:{NONE:"none",NAV:"nav"},MOUSE_DBL_CLICK_ACTIONS:{NONE:"none",ZOOM:"zoom"},MOUSE_SCROLL_ACTIONS:{NONE:"none",ZOOM:"zoom",NAV:"nav"},PAGE_SCALE:{PAGE_FIT:"fit",PAGE_WIDTH:"width",AUTO:"auto",ACTUAL:"actual",MANUAL:"manual"},READ_DIRECTION:{LTR:"ltr",RTL:"rtl"},TURN_DIRECTION:{LEFT:"left",RIGHT:"right",NONE:"none"},INFO_TYPE:{INFO:"info",ERROR:"error"},FLIPBOOK_PAGE_MODE:{SINGLE:"single",DOUBLE:"double",AUTO:"auto"},FLIPBOOK_SINGLE_PAGE_MODE:{ZOOM:"zoom",BOOKLET:"booklet",AUTO:"auto"},FLIPBOOK_PAGE_SIZE:{AUTO:"auto",SINGLE:"single",DOUBLE_INTERNAL:"dbl_int",DOUBLE:"dbl",DOUBLE_COVER_BACK:"dbl_cover_back"},LINK_TARGET:{NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},CONTROLS_POSITION:{HIDDEN:"hidden",TOP:"top",BOTTOM:"bottom"},TURN_CORNER:{TL:"tl",TR:"tr",BL:"bl",BR:"br",L:"l",R:"r",NONE:"none"},REQUEST_STATUS:{OFF:"none",ON:"pending",COUNT:"counting"},TEXTURE_TARGET:{THUMB:0,VIEWER:1,ZOOM:2},FLIPBOOK_CENTER_SHIFT:{RIGHT:1,LEFT:-1,NONE:0},FLIPBOOK_COVER_TYPE:{NONE:"none",PLAIN:"plain",BASIC:"basic",RIDGE:"ridge"}};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}p.fakejQuery=!1,"undefined"==typeof jQuery?(p.fakejQuery=!0,p.jQuery=l):p.jQuery=jQuery,p._defaults={is3D:!0,has3DShadow:!0,color3DCover:"#aaaaaa",color3DSheets:"#fff",cover3DType:p.FLIPBOOK_COVER_TYPE.NONE,flexibility:.9,drag3D:!1,height:"auto",autoOpenOutline:!1,autoOpenThumbnail:!1,showDownloadControl:!0,showSearchControl:!0,showPrintControl:!0,enableSound:!0,duration:800,pageRotation:0,flipbook3DTiltAngleUp:0,flipbook3DTiltAngleLeft:0,readDirection:p.READ_DIRECTION.LTR,pageMode:p.FLIPBOOK_PAGE_MODE.AUTO,singlePageMode:p.FLIPBOOK_SINGLE_PAGE_MODE.AUTO,flipbookFitPages:!1,backgroundColor:"transparent",flipbookHardPages:"none",openPage:1,annotationClass:"",maxTextureSize:3200,minTextureSize:256,rangeChunkSize:524288,disableAutoFetch:!0,disableStream:!0,disableFontFace:!1,calendarMode:!1,icons:{altnext:"df-icon-arrow-right1",altprev:"df-icon-arrow-left1",next:"df-icon-arrow-right1",prev:"df-icon-arrow-left1",end:"df-icon-last-page",start:"df-icon-first-page",share:"df-icon-share","outline-open":"df-icon-arrow-right","outline-close":"df-icon-arrow-down",help:"df-icon-help",more:"df-icon-more",download:"df-icon-download",zoomin:"df-icon-add-circle",zoomout:"df-icon-minus-circle",resetzoom:"df-icon-minus-circle",fullscreen:"df-icon-fullscreen","fullscreen-off":"df-icon-fit-screen",fitscreen:"df-icon-fit-screen",thumbnail:"df-icon-grid-view",outline:"df-icon-list",close:"df-icon-close",doublepage:"df-icon-double-page",singlepage:"df-icon-file",print:"df-icon-print",play:"df-icon-play",pause:"df-icon-pause",search:"df-icon-search",sound:"df-icon-volume","sound-off":"df-icon-volume",facebook:"df-icon-facebook",google:"df-icon-google",twitter:"df-icon-twitter",whatsapp:"df-icon-whatsapp",linkedin:"df-icon-linkedin",pinterest:"df-icon-pinterest",mail:"df-icon-mail"},text:{toggleSound:"Turn on/off Sound",toggleThumbnails:"Toggle Thumbnails",toggleOutline:"Toggle Outline/Bookmark",previousPage:"Previous Page",nextPage:"Next Page",toggleFullscreen:"Toggle Fullscreen",zoomIn:"Zoom In",zoomOut:"Zoom Out",resetZoom:"Reset Zoom",pageFit:"Fit Page",widthFit:"Fit Width",toggleHelp:"Toggle Help",search:"Search in PDF",singlePageMode:"Single Page Mode",doublePageMode:"Double Page Mode",downloadPDFFile:"Download PDF File",gotoFirstPage:"Goto First Page",gotoLastPage:"Goto Last Page",print:"Print",play:"Start AutoPlay",pause:"Pause AutoPlay",share:"Share",close:"Close",mailSubject:"Check out this FlipBook",mailBody:"Check out this site {{url}}
264",loading:"Loading",thumbTitle:"Thumbnails",outlineTitle:"Table of Contents",searchTitle:"Search",searchPlaceHolder:"Search",searchClear:"Clear",searchSearchingInfo:"Searching Page:",searchResultsFound:"results found",searchResultsNotFound:"No results Found!",searchResultPage:"Page",searchResult:"result",searchResults:"results",searchMinimum:"Minimum 3 letters required!",analyticsEventCategory:"DearFlip",analyticsViewerReady:"Document Ready",analyticsViewerOpen:"Document Opened",analyticsViewerClose:"Document Closed",analyticsFirstPageChange:"First Page Changed"},share:{facebook:"https://www.facebook.com/sharer/sharer.php?u={{url}}&t={{mailsubject}}",twitter:"https://twitter.com/share?url={{url}}&text={{mailsubject}}",mail:void 0,whatsapp:"https://api.whatsapp.com/send/?text={{mailsubject}}+{{url}}&app_absent=0",linkedin:"https://www.linkedin.com/shareArticle?url={{url}}&title={{mailsubject}}",pinterest:"https://www.pinterest.com/pin/create/button/?url={{url}}&media=&description={{mailsubject}}"},allControls:"altPrev,pageNumber,altNext,play,outline,thumbnail,zoomIn,zoomOut,zoom,fullScreen,share,download,search,pageMode,startPage,endPage,sound,search,print,more",moreControls:"download,pageMode,pageFit,startPage,endPage,sound",leftControls:"outline,thumbnail",rightControls:"fullScreen,share,download,more",hideControls:"",hideShareControls:"",controlsPosition:p.CONTROLS_POSITION.BOTTOM,paddingTop:20,paddingLeft:15,paddingRight:15,paddingBottom:20,enableAnalytics:!1,hashNavigationEnabled:!1,zoomRatio:2,maxDPI:2,fakeZoom:1,progressiveZoom:!1,pageScale:p.PAGE_SCALE.PAGE_FIT,controlsFloating:!0,sideMenuOverlay:!0,enableAnnotation:!0,enableAutoLinks:!0,arrowKeysAction:p.ARROW_KEYS_ACTIONS.NAV,clickAction:p.MOUSE_CLICK_ACTIONS.NAV,dblClickAction:p.MOUSE_DBL_CLICK_ACTIONS.NONE,mouseScrollAction:p.MOUSE_SCROLL_ACTIONS.NONE,linkTarget:p.LINK_TARGET.BLANK,soundFile:"sound/turn2.mp3",imagesLocation:"images",imageResourcesPath:"images/pdfjs/",popupThumbPlaceholder:"data:image/svg+xml,"+escape('<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 210 297"><rect width="210" height="297" style="fill:#f1f2f2"/><circle cx="143" cy="95" r="12" style="fill:#e3e8ed"/><polygon points="131 138 120 149 95 124 34 184 176 185 131 138" style="fill:#e3e8ed"/></svg>'),cMapUrl:"js/libs/cmaps/",logo:"",logoUrl:"",sharePrefix:"",pageSize:p.FLIPBOOK_PAGE_SIZE.AUTO,backgroundImage:"",pixelRatio:window.devicePixelRatio||1,spotLightIntensity:.22,ambientLightColor:"#fff",ambientLightIntensity:.8,shadowOpacity:.1,slug:void 0,headerElementSelector:void 0,onReady:function(e){},onPageChanged:function(e){},beforePageChanged:function(e){},onCreate:function(e){},onCreateUI:function(e){},onFlip:function(e){},beforeFlip:function(e){},autoPDFLinktoViewer:!1,autoLightBoxFullscreen:!1,thumbLayout:"book-title-hover",cleanupAfterRender:!0,canvasWillReadFrequently:!0,providerType:"pdf",loadMoreCount:-1,autoPlay:!1,autoPlayDuration:1e3,autoPlayStart:!1,popupBackGroundColor:"#eee",mockupMode:!1,instantTextureProcess:!1,cachePDFTexture:!1,pdfVersion:"default"},p.defaults={},p.jQuery.extend(!0,p.defaults,p._defaults),p.viewers={},p.providers={},p.openFileOptions={},p.executeCallback=function(){};var d=p.jQuery,f="WebKitCSSMatrix"in window||document.body&&"MozPerspective"in document.body.style,g="onmousedown"in window,m=p.utils={mouseEvents:g?{type:"mouse",start:"mousedown",move:"mousemove",end:"mouseup"}:{type:"touch",start:"touchstart",move:"touchmove",end:"touchend"},html:{div:"<div></div>",a:"<a>",input:"<input type='text'/>",select:"<select></select>"},getSharePrefix:function(){return m.getSharePrefixes()[0]},getSharePrefixes:function(){return(p.defaults.sharePrefix+",dflip-,flipbook-,dearflip-,dearpdf-").split(",").map(function(e){return e.trim()})},toRad:function(e){return e*Math.PI/180},toDeg:function(e){return 180*e/Math.PI},ifdef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null==e?t:e},createBtn:function(e,t,i){var n=d(m.html.div,{class:"df-ui-btn df-ui-"+e,title:i,html:void 0!==i?"<span>"+i+"</span>":""});return void 0!==t&&t.indexOf("<svg")>-1?n.html(t.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg" ')):n.addClass(t),n},transition:function(e,t){return e?t/1e3+"s ease-out":"0s none"},display:function(e){return e?"block":"none"},resetTranslate:function(){return m.translateStr(0,0)},bgImage:function(e){return null==e||"blank"===e?"":' url("'+e+'")'},translateStr:function(e,t){return f?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "},httpsCorrection:function(e){try{if(null==e)return null;if("string"!=typeof e||-1===e.indexOf("://"))return e;var t=window.location;if(t.href.split(".")[0]===e.split(".")[0])return e;e.split("://")[1].split("/")[0].replace("www.","")===t.hostname.replace("www.","")&&e.indexOf(t.hostname.replace("www.",""))>-1&&(t.href.indexOf("https://")>-1?e=e.replace("http://","https://"):t.href.indexOf("http://")>-1&&(e=e.replace("https://","http://")),t.href.indexOf("://www.")>-1&&-1===e.indexOf("://www.")&&(e=e.replace("://","://www.")),-1===t.href.indexOf("://www.")&&e.indexOf("://www.")>-1&&(e=e.replace("://www.","://")))}catch(t){console.log("Skipping URL correction: "+e)}return e},safeURL:function(e){if(null==e)return"";var t=(""+e).trim();if(!/^https?:\/\//i.test(t))return"";try{var i=new URL(t);if("http:"===i.protocol||"https:"===i.protocol)return i.href}catch(e){}return""},rotateStr:function(e){return" rotateZ("+e+"deg) "},lowerPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},nearestPowerOfTwo:function(e,t){return Math.min(t||2048,Math.pow(2,Math.ceil(Math.log(e)/Math.LN2)))},getFullscreenElement:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},hasFullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled},fixMouseEvent:function(e){if(!e)return e;var t=e.originalEvent||e;if(!t.changedTouches||!(t.changedTouches.length>0))return e;var i=d.event.fix(e),n=t.changedTouches[0];return i.clientX=n.clientX,i.clientY=n.clientY,i.pageX=n.pageX,i.touches=t.touches,i.pageY=n.pageY,i.movementX=n.movementX,i.movementY=n.movementY,i},limitAt:function(e,t,i){return e<t?t:e>i?i:e},distOrigin:function(e,t){return m.distPoints(0,0,e,t)},distPoints:function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))},angleByDistance:function(e,t){var i=t/2,n=m.limitAt(e,0,t);return n<i?m.toDeg(Math.asin(n/i)):90+m.toDeg(Math.asin((n-i)/i))},calculateScale:function(e,t){var i=m.distPoints(e[0].x,e[0].y,e[1].x,e[1].y);return m.distPoints(t[0].x,t[0].y,t[1].x,t[1].y)/i},getVectorAvg:function(e){return{x:e.map(function(e){return e.x}).reduce(m.sum)/e.length,y:e.map(function(e){return e.y}).reduce(m.sum)/e.length}},sum:function(e,t){return e+t},getTouches:function(e,t){return t=t||{left:0,top:0},Array.prototype.slice.call(e.touches).map(function(e){return{x:e.pageX-t.left,y:e.pageY-t.top}})},getScriptCallbacks:[],getScript:function(e,t,i,n){var o,s=m.getScriptCallbacks[e];function a(){o.removeEventListener("load",r,!1),o.removeEventListener("readystatechange",r,!1),o.removeEventListener("complete",r,!1),o.removeEventListener("error",l,!1),o.onload=o.onreadystatechange=null,o=null,o=null}function r(e,t){if(null!=o&&(t||!o.readyState||/loaded|complete/.test(o.readyState))){if(!t){for(var n=0;n<s.length;n++)s[n]&&s[n](),s[n]=null;i=null}a()}}function l(){i(),a(),i=null}if(0===d("script[src='"+e+"']").length){(s=m.getScriptCallbacks[e]=[]).push(t),o=document.createElement("script");var h=document.body.getElementsByTagName("script")[0];o.async=!0,o.setAttribute("data-cfasync","false"),!0===n&&o.setAttribute("type","module"),null!=h?(h.parentNode.insertBefore(o,h),h=null):document.body.appendChild(o),o.addEventListener("load",r,!1),o.addEventListener("readystatechange",r,!1),o.addEventListener("complete",r,!1),i&&o.addEventListener("error",l,!1),o.src=e+("MS"===m.prefix.dom?"?"+Math.random():"")}else s.push(t)},loadScript:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(i,n){var o=document.createElement("script");o.src=e,o.onload=function(e){t&&o.remove(),i(e)},o.onerror=function(){n(Error("Cannot load script at: ".concat(o.src)))},(document.head||document.documentElement).append(o)})},detectScriptLocation:function(){if(void 0===window[p.locationVar])d("script").each(function(){var e=d(this)[0].src;if((e.indexOf("/"+p.locationFile+".js")>-1||e.indexOf("/"+p.locationFile+".min.js")>-1||e.indexOf("js/"+p.locationFile+".")>-1)&&(e.indexOf("https://")>-1||e.indexOf("http://")>-1)){var t=e.split("/");window[p.locationVar]=t.slice(0,-2).join("/")}});else if(-1==window[p.locationVar].indexOf(":")){var e=document.createElement("a");e.href=window[p.locationVar],window[p.locationVar]=e.href,e=null}void 0!==window[p.locationVar]&&window[p.locationVar].length>2&&"/"!==window[p.locationVar].slice(-1)&&(window.window[p.locationVar]+="/")},disposeObject:function(e){return e&&e.dispose&&e.dispose(),e=null},log:function(){for(var e,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];!0===p.defaults.enableDebugLog&&window.console&&(e=console).log.a
264pply(e,function(e){if(Array.isArray(e))return c(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return c(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return c(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},color:{getBrightness:function(e){var t=e.replace("#","").match(/.{1,2}/g).map(function(e){return parseInt(e,16)});return .299*t[0]+.587*t[1]+.114*t[2]},isLight:function(e){return!m.color.isDark(e)},isDark:function(e){return 128>m.color.getBrightness(e)}},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isIOS:/(iPad|iPhone|iPod)/g.test(navigator.userAgent),isIPad:"iPad"===navigator.platform||void 0!==navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Mac/.test(navigator.platform),isMac:navigator.platform.toUpperCase().indexOf("MAC")>=0,isSafari:/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||window.safari.pushNotification).toString(),isIEUnsupported:!!navigator.userAgent.match(/(MSIE|Trident)/),isSafariWindows:function(){return!m.isMac&&m.
264isSafari},hasWebgl:function(){try{var e=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}catch(e){return!1}}(),hasES2022:void 0!==Array.prototype.at,canSupport3D:function(){var e=!0;try{if(!1==m.hasWebgl)e=!1,console.log("Proper Support for Canvas webgl 3D not detected!");else if(!1==m.hasES2022)e=!1,console.log("Proper Support for 3D not extpected in older browser!");else if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)e=!1,console.log("Proper Support for 3D not detected for IE!");else if(m.isSafariWindows())e=!1,console.log("Proper Support for 3D not detected for Safari!");else{var t=navigator.userAgent.toString().toLowerCase().match(/android\s([0-9\.]*)/i);(t=t?t[1]:void 0)&&(t=parseInt(t,10),!isNaN(t)&&t<9&&(e=!1,console.log("Proper Support for 3D not detected for Android below 9.0!")))}}catch(e){}return e},prefix:(o=window.getComputedStyle(document.documentElement,""),s=Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/)[1],{dom:"WebKit|Moz|MS".match(RegExp("("+s+")","i"))[1],lowercase:s,css:"-"+s+"-",js:s[0].toUpperCase()+s.substr(1)}),scrollIntoView:function(e,t,i){(t=t||e.parentNode).scrollTop=e.offsetTop+(!1===i?e.offsetHeight-t.offsetHeight:0),t.scrollLeft=e.offsetLeft-t.offsetLeft},getVisibleElements:function(e){var t=e.container,i=e.elements,n=e.visible||[],o=t.scrollTop,s=o+t.clientHeight;if(0==s)return n;var a=0,r=i.length-1,l=i[a],h=l.offsetTop+l.clientTop+l.clientHeight;if(h<o)for(;a<r;){var u=a+r>>1;(h=(l=i[u]).offsetTop+l.clientTop+l.clientHeight)>o?r=u:a=u+1}for(var p=a;p<i.length;p++)if((l=i[p]).offsetTop+l.clientTop<=s)n.push(p+1);else break;return n},getMouseDelta:function(e){var t=0;return null!=e.wheelDelta?t=e.wheelDelta:null!=e.detail&&(t=-e.detail),t},pan:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.startPoint,o=e.app.zoomValue,s=e.left+(!0===i?0:t.raw.x-n.raw.x),a=e.top+(!0===i?0:t.raw.y-n.raw.y);e.left=Math.ceil(m.limitAt(s,-e.shiftWidth,e.shiftWidth)),e.top=Math.ceil(m.limitAt(a,-e.shiftHeight,e.shiftHeight)),1===o&&(e.left=0,e.top=0),!1===i&&(e.startPoint=t)},elementIntersection:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e[0].getBoundingClientRect(),o=t[0].getBoundingClientRect(),s=Math.max(n.left,Math.floor(o.left)),a=Math.max(n.top,Math.floor(o.top)),r=Math.min(n.right,o.right),l=Math.min(n.bottom,o.bottom),h=Math.max(r-s,0),u=Math.max(l-a,0);return i?{left:Math.max(n.left-o.left,0),top:Math.max(n.top-o.top,0),width:h,height:u}:{left:s,top:a,right:r,bottom:l,width:h,height:u}}};m.isChromeExtension=function(){return 0===window.location.href.indexOf("chrome-extension://")};var v=/\x00+/g,y=/[\x01-\x1F]/g;m.removeNullCharacters=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof e?(warn("The argument for removeNullCharacters must be a string."),e):(t&&(e=e.replace(y," ")),e.replace(v,""))},p.hashFocusBookFound=!1,m.detectHash=function(){p.preParseHash=window.location.hash;var e=m.getSharePrefixes();-1==e.indexOf("")&&e.push(""),Array.prototype.forEach.call(e,function(e){var t=p.preParseHash,i="#"+e;if(t&&t.indexOf(i)>=0&&!1===p.hashFocusBookFound){i.length>1&&(t=t.split(i)[1]);var n=t.split("/")[0].replace("#","");if(n.length>0)try{var o,s=t.split("/")[1];if(null!=s&&(s=s.split("/")[0]),o=d("[data-df-slug="+n+"]"),0===o.length&&(o=d("[data-slug="+n+"]")),0===o.length&&(o=d("#df-"+n+",#"+n)),0===o.length&&(o=d("[data-_slug="+n+"]")),o.length>0&&o.is("._df_thumb,._df_button,._df_custom,._df_link,._df_book,.df-element,.dp-element")){o=d(o[0]),p.hashFocusBookFound=!0,s=parseInt(s,10),m.focusHash(o);var a=p.activeLightBox&&p.activeLightBox.app||o.data("df-app");if(null!=a)return a.gotoPage(s),m.focusHash(a.element),!1;null!=s&&o.attr("data-hash-page",s),o.addClass("df-hash-focused",!0),null!=o.data("lightbox")||null!=o.data("df-lightbox")?(p._isHashTriggered=!0,o.trigger("click"),p._isHashTriggered=!1):null!=o.attr("href")&&o.attr("href").indexOf(".pdf")>-1&&o.trigger("click")}}catch(e){console.log(e)}}})},m.focusHash=function(e){var t,i;null===(t=(i=e[0]).scrollIntoView)||void 0===t||t.call(i,{behavior:"smooth",block:"nearest",inline:"nearest"})},m.contain=function(e,t,i,n){var o=Math.min(i/e,n/t);return{width:e*o,height:t*o}},m.containUnStretched=function(e,t,i,n){var o=Math.min(1,i/e,n/t);return{width:e*o,height:t*o}},m.fallbackOptions=function(e){return void 0===e.share.mail&&(e.share.mail="mailto:?subject="+e.text.mailSubject+"&body="+e.text.mailBody),e.o
264penPage&&(e.openPage=parseInt(e.openPage,10)),e};var b=function(e){var t={},i={id:"",thumb:"",openPage:"data-hash-page,df-page,data-df-page,data-page,page",target:"",height:"",showDownloadControl:"data-download",source:"pdf-source,df-source,source",is3D:"webgl,is3d",viewerType:"viewertype,viewer-type",pageMode:"pagemode"};for(var n in i)for(var o=(n+","+i[n]).split(","),s=0;s<o.length;s++){var a=o[s];if(""!==a){var r=e.data(a);if(null!==r&&""!==r&&void 0!==r||null!==(r=e.attr(a))&&""!==r&&void 0!==r){t[n]=r;break}}}return e.removeAttr("data-hash-page"),t};m.getOptions=function(e){void 0==(e=d(e)).data("df-option")&void 0==e.data("option")&&e.data("df-option","option_"+e.attr("id")),void 0!==e.attr("source")&&e.data("df-source",e.attr("source"));var t=e.data("df-option")||e.data("option"),i=void 0;i=(void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"?t:null==t||""===t||null==window[t]?{}:window[t];var n=b(e);return d.extend(!0,{},i,n)},m.isTrue=function(e){return"true"===e||!0===e},m.parseInt=function(e){return parseInt(e,10)},m.parseFloat=function(e){return parseFloat(e)},m.parseIntIfExists=function(e){return void 0!==e&&(e=parseInt(e,10)),e},m.parseFloatIfExists=function(e){return void 0!==e&&(e=parseFloat(e)),e},m.parseBoolIfExists=function(e){return void 0!==e&&(e=m.isTrue(e)),e},m.getCurveAngle=function(e,t){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e?(i=t>135?180-(180-t)*2:t>45?t-45:0,i=m.limitAt(i,n,180)):(i=t<45?2*t:t<135?t+45:180,i=m.limitAt(i,0,180-n)),i},m.sanitizeOptions=function(e){if(e.showDownloadControl=m.parseBoolIfExists(e.showDownloadControl),e.showSearchControl=m.parseBoolIfExists(e.showSearchControl),e.showPrintControl=m.parseBoolIfExists(e.showPrintControl),e.flipbook3DTiltAngleLeft=m.parseIntIfExists(e.flipbook3DTiltAngleLeft),e.flipbook3DTiltAngleUp=m.parseIntIfExists(e.flipbook3DTiltAngleUp),e.paddingLeft=m.parseIntIfExists(e.paddingLeft),e.paddingRight=m.parseIntIfExists(e.paddingRight),e.paddingTop=m.parseIntIfExists(e.paddingTop),e.paddingBottom=m.parseIntIfExists(e.paddingBottom),e.duration=m.parseIntIfExists(e.duration),e.rangeChunkSize=m.parseIntIfExists(e.rangeChunkSize),e.maxTextureSize=m.parseIntIfExists(e.maxTextureSize),e.linkTarget=m.parseIntIfExists(e.linkTarget),e.zoomRatio=m.parseFloatIfExists(e.zoomRatio),e.enableAnalytics=m.parseBoolIfExists(e.enableAnalytics),e.autoPlay=m.parseBoolIfExists(e.autoPlay),e.autoPlayStart=m.parseBoolIfExists(e.autoPlayStart),e.autoPlayDuration=m.parseIntIfExists(e.autoPlayDuration),void 0!==e.loadMoreCount&&(e.loadMoreCount=m.parseInt(e.loadMoreCount),(isNaN(e.loadMoreCount)||0===e.loadMoreCount)&&(e.loadMoreCount=-1)),null!=e.source&&(Array===e.source.constructor||Array.isArray(e.source)||e.source instanceof Array))for(var t=0;t<e.source.length;t++)e.source[t]=m.httpsCorrection(e.source[t]);else e.source=m.httpsCorrection(e.source);return e},m.finalizeOptions=function(e){return e},m.urlify=function(e){for(var t,i,n=/[a-zA-Z0-9][^\s,]{3,}\.[^\s,]+[a-zA-Z0-9]/gi,o=[];t=n.exec(e);){var s=t[0];1==(s.match(/@/g)||[]).length?s.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+/gi)&&o.push({index:t.index,length:s.length,text:s}):s.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*/g)&&(0===(i=s.toLowerCase()).indexOf("http:")||0===i.indexOf("https:")||0===i.indexOf("www."))&&o.push({index:t.index,length:s.length,text:s})}return o},m.oldurlify=function(e){return e.replace(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;
264:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/g,function(e,t,i,n,o){var s=e=e.toLowerCase();if(e.indexOf(":")>0&&-1===e.indexOf("http:")&&-1===e.indexOf("https:"))return m.log("AutoLink Rejected: "+s+" for "+e),e;if(0===e.indexOf("www."))s="http://"+e;else if(0===e.indexOf("http://")||0===e.indexOf("https://"));else if(0===e.indexOf("mailto:"));else if(e.indexOf("@")>0&&(s="mailto:"+e,null===e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)))return m.log("AutoLink Rejected: "+s+" for "+e),e;return m.log("AutoLink: "+s+" for "+e),'<a href="'+s+'" class="df-autolink" target="_blank">'+e+"</a>"})},m.supportsPassive=!1;try{var w=Object.defineProperty({},"passive",{get:function(){m.supportsPassive=!0}});window.addEventListener("testPassive",null,w),window.removeEventListener("testPassive",null,w)}catch(e){}p.parseCSSElements=function(){d(".dvcss").each(function(){var e,t=d(this),i=function(e){for(var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dvcss_e_",n=e.classList,o=0;o<n.length;o++)if(0===(t=n[o]).indexOf(i))return t;return null}(t[0]);t.removeClass(i).removeClass("dvcss"),i=i.replace("dvcss_e_","");try{e=JSON.parse(atob(i))}catch(e){}if(e){var n="df_option_"+e.id;window[n]=d.extend(!0,{},window[n],e),t.addClass("df-element"),"none"!==e.lightbox&&(t.attr("data-df-lightbox",void 0===e.lightbox?"custom":e.lightbox),"thumb"==e.lightbox&&t.attr("data-df-thumb",e.pdfThumb),e.thumbLayout&&t.attr("data-df-thumb-layout",e.thumbLayout),e.apl&&t.attr("apl",e.apl)),t.data("df-option",n),t.attr("data-df-slug",e.slug),t.attr("id","df_"+e.id)}})},p.parseThumbs=function(e){e.element.html(""),(null==e.thumbURL||""==e.thumbURL.toString().trim())&&(e.element.addClass("df-thumb-not-found"),e.thumbURL=p.defaults.popupThumbPlaceholder);var t=d("<span class='df-book-title'>").text(e.title),i=d("<div class='df-book-wrapper'>").appendTo(e.element);i.append(d("<div class='df-book-page1'>")),i.append(d("<div class='df-book-page2'>"));var n=d("<div class='df-book-cover'>").append(t).appendTo(i),o=e.element.hasClass("df-skip-lazy"),s=d('<img width="210px" height="297px" class="df-lazy" alt=""/>');s.attr("alt",e.title),n.prepend(s),o?(s.attr("src",e.thumbURL),s.removeClass("df-lazy")):(s.attr("data-src",e.thumbURL),s.attr("src",p.defaults.popupThumbPlaceholder),p.addLazyElement(s[0])),!0===p.defaults.displayLightboxPlayIcon&&n.addClass("df-icon-play-popup"),"book-title-top"===e.thumbLayout?t.prependTo(e.element):("book-title-bottom"===e.thumbLayout||"cover-title"===e.thumbLayout)&&(e.hasShelf?e.thumbLayout="book-title-fixed":t.appendTo(e.element),!0===p.defaults.displayLightboxPlayIcon&&(e.element.removeClass("df-icon-play-popup"),i.addClass("df-icon-play-popup"))),e.element.addClass("df-tl-"+e.thumbLayout),e.element.attr("title",e.title)},p.initId=10,p.embeds=[],p.activeEmbeds=[],p.removeEmbeds=[],p.removeEmbedsLimit=m.isMobile?1:2,p.parseNormalElements=function(){d(".df-posts").each(function(){if(!1!==p.defaults.loadMoreCount&&-1!==p.defaults.loadMoreCount){var e=d(this);if("true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=0,i=e.find(".df-element"),n=i.length;i.each(function(){++t>p.defaults.loadMoreCount&&d(this).attr("skip-parse","true")}),n>p.defaults.loadMoreCount&&e.append("<div class='df-load-more-button-wrapper'><div class='df-load-more-button'>Load More..</div></div>")}}}),p.triggerId=10,d(".df-element").each(function(){var e=d(this);if("true"!==e.attr("skip-parse")&&"true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=e.data("df-lightbox")||e.data("lightbox");if(void 0===t)e.addClass("df-lazy-embed"),p.addLazyElement(e[0]);else if(e.addClass("df-popup-"+t),"thumb"===t){var i=e.data("df-thumb-layout")||p.defaults.thumbLayout,n=m.httpsCorrection(e.data("df-thumb"));e.removeAttr("data-thumb").removeAttr("data-thumb-layout");var o=e.text().trim();(void 0===o||""===o)&&(o="Click to Open");var s=e.parent().hasClass("df-has-shelf");p.parseThumbs({element:e,thumbURL:n,title:o,thumbLayout:i,hasShelf:s}),s&&e.after(d("<df-post-shelf>"))}else"button"===t&&p.defaults.buttonClass&&e.addClass(p.defaults.buttonClass);var a=e.attr("data-trigger");null!=a&&a.length>1&&(a=a.split(","),p.triggerId++,a.forEach(function(t){e.attr("df-trigger-id",p.triggerId),d("#"+t).addClass("df-trigger").attr("df-trigger",p.triggerId)}))}}),p.handleLazy=function(){var e;if(p.removeEmbeds.length>p.removeEmbedsLimit&&(e=p.removeEmbeds.shift())){var t=d("[initID='"+e+"']");if(t.length>0){var i=t.data("df-app");if(i){t.attr("data-df-page",i.currentPageNumber),m.log("Removed app id "+e),i.dispose(),i=null;var n=p.activeEmbeds.indexOf(e);n>-1&&p.activeEmbeds.splice(n,1)}}}if(e=p.embeds.shift()){var o=d("[initID='"+e+"']");if(o.length>0){if(o.is("img"))o.hasClass("df-lazy")?(o.attr("src",o.attr("data-src")),o.removeAttr("data-src"),o.removeClass("df-lazy"),p.lazyObserver.unobserve(o[0])):m.log("Prevent this"),p.handleLazy();else{var s=o.data("df-app");null==s?new p.Application({element:o}):s.softInit(),m.log("Created app id "+e),p.activeEmbeds.push(e)}}}p.removeEmbeds.length<=p.removeEmbedsLimit&&0==p.embeds.length&&(p.checkRequestQueue=null)}},p.lazyObserver={observe:function(e){(e=d(e)).is("img")?e.hasClass("df-lazy")&&(e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.removeClass("df-lazy")):new p.Application({element:e})}},"function"==typeof IntersectionObserver&&(p.lazyObserver=new IntersectionObserver(function(e,t){e.forEach(function(e){var t,i=d(e.target),n=i.attr("initID");e.isIntersecting?(!i.attr("initID")&&(i.attr("initID",p.initId),n=p.initId.toString(),p.initId++),(t=p.removeEmbeds.indexOf(n))>-1?(p.removeEmbeds.splice(t,1),m.log("Removed id "+n+"from Removal list")):-1==(t=p.embeds.indexOf(n))&&(p.embeds.push(n),m.log("Added id "+n+"to Add list"))):n&&((t=p.embeds.indexOf(n))>-1?(p.embeds.splice(t,1),m.log("Removed id "+n+" from Add list")):-1==(t=p.removeEmbeds.indexOf(n))&&(p.removeEmbeds.push(n),m.log("Added id "+n+" to Removal list"))),P=0,(p.removeEmbeds.length>p.removeEmbedsLimit||p.embeds.length>0)&&null==p.checkRequestQueue&&(p.checkRequestQueue=function(){P++,p.checkRequestQueue&&requestAnimationFrame(function(){p&&p.checkRequestQueue&&p.checkRequestQueue()}),P>20&&(P=0,p.handleLazy())},p.checkRequestQueue())})}));var P=0;p.addLazyElement=function(e){p.lazyObserver.observe(e)},p.parseElements=m.parseElements=function(){p.parseCSSElements(),p.parseNormalElements()},p.initUtils=function(){m.detectScriptLocation();var e=d("body");(m.isSafari||m.isIOS)&&e.addClass("df-ios"),e.on("click",function(){}),e.on("click",".df-posts .df-load-more-button",function(){var e=d(this).closest(".df-posts");if(e.length>0){var t=0;e.find(".df-element").each(function(){var e=d(this);
264"true"===e.attr("skip-parse")&&(t<p.defaults.loadMoreCount&&e.removeAttr("skip-parse"),t++)}),p.parseNormalElements()}}),p.defaults.shelfImage&&""!=p.defaults.shelfImage&&e.append("<style>.df-has-shelf df-post-shelf:before, .df-has-shelf df-post-shelf:after{background-image: url('"+p.defaults.shelfImage+"');}</style>")};var S=p.jQuery,E=p.utils,x=/*#__PURE__*/function(){var e;function t(e,i){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.pages=[],this.app=i,this.parentElement=this.app.viewerContainer;var n="df-viewer "+(e.viewerClass||"");this.element=S("<div>",{class:n}),this.parentElement.append(this.element),this.wrapper=S("<div>",{class:"df-viewer-wrapper"}),this.element.append(this.wrapper),this.oldBasePageNumber=0,this.pages=[],this.minZoom=1,this.maxZoom=4,this.swipeThreshold=20,this.stageDOM=null,this.events={},this.arrowKeysAction=e.arrowKeysAction,this.clickAction=e.clickAction,this.scrollAction=e.scrollAction,this.dblClickAction=e.dblClickAction,this.pageBuffer=[],this.pageBufferSize=10,this.afterConstructor()}return e=[{key:"afterConstructor",value:function(){}},{key:"init",value:function(){}},{key:"softDispose",value:function(){}},{key:"updateBuffer",value:function(e){}},{key:"pageResetCallback",value:function(e){}},{key:"initCustomControls",value:function(){}},{key:"_getInnerWidth",value:function(){return this.app.dimensions.containerWidth-this.app.dimensions.padding.width-this.app.dimensions.offset.width}},{key:"_getInnerHeight",value:function(){return this.app.dimensions.maxHeight-this.app.dimensions.padding.height}},{key:"_getOuterHeight",value:function(e){return e}},{key:"dispose",value:function(){this.stageDOM&&(this.stageDOM.removeEventListener("mousemove",this.events.mousemove,!1),this.stageDOM.removeEventListener("mousedown",this.events.mousedown,!1),this.stageDOM.removeEventListener("mouseup",this.events.mouseup,!1),this.stageDOM.removeEventListener("touchmove",this.events.mousemove,!1),this.stageDOM.removeEventListener("touchstart",this.events.mousedown,!1),this.stageDOM.removeEventListener("touchend",this.events.mouseup,!1),this.stageDOM.removeEventListener("dblclick",this.events.dblclick,!1),this.stageDOM.removeEventListener("scroll",this.events.scroll,!1),this.stageDOM.removeEventListener("mousewheel",this.events.mousewheel,!1),this.stageDOM.removeEventListener("DOMMouseScroll",this.events.mousewheel,!1)),this.events=null,this.stageDOM=null,this.element.remove()}},{key:"checkDocumentPageSizes",value:function(){}},{key:"getViewerPageNumber",value:function(e){return e}},{key:"getDocumentPageNumber",value:function(e){return e}},{key:"getRenderContext",value:function(e,t){var i=this.app,n=i.provider,o=t.pageNumber,s=E.ifdef(t.textureTarget,p.TEXTURE_TARGET.VIEWER);i.dimensions.pageFit;var a=n.viewPorts[o],r=i.viewer.getTextureSize(t),l=null;if(l=s===p.TEXTURE_TARGET.THUMB?i.thumbSize:Math.floor(r.height),void 0===n.getCache(o,l)){var h=r.height/a.height,u=document.createElement("canvas"),c=this.filterViewPort(e.getViewport({scale:h,rotation:e._pageInfo.rotate+i.options.pageRotation}),o);s===p.TEXTURE_TARGET.THUMB&&(h=c.width/c.height>180/i.thumbSize?180*h/c.width:h*i.thumbSize/c.height,c=this.filterViewPort(e.getViewport({scale:h,rotation:e._pageInfo.rotate+i.options.pageRotation}),o)),u.height=Math.floor(c.height),u.width=Math.floor(c.width);var d=Math.abs(u.width-r.width)/r.width*100;return d>.001&&d<2&&(u.width=Math.floor(r.width),u.height=Math.floor(r.height)),i.viewer.filterViewPortCanvas(c,u,o),{canvas:u,canvasContext:u.getContext("2d",{willReadFrequently:!0===p.defaults.canvasWillReadFrequently}),viewport:c}}}},{key:"filterViewPort",value:function(e,t){return e}},{key:"getViewPort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.app.provider.viewPorts[e];return t?null!=i?i:this.app.provider.defaultPage.viewPort:i}},{key:"pagesReady",value:function(){this.app.executeCallback("onPagesReady")}},{key:"onReady",value:function(){}},{key:"filterViewPortCanvas",value:function(e){}},{key:"finalizeAnnotations",value:function(){}},{key:"finalizeTextContent",value:function(){}},{key:"updateTextContent",value:function(e){void 0==e&&(e=this.getBasePage(e)),this.app.provider.processTextContent(e,this.getTextElement(e,!0))}},{key:"isActivePage",value:function(e){return e===this.app.currentPageNumber}},{key:"initEvents",value:function(){var e=this.stageDOM=E.ifdef(this.stageDOM,this.parentElement[0]);e&&(e.addEventListener("mousemove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("mousedown",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("mouseup",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("touchmove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("touchstart",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("touchend",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("dblclick",this.events.dblclick=this.dblclick.bind(this),!1),e.addEventListener("scroll",this.events.scroll=this.onScroll.bind(this),!1),e.addEventListener("mousewheel",this.events.mousewheel=this.mouseWheel.bind(this),!1),e.addEventListener("DOMMouseScroll",this.events.mousewheel=this.mouseWheel.bind(this),!1)),this.startTouches=null,this.lastScale=null,this.startPoint=null}},{key:"refresh",value:function(){}},{key:"reset",value:function(){}},{key:"eventToPoint",value:function(e){var t={x:e.clientX,y:e.clientY};return t.x=t.x-this.app.viewerContainer[0].getBoundingClientRect().left,t.y=t.y-this.app.viewerContainer[0].getBoundingClientRect().top,{raw:t}}},{key:"mouseMove",value:function(e){e=E.fixMouseEvent(e),this.pinchMove(e),!0===this.pinchZoomDirty&&e.preventDefault(),this.startPoint&&!0!=this.pinchZoomDirty&&(this.pan(this.eventToPoint(e)),e.preventDefault())}},{key:"mouseDown",value:function(e){e=E.fixMouseEvent(e),this.pinchDown(e),this.startPoint=this.eventToPoint(e)}},{key:"mouseUp",value:function(e){e=E.fixMouseEvent(e),!0===this.pinchZoomDirty&&e.preventDefault();var t=this.eventToPoint(e),i=e.target||e.originalTarget,n=this.startPoint&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==i.nodeName;!0===e.ctrlKey&&n&&this.zoomOnPoint(t),this.pinchUp(e),this.startPoint=null}},{key:"pinchDown",value:function(e){null!=e.touches&&2==e.touches.length&&null==this.startTouches&&(this.startTouches=E.getTouches(e),this.app.viewer.zoomCenter=E.getVectorAvg(E.getTouches(e,this.parentElement.offset())),this.lastScale=1)}},{key:"pinchUp",value:function(e){null!=e.touches&&e.touches.length<2&&!0==this.pinchZoomDirty&&(this.app.viewer.lastScale=this.lastScale,this.app.container.removeClass("df-pinch-zoom"),this.updateTemporaryScale(!0),this.app.zoom(),this.lastScale=null,this.app.viewer.canSwipe=!1,this.pinchZoomDirty=!1,this.app.viewer._pinchZoomLastScale=null,this.startTouches=null)}},{key:"pinchMove",value:function(e){if(null!=e.touches&&2==e.touches.length&&null!=this.startTouches){this.pinchZoomDirty=!0,this.app.container.addClass("df-pinch-zoom");var t=E.calculateScale(this.startTouches,E.getTouches(e));this.lastScale,this.lastScale=t,this.app.viewer.pinchZoomUpdateScale=E.limitAt(t,this.app.viewer.minZoom/this.app.zoomValue,this.app.viewer.maxZoom/this.app.zoomValue),this.app.viewer._pinchZoomLastScale!=this.app.viewer.pinchZoomUpdateScale&&(this.app.viewer.pinchZoomRequestStatus=p.REQUEST_STATUS.ON,this.app.viewer._pinchZoomLastScale=this.app.viewer.pinchZoomUpdateScale),e.preventDefault();return}}},{key:"updateTemporaryScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===e)this.parentElement[0].style.transform="none";else if(this.app.viewer.zoomCenter){var t=this.app.viewer.pinchZoomUpdateScale;this.parentElement[0].style.transformOrigin=this.app.viewer.zoomCenter.x+"px "+this.app.viewer.zoomCenter.y+"px",this.parentElement[0].style.transform="scale3d("+t+","+t+",1)"}}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.panRequestStatus=p.REQUEST_STATUS.ON,E.pan(this,e,t)}},{key:"updatePan",value:function(){this.element.css({transform:"translate3d("+this.left+"px,"+this.top+"px,0)"})}},{key:"dblclick",value:function(e){}},{key:"onScroll",value:function(e){}},{key:"mouseWheel",value:function(e){var t=this.app,i=E.getMouseDelta(e),n=!0===e.ctrlKey,o=t.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.ZOOM&&(!0===t.options.isLightBox||!0===t.isFullscreen);n||o?(i>0||i<0)&&(e.preventDefault(),t.viewer.zoomCenter=this.eventToPoint(e).raw,t.zoom(i),t.ui.update()):t.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.NAV&&(i>0?t.next():i<0&&t.prev())}},{key:"zoomOnPoint",value:function(e){this.app.viewer.zoomCenter=e.raw,this.app.zoom(1)}},{key:"getVisiblePages",value:function(){return this.visiblePagesCache=[],{main:this.visiblePagesCache,buffer:[]}}},{key:"getBasePage",value:function(){return this.app.currentPageNumber}},{key:"isFirstPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e}},{key:"isLastPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),e===this.app.pageCount}},{key:"isEdgePage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e||e===this.app.pageCount}},{key:"checkRequestQueue",value:function(){var e=p.REQUEST_STATUS;this.panRequestStatus===e.ON&&(this.updatePan(),this.panRequestStatus=e.OFF),this.app.viewer.pinchZoomRequestStatus===e.ON&&(this.app.viewer.updateTemporaryScale(),this.app.viewer.pinchZoomRequestStatus=e.OFF)}},{key:"isAnimating",value:function(){return!1}},{key:"updatePendingStatusClass",value:function(e){void 0===e&&(e=this.isAnimating()),this.app.container.toggleClass("df-pending",e)}},{key:"initPages",value:function(){}},{key:"resize",value:function(){}},{key:"determinePageMode",value:function(){}},{key:"zoom",value:function(){}},{key:"gotoPageCallBack",value:function(){this.requestRefresh()}},{key:"requestRefresh",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.app.refreshRequestStatus=!0===e?p.REQUEST_STATUS.ON:p.REQUEST_STATUS.OFF}},{key:"getPageByNumber",value:function(e){var t=this.pages,i=void 0;if(this.app.isValidPage(e)){for(var n=0;n<t.length;n++)if(e===t[n].pageNumber){i=t[n];break}}return i}},{key:"changeAnnotation",value:function(){return!1}},{key:"getAnnotationElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getPageByNumber(e);if(void 0!==i)return void 0===i.annotationElement&&(i.annotationElement=S("<div class='df-link-content'>"),i.contentLayer.append(i.annotationElement)),!0===t&&i.annotationElement.html(""),i.annotationElement[0]}},{key:"getTextElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getPageByNumber(e);if(void 0!==i)return void 0===i.textElement&&(i.textElement=S("<div class='df-text-content'>"),i.contentLayer.append(i.textElement)),!0===t&&(i.textElement.html(""),i.textElement.siblings(".df-auto-link-content").html("")),i.textElement[0]}},{key:"render",value:function(){}},{key:"checkPageLoading",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!0,i=this.getVisiblePages().main,n=!0===e?i.length:this.isBooklet?1:2;n=Math.min(n,i.length);for(var o=0;o<n;
264o++){var s=this.getPageByNumber(i[o]);s&&(t=s.textureLoaded&&t)}return this.element.toggleClass("df-loading",!t),t}},{key:"textureLoadedCallback",value:function(e){}},{key:"handleZoom",value:function(){}},{key:"getTextureSize",value:function(e){console.error("Texture calculation missing!")}},{key:"textureHeightLimit",value:function(e){return E.limitAt(e,1,this.app.dimensions.maxTextureHeight)}},{key:"textureWidthLimit",value:function(e){return E.limitAt(e,1,this.app.dimensions.maxTextureWidth)}},{key:"setPage",value:function(e){E.log("Set Page detected",e.pageNumber);var t=this.getPageByNumber(e.pageNumber);return!!t&&(e.callback=this.textureLoadedCallback.bind(this),t.loadTexture(e),this.updateBuffer(t),!0)}},{key:"cleanPage",value:function(e){return!0}},{key:"validatePageChange",value:function(e){return e!==this.app.currentPageNumber}},{key:"afterControlUpdate",value:function(){}},{key:"searchPage",value:function(e){return{include:!0,label:this.app.provider.getLabelforPage(e)}}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}();function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function T(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,i){return t&&T(e.prototype,t),i&&T(e,i),e}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=p.utils,N=p.jQuery,_=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(n,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=O(n);return e=t?Reflect.construct(i,arguments,O(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)});function n(e){var t;return C(this,n),(t=i.call(this)).canvasMode=null,e&&e.parentElement&&(t.parentElement=e.parentElement),t.init(),t}return k(n,[{key:"init",value:function(){var e=this.element=N("<div>",{class:"df-page"});e[0].appendChild(this.contentLayer[0]),this.texture=new Image,this.parentElement&&this.parentElement[0].append(e[0])}},{key:"resetContent",value:function(){void 0!==this.annotationElement&&this.annotationElement.html(""),void 0!==this.textElement&&this.textElement.html("")}}
264,{key:"setLoading",value:function(){this.element.toggleClass("df-loading",!0!==this.textureLoaded)}},{key:"loadTexture",value:function(e){var t=this,i=e.texture,n=e.callback;function o(){t.textureSrc=i,t.element.css({backgroundImage:L.bgImage(i)}),t.updateTextureLoadStatus(!0),"function"==typeof n&&n(e)}null===t.canvasMode&&i&&"CANVAS"===i.nodeName&&(t.canvasMode=!0),!0===t.canvasMode?(t.element.find("canvas").remove(),i!==t.textureLoadFallback&&(t.textureSrc=i,t.element.append(N(i))),t.updateTextureLoadStatus(!0),"function"==typeof n&&n(e)):i===t.textureLoadFallback?o():(t.texture.onload=o,t.texture.src=i)}},{key:"updateCSS",value:function(e){this.element.css(e)}},{key:"resetCSS",value:function(){this.element.css({transform:"",boxShadow:"",display:"block"})}}]),n}(/*#__PURE__*/function(){function e(){C(this,e),this.textureLoadFallback="blank",this.textureStamp="-1",this.textureLoaded=!1,this.texture="blank",this.textureSrc="blank",this.pageNumber=void 0,this.contentLayer=N("<div>",{class:"df-page-content"})}return k(e,[{key:"reset",value:function(){this.resetTexture(),this.resetContent()}},{key:"resetTexture",value:function(){this.textureLoaded=!1,this.textureStamp="-1",this.loadTexture({texture:this.textureLoadFallback}),this.contentLayer.removeClass("df-content-loaded")}},{key:"clearTexture",value:function(){this.loadTexture({texture:this.textureLoadFallback})}},{key:"resetContent",value:function(){}},{key:"loadTexture",value:function(e){}},{key:"getTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.textureSrc;return!0===e&&t&&t.cloneNode&&(t=t.cloneNode()).getContext&&t.getContext("2d").drawImage(this.textureSrc,0,0),t}}
264,{key:"setLoading",value:function(){}},{key:"updateTextureLoadStatus",value:function(e){this.textureLoaded=!0===e,L.log((!0===this.textureLoaded?"Loaded ":"Loading ")+this.textureStamp+" for "+this.pageNumber),this.contentLayer.toggleClass("df-content-loaded",!0===e),this.setLoading()}},{key:"changeTexture",value:function(e,t){var i=e+"|"+t;return this.textureStamp!==i&&(L.log("Page "+e+" : texture changed from - "+this.textureStamp+" to "+i),this.textureLoaded=!1,this.textureStamp=i,this.updateTextureLoadStatus(!1),!0)}}]),e}());function I(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t,i){return(A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=p.jQuery,F=p.utils,B=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(o,e);var t,i,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=M(o);return e=t?Reflect.construct(i,arguments,M(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:I(this)});function o(e,t){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e.viewerClass="df-reader",t.options.mouseScrollAction=p.MOUSE_SCROLL_ACTIONS.NONE,(i=n.call(this,e,t)).app.jumpStep=1,i.minZoom=.25,i.stackCount=i.app.pageCount,i.app.options.paddingLeft=0,i.app.options.paddingRight=0,i.app.options.paddingTop=10,i.app.options.paddingBottom=!0===i.app.options.controlsFloating?20:10,i.app.pageScaling=i.app.options.pageScale,i.acceptAppMouseEvents=!0,i.scrollStatus=p.REQUEST_STATUS.OFF,i.deltaPanX=0,i.deltaPanY=0,t._viewerPrepared(),i.zoomViewer=I(i),i}return i=[{key:"init",value:function(){A(M(o.prototype),"init",this).call(this),this.initEvents(),this.initPages(),this.initScrollBar()}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],A(M(o.prototype),"initEvents",this).call(this)}},{key:"initPages",value:function(){this.stackCount=this.app.pageCount;for(var e=0;e<this.stackCount;e++){var t=new _({parentElement:this.wrapper});t.index=e,t.viewer=this,this.pages.push(t)}}},{key:"initScrollBar",value:function(){this.scrollBar=D("<div class='df-reader-scrollbar'>"),this.scrollBar.appendTo(this.app.container),this.scrollPageNumber=D("<div class='df-reader-scroll-page-number'>").appendTo(this.app.container),this.scrollPageNumberCurrent=D("<div>").appendTo(this.scrollPageNumber),this.scrollPageNumberTotal=D("<div class='df-reader-scroll-page-number-total'>").appendTo(this.scrollPageNumber)}},{key:"afterControlUpdate",value:function(){if(void 0!==this.scrollBar){var e=this.app.getCurrentLabel();this.scrollBar.text(e),this.app.provider.pageLabels?(this.scrollPageNumberCurrent.text(e),this.scrollPageNumberTotal.text("("+this.app.currentPageNumber+" of "+this.app.pageCount+")")):(this.scrollPageNumberCurrent.text(e),this.scrollPageNumberTotal.text("of "+this.app.pageCount))}}},{key:"updateBuffer",value:function(e){if("-1"!==e.textureStamp&&void 0!==e.pageNumber){for(var t=e.pageNumber,i=e.pageNumber,n=0,o=0;o<this.pageBuffer.length;o++){var s=this.pageBuffer[o].pageNumber;if(t===s){F.log("Page "+t+" already in buffer, skipping");return}Math.abs(this.app.currentPageNumber-s)>Math.abs(this.app.currentPageNumber-i)&&(i=s,n=o)}this.pageBuffer.push(e),this.pageBuffer.length>this.pageBufferSize&&(F.log("Farthest buffer: "+i),this.pageBuffer[n].reset(),this.pageBuffer.splice(n,1))}}},{key:"initCustomControls",value:function(){var e=this.app.ui.controls;e.openRight.hide(),e.openLeft.hide()}}
264,{key:"dispose",value:function(){A(M(o.prototype),"dispose",this).call(this),this.scrollBar&&this.scrollBar.remove(),this.scrollPageNumber&&this.scrollPageNumber.remove(),this.element.remove()}},{key:"_getInnerHeight",value:function(){A(M(o.prototype),"_getInnerHeight",this).call(this);var e=this.app.dimensions.maxHeight-this.app.dimensions.padding.height,t=this.app.dimensions.defaultPage.viewPort,i=this.app.dimensions.containerWidth-20-this.app.dimensions.padding.width;this.app.pageScaling===p.PAGE_SCALE.ACTUAL&&(i=1*this.app.provider.defaultPage.viewPort.width);var n=e;return this.app.pageScaling===p.PAGE_SCALE.PAGE_WIDTH?n=100*t.height:this.app.pageScaling===p.PAGE_SCALE.AUTO?n=1.5*t.height:this.app.pageScaling===p.PAGE_SCALE.ACTUAL&&(n=1*t.height),n-=2,this._containCover=F.contain(t.width,t.height,i,n),n=Math.min(e,this._containCover.height+2),this.app.pageScaleValue=this._containCover.height/t.height,this.app.dimensions.isFixedHeight?e:n}},{key:"handleZoom",value:function(){var e=this.app,t=this.maxZoom=4,i=e.zoomValue;!0===e.pendingZoom&&null!=e.zoomDelta?i=e.zoomDelta>0?i*e.options.zoomRatio:i/e.options.zoomRatio:null!=this.lastScale&&(i*=this.lastScale,this.lastScale=null),i=F.limitAt(i,this.minZoom,t),e.zoomValueChange=i/e.zoomValue,e.zoomChanged=e.zoomValue!==i,e.zoomValue=i}},{key:"resize",value:function(){var e=this.app;e.dimensions;var t=e.dimensions.padding,i=this.shiftHeight=0;this.element.css({top:-i,bottom:-i,right:-0,left:-0,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left});for(var n=this.getVisiblePages().main[0]-1,o=(n=this.pages[n].element[0]).getBoundingClientRect(),s=this.parentElement[0].getBoundingClientRect(),a=0;a<this.pages.length;a++){var r=this.pages[a],l=this.getViewPort(a+1,!0),h=r.element[0].style;h.height=Math.floor(l.height*e.pageScaleValue*e.zoomValue)+"px",h.width=Math.floor(l.width*e.pageScaleValue*e.zoomValue)+"px"}if(this.oldScrollHeight!=this.element[0].scrollHeight&&void 0!==this.oldScrollHeight){var u,p=this.element[0].scrollHeight/this.oldScrollHeight;this.skipScrollCheck=!0;var c=n.offsetTop+n.clientTop-(o.top-s.top+n.clientTop)*p,d=n.offsetLeft+n.clientLeft-(o.left-s.left+n.clientLeft)*p;c+=(p-1)*10/2,d+=(p-1)*10/2,this.zoomCenter=null!==(u=this.zoomCenter)&&void 0!==u?u:{x:0,y:0},c+=(p-1)*this.zoomCenter.y,d+=(p-1)*this.zoomCenter.x,this.zoomCenter=null,this.element[0].scrollTop=c,this.element[0].scrollLeft=d,this.skipScrollCheck=!1}this.oldScrollHeight=this.element[0].scrollHeight,this.scrollBar[0].style.transform="none",this.updateScrollBar()}},{key:"onReady",value:function(){this.gotoPageCallBack(),this.oldScrollHeight=this.element[0].scrollHeight}},{key:"refresh",value:function(){for(var e=this.app,t=this.getVisiblePages().main,i=0;i<t.length;i++){var n=void 0,o=t[i];n=this.pages[o-1],o!==n.pageNumber&&(n.resetTexture(),this.app.textureRequestStatus=p.REQUEST_STATUS.ON),n.element.attr("number",o),n.pageNumber=o}this.requestRefresh(!1),e.textureRequestStatus=p.REQUEST_STATUS.ON}},{key:"isAnimating",value:function(){return this.scrollStatus===p.REQUEST_STATUS.ON||this.scrollStatus===p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){A(M(o.prototype),"checkRequestQueue",this).call(this),this.scrollStatus===p.REQUEST_STATUS.ON&&(this.scrollStatus=p.REQUEST_STATUS.OFF),this.scrollStatus===p.REQUEST_STATUS.COUNT&&(this.scrollStatus=p.REQUEST_STATUS.ON)}},{key:"isActivePage",value:function(e){return void 0!==this.visiblePagesCache&&this.visiblePagesCache.includes(e)}},{key:"getVisiblePages",value:function(){var e=F.getVisibleElements({container:this.element[0],elements:this.wrapper[0].children});return e=0===e.length?[this.app.currentPageNumber]:e.splice(0,this.pageBufferSize),this.visiblePagesCache=e,{main:e,buffer:[]}}},{key:"getPageByNumber",value:function(e){var t=this.pages[e-1];return void 0===t&&F.log("Page Not found for: "+e),t}},{key:"onScroll",value:function(e){for(var t=this.element[0].scrollTop+this.app.dimensions.containerHeight/2,i=this.getVisiblePages().main,n=i[0],o=0;o<i.length;o++){n=i[o];var s=this.pages[n-1].element[0],a=s.offsetTop+s.clientTop;if(a<=t&&s.clientHeight+a>=t)break;
264if(o>0&&a>t&&s.clientHeight+a>=t){n=i[o-1];break}}this.skipScrollIntoView=!0,this.app.gotoPage(n),this.skipScrollIntoView=!1,this.updateScrollBar(),e.preventDefault&&e.preventDefault(),e.stopPropagation(),this.requestRefresh(),this.scrollStatus=p.REQUEST_STATUS.COUNT,p.handlePopup(this.element,!1)}},{key:"updateScrollBar",value:function(){var e=this.element[0];this.app.container[0],e.scrollLeft;var t=60+(e.offsetHeight-40-60-60)*e.scrollTop/(e.scrollHeight-e.offsetHeight);isNaN(t)&&(t=60),this.scrollBar.lastY=t,this.scrollBar[0].style.transform="translateY("+t+"px)"}},{key:"validatePageChange",value:function(e){}},{key:"gotoPageCallBack",value:function(){if(!0!==this.skipScrollIntoView){var e=this.getPageByNumber(this.app.currentPageNumber);null!=e&&F.scrollIntoView(e.element[0],this.element[0])}this.skipScrollIntoView=!1,this.requestRefresh()}},{key:"getTextureSize",value:function(e){var t=this.app.provider.viewPorts[1];this.app.provider.viewPorts[e.pageNumber]&&(t=this.app.provider.viewPorts[e.pageNumber]);var i=this.app.options.pixelRatio;return{height:t.height*this.app.zoomValue*this.app.pageScaleValue*i,width:t.width*this.app.zoomValue*this.app.pageScaleValue*i}}},{key:"textureLoadedCallback",value:function(e){var t=this.getPageByNumber(e.pageNumber),i=this.app,n=this.getViewPort(e.pageNumber,!0);t.element.height(Math.floor(n.height*i.pageScaleValue*i.zoomValue)).width(Math.floor(n.width*i.pageScaleValue*i.zoomValue)),this.pagesReady()}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.startPoint,n=e.raw.y-i.raw.y,o=e.raw.x-i.raw.x;this.deltaPanY+=n,this.deltaPanX+=o,this.panRequestStatus=p.REQUEST_STATUS.ON,!1===t&&(this.startPoint=e)}},{key:"updatePan",value:function(){this.element[0].scrollTop=this.element[0].scrollTop-this.deltaPanY,this.element[0].scrollLeft=this.element[0].scrollLeft-this.deltaPanX,this.deltaPanY=0,this.deltaPanX=0}},{key:"mouseMove",value:function(e){if(this.startPoint&&this.isScrollBarPressed){var t=F.fixMouseEvent(e),i=this.eventToPoint(t),n=this.element[0],s=this.scrollBar.lastY-(this.startPoint.raw.y-i.raw.y);this.scrollBar.lastY=s,n.scrollTop=(s-60)*(n.scrollHeight-n.offsetHeight)/(n.offsetHeight-40-60-60),this.startPoint=i,e.preventDefault();return}e.touches&&e.touches.length<2||A(M(o.prototype),"mouseMove",this).call(this,e)}},{key:"mouseDown",value:function(e){A(M(o.prototype),"mouseDown",this).call(this,e),e.srcElement===this.scrollBar[0]&&(this.isScrollBarPressed=!0,this.scrollBar.addClass("df-active"),this.scrollPageNumber.addClass("df-active"))}},{key:"mouseUp",value:function(e){A(M(o.prototype),"mouseUp",this).call(this,e),(this.isScrollBarPressed=this.scrollBar)&&(this.isScrollBarPressed=!1,this.scrollBar.removeClass("df-active"),this.scrollPageNumber.removeClass("df-active"))}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(o.prototype,i),o}(x);function U(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function H(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function V(e,t,i){return t&&H(e.prototype,t),i&&H(e,i),e}function W(e,t,i){return(W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=j(e);return i=t?Reflect.construct(n,arguments,j(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var K=p.jQuery,X=p.utils,Q=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e,n){var o,s;return U(this,i),e.viewerClass="df-flipbook "+(e.viewerClass||""),(o=t.call(this,e,n)).isFlipBook=!0,o.sheets=[],o.isRTL=o.app.isRTL,o.foldSense=o.isVertical()?0:50,o.isOneSided=!1,o.stackCount=null!==(s=e.stackCount)&&void 0!==s?s:6,o.annotedPage=null,o.pendingAnnotations=[],o.seamPositionX=0,o.seamPositionY=0,o.dragSheet=null,o.drag=null,o.soundOn=!0===e.enableSound,o.soundFile=null,o.minZoom=1,o.maxZoom=4,o.pureMaxZoom=4,(o.app.options.pageSize===p.FLIPBOOK_PAGE_SIZE.AUTO||o.app.options.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL)&&
264(o.app.checkSecondPage=!0),o.app.pageScaling=p.PAGE_SCALE.PAGE_FIT,e.viewerClass="",o.zoomViewer=new J(e,n),o}return V(i,[{key:"init",value:function(){W(j(i.prototype),"init",this).call(this),this.initSound();var e=this.app;this.pageMode=e.options.pageMode===p.FLIPBOOK_PAGE_MODE.AUTO?X.isMobile||e.pageCount<=2?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE:e.options.pageMode,this.singlePageMode=e.options.singlePageMode||(X.isMobile?p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET:p.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM),this.updatePageMode(),this.rightSheetHeight=this.leftSheetHeight=this._defaultPageSize.height,this.leftSheetWidth=this.rightSheetWidth=this._defaultPageSize.width,this.leftSheetTop=this.rightSheetTop=(this.availablePageHeight()-this._defaultPageSize.height)/2,this.topSheetLeft=this.bottomSheetLeft=(this.availablePageWidth()-this._defaultPageSize.width)/2,this.zoomViewer.rightSheetHeight=this.zoomViewer.leftSheetHeight=this._defaultPageSize.height,this.zoomViewer.leftSheetWidth=this.zoomViewer.rightSheetWidth=this._defaultPageSize.width}},{key:"determineHeight",value:function(){}},{key:"initCustomControls",value:function(){W(j(i.prototype),"initCustomControls",this).call(this);var e=this,t=this.app,n=t.ui,o=n.controls,s=t.options.text,a=t.options.icons;o.sound=X.createBtn("sound",a.sound,s.toggleSound).on("click",function(){e.soundOn=!e.soundOn,n.updateSound()}),n.updateSound=function(){!1===e.soundOn?o.sound.addClass("disabled"):o.sound.removeClass("disabled")},n.updateSound()}},{key:"dispose",value:function(){W(j(i.prototype),"dispose",this).call(this);for(var e=0;e<this.sheets.length;e++){var t=this.sheets[e];t&&t.currentTween&&(t.currentTween.stop(),t.currentTween=null)}this.zoomViewer.dispose(),this.soundFile=null}},{key:"determinePageMode",value:function(){var e=this.app,t=this.pageMode;if(this.app.pageCount<3)this.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE;else if(this.app.options.pageMode===p.FLIPBOOK_PAGE_MODE.AUTO&&!0!=this.pageModeChangedManually){if(!0===X.isMobile){if(this.app.dimensions.isAutoHeight&&!1==this.app.dimensions.isFixedHeight){var i=this._calculateInnerHeight(!0),n=this._calculateInnerHeight(!1),o=e.dimensions.stage.innerWidth+(!0!=e.options.sideMenuOverlay&&e.isSideMenuOpen?220:0);this.pageMode=i>1.1*n&&o<768?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE,this._calculateInnerHeight()}else{var s=e.dimensions.stage.innerWidth+(!0!=e.options.sideMenuOverlay&&e.isSideMenuOpen?220:0);this.pageMode=e.dimensions.stage.innerHeight>1.1*s&&s<768?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE}}this.pageMode!=t&&this.setPageMode({isSingle:this.pageMode==p.FLIPBOOK_PAGE_MODE.SINGLE})}}},{key:"initSound",value:function(){this.soundFile=document.createElement("audio"),this.soundFile.setAttribute("src",this.app.options.soundFile+"?ver="+p.version),this.soundFile.setAttribute("type","audio/mpeg")}},{key:"playSound",value:function(){try{!0===this.app.userHasInteracted&&!0===this.soundOn&&(this.soundFile.currentTime=0,this.soundFile.play())}catch(e){}}},{key:"checkDocumentPageSizes",value:function(){var e=this.app.provider;e.pageSize===p.FLIPBOOK_PAGE_SIZE.AUTO&&(e._page2Ratio&&e._page2Ratio>1.5*e.defaultPage.pageRatio?e.pageSize=p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL:e.pageSize=p.FLIPBOOK_PAGE_SIZE.SINGLE),e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&(e.pageCount=1===e.numPages?1:2*e.numPages-2),(e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK||e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE)&&(e.pageCount=2*e.numPages)}},{key:"getViewerPageNumber",value:function(e){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&e>2&&(e=2*e-1),this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK&&e>2&&(e=2*e-1),e}},{key:"getDocumentPageNumber",value:function(e){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&e>2?Math.ceil((e-1)/2)+1:this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK&&e>1?e===this.app.pageCount?1:Math.ceil((e-1)/2)+1:e}},{key:"getViewPort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;return this.filterViewPort(W(j(i.prototype),"getViewPort",this).call(this,e,t),e,n)}},{key:"isDoubleInternal",value:function(){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL}},{key:"isDoubleCoverBack",value:function(){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK}},{key:"isDoubleInternalPage",value:function(e){return this.isDoubleInternal()&&e>
2641&&e<this.app.provider.pageCount}},{key:"getDoublePageWidthFix",value:function(e){return this.isDoubleInternalPage(e)||this.isDoubleCoverBack()?2:1}},{key:"isDoublePageFix",value:function(e){var t=!1;return(this.isDoubleCoverBack()||this.isDoubleInternalPage(e))&&(this.app.isRTL?e%2==0&&(t=!0):e%2==1&&(t=!0)),t}},{key:"finalizeAnnotations",value:function(e,t){}},{key:"finalizeTextContent",value:function(e,t){this.app.zoomValue>this.app.viewer.pureMaxZoom&&(this.zoomViewer.leftViewPort&&this.zoomViewer.leftPage.contentLayer[0].style.setProperty("--scale-factor",this.zoomViewer.leftSheetHeight/this.zoomViewer.leftViewPort.height),this.zoomViewer.rightViewPort&&this.zoomViewer.rightPage.contentLayer[0].style.setProperty("--scale-factor",this.zoomViewer.rightSheetHeight/this.zoomViewer.rightViewPort.height))}},{key:"isActivePage",value:function(e){return void 0!==this.visiblePagesCache&&this.visiblePagesCache.includes(e)}},{key:"isSheetCover",value:function(e){var t=this.isBooklet;return 0===e||t&&1===e||e===Math.ceil(this.app.pageCount/(t?1:2))-(t?0:1)}},{key:"isSheetHard",value:function(e){var t=this.app.options.flipbookHardPages;if(this.isBooklet,"cover"===t)return this.isSheetCover(e);if("all"===t)return!0;var i=(","+t+",").indexOf(","+(2*e+1)+",")>-1,n=(","+t+",").indexOf(","+(2*e+2)+",")>-1;return i||n}},{key:"sheetsIndexShift",value:function(e,t,i){e>t?(this.sheets[i-1].skipFlip=!0,this.sheets.unshift(this.sheets.pop())):e<t&&(this.sheets[0].skipFlip=!0,this.sheets.push(this.sheets.shift()))}},{key:"checkSwipe",value:function(e,t){if(!0!==this.pinchZoomDirty&&1===this.app.zoomValue&&!0===this.canSwipe){var i=this.isVertical()?e.y-this.lastPosY:e.x-this.lastPosX;null!=t.touches&&this.isVertical()&&i>5&&t.preventDefault(),Math.abs(i)>this.swipeThreshold&&(i<0?this.app.openRight():this.app.openLeft(),this.canSwipe=!1,t.preventDefault()),this.lastPosX=e.x,this.lastPosY=e.y}}},{key:"checkCenter",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.app,n=p.FLIPBOOK_CENTER_SHIFT,o=i.currentPageNumber%2==0,s=this.getBasePage(),a=this.isRTL,r=this.isSingle;e=0===s||this.isBooklet?this.isRTL?n.RIGHT:n.LEFT:s===i.pageCount?a?n.LEFT:n.RIGHT:r?a?o?n.LEFT:n.RIGHT:o?n.RIGHT:n.LEFT:n.NONE,!0!==this.centerNeedsUpdate&&(this.centerNeedsUpdate=this.centerShift!==e),this.centerNeedsUpdate&&(this.centerShift=e,this.updateCenter(t),this.centerNeedsUpdate=!1)}},{key:"updateCenter",value:function(){console.log("UpdateCenter: missing implementation.")}},{key:"reset",value:function(){for(var e,t=0;t<this.sheets.length;t++)(e=this.sheets[t]).reset(),e.pageNumber=-1,e.frontPage&&(e.frontPage.pageNumber=-1),e.backPage&&(e.backPage.pageNumber=-1),e.resetTexture();this.annotedPage=null,this.oldBasePageNumber=-1,this.centerShift=null,this.refresh()}},{key:"handleZoom",value:function(){var e=this.app;e.dimensions;var t=this.getLeftPageTextureSize({zoom:!1,isAnnotation:!0}),i=this.getRightPageTextureSize({zoom:!1,isAnnotation:!0});this.maxZoom,e.zoomValue,this.pureMaxZoom=e.dimensions.maxTextureSize/Math.max(t.height,t.width,i.height,i.width);var n=this.maxZoom=e.options.fakeZoom*this.pureMaxZoom,o=e.zoomValue,s=!1,a=!1;n<this.minZoom&&(n=this.maxZoom=this.minZoom),!0===e.pendingZoom&&null!=e.zoomDelta?o=e.zoomDelta>0?o*e.options.zoomRatio:o/e.options.zoomRatio:null!=this.lastScale&&(o*=this.lastScale,this.lastScale=null),o=X.limitAt(o,this.minZoom,n),e.zoomValueChange=o/e.zoomValue,(e.zoomChanged=e.zoomValue!==o)&&(1===o||1===e.zoomValue)&&(s=1===o,a=1===e.zoomValue),e.zoomValue=o,(a||s)&&(e.container.toggleClass("df-zoom-active",1!==o),a&&this.enterZoom(),s&&this.exitZoom())}},{key:"refresh",value:function(){var e=this.app,t=this.stackCount,i=this.isRTL,n=this.isBooklet,o=this.getBasePage(),s=n?1:2;i&&(o=e.pageCount-o);
264var a,r=this.oldBasePageNumber,l=Math.ceil(e.pageCount/s),h=Math.floor(t/2);o!==this.oldBasePageNumber&&(this.pageNumberChanged=!0,this.updatePendingStatusClass(!0),this.zoomViewer.reset()),this.sheetsIndexShift(r,o,t);var u=Math.ceil(o/s);for(a=0;a<t;a++){var c=void 0,d=u-h+a;if(i&&(d=l-d-1),null!=(c=this.sheets[a])){c.targetSide=a<h?p.TURN_DIRECTION.LEFT:p.TURN_DIRECTION.RIGHT;var f=c.side!==c.targetSide,g=d!==c.pageNumber,m=f&&!1===c.skipFlip&&1===e.zoomValue;!f&&g&&c.isFlipping&&c.currentTween&&c.currentTween.stop(),c.isHard=this.isSheetHard(d),c.isCover=this.isSheetCover(d),g&&(c.resetTexture(),(this.app.isRTL?c.backPage:c.frontPage).pageNumber=this.isBooklet?d:2*d+1,(this.app.isRTL?c.frontPage:c.backPage).pageNumber=this.isBooklet?-1:2*d+2,e.textureRequestStatus=p.REQUEST_STATUS.ON),c.pageNumber=d,this.refreshSheet({sheet:c,sheetNumber:d,totalSheets:l,zIndex:this.stackCount+(a<h?a-h:h-a),visible:n?i?a<h||c.isFlipping||m:a>=h||c.isFlipping||m:d>=0&&d<l||n&&d===l,index:a,needsFlip:m,midPoint:h})}}this.requestRefresh(!1),e.textureRequestStatus=p.REQUEST_STATUS.ON,this.oldBasePageNumber=o,this.checkCenter(),this.zoomViewer.refresh(),this.pageNumberChanged=!1}},{key:"validatePageChange",value:function(e){if(e===this.app.currentPageNumber)return!1;var t=this.app,i=!this.isFlipping()||void 0===t.oldPageNumber;return(i=i||t.currentPageNumber<e&&t.oldPageNumber<t.currentPageNumber)||t.currentPageNumber>e&&t.oldPageNumber>t.currentPageNumber}},{key:"getVisiblePages",value:function(){for(var e=[],t=this.getBasePage(),i=this.app.zoomValue>1?1:this.isBooklet&&X.isMobile?Math.min(this.stackCount/2,2):this.stackCount/2,n=0;n<i;n++)e.push(t-n),e.push(t+n+1);return this.visiblePagesCache=e,{main:e,buffer:[]}}},{key:"getBasePage",value:function(e){return(void 0===e&&(e=this.app.currentPageNumber),this.isBooklet)?e:2*Math.floor(e/2)}},{key:"getRightPageNumber",value:function(){return this.getBasePage()+(this.isBooklet?0:this.isRTL?0:1)}},{key:"getLeftPageNumber",value:function(){return this.getBasePage()+(this.isBooklet?0:this.isRTL?1:0)}},{key:"afterFlip",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],!0!==this.isAnimating()&&(this.pagesReady(),this.updatePendingStatusClass())}},{key:"isFlipping",value:function(){var e=!1;return this.sheets.forEach(function(t){!0===t.isFlipping&&(e=!0)}),e}},{key:"isAnimating",value:function(){return this.isFlipping()}},{key:"mouseWheel",value:function(e){this.app.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.ZOOM?this.zoomViewer.mouseWheel(e):W(j(i.prototype),"mouseWheel",this).call(this,e)}},{key:"checkRequestQueue",value:function(){this.app.zoomValue>1?this.zoomViewer.checkRequestQueue():W(j(i.prototype),"checkRequestQueue",this).call(this)}},{key:"updatePan",value:function(){}},{key:"resetPageTween",value:function(){}},{key:"gotoPageCallBack",value:function(){this.resetPageTween(),1!==this.app.zoomValue&&!0===this.app.options.resetZoomBeforeFlip&&this.app.resetZoom(),this.beforeFlip(),this.requestRefresh()}},{key:"beforeFlip",value:function(){this.app.executeCallback("beforeFlip"),1===this.app.zoomValue&&this.getBasePage()!==this.oldBasePageNumber&&this.playSound()}},{key:"onFlip",value:function(){this.app.executeCallback("onFlip")}},{key:"getAnnotationElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;return(o=this.app.zoomValue>1||!0===n?this.zoomViewer.getAnnotationElement(e,t):W(j(i.prototype),"getAnnotationElement",this).call(this,e,t))&&(o.parentNode.classList.toggle("df-double-internal",this.isDoubleInternalPage(e)),o.parentNode.classList.toggle("df-double-internal-fix",this.isDoublePageFix(e))),o}},{key:"getTextElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.app.zoomValue>1||!0===n?this.zoomViewer.getTextElement(e,t):W(j(i.prototype),"getTextElement",this).call(this,e,t)}},{key:"enterZoom",value:function(){this.exchangeTexture(this,this.zoomViewer)}},{key:"exitZoom",value:function(){this.exchangeTexture(this.zoomViewer,this)}}
264,{key:"exchangeTexture",value:function(e,t){var i=this.getBasePage(),n=e.getPageByNumber(i),o=t.getPageByNumber(i);if(o&&"-1"===o.textureStamp?(o.textureStamp=n.textureStamp,o.loadTexture({texture:n.getTexture(!0)}),X.log("Texture Exchanging at "+i)):X.log("Texture Exchanging Bypassed at "+i),!this.isBooklet){var s=e.getPageByNumber(i+1),a=t.getPageByNumber(i+1);a&&"-1"===a.textureStamp?(a.textureStamp=s.textureStamp,a.loadTexture({texture:s.getTexture(!0)}),X.log("Texture Exchanging at "+(i+1))):X.log("Texture Exchanging Bypassed at "+(i+1))}t.pagesReady()}},{key:"setPageMode",value:function(e){var t=this.app,i=!0===e.isSingle;this.pageMode=i?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE,this.updatePageMode(),t.resizeRequestStart()}},{key:"updatePageMode",value:function(){var e=this.app;this.app.pageCount<3&&(this.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE),this.isSingle=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE,this.isBooklet=this.isSingle&&this.singlePageMode===p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET,this.app.jumpStep=this.isSingle?1:2,this.totalSheets=Math.ceil(this.app.pageCount/(this.isBooklet?1:2)),this.sheets.length>0&&this.reset(),e.ui.controls.pageMode&&(e.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.DOUBLE?e.ui.controls.pageMode.removeClass(e.options.icons.doublepage).addClass(e.options.icons.singlepage).attr("title",e.options.text.singlePageMode).html("<span>"+e.options.text.singlePageMode+"</span>"):e.ui.controls.pageMode.addClass(e.options.icons.doublepage).removeClass(e.options.icons.singlepage).attr("title",e.options.text.doublePageMode).html("<span>"+e.options.text.doublePageMode+"</span>"))}},{key:"setPage",value:function(e){return e.textureTarget===p.TEXTURE_TARGET.ZOOM?this.zoomViewer.setPage(e):W(j(i.prototype),"setPage",this).call(this,e)}},{key:"_calculateInnerHeight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;void 0===e&&(e=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var t=this.app.dimensions.defaultPage.viewPort,i=this.availablePageWidth(!1,!0,e),n=this.app.dimensions.maxHeight-this.app.dimensions.padding.height,o=this.isVertical()&&!1==e?n/2:n;this._defaultPageSize=X.contain(t.width,t.height,i,o),this._pageFitArea={width:i,height:n};var s=this.app.dimensions.isFixedHeight?n:this._pageFitArea.height;return this.app.dimensions.isAutoHeight&&!1==this.app.dimensions.isFixedHeight&&(s=Math.floor(this._defaultPageSize.height)),s}},{key:"_getInnerHeight",value:function(){var e=this._calculateInnerHeight();return this.app.dimensions.stage.width=this.app.dimensions.stage.innerWidth+this.app.dimensions.padding.width,this.app.dimensions.stage.height=e+this.app.dimensions.padding.height,e}},{key:"availablePageWidth",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0===i&&(i=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var n=!0===t?this.app.dimensions.offset.width:0,o=this.app.dimensions.stage.innerWidth+n;return Math.floor((o/=!0===i||this.isVertical()?1:2)*(e?this.app.zoomValue:1))}},{key:"availablePageHeight",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;void 0===t&&(t=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var i=this.app.dimensions.stage.innerHeight;return!1===t&&this.isVertical()&&(i/=2),Math.floor(i*(e?this.app.zoomValue:1))}},{key:"getTextureSize",value:function(e){var t=this.getViewPort(e.pageNumber,!0),i=this.app.options.pixelRatio,n=!1===e.isRestricted?99999:this.app.options.maxTextureSize,o=X.contain(t.width,t.height,Math.min(i*this.availablePageWidth(e.zoom),n),Math.min(i*this.availablePageHeight(e.zoom),n));return{height:o.height,width:o.width}}},{key:"getLeftPageTextureSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.pageNumber=this.getLeftPageNumber(),this.getTextureSize(e)}},{key:"getRightPageTextureSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.pageNumber=this.getRightPageNumber(),this.getTextureSize(e)}},{key:"filterViewPort",value:function(e,t){var i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(void 0!==e){if(!0!=i)return e;var n=e.clone();return n.width=n.width/this.getDoublePageWidthFix(t),n}}},{key:"filterViewPortCanvas",value:function(e,t,i){this.isDoublePageFix(i)&&(e.transform[4]=e.transform[4]-Math.floor(Math.min(t.width,2*e.width-t.width))),e.widthFix=this.isDoubleInternalPage(i)?2:1}},{key:"isClosedPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e||e===this.app.jumpStep*Math.ceil(this.app.pageCount/this.app.jumpStep)&&!this.isBooklet}},{key:"isLeftPage",value:function(e){return(void 0===e&&(e=this.app.currentPageNumber),this.isBooklet)?this.isRTL:e%2==(this.isRTL?1:0)}},{key:"cleanPage",value:function(e){if(!this.isDoubleInternalPage(e))return W(j(i.prototype),"cleanPage",this).call(this,e);var t=e+(e%2==1?-1:1);return!1===this.app.provider.requestedPages[e]&&!1===this.app.provider.requestedPages[t]}},{key:"onReady",value:function(){W(j(i.prototype),"onReady",this).call(this)}},{key:"searchPage",value:function(e){return{include:!this.isDoublePageFix(e),label:this.app.provider.getLabelforPage(e)+(this.isDoubleInternalPage(e)?"-"+this.app.provider.getLabelforPage(e+1):"")}}},{key:"isVertical",value:function(){return!1}}]),i}(x),Y=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e){var n;return U(this,i),(n=t.call(this)).zoomStamp="",n.pendingZoomScale=1,n}return V(i,[{key:"resetZoomTexture",value:function(){this.zoomElement&&this.zoomElement.html(""),this.zoomStamp=""}},{key:"resetTexture",value:function(){W(j(i.prototype),"resetTexture",this).call(this),this.resetZoomTexture()}}]),i}(_),J=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e,n){var o;return U(this,i),e.viewerClass="df-zoomview "+(e.viewerClass||""),(o=t.call(this,e,n)).viewer=o.app.viewer,o.events={},o.init(),o.initEvents(),o.left=0,o.top=0,o.zoomUpdateCount=0,o}return V(i,[{key:"init",value:function(){this.leftPage=new Y,this.rightPage=new Y,this.pages.push(this.leftPage),this.pages.push(this.rightPage),this.leftPage.element.addClass("df-page-back"),this.rightPage.element.addClass("df-page-front"),this.wrapper.append(this.leftPage.element),this.wrapper.append(this.rightPage.element),this.bookShadow=K("<div>",{class:"df-book-shadow"}),this.wrapper.append(this.bookShadow),this.wrapper.addClass("df-sheet")}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],W(j(i.prototype),"initEvents",this).call(this)}},{key:"dispose",value:function(){this.element.remove()}},{key:"resize",value:function(){var e=this.app.dimensions,t=e.padding,i=this.app.viewer.availablePageHeight(),n=this.app.viewer.availablePageWidth(),o=this.fullWidth=n*(this.app.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE||this.app.viewer.isVertical()?1:2),s=this.fullHeight=i*(this.app.viewer.isVertical()&&this.app.viewer.pageMode!==p.FLIPBOOK_PAGE_MODE.SINGLE?2:1),a=e.stage.innerWidth,r=e.stage.innerHe
264ight,l=this.shiftHeight=Math.ceil(X.limitAt((s-r)/2,0,s)),h=this.shiftWidth=Math.ceil(X.limitAt((o-a)/2,0,o));if(1===this.app.zoomValue&&(this.left=0,this.top=0),this.element.css({top:-l,bottom:-l,right:-h,left:-h,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left,transform:"translate3d("+this.left+"px,"+this.top+"px,0)"}),this.wrapper.css({width:o,height:s,marginTop:e.height-s-t.height>0?(e.height-t.height-s)/2:0}),this.wrapper.height(s).width(o-o%2),!0===this.app.pendingZoom&&this.zoom(),this.app.viewer.annotedPage=null,this.pagesReady(),!0===this.app.options.progressiveZoom){if(this.app.zoomValue>this.app.viewer.pureMaxZoom){if(this.startZoomUpdateRequest(),this.leftPage.zoomElement&&""!=this.leftPage.zoomStamp){var u=this.leftPage.zoomIntersection,c=this.leftSheetHeight/this.leftPage.zoomParentHeight;this.leftPage.zoomElement.css({left:u.left*c,top:u.top*c,width:u.width*c,height:u.height*c}),console.log("Left:"+c+" : "+this.leftPage.zoomElement[0].style.cssText)}if(this.rightPage.zoomElement&&""!=this.rightPage.zoomStamp){var d=this.rightPage.zoomIntersection,f=this.rightSheetHeight/this.rightPage.zoomParentHeight;this.rightPage.zoomElement.css({left:d.left*f,top:d.top*f,width:d.width*f,height:d.height*f}),console.log("Right:"+f+" : "+this.rightPage.zoomElement[0].style.cssText)}}else this.leftPage.resetZoomTexture(),this.rightPage.resetZoomTexture()}}},{key:"zoom",value:function(){var e=this.app;if(e.zoomChanged){var t=e.dimensions.origin,i=e.zoomValueChange;if(1===e.zoomValue)this.left=0,this.top=0;else{this.left*=i,this.top*=i,e.viewer.zoomCenter||(e.viewer.zoomCenter={x:t.x,y:t.y});var n={raw:e.viewer.zoomCenter},o={raw:{}},s=(n.raw.x-t.x)*i,a=(n.raw.y-t.y)*i;o.raw.x=t.x+s,o.raw.y=t.y+a,this.startPoint=o,this.pan(n),this.startPoint=null,e.container.toggleClass("df-zoom-region-active",this.app.zoomValue>this.app.viewer.pureMaxZoom)}}e.viewer.zoomCenter=null}},{key:"reset",value:function(){this.leftPage.resetTexture(),this.rightPage.resetTexture()}},{key:"refresh",value:function(){var e=this.app,t=e.viewer,i=t.getBasePage(),n=t.isBooklet?!e.isRTL:e.isRTL,o=n?this.rightPage:this.leftPage,s=n?this.leftPage:this.rightPage;o.pageNumber=i,s.pageNumber=i+1,o.updateCSS({display:0===i?"none":"block"}),s.updateCSS({display:s.pageNumber>e.pageCount||t.isBooklet?"none":"block"})}},{key:"updateCenter",value:function(){var e=this.app.viewer.isVertical();if(null!==this&&null!==this.app.viewer){var t=1*this.app.viewer.centerShift*(this.app.viewer.isRTL,this.app.viewer.isLeftPage()?e?this.leftSheetHeight:this.leftSheetWidth:e?this.rightSheetHeight:this.rightSheetWidth)/2;e?this.wrapper[0].style.top=t+"px":this.wrapper[0].style.left=t+"px"}}},{key:"isDoubleInternalPage",value:function(e){return this.app.viewer.isDoubleInternalPage(e)}},{key:"pagesReady",value:function(){if(!this.app.viewer.isFlipping()&&(1!==this.app.zoomValue&&this.app.viewer.updatePendingStatusClass(!1),!1===this.app.options.flipbookFitPages)){var e=this.app.viewer.getBasePage(),t=this.leftViewPort=this.app.viewer.getViewPort(e+(this.app.viewer.isBooklet?0:this.app.viewer.isRTL?1:0)),i=this.rightViewPort=this.app.viewer.getViewPort(e+(this.app.viewer.isBooklet?0:this.app.viewer.isRTL?0:1));if(t){var n=X.contain(t.width,t.height,this.app.viewer.availablePageWidth(),this.app.viewer.availablePageHeight());this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height),this.leftSheetTop=(this.app.viewer.availablePageHeight()-this.leftSheetHeight)/2,this.topSheetLeft=(this.app.viewer.availablePageWidth()-this.leftSheetWidth)/2,this.app.zoomValue>this.app.viewer.pureMaxZoom&&this.leftPage.contentLayer[0].style.setProperty("--scale-factor",this.leftSheetHeight/t.height)}if(i){var o=X.contain(i.width,i.height,this.app.viewer.availablePageWidth(),this.app.viewer.availablePageHeight());this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height),this.rightSheetTop=(this.app.viewer.availablePageHeight()-this.rightSheetHeight)/2,this.bottomSheetLeft=(this.app.viewer.availablePageWidth()-this.rightSheetWidth)/2,this.app.zoomValue>this.app.viewer.pureMaxZoom&&this.rightPage.contentLayer[0].style.setProperty("--scale-factor",this.rightSheetHeight/i.height)}(void 0!=t||void 0!=i)&&(this.totalSheetsWidth=this.leftSheetWidth+this.rightSheetWidth,this.leftPage.element.height(Math.floor(this.leftSheetHeight)).width(Math.floor(this.leftSheetWidth)),this.rightPage.element.height(Math.floor(this.rightSheetHeight)).width(Math.floor(this.rightSheetWidth)),this.app.viewer.isVertical()?(this.leftPage.element.css({transform:"translateX("+Math.floor(this.topSheetLeft)+"px)"}),this.rightPage.element.css({transform:"translateX("+Math.floor(this.bottomSheetLeft)+"px)"})):(this.leftPage.element.css({transform:"translateY("+Math.floor(this.leftSheetTop)+"px)"}),this.rightPage.element.css({transform:"translateY("+Math.floor(this.rightSheetTop)+"px)"})))}}},{key:"textureLoadedCallback",value:function(e){this.getPageByNumber(e.pageNumber),this.pagesReady()}},{key:"mouseUp",value:function(e){W(j(i.prototype),"mouseUp",this).call(this,e),this.startZoomUpdateRequest()}},{key:"setPage",value:function(e){return this.app,this.app.viewer,W(j(i.prototype),"setPage",this).call(this,e)}},{key:"startZoomUpdateRequest",value:function(){this.zoomUpdateStatus=p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){W(j(i.prototype),"checkRequestQueue",this).call(this),!0===this.app.options.progressiveZoom&&(this.zoomUpdateStatus===p.REQUEST_STATUS.ON?(this.zoomUpdateStatus=p.REQUEST_STATUS.OFF,this.zoomUpdate()):this.zoomUpdateStatus===p.REQUEST_STATUS.COUNT&&(this.zoomUpdateCount++,this.zoomUpdateCount>3&&(this.zoomUpdateCount=0,this.zoomUpdateStatus=p.REQUEST_STATUS.ON)))}},{key:"zoomUpdate",value:function(){this.zoomUpdatePage({pageNumber:this.app.viewer.getRightPageNumber(),refHeight:this.rightSheetHeight}),this.zoomUpdatePage({pageNumber:this.app.viewer.getLeftPageNumber(),refHeight:this.leftSheetHeight})}},{key:"zoomUpdatePage",value:function(e){var t=this.app,i=this.app.options.pixelRatio,n=this.app.viewer,o="",s=this.getPageByNumber(e.pageNumber);if(void 0!==s){var a=X.elementIntersection(t.element,s.element,!0);if(t.zoomValue>n.pureMaxZoom&&a.width*a.height>0){if(!0===DEARFLIP.skipZoom)return;var r=s.pageNumber+"|"+JSON.stringify(a);if(s.zoomStamp==r){console.log("Rendered "+s.pageNumber+" Duplicate zoom request");return}s.zoomStamp=r;var l=t.viewer.getDocumentPageNumber(e.pageNumber),h=t.provider,u=e.pageNumber,p=performance.now();
264h.pdfDocument.getPage(l).then(function(n){s.element.offset(),e.isRestricted=!1;var c=t.viewer.getRenderContext(n,e);h.viewPorts[l],c.viewport=n.getViewport({scale:e.refHeight*i/h.viewPorts[l].height}),c.canvas.height=a.height*i,c.canvas.width=a.width*i,o=c.canvas.width+"x"+c.canvas.height+" - of("+c.viewport.width.toFixed(2)+"x"+c.viewport.height.toFixed(2)+")",console.log("Page "+u+" rendering - "+c.canvas.width+"x"+c.canvas.height),c.viewport.transform[4]-=a.left*i,c.viewport.transform[5]-=a.top*i,h.requestedPages+=","+e.trace+"["+l+"|"+c.canvas.height+"]",n.cleanupAfterRender=!1,n.render(c).promise.then(function(){var i=X.elementIntersection(t.element,s.element,!0);if(s.zoomStamp!==r){console.log("Faulty zoom texture detected");return}if(s.zoomStamp!==s.pageNumber+"|"+JSON.stringify(i)){console.log("Faulty zoom texture detected - instant");return}if(void 0===s.zoomElement&&(s.zoomElement=K("<div class='zoom-element'></div>"),s.element.append(s.zoomElement)),s.zoomElement.html(""),s.zoomElement.append(c.canvas),s.zoomElement.css({left:a.left,top:a.top,width:a.width,height:a.height}),s.zoomIntersection=a,s.zoomParentHeight=s.element.height(),!0===t.options.cleanupAfterRender){var d=","+e.trace+"["+l+"|"+c.canvas.height+"]";h.requestedPages.indexOf(d)>-1&&(h.requestedPages=h.requestedPages.replace(d,""),-1==h.requestedPages.indexOf("["+l+"|")&&(h.pagesToClean.push(n),h.pagesToClean.length>0&&h.cleanUpPages()))}c=null,console.log("Rendered "+u+" in "+Math.floor(performance.now()-p)+" ms : "+o+" for "+r)}).catch(function(e){console.log(e)})}).catch(function(e){console.log(e)})}}}}]),i}(x),$=/*#__PURE__*/function(){function e(t){U(this,e),this.parentElement=t.parentElement,this.isFlipping=!1,this.isOneSided=!1,this.viewer=t.viewer,this.frontPage=null,this.backPage=null,this.pageNumber=void 0,this.animateToReset=null}return V(e,[{key:"init",value:function(){}},{key:"flip",value:function(){}},{key:"frontImage",value:function(e){this.frontPage.loadTexture({texture:e.texture,callback:e.callback})}},{key:"backImage",value:function(e){this.backPage.loadTexture({texture:e.texture,callback:e.callback})}},{key:"resetTexture",value:function(){this.frontPage.resetTexture(),this.backPage.resetTexture()}},{key:"reset",value:function(){this.animateToReset=null,this.isFlipping=!1,this.currentTween=null,this.pendingPoint=null,this.magnetic=!1,this.skipFlip=!0,this.animateToReset=null,this.viewer.dragPage=null,this.viewer.flipPage=null,this.viewer.corner=p.TURN_CORNER.NONE}}]),e}();function ee(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function et(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ei(e,t,i){return t&&et(e.prototype,t),i&&et(e,i),e}function en(e,t,i){return(en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eo(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function eo(e){return(eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function es(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ea(e,t)}function ea(e,t){return(ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eo(e);return i=t?Reflect.construct(n,arguments,eo(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var el=p.jQuery,eh=p.utils,eu=/*#__PURE__*/function(e){es(i,e);var t=er(i);function i(e){var n;return ee(this,i),(n=t.call(this,e)).init(),n}return ei(i,[{key:"init",value:function(){var e="<div>",t=this.element=el(e,{class:"df-sheet"}),i=this.frontPage=new _;i.element.addClass("df-page-front");var n=this.backPage=new _;n.element.addClass("df-page-back");var o=this.wrapper=el(e,{class:"df-sheet-wrapper"}),s=this.foldInnerShadow=el(e,{class:"df-sheet-fold-inner-shadow"}),a=this.foldOuterShadow=el(e,{class:"df-sheet-fold-outer-shadow"});this.parentElement.append(t),t.append(o),t.append(a),o.append(i.element),o.append(n.element),o.append(s)}},{key:"updateCSS",value:function(e){this.element.css(e)}},{key:"resetCSS",value:function(){this.wrapper.css({transform:""}),this.frontPage.resetCSS(),this.backPage.resetCSS()}},{key:"updateSize",value:function(e,t,i,n){e=Math.floor(e),t=Math.floor(t),i=Math.floor(i),n=Math.floor(n),this.wrapper[0].style.height=this.wrapper[0].style.width=Math.ceil(eh.distOrigin(e,t)*this.viewer.app.zoomValue)+"px",this.element[0].style.height=this.frontPage.element[0].style.height=this.backPage.element[0].style.height=this.foldInnerShadow[0].style.height=t+"px",this.element[0].style.width=this.frontPage.element[0].style.width=this.backPage.element[0].style.width=this.foldInnerShadow[0].style.width=e+"px",this.viewer.isVertical()?this.element[0].style.transform="translateX("+n+"px)":this.element[0].style.transform="translateY("+i+"px)"}},{key:"flip",value:function(e){var t=this;if(e=e||t.pendingPoint,null!=t&&null!=t.viewer){t.isFlipping=!0,t.viewer.flipPage=t;var i,n,o=t.viewer.isBooklet,s=t.side===p.TURN_DIRECTION.RIGHT,a=t.viewer.isRTL,r=t.viewer.corner===p.TURN_CORNER.BL||t.viewer.corner===p.TURN_CORNER.BR?t.element.height():0,l=t.viewer.leftSheetWidth+t.viewer.rightSheetWidth,h=0;n=t.end=t&&!0===t.animateToReset?{x:s?l:0,y:r}:{x:s?0:l,y:r},t.flipEasing=t.isHard?TWEEN.Easing.Quadratic.InOut:TWEEN.Easing.Linear.None;var u=t.viewer.app.options.duration;!0===t.isHard?(null!=e&&(h=eh.angleByDistance(e.distance,e.fullWidth)),i=t.init={angle:h*(s?-1:1)},n=t.end=t&&!0===t.animateToReset?{angle:s?0:-0}:{angle:s?-180:180}):null==e?i=t.init=t&&!0===t.animateToReset?{x:s?0:l,y:0}:{x:s?l:0,y:0}:(i=t.init={x:e.x,y:e.y,opacity:1},u=t.viewer.app.options.duration*eh.distPoints(i.x,i.y,n.x,n.y)/t.viewer.fullWidth,u=eh.limitAt(u,t.viewer.app.options.duration/3,t.viewer.duration)),i.index=0,n.index=1,t.isFlipping=!0,o&&(!s&&!a||s&&a)&&(t.element[0].style.opacity=0),!0===t.isHard?t.currentTween=new TWEEN.Tween(i).delay(0).to(n,t.viewer.app.options.duration).onUp
264date(function(){t.updateTween(this)}).easing(t.flipEasing).onComplete(t.completeTween.bind(t)).start():null==e?t.currentTween=new TWEEN.Tween(i).delay(0).to(n,t.viewer.app.options.duration).onUpdate(function(){t.updateTween(this)}).easing(TWEEN.Easing.Sinusoidal.Out).onComplete(t.completeTween.bind(t)).start():t.currentTween=new TWEEN.Tween(i).delay(0).to(n,u).onUpdate(function(){t.updateTween(this)}).easing(TWEEN.Easing.Sinusoidal.Out).onComplete(t.completeTween.bind(t)).start()}}},{key:"updatePoint",value:function(e){if(null!=e){var t=this.element.width(),i=this.element.height(),n=this.viewer.corner!==p.TURN_CORNER.NONE?this.viewer.corner:e.corner,o=p.TURN_CORNER,s=this.side===p.TURN_DIRECTION.RIGHT,a=n===o.BL||n===o.BR;e.rx=!0===s?this.viewer.leftSheetWidth+t-e.x:e.x,e.ry=!0===a?i-e.y:e.y;var r=Math.atan2(e.ry,e.rx);r=Math.PI/2-eh.limitAt(r,0,eh.toRad(90));var l=t-e.rx/2,h=e.ry/2,u=Math.max(0,Math.sin(r-Math.atan2(h,l))*eh.distOrigin(l,h)),c=.5*eh.distOrigin(e.rx,e.ry),d=Math.ceil(t-u*Math.sin(r)),f=Math.ceil(u*Math.cos(r)),g=eh.toDeg(r),m=a?s?180+(90-g):180+g:s?g:90-g,v=a?s?180+(90-g):g:s?g+180:m,y=a?s?90-g:g+90:s?m-90:m+180,b=s?t-d:d,w=a?i+f:-f,P=s?-d:d-t,S=a?-i-f:f,E=eh.limitAt(.5*e.distance/t,0,.5),x=eh.limitAt((this.viewer.leftSheetWidth+t-e.rx)*.5/t,.05,.3);this.element.addClass("df-folding");var C=s?this.backPage.element:this.frontPage.element,T=s?this.frontPage.element:this.backPage.element,k=this.foldOuterShadow,O=this.foldInnerShadow;this.wrapper.css({transform:eh.translateStr(b,w)+eh.rotateStr(m)}),T.css({transform:eh.rotateStr(-m)+eh.translateStr(-b,-w)}),C.css({transform:eh.rotateStr(v)+eh.translateStr(P,S),boxShadow:"rgba(0, 0, 0, "+E+") 0px 0px 20px"}),O.css({transform:eh.rotateStr(v)+eh.translateStr(P,S),opacity:x/2,backgroundImage:eh.prefix.css+"linear-gradient( "+y+"deg, rgba(0, 0, 0, 0.25) , rgb(0, 0, 0) "+.7*c+"px, rgb(255, 255, 255) "+c+"px)"}),k.css({opacity:x/2,left:s?"auto":0,right:s?0:"auto",backgroundImage:eh.prefix.css+"linear-gradient( "+(-y+180)+"deg, rgba(0, 0, 0,0) "+c/3+"px, rgb(0, 0, 0) "+c+"px)"})}}},{key:"updateAngle",value:function(e,t){if(this.viewer.isVertical()){var i=5*this.element.height();this.wrapper.css({perspective:i,perspectiveOrigin:!0===t?"50% 0%":"50% 100%"}),this.element.addClass("df-folding"),this.backPage.updateCSS({display:!0===t?e<=-90?"block":"none":e<90?"block":"none",transform:("MfS"!==eh.prefix.dom?"":"perspective("+i+"px) ")+(!0===t?"translateY(-100%) ":"")+"rotateX("+((!0===t?180:0)-e)+"deg)"}),this.frontPage.updateCSS({display:!0===t?e>-90?"block":"none":e>=90?"block":"none",transform:("MSd"!==eh.prefix.dom?"":"perspective("+i+"px) ")+(!1===t?"translateY(100%) ":"")+"rotateX("+((!1===t?-180:0)-e)+"deg)"})}else{var n=5*this.element.width();this.wrapper.css({perspective:n,perspectiveOrigin:!0===t?"0% 50%":"100% 50%"}),this.element.addClass("df-folding"),this.backPage.updateCSS({display:!0===t?e<=-90?"block":"none":e<90?"block":"none",transform:("MfS"!==eh.prefix.dom?"":"perspective("+n+"px) ")+(!0===t?"translateX(-100%) ":"")+"rotateY("+((!0===t?180:0)+e)+"deg)"}),this.frontPage.updateCSS({display:!0===t?e>-90?"block":"none":e>=90?"block":"none",transform:("MSd"!==eh.prefix.dom?"":"perspective("+n+"px) ")+(!1===t?"translateX(100%) ":"")+"rotateY("+((!1===t?-180:0)+e)+"deg)"})}}},{key:"updateTween",value:function(e){var t=this.viewer.isBooklet,i=this.side===p.TURN_DIRECTION.RIGHT,n=this.viewer.isRTL,o=!0===this.animateToReset;!0===this.isHard?(this.updateAngle(e.angle,i),this.angle=e.angle):(this.updatePoint({x:e.x,y:e.y}),this.x=e.x,this.y=e.y),t&&!o&&(this.element[0].style.opacity=i&&!n||!i&&n?e.index>.5?2*(1-e.index):1:e.index<.5?2*e.index:1)}},{key:"completeTween",value:function(){!0===this.isHard?(this.updateAngle(this.end.angle),this.backPage.element.css({display:"block"}),this.frontPage.element.css({display:"block"})):this.updatePoint({x:this.end.x,y:this.end.y}),this.element[0].style.opacity=1,!0!==this.animateToReset&&(this.side=this.targetSide),this.reset(),this.viewer.onFlip(),this.viewer.afterFlip(),this.viewer.requestRefresh()}}]),i}($),ep=/*#__PURE__*/function(e){es(i,e);var t=er(i);function i(e,n){var o,s;return ee(this,i),e.viewerClass=null!==(s=e.viewerClass)&&void 0!==s?s:"df-flipbook-2d",e.skipViewerLoaded=!0,(o=t.call(this,e,n)).bookShadow=el("<div>",{class:"df-book-shadow"}),o.wrapper.append(o.bookShadow),o.corner=p.TURN_CORNER.NONE,n._viewerPrepared(),o}return ei(i,[{key:"init",value:function(){en(eo(i.prototype),"init",this).call(this),this.initEvents(),this.initPages()}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],en(eo(i.prototype),"initEvents",this).call(this)}}
264,{key:"dispose",value:function(){en(eo(i.prototype),"dispose",this).call(this),this.element.remove()}},{key:"initPages",value:function(){for(var e=0;e<this.stackCount;e++){var t=new eu({parentElement:this.wrapper});t.index=e,t.viewer=this,this.sheets.push(t),this.pages.push(t.frontPage),this.pages.push(t.backPage)}}},{key:"resize",value:function(){en(eo(i.prototype),"resize",this).call(this);var e=this.app.dimensions,t=e.padding,n=this.availablePageHeight(),o=this.availablePageWidth(),s=this.fullWidth=o*(this.app.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE||this.app.viewer.isVertical()?1:2),a=this.fullHeight=n*(this.app.viewer.isVertical()&&this.app.viewer.pageMode!==p.FLIPBOOK_PAGE_MODE.SINGLE?2:1),r=e.width,l=e.height,h=this.shiftHeight=Math.ceil(eh.limitAt((a-l+t.height)/2,0,a)),u=this.shiftWidth=Math.ceil(eh.limitAt((s-r+t.width)/2,0,s));1===this.app.zoomValue&&(this.left=0,this.top=0),this.element.css({top:-h,bottom:-h,right:-u,left:-u,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left,transform:"translate3d("+this.left+"px,"+this.top+"px,0)"}),this.wrapper.css({marginTop:Math.max(e.height-a-t.height)/2,width:s-s%2,height:a}),this.zoomViewer.resize(),this.centerNeedsUpdate=!0,this.checkCenter(!0),this.pagesReady()}},{key:"updateCenter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.isVertical(),i=this.centerShift,n=(this.isRTL,this.isLeftPage()?this.leftSheetHeight:this.rightSheetHeight),o=this.isLeftPage()?this.leftSheetWidth:this.rightSheetWidth,s=t?0:i*o/2,a=t?i*n/2:0;this.wrapperShiftX=s,this.wrapperShiftY=a,this.seamPositionY=(this.app.dimensions.padding.heightDiff+this.app.dimensions.containerHeight)/2+a,this.seamPositionX=(-this.app.dimensions.offset.width+this.app.dimensions.containerWidth)/2+s,t?this.wrapper[0].style.top=this.wrapperShiftY+"px":this.wrapper[0].style.left=this.wrapperShiftX+"px",this.wrapper[0].style.transition=e?"none":"",this.zoomViewer.updateCenter()}},{key:"refreshSheet",value:function(e){var t=e.sheet,i=e.sheetNumber;!1===t.isFlipping&&(e.needsFlip?(t.element.addClass("df-flipping"),t.flip()):(t.skipFlip=!1,t.element.removeClass("df-flipping df-quick-turn df-folding df-left-side df-right-side"),t.element.addClass(t.targetSide===p.TURN_DIRECTION.LEFT?"df-left-side":"df-right-side"),t.side=t.targetSide,t.targetSide===p.TURN_DIRECTION.LEFT?this.isVertical()?t.updateSize(this.leftSheetWidth,this.leftSheetHeight,0,this.topSheetLeft):t.updateSize(this.leftSheetWidth,this.leftSheetHeight,this.leftSheetTop,0):this.isVertical()?t.updateSize(this.rightSheetWidth,this.rightSheetHeight,0,this.bottomSheetLeft):t.updateSize(this.rightSheetWidth,this.rightSheetHeight,this.rightSheetTop,0))),t.visible=e.visible,t.isHard?t.element.addClass("df-hard-sheet"):(t.element.removeClass("df-hard-sheet"),t.frontPage.updateCSS({display:"block"}),t.backPage.updateCSS({display:"block"})),t.updateCSS({display:!0===t.visible?"block":"none",zIndex:e.zIndex}),null==t.pendingPoint&&!1===t.isFlipping&&t.resetCSS(),i!==t.pageNumber&&(t.element.attr("number",i),t.backPage.element.attr("pagenumber",t.backPage.pageNumber),t.frontPage.element.attr("pagenumber",t.frontPage.pageNumber))}},{key:"eventToPoint",value:function(e){var t=this.isVertical();e=eh.fixMouseEvent(e);var i,n,o,s,a,r,l,h,u,c,d=this.wrapper[0].getBoundingClientRect(),f=this.is3D,g=this.sheets,m=(this.app.dimensions,{x:e.clientX,y:e.clientY}),v=this.parentElement[0].getBoundingClientRect();m.x=m.x-v.left,m.y=m.y-v.top,i=(c=this.dragSheet?this.dragSheet.side===p.TURN_DIRECTION.RIGHT:t?m.y>this.seamPositionY:m.x>this.seamPositionX)?this.rightSheetWidth:this.leftSheetWidth,s=c?this.rightSheetHeight:this.leftSheetHeight,n=t?i:this.rightSheetWidth+this.leftSheetWidth,o=t?this.leftSheetHeight+this.rightSheetHeight:s,r=c?this.rightSheetTop:this.leftSheetTop,a=t?m.x-(this.seamPositionX-(c?this.rightSheetWidth:this.leftSheetWidth)/2):m.x-(this.seamPositionX-this.leftSheetWidth),r=m.y-(d.top-v.top)-r,l=this.drag===p.TURN_DIRECTION.NONE?a<i?a:n-a:this.drag===p.TURN_DIRECTION.LEFT?a:n-a,h=c?g[this.stackCount/2]:g[this.stackCount/2-1],u=a<this.foldSense?p.TURN_DIRECTION.LEFT:a>n-this.foldSense?p.TURN_DIRECTION.RIGHT:p.TURN_DIRECTION.NONE;var y,b=r,w=this.foldSense;return y=a>=0&&a<w?b>=0&&b<=w?p.TURN_CORNER.TL:b>=o-w&&b<=o?p.TURN_CORNER.BL:b>w&&b<o-w?p.TURN_CORNER.L:p.TURN_CORNER.NONE:a>=n-w&&a<=n?b>=0&&b<=w?p.TURN_CORNER.TR:b>=o-w&&b<=o?p.TURN_CORNER.BR:b>w&&b<o-w?p.TURN_CORNER.R:p.TURN_CORNER.NONE:p.TURN_CORNER.NONE,{isInsideSheet:a>=0&&a<=n&&b>=0&&b<=o,isInsideCorner:y!==p.TURN_CORNER.NONE&&y!==p.TURN_CORNER.L&&y!==p.TURN_CORNER.R,x:f?m.x:a,y:f?m.y:r,fullWidth:n,sheetWidth:i,sheetHeight:s,rawDistance:n-a,distance:l,sheet:h,drag:u,foldSense:this.foldSense,event:e,raw:m,corner:y}}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];eh.pan(this,e,t)}},{key:"mouseMove",value:function(e){var t=this.eventToPoint(e);if(null!=e.touches&&2==e.touches.length){this.pinchMove(e);return}1!==this.app.zoomValue&&null!=this.startPoint&&!0===this.canSwipe&&(this.pan(t),e.preventDefault());var i=this.dragSheet||t.sheet;if(null==this.flipPage&&(null!=this.dragSheet||!0===t.isInsideCorner)){null!=this.dragSheet||(t.y=eh.limitAt(t.y,1,this.availablePageHeight()-1),t.x=eh.limitAt(t.x,1,t.fullWidth-1));var n=null!=this.dragSheet?this.corner:t.corner;if(i.isHard){var o=n===p.TURN_CORNER.BR||n===p.TURN_CORNER.TR,s=eh.angleByDistance(t.distance,t.fullWidth);i.updateAngle(s*(o?-1:1),o)}else i.updatePoint(t);i.magnetic=!0,i.magneticCorner=t.corner,e.preventDefault()}null==this.dragSheet&&null!=i&&!1===t.isInsideCorner&&!0===i.magnetic&&(i.pendingPoint=t,
264i.animateToReset=!0,i.magnetic=!1,this.corner=i.magneticCorner,i.flip(i.pendingPoint),i.pendingPoint=null),this.checkSwipe(t,e)}},{key:"mouseUp",value:function(e){if(e.touches||0===e.button){if(null==this.dragSheet&&null!=e.touches&&0==e.touches.length){this.pinchUp(e);return}var t=this.eventToPoint(e),i=e.target||e.originalTarget,n=1===this.app.zoomValue&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==i.nodeName;if(!0===e.ctrlKey&&n)this.zoomOnPoint(t);else if(this.dragSheet){e.preventDefault();var o=this.dragSheet;if(o.pendingPoint=t,this.drag=t.drag,n&&(!0===t.isInsideCorner||t.isInsideSheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV))t.corner.indexOf("l")>-1?this.app.openLeft():this.app.openRight();else{var s=this.getBasePage();t.distance>t.sheetWidth/2&&(t.sheet.side===p.TURN_DIRECTION.LEFT?this.app.openLeft():this.app.openRight()),s===this.getBasePage()&&(o.animateToReset=!0,o.flip(t))}this.dragSheet=null,o.magnetic=!1}else n&&!t.sheet.isFlipping&&t.isInsideSheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV&&("left"===t.sheet.side?this.app.openLeft():this.app.openRight());this.startPoint=null,this.canSwipe=!1,this.drag=p.TURN_DIRECTION.NONE}}},{key:"mouseDown",value:function(e){if(e.touches||0===e.button){if(null!=e.touches&&2==e.touches.length){this.pinchDown(e);return}var t=this.eventToPoint(e);this.startPoint=t,this.lastPosX=t.x,this.lastPosY=t.y,t.isInsideCorner&&null==this.flipPage?(this.dragSheet=t.sheet,this.drag=t.drag,this.corner=t.corner,0===t.sheet.pageNumber?this.bookShadow.css({width:"50%",left:this.app.isRTL?0:"50%",transitionDelay:""}):t.sheet.pageNumber===Math.ceil(this.app.pageCount/2)-1&&this.bookShadow.css({width:"50%",left:this.app.isRTL?"50%":0,transitionDelay:""})):this.canSwipe=!0}}},{key:"onScroll",value:function(e){}},{key:"resetPageTween",value:function(){for(var e=0;e<this.stackCount;e++){var t=this.sheets[e];t.currentTween&&t.currentTween.complete(!0)}this.requestRefresh()}},{key:"pagesReady",value:function(){if(!this.isFlipping()){if(!1===this.app.options.flipbookFitPages){var e=this.app.viewer.getBasePage(),t=this.leftViewport=this.getViewPort(e+(this.isBooklet?0:this.isRTL?1:0)),i=this.rightViewPort=this.getViewPort(e+(this.isBooklet?0:this.isRTL?0:1));if(t){var n=eh.contain(t.width,t.height,this.availablePageWidth(),this.availablePageHeight());this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height),this.leftSheetTop=(this.availablePageHeight()-this.leftSheetHeight)/2,this.topSheetLeft=(this.app.viewer.availablePageWidth()-this.leftSheetWidth)/2}if(i){var o=eh.contain(i.width,i.height,this.availablePageWidth(),this.availablePageHeight());this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height),this.rightSheetTop=(this.availablePageHeight()-this.rightSheetHeight)/2,this.bottomSheetLeft=(this.app.viewer.availablePageWidth()-this.rightSheetWidth)/2}this.totalSheetsWidth=this.leftSheetWidth+this.rightSheetWidth;for(var s=0;s<this.sheets.length;s++){var a=this.sheets[s];a.side===p.TURN_DIRECTION.LEFT?this.isVertical()?a.updateSize(this.leftSheetWidth,this.leftSheetHeight,0,this.topSheetLeft):a.updateSize(this.leftSheetWidth,this.leftSheetHeight,this.leftSheetTop,0):this.isVertical()?a.updateSize(this.rightSheetWidth,this.rightSheetHeight,0,this.bottomSheetLeft):a.updateSize(this.rightSheetWidth,this.rightSheetHeight,this.rightSheetTop,0)}}this.updateCenter(),this.updatePendingStatusClass(),this.app.executeCallback("onPagesReady")}}},{key:"textureLoadedCallback",value:function(e){this.getPageByNumber(e.pageNumber),this.pagesReady()}},{key:"isSheetHard",value:function(e){return!!this.isVertical()||en(eo(i.prototype),"isSheetHard",this).call(this,e)}}]),i}(Q);function ec(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ed(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ef(e,t,i){return t&&ed(e.prototype,t),i&&ed(e,i),e}function eg(e,t,i){return(eg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=em(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function em(e){return(em=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ev(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ey(e,t)}
264function ey(e,t){return(ey=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=em(e);return i=t?Reflect.construct(n,arguments,em(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var ew=p.jQuery,eP=p.utils,eS=/*#__PURE__*/function(e){ev(i,e);var t=eb(i);function i(){return ec(this,i),t.apply(this,arguments)}return ef(i,[{key:"init",value:function(){var e=this.element=ew("<div>",{class:"df-sheet"});(this.frontPage=new _).element.addClass("df-page-front").appendTo(this.element),(this.backPage=new _).element.addClass("df-page-back").appendTo(this.element),this.parentElement.append(e),this.frontPage.sheet=this.backPage.sheet=this}},{key:"completeTween",value:function(){this.isFlipping=!1,this.viewer.onFlip(),this.viewer.afterFlip(),this.viewer.requestRefresh(),this.element[0].style.opacity=1}},{key:"flip",value:function(e){this.side=this.targetSide,this.completeTween()}},{key:"updateSize",value:function(e,t,i,n){e=Math.floor(e),t=Math.floor(t),i=Math.floor(i),this.element[0].style.height=this.frontPage.element[0].style.height=t+"px",this.element[0].style.width=this.frontPage.element[0].style.width=e+"px",this.element[0].style.transform="translateX("+this.positionX+"px) translateY("+i+"px)"}}]),i}(eu),eE=/*#__PURE__*/function(e){ev(i,e);var t=eb(i);function i(e,n){var o;return ec(this,i),e.viewerClass="df-slider",e.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE,e.singlePageMode=p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET,e.pageSize=p.FLIPBOOK_PAGE_SIZE.SINGLE,(o=t.call(this,e,n)).stackCount=10,o.soundOn=!1,o.foldSense=0,n._viewerPrepared(),o}return ef(i,[{key:"initPages",value:function(){for(var e=0;e<this.stackCount;e++){var t=new eS({parentElement:this.wrapper});t.index=e,t.viewer=this,this.sheets.push(t),this.pages.push(t.frontPage),this.pages.push(t.backPage)}}},{key:"resize",value:function(){eg(em(i.prototype),"resize",this).call(this),this.skipTransition=!0}},{key:"refreshSheet",value:function(e){var t=e.sheet,i=e.sheetNumber;t.element.toggleClass("df-no-transition",t.skipFlip||this.skipTransition),!1===t.isFlipping&&(e.needsFlip?t.flip():(t.skipFlip=!1,t.element.removeClass("df-flipping df-quick-turn df-folding df-left-side df-right-side"),t.element.addClass(t.targetSide===p.TURN_DIRECTION.LEFT?"df-left-side":"df-right-side"),t.side=t.targetSide)),t.visible=e.visible,t.updateCSS({display:e.sheetNumber>0&&e.sheetNumber<=this.app.pageCount?"block":"none",zIndex:e.zIndex}),i!==t.pageNumber&&(t.element.attr("number",i),t.backPage.element.attr("pagenumber",t.backPage.pageNumber),t.frontPage.element.attr("pagenumber",t.frontPage.pageNumber))}},{key:"refresh",value:function(){eg(em(i.prototype),"refresh",this).call(this),this.skipTransition=!1}},{key:"eventToPoint",value:function(e){var t=eg(em(i.prototype),"eventToPoint",this).call(this,e);return t.isInsideSheet=ew(e.srcElement).closest(".df-page").length>0,t.isInsideCorner=!1,t}},{key:"initCustomControls",value:function(){var e=this.app.ui.controls;e.pageMode&&e.pageMode.hide()}},{key:"setPageMode",value:function(e){e.isSingle=!0,eg(em(i.prototype),"setPageMode",this).call(this,e)}},{key:"pagesReady",value:function(){if(!this.isFlipping()){var e=0,t=0,i=this.app;this.stackCount;for(var n=[],o=i.currentPageNumber,s=0;s<this.stackCount/2;s++)n.push(o+s),n.push(o-s-1);for(var a=0;a<this.stackCount;a++){var r=n[a];if(this.getPageByNumber(r)){var l=this.getPageByNumber(r).sheet,h=this.getViewPort(l.pageNumber,!0),u=eP.contain(h.width,h.height,this.availablePageWidth(),this.availablePageHeight());i.currentPageNumber===l.pageNumber&&(this.leftSheetWidth=this.rightSheetWidth=Math.floor(u.width)),i.currentPageNumber>l.pageNumber?(e-=Math.floor(u.width)+10,l.positionX=e):(l.positionX=t,t+=Math.floor(u.width)+10);var p=(this.availablePageHeight()-u.height)/2;l.updateSize(Math.floor(u.width*i.zoomValue),Math.floor(u.height*i.zoomValue),p)}}this.updateCenter(),this.updatePendingStatusClass(),this.app.executeCallback("onPagesReady")}}},{key:"isVertical",value:function(){return!1}}]),i}(ep);function ex(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eC(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eT(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ek(e,t,i){return t&&eT(e.prototype,t),i&&eT(e,i),e}function eO(e){return(eO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eR(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eL(e,t)}
264function eL(e,t){return(eL=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eN(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eO(e);return i=t?Reflect.construct(n,arguments,eO(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:ex(this)}}var e_={};function eI(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eA(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eM(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ez(e,t,i){return t&&eM(e.prototype,t),i&&eM(e,i),e}function eD(e,t,i){return(eD="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eF(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function eF(e){return(eF=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eB(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eU(e,t)}function eU(e,t){return(eU=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eH(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eF(e);return i=t?Reflect.construct(n,arguments,eF(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:eI(this)}}e_.init=function(){if(!0!==e_.initialized){var e=window.THREE;e_={init:function(){},initialized:!0,GEOMETRY_TYPE:{PLANE:0,BOX:1,MODEL:2},MATERIAL_FACE:{FRONT:5,BACK:4},WHITE_COLOR:new e.Color("white"),defaults:{anisotropy:8,maxTextureSize:2048,groundTexture:"blank",color:16777215,shininess:1
2645,width:210,height:297,depth:.2,segments:150,textureLoadFallback:"blank"},textureLoader:new e.TextureLoader,clearChild:function(e){var t,i=e.material;if(e.parent.remove(e),e=m.disposeObject(e),null!=i){if(null==i.length)i.map&&(t=i.map,i.dispose(),t.dispose()),i.bumpMap&&(t=i.bumpMap,i.dispose(),t.dispose()),i.normalMap&&(t=i.normalMap,i.dispose(),t.dispose());else for(var n=0;n<i.length;n++)i[n]&&(i[n].map&&(t=i[n].map,i[n].dispose(),t.dispose()),i[n].bumpMap&&(t=i[n].bumpMap,i[n].dispose(),t.dispose()),i[n].normalMap&&(t=i[n].normalMap,i[n].dispose(),t.dispose())),i[n]=null;i=null,t=null}},loadImage:function(t,i,n,o,s){if(null==i){var a=null==t.material[n]?null:t.material[n][o]?t.material[n][o].sourceFile:null;return null==a?null:a.indexOf("data:image")>-1?null:a}var r=null;return"CANVAS"===i.nodeName||"IMG"===i.nodeName?((r=new e.Texture(i)).needsUpdate=!0,e_.loadTexture(r,t,o,n),"function"==typeof s&&s(t,r)):"blank"!==i?(r=null==i?null:e_.textureLoader.load(i,function(e){e.sourceFile=i,e_.loadTexture(e,t,o,n),"function"==typeof s&&s(t,e)},void 0,function(){null==r.image&&e_.loadImage(t,e_.defaults.textureLoadFallback,n,o),e_.loadTextureFailed()}))&&(r.mapping=e.UVMapping):(e_.loadTexture(null,t,o,n),"function"==typeof s&&s(t,r)),0},loadTexture:function(t,i,n,o){if(t){var s=t.image;t.naturalWidth=s.naturalWidth,t.naturalHeight=s.naturalHeight,t.needsUpdate=!0,void 0!=i.textureRotation&&(t.rotation=e.MathUtils.degToRad(i.textureRotation),t.center=i.textureCenter)}null!==t&&"map"===n&&(t.anisotropy=0,e_.defaults.anisotropy>0&&(t.anisotropy=e_.defaults.anisotropy),!0===e.skipPowerOfTwo&&(t.minFilter=e.LinearFilter,t.magFilter=e.LinearFilter),t.name=new Date().toTimeString()),e_.clearTexture(i.material[o][n]),i.material[o][n]=t,"bumpMap"===n&&(i.material[o].bumpScale=i.sheet.getBumpScale(o)),i.material[o].needsUpdate=!0},loadTextureFailed:function(){return null},clearTexture:function(e){if(e){if(e.image&&"CANVAS"===e.image.nodeName){if(e.image.remove)try{e.image.remove()}catch(e){console.log(e)}delete e.image}e=m.disposeObject(e)}}},e.skipPowerOfTwo=!0;var t=/*#__PURE__*/function(t){eR(n,t);var i=eN(n);function n(t){eC(this,n);var o,s=t.width||e_.defaults.width,a=t.height||e_.defaults.height,r=t.color||e_.defaults.color,l=t.segments||e_.defaults.segments,h=t.depth||e_.defaults.depth,u={color:r,flatShading:!1,shininess:t.shininess||e_.defaults.shininess},p=new e.MeshPhongMaterial(u),c=[p,p,p,p,new e.MeshPhongMaterial(u),new e.MeshPhongMaterial(u)];return(o=i.call(this,new e.BoxGeometry(s,a,h,l,1,1),c)).material[5].transparent=!0,o.material[4].transparent=!0,o.baseType="Paper",o.type="Paper",o.castShadow=!0,o.receiveShadow=!0,t.parent3D.add(ex(o)),o}return ek(n,[{key:"loadImage",value:function(e,t,i){e_.loadImage(this,e,t,"map",i)}},{key:"frontImage",value:function(e,t){e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"map",t)}},{key:"backImage",value:function(e,t){e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"map",t)}},{key:"loadBump",value:function(e){e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"bumpMap",null),e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"bumpMap",null)}},{key:"loadNormalMap",value:function(e,t){if(void 0!==t){e_.loadImage(this,e,t,"normalMap",null);return}e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"normalMap",null),e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"normalMap",null)}}]),n}(e.Mesh),i=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){var n;return eC(this,i),(n=t.call(this,e)).receiveShadow=!0,n.frontImage(e_.defaults.groundTexture),n.backImage(e_.defaults.groundTexture),n.type="Ground",n}return i}(t),n=/*#__PURE__*/function(t){eR(o,t);var n=eN(o);function o(t){eC(this,o);var s,a=ex(s=n.call(this));a.canvas=t.canvas||document.createElement("canvas"),a.canvas=s.canvas,a.camera=new e.PerspectiveCamera(20,a.width/a.height,4,5e4),a.renderer=new e.WebGLRenderer({canvas:a.canvas,antialias:!0,alpha:!0}),a.renderer.setPixelRatio(t.pixelRatio),a.renderer.setSize(a.width,a.height),a.renderer.setClearColor(16777215,0),a.renderer.shadowMap.enabled=!0,a.renderer.shadowMap.type=1,a.ground=new i({color:16777215,height:a.camera.far/10,width:a.camera.far/10,segments:2,parent3D:a}),a.ambientLight=new e.AmbientLight(4473924),a.add(a.ambientLight);var r=a.spotLight=new e.DirectionalLight(16777215,.25);return r.position.set(0,1,0),!1!==t.castShadow&&(r.castShadow=!0,r.shadow.camera.near=200,r.shadow.camera.far=2e3,r.shadow.camera.top=1350,r.shadow.camera.bottom=-1350,r.shadow.camera.left=-1350,r.shadow.camera.right=1350,r.shadow.radius=2,r.shadow.mapSize.width=1024,r.shadow.mapSize.height=1024,r.shadow.needsUpdate=!0),a.add(r),a.animateCount=0,a.renderCount=0,a.camera.position.set(-300,300,300),a.camera.lookAt(new e.Vector3(0,0,0)),s}return ek(o,[{key:"resizeCanvas",value:function(e,t){this.renderer.setSize(e,t),this.camera.aspect=e/t,this.camera.updateProjectionMatrix()}},{key:"render",value:function(){this.animateCount++,this.renderer.render(this,this.camera),null!=this.stats&&this.stats.update()}},{key:"clearMaterials",value:function(){for(var e=this.children.length,t=e-1;t>=0;t--){var i=this.children[t];if(i.baseType&&"Paper"===i.baseType&&i.material){if(i.material.length)for(var n=0;n<i.material.length;n++)i.material[n].needsUpdate=!0;else i.material.needsUpdate=!0}}}},{key:"clearChild",value:function(){this.spotLight.shadow.map=m.disposeObject(this.spotLight.shadow.map),this.spotLight.castShadow=!1,this.clearMaterials();for(var e=this.children.length,t=e-1;t>=0;t--){var i=this.children[t];if(i.children&&i.children.length>0)for(var n=i.children.length-1;n>=0;n--)e_.clearChild(i.children[n]);e_.clearChild(i),i=null}this.render()}}]),o}(e.Scene);e_.Paper=t,e_.Stage=n;var o=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){var n;return eC(this,i),(n=t.call(this)).element=e,n.element.style.position="absolute",n.addEventListener("removed",function(){null!==this.element.parentNode&&this.element.parentNode.removeChild(this.element)}),n}return i}(e.Object3D);e.CSS3DObject=o;var s=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){return eC(this,i),t.call(this,e)}return i}(e.CSS3DObject);e.CSS3DSprite=s,e.MathUtils&&(e.Math=e.MathUtils),e.CSS3DRenderer=function(){m.log("THREE.CSS3DRenderer",e.REVISION);
264var t,i,n,o,s=new e.Matrix4,a={camera:{fov:0,style:""},objects:{}},r=document.createElement("div");r.style.overflow="hidden",r.style.WebkitTransformStyle="preserve-3d",r.style.MozTransformStyle="preserve-3d",r.style.oTransformStyle="preserve-3d",r.style.transformStyle="preserve-3d",this.domElement=r;var l=document.createElement("div");l.style.WebkitTransformStyle="preserve-3d",l.style.MozTransformStyle="preserve-3d",l.style.oTransformStyle="preserve-3d",l.style.transformStyle="preserve-3d",r.appendChild(l),this.setClearColor=function(){},this.getSize=function(){return{width:t,height:i}},this.setSize=function(e,s){t=e,i=s,n=t/2,o=i/2,r.style.width=e+"px",r.style.height=s+"px",l.style.width=e+"px",l.style.height=s+"px"};var h=function(e){return Math.abs(e)<Number.EPSILON?0:e},u=function(e){var t=e.elements;return"matrix3d("+h(t[0])+","+h(-t[1])+","+h(t[2])+","+h(t[3])+","+h(t[4])+","+h(-t[5])+","+h(t[6])+","+h(t[7])+","+h(t[8])+","+h(-t[9])+","+h(t[10])+","+h(t[11])+","+h(t[12])+","+h(-t[13])+","+h(t[14])+","+h(t[15])+")"},p=function(e){var t=e.elements;return"translate3d(-50%,-50%,0) matrix3d("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+h(-t[4])+","+h(-t[5])+","+h(-t[6])+","+h(-t[7])+","+h(t[8])+","+h(t[9])+","+h(t[10])+","+h(t[11])+","+h(t[12])+","+h(t[13])+","+h(t[14])+","+h(t[15])+")"},c=function(t,i){if(t instanceof e.CSS3DObject){t instanceof e.CSS3DSprite?(s.copy(i.matrixWorldInverse),s.transpose(),s.copyPosition(t.matrixWorld),s.scale(t.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,n=p(s)):n=p(t.matrixWorld);var n,o=t.element,r=a.objects[t.id];(void 0===r||r!==n)&&(o.style.WebkitTransform=n,o.style.MozTransform=n,o.style.oTransform=n,o.style.transform=n,a.objects[t.id]=n),o.parentNode!==l&&l.appendChild(o)}for(var h=0,u=t.children.length;h<u;h++)c(t.children[h],i)};this.render=function(t,s){var h=.5/Math.tan(e.Math.degToRad(.5*s.fov))*i;a.camera.fov!==h&&(r.style.WebkitPerspective=h+"px",r.style.MozPerspective=h+"px",r.style.oPerspective=h+"px",r.style.perspective=h+"px",a.camera.fov=h),t.updateMatrixWorld(),null===s.parent&&s.updateMatrixWorld(),s.matrixWorldInverse.invert?s.matrixWorldInverse.copy(s.matrixWorld).invert():s.matrixWorldInverse.getInverse(s.matrixWorld);var p="translate3d(0,0,"+h+"px)"+u(s.matrixWorldInverse)+" translate3d("+n+"px,"+o+"px, 0)";a.camera.style!==p&&(l.style.WebkitTransform=p,l.style.MozTransform=p,l.style.oTransform=p,l.style.transform=p,a.camera.style=p),c(t,s)}}}};var eV=p.jQuery,eW=p.utils,ej=/*#__PURE__*/function(e){eB(i,e);var t=eH(i);function i(e){var n;return eA(this,i),(n=t.call(this,e)).flexibility=e.flexibility,n.sheetAngle=180,n.curveAngle=0,n.parent3D=e.parent3D,n.segments=e.segments||50,n.width=e.width||100,n.height=e.height||100,n.depth=e.depth||.5,n.matColor="white",n.fallbackMatColor=e_.WHITE_COLOR,n.init(),n.bumpScale=[0,0,0,0,1,1],n}return ez(i,[{key:"init",value:function(){this.element=new e_.Paper({parent3D:this.parent3D,segments:this.segments,depth:this.depth,height:this.height,width:this.width,flatShading:0===this.flexibility}),this.element.sheet=this,this.frontPage=new eG({sheet:this,face:5}),this.backPage=new eG({sheet:this,face:4}),this.reset(),this.updateAngle()}},{key:"setMatColor",value:function(e,t){if(this.matColor=new THREE.Color(e),void 0===t)for(var i=0;i<6;i++)this.element.material[i].color=this.matColor;else this.element.material[t].color=this.matColor}},{key:"getBumpScale",value:function(e){return this.bumpScale[e]}},{key:"resetMatColor",value:function(e,t){this.element.material[e].color=t?this.matColor:this.fallbackMatColor}},{key:"frontImage",value:function(e,t){this.element.frontImage(e,t)}},{key:"backImage",value:function(e,t){this.element.backImage(e,t)}},{key:"updateAngle",value:function(){if(void 0!==this.viewer&&null!==this.viewer){var e=!0===this.isHard?0:this.flexibility,t=(this.viewer.isVertical()?this.height:this.width)*(1-Math.sin(e/2*(e/2))/2-e/20);this.element.scale.y=(this.viewer.isVertical()?this.width:this.height)/this.element.geometry.parameters.height;var i=this.segments,n=t/1,o=n*e,s=[],a=[],r=[],l=[],h=[],u=[],p=this.depth,c=0,d=[];d.push(c),h[0]=[],u[0]=[];var f=this.sheetAngle*Math.PI/180;
264this.viewer.isVertical()||(this.element.position.x=-Math.cos(f)*this.viewer.pageOffset),this.viewer.isVertical()&&(this.element.position.y=Math.cos(f)*this.viewer.pageOffset);var g=!0===this.isHard?f:this.curveAngle*Math.PI/180,m=this.sheetAngle*Math.PI/180,v=m-Math.PI/2,y=Math.sin(v)*p/2;h[0][0]=h[0][1]=new THREE.Vector3(-n*Math.cos(f),0,Math.sin(f)*n-y),u[0][0]=u[0][1]=new THREE.Vector3(h[0][0].x-Math.cos(v)*p,0,h[0][0].z+2*y),h[0][1]=new THREE.Vector3(-n/2*Math.cos(g),0,n/2*Math.sin(g)-y),u[0][1]=new THREE.Vector3(h[0][1].x-Math.cos(v)*p,0,h[0][1].z+2*y),m=(45+this.sheetAngle/2)*Math.PI/180,h[0][2]=new THREE.Vector3(-Math.cos(m)*o/2,0,Math.sin(m)*o-y),u[0][2]=new THREE.Vector3(h[0][2].x+Math.cos(v)*p,0,h[0][2].z+2*y),5e-4>Math.abs(u[0][2].x-0)&&(u[0][2].x=0),h[0][3]=new THREE.Vector3(0,0,-y),u[0][3]=new THREE.Vector3(h[0][3].x-Math.cos(v)*p,0,h[0][3].z+2*y),5e-4>Math.abs(u[0][3].x-0)&&(u[0][3].x=0);for(var b=0;b<1;b++){var w=Math.max(this.segments-1,1);s[b]=new THREE.CubicBezierCurve3(h[b][0],h[b][1],h[b][2],h[b][3]),r[b]=s[b].getPoints(w),w>2&&r[b].push(new THREE.Vector3().copy(r[b][w]));for(var P=void 0,S=r[b][0],E=1;E<r[b].length;E++)c+=(P=r[b][E]).distanceTo(S),d.push(c),S=P;a[b]=new THREE.CubicBezierCurve3(u[b][0],u[b][1],u[b][2],u[b][3]),l[b]=a[b].getPoints(w),w>2&&l[b].push(new THREE.Vector3().copy(l[b][w]))}var x=this.element.geometry;if(void 0!==x.attributes){var C=x.attributes.position,T=x.attributes.uv,k=i+1;C.setZ(0,r[0][i].z),C.setZ(2,r[0][i].z),C.setX(0,r[0][i].x),C.setX(2,r[0][i].x),C.setZ(1,l[0][i].z),C.setZ(3,l[0][i].z),C.setX(1,l[0][i].x),C.setX(3,l[0][i].x),C.setZ(5,r[0][0].z),C.setZ(7,r[0][0].z),C.setX(5,r[0][0].x),C.setX(7,r[0][0].x),C.setZ(4,l[0][0].z),C.setZ(6,l[0][0].z),C.setX(4,l[0][0].x),C.setX(6,l[0][0].x);for(var O=0;O<1;O++)for(var R=0;R<k;R++)C.setZ(8+0*k+R,r[0][R].z),C.setX(8+0*k+R,r[0][R].x),C.setZ(8+1*k+R,l[0][R].z),C.setX(8+1*k+R,l[0][R].x),C.setZ(8+2*k+R,r[0][R].z),C.setX(8+2*k+R,r[0][R].x),C.setZ(8+3*k+R,l[0][R].z),C.setX(8+3*k+R,l[0][R].x),C.setZ(8+4*k+R,r[0][R].z),C.setX(8+4*k+R,r[0][R].x),C.setZ(8+5*k+R,r[0][R].z),C.setX(8+5*k+R,r[0][R].x),T.setX(8+4*k+R,d[R]/c),T.setX(8+5*k+R,d[R]/c),C.setZ(8+6*k+R,l[0][i-R].z),C.setX(8+6*k+R,l[0][i-R].x),C.setZ(8+7*k+R,l[0][i-R].z),C.setX(8+7*k+R,l[0][i-R].x),T.setX(8+6*k+R,1-d[i-R]/c),T.setX(8+7*k+R,1-d[i-R]/c);x.computeBoundingBox(),this.element.scale.x=1*n/c,x.computeBoundingSphere(),C.needsUpdate=!0,T.needsUpdate=!0,x.computeVertexNormals()}else{var L=x.vertices,N=i-1,_=8;L[0].z=L[2].z=r[0][i].z,L[0].x=L[2].x=r[0][i].x,L[1].z=L[3].z=l[0][i].z,L[1].x=L[3].x=l[0][i].x,L[5].z=L[7].z=r[0][0].z,L[5].x=L[7].x=r[0][0].x,L[4].z=L[6].z=l[0][0].z,L[4].x=L[6].x=l[0][0].x;for(var I=0;I<1;I++)for(var A=1;A<i;A++)L[_].z=L[_+3*N].z=l[0][A].z,L[_].x=L[_+3*N].x=l[0][A].x,L[_+N].z=L[_+2*N].z=r[0][A].z,L[_+N].x=L[_+2*N].x=r[0][A].x,_++;for(var M=x.faceVertexUvs[0],z=x.faces,D=0,F=0;F<M.length;F++)if(z[F].materialIndex===e_.MATERIAL_FACE.BACK){var B=d[D]/c;F%2==0?(M[F][0].x=M[F][1].x=M[F+1][0].x=B,D++):M[F-1][2].x=M[F][1].x=M[F][2].x=B}else if(z[F].materialIndex===e_.MATERIAL_FACE.FRONT){var U=1-d[D]/c;F%2==0?(M[F][0].x=M[F][1].x=M[F+1][0].x=U,D--):M[F-1][2].x=M[F][1].x=M[F][2].x=U}x.computeBoundingBox(),this.element.scale.x=1*n/c,x.computeBoundingSphere(),x.verticesNeedUpdate=!0,x.computeFaceNormals(),x.computeVertexNormals(),x.uvsNeedUpdate=!0,x.normalsNeedUpdate=!0}s.forEach(function(e){}),a.forEach(function(e){}),l.forEach(function(e){}),r.forEach(function(e){})}}},{key:"flip",value:function(e,t){var i=this,n=i.viewer.isBooklet;!0===i.isCover&&(0===e&&(e=2.5*i.viewer.flexibility),180===e&&(e-=2.5*i.viewer.flexibility));var o=t-e,s=e>90,a=i.viewer.isRTL,r=s?i.backPage.pageNumber:i.frontPage.pageNumber,l=this.viewer.getViewPort(r);l&&(l=eW.contain(l.width,l.height,i.viewer.availablePageWidth(),i.viewer.availablePageHeight()));var h=-(i.viewer.has3DCover&&i.viewer.isClosedPage()?i.viewer.coverExtraWidth:0),u=-(i.viewer.has3DCover&&i.viewer.isClosedPage()?i.viewer.coverExtraHeight:0);i.init={angle:e,height:s?i.viewer.rightSheetHeight:i.viewer.leftSheetHeight,width:s?i.viewer.rightSheetWidth:i.viewer.leftSheetWidth,index:s&&!a||!s&&a?1:0,_index:0},i.first={angle:e+o/4,index:s&&!a||!s&&a?1:.25},i.mid={angle:e+2*o/4,index:.5},i.mid2={angle:e+3*o/4,index:s&&!a||!s&&a?.25:1},i.end={angle:t,index:s&&!a||!s&&a?0:1,height:u+(l?l.height:i.height),width:h+(l?l.width:i.width)},i.isFlipping=!0;var p=function(e){i.sheetAngle=e.angle,i.curveAngle=i.isHard?e.angle:eW.getCurveAngle(s,e.angle),!0===i.isHard?(i.flexibility=0,i.isCover&&i.viewer.flipCover(i)):i.flexibility=e.angle<90?i.leftFlexibility:i.rightFlexibility,i.element.position.z=(e.angle<90?i.leftPos:i.rightPos)+i.depth,n&&(i.element.material[5].opacity=i.element.material[4].opacity=e.index,i.element.castShadow=e.index>
264.5),i.height=e.height,i.width=e.width,i.updateAngle(!0)};n&&(!s&&!a||s&&a)&&(i.element.material[5].opacity=i.element.material[4].opacity=0,i.element.castShadow=!1),i.currentTween=new TWEEN.Tween(i.init).to({angle:[i.first.angle,i.mid.angle,i.mid2.angle,i.end.angle],index:[i.first.index,i.mid.index,i.mid2.index,i.end.index],_index:1,height:i.end.height,width:i.end.width},i.viewer.app.options.duration*Math.abs(o)/180).onUpdate(function(e){p(this,e)}).easing(TWEEN.Easing.Sinusoidal.Out).onStop(function(){i.currentTween=null,i.isFlipping=!1,i.isCover&&(i.viewer.leftCover.isFlipping=!1,i.viewer.rightCover.isFlipping=!1),i.element.material[5].opacity=i.element.material[4].opacity=1}).onComplete(function(){i.updateAngle(),i.element.material[5].opacity=i.element.material[4].opacity=1,i.element.castShadow=!0,i.isFlipping=!1,i.isCover&&(i.viewer.leftCover.isFlipping=!1,i.viewer.rightCover.isFlipping=!1),i.side=i.targetSide,i.viewer.onFlip(),i.viewer.afterFlip(),i.currentTween=null,i.viewer&&i.viewer.requestRefresh&&i.viewer.requestRefresh()}).start(),i.currentTween.update(window.performance.now())}}]),i}($),eq=/*#__PURE__*/function(e){eB(i,e);var t=eH(i);function i(e,n){var o,s,a,r,l;return eA(this,i),e.viewerClass="df-flipbook-3d",(o=t.call(this,e,n)).pageOffset=5,o.spiralCount=20,o.groundDistance=null!==(s=e.groundDistance)&&void 0!==s?s:2,o.hasSpiral="true"===e.hasSpiral||!0===e.hasSpiral,o.flexibility=eW.limitAt(null!==(a=e.flexibility)&&void 0!==a?a:.9,0,10),o.hasSpiral&&(o.flexibility=0),0===o.flexibility&&(e.sheetSegments=8),o.drag3D=eW.isTrue(e.drag3D),o.texturePowerOfTwo=!eW.isMobile&&(null===(r=e.texturePowerOfTwo)||void 0===r||r),o.color3DSheets=null!==(l=o.app.options.color3DSheets)&&void 0!==l?l:"white",o.midPosition=0,o.initMOCKUP(function(){n._viewerPrepared()}),o}return ez(i,[{key:"initMOCKUP",value:function(e){var t=this.app;"undefined"==typeof THREE?(t.updateInfo(t.options.text.loading+" WEBGL 3D ..."),"function"==typeof window.define&&window.define.amd&&window.requirejs?(window.requirejs.config({paths:{three:t.options.threejsSrc.replace(".js","")},shim:{three:{exports:"THREE"}}}),window.require(["three"],function(t){return window.THREE=t,e_.init(),"function"==typeof e&&e(),t})):"function"==typeof window.define&&window.define.amd?window.require(["three",t.options.threejsSrc.replace(".js","")],function(t){t(function(){e_.init(),"function"==typeof e&&e()})}):eW.getScript(t.options.threejsSrc+"?ver="+p.version,function(){e_.init(),"function"==typeof e&&e()},function(){t.updateInfo("Unable to load THREE.js...")})):(e_.init(),"function"==typeof e&&e())}},{key:"init",value:function(){var e=this.app;eD(eF(i.prototype),"init",this).call(this),e.provider.defaultPage.pageRatio,this.pageScaleX=1,this.initDepth(),this.initStage(),this.initPages(),this.initEvents(),this.render()}},{key:"updatePageMode",value:function(){eD(eF(i.prototype),"updatePageMode",this).call(this);var e=this.app;this.has3DCover=e.options.cover3DType!==p.FLIPBOOK_COVER_TYPE.NONE&&e.pageCount>7&&!this.isBooklet,this.has3DCover&&"none"===e.options.flipbookHardPages&&(e.options.flipbookHardPages="cover")}},{key:"initDepth",value:function(){var e,t;this.sheetDepth=this.pageScaleX*(null!==(e=this.app.options.sheetDepth)&&void 0!==e?e:.5),this.sheetSegments=null!==(t=this.app.options.sheetSegments)&&void 0!==t?t:20,this.coverDepth=2*this.sheetDepth,this.sheetsDepth=Math.min(10,this.app.pageCount/4)*this.sheetDepth}},{key:"initStage",value:function(){var e=this.stage=new e_.Stage({pixelRatio:this.app.options.pixelRatio});(e.canvas=eV(e.renderer.domElement).addClass("df-3dcanvas")).appendTo(this.element),e.camera.position.set(0,0,600),e.camera.lookAt(new THREE.Vector3(0,0,0)),this.camera=e.camera,e.spotLight.position.set(-220,220,550),e.spotLight.castShadow=!eW.isMobile&&this.app.options.has3DShadow,e.spotLight.shadow&&(e.spotLight.shadow.bias=-.005),e.ambientLight.color=new THREE.Color("#fff"),e.ambientLight.intensity=.82;var t=new THREE.ShadowMaterial;t.opacity=this.app.options.shadowOpacity,e.ground.oldMaterial=e.ground.material,e.ground.material=t,e.ground.position.z=this.has3DCover?-6:-4,e.selectiveRendering=!0;var i=e.cssRenderer=new THREE.CSS3DRenderer;eV(i.domElement).css({position:"absolute",top:0,pointerEvents:"none"}).addClass("df-3dcanvas df-csscanvas"),this.element[0].appendChild(i.domElement),e.cssScene=new THREE.Scene,this.wrapper.remove(),this.wrapper=new THREE.Group,this.stage.add(this.wrapper),this.wrapper.add(e.ground),this.bookWrapper=new THREE.Group,this.bookWrapper.name="bookwrapper",this.wrapper.add(this.bookWrapper),this.bookHelper=e.bookHelper=new THREE.BoxHelper(this.bookWrapper,16776960),e.add(this.bookHelper),this.bookHelper.visible=!1,this.cameraWrapper=new THREE.Group,this.cameraWrapper.add(e.camera),e.add(this.cameraWrapper),this.app.renderRequestStatus=p.REQUEST_STATUS.ON}},{key:"initPages",value:function(){for(var e={parent3D:this.bookWrapper,viewer:this,segments:this.sheetSegments,depth:this.sheetDepth,flexibility:this.flexibility},t=0;t<this.stackCount;t++){var i=new ej(e);i.index=t,i.viewer=this,this.sheets.push(i),i.setMatColor(this.color3DSheets),this.pages.push(i.frontPage),this.pages.push(i.backPage),this.stage.cssScene.add(i.frontPage.cssPage),this.stage.cssScene.add(i.backPage.cssPage)}e.depth=this.sheetsDepth,e.segments=1,e.flexibility=0,this.leftSheets=new ej(e),this.rightSheets=new ej(e),this.leftSheets.setMatColor(this.color3DSheets),this.rightSheets.setMatColor(this.color3DSheets),e.depth=this.coverDepth,this.leftCover=new ej(e),this.rightCover=new ej(e),this.leftCover.isHard=!0,this.rightCover.isHard=!0,this.set3DCoverNormal(),this.setcolor3DCover(this.app.options.color3DCover),this.stage.cssScene.add(this.leftCover.frontPage.cssPage),this.stage.cssScene.add(this.rightCover.backPage.cssPage),this.zoomViewer.leftPage.element.css({backgroundColor:this.color3DSheets}),this.zoomViewer.rightPage.element.css({backgroundColor:this.color3DSheets}
264),this.isVertical()&&this.bookWrapper.children.forEach(function(e){e.rotateZ(THREE.MathUtils.degToRad(-90)),e.textureCenter=new THREE.Vector2(.5,.5),e.textureRotation=90}),this.initSpiral()}},{key:"initSpiral",value:function(){this.hasSpiral=!1}},{key:"set3DCoverNormal",value:function(){}},{key:"setcolor3DCover",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],eD(eF(i.prototype),"initEvents",this).call(this)}},{key:"dispose",value:function(){eD(eF(i.prototype),"dispose",this).call(this),this.stage&&(this.stage.clearChild(),this.stage.cssRenderer.domElement.parentNode.removeChild(this.stage.cssRenderer.domElement),this.stage.cssRenderer=null,this.stage.orbitControl=eW.disposeObject(this.stage.orbitControl),this.stage.renderer=eW.disposeObject(this.stage.renderer),eV(this.stage.canvas).remove(),this.stage.canvas=null,this.stage=eW.disposeObject(this.stage)),this.centerTween&&this.centerTween.stop&&this.centerTween.stop()}},{key:"render",value:function(){this.stage.render(),this.stage.cssRenderer.render(this.stage.cssScene,this.stage.camera)}},{key:"resize",value:function(){eD(eF(i.prototype),"resize",this).call(this);var e=this,t=e.app,n=e.stage,o=t.dimensions;o.padding,e.isSingle;var s=this.availablePageWidth(),a=this.availablePageHeight();n.resizeCanvas(o.stage.width,o.stage.height),n.cssRenderer.setSize(o.stage.width,o.stage.height),this.pageScaleX=Math.max(Math.max(s,a)/400,1),this.initDepth(),this.sheets.forEach(function(t){t.depth=e.sheetDepth}),t.refreshRequestStart();var r=this.refSize=Math.min(a,s);this.coverExtraWidth=(e.isVertical()?2:1)*r*.025,this.coverExtraHeight=(e.isVertical()?1:2)*r*.025,!0!==this.has3DCover&&(this.coverExtraWidth=0,this.coverExtraHeight=0),e.zoomViewer.resize(),e.cameraPositionDirty=!0,e.centerNeedsUpdate=!0,e.checkCenter(!0),e.pagesReady(),this.pageOffset=(this.hasSpiral?6:0)*Math.min(this._defaultPageSize.width,this._defaultPageSize.height)/1e3}},{key:"fitCameraToCenteredObject",value:function(e,t,i,n){var o=new THREE.Box3;o.setFromObject(t),new THREE.Vector3;var s=new THREE.Vector3;o.getSize(s);var a=this.coverExtraHeight,r=2*this.coverExtraWidth;this.isClosedPage()&&(r=0,a=0),s.x=s.x-r+this.app.dimensions.padding.width,s.y=s.y-a+this.app.dimensions.padding.height;var l=e.fov*(Math.PI/180),h=2*Math.atan(Math.tan(l/2)*e.aspect),u=Math.max(s.z/2+Math.abs(s.x/2/Math.tan(h/2)),s.z/2+Math.abs(s.y/2/Math.tan(l/2)));void 0!==i&&0!==i&&(u*=i),e.position.set(0,0,u);var p=o.min.z,c=p<0?-p+u:u-p;e.far=3*c,e.updateProjectionMatrix(),void 0!==n&&(n.target=new THREE.Vector3(0,0,0),n.maxDistance=2*c)}},{key:"updateShadowSize",value:function(){}},{key:"refresh",value:function(){var e=this.app,t=this.getBasePage();this.refreshRequested=!0;var n=1/e.pageCount*t,o=this.isRTL?1-n:n,s=Math.min(this.stackCount,this.totalSheets),a=eW.limitAt(this.totalSheets,this.stackCount,2*this.stackCount),r=this.isBooklet?0:this.flexibility/a;this.leftFlexibility=r*(1-o),this.rightFlexibility=r*o,this.midPosition=.5*s*this.sheetDepth,eD(eF(i.prototype),"refresh",this).call(this);var l=!0===this.has3DCover;this.leftCover.element.visible=this.rightCover.element.visible=this.leftSheets.element.visible=this.rightSheets.element.visible=l,this.wrapper.position.z=-this.midPosition;var h=0,u=0,p=this.isRTL,c=this.isFirstPage(),d=this.isLastPage(),f=this.isLeftClosed=this.isClosedPage()&&(p&&d||!p&&c),g=this.isRightClosed=this.isClosedPage()&&(!p&&d||p&&c);if(l){this.leftSheets.depth=p?this.sheetsDepth*(1-this.getBasePage()/e.pageCount):this.sheetsDepth*t/e.pageCount,this.leftSheets.element.visible=p?e.pageCount-this.getBasePage()>2:t>2,h-=this.leftSheets.depth/2,this.leftSheets.element.position.z=h,h-=this.coverDepth+(this.leftSheets.element.visible?this.leftSheets.depth/2:0)+3*this.coverDepth,this.leftCover.depth=this.rightCover.depth=this.coverDepth;var m=Math.max(this.leftSheetHeight,this.rightSheetHeight);g&&(m=this.leftSheetHeight),f&&(m=this.rightSheetHeight),!0!==this.leftCover.isFlipping&&(this.leftCover.element.position.z=f?this.midPosition+this.coverDepth:h+this.coverDepth/2,this.leftCover.element.position.z=Math.max(this.leftCover.element.position.z,-(.
26405*this.refSize)),this.leftCover.element.position.x=0,this.leftSheets.sheetAngle=this.leftCover.sheetAngle=f?180:0,this.leftSheets.curveAngle=this.leftCover.curveAngle=f?180:0,!0===this.rightCover.isFlipping||(this.leftCover.height=m,this.leftCover.width=this.leftCover.sheetAngle<90?this.leftSheetWidth:this.rightSheetWidth,this.isClosedPage()||(this.leftCover.width+=this.coverExtraWidth,this.leftCover.height+=this.coverExtraHeight)),this.leftSheets.updateAngle(),this.leftCover.updateAngle()),this.rightSheets.depth=this.sheetsDepth-this.leftSheets.depth,this.rightSheets.element.visible=p?t>2:e.pageCount-this.getBasePage()>2,u-=this.rightSheets.depth/2,this.rightSheets.element.position.z=u,u-=this.coverDepth+(this.rightSheets.element.visible?this.rightSheets.depth/2:0)+3*this.coverDepth,!0!==this.rightCover.isFlipping&&(this.rightCover.element.position.z=g?this.midPosition+this.coverDepth:u+this.coverDepth/2,this.rightCover.element.position.z=Math.max(this.rightCover.element.position.z,-(.05*this.refSize)),this.rightCover.element.position.x=0,this.rightSheets.sheetAngle=this.rightCover.sheetAngle=g?0:180,this.rightSheets.curveAngle=this.rightCover.curveAngle=g?0:180,!0===this.leftCover.isFlipping||(this.rightCover.height=m,this.rightCover.width=this.rightCover.sheetAngle<90?this.leftSheetWidth:this.rightSheetWidth,this.isClosedPage()||(this.rightCover.width+=this.coverExtraWidth,this.rightCover.height+=this.coverExtraHeight)),this.rightSheets.updateAngle(),this.rightCover.updateAngle()),this.updateSheets(),this.stage.ground.position.z=Math.min(h,u)-this.refSize*this.groundDistance/100,this.stage.ground.position.z=Math.max(this.stage.ground.position.z,-(.1*this.refSize))}else this.stage.ground.position.z=-this.midPosition-15*this.sheetDepth;!0===this.cameraPositionDirty&&this.updateCameraPosition(),this.refreshSpiral()}},{key:"refreshSpiral",value:function(){}},{key:"updateCameraPosition",value:function(){var e=this.app,t=this.stage,i=e.dimensions,n=i.padding,o=1/(2*Math.tan(Math.PI*t.camera.fov*.5/180)/(i.stage.height/e.zoomValue))+2.2;this.updateShadowSize(),this.stage.spotLight.position.x=-(330*this.pageScaleX),this.stage.spotLight.position.y=330*this.pageScaleX,this.stage.spotLight.position.z=550*this.pageScaleX,this.stage.spotLight.shadow.camera.far=1200*this.pageScaleX,this.stage.spotLight.shadow.camera.updateProjectionMatrix();var s=(n.top-n.bottom)/e.zoomValue/2,a=-(n.left-n.right)/e.zoomValue/2;t.camera.position.z!==o&&!0===e.pendingZoom&&(t.camera.position.z=o),1===e.zoomValue&&(this.bookWrapper.rotation.set(0,0,0),this.bookHelper.rotation.set(0,0,0),this.cameraWrapper.rotation.set(0,0,0),0!==e.options.flipbook3DTiltAngleUp||0!==e.options.flipbook3DTiltAngleLeft?(t.camera.aspect=i.stage.width/i.stage.height,t.camera.updateProjectionMatrix(),this.bookWrapper.rotateZ(THREE.Math.degToRad(-e.options.flipbook3DTiltAngleLeft)),this.bookWrapper.rotateX(THREE.Math.degToRad(-e.options.flipbook3DTiltAngleUp)),this.isVertical()?this.bookWrapper.scale.y=1/(this.isSingle?2:1):this.bookWrapper.scale.x=1/(this.isSingle?2:1),this.bookHelper.update(),this.fitCameraToCenteredObject(t.camera,this.bookWrapper),this.bookWrapper.rotation.set(0,0,0),this.bookWrapper.scale.x=1,this.bookWrapper.scale.y=1,t.camera.position.set(a,s,t.camera.position.z+t.ground.position.z),this.camera.aspect=i.stage.width/i.stage.height,this.camera.updateProjectionMatrix(),this.cameraWrapper.rotateX(THREE.Math.degToRad(e.options.flipbook3DTiltAngleUp)),this.cameraWrapper.rotateZ(THREE.Math.degToRad(e.options.flipbook3DTiltAngleLeft))):t.camera.position.set(a,s,o)),t.camera.updateProjectionMatrix(),this.app.renderRequestStatus=p.REQUEST_STATUS.ON,this.cameraPositionDirty=!1}},{key:"refreshSheet",value:function(e){var t,i=e.sheet,n=e.index,o=i.sheetAngle,s=!(i.isHard||0===this.flexibility);i.leftFlexibility=s?this.leftFlexibility:0,i.rightFlexibility=s?this.rightFlexibility:0,i.leftPos=this.midPosition+(n-e.midPoint+1)*this.sheetDepth-this.sheetDepth/2,i.rightPos=this.midPosition-(n-e.midPoint)*this.sheetDepth-this.sheetDepth/2,t=i.targetSide===p.TURN_DIRECTION.LEFT?
2640:180,!1===i.isFlipping&&(e.needsFlip?(i.isFlipping=!0,i.isCover&&0===e.sheetNumber&&(this.isRTL?this.rightCover.isFlipping=!0:this.leftCover.isFlipping=!0),i.isCover&&this.totalSheets-e.sheetNumber==1&&(this.isRTL?this.leftCover.isFlipping=!0:this.rightCover.isFlipping=!0),i.element.position.z=Math.max(o<90?i.leftPos:i.rightPos,this.midPosition)+this.sheetDepth,i.flexibility=o<90?i.leftFlexibility:i.rightFlexibility,i.flip(o,t)):(i.skipFlip=!1,i.sheetAngle=i.curveAngle=t,i.flexibility=t<90?i.leftFlexibility:i.rightFlexibility,i.element.position.z=t<90?i.leftPos:i.rightPos,i.side=i.targetSide,i.height=t<90?this.leftSheetHeight:this.rightSheetHeight,i.width=t<90?this.leftSheetWidth:this.rightSheetWidth),i.updateAngle(),this.app.renderRequestStatus=p.REQUEST_STATUS.ON),i.element.visible=e.visible}},{key:"updateCenter",value:function(){var e=this,t=this.app,i=this.isVertical(),n=i?e.wrapper.position.y:e.wrapper.position.x,o=(this.isVertical()?-1:1)*e.centerShift*(this.isLeftPage()?i?this.leftSheetHeight:this.leftSheetWidth:i?this.rightSheetHeight:this.rightSheetWidth)/2;e.seamPositionY=(t.dimensions.padding.heightDiff+t.dimensions.containerHeight)/2-o,e.seamPositionX=(-t.dimensions.offset.width+t.dimensions.containerWidth)/2+o,o!==e.centerEnd&&(e.centerTween&&e.centerTween.stop&&e.centerTween.stop(),e.onCenterStartAnimation(this),e.centerTween=new TWEEN.Tween({x:n}).delay(0).to({x:o},1===t.zoomValue&&!0!==e.skipCenterAnimation?e.app.options.duration:1).onStart(function(){}
264).onUpdate(function(){e.onCenterUpdateAnimation(this)}).onComplete(function(){e.onCenterCompleteAnimation(this)}).onStop(function(){e.onCenterStopAnimation(this)}).easing(TWEEN.Easing.Cubic.InOut).start(),this.updatePendingStatusClass(),e.skipCenterAnimation=!1,e.centerEnd=o),e.renderRequestStatus=p.REQUEST_STATUS.ON,this.zoomViewer.updateCenter()}},{key:"onCenterUpdateAnimation",value:function(e){this.isVertical()?(this.wrapper.position.y=e.x,this.stage&&this.stage.cssScene&&(this.stage.cssScene.position.y=e.x)):(this.wrapper.position.x=e.x,this.stage&&this.stage.cssScene&&(this.stage.cssScene.position.x=e.x))}},{key:"onCenterStartAnimation",value:function(e){}},{key:"onCenterStopAnimation",value:function(e){}},{key:"onCenterCompleteAnimation",value:function(e){}},{key:"flipCover",value:function(e){var t,i,n=null;0===e.pageNumber||this.isBooklet&&1===e.pageNumber?(n=this.isRTL?this.rightCover:this.leftCover,t=this.isRTL?1:-1):e.pageNumber===this.totalSheets-1&&(n=this.isRTL?this.leftCover:this.rightCover,t=this.isRTL?-1:1),null!==n&&(i=n.depth+e.depth+1,n.sheetAngle=e.sheetAngle,n.curveAngle=e.curveAngle,this.rightCover.height=this.leftCover.height=e.height+this.coverExtraHeight,this.rightCover.width=this.leftCover.width=e.width+this.coverExtraWidth,n.flexibility=e.flexibility,this.rightCover.updateAngle(),this.leftCover.updateAngle(),n.element.position.x=e.element.position.x+t*Math.sin(e.sheetAngle*Math.PI/180)*i,n.element.position.z=e.element.position.z+t*Math.cos(e.sheetAngle*Math.PI/180)*i)}},{key:"pagesReady",value:function(){if(!this.isAnimating()&&!0===this.refreshRequested){if(!1===this.app.options.flipbookFitPages){var e=this.app.viewer.getBasePage(),t=this.leftViewport=this.getViewPort(e+(this.isBooklet?0:this.isRTL?1:0)),i=this.rightViewPort=this.getViewPort(e+(this.isBooklet?0:this.isRTL?0:1));if(t){var n=eW.contain(t.width,t.height,this.availablePageWidth(),this.availablePageHeight());(this.leftSheetWidth!=Math.floor(n.width)||this.leftSheetHeight!=Math.floor(n.height))&&(this.cameraPositionDirty=!0),this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height)}if(i){var o=eW.contain(i.width,i.height,this.availablePageWidth(),this.availablePageHeight());(this.rightSheetWidth!=Math.floor(o.width)||this.rightSheetWidth!=Math.floor(o.height))&&(this.cameraPositionDirty=!0),this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height)}for(var s=0;s<this.sheets.length;s++){var a=this.sheets[s];a.side===p.TURN_DIRECTION.LEFT?(a.height=this.leftSheetHeight,a.width=this.leftSheetWidth):(a.height=this.rightSheetHeight,a.width=this.rightSheetWidth),a.updateAngle()}if(this.isClosedPage()){var r=this.isRTL&&this.isLastPage()||!this.isRTL&&this.isFirstPage();this.leftCover.width=this.rightCover.width=r?this.rightSheetWidth:this.leftSheetWidth,this.leftCover.height=this.rightCover.height=r?this.rightSheetHeight:this.leftSheetHeight}else this.leftCover.height=this.rightCover.height=this.coverExtraHeight+Math.max(this.leftSheetHeight,this.rightSheetHeight),this.leftCover.width=this.coverExtraWidth+this.leftSheetWidth,this.rightCover.width=this.coverExtraWidth+this.rightSheetWidth;this.leftSheets.width=this.leftSheetWidth,this.leftSheets.height=this.leftSheetHeight,this.rightSheets.height=this.rightSheetHeight,this.rightSheets.width=this.rightSheetWidth,this.leftCover.updateAngle(),this.leftSheets.updateAngle(),this.rightCover.updateAngle(),this.rightSheets.updateAngle(),this.updateSheets(!0)}this.updateCenter(),this.updateCSSLayer(),this.updatePendingStatusClass(),this.refreshSpiral(),!0===this.cameraPositionDirty&&this.updateCameraPosition(),this.app.executeCallback("onPagesReady")}}},{key:"updateSheets",value:function(e){if(!0!==this.isClosedPage()){var t=this.getPageByNumber(this.getRightPageNumber());if(!0!==this.rightCover.isFlipping&&t&&t.sheet.element.geometry.attributes){var i=this.rightSheets.element.geometry.attributes.position,n=e?t.sheet.element.geometry.boundingBox.max.x*t.sheet.element.scale.x:this.rightSheets.lastSlopeX;i.setX(21,n),i.setX(23,n),i.setX(4,n),i.setX(6,n),i.setX(10,n),i.setX(14,n),i.needsUpdate=!0,this.rightSheets.element.geometry.attributes.uv.needsUpdate=!0,this.rightSheets.element.geometry.computeVertexNormals(),e&&(this.rightSheets.lastSlopeX=n)}var o=this.getPageByNumber(this.getLeftPageNumber());if(!0!==this.leftCover.isFlipping&&o&&o.sheet.element.geometry.attributes){var s=this.leftSheets.element.geometry.attributes.position,a=e?o.sheet.element.geometry.boundingBox.min.x*o.sheet.element.scale.x:this.leftSheets.lastSlopeX;s.setX(16,a),s.setX(18,a),s.setX(5,a),s.setX(7,a),s.setX(8,a),s.setX(12,a),s.needsUpdate=!0,this.leftSheets.element.geometry.attributes.uv.needsUpdate=!0,this.leftSheets.element.geometry.computeVertexNormals(),e&&(this.leftSheets.lastSlopeX=a)}}}},{key:"updateCSSLayer",value:function(){}},{key:"mouseMove",value:function(e){if(e=eW.fixMouseEvent(e),this.app.renderRequestStatus=p.REQUEST_STATUS.ON,null!=e.touches&&2===e.touches.length){this.pinchMove(e);return}var t=this.eventToPoint(e);if(null!==this.dragSheet&&!1!==this.drag3D&&Math.abs(t.x-this.startPoint.x)>2){!0!==this.isDragging&&(this.updatePendingStatusClass(!0),this.isDragging=!0);var i=this.dragSheet.width,n=t.x-(this.app.dimensions.origin.x+this.centerEnd-i),o=eW.limitAt(1-n/i,-1,1),s=eW.toDeg(Math.acos(o)),a=this.dragSheet,r=this.drag===p.TURN_DIRECTION.LEFT;a.sheetAngle=s;var l=eW.getCurveAngle(r,s,45);a.isCover&&a.viewer.flipCover(a),a.curveAngle=a.isHard?s:l,a.updateAngle()}this.checkSwipe(t,e)}}
264,{key:"mouseUp",value:function(e){if((e=eW.fixMouseEvent(e)).touches||0===e.button){if(null==this.dragSheet&&null!=e.touches&&0===e.touches.length){this.pinchUp(e);return}var t=this.eventToPoint(e);if(1===this.app.zoomValue){if(null!==this.dragSheet){var i=t.x-this.startPoint.x;Math.abs(i)>2*this.swipeThreshold&&(this.drag===p.TURN_DIRECTION.LEFT&&i>0?this.app.openLeft():this.drag===p.TURN_DIRECTION.RIGHT&&i<0&&this.app.openRight()),this.requestRefresh(),this.updatePendingStatusClass()}var n=e.target||e.originalTarget,o=this.startPoint&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==n.nodeName;!0===e.ctrlKey&&o?this.zoomOnPoint(t):o&&t.sheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV&&(t.sheet.sheetAngle>90?this.app.openRight():this.app.openLeft())}this.dragSheet=null,this.drag=null,!0===this.isDragging&&(this.isDragging=!1),this.startPoint=null,this.canSwipe=!1,this.app.renderRequestStatus=p.REQUEST_STATUS.ON}}},{key:"raycastCLick",value:function(e){this.mouse=new THREE.Vector2,this.raycaster=new THREE.Raycaster,this.mouse.x=e.offsetX/this.app.dimensions.stage.width*2-1,this.mouse.y=1-e.offsetY/this.app.dimensions.stage.height*2,this.raycaster.setFromCamera(this.mouse,this.camera);var t=this.raycaster.intersectObjects(this.bookWrapper.children,!0);if(t.length>0){var i,n=0;do{if((i=null!=t[n]?t[n].object:null).sheet&&i.sheet.index&&!0!==i.sheet.isFlipping)return i;n++}while(n<t.length)}}},{key:"mouseDown",value:function(e){if((e=eW.fixMouseEvent(e)).touches||0===e.button){if(null!=e.touches&&2===e.touches.length)this.pinchDown(e);else{e=eW.fixMouseEvent(e);var t=this.eventToPoint(e);this.startPoint=t,this.lastPosX=t.x,this.lastPosY=t.y;var i=this.raycastCLick(e),n=t.sheet?t.sheet.width-Math.abs(t.x-(this.app.dimensions.origin.x+this.centerEnd)):0;t.sheet&&i&&t.isInsideSheet&&n<t.sheet.width/2?(this.dragSheet=i.sheet,this.drag=t.sheet.sheetAngle<90?p.TURN_DIRECTION.LEFT:p.TURN_DIRECTION.RIGHT):this.canSwipe=!0}}}},{key:"eventToPoint",value:function(e){var t=this.app.dimensions,i={x:(e=eW.fixMouseEvent(e)).clientX,y:e.clientY};i.x=i.x-this.parentElement[0].getBoundingClientRect().left,i.y=i.y-this.parentElement[0].getBoundingClientRect().top;var n=(-t.offset.width+t.containerWidth)/2-t.stage.width/2,o=(-t.offset.width+t.containerWidth)/2+t.stage.width/2,s=t.padding.top,a=t.padding.top+this.availablePageHeight(),r=this.isVertical()?i.y<this.seamPositionY:i.x<this.seamPositionX,l=this.getBasePage()+(r?0:1),h=this.getPageByNumber(l);h&&(h=h.sheet);var u=i.x>n&&i.x<o&&i.y>s&&i.y<a;return{isInsideSheet:u,isInsideDragZone:u&&i.x-n<this.foldSense||o-i.x<this.foldSense,x:i.x,y:i.y,left:n,top:s,right:o,bottom:a,raw:i,isLeftSheet:r,sheet:h}}},{key:"textureLoadedCallback",value:function(e){this.app.renderRequestStart(),this.pagesReady()}},{key:"getTextureSize",value:function(e){var t=eD(eF(i.prototype),"getTextureSize",this).call(this,e);if(1!==this.app.zoomValue||!0===e.isAnnotation)return t;var n=eW.nearestPowerOfTwo(t.height),o=t.width*n/t.height;return this.texturePowerOfTwo?{height:n,width:o}:t}},{key:"getPageByNumber",value:function(e){if(this.has3DCover){var t=!this.isBooklet&&e===this.app.pageCount&&e%2==0,n=1===e;if(!this.isRTL&&n||this.isRTL&&t)return this.leftCover.frontPage;if(!this.isRTL&&t||this.isRTL&&n)return this.rightCover.backPage}return eD(eF(i.prototype),"getPageByNumber",this).call(this,e)}},{key:"setPage",value:function(e){return eD(eF(i.prototype),"setPage",this).call(this,e)}},{key:"beforeFlip",value:function(){eD(eF(i.prototype),"beforeFlip",this).call(this)}}]),i}(Q),eG=/*#__PURE__*/function(e){eB(i,e);var t=eH(i);function i(e){eA(this,i);var n,o=eI(n=t.call(this,e));return o.element=null,o.face=e.face,o.parent3D=e.sheet,o.sheet=e.sheet,o.cssPage=new THREE.CSS3DObject(o.contentLayer[0]),n}
264return ez(i,[{key:"setLoading",value:function(){this.sheet.viewer.checkPageLoading()}},{key:"clearMap",value:function(){this.sheet.element.material[this.face].map=null,this.sheet.element.material[this.face].needsUpdate=!0}},{key:"loadTexture",value:function(e){var t=this,i=e.texture,n=e.callback;function o(i,o){t.updateTextureLoadStatus(!0),t.sheet.resetMatColor(t.face,e.texture===t.textureLoadFallback),"function"==typeof n&&n(e)}t.textureSrc=i,"function"==typeof p.defaults.beforeLoadTexture&&p.defaults.beforeLoadTexture({texture:i,page:t}),4===this.face?this.sheet.backImage(i,o):this.sheet.frontImage(i,o)}}]),i}(_);function eZ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eK(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eX(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eQ(e,t,i){return t&&eX(e.prototype,t),i&&eX(e,i),e}function eY(e){return(eY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eJ(e,t){return(eJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function e$(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}p.defaults.maxTextureSize=2048,p.viewers={},p.viewers.flipbook=function e(t,i){return(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!1==p.utils.canSupport3D()&&(t.is3D=!1),p.utils.isTrue(t.is3D))?new eq(t,i):new ep(t,i)},p.viewers.default=p.viewers.reader=B,p.viewers.slider=eE;var e0=p.jQuery,e1=p.utils,e2=/*#__PURE__*/function(){function e(){eK(this,e),this.baseUrl=null,this.pdfDocument=null,this.pdfApp=null,this.pdfHistory=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._pagesRefCache=null}return eQ(e,[{key:"dispose",value:function(){this.baseUrl=null,this.pdfDocument=null,this.pdfApp=null,this.pdfHistory=null,this._pagesRefCache=null}},{key:"setDocument",value:function(e,t){this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfApp=e,this.externalLinkTarget=e.options.linkTarget}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"pagesCount",get:function(){return this.pdfDocument.numPages}},{key:"page",get:function(){return this.pdfApp.currentPageNumber},set:function(e){this.pdfApp.gotoPage(e)}},{key:"navigateTo",value:function(e){this.goToDestination(e)}},{key:"addLinkAttributes",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i=this.externalLinkTarget,n=this.externalLinkRel,o=this.externalLinkEnabled;if(!t||"string"!=typeof t)throw Error('A valid "url" parameter must provided.');var s=(0,e1.removeNullCharacters)(t);o?e.href=e.title=s:(e.href="",e.title="Disabled: ".concat(s),e.onclick=function(){return!1});var a="";switch(i){case p.LINK_TARGET.NONE:break;case p.LINK_TARGET.SELF:a="_self";break;case p.LINK_TARGET.BLANK:a="_blank";break;case p.LINK_TARGET.PARENT:a="_parent";break;case p.LINK_TARGET.TOP:a="_top"}e.target=a,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"}},{key:"goToDestination",value:function(e){var t,i="",n=this,o=function(t){e1.log("Requested: ",t);var s=t instanceof Object?n._pagesRefCache[t.num+" "+t.gen+" R"]:t+1;s?((s=n.pdfApp.viewer.getViewerPageNumber(s))>n.pdfApp.pageCount&&(s=n.pdfApp.pageCount),e1.log("Loading for:",t," at page ",s),n.pdfApp.requestDestRefKey===t.num+" "+t.gen+" R"?(n.pdfApp.gotoPage(s),n.pdfHistory&&n.pdfHistory.push({dest:e,hash:i,page:s})):e1.log("Expired Request for ",s," with ",t)):(n.pdfApp.container.addClass("df-fetch-pdf"),n.pdfDocument.getPageIndex(t).then(function(e){var i=t.num+" "+t.gen+" R";n._pagesRefCache[i]=e+1,o(t)}))};"string"==typeof e?(i=e,t=this.pdfDocument.getDestination(e)):t=Promise.resolve(e),t.then(function(t){e1.log("Started:",t),e=t,t instanceof Array&&(n.pdfApp.requestDestRefKey=t[0].num+" "+t[0].gen+" R",o(t[0]))})}},{key:"customNavigateTo",value:function(e){if(""!==e&&null!=e&&"null"!==e){var t=null;if(isNaN(Math.floor(e))){if("string"==typeof e&&isNaN(t=parseInt(e.replace("#",""),10))){window.open(e,this.pdfApp.options.linkTarget===p.LINK_TARGET.SELF?"_self":"_blank");return}}else t=e;null!=t&&this.pdfApp.gotoPage(t)}}},{key:"getDestinationHash",value:function(e){if("string"==typeof e)return this.getAnchorUrl("#"+escape(e));if(e instanceof Array){var t=e[0],i=t instanceof Object?this._pagesRefCache[t.num+" "+t.gen+" R"]:t+1;if(i){var n=this.getAnchorUrl("#page="+i),o=e[1];if((void 0===o?"undefined":e$(o))==="object"&&"name"in o&&"XYZ"===o.name){var s=e[4]||this.pdfApp.pageScaleValue,a=parseFloat(s);a&&(s=100*a),n+="&zoom="+s,(e[2]||e[3])&&(n+=","+(e[2]||0)+","+(e[3]||0))}return n}}return this.getAnchorUrl("")}},{key:"getCustomDestinationHash",value:function(e){return"#"+escape(e)}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page++;break;case"PrevPage":this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}var t=document.createEvent("CustomEvent");t.initCustomEvent("namedaction",!0,!0,{action:e}
264),this.pdfApp.container.dispatchEvent(t)}},{key:"cachePageRef",value:function(e,t){var i=t.num+" "+t.gen+" R";this._pagesRefCache[i]=e}}]),e}(),e3=/*#__PURE__*/function(){function e(t,i){eK(this,e),this.props=t,this.app=i,this.textureCache=[],this.pageCount=0,this.numPages=0,this.outline=[],this.viewPorts=[],this.requestedPages="",this.requestIndex=0,this.pagesToClean=[],this.defaultPage=void 0,this.pageSize=this.app.options.pageSize,this._page1Pass=!1,this._page2Pass=!1,this.pageLabels=void 0,this.textSearchLength=0,this.textSearch="",this.textContentSearch=[],this.textContentJoinedSearch=[],this.textOffsetSearch=[],this.textContent=[],this.textContentJoined=[],this.textOffset=[],this.autoLinkItemsCache=[],this.autoLinkHitsCache=[],this.searchHitItemsCache=[],this.searchHits=[],this.PDFLinkItemsCache=[],this.canPrint=!0,this.textPostion=[],this.renderTime=0}return eQ(e,[{key:"finalize",value:function(){}},{key:"dispose",value:function(){}},{key:"softDispose",value:function(){}},{key:"setCache",value:function(e,t,i){i&&(void 0===this.textureCache[i]&&(this.textureCache[i]=[]),this.textureCache[i][e]=t)}},{key:"getCache",value:function(e,t){return void 0===this.textureCache[t]?void 0:this.textureCache[t][e]}},{key:"_isValidPage",value:function(e){return e>0&&e<=this.pageCount}},{key:"getLabelforPage",value:function(e){return this.pageLabels&&void 0!==this.pageLabels[e-1]?this.pageLabels[e-1]:e}},{key:"getThumbLabel",value:function(e){var t=this.getLabelforPage(e);return t!==e?t+" ("+e+")":e}},{key:"getPageNumberForLabel",value:function(e){if(!this.pageLabels)return e;var t=this.pageLabels.indexOf(e);return t<0?null:t+1}},{key:"processPage",value:function(e){}},{key:"cleanUpPages",value:function(){}},{key:"checkRequestQueue",value:function(){}},{key:"processAnnotations",value:function(){}},{key:"processTextContent",value:function(){}},{key:"loadDocument",value:function(){}},{key:"pagesLoaded",value:function(){this._page1Pass&&this._page2Pass&&(this.app.viewer.checkDocumentPageSizes(),this.finalize())}},{key:"_documentLoaded",value:function(){this.finalizeOutLine(),this.app&&this.app.dimensions&&void 0===this.app.dimensions.pageFit&&e1.log("Provider needs to initialize page properties for the app"),this.app._documentLoaded()}},{key:"finalizeOutLine",value:function(){if(null!==this.app&&null!==this.app.options){var e=this.app.options.outline;if(e)for(var t=0;t<e.length;t++)e[t].custom=!0,e[t].dest=e[t].dest.replace(/javascript:/g,""),this.outline.push(e[t])}}},{key:"search",value:function(){}}]),e}(),e5=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eJ(e,t)}(o,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=eY(o);return e=t?Reflect.construct(i,arguments,eY(this).constructor):i.apply(this,arguments),e&&("object"===e$(e)||"function"==typeof e)?e:eZ(this)});function o(e,t){eK(this,o);var i,s=(i=n.call(this,e,t)).app,a=eZ(i);return a.pdfDocument=void 0,a._page2Ratio=void 0,a.cacheBustParameters="?ver="+p.version+"&pdfver="+s.options.pdfVersion,!0!==e.skipInit&&i.init(),i}return eQ(o,[{key:"init",value:function(){var e,t=this.app,n=this;function o(e){t.updateInfo(t.options.text.loading+" PDF Worker ...");var i=document.createElement("a");i.href=t.options.pdfjsWorkerSrc+n.cacheBustParameters,i.hostname!==window.location.hostname&&!0===p.loadCorsPdfjsWorker?(t.updateInfo(t.options.text.loading+" PDF Worker CORS ..."),e0.ajax({url:t.options.pdfjsWorkerSrc+n.cacheBustParameters,cache:!0,success:function(i){t.options.pdfjsWorkerSrc=e1.createObjectURL(i,"text/javascript"),"function"==typeof e&&e()}})):"function"==typeof e&&e()}e=function(){pdfjsLib.GlobalWorkerOptions.workerSrc=t.options.pdfjsWorkerSrc+n.cacheBustParameters,pdfjsLib.canvasWillReadFrequently=p.defaults.canvasWillReadFrequently,n.loadDocument()},"undefined"==typeof pdfjsLib?(t.updateInfo(t.options.text.loading+" PDF Service ..."),e1.getScript(t.options.pdfjsSrc+n.cacheBustParameters,function(){"function"==typeof define&&i.amdO&&window.requirejs&&window.require&&window.require.config?(t.updateInfo(t.options.text.loading+" PDF Service (require) ..."),window.require.config({paths:{"pdfjs-dist/build/pdf.worker":t.options.pdfjsWorkerSrc.replace(".js","")}}),window.require(["pdfjs-dist/build/pdf"],function(t){window.pdfjsLib=t,o(e)})):o(e)},function(){t.updateInfo("Unable to load PDF service.."),n.dispose()},t.options.pdfjsSrc.indexOf("pdfjs-4")>1||t.options.pdfjsSrc.indexOf("pdfjs-5")>1)):"function"==typeof e&&e()}},{key:"dispose",value:function(){this.pdfDocument&&this.pdfDocument.destroy(),this.linkService=e1.disposeObject(this.linkService),this.pdfLoadProgress&&this.pdfLoadProgress.destroy(),this.pdfLoadProgress=null,this.pdfDocument=null}},{key:"loadDocument",value:function(){var e=this.app,t=this.app.options,i=this,n=t.pdfParameters||{};if(n.url=e1.httpsCorrection(n.url||t.source),n.rangeChunkSize=t.rangeChunkSize,n.cMapPacked=!0,n.disableAutoFetch=t.disableAutoFetch,n.disableStream=t.disableStream,n.disableRange=!0===t.disableRange,n.disableFontFace=t.disableFontFace,n.isEvalSupported=!1,n.cMapUrl=t.cMapUrl,n.imagesLocation=t.imagesLocation,n.imageResourcesPath=t.imageResourcesPath,!n.url&&!n.data&&!n.range){e.updateInfo("ERROR : No PDF File provided! ","df-error");return}var o=i.pdfLoadProgress=pdfjsLib.getDocument(n);o._worker.promise.then(function(t){e.updateInfo(e.options.text.loading+" PDF ...")}),o.onPassword=function(e,t){switch(t){case pdfjsLib.PasswordResponses.NEED_PASSWORD:var i=prompt("Enter the password to open the PDF file.");if(null===i)throw Error("No password givsen.");e(i);break;case pdfjsLib.PasswordResponses.INCORRECT_PASSWORD:var i=prompt("Invalid password. Please try again.");if(!i)throw Error("No password givaen.");e(i)}},o.promise.then(function(n){i.pdfDocument=n,n.getPage(1).then(function(o){i.defaultPage=o;var s,a=i.defaultPage.viewPort=o.getViewport({scale:1,rotation:o._pageInfo.rotate+e.options.pageRotation}),r=i.defaultPage.pageRatio=a.width/a.height;i.viewPorts[1]=a,e.dimensions.defaultPage={ratio:r,viewPort:a,width:a.width,height:a.height},e.dimensions.maxTextureHeight=(null!==(s=t.maxTextureSize)&&void 0!==s?s:3200)/(r>1?r:1),e.dimensions.maxTextureWidth=e.dimensions.maxTextureHeight*r,e.dimensions.autoHeightRatio=1/r,i.pageCount=n.numPages,i.numPages=n.numPages,i._page1Pass=!0,i.pagesLoaded()}),n.numPages>1&&!0===e.checkSecondPage?n.getPage(2).then(function(t){var n=t.getViewport({scale:1,rotation:t._pageInfo.rotate+e.options.pageRotation});i._page2Ratio=n.width/n.height,i.viewPorts[2]=n,i._page2Pass=!0,i.pagesLoaded()}):(i._page2Pass=!0,i.pagesLoaded())}).catch(function(t){if(null!==e&&null!=e.options){var n,o="",s=document.createElement("a");s.href=e.options.source,s.hostname===window.location.hostname||-1!==s.href.indexOf("file://")||e1.isChromeExtension()||-1!==s.href.indexOf("blob:")||(o="<strong>CROSS ORIGIN!! </strong>");var a=(null===(n=e.options)||void 0===n?void 0:n.fileName)||s.href;e.updateInfo(o+"<strong>Error: Cannot access file! </strong>"+a+"<br><br>"+t.message,"df-error"),console.log(t),e.container.removeClass("df-loading").addClass("df-error"),i.dispose()}}),o.getTotalLength=function(){return i.pdfLoadProgress._transport._networkStream._fullRequestReader.contentLength},o.onProgress=function(t){if(null!==e){var i=100*t.loaded/o.getTotalLength();isNaN(i)?t&&t.loaded?(void 0===o.lastLoaded||o.lastLoaded+25e4<t.loaded)&&(o.lastLoaded=t.loaded,e.updateInfo(e.options.text.loading+" PDF "+(Math.ceil(t.loaded/1e4)/100).toFixed(2).toString()+"MB ...")):e.updateInfo(e.options.text.loading+" PDF ..."):e.updateInfo(e.options.text.loading+" PDF "+Math.ceil(Math.min(100,i)).toString().split(".")[0]+"% ...")}}}},{key:"pdfFetchStarted",value:function(){this.pdfFetchStatusCount=0,this.app.container.addClass("df-fetch-pdf"),this.pdfFetchStatus=p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){}},{key:"finalize",value:function(){var e=this.app,t=this;null!==e&&null!==e.options&&(t.linkService=new e2,t.linkService.setDocument(t.pdfDocument,null),t.linkService.setViewer(e),t.pdfDocument.getOutline().then(function(i){!0===e.options.overwritePDFOutline&&(i=[]),i=i||[],t.outline=i}).finally(function(){t._getLabels()}))}},{key:"_getLabels",value:function(){var e=this.app,t=this;t.pdfDocument.getPageLabels().then(function(i){if(i&&!0!==e.options.disablePageLabels){for(var n=i.length,o=0,s=0,a=0;a<n;a++){var r=i[a];if(r===(a+1).toString())o++;else if(""===r)s++;else break}o>=n||s>=n||(t.pageLabels=i)}}).finally(function(){t._getPermissions()})}},{key:"_getPermissions",value:function(){var e=this.app,t=this;t.pdfDocument.getPermissions().then(function(i){null!==i&&Array.isArray(i)&&(t.canPrint=i.indexOf(pdfjsLib.PermissionFlag.PRINT)>-1,!1==t.canPrint&&(console.log("PDF printing is disabled."),e.options.showPrintControl=e.options.showPrintControl&&t.canPrint))}).finally(function(){t._documentLoaded()})}},{key:"processPage",value:function(e){var t=this.app,i=this,n=e.pageNumber,o=0,s="",a=t.viewer.getTextureSize(e);if(!0===DEARFLIP.defaults.cachePDFTexture&&void 0!==this.getCache(n,a.height)){t.applyTexture(this.getCache(n,a.height),e),e1.log("Texture loaded from cache for : "+n);return}var r=t.viewer.getDocumentPageNumber(n);e1.log("Requesting PDF Page:"+r),i.pdfDocument.getPage(r).then(function(l){i.viewPorts[n]||(e.isFreshPage=!0,i.viewPorts[n]=l.getViewport({scale:1,rotation:l._pageInfo.rotate+t.options.pageRotation}));var h,u=t.viewer.getRenderContext(l,e);i.viewPorts[n].lastScale=u.viewport.scale,i.viewPorts[n].lastHeight=u.canvas.height,e.is
264FreshPage&&(null===(h=t.viewer.getPageByNumber(e.pageNumber))||void 0===h||h.changeTexture(e.pageNumber,u.canvas.height)),s=u.canvas.width+"x"+u.canvas.height,e1.log("Page "+n+" rendering - "+s),e.trace=i.requestIndex++,i.requestedPages+=","+e.trace+"["+r+"|"+u.canvas.height+"]",l.cleanupAfterRender=!1,o=performance.now(),l.render(u).promise.then(function(){if(t.applyTexture(u.canvas,e),!0===DEARFLIP.defaults.cachePDFTexture&&i.setCache(e.pageNumber,u.canvas,a.height),!0===t.options.cleanupAfterRender){var h=","+e.trace+"["+r+"|"+u.canvas.height+"]";i.requestedPages.indexOf(h)>-1&&(i.requestedPages=i.requestedPages.replace(h,""),-1==i.requestedPages.indexOf("["+r+"|")&&(i.pagesToClean.push(l),i.pagesToClean.length>0&&i.cleanUpPages()))}u=null;var p=performance.now()-o;i.renderTime+=p,e1.log("Rendered "+n+" in "+p+" ms : "+s)}).catch(function(e){console.log(e)})}).catch(function(e){console.log(e)})}},{key:"cleanUpPages",value:function(){for(;this.pagesToClean.length>0;)this.pagesToClean.splice(-1)[0].cleanup()}},{key:"clearSearch",value:function(){this.searchHits=[],this.searchHitItemsCache=[],this.totalHits=0,this.app.searchResults.html(""),this.app.container.removeClass("df-search-open"),this.textSearch="",this.app.container.find(".df-search-hits").remove()}},{key:"search",value:function(e){if(this.textSearch!==e){if(this.clearSearch(),e.length<3&&""!=e){this.app.updateSearchInfo(this.app.options.text.searchMinimum);return}this.textSearch=e,this.textSearchLength=e.length,this.app.searchContainer.addClass("df-searching"),this.app.container.addClass("df-fetch-pdf"),this._search(e,1)}}},{key:"_search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this;i.app.updateSearchInfo(i.app.options.text.searchSearchingInfo+" "+t),i.searchPage(t).then(function(n){for(var o,s=RegExp(e,"gi"),a=[];o=s.exec(n);)a.push({index:o.index,length:i.textSearchLength});if(i.searchHits[t]=a,a.length>0){var r=i.app.viewer.searchPage(t);!0===r.include&&(i.totalHits+=a.length,i.app.searchResults.append('<div class="df-search-result '+(i.app.currentPageNumber===t?"df-active":"")+'" data-df-page="'+t+'"><span>'+i.app.options.text.searchResultPage+" "+r.label+"</span><span>"+a.length+" "+(a.length>1?i.app.options.text.searchResults:i.app.options.text.searchResult)+"</span></div>"))}i.app.viewer.isActivePage(t)&&(i.processTextContent(t,i.app.viewer.getTextElement(t,!0)),i.app.ui.update()),i._search(e,t+1)}).catch(function(){}).finally(function(){0===i.totalHits?i.app.updateSearchInfo(i.app.options.text.searchResultsNotFound):i.app.updateSearchInfo(i.totalHits+" "+i.app.options.text.searchResultsFound),i.app.searchContainer.removeClass("df-searching"),i.app.container.removeClass("df-fetch-pdf")})}},{key:"prepareTextContent",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this;if(void 0==n.textContentJoinedSearch[t]||i){var o,n=this,s=0,a=0,r=0;n.textContentSearch[t]=[],n.textContent[t]=[],n.textOffsetSearch[t]=[],n.textOffset[t]=[],n.textContentJoinedSearch[t]=[],n.textContentJoined[t]=[];for(var l=0;l<e.items.length;l++)o=e.items[l],n.textContentSearch[t].push(!0===o.hasEOL?o.str+" ":o.str),n.textContent[t].push(o.str+" "),a+=r=(o.str.length||0)+(!0===o.hasEOL?1:0),n.textOffsetSearch[t].push({length:r,offset:a-r}),s+=r=(o.str.length||0)+1,n.textOffset[t].push({length:r,offset:s-r});n.textContentJoinedSearch[t]=n.textContentSearch[t].join(""),n.textContentJoined[t]=n.textContent[t].join("")}}},{key:"searchPage",value:function(e){var t=this;return new Promise(function(i,n){if(t._isValidPage(e))try{var o=t.app.viewer.getDocumentPageNumber(e);void 0==t.textContentJoinedSearch[o]?t.pdfDocument.getPage(o).then(function(e){e.getTextContent().then(function(e){t.prepareTextContent(e,o),i(t.textContentJoinedSearch[o])})}):i(t.textContentJoinedSearch[o])}catch(e){e1.log(e),n(e)}else n()})}}]),o}(e3);function e8(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e9(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function e4(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e7(e,t,i){return t&&e4(e.prototype,t),i&&e4(e,i),e}
264function e6(e){return(e6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}p.providers.pdf=e5;var tt=p.jQuery,ti=p.utils,tn=/*#__PURE__*/function(){function e(t){e9(this,e),this._viewPort=new ts(0,0),this._pageInfo={rotate:0},this.src=t.src}return e7(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{scale:1};return new ts(this._viewPort.height*e.scale,this._viewPort.width*e.scale,e.scale)}}]),e}(),to=/*#__PURE__*/function(){function e(t){e9(this,e),this.source=[],this.pages=[],this.numPages=t.length;for(var i=0;i<t.length;i++)this.source[i]=ti.httpsCorrection(t[i].toString()),this.pages.push(new tn({src:this.source[i]}))}return e7(e,[{key:"getPage",value:function(e){var t=this;return new Promise(function(i,n){try{var o=tt("<img/>");o.attr("src",t.source[e-1]),o[0].crossOrigin="Anonymous",o.on("load",function(){tt(this).off();var e=new tn({src:this.src});e._viewPort.height=this.height,e._viewPort.width=this.width,e._viewPort.scale=1,e.image=this,i(e)})}catch(e){n(e)}})}}]),e}(),ts=/*#__PURE__*/function(){function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e9(this,e),this.scale=n,this.height=t,this.width=i,this.scale=n,this.transform=[0,0,0,0,0,this.height]}return e7(e,[{key:"clone",value:function(){return new e(this.height,this.width,this.scale)}}]),e}(),ta=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(n,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=e6(n);return e=t?Reflect.construct(i,arguments,e6(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:e8(this)});function n(e,t){e9(this,n);var o,s=(o=i.call(this,e,t)).app,a=e8(o);return a.document=new to(s.options.source),a.pageCount=a.document.numPages,a.numPages=a.document.numPages,a.loadDocument(),o}return e7(n,[{key:"dispose",value:function(){}},{key:"loadDocument",value:function(){var e=this.app,t=this.app.options,i=this;i.document.getPage(1).then(function(n){i.defaultPage=n;var o,s=i.defaultPage.viewPort=n._viewPort,a=i.defaultPage.pageRatio=s.width/s.height;i.viewPorts[1]=s,e.dimensions.defaultPage={ratio:a,viewPort:s,width:s.width,height:s.height},e.dimensions.maxTextureHeight=(null!==(o=t.maxTextureSize)&&void 0!==o?o:3200)/(a>1?a:1),e.dimensions.maxTextureWidth=e.dimensions.maxTextureHeight*a,e.dimensions.autoHeightRatio=1/a,i._page1Pass=!0,i.pagesLoaded()}),i.pageCount>1&&!0===e.checkSecondPage?i.document.getPage(2).then(function(e){var t=e._viewPort;i._page2Ratio=t.width/t.height,i.viewPorts[2]=t,i._page2Pass=!0,i.pagesLoaded()}):(i._page2Pass=!0,i.pagesLoaded())}},{key:"finalize",value:function(){var e=this.app;null!==e&&null!==e.options&&(this.linkService=new e2,this.linkService.setViewer(e),this._documentLoaded())}},{key:"processPage",value:function(e){var t=this.app,i=this,n=e.pageNumber,o=performance.now(),s=t.viewer.getDocumentPageNumber(n);ti.log("Requesting PDF Page:"+s),i.document.getPage(s).then(function(s){i.viewPorts[n]||(e.isFreshPage=!0,i.viewPorts[n]=s._viewPort);var a,r,l=t.viewer.getRenderContext(s,e);(e.isFreshPage&&(null===(a=t.viewer.getPageByNumber(e.pageNumber))||void 0===a||a.changeTexture(e.pageNumber,l.canvas.height)),e.preferCanvas=!0,!0===e.preferCanvas)?(l.canvas.getContext("2d").drawImage(s.image,l.viewport.transform[4],0,l.canvas.width*(null!==(r=l.viewport.widthFix)&&void 0!==r?r:1),l.canvas.height),t.applyTexture(l.canvas,e)):t.applyTexture({src:s.src,height:l.canvas.height,width:l.canvas.width},e),ti.log("Rendered "+n+" in "+(performance.now()-o)+" milliseconds")})}}]),n}(e3);function tr(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function tl(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function th(e,t,i){return t&&tl(e.prototype,t),i&&tl(e,i),e}function tu(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}p.providers.image=ta,i(795);var tp=p.jQuery,tc=p.utils,td=p.REQUEST_STATUS,tf=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.options=t,this.app=i,this.parentElement=this.app.container,this.element=tp("<div>",{class:"df-ui"}),this.leftElement=tp("<div>",{class:"df-ui-left"}).appendTo(this.element),this.centerElement=tp("<div>",{class:"df-ui-center"}).appendTo(this.element),this.rightElement=tp("<div>",{class:"df-ui-right"}).appendTo(this.element),this.parentElement.append(this.element),this.events={},this.controls={}}return th(e,[{key:"init",value:function(){var e=this,t="<div>",i=this.app,n=this.controls,o=i.options.text,s=i.options.icons;e.createLogo(),this.openRight=n.openRight=tp(t,{class:"df-ui-nav df-ui-next",title:i.isRTL?o.previousPage:o.nextPage,html:'<div class="df-ui-btn '+s.next+'"></div>'}).on("click",function(){i.openRight()}),this.openLeft=n.openLeft=tp(t,{class:"df-ui-nav df-ui-prev",title:i.isRTL?o.nextPage:o.previousPage,html:'<div class="df-ui-btn '+s.prev+'"></div>'}).on("click",function(){i.openLeft()}),!0==i.options.autoPlay&&(this.play=n.play=tc.createBtn("play",s.play,o.play).on("click",function(){var e=tp(this);i.setAutoPlay(!e.hasClass(i.options.icons.pause))}),i.setAutoPlay(i.options.autoPlayStart)),this.pageNumber=n.pageNumber=tc.createBtn("page").on("change",function(){i.gotoPageLabel(n.pageInput.val())}).on("keyup",function(e){13===e.keyCode&&i.gotoPageLabel(n.pageInput.val())});var a="df_book_page_number_"+Math.ceil(performance.now()/10);this.pageInput=n.pageInput=tp('<input id="'+a+'" type="text"/>').appendTo(n.pageNumber),this.pageLabel=n.pageLabel=tp('<label for="'+a+'"></label>').appendTo(n.pageNumber),this.thumbnail=n.thumbnail=tc.createBtn("thumbnail",s.thumbnail,o.toggleThumbnails),n.thumbnail.on("click",function(){var t=tp(this);null==i.thumblist&&i.initThumbs(),i.thumbContainer.toggleClass("df-sidemenu-visible"),t.toggleClass("df-active"),t.hasClass("df-active")&&(t.siblings(".df-active").trigger("click"),i.thumbRequestStatus=td.ON),e.update(
264),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}).addClass("df-sidemenu-trigger"),i.hasOutline()&&(this.outline=n.outline=tc.createBtn("outline",s.outline,o.toggleOutline),n.outline.on("click",function(){var t=tp(this);if(null==i.outlineViewer&&i.initOutline(),i.outlineContainer){var n=i.outlineContainer;t.toggleClass("df-active"),n.toggleClass("df-sidemenu-visible"),t.hasClass("df-active")&&t.siblings(".df-active").trigger("click"),e.update(),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}}).addClass("df-sidemenu-trigger")),!0===i.options.showSearchControl&&!0!==tc.isMobile&&"string"==typeof i.options.source&&(n.search=tc.createBtn("search",s.search,o.search),n.search.on("click",function(){var t=tp(this);if(null==i.searchContainer&&i.initSearch(),i.searchContainer){var n=i.searchContainer;t.toggleClass("df-active"),n.toggleClass("df-sidemenu-visible"),t.hasClass("df-active")&&(t.siblings(".df-active").trigger("click"),i.searchBox[0].focus()),e.update(),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}}).addClass("df-sidemenu-trigger"));var r=e.element;if(this.zoomIn=n.zoomIn=tc.createBtn("zoomin",s.zoomin,o.zoomIn).on("click",function(){i.zoom(1),e.update()}),this.zoomOut=n.zoomOut=tc.createBtn("zoomout",s.zoomout,o.zoomOut).on("click",function(){i.zoom(-1),e.update()}),this.resetZoom=n.resetZoom=tc.createBtn("resetzoom",s.resetzoom,o.resetZoom).on("click",function(){i.resetZoom(-1),e.update()}),i.viewer.isFlipBook){if(i.pageCount>2){var l=i.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE;this.pageMode=n.pageMode=tc.createBtn("pagemode",s[l?"doublepage":"singlepage"],l?o.doublePageMode:o.singlePageMode).on("click",function(){var e=tp(this);i.viewer.setPageMode({isSingle:!e.hasClass(s.doublepage)}),i.viewer.pageModeChangedManually=!0})}}else this.pageFit=n.pageFit=tc.createBtn("pagefit",s.pagefit,o.pageFit).on("click",function(){var e=n.pageFit;!0==!e.hasClass(s.widthfit)?(e.addClass(s.widthfit),e.html("<span>"+o.widthFit+"</span>"),e.attr("title",o.widthFit)):(e.removeClass(s.widthfit),e.html("<span>"+o.pageFit+"</span>"),e.attr("title",o.pageFit))});if(this.share=n.share=tc.createBtn("share",s.share,o.share).on("click",function(){null==e.shareBox&&(e.shareBox=new tg(i.container,i.options)),!0===e.shareBox.isOpen?e.shareBox.close():(e.shareBox.update(i.getURLHash()),e.shareBox.show())}),this.more=n.more=tc.createBtn("more",s.more).on("click",function(t){!0!==e.moreContainerOpen&&(tp(this).addClass("df-active"),e.moreContainerOpen=!0,t.stopPropagation())}),this.startPage=n.startPage=tc.createBtn("start",s.start,o.gotoFirstPage).on("click",function(){i.start()}),this.endPage=n.endPage=tc.createBtn("end",s.end,o.gotoLastPage).on("click",function(){i.end()}),!0===i.options.showPrintControl&&!0!==tc.isMobile&&"string"==typeof i.options.source&&(this.print=n.print=tc.createBtn("print",s.print,o.print).on("click",function(){p.printHandler=p.printHandler||new tv,p.printHandler.printPDF(i.options.source)})),!0===i.options.showDownloadControl&&"string"==typeof i.options.source){var h="df-ui-btn df-ui-download "+s.download;this.download=n.download=tp('<a download target="_blank" class="'+h+'"><span>'+o.downloadPDFFile+"</span></a>"),n.download.attr("href",tc.httpsCorrection(i.options.source)).attr("title",o.downloadPDFFile)}e.moreContainer=tp(t,{class:"df-more-container"}),n.more.append(e.moreContainer),!0===i.options.isLightBox&&!0!==i.fullscreenSupported||(this.fullScreen=n.fullScreen=tc.createBtn("fullscreen",s.fullscreen,o.toggleFullscreen).on("click",i.switchFullscreen.bind(i))),i.viewer.initCustomControls();var u=i.options.allControls.replace(/ /g,"").split(","),c=","+i.options.moreControls.replace(/ /g,"")+",",d=","+i.options.hideControls.replace(/ /g,"")+",";i.options.leftControls.replace(/ /g,""),i.options.rightControls.replace(/ /g,""),d+=",";for(var f=0;f<u.length;f++){var g=u[f];if(0>d.indexOf(","+g+",")){var m=n[g];null!=m&&(void 0===m?"undefined":tu(m))=="object"&&(c.indexOf(","+g+",")>-1&&"more"!==g&&"pageNumber"!==g?e.moreContainer.append(m):!0==i.options.controlsFloating?r.append(m):this.centerElement.append(m))}}0==e.moreContainer.children().length&&this.more.addClass("df-hidden"),i.container.append(r),i.container.append(n.openLeft),i.container.append(this.controls.openRight),window.addEventListener("click",e.events.closePanels=e.closePanels.bind(e),!1),window.addEventListener("keyup",e.events.keyup=e.keyUp.bind(e),!1),document.addEventListener("fullscreenchange",e.events.fullscreenChange=e.fullscreenChange.bind(e),!1),!0===i.options.autoOpenThumbnail&&e.controls.thumbnail.trigger("click"),i.hasOutline()&&!0===i.options.autoOpenOutline&&e.controls.outline.trigger("click"),i.executeCallback("onCreateUI")}},{key:"closePanels",value:function(e){if(!0===this.moreContainerOpen){var t;null===(t=this.controls.more)||void 0===t||t.removeClass("df-active"),this.moreContainerOpen=!1}}},{key:"fullscreenChange",value:function(e){void 0===tc.getFullscreenElement()&&!0===this.app.isFullscreen&&this.app.switchFullscreen()}},{key:"keyUp",value:function(e){var t=this.app;if("INPUT"!==e.target.nodeName){var i=!1;switch(t.options.arrowKeysAction===p.ARROW_KEYS_ACTIONS.NAV&&((!0===t.isFullscreen||
264!0===t.options.isLightBox)&&(i=!0),!0!=t.options.isLightBox&&p.activeEmbeds.length<2&&!1===tp("body").hasClass("df-lightbox-open")&&(i=!0)),e.keyCode){case 27:p.activeLightBox&&p.activeLightBox.app&&!tc.isChromeExtension()&&p.activeLightBox.closeButton.trigger("click");break;case 37:i&&t.openLeft();break;case 39:i&&t.openRight();break;case 38:i&&t.viewer.isVertical()&&t.openLeft();break;case 40:i&&t.viewer.isVertical()&&t.openRight()}}}},{key:"createLogo",value:function(){var e=this.app,t=tc.safeURL(e.options.logo);if(t){var i=tp('<a class="df-logo df-logo-img" target="_blank" rel="noopener"><img alt=""/></a>'),n=tc.safeURL(e.options.logoUrl);n&&i.attr("href",n),i.find("img").attr("src",t),this.element.append(i)}}},{key:"dispose",value:function(){for(var e in this.controls)if(this.controls.hasOwnProperty(e)){var t=this.controls[e];null!==t&&(void 0===t?"undefined":tu(t))=="object"&&t.off().remove()}this.element.remove(),this.shareBox=tc.disposeObject(this.shareBox),window.removeEventListener("click",this.events.closePanels,!1),window.removeEventListener("keyup",this.events.keyup,!1),document.removeEventListener("fullscreenchange",this.events.fullscreenChange,!1)}},{key:"update",value:function(){var e=this.app,t=this.controls;!0!==this._pageLabelWidthSet&&(this.pageLabel.width(""),e.provider.pageLabels?this.pageLabel.text("88888888888888888".substring(0,3*e.pageCount.toString().length+4)):this.pageLabel.text("88888888888".substring(0,2*e.pageCount.toString().length+3)),this.pageNumber.width(this.pageLabel.width()),this.pageLabel.width(this.pageLabel.width()),this.pageLabel.text(""),this._pageLabelWidthSet=!0);var i=e.getCurrentLabel();if(i.toString()!==e.currentPageNumber.toString()?t.pageLabel.text(i+"("+e.currentPageNumber+"/"+e.pageCount+")"):t.pageLabel.text(i+"/"+e.pageCount),t.pageInput.val(i),e.container.toggleClass("df-sidemenu-open",e.container.find(".df-sidemenu-visible").length>0),this.isSearchOpen=e.provider.totalHits>0&&e.container.find(".df-sidemenu-visible.df-search-container").length>0,e.container.toggleClass("df-search-open",this.isSearchOpen),this.isSearchOpen){var n=e.searchContainer.find(".df-search-result[data-df-page='"+e.currentPageNumber+"']");if(e.searchContainer.find(".df-search-result.df-active").removeClass("df-active"),n.length>0&&!n.hasClass(".df-active")){n.addClass("df-active");var o=e.searchResults[0],s=o.scrollTop;s+o.getBoundingClientRect().height<(n=n[0]).offsetTop+n.scrollHeight?tc.scrollIntoView(n,null,!1):s>n.offsetTop&&tc.scrollIntoView(n)}}t.zoomIn.toggleClass("disabled",e.zoomValue===e.viewer.maxZoom),t.zoomOut.toggleClass("disabled",e.zoomValue===e.viewer.minZoom);var a=e.isRTL,r=e.currentPageNumber===e.startPage,l=e.currentPageNumber===e.endPage,h=r&&!a||l&&a,u=l&&!a||r&&a;t.openRight.toggleClass("df-hidden",u),t.openLeft.toggleClass("df-hidden",h),e.viewer.afterControlUpdate()}}]),e}(),tg=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.isOpen=!1,this.shareUrl="",this.init(t,i)}return th(e,[{key:"init",value:function(e,t){var i=this;for(var n in i.wrapper=tp('<div class="df-share-wrapper" style="display: none;">').on("click",function(){i.close()}),i.box=tp('<div class="df-share-box">'),i.box.on("click",function(e){e.preventDefault(),e.stopPropagation()}),i.box.appendTo(i.wrapper).html('<span class="df-share-title">'+t.text.share+"</span>"),i.urlInput=tp('<textarea name="df-share-url" class="df-share-url">').on("click",function(){this.select()}),i.box.append(i.urlInput),t.share)!function(e){if(t.share.hasOwnProperty(e)&&0>t.hideShareControls.indexOf(e)){var n=t.share[e];null!==n&&(i[e]=tp("<div>",{class:"df-share-button df-share-"+e+" "+t.icons[e]}).on("click",function(e){e.preventDefault(),window.open(n.replace("{{url}}",encodeURIComponent(i.shareUrl)).replace("{{mailsubject}}",t.text.mailSubject),"Sharer","width=500,height=400"),e.stopPropagation()}),i.box.append(i[e]))}}(n);tp(e).append(i.wrapper)}},{key:"show",value:function(){this.wrapper.show(),this.urlInput.val(this.shareUrl),this.urlInput.trigger("click"),this.isOpen=!0}},{key:"dispose",value:function(){for(var e in this)this.hasOwnProperty(e)&&this[e]&&this[e].off&&this[e].off();this.wrapper.remove()}},{key:"close",value:function(){this.wrapper.hide(),this.isOpen=!1}},{key:"update",value:function(e){this.shareUrl=e}}]),e}(),tm=/*#__PURE__*/function(){function e(t){tr(this,e),this.duration=300;var i=this;return i.lightboxWrapper=tp("<div>").addClass("df-lightbox-wrapper"),i.backGround=tp("<div>").addClass("df-lightbox-bg").appendTo(i.lightboxWrapper),i.element=tp("<div>").addClass("df-app").appendTo(i.lightboxWrapper),i.controls=tp("<div>").addClass("df-lightbox-controls").appendTo(i.lightboxWrapper),i.closeButton=tp("<div>").addClass("df-lightbox-close df-ui-btn "+p.defaults.icons.close).on("click",function(){i.close(t)}).appendTo(i.controls),i.lightboxWrapper.append(i.element),i}return th(e,[{key:"show",value:function(e){return 0===this.lightboxWrapper.parent().length&&tp("body").append(this.lightboxWrapper),tp("html,body").addClass("df-lightbox-open"),this.lightboxWrapper.show(),"function"==typeof e&&e(),this}},{key:"close",value:function(e){return this.lightboxWrapper.hide(),Array.prototype.forEach.call(p.utils.getSharePrefixes(),function(e){0===window.location.hash.indexOf("#"+e)&&!0==p.defaults.hashNavigationEnabled&&history.replaceState(void 0,void 0,"#_")}
264),"function"==typeof e&&setTimeout(e,this.duration),tp("html,body").removeClass("df-lightbox-open"),this.element.attr("class","df-app").attr("style",""),this.lightboxWrapper.attr("class","df-lightbox-wrapper").attr("style","display:none"),this.backGround.attr("style",""),this}}]),e}(),tv=/*#__PURE__*/function(){function e(){tr(this,e);var t=this;return t.frame=tp('<iframe id="df-print-frame" style="display:none" src="about:blank">').appendTo(tp("body")),t.frame.on("load",function(){try{t.frame[0].contentWindow.print()}catch(e){console.log(e)}}),t}return th(e,[{key:"printPDF",value:function(e){-1==e.indexOf("?")?e+="?print=true":e+="&print=true",this.frame[0].src=e}}]),e}(),ty=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.options=t,this.app=i,this.parentElement=t.parentElement,this.element=tp("<div>",{class:"df-sidemenu-wrapper"}),this.parentElement.append(this.element),this.buttons=tp("<div>",{class:"df-sidemenu-buttons df-ui-wrapper"}).appendTo(this.element),this.close=tc.createBtn("close",i.options.icons.close,i.options.text.close),this.buttons.append(this.close)}return th(e,[{key:"dispose",value:function(){this.element.remove()}}]),e}(),tb=/*#__PURE__*/function(){function e(t){tr(this,e),this.outline=null,this.lastToggleIsShow=!0,this.container=t.container,this.linkService=t.linkService,this.outlineItemClass=t.outlineItemClass||"outlineItem",this.outlineToggleClass=t.outlineToggleClass||"outlineItemToggler",this.outlineToggleHiddenClass=t.outlineToggleHiddenClass||"outlineItemsHidden"}return th(e,[{key:"dispose",value:function(){this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.linkService=null}},{key:"reset",value:function(){this.outline=null,this.lastToggleIsShow=!0;for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild)}},{key:"_dispatchEvent",value:function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("outlineloaded",!0,!0,{outlineCount:e}),this.container.dispatchEvent(t)}},{key:"_bindLink",value:function(e,t){var i=this.linkService;if(!0===t.custom)e.href=i.getCustomDestinationHash(t.dest),e.onclick=function(){return i.customNavigateTo(t.dest),!1};else{if(t.url){pdfjsLib.addLinkAttributes(e,{url:t.url});return}e.href=i.getDestinationHash(t.dest),e.onclick=function(){return i.navigateTo(t.dest),!1}}}},{key:"_addToggleButton",value:function(e){var t=this,i=document.createElement("div");i.className=this.outlineToggleClass+" "+this.outlineToggleHiddenClass,i.onclick=(function(n){if(n.stopPropagation(),i.classList.toggle(this.outlineToggleHiddenClass),n.shiftKey){var o=!i.classList.contains(this.outlineToggleHiddenClass);t._toggleOutlineItem(e,o)}}).bind(this),e.insertBefore(i,e.firstChild)}},{key:"_toggleOutlineItem",value:function(e,t){this.lastToggleIsShow=t;for(var i=e.querySelectorAll("."+this.outlineToggleClass),n=0,o=i.length;n<o;++n)i[n].classList[t?"remove":"add"](this.outlineToggleHiddenClass)}},{key:"render",value:function(e){var t=e&&e.outline||null,i=0;if(this.outline&&this.reset(),this.outline=t,t){for(var n=document.createDocumentFragment(),o=[{parent:n,items:this.outline,custom:!1}],s=!1;o.length>0;)for(var a=o.shift(),r=a.custom,l=0,h=a.items.length;l<h;l++){var u=a.items[l],p=document.createElement("div");p.className=this.outlineItemClass;var c=document.createElement("a");if(null==u.custom&&null!=r&&(u.custom=r),this._bindLink(c,u),c.textContent=u.title.replace(/\x00/g,""),p.appendChild(c),u.items&&u.
264items.length>0){s=!0,this._addToggleButton(p);var d=document.createElement("div");d.className=this.outlineItemClass+"s",p.appendChild(d),o.push({parent:d,custom:u.custom,items:u.items})}a.parent.appendChild(p),i++}s&&(null!=this.container.classList?this.container.classList.add(this.outlineItemClass+"s"):null!=this.container.className&&(this.container.className+=" picWindow")),this.container.appendChild(n),this._dispatchEvent(i)}}}]),e}(),tw=/*#__PURE__*/function(){function e(t){tr(this,e);var i=function(){s.thumbRequestCount=0,s.thumbRequestStatus=td.COUNT},n=this.itemHeight=t.itemHeight,o=this.itemWidth=t.itemWidth,s=this.app=t.app;this.items=t.items,this.generatorFn=t.generatorFn,this.totalRows=t.totalRows||t.items&&t.items.length,this.addFn=t.addFn,this.scrollFn=t.scrollFn,this.container=document.createElement("div");for(var a=this,r=0;r<this.totalRows;r++){var l=document.createElement("div"),h=r+1;l.id="df-thumb"+h;var u=document.createElement("div"),p=document.createElement("div"),c=document.createElement("div");c.className="df-wrapper",p.className="df-thumb-number",l.className="df-thumb",u.className="df-bg-image",c.style.height=n+"px",c.style.width=o+"px",p.innerText=s.provider.getLabelforPage(h),l.appendChild(c),c.appendChild(p),c.appendChild(u),this.container.appendChild(l)}a.dispose=function(){a.container&&a.container.parentNode&&a.container.parentNode.removeChild(a.container),a.container.removeEventListener("scroll",i)},a.container.addEventListener("scroll",i)}return th(e,[{key:"processThumbRequest",value:function(){tc.log("Thumb Request Initiated");var e=this.app;if(e.thumbRequestStatus=td.OFF,e.activeThumb!==e.currentPageNumber&&null!=e.thumbContainer&&e.thumbContainer.hasClass("df-sidemenu-visible")){var t=e.thumblist.container,i=t.scrollTop,n=t.getBoundingClientRect().height,o=e.thumbContainer.find("#df-thumb"+e.currentPageNumber);o.length>0?(e.thumbContainer.find(".df-selected").removeClass("df-selected"),o.addClass("df-selected"),i+n<(o=o[0]).offsetTop+o.scrollHeight?tc.scrollIntoView(o,null,!1):i>o.offsetTop&&tc.scrollIntoView(o),e.activeThumb=e.currentPageNumber):(tp(t).scrollTop(124*e.currentPageNumber),e.thumbRequestStatus=td.ON)}if(0===e.thumblist.container.getElementsByClassName("df-thumb-requested").length){var s=tc.getVisibleElements({container:e.thumblist.container,elements:e.thumblist.container.children});-1===s.indexOf(e.activeThumb)&&s.unshift(e.activeThumb);for(var a=0;a<s.length;a++){var r=e.thumblist.container.children[s[a]-1];if(void 0!==r&&!1===r.classList.contains("df-thumb-loaded")&&!1===r.classList.contains("df-thumb-requested"))return r.classList.add("df-thumb-requested"),tc.log("Thumb Requested for "+s[a]),e.provider.processPage({pageNumber:s[a],textureTarget:p.TEXTURE_TARGET.THUMB}),!1}}}},{key:"setPage",value:function(e){var t=this.app,i=e.pageNumber,n=e.texture;if(e.textureTarget===p.TEXTURE_TARGET.THUMB){var o=t.container.find("#df-thumb"+i);o.find(".df-wrapper").css({height:e.height,width:e.width}),o.find(".df-bg-image").css({backgroundImage:tc.bgImage(n)}),o.addClass("df-thumb-loaded").removeClass("df-thumb-requested")}tc.log("Thumbnail set for "+e.pageNumber),t.thumbRequestStatus=td.ON}}]),e}();function tP(){if(void 0===p.openLocalFileInput){var e=p.openLocalFileInput=tp('<input type="file" accept=".pdf" style="display:none">').appendTo(tp("body")).data("df-option",p.openFileOptions);e.change(function(){var t,i=e[0].files;i.length&&(t=i[0],e.val(""),p.openFile(t))})}}p.openLightBox=function(e){p.activeLightBox||(p.activeLightBox=new tm(function(){p.activeLightBox.app&&(p.activeLightBox.app.closeRequested=!0,p.activeLightBox.app.analytics({eventAction:p.activeLightBox.app.options.analyticsViewerClose,options:p.activeLightBox.app.options})),p.activeLightBox.app=tc.disposeObject(p.activeLightBox.app)})),p.activeLightBox.duration=300,(void 0===p.activeLightBox.app||null===p.activeLightBox.app||!0===p.activeLightBox.app.closeRequested||p.openLocalFileInput==e)&&(p.activeLightBox.app=tc.disposeObject(p.activeLightBox.app),null===p.activeLightBox.app&&p.activeLightBox.show(function(){p.activeLightBox.app=new p.Application({transparent:!1,isLightBox:!0,height:"100%",dataElement:e,element:p.activeLightBox.element}
264),!0!==p._isHashTriggered&&!0==p.defaults.hashNavigationEnabled&&history.pushState(null,null,"#"),p.activeLightBox.lightboxWrapper.toggleClass("df-lightbox-padded",!1===p.activeLightBox.app.options.popupFullsize),p.activeLightBox.lightboxWrapper.toggleClass("df-rtl",p.activeLightBox.app.options.readDirection===p.READ_DIRECTION.RTL),p.activeLightBox.backGround.css({backgroundColor:"transparent"===p.activeLightBox.app.options.backgroundColor?p.defaults.popupBackGroundColor:p.activeLightBox.app.options.backgroundColor})}))},p.checkBrowserURLforDefaults=function(){if(!tc.isIEUnsupported){var e=new URL(location.href).searchParams.get("viewer-type")||new URL(location.href).searchParams.get("viewertype"),t=new URL(location.href).searchParams.get("is-3d")||new URL(location.href).searchParams.get("is3d");e&&(p.defaults.viewerType=e),("true"===t||"false"===t)&&(p.defaults.is3D="true"===t)}},p.fileDropHandler=function(e,t){var i=e[0];"application/pdf"===i.type&&(t.preventDefault(),t.stopPropagation(),p.openFile(i))},p.openFile=function(e){if(e){var t;p.oldLocalFileObjectURL&&window.URL.revokeObjectURL(p.oldLocalFileObjectURL),p.oldLocalFileObjectURL=window.URL.createObjectURL(e),null===(t=p.openFileSelected)||void 0===t||t.call(p,{url:p.oldLocalFileObjectURL,file:e}),p.openURL(p.oldLocalFileObjectURL)}else p.openURL()},p.openURL=function(e){tP(),e&&(p.openFileOptions.source=e,p.openFileOptions.pdfParameters=null),p.openLightBox(p.openLocalFileInput)},p.openBase64=function(e){p.openFileOptions.source=null,p.openFileOptions.pdfParameters={data:atob(e)},p.openURL()},p.openLocalFile=function(){tP(),p.openLocalFileInput.click()},p.initControls=function(){var e=tp("body");if(!1!==p.defaults.autoPDFLinktoViewer&&e.on("click",'a[href$=".pdf"]',function(e){var t=tp(this);void 0!==t.attr("download")||"_blank"===t.attr("target")||t.hasClass("df-ui-btn")||t.parents(".df-app").length>0||(e.preventDefault(),t.data("df-source",t.attr("href")),p.openLightBox(t))}),window.addEventListener("popstate",function(e){p.activeLightBox&&p.activeLightBox.app&&!tc.isChromeExtension()&&p.activeLightBox.closeButton.trigger("click")}),e.on("click",".df-open-local-file",function(e){p.openLocalFile()}),e.on("click",".df-sidemenu-buttons .df-ui-close",function(){tp(this).closest(".df-app").find(".df-ui-btn.df-active").trigger("click")}),e.on("mouseout",".df-link-content section.squareAnnotation, .df-link-content section.textAnnotation, .df-link-content section.freeTextAnnotation",function(){var e=tp(this);p.handlePopup(e,!1)}),e.on("mouseover",".df-link-content section.squareAnnotation, .df-link-content section.textAnnotation, .df-link-content section.freeTextAnnotation",function(){var e=tp(this);p.handlePopup(e,!0)}),p.handlePopup=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=e.closest(".df-container"),n=i.find(".df-comment-popup");if(n.toggleClass("df-active",t),t){var o=e[0].getBoundingClientRect(),s=i[0].getBoundingClientRect(),a=e.find(".popupWrapper").first();if(e.hasClass("popupTriggerArea")){var r=e.data("annotation-id");void 0!==r&&(a=e.siblings("[data-annotation-id=popup_"+r+"]"))}n.html(a.html());var l=o.left-s.left;l+360>s.width?l=s.width-360-10:l<10&&(l=10);var h=o.top-s.top+o.height+5;h+n.height()>s.height?h=o.top-n.height()-o.height-10:h<10&&(h=10),n.css({left:l,top:h})}},void 0!=p.fileDropElement){var t=tp(p.fileDropElement);t.length>0&&(t.on("dragover",function(e){e.preventDefault(),e.stopPropagation(),tp(this).addClass("df-dragging")}),t.on("dragleave",function(e){e.preventDefault(),e.stopPropagation(),tp(this).removeClass("df-dragging")}),t.on("drop",function(e){var t=e.originalEvent.dataTransfer.files;t.length&&p.fileDropHandler(t,e)}))}};var tS=p.jQuery,tE=p.REQUEST_STATUS,tx=p.utils,tC=/*#__PURE__*/function(){var e;function t(e){var i,n,o;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.options=e,this.viewerType=this.options.viewerType,this.startPage=1,this.endPage=1,this.element=tS(this.options.element),e.maxTextureSize=null!==(i=e.maxTextureSize)&&void 0!==i?i:2048,tx.isMobile&&(e.maxTextureSize=4096===e.maxTextureSize?3200:e.maxTextureSize),this.dimensions={padding:{},offset:{},pageFit:{},stage:{},isAutoHeight:"auto"===e.height,maxTextureSize:e.maxTextureSize},this.is3D=e.is3D,this.options.pixelRatio=tx.limitAt(this.options.pixelRatio,1,this.options.maxDPI),this.options.fakeZoom=null!==(n=this.options.fakeZoom)&&void 0!==n?n:1,this.events={},this.links=e.links,this.thumbSize=128,this.pendingZoom=!0,this.currentPageNumber=this.options.openPage||this.startPage,this.hashNavigationEnabled=!0===this.options.hashNavigationEnabled,this.pendingZoom=!0,this.zoomValue=1,this.pageScaling=p.PAGE_SCALE.MANUA
264L,this.isRTL=e.readDirection===p.READ_DIRECTION.RTL,this.jumpStep=1,this.resizeRequestStatus=tE.OFF,this.refreshRequestStatus=tE.OFF,this.refreshRequestCount=0,this.resizeRequestCount=0,this.fullscreenSupported=tx.hasFullscreenEnabled(),this.thumbRequestCount=0,this.isExternalReady=null===(o=this.options.isExternalReady)||void 0===o||o,this.init(),!0===this.options.autoLightBoxFullscreen&&!0===this.options.isLightBox&&this.switchFullscreen(),this.executeCallback("onCreate"),this.target=this}return e=[{key:"init",value:function(){var e=this.options;if(this.initDOM(),this.initResourcesLocation(),this.initInfo(),(null==e.source||0===e.source.length)&&null==e.pdfParameters){this.updateInfo("ERROR: Set a Valid Document Source.",p.INFO_TYPE.ERROR),this.container.removeClass("df-loading").addClass("df-error");return}if(tx.isIEUnsupported){this.updateInfo("Your browser (Internet Explorer) is out of date! <br><a href='https://browsehappy.com/'>Upgrade to a new browser.</a>","df-old-browser"),this.container.removeClass("df-loading").addClass("df-error");return}this.commentPopup=tS('<div class="df-comment-popup">').appendTo(this.container),this.viewer=new this.viewerType(e,this),this.sideMenu=new ty({parentElement:this.container},this),this.provider=new p.providers[e.providerType](e,this),this.state="loading",this.checkRequestQueue()}},{key:"initDOM",value:function(){this.element.addClass("df-app").removeClass("df-container df-loading"),this.container=tS("<div>").appendTo(this.element),this.container.addClass("df-container df-loading df-init"+(!0===this.options.controlsFloating?" df-float":" df-float-off")+" df-controls-"+this.options.controlsPosition+("transparent"===this.options.backgroundColor?" df-transparent":"")+(!0===this.isRTL?" df-rtl":"")+(!0===tx.isIOS||!0===tx.isIPad?" df-ios":"")),this._offsetParent=this.container[0].offsetParent,this.backGround=tS("<div class='df-bg'>").appendTo(this.container).css({backgroundColor:this.options.backgroundColor,backgroundImage:this.options.backgroundImage?"url('"+this.options.backgroundImage+"')":""}),this.viewerContainer=tS("<div>").appendTo(this.container),this.viewerContainer.addClass("df-viewer-container")}},{key:"initResourcesLocation",value:function(){var e=this.options;if(void 0!==window[p.locationVar]){if(e.pdfjsSrc=window[p.locationVar]+"js/libs/pdf.min.js",e.threejsSrc=window[p.locationVar]+"js/libs/three.min.js",e.pdfjsWorkerSrc=window[p.locationVar]+"js/libs/pdf.worker.min.js",e.soundFile=window[p.locationVar]+e.soundFile,e.imagesLocation=window[p.locationVar]+e.imagesLocation,e.imageResourcesPath=window[p.locationVar]+e.imageResourcesPath,e.cMapUrl=window[p.locationVar]+e.cMapUrl,void 0!==e.pdfVersion){var t="";"latest"==e.pdfVersion||"beta"==e.pdfVersion?t="latest":"stable"==e.pdfVersion&&(t="stable"),("latest"==e.pdfVersion||"default"==e.pdfVersion)&&(Array.prototype.at,void 0===Array.prototype.at&&(t="stable",console.log("Proper Support for Latest version PDF.js 3.7 not available. Switching to PDF.js 2.5!"))),"default"!==t&&""!==t&&(e.pdfjsSrc=window[p.locationVar]+"js/libs/pdfjs/"+t+"/pdf.min.js",e.pdfjsWorkerSrc=window[p.locationVar]+"js/libs/pdfjs/"+t+"/pdf.worker.min.js"),"stable"===t&&(this.options.fakeZoom=1)}}else console.warn("DEARVIEWER locationVar not found!");this.executeCallback("onInitResourcesLocation")}},{key:"initEvents",value:function(){var e=this.container[0];window.addEventListener("resize",this.events.resize=this.resetResizeRequest.bind(this),!1),e.addEventListener("mousemove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("mousedown",this.events.mousedown=this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("touchmove",this.events.touchmove=this.mouseMove.bind(this),!1),e.addEventListener("touchstart",this.events.touchstart=this.mouseDown.bind(this),!1),window.addEventListener("touchend",this.events.touchend=this.mouseUp.bind(this),!1)}},{key:"mouseMove",value:function(e){e.touches&&e.touches.length>1&&e.preventDefault(),!0===this.viewer.acceptAppMouseEvents&&this.viewer.mouseMove(e)}},{key:"mouseDown",value:function(e){this.userHasInteracted=!0,!0===this.viewer.acceptAppMouseEvents&&0===tS(e.srcElement).closest(".df-sidemenu").length&&this.viewer.mouseDown(e)}},{key:"mouseUp",value:function(e){this.viewer&&!0===this.viewer.acceptAppMouseEvents&&this.viewer.mouseUp(e)}},{key:"softDispose",value:function(){this.softDisposed=!0,this.provider.dispose(),this.viewer.dispose()}},{key:"softInit",value:function(){this.viewer=new this.viewerType(this.options,this),this.provider=new p.providers[this.options.providerType](this.options,this),this.softDisposed=!1}},{key:"dispose",value:function(){var e,t,i,n,o,s=this.container[0];clearInterval(this.autoPlayTimer),this.autoPlayTimer=null,this.autoPlayFunction=null,this.provider=tx.disposeObject(this.provider),this.contentProvider=null,this.target=null,this.viewer=tx.disposeObject(this.viewer),this.sideMenu=tx.disposeObject(this.sideMenu),this.ui=tx.disposeObject(this.ui),this.thumblist=tx.disposeObject(this.thumblist),this.outlineViewer=tx.disposeObject(this.outlineViewer),this.events&&(window.removeEventListener("resize",this.events.resize,!1),s.removeEventListener("mousemove",this.events.mousemove,!1),s.removeEventListener("mousedown",this.events.mousedown,!1),window.removeEventListener("mouseup",this.events.mouseup,!1),s.removeEventListener("touchmove",this.events.touchmove,!1),s.removeEventListener("touchstart",this.events.touchstart,!1),window.removeEventListener("touchend",this.events.touchend,!1)),this.events=null,this.options=null,this.element.removeClass("df-app"),this.viewerType=null,this.checkRequestQueue=null,null===(e=this.info)||void 0===e||e.remove(),this.info=null,null===(t=this.loadingIcon)||void 0===t||t.remove(),this.loadingIcon=null,null===(i=this.backGround)||void 0===i||i.remove(),this.backGround=null,null===(n=this.outlineContainer)||void 0===n||n.remove(),this.outlineContainer=null,null===(o=this.commentPopup)||void 0===o||o.remove(),this.commentPopup=null,this.viewerContainer.off(),this.viewerContainer.remove(),this.viewerContainer=null,this.container.off(),this.container.remove(),this.container=null,this.element.off(),this.element.data("df-app",null),this.element=null,this._offsetParent=null,this.dimensions=null}},{key:"resetResizeRequest",value:function(){this.resizeRequestStatus=tE.COUNT,this.resizeRequestCount=0,this.container.addClass("df-pendingresize"),this.pendingResize=!0}},{key:"initInfo",value:function(){this.info=tS("<div>",{class:"df-loading-info"}),this.container.append(this.info),this.info.html(this.options.text.loading+"..."),this.loadingIcon=tS("<div>",{class:"df-loading-icon"}).appendTo(this.container)}},{key:"updateInfo",value:function(e,t){tx.log(e),void 0!==this.info&&this.info.html(e)}},{key:"_documentLoaded",value:function(){tx.log("Document Loaded"),this.isDocumentReady=!0,this.contentProvider=this.provider,this.executeCallback("onDocumentLoad"),this.endPage=this.pageCount=this.provider.page
264Count,this.currentPageNumber=this.getValidPage(this.currentPageNumber)}},{key:"_viewerPrepared",value:function(){tx.log("Viewer Prepared"),this.isViewerPrepared=!0,this.executeCallback("onViewerLoad")}},{key:"requestFinalize",value:function(){!0===this.isDocumentReady&&!0===this.isViewerPrepared&&!0===this.isExternalReady&&!0!==this.finalizeRequested&&(this.finalizeRequested=!0,this.finalize())}},{key:"finalizeComponents",value:function(){this.ui=new tf({},this),this.ui.init(),this.calculateLayout(),this.viewer.init()}},{key:"finalize",value:function(){this.resize(),this.ui.update(),this.initEvents(),!0==this.options.isLightBox&&this.analytics({eventAction:this.options.analyticsViewerOpen,options:this.options}),this.container.removeClass("df-loading df-init"),this.viewer.onReady(),this.analytics({eventAction:this.options.analyticsViewerReady,options:this.options}),this.executeCallback("onReady"),!0===this.options.dataElement.hasClass("df-hash-focused")&&(tx.focusHash(this.options.dataElement),this.options.dataElement.removeClass("df-hash-focused")),!0===this.hashNavigationEnabled&&this.getURLHash(),tx.log("App Finalized")}},{key:"initOutline",value:function(){var e=tS("<div>").addClass("df-outline-container df-sidemenu");e.append('<div class="df-sidemenu-title">'+this.options.text.outlineTitle+"</div>");var t=tS("<div>").addClass("df-wrapper");e.append(t),this.sideMenu.element.append(e),this.outlineContainer=e,this.outlineViewer=new tb({container:t[0],linkService:this.provider.linkService,outlineItemClass:"df-outline-item",outlineToggleClass:"df-outline-toggle",outlineToggleHiddenClass:"df-outlines-hidden"}),this.outlineViewer.render({outline:this.provider.outline})}},{key:"initThumbs",value:function(){var e=this;e.thumblist=new tw({app:e,addFn:function(e){},scrollFn:function(){e.thumbRequestStatus=tE.ON},itemHeight:e.thumbSize,itemWidth:tx.limitAt(Math.floor(e.dimensions.defaultPage.ratio*e.thumbSize),32,180),totalRows:e.pageCount}),e.thumblist.lastScrolled=Date.now(),e.thumbRequestStatus=tE.ON;var t=tS("<div>").addClass("df-thumb-container df-sidemenu");t.append('<div class="df-sidemenu-title">'+this.options.text.thumbTitle+"</div>"),t.append(tS(e.thumblist.container).addClass("df-wrapper")),e.thumbContainer=t,e.sideMenu.element.append(t),e.container.on("click",".df-thumb-container .df-thumb",function(t){t.stopPropagation();var i=tS(this).attr("id").replace("df-thumb","");e.gotoPage(parseInt(i,10))})}},{key:"initSearch",value:function(){var e=this,t=tS("<div>").addClass("df-search-container df-sidemenu");t.append('<div class="df-sidemenu-title">'+this.options.text.searchTitle+"</div>"),e.searchForm=tS('<div class="df-search-form">').appendTo(t),e.searchBox=tS('<input type="text" class="df-search-text" placeholder="'+this.options.text.searchPlaceHolder+'">').on("keyup",function(t){13===t.keyCode&&e.search()}).appendTo(e.searchForm),e.searchButton=tS('<div class="df-ui-btn df-search-btn df-icon-search">').on("click",function(t){e.search()}).appendTo(e.searchForm),e.clearButton=tS('<a class="df-search-clear">'+this.options.text.searchClear+"</a>").on("click",function(t){e.clearSearch()}).appendTo(e.searchForm),e.searchInfo=tS('<div class="df-search-info">').appendTo(t),e.searchResults=tS('<div class="df-wrapper df-search-results">').appendTo(t),e.searchContainer=t,e.sideMenu.element.append(t),e.container.on("click",".df-search-result",function(t){t.stopPropagation();var i=tS(this).data("df-page");e.gotoPage(parseInt(i,10))})}},{key:"search",value:function(e){void 0==e&&(e=this.searchBox.val()),this.provider.search(e.trim())}},{key:"clearSearch",value:function(){this.searchBox.val(""),this.searchInfo.html(""),this.provider.clearSearch()}},{key:"updateSearchInfo",value:function(e){tx.log(e),void 0!==this.searchInfo&&this.searchInfo.html(e)}},{key:"checkRequestQueue",value:function(){var e=this;if(e.checkRequestQueue&&requestAnimationFrame(function(){e&&e.checkRequestQueue&&e.checkRequestQueue()}),!e.softDisposed){if("ready"!=e.state){"loading"===e.state&&!0===this.isDocumentReady&&!0===this.isViewerPrepared&&!0===this.isExternalReady&&(e.state="finalizing",this.finalizeComponents()),"finalizing"===e.state&&(e.state="ready",e.finalize());return}e.container&&e.container[0]&&e._offsetParent!==e.container[0].offsetParent&&(e._offsetParent=e.container[0].offsetParent,null!==e._offsetParent&&(e.resize(),e.resizeRequestStatus=tE.OFF),tx.log("Visibility Resize Detected")),(null!==e._offsetParent||e.isFullscreen)&&(TWEEN.getAll().length>0&&(TWEEN.update(),e.renderRequestStatus=tE.ON),e.resizeRequestStatus===tE.ON?(e.resizeRequestStatus=tE.OFF,e.resize()):e.resizeRequestStatus===tE.COUNT&&(e.resizeRequestCount++,e.resizeRequestCount>10&&(e.resizeRequestCount=0,e.resizeRequestStatus=tE.ON)),e.refreshRequestStatus===tE.ON?(e.refreshRequestStatus=tE.OFF,e.pendingResize=!1,e.viewer.refresh(),e.container.removeClass("df-pendingresize")):e.refreshRequestStatus===tE.COUNT&&(e.refreshRequestCount++,e.refreshRequestCount>3&&(e.refreshRequestCount=0,e.refreshRequestStatus=tE.ON)),e.textureRequestStatus===tE.ON&&e.processTextureRequest(),e.thumbRequestStatus===tE.ON?e.processThumbRequest
264():e.thumbRequestStatus===tE.COUNT&&(e.thumbRequestCount++,e.thumbRequestCount>3&&(e.thumbRequestCount=0,e.thumbRequestStatus=tE.ON)),e.renderRequestStatus===tE.ON&&(e.viewer.render(),e.renderRequestStatus=tE.OFF),e.provider.checkRequestQueue(),e.viewer.checkRequestQueue())}}},{key:"processTextureRequest",value:function(){var e,t,i=this.viewer,n=this.provider,o=i.getVisiblePages().main,s=0,a=this.zoomValue>1;if(i.isAnimating()&&!0!==DEARFLIP.defaults.instantTextureProcess)this.textureRequestStatus=tE.ON;else{tx.log("Texture Request Working");for(var r=0;r<o.length;r++){s=0;var l=o[r];if(l>0&&l<=this.pageCount){if(e=a?i.zoomViewer.getPageByNumber(l):i.getPageByNumber(l)){t=i.getTextureSize({pageNumber:l});var h={pageNumber:l,textureTarget:a?p.TEXTURE_TARGET.ZOOM:p.TEXTURE_TARGET.VIEWER};e.changeTexture(l,Math.floor(t.height))&&(n.processPage(h),s++,this.viewer.getAnnotationElement(l,!0)),!0===this.options.progressiveZoom&&this.zoomValue>1.1*i.pureMaxZoom&&this.viewer.zoomViewer.startZoomUpdateRequest()}if(s>0)break}}0===s&&(this.textureRequestStatus=tE.OFF)}return s}},{key:"applyTexture",value:function(e,t){var i=void 0!==e.toDataURL;if(t.textureTarget===p.TEXTURE_TARGET.THUMB){if(t.height=e.height,t.width=e.width,i){var n=e.toDataURL("image/png");this.provider.setCache(t.pageNumber,n,this.thumbSize),t.texture=n}else t.texture=e.src;this.thumblist.setPage(t)}else t.texture=i?e:e.src,!0===this.viewer.setPage(t)&&(this.provider.processAnnotations(t.pageNumber,this.viewer.getAnnotationElement(t.pageNumber,!0)),this.provider.processTextContent(t.pageNumber,this.viewer.getTextElement(t.pageNumber,!0)))}},{key:"processThumbRequest",value:function(){null!==this.thumblist&&void 0!==this.thumblist&&this.thumblist.processThumbRequest()}},{key:"refreshRequestStart",value:function(){this.refreshRequestStatus=tE.COUNT,this.refreshRequestCount=0}},{key:"renderRequestStart",value:function(){this.renderRequestStatus=tE.ON}},{key:"resizeRequestStart",value:function(){this.resizeRequestStatus=tE.ON}},{key:"zoom",value:function(e){this.pendingZoom=!0,this.zoomDelta=e,this.resize()}},{key:"resetZoom",value:function(){1!==this.zoomValue&&(this.zoomValue=1.001,this.zoom(-1))}},{key:"calculateLayout",value:function(){var e,t,i=this.isSideMenuOpen=this.container.hasClass("df-sidemenu-open"),n=this.dimensions,o=this.dimensions.padding,s=tS(window).height();n.offset={top:0,left:this.options.sideMenuOverlay||!i||this.isRTL?0:220,right:!this.options.sideMenuOverlay&&i&&this.isRTL?220:0,bottom:0,width:!this.options.sideMenuOverlay&&i?220:0},this.viewerContainer.css({left:n.offset.left,right:n.offset.right});var a=n.controlsHeight=this.container.find(".df-ui").height();if(o.top=this.options.paddingTop+(this.options.controlsPosition===p.CONTROLS_POSITION.TOP?a:0),o.left=this.options.paddingLeft,o.right=this.options.paddingRight,o.bottom=this.options.paddingBottom+(this.options.controlsPosition===p.CONTROLS_POSITION.BOTTOM?a:0),o.height=o.top+o.bottom,o.width=o.left+o.right,o.heightDiff=o.top-o.bottom,o.widthDiff=o.left-o.right,n.isFullSize=!0===this.isFullscreen,n.isFixedHeight=n.isFullSize||!n.isAutoHeight,n.containerWidth=n.isFullSize?tS(window).width():this.element.width(),this.container.toggleClass("df-xs",n.containerWidth<400).toggleClass("df-xss",n.containerWidth<320),n.maxHeight=s-(n.containerWidth>600&&null!==(t=tS(null!==(e=this.options.headerElementSelector)&&void 0!==e?e:"#wpadminbar").height())&&void 0!==t?t:0),n.isFixedHeight){if(n.isFullSize)n.maxHeight=s;else{this.element.height(this.options.height);var r=this.element.height();n.maxHeight=Math.min(r,n.maxHeight)}}n.width,n.stage.innerWidth=this.viewer._getInnerWidth();var l=n.stage.innerHeight=this.viewer._getInnerHeight(),h=this.viewer._getOuterHeight(l+n.padding.height);n.containerHeight=n.isFullSize?s:h,this.element.height(n.containerHeight);var u=this.element.height();n.isFullSize||u==n.containerHeight||(n.containerHeight=u,n.stage.innerHeight=u-n.padding.height,n.stage.height=u),n.origin={x:(o.widthDiff+n.containerWidth-n.offset.left-n.offset.right)/2,y:(o.heightDiff+n.containerHeight)/2},this.viewer.determinePageMode()}},{key:"resize",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];tx.log("Resize Request Initiated"),this.calculateLayout(),this.viewer.handleZoom(),this.viewer.resize(),!1!==e&&(this.pendingZoom?(this.viewer.refresh(),tx.log("Pending Zoom updated")):this.refreshRequestStart(),this.ui.update(),this.renderRequestStatus=tE.ON,this.zoomChanged=!1,this.pendingZoom=!1,this.executeCallback("afterResize"))}},{key:"hasOutline",value:function(){if(this.provider.outline.length>0)return!0}},{key:"switchFullscreen",value:function(){var e,t,i=this,n=i.container[0];if(i.container.toggleClass("df-fullscreen",!0!==i.isFullscreen),(null==i?void 0:null===(t=i.ui)||void 0===t?void 0:null===(e=t.controls)||void 0===e?void 0:e.fullscreen)&&i.ui.controls.fullScreen.toggleClass(i.options.icons["fullscreen-off"],!0!==i.isFullscreen),!0!==i.isFullscreen){var o=null;n.requestFullscreen?o=n.requestFullscreen():n.msRequestFullscreen?o=n.msRequestFullscreen():n.mozRequestFullScreen?o=n.mozRequestFullScreen():n.webkitRequestFullscreen&&(o=n.webkitRequestFullscreen()),o&&o.then&&o.then(function(){i.refreshRequestStatus,tE.ON,i.resize()}),i.isFullscreen=!0}else i.isFullscreen=!1,document.exitFullscreen?document.fullscreenElement&&document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),tx.hasFullscreenEnabled()||i.container[0].scrollIntoView();tx.hasFullscreenEnabled()||(i.resizeRequestStatus=tE.ON)}},{key:"next",value:function(){this.jumpBy(this.jumpStep)}},{key:"prev",value:function(){this.jumpBy(-this.jumpStep)}},{key:"jumpBy",value:function(e){var t=this.currentPageNumber+e;t=tx.limitAt(t,this.startPage,this.endPage),!0!=this.anyFirstPageChanged&&(this.analytics({eventAction:this.options.analyticsFirstPageChange,options:this.options}),this.anyFirstPageChanged=!0),this.gotoPage(t),this.ui.update()}},{key:"openRight",value:function(){this.isRTL?this.prev():this.next()}},{key:"openLeft",value:function(){this.isRTL?this.next():this.prev()}},{key:"start",value:function(){this.gotoPage(this.startPage)}},{key:"end",value:function(){this.gotoPage(this.endPage)}},{key:"gotoPage",value:function(e){e=this.getValidPage(parseInt(e,10)),null!==this.viewer&&!1!==this.viewer.validatePageChange(e)&&(this.executeCallback("beforePageChanged"),this.requestDestRefKey=void 0,this.container.removeClass("df-fetch-pdf"),this.oldPageNumber=this.currentPageNumber,this.currentPageNumber=e,this.thumbRequestStatus=tE.ON,this.viewer.gotoPageCallBack&&this.viewer.gotoPageCallBack(),this.ui.update(),!0==this.autoPlay&&this.setAutoPlay(this.autoPlay),!0===this.hashNavigationEnabled&&this.getURLHash(),this.executeCallback("onPageChanged"))}},{key:"gotoPageLabel",value:function(e){this.gotoPage(this.provider.getPageNumberForLabel(e.toString().trim()))}},{key:"getCurrentLabel",value:function(){return this.provider.getLabelforPage(this.currentPageNumber)}},{key:"autoPlayFunction",value:function(){this&&this.autoPlay&&(tx.limitAt(this.currentPageNumber+this.jumpStep,this.startPage,this.endPage)!==this.currentPageNumber?this.next():this.setAutoPlay(!1))}},{key:"setAutoPlay",value:function(e){if(this.options.autoPlay){var t=(e=!0==e)?this.options.text.pause:this.options.text.play;this.ui.controls.play.toggleClass(this.options.icons.pause,e),this.ui.controls.play.html("<span>"+t+"</span>"),this.ui.controls.play.attr("title",t),clearInterval(this.autoPlayTimer),e&&(this.autoPlayTimer=setInterval(this.autoPlayFunction.bind(this),this.options.autoPlayDuration)),this.autoPlay=e}}},{key:"isValidPage",value:function(e){return this.provider._isValidPage(e)}},{key:"getValidPage",value:function(e){return isNaN(e)?e=this.currentPageNumber:e<1?e=1:e>this.pageCount&&(e=this.pageCount),e}},{key:"getURLHash",value:function(){if(null!=this.options.id){var e=tx.getSharePrefix(this.options.sharePrefix)+(null!=this.options.slug?this.options.slug:this.options.id)+"/";null!=this.currentPageNumber&&(e+=this.currentPageNumber+"/"),history.replaceState(void 0,void 0,"#"+e)}return window.location.href}},{key:"executeCallback",value:function(e){}},{key:"analytics",value:function(e){}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}();p.prepareOptions=function(e){e.element instanceof tS||(e.element=tS(e.element));var t=e.element;null==e.dataElement&&(e.dataElement=t);var i=e.dataElement,n=p.utils.getOptions(i),o=tS.extend(!0,{},p.defaults,e,n);o=tx.fallbackOptions(o),tx.log(o);var s=tS.extend(!0,{},p._defaults,o);return tx.isMobile&&"function"==typeof p.viewers[s.mobileViewerType]&&(s.viewerType=s.mobileViewerType),"function"!=typeof p.viewers[s.viewerType]?(console.warn("Invalid Viewer Type! "+s.viewerType+" | Using default Viewer!"),s.viewerType=p.viewers.default):s.viewerType=p.viewers[s.viewerType],s=tx.finalizeOptions(tx.sanitizeOptions(s))},p.Application=function(e){var t=p.prepareOptions(e),i=new tC(t);return e.element.data("df-app",i),null!=t.id&&!0!==t.isLightBox&&(window[t.id.toString()]=i),i}
264,void 0!==window.jQuery&&!1==p.fakejQuery&&tS.fn.extend({dearviewer_options:function(e){return null==e&&(e={}),e.element=tS(this),new p.prepareOptions(e)},dearviewer:function(e){return null==e&&(e={}),e.element=tS(this),new p.Application(e)}});var tT=p.jQuery,tk=window.DFLIP=window.DEARFLIP=p;tk.defaults.viewerType="flipbook",tk.slug="dflip",tk.locationVar="dFlipLocation",tk.locationFile="dflip",tk.PAGE_MODE={SINGLE:1,DOUBLE:2,AUTO:null},tk.SINGLE_PAGE_MODE={ZOOM:1,BOOKLET:2,AUTO:null},tk.CONTROLSPOSITION={HIDDEN:"hide",TOP:"top",BOTTOM:"bottom"},tk.DIRECTION={LTR:1,RTL:2},tk.PAGE_SIZE={AUTO:0,SINGLE:1,DOUBLEINTERNAL:2},tk.parseFallBack=function(){tT(".df-posts").addClass("dflip-books"),tT(".dflip-books").addClass("df-posts"),tT("._df_button, ._df_thumb, ._df_book").each(function(){var e=tT(this);"true"!==e.data("df-parsed")&&(e.addClass("df-element"),e.hasClass("_df_book")||(e.hasClass("_df_thumb")?(e.attr("data-df-lightbox","thumb"),void 0!==e.attr("thumb")&&e.data("df-thumb",e.attr("thumb"))):e.attr("data-df-lightbox","button")))})},tk.parseBooks=function(){tk.parseFallBack(),tk.parseElements()};var tO=function(e){return null!=e.source&&(Array===e.source.constructor||Array.isArray(e.source)||e.source instanceof Array)&&(e.providerType="image"),null!=e.cover3DType&&(!0==e.cover3DType||"true"==e.cover3DType?e.cover3DType=tk.FLIPBOOK_COVER_TYPE.BASIC:(!1==e.cover3DType||"false"==e.cover3DType)&&(e.cover3DType=tk.FLIPBOOK_COVER_TYPE.NONE)),void 0!==e.pageSize&&("1"===e.pageSize||1===e.pageSize||e.pageSize===tk.FLIPBOOK_PAGE_SIZE.SINGLE?e.pageSize=tk.FLIPBOOK_PAGE_SIZE.SINGLE:"2"===e.pageSize||2===e.pageSize||e.pageSize===tk.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL?e.pageSize=tk.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL:e.pageSize===tk.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK||(e.pageSize=tk.FLIPBOOK_PAGE_SIZE.AUTO)),void 0!==e.pageMode&&("1"===e.pageMode||1===e.pageMode||e.pageMode===tk.FLIPBOOK_PAGE_MODE.SINGLE?e.pageMode=tk.FLIPBOOK_PAGE_MODE.SINGLE:"2"===e.pageMode||2===e.pageMode||e.pageMode===tk.FLIPBOOK_PAGE_MODE.DOUBLE?e.pageMode=tk.FLIPBOOK_PAGE_MODE.DOUBLE:e.pageMode=tk.FLIPBOOK_PAGE_MODE.AUTO),void 0!==e.singlePageMode&&("1"===e.singlePageMode||1===e.singlePageMode||e.singlePageMode===tk.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM?e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM:"2"===e.singlePageMode||2===e.singlePageMode||e.singlePageMode===tk.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET?e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET:e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.AUTO),void 0!==e.controlsPosition&&"hide"===e.controlsPosition&&(e.controlsPosition=tk.CONTROLS_POSITION.HIDDEN),void 0!==e.overwritePDFOutline&&(e.overwritePDFOutline=m.isTrue(e.overwritePDFOutline)),void 0!==e.webgl&&(e.is3D=e.webgl=e.webgl,delete e.webgl),void 0!==e.webglShadow&&(e.has3DShadow=m.isTrue(e.webglShadow),delete e.webglShadow),void 0!==e.scrollWheel&&(m.isTrue(e.scrollWheel)&&(e.mouseScrollAction=tk.MOUSE_SCROLL_ACTIONS.ZOOM),delete e.scrollWheel),void 0!==e.stiffness&&delete e.stiffness,void 0!==e.soundEnable&&(e.enableSound=m.isTrue(e.soundEnable),delete e.soundEnable),void 0!==e.enableDownload&&(e.showDownloadControl=m.isTrue(e.enableDownload),delete e.enableDownload),void 0!==e.autoEnableOutline&&(e.autoOpenOutline=m.isTrue(e.autoEnableOutline),delete e.autoEnableOutline),void 0!==e.autoEnableThumbnail&&(e.autoOpenThumbnail=m.isTrue(e.autoEnableThumbnail),delete e.autoEnableThumbnail),void 0!==e.direction&&("2"===e.direction||2===e.direction||e.direction===tk.READ_DIRECTION.RTL?e.readDirection=tk.READ_DIRECTION.RTL:e.readDirection=tk.READ_DIRECTION.LTR,delete e.direction),void 0!==e.hard&&(e.flipbookHardPages=e.hard,"hard"===e.flipbookHardPages&&(e.flipbookHardPages="all"),delete e.hard),void 0!==e.forceFit&&delete e.forceFit,m.sanitizeOptions(e)};tT.fn.extend({flipBook:function(e,t){return null==t&&(t={}),t.source=e,t.element=tT(this),new p.Application(t)}}),tT(document).ready(function(){var e=tT("body");tk.executeCallback("beforeDearFlipInit"),void 0!==window.dFlipWPGlobal&&tT.extend(!0,tk.defaults,tO(window.dFlipWPGlobal)),tk.initUtils(),tk.initControls(),e.on("click",".df-element[data-df-lightbox],.df-element[data-lightbox]",function(e){var t=tT(this);e.preventDefault(),e.stopPropagation(),tk.openLightBox(t)}),tk.checkBrowserURLforDefaults(),tk.parseCSSElements(),tk.parseFallBack(),m.detectHash(),tk.parseNormalElements(),tk.executeCallback("afterDearFlipInit")}),m.finalizeOptions=function(e){return tO(e)},tk.executeCallback("onDearFlipLoad")}()}(); 265 266(function(t){function e(e){return u?e.data("events"):t._data(e[0]).events}function n(t,n,r){var i=e(t),a=i[n];if(!u){var s=r?a.splice(a.delegateCount-1,1)[0]:a.pop();return a.splice(r?0:a.delegateCount||0,0,s),void 0}r?i.live.unshift(i.live.pop()):a.unshift(a.pop())}function r(e,r,i){var a=r.split(/\s+/);e.each(function(){for(var e=0;a.length>e;++e){var r=a[e].trim().match(/[^\.]+/i)[0];n(t(this),r,i)}})}function i(e){t.fn[e+"First"]=function(){var n=t.makeArray(arguments),i=n.shift();return i&&(t.fn[e].apply(this,arguments),r(this,i)),this}}var a=t.fn.jquery.split("."),s=parseInt(a[0]),f=parseInt(a[1]),u=1>s||1==s&&7>f;i("bind"),i("one"),t.fn.delegateFirst=function(){var e=t.makeArray(arguments),n=e[1];return n&&(e.splice(0,2),t.fn.delegate.apply(this,arguments),r(this,n,!0)),this},t.fn.liveFirst=function(){var e=t.makeArray(arguments);return e.unshift(this.selector),t.fn.delegateFirst.apply(t(document),e),this},u||(t.fn.onFirst=function(e,n){var i=t(this),a="string"==typeof n;if(t.fn.on.apply(i,arguments),"object"==typeof e)for(type in e)e.hasOwnProperty(type)&&r(i,type,a);else"string"==typeof e&&r(i,e,a);return i})})(jQuery); 267!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();
267t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if(i=e({path:"/"},t.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}return r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",r,i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,d=0;d<p.length;d++){var f=p[d].split("="),u=f.slice(1).join("=");'"'===u.charAt(0)&&(u=u.slice(1,-1));try{var l=f[0].replace(s,decodeURIComponent);if(u=o.read?o.read(u,l):o(u,l)||u.replace(s,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch(e){}if(n===l){c=u;break}n||(c[l]=u)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})}); 268(function(){'use strict';var ERROR='input is invalid type';var WINDOW=typeof window==='object';var root=WINDOW?window:{};if(root.JS_SHA256_NO_WINDOW){WINDOW=false;} 269var WEB_WORKER=!WINDOW&&typeof self==='object';var NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process==='object'&&process.versions&&process.versions.node;if(NODE_JS){root=global;}else if(WEB_WORKER){root=self;} 270var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module==='object'&&module.exports;var AMD=typeof define==='function'&&define.amd;var ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=='undefined';var HEX_CHARS='0123456789abcdef'.split('');var EXTRA=[-2147483648,8388608,32768,128];var SHIFT=[24,16,8,0];var K=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2];var OUTPUT_TYPES=['hex','array','digest','arrayBuffer'];var blocks=[];if(root.JS_SHA256_NO_NODE_JS||!Array.isArray){Array.isArray=function(obj){return Object.prototype.toString.call(obj)==='[object Array]';};} 271if(ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(obj){return typeof obj==='object'&&obj.buffer&&obj.buffer.constructor===ArrayBuffer;};} 272var createOutputMethod=function(outputType,is224){return function(message){return new Sha256(is224,true).update(message)[outputType]();};};var createMethod=function(is224){var method=createOutputMethod('hex',is224);if(NODE_JS){method=nodeWrap(method,is224);} 273method.create=function(){return new Sha256(is224);};method.update=function(message){return method.create().update(message);};for(var i=0;i<OUTPUT_TYPES.length;++i){var type=OUTPUT_TYPES[i];method[type]=createOutputMethod(type,is224);} 274return method;};var nodeWrap=function(method,is224){var crypto=require('crypto') 275var Buffer=require('buffer').Buffer;var algorithm=is224?'sha224':'sha256';var bufferFrom;if(Buffer.from&&!root.JS_SHA256_NO_BUFFER_FROM){bufferFrom=Buffer.from;}else{bufferFrom=function(message){return new Buffer(message);};} 276var nodeMethod=function(message){if(typeof message==='string'){return crypto.createHash(algorithm).update(message,'utf8').digest('hex');}else{if(message===null||message===undefined){throw new Error(ERROR);}else if(message.constructor===ArrayBuffer){message=new Uint8Array(message);}} 277if(Array.isArray(message)||ArrayBuffer.isView(message)||message.constructor===Buffer){return crypto.createHash(algorithm).update(bufferFrom(message)).digest('hex');}else{return method(message);}};return nodeMethod;};var createHmacOutputMethod=function(outputType,is224){return function(key,message){return new HmacSha256(key,is224,true).update(message)[outputType]();};};var createHmacMethod=function(is224){var method=createHmacOutputMethod('hex',is224);method.create=function(key){return new HmacSha256(key,is224);};method.update=function(key,message){return method.create(key).update(message);};for(var i=0;i<OUTPUT_TYPES.length;++i){var type=OUTPUT_TYPES[i];method[type]=createHmacOutputMethod(type,is224);} 278return method;};function Sha256(is224,sharedMemory){if(sharedMemory){blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0;this.blocks=blocks;}else{this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];} 279if(is224){this.h0=0xc1059ed8;this.h1=0x367cd507;this.h2=0x3070dd17;this.h3=0xf70e5939;this.h4=0xffc00b31;this.h5=0x68581511;this.h6=0x64f98fa7;this.h7=0xbefa4fa4;}
vendor: 5,189 bytes, lines 279-309
279else{this.h0=0x6a09e667;this.h1=0xbb67ae85;this.h2=0x3c6ef372;this.h3=0xa54ff53a;this.h4=0x510e527f;this.h5=0x9b05688c;this.h6=0x1f83d9ab;this.h7=0x5be0cd19;} 280this.block=this.start=this.bytes=this.hBytes=0;this.finalized=this.hashed=false;this.first=true;this.is224=is224;} 281Sha256.prototype.update=function(message){if(this.finalized){return;} 282var notString,type=typeof message;if(type!=='string'){if(type==='object'){if(message===null){throw new Error(ERROR);}else if(ARRAY_BUFFER&&message.constructor===ArrayBuffer){message=new Uint8Array(message);}else if(!Array.isArray(message)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(message)){throw new Error(ERROR);}}}else{throw new Error(ERROR);} 283notString=true;} 284var code,index=0,i,length=message.length,blocks=this.blocks;while(index<length){if(this.hashed){this.hashed=false;blocks[0]=this.block;this.block=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0;} 285if(notString){for(i=this.start;index<length&&i<64;++index){blocks[i>>>2]|=message[index]<<SHIFT[i++&3];}}else{for(i=this.start;index<length&&i<64;++index){code=message.charCodeAt(index);if(code<0x80){blocks[i>>>2]|=code<<SHIFT[i++&3];}else if(code<0x800){blocks[i>>>2]|=(0xc0|(code>>>6))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|(code&0x3f))<<SHIFT[i++&3];}else if(code<0xd800||code>=0xe000){blocks[i>>>2]|=(0xe0|(code>>>12))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|((code>>>6)&0x3f))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|(code&0x3f))<<SHIFT[i++&3];}else{code=0x10000+(((code&0x3ff)<<10)|(message.charCodeAt(++index)&0x3ff));blocks[i>>>2]|=(0xf0|(code>>>18))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|((code>>>12)&0x3f))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|((code>>>6)&0x3f))<<SHIFT[i++&3];blocks[i>>>2]|=(0x80|(code&0x3f))<<SHIFT[i++&3];}}} 286this.lastByteIndex=i;this.bytes+=i-this.start;if(i>=64){this.block=blocks[16];this.start=i-64;this.hash();this.hashed=true;}else{this.start=i;}} 287if(this.bytes>4294967295){this.hBytes+=this.bytes/4294967296<<0;this.bytes=this.bytes%4294967296;} 288return this;};Sha256.prototype.finalize=function(){if(this.finalized){return;} 289this.finalized=true;var blocks=this.blocks,i=this.lastByteIndex;blocks[16]=this.block;blocks[i>>>2]|=EXTRA[i&3];this.block=blocks[16];if(i>=56){if(!this.hashed){this.hash();} 290blocks[0]=this.block;blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0;} 291blocks[14]=this.hBytes<<3|this.bytes>>>29;blocks[15]=this.bytes<<3;this.hash();};Sha256.prototype.hash=function(){var a=this.h0,b=this.h1,c=this.h2,d=this.h3,e=this.h4,f=this.h5,g=this.h6,h=this.h7,blocks=this.blocks,j,s0,s1,maj,t1,t2,ch,ab,da,cd,bc;for(j=16;j<64;++j){t1=blocks[j-15];s0=((t1>>>7)|(t1<<25))^((t1>>>18)|(t1<<14))^(t1>>>3);t1=blocks[j-2];s1=((t1>>>17)|(t1<<15))^((t1>>>19)|(t1<<13))^(t1>>>10);blocks[j]=blocks[j-16]+s0+blocks[j-7]+s1<<0;} 292bc=b&c;for(j=0;j<64;j+=4){if(this.first){if(this.is224){ab=300032;t1=blocks[0]-1413257819;h=t1-150054599<<0;d=t1+24177077<<0;}else{ab=704751109;t1=blocks[0]-210244248;h=t1-1521486534<<0;d=t1+143694565<<0;} 293this.first=false;}else{s0=((a>>>2)|(a<<30))^((a>>>13)|(a<<19))^((a>>>22)|(a<<10));s1=((e>>>6)|(e<<26))^((e>>>11)|(e<<21))^((e>>>25)|(e<<7));ab=a&b;maj=ab^(a&c)^bc;ch=(e&f)^(~e&g);t1=h+s1+ch+K[j]+blocks[j];t2=s0+maj;h=d+t1<<0;d=t1+t2<<0;} 294s0=((d>>>2)|(d<<30))^((d>>>13)|(d<<19))^((d>>>22)|(d<<10));s1=((h>>>6)|(h<<26))^((h>>>11)|(h<<21))^((h>>>25)|(h<<7));da=d&a;maj=da^(d&b)^ab;ch=(h&e)^(~h&f);t1=g+s1+ch+K[j+1]+blocks[j+1];t2=s0+maj;g=c+t1<<0;c=t1+t2<<0;s0=((c>>>2)|(c<<30))^((c>>>13)|(c<<19))^((c>>>22)|(c<<10));s1=((g>>>6)|(g<<26))^((g>>>11)|(g<<21))^((g>>>25)|(g<<7));cd=c&d;maj=cd^(c&a)^da;ch=(g&h)^(~g&e);t1=f+s1+ch+K[j+2]+blocks[j+2];t2=s0+maj;f=b+t1<<0;b=t1+t2<<0;s0=((b>>>2)|(b<<30))^((b>>>13)|(b<<19))^((b>>>22)|(b<<10));s1=((f>>>6)|(f<<26))^((f>>>11)|(f<<21))^((f>>>25)|(f<<7));bc=b&c;maj=bc^(b&d)^cd;ch=(f&g)^(~f&h);t1=e+s1+ch+K[j+3]+blocks[j+3];t2=s0+maj;e=a+t1<<0;a=t1+t2<<0;this.chromeBugWorkAround=true;} 295this.h0=this.h0+a<<0;this.h1=this.h1+b<<0;this.h2=this.h2+c<<0;this.h3=this.h3+d<<0;this.h4=this.h4+e<<0;this.h5=this.h5+f<<0;this.h6=this.h6+g<<0;this.h7=this.h7+h<<0;};Sha256.prototype.hex=function(){this.finalize();var h0=this.h0,h1=this.h1,h2=this.h2,h3=this.h3,h4=this.h4,h5=this.h5,h6=this.h6,h7=this.h7;var hex=HEX_CHARS[(h0>>>28)&0x0F]+HEX_CHARS[(h0>>>24)&0x0F]+ 296HEX_CHARS[(h0>>>20)&0x0F]+HEX_CHARS[(h0>>>16)&0x0F]+ 297HEX_CHARS[(h0>>>12)&0x0F]+HEX_CHARS[(h0>>>8)&0x0F]+ 298HEX_CHARS[(h0>>>4)&0x0F]+HEX_CHARS[h0&0x0F]+ 299HEX_CHARS[(h1>>>28)&0x0F]+HEX_CHARS[(h1>>>24)&0x0F]+ 300HEX_CHARS[(h1>>>20)&0x0F]+HEX_CHARS[(h1>>>16)&0x0F]+ 301HEX_CHARS[(h1>>>12)&0x0F]+HEX_CHARS[(h1>>>8)&0x0F]+ 302HEX_CHARS[(h1>>>4)&0x0F]+HEX_CHARS[h1&0x0F]+ 303HEX_CHARS[(h2>>>28)&0x0F]+HEX_CHARS[(h2>>>24)&0x0F]+ 304HEX_CHARS[(h2>>>20)&0x0F]+HEX_CHARS[(h2>>>16)&0x0F]+ 305HEX_CHARS[(h2>>>12)&0x0F]+HEX_CHARS[(h2>>>8)&0x0F]+ 306HEX_CHARS[(h2>>>4)&0x0F]+HEX_CHARS[h2&0x0F]+ 307HEX_CHARS[(h3>>>28)&0x0F]+HEX_CHARS[(h3>>>24)&0x0F]+ 308HEX_CHARS[(h3>>>20)&0x0F]+HEX_CHARS[(h3>>>16)&0x0F]+ 309HEX_CHARS[(h3>>>12)&0x0F]+HEX_CHARS[(h3>>>
3098)&0x0F]+ 310HEX_CHARS[(h3>>>4)&0x0F]+HEX_CHARS[h3&0x0F]+ 311HEX_CHARS[(h4>>>28)&0x0F]+HEX_CHARS[(h4>>>24)&0x0F]+ 312HEX_CHARS[(h4>>>20)&0x0F]+HEX_CHARS[(h4>>>16)&0x0F]+ 313HEX_CHARS[(h4>>>12)&0x0F]+HEX_CHARS[(h4>>>8)&0x0F]+ 314HEX_CHARS[(h4>>>4)&0x0F]+HEX_CHARS[h4&0x0F]+ 315HEX_CHARS[(h5>>>28)&0x0F]+HEX_CHARS[(h5>>>24)&0x0F]+ 316HEX_CHARS[(h5>>>20)&0x0F]+HEX_CHARS[(h5>>>16)&0x0F]+ 317HEX_CHARS[(h5>>>12)&0x0F]+HEX_CHARS[(h5>>>8)&0x0F]+ 318HEX_CHARS[(h5>>>4)&0x0F]+HEX_CHARS[h5&0x0F]+ 319HEX_CHARS[(h6>>>28)&0x0F]+HEX_CHARS[(h6>>>24)&0x0F]+ 320HEX_CHARS[(h6>>>20)&0x0F]+HEX_CHARS[(h6>>>16)&0x0F]+ 321HEX_CHARS[(h6>>>12)&0x0F]+HEX_CHARS[(h6>>>8)&0x0F]+ 322HEX_CHARS[(h6>>>4)&0x0F]+HEX_CHARS[h6&0x0F];if(!this.is224){hex+=HEX_CHARS[(h7>>>28)&0x0F]+HEX_CHARS[(h7>>>24)&0x0F]+ 323HEX_CHARS[(h7>>>20)&0x0F]+HEX_CHARS[(h7>>>16)&0x0F]+ 324HEX_CHARS[(h7>>>12)&0x0F]+HEX_CHARS[(h7>>>8)&0x0F]+ 325HEX_CHARS[(h7>>>4)&0x0F]+HEX_CHARS[h7&0x0F];} 326return hex;};Sha256.prototype.toString=Sha256.prototype.hex;Sha256.prototype.digest=function(){this.finalize();var h0=this.h0,h1=this.h1,h2=this.h2,h3=this.h3,h4=this.h4,h5=this.h5,h6=this.h6,h7=this.h7;var arr=[(h0>>>24)&0xFF,(h0>>>16)&0xFF,(h0>>>8)&0xFF,h0&0xFF,(h1>>>24)&0xFF,(h1>>>16)&0xFF,(h1>>>8)&0xFF,h1&0xFF,(h2>>>24)&0xFF,(h2>>>16)&0xFF,(h2>>>8)&0xFF,h2&0xFF,(h3>>>24)&0xFF,(h3>>>16)&0xFF,(h3>>>8)&0xFF,h3&0xFF,(h4>>>24)&0xFF,(h4>>>16)&0xFF,(h4>>>8)&0xFF,h4&0xFF,(h5>>>24)&0xFF,(h5>>>16)&0xFF,(h5>>>8)&0xFF,h5&0xFF,(h6>>>24)&0xFF,(h6>>>16)&0xFF,(h6>>>8)&0xFF,h6&0xFF];if(!this.is224){arr.push((h7>>>24)&0xFF,(h7>>>16)&0xFF,(h7>>>8)&0xFF,h7&0xFF);} 327return arr;};Sha256.prototype.array=Sha256.prototype.digest;Sha256.prototype.arrayBuffer=function(){this.finalize();var buffer=new ArrayBuffer(this.is224?28:32);var dataView=new DataView(buffer);dataView.setUint32(0,this.h0);dataView.setUint32(4,this.h1);dataView.setUint32(8,this.h2);dataView.setUint32(12,this.h3);dataView.setUint32(16,this.h4);dataView.setUint32(20,this.h5);dataView.setUint32(24,this.h6);if(!this.is224){dataView.setUint32(28,this.h7);} 328return buffer;};function HmacSha256(key,is224,sharedMemory){var i,type=typeof key;if(type==='string'){var bytes=[],length=key.length,index=0,code;for(i=0;i<length;++i){code=key.charCodeAt(i);if(code<0x80){bytes[index++]=code;}else if(code<0x800){bytes[index++]=(0xc0|(code>>>6));bytes[index++]=(0x80|(code&0x3f));}else if(code<0xd800||code>=0xe000){bytes[index++]=(0xe0|(code>>>12));bytes[index++]=(0x80|((code>>>6)&0x3f));bytes[index++]=(0x80|(code&0x3f));}else{code=0x10000+(((code&0x3ff)<<10)|(key.charCodeAt(++i)&0x3ff));bytes[index++]=(0xf0|(code>>>18));bytes[index++]=(0x80|((code>>>12)&0x3f));bytes[index++]=(0x80|((code>>>6)&0x3f));bytes[index++]=(0x80|(code&0x3f));}} 329key=bytes;}else{if(type==='object'){if(key===null){throw new Error(ERROR);}else if(ARRAY_BUFFER&&key.constructor===ArrayBuffer){key=new Uint8Array(key);}else if(!Array.isArray(key)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(key)){throw new Error(ERROR);}}}else{throw new Error(ERROR);}} 330if(key.length>64){key=(new Sha256(is224,true)).update(key).array();} 331var oKeyPad=[],iKeyPad=[];for(i=0;i<64;++i){var b=key[i]||0;oKeyPad[i]=0x5c^b;iKeyPad[i]=0x36^b;} 332Sha256.call(this,is224,sharedMemory);this.update(iKeyPad);this.oKeyPad=oKeyPad;this.inner=true;this.sharedMemory=sharedMemory;} 333HmacSha256.prototype=new Sha256();HmacSha256.prototype.finalize=function(){Sha256.prototype.finalize.call(this);if(this.inner){this.inner=false;var innerHash=this.array();Sha256.call(this,this.is224,this.sharedMemory);this.update(this.oKeyPad);this.update(innerHash);Sha256.prototype.finalize.call(this);}};var exports=createMethod();exports.sha256=exports;exports.sha224=createMethod(true);exports.sha256.hmac=createHmacMethod();exports.sha224.hmac=createHmacMethod(true);if(COMMON_JS){module.exports=exports;}else{root.sha256=exports.sha256;root.sha224=exports.sha224;if(AMD){define(function(){return exports;});}}})(); 334!function($,options){if(options.debug){console.log('PYS:',options);} 335var uniqueId={};let gtm_variables={};let gtm_datalayername="dynamicVariable";var probedCookieDomain=null;function cookieDomain(){if(probedCookieDomain!==null){return probedCookieDomain;} 336if(!options||!options.hasOwnProperty("track_cookie_for_subdomains")||!options.track_cookie_for_subdomains){return'';} 337probedCookieDomain=probeCookieDomain();return probedCookieDomain;} 338function probeCookieDomain(){var host='';try{host=String(location.hostname||'');}catch(e){return'';} 339if(!host||host.indexOf('.')===-1)return'';if(host.indexOf(':')!==-1)return'';if(/^[\d.]+$/.test(host))return'';var labels=host.split('.');for(var take=2;take<=labels.length;take++){var candidate='.'+labels.slice(labels.length-take).join('.');if(cookieDomainAccepted(candidate))return candidate;} 340return'';} 341function cookieDomainAccepted(candidate){var name='pys_dt'+Math.floor(Math.random()*1e9);var accepted=false;try{document.cookie=name+'=1; path=/; domain='+candidate+'; SameSite=Lax';accepted=document.cookie.indexOf(name+'=1')!==-1;}catch(e){return false;}finally{try{document.cookie=name+'=; path=/; domain='+candidate+'; max-age=0';}catch(e){}} 342return accepted;} 343function reportCookieDomain(resolved){if(!resolved)return;var bare=String(resolved).replace(/^\./,'');if(!bare||bare.indexOf('.')===-1)return;try{if(Cookies.get('pys_cd')===bare)return;Cookies.set('pys_cd',bare,{expires:365,path:'/',domain:resolved,sameSite:'Lax'});}catch(e){}} 344var pageReferrer='';try{pageReferrer=stripUrlQuery((document.referrer||'').toString());}catch(e){} 345var PYS_SESSION_ENTRY_REFERRER_KEY='pys_session_entry_referrer';function stripUrlQuery(url){if(!url)return'';var clean=String(url);var q=clean.indexOf('?');
345if(q!==-1)clean=clean.substring(0,q);var h=clean.indexOf('#');if(h!==-1)clean=clean.substring(0,h);return clean;} 346var sessionEntryReferrer='';function getOrInitSessionEntryReferrer(consentGranted){var value='';try{if(typeof window.sessionStorage!=='undefined'){value=window.sessionStorage.getItem(PYS_SESSION_ENTRY_REFERRER_KEY)||'';}}catch(e){} 347if(!value){var cookieValue=Cookies.get(PYS_SESSION_ENTRY_REFERRER_KEY);if(cookieValue&&cookieValue!=='undefined'){value=cookieValue;try{if(typeof window.sessionStorage!=='undefined'){window.sessionStorage.setItem(PYS_SESSION_ENTRY_REFERRER_KEY,value);}}catch(e){}}} 348if(!value){var raw='';try{raw=stripUrlQuery((document.referrer||'').toString());}catch(e){} 349if(raw){var refHost='';try{refHost=new URL(raw).hostname;}catch(e){} 350if(refHost&&refHost!==window.location.hostname){value=raw;try{if(typeof window.sessionStorage!=='undefined'){window.sessionStorage.setItem(PYS_SESSION_ENTRY_REFERRER_KEY,value);}}catch(e){}}}} 351if(value&&consentGranted&&options&&options.cookie&&!options.cookie.disabled_all_cookie){var existingCookie=Cookies.get(PYS_SESSION_ENTRY_REFERRER_KEY);if(!existingCookie||existingCookie==='undefined'){Cookies.set(PYS_SESSION_ENTRY_REFERRER_KEY,value,{path:'/',domain:cookieDomain()});}} 352sessionEntryReferrer=value;return value;} 353getOrInitSessionEntryReferrer(false);var PYS_EVENT_REFERRER_KEY='pys_event_referrer';function writeEventReferrerCookie(){if(!pageReferrer){return;} 354if(!options||!options.cookie||options.cookie.disabled_all_cookie){return;} 355try{Cookies.set(PYS_EVENT_REFERRER_KEY,pageReferrer,{path:'/',domain:cookieDomain()});}catch(e){}} 356function resolveParamValue(param,key=''){if(param===null||param===undefined){return null;} 357if(typeof param!=='object'){return param;} 358if(Array.isArray(param)){return param.map(item=>resolveParamValue(item,key));} 359const isConfigObject=('value'in param||'selector'in param||'dynamic'in param||'input_type'in param)&&Object.keys(param).every(k=>['value','selector','dynamic','input_type','name'].includes(k));if(isConfigObject){const isStatic=(!param.dynamic||param.dynamic===false)||(!param.selector||param.selector.trim()==='');if(isStatic){let value=param.value??null;if(param.input_type==="float"||param.input_type==="int"){value=extractNumericValue(value,param.input_type==="int");} 360return value;} 361try{const el=document.querySelector(param.selector);if(!el){return null;} 362let value=el.value||el.innerText||el.textContent||el.getAttribute("content")||el.getAttribute("data-value")||null;if(param.input_type==="float"||param.input_type==="int"){value=extractNumericValue(value,param.input_type==="int");} 363return value;}catch(e){return null;}} 364return Object.fromEntries(Object.entries(param).map(([k,v])=>[k,resolveParamValue(v,k)]).filter(([k,v])=>v!==null&&v!==undefined));} 365function extractNumericValue(value,isInt=false){if(value===null||value===undefined){return null;} 366if(isInt){return parseInt(value);} 367return parseFloat(value);} 368var dummyPinterest=function(){return{tag:function(){return"pinterest";},isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(name,data){return false;},onAdSenseEvent:function(event){},onClickEvent:function(params){},onWatchVideo:function(params){},onCommentEvent:function(){},onDownloadEvent:function(params){},onFormEvent:function(params){},onWooAddToCartOnButtonEvent:function(product_id){},onWooAddToCartOnSingleEvent:function(product_id,qty,is_variable,is_external,$form){},onWooRemoveFromCartEvent:function(cart_item_hash){},onWooAffiliateEvent:function(product_id){},onWooPayPalEvent:function(event){},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){},onEddRemoveFromCartEvent:function(item){},onPageScroll:function(event){},onTime:function(event){},}}();var dummyBing=function(){return{tag:function(){return"bing";},isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(name,data){return false;},onAdSenseEvent:function(){},onClickEvent:function(params){},onWatchVideo:function(params){},onCommentEvent:function(){},onFormEvent:function(params){},onDownloadEvent:function(params){},onWooAddToCartOnButtonEvent:function(product_id){},onWooAddToCartOnSingleEvent:function(product_id,qty,is_variable,is_external,$form){},onWooRemoveFromCartEvent:function(cart_item_hash){},onWooAffiliateEvent:function(product_id){},onWooPayPalEvent:function(){},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){},onEddRemoveFromCartEvent:function(item){},onPageScroll:function(event){},onTime:function(event){},}}();var dummyReddit=function(){return{tag:function(){return"reddit";},isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(name,data){return false;},onAdSenseEvent:function(event){},onClickEvent:function(params){},onWatchVideo:function(params){},onCommentEvent:function(event){},onFormEvent:function(params){},onDownloadEvent:function(params){},onWooAddToCartOnButtonEvent:function(product_id){},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,is_external,$form){},onWooRemoveFromCartEvent:function(cart_item_hash){},onWooAffiliateEvent:function(product_id){},onWooPayPalEvent:function(event){},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){},onEddRemoveFromCartEvent:function(item){},onPageScroll:function(event){},onTime:function(event){},}}();var Utils=function(options){var Pinterest=dummyPinterest;var Bing=dummyBing;var Reddit=dummyReddit;var gtag_loaded=false;var gtm_loaded=false;var gtm_consent_state_pushed=false;let isNewSession=checkSession();var pbidRequest=null;var pbidSettled=false;var PBID_WAIT_MS=1000;var utmTerms=['utm_source','utm_medium','utm_campaign','utm_term','utm_content'];var utmId=['fbadid','gadid','padid','bingid'];let dataLayerName='dataLayerPYS';let GTMdataLayerName='dataLayer';function validateEmail(email){var re=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return re.test(email);} 369function getDomain(url){url=url.replace(/(https?:\/\/)?(www.)?/i,'');if(url.indexOf('/')!==-1){return url.split('/')[0];} 370return url;} 371function loadPixels(){Utils.refreshAddonPixels();if(!options.gdpr.all_disabled_by_api){if(!options.gdpr.facebook_disabled_by_api){Facebook.loadPixel();} 372if(!options.gdpr.analytics_disabled_by_api){Analytics.loadPixel();} 373if(!options.gdpr.analytics_disabled_by_api){GTM.loadPixel();} 374if(!options.gdpr.pinterest_disabled_by_api){Pinterest.loadPixel();} 375if(!options.gdpr.bing_disabled_by_api){Bing.loadPixel();} 376if(!options.gdpr.openai_disabled_by_api){OpenAI.loadPixel();} 377if(!options.gdpr.reddit_disabled_by_api){Reddit.loadPixel();}} 378if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(typeof CS_Data.cs_google_analytics_consent_mode!=="undefined"&&CS_Data.cs_google_analytics_consent_mode==1){Analytics.loadPixel();}}} 379function checkSession(){if(Cookies.get('pys_start_session')===undefined||Cookies.get('pys_session_limit')===undefined){firstVisit=true;return true} 380return false} 381function getTrafficSource(){try{let referrer=stripUrlQuery(document.referrer.toString()),source;let direct=referrer.length===0;let internal=direct?false:referrer.indexOf(options.siteUrl)===0;let external=!direct&&!internal;if(external===false){source='direct';}else{source=referrer;} 382if(source!=='direct'){return getDomain(source);}else{return source;}}catch(e){console.error(e);return'direct';}} 383function getQueryVars(){try{var result={},tmp=[];window.location.search.substr(1).split("&").forEach(function(item){tmp=item.split('=');if(tmp.length>1){result[tmp[0]]=tmp[1];}});return result;}catch(e){console.error(e);return{};}} 384function getLandingPageValue(useCurrentUrlFallback=true){let name="pys_landing_page" 385if(options.visit_data_model==="last_visit"){name="last_pys_landing_page"} 386if(Cookies.get(name)&&Cookies.get(name)!=="undefined"){return Cookies.get(name);} 387if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics&&options.tracking_analytics.TrafficLanding){return options.tracking_analytics.TrafficLanding;} 388return useCurrentUrlFallback?window.location.href:"";} 389function getTrafficSourceValue(){let name="pysTrafficSource" 390if(options.visit_data_model==="last_visit"){name="last_pysTrafficSource"} 391if(Cookies.get(name)&&Cookies.get(name)!=="undefined"){return Cookies.get(name);} 392if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics&&options.tracking_analytics.TrafficSource){return options.tracking_analytics.TrafficSource;} 393return"";} 394function getUTMId(useLast=false){try{let cookiePrefix='pys_' 395let terms=[];if(useLast){cookiePrefix='last_pys_'} 396let queryVars=getQueryVars();$.each(utmId,function(index,name){if(Cookies.get(cookiePrefix+name)){terms[name]=Cookies.get(cookiePrefix+name)} 397else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics&&options.tracking_analytics.TrafficUtmsId&&options.tracking_analytics.TrafficUtmsId[name]){terms[name]=filterEmails(options.tracking_analytics.TrafficUtmsId[name])} 398else if(queryVars.hasOwnProperty(name)){terms[name]=filterEmails(queryVars[name])}});return terms;}catch(e){console.error(e);return[];}} 399function getUTMs(useLast=false){try{let cookiePrefix='pys_' 400if(useLast){cookiePrefix='last_pys_'} 401let terms=[];let queryVars=getQueryVars();$.each(utmTerms,function(index,name){if(Cookies.get(cookiePrefix+name)){let value=Cookie
401s.get(cookiePrefix+name);terms[name]=filterEmails(value);} 402else if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics&&options.tracking_analytics.TrafficUtms&&options.tracking_analytics.TrafficUtms[name]){terms[name]=filterEmails(options.tracking_analytics.TrafficUtms[name])} 403else if(queryVars.hasOwnProperty(name)){terms[name]=filterEmails(queryVars[name])}});return terms;}catch(e){console.error(e);return[];}} 404function getDateTime(){var dateTime=new Array();var date=new Date(),days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],months=['January','February','March','April','May','June','July','August','September','October','November','December'],hours=['00-01','01-02','02-03','03-04','04-05','05-06','06-07','07-08','08-09','09-10','10-11','11-12','12-13','13-14','14-15','15-16','16-17','17-18','18-19','19-20','20-21','21-22','22-23','23-24'];dateTime.push(hours[date.getHours()]);dateTime.push(days[date.getDay()]);dateTime.push(months[date.getMonth()]);return dateTime;} 405function filterEmails(value){return validateEmail(value)?undefined:value;} 406return{PRODUCT_SIMPLE:0,PRODUCT_VARIABLE:1,PRODUCT_BUNDLE:2,PRODUCT_GROUPED:3,utmTerms:utmTerms,utmId:utmId,fireEventForAllPixel:function(functionName,events){Utils.refreshAddonPixels();if(events.hasOwnProperty(Facebook.tag())) 407Facebook[functionName](events[Facebook.tag()]);if(events.hasOwnProperty(Analytics.tag())) 408Analytics[functionName](events[Analytics.tag()]);if(events.hasOwnProperty(Pinterest.tag())) 409Pinterest[functionName](events[Pinterest.tag()]);if(events.hasOwnProperty(Bing.tag())) 410Bing[functionName](events[Bing.tag()]);if(events.hasOwnProperty(Reddit.tag())) 411Reddit[functionName](events[Reddit.tag()]);if(events.hasOwnProperty(GTM.tag())) 412GTM[functionName](events[GTM.tag()]);},refreshAddonPixels:function(){Pinterest=Utils.setupPinterestObject();Bing=Utils.setupBingObject();Reddit=Utils.setupRedditObject();},csModeEnabled:function(value){return Number(value)===1;},setupPinterestObject:function(){Pinterest=window.pys.Pinterest||Pinterest;return Pinterest;},setupBingObject:function(){Bing=window.pys.Bing||Bing;return Bing;},setupRedditObject:function(){Reddit=window.pys.Reddit||Reddit;return Reddit;},copyProperties:function(from,to){for(var key in from){if("function"==typeof from[key]){continue;} 413to[key]=from[key];} 414return to;},requestPbid:function(){if(!options.send_external_id||Cookies.get('pbid')||!Facebook.isEnabled()){return null;} 415if(!pbidRequest){pbidRequest=jQuery.ajax({url:options.ajaxUrl,dataType:'json',data:{action:'pys_get_pbid'},success:function(res){if(res.data&&res.data.pbid!=false){if(!(options.cookie.disabled_all_cookie||options.cookie.externalID_disabled_by_api)){var expires=parseInt(options.external_id_expire||180);Cookies.set('pbid',res.data.pbid,{expires:expires,path:'/',domain:cookieDomain()});} 416if(options.hasOwnProperty('facebook')){options.facebook.advancedMatching={...options.facebook.advancedMatching,external_id:res.data.pbid};}}}}).always(function(){pbidRequest=null;});} 417return pbidRequest;},holdForIdentity:function(fn){if(pbidSettled||!options.send_external_id||Cookies.get('pbid')){return false;} 418if(options.dynamicDataUrl&&options.facebook&&options.facebook.advancedMatching&&options.facebook.advancedMatching.external_id){return false;} 419var request=Utils.requestPbid();if(!request){return false;} 420var done=false;var finish=function(){if(done){return;} 421done=true;pbidSettled=true;fn();};request.always(finish);setTimeout(finish,PBID_WAIT_MS);return true;},manageCookies:function(){if(typeof options.cookie==='undefined'){return;} 422if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){if(Cookiebot.consented===false&&!Cookiebot.consent['marketing']&&!Cookiebot.consent['statistics']){return;}} 423let cm_consent_not_expressed=false;if(options.gdpr.consent_magic_integration_enabled&&window.CS_Data!==undefined&&window.CS_Data.cs_refresh_after_consent==1){if(Cookies.get('cs_viewed_cookie_policy')===undefined){cm_consent_not_expressed=true;}} 424if(!cm_consent_not_expressed&&!options.cookie.disabled_all_cookie){reportCookieDomain(cookieDomain());} 425if(!cm_consent_not_expressed&&isNewSession&&!options.cookie.disabled_all_cookie&&!options.cookie.disabled_start_session_cookie){let duration=options.last_visit_duration*60000 426var now=new Date();now.setTime(now.getTime()+duration);Cookies.set('pys_session_limit',true,{expires:now,path:'/',domain:cookieDomain()}) 427Cookies.set('pys_start_session',true,{path:'/',domain:cookieDomain()});} 428if(!Cookies.get('pbid')){Utils.requestPbid();}
428else if(Facebook.isEnabled()){if(Facebook.advancedMatching()&&Facebook.advancedMatching().external_id&&!(options.cookie.disabled_all_cookie||options.cookie.externalID_disabled_by_api)){let expires=parseInt(options.external_id_expire||180);Cookies.set('pbid',Facebook.advancedMatching().external_id,{expires:expires,path:'/',domain:cookieDomain()});}} 429let expires=parseInt(options.cookie_duration);let queryVars=getQueryVars();let landing=window.location.href.split('?')[0];try{if(Cookies.get('pys_first_visit')===undefined&&(!options.cookie.disabled_all_cookie)){if(!options.cookie.disabled_first_visit_cookie) 430{Cookies.set('pys_first_visit',true,{expires:expires,path:'/',domain:cookieDomain()});} 431else{Cookies.remove('pys_first_visit',{path:'/',domain:cookieDomain()})} 432if(!options.cookie.disabled_trafficsource_cookie) 433{Cookies.set('pysTrafficSource',getTrafficSource(),{expires:expires,path:'/',domain:cookieDomain()});} 434else{Cookies.remove('pysTrafficSource',{path:'/',domain:cookieDomain()})} 435if(!options.cookie.disabled_landing_page_cookie) 436{Cookies.set('pys_landing_page',landing,{expires:expires,path:'/',domain:cookieDomain()});} 437else{Cookies.remove('pys_landing_page',{path:'/',domain:cookieDomain()})} 438if(!options.cookie.disabled_utmTerms_cookie) 439{$.each(utmTerms,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('pys_'+name,queryVars[name],{expires:expires,path:'/',domain:cookieDomain()});}else{Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})}});} 440else{$.each(utmTerms,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})});} 441if(!options.cookie.disabled_utmId_cookie) 442{$.each(utmId,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('pys_'+name,queryVars[name],{expires:expires,path:'/',domain:cookieDomain()});}else{Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})}})} 443else{$.each(utmId,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})});}} 444if(isNewSession&&(!options.cookie.disabled_all_cookie)){if(!options.cookie.disabled_trafficsource_cookie) 445{Cookies.set('last_pysTrafficSource',getTrafficSource(),{expires:expires,path:'/',domain:cookieDomain()});} 446else{Cookies.remove('last_pysTrafficSource',{path:'/',domain:cookieDomain()})} 447if(!options.cookie.disabled_landing_page_cookie) 448{Cookies.set('last_pys_landing_page',landing,{expires:expires,path:'/',domain:cookieDomain()});} 449else{Cookies.remove('last_pys_landing_page',{path:'/',domain:cookieDomain()})} 450if(!options.cookie.disabled_utmTerms_cookie) 451{$.each(utmTerms,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('last_pys_'+name,queryVars[name],{expires:expires,path:'/',domain:cookieDomain()});}else{Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})}});} 452else{$.each(utmTerms,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});} 453if(!options.cookie.disabled_utmId_cookie) 454{$.each(utmId,function(index,name){if(queryVars.hasOwnProperty(name)){Cookies.set('last_pys_'+name,queryVars[name],{expires:expires,path:'/',domain:cookieDomain()});}else{Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})}})} 455else{$.each(utmId,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});}} 456if(options.cookie.disabled_start_session_cookie){Cookies.remove('pys_start_session',{path:'/',domain:cookieDomain()}) 457Cookies.remove('pys_session_limit',{path:'/',domain:cookieDomain()})} 458if(options.cookie.disabled_all_cookie) 459{Cookies.remove('pys_first_visit',{path:'/',domain:cookieDomain()}) 460Cookies.remove('pysTrafficSource',{path:'/',domain:cookieDomain()}) 461Cookies.remove('pys_landing_page',{path:'/',domain:cookieDomain()}) 462Cookies.remove('last_pys_landing_page',{path:'/',domain:cookieDomain()}) 463Cookies.remove('last_pysTrafficSource',{path:'/',domain:cookieDomain()}) 464Cookies.remove('pys_start_session',{path:'/',domain:cookieDomain()}) 465Cookies.remove('pys_session_limit',{path:'/',domain:cookieDomain()}) 466$.each(Utils.utmTerms,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})});$.each(Utils.utmId,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})}) 467$.each(Utils.utmTerms,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});$.each(Utils.utmId,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});}}catch(e){console.error(e);}},isMetaEnabledCapiPixel:function(pixelId){var pixels=options.facebook&&options.facebook.metaEnabledCapiPixels;return Array.isArray(pixels)&&pixels.indexOf(pixelId)!==-1;},generateUniqueId:function(event){if(event.eventID.length==0||(event.type=="static"&&options.ajaxForServerStaticEvent)||(event.type!=="static"&&options.ajaxForServerEvent)){let idKey=event.hasOwnProperty('custom_event_post_id')?event.custom_event_post_id:event.e_id;if(!uniqueId.hasOwnProperty(idKey)){uniqueId[idKey]=pys_generate_token();} 468return uniqueId[idKey];} 469else if(event.eventID.length!==0) 470{return event.eventID;}},flattenObject:function(obj,prefix='',res={}){for(const[key,value]of Object.entries(obj)){const prefixedKey=prefix?(Array.isArray(obj)?`${prefix}[${key}]`:`${prefix}[${key}]`):key;if(value!==null&&typeof value==='object'&&!(value instanceof File)){this.flattenObject(value,prefixedKey,res);}else{res[prefixedKey]=value;}} 471return res;},sendServerAjaxRequest:function(url,data){if(data.action==='pys_api_event'&&data.pixel==='facebook'&&window.pysFacebookRest){this.sendRestAPIRequest(data,'facebook');return;} 472if(data.action==='pys_openai_api_event'&&window.pysOpenAIRest){this.sendRestAPIRequest(data,'openai');return;} 473if(options.useSendBeacon&&navigator.sendBeacon){try{const flattenedData=this.flattenObject(data);const formData=new URLSearchParams();
473for(const[key,value]of Object.entries(flattenedData)){if(value!==null&&value!==undefined){formData.append(key,value);}} 474const success=navigator.sendBeacon(url,formData);if(success){return;}}catch(e){if(options.debug){console.log('PYS: sendBeacon failed, falling back to jQuery.ajax:',e);}}} 475jQuery.ajax({type:'POST',url:url,data:data,headers:{'Cache-Control':'no-cache'},success:function(){},});},sendRestAPIRequest:function(data,platform){let restApiUrl;switch(platform){case'facebook':restApiUrl=window.pysFacebookRest?window.pysFacebookRest.restApiUrl:'/wp-json/pys-facebook/v1/event';break;case'openai':restApiUrl=window.pysOpenAIRest?window.pysOpenAIRest.restApiUrl:'/wp-json/pys-openai/v1/event';break;default:console.error('PYS: Unknown platform for REST API:',platform);this.sendAjaxFallback(data);return;} 476const restApiData={event:data.event,event_slug:data.event_slug||'',data:JSON.stringify(data.data||{}),ids:JSON.stringify(data.ids||[]),eventID:data.event_id||data.eventID||'',woo_order:data.woo_order||'0',edd_order:data.edd_order||'0',order_key:data.order_key||''};const forwardedReferrer=data.referrer_url||pageReferrer;if(forwardedReferrer){restApiData.referrer_url=forwardedReferrer;} 477restApiData.event_source_url=data.url||window.location.href;if(options.useSendBeacon&&navigator.sendBeacon){try{const formData=new URLSearchParams();for(const[key,value]of Object.entries(restApiData)){formData.append(key,value);} 478if(navigator.sendBeacon(restApiUrl,formData)){return;}}catch(e){}} 479if(window.fetch){const headers={'Content-Type':'application/json'};fetch(restApiUrl,{method:'POST',headers:headers,body:JSON.stringify(restApiData)}).then(response=>{if(!response.ok){throw new Error(platform+' REST API request failed: '+response.status);}}).catch(error=>{if(options.debug){console.log('PYS: '+platform+' REST API failed, falling back to AJAX:',error);} 480this.sendAjaxFallback(data);});}else{this.sendAjaxFallback(data);}},sendAjaxFallback:function(data){jQuery.ajax({type:'POST',url:options.ajaxUrl,data:data,headers:{'Cache-Control':'no-cache'},success:function(){},});},clone:function(obj){var copy;if(null==obj||"object"!=typeof obj)return obj;if(obj instanceof Date){copy=new Date();copy.setTime(obj.getTime());return copy;} 481if(obj instanceof Array){copy=[];for(var i=0,len=obj.length;i<len;i++){if("function"==typeof obj[i]){continue;} 482copy[i]=Utils.clone(obj[i]);} 483return copy;} 484if(obj instanceof Object){copy={};for(var attr in obj){if(obj.hasOwnProperty(attr)){if("function"==typeof obj[attr]){continue;} 485copy[attr]=Utils.clone(obj[attr]);}} 486return copy;} 487return obj;},getTagsAsArray:function(tag){return[].slice.call(document.getElementsByTagName(tag));}
487,getRequestParams:function(){return[];},setupMouseOverClickEvents:function(eventId,triggers){document.addEventListener('mouseover',function(event){var matchedElements=Array.from(document.querySelectorAll(triggers));var clickedElement=event.target;var closestMatch=clickedElement.closest(triggers);if(matchedElements.includes(clickedElement)||closestMatch){if(event.target.classList.contains('pys-mouse-over-'+eventId)){return true;}else{event.target.classList.add('pys-mouse-over-'+eventId);} 488Utils.fireTriggerEvent(eventId);}});},setupCSSClickEvents:function(eventId,triggers){document.addEventListener('click',function(event){let matchedElements=Array.from(document.querySelectorAll(triggers)),clickedElement=event.target,closestMatch=clickedElement.closest(triggers);if(matchedElements.includes(clickedElement)||closestMatch){Utils.fireTriggerEvent(eventId);}},true);},setupURLClickEvents:function(){if(!options.triggerEventTypes.hasOwnProperty('url_click')){return;} 489$('a[data-pys-event-id]').onFirst('click',function(evt){$(this).attr('data-pys-event-id').split(',').forEach(function(eventId){eventId=parseInt(eventId);if(isNaN(eventId)===false){Utils.fireTriggerEvent(eventId);}});});},setupScrollPosEvents:function(eventId,triggers){var scrollPosThresholds={},docHeight=$(document).height()-$(window).height();$.each(triggers,function(index,scrollPos){scrollPos=docHeight*scrollPos/100;scrollPos=Math.round(scrollPos);scrollPosThresholds[scrollPos]=eventId;});$(document).on("scroll",function(){var scrollPos=$(window).scrollTop();$.each(scrollPosThresholds,function(threshold,eventId){if(scrollPos<=threshold){return true;} 490if(eventId===null){return true;}else{scrollPosThresholds[threshold]=null;} 491Utils.fireTriggerEvent(eventId);});});},setupCommentEvents:function(eventId,triggers){$('form.comment-form').on("submit",function(){Utils.fireTriggerEvent(eventId);});},fireTriggerEvent:function(eventId){if(!options.triggerEvents.hasOwnProperty(eventId)){return;} 492var event={};var events=options.triggerEvents[eventId];if(events.hasOwnProperty('facebook')){event=Utils.getFormFilledData(events.facebook);Facebook.fireEvent(event.name,event);} 493if(events.hasOwnProperty('ga')){event=Utils.getFormFilledData(events.ga);Analytics.fireEvent(event.name,event);} 494if(events.hasOwnProperty('pinterest')){event=Utils.getFormFilledData(events.pinterest);Pinterest.fireEvent(event.name,event);} 495if(events.hasOwnProperty('bing')){event=Utils.getFormFilledData(events.bing);Bing.fireEvent(event.name,event);} 496if(events.hasOwnProperty('reddit')){event=Utils.getFormFilledData(events.reddit);Reddit.fireEvent(event.name,event);} 497if(events.hasOwnProperty('openai')){event=Utils.getFormFilledData(events.openai);OpenAI.fireEvent(event.name,event);} 498if(events.hasOwnProperty('gtm')){event=Utils.getFormFilledData(events.gtm);GTM.fireEvent(event.name,event);}},fireStaticEvents:function(pixel){Utils.refreshAddonPixels();if(options.staticEvents.hasOwnProperty(pixel)){$.each(options.staticEvents[pixel],function(eventName,events){$.each(events,function(index,eventData){eventData.fired=eventData.fired||false;if(!eventData.fired){eventData=Utils.getFormFilledData(eventData);var fired=false;if('facebook'===pixel){fired=Facebook.fireEvent(eventData.name,eventData);}else if('ga'===pixel){fired=Analytics.fireEvent(eventData.name,eventData);}else if('pinterest'===pixel){fired=Pinterest.fireEvent(eventData.name,eventData);}else if('bing'===pixel){fired=Bing.fireEvent(eventData.name,eventData);}else if('gtm'===pixel){fired=GTM.fireEvent(eventData.name,eventData);}else if('reddit'===pixel){fired=Reddit.fireEvent(eventData.name,eventData);}else if('openai'===pixel){fired=OpenAI.fireEvent(eventData.name,eventData);} 499eventData.fired=fired;}});});}},loadGoogleTag:function(id){if(!gtag_loaded){let dataLayerName=this.resolveGaDataLayerName();this.dataLayerName=dataLayerName;(function(window,document,src){var a=document.createElement('script'),m=document.getElementsByTagName('script')[0];a.async=1;a.src=src;m.parentNode.insertBefore(a,m);})(window,document,'//www.googletagmanager.com/gtag/js?id='+id+'&l='+this.dataLayerName);window[dataLayerName]=window[dataLayerName]||[];window.gtag=window.gtag||function gtag(){window[dataLayerName].push(arguments);};if(options.google_consent_mode){let data=this.resolveConsentValues();this.pushConsent(dataLayerName,this.layerHasConsentDefault(dataLayerName)?'update':'default',data);} 500Utils.gtagPush('js',new Date());gtag_loaded=true;}},resolveGaDataLayerName:function(){if(options.hasOwnProperty('GATags')){switch(options.GATags.ga_datalayer_type){case'default':return'dataLayerPYS';case'custom':return options.GATags.ga_datalayer_name;default:return'dataLayer';}} 501return this.dataLayerName||'dataLayer';},resolveGtmDataLayerName:function(){var name=options.hasOwnProperty('gtm')?options.gtm.gtm_dataLayer_name:'';return(typeof name==='string'&&name.length)?name:'dataLayer';},gtagPush:function(){var name=this.dataLayerName||this.resolveGaDataLayerName();window[name]=window[name]||[];window[name].push(arguments);},hasSendToTarget:function(target){if(Array.isArray(target)){return target.length>0;} 502return typeof target==='string'&&target!=='';},loadDefaultConsent:function(){this.gtagPush.apply(this,arguments);},pushConsent:function(layerName,command,values){if(!layerName){return;} 503window[layerName]=window[layerName]||[];(function(){window[layerName].push(arguments);})('consent',command,values);},layerHasConsentDefault:function(layerName){var layer=window[layerName];if(!layer||typeof layer.length!=='number'){return false;} 504for(var i=0;i<layer.length;i++){var item=layer[i];if(item&&item[0]==='consent'&&item[1]==='default'){return true;}} 505return false;},resolveConsentValues:function(){return{'analytics_storage':options.gdpr.analytics_storage.enabled?options.gdpr.analytics_storage.value:'granted','ad_storage':options.gdpr.ad_storage.enabled?options.gdpr.ad_storage.value:'granted','ad_user_data':options.gdpr.ad_user_data.enabled?options.gdpr.ad_user_data.value:'granted','ad_personalization':options.gdpr.ad_personalization.enabled?options.gdpr.ad_personalization.value:'granted',};},loadGTMScript:function(id=''){const domain=(options.gtm.gtm_container_domain??'www.googletagmanager.com').replace(/\/$/,'');const loader=options.gtm.gtm_container_identifier??'gtm';const gtm_auth=options.gtm.gtm_auth??'';const gtm_preview=options.gtm.gtm_preview??'';const datalayer_name=this.resolveGtmDataLayerName();window[datalayer_name]=window[datalayer_name]||[];window.gtag=window.gtag||function gtag(){window[datalayer_name].push(arguments);};this.pushGTMConsentState(datalayer_name);(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});const f=d.getElementsByTagName(s)[0];const j=d.createElement(s);const dl=l!=='dataLayer'?'&l='+l:'';j.async=true;const isNewFormat=domain.startsWith('http://')||domain.startsWith('https://')||domain.startsWith('/');
505if(!isNewFormat){j.src='https://'+domain+'/'+loader+'.js?id='+i+dl;}else{const hasExtension=loader.includes('.');j.src=domain+'/'+loader+(hasExtension?'?':'/?')+'id='+i+dl;} 506if(gtm_auth&>m_preview){j.src+='>m_auth='+gtm_auth+'>m_preview='+gtm_preview+'>m_cookies_win=x';} 507f.parentNode.insertBefore(j,f);})(window,document,'script',datalayer_name,id);},loadDefaultGTMConsent:function(){window[this.GTMdataLayerName]=window[this.GTMdataLayerName]||[];window[this.GTMdataLayerName].push(arguments);},pushGTMConsentDefaults:function(datalayer_name){this.pushGTMConsentState(datalayer_name);},pushGTMConsentState:function(datalayer_name){if(!options.google_consent_mode||gtm_consent_state_pushed){return;} 508if(options.consent_mode_cmp_active){return;} 509gtm_consent_state_pushed=true;this.GTMdataLayerName=datalayer_name;this.pushConsent(datalayer_name,this.layerHasConsentDefault(datalayer_name)?'update':'default',this.resolveConsentValues());},loadPixels:function(){if(options.gdpr.ajax_enabled&&!options.gdpr.consent_magic_integration_enabled){$.get({url:options.ajaxUrl,dataType:'json',data:{action:'pys_get_gdpr_filters_values'},success:function(res){if(res.success){options.gdpr.all_disabled_by_api=res.data.all_disabled_by_api;options.gdpr.facebook_disabled_by_api=res.data.facebook_disabled_by_api;options.gdpr.analytics_disabled_by_api=res.data.analytics_disabled_by_api;options.gdpr.google_ads_disabled_by_api=res.data.google_ads_disabled_by_api;options.gdpr.pinterest_disabled_by_api=res.data.pinterest_disabled_by_api;options.gdpr.bing_disabled_by_api=res.data.bing_disabled_by_api;options.gdpr.reddit_disabled_by_api=res.data.reddit_disabled_by_api;options.gdpr.openai_disabled_by_api=res.data.openai_disabled_by_api;options.cookie.externalID_disabled_by_api=res.data.externalID_disabled_by_api;options.cookie.disabled_all_cookie=res.data.disabled_all_cookie;options.cookie.disabled_advanced_form_data_cookie=res.data.disabled_advanced_form_data_cookie;options.cookie.disabled_landing_page_cookie=res.data.disabled_landing_page_cookie;options.cookie.disabled_first_visit_cookie=res.data.disabled_first_visit_cookie;options.cookie.disabled_trafficsource_cookie=res.data.disabled_trafficsource_cookie;options.cookie.disabled_utmTerms_cookie=res.data.disabled_utmTerms_cookie;options.cookie.disabled_utmId_cookie=res.data.disabled_utmId_cookie;} 510loadPixels();}});}else{loadPixels();}},consentGiven:function(pixel){if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){let test_prefix=CS_Data.test_prefix;if((Utils.csModeEnabled(CS_Data.cs_google_consent_mode_enabled)&&(pixel=='analytics'||pixel=='google_ads'))||(Utils.csModeEnabled(CS_Data.cs_meta_ldu_mode)&&pixel=='facebook')||(Utils.csModeEnabled(CS_Data.cs_reddit_ldu_mode)&&pixel=='reddit')||(Utils.csModeEnabled(CS_Data.cs_openai_opt_out_mode)&&pixel=='openai')||(Utils.csModeEnabled(CS_Data.cs_bing_consent_mode?.ad_storage?.enabled)&&pixel=='bing')){if(Number(CS_Data.cs_cache_enabled)===0||(Utils.csModeEnabled(CS_Data.cs_cache_enabled)&&window.CS_Cache&&window.CS_Cache.check_status)){return true;}else{return false;}} 511if(pixel=='facebook'&&(CS_Data.cs_script_cat.facebook==0||CS_Data.cs_script_cat.facebook==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='bing'&&(CS_Data.cs_script_cat.bing==0||CS_Data.cs_script_cat.bing==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='analytics'&&(CS_Data.cs_script_cat.analytics==0||CS_Data.cs_script_cat.analytics==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='google_ads'&&(CS_Data.cs_script_cat.gads==0||CS_Data.cs_script_cat.gads==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='pinterest'&&(CS_Data.cs_script_cat.pinterest==0||CS_Data.cs_script_cat.pinterest==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='tiktok'&&(CS_Data.cs_script_cat.tiktok==0||CS_Data.cs_script_cat.tiktok==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='reddit'&&(CS_Data.cs_script_cat?.reddit==0||CS_Data.cs_script_cat?.reddit==CS_Data.cs_necessary_cat_id)){return true;}else if(pixel=='openai'&&(CS_Data.cs_script_cat?.openai==0||CS_Data.cs_script_cat?.openai==CS_Data.cs_necessary_cat_id)){return true;} 512let substring="cs_enabled_cookie_term",theCookies=document.cookie.split(';');for(let i=1;i<=theCookies.length;i++){if(theCookies[i-1].indexOf(substring)!==-1){let categoryCookie=theCookies[i-1].replace('cs_enabled_cookie_term'+test_prefix+'_','');categoryCookie=Number(categoryCookie.replace(/\D+/g,""));let cs_cookie_val=Cookies.get('cs_enabled_cookie_term'+test_prefix+'_'+categoryCookie);if(categoryCookie===CS_Data.cs_script_cat.facebook&&pixel=='facebook'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat.bing&&pixel=='bing'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat.analytics&&pixel=='analytics'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat.gads&&pixel=='google_ads'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat.pinterest&&pixel=='pinterest'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat.tiktok&&pixel=='tiktok'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat?.reddit&&pixel=='reddit'){return cs_cookie_val=='yes';}else if(categoryCookie===CS_Data.cs_script_cat?.openai&&pixel=='openai'){return cs_cookie_val=='yes';}}} 513return false;} 514if(options.gdpr.real_cookie_banner_integration_enabled){var consentApi=window.consentApi;if(consentApi){switch(pixel){case"analytics":return consentApi.consentSync("http","_ga","*").cookieOptIn;case"facebook":return consentApi.consentSync("http","_fbp","*").cookieOptIn;case"pinterest":return consentApi.consentSync("http","_pinterest_sess",".pinterest.com").cookieOptIn;default:return true;}}} 515if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){var cookiebot_consent_category=options.gdpr['cookiebot_'+pixel+'_consent_category'];
515if(options.gdpr[pixel+'_prior_consent_enabled']){if(Cookiebot.consented===true||Cookiebot.consent[cookiebot_consent_category]){return true;}}else{if(Cookiebot.consent[cookiebot_consent_category]){return true;}} 516return false;} 517if(options.gdpr.cookie_notice_integration_enabled&&typeof cnArgs!=='undefined'){var cn_cookie=Cookies.get(cnArgs.cookieName);if(options.gdpr[pixel+'_prior_consent_enabled']){if(typeof cn_cookie==='undefined'||cn_cookie==='true'){return true;}}else{if(cn_cookie==='true'){return true;}} 518return false;} 519if(options.gdpr.cookie_law_info_integration_enabled){var cli_cookie=Cookies.get('cookieyes-consent')??Cookies.get('wt_consent')??Cookies.get('viewed_cookie_policy');if(options.gdpr[pixel+'_prior_consent_enabled']){if(typeof cli_cookie==='undefined')return true;if(cli_cookie&&(cli_cookie===Cookies.get('cookieyes-consent')||cli_cookie===Cookies.get('wt_consent'))){if(getCookieYes('analytics')==='yes'){return true;}}else if(cli_cookie&&cli_cookie===Cookies.get('viewed_cookie_policy')){if(Cookies.get('viewed_cookie_policy')==='yes'){return true;}}}else{if(cli_cookie&&(cli_cookie===Cookies.get('cookieyes-consent')||cli_cookie===Cookies.get('wt_consent'))){if(getCookieYes('analytics')==='yes'){return true;}}else if(cli_cookie&&cli_cookie===Cookies.get('viewed_cookie_policy')){if(Cookies.get('viewed_cookie_policy')==='yes'){return true;}}} 520return false;} 521return true;},setupGdprCallbacks:function(){if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){let test_prefix=CS_Data.test_prefix,cs_refresh_after_consent=false,substring="cs_enabled_cookie_term";if(CS_Data.cs_refresh_after_consent==1){cs_refresh_after_consent=CS_Data.cs_refresh_after_consent;} 522let consent_actions=function(){let theCookies=document.cookie.split(';');let consent={facebook:true,ga:true,google_ads:true,tiktok:true,bing:true,pinterest:true,gtm:true,reddit:true,};for(let i=1;i<=theCookies.length;i++){if(theCookies[i-1].indexOf(substring)!==-1){let categoryCookie=theCookies[i-1].replace('cs_enabled_cookie_term'+test_prefix+'_','');categoryCookie=Number(categoryCookie.replace(/\D+/g,""));let cs_cookie_val=Cookies.get('cs_enabled_cookie_term'+test_prefix+'_'+categoryCookie);if(cs_cookie_val=='yes'){if((categoryCookie===CS_Data.cs_script_cat.facebook)||Utils.csModeEnabled(CS_Data.cs_meta_ldu_mode)){Facebook.loadPixel();} 523if(categoryCookie===CS_Data.cs_script_cat.bing||Utils.csModeEnabled(CS_Data.cs_bing_consent_mode?.ad_storage?.enabled)){Bing.loadPixel();} 524if(categoryCookie===CS_Data.cs_script_cat.analytics||(typeof CS_Data.cs_google_analytics_consent_mode!=="undefined"&&CS_Data.cs_google_analytics_consent_mode==1)){Analytics.loadPixel();} 525if(categoryCookie===CS_Data.cs_script_cat.pinterest){Pinterest.loadPixel();} 526if((categoryCookie===CS_Data.cs_script_cat.reddit)||Utils.csModeEnabled(CS_Data.cs_reddit_ldu_mode)){Reddit.loadPixel();} 527if((categoryCookie===CS_Data.cs_script_cat.openai)||Utils.csModeEnabled(CS_Data.cs_openai_opt_out_mode)){OpenAI.loadPixel();}}else{if((categoryCookie===CS_Data.cs_script_cat.facebook)&&!Utils.csModeEnabled(CS_Data.cs_meta_ldu_mode)){Facebook.disable();consent.facebook=false;} 528if(categoryCookie===CS_Data.cs_script_cat.bing&&!Utils.csModeEnabled(CS_Data.cs_bing_consent_mode?.ad_storage?.enabled)){Bing.disable();consent.bing=false;} 529if(categoryCookie===CS_Data.cs_script_cat.analytics&&(typeof CS_Data.cs_google_analytics_consent_mode=="undefined"||CS_Data.cs_google_analytics_consent_mode==0)){Analytics.disable();consent.ga=false;consent.gtm=false;} 530if(categoryCookie===CS_Data.cs_script_cat.pinterest){Pinterest.disable();consent.pinterest=false;} 531if((categoryCookie===CS_Data.cs_script_cat.reddit)&&!Utils.csModeEnabled(CS_Data.cs_reddit_ldu_mode)){Reddit.disable();consent.reddit=false;} 532if((categoryCookie===CS_Data.cs_script_cat.openai)&&!Utils.csModeEnabled(CS_Data.cs_openai_opt_out_mode)){OpenAI.disable();consent.openai=false;} 533if(categoryCookie===CS_Data.cs_script_cat?.openai){OpenAI.disable();consent.openai=false;}} 534if(Cookies.get('cs_enabled_advanced_matching')=='yes'){Facebook.loadPixel();}}} 535Utils.setupGDPRData(consent);} 536if(!cs_refresh_after_consent){consent_actions();$(document).on('click','.cs_action_btn',function(e){e.preventDefault();let consent={facebook:true,ga:true,bing:true,pinterest:true,gtm:true,reddit:true,};let elm=$(this),button_action=elm.attr('data-cs_action');if(button_action==='allow_all'){Facebook.loadPixel();Bing.loadPixel();Analytics.loadPixel();Pinterest.loadPixel();Reddit.loadPixel();consent.facebook=true;consent.bing=true;consent.ga=true;consent.pinterest=true;consent.reddit=true;consent.gtm=true;Utils.setupGDPRData(consent);}else if(button_action==='disable_all'){if(!Utils.csModeEnabled(CS_Data.cs_meta_ldu_mode)){Facebook.disable();consent.facebook=false;} 537if(!Utils.csModeEnabled(CS_Data.cs_bing_consent_mode?.ad_storage?.enabled)){Bing.disable();consent.bing=false;} 538if(CS_Data.cs_google_analytics_consent_mode==0||typeof CS_Data.cs_google_analytics_consent_mode=="undefined"){Analytics.disable();consent.ga=false;consent.gtm=false;} 539if(!Utils.csModeEnabled(CS_Data.cs_reddit_ldu_mode)){Reddit.disable();consent.reddit=false;} 540Pinterest.disable();consent.pinterest=false;OpenAI.disable();consent.openai=false;Utils.setupGDPRData(consent);}else if(button_action==='cs_confirm'){consent_actions();}});}} 541if(options.gdpr.real_cookie_banner_integration_enabled){let consentApi=window.consentApi;if(consentApi){consentApi.consent("http","_ga","*").then(Analytics.loadPixel.bind(Analytics),Analytics.disable.bind(Analytics));consentApi.consent("http","_fbp","*").then(Facebook.loadPixel.bind(Facebook),Facebook.disable.bind(Facebook));consentApi.consent("http","_pinterest_sess",".pinterest.com").then(Pinterest.loadPixel.bind(Pinterest),Pinterest.disable.bind(Pinterest));consentApi.consent("http","_uetsid","*").then(Bing.loadPixel.bind(Bing),Bing.disable.bind(Bing));let consent={facebook:true,ga:true,bing:true,pinterest:true,gtm:true,};if(!consentApi.consentSync("http","_ga","*").cookieOptIn){consent.ga=false;consent.gtm=false;} 542if(!consentApi.consentSync("http","_fbp","*").cookieOptIn){consent.facebook=false;} 543if(!consentApi.consentSync("http","_pinterest_sess",".pinterest.com").cookieOptIn){consent.pinterest=false;} 544if(!consentApi.consentSync("http","_uetsid","*").cookieOptIn){consent.bing=false;} 545Utils.setupGDPRData(consent);}} 546if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){window.addEventListener("CookiebotOnConsentReady",function(){let consent={facebook:true,ga:true,bing:true,pinterest:true,gtm:true,};Utils.manageCookies();if(Cookiebot.consent.marketing){Facebook.loadPixel();Bing.loadPixel();Pinterest.loadPixel();consent.facebook=true;consent.bing=true;consent.pinterest=true;} 547if(Cookiebot.consent.statistics){Analytics.loadPixel();consent.ga=true;consent.gtm=true;} 548if(!Cookiebot.consent.marketing){Facebook.disable();Pinterest.disable();Bing.disable();consent.facebook=false;consent.bing=false;consent.pinterest=false;} 549if(!Cookiebot.consent.statistics){Analytics.disable();consent.ga=false;consent.gtm=false;} 550Utils.setupGDPRData(consent);});} 551if(options.gdpr.cookie_notice_integration_enabled){$(document).onFirst('click','.cn-set-cookie',function(){let consent={};
551if($(this).data('cookie-set')==='accept'){Facebook.loadPixel();Analytics.loadPixel();Pinterest.loadPixel();Bing.loadPixel();consent={facebook:true,ga:true,bing:true,pinterest:true,gtm:true,};}else{Facebook.disable();Analytics.disable();Pinterest.disable();Bing.disable();consent={facebook:false,ga:false,bing:false,pinterest:false,gtm:false,};} 552Utils.setupGDPRData(consent);});$(document).onFirst('click','.cn-revoke-cookie',function(){Facebook.disable();Analytics.disable();Pinterest.disable();Bing.disable();let consent={facebook:false,ga:false,bing:false,pinterest:false,gtm:false,};Utils.setupGDPRData(consent);});} 553if(options.gdpr.cookie_law_info_integration_enabled){$(document).onFirst('click','#wt-cli-accept-all-btn,#cookie_action_close_header, .cky-btn-accept',function(){setTimeout(function(){let cli_cookie=Cookies.get('cookieyes-consent')??Cookies.get('wt_consent')??Cookies.get('viewed_cookie_policy');if(typeof cli_cookie!=='undefined'){if(cli_cookie===Cookies.get('cookieyes-consent')||cli_cookie===Cookies.get('wt_consent')){if(getCookieYes('analytics')==='yes'){Utils.manageCookies();}}else if(cli_cookie===Cookies.get('viewed_cookie_policy')&&cli_cookie=='yes'){Utils.manageCookies();}}},1000) 554Facebook.loadPixel();Analytics.loadPixel();Pinterest.loadPixel();Bing.loadPixel();let consent={facebook:true,ga:true,bing:true,pinterest:true,gtm:true,};Utils.setupGDPRData(consent);});$(document).onFirst('click','#cookie_action_close_header_reject, .cky-btn-reject',function(){Facebook.disable();Analytics.disable();Pinterest.disable();Bing.disable();let consent={facebook:false,ga:false,bing:false,pinterest:false,gtm:false,};Utils.setupGDPRData(consent);});}},setupGDPRData:function(consent){consent=window.btoa(JSON.stringify(consent));Cookies.set('pys_consent',consent,{expires:365,path:'/',domain:cookieDomain()});},getLinkExtension:function(link){link=link.substring(0,(link.indexOf("#")===-1)?link.length:link.indexOf("#"));link=link.substring(0,(link.indexOf("?")===-1)?link.length:link.indexOf("?"));link=link.substring(link.lastIndexOf("/")+1,link.length);if(link.length>0&&link.indexOf('.')!==-1){link=link.substring(link.indexOf(".")+1);return link;}else{return"";}},getLinkFilename:function(link){link=link.substring(0,(link.indexOf("#")===-1)?link.length:link.indexOf("#"));link=link.substring(0,(link.indexOf("?")===-1)?link.length:link.indexOf("?"));link=link.substring(link.lastIndexOf("/")+1,link.length);if(link.length>0&&link.indexOf('.')!==-1){return link;}else{return"";}},isCheckoutPage:function(){return $('body').hasClass('woocommerce-checkout')||document.querySelector('.woocommerce-checkout')||$('body').hasClass('edd-checkout');},addCheckoutFields:function(){var utm="";var utms=getUTMs() 555$.each(utmTerms,function(index,name){if(index>0){utm+="|";} 556utm+=name+":"+utms[name];});var utmIdList="";var utmsIds=getUTMId() 557$.each(utmId,function(index,name){if(index>0){utmIdList+="|";} 558utmIdList+=name+":"+utmsIds[name];});var utmIdListLast="";var utmsIdsLast=getUTMId(true) 559$.each(utmId,function(index,name){if(index>0){utmIdListLast+="|";} 560utmIdListLast+=name+":"+utmsIdsLast[name];});var utmLast="";var utmsLast=getUTMs(true) 561$.each(utmTerms,function(index,name){if(index>0){utmLast+="|";} 562utmLast+=name+":"+utmsLast[name];});var dateTime=getDateTime();var landing=getLandingPageValue(false);var lastLanding=getLandingPageValue(false);var trafic=getTrafficSourceValue();var lastTrafic=getTrafficSourceValue();var $form=null;if($('body').hasClass('woocommerce-checkout')){$form=$("form.woocommerce-checkout");}else{$form=$("#edd_purchase_form");} 563var inputs={'pys_utm':utm,'pys_utm_id':utmIdList,'pys_browser_time':dateTime.join("|"),'pys_landing':landing,'pys_source':trafic,'pys_order_type':$(".wcf-optin-form").length>0?"wcf-optin":"normal",'last_pys_landing':lastLanding,'last_pys_source':lastTrafic,'last_pys_utm':utmLast,'last_pys_utm_id':utmIdListLast,} 564Object.keys(inputs).forEach(function(key,index){$form.append("<input type='hidden' name='"+key+"' value='"+inputs[key]+"' /> ");});},getAdvancedFormData:function(){let dataStr=Cookies.get("pys_advanced_form_data");if(dataStr===undefined){return{'first_name':"",'last_name':"",'email':"",'phone':""};}else{return JSON.parse(dataStr);}},AdvancedMatching:{normalizeEmail:function(value){if(typeof value!=='string'){return'';} 565var email=value.trim().toLowerCase();if(email.length===0||email.length>254){return'';} 566return/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(email)?email:'';},normalizePhone:function(value){if(typeof value!=='string'){return'';} 567var digits=value.replace(/[^0-9]/g,'');return digits.length>0?digits:'';},normalizeName:function(value){if(typeof value!=='string'||value.length>1024){return'';} 568return value.trim().toLowerCase();},cookieIdentity:function(){var data;try{data=Utils.getAdvancedFormData()||{};}catch(e){data={};} 569return{email:this.normalizeEmail(data.email||''),phone:this.normalizePhone(data.phone||''),first_name:this.normalizeName(data.first_name||''),last_name:this.normalizeName(data.last_name||'')};},merge:function(target,mapping,identity,persistency){if(!target||!mapping){return target;} 570identity=identity||this.cookieIdentity();if(typeof persistency==='undefined'){persistency=typeof options!=='undefined'?options.data_persistency:'';} 571var keepData=persistency==='keep_data';Object.keys(mapping).forEach(function(targetKey){var rule=mapping[targetKey];var value=identity[rule.field];if(typeof value!=='string'||value.length===0){return;} 572var hasServerValue=typeof target[targetKey]==='string'&&target[targetKey].length>0;if(hasServerValue&&!keepData){return;} 573if(rule.hash){if(typeof sha256!=='function'){return;} 574target[targetKey]=sha256(value);}else{target[targetKey]=value;}});return target;}},getFormFilledData:function(event){if(event.params&&Object.keys(event.params).length>
5740){Object.entries(event.params).forEach(([key,value])=>{const resolvedValue=resolveParamValue(value,key);if(resolvedValue!==null){event.params[key]=resolvedValue;} 575else{delete event.params[key];}});} 576return event;}};}(options);var Facebook=function(options){var defaultEventTypes=['PageView','ViewContent','Search','AddToCart','AddToWishlist','InitiateCheckout','AddPaymentInfo','Purchase','Lead','Subscribe','CustomizeProduct','FindLocation','StartTrial','SubmitApplication','Schedule','Contact','Donate'];var initialized=false;var fbValuePrefix=function(){var resolved=cookieDomain();var scope=resolved?String(resolved).replace(/^\./,''):'';if(!scope){try{scope=String(location.hostname||'');}catch(e){scope='';}} 577var dots=scope?scope.split('.').length-1:0;return'fb.'+dots+'.'+Date.now()+'.';};var genereateFbp=function(){return!Cookies.get('_fbp')?fbValuePrefix()+Math.floor(1000000000+Math.random()*9000000000):Cookies.get('_fbp');};var genereateFbc=function(){return getUrlParameter('fbclid')?fbValuePrefix()+getUrlParameter('fbclid'):''};var isApiDisabled=options.gdpr.all_disabled_by_api||options.gdpr.facebook_disabled_by_api||options.gdpr.cookiebot_integration_enabled||options.gdpr.consent_magic_integration_enabled||options.gdpr.cookie_notice_integration_enabled||options.gdpr.cookie_law_info_integration_enabled;function sendFbServerEvent(allData,name,params){let eventId=null;if(options.facebook.sendEventId){var isAtcFromHook=options.woo&&options.woo.addToCartCatchMethod==="add_cart_hook";if(options.facebook.serverApiEnabled&&allData.e_id==="woo_remove_from_cart"){Facebook.updateEventId(allData.name);allData.eventID=Facebook.getEventId(allData.name);}else if(options.facebook.serverApiEnabled&&allData.e_id==="woo_add_to_cart_on_button_click"&&isAtcFromHook){}else{allData.eventID=Utils.generateUniqueId(allData);if(Cookies.get('_fbp')){params._fbp=Cookies.get('_fbp');} 578if(Cookies.get('_fbc')){params._fbc=Cookies.get('_fbc');} 579if(options.facebook.serverApiEnabled&&(options.ajaxForServerEvent||isApiDisabled)){var json={action:'pys_api_event',pixel:'facebook',event:name,event_slug:allData.e_id,data:params,ids:options.facebook.pixelIds,eventID:allData.eventID,url:window.location.href,ajax_event:options.ajax_event};if(allData.hasOwnProperty('woo_order')){json['woo_order']=allData.woo_order;} 580if(allData.hasOwnProperty('edd_order')){json['edd_order']=allData.edd_order;} 581if(allData.hasOwnProperty('order_key')&&allData.order_key){json['order_key']=allData.order_key;} 582if(pageReferrer){json.referrer_url=pageReferrer;} 583if(allData.e_id==="automatic_event_internal_link"||allData.e_id==="automatic_event_outbound_link"){setTimeout(()=>Utils.sendServerAjaxRequest(options.ajaxUrl,json),500);}else if(allData.type!='static'){Utils.sendServerAjaxRequest(options.ajaxUrl,json);} 584if((allData.type=='static'&&options.ajaxForServerStaticEvent)||(allData.hasOwnProperty('ajaxFire')&&allData.ajaxFire)){Utils.sendServerAjaxRequest(options.ajaxUrl,json);}}} 585delete params._fbp;delete params._fbc;eventId=allData.eventID} 586return eventId;} 587function fireEvent(name,allData){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'facebook')){return;} 588var actionType=defaultEventTypes.includes(name)?'track':'trackCustom';var data=allData.params;var params={};var arg={};Utils.copyProperties(data,params);let eventId=sendFbServerEvent(allData,name,params) 589if("hCR"===name){return;} 590if(options.debug){console.log('[Facebook] '+name,params,"eventID",eventId);} 591if(eventId!=null){arg.eventID=eventId;} 592fbq(actionType,name,params,arg);} 593return{tag:function(){return"facebook";},isEnabled:function(){return options.hasOwnProperty('facebook');},disable:function(){initialized=false;},advancedMatching:function(){if(options.facebook.advancedMatchingEnabled){let advancedMatching={};if(Object.keys(options.facebook.advancedMatching).length>0){advancedMatching=options.facebook.advancedMatching;} 594Utils.AdvancedMatching.merge(advancedMatching,{em:{field:'email',hash:false},ph:{field:'phone',hash:false},fn:{field:'first_name',hash:false},ln:{field:'last_name',hash:false}});if(!advancedMatching.hasOwnProperty("external_id")){if(Cookies.get('pbid')||(options.hasOwnProperty('pbid')&&options.pbid)){advancedMatching["external_id"]=Cookies.get('pbid')?Cookies.get('pbid'):options.pbid;}} 595else if(advancedMatching.external_id!=Cookies.get('pbid')) 596{advancedMatching["external_id"]=Cookies.get('pbid')?Cookies.get('pbid'):advancedMatching.external_id;} 597if(Object.keys(advancedMatching).length>0){return advancedMatching;}} 598return false},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('facebook')){return;} 599if(Utils.holdForIdentity(function(){Facebook.loadPixel();})){return;} 600!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.agent='dvpixelyoursite';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');if(!options.cookie||!options.cookie.disabled_all_cookie){reportCookieDomain(cookieDomain());} 601let expires=parseInt(options.cookie_duration);if(!Cookies.get('_fbp')){Cookies.set('_fbp',genereateFbp(),{expires:expires,path:'/',domain:cookieDomain()});} 602if(getUrlParameter('fbclid')){Cookies.set('_fbc',genereateFbc(),{expires:expires,path:'/',domain:cookieDomain()});} 603getOrInitSessionEntryReferrer(true);writeEventReferrerCookie();
603options.facebook.pixelIds.forEach(function(pixelId){if(options.facebook.removeMetadata){fbq('set','autoConfig',false,pixelId);} 604let advancedMatching=Facebook.advancedMatching();if(+options.facebook.meta_ldu===1){fbq('dataProcessingOptions',['LDU'],0,0);} 605if(Utils.isMetaEnabledCapiPixel(pixelId)){fbq('optinMetaEnabledCapi',pixelId);} 606if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(!advancedMatching){fbq('init',pixelId);}else{var test_prefix=CS_Data.test_prefix;var cs_advanced_matching=Cookies.get('cs_enabled_advanced_matching'+test_prefix);if(jQuery('#cs_enabled_advanced_matching'+test_prefix).length>0){if(cs_advanced_matching=='yes'){fbq('init',pixelId,advancedMatching);}else{fbq('init',pixelId);}}else{fbq('init',pixelId,advancedMatching);}}}else{if(!advancedMatching){fbq('init',pixelId);}else{fbq('init',pixelId,advancedMatching);}}});initialized=true;Utils.fireStaticEvents('facebook');},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} 607data.delay=data.delay||0;data.params=data.params||{};if(data.delay===0){fireEvent(name,data);}else{setTimeout(function(name,params){fireEvent(name,params);},data.delay*1000,name,data);} 608return true;},onCommentEvent:function(event){this.fireEvent(event.name,event);},onDownloadEvent:function(event){this.fireEvent(event.name,event);},onFormEvent:function(event){this.fireEvent(event.name,event);},onWooAddToCartOnButtonEvent:function(product_id){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 609return;var event=options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()];window.pysWooProductData=window.pysWooProductData||[];if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('facebook')){event=Utils.copyProperties(event,{}) 610Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params,event.params) 611this.fireEvent(event.name,event);}}},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,$form){window.pysWooProductData=window.pysWooProductData||[];if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 612return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(product_type===Utils.PRODUCT_VARIABLE&&!options.facebook.wooVariableAsSimple){product_id=parseInt($form.find('input[name="variation_id"]').val());} 613if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('facebook')){Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params,event.params);var groupValue=0;if(product_type===Utils.PRODUCT_GROUPED){$form.find(".woocommerce-grouped-product-list .qty").each(function(index){var childId=$(this).attr('name').replaceAll("quantity[","").replaceAll("]","");var quantity=parseInt($(this).val());if(isNaN(quantity)){quantity=0;} 614var childItem=window.pysWooProductData[product_id]['facebook'].grouped[childId];if(quantity==0){event.params.content_ids.forEach(function(el,index,array){if(el==childItem.content_id){array.splice(index,1);}});} 615if(event.params.hasOwnProperty('contents')){event.params.contents.forEach(function(el,index,array){if(el.id==childItem.content_id){if(quantity>0){el.quantity=quantity;}else{array.splice(index,1);}}});} 616groupValue+=childItem.price*quantity;});if(groupValue==0)return;} 617if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'){if(product_type===Utils.PRODUCT_GROUPED){event.params.value=groupValue;}else if(product_type===Utils.PRODUCT_BUNDLE){var data=$(".bundle_form .bundle_data").data("bundle_form_data");var items_sum=getBundlePriceOnSingleProduct(data);event.params.value=(parseInt(data.base_price)+items_sum)*qty;}else{event.params.value=event.params.value*qty;}} 618if(event.params.hasOwnProperty('contents')&&product_type!==Utils.PRODUCT_GROUPED){event.params.contents[0].quantity=qty;} 619this.fireEvent(event.name,event);}}},onWooRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 620return;var event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData&&window.pysEddProductData.hasOwnProperty(download_id)){var index;if(price_index){index=download_id+'_'+price_index;}else{index=download_id;} 621if(window.pysEddProductData[download_id].hasOwnProperty(index)){if(window.pysEddProductData[download_id][index].hasOwnProperty('facebook')){Utils.copyProperties(window.pysEddProductData[download_id][index]['facebook']["params"],event.params) 622if(options.edd.addToCartOnButtonValueEnabled&&options.edd.addToCartOnButtonValueOption!=='global'){event.params.value=event.params.value*qty;} 623var contents=event.params.contents;contents[0].quantity=qty;event.params.contents=contents;this.fireEvent(event.name,event);}}}},onEddRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onPageScroll:function(event){this.fireEvent(event.name,event);},onTime:function(event){this.fireEvent(event.name,event);}
623,initEventIdCookies:function(key){var ids={};ids[key]=pys_generate_token(36) 624Cookies.set('pys_fb_event_id',JSON.stringify(ids));},updateEventId:function(key){var cooData=Cookies.get("pys_fb_event_id") 625if(cooData===undefined){this.initEventIdCookies(key);}else{var data=JSON.parse(cooData);data[key]=pys_generate_token(36);Cookies.set('pys_fb_event_id',JSON.stringify(data));}},getEventId:function(key){var data=Cookies.get("pys_fb_event_id");if(data===undefined){this.initEventIdCookies(key);data=Cookies.get("pys_fb_event_id");} 626return JSON.parse(data)[key];},sendFacebookRestAPIRequest:function(allData,name,params){if(typeof window.pysFacebookRest==='undefined'||!window.pysFacebookRest.restApiUrl){return;} 627const restApiData={event:name,data:JSON.stringify(params),ids:allData.pixelIds||options.facebook.pixelIds,eventID:allData.eventID,woo_order:allData.woo_order||0,edd_order:allData.edd_order||0,order_key:allData.order_key||''};if(pageReferrer){restApiData.referrer_url=pageReferrer;} 628restApiData.event_source_url=window.location.href;if(navigator.sendBeacon){const formData=new FormData();Object.keys(restApiData).forEach(key=>{if(Array.isArray(restApiData[key])){restApiData[key].forEach(value=>{formData.append(key+'[]',value);});}else{formData.append(key,restApiData[key]);}});if(navigator.sendBeacon(window.pysFacebookRest.restApiUrl,formData)){return;}} 629fetch(window.pysFacebookRest.restApiUrl,{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded',},body:new URLSearchParams(restApiData)}).catch(()=>{this.sendAjaxFallback(allData,name,params);});},sendAjaxFallback:function(allData,name,params){var json={action:'pys_api_event',pixel:'facebook',event:name,data:params,ids:allData.pixelIds||options.facebook.pixelIds,eventID:allData.eventID,url:window.location.href,ajax_event:options.ajax_event};if(allData.hasOwnProperty('woo_order')){json['woo_order']=allData.woo_order;} 630if(allData.hasOwnProperty('edd_order')){json['edd_order']=allData.edd_order;} 631if(allData.hasOwnProperty('order_key')&&allData.order_key){json['order_key']=allData.order_key;} 632if(pageReferrer){json.referrer_url=pageReferrer;} 633Utils.sendServerAjaxRequest(options.ajaxUrl,json);},};}(options);var Analytics=function(options){var initialized=false;function fireEvent(name,data){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'ga')){return;} 634var eventParams=Utils.copyProperties(data,{});var _fireEvent=function(tracking_id,name,params){if(!Utils.hasSendToTarget(tracking_id)){if(options.debug){console.warn('[Google Analytics] '+name+' skipped: empty tracking ID',{trackingIds:options.ga.trackingIds});} 635return;} 636params['send_to']=tracking_id;if(options.debug){console.log('[Google Analytics #'+tracking_id+'] '+name,params);} 637Utils.gtagPush('event',name,params);};options.ga.trackingIds.forEach(function(tracking_id){var copyParams=Utils.copyProperties(eventParams,{});var params=mapParamsTov4(tracking_id,name,copyParams) 638_fireEvent(tracking_id,name,params);});} 639function mapParamsTov4(tag,name,param){delete param.landing_page;if(isv4(tag)){delete param.traffic_source;delete param.event_category;delete param.event_label;delete param.ecomm_prodid;delete param.ecomm_pagetype;delete param.ecomm_totalvalue;if(name==='search'){param['search']=param.search_term;delete param.search_term;delete param.dynx_itemid;delete param.dynx_pagetype;delete param.dynx_totalvalue;}} 640return param;} 641function isv4(tag){return tag.indexOf('G')===0;} 642return{tag:function(){return"ga";},isEnabled:function(){return options.hasOwnProperty('ga');},disable:function(){initialized=false;},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('analytics')){return;} 643Utils.loadGoogleTag(options.ga.trackingIds[0]);var config={};if(options.ga.crossDomainEnabled){config.linker={accept_incoming:options.ga.crossDomainAcceptIncoming,domains:options.ga.crossDomainDomains};} 644var ids=options.ga.trackingIds;ids.forEach(function(trackingId,index){var obj=options.ga.isDebugEnabled;var searchValue="index_"+index;var config_for_tag=Object.assign({},options.config);config_for_tag.debug_mode=false;config_for_tag.send_page_view=!options.ga.custom_page_view_event;for(var key in obj){if(obj.hasOwnProperty(key)&&obj[key]===searchValue){config_for_tag.debug_mode=true;break;}} 645if(!config_for_tag.debug_mode) 646{delete config_for_tag.debug_mode;} 647if(isv4(trackingId)){if(options.ga.disableAdvertisingFeatures){config_for_tag.allow_google_signals=false} 648if(options.ga.disableAdvertisingPersonalization){config_for_tag.allow_ad_personalization_signals=false}} 649if(options.ga.hasOwnProperty('additionalConfig')){if(options.ga.additionalConfig.hasOwnProperty(trackingId)&&options.ga.additionalConfig[trackingId]){config_for_tag.first_party_collection=options.ga.additionalConfig[trackingId].first_party_collection;}} 650if(options.ga.hasOwnProperty('serverContainerUrls')){if(options.ga.serverContainerUrls.hasOwnProperty(trackingId)&&options.ga.serverContainerUrls[trackingId].enable_server_container!=false){if(options.ga.serverContainerUrls[trackingId].server_container_url!=''){config_for_tag.server_container_url=options.ga.serverContainerUrls[trackingId].server_container_url;} 651if(options.ga.serverContainerUrls[trackingId].transport_url!=''){config_for_tag.transport_url=options.ga.serverContainerUrls[trackingId].transport_url;}}} 652if(options.gdpr.cookiebot_integration_enabled&&typeof Cookiebot!=='undefined'){var cookiebot_consent_category=options.gdpr['cookiebot_analytics_consent_category'];
652if(options.gdpr['analytics_prior_consent_enabled']){if(Cookiebot.consented===true&&Cookiebot.consent[cookiebot_consent_category]){Utils.gtagPush('config',trackingId,config_for_tag);}}else{if(Cookiebot.consent[cookiebot_consent_category]){Utils.gtagPush('config',trackingId,config_for_tag);}}} 653else 654{Utils.gtagPush('config',trackingId,config_for_tag);}});initialized=true;Utils.fireStaticEvents('ga');},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} 655data.delay=data.delay||0;data.params=data.params||{};data.params.eventID=Utils.generateUniqueId(data);if(data.delay===0){fireEvent(name,data.params);}else{setTimeout(function(name,params){fireEvent(name,params);},data.delay*1000,name,data.params);} 656return true;},onCommentEvent:function(event){this.fireEvent(event.name,event);},onDownloadEvent:function(event){this.fireEvent(event.name,event);},onFormEvent:function(event){this.fireEvent(event.name,event);},onWooAddToCartOnButtonEvent:function(product_id){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 657return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('ga')){Utils.copyProperties(window.pysWooProductData[product_id]['ga'].params,event.params) 658this.fireEvent(event.name,event);}}},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,$form){window.pysWooProductData=window.pysWooProductData||[];if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 659return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(product_type===Utils.PRODUCT_VARIABLE&&!options.ga.wooVariableAsSimple){product_id=parseInt($form.find('input[name="variation_id"]').val());} 660if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('ga')){Utils.copyProperties(window.pysWooProductData[product_id]['ga'].params,event.params);if(product_type===Utils.PRODUCT_GROUPED){var groupValue=0;$form.find(".woocommerce-grouped-product-list .qty").each(function(index){var childId=$(this).attr('name').replaceAll("quantity[","").replaceAll("]","");var quantity=parseInt($(this).val());if(isNaN(quantity)){quantity=0;} 661var childItem=window.pysWooProductData[product_id]['ga'].grouped[childId];event.params.items.forEach(function(el,index,array){if(el.id==childItem.content_id){if(quantity>0){el.quantity=quantity;}else{array.splice(index,1);}}});groupValue+=childItem.price*quantity;});if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&&event.params.hasOwnProperty('ecomm_totalvalue')){event.params.ecomm_totalvalue=groupValue;} 662if(groupValue==0)return;}else{event.params.items[0].quantity=qty;} 663if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&&product_type!==Utils.PRODUCT_GROUPED) 664{if(event.params.hasOwnProperty('ecomm_totalvalue')){event.params.ecomm_totalvalue=event.params.items[0].price*qty;}} 665this.fireEvent(event.name,event);}}},onWooRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 666return;var event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData&&window.pysEddProductData.hasOwnProperty(download_id)){var index;if(price_index){index=download_id+'_'+price_index;}else{index=download_id;} 667if(window.pysEddProductData[download_id].hasOwnProperty(index)){if(window.pysEddProductData[download_id][index].hasOwnProperty('ga')){Utils.copyProperties(window.pysEddProductData[download_id][index]['ga'].params,event.params);event.params.items[0].quantity=qty;this.fireEvent(event.name,event);}}}},onEddRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onPageScroll:function(event){this.fireEvent(event.name,event);},onTime:function(event){this.fireEvent(event.name,event);},};}(options);var GTM=function(options){var initialized=false;var datalayer_name='dataLayer';function fireEvent(name,event){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'gtm')){return;}
668var eventParams=event.params;var data=event.params;var valuesArray=Object.values(event.trackingIds);var ids=valuesArray;Utils.copyProperties(Utils.getRequestParams(),eventParams);var _fireEvent=function(tracking_id,name,params,event=null){var eventData={};var ContainerCodeHasTag=!options.gtm.gtm_just_data_layer&&tracking_id.length>0;if(ContainerCodeHasTag){params['send_to']=tracking_id;} 669else if(!options.gtm.gtm_just_data_layer){return} 670if(params.hasOwnProperty('ecommerce')){eventData.ecommerce=params.ecommerce;delete params.ecommerce;} 671var automatedParams={...params};[params['manualName'],'manualName','triggerType'].forEach(key=>delete automatedParams[key]);if(event&&(!event.hasOwnProperty('hasAutoParam')||(event.hasOwnProperty('hasAutoParam')&&event.hasAutoParam))){eventData.automatedParameters=automatedParams;} 672if(params.hasOwnProperty(params['manualName'])){eventData[params['manualName']]=params[params['manualName']];delete params[params['manualName']];} 673['manualName','triggerType'].forEach(key=>{if(params.hasOwnProperty(key)){eventData[key]=params[key];delete params[key];}});eventData.manualDataLayer=Utils.resolveGtmDataLayerName();eventData.event=name;if(options.debug){if(ContainerCodeHasTag){console.log('[Google GTM #'+tracking_id+'] '+name,eventData);} 674else{console.log('[Google GTM push to "'+datalayer_name+'"] '+name,eventData);}} 675window[datalayer_name].push(eventData);};var copyParams=Utils.copyProperties(eventParams,{});var params=mapParamsToGTM(ids,name,copyParams) 676params.event_id=Utils.generateUniqueId(event);_fireEvent(ids,name,params,event);} 677function normalizeEventName(eventName){var matches={ViewContent:'view_item',AddToCart:'add_to_cart',AddToWishList:'add_to_wishlist',InitiateCheckout:'begin_checkout',Purchase:'purchase',Lead:'generate_lead',CompleteRegistration:'sign_up',AddPaymentInfo:'set_checkout_option'};return matches.hasOwnProperty(eventName)?matches[eventName]:eventName;} 678function mapParamsToGTM(tag,name,param){var hasGTM=false;if(Array.isArray(tag)){hasGTM=tag.some(function(element){return isGTM(element);});}else if(isGTM(tag)){hasGTM=true;} 679if(hasGTM){delete param.event_category;delete param.event_label;delete param.analytics_storage;delete param.ad_storage;delete param.ad_user_data;delete param.ad_personalization;if(name==='search'){param['search']=param.search_term;delete param.search_term;delete param.dynx_itemid;delete param.dynx_pagetype;delete param.dynx_totalvalue;}} 680return param;} 681function isGTM(tag){return tag.indexOf('GTM')===0;} 682return{tag:function(){return"gtm";},isEnabled:function(){return options.hasOwnProperty('gtm');},disable:function(){initialized=false;},updateEnhancedConversionData:function(){if(!initialized||!this.isEnabled()){return;} 683if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.hasOwnProperty("userDataEnable")&&options.tracking_analytics.userDataEnable){var advanced=Utils.getAdvancedFormData();if(Object.keys(advanced).length>0){window[datalayer_name].push({'user_data':advanced});}}},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('analytics')){return;} 684datalayer_name=Utils.resolveGtmDataLayerName();for(var i=0;i<options.gtm.trackingIds.length;i++){var trackingId=options.gtm.trackingIds[i];if(!options.gtm.gtm_just_data_layer){console.log('[PYS] Google Tag Manager container code loaded');Utils.loadGTMScript(trackingId);break;}} 685if(options.gtm.gtm_just_data_layer){console.warn&&console.warn("[PYS] Google Tag Manager container code placement set to OFF !!!");console.warn&&console.warn("[PYS] Data layer codes are active but GTM container must be loaded using custom coding !!!");Utils.pushGTMConsentState(datalayer_name);if(options.gtm.trackingIds.length==0){Utils.loadGTMScript();}} 686if(options.hasOwnProperty("tracking_analytics")&&options.tracking_analytics.hasOwnProperty("userDataEnable")&&options.tracking_analytics.userDataEnable){var advanced=Utils.getAdvancedFormData();if(Object.keys(advanced).length>0){window[datalayer_name].push({'user_data':advanced});}} 687var config={};if(options.user_id&&options.user_id!=0){config.user_id=options.user_id;} 688var ids=options.gtm.trackingIds;initialized=true;Utils.fireStaticEvents('gtm');},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} 689data.delay=data.delay||0;data.params=data.params||{};if(data.delay===0){fireEvent(name,data);}else{setTimeout(function(name,params){fireEvent(name,params);},data.delay*1000,name,data);} 690return true;},onCommentEvent:function(event){this.fireEvent(event.name,event);},onDownloadEvent:function(event){this.fireEvent(event.name,event);},onFormEvent:function(event){this.fireEvent(event.name,event);},onWooAddToCartOnButtonEvent:function(product_id,prod_info=null){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 691return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('gtm')){Utils.copyProperties(window.pysWooProductData[product_id]['gtm'].params,event.params) 692this.fireEvent(event.name,event);}}},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,$form){window.pysWooProductData=window.pysWooProductData||[];if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 693return;var event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(product_type===Utils.PRODUCT_VARIABLE&&!options.gtm.wooVariableAsSimple){product_id=parseInt($form.find('input[name="variation_id"]').val());} 694if(window.pysWooProductData.hasOwnProperty(product_id)){if(window.pysWooProductData[product_id].hasOwnProperty('gtm')){Utils.copyProperties(window.pysWooProductData[product_id]['gtm'].params,event.params);params=event.params.hasOwnProperty('ecommerce')?event.params.ecommerce:event.params;if(product_type===Utils.PRODUCT_GROUPED){var groupValue=0;$form.find(".woocommerce-grouped-product-list .qty").each(function(index){var childId=$(this).attr('name').replaceAll("quantity[","").replaceAll("]","");var quantity=parseInt($(this).val());if(isNaN(quantity)){quantity=0;} 695var childItem=window.pysWooProductData[product_id]['gtm'].grouped[childId];
695params.items.forEach(function(el,index,array){if(el.id==childItem.content_id){if(quantity>0){el.quantity=quantity;el.price=childItem.price;}else{array.splice(index,1);}}});groupValue+=childItem.price*quantity;});if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&¶ms.hasOwnProperty('value')){params.value=groupValue;} 696if(groupValue==0)return;}else{params.items[0].quantity=qty;} 697if(options.woo.addToCartOnButtonValueEnabled&&options.woo.addToCartOnButtonValueOption!=='global'&&product_type!==Utils.PRODUCT_GROUPED) 698{if(params.hasOwnProperty('value')){params.value=params.items[0].price*qty;}} 699this.fireEvent(event.name,event);}}},onWooRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())) 700return;var event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData&&window.pysEddProductData.hasOwnProperty(download_id)){var index;if(price_index){index=download_id+'_'+price_index;}else{index=download_id;} 701if(window.pysEddProductData[download_id].hasOwnProperty(index)){if(window.pysEddProductData[download_id][index].hasOwnProperty('gtm')){Utils.copyProperties(window.pysEddProductData[download_id][index]['gtm'].params,event.params);item=event.params.hasOwnProperty('ecommerce')?event.params.ecommerce.items[0]:event.params.items[0];item.quantity=qty;this.fireEvent(event.name,event);}}}},onEddRemoveFromCartEvent:function(event){this.fireEvent(event.name,event);},onPageScroll:function(event){this.fireEvent(event.name,event);},onTime:function(event){this.fireEvent(event.name,event);},};}(options);var OpenAI=function(options){let initialized=false,sentIdentity=null,identityWaitTimer=null,identityWaitExpired=false;function sendOpenAIServerEvent(name,allData,data,eventId){if(!options.hasOwnProperty('openai')||!options.openai.serverApiEnabled){return;} 702let isApiDisabled=options.gdpr.all_disabled_by_api||options.gdpr.openai_disabled_by_api||options.gdpr.cookiebot_integration_enabled||options.gdpr.consent_magic_integration_enabled||options.gdpr.cookie_notice_integration_enabled||options.gdpr.cookie_law_info_integration_enabled;if(!(options.ajaxForServerEvent||isApiDisabled)){return;} 703let isStatic=allData.type==='static'||allData.type===undefined,delay=allData.delay||0;let phpSkipped=!isStatic||delay>0;if(!phpSkipped&&!options.ajaxForServerStaticEvent&&!(allData.hasOwnProperty('ajaxFire')&&allData.ajaxFire)){return;} 704let params={data:data};if(allData.params&&allData.params.custom_event_name){params.custom_event_name=allData.params.custom_event_name;} 705let json={action:'pys_openai_api_event',pixel:'openai',event:name,event_slug:allData.e_id||'',ids:allData.pixelIds||options.openai.pixelIds,data:params,url:window.location.href,eventID:eventId,ajax_event:options.ajax_event};if(allData.hasOwnProperty('woo_order')){json['woo_order']=allData.woo_order;} 706if(allData.hasOwnProperty('edd_order')){json['edd_order']=allData.edd_order;} 707if(allData.hasOwnProperty('order_key')&&allData.order_key){json['order_key']=allData.order_key;} 708let wait=name==='page_viewed'?500:0;setTimeout(function(){Utils.sendServerAjaxRequest(options.ajaxUrl,json);},wait);} 709function optOutMode(){if(options.openai&&options.openai.opt_out){return true;} 710return!!(options.gdpr&&options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=='undefined'&&Utils.csModeEnabled(CS_Data.cs_openai_opt_out_mode));} 711const SDK_DATA_FIELDS={contents:['type','amount','currency','contents'],custom:['type','plan_id','amount','currency','contents'],customer_action:['type','amount','currency'],plan_enrollment:['type','plan_id','amount','currency','contents']};const SDK_ITEM_FIELDS=['id','name','content_type','quantity','amount','currency'];function sdkInteger(value){let number=typeof value==='string'?Number(value.trim()):value;return typeof number==='number'&&isFinite(number)?Math.round(number):null;} 712function sdkCurrency(value){return typeof value==='string'&&/^[A-Za-z]{3}$/.test(value)?value:null;} 713function sdkText(value){if(typeof value==='string'){return value===''?null:value;} 714return typeof value==='number'&&isFinite(value)?String(value):null;} 715function sdkSafeItem(item,eventHasCurrency){if(!item||typeof item!=='object'||Array.isArray(item)){return null;} 716let safe={};SDK_ITEM_FIELDS.forEach(function(field){if(item[field]===undefined||item[field]===null||item[field]===''){return;} 717if(field==='quantity'||field==='amount'){let number=sdkInteger(item[field]);if(number!==null){safe[field]=number;} 718return;} 719if(field==='currency'){let currency=sdkCurrency(item.currency);if(currency!==null){safe.currency=currency;} 720return;} 721let text=sdkText(item[field]);if(text!==null){safe[field]=text;}});if(safe.hasOwnProperty('amount')&&!safe.hasOwnProperty('currency')&&!eventHasCurrency){delete safe.amount;} 722return Object.keys(safe).length?safe:null;} 723function sdkSafeData(data){if(!data||typeof data!=='object'){return{};} 724let allowed=SDK_DATA_FIELDS[data.type];if(!allowed){return data;} 725let safe={};allowed.forEach(function(field){if(data[field]!==undefined&&data[field]!==null&&data[field]!==''){safe[field]=data[field];}});if(safe.hasOwnProperty('plan_id')){let planId=sdkText(safe.plan_id);if(planId===null){delete safe.plan_id;}else{safe.plan_id=planId;}}
725 726if(safe.hasOwnProperty('currency')){let currency=sdkCurrency(safe.currency);if(currency===null){delete safe.currency;}else{safe.currency=currency;}} 727if(safe.hasOwnProperty('amount')){let amount=sdkInteger(safe.amount);if(amount===null||!safe.hasOwnProperty('currency')){delete safe.amount;}else{safe.amount=amount;}} 728if(safe.hasOwnProperty('contents')){let items=Array.isArray(safe.contents)?safe.contents.map(function(item){return sdkSafeItem(item,safe.hasOwnProperty('currency'));}).filter(function(item){return item!==null;}):[];if(items.length){safe.contents=items;}else{delete safe.contents;}} 729return safe;} 730function fireEvent(name,allData){if(typeof window.pys_event_data_filter==="function"&&window.pys_disable_event_filter(name,'openai')){return;} 731if(typeof window.oaiq!=='function'){return;} 732let ids=(allData&&allData.pixelIds&&allData.pixelIds.length)?allData.pixelIds:options.openai.pixelIds;if(!ids||ids.length===0){return;} 733let data=(allData.params&&allData.params.data)?Utils.clone(allData.params.data):{};let eventOptions={},eventId=Utils.generateUniqueId(allData);if(eventId){eventOptions.event_id=eventId;} 734if(allData.params&&allData.params.custom_event_name){eventOptions.custom_event_name=allData.params.custom_event_name;} 735sendOpenAIServerEvent(name,allData,data,eventId);let browserData=sdkSafeData(data);if(optOutMode()){eventOptions.opt_out=true;} 736if(options.debug){console.log('[OpenAI] '+name,browserData,eventOptions,'pixel_ids',ids);} 737ids.forEach(function(pixelId){oaiq('measureSingle',pixelId,name,browserData,eventOptions);});let customEvent=new CustomEvent('openai_event_sent',{detail:{eventName:name,data:data,options:eventOptions,pixel_ids:ids}});window.dispatchEvent(customEvent);} 738function identityPending(){return!identityWaitExpired&&!options.dynamicDataApplied&&!!options.dynamicDataUrl;} 739const OPENAI_USER_FIELDS=['email_sha256','phone_number_sha256','external_id_sha256','first_name_sha256','last_name_sha256','country','city','region','postal_code'];function openaiCookieIdentity(){let raw;try{raw=Utils.getAdvancedFormData()||{};}catch(e){raw={};} 740let phone=typeof raw.phone==='string'?raw.phone.trim().replace(/[\s().-]+/g,''):'';if(!/^\+?[0-9]+$/.test(phone)||phone.indexOf('+0')===0){phone='';}else{let international=phone.indexOf('+')===0||phone.indexOf('00')===0;let national=phone.replace(/^\+?0*/,'');if(international&&national.indexOf('1')===0&&national.length!==11){national='';} 741phone=/^[1-9][0-9]{7,14}$/.test(national)?national:'';} 742let normalizeName=function(value){if(typeof value!=='string'||value.length>1024){return'';} 743let stripped=value.replace(/[!-\/:-@\[-`{-~\s]+/g,'').toLowerCase();return/\D/u.test(stripped)?stripped:'';};return{email:Utils.AdvancedMatching.normalizeEmail(raw.email||''),phone:phone,first_name:normalizeName(raw.first_name||''),last_name:normalizeName(raw.last_name||'')};} 744function buildAdvancedMatchingUser(){let user={};if(options.openai.hasOwnProperty('advanced_matching')){let matching=options.openai.advanced_matching;OPENAI_USER_FIELDS.forEach(function(field){let value=matching[field];if(typeof value==='string'&&value.length>0){user[field]=value;}});} 745Utils.AdvancedMatching.merge(user,{email_sha256:{field:'email',hash:true},phone_number_sha256:{field:'phone',hash:true},first_name_sha256:{field:'first_name',hash:true},last_name_sha256:{field:'last_name',hash:true}},openaiCookieIdentity());let externalIdAllowed=options.send_external_id&&!(options.gdpr&&options.gdpr.externalID_disabled_by_api)&&!(options.cookie&&(options.cookie.disabled_all_cookie||options.cookie.externalID_disabled_by_api));if(!user.hasOwnProperty('external_id_sha256')&&externalIdAllowed&&typeof sha256==='function'&&Cookies.get('pbid')){user.external_id_sha256=sha256(Cookies.get('pbid'));} 746return user;} 747return{tag:function(){return"openai";},isEnabled:function(){return options.hasOwnProperty('openai');},disable:function(){initialized=false;if(typeof window.oaiq==='function'){oaiq('consent',false);}},loadPixel:function(){if(initialized||!this.isEnabled()||!Utils.consentGiven('openai')){return;} 748let ids=options.openai.pixelIds;if(!ids||ids.length===0){return;} 749if(identityPending()){if(identityWaitTimer===null){identityWaitTimer=setTimeout(function(){identityWaitExpired=true;if(window.pys&&window.pys.OpenAI){window.pys.OpenAI.loadPixel();}},3000);} 750return;} 751if(identityWaitTimer!==null){clearTimeout(identityWaitTimer);identityWaitTimer=null;} 752!function(w,d,s,u){if(w.oaiq)return;var q=function(){q.q.push(arguments);};q.q=[];w.oaiq=q;var js=d.createElement(s);js.async=true;js.src=u;var f=d.getElementsByTagName(s)[0];f.parentNode.insertBefore(js,f);}(window,document,'script','https://bzrcdn.openai.com/sdk/oaiq.min.js');let user=buildAdvancedMatchingUser();if(Object.keys(user).length>0){sentIdentity=JSON.stringify(user);} 753ids.forEach(function(pixelId){let initOptions={pixelId:pixelId};if(options.openai.debug){initOptions.debug=true;} 754if(Object.keys(user).length>0){initOptions.user=user;} 755oaiq('init',initOptions);});oaiq('consent',true);initialized=true;Utils.fireStaticEvents('openai');},refreshAdvancedMatching:function(){if(!initialized||!this.isEnabled()||typeof window.oaiq!=='function'){return;} 756let user=buildAdvancedMatchingUser();if(Object.keys(user).length===0){return;} 757let identity=JSON.stringify(user);if(identity===sentIdentity){return;} 758sentIdentity=identity;let ids=options.openai.pixelIds||[];ids.forEach(function(pixelId){oaiq('init',{pixelId:pixelId,user:user});});},fireEvent:function(name,data){if(!initialized||!this.isEnabled()){return false;} 759fireEvent(name,data);return true;},onWooAddToCartOnButtonEvent:function(product_id){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){return;} 760if(!window.pysWooProductData||!window.pysWooProductData.hasOwnProperty(product_id)){return;} 761if(!window.pysWooProductData[product_id].hasOwnProperty(this.tag())){return;} 762let productData=window.pysWooProductData[product_id][this.tag()];let event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);Utils.copyProperties(productData['params'],event.params);if(productData.hasOwnProperty('pixelIds')){event.pixelIds=productData['pixelIds'];} 763this.fireEvent(event.name,event);},onWooAddToCartOnSingleEvent:function(product_id,qty,product_type,is_external,$form){if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){return;} 764if(!window.pysWooProductData||!window.pysWooProductData.hasOwnProperty(product_id)){return;} 765if(!window.pysWooProductData[product_id].hasOwnProperty(this.tag())){return;} 766let event=Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);Utils.copyProperties(window.pysWooProductData[product_id][this.tag()]['params'],event.params);if(qty&&event.params&&event.params.data&&Array.isArray(event.params.data.contents)){event.params.data.contents.forEac
766h(function(item){item.quantity=qty;});} 767this.fireEvent(event.name,event);},onEddAddToCartOnButtonEvent:function(download_id,price_index,qty){if(!options.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())){return;} 768if(!window.pysEddProductData||!window.pysEddProductData.hasOwnProperty(download_id)){return;} 769let index=price_index?download_id+'_'+price_index:download_id;if(!window.pysEddProductData[download_id].hasOwnProperty(index)){return;} 770if(!window.pysEddProductData[download_id][index].hasOwnProperty(this.tag())){return;} 771let event=Utils.clone(options.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);Utils.copyProperties(window.pysEddProductData[download_id][index][this.tag()].params,event.params);if(qty&&event.params&&event.params.data&&Array.isArray(event.params.data.contents)){event.params.data.contents.forEach(function(item){item.quantity=qty;});} 772this.fireEvent(event.name,event);},};}(options);var getPixelBySlag=function getPixelBySlag(slug){switch(slug){case"facebook":return window.pys.Facebook;case"ga":return window.pys.Analytics;case"gtm":return window.pys.GTM;case"bing":return window.pys.Bing;case"pinterest":return window.pys.Pinterest;case"reddit":return window.pys.Reddit;case"openai":return window.pys.OpenAI;}} 773window.pys=window.pys||{};window.pys.Facebook=Facebook;window.pys.Analytics=Analytics;window.pys.GTM=GTM;window.pys.OpenAI=OpenAI;window.pys.Utils=Utils;window.pys.getPixelBySlag=getPixelBySlag;window.pys.setEventUniqueId=function(idKey,newId){uniqueId[idKey]=newId;};window.getPixelBySlag=getPixelBySlag;function pysNormalInit(){if($("#pys_late_event").length>0){var dirAttr=$("#pys_late_event").attr("dir");if(dirAttr){try{var events=JSON.parse(dirAttr);}catch(e){console.warn("Invalid JSON in pys_late_event dir attribute:",e);}}else{console.warn("pys_late_event dir attribute is undefined or empty");} 774if(events){for(var key in events){var event={};event[events[key].e_id]=[events[key]];if(options.staticEvents.hasOwnProperty(key)){Object.assign(options.staticEvents[key],event);}else{options.staticEvents[key]=event;}}}} 775var Pinterest=Utils.setupPinterestObject();var Bing=Utils.setupBingObject();var Reddit=Utils.setupRedditObject();if(options.hasOwnProperty('cookie')) 776{if(options.cookie.externalID_disabled_by_api||options.cookie.disabled_all_cookie) 777{Cookies.remove('pbid',{path:'/',domain:cookieDomain()})} 778if(options.cookie.disabled_advanced_form_data_cookie||options.cookie.disabled_all_cookie) 779{Cookies.remove('pys_advanced_form_data',{path:'/',domain:cookieDomain()}) 780Cookies.remove('pys_advanced_form_data',{path:'/',domain:''})} 781if(options.cookie.disabled_landing_page_cookie||options.cookie.disabled_all_cookie) 782{Cookies.remove('pys_landing_page',{path:'/',domain:cookieDomain()}) 783Cookies.remove('last_pys_landing_page',{path:'/',domain:cookieDomain()})} 784if(options.cookie.disabled_trafficsource_cookie||options.cookie.disabled_all_cookie) 785{Cookies.remove('pysTrafficSource',{path:'/',domain:cookieDomain()}) 786Cookies.remove('last_pysTrafficSource',{path:'/',domain:cookieDomain()})} 787if(options.cookie.disabled_first_visit_cookie||options.cookie.disabled_all_cookie) 788{Cookies.remove('pys_first_visit',{path:'/',domain:cookieDomain()})} 789if(options.cookie.disabled_utmTerms_cookie||options.cookie.disabled_all_cookie) 790{$.each(Utils.utmTerms,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})});$.each(Utils.utmTerms,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});} 791if(options.cookie.disabled_utmId_cookie||options.cookie.disabled_all_cookie) 792{$.each(Utils.utmId,function(index,name){Cookies.remove('pys_'+name,{path:'/',domain:cookieDomain()})}) 793$.each(Utils.utmId,function(index,name){Cookies.remove('last_pys_'+name,{path:'/',domain:cookieDomain()})});}} 794var cookiesManaged=false;if(options.gdpr.cookie_law_info_integration_enabled){var cli_cookie=Cookies.get('cookieyes-consent')??Cookies.get('viewed_cookie_policy');if(typeof cli_cookie!=='undefined'){if(cli_cookie===Cookies.get('cookieyes-consent')&&getCookieYes('analytics')=='yes'){Utils.manageCookies();cookiesManaged=true;}else if(cli_cookie===Cookies.get('viewed_cookie_policy')&&cli_cookie=='yes'){Utils.manageCookies();cookiesManaged=true;}}} 795if(!cookiesManaged){if(options.gdpr.consent_magic_integration_enabled&&typeof CS_Data!=="undefined"){if(CS_Data.cs_script_cat.pys==CS_Data.cs_necessary_cat_id||CS_Data.cs_script_cat.pys==0){Utils.manageCookies();}else if(Cookies.get('cs_enabled_cookie_term'+CS_Data.test_prefix+'_'+CS_Data.cs_script_cat.pys)=='yes'){Utils.manageCookies();}}else if(!options.gdpr.cookie_law_info_integration_enabled){Utils.manageCookies();}} 796Utils.setupGdprCallbacks();if(options.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var singlePageScroll=function(){var docHeight=$(document).height()-$(window).height();var isFired=false;if(options.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var pixels=Object.keys(options.dynamicEvents.automatic_event_scroll);for(var i=0;i<pixels.length;i++){var event=Utils.clone(options.dynamicEvents.automatic_event_scroll[pixels[i]]);var scroll=Math.round(docHeight*event.scroll_percent/100) 797if(scroll<$(window).scrollTop()){if(pixels[i]!=='reddit'){Utils.copyProperties(Utils.getRequestParam
797s(),event.params);} 798getPixelBySlag(pixels[i]).onPageScroll(event);isFired=true}}} 799if(isFired){$(document).off("scroll",singlePageScroll);}} 800$(document).on("scroll",singlePageScroll);} 801if(options.dynamicEvents.hasOwnProperty("automatic_event_time_on_page")){var pixels=Object.keys(options.dynamicEvents.automatic_event_time_on_page);var time=options.dynamicEvents.automatic_event_time_on_page[pixels[0]].time_on_page;setTimeout(function(){for(var i=0;i<pixels.length;i++){var event=Utils.clone(options.dynamicEvents.automatic_event_time_on_page[pixels[i]]);if(pixels[i]!=='reddit'){Utils.copyProperties(Utils.getRequestParams(),event.params);} 802getPixelBySlag(pixels[i]).onTime(event);}},time*1000);} 803if(options.dynamicEvents.hasOwnProperty("automatic_event_download")){$(document).onFirst('click','a, button, input[type="button"], input[type="submit"]',function(e){var $elem=$(this);if(options.dynamicEvents.hasOwnProperty("automatic_event_download")){var isFired=false;if($elem.is('a')){var href=$elem.attr('href');if(typeof href!=="string"){return;} 804href=href.trim();var extension=Utils.getLinkExtension(href);var track_download=false;if(extension.length>0){if(options.dynamicEvents.hasOwnProperty("automatic_event_download")){var pixels=Object.keys(options.dynamicEvents.automatic_event_download);for(var i=0;i<pixels.length;i++){var event=Utils.clone(options.dynamicEvents.automatic_event_download[pixels[i]]);var extensions=event.extensions;if(extensions.includes(extension)){if(pixels[i]=="tiktok"||pixels[i]=="reddit"){getPixelBySlag(pixels[i]).fireEvent(tikEvent.name,event);}else{if(options.enable_remove_download_url_param){href=stripUrlQuery(href);} 805event.params.download_url=href;event.params.download_type=extension;event.params.download_name=Utils.getLinkFilename(href);getPixelBySlag(pixels[i]).onDownloadEvent(event);} 806isFired=true;}}}}} 807if(isFired){return;}}});} 808$.each(options.triggerEventTypes,function(triggerType,events){$.each(events,function(eventId,triggers){switch(triggerType){case'url_click':break;case'css_click':Utils.setupCSSClickEvents(eventId,triggers);break;case'css_mouseover':Utils.setupMouseOverClickEvents(eventId,triggers);break;case'scroll_pos':Utils.setupScrollPosEvents(eventId,triggers);break;case'comment':Utils.setupCommentEvents(eventId,triggers);break;}});});if(options.woo.enabled){if(options.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")&&options.woo.hasOwnProperty("addToCartCatchMethod")&&options.woo.addToCartCatchMethod==="add_cart_js"){$('.add_to_cart_button:not(.product_type_variable,.product_type_bundle,.single_add_to_cart_button)').on("click",function(e){var product_id=$(this).data('product_id');if(typeof product_id!=='undefined'){if(options.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")){var tmpEventID=pys_generate_token();$.each(options.dynamicEvents.woo_add_to_cart_on_button_click,function(i,tag){tag.eventID=tmpEventID;var idKey=tag.hasOwnProperty('custom_event_post_id')?tag.custom_event_post_id:tag.e_id;uniqueId[idKey]=tmpEventID;});} 809if(typeof product_id!=='undefined'){Facebook.onWooAddToCartOnButtonEvent(product_id);Analytics.onWooAddToCartOnButtonEvent(product_id);GTM.onWooAddToCartOnButtonEvent(product_id);Pinterest.onWooAddToCartOnButtonEvent(product_id);Bing.onWooAddToCartOnButtonEvent(product_id);Reddit.onWooAddToCartOnButtonEvent(product_id);OpenAI.onWooAddToCartOnButtonEvent(product_id);}}});$('body').onFirst('click','button.single_add_to_cart_button,.single_add_to_cart_button',function(e){var $button=$(this);if($button.hasClass('disabled')){return;} 810var $form=$button.closest('form');var product_type=Utils.PRODUCT_SIMPLE;if($form.length===0){return;}else if($form.hasClass('variations_form')){product_type=Utils.PRODUCT_VARIABLE;}else if($form.hasClass('bundle_form')){product_type=Utils.PRODUCT_BUNDLE;}else if($form.hasClass('grouped_form')){product_type=Utils.PRODUCT_GROUPED;} 811var product_id;var qty;if(product_type===Utils.PRODUCT_GROUPED){qty=1;product_id=parseInt($form.find('*[name="add-to-cart"]').val());}else if(product_type===Utils.PRODUCT_VARIABLE){product_id=parseInt($form.find('*[name="add-to-cart"]').val());var qtyTag=$form.find('input[name="quantity"]');if(qtyTag.length<=0){qtyTag=$form.find('select[name="quantity"]');} 812qty=parseInt(qtyTag.val());}else{product_id=parseInt($form.find('*[name="add-to-cart"]').val());var qtyTag=$form.find('input[name="quantity"]');if(qtyTag.length<=0){qtyTag=$form.find('select[name="quantity"]');} 813qty=parseInt(qtyTag.val());} 814if(options.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")){var tmpEventID=pys_generate_token();$.each(options.dynamicEvents.woo_add_to_cart_on_button_click,function(i,tag){tag.eventID=tmpEventID;var idKey=tag.hasOwnProperty('custom_event_post_id')?tag.custom_event_post_id:tag.e_id;uniqueId[idKey]=tmpEventID;});} 815Facebook.onWooAddToCartOnSingleEvent(product_id,qty,product_type,$form);Analytics.onWooAddToCartOnSingleEvent(product_id,qty,product_type,$form);GTM.onWooAddToCartOnSingleEvent(product_id,qty,product_type,$form);Pinterest.onWooAddToCartOnSingleEvent(product_id,qty,product_type,false,$form);Bing.onWooAddToCartOnSingleEvent(product_id,qty,product_type,false,$form);Reddit.onWooAddToCartOnSingleEvent(product_id,qty,product_type,false,$form);OpenAI.onWooAddToCartOnSingleEvent(product_id,qty,product_type,false,$form);});} 816if(options.dynamicEvents.hasOwnProperty("woo_remove_from_cart")){$('body').on('click',options.woo.removeFromCartSelector,function(e){var $a=$(e.currentTarget),href=$a.attr('href');var regex=new RegExp("[\\?&]remove_item=([^&#]*)"),results=regex.exec(href);if(results!==null){var item_hash=results[1];if(options.dynamicEvents["woo_remove_from_cart"].hasOwnProperty(item_hash)){var events=options.dynamicEvents["woo_remove_from_cart"][item_hash];Utils.fireEventForAllPixel("onWooRemoveFromCartEvent",events)}}});}} 817if(options.edd.enabled){if(options.dynamicEvents.hasOwnProperty("edd_add_to_cart_on_button_click")){$('form.edd_download_purchase_form .edd-add-to-cart').on("click",function(e){var $button=$(this);var $form=$button.closest('form');var variable_price=$button.data('variablePrice');var price_mode=$button.data('priceMode');var ids=[];var quantities=[];var qty;var id;if(variable_price==='yes'&&price_mode==='multi'){id=$form.find('input[name="download_id"]').val();$.each($form.find('input[name="edd_options[price_id][]"]:checked'),function(i,el){ids.push(id+'_'+$(el).val());});$.each(ids,function(i,variant_id){var variant_index=variant_id.split('_',2);qty=$form.find('input[name="edd_download_quantity_'+variant_index[1]+'"]').val();if(typeof qty!=='undefined'){quantities.push(qty);}else{quantities.push(1);}});}else if(variable_price==='yes'&&price_mode==='single'){id=$form.find('input[name="download_id"]').val();ids.push(id+'_'+$form.find('input[name="edd_options[price_id][]"]:checked').val());qty=$form.find('input[name="edd_download_quantity"]').val();if(typeof qty!=='undefined'){quantities.push(qty);}else{quantities.push(1);}}else{ids.push($button.data('downloadId'));qty=$form.find('input[name="edd_download_quantity"]').val();if(typeof qty!=='undefined'){quantities.push(qty);}else{quantities.push(1);}} 818$.each(ids,function(i,download_id){var q=parseInt(quantities[i]);var variant_index=download_id.toString().split('_',2);var price_index;if(variant_index.length===2){download_id=variant_index[0];price_index=variant_index[1];} 819Facebook.onEddAddToCartOnButtonEvent(download_id,price_index,q);Analytics.onEddAddToCartOnButtonEvent(download_id,price_index,q);GTM.onEddAddToCartOnButtonEvent(download_id,price_index,q);Pinterest.onEddAddToCartOnButtonEvent(download_id,price_index,q);Bing.onEddAddToCartOnButtonEvent(download_id,price_index,q);Reddit.onEddAddToCartOnButtonEvent(download_id,price_index,q);OpenAI.onEddAddToCartOnButtonEvent(download_id,price_index,q);});});} 820if(options.dynamicEvents.hasOwnProperty("edd_remove_from_cart")){$('form#edd_checkout_cart_form .edd_cart_remove_item_btn').on("click",function(e){var href=$(this).attr('href');if(href){var key=href.substring(href.indexOf('=')+1).charAt(0);if(options.dynamicEvents.edd_remove_from_cart.hasOwnProperty(key)){var events=options.dynamicEvents.edd_remove_from_cart[key];Utils.fireEventForAllPixel("onEddRemoveFromCartEvent",events)}}});}}
821if(options.dynamicEvents.hasOwnProperty("automatic_event_comment")){$('form.comment-form').on("submit",function(){if(options.dynamicEvents.hasOwnProperty("automatic_event_comment")){var pixels=Object.keys(options.dynamicEvents.automatic_event_comment);for(var i=0;i<pixels.length;i++){var event=Utils.clone(options.dynamicEvents.automatic_event_comment[pixels[i]]);if(pixels[i]!=='reddit'){Utils.copyProperties(Utils.getRequestParams(),event.params);} 822getPixelBySlag(pixels[i]).onCommentEvent(event);}}});} 823if(options.dynamicEvents.hasOwnProperty("automatic_event_form")){$(document).onFirst('submit','form',function(e){var $form=$(this);const formClass=$form.attr('class')||'';const formRole=($form.attr('role')||'').toLowerCase();const formId=$form.attr('id');if($form.hasClass('comment-form')||$form.hasClass('search-form')||$form.hasClass('woocommerce-ordering')||formClass.toLowerCase().includes('search')||formClass.toLowerCase().includes('add-to-cart')||formRole==='search'||formId==='adminbarsearch'){return;} 824if($form.hasClass('woocommerce-product-search')||$form.hasClass('cart')||$form.hasClass('woocommerce-cart-form')||$form.hasClass('woocommerce-shipping-calculator')||$form.hasClass('checkout')||$form.hasClass('checkout_coupon')){return;} 825if($form.hasClass('edd_form')||$form.hasClass('edd_download_purchase_form')){return;} 826if($form.hasClass('wpcf7-form')){return;} 827if($form.hasClass('forminator-custom-form')||$form.hasClass('forminator_ajax')){return;} 828if($form.hasClass('wpforms-form')||$form.hasClass('wpforms-ajax-form')){return;} 829if($form.parent().hasClass('nf-form-layout')){return;} 830if($form.hasClass('frm-fluent-form')){return;} 831if(!options.enable_success_send_form){var params={form_id:$form.attr('id'),form_class:$form.attr('class'),text:$form.find('[type="submit"]').is('input')?$form.find('[type="submit"]').val():$form.find('[type="submit"]').text()};if(options.dynamicEvents.hasOwnProperty("automatic_event_form")){var pixels=Object.keys(options.dynamicEvents.automatic_event_form);for(var i=0;i<pixels.length;i++){var event=Utils.clone(options.dynamicEvents.automatic_event_form[pixels[i]]);if(pixels[i]==="tiktok"||pixels[i]==="reddit"){getPixelBySlag(pixels[i]).fireEvent(event.name,event);}else{Utils.copyProperties(params,event.params,)
832Utils.copyProperties(Utils.getRequestParams(),event.params);getPixelBySlag(pixels[i]).onFormEvent(event);}}}}});document.addEventListener('wpcf7mailsent',function(event){var form_id=event.detail.contactFormId;sendFormAction($(event.target),form_id);},false);$(document).on('forminator:form:submit:success',function(event){var form_id=$(event.target).find('input[name="form_id"]').val();sendFormAction($(event.target),form_id);});$('form.wpforms-form').on('wpformsAjaxSubmitSuccess',(event)=>{var form_id=$(event.target).attr('data-formid');sendFormAction($(event.target),form_id);}) 833$(document).on('frmFormComplete',function(event,form,response){const form_id=$(form).find('input[name="form_id"]').val();sendFormAction($(event.target),form_id);});$(document).onFirst('nfFormSubmitResponse',function(event,data){const form_id=data.response.data.form_id;sendFormAction($(event.target),form_id);});var fluentForms=$('form.frm-fluent-form');fluentForms.each(function(){var $form=$(this);$form.on('fluentform_submission_success',function(event){var $formItem=$(this);var form_id=$formItem.attr('data-form_id');sendFormAction($(event.target),form_id);});});} 834Utils.loadPixels();if(Utils.isCheckoutPage()){Utils.addCheckoutFields();}} 835$(document).ready(function(){if(options.dynamicDataUrl){fetch(options.dynamicDataUrl,{method:'GET',credentials:'same-origin',cache:'no-store',headers:{'Accept':'application/json'}}).then(function(r){return r.ok?r.json():Promise.reject(r.status);}).then(function(dynamic){options.ajax_event=dynamic.ajax_event;options.cache_bypass=dynamic.cache_bypass;options.tracking_analytics=dynamic.tracking_analytics;if(dynamic.gdpr_dynamic&&options.gdpr){Object.assign(options.gdpr,dynamic.gdpr_dynamic);if(dynamic.gdpr_dynamic.analytics_storage_value!==null) 836options.gdpr.analytics_storage.value=dynamic.gdpr_dynamic.analytics_storage_value;if(dynamic.gdpr_dynamic.ad_storage_value!==null) 837options.gdpr.ad_storage.value=dynamic.gdpr_dynamic.ad_storage_value;if(dynamic.gdpr_dynamic.ad_user_data_value!==null) 838options.gdpr.ad_user_data.value=dynamic.gdpr_dynamic.ad_user_data_value;if(dynamic.gdpr_dynamic.ad_personalization_value!==null) 839options.gdpr.ad_personalization.value=dynamic.gdpr_dynamic.ad_personalization_value;} 840options.cookie=dynamic.cookie;if(dynamic.pixels){for(var slug in dynamic.pixels){if(!dynamic.pixels.hasOwnProperty(slug)||!options[slug])continue;for(var key in dynamic.pixels[slug]){if(!dynamic.pixels[slug].hasOwnProperty(key))continue;var inline=options[slug][key];if(!inline||Object.keys(inline).length===0){options[slug][key]=dynamic.pixels[slug][key];}}}} 841options.dynamicDataApplied=true;if(window.pys&&window.pys.OpenAI&&typeof window.pys.OpenAI.refreshAdvancedMatching==='function'){window.pys.OpenAI.refreshAdvancedMatching();} 842pysNormalInit();}).catch(function(err){if(options.debug)console.warn('[PYS] dynamic-options fetch failed:',err);options.dynamicDataApplied=true;pysNormalInit();});}else{pysNormalInit();}});var sendFormAction=function(form_target,formId){var params={form_id:formId,text:form_target.find('[type="submit"]').is('input')?form_target.find('[type="submit"]').val():form_target.find('.forminator-button-submit').text()!=''?form_target.find('.forminator-button-submit').text():form_target.find('[type="submit"]').text()};if(options.dynamicEvents.hasOwnProperty("automatic_event_form")){var pixels=Object.keys(options.dynamicEvents.automatic_event_form);for(var i=0;i<pixels.length;i++){var event=options.dynamicEvents.automatic_event_form[pixels[i]];if(pixels[i]==="tiktok"||pixels[i]==="reddit"){getPixelBySlag(pixels[i]).fireEvent(event.name,event);}else{Utils.copyProperties(params,event.params)
843Utils.copyProperties(Utils.getRequestParams(),event.params);getPixelBySlag(pixels[i]).onFormEvent(event);}}}}}(jQuery,pysOptions);function pys_generate_token(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16));} 844function getBundlePriceOnSingleProduct(data){var items_sum=0;jQuery(".bundle_form .bundled_product").each(function(index){var id=jQuery(this).find(".cart").data("bundled_item_id");var item_price=data.prices[id];var item_quantity=jQuery(this).find(".bundled_qty").val();if(!jQuery(this).hasClass("bundled_item_optional")||jQuery(this).find(".bundled_product_optional_checkbox input").prop('checked')){items_sum+=item_price*item_quantity;}});return items_sum;} 845function getUrlParameter(sParam){var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split('&'),sParameterName,i;for(i=0;i<sURLVariables.length;i++){sParameterName=sURLVariables[i].split('=');if(sParameterName[0]===sParam){if(sParameterName[1]===undefined){continue;} 846try{return decodeURIComponent(sParameterName[1]);}catch(e){return sParameterName[1];}}} 847return false;};function getCookieYes(key){const cookiesObj=document.cookie.split(";").reduce((ac,cv)=>{const[k,v]=cv.split("=");if(k&&v)ac[k.trim()]=v;return ac;},{});const consentCookie=cookiesObj["cookieyes-consent"]||cookiesObj["wt_consent"];if(!consentCookie)return undefined;const{[key]:value}=consentCookie.split(",").reduce((obj,pair)=>{const[k,v]=pair.split(":");if(k&&v)obj[k]=v;return obj;},{});return value;} 848function getRootDomain(useSubdomain=false){const hostname=window.location.hostname;if(typeof tldjs==="undefined"){console.warn("tldjs is not defined");return hostname;} 849const rootDomain=tldjs.getDomain(hostname);return rootDomain?(useSubdomain?'.'+rootDomain:rootDomain):hostname;}; 850/*! This file is auto-generated */ 851/*! 852 * imagesLoaded PACKAGED v5.0.0 853 * JavaScript is all like "You images are done yet or what?" 854 * MIT License 855 */ 856!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})), 857/*! 858 * imagesLoaded v5.0.0 859 * JavaScript is all like "You images are done yet or what?" 860 * MIT License 861 */ 862function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;
vendor: 4,319 bytes, lines 862-870
862function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n})); 863/*! This file is auto-generated */ 864/*! 865 * Masonry PACKAGED v4.2.2 866 * Cascading grid layout library 867 * https://masonry.desandro.com 868 * MIT License 869 * by David DeSandro 870 */
vendor: 23,967 bytes, lines 870-871
870 871!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
871 872var fixto=function(t,e,i){var n,o=(n={getAll:function(t){return i.defaultView.getComputedStyle(t)},get:function(t,e){return this.getAll(t)[e]},toFloat:function(t){return parseFloat(t,10)||0},getFloat:function(t,e){return this.toFloat(this.get(t,e))},_getAllCurrentStyle:function(t){return t.currentStyle}},i.documentElement.currentStyle&&(n.getAll=n._getAllCurrentStyle),n),s=function(){function e(t){this.element=t,this.replacer=i.createElement("div"),this.replacer.style.visibility="hidden",this.hide(),t.parentNode.insertBefore(this.replacer,t)}return e.prototype={replace:function(){var t=this.replacer.style,e=o.getAll(this.element);t.width=this._width(),t.height=this._height(),t.marginTop=e.marginTop,t.marginBottom=e.marginBottom,t.marginLeft=e.marginLeft,t.marginRight=e.marginRight,t.cssFloat=e.cssFloat,t.styleFloat=e.styleFloat,t.position=e.position,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.display=e.display},hide:function(){this.replacer.style.display="none"},_width:function(){return this.element.getBoundingClientRect().width+"px"},_widthOffset:function(){return this.element.offsetWidth+"px"},_height:function(){return jQuery(this.element).outerHeight()+"px"},_heightOffset:function(){return this.element.offsetHeight+"px"},destroy:function(){t(this.replacer).remove();for(var e in this)this.hasOwnProperty(e)&&(this[e]=null)}},i.documentElement.getBoundingClientRect().width||(e.prototype._width=e.prototype._widthOffset,e.prototype._height=e.prototype._heightOffset),{MimicNode:e,computedStyle:o}}();function a(){this._vendor=null}a.prototype={_vendors:{webkit:{cssPrefix:"-webkit-",jsPrefix:"Webkit"},moz:{cssPrefix:"-moz-",jsPrefix:"Moz"},ms:{cssPrefix:"-ms-",jsPrefix:"ms"},opera:{cssPrefix:"-o-",jsPrefix:"O"}},_prefixJsProperty:function(t,e){return t.jsPrefix+e[0].toUpperCase()+e.substr(1)},_prefixValue:function(t,e){return t.cssPrefix+e},_valueSupported:function(t,e,i){try{return i.style[t]=e,i.style[t]===e}catch(t){return!1}},propertySupported:function(t){return void 0!==i.documentElement.style[t]},getJsProperty:function(t){if(this.propertySupported(t))return t;if(this._vendor)return this._prefixJsProperty(this._vendor,t);var e;for(var i in this._vendors)if(e=this._prefixJsProperty(this._vendors[i],t),this.propertySupported(e))return this._vendor=this._vendors[i],e;return null},getCssValue:function(t,e){var n,o=i.createElement("div"),s=this.getJsProperty(t);if(this._valueSupported(s,e,o))return e;if(this._vendor&&(n=this._prefixValue(this._vendor,e),this._valueSupported(s,n,o)))return n;for(var a in this._vendors)if(n=this._prefixValue(this._vendors[a],e),this._valueSupported(s,n,o))return this._vendor=this._vendors[a],n;return null}};var r,l=new a,c=l.getJsProperty("transform");var h,d=l.getCssValue("position","sticky"),u=l.getCssValue("position","fixed");function p(e,i,n){this.child=e,this._$child=t(e),this.parent=i,this.options={className:"fixto-fixed",top:0},this._setOptions(n)}function f(t,e,i){p.call(this,t,e,i),this._replacer=new s.MimicNode(t),this._ghostNode=this._replacer.replacer,this._saveStyles(),this._saveViewportHe
872ight(),this._proxied_onscroll=this._bind(this._onscroll,this),this._proxied_onresize=this._bind(this._onresize,this),this.start()}function m(t,e,i){p.call(this,t,e,i),this.start()}"Microsoft Internet Explorer"===navigator.appName&&(h=parseFloat(navigator.appVersion.split("MSIE")[1])),p.prototype={_mindtop:function(){var t=0;if(this._$mind)for(var e,i,n=0,s=this._$mind.length;n<s;n++)if((i=(e=this._$mind[n]).getBoundingClientRect()).height)t+=i.height;else{var a=o.getAll(e);t+=e.offsetHeight+o.toFloat(a.marginTop)+o.toFloat(a.marginBottom)}return t},stop:function(){this._stop(),this._running=!1},start:function(){this._running||(this._start(),this._running=!0)},destroy:function(){this.stop(),this._destroy(),this._$child.removeData("fixto-instance");for(var t in this)this.hasOwnProperty(t)&&(this[t]=null)},_setOptions:function(e){t.extend(this.options,e),this.options.mind&&(this._$mind=t(this.options.mind)),this.options.zIndex&&(this.child.style.zIndex=this.options.zIndex)},setOptions:function(t){this._setOptions(t),this.refresh()},_stop:function(){},_start:function(){},_destroy:function(){},refresh:function(){}},f.prototype=new p,t.extend(f.prototype,{_bind:function(t,e){return function(){return t.call(e)}},_toresize:8===h?i.documentElement:e,_onscroll:function(){if(this._scrollTop=i.documentElement.scrollTop||i.body.scrollTop,this._parentBottom=this.parent.offsetHeight+this._fullOffset("offsetTop",this.parent),this.fixed){if(this.options.toBottom){if(this._scrollTop>=this._fullOffset("offsetTop",this._ghostNode))return void this._unfix()}else if(this._scrollTop>this._parentBottom||this._scrollTop<=this._fullOffset("offsetTop",this._ghostNode)-this.options.top-this._mindtop())return void this._unfix();this._adjust()}else{var t=o.getAll(this.child);(this._scrollTop<this._parentBottom&&this._scrollTop>this._fullOffset("offsetTop",this.child)-this.options.top-this._mindtop()&&this._viewportHeight>this.child.offsetHeight+o.toFloat(t.marginTop)+o.toFloat(t.marginBottom)||this.options.toBottom)&&(this._fix(),this._adjust())}},_adjust:function(){var e=0,i=this._mindtop(),n=0,s=o.getAll(this.child),a=null;if(r&&(a=this._getContext())&&(e=Math.abs(a.getBoundingClientRect().top)),(n=this._parentBottom-this._scrollTop-(this.child.offsetHeight+o.toFloat(s.marginBottom)+i+this.options.top))>0&&(n=0),this.options.toBottom);else{var l=this.options.top;0===l&&(l=t("body").offset().top),this.child.style.top=Math.round(n+i+e+l-o.toFloat(s.marginTop))+"px"}},_fullOffset:function(t,e,i){for(var n=e[t],o=e.offsetParent;null!==o&&o!==i;)n+=o[t],o=o.offsetParent;return n},_getContext:function(){for(var t,e=this.child,n=null;!n;){if((t=e.parentNode)===i.documentElement)return null;if("none"!==o.getAll(t)[c]){n=t;break}e=t}return n},_fix:function(){var e=this.child,n=e.style,s=o.getAll(e),a=e.getBoundingClientRect().left,l=s.width;if(this.options._original,this._saveStyles(),i.documentElement.currentStyle&&(l=e.offsetWidth,"border-box"!==s.boxSizing&&(l-=o.toFloat(s.paddingLeft)+o.toFloat(s.paddingRight)+o.toFloat(s.borderLeftWidth)+o.toFloat(s.borderRightWidth)),l+="px"),r){this._getContext();a=this._$child.offset().left}if(this._replacer.replace(),n.left=a-o.toFloat(s.marginLeft)+"px",n.width=l,n.position="fixed",this.options.toBottom)n.top="",n.bottom=this.options.top+o.toFloat(s.marginBottom)+"px";else{n.bottom="";var c=this.options.top;0===c&&(c=t("body").offset().top),n.top=this._mindtop()+c-o.toFloat(s.marginTop)+"px"}this._$child.addClass(this.options.className),this.fixed=!0,this._$child.trigger("fixto-added")},_unfix:function(){var t=this.child.style;this._replacer.hide(),t.position=this._childOriginalPosition,t.top=this._childOriginalTop,t.bottom=this._childOriginalBottom,t.width=this._childOriginalWidth,t.left=this._childOriginalLeft,this.options.always||(this._$child.removeClass(this.options.className),this._$child.trigger("fixto-removed")),this.fixed=!1},_saveStyles:function(){var t=this.child.style;this._childOriginalPosition=t.position,this.options.toBottom?(this._childOriginalTop="",this._childOriginalBottom=t.bottom):(this._childOriginalTop=t.top,this._childOriginalBottom=""),this._childOriginalWidth=t.width,this._childOriginalLeft=t.left},_onresize:function(){this.refresh()}
872,_saveViewportHeight:function(){this._viewportHeight=e.innerHeight||i.documentElement.clientHeight},_stop:function(){this._unfix(),t(e).unbind("scroll.fixto mousewheel",this._proxied_onscroll),t(this._toresize).unbind("resize.fixto",this._proxied_onresize)},_start:function(){this._onscroll(),t(e).bind("scroll.fixto mousewheel",this._proxied_onscroll),t(this._toresize).bind("resize.fixto",this._proxied_onresize)},_destroy:function(){this._replacer.destroy()},refresh:function(){this._saveViewportHeight(),this._unfix(),this._onscroll()}}),m.prototype=new p,t.extend(m.prototype,{_start:function(){var t=o.getAll(this.child);this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this.child.style.position=d,this.refresh()},_stop:function(){this.child.style.position=this._childOriginalPosition,this.child.style.top=this._childOriginalTop},refresh:function(){this.child.style.top=this._mindtop()+this.options.top+"px"}});var g=function(t,e,n){return d&&!n||d&&n&&!1!==n.useNativeSticky?new m(t,e,n):u?(void 0===r&&(o=!1,s=i.createElement("div"),a=i.createElement("div"),s.appendChild(a),s.style[c]="translate(0)",s.style.marginTop="10px",s.style.visibility="hidden",a.style.position="fixed",a.style.top=0,i.body.appendChild(s),a.getBoundingClientRect().top>0&&(o=!0),i.body.removeChild(s),r=o),new f(t,e,n)):"Neither fixed nor sticky positioning supported";var o,s,a};return h<8&&(g=function(){return"not supported"}),t.fn.fixTo=function(e,i){var n=t(e),o=0;return this.each(function(){var s=t(this).data("fixto-instance");s?s[e].call(s,i):t(this).data("fixto-instance",g(this,n[o],i));o++})},{FixToContainer:f,fixTo:g,computedStyle:o,mimicNode:s}}(window.jQuery,window,document);function mesmerizeRenderMap(t){var e=void 0!==window.outerWidth?window.outerWidth:document.documentElement.clientWidth,i={center:{lat:t.lat,lng:t.lng},scrollwheel:!1,draggable:e>800,zoom:t.zoom,mapTypeId:google.maps.MapTypeId[t.type]};jQuery("[data-id="+t.id+"]").each(function(){var n=new google.maps.Map(this,i),o=new google.maps.LatLng(t.lat,t.lng);new google.maps.Marker({position:o,map:n});e<800&&jQuery(this).click(function(){n.set("draggable",!0)})})}!function(t,e,i){"use strict";var n=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(n,o){var s,a=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each(function(e){var r=t(this),l=r.data("backstretch");if(l){if("string"==typeof a[0]&&"function"==typeof l[a[0]]){var c=l[a[0]].apply(l,Array.prototype.slice.call(a,1));return c===l&&(c=i),void(c!==i&&((s=s||[])[e]=c))}o=t.extend(l.options,o),l.hasOwnProperty("destroy")&&l.destroy(!0)}if(!n||n&&0===n.length){var h=r.css("background-image");h&&"none"!==h?n=[{url:r.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}l=new v(this,n,o||{}),r.data("backstretch",l)}),s?1===s.length?s[0]:s:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==i},t.fn.backstretch.defaults={duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var o,s,a,r,l,c,h={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},d=(o=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],n=e;t[n-1]&&parseInt(t[n-1].width,10)>parseInt(i.width,10);)t[n]=t[n-1],--n;t[n]=i}return t},s=function(t,i,n){for(var o,s,a=e.devicePixelRatio||1,r=I(),l=(O(),i>t?"portrait":t>i?"landscape":"square"),c=0,h=0;h<n.length&&("string"==typeof(s=n[h])&&(s=n[h]={url:s}),s.pixelRatio&&"auto"!==s.pixelRatio&&parseFloat(s.pixelRatio)!==a||s.deviceOrientation&&s.deviceOrientation!==r||s.windowOrientation&&s.windowOrientation!==r||s.orientation&&s.orientation!==l||(c=h,o=t,"auto"===s.pixelRatio&&(t*=a),!(s.width>=o)));h++);return n[Math.min(h,c)]},a=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=a(t[i].src,e):t[i]=a(t[i],e);return t},function(e,i){for(var n=e.width(),r=e.height(),l=[],c=function(t,e){return"width"===e?n:"height"===e?r:t},h=0;h<i.length;h++)if(t.isArray(i[h])){i[h]=o(i[h]);var d=s(n,r,i[h]);l.push(d)}else{"string"==typeof i[h]&&(i[h]={url:i[h]});var u=t.extend({},i[h]);u.url=a(u.url,c),l.push(u)}return l}),u=function(t){return n.test(t.url)||t.isVideo},p=(r=[],l=function(t){for(var e=0;e<r.length;e++)if(r[e].src===t.src)return r[e];return r.push(t),t}
872,c=function(t,e,i){"function"==typeof e&&e.call(t,i)},function e(i,n,o,s,a){if(void 0!==i){t.isArray(i)||(i=[i]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(a=arguments[arguments.length-1]),n="function"!=typeof n&&n?n:0,o="function"==typeof o||!o||o<0?i.length:Math.min(o,i.length),s="function"!=typeof s&&s?s:1,n>=i.length&&(n=0,o=0),s<0&&(s=o),s=Math.min(s,o);var r=i.slice(n+s,o-s);if(i=i.slice(n,s),o=i.length)for(var h,d=0,p=function(){++d===o&&(c(i,a,!r),e(r,0,0,s,a))},f=0;f<i.length;f++)u(i[f])||((h=new Image).src=i[f].url,(h=l(h)).complete?p():t(h).on("load error",p));else c(i,a,!0)}}),f=function(e){for(var i=[],n=0;n<e.length;n++)"string"==typeof e[n]?i.push({url:e[n]}):t.isArray(e[n])?i.push(f(e[n])):i.push(m(e[n]));return i},m=function(t,n){return(t.centeredX||t.centeredY)&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),t.speed!==i&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),t.resolutionChangeRatioTreshold!==i&&(e.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),t.fadeFirst!==i&&(t.animateFirst=t.fadeFirst),t.fade!==i&&(t.transitionDuration=t.fade,t.transition="fade"),g(t)},g=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(t.alignX!==i||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(t.alignX!==i||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},v=function(i,n,o){this.options=t.extend({},t.fn.backstretch.defaults,o||{}),this.firstShow=!0,m(this.options,!0),this.images=f(t.isArray(n)?n:[n]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var s=t(e);this.$container=t(i),this.$root=this.isBody?A?s:t(document):this.$container,this.originalImages=this.images,this.images=d(this.options.alwaysTestWindowResolution?s:this.$root,this.originalImages),p(this.images,this.options.start||0,this.options.preload||1);var a=this.$container.children(".backstretch").first();if(this.$wrap=a.length?a:t('<div class="backstretch"></div>').css(this.options.bypassCss?{}:h.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var r=this.$container.css("position"),l=this.$container.css("zIndex");this.$container.css({position:"static"===r?"relative":r,zIndex:"auto"===l?0:l}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&A?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),s.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())},this))};v.prototype={resize:function(){try{var n=this.options.alwaysTestWindowResolution?t(e):this.$root,o=n.width(),s=n.height(),a=o/(this._lastResizeContainerWidth||0),r=s/(this._lastResizeContainerHeight||0),l=this.options.resolutionChangeRatioThreshold||0;if((o!==this._lastResizeContainerWidth||s!==this._lastResizeContainerHeight)&&(Math.abs(a-1)>=l||isNaN(a)||Math.abs(r-1)>=l||isNaN(r))&&(this._lastResizeContainerWidth=o,this._lastResizeContainerHeight=s,this.images=d(n,this.originalImages),this.options.preload&&p(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var c=this;clearTimeout(c._selectAnotherResolutionTimeout),c._selectAnotherResolutionTimeout=setTimeout(function(){c.show(0)},this.options.resolutionRefreshRate)}var h={left:0,top:0,right:"auto",bottom:"auto"},u=this.isBody?this.$root.width():this.$root.innerWidth(),f=this.isBody?e.innerHeight?e.innerHe
872ight:this.$root.height():this.$root.innerHeight(),m=u,g=m/this.$itemWrapper.data("ratio"),v=t.Event("backstretch.resize",{relatedTarget:this.$container[0]}),y=this._currentImage.alignX===i?this.options.alignX:this._currentImage.alignX,b=this._currentImage.alignY===i?this.options.alignY:this._currentImage.alignY;g>=f?h.top=-(g-f)*b:(((m=(g=f)*this.$itemWrapper.data("ratio"))-u)/2,h.left=-(m-u)*y),this.options.bypassCss||this.$wrap.css({width:u,height:f}).find(">.backstretch-item").not(".deleteable").each(function(){t(this).find("img,video,iframe").css({width:m,height:g}).css(h)}),this.$container.trigger(v,this)}catch(t){}return this},show:function(e,n){if(!(Math.abs(e)>this.images.length-1)){var o=this,s=o.$wrap.find(">.backstretch-item").addClass("deleteable"),a=o.videoWrapper,r={relatedTarget:o.$container[0]};o.$container.trigger(t.Event("backstretch.before",r),[o,e]),this.index=e;var l=o.images[e];clearTimeout(o._cycleTimeout),delete o.videoWrapper;var c=u(l);return c?(o.videoWrapper=new y(l),o.$item=o.videoWrapper.$video.css("pointer-events","none")):o.$item=t("<img />"),o.$itemWrapper=t('<div class="backstretch-item">').append(o.$item),this.options.bypassCss?o.$itemWrapper.css({display:"none"}):(o.$itemWrapper.css(h.itemWrapper),o.$item.css(h.item)),o.$item.bind(c?"canplay":"load",function(l){var h=t(this).parent(),d=h.data("options");n&&(d=t.extend({},d,n));var u=this.naturalWidth||this.videoWidth||this.width,p=this.naturalHeight||this.videoHeight||this.height;h.data("ratio",u/p);var f=function(t){return d[t]!==i?d[t]:o.options[t]},m=f("transition"),g=f("transitionEasing"),v=f("transitionDuration"),y=function(){a&&(a.stop(),a.destroy()),s.remove(),!o.paused&&o.images.length>1&&o.cycle(),o.options.bypassCss||o.isBody||o.$container.css("background-image","none"),t(["after","show"]).each(function(){o.$container.trigger(t.Event("backstretch."+this,r),[o,e])}),c&&o.videoWrapper.play()};o.firstShow&&!o.options.animateFirst||!v||!m?(h.show(),y()):function(e){var n=e.transition||"fade";"string"==typeof n&&n.indexOf("|")>-1&&(n=n.split("|")),n instanceof Array&&(n=n[Math.round(Math.random()*(n.length-1))]);var o=e.new,s=e.old?e.old:t([]);switch(n.toString().toLowerCase()){default:case"fade":o.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var a=function(){o.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};s.length?s.fadeOut({duration:e.duration/2,complete:a,easing:e.easing||i}):a();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var r=n.match(/^(cover|push)_?(.*)$/),l="left"
872===r[2]?"right":"right"===r[2]?"left":"down"===r[2]?"top":"up"===r[2]?"bottom":"right",c={display:""},h={};if(c[l]="-100%",h[l]=0,o.css(c).animate(h,{duration:e.duration,complete:function(){o.css(l,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===r[1]&&s.length){var d={};d[l]="100%",s.animate(d,{duration:e.duration,complete:function(){s.css("display","none")},easing:e.easing||i})}}}({new:h,old:s,transition:m,duration:v,easing:g,complete:y}),o.firstShow=!1,o.resize()}),o.$itemWrapper.appendTo(o.$wrap),o.$item.attr("alt",l.alt||""),o.$itemWrapper.data("options",l),c||o.$item.attr("src",l.url),o._currentImage=l,o}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(this.images.length>1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=u(this._currentImage),n=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var o=0;this.$item.on("playing.cycle",function(){var e=t(this).data("player");clearTimeout(o),o=setTimeout(function(){e.pause(),e.$video.trigger("ended")},1e3*(e.getDuration()-e.getCurrentTime()))}).on("ended.cycle",function(){clearTimeout(o)})}this.$item.on("error.cycle initerror.cycle",t.proxy(n,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(n,this)):this._cycleTimeout=setTimeout(t.proxy(n,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var y=function(){this.init.apply(this,arguments)};y.prototype.init=function(o){var s,a=this,r=function(){a.$video=s,a.video=s[0]},l="video";if(o.url instanceof Array||!n.test(o.url)||(l="youtube"),a.type=l,"youtube"===l){y.loadYoutubeAPI(),a.ytId=o.url.match(n)[2];var c="https://www.youtube.com/embed/"+a.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);a.__ytStartMuted=!!o.mute||o.mute===i,s=t("<iframe />").attr({src_to_load:c}).css({border:0,margin:0,padding:0}).data("player",a),o.loop&&s.on("ended.loop",function(){a.__manuallyStopped||a.play()}),a.ytReady=!1,r(),e.YT?(a._initYoutube(),s.trigger("initsuccess")):t(e).one("youtube_api_load",function(){a._initYoutube(),s.trigger("initsuccess")})}else{s=t("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!o.loop).prop("muted",!!o.mute||o.mute===i).prop("preload","auto").prop("poster",o.poster||"");for(var h=o.url instanceof Array?o.url:[o.url],d=0;d<h.length;d++){var u=h[d];"string"==typeof u&&(u={src:u}),t("<source>").attr("src",u.src).attr("type",u.type||null).appendTo(s)}s[0].canPlayType&&h.length?s.trigger("initsuccess"):s.trigger("initerror"),r()}},y.prototype._initYoutube=function(){var i=this,n=e.YT;i.$video.attr("src",i.$video.attr("src_to_load")).removeAttr("src_to_load");var o=!!i.$video[0].parentNode;if(!o){var s=t("<div>").css("display","none !important").appendTo(document.body);i.$video.appendTo(s)}var a=new n.Player(i.video,{events:{onReady:function(){i.__ytStartMuted&&a.mute(),o||(i.$video[0].parentNode===s[0]&&i.$video.detach(),s.remove()),i.ytReady=!0,i._updateYoutubeSize(),i.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case n.PlayerState.PLAYING:i.$video.trigger("playing");break;case n.PlayerState.ENDED:i.$video.trigger("ended");break;case n.PlayerState.PAUSED:i.$video.trigger("pause");break;case n.PlayerState.BUFFERING:i.$video.trigger("waiting");break;case n.PlayerState.CUED:i.$video.trigger("canplay")}},onPlaybackQualityChange:function(){i._updateYoutubeSize(),i.$video.trigger("resize")},onError:function(t){i.hasError=!0,i.$video.trigger({type:"error",error:t})}}});return i.ytPlayer=a,i},y.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},y.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},y.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},y.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},y.prototype.destroy=function(){return this.ytPlayer&&this.ytPlayer.destroy(),this.$video.remove(),this},y.prototype.getCurrentTime=function(t){return"youtube"!==this.type?this.video.currentTime:this.ytReady?this.ytPlayer.getCurrentTime():0},y.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},y.prototype.getDuration=function(){return"youtube"!==this.type?this.video.duration:this.ytReady?this.ytPlayer.getDuration():0},y.loadYoutubeAPI=function(){if(!e.YT){t("script[src*=www\\.youtube\\.com\\/iframe_api]").length||t('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo("body");var i=setInterval(function(){e.YT&&e.YT.loaded&&(t(e).trigger("youtube_api_load"),clearTimeout(i))},50)}};var b,w,x,$,C,_,T,P,k,S,I=function(){if("matchMedia"in e){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"}
872,O=function(){return e.innerHeight>e.innerWidth?"portrait":e.innerWidth>e.innerHeight?"landscape":"square"},A=(b=navigator.userAgent,w=navigator.platform,x=b.match(/AppleWebKit\/([0-9]+)/),$=!!x&&x[1],C=b.match(/Fennec\/([0-9]+)/),_=!!C&&C[1],T=b.match(/Opera Mobi\/([0-9]+)/),P=!!T&&T[1],k=b.match(/MSIE ([0-9]+)/),S=!!k&&k[1],!((w.indexOf("iPhone")>-1||w.indexOf("iPad")>-1||w.indexOf("iPod")>-1)&&$&&$<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||T&&P<7458||b.indexOf("Android")>-1&&$&&$<533||_&&_<6||"palmGetResource"in e&&$&&$<534||b.indexOf("MeeGo")>-1&&b.indexOf("NokiaBrowser/8.5.0")>-1||S&&S<=6))}(jQuery,window),function(t,e,i){"use strict";var n=function(t,e){var n=this;this.el=t,this.options={},Object.keys(o).forEach(function(t){n.options[t]=o[t]}),Object.keys(e).forEach(function(t){n.options[t]=e[t]}),this.isInput="input"===this.el.tagName.toLowerCase(),this.attr=this.options.attr,this.showCursor=!this.isInput&&this.options.showCursor,this.elContent=this.attr?this.el.getAttribute(this.attr):this.el.textContent,this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.fadeOut=this.options.fadeOut,this.fadeOutClass=this.options.fadeOutClass,this.fadeOutDelay=this.options.fadeOutDelay,i&&this.options.stringsElement instanceof i?this.stringsElement=this.options.stringsElement[0]:this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};n.prototype={constructor:n,init:function(){var t=this;t.timeout=setTimeout(function(){for(var e=0;e<t.strings.length;++e)t.sequence[e]=e;t.shuffle&&(t.sequence=t.shuffleArray(t.sequence)),t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos)},t.startDelay)},build:function(){var t=this;(!0===this.showCursor&&(this.cursor=e.createElement("span"),this.cursor.className="typed-cursor",this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)),this.stringsElement)&&(this.strings=[],this.stringsElement.style.display="none",Array.prototype.slice.apply(this.stringsElement.children).forEach(function(e){t.strings.push(e.innerHTML)}));this.init()},typewrite:function(t,e){if(!0!==this.stop){this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor.classList.remove(this.fadeOutClass));var i=Math.round(70*Math.random())+this.typeSpeed,n=this;n.timeout=setTimeout(function(){var i=0,o=t.substr(e);if("^"===o.charAt(0)){var s=1;/^\^\d+/.test(o)&&(s+=(o=/\d+/.exec(o)[0]).length,i=parseInt(o)),t=t.substring(0,e)+t.substring(e+s)}if("html"===n.contentType){var a=t.substr(e).charAt(0);if("<"===a){var r="";for(r="<"===a?">":";";t.substr(e+1).charAt(0)!==r&&(t.substr(e).charAt(0),!(++e+1>t.length)););e++,r}}n.timeout=setTimeout(function(){if(e===t.length){if(n.options.onStringTyped(n.arrayPos),n.arrayPos===n.strings.length-1&&(n.options.callback(),n.curLoop++,!1===n.loop||n.curLoop===n.loopCount))return;n.timeout=setTimeout(function(){n.backspace(t,e)},n.backDelay)}else{0===e&&n.options.preStringTyped(n.arrayPos);var i=t.substr(0,e+1);n.attr?n.el.setAttribute(n.attr,i):n.isInput?n.el.value=i:"html"===n.contentType?n.el.innerHTML=i:n.el.textContent=i,e++,n.typewrite(t,e)}},i)},i)}},backspace:function(t,e){var i=this;if(!0!==this.stop)if(this.fadeOut)this.initFadeOut();else{var n=Math.round(70*Math.random())+this.backSpeed;i.timeout=setTimeout(function(){if("html"===i.contentType&&">"===t.substr(e).charAt(0)){for(;"<"!==t.substr(e-1).charAt(0)&&(t.substr(e).charAt(0),!(--e<0)););e--,"<"}var n=t.substr(0,e);i.replaceText(n),e>i.stopNum?(e--,i.backspace(t,e)):e<=i.stopNum&&(i.arrayPos++,i.arrayPos===i.strings.length?(i.arrayPos=0,i.shuffle&&(i.sequence=i.shuffleArray(i.sequence)),i.init()):i.typewrite(i.strings[i.sequence[i.arrayPos
872]],e))},n)}},initFadeOut:function(){return self=this,this.el.className+=" "+this.fadeOutClass,this.cursor.className+=" "+this.fadeOutClass,setTimeout(function(){self.arrayPos++,self.replaceText(""),self.typewrite(self.strings[self.sequence[self.arrayPos]],0)},self.fadeOutDelay)},replaceText:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t},shuffleArray:function(t){var e,i,n=t.length;if(n)for(;--n;)e=t[i=Math.floor(Math.random()*(n+1))],t[i]=t[n],t[n]=e;return t},reset:function(){clearInterval(this.timeout);this.el.getAttribute("id");this.el.textContent="",void 0!==this.cursor&&void 0!==this.cursor.parentNode&&this.cursor.parentNode.removeChild(this.cursor),this.strPos=0,this.arrayPos=0,this.curLoop=0,this.options.resetCallback()}},n.new=function(t,i){Array.prototype.slice.apply(e.querySelectorAll(t)).forEach(function(t){var e=t._typed,o="object"==typeof i&&i;e&&e.reset(),t._typed=e=new n(t,o),"string"==typeof i&&e[i]()})},i&&(i.fn.typed=function(t){return this.each(function(){var e=i(this),o=e.data("typed"),s="object"==typeof t&&t;o&&o.reset(),e.data("typed",o=new n(this,s)),"string"==typeof t&&o[t]()})}),t.Typed=n;var o={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback:function(){},preStringTyped:function(){},onStringTyped:function(){},resetCallback:function(){}}}(window,document,window.jQuery),function(t){if("undefined"==typeof jQuery)throw new Error("Kube's requires jQuery");!function(t){var e=jQuery.fn.jquery.split(".");if(1==e[0]&&e[1]<8)throw new Error("Kube's requires at least jQuery v1.8")}(),function(){Function.prototype.inherits=function(t){var e=function(){};e.prototype=t.prototype;var i=new e;for(var n in this.prototype)i[n]=this.prototype[n];this.prototype=i,this.prototype.super=t.prototype};var e=function(e,i){i="object"==typeof i?i:{},this.$element=t(e),this.opts=t.extend(!0,this.defaults,t.fn[this.namespace].options,this.$element.data(),i),this.$target="string"==typeof this.opts.target?t(this.opts.target):null};e.prototype={getInstance:function(){return this.$element.data("fn."+this.namespace)},hasTarget:function(){return!(null===this.$target)},callback:function(e){var i=[].slice.call(arguments).splice(1);return this.$element&&(i=this._fireCallback(t._data(this.$element[0],"events"),e,this.namespace,i)),this.$target&&(i=this._fireCallback(t._data(this.$target[0],"events"),e,this.namespace,i)),this.opts&&this.opts.callbacks&&t.isFunction(this.opts.callbacks[e])?this.opts.callbacks[e].apply(this,i):i},_fireCallback:function(t,e,i,n){if(t&&void 0!==t[e])for(var o=t[e].length,s=0;s<o;s++){if(t[e][s].namespace===i)var a=t[e][s].handler.apply(this,n)}return void 0===a?n:a}},window.MesmerizeKube=e}();var e,i,n,o,s,a,r,l,c,h,d,u,p,f,m,g,v=window.MesmerizeKube;(e=v).Plugin={create:function(i,n){return n=void 0===n?i.toLowerCase():n,t.fn[n]=function(o,s){var a=Array.prototype.slice.call(arguments,1),r="fn."+n,l=[];return this.each(function(){var n=t(this),c=n.data(r);if(s="object"==typeof o?o:s,c||(n.data(r,{}),n.data(r,c=new e[i](this,s))),"string"==typeof o)if(t.isFunction(c[o])){var h=c[o].apply(c,a);void 0!==h&&l.push(h)}else t.error('No such method "'+o+'" for '+i)}),0===l.length||1===l.length?0===l.length?this:l[0]:l},t.fn[n].options={},this},autoload:function(t){for(var e=t.split(","),i=e.length,n=0;n<i;n++){var o=e[n].toLowerCase().split(",").map(function(t){return t.trim()}).join(",");this.autoloadQueue.push(o)}return this},autoloadQueue:[],startAutoload:function(){if(window.MutationObserver&&0!==this.autoloadQueue.length){var t=this;new MutationObserver(function(e){e.forEach(function(e){var i=e.addedNodes;0===i.length||1===i.length&&3===i.nodeType||t.startAutoloadOnce()})}).observe(document,{subtree:!0,childList:!0})}},startAutoloadOnce:function(){var e=this;t("[data-component]").not("[data-loaded]").each(function(){var i=t(this),n=i.data("c
872omponent");-1!==e.autoloadQueue.indexOf(n)&&(i.attr("data-loaded",!0),i[n]())})},watch:function(){e.Plugin.startAutoloadOnce(),e.Plugin.startAutoload()}},t(window).on("load",function(){e.Plugin.watch()}),(i=v).Animation=function(t,e,n){this.namespace="animation",this.defaults={},i.apply(this,arguments),this.effect=e,this.completeCallback=void 0!==n&&n,this.prefixes=["","-moz-","-o-animation-","-webkit-"],this.queue=[],this.start()},i.Animation.prototype={start:function(){this.isSlideEffect()&&this.setElementHeight(),this.addToQueue(),this.clean(),this.animate()},addToQueue:function(){this.queue.push(this.effect)},setElementHeight:function(){this.$element.height(this.$element.height())},removeElementHeight:function(){this.$element.css("height","")},isSlideEffect:function(){return"slideDown"===this.effect||"slideUp"===this.effect},isHideableEffect:function(){return-1!==t.inArray(this.effect,["fadeOut","slideUp","flipOut","zoomOut","slideOutUp","slideOutRight","slideOutLeft"])},isToggleEffect:function(){return"show"===this.effect||"hide"===this.effect},storeHideClasses:function(){this.$element.hasClass("hide-sm")?this.$element.data("hide-sm-class",!0):this.$element.hasClass("hide-md")&&this.$element.data("hide-md-class",!0)},revertHideClasses:function(){this.$element.data("hide-sm-class")?this.$element.addClass("hide-sm").removeData("hide-sm-class"):this.$element.data("hide-md-class")?this.$element.addClass("hide-md").removeData("hide-md-class"):this.$element.addClass("hide")},removeHideClass:function(){this.$element.data("hide-sm-class")?this.$element.removeClass("hide-sm"):this.$element.data("hide-md-class")?this.$element.removeClass("hide-md"):this.$element.removeClass("hide")},animate:function(){if(this.storeHideClasses(),this.isToggleEffect())return this.makeSimpleEffects();this.$element.addClass("kubeanimated"),this.$element.addClass(this.queue[0]),this.removeHideClass();var e=this.queue.length>1?null:this.completeCallback;this.complete("AnimationEnd",t.proxy(this.makeComplete,this),e)},makeSimpleEffects:function(){"show"===this.effect?this.removeHideClass():"hide"===this.effect&&this.revertHideClasses(),"function"==typeof this.completeCallback&&this.completeCallback(this)},makeComplete:function(){this.$element.hasClass(this.queue[0])&&(this.clean(),this.queue.shift(),this.queue.length&&this.animate())},complete:function(e,i,n){var o=e.split(" ").map(function(t){return t.toLowerCase()+" webkit"+t+" o"+t+" MS"+t});this.$element.one(o.join(" "),t.proxy(function(){"function"==typeof i&&i(),this.isHideableEffect()&&this.revertHideClasses(),this.isSlideEffect()&&this.removeElementHeight(),"function"==typeof n&&n(this),this.$element.off(event)},this))},clean:function(){this.$element.removeClass("kubeanimated").removeClass(this.queue[0])}},i.Animation.inherits(i),(n=jQuery).fn.animation=function(t,e){var i="fn.animation";return this.each(function(){var o=n(this);o.data(i),o.data(i,{}),o.data(i,new v.Animation(this,t,e))})},n.fn.animation.options={},(o=v).Detect=function(){},o.Detect.prototype={isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isMobileScreen:function(){return t(window).width()<=768},isTabletScreen:function(){return t(window).width()>=768&&t(window).width()<=1024},isDesktopScreen:function(){return t(window).width()>1024}},(s=v).FormData=function(t){this.opts=t.opts},s.FormData.prototype={set:function(t){this.data=t},get:function(t){return this.formdata=t,this.opts.appendForms&&this.appendForms(),this.opts.appendFields&&this.appendFields(),this.data},appendFields:function(){var e=t(this.opts.appendFields);if(0!==e.length){var i=this,n="";this.formdata?e.each(function(){i.data.append(t(this).attr("name"),t(this).val())}):(e.each(function(){n+="&"+t(this).attr("name")+"="+t(this).val()}),this.data=""===this.data?n.replace(/^&/,""):this.data+n)}},appendForms:function(){var e=t(this.opts.appendForms);if(0!==e.length)if(this.formdata){var i=this,n=t(this.opts.appendForms).serializeArray();t.each(n,function(t,e){i.data.append(e.name,e.value)})}else{var o=e.serialize();this.data=""===this.data?o:this.data+"&"+o}}},(a=v).Response=function(t){},a.Response.prototype={parse:function(t){if(""===t)return!1;var e={};try{e=JSON.parse(t)}catch(t){return!1}if(void 0!==e[0])for(var i in e)this.parseItem(e[i]);else this.parseItem(e);return e},parseItem:function(e){return"value"===e.type?t.each(e.data,t.proxy(function(e,i){i=!0===(i=null===i||!1===i?0:i)?1:i,t(e).val(i)},this)):"html"===e.type?t.each(e.data,t.proxy(function(e,i){i=null===i||!1===i?"":i,t(e).html(this.stripslashes(i))},this)):"addClass"===e.type?t.each(e.data,function(e,i){t(e).addClass(i)}):"removeClass"===e.type?t.each(e.data,function(e,i){t(e).removeClass(i)}):"command"===e.type?t.each(e.data,function(e,i){t(i)[e]()}):"animation"===e.type?t.each(e.data,function(e,i){i.opts=void 0===i.opts?{}:i.opts,t(e).animation(i.name,i.opts)}):"location"===e.type?top.location.href=e.data:"notify"===e.type&&t.notify(e.data),e},stripslashes:function(t){return(t+"").replace(/\0/g,"0").replace(/\\([\\'"])/g,"$1")}},(r=v).Utils=function(){},r.Utils.prototype={disableBodyScroll:function(){var e=t("html"),i=window.innerWidth;if(!i){var n=document.documentElement.getBoundingClientRect();i=n.right-Math.abs(n.left)}var o=document.body.clientWidth<i,s=this.measureScrollbar();e.css("overflow","hidden"),o&&e.css("padding-right",s)},measureScrollbar:function(){var e=t("body"),i=document.createElement("div");i.className="scrollbar-measure",e.append(i);var n=i.offsetWidth-i.clientWidth;return e[0].removeChild(i),n},enableBodyScroll:function(){t("html").css({overflow:"","padding-right":""})}},(l=v).Message=function(t,e){this.namespace="message",this.defaults={closeSelector:".close",closeEvent:"click",animationOpen:"fadeIn",animationClose:"fadeOut",callbacks:["open","opened","close","closed"]},l.apply(this,arguments),this.start()},l.Message.prototype={start:function(){this.$close=this.$element.find(this.opts.closeSelector),this.$close.on(this.opts.closeEvent+"."+this.namespace,t.proxy(this.close,this)),this.$element.addClass("open")},stop:function(){this.$close.off("."+this.namespace),this.$element.removeClass("open")},open:function(e){e&&e.preventDefault(),this.isOpened()||(this.callback("open"),this.$element.animation(this.opts.animationOpen,t.proxy(this.onOpened,this)))},isOpened:function(){return this.$element.hasClass("open")},onOpened:function(){this.callback("opened"),this.$element.addClass("open")},close:function(e){e&&e.preventDefault(),this.isOpened()&&(this.callback("close"),this.$element.animation(this.opts.animationClose,t.proxy(this.onClosed,this)))},onClosed:function(){this.callback("closed"),this.$element.removeClass("open")}},l.Message.inherits(l),l.Plugin.create("Message"),l.Plugin.autoload("Message"),(c=v).Sticky=function(t,e){this.namespace="sticky",this.defaults={classname:"fixed",offset:0,callbacks:["fixed","unfixed"]},c.apply(this,arguments),this.start()},c.Sticky.prototype={start:function(){this.offsetTop=this.getOffsetTop(),this.load(),t(window).scroll(t.proxy(this.load,this))},getOffsetTop:function(){return this.$element.offset().top},load:function(){return this.isFix()?this.fixed():this.unfixed()},isFix:function(){return t(window).scrollTop()>this.offsetTop+this.opts.offset},fixed:function(){this.$element.addClass(this.opts.classname).css("top",this.opts.offset+"px"),this.callback("fixed")},unfixed:function(){this.$element.removeClass(this.opts.classname).css("top",""),this.callback("unfixed")}},c.Sticky.inherits(c),c.Plugin.create("Sticky"),c.Plugin.autoload("Sticky"),(h=v).Toggleme=function(t,e){this.namespace="toggleme",this.defaults={toggleEvent:"click",target:null,text:"",animationOpen:"slideDown",animationClose:"slide
872Up",callbacks:["open","opened","close","closed"]},h.apply(this,arguments),this.start()},h.Toggleme.prototype={start:function(){this.hasTarget()&&this.$element.on(this.opts.toggleEvent+"."+this.namespace,t.proxy(this.toggle,this))},stop:function(){this.$element.off("."+this.namespace),this.revertText()},toggle:function(t){this.isOpened()?this.close(t):this.open(t)},open:function(e){e&&e.preventDefault(),this.isOpened()||(this.storeText(),this.callback("open"),this.$target.animation("slideDown",t.proxy(this.onOpened,this)),setTimeout(t.proxy(this.replaceText,this),100))},close:function(e){e&&e.preventDefault(),this.isOpened()&&(this.callback("close"),this.$target.animation("slideUp",t.proxy(this.onClosed,this)))},isOpened:function(){return this.$target.hasClass("open")},onOpened:function(){this.$target.addClass("open"),this.callback("opened")},onClosed:function(){this.$target.removeClass("open"),this.revertText(),this.callback("closed")},storeText:function(){this.$element.data("replacement-text",this.$element.html())},revertText:function(){var t=this.$element.data("replacement-text");t&&this.$element.html(t),this.$element.removeData("replacement-text")},replaceText:function(){""!==this.opts.text&&this.$element.html(this.opts.text)}},h.Toggleme.inherits(h),h.Plugin.create("Toggleme"),h.Plugin.autoload("Toggleme"),(d=v).Offcanvas=function(t,e){this.namespace="offcanvas",this.defaults={target:null,push:!0,width:"250px",direction:"left",toggleEvent:"click",clickOutside:!0,animationOpen:"slideInLeft",animationClose:"slideOutLeft",callbacks:["open","opened","close","closed"]},d.apply(this,arguments),this.utils=new d.Utils,this.detect=new d.Detect,this.start()},d.Offcanvas.prototype={start:function(){this.hasTarget()&&(this.buildTargetWidth(),this.buildAnimationDirection(),this.$close=this.getCloseLink(),this.$element.on(this.opts.toggleEvent+"."+this.namespace,t.proxy(this.toggle,this)),this.$target.addClass("offcanvas"),this.$target.trigger("kube.offcanvas.ready"))},stop:function(){this.closeAll(),this.$element.off("."+this.namespace),this.$close.off("."+this.namespace),t(document).off("."+this.namespace)},toggle:function(t){this.isOpened()?this.close(t):this.open(t)},buildTargetWidth:function(){this.opts.width=t(window).width()<parseInt(this.opts.width)?"100%":this.opts.width},buildAnimationDirection:function(){"right"===this.opts.direction&&(this.opts.animationOpen="slideInRight",this.opts.animationClose="slideOutRight")},getCloseLink:function(){return this.$target.find(".close")},open:function(e){e&&e.preventDefault(),this.isOpened()||(this.closeAll(),this.callback("open"),this.$target.addClass("offcanvas-"+this.opts.direction),this.$target.css("width",Math.min(parseInt(this.opts.width),window.innerWidth-100)),this.$target.css("right","-"+Math.min(parseInt(this.opts.width),window.innerWidth-100)),this.pushBody(),this.$target.trigger("kube.offcanvas.open"),this.$target.animation(this.opts.animationOpen,t.proxy(this.onOpened,this)))},closeAll:function(){var e=t(document).find(".offcanvas");0!==e.length&&(e.each(function(){var e=t(this);e.hasClass("open")&&(e.css("width","").animation("hide"),e.removeClass("open offcanvas-left offcanvas-right"))}),t(document).off("."+this.namespace),t("body").css("left",""))},close:function(e){if(e){var i=t(e.target);if(("A"===i[0].tagName||"BUTTON"===i[0].tagName||i.parents("a").length)&&0!==i.closest(".offcanvas").length&&!i.hasClass("close"))return;e.preventDefault()}this.isOpened()&&(this.utils.enableBodyScroll(),this.callback("close"),this.pullBody(),this.$target.trigger("kube.offcanvas.close"),this.$target.animation(this.opts.animationClose,t.proxy(this.onClosed,this)))},isOpened:function(){return this.$target.hasClass("open")},onOpened:function(){this.opts.clickOutside&&t(document).on("click."+this.namespace+" tap."+this.namespace,t.proxy(this.close,this)),this.detect.isMobileScreen()&&t("html").addClass("no-scroll"),t(document).on("keyup."+this.namespace,t.proxy(this.handleKeyboard,this)),this.$close.on("click."+this.namespace,t.proxy(this.close,this)),this.utils.disableBodyScroll(),this.$target.addClass("open"),this.callback("opened")},onClosed:function(){this.detect.isMobileScreen()&&t("html").removeClass("no-scroll"),this.$target.css("width","").removeClass("offcanvas-"+this.opts.direction),this.$close.off("."+this.namespace),t(document).off("."+this.namespace),this.$target.removeClass("open"),this.callback("closed"),this.$target.trigger("kube.offcanvas.closed")},handleKeyboard:function(t){27===t.which&&this.close()},pullBody:function(){this.opts.push&&t("body").animate({left:0},350,function(){t(this).removeClass("offcanvas-push-body")})}
872,pushBody:function(){if(this.opts.push){var e="left"===this.opts.direction?{left:this.opts.width}:{left:"-"+this.opts.width};t("body").addClass("offcanvas-push-body").animate(e,200)}}},d.Offcanvas.inherits(d),d.Plugin.create("Offcanvas"),d.Plugin.autoload("Offcanvas"),(u=v).Collapse=function(t,e){this.namespace="collapse",this.defaults={target:null,toggle:!0,active:!1,toggleClass:"collapse-toggle",boxClass:"collapse-box",callbacks:["open","opened","close","closed"],hashes:[],currentHash:!1,currentItem:!1},u.apply(this,arguments),this.start()},u.Collapse.prototype={start:function(){this.$items=this.getItems(),this.$items.each(t.proxy(this.loadItems,this)),this.$boxes=this.getBoxes(),this.setActiveItem()},getItems:function(){return this.$element.find("."+this.opts.toggleClass)},getBoxes:function(){return this.$element.find("."+this.opts.boxClass)},loadItems:function(e,i){var n=this.getItem(i);n.$el.attr("rel",n.hash),t(n.hash).hasClass("hide")||(this.opts.currentItem=n,this.opts.active=n.hash,n.$el.addClass("active")),n.$el.on("click.collapse",t.proxy(this.toggle,this))},setActiveItem:function(){!1!==this.opts.active&&(this.opts.currentItem=this.getItemBy(this.opts.active),this.opts.active=this.opts.currentItem.hash),!1!==this.opts.currentItem&&(this.addActive(this.opts.currentItem),this.opts.currentItem.$box.removeClass("hide"))},addActive:function(t){t.$box.removeClass("hide").addClass("open"),t.$el.addClass("active"),!1!==t.$caret&&t.$caret.removeClass("down").addClass("up"),!1!==t.$parent&&t.$parent.addClass("active"),this.opts.currentItem=t},removeActive:function(t){t.$box.removeClass("open"),t.$el.removeClass("active"),!1!==t.$caret&&t.$caret.addClass("down").removeClass("up"),!1!==t.$parent&&t.$parent.removeClass("active"),this.opts.currentItem=!1},toggle:function(e){e&&e.preventDefault();var i=t(e.target).closest("."+this.opts.toggleClass).get(0)||e.target,n=this.getItem(i);this.isOpened(n.hash)?this.close(n.hash):this.open(e)},openAll:function(){this.$items.addClass("active"),this.$boxes.addClass("open").removeClass("hide")},open:function(e,i){if(void 0!==e){"object"==typeof e&&e.preventDefault();var n=t(e.target).closest("."+this.opts.toggleClass).get(0)||e.target,o="object"==typeof e?this.getItem(n):this.getItemBy(e);o.$box.hasClass("open")||(this.opts.toggle&&this.closeAll(),this.callback("open",o),this.addActive(o),o.$box.animation("slideDown",t.proxy(this.onOpened,this)))}},onOpened:function(){this.callback("opened",this.opts.currentItem)},closeAll:function(){this.$items.removeClass("active").closest("li").removeClass("active"),this.$boxes.removeClass("open").addClass("hide")},close:function(e){var i=this.getItemBy(e);this.callback("close",i),this.opts.currentItem=i,i.$box.animation("slideUp",t.proxy(this.onClosed,this))},onClosed:function(){var t=this.opts.currentItem;this.removeActive(t),this.callback("closed",t)},isOpened:function(e){return t(e).hasClass("open")},getItem:function(e){var i={};i.$el=t(e),i.hash=i.$el.attr("href"),i.$box=t(i.hash);var n=i.$el.parent();i.$parent="LI"===n[0].tagName&&n;var o=i.$el.find(".caret");return i.$caret=0!==o.length&&o,i},getItemBy:function(t){var e="number"==typeof t?this.$items.eq(t-1):this.$element.find('[rel="'+t+'"]');return this.getItem(e)}},u.Collapse.inherits(u),u.Plugin.create("Collapse"),u.Plugin.autoload("Collapse"),(p=v).Dropdown=function(t,e){this.namespace="dropdown",this.defaults={target:null,toggleEvent:"click",height:!1,width:!1,animationOpen:"slideDown",animationClose:"slideUp",caretUp:!1,callbacks:["open","opened","close","closed"]},p.apply(this,arguments),this.utils=new p.Utils,this.detect=new p.Detect,this.start()},p.Dropdown.prototype={start:function(){this.buildClose(),this.buildCaret(),this.detect.isMobile()&&this.buildMobileAnimation(),this.$target.addClass("hide"),this.$element.on(this.opts.toggleEvent+"."+this.namespace,t.proxy(this.toggle,this))},stop:function(){this.$element.off("."+this.namespace),this.$target.removeClass("open").addClass("hide"),this.disableEvents()},buildMobileAnimation:function(){this.opts.animationOpen="fadeIn",this.opts.animationClose
872="fadeOut"},buildClose:function(){this.$close=this.$target.find(".close")},buildCaret:function(){this.$caret=this.getCaret(),this.buildCaretPosition()},buildCaretPosition:function(){var e=this.$element.offset().top+this.$element.innerHeight()+this.$target.innerHeight();t(document).height()>e||(this.opts.caretUp=!0,this.$caret.addClass("up"))},getCaret:function(){return this.$element.find(".caret")},toggleCaretOpen:function(){this.opts.caretUp?this.$caret.removeClass("up").addClass("down"):this.$caret.removeClass("down").addClass("up")},toggleCaretClose:function(){this.opts.caretUp?this.$caret.removeClass("down").addClass("up"):this.$caret.removeClass("up").addClass("down")},toggle:function(t){this.isOpened()?this.close(t):this.open(t)},open:function(e){e&&e.preventDefault(),this.callback("open"),t(".dropdown").removeClass("open").addClass("hide"),this.opts.height&&this.$target.css("min-height",this.opts.height+"px"),this.opts.width&&this.$target.width(this.opts.width),this.setPosition(),this.toggleCaretOpen(),this.$target.animation(this.opts.animationOpen,t.proxy(this.onOpened,this))},close:function(e){if(this.isOpened()){if(e){if(this.shouldNotBeClosed(e.target))return;e.preventDefault()}this.utils.enableBodyScroll(),this.callback("close"),this.toggleCaretClose(),this.$target.animation(this.opts.animationClose,t.proxy(this.onClosed,this))}},onClosed:function(){this.$target.removeClass("open"),this.disableEvents(),this.callback("closed")},onOpened:function(){this.$target.addClass("open"),this.enableEvents(),this.callback("opened")},isOpened:function(){return this.$target.hasClass("open")},enableEvents:function(){this.detect.isDesktop()&&this.$target.on("mouseover."+this.namespace,t.proxy(this.utils.disableBodyScroll,this.utils)).on("mouseout."+this.namespace,t.proxy(this.utils.enableBodyScroll,this.utils)),t(document).on("scroll."+this.namespace,t.proxy(this.setPosition,this)),t(window).on("resize."+this.namespace,t.proxy(this.setPosition,this)),t(document).on("click."+this.namespace+" touchstart."+this.namespace,t.proxy(this.close,this)),t(document).on("keydown."+this.namespace,t.proxy(this.handleKeyboard,this)),this.$target.find('[data-action="dropdown-close"]').on("click."+this.namespace,t.proxy(this.close,this))},disableEvents:function(){this.$target.off("."+this.namespace),t(document).off("."+this.namespace),t(window).off("."+this.namespace)},handleKeyboard:function(t){27===t.which&&this.close(t)},shouldNotBeClosed:function(e){return"dropdown-close"!==t(e).attr("data-action")&&e!==this.$close[0]&&0!==t(e).closest(".dropdown").length},isNavigationFixed:function(){return 0!==this.$element.closest(".fixed").length},getPlacement:function(e){return t(document).height()<e?"top":"bottom"},getOffset:function(t){return this.isNavigationFixed()?this.$element.position():this.$element.offset()},getPosition:function(){return this.isNavigationFixed()?"fixed":"absolute"},setPosition:function(){if(this.detect.isMobile())this.$target.addClass("dropdown-mobile");else{var e,i=this.getPosition(),n=this.getOffset(i),o=this.$target.innerHeight(),s=this.$target.innerWidth(),a=this.getPlacement(n.top+o+this.$element.innerHeight()),r=t(window).width()<n.left+s?s-this.$element.innerWidth():0,l=n.left-r;"bottom"===a?(this.isOpened()||this.$caret.removeClass("up").addClass("down"),this.opts.caretUp=!1,e=n.top+this.$element.outerHeight()+1):(this.opts.animationOpen="show",this.opts.animationClose="hide",this.isOpened()||this.$caret.addClass("up").removeClass("down"),this.opts.caretUp=!0,e=n.top-o-1),this.$target.css({position:i,top:e+"px",left:l+"px"})}}},p.Dropdown.inherits(p),p.Plugin.create("Dropdown"),p.Plugin.autoload("Dropdown"),(f=v).Tabs=function(t,e){this.namespace="tabs",this.defaults={equals:!1,active:!1,live:!1,hash:!0,callbacks:["init","next","prev","open","opened","close","closed"]},f.apply(this,arguments),this.start()},f.Tabs.prototype={start:function(){!1!==this.opts.live&&this.buildLiveTabs(),this.tabsCollection=[],this.hashesCollection=[],this.currentHash=[],this.currentItem=!1,this.$items=this.getItems(),this.$items.each(t.proxy(this.loadItems,this)),this.$tabs=this.getTabs(),this.currentHash=this.getLocationHash(),this.closeAll(),this.setActiveItem(),this.setItemHeight(),this.callback("init")},getTabs:function(){return t(this.tabsCollection).map(function(){return this.toArray()})},getItems:function(){return this.$element.find("a")},loadItems:function(e,i){var n=this.getItem(i);n.$el.attr("rel",n.hash),this.collectItem(n),n.$parent.hasClass("active")&&(this.currentItem=n,this.opts.active=n.hash),n.$el.on("click.tabs",t.proxy(this.open,this))},collectItem:function(t){this.tabsCollection.push(t.$tab),this.hashesCollection.push(t.hash)},buildLiveTabs:function(){var e=t(this.opts.live);0!==e.length&&(this.$liveTabsList=t("<ul />"),e.each(t.proxy(this.buildLiveItem,this)),this.$element.html("").append(this.$liveTabsList))},buildLiveItem:function(e,i){var n=t(i),o=t("<li />"),s=t("<a />"),a=e+1;n.attr("id",this.getLiveItemId(n,a));var r="#"+n.attr("id"),l=this.getLiveItemTitle(n);s.attr("href",r).attr("rel",r).text(l),o.append(s),this.$liveTabsList.append(o)},getLiveItemId:function(t,e){return void 0===t.attr("id")?this.opts.live.replace(".","")+e:t.attr("id")},getLiveItemTitle:function(t){return void 0===t.attr("data-title")?t.attr("id"):t.attr("data-title")},setActiveItem:function(){this.currentHash?(this.currentItem=this.getItemBy(this.currentHash),this.opts.active=this.currentHash):!1===this.opts.active&&(this.currentItem=this.getItem(this.$items.first()),this.opts.active=this.currentItem.hash),this.addActive(this.currentItem)},addActive:function(t){t.$parent.addClass("active"),t.$tab.removeClass("hide").addClass("open"),this.currentItem=t},removeActive:function(t){t.$parent.removeClass("active"),t.$tab.addClass("hide").removeClass("open"),this.currentItem=!1},next:function(t){t&&t.preventDefault();var e=this.getItem(this.fetchElement("next"));this.open(e.hash),this.callback("next",e)},prev:function(t){t&&t.preventDefault();var e=this.getItem(this.fetchElement("prev"));this.open(e.hash),this.callback("prev",e)},fetchElement:function(t){var e;if(!1!==this.currentItem){if(0===(e=this.currentItem.$parent[t]().find("a")).length)return}else e=this.$items[0];return e},open:function(t,e){if(void 0!==t){"object"==typeof t&&t.preventDefault();var i="object"==typeof t?this.getItem(t.target):this.getItemBy(t);this.closeAll(),this.callback("open",i),this.addActive(i),this.pushStateOpen(e,i),this.callback("opened",i)}},pushStateOpen:function(t,e){!1!==t&&!1!==this.opts.hash&&history.pushState(!1,!1,e.hash)},close:function(t){var e=this.getItemBy(t);e.$parent.hasClass("active")&&(this.callback("close",e),this.removeActive(e),this.pushStateClose(),this.callback("closed",e))},pushStateClose:function(){!1!==this.opts.hash&&history.pushState(!1,!1," ")},closeAll:function(){this.$tabs.removeClass("open").addClass("hide"),this.$items.parent().removeClass("active")},getItem:function(e){var i={};return i.$el=t(e),i.hash=i.$el.attr("href"),i.$parent=i.$el.parent(),i.$tab=t(i.hash),i},getItemBy:function(t){var e="number"==typeof t?this.$items.eq(t-1):this.$element.find('[rel="'+t+'"]');return this.getItem(e)},getLocationHash:function(){return!1!==this.opts.hash&&!!this.isHash()&&top.location.hash},isHash:function(){return!(""===top.location.hash||-1===t.inArray(top.location.hash,this.hashesCollection))},setItemHeight:function(){if(this.opts.equals){var t=this.getItemMaxHeight()+"px";this.$tabs.css("min-height",t)}},getItemMaxHeight:function(){var e=0;return this.$tabs.each(function(){var i=t(this).height();e=i>e?i:e}),e}},f.Tabs.inherits(f),f.Plugin.create("Tabs"),f.Plugin.autoload("Tabs"),(m=jQuery).modalcurrent=null,m.modalwindow=function(t){var e=m.extend({},t,{show:!0});m("<span />").modal(e)},(g=v).Modal=function(t,e){this.namespace="modal",this.defaults={target:null,show:!1,url:!1,header:!1,width:"600px",height:!1,maxHeight:!1,position:"center",overlay:!0,appendForms:!1,appendFields:!1,animationOpen:"show",animationClose:"hide",callbacks:["open","opened","close","closed"]},g.apply(this,arguments),this.utils=new g.Utils,this.detect=new g.Detect,this.start()},g.Modal.prototype={start:function(){this.hasTarget()&&(this.opts.show?this.load():this.$element.on("click."+this.namespace,t.proxy(this.load,this)))},buildModal:function(){this.$modal=this.$target.find(".modal"),this.$header=this.$target.find(".modal
872-header"),this.$close=this.$target.find(".close"),this.$body=this.$target.find(".modal-body")},buildOverlay:function(){!1!==this.opts.overlay&&(0!==t("#modal-overlay").length?this.$overlay=t("#modal-overlay"):(this.$overlay=t('<div id="modal-overlay">').addClass("hide"),t("body").prepend(this.$overlay)),this.$overlay.addClass("overlay"))},buildHeader:function(){this.opts.header&&this.$header.html(this.opts.header)},load:function(t){this.buildModal(),this.buildOverlay(),this.buildHeader(),this.opts.url?this.buildContent():this.open(t)},open:function(e){e&&e.preventDefault(),this.isOpened()||(this.detect.isMobile()&&(this.opts.width="96%"),this.opts.overlay&&this.$overlay.removeClass("hide"),this.$target.removeClass("hide"),this.$modal.removeClass("hide"),this.enableEvents(),this.findActions(),this.resize(),t(window).on("resize."+this.namespace,t.proxy(this.resize,this)),this.detect.isDesktop()&&this.utils.disableBodyScroll(),this.$modal.find("input[type=text],input[type=url],input[type=email]").on("keydown."+this.namespace,t.proxy(this.handleEnter,this)),this.callback("open"),this.$modal.animation(this.opts.animationOpen,t.proxy(this.onOpened,this)))},close:function(e){if(this.$modal&&this.isOpened()){if(e){if(this.shouldNotBeClosed(e.target))return;e.preventDefault()}this.callback("close"),this.disableEvents(),this.$modal.animation(this.opts.animationClose,t.proxy(this.onClosed,this)),this.opts.overlay&&this.$overlay.animation(this.opts.animationClose)}},onOpened:function(){this.$modal.addClass("open"),this.callback("opened"),t.modalcurrent=this},onClosed:function(){this.callback("closed"),this.$target.addClass("hide"),this.$modal.removeClass("open"),this.detect.isDesktop()&&this.utils.enableBodyScroll(),this.$body.css("height",""),t.modalcurrent=null},isOpened:function(){return this.$modal.hasClass("open")},getData:function(){var t=new g.FormData(this);return t.set(""),t.get()},buildContent:function(){t.ajax({url:this.opts.url+"?"+(new Date).getTime(),cache:!1,type:"post",data:this.getData(),success:t.proxy(function(t){this.$body.html(t),this.open()},this)})},buildWidth:function(){var e=this.opts.width,i="2%",n="2%",o=e.match(/%$/);parseInt(this.opts.width)>t(window).width()&&!o?e="96%":o||(i="16px",n="16px"),this.$modal.css({width:e,"margin-top":i,"margin-bottom":n})},buildPosition:function(){if("center"===this.opts.position){var e=t(window).height(),i=this.$modal.outerHeight(),n=e/2-i/2+"px";this.detect.isMobile()?n="2%":i>e&&(n="16px"),this.$modal.css("margin-top",n)}},buildHeight:function(){var e=t(window).height();if(this.opts.maxHeight){var i=parseInt(this.$body.css("padding-top"))+parseInt(this.$body.css("padding-bottom")),n=parseInt(this.$modal.css("margin-top"))+parseInt(this.$modal.css("margin-bottom")),o=e-this.$header.innerHeight()-i-n;this.$body.height(o)}else!1!==this.opts.height&&this.$body.css("height",this.opts.height);this.$modal.outerHeight()>e&&(this.opts.animationOpen="show",this.opts.animationClose="hide")},resize:function(){this.buildWidth(),this.buildPosition(),this.buildHeight()},enableEvents:function(){this.$close.on("click."+this.namespace,t.proxy(this.close,this)),t(document).on("keyup."+this.namespace,t.proxy(this.handleEscape,this)),this.$target.on("click."+this.namespace,t.proxy(this.close,this))},disableEvents:function(){this.$close.off("."+this.namespace),t(document).off("."+this.namespace),this.$target.off("."+this.namespace),t(window).off("."+this.namespace)},findActions:function(){this.$body.find('[data-action="modal-close"]').on("mousedown."+this.namespace,t.proxy(this.close,this))},setHeader:function(t){this.$header.html(t)},setContent:function(t){this.$body.html(t)},setWidth:function(t){this.opts.width=t,this.resize()},getModal:function(){return this.$modal},getBody:function(){return this.$body},getHeader:function(){return this.$header},handleEnter:function(t){13===t.which&&(t.preventDefault(),this.close(!1))},handleEscape:function(t){return 27!==t.which||this.close(!1)},shouldNotBeClosed:function(e){return"modal-close"!==t(e).attr("data-action")&&e!==this.$close[0]&&0!==t(e).closest(".modal").length}},g.Modal.inherits(g),g.Plugin.create("Modal"),g.Plugin.autoload("Modal")}(jQuery),function(t){"#page-top"===window.location.hash&&o("",5);var e={items:{},eachCategory:function(t){for(var e in this.items)this.items.hasOwnProperty(e)&&t(this.items[e])},addItem:function(t,e){this.items[t]||(this.items[t]=[]),this.items[t].push(e)},all:function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&(t=t.concat(this.items[e]));return t}},i=!1;function n(e){var i=isNaN(parseFloat(e.options.offset))?e.options.offset.call(e.target):e.options.offset;return e.target.offset().top-i-t("body").offset().top}function o(t,e){t===location.hash.replace("#","")||"page-top"===t&&""===location.hash.replace("#","")||setTimeout(function(){t=t?"page-top"===t?" ":"#"+t:" ",history&&history.replaceState&&history.replaceState({},"",t)},e||100)}function s(e){if(!i){i=!0;var s=n(e);t("html, body").animate({scrollTop:s},{easing:"linear",complete:function(){var s=n(e);t("html, body").animate({scrollTop:s},{easing:"linear",duration:100,complete:function(){i=!1,o(e.id,5)}})}})}}function a(e){var i=(e.attr("href")||"").split("#").pop(),n=function(t){var e=jQuery(t)[0].href||"",i="#";try{var n=new window.URL(e);i=[n.protocol,"//",n.host,n.pathname].join("")}catch(t){i=e.split("?")[0].split("#")[0]}return i}(e),o=null,s=[location.protocol,"//",location.host,location.pathname].join("");if(n.length&&n!==s)return o;if(i.trim().length)try{o=t('[id="'+i+'"]')}catch(t){console.log("error scrollSpy",t)}return o&&o.length?o:null}function r(){e.eachCategory(function(t){var e=t.sort(function(t,e){return t.target.offset().top-e.target.offset().top}),i=e.filter(function(t){return t.target.offset().top<=window.scrollY+.25*window.innerHeight}).pop();e.forEach(function(t){i&&t.element.is(i.element)?(o(t.id,5),t.options.onChange.call(t.element)):t.options.onLeave.call(t.element)})})}t.fn.smoothScrollAnchor=function(e){var i=t(this);e=jQuery.extend({offset:0},e),i.each(function(){var i=t(this),n=e.target||a(i);if(n&&n.length){var o={element:i,options:e,target:n,targetSel:e.targetSel||'[id="'+n.attr("id").trim()+'"]',id:(n.attr("id")||"").trim()};i.off("click tap").on("click tap",function(e){t(this).data("skip-smooth-scroll")||(e.preventDefault(),t(this).data("allow-propagation")||e.stopPropagation(),s(o),o.clickCallback&&o.clickCallback.call(this,e))})}})},t.fn.scrollSpy=function(i){var n=t(this),o="spy-"+parseInt(Date.now()
872*Math.random());n.each(function(){var n=t(this);if(i=jQuery.extend({onChange:function(){},onLeave:function(){},clickCallback:function(){},smoothScrollAnchor:!1,offset:0},i),n.is("a")&&-1!==(n.attr("href")||"").indexOf("#")){var s=a(n);if(s){var r={element:n,options:i,target:s,targetSel:'[id="'+s.attr("id").trim()+'"]',id:s.attr("id").trim()};e.addItem(o,r),n.data("scrollSpy",r),i.smoothScrollAnchor&&n.smoothScrollAnchor({offset:i.offset})}}})},t(window).scroll(r),t(window).bind("smoothscroll.update",r),t(function(){var i=window.location.hash.replace("#",""),n=e.all().filter(function(t){return t.targetSel==='[id="'+i.trim()+'"]'});t(window).on("load",function(){n.length&&s(n[0]),r()})})}(jQuery),function(t){function e(e){e.find("[data-selected-item]").each(function(){t(this).removeAttr("data-selected-item");var i=e.children("ul");e.is(".mobile-menu")&&i.slideDown()})}function i(e,i){t("body").off("tap.navigation-clear-selection"),t(window).off("scroll.navigation-clear-selection"),e.is(i)||t.contains(i[0],this)||n(i)}function n(e,i){e.find("li.hover").each(function(){var e;i&&(e=t(this),e.find("[data-selected-item]").length>0||e.is("[data-selected-item]"))||t(this).removeClass("hover")})}function o(t,e){if(e.parentsUntil("ul.dorpdown-menu").filter("li").length>0){var i=e.children("ul"),n=i.length&&e.offset().left+e.width()+300>window.innerWidth,o=i.length&&e.closest(".open-reverse").length;n||o?i.addClass("open-reverse"):i.length&&i.removeClass("open-reverse")}}function s(e){var i=e;t.fn.scrollSpy&&i.find("a").scrollSpy({onChange:function(){i.find(".current-menu-item,.current_page_item").removeClass("current-menu-item current_page_item"),t(this).closest("li").addClass("current-menu-item")},onLeave:function(){t(this).closest("li").removeClass("current-menu-item current_page_item")},smoothScrollAnchor:!0,offset:function(){var e=t(".navigation-bar.fixto-fixed");return e.length?e[0].getBoundingClientRect().height:0}}),t(window).trigger("smoothscroll.update")}t.event.special.tap||(t.event.special.tap={setup:function(e,i){t(this).bind("touchstart",t.event.special.tap.handler).bind("touchmove",t.event.special.tap.handler).bind("touchend",t.event.special.tap.handler)},teardown:function(e){t(this).unbind("touchstart",t.event.special.tap.handler).unbind("touchmove",t.event.special.tap.handler).unbind("touchend",t.event.special.tap.handler)},handler:function(e){var i,n=t(this),o=e.handleObj;return n.data(e.type,1),"touchend"!==e.type||n.data("touchmove")?n.data("touchend")&&n.removeData("touchstart touchmove touchend"):(e.type="tap",i=o.handler.call(this,e)),i}}),t("ul.dropdown-menu").each(function(){var a=t(this);if(a.hasClass("mobile-menu")){var r=t('<a href="#" data-menu-toggler="">Menu</a>');a.before(r),r.click(function(){r.hasClass("opened")?(a.slideUp(300,function(){a.css("display","")}),a.removeClass("mobile-menu"),r.removeClass("opened")):(r.addClass("opened"),a.slideDown(),a.addClass("mobile-menu"),n(a),e(a))})}t("");a.on("tap.navigation","li.menu-item > a, li.page_item > a",function(s){var r,l,c=t(this),h=c.parent();if(h.children("ul").length)if(h.is("[data-selected-item]")){var d=c.attr("href");if(0===d.indexOf("#")){var u=d.replace("#","").trim();if(!u||!t("#"+u).length)return}e(a)}else l=h,e(r=a),l.attr("data-selected-item",!0),n(r,l),l.addClass("hover"),o(0,l),t("body").on("tap.navigation-clear-selection","*",function(){i(jQuery(this),r)}),t(window).on("scroll.navigation-clear-selection",function(){i(jQuery(this),r)}),s.preventDefault(),s.stopPropagation();else s.stopPropagation(),e(a)}),a.on("mouseover.navigation","li",function(){a.find("li.hover").removeClass("hover"),o(0,t(this))}),s(a)}),t(function(){window.wp&&window.wp.customize&&(jQuery(".offcanvas_menu").find("li > ul").eq(0).each(function(){jQuery(this).show(),jQuery(this).parent().addClass("open")}),window.wp.customize.selectiveRefresh.bind("render-partials-response",function(e){Object.getOwnPropertyNames(e.contents).filter(function(t){return-1!==t.indexOf("nav_menu_instance[")}).length&&setTimeout(function(){t("ul.dropdown-menu").each(function(){s(t(this))})},1e3)}))})}(jQuery),window.mesmerizeMenuSticky=function(){var t=jQuery,e="data-sticky";function i(t){return t?e+"-"+t:e}var n=t("["+e+"]");n.each(function(e,n){var o=t(n);if(!o.data("stickData")){var s=parseInt(o.attr(i())),a="1"==o.attr(i("mobile")),r="1"==o.attr(i("shrinked")),l="bottom"==o.attr(i("to")),c="1"==o.attr(i("always"));c&&o.addClass("fixto-fixed"),r&&o.attr(i(),"initial");var h={center:!0,responsiveWidth:!0,zIndex:1e4+e,topSpacing:s,stickyOnMobile:a,stickyOnTablet:!0,useShrink:r,toBottom:l,useNativeSticky:!1,always:c};r||(0===s&&jQuery("#wpadminbar").length&&"absolute"===jQuery("#wpadminbar").css("position")&&(s=0),h.topSpacing=s,h.top=s,o.data("stickData",h),o.fixTo("body",h))}});var o=function(){var e=this.$els;window.innerWidth<1024?e.each(function(e,i){var n=t(this).data(),o=n.stickData;if(o){var s=n.fixtoInstance;if(!s)return!0;window.innerWidth<=767?o.stickyOnMobile||s.stop():o.stickyOnTablet||s.stop()}}):e.each(function(e,i){var n=t(this).data();if(n){var o=n.fixtoInstance;if(!o)return!0;o.start()}})}.bind({$els:n});t(window).bind("resize.sticky orientationchange.sticky",function(){setTimeout(o,50)}),t(window).trigger("resize.sticky")},jQuery(document).ready(function(t){mesmerizeMenuSticky()}),function(t){function e(t,e){var i=jQuery(t),n=mesmerize_video_background.getVideoRect();i.css({width:Math.round(n.width),"max-width":Math.round(n.width),height:Math.round(n.height),opacity:1,left:n.left})}window.addEventListener("resize",function(){var t=document.querySelector("video#wp-custom-header-video")||document.querySelector("iframe#wp-custom-header-video");t&&(e(t),mesmerize_video_background.resizePoster())}),jQuery(function(){var t=document.querySelector("video#wp-custom-header-video")||document.querySelector("iframe#wp-custom-header-video");t&&e(t)}),__cpVideoElementFirstPlayed=!1,document.addEventListener("wp-custom-header-video-loaded",function(){var t=document.querySelector("video#wp-custom-header-video");t?e(t):document.querySelector("#wp-custom-header")&&document.querySelector("#wp-custom-header").addEventListener("play",function(){var t=document.querySelector("iframe#wp-custom-header-video"),i=document.querySelector("video#wp-custom-header-video")||t;i&&!__cpVideoElementFirstPlayed&&(__cpVideoElementFirstPlayed=!0,e(i)),function(){for(var t in wp.customHeader.handlers){var e=wp.customHeader.handlers[t];if(e.settings)return e}}().play()})})}(jQuery),function(t){"ontouchstart"in window&&(document.documentElement.className=document.documentElement.className+" touch-enabled"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)&&(document.documentElement.className=document.documentElement.className+" no-parallax");var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,e){window.setTimeout(t,1e3/60)};window.requestInterval=function(t,i,n){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setInterval(t,
872i);var o=(new Date).getTime(),s={};return s.value=e(function a(){var r=(new Date).getTime()-o;r>=i&&(t.call(),o=(new Date).getTime()),s.value=e(a),r>=i&&n&&!0===n.call()&&clearRequestInterval(s)}),s},window.clearRequestInterval=function(t){window.cancelAnimationFrame?window.cancelAnimationFrame(t.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(t.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(t.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(t.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(t.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(t.value):clearInterval(t)},t.event.special.tap||(t.event.special.tap={setup:function(e,i){t(this).bind("touchstart",t.event.special.tap.handler).bind("touchmove",t.event.special.tap.handler).bind("touchend",t.event.special.tap.handler)},teardown:function(e){t(this).unbind("touchstart",t.event.special.tap.handler).unbind("touchmove",t.event.special.tap.handler).unbind("touchend",t.event.special.tap.handler)},handler:function(e){var i=t(this);i.data(e.type,1),"touchend"!==e.type||i.data("touchmove")?i.data("touchend")&&i.removeData("touchstart touchmove touchend"):(e.type="tap",t.event.handle.apply(this,arguments))}}),t.fn.isInView||(t.fn.isInView=function(e){var i=t(window).scrollTop(),n=i+t(window).height(),o=t(this).offset().top,s=o+t(this).height();return!0===e?i<o&&n>s:o<=n&&s>=i}),t.throttle||(t.throttle=function(t,e,i){var n,o;return e||(e=250),function(){var s=i||this,a=+new Date,r=arguments;n&&a<n+e?(clearTimeout(o),o=setTimeout(function(){n=a,t.apply(s,r)},e)):(n=a,t.apply(s,r))}}),t.debounce||(t.debounce=function(t,e,i){var n;return function(){var o=this,s=arguments,a=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(o,s)},e),a&&t.apply(o,s)}})}(jQuery),function(t){if(window.mesmerize_smooth_scroll&&window.mesmerize_smooth_scroll.enabled){var e=!0,i=null,n=null,o=10,s=10,a=100,r=0;t(window).on("load",function(t){window.addEventListener&&window.addEventListener("DOMMouseScroll",l,!1),window.onmousewheel=document.onmousewheel=l})}function l(l){var c,h=0;return l.wheelDelta?h=l.wheelDelta/120:l.detail&&(h=-l.detail/3),0===window.scrollY&&h>0||(window.innerHeight+window.scrollY>=document.body.offsetHeight&&h<0||(c=h,c=Math.sign(c)*parseInt(Math.min(Math.abs(c,10))),null===i&&(i=t(window).scrollTop()),i-=a*c,e=c>0,t("body").on("mousedown.wheelscroll","a",function(e){n&&(clearRequestInterval(n),n=null,i=null,t("body").off("mousedown.wheelscroll"))}),null===n&&(n=requestInterval(function(){var e=t(window).scrollTop();r=Math.round((i-e)/s),t(window).scrollTop(e+r)},o,function(){var o=t(window).scrollTop();return!!(o<=0&&e||o>=t(window).prop("scrollHeight")-t(window).height()||e&&r>-1||!e&&r<1)&&(n=null,i=null,!0)})),l.preventDefault&&l.preventDefault(),void(l.returnValue=!1)))}}(jQuery),mesmerizeDomReady(function(t){if(window.mesmerize_backstretch){window.mesmerize_backstretch.duration=parseInt(window.mesmerize_backstretch.duration),window.mesmerize_backstretch.transitionDuration=parseInt(window.mesmerize_backstretch.transitionDuration);var e=mesmerize_backstretch.images;if(!e)return;t(".header-homepage, .header").backstretch(e,mesmerize_backstretch)}if(t.fn.smoothScrollAnchor){var i=t("body");t(".header-homepage-arrow-c .header-homepage-arrow").smoothScrollAnchor({target:i.find("[data-id]").length?i.find("[data-id]").first():i.find(".page-content, .content").eq(0),targetSel:i.find("[data-id]").length?"[data-id]:first":".page-content, .content",offset:function(){var e=t(".navigation-bar.fixto-fixed");return e.length?e[0].getBoundingClientRect().height:0}})}}),mesmerizeDomReady(function(t){var e=!1,i=t(".post-list.row");function n(){if(!e){e=!0,i.find("img").each(function(){this.onload=s,setTimeout(function(){i.data().masonry.layout()},500)});var n=t(".post-list.row .post-list-item"),o=n.length-1;n.each(function(){t(this).css({width:t(this).css("max-width")})}),i.length&&i.masonry({itemSelector:".post-list-item",percentPosition:!0,columnWidth:"."+n.eq(o).attr("data-masonry-width")})}function s(){i.data().masonry.layout()}}i.is("[data-no-masonry]")||(window.innerWidth>=768&&n(),t(window).resize(function(){window.innerWidth>=768?n():i.data("masonry")&&i.masonry("destroy")}))}),function(t){function e(t,e){t.offset().top+t.outerHeight()>=e.offset().top+e.height()?t.css("visibility","visible"):t.css("visibility","")}function i(t,i){i.css("margin-bottom",t.outerHeight()-1),e(t,i)}window.mesmerizeFooterParallax=function(){var n=t(".footer.parallax");if(n.length){if(n.parents(".no-parallax").length)return void n.css("visibility","visible");t(".header-wrapper").css("z-index",1);var o=n.prev();o.addClass("footer-shadow"),o.css({position:"relative","z-index":1}),t(window).bind("resize.footerParallax",function(){i(n,o)}),mesmerizeDomReady(function(){window.setTimeout(function(){i(n,o)},100)}),i(n,o),t(window).bind("scroll.footerParallax",function(){e(n,o)})}},window.mesmerizeStopFooterParallax=function(){var e=t(".footer").prev();t(".header-wrapper").css("z-index",0),e.removeClass("footer-shadow"),e.css("margin-bottom","0px"),t(window).unbind("resize.footerParallax"),t(window).unbind("scroll.footerParallax")},mesmerizeFooterParallax()}(jQuery),mesmerizeDomReady(function(t){var e=t("[data-text-effect]");t.fn.typed&&e.length&&JSON.parse(mesmerize_morph.header_text_morph)&&e.each(function(){t(this).empty(),t(this).typed({strings:JSON.parse(t(this).attr("data-text-effect")),typeSpeed:parseInt(mesmerize_morph.header_text_morph_speed),loop:!0})})}),function(t){var e=t(".offcanvas_menu"),i=t("#offcanvas-wrapper");i.length&&(t("html").addClass("has-offscreen"),i.appendTo("body"),i.on("kube.offcanvas.ready",function(){i.removeClass("force-hide")}),i.on("kube.offcanvas.open",function(){t("html").addClass("offcanvas-opened")}),i.on("kube.offcanvas.close",function(){t("html").removeClass("offcanvas-opened")})),e.each(function(){var e=t(this);e.on("mesmerize.open-all",function(){t(this).find(".menu-item-has-children, .page_item_has_children").each(function(){t(this).addClass("open"),t(this).children("ul").slideDown(100)})}),e.find(".menu-item-has-children a, .page_item_has_children a").each(function(){0===t(this).children("i.fa.arrow").length&&t(this).append('<i class="fa arrow"></i>')}),e.on("click tap",".menu-item-has-children > a, .page_item_has_children >
872 a",function(e){var i=t(this),n=i.closest("li");if(e.stopPropagation(),0===n.children("ul").length)return t('[data-component="offcanvas"]').offcanvas("close"),!0;if(n.hasClass("open")){if(i.is("a"))return t('[data-component="offcanvas"]').offcanvas("close"),!0;n.children("ul").slideUp(100,function(){n.find("ul").each(function(){t(this).parent().removeClass("open"),t(this).css("display","none")})})}else n.children("ul").slideDown(100);n.toggleClass("open"),e.preventDefault()}),e.on("click tap",".mesmerize-menu-cart",function(t){t.stopPropagation()}),e.on("click tap",".menu-item-has-children > a > .arrow, .page_item_has_children > a > .arrow",function(e){var i=t(this).closest("li");e.stopPropagation(),e.preventDefault(),i.toggleClass("open"),i.hasClass("open")?i.children("ul").slideDown(100):i.children("ul").slideUp(100)}),e.on("click tap","a",function(e){0===t(this).closest("li").children("ul").length&&t('[data-component="offcanvas"]').offcanvas("close")}),t.fn.scrollSpy&&(e.find("a").each(function(){t(this).data("allow-propagation",!0)}),e.find("a > i").each(function(){t(this).data("allow-propagation",!1),t(this).data("skip-smooth-scroll",!0)}),e.find("a").scrollSpy({onChange:function(){e.find(".current-menu-item,.current_page_item").removeClass("current-menu-item current_page_item"),t(this).closest("li").addClass("current-menu-item")},onLeave:function(){t(this).closest("li").removeClass("current-menu-item current_page_item")},clickCallback:function(){t('[data-component="offcanvas"]').offcanvas("close")},smoothScrollAnchor:!0,offset:function(){return t(".navigation-bar.fixto-fixed").length?t(".navigation-bar.fixto-fixed")[0].getBoundingClientRect().height:0}}))}),t.fn.smoothScrollAnchor&&(t("#page > .page-content > .content, #page > .content").find("a[data-cp-link]").filter(function(){var e=t(this);return!e.is("[role=tab]")&&!e.parent().is("[role=tab]")}).smoothScrollAnchor(),t("#page > .footer").find("a").filter(function(){var e=t(this);return!e.is("[role=tab]")&&!e.parent().is("[role=tab]")}).smoothScrollAnchor())}(jQuery),function(t){function e(e){var i=e.find("[data-countup]"),n=i.text();n=jQuery.map(n.match(/[-]{0,1}[s\d.]*[\d]+/g),function(t){return t}).join([]);var o=void 0!==i.attr("data-max")?i.attr("data-max"):100,s=void 0!==i.attr("data-min")?i.attr("data-min"):0;if(s>o){var a=o;o=s,s=a}n||(n=s);var r=n/o*100,l=e.find(".circle-bar"),c=l.attr("r"),h=Math.PI*(2*c);r<0&&(r=0),r>100&&(r=100);var d=h*(100-r)/100;l.css({strokeDashoffset:d}),t(function(){try{wp&&wp.customize||l.parent().height(l.parent().width())}catch(t){}})}function i(t){e(t),t.find("[data-countup]").bind("countup.update",function(){e(t)}),t.data("doCircle",function(){e(t)})}function n(t,e){var o=void 0!==t.attr("data-min")?t.attr("data-min"):0,s=t.attr("data-stop"),a=void 0!==t.attr("data-max")?t.attr("data-max"):100,r=t.attr("data-prefix")||"",l=t.attr("data-suffix")||"",c=t.attr("data-duration")||2e3,h=t.attr("data-decimals")||0;void 0!==s&&(a=s);var d="";try{var u=new CountUp(t[0],parseInt(o),parseInt(a),parseInt(h),parseInt(c)/1e3,{prefix:r,suffix:l,onUpdate:function(e){i(t.closest(".circle-counter"))}});d=u.options.formattingFn(parseInt(a))}catch(t){console.error("invalid countup args",{min:o,max:a,decimals:h,duration:c,suffix:l,prefix:r})}t.data("countup",u),t.attr("data-max-computed",d),e&&t.data("countup").reset(),(t.isInView(!0)||e)&&t.data("countup").start(),t.data("restartCountUp",function(){n(t)})}t(".circle-counter").each(function(){i(t(this))});var o=t("[data-countup]");o.each(function(){n(t(this))}),t(window).on("scroll",function(){o.each(function(){var e=t(this);e.isInView(!0)&&!e.data("one")&&(e.data("countup").start(),e.data("one",!0))})}),t(function(){try{wp&&wp.customize||t(window).on("resize",function(){t(".circle-counter .circle-svg").each(function(){t(this).height(t(this).width())})})}catch(t){}});try{parent.CP_Customizer&&parent.CP_Customizer.addModule(function(e){e.hooks.addAction("after_node_insert",function(e){e.is("[data-countup]")&&(e.closest(".circle-counter").length&&i(e.closest(".circle-counter")),n(e,!0)),e.find("[data-countup]").each(function(){t(this).closest(".circle-counter").length&&i(t(this).closest(".circle-counter")),n(t(this),!0)})})})}catch(t){}}(jQuery),function(t){var e=function(e,i,n){t("body").on("mouseover.ope-woo",function(o){var s,a,r,l,c,h=t(o.target);(s=h,a=e,r=i,l=t.contains(r[0],s[0])||s.is(r),c=t.contains(a[0],s[0])||s.is(a),l||c||h.is(n))||(t("body").off("mouseover.ope-woo"),e.fadeOut())})};function i(e,i){if(!t("body").is(".woocommerce-cart")&&!t("body").is(".woocommerce-checkout")){var n=i.offset().top+i.outerHeight()-i.closest("div").offset().top;if(i.offset().left<e.outerWidth())var o=i.offset().left+e.outerWidth()+12;else o=i.offset().left+i.width()+5;e.css({position:"absolute","z-index":"100000",top:n,left:o}),e.fadeIn()}}jQuery(document).ready(function(){var n,o=jQuery("#main_menu"),s=o.find("li.mesmerize-menu-cart"),a=jQuery(".mesmerize-woo-header-cart");!function(t,n,o){t.parent().append(o);var s=t.find("li").not(n);n.children("a").off().on("mouseover",function(a){0!==o.children().length&&(s.trigger("mouseleave"),e(o,n,t),i(o,n))})}(o,s,a),(n=a).prepend('<a href="#" class="close-mini-cart small"><i class="fa fa-close"></i></a>'),t(".close-mini-cart").click(function(){t("body").off("mouseover.ope-woo"),n.fadeOut()}),s.children("a").on("touchstart",function(e){"use strict";a.is(":visible")?window.location=t(this).attr("href"):(e.preventDefault(),i(a,s))})}),t(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").on("load",function(){var e=t(this);e&&setTimeout(function(){var t=e.closest(".woocommerce-product-gallery__image").height(),i=e.closest(".flex-viewport");t&&i&&i.height(t)},500)}).each(function(){this.complete&&t(this).load()})}
872(jQuery),function(t,e,i,n){"use strict";function o(t){var e=t.currentTarget,n=t.data?t.data.options:{},o=t.data?t.data.items:[],s="",a=0;t.preventDefault(),t.stopPropagation(),i(e).attr("data-fancybox")&&(s=i(e).data("fancybox")),s?a=(o=o.length?o.filter('[data-fancybox="'+s+'"]'):i("[data-fancybox="+s+"]")).index(e):o=[e],i.fancybox.open(o,n,a)}if(!i)return n;var s,a={speed:330,loop:!0,opacity:"auto",margin:[44,0],gutter:30,infobar:!0,buttons:!0,slideShow:!0,fullScreen:!0,thumbs:!0,closeBtn:!0,smallBtn:"auto",image:{preload:"auto",protect:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>',preload:!0,scrolling:"no",css:{}},baseClass:"",slideClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-controls"><div class="fancybox-infobar"><button data-fancybox-previous class="fancybox-button fancybox-button--left" title="Previous"></button><div class="fancybox-infobar__body"><span class="js-fancybox-index"></span> / <span class="js-fancybox-count"></span></div><button data-fancybox-next class="fancybox-button fancybox-button--right" title="Next"></button></div><div class="fancybox-buttons"><button data-fancybox-close class="fancybox-button fancybox-button--close" title="Close (Esc)"></button></div></div><div class="fancybox-slider-wrap"><div class="fancybox-slider"></div></div><div class="fancybox-caption-wrap"><div class="fancybox-caption"></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>The requested content cannot be loaded. <br /> Please try again later.<p></div>',closeTpl:'<button data-fancybox-close class="fancybox-close-small"></button>',parentEl:"body",touch:!0,keyboard:!0,focus:!0,closeClickOutside:!0,beforeLoad:i.noop,afterLoad:i.noop,beforeMove:i.noop,afterMove:i.noop,onComplete:i.noop,onInit:i.noop,beforeClose:i.noop,afterClose:i.noop,onActivate:i.noop,onDeactivate:i.noop},r=i(t),l=i(e),c=0,h=function(t){return t&&t.hasOwnProperty&&t instanceof i},d=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)},u=function(t,n,o){var s=this;s.opts=i.extend(!0,{index:o},a,n||{}),s.id=s.opts.id||++c,s.group=[],s.currIndex=parseInt(s.opts.index,10)||0,s.prevIndex=null,s.prevPos=null,s.currPos=0,s.firstRun=null,s.createGroup(t),s.group.length&&(s.$lastFocus=i(e.activeElement).blur(),s.slides={},s.init(t))};i.extend(u.prototype,{init:function(){var t,e,n=this,o=!1;n.scrollTop=l.scrollTop(),n.scrollLeft=l.scrollLeft(),i.fancybox.getInstance()||(t=i("body").width(),i("html").addClass("fancybox-enabled"),i.fancybox.isTouch?(i.each(n.group,function(t,e){if("image"!==e.type&&"iframe"!==e.type)return o=!0,!1}),o&&i("body").css({position:"fixed",width:t,top:-1*n.scrollTop})):(t=i("body").width()-t)>1&&i('<style id="fancybox-noscroll" type="text/css">').html(".compensate-for-scrollbar, .fancybox-enabled body { margin-right: "+t+"px; }").appendTo("head")),e=i(n.opts.baseTpl).attr("id","fancybox-container-"+n.id).data("FancyBox",n).addClass(n.opts.baseClass).hide().prependTo(n.opts.parentEl),n.$refs={container:e,bg:e.find(".fancybox-bg"),controls:e.find(".fancybox-controls"),buttons:e.find(".fancybox-buttons"),slider_wrap:e.find(".fancybox-slider-wrap"),slider:e.find(".fancybox-slider"),caption:e.find(".fancybox-caption")},n.trigger("onInit"),n.activate(),n.current||n.jumpTo(n.currIndex)},createGroup:function(t){var e=this,o=i.makeArray(t);i.each(o,function(t,o){var s,a,r,l,c={},h={},d=[];i.isPlainObject(o)?(c=o,h=o.opts||{}):"object"===i.type(o)&&i(o).length?(h="options"in(d=(s=i(o)).data())?d.options:{},h="object"===i.type(h)?h:{},c.type="type"in d?d.type:h.type,c.src="src"in d?d.src:h.src||s.attr("href"),h.width="width"in d?d.width:h.width,h.height="height"in d?d.height:h.height,h.thumb="thumb"in d?d.thumb:h.thumb,h.selector="selector"in d?d.selector:h.selector,"srcset"in d&&(h.image={srcset:d.srcset}),h.$orig=s):c={type:"html",content:o+""},c.opts=i.extend(!0,{},e.opts,h),a=c.type,r=c.src||"",a||(c.content?a="html":r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?a="pdf":"#"===r.charAt(0)&&(a="inline"),c.type=a),c.index=e.group.length,c.opts.$orig&&!c.opts.$orig.length&&delete c.opts.$orig,!c.opts.$thumb&&c.opts.$orig&&(c.opts.$thumb=c.opts.$orig.find("img:first")),c.opts.$thumb&&!c.opts.$thumb.length&&delete c.opts.$thumb,"function"===i.t
872ype(c.opts.caption)?c.opts.caption=c.opts.caption.apply(o,[e,c]):"caption"in d?c.opts.caption=d.caption:h.$orig&&(c.opts.caption=s.attr("title")),c.opts.caption=c.opts.caption===n?"":c.opts.caption+"","ajax"===a&&((l=r.split(/\s+/,2)).length>1&&(c.src=l.shift(),c.opts.selector=l.shift())),"auto"==c.opts.smallBtn&&(i.inArray(a,["html","inline","ajax"])>-1?(c.opts.buttons=!1,c.opts.smallBtn=!0):c.opts.smallBtn=!1),"pdf"===a&&(c.type="iframe",c.opts.closeBtn=!0,c.opts.smallBtn=!1,c.opts.iframe.preload=!1),c.opts.modal&&i.extend(!0,c.opts,{infobar:0,buttons:0,keyboard:0,slideShow:0,fullScreen:0,closeClickOutside:0}),e.group.push(c)})},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("click.fb-previous","[data-fancybox-previous]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}),i(t).on("orientationchange.fb resize.fb",function(t){d(function(){t&&t.originalEvent&&"resize"===t.originalEvent.type?e.update():(e.$refs.slider_wrap.hide(),d(function(){e.$refs.slider_wrap.show(),e.update()}))})}),l.on("focusin.fb",function(t){var n=i.fancybox?i.fancybox.getInstance():null;!n||i(t.target).hasClass("fancybox-container")||i.contains(n.$refs.container[0],t.target)||(t.stopPropagation(),n.focus(),r.scrollTop(e.scrollTop).scrollLeft(e.scrollLeft))}),l.on("keydown.fb",function(t){var n=e.current,o=t.keyCode||t.which;if(n&&n.opts.keyboard&&!i(t.target).is("input")&&!i(t.target).is("textarea")){if(8===o||27===o)return t.preventDefault(),void e.close(t);switch(o){case 37:case 38:t.preventDefault(),e.previous();break;case 39:case 40:t.preventDefault(),e.next();break;case 80:case 32:t.preventDefault(),e.SlideShow&&(t.preventDefault(),e.SlideShow.toggle());break;case 70:e.FullScreen&&(t.preventDefault(),e.FullScreen.toggle());break;case 71:e.Thumbs&&(t.preventDefault(),e.Thumbs.toggle())}}})},removeEvents:function(){r.off("scroll.fb resize.fb orientationchange.fb"),l.off("keydown.fb focusin.fb click.fb-close"),this.$refs.container.off("click.fb-close click.fb-previous click.fb-next")},previous:function(t){this.jumpTo(this.currIndex-1,t)},next:function(t){this.jumpTo(this.currIndex+1,t)},jumpTo:function(t,e){var i,o,s,a,r=this;if(i=r.firstRun=null===r.firstRun,o=s=t=parseInt(t,10),a=!!r.current&&r.current.opts.loop,!r.isAnimating&&(o!=r.currIndex||i)){if(r.group.length>1&&a)o%=r.group.length,o=o<0?r.group.length+o:o,2==r.group.length?s=t-r.currIndex+r.currPos:(s=o-r.currIndex+r.currPos,Math.abs(r.currPos-(s+r.group.length))<Math.abs(r.currPos-s)?s+=r.group.length:Math.abs(r.currPos-(s-r.group.length))<Math.abs(r.currPos-s)&&(s-=r.group.length));else if(!r.group[o])return void r.update(!1,!1,e);r.current&&(r.current.$slide.removeClass("fancybox-slide--current fancybox-slide--complete"),r.updateSlide(r.current,!0)),r.prevIndex=r.currIndex,r.prevPos=r.currPos,r.currIndex=o,r.currPos=s,r.current=r.createSlide(s),r.group.length>1&&((r.opts.loop||s-1>=0)&&r.createSlide(s-1),(r.opts.loop||s+1<r.group.length)&&r.createSlide(s+1)),r.current.isMoved=!1,r.current.isComplete=!1,e=parseInt(e===n?1.5*r.current.opts.speed:e,10),r.trigger("beforeMove"),r.updateControls(),i&&(r.current.$slide.addClass("fancybox-slide--current"),r.$refs.container.show(),d(function(){r.$refs.bg.css("transition-duration",r.current.opts.speed+"ms"),r.$refs.container.addClass("fancybox-container--ready")})),r.update(!0,!1,i?0:e,function(){r.afterMove()}),r.loadSlide(r.current),i&&r.current.$ghost||r.preload()}},createSlide:function(t){var e,n,o,s=this;if(n=(n=t%s.group.length)<0?s.group.length+n:n,!s.slides[t]&&s.group[n]){if(s.opts.loop&&s.group.length>2)for(var a in s.slides)if(s.slides[a].index===n)return o=s.slides[a],o.pos=t,s.slides[t]=o,delete s.slides[a],s.updateSlide(o),o;e=i('<div class="fancybox-slide"></div>').appendTo(s.$refs.slider),s.slides[t]=i.extend(!0,{},s.group[n],{pos:t,$slide:e,isMoved:!1,isLoaded:!1})}return s.slides[t]},zoomInOut:function(n,o,s){var a,r,l,c,h,d=this,u=d.current,p=u.$placeholder,f=u.opts.opacity,m=u.opts.$thumb,g=m?m.offset():0,v=u.$slide.offset();return!(!(p&&u.isMoved&&g&&(c=m,"function"==typeof i&&c instanceof i&&(c=c[0]),(h=c.getBoundingClientRect()).bottom>0&&h.right>0&&h.left<(t.innerWidth||e.documentElement.clientWidth)&&h.top<(t.innerHe
872ight||e.documentElement.clientHeight)))||"In"===n&&!d.firstRun||(i.fancybox.stop(p),d.isAnimating=!0,a={top:g.top-v.top+parseFloat(m.css("border-top-width")||0),left:g.left-v.left+parseFloat(m.css("border-left-width")||0),width:m.width(),height:m.height(),scaleX:1,scaleY:1},"auto"==f&&(f=Math.abs(u.width/u.height-a.width/a.height)>.1),"In"===n?(r=a,l=d.getFitPos(u),l.scaleX=l.width/r.width,l.scaleY=l.height/r.height,f&&(r.opacity=.1,l.opacity=1)):(r=i.fancybox.getTranslate(p),l=a,u.$ghost&&(u.$ghost.show(),u.$image&&u.$image.remove()),r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,r.width=l.width,r.height=l.height,f&&(l.opacity=0)),d.updateCursor(l.width,l.height),delete l.width,delete l.height,i.fancybox.setTranslate(p,r),p.show(),d.trigger("beforeZoom"+n),p.css("transition","all "+o+"ms"),i.fancybox.setTranslate(p,l),setTimeout(function(){var t;p.css("transition","none"),(t=i.fancybox.getTranslate(p)).scaleX=1,t.scaleY=1,i.fancybox.setTranslate(p,t),d.trigger("afterZoom"+n),s.apply(d),d.isAnimating=!1},o),0))},canPan:function(){var t=this.current,e=t.$placeholder,i=!1;return e&&(i=this.getFitPos(t),i=Math.abs(e.width()-i.width)>1||Math.abs(e.height()-i.height)>1),i},isScaledDown:function(){var t=this.current,e=t.$placeholder,n=!1;return e&&(n=(n=i.fancybox.getTranslate(e)).width<t.width||n.height<t.height),n},scaleToActual:function(t,e,o){var s,a,r,l,c,h=this,d=h.current,u=d.$placeholder,p=parseInt(d.$slide.width(),10),f=parseInt(d.$slide.height(),10),m=d.width,g=d.height;u&&(h.isAnimating=!0,t=t===n?.5*p:t,e=e===n?.5*f:e,l=m/(s=i.fancybox.getTranslate(u)).width,c=g/s.height,a=.5*p-.5*m,r=.5*f-.5*g,m>p&&((a=s.left*l-(t*l-t))>0&&(a=0),a<p-m&&(a=p-m)),g>f&&((r=s.top*c-(e*c-e))>0&&(r=0),r<f-g&&(r=f-g)),h.updateCursor(m,g),i.fancybox.animate(u,null,{top:r,left:a,scaleX:l,scaleY:c},o||d.opts.speed,function(){h.isAnimating=!1}))},scaleToFit:function(t){var e,n=this,o=n.current,s=o.$placeholder;s&&(n.isAnimating=!0,e=n.getFitPos(o),n.updateCursor(e.width,e.height),i.fancybox.animate(s,null,{top:e.top,left:e.left,scaleX:e.width/s.width(),scaleY:e.height/s.height()},t||o.opts.speed,function(){n.isAnimating=!1}))},getFitPos:function(t){var e,n,o,s,a,l=t.$placeholder||t.$content,c=t.width,h=t.height,d=t.opts.margin;return!(!l||!l.length||!c&&!h)&&("number"===i.type(d)&&(d=[d,d]),2==d.length&&(d=[d[0],d[1],d[0],d[1]]),r.width()<800&&(d=[0,0,0,0]),e=parseInt(t.$slide.width(),10)-(d[1]+d[3]),n=parseInt(t.$slide.height(),10)-(d[0]+d[2]),o=Math.min(1,e/c,n/h),s=Math.floor(o*c),a=Math.floor(o*h),{top:Math.floor(.5*(n-a))+d[0],left:Math.floor(.5*(e-s))+d[3],width:s,height:a})},update:function(t,e,n,o){var s,a=this;!0!==a.isAnimating&&a.current&&(s=a.current.pos*Math.floor(a.current.$slide.width())*-1-a.current.pos*a.current.opts.gutter,n=parseInt(n,10)||0,i.fancybox.stop(a.$refs.slider),!1===t?a.updateSlide(a.current,e):i.each(a.slides,function(t,i){a.updateSlide(i,e)}),n?i.fancybox.animate(a.$refs.slider,null,{top:0,left:s},n,function(){a.current.isMoved=!0,"function"===i.type(o)&&o.apply(a)}):(i.fancybox.setTranslate(a.$refs.slider,{top:0,left:s}),a.current.isMoved=!0,"function"===i.type(o)&&o.apply(a)))},updateSlide:function(t,e){var n,o=this,s=t.$placeholder;(t=t||o.current)&&!o.isClosing&&((n=t.pos*Math.floor(t.$slide.width())+t.pos*t.opts.gutter)!==t.leftPos&&(i.fancybox.setTranslate(t.$slide,{top:0,left:n}),t.leftPos=n),!1!==e&&s&&(i.fancybox.setTranslate(s,o.getFitPos(t)),t.pos===o.currPos&&o.updateCursor()),t.$slide.trigger("refresh"),o.trigger("onUpdate",t))},updateCursor:function(t,e){var i=this,o=i.$refs.container.removeClass("fancybox-controls--canzoomIn fancybox-controls--canzoomOut fancybox-controls--canGrab");!i.isClosing&&i.opts.touch&&((t!==n&&e!==n?t<i.current.width&&e<i.current.height:i.isScaledDown())?o.addClass("fancybox-controls--canzoomIn"):i.group.length<2?o.addClass("fancybox-controls--canzoomOut"):o.addClass("fancybox-controls--canGrab"))},loadSlide:function(t){var e,n,o,s=this;if(t&&!t.isLoaded&&!t.isLoading){switch(t.isLoading=!0,s.trigger("beforeLoad",t),e=t.type,(n=t.$slide).off("refresh").trigger("onReset").addClass("fancybox-slide--"+(e||"unknown")).addClass(t.o
872pts.slideClass),e){case"image":s.setImage(t);break;case"iframe":s.setIframe(t);break;case"html":s.setContent(t,t.content);break;case"inline":i(t.src).length?s.setContent(t,i(t.src)):s.setError(t);break;case"ajax":s.showLoading(t),o=i.ajax(i.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,i){"success"===i&&s.setContent(t,e)},error:function(e,i){e&&"abort"!==i&&s.setError(t)}})),n.one("onReset",function(){o.abort()});break;default:s.setError(t)}return!0}},setImage:function(e){var n,o,s,a,r=this,l=e.opts.image.srcset;if(!e.isLoaded||e.hasError){if(l){s=t.devicePixelRatio||1,a=t.innerWidth*s,(o=l.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,i){var n=parseInt(t.substring(0,t.length-1),10);return 0===i?e.url=t:void(n&&(e.value=n,e.postfix=t[t.length-1]))}),e})).sort(function(t,e){return t.value-e.value});for(var c=0;c<o.length;c++){var h=o[c];if("w"===h.postfix&&h.value>=a||"x"===h.postfix&&h.value>=s){n=h;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value))}e.$placeholder=i('<div class="fancybox-placeholder"></div>').hide().appendTo(e.$slide),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&(e.opts.thumb||e.opts.$thumb)?(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=i("<img />").one("load error",function(){r.isClosing||(i("<img/>")[0].src=e.src,r.revealImage(e,function(){r.setBigImage(e),r.firstRun&&e.index===r.currIndex&&r.preload()}))}).addClass("fancybox-image").appendTo(e.$placeholder).attr("src",e.opts.thumb||e.opts.$thumb.attr("src"))):r.setBigImage(e)}else r.afterLoad(e)},setBigImage:function(t){var e=this,n=i("<img />");t.$image=n.one("error",function(){e.setError(t)}).one("load",function(){clearTimeout(t.timouts),t.timouts=null,e.isClosing||(t.width=this.naturalWidth,t.height=this.naturalHeight,t.opts.image.srcset&&n.attr("sizes","100vw").attr("srcset",t.opts.image.srcset),e.afterLoad(t),t.$ghost&&(t.timouts=setTimeout(function(){t.$ghost.hide()},350)))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$placeholder),n[0].complete?n.trigger("load"):n[0].error?n.trigger("error"):t.timouts=setTimeout(function(){n[0].complete||t.hasError||e.showLoading(t)},150),t.opts.image.protect&&i('<div class="fancybox-spaceball"></div>').appendTo(t.$placeholder).on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0})},revealImage:function(t,e){var n=this;return e=e||i.noop,"image"!==t.type||t.hasError||!0===t.isRevealed?void e.apply(n):(t.isRevealed=!0,void(t.pos===n.currPos&&n.zoomInOut("In",t.opts.speed,e)||(t.$ghost&&!t.isLoaded&&n.updateSlide(t,!0),t.pos===n.currPos?i.fancybox.animate(t.$placeholder,{opacity:0},{opacity:1},300,e):t.$placeholder.show(),e.apply(n))))},setIframe:function(t){var e,o=this,s=t.opts.iframe,a=t.$slide;t.$content=i('<div class="fancybox-content"></div>').css(s.css).appendTo(a),e=i(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",i.fancybox.isTouch?"auto":s.scrolling).appendTo(t.$content),s.preload?(t.$content.addClass("fancybox-tmp"),o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var i,o,a,r,l=t.$content;if(1===e[0].isReady){try{i=e.contents().find("body")}catch(t){}i&&i.length&&(s.css.width===n||s.css.height===n)&&(o=e[0].contentWindow.document.documentElement.scrollWidth,a=Math.ceil(i.outerWidth(!0)+(l.width()-o)),r=Math.ceil(i.outerHeight(!0)),l.css({width:s.css.width===n?a+(l.outerWidth()-l.innerWidth()):s.css.width,height:s.css.height===n?r+(l.outerHeight()-l.innerHeight()):s.css.height})),l.removeClass("fancybox-tmp")}})):this.afterLoad(t),e.attr("src",t.src),t.opts.smallBtn&&t.$content.prepend(t.opts.closeTpl),a.one("onReset",function(){try{i(this).find("iframe").hide().attr("src","//about:blank")}catch(t){}i(this).empty(),t.isLoaded=!1})},setContent:function(t,e){this.isClosing||(this.hideLoading(t),t.$slide.empty(),h(e)&&e.parent().length?(e.data("placeholder")&&e.parents(".fancybox-slide").trigger("onReset"),e.data({placeholder:i("<div></div>").hide().insertAfter(e)}).css("display","inline-block")):("string"===i.type(e)&&(3===(e=i("<div>").append(e).contents())[0].nodeType&&(e=i("<div>").html(e))),t.opts.selector&&(e=i("<div>").html(e).find(t.opts.selector))),t.$slide.one("onReset",function(){var n=h(e)?e.data("placeholder"):0;
872n&&(e.hide().replaceAll(n),e.data("placeholder",null)),t.hasError||(i(this).empty(),t.isLoaded=!1)}),t.$content=i(e).appendTo(t.$slide),!0===t.opts.smallBtn&&t.$content.find(".fancybox-close-small").remove().end().eq(0).append(t.opts.closeTpl),this.afterLoad(t))},setError:function(t){t.hasError=!0,this.setContent(t,t.opts.errorTpl)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=i(this.opts.spinnerTpl).appendTo(t.$slide))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterMove:function(){var t=this,e=t.current,n={};e&&(e.$slide.siblings().trigger("onReset"),i.each(t.slides,function(e,i){i.pos>=t.currPos-1&&i.pos<=t.currPos+1?n[i.pos]=i:i&&i.$slide.remove()}),t.slides=n,t.trigger("afterMove"),e.isLoaded&&t.complete())},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.$ghost||e.updateSlide(t,!0),t.index===e.currIndex&&t.isMoved?e.complete():t.$ghost||e.revealImage(t))},complete:function(){var t=this,e=t.current;t.revealImage(e,function(){e.isComplete=!0,e.$slide.addClass("fancybox-slide--complete"),t.updateCursor(),t.trigger("onComplete"),e.opts.focus&&"image"!==e.type&&"iframe"!==e.type&&t.focus()})},preload:function(){var t,e,i=this;i.group.length<2||(t=i.slides[i.currPos+1],e=i.slides[i.currPos-1],t&&"image"===t.type&&i.loadSlide(t),e&&"image"===e.type&&i.loadSlide(e))},focus:function(){var t,e=this.current;(t=e&&e.isComplete?e.$slide.find('button,:input,[tabindex],a:not(".disabled")').filter(":visible:first"):null)&&t.length||(t=this.$refs.container),t.focus(),this.$refs.slider_wrap.scrollLeft(0),e&&e.$slide.scrollTop(0)},activate:function(){var t=this;i(".fancybox-container").each(function(){var e=i(this).data("FancyBox");e&&e.uid!==t.uid&&!e.isClosing&&e.trigger("onDeactivate")}),t.current&&(t.$refs.container.index()>0&&t.$refs.container.prependTo(e.body),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t){var e=this,n=e.current,o=n.opts.speed,s=i.proxy(function(){e.cleanUp(t)},this);return!e.isAnimating&&!e.isClosing&&(!1===e.trigger("beforeClose",t)?(i.fancybox.stop(e.$refs.slider),void d(function(){e.update(!0,!0,150)})):(e.isClosing=!0,n.timouts&&clearTimeout(n.timouts),!0!==t&&i.fancybox.stop(e.$refs.slider),e.$refs.container.removeClass("fancybox-container--active").addClass("fancybox-container--closing"),n.$slide.removeClass("fancybox-slide--complete").siblings().remove(),n.isMoved||n.$slide.css("overflow","visible"),e.removeEvents(),e.hideLoading(n),e.hideControls(),e.updateCursor(),e.$refs.bg.css("transition-duration",o+"ms"),this.$refs.container.removeClass("fancybox-container--ready"),void(!0===t?setTimeout(s,o):e.zoomInOut("Out",o,s)||i.fancybox.animate(e.$refs.container,null,{opacity:0},o,"easeInSine",s))))},cleanUp:function(t){var e,n=this;n.$refs.slider.children().trigger("onReset"),n.$refs.container.empty().remove(),n.trigger("afterClose",t),n.current=null,(e=i.fancybox.getInstance())?e.activate():(i("html").removeClass("fancybox-enabled"),i("body").removeAttr("style"),r.scrollTop(n.scrollTop).scrollLeft(n.scrollLeft),i("#fancybox-noscroll").remove()),n.$lastFocus&&n.$lastFocus.focus()},trigger:function(t,n){var o,s=Array.prototype.slice.call(arguments,1),a=n&&n.opts?n:this.current;return a?s.unshift(a):a=this,s.unshift(this),i.isFunction(a.opts[t])&&(o=a.opts[t].apply(a,s)),!1===o?o:void("afterClose"===t?i(e).trigger(t+".fb",s):this.$refs.container.trigger(t+".fb",s))},toggleControls:function(t){this.isHiddenControls?this.updateControls(t):this.hideControls()},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("fancybox-show-controls"),this.$refs.container.removeClass("fancybox-show-caption")},updateControls:function(t){var e=this,n=e.$refs.container,o=e.$refs.caption,s=e.current,a=s.index,r=s.opts,l=r.caption;this.isHiddenControls&&!0!==t||(this.isHiddenControls=!1,n.addClass("fancybox-show-controls").toggleClass("fancybox-show-infobar",!!r.infobar&&e.group.length>1).toggleClass("fancybox-show-buttons",!!r.buttons).toggleClass("fancybox-is-modal",!!r.modal),i(".fancybox-button--left",n).toggleClass("fancybox-button--disabled",!r.loop&&a<=0),i(".fancybox-button--right",n).toggleClass("fancybox-button--disabled",!r.loop&&a>=e.group.length-1),i(".fancybox-button--play",n).toggle(!!(r.slideShow&&e.group.length>1)),i(".fancybox-button--close",n).toggle(!!r.closeBtn),i(".js-fancybox-count",n).html(e.group.length),i(".js-fancybox-index",n).html(a+1),s.$slide.trigger("refresh"),o&&o.empty(),l&&l.length?(o.html(l),this.$refs.container.addClass("fancybox-show-caption "),e.$caption=o):this.$refs.container.removeClass("fancybox-show-caption"))}}),i.fancybox={version:"3.0.47",defaults:a,getInstance:function(t){var e=i('.fancybox-container:not(".fancybox-container--closing"):first').data("FancyBox"),n=Array.prototype.slice.call(arguments,1
872);return e instanceof u&&("string"===i.type(t)?e[t].apply(e,n):"function"===i.type(t)&&t.apply(e,n),e)},open:function(t,e,i){return new u(t,e,i)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close())},isTouch:e.createTouch!==n&&/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),use3d:(s=e.createElement("div"),t.getComputedStyle(s).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<=11)),getTranslate:function(t){var e,i;return!(!t||!t.length)&&(e=t.get(0).getBoundingClientRect(),(i=t.eq(0).css("transform"))&&-1!==i.indexOf("matrix")?i=(i=(i=i.split("(")[1]).split(")")[0]).split(","):i=[],i.length?i=(i=i.length>10?[i[13],i[12],i[0],i[5]]:[i[5],i[4],i[0],i[3]]).map(parseFloat):i=[0,0,1,1],{top:i[0],left:i[1],scaleX:i[2],scaleY:i[3],opacity:parseFloat(t.css("opacity")),width:e.width,height:e.height})},setTranslate:function(t,e){var i="",o={};if(t&&e)return e.left===n&&e.top===n||(i=(e.left===n?t.position().top:e.left)+"px, "+(e.top===n?t.position().top:e.top)+"px",i=this.use3d?"translate3d("+i+", 0px)":"translate("+i+")"),e.scaleX!==n&&e.scaleY!==n&&(i=(i.length?i+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),i.length&&(o.transform=i),e.opacity!==n&&(o.opacity=e.opacity),e.width!==n&&(o.width=e.width),e.height!==n&&(o.height=e.height),t.css(o)},easing:{easeOutCubic:function(t,e,i,n){return i*((t=t/n-1)*t*t+1)+e},easeInCubic:function(t,e,i,n){return i*(t/=n)*t*t+e},easeOutSine:function(t,e,i,n){return i*Math.sin(t/n*(Math.PI/2))+e},easeInSine:function(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e}},stop:function(t){t.removeData("animateID")},animate:function(t,e,o,s,a,r){var l,c,h,u=this,p=null,f=0,m=function(){o.scaleX!==n&&o.scaleY!==n&&e&&e.width!==n&&e.height!==n&&(o.width=e.width*o.scaleX,o.height=e.height*o.scaleY,o.scaleX=1,o.scaleY=1),u.setTranslate(t,o),r()},g=function(i){if(l=[],c=0,t.length&&t.data("animateID")===h){if(i=i||Date.now(),p&&(c=i-p),p=i,(f+=c)>=s)return void m();for(var r in o)o.hasOwnProperty(r)&&e[r]!==n&&(e[r]==o[r]?l[r]=o[r]:l[r]=u.easing[a](f,e[r],o[r]-e[r],s));u.setTranslate(t,l),d(g)}};u.animateID=h=u.animateID===n?1:u.animateID+1,t.data("animateID",h),r===n&&"function"==i.type(a)&&(r=a,a=n),a||(a="easeOutCubic"),r=r||i.noop,e?this.setTranslate(t,e):e=this.getTranslate(t),s?(t.show(),d(g)):m()}},i.fn.fancybox=function(t){return this.off("click.fb-start").on("click.fb-start",{items:this,options:t||{}},o),this},i(e).on("click.fb-start","[data-fancybox]",o)}(window,document,window.jQuery),function(t){"use strict";var e=function(e,i,n){if(e)return n=n||"","object"===t.type(n)&&(n=t.param(n,!0)),t.each(i,function(t,i){e=e.replace("$"+t,i||"")}),n.length&&(e+=(e.indexOf("?")>0?"&":"?")+n),e},i={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:"iframe",url:"//www.metacafe.com/embed/$1/?ap=1"},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"iframe",url:"//www.dailymotion.com/embed/video/$1"},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:"iframe",url:"//vine.co/v/$1/embed/simple"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},google_maps:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12])+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}}};t(document).on("onInit.fb",function(n,o){t.each(o.group,function(n,o){var s,a,r,l,c,h,d=o.src||"",u=!1;o.type||(t.each(i,function(i,n){if(a=d.match(n.matcher),c={},h=i,a){if(u=n.type,n.paramPlace&&a[n.paramPlace]){"?"==(l=a[n.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var p=0;p<l.length;++p){var f=l[p].split("=",2);2==f.length&&(c[f[0]]=decodeURIComponent(f[1].replace(/\+/g," ")))}}return r=t.extend(!0,{},n.params,o.opts[i],c),d="function"===t.type(n.url)?n.url.call(this,a,r,o):e(n.url,a,r),s="function"===t.type(n.thumb)?n.thumb.call(this,a,r,o):e(n.thumb,a),"vimeo"===h&&
872(d=d.replace("&%23","#")),!1}}),u?(o.src=d,o.type=u,o.opts.thumb||o.opts.$thumb&&o.opts.$thumb.length||(o.opts.thumb=s),"iframe"===u&&(t.extend(!0,o.opts,{iframe:{preload:!1,scrolling:"no"},smallBtn:!1,closeBtn:!0,fullScreen:!1,slideShow:!1}),o.opts.slideClass+=" fancybox-slide--video")):o.type="iframe")})})}(window.jQuery),function(t,e,i){"use strict";var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)},o=function(e){var i=[];e=(e=e.originalEvent||e||t.e).touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var n in e)e[n].pageX?i.push({x:e[n].pageX,y:e[n].pageY}):e[n].clientX&&i.push({x:e[n].clientX,y:e[n].clientY});return i},s=function(t,e,i){return e&&t?"x"===i?t.x-e.x:"y"===i?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},a=function(t){return t.is("a")||t.is("button")||t.is("input")||t.is("select")||t.is("textarea")||i.isFunction(t.get(0).onclick)},r=function(t){var e=this;e.instance=t,e.$wrap=t.$refs.slider_wrap,e.$slider=t.$refs.slider,e.$container=t.$refs.container,e.destroy(),e.$wrap.on("touchstart.fb mousedown.fb",i.proxy(e,"ontouchstart"))};r.prototype.destroy=function(){this.$wrap.off("touchstart.fb mousedown.fb touchmove.fb mousemove.fb touchend.fb touchcancel.fb mouseup.fb mouseleave.fb")},r.prototype.ontouchstart=function(e){var n=this,r=i(e.target),l=n.instance.current,c=l.$content||l.$placeholder;return n.startPoints=o(e),n.$target=r,n.$content=c,n.canvasWidth=Math.round(l.$slide[0].clientWidth),n.canvasHeight=Math.round(l.$slide[0].clientHeight),n.startEvent=e,e.originalEvent.clientX>n.canvasWidth+l.$slide.offset().left||(a(r)||a(r.parent())||function(e){for(var i=!1;n=e.get(0),o=t.getComputedStyle(n)["overflow-y"],s=t.getComputedStyle(n)["overflow-x"],a=("scroll"===o||"auto"===o)&&n.scrollHeight>n.clientHeight,r=("scroll"===s||"auto"===s)&&n.scrollWidth>n.clientWidth,!(i=a||r)&&(e=e.parent()).length&&!e.hasClass("fancybox-slider")&&!e.is("body"););var n,o,s,a,r;return i}(r)?void 0:l.opts.touch?void(e.originalEvent&&2==e.originalEvent.button||(e.stopPropagation(),e.preventDefault(),!l||n.instance.isAnimating||n.instance.isClosing||!n.startPoints||n.startPoints.length>1&&!l.isMoved||(n.$wrap.off("touchmove.fb mousemove.fb",i.proxy(n,"ontouchmove")),n.$wrap.off("touchend.fb touchcancel.fb mouseup.fb mouseleave.fb",i.proxy(n,"ontouchend")),n.$wrap.on("touchend.fb touchcancel.fb mouseup.fb mouseleave.fb",i.proxy(n,"ontouchend")),n.$wrap.on("touchmove.fb mousemove.fb",i.proxy(n,"ontouchmove")),n.startTime=(new Date).getTime(),n.distanceX=n.distanceY=n.distance=0,n.canTap=!1,n.isPanning=!1,n.isSwiping=!1,n.isZooming=!1,n.sliderStartPos=i.fancybox.getTranslate(n.$slider),n.contentStartPos=i.fancybox.getTranslate(n.$content),n.contentLastPos=null,1!==n.startPoints.length||n.isZooming||(n.canTap=l.isMoved,"image"===l.type&&(n.contentStartPos.width>n.canvasWidth+1||n.contentStartPos.height>n.canvasHeight+1)?(i.fancybox.stop(n.$content),n.isPanning=!0):(i.fancybox.stop(n.$slider),n.isSwiping=!0),n.$container.addClass("fancybox-controls--isGrabbing")),2===n.startPoints.length&&l.isMoved&&!l.hasError&&"image"===l.type&&(l.isLoaded||l.$ghost)&&(n.isZooming=!0,n.isSwiping=!1,n.isPanning=!1,i.fancybox.stop(n.$content),n.centerPointStartX=.5*(n.startPoints[0].x+n.startPoints[1].x)-i(t).scrollLeft(),n.centerPointStartY=.5*(n.startPoints[0].y+n.startPoints[1].y)-i(t).scrollTop(),n.percentageOfImageAtPinchPointX=(n.centerPointStartX-n.contentStartPos.left)/n.contentStartPos.width,n.percentageOfImageAtPinchPointY=(n.centerPointStartY-n.contentStartPos.top)/n.contentStartPos.height,n.startDistanceBetweenFingers=s(n.startPoints[0],n.startPoints[1]))))):(n.endPoints=n.startPoints,n.ontap()))},r.prototype.ontouchmove=function(t){var e=this;t.preventDefault(),e.newPoints=o(t),e.newPoints&&e.newPoints.length&&(e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe():e.isPanning?e.onPan():e.isZooming&&e.onZoom()))},r.prototype.onSwipe=function(){var e,o=this,s=o.isSwiping,a=o.sliderStartPos.left;!0===s?Math.abs(o.distance)>10&&(o.instance.group.length<2?o.isSwiping="y":!o.instance.current.isMoved||!1===o.instance.opts.touch.vertical||"auto"===o.instance.opts.touch.vertical&&i(t).width()>
872800?o.isSwiping="x":(e=Math.abs(180*Math.atan2(o.distanceY,o.distanceX)/Math.PI),o.isSwiping=e>45&&e<135?"y":"x"),o.canTap=!1,o.instance.current.isMoved=!1,o.startPoints=o.newPoints):("x"==s&&(!o.instance.current.opts.loop&&0===o.instance.current.index&&o.distanceX>0?a+=Math.pow(o.distanceX,.8):!o.instance.current.opts.loop&&o.instance.current.index===o.instance.group.length-1&&o.distanceX<0?a-=Math.pow(-o.distanceX,.8):a+=o.distanceX),o.sliderLastPos={top:"x"==s?0:o.sliderStartPos.top+o.distanceY,left:a},n(function(){i.fancybox.setTranslate(o.$slider,o.sliderLastPos)}))},r.prototype.onPan=function(){var t,e,o,s=this;s.canTap=!1,t=s.contentStartPos.width>s.canvasWidth?s.contentStartPos.left+s.distanceX:s.contentStartPos.left,e=s.contentStartPos.top+s.distanceY,(o=s.limitMovement(t,e,s.contentStartPos.width,s.contentStartPos.height)).scaleX=s.contentStartPos.scaleX,o.scaleY=s.contentStartPos.scaleY,s.contentLastPos=o,n(function(){i.fancybox.setTranslate(s.$content,s.contentLastPos)})},r.prototype.limitMovement=function(t,e,i,n){var o,s,a,r,l=this,c=l.canvasWidth,h=l.canvasHeight,d=l.contentStartPos.left,u=l.contentStartPos.top,p=l.distanceX,f=l.distanceY;return o=Math.max(0,.5*c-.5*i),s=Math.max(0,.5*h-.5*n),a=Math.min(c-i,.5*c-.5*i),r=Math.min(h-n,.5*h-.5*n),i>c&&(p>0&&t>o&&(t=o-1+Math.pow(-o+d+p,.8)||0),p<0&&t<a&&(t=a+1-Math.pow(a-d-p,.8)||0)),n>h&&(f>0&&e>s&&(e=s-1+Math.pow(-s+u+f,.8)||0),f<0&&e<r&&(e=r+1-Math.pow(r-u-f,.8)||0)),{top:e,left:t}},r.prototype.limitPosition=function(t,e,i,n){var o=this.canvasWidth,s=this.canvasHeight;return i>o?t=(t=t>0?0:t)<o-i?o-i:t:t=Math.max(0,o/2-i/2),n>s?e=(e=e>0?0:e)<s-n?s-n:e:e=Math.max(0,s/2-n/2),{top:e,left:t}},r.prototype.onZoom=function(){var e=this,o=e.contentStartPos.width,a=e.contentStartPos.height,r=e.contentStartPos.left,l=e.contentStartPos.top,c=s(e.newPoints[0],e.newPoints[1])/e.startDistanceBetweenFingers,h=Math.floor(o*c),d=Math.floor(a*c),u=(o-h)*e.percentageOfImageAtPinchPointX,p=(a-d)*e.percentageOfImageAtPinchPointY,f=(e.newPoints[0].x+e.newPoints[1].x)/2-i(t).scrollLeft(),m=(e.newPoints[0].y+e.newPoints[1].y)/2-i(t).scrollTop(),g=f-e.centerPointStartX,v={top:l+(p+(m-e.centerPointStartY)),left:r+(u+g),scaleX:e.contentStartPos.scaleX*c,scaleY:e.contentStartPos.scaleY*c};e.canTap=!1,e.newWidth=h,e.newHeight=d,e.contentLastPos=v,n(function(){i.fancybox.setTranslate(e.$content,e.contentLastPos)})},r.prototype.ontouchend=function(t){var e=this,n=e.instance.current,s=Math.max((new Date).getTime()-e.startTime,1),a=e.isSwiping,r=e.isPanning,l=e.isZooming;return e.endPoints=o(t),e.$container.removeClass("fancybox-controls--isGrabbing"),e.$wrap.off("touchmove.fb mousemove.fb",i.proxy(this,"ontouchmove")),e.$wrap.off("touchend.fb touchcancel.fb mouseup.fb mouseleave.fb",i.proxy(this,"ontouchend")),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.canTap?e.ontap():(e.velocityX=e.distanceX/s*.5,e.velocityY=e.distanceY/s*.5,e.speed=n.opts.speed||330,e.speedX=Math.max(.75*e.speed,Math.min(1.5*e.speed,1/Math.abs(e.velocityX)*e.speed)),e.speedY=Math.max(.75*e.speed,Math.min(1.5*e.speed,1/Math.abs(e.velocityY)*e.speed)),void(r?e.endPanning():l?e.endZooming():e.endSwiping(a)))},r.prototype.endSwiping=function(t){var e=this;"y"==t&&Math.abs(e.distanceY)>50?(i.fancybox.animate(e.$slider,null,{top:e.sliderStartPos.top+e.distanceY+150*e.velocityY,left:e.sliderStartPos.left,opacity:0},e.speedY),e.instance.close(!0)):"x"==t&&e.distanceX>50?e.instance.previous(e.speedX):"x"==t&&e.distanceX<-50?e.instance.next(e.speedX):e.instance.update(!1,!0,150)},r.prototype.endPanning=function(){var t,e,n,o=this;o.contentLastPos&&(t=o.contentLastPos.left+o.velocityX*o.speed*2,e=o.contentLastPos.top+o.velocityY*o.speed*2,(n=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,n.height=o.contentStartPos.height,i.fancybox.animate(o.$content,null,n,o.speed,"easeOutSine"))},r.prototype.endZooming=function(){var t,e,n,o,s=this,a=s.instance.current,r=s.newWidth,l=s.newHeight;s.contentLastPos&&(t=s.contentLastPos.left,o={top:e=s.contentLastPos.top,left
872:t,width:r,height:l,scaleX:1,scaleY:1},i.fancybox.setTranslate(s.$content,o),r<s.canvasWidth&&l<s.canvasHeight?s.instance.scaleToFit(150):r>a.width||l>a.height?s.instance.scaleToActual(s.centerPointStartX,s.centerPointStartY,150):(n=s.limitPosition(t,e,r,l),i.fancybox.animate(s.$content,null,n,s.speed,"easeOutSine")))},r.prototype.ontap=function(){var t=this,e=t.instance,n=e.current,o=t.endPoints[0].x,s=t.endPoints[0].y;if(o-=t.$wrap.offset().left,s-=t.$wrap.offset().top,e.SlideShow&&e.SlideShow.isActive&&e.SlideShow.stop(),!i.fancybox.isTouch)return n.opts.closeClickOutside&&t.$target.is(".fancybox-slide")?void e.close(t.startEvent):void("image"==n.type&&n.isMoved&&(e.canPan()?e.scaleToFit():e.isScaledDown()?e.scaleToActual(o,s):e.group.length<2&&e.close(t.startEvent)));if(t.tapped){if(clearTimeout(t.tapped),t.tapped=null,Math.abs(o-t.x)>50||Math.abs(s-t.y)>50||!n.isMoved)return this;"image"==n.type&&(n.isLoaded||n.$ghost)&&(e.canPan()?e.scaleToFit():e.isScaledDown()&&e.scaleToActual(o,s))}else t.x=o,t.y=s,t.tapped=setTimeout(function(){t.tapped=null,e.toggleControls(!0)},300);return this},i(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new r(e))}),i(e).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,window.jQuery),function(t,e){"use strict";var i=function(t){this.instance=t,this.init()};e.extend(i.prototype,{timer:null,isActive:!1,$button:null,speed:3e3,init:function(){var t=this;t.$button=e('<button data-fancybox-play class="fancybox-button fancybox-button--play" title="Slideshow (P)"></button>').appendTo(t.instance.$refs.buttons),t.instance.$refs.container.on("click","[data-fancybox-play]",function(){t.toggle()})},set:function(){var t=this;t.instance&&t.instance.current&&(t.instance.current.opts.loop||t.instance.currIndex<t.instance.group.length-1)?t.timer=setTimeout(function(){t.instance.next()},t.instance.current.opts.slideShow.speed||t.speed):t.stop()},clear:function(){clearTimeout(this.timer),this.timer=null},start:function(){var t=this;t.stop(),t.instance&&t.instance.current&&(t.instance.current.opts.loop||t.instance.currIndex<t.instance.group.length-1)&&(t.instance.$refs.container.on({"beforeLoad.fb.player":e.proxy(t,"clear"),"onComplete.fb.player":e.proxy(t,"set")}),t.isActive=!0,t.instance.current.isComplete&&t.set(),t.instance.$refs.container.trigger("onPlayStart"),t.$button.addClass("fancybox-button--pause"))},stop:function(){this.clear(),this.instance.$refs.container.trigger("onPlayEnd").off(".player"),this.$button.removeClass("fancybox-button--pause"),this.isActive=!1},toggle:function(){this.isActive?this.stop():this.start()}}),e(t).on("onInit.fb",function(t,e){e&&e.group.length>1&&e.opts.slideShow&&!e.SlideShow&&(e.SlideShow=new i(e))}),e(t).on("beforeClose.fb onDeactivate.fb",function(t,e){e&&e.SlideShow&&e.SlideShow.stop()})}(document,window.jQuery),function(t,e){"use strict";var i=function(){var e,i,n,o=[["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"]],s={};for(i=0;i<o.length;i++)if(e=o[i],e&&e[1]in t){for(n=0;n<e.length;n++)s[o[0][n]]=e[n];return s}return!1}();if(i){var n={request:function(e){(e=e||t.documentElement)[i.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[i.exitFullscreen]()},toggle:function(t){this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(t[i.fullscreenElement])},enabled:function(){return Boolean(t[i.fullscreenEnabled])}};e(t).on({"onInit.fb":function(t,i){var o;i&&i.opts.fullScreen&&!i.FullScreen&&(o=i.$refs.container,i.$refs.button_fs=e('<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fullscreen" title="Full screen (F)"></button>').appendTo(i.$refs.buttons),o.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle(o[0])}
872),!0===i.opts.fullScreen.requestOnStart&&n.request(o[0]))},"beforeMove.fb":function(t,e){e&&e.$refs.button_fs&&e.$refs.button_fs.toggle(!!e.current.opts.fullScreen)},"beforeClose.fb":function(){n.exit()}}),e(t).on(i.fullscreenchange,function(){var t=e.fancybox.getInstance(),i=t?t.current.$placeholder:null;i&&(i.css("transition","none"),t.isAnimating=!1,t.update(!0,!0,0))})}}(document,window.jQuery),function(t,e){"use strict";var i=function(t){this.instance=t,this.init()};e.extend(i.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,init:function(){var t=this;t.$button=e('<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="Thumbnails (G)"></button>').appendTo(this.instance.$refs.buttons).on("touchend click",function(e){e.stopPropagation(),e.preventDefault(),t.toggle()})},create:function(){var t,i,n=this.instance;this.$grid=e('<div class="fancybox-thumbs"></div>').appendTo(n.$refs.container),t="<ul>",e.each(n.group,function(e,n){(i=n.opts.thumb||(n.opts.$thumb?n.opts.$thumb.attr("src"):null))||"image"!==n.type||(i=n.src),i&&i.length&&(t+='<li data-index="'+e+'" tabindex="0" class="fancybox-thumbs-loading"><img data-src="'+i+'" /></li>')}),t+="</ul>",this.$list=e(t).appendTo(this.$grid).on("click touchstart","li",function(){n.jumpTo(e(this).data("index"))}),this.$list.find("img").hide().one("load",function(){var t,i,n,o,s=e(this).parent().removeClass("fancybox-thumbs-loading"),a=s.outerWidth(),r=s.outerHeight();t=this.naturalWidth||this.width,o=(i=this.naturalHeight||this.height)/r,(n=t/a)>=1&&o>=1&&(n>o?(t/=o,i=r):(t=a,i/=n)),e(this).css({width:Math.floor(t),height:Math.floor(i),"margin-top":Math.min(0,Math.floor(.3*r-.3*i)),"margin-left":Math.min(0,Math.floor(.5*a-.5*t))}).show()}).each(function(){this.src=e(this).data("src")})},focus:function(){this.instance.current&&this.$list.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+this.instance.current.index+'"]').addClass("fancybox-thumbs-active").focus()},close:function(){this.$grid.hide()},update:function(){this.instance.$refs.container.toggleClass("fancybox-container--thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.$grid.show(),this.focus()):this.$grid&&this.$grid.hide(),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible?this.hide():this.show()}}),e(t).on("onInit.fb",function(t,e){var n=e.group[0],o=e.group[1];e.opts.thumbs&&!e.Thumbs&&e.group.length>1&&("image"==n.type||n.opts.thumb||n.opts.$thumb)&&("image"==o.type||o.opts.thumb||o.opts.$thumb)&&(e.Thumbs=new i(e))}),e(t).on("beforeMove.fb",function(t,e,i){var n=e&&e.Thumbs;n&&(i.modal?(n.$button.hide(),n.hide()):(!0===e.opts.thumbs.showOnStart&&e.firstRun&&n.show(),n.$button.show(),n.isVisible&&n.focus()))}),e(t).on("beforeClose.fb",function(t,e){e&&e.Thumbs&&(e.Thumbs.isVisible&&!1!==e.opts.thumbs.hideOnClosing&&e.Thumbs.close(),e.Thumbs=null)})}(document,window.jQuery),function(t,e,i){"use strict";function n(){var t=e.location.hash.substr(1),i=t.split("-"),n=i.length>1&&/^\+?\d+$/.test(i[i.length-1])&&parseInt(i.pop(-1),10)||1,o=i.join("-");return n<1&&(n=1),{hash:t,index:n,gallery:o}}function o(t){var e;""!==t.gallery&&((e=i("[data-fancybox='"+i.escapeSelector(t.gallery)+"']").eq(t.index-1)).length?e.trigger("click"):i("#"+i.escapeSelector(t.gallery)).trigger("click"))}function s(t){var e;return!!t&&((e=t.current?t.current.opts:t.opts).$orig?e.$orig.data("fancybox"):e.hash||"")}i.escapeSelector||(i.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})});var a=null;i(function(){setTimeout(function(){!1!==i.fancybox.defaults.hash&&(i(e).on("hashchange.fb",function(){var t=n();i.fancybox.getInstance()?a&&a!==t.gallery+"-"+t.index&&(a=null,i.fancybox.close()):""!==t.gallery&&o(t)}),i(t).on({"onInit.fb":function(t,e){var i=n(),o=s(e);o&&i.gallery&&o==i.gallery&&(e.currIndex=i.index-1)}
872,"beforeMove.fb":function(i,n,o){var r=s(n);r&&""!==r&&(e.location.hash.indexOf(r)<0&&(n.opts.origHash=e.location.hash),a=r+(n.group.length>1?"-"+(o.index+1):""),"pushState"in history?history.pushState("",t.title,e.location.pathname+e.location.search+"#"+a):e.location.hash=a)},"beforeClose.fb":function(i,n,o){var r=s(n),l=n&&n.opts.origHash?n.opts.origHash:"";r&&""!==r&&("pushState"in history?history.pushState("",t.title,e.location.pathname+e.location.search+l):e.location.hash=l),a=null}}),o(n()))},50)})}(document,window,window.jQuery),function(t){t.fn.animateCss||t.fn.extend({animateCss:function(t,e,i){return this.css({visibility:"visible","-moz-animation-delay":i,"-webkit-animation-delay":i,"animation-delay":i,"-moz-animation-duration":e,"-webkit-animation-duration":e,"animation-duration":e}),this.addClass("animated "+t).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){}),this}})}(jQuery),jQuery(function(t){t("[data-fancybox]").fancybox({youtube:{controls:1,showinfo:0,autoplay:1},vimeo:{color:"f00",autoplay:1}}),t("[target=lightbox]").fancybox({iframe:{attr:{scrolling:!0}}}),t(document).on("onInit.fb",function(e,i){t.each(i.group,function(t,e){if("iframe"===e.type)try{e.opts.iframe.scrolling="auto"}catch(t){}})})}),function(t){t(document).on("ope-mobile-menu-show.multilanguage",function(){polylangLinksAddedInMenu=!0;var e=t("#fm2_drop_mainmenu_jq_menu_back div.menu ul"),i=t(".mesmerize-language-switcher a");i.length&&i.each(function(){var i=t(this),n=t('<li class="ellipsis pll-mobile-menu-item"><a href=#"><p class="xtd_menu_ellipsis"><font class="leaf"></font></p></a></li>');n.find("a").attr("href",i.attr("href")),n.find(".leaf").html(i.html()),e.append(n)}),t(document).off("ope-mobile-menu-show.multilanguage")}),t(document).on("tap",".mesmerize-language-switcher",function(e){var i=t(this);if(i.hasClass("hover")){var n=0!==t(e.target).closest(".current-lang").length;(n=n||t(e.target).hasClass("current-lang"))&&(e.preventDefault(),e.stopPropagation())}else e.preventDefault(),e.stopPropagation(),i.addClass("hover")})}(jQuery),function(t){var e={"contentswap-effect":{effectType:"",contentType:"overlay",overflowEnabled:"false",effectDelay:"800",effectEasing:"Ease",overlayColor:"490A3D",innerColor:"ffffff",openPage:"same",name:"",captionType:"490A3D",operationType:"edit",hasls:"true",additionalWrapperClasses:"",direction:"bottom",useSameTemplate:"true"}},i=setTimeout(function(){window.initHoverFX&&initHoverFX(e)},10);jQuery(window).resize(function(t){clearTimeout(i),i=setTimeout(function(){window.initHoverFX&&initHoverFX(e,null,t)},150)})}(jQuery),function(t){var e=!!window.mesmerize_theme_pro_settings&&mesmerize_theme_pro_settings["reveal-effect"];if(e&&e.enabled&&!parent.CP_Customizer){var i=t(".header-description-row *:not(div)"),n=0;i.each(function(){t(this).attr("data-reveal-fx",!0),t(this).attr("data-reveal-fx-delay",n),n+=1/i.length}),function e(i){i.children().each(function(){i.is(".row")&&(t(this).find(".row").length>1?t(this).css("visibility","visible"):t(this).attr("data-reveal-fx",!0)),e(t(this))})}(t(".content")),t(window).on("scroll",function(){o()}),o()}function o(){t("[data-reveal-fx]:not(.animated)").each(function(){var e=t(this);if(e.isInView(!1)){var i=0,n=e.siblings().length;t(this).isInView(!1)&&(t(this).animateCss("fadeIn","2s",(t(this).attr("data-reveal-fx-delay")||i)+"s"),i+=1/n)}})}}(jQuery); 873 ; 874!function(){var e={6879:function(e){!function(t){var i=function(e,t,i){"use strict";var n,r;if(function(){var t,i={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in r=e.lazySizesConfig||e.lazysizesConfig||{},i)t in r||(r[t]=i[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:r,noSupport:!0};var a=t.documentElement,o=e.HTMLPictureElement,s="addEventListener",u="getAttribute",l=e[s].bind(e),c=e.setTimeout,d=e.requestAnimationFrame||c,f=e.requestIdleCallback,v=/^picture$/i,h=["load","error","lazyincluded","_lazyloaded"],y={},m=Array.prototype.forEach,g=function(e,t){return y[t]||(y[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),y[t].test(e[u]("class")||"")&&y[t]},p=function(e,t){g(e,t)||e.setAttribute("class",(e[u]("class")||"").trim()+" "+t)},b=function(e,t){var i;(i=g(e,t))&&e.setAttribute("class",(e[u]("class")||"").replace(i," "))},z=function(e,t,i){var n=i?s:"removeEventListener";i&&z(e,t),h.forEach(function(i){e[n](i,t)})},S=function(e,i,r,a,o){var s=t.createEvent("Event");return r||(r={}),r.instance=n,s.initEvent(i,!a,!o),s.detail=r,e.dispatchEvent(s),s},w=function(t,i){var n;!o&&(n=e.picturefill||r.pf)?(i&&i.src&&!t[u]("srcset")&&t.setAttribute("srcset",i.src),n({reevaluate:!0,elements:[t]})):i&&i.src&&(t.src=i.src)},A=function(e,t){return(getComputedStyle(e,null)||{})[t]},E=function(e,t,i){for(i=i||e.offsetWidth;i<r.minSize&&t&&!e._lazysizesWidth;)i=t.offsetWidth,t=t.parentNode;return i},k=(pe=[],be=[],ze=pe,Se=function(){var e=ze;for(ze=pe.length?be:pe,me=!0,ge=!1;e.length;)e.shift()();me=!1},we=function(e,i){me&&!i?e.apply(this,arguments):(ze.push(e),ge||(ge=!0,(t.hidden?c:d)(Se)))},we._lsFlush=Se,we),C=function(e,t){return t?function(){k(e)}:function(){var t=this,i=arguments;k(function(){e.apply(t,i)})}},R=function(e){var t,n=0,a=r.throttleDelay,o=r.ricTimeout,s=function(){t=!1,n=i.now(),e()},u=f&&o>49?function(){f(s,{timeout:o}),o!==r.ricTimeout&&(o=r.ricTimeout)}:C(function(){c(s)},!0);return function(e){var r;(e=!0===e)&&(o=33),t||(t=!0,(r=a-(i.now()-n))<0&&(r=0),e||r<9?u():c(u,r))}},L=function(e){var t,n,r=99,a=function(){t=null,e()},o=function(){var e=i.now()-n;e<r?c(o,r-e):(f||a)(a)};return function(){n=i.now(),t||(t=c(o,r))}},M=(Q=/^img$/i,J=/^iframe$/i,K="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),X=0,Y=0,Z=0,ee=-1,te=function(e){Z--,(!e||Z<0||!e.target)&&(Z=0)},ie=function(e){return null==H&&(H="hidden"==A(t.body,"visibility")),H||!("hidden"==A(e.parentNode,"visibility")&&"hidden"==A(e,"visibility"))},ne=function(e,i){var n,r=e,o=ie(e);for(U-=i,G+=i,q-=i,$+=i;o&&(r=r.offsetParent)&&r!=t.body&&r!=a;)(o=(A(r,"opacity")||1)>0)&&"visible"!=A(r,"overflow")&&(n=r.getBoundingClientRect(),o=$>n.left&&q<n.right&&G>n.top-1&&U<n.bottom+1);return o},re=function(){var e,i,o,s,l,c,d,f,v,h,y,m,g=n.elements;if((T=r.loadMode)&&Z<8&&(e=g.length)){for(i=0,ee++;i<e;i++)if(g[i]&&!g[i]._lazyRace)if(!K||n.prematureUnveil&&n.prematureUnveil(g[i]))fe(g[i]);else if((f=g[i][u]("data-expand"))&&(c=1*f)||(c=Y),h||(h=!r.expand||r.expand<1?a.clientHeight>500&&a.clientWidth>500?500:370:r.expand,n._defEx=h,y=h*r.expFactor,m=r.hFac,H=null,Y<y&&Z<1&&ee>2&&T>2&&!t.hidden?(Y=y,ee=0):Y=T>1&&ee>1&&Z<6?h:X),v!==c&&(j=innerWidth+c*m,B=innerHeight+c,d=-1*c,v=c),o=g[i].getBoundingClientRect(),(G=o.bottom)>=d&&(U=o.top)<=B&&($=o.right)>=d*m&&(q=o.left)<=j&&(G||$||q||U)&&(r.loadHidden||ie(g[i]))&&(D&&Z<3&&!f&&(T<3||ee<4)||ne(g[i],c))){if(fe(g[i]),l=!0,Z>9)break}else!l&&D&&!s&&Z<4&&ee<4&&T>
8742&&(I[0]||r.preloadAfterLoad)&&(I[0]||!f&&(G||$||q||U||"auto"!=g[i][u](r.sizesAttr)))&&(s=I[0]||g[i]);s&&!l&&fe(s)}},ae=R(re),oe=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(te(e),p(t,r.loadedClass),b(t,r.loadingClass),z(t,ue),S(t,"lazyloaded"))},se=C(oe),ue=function(e){se({target:e.target})},le=function(e,t){var i=e.getAttribute("data-load-mode")||r.iframeLoadMode;0==i?e.contentWindow.location.replace(t):1==i&&(e.src=t)},ce=function(e){var t,i=e[u](r.srcsetAttr);(t=r.customMedia[e[u]("data-media")||e[u]("media")])&&e.setAttribute("media",t),i&&e.setAttribute("srcset",i)},de=C(function(e,t,i,n,a){var o,s,l,d,f,h;(f=S(e,"lazybeforeunveil",t)).defaultPrevented||(n&&(i?p(e,r.autosizesClass):e.setAttribute("sizes",n)),s=e[u](r.srcsetAttr),o=e[u](r.srcAttr),a&&(d=(l=e.parentNode)&&v.test(l.nodeName||"")),h=t.firesLoad||"src"in e&&(s||o||d),f={target:e},p(e,r.loadingClass),h&&(clearTimeout(V),V=c(te,2500),z(e,ue,!0)),d&&m.call(l.getElementsByTagName("source"),ce),s?e.setAttribute("srcset",s):o&&!d&&(J.test(e.nodeName)?le(e,o):e.src=o),a&&(s||d)&&w(e,{src:o})),e._lazyRace&&delete e._lazyRace,b(e,r.lazyClass),k(function(){var t=e.complete&&e.naturalWidth>1;h&&!t||(t&&p(e,r.fastLoadedClass),oe(f),e._lazyCache=!0,c(function(){"_lazyCache"in e&&delete e._lazyCache},9)),"lazy"==e.loading&&Z--},!0)}),fe=function(e){if(!e._lazyRace){var t,i=Q.test(e.nodeName),n=i&&(e[u](r.sizesAttr)||e[u]("sizes")),a="auto"==n;(!a&&D||!i||!e[u]("src")&&!e.srcset||e.complete||g(e,r.errorClass)||!g(e,r.lazyClass))&&(t=S(e,"lazyunveilread").detail,a&&O.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,Z++,de(e,t,a,n,i))}},ve=L(function(){r.loadMode=3,ae()}),he=function(){3==r.loadMode&&(r.loadMode=2),ve()},ye=function(){D||(i.now()-_<999?c(ye,999):(D=!0,r.loadMode=3,ae(),l("scroll",he,!0)))},{_:function(){_=i.now(),n.elements=t.getElementsByClassName(r.lazyClass),I=t.getElementsByClassName(r.lazyClass+" "+r.preloadClass),l("scroll",ae,!0),l("resize",ae,!0),l("pageshow",function(e){if(e.persisted){var i=t.querySelectorAll("."+r.loadingClass);i.length&&i.forEach&&d(function(){i.forEach(function(e){e.complete&&fe(e)})})}}),e.MutationObserver?new MutationObserver(ae).observe(a,{childList:!0,subtree:!0,attributes:!0}):(a[s]("DOMNodeInserted",ae,!0),a[s]("DOMAttrModified",ae,!0),setInterval(ae,999)),l("hashchange",ae,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){t[s](e,ae,!0)}),/d$|^c/.test(t.readyState)?ye():(l("load",ye),t[s]("DOMContentLoaded",ae),c(ye,2e4)),n.elements.length?(re(),k._lsFlush()):ae()},checkElems:ae,unveil:fe,_aLSL:he}),O=(F=C(function(e,t,i,n){var r,a,o;if(e._lazysizesWidth=n,n+="px",e.setAttribute("sizes",n),v.test(t.nodeName||""))for(a=0,o=(r=t.getElementsByTagName("source")).length;a<o;a++)r[a].setAttribute("sizes",n);i.detail.dataAttr||w(e,i.detail)}),x=function(e,t,i){var n,r=e.parentNode;r&&(i=E(e,r,i),(n=S(e,"lazybeforesizes",{width:i,dataAttr:!!t})).defaultPrevented||(i=n.detail.width)&&i!==e._lazysizesWidth&&F(e,r,n,i))},W=L(function(){var e,t=P.length;if(t)for(e=0;e<t;e++)x(P[e])}),{_:function(){P=t.getElementsByClassName(r.autosizesClass),l("resize",W)},checkElems:W,updateElem:x}),N=function(){!N.i&&t.getElementsByClassName&&(N.i=!0,O._(),M._())};var P,F,x,W;var I,D,V,T,_,j,B,U,q,$,G,H,Q,J,K,X,Y,Z,ee,te,ie,ne,re,ae,oe,se,ue,le,ce,de,fe,ve,he,ye;var me,ge,pe,be,ze,Se,we;return c(function(){r.init&&N()}),n={cfg:r,autoSizer:O,loader:M,init:N,uP:w,aC:p,rC:b,hC:g,fire:S,gW:E,rAF:k}}(t,t.document,Date);t.lazySizes=i,e.exports&&(e.exports=i)}("undefined"!=typeof window?window:{})}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.cw=function(e){var t;return function(){if(e){var i=e;e=0,t={exports:{}},i.call(t.exports,t,t.exports)}return t.exports}},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.dn=function(e){var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},function(){"use strict";var e=i.cw(function(e,i){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,a,o,s=[],u=!0,l=!1;try{if(a=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=a.call(i)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}
874finally{try{if(!u&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}t();var u="smushcdn.com",l="data-original-sizes",c="data-srcset",d=["gif","jpg","jpeg","png","webp"],f="w",v=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.precision,n=void 0===i?0:i,r=t.skipAutoWidth,a=void 0!==r&&r,o=t.cdnBaseURL,s=void 0===o?"":o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.precision=parseInt(n,10),this.precision=isNaN(this.precision)?0:this.precision,this.skipAutoWidth=a,this.cdnBaseURL="string"==typeof s?s.trim():"",this.initEventListeners()},i=[{key:"initEventListeners",value:function(){var e=this;document.addEventListener("lazybeforesizes",function(i){var n;(0,t().G)(null===(n=i.detail)||void 0===n?void 0:n.instance)&&e.maybeAutoResize(i)})}},{key:"maybeAutoResize",value:function(e){var t,i,n,r=e.target,a=null===(t=e.detail)||void 0===t?void 0:t.width;if("IMG"===(null==r?void 0:r.nodeName)&&a)if(null===(i=e.detail)||void 0===i?void 0:i.dataAttr){if(this.isElementEligibleForResizing(r))if(this.shouldRevertToOriginalSizes(r,a))this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{var o=this.triggerEvent(r,"smush:beforeSizes",{resizeWidth:a});if(o.defaultPrevented)this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{a=(null===(n=o.detail)||void 0===n?void 0:n.resizeWidth)||a;var s=this.getDataSrc(r);this.isFromSmushCDN(s)&&(this.resizeImageWithCDN(r,a),this.isChildOfPicture(r)&&this.resizeSourceElements(r.parentNode.querySelectorAll("source"),a))}}}else this.getOriginalSizesAttr(r)||e.preventDefault()}},{key:"shouldAutoResize",value:function(e,t){var i=e.parentNode;if(i&&this.isInlineElement(i)){if("PICTURE"===i.nodeName)return!1;var n=i.clientWidth,r=e.offsetWidth;if(t===n&&n===r)return!1}return!0}},{key:"isInlineElement",value:function(e){if(!e||1!==e.nodeType)return!1;var t=window.getComputedStyle(e).display;return"inline"===t||"inline-block"===t}},{key:"isChildOfPicture",value:function(e){var t;return e&&"PICTURE"===(null==e||null===(t=e.parentNode)||void 0===t?void 0:t.nodeName)}},{key:"resizeSourceElements",value:function(e,t){var i=this;e&&null!=e&&e.length&&e.forEach(function(e){return i.resizeSourceElement(e,t)})}},{key:"resizeSourceElement",value:function(e,t){var i=e.getAttribute(c);if(i){var n=this.parseSrcSet(i);if(n&&n.length)if(1===n.length&&""===n[0].unit)this.resizeNonResponsiveSource(e,n[0].src,t);else{var r=this.getBaseSourceSrcForResize(n,t);this.isFromSmushCDN(r)&&this.updateSrcsetForResize(e,i,r,t,n)}}}},{key:"resizeNonResponsiveSource",value:function(e,t,i){if(this.isFromSmushCDN(t)&&this.isSourceActive(e)){var n=this.getResizedCDNURL(t,i),r=this.getPixelRatio();if(r>1){var a=Math.ceil(i*r),o=this.getResizedCDNURL(t,a)+" "+a+f;n+=" ".concat(i).concat(f,", ").concat(o)}this.updateElementSrcset(e,null,n)}}},{key:"isSourceActive",value:function(e){var t,i=e.getAttribute("media");return!(i&&(null===(t=window)||void 0===t||null===(t=t.matchMedia(i))||void 0===t||!t.matches))}},{key:"getBaseSourceSrcForResize",value:function(e,t){var i=e[0];return f!==i.unit?null:!this.isThumbnail(i.src)||i.value>=t?i.src:null}},{key:"isElementEligibleForResizing",value:function(e){var t=this.getOriginalSizesAttr(e),i=this.getDataSrc(e),n=this.getDataSrcSet(e);return Boolean(t&&i&&n)}},{key:"shouldRevertToOriginalSizes",value:function(e,t){if("auto"===this.getElementWidth(e))return this.shouldSkipAutoWidth();var i=this.getOriginalSizesAttr(e),n=this.getMaxWidthFromSizes(i);return!(!(n&&t>
874n)||this.isChildOfPicture(e))||!this.shouldAutoResize(e,t)}},{key:"triggerEvent",value:function(e,t){var i=new CustomEvent(t,{detail:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},bubbles:!(arguments.length>3&&void 0!==arguments[3])||arguments[3],cancelable:!(arguments.length>4&&void 0!==arguments[4])||arguments[4]});return e.dispatchEvent(i),i}},{key:"shouldSkipAutoWidth",value:function(){return this.skipAutoWidth}},{key:"resizeImageWithCDN",value:function(e,t){var i=this.getDataSrcSet(e),n=this.getDataSrc(e);if(i&&n){var r=this.parseSrcSet(i),a=this.getBaseImageSrcForResize(n,r,t);this.updateSrcsetForResize(e,i,a,t,r)}}},{key:"updateSrcsetForResize",value:function(e,t,i,n,r){var a=this.updateSrcsetWithTargetWidth(t,i,n,r);a=this.updateSrcsetWithRetinaWidth(a,i,n,r),this.updateElementSrcset(e,t,a)}},{key:"getBaseImageSrcForResize",value:function(e,t,i){if(!this.isThumbnail(e))return e;var n=t.find(function(e){return e.value>=i});return n?n.src:e}},{key:"isThumbnail",value:function(e){return new RegExp("(-\\d+x\\d+)\\.(".concat(d.join("|"),")(?:\\?.+)?$"),"i").test(e)}},{key:"updateSrcsetWithTargetWidth",value:function(e,t,i,n){return this.findSimilarSource(n,i)?e:e+", "+this.getResizedCDNURL(t,i)+" "+i+f}},{key:"updateSrcsetWithRetinaWidth",value:function(e,t,i,n){var r=this.getPixelRatio();if(r<=1)return e;var a=Math.ceil(i*r);return this.findSimilarSource(n,r,"x")||this.findSimilarSource(n,a,f)?e:e+", "+this.getResizedCDNURL(t,a)+" "+a+f}},{key:"updateElementSrcset",value:function(e,t,i){i!==t&&e.setAttribute("data-srcset",i)}},{key:"getPixelRatio",value:function(){return window.devicePixelRatio||1}},{key:"findSimilarSource",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.precision;return e.find(function(e){return n===e.unit&&e.value>=t&&i.isFuzzyMatch(e.value,t,r)})}},{key:"getResizedCDNURL",value:function(e,t){var i=this.parseURL(e);if(i){var n=new URLSearchParams(i.search);n.set("size","".concat(t,"x0"));var r=i.origin+i.pathname;return"".concat(r,"?").concat(n.toString())}}},{key:"parseURL",value:function(e){try{return new URL(e)}catch(e){return null}}},{key:"parseSrcSet",value:function(e){var t=this.extractSourcesFromSrcSet(e);return this.sortSources(t)}},{key:"extractSourcesFromSrcSet",value:function(e){return e.split(",").map(function(e){var t=r(e.trim().split(/\s+/),2),i=t[0],n=t[1],a=0,o="";return n&&(n.endsWith(f)?(a=parseInt(n,10),o=f):n.endsWith("x")&&(a=parseFloat(n),o="x")),{markup:e,src:i,value:a,unit:o}})}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.value===t.value?0:e.value>t.value?-1:1}),e}},{key:"revertToOriginalSizesIfNeeded",value:function(e){var t=this.getOriginalSizesAttr(e);return!!t&&(e.setAttribute("sizes",t),e.removeAttribute(l),!0)}},{key:"getElementWidth",value:function(e){var t,i=null===(t=e.style)||void 0===t?void 0:t.width;if(i&&"auto"===i.trim())return"auto";var n=window.getComputedStyle(e).width,r=parseInt(n,10);return isNaN(r)?n:r}},{key:"getMaxWidthFromSizes",value:function(e){var t=e.match(/\(max-width:\s*(\d+)px\)\s*100vw,\s*\1px/);return t?parseInt(t[1],10):0}},{key:"getOriginalSizesAttr",value:function(e){return e.getAttribute(l)}},{key:"getDataSrcSet",value:function(e){return e.getAttribute(c)}},{key:"getDataSrc",value:function(e){return e.getAttribute("data-src")}},{key:"isFromSmushCDN",value:function(e){if(!e||!this.cdnBaseURL)return!1;if(e.startsWith(this.cdnBaseURL))return!0;var t=this.parseURL(e);return!(null==t||!t.hostname)&&(t.hostname===u||t.hostname.endsWith(".".concat(u)))}},{key:"isFuzzyMatch",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.abs(e-t)<=i}}],i&&o(e.prototype,i),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,n}();!function(e,t){if(null===(e=window.smushLazyLoadOptions)||void 0===e?void 0:e.autoResizingEnabled){var i=(null===(t=window.smushLazyLoadOptions)||void 0===t?void 0:t.autoResizeOptions)||{};i=Object.assign({precision:5,skipAutoWidth:!0},i),new v(i)}}()}),t=i.cw(function(e,t){i.d(t,{G:function(){return n}}),a();var n=function(e){return e===u()()||JSON.stringify((null==e?void 0:e.cfg)||{})===JSON.stringify((null===u()()||void 0===u()()?void 0:u()().cfg)||{})};t.A=u()()}),n=i.cw(function(e,i){t(),document.addEventListener("lazybeforeunveil",function(e){var i;(0,t().G)(null==e||null===(i=e.detail)||void 0===i?void 0:i.instance)&&function(e){var t=e.getAttribute("data-bg-image")||e.getAttribute("data-bg"),i=e.hasAttribute("data-bg-image")?"background-image":"background";if(t){var n,r=e.getAttribute("style")||"",a="".concat(i,": ").concat(t,";"),o=new RegExp("".concat(i,"\\s*:\\s*[^;]+;?"));n=o.test(r)?r.replace(o,a):r.length>0?r.replace(/;$/g,"")+";"+a:a,e.setAttribute("style",n.trim())}}(e.target)})}),r=i.cw(function(e,i){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}var o,s,u,l,c,d,f;
874t(),s="smush-lazyload-video",u="smush-lazyloaded-video",l="smush-lazyload-autoplay",c="ontouchstart"in window?"touchstart":"pointerdown",d=Number(null===(o=window)||void 0===o?void 0:o.smush_video_render_delay)||0,f=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDelayVideoRenderingForMobile=this.supportsIntersectionObserver(),this.queuedVideoElements=[],this.isMobileOrSafari=null,this.init()},i=[{key:"init",value:function(){var e=this;document.addEventListener("lazybeforeunveil",function(t){return e.handleVideoLazyLoad(t)}),document.addEventListener(c,function(){return e.enableVideoRenderingForMobile()},{once:!0,passive:!0}),document.addEventListener("DOMContentLoaded",function(){d<=0?document.querySelector(".".concat(s,".").concat(l))&&e.enableVideoRenderingForMobile():setTimeout(function(){return e.enableVideoRenderingForMobile()},d)})}},{key:"handleVideoLazyLoad",value:function(e){var i,n=e.target;(0,t().G)(null==e||null===(i=e.detail)||void 0===i?void 0:i.instance)&&n.classList.contains(s)&&(this.handleButtonPlay(n),this.maybePrepareVideoForPlay(n))}},{key:"handleButtonPlay",value:function(e){var t=this,i=e.querySelector(".".concat("smush-play-btn"));if(i){var n=function(){return t.loadIframeVideoWithAutoPlay(e)};i.addEventListener("click",n),i.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n())})}else{var r;this.loadIframeVideo(e),null===(r=window.console)||void 0===r||r.warning("Missing play button [.smush-play-btn] for video element:",e)}}},{key:"maybePrepareVideoForPlay",value:function(e){var t=e.classList.contains(l);this.shouldPrepareIframeForPlay()?this.maybePrepareVideoForMobileAndSafari(e,t):t&&this.loadIframeVideoWithAutoPlay(e)}},{key:"enableVideoRenderingForMobile",value:function(){this.shouldDelayVideoRenderingForMobile&&(this.shouldDelayVideoRenderingForMobile=!1,this.maybeObserveQueuedVideoElements())}},{key:"supportsIntersectionObserver",value:function(){return"IntersectionObserver"in window}},{key:"maybeObserveQueuedVideoElements",value:function(){this.queuedVideoElements.length&&this.observeQueuedVideoElements()}},{key:"observeQueuedVideoElements",value:function(){var e=this,t=new IntersectionObserver(function(i){i.forEach(function(i){if(i.isIntersecting){var n=i.target;e.loadIframeVideo(n),t.unobserve(n)}})},{rootMargin:"0px 0px 200px 0px",threshold:.1});this.queuedVideoElements.forEach(function(e){t.observe(e)})}},{key:"maybePrepareVideoForMobileAndSafari",value:function(e,t){this.shouldDelayVideoRenderingForMobile?this.queuedVideoElements.push(e):this.loadIframeVideo(e,t)}},{key:"shouldPrepareIframeForPlay",value:function(){return null===this.isMobileOrSafari&&(this.isMobileOrSafari=this.checkIfMobileOrSafari()),this.isMobileOrSafari}},{key:"checkIfMobileOrSafari",value:function(){var e=navigator.userAgent;return e.includes("Mobi")||e.includes("Safari")&&!e.includes("Chrome")}},{key:"loadIframeVideo",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.classList.contains(u)){e.classList.add(u,"loading");var n=e.querySelector("iframe");if(n){var r=null===(t=n.dataset)||void 0===t?void 0:t.src;if(r){if(i){var a=new URL(r);a.searchParams.set("autoplay","1"),a.searchParams.set("playsinline","1"),r=a.toString()}var o=n.getAttribute("allow")||"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture";o.includes("autoplay")||(o+="; autoplay"),n.setAttribute("allow",o),n.setAttribute("allowFullscreen","true"),n.setAttribute("src",r),e.classList.remove("loading")}else{var s;null===(s=window.console)||void 0===s||s.error("Missing data-src attribute for iframe:",n)}}else{var l;null===(l=window.console)||void 0===l||l.error("Missing iframe element in video wrapper:",e)}}}},{key:"loadIframeVideoWithAutoPlay",value:function(e){this.loadIframeVideo(e,!0)}}],i&&r(e.prototype,i),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,n}(),new f}),a=function(){return i(6879)},o=window.lazySizesConfig||null;o&&delete window.lazySizesConfig;var s=function(){o?window.lazySizesConfig=o:"lazySizesConfig"in window&&delete window.lazySizesConfig};function u(){return u.c||(u.c=i.n(a()))}
vendor: 14,299 bytes, lines 874-875
874i.dn(s),t(),n(),r(),e(),t().A.init(),s()}()}(); 875((e,o)=>{"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.postscribe=o():e.postscribe=o()})(this,function(){return t=[function(e,o,r){var r=r(1),r=(r=r)&&r.__esModule?r:{default:r};e.exports=r.default},function(e,o,r){function s(){}function c(){var e,o=d.shift();o&&((e=n.last(o)).afterDequeue(),o.stream=function(e,o,t){function n(e){e=t.beforeWrite(e),f.write(e),t.afterWrite(e)}(f=new _.default(e,t)).id=l++,f.name=t.name||f.id,a.streams[f.name]=f;var r=e.ownerDocument,i={close:r.close,open:r.open,write:r.write,writeln:r.writeln},d=(p(r,{close:s,open:s,write:function(){for(var e=arguments.length,o=Array(e),r=0;r<e;r++)o[r]=arguments[r];return n(o.join(""))},writeln:function(){for(var e=arguments.length,o=Array(e),r=0;r<e;r++)o[r]=arguments[r];return n(o.join("")+"\n")}}),f.win.onerror||s);return f.win.onerror=function(e,o,r){t.error({msg:e+" - "+o+": "+r}),d.apply(f.win,[e,o,r])},f.write(o,function(){p(r,i),f.win.onerror=d,t.done(),f=null,c()}),f}.apply(void 0,o),e.afterStreamStart())}function a(e,o,r){if(n.isFunction(r))r={done:r};else if("clear"===r)return d=[],f=null,void(l=0);r=n.defaults(r,i);var t=[e=/^#/.test(e)?window.document.getElementById(e.substr(1)):e.jquery?e[0]:e,o,r];return e.postscribe={cancel:function(){t.stream?t.stream.abort():t[1]=s}},r.beforeEnqueue(t),d.push(t),f||c(),e.postscribe}o.__esModule=!0;var p=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r,t=arguments[o];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=(o.default=a,r(2)),_=(o=o)&&o.__esModule?o:{default:o},n=(e=>{if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o})(r(4)),i={afterAsync:s,afterDequeue:s,afterStreamStart:s,afterWrite:s,autoFix:!0,beforeEnqueue:s,beforeWriteToken:function(e){return e},beforeWrite:function(e){return e},done:s,error:function(e){throw new Error(e.msg)},releaseAsync:!1},l=0,d=[],f=null;p(a,{streams:{},queue:d,WriteStream:_.default})},function(e,o,r){function t(e,o){e=e.getAttribute(p+o);return c.existy(e)?String(e):e}function n(e,o,r){r=2<arguments.length&&void 0!==r?r:null,o=p+o;c.existy(r)&&""!==r?e.setAttribute(o,r):e.removeAttribute(o)}o.__esModule=!0;var s=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r,t=arguments[o];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i=r(3),d=(i=i)&&i.__esModule?i:{default:i},c=(e=>{if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o})(r(4)),p="data-ps-",_="ps-style",l="ps-script";function a(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this,t=a;if(!(r instanceof t))throw new TypeError("Cannot call a class as a function");this.root=e,this.options=o,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new d.default("",{autoFix:o.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],n(this.proxyRoot,"proxyof",0)}a.prototype.write=function(){var e;for((e=this.writeQueue).push.apply(e,arguments);!this.deferredRemote&&this.writeQueue.length;){var o=this.writeQueue.shift();c.isFunction(o)?this._callFunction(o):this._writeImpl(o)}},a.prototype._callFunction=function(e){var o={type:"function",value:e.name||e.toString()};this._onScriptStart(o),e.call(this.win,this.doc),this._onScriptDone(o)},a.prototype._writeImpl=function(e){this.parser.append(e);for(var o=void 0,r=void 0,t=void 0,n=[];(o=this.parser.readToken())&&!(r=c.isScript(o))&&!(t=c.isStyle(o));)(o=this.options.beforeWriteToken(o))&&n.push(o);0<n.length&&this._writeStaticTokens(n),r&&this._handleScriptToken(o),t&&this._handleStyleToken(o)},a.prototype._writeStaticTokens=function(e){e=this._buildChunk(e);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},a.prototype._buildChunk=function(e){for(var o=this.actuals.length,r=[],t=[],n=[],i=e.length,d=0;d<i;d++){var s,c=e[d],a=c.toString();r.push(a),c.attrs?/^noscript$/i.test(c.tagName)||(s=o++,t.push(a.replace(/(\/?>)/," "+p+"id="+s+" $1")),c.attrs.id!==l&&c.attrs.id!==_&&n.push("atomicTag"===c.type?"":"<"+c.tagName+" "+p+"proxyof="+s+(c.unary?" />":">"))):(t.push(a),n.push("endTag"===c.type?a:""))}return{tokens:e,raw:r.join(""),actual:t.join(""),proxy:n.join("")}},a.prototype._walkChunk=function(){for(var e,o=[this.proxyRoot];c.existy(e=o.shift());){var r=1===e.nodeType;!(r&&t(e,"proxyof"))&&(r&&n(this.actuals[t(e,"id")]=e,"id"),r=e.parentNode&&t(e.parentNode,"proxyof"))&&this.actuals[r].appendChild(e),o.unshift.apply(o,c.toArray(e.childNodes))}},a.prototype._handleScriptToken=function(e){var o=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),e.src=e.attrs.src||e.attrs.SRC,(e=this.options.beforeWriteToken(e))&&(e.src&&this.scriptStack.length?this.deferredRemote=e:this._onScriptStart(e),this._writeScriptToken(e,function(){o._onScriptDone(e)}))},a.prototype._handleStyleToken=function(e){var o=this.parser.clear();o&&this.writeQueue.unshift(o),e.type=e.attrs.type||e.attrs.TYPE||"text/css",(e=this.options.beforeWriteToken(e))&&this._writeStyleToken(e),o&&this.write()},a.prototype._writeStyleToken=function(e){var o=this._buildStyle(e);this._insertCursor(o,_),e.content&&(o.styleSheet&&!o.sheet?o.styleSheet.cssText=e.content:o.appendChild(this.doc.createTextNode(e.content)))},a.prototype._buildStyle=function(e){var r=this.doc.createElement(e.tagName);return r.setAttribute("type",e.type),c.eachKey(e.attrs,function(e,o){r.setAttribute(e,o)}),r},a.prototype._insertCursor=function(e,o){this._writeImpl('<span id="'+o+'"/>');o=this.doc.getElementById(o);o&&o.parentNode.replaceChild(e,o)},a.prototype._onScriptStart=function(e){e.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(e)},a.prototype._onScriptDone=function(e){return e!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,e.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},a.prototype._writeScriptToken=function(e,o){var r=this._buildScript(e),t=this._shouldRelease(r),n=this.options.afterAsync;e.src&&(r.src=e.src,this._scriptLoadHandler(r,t?n:function(){o(),n()}));try{this._insertCursor(r,l),r.src&&!t||o()}catch(e){this.options.error(e),o()}},a.prototype._buildScript=function(e){var r=this.doc.createElement(e.tagName);return c.eachKey(e.attrs,function(e,o){r.setAttribute(e,o)}),e.content&&(r.text=e.content),r},a.prototype._scriptLoadHandler=function(o,r){function t(){o=o.onload=o.onreadystatechange=o.onerror=null}function e(){t(),null!=r&&r(),r=null}function n(e){t(),d(e),null!=r&&r(),r=null}function i(e,o){var r=e["on"+o];null!=r&&(e["_on"+o]=r)}var d=this.options.error;i(o,"load"),i(o,"error"),s(o,{onload:function(){if(o._onload)try{o._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){n({msg:"onload handler failed "+e+" @ "+o.src})}e()},onerror:function(){if(o._onerror)try{o._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void n({msg:"onerror handler failed "+e+" @ "+o.src})}n({msg:"remote script failed "+o.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(o.readyState)&&e()}})},a.prototype._shouldRelease=function(e){return!/^script$/i.test(e.nodeName)||!!(this.options.releaseAsync&&e.src&&e.hasAttribute("async"))},o.default=a},function(e,o,r){function t(e){var o;return(i[e]||(o=i[e]={exports:{},id:e,loaded:!1},n[e].call(o.exports,o,o.exports,t),o.loaded=!0,o)).exports}var n,i;e.exports=(n=[function(e,o,r){var r=r(1),r=(r=r)&&r.__esModule?r:{default:r};e.exports=r.default},function(e,o,r){function t(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o}o.__esModule=!0;var n,c=t(r(2)),i=t(r(3)),d=r(6),a=(d=d)&&d.__esModule?d:{default:d},s=r(5),p={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},_=(l.prototype.append=function(e){this.stream+=e},l.prototype.prepend=function(e){this.stream=e+this.stream},l.prototype._readTokenImpl=function(){var e=this._peekTokenImpl();if(e)return this.stream=this.stream.slice(e.length),e},l.prototype._peekTokenImpl=function(){for(var e in p)if(p.hasOwnProperty(e)&&p[e].test(this.stream)){e=i[e](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},l.prototype.peekToken=function(){return this._peekToken()},l.prototype.readToken=function(){return this._readToken()},l.prototype.readTokens=function(e){for(var o;o=this.readToken();)if(e[o.type]&&!1===e[o.type](o))return},l.prototype.clear=function(){var e=this.stream;return this.stream="",e},l.prototype.rest=function(){return this.stream},l);function l(){var e=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this,n=l;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");this.stream=o;var i,d=!1,s={};for(i in c)c.hasOwnProperty(i)&&(r.autoFix&&(s[i+"Fix"]=!0),d=d||s[i+"Fix"]);d?(this._readToken=(0,a.default)(this,s,function(){return e._readTokenImpl()}),this._peekToken=(0,a.default)(this,s,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}for(n in(o.default=_).tokenToString=function(e){return e.toString()},_.escapeAttributes=function(e){var o,r={};for(o in e)e.hasOwnProperty(o)&&(r[o]=(0,s.escapeQuotes)(e[o],null));return r},_.supports=c)c.hasOwnProperty(n)&&(_.browserHasFlaw=_.browserHasFlaw||!c[n]&&n)},function(e,o){var r=!(o.__esModule=!0),t=!1,n=window.document.createElement("div");try{var i="<P><I></P></I>";n.innerHTML=i,o.tagSoup=r=n.innerHTML!==i}catch(e){o.tagSoup=r=!1}try{n.innerHTML="<P><i><P></P></i></P>",o.selfClose=t=2===n.childNodes.length}catch(e){o.selfClose=t=!1}n=null,o.tagSoup=r,o.selfClose=t},function(e,o,r){function t(e){var r,t,n;if(-1!==e.indexOf(">")){e=e.match(s.startTag);if(e){r={},t={},n=e[2],e[2].replace(s.attr,function(e,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(r[arguments[5]]="",t[arguments[5]]=!0):r[o]=arguments[2]||arguments[3]||arguments[4]||s.fillAttr.test(o)&&o||"":r[o]="",n=n.replace(e,"")});e={v:new d.StartTagToken(e[1],e[0].length,r,t,!!e[3],n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))};if("object"===(void 0===e?"undefined":i(e)))return e.v}}}o.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=(o.comment=function(e){var o=e.indexOf("--\x3e");if(0<=o)return new d.CommentToken(e.substr(4,o-1),o+3)},o.chars=function(e){var o=e.indexOf("<");return new d.CharsToken(0<=o?o:e.length)},o.startTag=t,o.atomicTag=function(e){var o=t(e);if(o){e=e.slice(o.length);if(e.match(new RegExp("</\\s*"+o.tagName+"\\s*>","i"))){e=e.match(new RegExp("([\\s\\S]*?)</\\s*"+o.tagName+"\\s*>","i"));if(e)return new d.AtomicTagToken(o.tagName,e[0].length+o.length,o.attrs,o.booleanAttrs,e[1])}}},o.endTag=function(e){if(e=e.match(s.endTag))return new d.EndTagToken(e[1],e[0].length)},r(4)),s={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(e,o,r){function d(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0,o.EndTagToken=o.AtomicTagToken=o.StartTagToken=o.TagToken=o.CharsToken=o.CommentToken=o.Token=void 0;var i=r(5),t=(o.Token=function e(o,r){d(this,e),this.type=o,this.length=r,this.text=""},o.CommentToken=(c.prototype.toString=function(){return"\x3c!--"+this.content},c),o.CharsToken=(n.prototype.toString=function(){return this.text},n),o.TagToken=(s.formatTag=function(e){var o,r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n="<"+e.tagName;for(o in e.attrs)e.attrs.hasOwnProperty(o)&&(n+=" "+o,r=e.attrs[o],void 0!==e.booleanAttrs&&void 0!==e.booleanAttrs[o]||(n+='="'+(0,i.escapeQuotes)(r)+'"'));return e.rest&&(n+=" "+e.rest),n+=e.unary&&!e.html5Unary?"/>":">",null!=t&&(n+=t+"</"+e.tagName+">"),n},s));function s(e,o,r,t,n){d(this,s),this.type=e,this.length=r,this.text="",this.tagName=o,this.attrs=t,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1}function n(e){d(this,n),this.type="chars",this.length=e,this.text=""}function c(e,o){d(this,c),this.type="comment",this.length=o||(e?e.length:0),this.text="",this.content=e}function a(e,o){d(this,a),this.type="endTag",this.length=o,this.text="",this.tagName=e}function p(e,o,r,t,n){d(this,p),this.type="atomicTag",this.length=o,this.text="",this.tagName=e,this.attrs=r,this.booleanAttrs=t,this.unary=!1,this.html5Unary=!1,this.content=n}function _(e,o,r,t,n,i){d(this,_),this.type="startTag",this.length=o,this.text="",this.tagName=e,this.attrs=r,this.booleanAttrs=t,this.html5Unary=!1,this.unary=n,this.rest=i}o.StartTagToken=(_.prototype.toString=function(){return t.formatTag(this)},_),o.AtomicTagToken=(p.prototype.toString=function(){return t.formatTag(this,this.content)},p),o.EndTagToken=(a.prototype.toString=function(){return"</"+this.tagName+">"},a)},function(e,o){o.__esModule=!0,o.escapeQuotes=function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e?e.replace(/([^"]*)"/g,function(e,o){return/\\/.test(o)?o+'"':o+'\\"'}):o}},function(e,o){function c(e){return e&&"startTag"===e.type&&(e.unary=r.test(e.tagName)||e.unary,e.html5Unary=!/\/>$/.test(e.text)),e}function a(e,o){o=o.pop();
875e.prepend("</"+o.tagName+">")}o.__esModule=!0,o.default=function(t,r,n){function i(){var e,o,r;o=n,r=(e=t).stream,o=c(n()),e.stream=r,o&&s[o.type]&&s[o.type](o)}(e=[]).last=function(){return this[this.length-1]},e.lastTagNameEq=function(e){var o=this.last();return o&&o.tagName&&o.tagName.toUpperCase()===e.toUpperCase()},e.containsTagName=function(e){for(var o,r=0;o=this[r];r++)if(o.tagName===e)return!0;return!1};var e,d=e,s={startTag:function(e){var o=e.tagName;"TR"===o.toUpperCase()&&d.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),i()):r.selfCloseFix&&p.test(o)&&d.containsTagName(o)?d.lastTagNameEq(o)?a(t,d):(t.prepend("</"+e.tagName+">"),i()):e.unary||d.push(e)},endTag:function(e){d.last()?r.tagSoupFix&&!d.lastTagNameEq(e.tagName)?a(t,d):d.pop():r.tagSoupFix&&(n(),i())}};return function(){return i(),c(n())}};var r=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,p=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}],i={},t.m=n,t.c=i,t.p="",t(0))},function(e,o){function t(e){return null!=e}function n(e,o,r){for(var t=void 0,n=e&&e.length||0,t=0;t<n;t++)o.call(r,e[t],t)}function i(e,o,r){for(var t in e)e.hasOwnProperty(t)&&o.call(r,t,e[t])}function r(e,o){return!(!e||"startTag"!==e.type&&"atomicTag"!==e.type||!("tagName"in e)||!~e.tagName.toLowerCase().indexOf(o))}o.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o.existy=t,o.isFunction=function(e){return"function"==typeof e},o.each=n,o.eachKey=i,o.defaults=function(r,e){return r=r||{},i(e,function(e,o){t(r[e])||(r[e]=o)}),r},o.toArray=function(o){try{return Array.prototype.slice.call(o)}catch(e){r=[],n(o,function(e){r.push(e)});o={v:r};if("object"===(void 0===o?"undefined":d(o)))return o.v}var r},o.last=function(e){return e[e.length-1]},o.isTag=r,o.isScript=function(e){return r(e,"script")},o.isStyle=function(e){return r(e,"style")}}],n={},r.m=t,r.c=n,r.p="",r(0);function r(e){var o;return(n[e]||(o=n[e]={exports:{},id:e,loaded:!1},t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o)).exports}var t,n}),(e=>{e.gdpr_lightbox=((e,m)=>{var v=e.document,u=m(e),h=m.Deferred,b=m("html"),y=[],k="ah",w="gdpr_lightbox-"+k,t='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',x={esc:!0,handler:null,handlers:{image:_,inline:function(e,o){var r,t,n;try{r=m(e)}catch(e){return!1}return!!r.length&&(t=m('<i style="display:none !important"></i>'),n=r.hasClass("gdpr_lightbox-hide"),o.element().one("gdpr_lightbox:remove",function(){t.before(r).remove(),n&&!r.closest(".gdpr_lightbox-content").length&&r.addClass("gdpr_lightbox-hide")}),r.removeClass("gdpr_lightbox-hide").after(t))},youtube:function(e){var o=r.exec(e);return!!o&&l(p(e,a("https://www.youtube"+(o[2]||"")+".com/embed/"+o[4],m.extend({autoplay:1},c(o[5]||"")))))},vimeo:function(e){var o=n.exec(e);return!!o&&l(p(e,a("https://player.vimeo.com/video/"+o[3],m.extend({autoplay:1},c(o[4]||"")))))},googlemaps:function(e){var o=i.exec(e);return!!o&&l(p(e,a("https://www.google."+o[3]+"/maps?"+o[6],{output:0<o[6].indexOf("layer=c")?"svembed":"embed"})))},facebookvideo:function(e){var o=d.exec(e);if(!o)return!1;0!==e.indexOf("http")&&(e="https:"+e);return l(p(e,a("https://www.facebook.com/plugins/video.php?href="+e,m.extend({autoplay:1},c(o[4]||"")))))},iframe:l},template:'<div class="gdpr_lightbox" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="gdpr_lightbox-wrap" data-gdpr_lightbox-close role="document"><div class="gdpr_lightbox-loader">Loading...</div><div class="gdpr_lightbox-container"><div class="gdpr_lightbox-content"></div><button class="gdpr_lightbox-close" type="button" aria-label="Close (Press escape to close)" data-gdpr_lightbox-close>×</button></div></div></div>'},o=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,r=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,n=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,i=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,d=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,s=(()=>{var e,o=v.createElement("div"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in r)if(void 0!==o.style[e])return r[e];return!1})();function T(e){var o=h();return s&&e.length?(e.one(s,o.resolve),setTimeout(o.resolve,500)):o.resolve(),o.promise()}function C(e,o,r){if(1===arguments.length)return m.extend({},e);if("string"==typeof o){if(void 0===r)return void 0===e[o]?null:e[o];e[o]=r}else m.extend(e,o);return this}function c(e){for(var o,r=decodeURI(e.split("#")[0]).split("&"),t={},n=0,i=r.length;n<i;n++)r[n]&&(t[(o=r[n].split("="))[0]]=o[1]);return t}function a(e,o){return e+(-1<e.indexOf("?")?"&":"?")+m.param(o)}function p(e,o){var r=e.indexOf("#");return-1===r?o:o+(e=0<r?e.substr(r):e)}function _(e,o){function r(){n.reject(m('<span class="gdpr_lightbox-error"></span>').append("Failed loading image"))}var o=o.opener()&&o.opener().data("gdpr_lightbox-desc")||"Image with no description",t=m('<img src="'+e+'" alt="'+o+'"/>'),n=h();
875return t.on("load",function(){if(0===this.naturalWidth)return r();n.resolve(t)}).on("error",r),n.promise()}function l(e){return'<div class="gdpr_lightbox-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+e+'"/></div>'}function I(){return v.documentElement.clientHeight||Math.round(u.height())}function S(e){var o,r=f();r&&(27===e.keyCode&&r.options("esc")&&r.close(),9===e.keyCode)&&(e=e,r=(r=r).element().find(t),o=r.index(v.activeElement),e.shiftKey&&o<=0?(r.get(r.length-1),e.preventDefault()):e.shiftKey||o!==r.length-1||(r.get(0),e.preventDefault()))}function N(){m.each(y,function(e,o){o.resize()})}function f(){return 0===y.length?null:y[0]}function g(e,o,r,t){var n,i,d,s,c,a,p,_,l=this,f=!1,g=!1;o=m.extend({},x,o),n=m(o.template),l.element=function(){return n},l.opener=function(){return r},l.options=m.proxy(C,l,o),l.handlers=m.proxy(C,l,o.handlers),l.resize=function(){f&&!g&&i.css("max-height",I()+"px").trigger("gdpr_lightbox:resize",[l])},l.close=function(){var o,e;if(f&&!g)return g=!0,(o=l).element().attr(k,"true"),1===y.length&&(b.removeClass("gdpr_lightbox-active"),u.off({resize:N,keydown:S})),((y=m.grep(y,function(e){return o!==e})).length?y[0].element():m(".gdpr_lightbox-hidden")).removeClass("gdpr_lightbox-hidden").each(function(){var e=m(this),o=e.data(w);o?e.attr(k,o):e.removeAttr(k),e.removeData(w)}),e=h(),t&&v.activeElement!==n[0]&&m.contains(n[0],v.activeElement),i.trigger("gdpr_lightbox:close",[l]),n.removeClass("gdpr_lightbox-opened").addClass("gdpr_lightbox-closed"),T(i.add(n)).always(function(){i.trigger("gdpr_lightbox:remove",[l]),n.remove(),n=void 0,e.resolve()}),e.promise()},d=e,s=l,c=o.handlers,e=o.handler,p="inline",_=m.extend({},c),e&&_[e]?(a=_[e](d,s),p=e):(m.each(["inline","iframe"],function(e,o){delete _[o],_[o]=c[o]}),m.each(_,function(e,o){return!o||!(!o.test||o.test(d,s))||(!1!==(a=o(d,s))?(p=e,!1):void 0)})),o={handler:p,content:a||""},n.attr(k,"false").addClass("gdpr_lightbox-loading gdpr_lightbox-opened gdpr_lightbox-"+o.handler).appendTo("body").on("click","[data-gdpr_lightbox-close]",function(e){m(e.target).is("[data-gdpr_lightbox-close]")&&l.close()}).trigger("gdpr_lightbox:open",[l]),e=l,1===y.unshift(e)&&(b.addClass("gdpr_lightbox-active"),u.on({resize:N,keydown:S})),m("body > *").not(e.element()).addClass("gdpr_lightbox-hidden").each(function(){var e=m(this);void 0===e.data(w)&&e.data(w,e.attr(k)||null)}).attr(k,"true"),m.when(o.content).always(function(e){i=m(e).css("max-height",I()+"px"),n.find(".gdpr_lightbox-loader").each(function(){var e=m(this);T(e).always(function(){e.remove()})}),n.removeClass("gdpr_lightbox-loading").find(".gdpr_lightbox-content").empty().append(i),f=!0,i.trigger("gdpr_lightbox:ready",[l])})}function O(e,o,r){e.preventDefault?(e.preventDefault(),e=(r=m(this)).data("gdpr_lightbox-target")||r.attr("href")||r.attr("src")):r=m(r);o=new g(e,m.extend({},r.data("gdpr_lightbox-options")||r.data("gdpr_lightbox"),o),r,v.activeElement);if(!e.preventDefault)return o}return _.test=function(e){return o.test(e)},O.options=m.proxy(C,O,x),O.handlers=m.proxy(C,O,x.handlers),O.current=f,m(v).on("click.gdpr_lightbox","[data-gdpr_lightbox]",O),O})(e,e.jQuery||e.Zepto)})("undefined"!=typeof window?window:this),(M=>{var n={common:{init:function(){var p=365,_=[],s=!1;void 0!==moove_frontend_gdpr_scripts.cookie_expiration&&(p=moove_frontend_gdpr_scripts.cookie_expiration),M(document).on("click","#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v1 .main-modal-content .moove-gdpr-tab-main:not(#privacy_overview) .tab-title",function(e){window.innerWidth<768&&(M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").is(":visible")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideUp(300):M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideDown(300))}),M(document).on("click tap",'#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-reject-btn, [href*="#gdpr-reject-cookies"], .moove-gdpr-modal-reject-all',function(e){e.preventDefault(),J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),t()});var e=!1;var i=M(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),d=M(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),c=0,a=!1;function l(e){try{new URLSearchParams(window.location.search).has("gdpr_dbg")&&console.warn(e)}catch(e){console.warn(e)}}function f(){var e=void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false",o=void 0!==moove_frontend_gdpr_scripts.gdpr_nonce?moove_frontend_gdpr_scripts.gdpr_nonce:"false";"true"===e&&("function"==typeof navigator.sendBeacon?((e=new FormData).append("action","moove_gdpr_remove_php_cookies"),e.append("security",o),e.append("type","navigatorBeacon"),navigator.sendBeacon(moove_frontend_gdpr_scripts.ajaxurl,e),l("dbg - cookies removed navigatorBeacon")):M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies",security:o,type:"aja
875x_b1"},function(e){l("dbg - cookies removed")}))}function g(){f();var e=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"";"true"===(void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false")?M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:0,thirdparty:0,advanced:0,performance:0,preference:0,wp_lang:e},function(e){var o={strict:1,thirdparty:0,advanced:0,performance:0,preference:0};J(),m("script_inject",o),w(o)}):J()}function m(e,o){"function"==typeof jQuery.fn.gdpr_cookie_compliance_analytics&&jQuery().gdpr_cookie_compliance_analytics(e,o)}function v(){var e=C("moove_gdpr_popup"),o={strict:"0",thirdparty:"0",advanced:"0",performance:"0",preference:"0"};return e&&(e=JSON.parse(e),o.strict=e.strict,o.thirdparty=e.thirdparty,o.advanced=e.advanced,o.performance=void 0!==e.performance?e.performance:0,o.preference=void 0!==e.preference?e.preference:0,w(o),m("script_inject",e)),void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&e&&void 0!==e.performance&&1===parseInt(e.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&e&&void 0!==e.preference&&1===parseInt(e.preference)&&u()):"1"!==moove_frontend_gdpr_scripts.strict_init&&u(),o}function u(){M(document).find("iframe[data-gdpr-iframesrc]").each(function(){M(this).attr("src",M(this).attr("data-gdpr-iframesrc"))})}M(document).on("keydown",function(e){if(M("body").hasClass("moove_gdpr_overflow")&&M(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v1")){if(38==e.keyCode&&(e.preventDefault(),(r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),40==e.keyCode&&(e.preventDefault(),(a?r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r:n=0===(n=M("#moove-gdpr-menu li.menu-item-selected").next()).length?M("#moove-gdpr-menu li").first():n).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),9==e.keyCode)if(e.preventDefault(),0<(t=M("#moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal .moove-gdpr-modal-close, #moove_gdpr_cookie_modal #moove-gdpr-menu > li, #moove_gdpr_cookie_modal .moove-gdpr-branding")).length){var o=!1;if(c<=t.length?(a?c--:c++,o=t[c],M(o).is(":visible")||(a?c--:c++,o=t[c])):o=t[c=0],M("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),c<0&&a&&(c=t.length),!o&&c>t.length&&(o=t[c=0]),M(o).addClass("focus-g").trigger("focus"),(M(o).hasClass("menu-item-on")||M(o).hasClass("menu-item-off"))&&M(o).find("button").trigger("click"),0<M(o).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(o)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else if(M(".cookie-switch").removeClass("focus-g"),0===(i=n=i.next()).length&&(i=n=d),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<n.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}32==e.keyCode&&(e.preventDefault(),M(".moove-gdpr-tab-main:visible").find(".moove-gdpr-status-bar input[type=checkbox]").trigger("click")),13==e.keyCode&&(e.preventDefault(),(0<M(document).find(".focus-g").length?M(document).find(".focus-g"):M(".moove-gdpr-modal-save-settings")).trigger("click"))}if(M("body").hasClass("moove_gdpr_overflow")&&M(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v2")){var r,t,n;if(38==e.keyCode&&(e.preventDefault(),(r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),40==e.keyCode&&(e.preventDefault(),(n=0===(n=M("#moove-gdpr-menu li.menu-item-selected").next()).length?M("#moove-gdpr-menu li").first():n).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),32==e.keyCode&&(e.preventDefault(),M("#moove_gdpr_cookie_modal").find(".focus-g").trigger("click")),9==e.keyCode)if(e.preventDefault(),0<(t=M("#moove_gdpr_cookie_modal .cookie-switch, #moove_gdpr_cookie_modal .gdpr-cd-details-toggle, #moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal a:not(.moove-gdpr-branding), #moove_gdpr_cookie_modal .moove-gdpr-modal-close, #moove_gdpr_cookie_modal .moove-gdpr-branding")).length){o=!1;if(c<=t.length?(a?c--:c++,o=t[c],M(o).is(":visible")||(a?c--:c++,o=t[c])):o=t[c=0],M("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),c<0&&a&&(c=t.length),!o&&c>t.length&&(o=t[c=0]),M(o).addClass("focus-g").trigger("focus"),0<M(o).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(o)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else if(M(".cookie-switch").removeClass("focus-g"),0===(i=n=i.next()).length&&(i=n=d),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<n.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}13==e.keyCode&&(0<M("#moove_gdpr_cookie_modal .focus-g").length&&(M("#moove_gdpr_cookie_modal .focus-g").hasClass("mgbutton")||M("#moove_gdpr_cookie_modal .focus-g").hasClass("moove-gdpr-modal-close")||M("#moove_gdpr_cookie_modal .focus-g").attr("href"))?(M("#moove_gdpr_cookie_modal .focus-g").attr("href")||e.preventDefault(),M("#moove_gdpr_cookie_modal .focus-g")):(e.preventDefault(),M(".moove-gdpr-modal-save-settings"))).trigger("click")}}
875),M(document).on("keyup",function(e){16==e.keyCode&&(a=!1),17!=e.keyCode&&18!=e.keyCode&&13!=e.keyCode||(a=!1)}),document.addEventListener("visibilitychange",function(e){a=!1}),M(document).on("keydown",function(e){if(16==e.keyCode&&(a=!0),M("body").hasClass("gdpr-infobar-visible")&&!M("body").hasClass("moove_gdpr_overflow")&&M("#moove_gdpr_cookie_info_bar").hasClass("gdpr-full-screen-infobar")){if(9==e.keyCode){e.preventDefault(),console.warn("fsw-tab");var o=M('#moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar span.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .moove-gdpr-infobar-allow-all, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .moove-gdpr-infobar-reject-btn, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar button.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="third_party_cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="advanced-cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="performance-cookies"], #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="preference-cookies"], label#moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .mgbutton');if(0<o.length){var r=!1;if(c<=o.length?(a?c--:c++,r=o[c],M(r).is(":visible")||(a?c--:c++,r=o[c])):r=o[c=0],M("#moove_gdpr_cookie_info_bar .focus-g").removeClass("focus-g"),c<0&&a&&(c=o.length),!r&&c>o.length&&(r=o[c=0]),M(document).find("*").blur(),M(r).addClass("focus-g").trigger("focus"),0<M(r).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(r)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else{M(".cookie-switch").removeClass("focus-g");o=i.next();if(0===(i=o).length&&(i=o=d),o.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<o.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{o.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}}32==e.keyCode&&(e.preventDefault(),r=M("#moove_gdpr_cookie_info_bar").find(".gdpr-shr-switch.focus-g input[type=checkbox]"),console.warn("space"),r.trigger("click"))}13==e.keyCode&&0<M(document.activeElement).length&&0<M(document.activeElement).closest("#moove_gdpr_cookie_info_bar").length&&(e.preventDefault(),M(document.activeElement).trigger("click"))}),M.fn.moove_gdpr_read_cookies=function(e){var o=C("moove_gdpr_popup"),r={strict:"0",thirdparty:"0",advanced:"0",performance:"0",preference:"0"};return o&&(o=JSON.parse(o),r.strict=parseInt(o.strict),r.thirdparty=parseInt(o.thirdparty),r.advanced=parseInt(o.advanced),r.performance=void 0!==o.performance?parseInt(o.performance):0,r.preference=void 0!==o.preference?parseInt(o.preference):0),r};var h=v(),b=!1,y=!1,r=!1,k="";function o(){s=!0,m("accept_all",""),T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"1",advanced:"1",performance:"1",preference:"1"}),p),t()}function t(){var e=!1;try{void 0!==moove_frontend_gdpr_scripts.force_reload&&"true"===moove_frontend_gdpr_scripts.force_reload&&(e=!0)}catch(e){}var o=v(),r=moove_frontend_gdpr_scripts.enabled_default.strict,t=moove_frontend_gdpr_scripts.enabled_default.third_party,n=moove_frontend_gdpr_scripts.enabled_default.advanced,i=void 0!==moove_frontend_gdpr_scripts.enabled_default.performance&&moove_frontend_gdpr_scripts.enabled_default.performance,d=void 0!==moove_frontend_gdpr_scripts.enabled_default.preference&&moove_frontend_gdpr_scripts.enabled_default.preference;(e=(0<=document.cookie.indexOf("moove_gdpr_popup")||1==t||1==n||1==i||1==d||1==r)&&(C("moove_gdpr_popup"),1==r&&(h.strict=1),1==t&&(h.strict=1,h.thirdparty=t),1==n&&(h.strict=1,h.advanced=n),1==i&&(h.strict=1,h.performance=i),1==d&&(h.strict=1,h.preference=d),h)&&(parseInt(o.strict)-parseInt(h.strict)<0&&(e=!0),parseInt(o.thirdparty)-parseInt(h.thirdparty)<0&&(e=!0),parseInt(o.advanced)-parseInt(h.advanced)<0&&(e=!0),parseInt(o.performance)-parseInt(h.performance)<0&&(e=!0),parseInt(o.preference)-parseInt(h.preference)<0)?!0:e)?(m("script_inject",{strict:0,thirdparty:0,advanced:0,performance:0,preference:0}),void 0!==moove_frontend_gdpr_scripts.scripts_defined?setTimeout(function(){location.reload(!0)},800):(0<(r=M(document).find('script[src*="googletagmanager.com"]')).length&&r.each(function(){var e=M(this).attr("src");e&&(e=>{var o;try{o=new URL(e)}catch(e){return}return"http:"===o.protocol||"https:"===o.protocol}
875)(e)&&((e=new URL(e).searchParams.get("id"))&&(document.cookie="woocommerce_"+e+"=true; expires=Thu, 31 Dec 1970 23:59:59 UTC; path=/",window["ga-disable-"+e]=!0),window.gtag&&window.gtag("remove"),M(this).remove())}),t=void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"true",n=void 0!==moove_frontend_gdpr_scripts.gdpr_nonce?moove_frontend_gdpr_scripts.gdpr_nonce:"false","function"==typeof navigator.sendBeacon?("true"===t&&((i=new FormData).append("action","moove_gdpr_remove_php_cookies"),i.append("security",n),i.append("type","navigatorBeacon"),navigator.sendBeacon(moove_frontend_gdpr_scripts.ajaxurl,i)),location.reload(!0)):"true"===t?M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies",security:n,type:"ajax_b2"},function(e){location.reload(!0)}).fail(function(){location.reload(!0)}):location.reload(!0))):(d=C("moove_gdpr_popup"),l("dbg - inject - 4"),I(d),x(),M("#moove_gdpr_save_popup_settings_button").show())}function w(e){e&&(m("script_inject",e),1===parseInt(e.strict)?(M("#moove_gdpr_strict_cookies").is(":checked")||(M("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#moove_gdpr_performance_cookies").prop("disabled",!1),M("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_advanced_cookies").prop("disabled",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#performance-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#preference-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("functional","allow")):(M("#moove_gdpr_strict_cookies").is(":checked")&&(M("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!0).prop("checked",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!0).prop("checked",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("functional","deny")),1===parseInt(e.thirdparty)?(M("#moove_gdpr_performance_cookies").is(":checked")||M("#moove_gdpr_performance_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("statistics","allow")):(M("#moove_gdpr_performance_cookies").is(":checked")&&M("#moove_gdpr_performance_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("statistics","deny")),1===parseInt(e.advanced)?(M("#moove_gdpr_advanced_cookies").is(":checked")||M("#moove_gdpr_advanced_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("marketing","allow")):(M("#moove_gdpr_advanced_cookies").is(":checked")&&M("#moove_gdpr_advanced_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("marketing","deny")),1===parseInt(e.performance)?M("#moove_gdpr_performance_cc_cookies").is(":checked")||M("#moove_gdpr_performance_cc_cookies").prop("checked",!0).trigger("change"):M("#moove_gdpr_performance_cc_cookies").is(":checked")&&M("#moove_gdpr_performance_cc_cookies").prop("checked",!1).trigger("change"),1===parseInt(e.preference)?(M("#moove_gdpr_preference_cc_cookies").is(":checked")||M("#moove_gdpr_preference_cc_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("preferences","allow")):(M("#moove_gdpr_preference_cc_cookies").is(":checked")&&M("#moove_gdpr_preference_cc_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("preferences","deny")),M('input[data-name="moove_gdpr_performance_cookies"]').prop("checked",M("#moove_gdpr_performance_cookies").is(":checked")),M('input[data-name="moove_gdpr_strict_cookies"]').prop("checked",M("#moove_gdpr_strict_cookies").is(":checked")),M('input[data-name="moove_gdpr_advanced_cookies"]').prop("checked",M("#moove_gdpr_advanced_cookies").is(":checked")),M('input[data-name="moove_gdpr_performance_cc_cookies"]').prop("checked",M("#moove_gdpr_performance_cc_cookies").is(":checked")),M('input[data-name="moove_gdpr_preference_cc_cookies"]').prop("checked",M("#moove_gdpr_preference_cc_cookies").is(":checked")))}function x(){0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide())}function n(){var e=!0;"undefined"!=typeof sessionStorage&&1===parseInt(sessionStorage.getItem("gdpr_infobar_hidden"))&&(e=!1),void 0!==moove_frontend_gdpr_scripts.display_cookie_banner&&e?"true"===moove_frontend_gdpr_scripts.display_cookie_banner?0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),M("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),M("body").addClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").show(),m("show_infobar","")):0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),l("dbg - inject - 5"),I(JSON.stringify({strict:1,thirdparty:1,advanced:1,performance:1,preference:1}))):0<M("#moove_gdpr_cookie_info_bar").length&&e&&(M("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),M("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),M("body").addClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").show(),m("show_infobar",""))}function T(e,o,r){var t,n,r=0<r?((t=new Date).setTime(t.getTime()+24*r*60*60*1e3),"; expires="+t.toGMTString()):"";try{var i="SameSite=Lax";if(void 0!==moove_frontend_gdpr_scripts.cookie_attributes&&(i=moove_frontend_gdpr_scripts.cookie_attributes),void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&((o=JSON.parse(o)).version=moove_frontend_gdpr_scripts.gdpr_consent_version,o=JSON.stringify(o)),"moove_gdpr_popup"!==e||0!==parseInt(o.str
875ict)||void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor?document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+r+"; path=/; "+i:document.cookie=encodeURIComponent(e)+"=; Path=/;",o!==k&&(n=k=o,"function"==typeof jQuery.fn.gdpr_cookie_compliance_consent_log)&&jQuery().gdpr_cookie_compliance_consent_log(n),"moove_gdpr_popup"===e)try{var d="string"==typeof o?JSON.parse(o):o,s=(gdpr_consent__strict="1"===d.strict||1===d.strict?"true":"false",gdpr_consent__thirdparty="1"===d.thirdparty||1===d.thirdparty?"true":"false",gdpr_consent__advanced="1"===d.advanced||1===d.advanced?"true":"false",gdpr_consent__performance="1"===d.performance||1===d.performance?"true":"false",gdpr_consent__preference="1"===d.preference||1===d.preference?"true":"false",[]);"1"!==d.strict&&1!==d.strict||s.push("strict"),"1"!==d.thirdparty&&1!==d.thirdparty||s.push("thirdparty"),"1"!==d.advanced&&1!==d.advanced||s.push("advanced"),"1"!==d.performance&&1!==d.performance||s.push("performance"),"1"!==d.preference&&1!==d.preference||s.push("preference"),gdpr_consent__cookies=s.join("|")}catch(e){}}catch(e){l("error - moove_gdpr_create_cookie: "+e)}}function C(e){for(var o=encodeURIComponent(e)+"=",r=document.cookie.split(";"),t=0;t<r.length;t++){for(var n=r[t];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(o)){var i=decodeURIComponent(n.substring(o.length,n.length)),d=JSON.parse(i);if(void 0!==d.version){if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version){var s=moove_frontend_gdpr_scripts.gdpr_consent_version;if(parseFloat(s)>parseFloat(d.version))return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null}}else if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&1<parseFloat(moove_frontend_gdpr_scripts.gdpr_consent_version))return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null;return i}}return null}function I(o){if(h=v(),o){var e,r=o;o=JSON.parse(o),v();if(!1!==b&&(e=JSON.parse(b),1===parseInt(e.thirdparty)&&1===parseInt(o.thirdparty)&&(o.thirdparty="0"),1===parseInt(e.advanced)&&1===parseInt(o.advanced)&&(o.advanced="0"),1===parseInt(e.performance)&&1===parseInt(o.performance)&&(o.performance="0"),1===parseInt(e.preference))&&1===parseInt(o.preference)&&(o.preference="0"),m("script_inject",o),y=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.preference)&&u()):1===parseInt(o.strict)&&u(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var t=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);void 0!==o.strict&&1===parseInt(o.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict)?(("undefined"!==o.strict&&1===parseInt(o.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict))&&void 0===_.strict&&(void 0!==t.strict&&t.strict.header&&postscribe(document.head,t.strict.header),void 0!==t.strict&&t.strict.body&&M(t.strict.body).prependTo(document.body),void 0!==t.strict&&t.strict.footer&&postscribe(document.body,t.strict.footer),_.strict=!0),1===parseInt(o.thirdparty)&&void 0===_.thirdparty&&(t.thirdparty.header&&postscribe(document.head,t.thirdparty.header),t.thirdparty.body&&M(t.thirdparty.body).prependTo(document.body),t.thirdparty.footer&&postscribe(document.body,t.thirdparty.footer),_.thirdparty=!0),1===parseInt(o.advanced)&&void 0===_.advanced&&(t.advanced.header&&postscribe(document.head,t.advanced.header),t.advanced.body&&M(t.advanced.body).prependTo(document.body),t.advanced.footer&&postscribe(document.body,t.advanced.footer),_.advanced=!0),void 0!==o.performance&&1===parseInt(o.performance)&&void 0===_.performance&&(void 0!==t.performance&&t.performance.header&&postscribe(document.head,t.performance.header),void 0!==t.performance&&t.performance.body&&M(t.performance.body).prependTo(document.body),void 0!==t.performance&&t.performance.footer&&postscribe(document.body,t.performance.footer),_.performance=!0),void 0!==o.preference&&1===parseInt(o.preference)&&void 0===_.preference&&(void 0!==t.preference&&t.preference.header&&postscribe(document.head,t.preference.header),void 0!==t.preference&&t.preference.body&&M(t.preference.body).prependTo(document.body),void 0!==t.preference&&t.preference.footer&&postscribe(document.body,t.preference.footer),_.preference=!0)):(o=C("moove_gdpr_popup"))&&(J(),g())}catch(e){console.warn("1"),console.error(e)}else void 0!==_.strict&&void 0!==_.thirdparty&&void 0!==_.advanced||(1===o.strict&&(_.strict=!0),1===o.thirdparty&&(_.thirdparty=!0),1===o.advanced&&(_.advanced=!0),1===o.performance&&(_.performance=!0),1===o.preference&&(_.preference=!0),e=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"",0===parseInt(o.str
875ict)&&0===parseInt(o.thirdparty)&&0===parseInt(o.advanced)&&0===parseInt(o.performance)&&0===parseInt(o.preference)&&J(),M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:o.strict,thirdparty:o.thirdparty,advanced:o.advanced,performance:o.performance,preference:o.preference,wp_lang:e},function(e){b=r,m("script_inject",o);e="string"==typeof e?JSON.parse(e):e;e.header&&postscribe(document.head,e.header),e.body&&M(e.body).prependTo(document.body),e.footer&&postscribe(document.body,e.footer)}))}else n()}M(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-close-btn",function(e){e.preventDefault(),void 0!==moove_frontend_gdpr_scripts.close_btn_action?(1===(e=parseInt(moove_frontend_gdpr_scripts.close_btn_action))&&(x(),M("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage)&&sessionStorage.setItem("gdpr_infobar_hidden",1),2===e&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),t()),3===e&&o(),4===e&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),void 0!==moove_frontend_gdpr_scripts.close_btn_rdr&&""!==moove_frontend_gdpr_scripts.close_btn_rdr?window.parent.location.href=moove_frontend_gdpr_scripts.close_btn_rdr:t())):(x(),M("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("gdpr_infobar_hidden",1))}),M.fn.moove_gdpr_save_cookie=function(e){var o,r,t,n,i,d=c=C("moove_gdpr_popup"),s=M(window).scrollTop();if(!c&&(o=e.thirdParty?"1":"0",r=e.advanced?"1":"0",t=e.performance?"1":"0",n=e.preference?"1":"0",e.scrollEnable?(i=e.scrollEnable,M(window).scroll(function(){!y&&M(this).scrollTop()-s>i&&("undefined"===e.thirdparty&&"undefined"===e.advanced||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:o,advanced:r,performance:t,preference:n}),p),w(c=JSON.parse(c))))})):"undefined"===e.thirdparty&&"undefined"===e.advanced||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:o,advanced:r,performance:t,preference:n}),p),w(c=JSON.parse(c))),c=C("moove_gdpr_popup")))if(m("script_inject",c=JSON.parse(c)),y=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.preference)&&u()):1===parseInt(c.strict)&&u(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var c,a=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);void 0!==c.strict&&1===parseInt(c.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict)?(("undefined"!==c.strict&&1===parseInt(c.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict))&&void 0===_.strict&&(void 0!==a.strict&&a.strict.header&&postscribe(document.head,a.strict.header),void 0!==a.strict&&a.strict.body&&M(a.strict.body).prependTo(document.body),void 0!==a.strict&&a.strict.footer&&postscribe(document.body,a.strict.footer),_.strict=!0),1===parseInt(c.thirdparty)&&void 0===_.thirdparty&&(a.thirdparty.header&&postscribe(document.head,a.thirdparty.header),a.thirdparty.body&&M(a.thirdparty.body).prependTo(document.body),a.thirdparty.footer&&postscribe(document.body,a.thirdparty.footer),_.thirdparty=!0),1===parseInt(c.advanced)&&void 0===_.advanced&&(a.advanced.header&&postscribe(document.head,a.advanced.header),a.advanced.body&&M(a.advanced.body).prependTo(document.body),a.advanced.footer&&postscribe(document.body,a.advanced.footer),_.advanced=!0),void 0!==c.performance&&1===parseInt(c.performance)&&void 0===_.performance&&(void 0!==a.performance&&a.performance.header&&postscribe(document.head,a.performance.header),void 0!==a.performance&&a.performance.body&&M(a.performance.body).prependTo(document.body),void 0!==a.performance&&a.performance.footer&&postscribe(document.body,a.performance.footer),_.performance=!0),void 0!==c.preference&&1===parseInt(c.preference)&&void 0===_.preference&&(void 0!==a.preference&&a.preference.header&&postscribe(document.head,a.preference.header),void 0!==a.preference&&a.preference.body&&M(a.preference.body).prependTo(document.body),void 0!==a.preference&&a.preference.footer&&postscribe(document.body,a.preference.footer),_.preference=!0)):(c=C("moove_gdpr_popup"))&&(J(),g())}catch(e){console.warn("2"),console.error(e)}else void 0!==_.thirdparty&&void 0!==_.advanced&&void 0!==_.performance&&void 0!==_.preference||(1===c.thirdparty&&(_.thirdparty=!0),1===c.advanced&&(_.advanced=!0),1===c.performance&&(_.performance=!0),1===c.preference&&(_.preference=!0),a=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"",0===parseInt(c.thirdparty)&&0===parseInt(c.advanced)&&0===parseInt(c.performance)&&0===parseInt(c.preference)&&J(),M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:c.strict,thirdparty:c.thirdparty,advanced:c.advanced,performance:c.performance,preference:c.preference,wp_lang:a},function(e){b=d,m("script_inject",c);e="string"==typeof e?JSON.parse(e):e;e.header&&postscribe(document.head,e.header),e.body&&M(e.body).prependTo(document.body),e.footer&&postscribe(document.body,e.footer)}))},location.pathname;var R=M(window).scrollTop(),S=(M("#moove_gdpr_save_popup_settings_button").show(),moove_frontend_gdpr_scripts.enabled_default.strict),N=moove_frontend_gdpr_scripts.enabled_default.third_party,O=moove_frontend_gdpr_scripts.enabled_default.advanced,j=void 0!==moove_frontend_gdpr_scripts.enabled_default.performance&&moove_frontend_gdpr_scripts.enabled_default.performance,D=void 0!==moove_frontend_gdpr_scripts.enabled_default.preference&&moove_frontend_gdpr_scripts.enabled_default.preference;if(void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll&&1!==parseInt(N)&&1!==parseInt(O)&&1!==parseInt(j)&&1!==parseInt(D)&&(D=j=O=N=S=1),0<=document.cookie.indexOf("moove_gdpr_popup")||1==N||1==O||1==j||1==D||1<S){var E=C("moove_gdpr_popup");if(E){S=v();"0"==S.strict&&"0"==S.thirdparty&&"0"==S.advanced&&"0"==S.performance&&"0"==S.preference&&(J(),n())}else{var A=!1;if("undefined"!=typeof sessionStorage&&(A=sessionStorage.getItem("gdpr_session")),void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll)if(A)try{w(JSON.parse(A)),y=!0,l("dbg - inject - 1"),I(A),T("moove_gdpr_popup",A,p),x()}catch(e){}else(!y&&1==moove_frontend_gdpr_scripts.enabled_default.third_party||!y&&1==moove_frontend_gdpr_scripts.enabled_default.advanced||!y&&1==moove_frontend_gdpr_scripts.enabled_default.performance||!y&&1==moove_frontend_gdpr_scripts.enabled_default.performance)&&(w(E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D}),E=JSON.stringify(E),e=!0,n(),l("dbg - default scroll inject")),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("1"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"true"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("1"))&&(l("dbg - enable on scroll - enter"),M(window).scroll(function(){if((!y||e)&&200<M(this).scrollTop()-R){E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D},C("moove_gdpr_popup")||"undefined"==typeof sessionStorage||(A=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(E)),A=sessionStorage.getItem("gdpr_session"));try{w(E),E=JSON.stringify(E),n(),y=!0,l("dbg - inject - 2 - accept on scroll"),e||I(E),e=!1,T("moove_gdpr_popup",E,p),x(),t(),M("#moove_gdpr_save_popup_settings_button").show()}catch(e){}}})),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("2"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("2"))&&(S=30,l("dbg - hidetimer - enter, seconds: "+(S=void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds?parseInt(moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds):S)),setTimeout(function(){if(l("dbg - hidetimer - is_created: "+y),!y){E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D};var e=C("moove_gdpr_popup");l("dbg - hidetimer - cookies_stored: "+e),e||"undefined"==typeof sessionStorage||(A=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(E)),A=sessionStorage.getItem("gdpr_session"));try{w(E),E=JSON.stringify(E),n(),y=!0,l("dbg - inject - 2a"),I(E),T("moove_gdpr_popup",E,p),t()}catch(e){}}x(),M("#moove_gdpr_save_popup_settings_button").show()},1e3*S));else w(E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D}),E=JSON.stringify(E),n()}l("dbg - inject - 3"),I(E)}else n();function U(){M(document).find("#moove_gdpr_cookie_modal input[type=checkbox]").each(function(){M(this).is(":checked")})}M(document).on("click",'[data-href*="#moove_gdpr_cookie_modal"],[href*="#moove_gdpr_cookie_modal"]',function(e){e.preventDefault(),0<M("#moove_gdpr_cookie_modal").length&&(r=!0,gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open(),m("opened_modal_from_link",""))}),M(document).on("click",'[data-href*="#gdpr_cookie_modal"],[href*="#gdpr_cookie_modal"]',function(e){e.preventDefault(),0<M("#moove_gdpr_cookie_modal").length&&(r=!0,gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open(),m("opened_modal_from_link",""))}),M(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button a, #moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button button",function(e){e.preventDefault()}),M(document).on("click tap",".moove-gdpr-modal-close",function(e){e.preventDefault(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close()}),M(document).on("click","#moove-gdpr-menu .moove-gdpr-tab-nav",function(e){e.preventDefault(),e.stopPropagation(),M("#moove-gdpr-menu li").removeClass("menu-item-selected"),M(this).parent().addClass("menu-item-selected"),M(".moove-gdpr-tab-content .moove-gdpr-tab-main").hide(),M(M(this).attr("href")).show(),M(M(this).attr("data-href")).show(),m("clicked_to_tab",M(this).attr("data-href"))}),M(document).on("gdpr_lightbox:close",function(e,o){M(document).moove_gdpr_lightbox_close()}),M.fn.moove_gdpr_lightbox_close=function(e){r&&(M("body").removeClass("moove_gdpr_overflow"),r=!1)},M.fn.moove_gdpr_lightbox_open=function(e){var o;r&&(M("body").addClass("moove_gdpr_overflow"),o=C("moove_gdpr_popup"),document.activeElement.blur(),"none"===moove_frontend_gdpr_scripts.show_icons&&M("body").addClass("gdpr-no-icons"),M(".moove-gdpr-status-bar input[type=checkbox]").each(function(){M(this).is(":checked")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown()}),o?w(o=JSON.parse(o)):M("#moove_gdpr_strict_cookies").is(":checked")||(M("#advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled"),M("#third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled")),void 0!==moove_frontend_gdpr_scripts.hide_save_btn&&"true"===moove_frontend_gdpr_scripts.hide_save_btn?M(".moove-gdpr-modal-save-settings").removeClass("button-visible").hide():M(".moove-gdpr-modal-save-settings").addClass("button-visible").show(),U())},M(document).on("gdpr_lightbox:open",function(e,o){M(document).moove_gdpr_lightbox_open()}),M(document).on("click tap",".fl-disabled",function(e){M("#moove_gdpr_cookie_modal .moove-gdpr-modal-content").is(".moove_gdpr_modal_theme_v2")?0<M("#moove_gdpr_strict_cookies").length&&(M("#moove_gdpr_strict_cookies").trigger("click"),M(this).trigger("click")):M(this).closest(".moove-gdpr-tab-main-content").find(".moove-gdpr-strict-secondary-warning-message").slideDown()}),M(document).on("change",".moove-gdpr-status-bar input[type=checkbox]",function(e){M(".moove-gdpr-modal-save-settings").addClass("button-visible").show();var o=M(this).closest(".moove-gdpr-tab-main").attr("id");M(this).closest(".moove-gdpr-status-bar").toggleClass("checkbox-selected"),M(this).closest(".moove-gdpr-tab-main").toggleClass("checkbox-selected"),M("#moove-gdpr-menu .menu-item-"+o).toggleClass("menu-item-off"),M(this).is(":checked")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown(),M(this).is("#moove_gdpr_strict_cookies")&&(M(this).is(":checked")?(M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#moove_gdpr_performance_cookies").prop("disabled",!1),M("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_advanced_cookies").prop("disabled",!1),M("#performance-cookie
875s fieldset, #performance-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#performance-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#preference-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!1)):(M(".gdpr_cookie_settings_shortcode_content").find("input").each(function(){M(this).prop("checked",!1)}),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!0).prop("checked",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!0).prop("checked",!1))),M('input[data-name="'+M(this).attr("name")+'"]').prop("checked",M(this).is(":checked")),U()}),M(document).on("click tap",".gdpr_cookie_settings_shortcode_content a.gdpr-shr-save-settings",function(e){e.preventDefault(),P(!0),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),t()}),M(document).on("change",".gdpr_cookie_settings_shortcode_content input[type=checkbox]",function(e){var o=M(this).attr("data-name"),r=M("#"+o);M(this).is(":checked")?(M('input[data-name="'+o+'"]').prop("checked",!0),"moove_gdpr_strict_cookies"===M(this).attr("data-name")||M(this).closest(".gdpr_cookie_settings_shortcode_content").find('input[data-name="moove_gdpr_strict_cookies"]').is(":checked")||(M('input[data-name="'+o+'"]').prop("checked",!1),M('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1.2)"),setTimeout(function(){M('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1)")},300))):(M('input[data-name="'+o+'"]').prop("checked",M(this).is(":checked")),"moove_gdpr_strict_cookies"===M(this).attr("data-name")&&M(".gdpr_cookie_settings_shortcode_content").find('input[type="checkbox"]').prop("checked",!1)),r.trigger("click")}),M(document).on("click tap",'.moove-gdpr-modal-allow-all, [href*="#gdpr-accept-cookies"]',function(e){e.preventDefault(),M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!1),M(document).moove_gdpr_lightbox_close()}),M(document).on("click tap",".moove-gdpr-infobar-allow-all",function(e){e.preventDefault(),M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!1)}),M(document).on("click tap",".moove-gdpr-modal-save-settings",function(e){e.preventDefault(),P(!0),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),t()});function J(){try{M(document).find("script[data-gdpr]").each(function(){l("script_removed: "+M(this).attr("src")),M(this).remove()});for(var e=document.cookie.split(";"),o=window.location.hostname,r=0;r<e.length;r++){var t=e[r],n=t.indexOf("="),i=-1<n?t.substr(0,n):t;i.includes("woocommerce")||i.includes("wc_")||i.includes("moove_gdpr_popup")||i.includes("wordpress")||(document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain="+o,document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=."+o,l("cookie removed: "+i+" - "+o))}}catch(e){l("error in gdpr_delete_all_cookies: "+e)}"undefined"!=typeof sessionStorage&&sessionStorage.removeItem("gdpr_session")}function P(e){var o=C("moove_gdpr_popup"),e=(e&&(J(),f()),"0"),r="0",t="0",n="0",i="0",d=!1;o&&(e=(o=JSON.parse(o)).strict,r=o.advanced,t=o.thirdparty,n=void 0!==o.performance?o.performance:0,i=void 0!==o.preference?o.preference:0),0<M(document).find("#moove_gdpr_strict_cookies").length?M(document).find("#moove_gdpr_strict_cookies").is(":checked")?(e="1",d=!0):e="0":(d=!0,e="1"),M(document).find("#moove_gdpr_performance_cookies").is(":checked")?(t="
8751",d=!0):t="0",M(document).find("#moove_gdpr_advanced_cookies").is(":checked")?(r="1",d=!0):r="0",M(document).find("#moove_gdpr_performance_cc_cookies").is(":checked")?(n="1",d=!0):n="0",M(document).find("#moove_gdpr_preference_cc_cookies").is(":checked")?(i="1",d=!0):i="0",!o&&d?(T("moove_gdpr_popup",JSON.stringify({strict:e,thirdparty:t,advanced:r,performance:n,preference:i}),p),x(),M(document).find("#moove_gdpr_save_popup_settings_button").show()):o&&!s&&T("moove_gdpr_popup",JSON.stringify({strict:e,thirdparty:t,advanced:r,performance:n,preference:i}),p),(o=C("moove_gdpr_popup"))&&"0"==(o=JSON.parse(o)).strict&&"0"==o.thirdparty&&"0"==o.advanced&&"0"==o.performance&&"0"==o.preference&&J()}window.location.hash&&("moove_gdpr_cookie_modal"!==(S=(S=window.location.hash.substring(1)).replace(/\/$/,""))&&"gdpr_cookie_modal"!==S||(r=!0,m("opened_modal_from_link",""),setTimeout(function(){0<M("#moove_gdpr_cookie_modal").length&&(gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open())},500)),"gdpr-accept-cookies"===S&&(M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!0),M(document).moove_gdpr_lightbox_close()),"gdpr-reject-cookies"===S)&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),n(),T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500))},finalize:function(){}}},r={fire:function(e,o,r){var t=n;o=void 0===o?"init":o,""!==e&&t[e]&&"function"==typeof t[e][o]&&t[e][o](r)},loadEvents:function(){var n,o=!1,e=!1;void 0!==moove_frontend_gdpr_scripts.gpc&&1===parseInt(moove_frontend_gdpr_scripts.gpc)&&void 0!==navigator.globalPrivacyControl&&(gpcValue=navigator.globalPrivacyControl)&&(e=!0,console.warn("GDPR Cookie Compliance - Blocked by Global Policy Control (GPC)")),e||(void 0!==moove_frontend_gdpr_scripts.geo_location&&"true"===moove_frontend_gdpr_scripts.geo_location?(n="moove_gdpr_geo_cache",null!==(e=(()=>{for(var e=encodeURIComponent(n)+"=",o=document.cookie.split(";"),r=0;r<o.length;r++){for(var t=o[r];" "===t.charAt(0);)t=t.substring(1,t.length);if(0===t.indexOf(e))try{return JSON.parse(decodeURIComponent(t.substring(e.length,t.length)))}catch(e){return null}}return null})())?(void 0!==e.display_cookie_banner&&(moove_frontend_gdpr_scripts.display_cookie_banner=e.display_cookie_banner),void 0!==e.enabled_default&&(moove_frontend_gdpr_scripts.enabled_default=e.enabled_default),o||(o=!0,r.fire("common"))):jQuery.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_localize_scripts"},function(e){var e="string"==typeof e?JSON.parse(e):e;void 0!==e.display_cookie_banner&&(moove_frontend_gdpr_scripts.display_cookie_banner=e.display_cookie_banner),void 0!==e.enabled_default&&(moove_frontend_gdpr_scripts.enabled_default=e.enabled_default),e=e,document.cookie=encodeURIComponent(n)+"="+encodeURIComponent(JSON.stringify(e))+"; path=/; SameSite=Lax",o||(o=!0,r.fire("common"))})):(moove_frontend_gdpr_scripts.script_delay,0<(e=0<=parseInt(moove_frontend_gdpr_scripts.script_delay)?parseInt(moove_frontend_gdpr_scripts.script_delay):0)?setTimeout(function(){r.fire("common")},e):r.fire("common"))),M.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(e,o){r.fire(o),r.fire(o,"finalize")}),r.fire("common","finalize")}};M(document).ready(r.loadEvents)})(jQuery); 876/*! This file is auto-generated */ 877!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&e(jQuery)}(function(f){"use strict";function u(e){return"function"==typeof e}var i,r,v={interval:100,sensitivity:6,timeout:0},s=0,a=function(e){i=e.pageX,r=e.pageY},p=function(e,t,n,o){if(Math.sqrt((n.pX-i)*(n.pX-i)+(n.pY-r)*(n.pY-r))<o.sensitivity)return t.off(n.event,a),delete n.timeoutId,n.isActive=!0,e.pageX=i,e.pageY=r,delete n.pX,delete n.pY,o.over.apply(t[0],[e]);n.pX=i,n.pY=r,n.timeoutId=setTimeout(function(){p(e,t,n,o)},o.interval)};f.fn.hoverIntent=function(e,t,n){function o(e){var u=f.extend({},e),r=f(this),v=((t=r.data("hoverIntent"))||r.data("hoverIntent",t
877={}),t[i]),t=(v||(t[i]=v={id:i}),v.timeoutId&&(v.timeoutId=clearTimeout(v.timeoutId)),v.event="mousemove.hoverIntent.hoverIntent"+i);"mouseenter"===e.type?v.isActive||(v.pX=u.pageX,v.pY=u.pageY,r.off(t,a).on(t,a),v.timeoutId=setTimeout(function(){p(u,r,v,d)},d.interval)):v.isActive&&(r.off(t,a),v.timeoutId=setTimeout(function(){var e,t,n,o,i;e=u,t=r,n=v,o=d.out,(i=t.data("hoverIntent"))&&delete i[n.id],o.apply(t[0],[e])},d.timeout))}var i=s++,d=f.extend({},v);f.isPlainObject(e)?(d=f.extend(d,e),u(d.out)||(d.out=d.over)):d=u(t)?f.extend(d,{over:e,out:t,selector:n}):f.extend(d,{over:e,out:e,selector:t});return this.on({"mouseenter.hoverIntent":o,"mouseleave.hoverIntent":o},d.selector)}}); 878/*! Max Mega Menu jQuery Plugin */(function(n){"use strict";let K=0;n.maxmegamenu=function(E,P){const e=this,i=n(E),m=i.parent(),b=i.siblings(".mega-menu-toggle"),w=i.attr("id"),k=".megamenu-"+(w+"-"+ ++K),_=n(["li.mega-menu-megamenu.mega-menu-item-has-children","li.mega-menu-flyout.mega-menu-item-has-children","li.mega-menu-tabbed > ul.mega-sub-menu > li.mega-menu-item-has-children","li.mega-menu-flyout li.mega-menu-item-has-children"].join(","),i),T=n("li.mega-menu-megamenu li.mega-menu-item-has-children.mega-collapse-children > a.mega-menu-link",i),S="a.mega-menu-link, button.mega-menu-link, .mega-search span[role=button]",V="Tab",z="Escape",R="Enter",B=" ",F="ArrowLeft",L="ArrowUp",W="ArrowRight",A="ArrowDown",N={event:i.attr("data-event"),effect:i.attr("data-effect"),effect_speed:parseInt(i.attr("data-effect-speed")),effect_mobile:i.attr("data-effect-mobile"),effect_speed_mobile:parseInt(i.attr("data-effect-speed-mobile")),panel_width:i.attr("data-panel-width"),panel_inner_width:i.attr("data-panel-inner-width"),mobile_force_width:i.attr("data-mobile-force-width"),mobile_overlay:i.attr("data-mobile-overlay"),mobile_state:i.attr("data-mobile-state"),mobile_direction:i.attr("data-mobile-direction"),second_click:i.attr("data-second-click"),vertical_behaviour:i.attr("data-vertical-behaviour"),document_click:i.attr("data-document-click"),breakpoint:i.attr("data-breakpoint"),unbind_events:i.attr("data-unbind"),hover_intent_timeout:i.attr("data-hover-intent-timeout")??300,hover_intent_interval:i.attr("data-hover-intent-interval")??100};e.settings={};let y;e.addAnimatingClass=function(t){if(e.settings.effect==="disabled")return;n(".mega-animating",m).removeClass("mega-animating");const l=e.settings.effect_speed+parseInt(e.settings.hover_intent_timeout,10);t.addClass("mega-animating"),setTimeout(function(){t.removeClass("mega-animating")},l)},e.hideAllPanels=function(){n(".mega-toggle-on > a.mega-menu-link",i).each(function(){e.hidePanel(n(this),!1)})},e.expandMobileSubMenus=function(){if(e.settings.mobile_direction==="vertical"&&(n(".mega-menu-item-has-children.mega-expand-on-mobile > a.mega-menu-link",i).each(function(){e.showPanel(n(this),!0)}),e.settings.mobile_state==="expand_all"&&n(".mega-menu-item-has-children:not(.mega-toggle-on) > a.mega-menu-link",i).each(function(){e.showPanel(n(this),!0)}),e.settings.mobile_state==="expand_active")){const t=["li.mega-current-menu-ancestor.mega-menu-item-has-children > a.mega-menu-link","li.mega-current-menu-item.mega-menu-item-has-children > a.mega-menu-link","li.mega-current-menu-parent.mega-menu-item-has-children > a.mega-menu-link","li.mega-current_page_ancestor.mega-menu-item-has-children > a.mega-menu-link","li.mega-current_page_item.mega-menu-item-has-children > a.mega-menu-link"];i.find(t.join(", ")).each(function(){e.showPanel(n(this),!0)})}},e.hideSiblingPanels=function(t,l){t.parent().parent().find(".mega-toggle-on").children("a.mega-menu-link").each(function(){e.hidePanel(n(this),l)})},e.isDesktopView=function(){return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)>e.settings.breakpoint},e.isMobileView=function(){return!e.isDesktopView()},e.isHorizontalMobileSubmenuMode=function(){return e.isMobileView()&&e.isMobileOffCanvas()&&e.settings.mobile_direction==="horizontal"};const M=function(t){return t.find("> li.mega-mobile-back:visible > button.mega-mobile-back-link").first()},I=function(){return n("li.mega-toggle-on:not(.mega-collapse-children) > ul.mega-sub-menu",i).last()};e.getFocusableItemsInSubmenu=function(t){return t.find(S).not(".mega-mobile-back-link").filter(function(){return n(this).is(":visible")&&window.getComputedStyle(this).visibility!=="hidden"})},e.focusFirstItemInOpenedSubmenu=function(t){if(!e.isHorizontalMobileSubmenuMode()||!m.hasClass("mega-keyboard-navigation"))return;const l=t.children("ul.mega-sub-menu");if(!l.length)return;const a=l.find(S).not(".mega-mobile-back-link").filter(":visible").first();a.length?a.trigger("focus"):M(l).trigger("focus")},e.deferFocusFirstItemInOpenedSubmenu=function(t){const l=Math.min(120,parseInt(e.settings.effect_speed_mobile,10)||0);setTimeout(function(){e.focusFirstItemInOpenedSubmenu(t),setTimeout(function(){t.find("ul.mega-sub-menu").has(document.activeElement).length!==0||e.focusFirstItemInOpenedSubmenu(t)},40)},l)};const O=function(t){return typeof t=="number"||typeof t=="string"&&t.trim()!==""&&!isNaN(t)?n("li.mega-menu-item-"+t,i).find("a.mega-menu-link").first():t.is("li.mega-menu-item")?t.f
878ind("a.mega-menu-link").first():t};e.showPanel=function(t,l){t=O(t);const a=t.parent(),d=e.isDesktopView(),v=!d;if(a.triggerHandler("before_open_panel"),a.find("[aria-expanded]").first().attr("aria-expanded","true"),n(".mega-animating",m).removeClass("mega-animating"),!(v&&a.hasClass("mega-hide-sub-menu-on-mobile"))){if(d&&(i.hasClass("mega-menu-horizontal")||i.hasClass("mega-menu-vertical"))&&!a.hasClass("mega-collapse-children")&&e.hideSiblingPanels(t,!0),(v&&m.hasClass("mega-keyboard-navigation")||e.settings.vertical_behaviour==="accordion")&&e.hideSiblingPanels(t,!1),e.calculateDynamicSubmenuWidths(t),e.shouldUseSlideAnimation(t,l)){const p=v?e.settings.effect_speed_mobile:e.settings.effect_speed;t.siblings(".mega-sub-menu").css("display","none").animate({height:"show",paddingTop:"show",paddingBottom:"show",minHeight:"show"},p,function(){n(this).css("display","")})}a.addClass("mega-toggle-on").triggerHandler("open_panel"),e.deferFocusFirstItemInOpenedSubmenu(a)}},e.shouldUseSlideAnimation=function(t,l){if(l===!0)return!1;if(t.parent().hasClass("mega-collapse-children"))return!0;const a=e.isDesktopView();if(a&&e.settings.effect==="slide")return!0;if(!a){if(e.settings.effect_mobile==="slide")return!0;if(e.isMobileOffCanvas())return e.settings.mobile_direction!=="horizontal"}return!1},e.hidePanel=function(t,l){t=O(t);const a=t.parent(),d=t.siblings(".mega-sub-menu"),v=e.isMobileView();if(a.triggerHandler("before_close_panel"),a.find("[aria-expanded]").first().attr("aria-expanded","false"),e.shouldUseSlideAnimation(t)){const p=v?e.settings.effect_speed_mobile:e.settings.effect_speed;d.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide",minHeight:"hide"},p,function(){d.css("display",""),a.removeClass("mega-toggle-on").triggerHandler("close_panel")});return}l&&d.css("display","none").delay(e.settings.effect_speed).queue(function(){n(this).css("display","").dequeue()}),d.find(".widget_media_video video").each(function(){this.player&&this.player.pause()}),a.removeClass("mega-toggle-on").triggerHandler("close_panel"),e.addAnimatingClass(a)};const x=function(t){return t==="$menu"?i:t==="$wrap"?m:n(t)};e.calculateDynamicSubmenuWidths=function(t){const l=t.parent(),a=t.siblings(".mega-sub-menu"),d=e.isDesktopView(),v=l.hasClass("mega-menu-megamenu")&&l.parent().hasClass("max-mega-menu");if(v&&e.settings.panel_width)if(d){const p=i.offset();if(e.settings.panel_width==="100vw"){const h=n("body").offset();a.css({left:h.left-p.left+"px"})}else{const h=x(e.settings.panel_width);h.length>0&&a.css({width:h.outerWidth(),left:h.offset().left-p.left+"px"})}}else a.css({width:"",left:""});if(v&&e.settings.panel_inner_width){const p=x(e.settings.panel_inner_width);if(p.length>0){const h=parseInt(p.width(),10);a.css({paddingLeft:"",paddingRight:""});const C=parseInt(a.innerWidth(),10);d&&h>0&&h<C&&a.css({paddingLeft:(C-h)/2+"px",paddingRight:(C-h)/2+"px"})}}};const H=function(){e.calculateDynamicSubmenuWidths(n("> li.mega-menu-megamenu > a.mega-menu-link",i))};e.bindClickEvents=function(){e.unbindClickEvents(!0);let t=!1;n(document).on({["touchmove"+k]:function(){t=!0},["touchstart"+k]:function(){t=!1}}),n(document).on("click"+k+" touchend"+k,function(a){!t&&e.settings.document_click==="collapse"&&!n(a.target).closest(".mega-menu-wrap").length&&(e.hideAllPanels(),e.hideMobileMenu()),t=!1}),T.off("click.megamenu touchend.megamenu");const l=n("> a.mega-menu-link",_).add(T);l.on("touchend.megamenu",function(a){e.settings.event==="hover_intent"&&e.unbindHoverIntentEvents(),e.settings.event==="hover"&&e.unbindHoverEvents()}),l.on("click.megamenu",function(a){if(!n(a.target).hasClass("mega-indicator")){if(e.isDesktopView()&&n(this).parent().hasClass("mega-toggle-on")&&n(this).closest("ul.mega-sub-menu").parent().hasClass("mega-menu-tabbed")){if(e.settings.second_click==="go")return;a.preventDefault();return}t||e.isMobileView()&&n(this).parent().hasClass("mega-hide-sub-menu-on-mobile")||((e.settings.second_click==="go"||n(this).parent().hasClass("mega-click-click-go"))&&n(this).attr("href")!==void 0?n(this).parent().hasClass("mega-toggle-on")||(a.preventDefault(),e.showPanel(n(this))):(a.preventDefault(),n(this).parent().hasClass("mega-toggle-on")?e.hidePanel(n(this),!1):e.showPanel(n(this))))}}),e.settings.second_click==="disabled"&&l.off("click.megamenu"),n(".mega-close-after-click:not(.mega-menu-item-has-children) > a.mega-menu-link",i).on("click.megamenu",function(){e.hideAllPanels(),e.hideMobileMenu()}),n("button.mega-close",m).on("click.megamenu",function(a){e.hideMobileMenu()})},e.bindHoverEvents=function(){_.on({"mouseenter.megamenu":function(){e.unbindClickEvents(),n(this).hasClass("mega-toggle-on")||e.showPanel(n(this).children("a.mega-menu-link"))},"mouseleave.megamenu":function(){n(this).hasClass("mega-toggle-on")&&!n(this).hasClass("mega-disable-collapse")&&!n(this).parent().parent().hasClass("mega-menu-tabbed")&&e.hidePanel(n(this).children("a.mega-menu-link"),!1)}})},e.bindHoverIntentEvents=function(){_.hoverIntent({over:function(){e.unbindClickEvents(),n(this).hasClass("mega-toggle-on")||e.showPanel(n(this).children("a.mega-menu-link"))},out:function(){n(this).hasClass("mega-toggle-on")&&!n(this).hasClass("mega-disable-collapse")&&!n(this).parent().parent().hasClass("mega-menu-tabbed")&&e.hidePanel(n(this).children("a.mega-menu-link"),!1)},timeout:e.settings.hover_intent_timeout,interval:e.settings.hover_intent_interval})},e.isMobileOffCanvas=function(){return e.settings.effect_mobile==="slide_left"||e.settings.effect_mobile==="slide_right"},e.shouldGoToNextTopLevelItem=function(t){return(t===W&&e.isDesktopView()||t===A&&e.isMobileView())&&i.hasClass("mega-menu-horizontal")},e.shouldGoToPreviousTopLevelItem=function(t){return(t===F&&e.isDesktopView()||t===L&&e.isMobileView())&&i.hasClass("mega-menu-horizontal")},e.bindKeyboardEvents=function(){const t=i.find("a.mega-menu-link").first(),l=m.find("button.mega-close").first(),a=S.split(", ").map(s=>"> "+s).join(", "),d=function(s){!s||!s.length||(s.parent().hasClass("mega-toggle-on")&&!s.closest("ul.mega-sub-menu").parent().hasClass("mega-menu-tabbed")?e.hidePanel(s):e.showPanel(s))},v=function(){const s=i[0].contains(document.activeElement)?n(document.activeElement):n(),o=n("> a.mega-menu-link",s.closest(".mega-toggle-on"));return o.length?(e.hidePanel(o),o.trigger("focus"),!0):!1},p=function(s,o,g,f){if(o.is(l)&&f){if(s.shiftKey){if(g){const u=e.getFocusableItemsInSubmenu(I()).last();u.length&&(s.preventDefault(),u.trigger("focus"))}}else{s.preventDefault();const u=g?M(I()):n();(u.length?u:t).trigger("focus")}return}if(f&&s.shiftKey&&o.is(t)){s.preventDefault(),l.trigger("focus");return}if(g){const u=I();if(u.length&&!u.has(o).length){if(s.preventDefault(),s.shiftKey)l.trigger("focus");else{const c=M(u);(c.length?c:e.getFocusableItemsInSubmenu(u).first()).trigger("focus")}return}const r=o.parentsUntil(i,"ul.mega-sub-menu").filter(function(){const c=n(this).parent();return c.hasClass("mega-toggle-on")&&!c.hasClass("mega-collapse-children")}).first();if(r.length)if(s.shiftKey)if(o.hasClass("mega-mobile-back-link"))s.preventDefault(),l.trigger("focus");else{const c=e.getFocusableItemsInSubmenu(r),D=M(r);c.length&&D.length&&o.is(c.first())&&(s.preventDefault(),D.trigger("focus"))}else{const c=e.getFocusableItemsInSubmenu(r);
878c.length&&o.is(c.last())&&(s.preventDefault(),l.trigger("focus"))}}},h=function(s){s.preventDefault(),b.hasClass("mega-menu-open")?e.hideMobileMenu():(e.showMobileMenu(),y=setTimeout(function(){i.find("a.mega-menu-link").first().trigger("focus")},e.settings.effect_speed_mobile))},C=function(s,o){o.is("a.mega-menu-link")?(s.preventDefault(),o.parent().is(_)&&d(o)):o.is(".mega-indicator")&&(s.preventDefault(),d(o.parent()))},U=function(){const s=n(".mega-toggle-on",i).length!==0;s&&v()||e.isMobileView()&&!s&&e.hideMobileMenu()},j=function(s,o){if(o.is(".mega-indicator")){d(o.parent());return}if(o.parent().is(_)){if(e.isMobileView()&&o.parent().is(".mega-hide-sub-menu-on-mobile"))return;if(!o.is("[href]")){d(o);return}if(o.parent().hasClass("mega-toggle-on")&&!o.closest("ul.mega-sub-menu").parent().hasClass("mega-menu-tabbed"))return;s.preventDefault(),e.showPanel(o)}},q=function(s,o){s.preventDefault();const g=I();if(g.length){const f=M(g),u=e.getFocusableItemsInSubmenu(g),r=[];f.length&&r.push(f[0]),u.each(function(){r.push(this)}),l.length&&r.push(l[0]);const c=r.indexOf(document.activeElement),D=c<0?o?0:r.length-1:(c+(o?1:-1)+r.length)%r.length;n(r[D]).trigger("focus")}else{const f=i.children("li.mega-menu-item:visible").find(a),u=f.index(document.activeElement);if(u>=0){const r=(u+(o?1:-1)+f.length)%f.length;f.eq(r).trigger("focus")}}},G=function(s,o){s.preventDefault();const g=i.children("li.mega-menu-item:visible").find(a),f=n(document.activeElement).closest(i.children("li.mega-menu-item")).find(a).first(),u=g.index(f),r=o?u+1:u-1;u>=0&&r>=0&&(e.hideAllPanels(),g.eq(r).trigger("focus"))};m.on("keyup.megamenu",".max-mega-menu, .mega-menu-toggle",function(s){if(s.key!==V)return;m.addClass("mega-keyboard-navigation"),e.bindClickEvents();const o=n(s.target);e.isDesktopView()&&o.is(".mega-menu-link")&&o.parent().parent().hasClass("max-mega-menu")&&e.hideAllPanels()}),m.on("keydown.megamenu","a.mega-menu-link, button.mega-menu-link, button.mega-mobile-back-link, .mega-indicator, .mega-menu-toggle-block, .mega-menu-toggle-animated-block button, button.mega-close",function(s){if(!m.hasClass("mega-keyboard-navigation"))return;const o=s.key,g=n(s.target),f=e.isHorizontalMobileSubmenuMode(),u=e.isMobileView()&&e.isMobileOffCanvas();switch(o){case V:p(s,g,f,u);break;case B:g.is(".mega-menu-toggle-block button, .mega-menu-toggle-animated-block button")?h(s):C(s,g);break;case R:g.is(".mega-menu-toggle-block button, .mega-menu-toggle-animated-block button")?h(s):j(s,g);break;case z:U();break;case L:case A:f&&q(s,o===A);break;case F:case W:const r=e.shouldGoToNextTopLevelItem(o),c=e.shouldGoToPreviousTopLevelItem(o);(r||c)&&G(s,r);break}}),m.on("focusout.megamenu",function(s){m.hasClass("mega-keyboard-navigation")&&setTimeout(function(){m[0].contains(document.activeElement)||(m.removeClass("mega-keyboard-navigation"),e.hideAllPanels(),e.hideMobileMenu())},10)})},e.unbindAllEvents=function(){n(document).off(k),n("ul.mega-sub-menu, li.mega-menu-item, li.mega-menu-row, li.mega-menu-column, a.mega-menu-link, .mega-indicator",i).off()},e.unbindClickEvents=function(t){!t&&m.hasClass("mega-keyboard-navigation")||(n(document).off(k),n("> a.mega-menu-link",_).not(T).off("click.megamenu touchend.megamenu"))},e.unbindHoverEvents=function(){_.off("mouseenter.megamenu mouseleave.megamenu")},e.unbindHoverIntentEvents=function(){_.off("mouseenter mouseleave").removeProp("hoverIntent_t").removeProp("hoverIntent_s")},e.unbindKeyboardEvents=function(){m.off("keyup.megamenu keydown.megamenu focusout.megamenu")},e.unbindMegaMenuEvents=function(){e.settings.event==="hover_intent"&&e.unbindHoverIntentEvents(),e.settings.event==="hover"&&e.unbindHoverEvents(),e.unbindClickEvents(),e.unbindKeyboardEvents()},e.bindMegaMenuEvents=function(){e.unbindMegaMenuEvents();const t=e.isDesktopView();t&&e.settings.event==="hover_intent"&&e.bindHoverIntentEvents(),t&&e.settings.event==="hover"&&e.bindHoverEvents(),e.bindClickEvents(),e.bindKeyboardEvents()},e.checkWidth=function(){e.isMobileView()&&i.data("view")==="desktop"&&e.switchToMobile(),e.isDesktopView()&&i.data("view")==="mobile"&&e.switchToDesktop(),H()},e.reverseRightAlignedItems=function(){!n("body").hasClass("rtl")&&i.hasClass("mega-menu-horizontal")&&i.css("display")!=="flex"&&i.append(i.children("li.mega-item-align-right").get().reverse())},e.addClearClassesToMobileItems=function(){n(".mega-menu-row",i).each(function(){n("> .mega-sub-menu > .mega-menu-column:not(.mega-hide-on-mobile)",n(this)).filter(":even").addClass("mega-menu-clear")}
878)},e.initDesktop=function(){i.data("view","desktop"),e.bindMegaMenuEvents(),e.initIndicators(),i.trigger("mmm:switchToDesktop")},e.initMobile=function(){e.switchToMobile()},e.switchToDesktop=function(){i.data("view","desktop"),e.bindMegaMenuEvents(),e.reverseRightAlignedItems(),e.hideAllPanels(),e.hideMobileMenu(!0),i.removeAttr("role"),i.removeAttr("aria-modal"),i.removeAttr("aria-hidden"),i.trigger("mmm:switchToDesktop")},e.switchToMobile=function(){i.data("view","mobile"),e.isMobileOffCanvas()&&b.is(":visible")&&(i.attr("role","dialog"),i.attr("aria-modal","true"),i.attr("aria-hidden","true")),e.bindMegaMenuEvents(),e.initIndicators(),e.reverseRightAlignedItems(),e.addClearClassesToMobileItems(),e.hideAllPanels(),e.expandMobileSubMenus(),i.trigger("mmm:switchToMobile")},e.initToggleBar=function(){b.on("click",function(t){n(t.target).closest(".mega-menu-toggle-block, button.mega-toggle-animated, .mega-menu-toggle-custom-block",this).length?(t.preventDefault(),n(this).hasClass("mega-menu-open")?e.hideMobileMenu():e.showMobileMenu()):t.target===this&&e.isMobileOffCanvas()&&e.hideMobileMenu()})},e.initIndicators=function(){i.off("click.megamenu",".mega-indicator"),i.on("click.megamenu",".mega-indicator",function(t){t.preventDefault(),t.stopPropagation(),n(this).closest(".mega-menu-item").hasClass("mega-toggle-on")?(!n(this).closest("ul.mega-sub-menu").parent().hasClass("mega-menu-tabbed")||e.isMobileView())&&e.hidePanel(n(this).parent(),!1):e.showPanel(n(this).parent(),!1)})},e.hideMobileMenu=function(t=!1){if(!b.is(":visible")&&!t)return;i.attr("aria-hidden","true"),clearTimeout(y),y=setTimeout(function(){n("body").removeClass(w+"-mobile-open"),n("html").removeClass(w+"-off-canvas-open")},e.settings.effect_speed_mobile),m.hasClass("mega-keyboard-navigation")&&n(".mega-menu-toggle-block button, button.mega-toggle-animated",b).first().trigger("focus"),n(".mega-toggle-label, .mega-toggle-animated",b).attr("aria-expanded","false");const l=function(){i.css({width:"",left:"",display:""}),b.removeClass("mega-menu-open")};e.settings.effect_mobile==="slide"&&!t?i.animate({height:"hide"},e.settings.effect_speed_mobile,l):l(),i.triggerHandler("mmm:hideMobileMenu")},e.showMobileMenu=function(){b.is(":visible")&&(clearTimeout(y),n("body").addClass(w+"-mobile-open"),e.expandMobileSubMenus(),e.isMobileOffCanvas()&&n("html").addClass(w+"-off-canvas-open"),e.settings.effect_mobile==="slide"&&i.animate({height:"show"},e.settings.effect_speed_mobile,function(){n(this).css("display","")}),n(".mega-toggle-label, .mega-toggle-animated",b).attr("aria-expanded","true"),b.addClass("mega-menu-open"),e.toggleBarForceWidth(),i.attr("aria-hidden","false"),i.triggerHandler("mmm:showMobileMenu"))},e.toggleBarForceWidth=function(){const t=n(e.settings.mobile_force_width);if(t.length&&(e.settings.effect_mobile==="slide"||e.settings.effect_mobile==="disabled")){const l=b.offset(),a=t.offset();i.css({width:t.outerWidth(),left:a.left-l.left+"px"})}},e.doConsoleChecks=function(){e.settings.mobile_force_width!=="false"&&!n(e.settings.mobile_force_width).length&&(e.settings.effect_mobile==="slide"||e.settings.effect_mobile==="disabled")&&console.warn("Max Mega Menu #"+m.attr("id")+": Mobile Force Width element ("+e.settings.mobile_force_width+") not found");const t=/^((\d+(\.\d+)?(px|%|em|rem|vw|vh|ch|ex|cm|mm|in|pt|pc))|auto)$/i;e.settings.panel_width!==void 0&&!t.test(e.settings.panel_width)&&!x(e.settings.panel_width).length&&console.warn("Max Mega Menu #"+m.attr("id")+": Panel Width (Outer) element ("+e.settings.panel_width+") not found"),e.settings.panel_inner_width!==void 0&&!t.test(e.settings.panel_inner_width)&&!x(e.settings.panel_inner_width).length&&console.warn("Max Mega Menu #"+m.attr("id")+": Panel Width (Inner) element ("+e.settings.panel_inner_width+") not found")},e.init=function(){i.triggerHandler("before_mega_menu_init"),e.settings=n.extend({},N,P),window.console&&e.doConsoleChecks(),i.removeClass("mega-no-js"),e.initToggleBar(),e.settings.unbind_events==="true"&&e.unbindAllEvents(),document.readyState==="complete"?H():n(window).on("load",H),e.isDesktopView()?e.initDesktop():e.initMobile(),n(window).on("resize",function(){e.checkWidth()}),i.triggerHandler("after_mega_menu_init")}
vendor: 27,280 bytes, lines 878-883
878,e.init()},n.fn.maxmegamenu=function(E){return this.each(function(){if(n(this).data("maxmegamenu")===void 0){const P=new n.maxmegamenu(this,E);n(this).data("maxmegamenu",P)}})},n(function(){n(".max-mega-menu").maxmegamenu()})})(jQuery); 879/*! jQuery Validation Plugin - v1.21.0 - 7/17/2024 880 * https://jqueryvalidation.org/ 881 * Copyright (c) 2024 Jörn Zaefferer; Licensed MIT */ 882!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,customElements:[],onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)});var f=[":text","[type='password']","[type='file']","select","textarea","[type='number']","[type='search']","[type='tel']","[type='url']","[type='email']","[type='datetime']","[type='date']","[type='month']","[type='week']","[type='time']","[type='datetime-local']","[type='range']","[type='color']","[type='radio']","[type='checkbox']","[contenteditable]","[type='button']"],g=["select","option","[type='radio']","[type='checkbox']"];a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",f.concat(this.settings.customElements).join(", "),b).on("click.validate",g.concat(this.settings.customElements).join(", "),b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={},d=["input","select","textarea","[contenteditable]"];return a(this.currentForm).find(d.concat(this.settings.customElements).join(", ")).not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);this.abortRequest(b),"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?h.text(c||""):h.html(c||"")):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?h.text(c||""):h.html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},elementAjaxPort:function(a){return"validate"+a.name},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},abortRequest:function(b){var c;this.pending[b.name]&&(c=this.elementAjaxPort(b),a.ajaxAbort(c),this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass))},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),null!==i.valid&&i.old===h?i.valid:(i.old=h,i.valid=null,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:this.elementAjaxPort(c),dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(b,c,e){var f=b.port;"abort"===b.mode&&(a.ajaxAbort(f),d[f]=e)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(a.ajaxAbort(f),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a.ajaxAbort=function(a){d[a]&&(d[a].abort(),delete d[a])},a}); 883/*! mailcheck v1.1.2 @licence MIT */var Mailcheck={domainThreshold:2,secondLevelThreshold:2,topLevelThreshold:2,defaultDomains:["msn.com","bellsouth.net","telus.net","comcast.net","optusnet.com.au","earthlink.net","qq.com","sky.com","icloud.com","mac.com","sympatico.ca","googlemail.com","att.net","xtra.co.nz","web.de","cox.net","gmail.com","ymail.com","aim.com","rogers.com","verizon.net","rocketmail.com","google.com","optonline.net","sbcglobal.net","aol.com","me.com","btinternet.com","charter.net","shaw.ca"],defaultSecondLevelDomains:["yahoo","hotmail","mail","live","outlook","gmx"],defaultTopLevelDomains:["com","com.au","com.tw","ca","co.nz","co.uk","de","fr","it","ru","net","org","edu","gov","jp","nl","kr","se","eu","ie","co.il","us","at","be","dk","hk","es","gr","ch","no","cz","in","net","net.au","info","biz","mil","co.jp","sg","hu","uk"],run:function(a){a.domains=a.domains||Mailcheck.defaultDomains,a.secondLevelDomains=a.secondLevelDomains||Mailcheck.defaultSecondLevelDomains,a.topLevelDomains=a.topLevelDomains||Mailcheck.defaultTopLevelDomains,a.distanceFunction=a.distanceFunction||Mailcheck.sift4Distance;var b=function(a){return a},c=a.suggested||b,d=a.empty||b,e=Mailcheck.suggest(Mailcheck.encodeEmail(a.email),a.domains,a.secondLevelDomains,a.topLevelDomains,a.distanceFunction);return e?c(e):d()},suggest:function(a,b,c,d,e){a=a.toLowerCase();var f=this.splitEmail(a);if(c&&d&&-1!==c.indexOf(f.secondLevelDomain)&&-1!==d.indexOf(f.topLevelDomain))return!1;var g=this.findClosestDomain(f.domain,b,e,this.domainThreshold);if(g)return g==f.domain?!1:{address:f.address,domain:g,full:f.address+"@"+g};var h=this.findClosestDomain(f.secondLevelDomain,c,e,this.secondLevelThreshold),i=this.findClosestDomain(f.to
883pLevelDomain,d,e,this.topLevelThreshold);if(f.domain){g=f.domain;var j=!1;if(h&&h!=f.secondLevelDomain&&(g=g.replace(f.secondLevelDomain,h),j=!0),i&&i!=f.topLevelDomain&&""!==f.secondLevelDomain&&(g=g.replace(new RegExp(f.topLevelDomain+"$"),i),j=!0),j)return{address:f.address,domain:g,full:f.address+"@"+g}}return!1},findClosestDomain:function(a,b,c,d){d=d||this.topLevelThreshold;var e,f=1/0,g=null;if(!a||!b)return!1;c||(c=this.sift4Distance);for(var h=0;h<b.length;h++){if(a===b[h])return a;e=c(a,b[h]),f>e&&(f=e,g=b[h])}return d>=f&&null!==g?g:!1},sift4Distance:function(a,b,c){if(void 0===c&&(c=5),!a||!a.length)return b?b.length:0;if(!b||!b.length)return a.length;for(var d=a.length,e=b.length,f=0,g=0,h=0,i=0,j=0,k=[];d>f&&e>g;){if(a.charAt(f)==b.charAt(g)){i++;for(var l=!1,m=0;m<k.length;){var n=k[m];if(f<=n.c1||g<=n.c2){l=Math.abs(g-f)>=Math.abs(n.c2-n.c1),l?j++:n.trans||(n.trans=!0,j++);break}f>n.c2&&g>n.c1?k.splice(m,1):m++}k.push({c1:f,c2:g,trans:l})}else{h+=i,i=0,f!=g&&(f=g=Math.min(f,g));for(var o=0;c>o&&(d>f+o||e>g+o);o++){if(d>f+o&&a.charAt(f+o)==b.charAt(g)){f+=o-1,g--;break}if(e>g+o&&a.charAt(f)==b.charAt(g+o)){f--,g+=o-1;break}}}f++,g++,(f>=d||g>=e)&&(h+=i,i=0,f=g=Math.min(f,g))}return h+=i,Math.round(Math.max(d,e)-h+j)},splitEmail:function(a){a=null!==a?a.replace(/^\s*/,"").replace(/\s*$/,""):null;var b=a.split("@");if(b.length<2)return!1;for(var c=0;c<b.length;c++)if(""===b[c])return!1;var d=b.pop(),e=d.split("."),f="",g="";if(0===e.length)return!1;if(1==e.length)g=e[0];else{f=e[0];for(var h=1;h<e.length;h++)g+=e[h]+".";g=g.substring(0,g.length-1)}return{topLevelDomain:g,secondLevelDomain:f,domain:d,address:b.join("@")}},encodeEmail:function(a){var b=encodeURI(a);return b=b.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};"undefined"!=typeof module&&module.exports&&(module.exports=Mailcheck),"function"==typeof define&&define.amd&&define("mailcheck",[],function(){return Mailcheck}),"undefined"!=typeof window&&window.jQuery&&!function(a){a.fn.mailcheck=function(a){var b=this;if(a.suggested){var c=a.suggested;a.suggested=function(a){c(b,a)}}if(a.empty){var d=a.empty;a.empty=function(){d.call(null,b)}}a.email=this.val(),Mailcheck.run(a)}}(jQuery); 884"use strict";var punycode=new function(){this.utf16={decode:function(r){for(var e,o,t=[],n=0,f=r.length;n<f;){if(55296==(63488&(e=r.charCodeAt(n++)))){if(o=r.charCodeAt(n++),55296!=(64512&e)||56320!=(64512&o))throw new RangeError("UTF-16(decode): Illegal UTF-16 sequence");e=((1023&e)<<10)+(1023&o)+65536}t.push(e)}return t},encode:function(r){for(var e,o=[],t=0,n=r.length;t<n;){if(55296==(63488&(e=r[t++])))throw new RangeError("UTF-16(encode): Illegal UTF-16 value");65535<e&&(e-=65536,o.push(String.fromCharCode(e>>>10&1023|55296)),e=56320|1023&e),o.push(String.fromCharCode(e))}return o.join("")}};var v=36,A=2147483647;this.decode=function(r,e){var o,t,n,f,h,a,i,c,l=[],u=[],d=r.length,s=128,g=0,C=72,p=r.lastIndexOf("-");for(p<0&&(p=0),t=0;t<p;++t){if(e&&(u[l.length]=r.charCodeAt(t)-65<26),128<=r.charCodeAt(t))throw new RangeError("Illegal input >= 0x80");l.push(r.charCodeAt(t))}for(n=0<p?p+1:0;n<d;){for(f=g,h=1,a=v;;a+=v){if(d<=n)return;if(c=r.charCodeAt(n++),v<=(c=c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:v))return;if(c>Math.floor((A-g)/h))return;if(g+=c*h,c<(c=a<=C?1:C+26<=a?26:a-C))break;if(h>Math.floor(A/(v-c)))return;h*=v-c}if(C=function(r,e,o){var t;for(r=o?Math.floor(r/700):r>>1,r+=Math.floor(r/e),t=0;455<r;t+=v)r=Math.floor(r/35);return Math.floor(t+36*r/(r+38))}(g-f,o=l.length+1,0===f),Math.floor(g/o)>A-s)return;s+=Math.floor(g/o),g%=o,e&&u.splice(g,0,r.charCodeAt(n-1)-65<26),l.splice(g,0,s),g++}if(e)for(g=0,i=l.length;g<i;g++)u[g]&&(l[g]=String.fromCharCode(l[g]).toUpperCase().charCodeAt(0));return this.utf16.encode(l)},this.toUnicode=function(r){for(var e=r.split("."),o=[],t=0;t<e.length;++t){var n=e[t];o.push(n.match(/^xn--/)?punycode.decode(n.slice(4)):n)}return o.join(".")}}; 885var WPFormsUtils=window.WPFormsUtils||(o=>{let a={triggerEvent(r,t,e=[]){t=new o.Event(t);return r.trigger(t,e),t},debounce(o,s,l){let a;return function(){let r=this,t=arguments;var e=l&&!a;clearTimeout(a),a=setTimeout(function(){a=null,l||o.apply(r,t)},s),e&&o.apply(r,t)}},cssColorsUtils:{isTransparentColor(r,t=.33){r=a.cssColorsUtils.getColorAsRGBArray(r);return Number(r?.[3])<=t},getColorAsRGBArray(r){if(!a.cssColorsUtils.isValidColor(r))return!1;r="transparent"===(r=r.replace(/^#/,"").replaceAll(" ",""))?"rgba(0,0,0,0)":r;let t;return r.match(/[0-9a-f]{6,8}$/gi)?(t=r.match(/\w\w/g).map(r=>
885parseInt(r,16)))[3]=t[3]||0===t[3]?(t[3]/255).toFixed(2):1:t=r.split("(")[1].split(")")[0].split(","),t},isValidColor(r){var t=(new Option).style;return t.color=r,""!==t.color},getContrastColor(r){var r=a.cssColorsUtils.getColorAsRGBArray(r),t=r.reduce((r,t)=>r+t,0);return Math.round(t/3*(r[3]??1))<150?"#ffffff":"#000000"},getColorWithOpacity(r,t){r=r.trim();var e=a.cssColorsUtils.getColorAsRGBArray(r);if(!e)return r;t=t&&0!==t.length?t.toString():"1";r=4===e.length?parseFloat(e[3]):1,t=parseFloat(t)*r;return`rgba(${e[0]},${e[1]},${e[2]},${t})`.replace(/\s+/g,"")},rgbaToHex(r){var t,e,o,s,l;return/^rgb/.test(r)?!!(s=a.cssColorsUtils.getColorAsRGBArray(r))&&(t=Number(s[0]),e=Number(s[1]),o=Number(s[2]),s=s[3]?Math.round(255*Number(s[3])):255,("#"+[(l=r=>r.toString(16).padStart(2,"0"))(t),l(e),l(o),s<255?l(s):""].join("")).toLowerCase()):r}}};return a})((document,window,jQuery)); 886var wpforms=window.wpforms||((s,d,p)=>{let a="wpforms-field-readonly",l=new Set;function m(e,t=""){return d?.wpforms_settings?.[e]??t}let c={cache:{},isUpdatingToken:!1,init(){p(c.ready),p(d).on("load",function(){"function"==typeof p.ready.then?p.ready.then(c.load):c.load()}),c.bindUIActions(),c.bindOptinMonster()},ready(){c.clearUrlQuery(),c.setUserIdentifier(),c.loadValidation(),c.loadHoneypot(),c.loadDatePicker(),c.loadTimePicker(),c.loadInputMask(),setTimeout(function(){c.loadPayments()},50),c.loadMailcheck(),c.loadChoicesJS(),c.initTokenUpdater(),c.restoreSubmitButtonOnEventPersisted(),c.bindChoicesJS(),c.readOnlyFieldsInit(),p(".wpforms-randomize").each(function(){for(var e=p(this),t=e.children().not(".wpforms-other-choice").toArray(),r=e.children(".wpforms-other-choice");t.length;)e.append(t.splice(Math.floor(Math.random()*t.length),1)[0]);r.length&&e.append(r)}),p(".wpforms-page-button").prop("disabled",!1),p(s).trigger("wpformsReady")},load(){},clearUrlQuery(){var e=d.location;let t=e.search;-1!==t.indexOf("wpforms_form_id=")&&(t=t.replace(/([&?]wpforms_form_id=[0-9]*$|wpforms_form_id=[0-9]*&|[?&]wpforms_form_id=[0-9]*(?=#))/,""),history.replaceState({},null,e.origin+e.pathname+t))},loadHoneypot(){p(".wpforms-form").each(function(){let e=p(this),t=e.data("formid"),r=[],a=[];var o,i,n,s;void 0!==wpforms_settings.hn_data[t]&&(p(`#wpforms-form-${t} .wpforms-field`).each(function(){var e=p(this);r.push(e.data("field-id")),a.push(e.find(".wpforms-field-label").text())}),o=c.getHoneypotRandomLabel(a.join(" ").split(" ")),i=c.getHoneypotFieldId(r),s=r[Math.floor(Math.random()*r.length)],n=`wpforms-${t}-field_`+i,p(`#wpforms-${t}-field_${s}-container`,e).before(` 887 <div id="${n}-container" class="wpforms-field wpforms-field-text" data-field-type="text" data-field-id="${i}" style="position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important;"> 888 <label class="wpforms-field-label" for="${n}" aria-hidden="true" style="counter-increment: none;"></label> 889 <input type="text" id="${n}" class="wpforms-field-medium" name="wpforms[fields][${i}]" aria-hidden="true" style="visibility: hidden;" tabindex="-1"> 890 </div>`),WPFormsUtils.triggerEvent(e,"wpformsHoneypotFieldInserted",[e,t]),(s=p(`#wpforms-${t}-field_${wpforms_settings.hn_data[t]}-container`,e)).find("input").attr({tabindex:"-1","aria-hidden":"true"}),s.find("label").text(o).attr("aria-hidden","true"))})},getHoneypotRandomLabel(t){let r="";for(let e=0;e<3;e++)r+=t[Math.floor(Math.random()*t.length)]+" ";return r.trim()},getHoneypotFieldId(t){var r=Math.max(...t);let a=0;for(let e=1;e<r;e++)if(!t.includes(e)){a=e;break}return a=a||r+1},loadValidation(){void 0===p.fn.validate?d.location.hash&&"#wpformsdebug"===d.location.hash&&console.log("jQuery Validation library not found."):(p(".wpforms-input-temp-name").each(function(e,t){var r=Math.floor(9999*Math.random())+1;p(this).attr("name","wpf-temp-"+r)}),p(s).on("change",".wpforms-validate input[type=url]",function(){var e=p(this).val();if(!e)return!1;"http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&p(this).val("https://"+e)}),p.validator.messages.required=wpforms_settings.val_required,p.validator.messages.url=wpforms_settings.val_url,p.validator.messages.email=wpforms_settings.val_email,p.validator.messages.number=wpforms_settings.val_number,p.validator.messages.min=m("val_min","Please enter a value greater than or equal to {0}").replace("{value}","{0}"),p.validator.messages.max=m("val_max","Please enter a value less than or equal to {0}").replace("{value}","{0}"),void 0!==p.fn.payment&&p.validator.addMethod("creditcard",function(e,t){e=p.payment.validateCardNumber(e);return this.optional(t)||e},wpforms_settings.val_creditcard),p.validator.addMethod("extension",function(e,t,r){return r="string"==typeof r?r.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(t)||e.match(new RegExp("\\.("+r+")$","i"))},wpforms_settings.val_fileextension),p.validator.addMethod("maxsize",function(e,t,r){var a=r,r=this.optional(t);let o,i;if(r)return r;if(t.files&&t.files.length)for(o=0,i=t.files.length;o<i;o++)if(t.files[o].size>a)return!1;return!0},wpforms_settings.val_filesize),p.validator.addMethod("camera-required",function(e,t){var r=p(t).closest(".wpforms-field-camera");return!r.length||!(t.hasAttribute("required")||r.hasClass("wpforms-field-required"))||t.files&&0<t.files.length||0<r.find(".wpforms-camera-selected-file.wpforms-camera-selected-file-active").length},wpforms_settings.val_required),p.validator.addMethod("step",function(e,t,r){i=r;let a=Math.floor(i)!==i&&i.toString().split(".")[1].length||0;function o(e){return Math.round(e*Math.pow(10,a))}var i=o(p(t).attr("min"));return e=o(e)-i,this.optional(t)||o(e)%o(r)==0}),p.validator.methods.email=function(e,t){return this.optional(t)||(e=>{if("string"!=typeof e)return!1;var t=e.indexOf("@",1);if(e.length<6||254<e.length||-1===t)return!1;if(-1!==e.indexOf("@",t+1))return!1;var[t,e]=e.split("@");if(!t||!e)return!1;if(!/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$/.test(t)||63<t.length)return!1;if(/\.{2,}/.test(e)||e.trim(" \t\n\r\0\v.")!==e)return!1;if((t=e.split(".")).length<2)return!1;var r,a=/^[a-z0-9-]+$/i;for(r of t)if(63<r.length||r.trim(" \t\n\r\0\v-")!==r||!a.test(r))return!1;return!0})(e)},p.validator.addMethod("restricted-email",function(e,t){var r=p(t);return!r.val().length||(r=r.closest(".wpforms-form").data("formid"),Object.prototype.hasOwnProperty.call(c.cache,r)&&Object.prototype.hasOwnProperty.call(c.cache[r],"restrictedEmailValidation")&&Object.prototype.hasOwnProperty.call(c.cache[r].restrictedEmailValidation,e)?c.cache[r].restrictedEmailValidation[e]:(c.restrictedEmailRequest
890(t,e),"pending"))},wpforms_settings.val_email_restricted),p.validator.addMethod("confirm",function(e,t,r){t=p(t).closest(".wpforms-field");return p(t.find("input")[0]).val()===p(t.find("input")[1]).val()},wpforms_settings.val_confirm),p.validator.addMethod("required-payment",function(e,t){return 0<c.amountSanitize(e)},wpforms_settings.val_requiredpayment),p.validator.addMethod("time12h",function(e,t){return this.optional(t)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(e)},wpforms_settings.val_time12h),p.validator.addMethod("time24h",function(e,t){return this.optional(t)||/^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])(\ ?[AP]M)?$/i.test(e)},wpforms_settings.val_time24h),p.validator.addMethod("turnstile",function(e){return e},wpforms_settings.val_turnstile_fail_msg),p.validator.addMethod("time-limit",function(e,t){var t=p(t),r=t.data("min-time");return void 0===r||!(t.prop("required")||!c.empty(e))||(t=t.data("max-time"),c.compareTimesGreaterThan(t,r)?c.compareTimesGreaterThan(e,r)&&c.compareTimesGreaterThan(t,e):c.compareTimesGreaterThan(e,r)&&c.compareTimesGreaterThan(e,t)||c.compareTimesGreaterThan(r,e)&&c.compareTimesGreaterThan(t,e))},function(e,t){t=p(t);let r=t.data("min-time"),a=t.data("max-time");return r=r.replace(/^00:([0-9]{2})pm$/,"12:$1pm"),a=a.replace(/^00:([0-9]{2})pm$/,"12:$1pm"),r=r.replace(/(am|pm)/g," $1").toUpperCase(),a=a.replace(/(am|pm)/g," $1").toUpperCase(),wpforms_settings.val_time_limit.replace("{minTime}",r).replace("{maxTime}",a)}),p.validator.addMethod("check-limit",function(e,t){var t=p(t).closest("ul"),r=parseInt(t.attr("data-choice-limit")||0,10);return 0===r||t.find('input[type="checkbox"]:checked').length<=r},function(e,t){t=parseInt(p(t).closest("ul").attr("data-choice-limit")||0,10);return wpforms_settings.val_checklimit.replace("{#}",t)}),p.validator.addMethod("inputmask-incomplete",function(e,t){return 0===e.length||void 0===p.fn.inputmask||p(t).inputmask("isComplete")},wpforms_settings.val_inputmask_incomplete),p.validator.addMethod("required-positive-number",function(e,t){return 0<c.amountSanitize(e)},wpforms_settings.val_number_positive),p.validator.addMethod("required-minimum-price",function(e,t,r){t=p(t);return""===e&&!t.hasClass("wpforms-field-required")||Number(c.amountSanitize(c.amountFormat(r)))<=Number(c.amountSanitize(e))},wpforms_settings.val_minimum_price),p.validator.addMethod("password-strength",function(e,t){var r=p(t),t=WPFormsPasswordField.passwordStrength(e,t);return""===e&&!r.hasClass("wpforms-field-required")||t>=Number(r.data("password-strength-level"))},wpforms_settings.val_password_strength),p(".wpforms-validate").each(function(){let o=p(this),e=o.data("formid"),t;t=void 0!==d["wpforms_"+e]&&d["wpforms_"+e].hasOwnProperty("validate")?d["wpforms_"+e].validate:"undefined"!=typeof wpforms_validate?wpforms_validate:{errorElement:c.isModernMarkupEnabled()?"em":"label",errorClass:"wpforms-error",validClass:"wpforms-valid",ignore:c.getValidationIgnoreRules(o),ignoreTitle:!0,errorPlacement(e,t){c.isLikertScaleField(t)?(t.closest("table").hasClass("single-row")?t.closest(".wpforms-field"):t.closest("tr").find("th")).append(e):c.isWrappedField(t)?t.closest(".wpforms-field").append(e):c.isDateTimeField(t)?c.dateTimeErrorPlacement(t,e):c.isFieldInColumn(t)||c.isFieldHasHint(t)?t.parent().append(e):c.isLeadFormsSelect(t)?t.parent().parent().append(e):t.hasClass("wp-editor-area")?t.parent().parent().parent().append(e):c.isClassicFileUploadWithCamera(t)?e.insertAfter(t.parent().find("p.wpforms-file-upload-capture-camera-classic")):e.insertAfter(t),c.isModernMarkupEnabled()&&e.attr({role:"alert","aria-label":wpforms_settings.errorMessagePrefix,for:""})},highlight(e,t,r){var a=p(e),o=a.closest(".wpforms-field"),i=a.attr("name");("radio"===a.attr("type")||"checkbox"===a.attr("type")?o.find('input[name="'+i+'"]'):a).addClass(t).removeClass(r),"password"===a.attr("type")&&""===a.val().trim()&&d.WPFormsPasswordField&&a.data("rule-password-strength")&&a.hasClass("wpforms-field-required")&&WPFormsPasswordField.passwordStrength("",e),o.addClass("wpforms-has-error")},unhighlight(e,t,r){var e=p(e),a=e.closest(".wpforms-field"),o=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?a.find('input[name="'+o+'"]'):e).addClass(r).removeClass(t),a.find(":input.wpforms-error,[data-dz-errormessage]:not(:empty)").length||a.removeClass("wpforms-has-error"),c.isModernMarkupEnabled()&&e.parent().find("em.wpforms-error").remove()},submitHandler(n){function s(e,t){let r="label",a="";c.isModernMarkupEnabled()&&(r="em",a='role="alert"');var o=`<${r} id="wpforms-field_recaptcha-error" class="wpforms-error" ${a}> ${wpforms_settings.val_recaptcha_fail_msg}</${r}>`;e.find(".wpforms-recaptcha-container").append(o),c.restoreSubmitButton(e,t)}function l(e){var t=e.find(".wpforms-submit");t.prop("disabled",!0),WPFormsUtils.triggerEvent(e,"wpformsFormSubmitButtonDisable",[e,t])}function e(){let e=p(n),t=e.closest(".wpforms-container"),r=e.find(".wpforms-submit"),a=r.data("captchaInvalid"),o=r.data("alt-text"),i=r.get(0).recaptchaID;return e.data("token")&&0===p(".wpforms-token",e).length&&p('<input type="hidden" class="wpforms-token" name="wpforms[token]" />').val(e.data("token")).appendTo(e),e.find("#wpforms-field_recaptcha-error").remove(),l(e),o&&r.text(o),a?s(e,t):c.empty(i)&&0!==i?(p(".wpforms-input-temp-name").removeAttr("name"),void c.formSubmit(e)):(grecaptcha.execute(i).then(null,function(){gre
890captcha.getResponse()||s(e,t)}),!1)}return"function"==typeof wpformsRecaptchaV3Execute?(l(p(n)),wpformsRecaptchaV3Execute(e)):e()},invalidHandler(e,t){var r,a;void 0!==t.errorList[0]&&(t=p(t.errorList[0].element),r=p(o),c.isMultiPageForm(r)&&(a=c.getElementPageNumber(t))&&WPForms?.PageNavigation?.navigateToTargetPage?.(r,a),c.scrollToError(t))},onkeyup:WPFormsUtils.debounce(function(e,t){p(e).hasClass("wpforms-novalidate-onkeyup")||9===t.which&&""===this.elementValue(e)||-1!==p.inArray(t.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},1e3),onfocusout:function(e){let t=!1;p(e).hasClass("wpforms-novalidate-onkeyup")&&!e.value&&(t=!0),this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||(t=!0),(t=p(e).data("server-error")?!1:t)&&this.element(e)},onclick(e){let t=!1;var r=(e||{}).type;let a=p(e);-1<["checkbox","radio"].indexOf(r)&&((a=a.hasClass("wpforms-likert-scale-option")?a.closest("tr"):a.closest(".wpforms-field")).find("label.wpforms-error, em.wpforms-error").remove(),t=!0),t&&this.element(e)}},o.validate(t),c.loadValidationGroups(o),o.find('.wpforms-field-camera input[ type="file" ], .wpforms-field-camera .dropzone-input').each(function(){var e=p(this);(e.closest(".wpforms-field-camera").hasClass("wpforms-field-required")||e.attr("required"))&&e.rules("add",{"camera-required":!0})})}))},restrictedEmailRequest(r,a){var e=p(r),t=e.closest("form");let o=t.data("validator"),i=t.data("formid");t=e.closest(".wpforms-field").data("field-id");c.cache[i]=c.cache[i]||{},o.startRequest(r),p.post({url:wpforms_settings.ajaxurl,type:"post",data:{action:"wpforms_restricted_email",form_id:i,field_id:t,email:a},dataType:"json",success(e){var t={},e=e.success&&e.data;e||(t[r.name]=wpforms_settings.val_email_restricted,o.showErrors(t)),c.cache[i].restrictedEmailValidation=c.cache[i].restrictedEmailValidation||[],Object.prototype.hasOwnProperty.call(c.cache[i].restrictedEmailValidation,a)||(c.cache[i].restrictedEmailValidation[a]=e),o.stopRequest(r,e)}})},getValidationIgnoreRules(e){if(c.isMultiPageForm(e)&&e.find(".wpforms-page-indicator").data("allow-page-navigation"))return":hidden:not(.wpforms-page:hidden *):not(textarea.wp-editor-area):not(.wpforms-field-camera:not(.wpforms-conditional-hide) input), .wpforms-conditional-hide *, .wpforms-hidden *";return":hidden:not(textarea.wp-editor-area):not(.wpforms-field-camera:not(.wpforms-conditional-hide) input), .wpforms-conditional-hide textarea.wp-editor-area"},isFieldInColumn(e){return e.parent().hasClass("wpforms-one-half")||e.parent().hasClass("wpforms-two-fifths")||e.parent().hasClass("wpforms-one-fifth")},isFieldHasHint(e){return 0<e.nextAll(".wpforms-field-sublabel, .wpforms-field-description, .wpforms-field-limit-text, .wpforms-pass-strength-result").length},isDateTimeField(e){return e.hasClass("wpforms-timepicker")||e.hasClass("wpforms-datepicker")||e.is("select")&&e.attr("class").match(/date-month|date-day|date-year/)},isWrappedField(e){return"checkbox"===e.attr("type")||"radio"===e.attr("type")||"range"===e.attr("type")||"select"===e.is("select")||1===e.data("is-wrapped-field")||e.parent().hasClass("iti")||e.hasClass("wpforms-validation-group-member")||e.hasClass("choicesjs-select")||e.hasClass("wpforms-net-promoter-score-option")||e.hasClass("wpforms-field-payment-coupon-input")},isLikertScaleField(e){return e.hasClass("wpforms-likert-scale-option")},isClassicFileUploadWithCamera(e){return 0<e.parent().find("p.wpforms-file-upload-capture-camera-classic").length},isLeadFormsSelect(e){return e.parent().hasClass("wpforms-lead-forms-select")},isCoupon(e){return console.warn('WARNING! Function "wpforms.isCoupon( element )" has been deprecated'),e.closest(".wpforms-field").hasClass("wpforms-field-payment-coupon")},isMultiPageForm(e){return 0<e.find(".wpforms-page-indicator").length},getElementPageNumber(e){return parseInt(e.closest(".wpforms-page").data("page"),10)||0},dateTimeErrorPlacement(e,t){var r=e.closest(".wpforms-field-row-block, .wpforms-field-date-time");r.length?r.find("label.wpforms-error, em.wpforms-error").length||r.append(t):e.closest(".wpforms-field").append(t)},loadDatePicker(e){void 0!==p.fn.flatpickr&&(e=e?.length?e:p(s)).find(".wpforms-datepicker-wrap").each(function(){let a=p(this),e=a.find("input"),t=a.closest(".wpforms-form"),r=t.data("formid"),o=a.closest(".wpforms-field").data("field-id"),i;var n;!(i=void 0!==d["wpforms_"+r+"_"+o]&&d["wpforms_"+r+"_"+o].hasOwnProperty("datepicker")?d["wpforms_"+r+"_"+o].datepicker:void 0!==d["wpforms_"+r]&&d["wpforms_"+r].hasOwnProperty("datepicker")?d["wpforms_"+r].datepicker:"undefined"!=typeof wpforms_datepicker?wpforms_datepicker:{disableMobile:!0}).hasOwnProperty("locale")&&"undefined"!=typeof wpforms_settings&&wpforms_settings.hasOwnProperty("locale")&&(i.locale=wpforms_settings.locale),i.wrap=!0,i.dateFormat=e.data("date-format"),1===e.data("disable-past-dates")&&(i.minDate="today",1===e.data("disable-todays-date"))&&(n=new Date,i.minDate=n.setDate(n.getDate()+1));let s=e.data("limit-days"),l=["sun","mon","tue","wed","thu","fri","sat"];s&&""!==s&&(s=s.split(","),i.disable=[function(e){for(var t in s)if(l.indexOf(s[t])===e.getDay())return!1;return!0}]),i.onChange=function(e,t,r){a.find(".wpforms-datepicker-clear").css("display",""===t?"none":"block")},i.onReady=function(e,t,r){a.find(".wpforms-datepicker-clear").on("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r.clear())}),a.find(".wpforms-datepicker-clear").on("click",function(e){e.preventDefault(),r.clear()})},a.flatpickr(i)})},loadTimePicker(e){void 0!==p.fn.timepicker&&(e=e?.length?e:p(s)).find(".wpforms-timepicker").each(function(){var e=p(this),t=e.closest(".wpforms-form").data("formid"),r=e.closest(".wpforms-field").data("field-id");let a;a=void 0!==d["wpforms_"+t+"_"+r]&&d["wpforms_"+t+"_"+r].hasOwnProperty("timepicker")?d["wpforms_"+t+"_"+r].timepicker:void 0!==d["wpforms_"+t]&&d["wpforms_"+t].hasOwnProperty("timepicker")?d["wpforms_"+t].timepicker:"undefined"!=typeof wpforms_timepicker?wpforms_timepicker:{scrollDefault:"now",forceRoundTime:!0};r=e.val();e.timepicker(a),r&&(e.val(r),e.trigger("changeTime"))})},loadInputMask(e){void 0!==p.fn.inputmask&&(e=e?.length?e:p(s)).find(".wpforms-masked-input").inputmask({rightAlign:!1})},fixPhoneFieldSnippets(t){console.warn("WARNING! Obsolete function called. Function wpforms.fixPhoneFieldSnippets( $field ) has been deprecated, please use the wpforms.repairSmartPhoneHiddenField( $field ) function instead!"),t.siblings('input[type="hidden"]').each(function(){var e;p(this).attr("name").includes("function")&&(e=(e=t.data("plugin_intlTelInput")).d||e.options)&&((d.intlTelInput?.getInstance(t[0]))?.destroy(),e.initialCountry=e.initialCountry.toLowerCase(),e.onlyCountries=e.onlyCountries.map(e=>e.toLowerCase()),e.preferredCountries=e.preferredCountries.map(e=>e.toLowerCase()),d.intlTelInput(t[0],e),t.siblings('input[type="hidden"]').each(function(){var e=p(this);e.attr("name",e.attr("name").replace("wpf-temp-",""))}))})},repairSmartPhoneHiddenField(e){console.warn('WARNING! Function "wpforms.repairSmartPhoneHiddenField()" has been deprecated, please use the new "WPFormsPhoneField.repairSmartHiddenField()" function instead!'),WPFormsPhoneField?.repairSmartHiddenField?.(e)},getDefaultSmartPhoneFieldOptions(){return console.warn('WARNING! Function "wpforms.getDefaultSmartPhoneFieldOptions()" has been deprecated, please use the new "WPFormsPhoneField.getDefaultSmartFieldOptions()" function instead!'),WPFormsPhoneField?.getDefaultSmartFieldOptions?.()},loadSmartPhoneField(e){console.warn('WARNING! Function "wpforms.loadSmartPhoneField()" has been deprecated, please use the new "WPFormsPhoneField.loadSmartField()" function instead!'),WPFormsPhoneField?.loadSmartField?.(e)},loadJqueryIntlTelInput(){console.warn('WARNING! Function "wpforms.loadJqueryIntlTelInput()" has been deprecated, please use the new "WPFormsPhoneField.loadJqueryIntlTelInput()" function instead!'),WPFormsPhoneField?.loadJqueryIntlTelInput?.()},initSmartPhoneField(e,t){console.warn('WARNING! Function "wpforms.initSmartPhoneField()" has been deprecated, please use the new "WPFormsPhoneField.initSmartField()" function instead!'),WPFormsPhoneField?.initSmartField?.(e,t)},bindSmartPhoneField(){console.warn('WARNING! Function "wpforms.bindSmartPhoneField()" has been deprecated, please use the new "WPFormsPhoneField.bindSmartField()" function instead!'),WPFormsPhoneField?.bindSmartField?.()},loadPayments(){p("input.wpforms-payment-total").each(function(e,t){c.amountTotal(this)}),void 0!==p.fn.payment&&(p(".wpforms-field-credit-card-cardnumber").payment("formatCardNumber"),p(".wpforms-field-credit-card-cardcvc").payment("formatCardCVC"))},loadMailcheck(){wpforms_settings.mailcheck_enabled&&void 0!==p.fn.mailcheck&&(0<wpforms_settings.mailcheck_domains.length&&(Mailcheck.defaultDomains=Mailcheck.defaultDomains.concat(wpforms_settings.mailcheck_domains)),0<wpforms_settings.mailcheck_toplevel_domains.length&&(Mailcheck.defaultTopLevelDomains=Mailcheck.defaultTopLevelDomains.concat(wpforms_settings.mailcheck_toplevel_domains)),p(s).on("blur",".wpforms-field-email input",function(){var e=p(this);if(1!==e.data("disable-suggestions")){let o=e.attr("id");e.mailcheck({suggested(e,t){t.full=t.full.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.address=t.address.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.domain=t.domain.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.address.match(/^xn--/)&&(t.full=punycode.toUnicode(decodeURI(t.full)),r=t.full.split("@"),t.address=r[0],t.domain=r[1]),t.domain.match(/^xn--/)&&(t.domain=punycode.toUnicode(decodeURI(t.domain)));var r=decodeURI(t.address).replaceAll(/[<>'"()/\\|:;=@%&\s]/gi,"").substr(0,64),a=decodeURI(t.domain).replaceAll(/[<>'"()/\\|:;=@%&+_\s]/gi,"");t='<a href="#" class="mailcheck-suggestion" data-id="'+o+'" title="'+wpforms_settings.val_email_suggestion_title+'">'+r+"@"+a+"</a>",t=wpforms_settings.val_email_suggestion.replace("{suggestion}",t),e.closest(".wpforms-field").find("#"+o+"_suggestion").remove(),e.parent().append('<label class="wpforms-error mailcheck-error" id="'+o+'_suggestion">'+t+"</label>")},empty(){p("#"+o+"_suggestion").remove()}})}}),p(s).on("click",".wpforms-field-email .mailcheck-suggestion",function(e){var t=p(this),r=t.closest(".wpforms-field"),a=t.data("id");e.preventDefault(),r.find("#"+a).val(t.text()),t.parent().remove()}))}
890,loadChoicesJS(i){"function"==typeof d.Choices&&(i=i?.length?i:p(s)).find(".wpforms-field-select-style-modern .choicesjs-select, .wpforms-field-payment-select .choicesjs-select").each(function(e,t){var r,a,o;p(t).data("choicesjs")||WPFormsUtils.triggerEvent(i,"wpformsBeforeLoadElementChoices",[t]).isDefaultPrevented()||(r=d.wpforms_choicesjs_config||{},a=p(t).data("search-enabled"),o=p(t).data("remove-items-enabled"),r.searchEnabled=void 0===a||a,r.removeItems=void 0===o||o,r.removeItemButton=r.removeItems,r.allowHTML=!0,r.callbackOnInit=function(){let t=this,r=p(t.passedElement.element),e=t.input?.element,a=p(e),o=r.data("size-class"),i=r.attr("id"),n=this.dropdown.element.querySelector('[role="listbox"]'),s=this.passedElement.element.multiple;var l;t.containerOuter&&t.containerOuter.element&&i&&s&&(t.containerOuter.element.setAttribute("aria-haspopup","listbox"),t.containerOuter.element.setAttribute("aria-labelledby",i)),e&&n&&(l="choices-listbox-"+this.passedElement.element.id,n.id=l,e.setAttribute("aria-controls",l),e.setAttribute("aria-owns",l)),t.passedElement.element.addEventListener("showDropdown",()=>{e&&s&&e.focus()}),r.removeAttr("hidden").addClass(t.config.classNames.input+"--hidden"),o&&p(t.containerOuter.element).addClass(o),r.prop("multiple")&&(a.data("placeholder",a.attr("placeholder")).css("width","auto"),t.getValue(!0).length&&a.removeAttr("placeholder"),a.css("width","1ch")),r.on("change",function(){r.prop("multiple")&&(t.getValue(!0).length?a.removeAttr("placeholder"):a.attr("placeholder",a.data("placeholder")).css("width","auto"));var e=r.closest("form").data("validator");e&&e.element(r)})},r.callbackOnCreateTemplates=function(){let r=p(this.passedElement.element);return{option(e){var t=Choices.defaults.templates.option.call(this,e);return void 0!==e.placeholder&&!0===e.placeholder&&t.classList.add("placeholder"),r.hasClass("wpforms-payment-price")&&null!=e.customProperties&&(t.dataset.amount=e.customProperties),t}}},p(t).data("choicesjs",new Choices(t,r)))})},bindChoicesJS(){p(s).on("click",".choices",function(e){var t=p(this),r=t.find("select").data("choicesjs");r&&t.hasClass("is-open")&&(e.target.classList.contains("choices__inner")||e.target.classList.contains("choices__arrow"))&&r.hideDropdown()})},bindUIActions(){var e=p(s);e.on("click",".wpforms-page-button",function(e){e.preventDefault(),c.pagebreakNav(this)});let t;e.on("change input",".wpforms-payment-price",function(){clearTimeout(t),t=setTimeout(()=>{c.amountTotal(this,!0)},0)});let r;e.on("change","select.wpforms-payment-quantity",function(){clearTimeout(r),r=setTimeout(()=>{c.amountTotal(this,!0),c.updateOrderSummaryItemQuantity(p(this))},0)}),e.on("input",".wpforms-payment-user-input",function(){var e=p(this),t=e.val();e.val(t.replace(/[^0-9.,]/g,""))}),e.on("focusout",".wpforms-payment-user-input",function(){var e=p(this),t=e.val();if(!t)return t;t=c.amountSanitize(t),t=c.amountFormat(t);e.val(t)});let a;e.on("wpformsProcessConditionals",function(e,t){clearTimeout(a),a=setTimeout(()=>{c.amountTotal(t,!0)},0)}),e.on("mouseenter",".wpforms-field-rating-item",function(){p(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),p(this).prevAll().addBack().addClass("hover")}).on("mouseleave",".wpforms-field-rating-item",function(){p(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),p(this).parent().find("input:checked").parent().prevAll().addBack().addClass("selected")}),p(s).on("change",".wpforms-field-rating-item input",function(){var e=p(this),t=e.closest(".wpforms-field-rating-items").find(".wpforms-field-rating-item");e.focus(),t.removeClass("hover selected"),e.parent().prevAll().addBack().addClass("selected")}),p(function(){p(".wpforms-field-rating-item input:checked").trigger("change")}),e.on("keydown",".wpforms-image-choices-item label",function(e){var t=p(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;32===e.keyCode&&(t.find("input").trigger("click"),e.preventDefault())}),c.bindOtherOptionActions(),d.document.documentMode&&e.on("click",".wpforms-image-choices-item img",function(){p(this).closest("label").find("input").trigger("click")}),e.on("change",".wpforms-field-checkbox input, .wpforms-field-radio input, .wpforms-field-payment-multiple input, .wpforms-field-payment-checkbox input, .wpforms-field-gdpr-checkbox input",function(e){var t=p(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;switch(t.attr("type")){case"radio":t.closest("ul").find("li").removeClass("wpforms-selected").find("input[type=radio]").removeProp("checked"),t.prop("checked",!0).closest("li").addClass("wpforms-selected");break;case"checkbox":t.is(":checked")?(t.closest("li").addClass("wpforms-selected"),t.prop("checked",!0)):(t.closest("li").removeClass("wpforms-selected"),t.prop("checked",!1))}}),e.on("input",".wpforms-field-file-upload",function(){var e=p(this),t=e.closest("form.wpforms-form").find('.wpforms-field-file-upload input:not(".dropzone-input")');let a=0,r=Number(wpforms_settings.post_max_size),o='<div class="wpforms-error-container-post_max_size">'+wpforms_settings.val_post_max_size+"</div>";e=e.closest("form.wpforms-form").find(".wpforms-submit-container");let i=e.find("button.wpforms-submit"),n=e.prev();var s=i.closest("form"),l=s.find(".wpforms-page-next:visible");0!==s.find(".wpforms-page-indicator").length&&0!==l.length&&(i=l),t.each(function(){var e=p(this);let t=0;for(var r=e[0].files.length;t<r;t++)a+=e[0].files[t].size}),a<r?(n.find(".wpforms-error-container-post_max_size").remove(),i.prop("disabled",!1),WPFormsUtils.triggerEvent(s,"wpformsFormSubmitButtonRestore",[s,i]),WPFormsUtils.triggerEvent(s,"wpformsCombinedUploadsSizeOk",[s,n])):(a=Number((a/1048576).toFixed(3)),r=Number((r/1048576).toFixed(3)),o=o.replace(/{totalSize}/,a).replace(/{maxSize}/,r),n.hasClass("wpforms-error-container")?(n.find(".wpforms-error-container-post_max_size").remove(),n.append(o)):(e.before('<div class="wpforms-error-container">{errorMsg}</div>'.replace(/{errorMsg}/,o)),n=e.prev()),i.prop("disabled",!0),WPFormsUtils.triggerEvent(s,"wpformsFormSubmitButtonDisable",[s,i]),WPFormsUtils.triggerEvent(s,"wpformsCombinedUploadsSizeError",[s,n]))}),e.on("change input",".wpforms-field-number-slider input[type=range]",function(e){var t=p(e.target).siblings(".wpforms-field-number-slider-hint");t.html(t.data("hint").replaceAll("{value}","<b>"+e.target.value+"</b>"))}),e.on("pointerdown touchstart",".wpforms-field-number-slider input[type=range]",function(){var e,t=this.ownerDocument.activeElement;t&&t!==this&&p(t).is("input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=password], textarea")&&(e=p(this).closest(".wpforms-form")).length&&p.contains(e[0],t)&&t.blur()}
890),e.on("keydown",".wpforms-form input",function(e){var t,r;13!==e.keyCode||0===(r=(t=p(this)).closest(".wpforms-page")).length||["text","tel","number","email","url","radio","checkbox"].indexOf(t.attr("type"))<0||(t.hasClass("wpforms-datepicker")&&t.flatpickr("close"),t.hasClass("dropzone-input"))||(e.preventDefault(),(r.hasClass("last")?r.closest(".wpforms-form").find(".wpforms-submit"):r.find(".wpforms-page-next")).trigger("click"))}),e.on("keypress",".wpforms-field-number input",function(e){return/^[-0-9.]+$/.test(String.fromCharCode(e.keyCode||e.which))}),p("form.wpforms-form").on("wpformsBeforePageChange",c.skipEmptyPages)},bindOtherOptionActions(){p(s).on("change",'.wpforms-field-radio input[type="radio"]',function(){var e=p(this),t=e.closest(".wpforms-field"),r=e.closest("li"),t=t.find(".wpforms-other-input");t.addClass("wpforms-hidden").prop("disabled",!0).prop("required",!1),e.is(":checked")&&r.hasClass("wpforms-other-choice")&&t.removeClass("wpforms-hidden").prop("disabled",!1).prop("required",!0)})},skipEmptyPages(e,t,r,a){var o=c.findNonEmptyPage(t,r,a);o!==t&&(e.preventDefault(),1===o&&"prev"===a?(e=r.find(".wpforms-page-2"),a=r.find(".wpforms-page-"+t),t=(e.find(".wpforms-page-prev").length?e:a).find(".wpforms-page-prev"),wpforms.navigateToPage(t,"prev",2,r,e)):(t=r.find(".wpforms-page-"+(a=o-1)),wpforms.navigateToPage(t.find(".wpforms-page-next"),"next",a,r,t)))},findNonEmptyPage(e,t,r){let a=e;for(;c.isEmptyPage(t,a);)"prev"===r?a--:a++;return a},isEmptyPage(e,t){return 1!==t&&!(e=e.find(".wpforms-page-"+t)).hasClass("last")&&(t=c.removeHoneyPotField(e.children(".wpforms-field:not(.wpforms-field-pagebreak):not(.wpforms-field-hidden)")),e.children(".wpforms-conditional-hide").length===t.length)},removeHoneyPotField(e){return e.filter(function(){var e=p(this).children("input");return"-1"!==e.attr("tabindex")&&"true"!==e.attr("aria-hidden")})},entryPreviewFieldPageChange(e,t,r){console.warn("WARNING! Obsolete function called. Function wpforms.entryPreviewFieldPageChange has been deprecated, please use the WPFormsEntryPreview.pageChange function instead!"),WPFormsEntryPreview.pageChange(e,t,r)},entryPreviewFieldUpdate(e,t){console.warn("WARNING! Obsolete function called. Function wpforms.entryPreviewFieldUpdate has been deprecated, please use the WPFormsEntryPreview.update function instead!"),WPFormsEntryPreview.update(e,t)},scrollToError(e){if(0!==e.length){let t=e.find(".wpforms-field.wpforms-has-error");0!==(t=0===t.length?e.closest(".wpforms-field"):t).length&&void 0!==(e=t.offset())&&c.animateScrollTop(e.top-75,750).done(function(){var e=t.find(".wpforms-error").first();"function"==typeof e.focus&&e.trigger("focus")})}},pagebreakNav(e){let t=p(e),r=t.data("action"),a=t.data("page"),o=t.closest(".wpforms-form"),i=o.find(".wpforms-page-"+a);c.saveTinyMCE(),"next"===r&&void 0!==p.fn.validate?c.checkForInvalidFields(o,i,function(){c.navigateToPage(t,r,a,o,i)},t):"prev"!==r&&"next"!==r||c.navigateToPage(t,r,a,o,i)},checkForInvalidFields(e,n,s,o){let l=e.data("validator");if(l){let e=o&&o.length?o:p(),t=e.prop("disabled"),r=e.next(".wpforms-page-button-spinner"),a=(e.length&&(e.prop("disabled",!0),e.addClass("wpforms-page-button-validating"),r.show()),()=>{e.length&&(e.removeClass("wpforms-page-button-validating"),r.hide(),t||e.prop("disabled",!1))});c.waitForPendingValidation(l).then(()=>{let o=[],i=!1;return n.find(":input").each(function(e,t){var r=p(t),a=r.attr("name");a&&!r.hasClass("wpforms-field-skip-validation")&&(o.push(a),!1===p(t).valid())&&(i=!0)}),c.waitForPendingValidation(l).then(()=>{var e=o.some(e=>!0===l.invalid[e]),e=!i&&!e;a(),e?s():c.scrollToError(n)})}).catch(()=>{a()})}},waitForPendingValidation(o,i=3e4){return o&&o.pendingRequest?new Promise((e,t)=>{let r=Date.now(),a=setInterval(()=>{o.pendingRequest?Date.now()-r>i&&(clearInterval(a),t(new Error("waitForPendingValidation timed out"))):(clearInterval(a),e())},100)}):Promise.resolve()},navigateToPage(t,r,a,o,e){if(!t.hasClass("wpforms-disabled")){let e=a;"next"===r?e+=1:"prev"===r&&--e,WPFormsUtils.triggerEvent(t,"wpformsBeforePageChange",[e,o,r]).isDefaultPrevented()||(o.find(".wpforms-page").hide(),(a=o.find(".wpforms-page-"+e)).show(),c.toggleReCaptchaAndSubmitDisplay(o,r,a),c.checkTurnstileVisibility(o),(a=c.getPageScroll(o))&&c.animateScrollTop(o.offset().top-a,750,null),t.trigger("wpformsPageChange",[e,o,r]),c.manipulateIndicator(e,o))}},toggleReCaptchaAndSubmitDisplay(e,t,r){var a=e.find(".wpforms-submit-container"),e=e.find(".wpforms-recaptcha-container");"next"===t&&r.hasClass("last")?(e.show(),a.show()):"prev"===t&&(e.hide(),a.hide())},checkTurnstileVisibility(e){var t,e=e.find(".wpforms-recaptcha-container");
890e.hasClass("wpforms-is-turnstile")&&(t=e.find(".wpforms-turnstile").height(),0===parseInt(t,10)?e.addClass("wpforms-is-turnstile-invisible"):e.removeClass("wpforms-is-turnstile-invisible"))},getPageScroll(e){return!1!==d.wpforms_pageScroll&&(c.empty(d.wpform_pageScroll)?0!==e.find(".wpforms-page-indicator").data("scroll")&&75:d.wpform_pageScroll)},manipulateIndicator(e,t){var r,a=t.find(".wpforms-page-indicator");a&&("connector"===(r=a.data("indicator"))||"circles"===r?c.manipulateConnectorAndCirclesIndicator(a,r,e):"progress"===r&&c.manipulateProgressIndicator(a,t,e))},manipulateConnectorAndCirclesIndicator(e,t,r){var a=e.data("indicator-color");e.find(".wpforms-page-indicator-page").removeClass("active"),e.find(".wpforms-page-indicator-page-"+r).addClass("active"),e.find(".wpforms-page-indicator-page-number").removeAttr("style"),e.find(".active .wpforms-page-indicator-page-number").css("background-color",a),"connector"===t&&(e.find(".wpforms-page-indicator-page-triangle").removeAttr("style"),e.find(".active .wpforms-page-indicator-page-triangle").css("border-top-color",a))},manipulateProgressIndicator(e,t,r){var a=e.find(".wpforms-page-indicator-page-title"),o=e.find(".wpforms-page-indicator-page-title-sep"),t=r/t.find(".wpforms-page").length*100;e.find(".wpforms-page-indicator-page-progress").css("width",t+"%"),e.find(".wpforms-page-indicator-steps-current").text(r),a.data("page-"+r+"-title")?(a.css("display","inline").text(a.data("page-"+r+"-title")),o.css("display","inline")):(a.css("display","none"),o.css("display","none"))},bindOptinMonster(){s.addEventListener("om.Campaign.load",function(e){c.ready(),c.optinMonsterRecaptchaReset(e.detail.Campaign.data.id)}),s.addEventListener("om.Campaign.afterShow",function(e){"undefined"!=typeof WPFormsRepeaterField&&WPFormsRepeaterField.ready()}),p(s).on("OptinMonsterOnShow",function(e,t,r){c.ready(),c.optinMonsterRecaptchaReset(t.optin),"undefined"!=typeof WPFormsRepeaterField&&WPFormsRepeaterField.ready()})},optinMonsterRecaptchaReset(r){var r=p("#om-"+r).find(".wpforms-form"),a=r.find(".wpforms-recaptcha-container");let o,i,n;if(n=a.hasClass("wpforms-is-hcaptcha")?(o=r.find(".h-captcha"),i="h-captcha",hcaptcha):a.hasClass("wpforms-is-turnstile")?(o=r.find(".wpforms-turnstile"),i="wpforms-turnstile",turnstile):(o=r.find(".g-recaptcha"),i="g-recaptcha",grecaptcha),r.length&&o.length){let e=o.attr("data-sitekey"),t="recaptcha-"+Date.now();c.resetFormRecaptcha(r,"remove"),o.remove();r=p("<div></div>").addClass(i).attr("id",t).attr("data-sitekey",e),a=(a.prepend(r),n.render(t,{sitekey:e,callback(){wpformsRecaptchaCallback(s.getElementById(t))}}));r.attr("data-recaptcha-id",a)}},amountTotal(e,t){t=t||!1;let r=p(e),a=r.closest(".wpforms-form"),o=c.amountTotalCalc(a);if(c.allowAmountTotalCalc(a,r,o)){let e=c.amountFormatSymbol(o);a.find(".wpforms-payment-total").each(function(){"hidden"===p(this).attr("type")||"text"===p(this).attr("type")?(p(this).val(e),"text"===p(this).attr("type")&&t&&a.data("validator")&&p(this).valid()):p(this).text(e)}),c.updateOrderSummaryItems(a,r,e)}},allowAmountTotalCalc(e,t,r){var e=e.data("formid");return c.getCache(e,"amountTotal")!==r?(c.updateCache(e,"amountTotal",r),!0):"radio"===(e=t.prop("type"))||"select-one"===e||"checkbox"===e},updateOrderSummaryItems(e,t,r){var a=e.find(".wpforms-order-summary-preview");if(0!==a.length){let o=e.find(".wpforms-payment-price");a.each(function(){let a=p(this),e=(""!==r&&a.find(".wpforms-order-summary-preview-total .wpforms-order-summary-item-price").text(r),t=>{let r=Math.min(t+10,o.length);for(let e=t;e<r;e++)c.updateOrderSummaryItem(p(o[e]),a);r<o.length&&setTimeout(()=>e(r),0)});e(0)})}},updateCache(e,t,r){c.cache[e]=c.cache[e]||{},c.cache[e][t]=r},getCache(e,t){return!(!Object.prototype.hasOwnProperty.call(c.cache,e)||!Object.prototype.hasOwnProperty.call(c.cache[e],t))&&c.cache[e][t]},updateOrderSummaryItem(o,i){if(o.hasClass("wpforms-payment-price")){let t=o.closest(".wpforms-field"),e=t.data("field-id"),r=o.prop("type"),a="block"===t.css("display");var n,s;"checkbox"===r||"radio"===r||"select-one"===r?i.find(`tr[data-field="${e}"]`).each(function(){var e=p(this).data("choice"),e="select-one"===r?e===parseInt(t.find("select").val(),10):t.find(`input[value="${e}"]`).is(":checked");p(this).toggle(a&&e)}):(n=i.find(`tr[data-field="${e}"]`),s=o.val(),n.find(".wpforms-order-summary-item-price").text(c.amountFormatSymbol(c.amountSanitize(s))),n.toggle(a)),t.hasClass("wpforms-payment-quantities-enabled")?c.updateOrderSummaryItemQuantity(o):(c.updateSummaryPriceWidth(i),c.toggleSummaryPlaceholder(i))}},updateOrderSummaryItemQuantity(e){let t=e.closest(".wpforms-field"),a=t.find("input.wpforms-payment-price, select.wpforms-payment-price"),r=e.closest(".wpforms-form"),o=t.data("field-id"),i=c.getPaymentFieldQuantity(a),n=c.getPaymentFieldAmount(a),s=a.prop("type");r.find(".wpforms-order-summary-preview").each(function(){var e,t=p(this);let r;(r="checkbox"===s||"radio"===s||"select-one"===s?(e=a.val(),t.find(`tr[data-field="${o}"][data-choice="${e}"]`)):t.find(`tr[data-field="${o}"]`)).toggle(0<i),r.find(".wpforms-order-summary-item-quantity").text(i),r.find(".wpforms-order-summary-item-price").text(c.amountFormatSymbol(n*i)),c.updateSummaryPriceWidth(t),c.toggleSummaryPlaceholder(t)})},updateSummaryPriceWidth(e){var t=Math.max(e.find(".wpforms-order-summary-preview-coupon-total .wpforms-order-summary-item-price").text().length,e.find(".wpforms-order-summary-preview-total .wpforms-order-summary-item-price").text().length+3);e.find(".wpforms-order-summary-item-price").css("width",t+"ch")},toggleSummaryPlaceholder(e){var t=e.find(".wpforms-order-summary-placeholder");let r=!0;e.find(".wpforms-order-summary-field").each(function(){if("none"!==p(this).css("display"))return r=!1}),t.toggle(r)},amountTotalCalc(e){let r=0;p(".wpforms-payment-price",e).each(function(){var e,t=p(this);t.closest(".wpforms-field-payment-single").hasClass("wpforms-conditional-hide")||(e=c.getPaymentFieldAmount(t))&&(r=Number(r)+e*c.getPaymentFieldQuantity(t))});var t=p(s),a=WPFormsUtils.triggerEvent(t,"wpformsAmountTotalCalculate",[e,r]);return r=void 0!==a.result&&0<=a.result?a.result:r,WPFormsUtils.triggerEvent(t,"wpformsAmountTotalCalculated",[e,r]),r},getPaymentFieldAmount(e){var t=e.attr("type");return"text"===t||"hidden"===t?Number(c.amountSanitize(e.val())):"radio"!==t&&"checkbox"!==t||!e.is(":checked")?e.is("select")&&
8900<e.find("option:selected").length&&e.find("option:selected").data("amount")?Number(c.amountSanitize(e.find("option:selected").data("amount"))):0:Number(c.amountSanitize(e.data("amount")))},getPaymentFieldQuantity(e){e=e.attr("id"),e=p(`#${e}-quantity`);return e.length?Number(e.val()):1},amountSanitize(e){var t=c.getCurrency();return e=e.toString().replace(t.symbol,"").replace(/[^0-9.,]/g,""),","===t.decimal_sep?("."===t.thousands_sep&&-1!==e.indexOf(t.thousands_sep)?e=e.replace(new RegExp("\\"+t.thousands_sep,"g"),""):""===t.thousands_sep&&-1!==e.indexOf(".")&&(e=e.replace(/\./g,"")),e=e.replace(t.decimal_sep,".")):","===t.thousands_sep&&-1!==e.indexOf(t.thousands_sep)&&(e=e.replace(new RegExp("\\"+t.thousands_sep,"g"),"")),c.numberFormat(e,t.decimals,".","")},amountFormat(e){var t,r=c.getCurrency();return e=String(e),","===r.decimal_sep&&-1!==e.indexOf(r.decimal_sep)&&(t=e.indexOf(r.decimal_sep),e=e.substr(0,t)+"."+e.substr(t+1,e.length-1)),","===r.thousands_sep&&-1!==e.indexOf(r.thousands_sep)&&(e=e.replace(/,/g,"")),c.empty(e)&&(e=0),c.numberFormat(e,r.decimals,r.decimal_sep,r.thousands_sep)},amountFormatSymbol(e){var t=c.getCurrency(),e=c.amountFormat(e);return"left"===t.symbol_pos?t.symbol+e:e+" "+t.symbol},getCurrency(){var e={code:"USD",thousands_sep:",",decimals:2,decimal_sep:".",symbol:"$",symbol_pos:"left"};return void 0!==wpforms_settings.currency_code&&(e.code=wpforms_settings.currency_code),void 0!==wpforms_settings.currency_thousands&&(e.thousands_sep=wpforms_settings.currency_thousands),void 0!==wpforms_settings.currency_decimals&&(e.decimals=wpforms_settings.currency_decimals),void 0!==wpforms_settings.currency_decimal&&(e.decimal_sep=wpforms_settings.currency_decimal),void 0!==wpforms_settings.currency_symbol&&(e.symbol=wpforms_settings.currency_symbol),void 0!==wpforms_settings.currency_symbol_pos&&(e.symbol_pos=wpforms_settings.currency_symbol_pos),e},numberFormat(e,t,r,a){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o,i,e=isFinite(+e)?+e:0,t=isFinite(+t)?Math.abs(t):0,a=void 0===a?",":a,r=void 0===r?".":r,n=(t?(n=e,o=t,i=Math.pow(10,o),""+(Math.round(n*i)/i).toFixed(o)):""+Math.round(e)).split(".");return 3<n[0].length&&(n[0]=n[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(n[1]||"").length<t&&(n[1]=n[1]||"",n[1]+=new Array(t-n[1].length+1).join("0")),n.join(r)},empty(e){var t;let r,a;var o=[void 0,null,!1,0,"","0"];for(a=0,t=o.length;a<t;a++)if(e===o[a])return!0;if("object"!=typeof e)return!1;for(r in e)if(e.hasOwnProperty(r))return!1;return!0},setUserIdentifier(){if((!d.hasRequiredConsent&&"undefined"!=typeof wpforms_settings&&wpforms_settings.uuid_cookie||d.hasRequiredConsent&&d.hasRequiredConsent())&&!c.getCookie("_wpfuuid")){var t=new Array(36),r="0123456789abcdef";for(let e=0;e<36;e++)t[e]=r.substr(Math.floor(16*Math.random()),1);t[14]="4",t[19]=r.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-";var e=t.join("");c.createCookie("_wpfuuid",e,3999)}},createCookie(e,t,r){let a="",o="";var i;wpforms_settings.is_ssl&&(o=";secure"),a=r?-1===r?"":((i=new Date).setTime(i.getTime()+24*r*60*60*1e3),";expires="+i.toGMTString()):";expires=Thu, 01 Jan 1970 00:00:01 GMT",s.cookie=e+"="+t+a+";path=/;samesite=strict"+o},getCookie(e){var r=e+"=",a=s.cookie.split(";");for(let t=0;t<a.length;t++){let e=a[t];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(r))return e.substring(r.length,e.length)}return null},removeCookie(e){c.createCookie(e,"",-1)},getFirstBrowserLanguage(){return console.warn('WARNING! Function "wpforms.getFirstBrowserLanguage()" has been deprecated, please use the new "WPFormsPhoneField.getFirstBrowserLanguage()" function instead!'),WPFormsPhoneField?.getFirstBrowserLanguage?.()},mapLanguageToIso(e){return console.warn('WARNING! Function "wpforms.mapLanguageToIso()" has been deprecated, please use the new "WPFormsPhoneField.mapLanguageToIso()" function instead!'),WPFormsPhoneField?.mapLanguageToIso?.(e)},currentIpToCountry(){return console.warn('WARNING! Function "wpforms.currentIpToCountry()" has been deprecated, please use the new "WPFormsPhoneField.currentIpToCountry()" function instead!'),WPFormsPhoneField?.currentIpToCountry?.()}
890,formSubmit(e){e instanceof jQuery||(e=p(e)),c.saveTinyMCE(),WPFormsUtils.triggerEvent(e,"wpformsBeforeFormSubmit",[e]).isDefaultPrevented()?c.restoreSubmitButton(e,e.closest(".wpforms-container")):e.hasClass("wpforms-ajax-form")&&"undefined"!=typeof FormData?c.formSubmitAjax(e):c.formSubmitNormal(e)},restoreSubmitButton(e,t){var r=e.find(".wpforms-submit"),a=r.data("submit-text");a&&r.text(a),r.prop("disabled",!1),WPFormsUtils.triggerEvent(e,"wpformsFormSubmitButtonRestore",[e,r]),t.removeClass("wpforms-loading"),e.find(".wpforms-submit-spinner").hide()},formSubmitNormal(e){var t,r;e.length&&(r=(t=e.find(".wpforms-submit")).get(0).recaptchaID,c.empty(r)&&0!==r||(t.get(0).recaptchaID=!1),e.get(0).submit())},formHasCaptcha(e){return!(!e||!e.length||"undefined"==typeof hcaptcha&&"undefined"==typeof grecaptcha&&"undefined"==typeof turnstile)&&(e=e.find(".wpforms-recaptcha-container"),Boolean(e.length))},resetFormRecaptcha(r,a="reset"){if(c.formHasCaptcha(r)){var o=r.find(".wpforms-recaptcha-container");let e,t;e=o.hasClass("wpforms-is-hcaptcha")?d.hcaptcha:o.hasClass("wpforms-is-turnstile")?d.turnstile:d.grecaptcha,t=r.find(".wpforms-submit").get(0)?.recaptchaID,c.empty(t)&&0!==t&&(o=r.find(".g-recaptcha, .h-captcha, .wpforms-turnstile")).length&&(t=o.data("recaptcha-id")),c.empty(t)&&0!==t||!e||"function"!=typeof e[a]||e[a](t)}},consoleLogAjaxError(e){e?console.error("WPForms AJAX submit error:\n%s",e):console.error("WPForms AJAX submit error")},displayFormAjaxErrors(e,t){"string"==typeof t?c.displayFormAjaxGeneralErrors(e,t):(t=t&&"errors"in t?t.errors:null,c.empty(t)||c.empty(t.general)&&c.empty(t.field)?c.consoleLogAjaxError():(c.empty(t.general)||c.displayFormAjaxGeneralErrors(e,t.general),c.empty(t.field)||c.displayFormAjaxFieldErrors(e,t.field)))},displayFormAjaxGeneralErrors(e,t){var r,a;e&&e.length&&(c.empty(t)||(c.isModernMarkupEnabled()&&e.attr({"aria-invalid":"true","aria-errormessage":""}),"string"==typeof t?(a=c.isModernMarkupEnabled()?' role="alert"':"",r=c.isModernMarkupEnabled()?`<span class="wpforms-hidden">${wpforms_settings.formErrorMessagePrefix}</span>`:"",e.find(".wpforms-submit-container").before(`<div class="wpforms-error-container"${a}>${r}${t}</div>`),c.setCurrentPage(e,{}
890)):(a=e.data("formid"),c.printGeneralErrors(e,t,a))))},printGeneralErrors(i,e,n){p.each(e,function(e,t){switch(e){case"header":case"header_styled":r=t,(a=i.find(".wpforms-page-indicator")).length?a.after(r):i.prepend(r);break;case"footer":case"footer_styled":a=t,0===i.find(".wpforms-page-indicator").length?i.find(".wpforms-submit-container").before(a):i.find(".wpforms-page-1").append(a);break;case"recaptcha":r=t,i.find(".wpforms-recaptcha-container").append(r)}var r,a,o;c.isModernMarkupEnabled()&&(o=i.attr("aria-errormessage")||"",i.attr("aria-errormessage",o+` wpforms-${n}-${e}-error`))}),i.find(".wpforms-error-container").length&&c.animateScrollTop(i.find(".wpforms-error-container").first().offset().top-100)},clearFormAjaxGeneralErrors(e){e.find(".wpforms-error-container").remove(),e.find("#wpforms-field_recaptcha-error").remove(),c.isModernMarkupEnabled()&&e.attr({"aria-invalid":"false","aria-errormessage":""})},displayFormAjaxFieldErrors(a,o){var e;a&&a.length&&(c.empty(o)||(e=a.data("validator"))&&(o=c.splitFieldErrors(o),p.each(o,function(e,t){var r=p('[name="'+e+'"]',a);r.length?r.attr("data-server-error",t):delete o[e]}),e.showErrors(o),c.formHasCaptcha(a)||e.focusInvalid()))},splitFieldErrors:i=>(p.each(i,function(o,e){"string"!=typeof e&&p.each(e,function(e,t){var r=o.split("[").pop().replace("]",""),a=o.replace("["+r+"]","");r===e?i[o]=t:"string"==typeof e&&e.match(/^r\d+$/)?(r=e.replace(/^r/,""),i[a+"["+r+"]"]=t):"string"==typeof e&&isNaN(e)&&(i[a+"["+e+"]"]=t)})}),i),formSubmitAjax:a=>
890{if(!a.length)return p.Deferred().reject();let r=a.closest(".wpforms-container"),e=a.find(".wpforms-submit-spinner"),o;r.addClass("wpforms-loading"),e.show(),c.clearFormAjaxGeneralErrors(a);var t=new FormData(a.get(0)),t=(t.append("action","wpforms_submit"),{type:"post",dataType:"json",url:wpforms_settings.ajaxurl,data:t,cache:!1,contentType:!1,processData:!1});return t.success=function(e){var t;if(e)if(e.data&&e.data.action_required)a.trigger("wpformsAjaxSubmitActionRequired",e);else if(e.success){if(a.trigger("wpformsAjaxSubmitSuccess",e),e.data)return e.data.redirect_url?(t=e.data.new_tab||!1,a.trigger("wpformsAjaxSubmitBeforeRedirect",e),t?(d.open(e.data.redirect_url,"_blank"),void location.reload()):void(d.location=e.data.redirect_url)):void(e.data.confirmation&&(c.resetFormRecaptcha(a,"remove"),r.html(e.data.confirmation),o=r.find("div.wpforms-confirmation-scroll"),r.trigger("wpformsAjaxSubmitSuccessConfirmation",e),o.length)&&c.animateScrollTop(o.offset().top-100))}else c.resetFormRecaptcha(a),c.displayFormAjaxErrors(a,e.data),a.trigger("wpformsAjaxSubmitFailed",e),c.setCurrentPage(a,e.data);else c.consoleLogAjaxError()},t.error=function(e,t,r){c.consoleLogAjaxError(r),a.trigger("wpformsAjaxSubmitError",[e,t,r])},t.complete=function(e,t){e.responseJSON&&e.responseJSON.data&&(e.responseJSON.data.action_required||"success"===t&&e.responseJSON.data.redirect_url)||(c.restoreSubmitButton(a,r),a.trigger("wpformsAjaxSubmitCompleted",[e,t]))},WPFormsUtils.triggerEvent(a,"wpformsAjaxBeforeSubmit",[a]).isDefaultPrevented()?(c.restoreSubmitButton(a,r),p.Deferred().reject()):p.ajax(t)},setCurrentPage(a,o){if(0!==a.find(".wpforms-page-indicator").length){let r=[];if(a.find(".wpforms-page").each(function(e,t){if(1<=p(t).find(".wpforms-has-error").length)return r.push(p(t))}),0!==r.length||void 0===o.errors||void 0===o.errors.general||void 0!==o.errors.general.footer||void 0===o.errors.general.recaptcha){var i=0<r.length?r[0]:a.find(".wpforms-page-1");let e,t="prev";1===i.data("page")||void 0!==o.errors&&void 0!==o.errors.general.footer?e=a.find(".wpforms-page-1").next():(e=0!==i.next().length?i.next():i.prev(),t=0!==i.next().length?"prev":"next");o=e.find(".wpforms-page-next"),i=e.data("page");c.navigateToPage(o,t,i,a,p(".wpforms-page-"+i))}}},navigateToPaymentPage(t,r,a=""){if(0!==t.find(".wpforms-page-indicator").length){r=r.closest(".wpforms-page");if(!r.is(":visible")||a)if(t.find(".wpforms-page-indicator").data("allow-page-navigation")){var o=0<r.find(".wpforms-error").length;let e=r.data("page");!o&&a&&(a=t.find(a).first().closest(".wpforms-page"),e=a.data("page")||1),WPForms.PageNavigation.navigateToTargetPage(t,e),o&&c.checkForInvalidFields(t,r,function(){})}else c.setCurrentPage(t,{})}},animateScrollTop(e,t,r){return t=t||1e3,r="function"==typeof r?r:function(){},p(s.scrollingElement||"html").stop(!0).animate({scrollTop:parseInt(e,10)},{duration:t,complete:r}).promise()},saveTinyMCE(){"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave()},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},compareTimesGreaterThan(e,t){e=e.replace(/(am|pm)/g," $1").toUpperCase(),t=t.replace(/(am|pm)/g," $1").toUpperCase();e=Date.parse("01 Jan 2021 "+e);return Date.parse("01 Jan 2021 "+t)<=e},isModernMarkupEnabled(){return!!wpforms_settings.isModernMarkupEnabled},initTokenUpdater(){p(s).off("focusin.wpformsToken").on("focusin.wpformsToken",".wpforms-form",function(e){var t=p(e.target.closest("form")),r=Date.now();this.needsTokenUpdate(r,t)&&this.updateToken(r,t,e)}.bind(this)),p(".wpforms-form[data-token]").each(function(){var e=p(this);c.needsTimeTokenUpdate(e)&&c.updateToken(Date.now(),e)})},needsTimeTokenUpdate(e){return!c.getTimeTokenInput(e).val()},getTimeTokenInput(e){return e.find('input[name="wpforms[time_token]"]')},setTimeToken(e,t){var r=c.getTimeTokenInput(e);r.val()||(r.length?r.val(t):p('<input type="hidden" name="wpforms[time_token]">').val(t).appendTo(e))},needsTokenUpdate(e,t){return!c.isTokenUpdating(t)&&!!t.attr("data-token")&&(!!c.needsTimeTokenUpdate(t)||e-1e3*(t.attr("data-token-time")||0)>
890=1e3*wpforms_settings.token_cache_lifetime)},updateToken(a,o,i=null){let n=o[0];if(n&&!l.has(n)){var s=o.data("formid");if(s){let t=o.find(".wpforms-submit"),e=Boolean(i),r=(l.add(n),this.isUpdatingToken=!0,e&&t.prop("disabled",!0),()=>{e&&t.prop("disabled",!1)});p.ajax({url:wpforms_settings.ajaxurl,type:"post",timeout:1e4,data:{action:"wpforms_get_token",formId:s}}).done(function(e){e.success?(o.attr("data-token-time",Math.floor(a/1e3)),o.attr("data-token",e.data.token),e.data.time_token&&c.setTimeToken(o,e.data.time_token),r(),t[0]&&i?.target===t[0]&&t.trigger("click")):c.tokenUpdateFailed(o,m("error_updating_token"),e)}).fail(function(e,t,r){c.tokenUpdateFailed(o,m("network_error"),t,r)}).always(function(){l.delete(n),this.isUpdatingToken=0<l.size,r()}.bind(this))}}},isTokenUpdating(e){return l.has(e[0])},tokenUpdateFailed(e,t,...r){console.error("WPForms: token update failed.",...r),t&&!e.find(".wpforms-error-container").length&&c.displayFormAjaxGeneralErrors(e,t)},restoreSubmitButtonOnEventPersisted(){d.onpageshow=function(e){e.persisted&&p(".wpforms-form").each(function(){var e=p(this);c.restoreSubmitButton(e,e.closest(".wpforms-container"))})}},loadValidationGroups(e){var t=e.closest(".wpforms-form").data("validator");t&&p.extend(t.groups,c.getDateTimeValidationGroups(e))},getDateTimeValidationGroups(e){let a={};return e.find(".wpforms-field.wpforms-field-date-time").each(function(){var e=p(this);if(e.find(".wpforms-field-date-dropdown-wrap").length){let r=e.attr("id").replace("-container","");p.each(["month","day","year"],function(e,t){t=p(`#${r}-`+t).attr("name");a[t]=r})}}),a},lockField(e){var t=e.data("field-type");(wpforms_settings.readOnlyDisallowedFields??[]).includes(t)||(e.addClass(a).find("input, textarea, select:not(.wpforms-field-select-style-modern)").prop("readonly",!0).attr("tabindex","-1"),e.hasClass("wpforms-field-select-style-modern")?((t=e.find("select")).data("choicesjs")?.disable(),t.removeAttr("disabled")):e.hasClass("wpforms-field-richtext")&&d.WPFormsRichTextField?.lockField(e))},unlockField(e){e.removeClass(a).find("input, textarea, select:not(.wpforms-field-select-style-modern)").prop("readonly",!1).attr("tabindex",null),e.hasClass("wpforms-field-select-style-modern")?e.find("select").data("choicesjs")?.enable():e.hasClass("wpforms-field-richtext")&&d.WPFormsRichTextField?.unlockField(e)},readOnlyFieldsInit(){p(".wpforms-field."+a).each(function(){c.lockField(p(this))})},field:{lock(e,t){c.lockField(p(`#wpforms-${e}-field_${t}-container`))},unlock(e,t){c.unlockField(p(`#wpforms-${e}-field_${t}-container`))},toggle(e,t,r="auto"){e=p(`#wpforms-${e}-field_${t}-container`),t=e.hasClass(a);("auto"===r?!t:r)?c.lockField(e):c.unlockField(e)},isLocked(e,t){return p(`#wpforms-${e}-field_${t}-container`).hasClass(a)},lockAll(e){p(`#wpforms-${e} .wpforms-field`).each(function(){c.lockField(p(this))})},unlockAll(e){p("#wpforms-"+e).find(".wpforms-field").each(function(){c.unlockField(p(this))})}}};return c})(document,window,jQuery);wpforms.init(); 891var WPForms=window.WPForms||{};WPForms.Analytics=WPForms.Analytics||((s,o,i)=>{let n={config:{VISIBILITY_THRESHOLD:0,SESSION_ID_MAX_LENGTH:64,MOBILE_TAB_DEBOUNCE_MS:1e3,TRIGGER_TAB_SWITCH:1,TRIGGER_FORM_SUBMISSION:2,SUBMIT_ANALYTICS_INPUT_NAME:"wpforms[analytics]"},el:{},filters:{},actions:{},states:new Map,bootstrappedForms:new WeakSet,sessionId:"",init(){n.sessionId=n.generateSessionId(),n.el.$doc=i(s),n.attachGlobalTriggers(),n.attachPopupTriggers(),i(()=>n.bootstrapForms()),n.el.$doc.on("wpformsReady",()=>n.bootstrapForms())},sendBeacon(e){var t,s=o.wpforms_settings?.ajaxurl;s&&("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon?navigator.sendBeacon(s,e):((t=new XMLHttpRequest).open("POST",s,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(e.toString())))},buildPayload(e){return n.applyFilters("payload",{page:e.currentPage,fields:[],viewDurationMs:0<e.viewStartedAt?Math.max(Date.now()-e.viewStartedAt,0):0},e)},sendTabSwitchSnapshot(e){var t,e="number"==typeof e?n.states.get(e):e;
891e&&!e.snapshotSent&&e.dirty&&n.applyFilters("shouldSend",!0,e)&&(t=n.buildPayload(e),t=JSON.stringify(t),n.doAction("beforeSnapshotSend",e),t=new URLSearchParams({action:"wpforms_analytics_snapshot",nonce:o.wpforms_settings?.nonce,form_id:String(e.formId),session_id:e.sessionId,trigger:String(n.config.TRIGGER_TAB_SWITCH),form_visible:e.hasBeenVisible?"1":"0",payload:o.wpforms_settings?.analytics_base64?btoa(t):t}),n.sendBeacon(t),e.snapshotSent=!0,e.dirty=!1,n.doAction("afterSnapshotSend",e))},attachGlobalTriggers(){s.addEventListener("visibilitychange",n.onVisibilityChange),o.addEventListener("beforeunload",n.onBeforeUnload)},attachPopupTriggers(){o.addEventListener("elementor/popup/show",n.onPopupShow),o.addEventListener("elementor/popup/hide",n.onPopupHide)},onPopupShow(e){n.bootstrapForms();e=e?.detail?.instance?.$element;e&&e.length&&e.find(".wpforms-form").each(function(){var e=n.states.get(Number.parseInt(i(this).data("formid"),10));e&&!e.hasBeenVisible&&(e.hasBeenVisible=!0,e.dirty=!0,e.viewStartedAt=Date.now(),n.doAction("formVisible",this,e))})},onPopupHide(e){e=e?.detail?.instance?.$element;e&&e.length&&e.find(".wpforms-form").each(function(){var e=Number.parseInt(i(this).data("formid"),10);e&&n.flush(e)})},onVisibilityChange(){var t=n.config.MOBILE_TAB_DEBOUNCE_MS;for(let e of n.states.values())"visible"===s.visibilityState?(clearTimeout(e._tabSwitchTimer),e._tabSwitchTimer=null,e.snapshotSent=!1):e.hasBeenVisible&&(0<t?e._tabSwitchTimer=setTimeout(()=>n.sendTabSwitchSnapshot(e),t):n.sendTabSwitchSnapshot(e))},onBeforeUnload(){for(var e of n.states.values())e.hasBeenVisible&&n.sendTabSwitchSnapshot(e)},addFilter(e,t){n.filters[e]??=[],n.filters[e].push(t)},addAction(e,t){n.actions[e]??=[],n.actions[e].push(t)},applyFilters(e,t,...s){for(var o of n.filters[e]??[])t=o(t,...s);return t},doAction(e,...t){for(var s of n.actions[e]??[])s(...t)},generateSessionId(){var e;return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():(e=()=>Math.random().toString(16).slice(2),(`${Date.now().toString(16)}-${e()}-`+e()).slice(0,n.config.SESSION_ID_MAX_LENGTH))},createState(e){var t={formId:e,sessionId:n.sessionId,hasBeenVisible:!1,currentPage:1,snapshotSent:!1,dirty:!1,viewStartedAt:0,_tabSwitchTimer:null};return n.applyFilters("stateDefaults",t,e)},getState(e){return n.states.get(e)},registerForm(e){var t,e=Number.parseInt(i(e).data("formid"),10);return e?n.states.has(e)?n.states.get(e):(t=n.createState(e),n.states.set(e,t),t):null},isComputedVisible(e){for(;e&&e!==s.body;){var t=o.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||0===Number.parseFloat(t.opacity))return!1;e=e.parentElement}return!0},observeForm(s,o){let i=new IntersectionObserver(e=>{for(var t of e)t.isIntersecting&&n.isComputedVisible(t.target)&&(o.hasBeenVisible=!0,o.dirty=!0,o.viewStartedAt=Date.now(),n.doAction("formVisible",s,o),i.unobserve(t.target))},{threshold:n.config.VISIBILITY_THRESHOLD});i.observe(s)},bootstrapForms(){i(".wpforms-form").each(function(){var e=n.registerForm(this);e&&!n.bootstrappedForms.has(this)&&(n.bootstrappedForms.add(this),n.observeForm(this,e),n.attachSubmitListeners(this,e),n.doAction("init",this,e))})},injectSubmissionEnvelope(e,t){e=i(e),t={session_id:t.sessionId,trigger:n.config.TRIGGER_FORM_SUBMISSION,form_visible:t.hasBeenVisible?1:0,payload:n.buildPayload(t)},t=JSON.stringify(t),t=o.wpforms_settings?.analytics_base64?btoa(t):t;e.find(`input[name="${n.config.SUBMIT_ANALYTICS_INPUT_NAME}"]`).remove(),i('<input type="hidden">').attr("name",n.config.SUBMIT_ANALYTICS_INPUT_NAME).val(t).appendTo(e)},markSubmissionComplete(e){e.snapshotSent=!0,e.dirty=!1},attachSubmitListeners(e,t){i(e).on("wpformsBeforeFormSubmit",()=>{n.injectSubmissionEnvelope(e,t),n.markSubmissionComplete(t)}).on("wpformsAjaxSubmitSuccess",()=>n.markSubmissionComplete(t)).on("wpformsAjaxSubmitFailed wpformsAjaxSubmitError",()=>{t.snapshotSent=!1}).on("submit",()=>n.markSubmissionComplete(t))},flush(e){let t=n.states.get(e);t&&(n.sendTabSwitchSnapshot(t),t.hasBeenVisible=!1,t.dirty=!1,t.snapshotSent=!1,t.viewStartedAt=0,n.doAction("flush",t),i(`.wpforms-form[data-formid="${e}"]`).each(function(){n.observeForm(this,t)}))}};return n})(document,window,jQuery),WPForms.Analytics.init(); 892window.WPForms=window.WPForms||{},((e,r)=>{let t={noStateCountries:[],init(){r(e).on("load",t.onLoad),r(document).on("wpformsRepeaterFieldCloneCreated",t.setChangeHandlers)},onLoad(){t.noStateCountries=wpforms_settings?.address_field?.list_countries_without_states||[],t.noStateCountries.length&&t.setChangeHandlers()},setChangeHandlers(){r(".wpforms-field-address").each(function(){var e=r(this).find("select.wpforms-field-address-country");e.length&&(t.handleCountryChange(e),e.off("change").on("change",function(){t.handleCountryChange(this)}))})},handleCountryChange(e){var e=r(e),s=e.closest(".wpforms-field").find(".wpforms-field-address-state"),d=s.closest(".wpforms-field-row");d.length&&(e=e.val(),t.handleStateInput(s,d,e))},handleStateInput(e,s,d){t.noStateCountries.includes(d)?(e.val("").prop("disabled",!0).prop("required",!1).on("change",function(){r(this).val("")}
892),s.addClass("wpforms-without-state")):(e.prop("disabled",!1).prop("required",s.find(".wpforms-first input").prop("required")).off("change"),s.removeClass("wpforms-without-state"))}},d={requiredAddressFields:["addressLine1","adminArea2","countryCode","postalCode"],getFieldValue(e){var s,d;return e.hasClass("wpforms-field-address")?(s=e.data("field-id"),e=e.closest(".wpforms-form").data("formid"),d=r(`#wpforms-${e}-field_${s}-country`),{addressLine1:r(`#wpforms-${e}-field_`+s).val(),addressLine2:r(`#wpforms-${e}-field_${s}-address2`).val(),adminArea2:r(`#wpforms-${e}-field_${s}-city`).val(),adminArea1:r(`#wpforms-${e}-field_${s}-state`).val(),countryCode:d.length?d.val():"US",postalCode:r(`#wpforms-${e}-field_${s}-postal`).val()}):{}},isValidAddress(e){let s=e||{};return!(!d.requiredAddressFields.every(e=>!!s?.[e])||(e=s.countryCode||"")&&!t.noStateCountries.includes(e)&&!s.adminArea1)}};t.init(),e.WPForms.Address=d})(window,jQuery);
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.