function Layzr(t){this._lastScroll=0,this._ticking=!1,t=t||{},this._optionsContainer=document.querySelector(t.container)||window,this._optionsSelector=t.selector||"[data-layzr]",this._optionsAttr=t.attr||"data-layzr",this._optionsAttrSrcSet=t.attrSrcSet||"data-layzr-srcset",this._optionsAttrRetina=t.retinaAttr||"data-layzr-retina",this._optionsAttrBg=t.bgAttr||"data-layzr-bg",this._optionsAttrHidden=t.hiddenAttr||"data-layzr-hidden",this._optionsThreshold=t.threshold||0,this._optionsBefore=t.before||null,this._optionsAfter=t.after||null,this._optionsCallback=t.callback||null,this._optionsIsloadedClass=t.isloadedClass||"is-loaded",this._optionsIsloadingClass=t.isloadingClass||"is-loading",this._retina=window.devicePixelRatio>1,this._srcAttr=this._retina?this._optionsAttrRetina:this._optionsAttr,this.updateSelector(),this._handlerBind=this._requestScroll.bind(this),this._create()}function simple_tooltip(t,e){jQuery(t).each((function(t){jQuery("body").append("
"+jQuery(this).find("span.tooltip-c").html()+"
");var i=jQuery("#"+e+t);jQuery(this).removeAttr("title").mouseover((function(){i.css({opacity:1,display:"none"}).fadeIn(400)})).mousemove((function(t){var e,n,s=jQuery(window).scrollTop(),o=jQuery(window).width(),a=15;e=o-30>=i.width()+t.pageX?t.pageX+a:o-i.width()-a,n=s+30>=t.pageY-i.height()?s+a:t.pageY-i.height()-33,i.css({left:e,top:n})})).mouseout((function(){i.css({left:"-9999px"})}))}))} /*! * jquery.customSelect() - v0.4.1 * http://adam.co/lab/jquery/customselect/ * 2013-05-13 * * Copyright 2013 Adam Coulombe * @license http://www.opensource.org/licenses/mit-license.html MIT License * @license http://www.gnu.org/licenses/gpl.html GPL2 License */!function(t){"function"==typeof define&&define.amd?define(["jquery"],(function(e){return t(e)})):"object"==typeof module&&"object"==typeof module.exports?exports=t(require("jquery")):t(jQuery)}((function(t){t.easing.jswing=t.easing.swing;var e=Math.pow,i=Math.sqrt,n=Math.sin,s=Math.cos,o=Math.PI,a=1.70158,r=1.525*a,l=a+1,d=2*o/3,c=2*o/4.5;function h(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}t.extend(t.easing,{def:"easeOutQuad",swing:function(e){return t.easing[t.easing.def](e)},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 1-(1-t)*(1-t)},easeInOutQuad:function(t){return t<.5?2*t*t:1-e(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-e(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-e(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-e(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-e(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-e(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-e(-2*t+2,5)/2},easeInSine:function(t){return 1-s(t*o/2)},easeOutSine:function(t){return n(t*o/2)},easeInOutSine:function(t){return-(s(o*t)-1)/2},easeInExpo:function(t){return 0===t?0:e(2,10*t-10)},easeOutExpo:function(t){return 1===t?1:1-e(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:t<.5?e(2,20*t-10)/2:(2-e(2,-20*t+10))/2},easeInCirc:function(t){return 1-i(1-e(t,2))},easeOutCirc:function(t){return i(1-e(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-i(1-e(2*t,2)))/2:(i(1-e(-2*t+2,2))+1)/2},easeInElastic:function(t){return 0===t?0:1===t?1:-e(2,10*t-10)*n((10*t-10.75)*d)},easeOutElastic:function(t){return 0===t?0:1===t?1:e(2,-10*t)*n((10*t-.75)*d)+1},easeInOutElastic:function(t){return 0===t?0:1===t?1:t<.5?-e(2,20*t-10)*n((20*t-11.125)*c)/2:e(2,-20*t+10)*n((20*t-11.125)*c)/2+1},easeInBack:function(t){return l*t*t*t-a*t*t},easeOutBack:function(t){return 1+l*e(t-1,3)+a*e(t-1,2)},easeInOutBack:function(t){return t<.5?e(2*t,2)*(7.189819*t-r)/2:(e(2*t-2,2)*((r+1)*(2*t-2)+r)+2)/2},easeInBounce:function(t){return 1-h(1-t)},easeOutBounce:h,easeInOutBounce:function(t){return t<.5?(1-h(1-2*t))/2:(1+h(2*t-1))/2}})})),The7Scroll=function(){var t,e,i;function n(n){i=0;const a={root:(e=n).root||null,rootMargin:e.offset||"0px",threshold:o(e.sensitivity)};t=new IntersectionObserver(s,a)}function s(t){const n=t[0].boundingClientRect.y,s=t[0].isIntersecting,o=n0&&t<=100){const i=100/t;for(let t=0;t<=100;t+=i)e.push(t/100)}else e.push(0);return e}return n.prototype.getScrollObserver=function(){return t},n}(),function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i=e-o&&n<=i+o&&!t.hasAttribute(this._optionsAttrHidden)},Layzr.prototype._reveal=function(t){var e=t.getAttribute(this._srcAttr)||t.getAttribute(this._optionsAttr),i=this,n=this._optionsIsloadedClass,s=this._optionsIsloadingClass;"function"==typeof this._optionsCallback&&(t.addEventListener?t.addEventListener("load",(function(){i._optionsCallback.call(t),i._nodes=i._nodes.filter((e=>e!==t)),t.classList.add(n),t.classList.remove(s)})):t.attachEvent("onload",(function(){i._optionsCallback.call(t),i._nodes=i._nodes.filter((e=>e!==t)),t.classList.add(n),t.classList.remove(s)})));"function"==typeof this._optionsBefore&&this._optionsBefore.call(t);var o=!1;t.hasAttribute(this._optionsAttrBg)?(t.style.backgroundImage="url("+e+")",o=!0):(e&&(t.removeAttribute("src"),t.setAttribute("src",e),o=!0),t.hasAttribute(this._optionsAttrSrcSet)&&(t.setAttribute("srcset",t.getAttribute(this._optionsAttrSrcSet)),o=!0)),o&&t.classList.add(s),"function"==typeof this._optionsAfter&&this._optionsAfter.call(t),t.removeAttribute(this._optionsAttr),t.removeAttribute(this._optionsAttrSrcSet),t.removeAttribute(this._optionsAttrRetina),t.removeAttribute(this._optionsAttrBg),t.removeAttribute(this._optionsAttrHidden)},Layzr.prototype.updateSelector=function(){this._nodes=Array.from(document.querySelectorAll(this._optionsSelector)),this._nodes=this._prepareItems(this._nodes)},Layzr.prototype.addItems=function(t){var e=Array.from(t.querySelectorAll(this._optionsSelector));e=this._prepareItems(e),this._nodes=this._nodes.concat(e),this.removeDuplicates()},Layzr.prototype.removeDuplicates=function(){var t=Array.from(new Set(this._nodes));t.length!==this._nodes.length&&(this._nodes=t)},Layzr.prototype._prepareItems=function(t){var e=this._optionsSelector.replace(/\./g,""),i=this._optionsIsloadedClass,n=this._optionsIsloadingClass;return t.filter((function(t){if(t.hasAttribute("data-src")){var s=t.getAttribute("data-src"),o=s.substring(s.lastIndexOf(".")+1);"png"!==o&&"svg"!==o||t.parentNode.classList.add("layzr-bg-transparent")}else if(!t.classList.contains(i)&&!t.classList.contains(n))return t.classList.remove(e),!1;return!0}))},Layzr.prototype.update=function(){for(var t=this._nodes.length,e=[],i=0;i0,window.requestAnimationFrame&&(i.raf=window.requestAnimationFrame,i.caf=window.cancelAnimationFrame),i.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!i.pointerEvent){var n=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var o=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);o&&o.length>0&&((o=parseInt(o[1],10))>=1&&o<8&&(i.isOldIOSPhone=!0))}var a=n.match(/Android\s([0-9\.]*)/),r=a?a[1]:0;(r=parseFloat(r))>=1&&(r<4.4&&(i.isOldAndroid=!0),i.androidVersion=r),i.isMobileOpera=/opera mini|opera mobi/i.test(n)}for(var l,d,c=["transform","perspective","animationName"],h=["","webkit","Moz","ms","O"],u=0;u<4;u++){e=h[u];for(var p=0;p<3;p++)l=c[p],d=e+(e?l.charAt(0).toUpperCase()+l.slice(1):l),!i[l]&&d in t&&(i[l]=d);e&&!i.raf&&(e=e.toLowerCase(),i.raf=window[e+"RequestAnimationFrame"],i.raf&&(i.caf=window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"]))}if(!i.raf){var f=0;i.raf=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-f)),n=window.setTimeout((function(){t(e+i)}),i);return f=e+i,n},i.caf=function(t){clearTimeout(t)}}return i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,s.features=i,i}};s.detectFeatures(),s.features.oldIE&&(s.bind=function(t,e,i,n){e=e.split(" ");for(var s,o=(n?"detach":"attach")+"Event",a=function(){i.handleEvent.call(i)},r=0;re-1?t-e:t<0?e+t:t},xt={},St=function(t,e){return xt[t]||(xt[t]=[]),xt[t].push(e)},It=function(t){var e=xt[t];if(e){var i=Array.prototype.slice.call(arguments);i.shift();for(var n=0;no.currItem.fitRatio?bt||(Ze(o.currItem,!1,!0),bt=!0):bt&&(Ze(o.currItem),bt=!1)),zt(et,ht.x,ht.y,g))},Et=function(t){t.container&&zt(t.container.style,t.initialPosition.x,t.initialPosition.y,t.initialZoomLevel,t)},Ot=function(t,e){e[z]=w+t+"px, 0px"+y},Pt=function(t,e){if(!a.loop&&e){var i=c+(mt.x*pt-t)/mt.x,n=Math.round(t-ce.x);(i<0&&n>0||i>=$e()-1&&n<0)&&(t=ce.x+n*a.mainScrollEndFriction)}ce.x=t,Ot(t,h)},At=function(t,e){var i=he[t]-ft[t];return ct[t]+dt[t]+i-i*(e/v)},Mt=function(t,e){t.x=e.x,t.y=e.y,e.id&&(t.id=e.id)},Dt=function(t){t.x=Math.round(t.x),t.y=Math.round(t.y)},Ht=null,Ft=function(){Ht&&(s.unbind(document,"mousemove",Ft),s.addClass(t,"pswp--has_mouse"),a.mouseUsed=!0,It("mouseUsed")),Ht=setTimeout((function(){Ht=null}),100)},Bt=function(t,e){var i=qe(o.currItem,ut,t);return e&&(tt=i),i},Wt=function(t){return t||(t=o.currItem),t.initialZoomLevel},Rt=function(t){return t||(t=o.currItem),t.w>0?a.maxSpreadZoom:1},$t=function(t,e,i,n){return n===o.currItem.initialZoomLevel?(i[t]=o.currItem.initialPosition[t],!0):(i[t]=At(t,n),i[t]>e.min[t]?(i[t]=e.min[t],!0):i[t]=n)return Ut(t),o(i),void(a&&a());o((i-e)*s(r/n)+e),Nt[t].raf=O(d)}};d()},Qt={shout:It,listen:St,viewportSize:ut,options:a,isMainScrollAnimating:function(){return it},getZoomLevel:function(){return g},getCurrentIndex:function(){return c},isDragging:function(){return N},isZooming:function(){return K},setScrollOffset:function(t,e){ft.x=t,H=ft.y=e,It("updateScrollOffset",ft)},applyZoomPan:function(t,e,i,n){ht.x=e,ht.y=i,g=t,Lt(n)},init:function(){if(!r&&!l){var i;o.framework=s,o.template=t,o.bg=s.getChildByClass(t,"pswp__bg"),A=t.className,r=!0,F=s.detectFeatures(),O=F.raf,P=F.caf,z=F.transform,D=F.oldIE,o.scrollWrap=s.getChildByClass(t,"pswp__scroll-wrap"),o.container=s.getChildByClass(o.scrollWrap,"pswp__container"),h=o.container.style,o.itemHolders=_=[{el:o.container.children[0],wrap:0,index:-1},{el:o.container.children[1],wrap:0,index:-1},{el:o.container.children[2],wrap:0,index:-1}],_[0].el.style.display=_[2].el.style.display="none",function(){if(z){var e=F.perspective&&!E;return w="translate"+(e?"3d(":"("),void(y=F.perspective?", 0px)":")")}z="left",s.addClass(t,"pswp--ie"),Ot=function(t,e){e.left=t+"px"},Et=function(t){var e=t.fitRatio>1?1:t.fitRatio,i=t.container.style,n=e*t.w,s=e*t.h;i.width=n+"px",i.height=s+"px",i.left=t.initialPosition.x+"px",i.top=t.initialPosition.y+"px"},Lt=function(){if(et){var t=et,e=o.currItem,i=e.fitRatio>1?1:e.fitRatio,n=i*e.w,s=i*e.h;t.width=n+"px",t.height=s+"px",t.left=ht.x+"px",t.top=ht.y+"px"}}}(),m={resize:o.updateSize,orientationchange:function(){clearTimeout(B),B=setTimeout((function(){ut.x!==o.scrollWrap.clientWidth&&o.updateSize()}),500)},scroll:Yt,keydown:jt,click:Gt};var n=F.isOldIOSPhone||F.isOldAndroid||F.isMobileOpera;for(F.animationName&&F.transform&&!n||(a.showAnimationDuration=a.hideAnimationDuration=0),i=0;i=$e())&&(c=0),o.currItem=Re(c),(F.isOldIOSPhone||F.isOldAndroid)&&(vt=!1),t.setAttribute("aria-hidden","false"),a.modal&&(vt?t.style.position="fixed":(t.style.position="absolute",t.style.top=s.getScrollY()+"px")),void 0===H&&(It("initialLayout"),H=M=s.getScrollY());var d="pswp--open ";for(a.mainClass&&(d+=a.mainClass+" "),a.showHideOpacity&&(d+="pswp--animate_opacity "),d+=E?"pswp--touch":"pswp--notouch",d+=F.animationName?" pswp--css_animation":"",d+=F.svg?" pswp--svg":"",s.addClass(t,d),o.updateSize(),u=-1,gt=null,i=0;i<3;i++)Ot((i+u)*mt.x,_[i].el.style);D||s.bind(o.scrollWrap,f,o),St("initialZoomInEnd",(function(){o.setContent(_[0],c-1),o.setContent(_[2],c+1),_[0].el.style.display=_[2].el.style.display="block",a.focus&&t.focus(),s.bind(document,"keydown",o),F.transform&&s.bind(o.scrollWrap,"click",o),a.mouseUsed||s.bind(document,"mousemove",Ft),s.bind(window,"resize scroll orientationchange",o),It("bindEvents")})),o.setContent(_[1],c),o.updateCurrItem(),It("afterInit"),vt||(b=setInterval((function(){qt||N||K||g!==o.currItem.initialZoomLevel||o.updateSize()}),1e3)),s.addClass(t,"pswp--visible")}},close:function(){r&&(r=!1,l=!0,It("close"),s.unbind(window,"resize scroll orientationchange",o),s.unbind(window,"scroll",m.scroll),s.unbind(document,"keydown",o),s.unbind(document,"mousemove",Ft),F.transform&&s.unbind(o.scrollWrap,"click",o),N&&s.unbind(window,p,o),clearTimeout(B),It("unbindEvents"),je(o.currItem,null,!0,o.destroy))},destroy:function(){It("destroy"),He&&clearTimeout(He),t.setAttribute("aria-hidden","true"),t.className=A,b&&clearInterval(b),s.unbind(o.scrollWrap,f,o),s.unbind(window,"scroll",o),fe(),Xt(),xt=null},panTo:function(t,e,i){i||(t>tt.min.x?t=tt.min.x:ttt.min.y?e=tt.min.y:e=3&&(u+=gt+(gt>0?-3:3),i=3);for(var n=0;n0?(e=_.shift(),_[2]=e,u++,Ot((u+2)*mt.x,e.el.style),o.setContent(e,c-i+n+1+1)):(e=_.pop(),_.unshift(e),u--,Ot(u*mt.x,e.el.style),o.setContent(e,c+i-n-1-1));if(et&&1===Math.abs(gt)){var s=Re(x);s.initialZoomLevel!==g&&(qe(s,ut),Ze(s),Et(s))}gt=0,o.updateCurrZoomItem(),x=c,It("afterChange")}}},updateSize:function(e){if(!vt&&a.modal){var i=s.getScrollY();if(H!==i&&(t.style.top=i+"px",H=i),!e&&yt.x===window.innerWidth&&yt.y===window.innerHeight)return;yt.x=window.innerWidth,yt.y=window.innerHeight,t.style.height=yt.y+"px"}if(ut.x=o.scrollWrap.clientWidth,ut.y=o.scrollWrap.clientHeight,Yt(),mt.x=ut.x+Math.round(ut.x*a.spacing),mt.y=ut.y,Pt(mt.x*pt),It("beforeResize"),void 0!==u){for(var n,r,l,d=0;d<3;d++)n=_[d],Ot((d+u)*mt.x,n.el.style),l=c+d-1,a.loop&&$e()>2&&(l=_t(l)),(r=Re(l))&&(C||r.needsUpdate||!r.bounds)?(o.cleanSlide(r),o.setContent(n,l),1===d&&(o.currItem=r,o.updateCurrZoomItem(!0)),r.needsUpdate=!1):-1===n.index&&l>=0&&o.setContent(n,l),r&&r.container&&(qe(r,ut),Ze(r),Et(r));C=!1}v=g=o.currItem.initialZoomLevel,(tt=o.currItem.bounds)&&(ht.x=tt.center.x,ht.y=tt.center.y,Lt(!0)),It("resize")},zoomTo:function(t,e,i,n,o){e&&(v=g,he.x=Math.abs(e.x)-ht.x,he.y=Math.abs(e.y)-ht.y,Mt(ct,ht));var a=Bt(t,!1),r={};$t("x",a,r,t),$t("y",a,r,t);var l=g,d=ht.x,c=ht.y;Dt(r);var h=function(e){1===e?(g=t,ht.x=r.x,ht.y=r.y):(g=(t-l)*e+l,ht.x=(r.x-d)*e+d,ht.y=(r.y-c)*e+c),o&&o(e),Lt(1===e)};i?Zt("customZoomTo",0,1,i,n||s.easing.sine.inOut,h):h(1)}},Kt={},Jt={},te={},ee={},ie={},ne=[],se={},oe=[],ae={},re=0,le={x:0,y:0},de=0,ce={x:0,y:0},he={x:0,y:0},ue={x:0,y:0},pe=function(t,e){return ae.x=Math.abs(t.x-e.x),ae.y=Math.abs(t.y-e.y),Math.sqrt(ae.x*ae.x+ae.y*ae.y)},fe=function(){X&&(P(X),X=null)},me=function(){N&&(X=O(me),Le())},ge=function(t,e){return!(!t||t===document)&&!(t.getAttribute("class")&&t.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(e(t)?t:ge(t.parentNode,e))},ve={},we=function(t,e){return ve.prevent=!ge(t.target,a.isClickableElement),It("preventDragEvent",t,e,ve),ve.prevent},ye=function(t,e){return e.x=t.pageX,e.y=t.pageY,e.id=t.identifier,e},be=function(t,e,i){i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y)},Ce=function(){var t=ht.y-o.currItem.initialPosition.y;return 1-Math.abs(t/(ut.y/2))},_e={},xe={},Se=[],Ie=function(t){for(;Se.length>0;)Se.pop();return L?(lt=0,ne.forEach((function(t){0===lt?Se[0]=t:1===lt&&(Se[1]=t),lt++}))):t.type.indexOf("touch")>-1?t.touches&&t.touches.length>0&&(Se[0]=ye(t.touches[0],_e),t.touches.length>1&&(Se[1]=ye(t.touches[1],xe))):(_e.x=t.pageX,_e.y=t.pageY,_e.id="",Se[0]=_e),Se},ke=function(t,e){var i,n,s,r,l=ht[t]+e[t],d=e[t]>0,c=ce.x+e.x,h=ce.x-se.x;return i=l>tt.min[t]||ltt.min[t]&&(i=a.panEndFriction,tt.min[t]-l,n=tt.min[t]-ct[t]),(n<=0||h<0)&&$e()>1?(r=c,h<0&&c>se.x&&(r=se.x)):tt.min.x!==tt.max.x&&(s=l)):(l0)&&$e()>1?(r=c,h>0&&co.currItem.fitRatio&&(ht[t]+=e[t]*i)):(void 0!==r&&(Pt(r,!0),Z=r!==se.x),tt.min.x!==tt.max.x&&(void 0!==s?ht.x=s:Z||(ht.x+=e.x*i)),void 0!==r)},Te=function(t){if(!("mousedown"===t.type&&t.button>0)){if(We)return void t.preventDefault();if(!Y||"mousedown"!==t.type){if(we(t,!0)&&t.preventDefault(),It("pointerDown"),L){var e=s.arraySearch(ne,t.pointerId,"id");e<0&&(e=ne.length),ne[e]={x:t.pageX,y:t.pageY,id:t.pointerId}}var i=Ie(t),n=i.length;Q=null,Xt(),N&&1!==n||(N=st=!0,s.bind(window,p,o),j=rt=ot=G=Z=V=q=U=!1,nt=null,It("firstTouchStart",i),Mt(ct,ht),dt.x=dt.y=0,Mt(ee,i[0]),Mt(ie,ee),se.x=mt.x*pt,oe=[{x:ee.x,y:ee.y}],R=W=kt(),Bt(g,!0),fe(),me()),!K&&n>1&&!it&&!Z&&(v=g,U=!1,K=q=!0,dt.y=dt.x=0,Mt(ct,ht),Mt(Kt,i[0]),Mt(Jt,i[1]),be(Kt,Jt,ue),he.x=Math.abs(ue.x)-ht.x,he.y=Math.abs(ue.y)-ht.y,J=pe(Kt,Jt))}}},ze=function(t){if(t.preventDefault(),L){var e=s.arraySearch(ne,t.pointerId,"id");if(e>-1){var i=ne[e];i.x=t.pageX,i.y=t.pageY}}if(N){var n=Ie(t);if(nt||V||K)Q=n;else if(ce.x!==mt.x*pt)nt="h";else{var o=Math.abs(n[0].x-ee.x)-Math.abs(n[0].y-ee.y);Math.abs(o)>=10&&(nt=o>0?"h":"v",Q=n)}}},Le=function(){if(Q){var t=Q.length;if(0!==t)if(Mt(Kt,Q[0]),te.x=Kt.x-ee.x,te.y=Kt.y-ee.y,K&&t>1){if(ee.x=Kt.x,ee.y=Kt.y,!te.x&&!te.y&&function(t,e){return t.x===e.x&&t.y===e.y}(Q[1],Jt))return;Mt(Jt,Q[1]),U||(U=!0,It("zoomGestureStarted"));var e=pe(Kt,Jt),i=Me(e);i>o.currItem.initialZoomLevel+o.currItem.initialZoomLevel/15&&(rt=!0);var n=1,s=Wt(),r=Rt();if(i1&&(n=1),i=s-n*(s/3);else i>r&&((n=(i-r)/(6*s))>1&&(n=1),i=r+n*s);n<0&&(n=0),e,be(Kt,Jt,le),dt.x+=le.x-ue.x,dt.y+=le.y-ue.y,Mt(ue,le),ht.x=At("x",i),ht.y=At("y",i),j=i>g,g=i,Lt()}else{if(!nt)return;if(st&&(st=!1,Math.abs(te.x)>=10&&(te.x-=Q[0].x-ie.x),Math.abs(te.y)>=10&&(te.y-=Q[0].y-ie.y)),ee.x=Kt.x,ee.y=Kt.y,0===te.x&&0===te.y)return;if("v"===nt&&a.closeOnVerticalDrag&&"fit"===a.scaleMode&&g===o.currItem.initialZoomLevel){dt.y+=te.y,ht.y+=te.y;var d=Ce();return G=!0,It("onVerticalDrag",d),Tt(d),void Lt()}(function(t,e,i){if(t-R>50){var n=oe.length>2?oe.shift():{};n.x=e,n.y=i,oe.push(n),R=t}})(kt(),Kt.x,Kt.y),V=!0,tt=o.currItem.bounds,ke("x",te)||(ke("y",te),Dt(ht),Lt())}}},Ee=function(t){if(F.isOldAndroid){if(Y&&"mouseup"===t.type)return;t.type.indexOf("touch")>-1&&(clearTimeout(Y),Y=setTimeout((function(){Y=0}),600))}var e;if(It("pointerUp"),we(t,!1)&&t.preventDefault(),L){var i=s.arraySearch(ne,t.pointerId,"id");if(i>-1)if(e=ne.splice(i,1)[0],navigator.pointerEnabled)e.type=t.pointerType||"mouse";else{e.type={4:"mouse",2:"touch",3:"pen"}[t.pointerType],e.type||(e.type=t.pointerType||"mouse")}}var n,r=Ie(t),l=r.length;if("mouseup"===t.type&&(l=0),2===l)return Q=null,!0;1===l&&Mt(ie,r[0]),0!==l||nt||it||(e||("mouseup"===t.type?e={x:t.pageX,y:t.pageY,type:"mouse"}:t.changedTouches&&t.changedTouches[0]&&(e={x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY,type:"touch"})),It("touchRelease",t,e));var d=-1;if(0===l&&(N=!1,s.unbind(window,p,o),fe(),K?d=0:-1!==de&&(d=kt()-de)),de=1===l?kt():-1,n=-1!==d&&d<150?"zoom":"swipe",K&&l<2&&(K=!1,1===l&&(n="zoomPointerUp"),It("zoomGestureEnded")),Q=null,V||U||it||G)if(Xt(),$||($=Oe()),$.calculateSwipeSpeed("x"),G){if(Ce()o.currItem.fitRatio&&Pe($))}},Oe=function(){var t,e,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(n){oe.length>1?(t=kt()-R+50,e=oe[oe.length-2][n]):(t=kt()-W,e=ie[n]),i.lastFlickOffset[n]=ee[n]-e,i.lastFlickDist[n]=Math.abs(i.lastFlickOffset[n]),i.lastFlickDist[n]>20?i.lastFlickSpeed[n]=i.lastFlickOffset[n]/t:i.lastFlickSpeed[n]=0,Math.abs(i.lastFlickSpeed[n])<.1&&(i.lastFlickSpeed[n]=0),i.slowDownRatio[n]=.95,i.slowDownRatioReverse[n]=1-i.slowDownRatio[n],i.speedDecelerationRatio[n]=1},calculateOverBoundsAnimOffset:function(t,e){i.backAnimStarted[t]||(ht[t]>tt.min[t]?i.backAnimDestination[t]=tt.min[t]:ht[t]30&&(d||e.lastFlickOffset.x>20)?n=-1:l<-30&&(d||e.lastFlickOffset.x<-20)&&(n=1)}n&&((c+=n)<0?(c=a.loop?$e()-1:0,r=!0):c>=$e()&&(c=a.loop?0:$e()-1,r=!0),r&&!a.loop||(gt+=n,pt-=n,i=!0));var h,u=mt.x*pt,p=Math.abs(u-ce.x);return i||u>ce.x==e.lastFlickSpeed.x>0?(h=Math.abs(e.lastFlickSpeed.x)>0?p/Math.abs(e.lastFlickSpeed.x):333,h=Math.min(h,400),h=Math.max(h,250)):h=333,re===c&&(i=!1),it=!0,It("mainScrollAnimStart"),Zt("mainScroll",ce.x,u,h,s.easing.cubic.out,Pt,(function(){Xt(),it=!1,re=-1,(i||re!==c)&&o.updateCurrItem(),It("mainScrollAnimComplete")})),i&&o.updateCurrItem(!0),i},Me=function(t){return 1/J*t*v},De=function(){var t=g,e=Wt(),i=Rt();gi&&(t=i);var n,a=at;return ot&&!j&&!rt&&g1||navigator.msMaxTouchPoints>1),o.likelyTouchDevice=E,m[S]=Te,m[I]=ze,m[k]=Ee,T&&(m[T]=m[k]),F.touch&&(f+=" mousedown",p+=" mousemove mouseup",m.mousedown=m[S],m.mousemove=m[I],m.mouseup=m[k]),E||(a.allowPanToNext=!1)}}});var He,Fe,Be,We,Re,$e,je=function(e,i,n,r){var l;He&&clearTimeout(He),We=!0,Be=!0,e.initialLayout?(l=e.initialLayout,e.initialLayout=null):l=a.getThumbBoundsFn&&a.getThumbBoundsFn(c);var h=n?a.hideAnimationDuration:a.showAnimationDuration,u=function(){Ut("initialZoom"),n?(o.template.removeAttribute("style"),o.bg.removeAttribute("style")):(Tt(1),i&&(i.style.display="block"),s.addClass(t,"pswp--animated-in"),It("initialZoom"+(n?"OutEnd":"InEnd"))),r&&r(),We=!1};if(!h||!l||void 0===l.x)return It("initialZoom"+(n?"Out":"In")),g=e.initialZoomLevel,Mt(ht,e.initialPosition),Lt(),t.style.opacity=n?0:1,Tt(1),void(h?setTimeout((function(){u()}),h):u());!function(){var i=d,r=!o.currItem.src||o.currItem.loadError||a.showHideOpacity;e.miniImg&&(e.miniImg.style.webkitBackfaceVisibility="hidden"),n||(g=l.w/e.w,ht.x=l.x,ht.y=l.y-M,o[r?"template":"bg"].style.opacity=.001,Lt()),Vt("initialZoom"),n&&!i&&s.removeClass(t,"pswp--animated-in"),r&&(n?s[(i?"remove":"add")+"Class"](t,"pswp--animate_opacity"):setTimeout((function(){s.addClass(t,"pswp--animate_opacity")}),30)),He=setTimeout((function(){if(It("initialZoom"+(n?"Out":"In")),n){var o=l.w/e.w,a={x:ht.x,y:ht.y},d=g,c=at,p=function(e){1===e?(g=o,ht.x=l.x,ht.y=l.y-H):(g=(o-d)*e+d,ht.x=(l.x-a.x)*e+a.x,ht.y=(l.y-H-a.y)*e+a.y),Lt(),r?t.style.opacity=1-e:Tt(c-e*c)};i?Zt("initialZoom",0,1,h,s.easing.cubic.out,p,u):(p(1),He=setTimeout(u,h+20))}else g=e.initialZoomLevel,Mt(ht,e.initialPosition),Lt(),Tt(1),r?t.style.opacity=1:Tt(1),He=setTimeout(u,h+20)}),n?25:90)}()},Ge={},Ye=[],Ne={index:0,errorMsg:'
The image could not be loaded.
',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Fe.length}},qe=function(t,e,i){if(t.src&&!t.loadError){var n=!i;if(n&&(t.vGap||(t.vGap={top:0,bottom:0}),It("parseVerticalMargin",t)),Ge.x=e.x,Ge.y=e.y-t.vGap.top-t.vGap.bottom,n){var s=Ge.x/t.w,o=Ge.y/t.h;t.fitRatio=s1&&(i=1),t.initialZoomLevel=i,t.bounds||(t.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!i)return;return function(t,e,i){var n=t.bounds;n.center.x=Math.round((Ge.x-e)/2),n.center.y=Math.round((Ge.y-i)/2)+t.vGap.top,n.max.x=e>Ge.x?Math.round(Ge.x-e):n.center.x,n.max.y=i>Ge.y?Math.round(Ge.y-i)+t.vGap.top:n.center.y,n.min.x=e>Ge.x?0:n.center.x,n.min.y=i>Ge.y?t.vGap.top:n.center.y}(t,t.w*i,t.h*i),n&&i===t.initialZoomLevel&&(t.initialPosition=t.bounds.center),t.bounds}return t.w=t.h=0,t.initialZoomLevel=t.fitRatio=1,t.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},t.initialPosition=t.bounds.center,t.bounds},Ue=function(t,e,i,n,s,a){e.loadError||n&&(e.imageAppended=!0,Ze(e,n,e===o.currItem&&bt),i.appendChild(n),a&&setTimeout((function(){e&&e.loaded&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null)}),500))},Ve=function(t){t.loading=!0,t.loaded=!1;var e=t.img=s.createEl("pswp__img","img"),i=function(){t.loading=!1,t.loaded=!0,t.loadComplete?t.loadComplete(t):t.img=null,e.onload=e.onerror=null,e=null};return e.onload=i,e.onerror=function(){t.loadError=!0,i()},e.src=t.src,e},Xe=function(t,e){if(t.src&&t.loadError&&t.container)return e&&(t.container.innerHTML=""),t.container.innerHTML=a.errorMsg.replace("%url%",t.src),!0},Ze=function(t,e,i){if(t.src){e||(e=t.container.lastChild);var n=i?t.w:Math.round(t.w*t.fitRatio),s=i?t.h:Math.round(t.h*t.fitRatio);t.placeholder&&!t.loaded&&(t.placeholder.style.width=n+"px",t.placeholder.style.height=s+"px"),e.style.width=n+"px",e.style.height=s+"px"}},Qe=function(){if(Ye.length){for(var t,e=0;e=0,s=Math.min(i[0],$e()),r=Math.min(i[1],$e());for(e=1;e<=(n?r:s);e++)o.lazyLoadItem(c+e);for(e=1;e<=(n?s:r);e++)o.lazyLoadItem(c-e)})),St("initialLayout",(function(){o.currItem.initialLayout=a.getThumbBoundsFn&&a.getThumbBoundsFn(c)})),St("mainScrollAnimComplete",Qe),St("initialZoomInEnd",Qe),St("destroy",(function(){for(var t,e=0;e=0&&void 0!==Fe[t]&&Fe[t]},allowProgressiveImg:function(){return a.forceProgressiveLoading||!E||a.mouseUsed||screen.width>1200},setContent:function(t,e){a.loop&&(e=_t(e));var i=o.getItemAt(t.index);i&&(i.container=null);var n,l=o.getItemAt(e);if(l){It("gettingData",e,l),t.index=e,t.item=l;var d=l.container=s.createEl("pswp__zoom-wrap");if(!l.src&&l.html&&(l.html.tagName?d.appendChild(l.html):d.innerHTML=l.html),Xe(l),qe(l,ut),!l.src||l.loadError||l.loaded)l.src&&!l.loadError&&((n=s.createEl("pswp__img","img")).style.opacity=1,n.src=l.src,Ze(l,n),Ue(0,l,d,n));else{if(l.loadComplete=function(i){if(r){if(t&&t.index===e){if(Xe(i,!0))return i.loadComplete=i.img=null,qe(i,ut),Et(i),void(t.index===c&&o.updateCurrZoomItem());i.imageAppended?!We&&i.placeholder&&(i.placeholder.style.display="none",i.placeholder=null):F.transform&&(it||We)?Ye.push({item:i,baseDiv:d,img:i.img,index:e,holder:t,clearPlaceholder:!0}):Ue(0,i,d,i.img,0,!0)}i.loadComplete=null,i.img=null,It("imageLoadComplete",e,i)}},s.features.transform){var h="pswp__img pswp__img--placeholder";h+=l.msrc?"":" pswp__img--placeholder--blank";var u=s.createEl(h,l.msrc?"img":"");l.msrc&&(u.src=l.msrc),Ze(l,u),d.appendChild(u),l.placeholder=u}l.loading||Ve(l),o.allowProgressiveImg()&&(!Be&&F.transform?Ye.push({item:l,baseDiv:d,img:l.img,index:e,holder:t}):Ue(0,l,d,l.img,0,!0))}Be||e!==c?Et(l):(et=d.style,je(l,n||l.img)),t.el.innerHTML="",t.el.appendChild(d)}else t.el.innerHTML=""},cleanSlide:function(t){t.img&&(t.img.onload=t.img.onerror=null),t.loaded=t.loading=t.img=t.imageAppended=!1}}});var Ke,Je,ti={},ei=function(t,e,i){var n=document.createEvent("CustomEvent"),s={origEvent:t,target:t.target,releasePoint:e,pointerType:i||"touch"};n.initCustomEvent("pswpTap",!0,!0,s),t.target.dispatchEvent(n)};Ct("Tap",{publicMethods:{initTap:function(){St("firstTouchStart",o.onTapStart),St("touchRelease",o.onTapRelease),St("destroy",(function(){ti={},Ke=null}))},onTapStart:function(t){t.length>1&&(clearTimeout(Ke),Ke=null)},onTapRelease:function(t,e){if(e&&!V&&!q&&!qt){var i=e;if(Ke&&(clearTimeout(Ke),Ke=null,function(t,e){return Math.abs(t.x-e.x)<25&&Math.abs(t.y-e.y)<25}(i,ti)))return void It("doubleTap",i);if("mouse"===e.type)return void ei(t,e,"mouse");if("BUTTON"===t.target.tagName.toUpperCase()||s.hasClass(t.target,"pswp__single-tap"))return void ei(t,e);Mt(ti,i),Ke=setTimeout((function(){ei(t,e),Ke=null}),300)}}}}),Ct("DesktopZoom",{publicMethods:{initDesktopZoom:function(){D||(E?St("mouseUsed",(function(){o.setupDesktopZoom()})):o.setupDesktopZoom(!0))},setupDesktopZoom:function(e){Je={};var i="wheel mousewheel DOMMouseScroll";St("bindEvents",(function(){s.bind(t,i,o.handleMouseWheel)})),St("unbindEvents",(function(){Je&&s.unbind(t,i,o.handleMouseWheel)})),o.mouseZoomedIn=!1;var n,a=function(){o.mouseZoomedIn&&(s.removeClass(t,"pswp--zoomed-in"),o.mouseZoomedIn=!1),g<1?s.addClass(t,"pswp--zoom-allowed"):s.removeClass(t,"pswp--zoom-allowed"),r()},r=function(){n&&(s.removeClass(t,"pswp--dragging"),n=!1)};St("resize",a),St("afterChange",a),St("pointerDown",(function(){o.mouseZoomedIn&&(n=!0,s.addClass(t,"pswp--dragging"))})),St("pointerUp",r),e||a()},handleMouseWheel:function(t){if(g<=o.currItem.fitRatio)return a.modal&&(!a.closeOnScroll||qt||N?t.preventDefault():z&&Math.abs(t.deltaY)>2&&(d=!0,o.close())),!0;if(t.stopPropagation(),Je.x=0,"deltaX"in t)1===t.deltaMode?(Je.x=18*t.deltaX,Je.y=18*t.deltaY):(Je.x=t.deltaX,Je.y=t.deltaY);else if("wheelDelta"in t)t.wheelDeltaX&&(Je.x=-.16*t.wheelDeltaX),t.wheelDeltaY?Je.y=-.16*t.wheelDeltaY:Je.y=-.16*t.wheelDelta;else{if(!("detail"in t))return;Je.y=t.detail}Bt(g,!0);var e=ht.x-Je.x,i=ht.y-Je.y;(a.modal||e<=tt.min.x&&e>=tt.max.x&&i<=tt.min.y&&i>=tt.max.y)&&t.preventDefault(),o.panTo(e,i)},toggleDesktopZoom:function(e){e=e||{x:ut.x/2+ft.x,y:ut.y/2+ft.y};var i=a.getDoubleTapZoom(!0,o.currItem),n=g===i;o.mouseZoomedIn=!n,o.zoomTo(n?o.currItem.initialZoomLevel:i,e,333),s[(n?"remove":"add")+"Class"](t,"pswp--zoomed-in")}}});var ii,ni,si,oi,ai,ri,li,di,ci,hi,ui,pi,fi={history:!0,galleryUID:1},mi=function(){return ui.hash.substring(1)},gi=function(){ii&&clearTimeout(ii),si&&clearTimeout(si)},vi=function(){var t=mi(),e={};if(t.length<5)return e;var i,n=t.split("&");for(i=0;i-1&&("&"===(li=li.substring(0,e)).slice(-1)&&(li=li.slice(0,-1))),setTimeout((function(){r&&s.bind(window,"hashchange",o.onHashChange)}),40)}},onHashChange:function(){return mi()===li?(ci=!0,void o.close()):void(oi||(ai=!0,o.goTo(vi().pid),ai=!1))},updateURL:function(){gi(),ai||(di?ii=setTimeout(wi,800):wi())}}}),s.extend(o,Qt)}})),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.PhotoSwipeUI_Default=e()}(this,(function(){"use strict";return function(t,e){var i,n,s,o,a,r,l,d,c,h,u,p,f,m,g,v,w,y,b=this,C=!1,_=!0,x=!0,S={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(t,e){return t.title?(e.children[0].innerHTML=t.title,!0):(e.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return t.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return t.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},I=function(t){if(v)return!0;t=t||window.event,g.timeToIdle&&g.mouseUsed&&!c&&D();for(var i,n,s=(t.target||t.srcElement).getAttribute("class")||"",o=0;o-1&&(i.onTap(),n=!0);if(n){t.stopPropagation&&t.stopPropagation(),v=!0;var a=e.features.isOldAndroid?600:30;setTimeout((function(){v=!1}),a)}},k=function(){return!t.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},T=function(t,i,n){e[(n?"add":"remove")+"Class"](t,"pswp__"+i)},z=function(){var t=1===g.getNumItemsFn();t!==m&&(T(n,"ui--one-slide",t),m=t)},L=function(){T(l,"share-modal--hidden",x)},E=function(){return(x=!x)?(e.removeClass(l,"pswp__share-modal--fade-in"),setTimeout((function(){x&&L()}),300)):(L(),setTimeout((function(){x||e.addClass(l,"pswp__share-modal--fade-in")}),30)),x||P(),!1},O=function(e){var i=(e=e||window.event).target||e.srcElement;return t.shout("shareLinkClick",e,i),!(!i.href||!i.hasAttribute("download")&&(window.open(i.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),x||E(),1))},P=function(){for(var t,e,i,n,s="",o=0;o