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,o=jQuery(window).scrollTop(),s=jQuery(window).width(),a=15;e=s-30>=i.width()+t.pageX?t.pageX+a:s-i.width()-a,n=o+30>=t.pageY-i.height()?o+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,o=Math.cos,s=Math.PI,a=1.70158,r=1.525*a,l=a+1,d=2*s/3,c=2*s/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-o(t*s/2)},easeOutSine:function(t){return n(t*s/2)},easeInOutSine:function(t){return-(o(s*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:s(e.sensitivity)};t=new IntersectionObserver(o,a)}function o(t){const n=t[0].boundingClientRect.y,o=t[0].isIntersecting,s=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-s&&n<=i+s&&!t.hasAttribute(this._optionsAttrHidden)},Layzr.prototype._reveal=function(t){var e=t.getAttribute(this._srcAttr)||t.getAttribute(this._optionsAttr),i=this,n=this._optionsIsloadedClass,o=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(o)})):t.attachEvent("onload",(function(){i._optionsCallback.call(t),i._nodes=i._nodes.filter((e=>e!==t)),t.classList.add(n),t.classList.remove(o)})));"function"==typeof this._optionsBefore&&this._optionsBefore.call(t);var s=!1;t.hasAttribute(this._optionsAttrBg)?(t.style.backgroundImage="url("+e+")",s=!0):(e&&(t.removeAttribute("src"),t.setAttribute("src",e),s=!0),t.hasAttribute(this._optionsAttrSrcSet)&&(t.setAttribute("srcset",t.getAttribute(this._optionsAttrSrcSet)),s=!0)),s&&t.classList.add(o),"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 o=t.getAttribute("data-src"),s=o.substring(o.lastIndexOf(".")+1);"png"!==s&&"svg"!==s||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 s=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);s&&s.length>0&&((s=parseInt(s[1],10))>=1&&s<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,o.features=i,i}};o.detectFeatures(),o.features.oldIE&&(o.bind=function(t,e,i,n){e=e.split(" ");for(var o,s=(n?"detach":"attach")+"Event",a=function(){i.handleEvent.call(i)},r=0;re-1?t-e:t<0?e+t:t},_t={},St=function(t,e){return _t[t]||(_t[t]=[]),_t[t].push(e)},kt=function(t){var e=_t[t];if(e){var i=Array.prototype.slice.call(arguments);i.shift();for(var n=0;ns.currItem.fitRatio?bt||(Ze(s.currItem,!1,!0),bt=!0):bt&&(Ze(s.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>=je()-1&&n<0)&&(t=ce.x+n*a.mainScrollEndFriction)}ce.x=t,Ot(t,h)},Dt=function(t,e){var i=he[t]-ft[t];return ct[t]+dt[t]+i-i*(e/v)},At=function(t,e){t.x=e.x,t.y=e.y,e.id&&(t.id=e.id)},Mt=function(t){t.x=Math.round(t.x),t.y=Math.round(t.y)},Ft=null,Ht=function(){Ft&&(o.unbind(document,"mousemove",Ht),o.addClass(t,"pswp--has_mouse"),a.mouseUsed=!0,kt("mouseUsed")),Ft=setTimeout((function(){Ft=null}),100)},Bt=function(t,e){var i=qe(s.currItem,ut,t);return e&&(tt=i),i},Rt=function(t){return t||(t=s.currItem),t.initialZoomLevel},Wt=function(t){return t||(t=s.currItem),t.w>0?a.maxSpreadZoom:1},jt=function(t,e,i,n){return n===s.currItem.initialZoomLevel?(i[t]=s.currItem.initialPosition[t],!0):(i[t]=Dt(t,n),i[t]>e.min[t]?(i[t]=e.min[t],!0):i[t]=n)return Ut(t),s(i),void(a&&a());s((i-e)*o(r/n)+e),Yt[t].raf=O(d)}};d()},Qt={shout:kt,listen:St,viewportSize:ut,options:a,isMainScrollAnimating:function(){return it},getZoomLevel:function(){return g},getCurrentIndex:function(){return c},isDragging:function(){return Y},isZooming:function(){return K},setScrollOffset:function(t,e){ft.x=t,F=ft.y=e,kt("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;s.framework=o,s.template=t,s.bg=o.getChildByClass(t,"pswp__bg"),D=t.className,r=!0,H=o.detectFeatures(),O=H.raf,P=H.caf,z=H.transform,M=H.oldIE,s.scrollWrap=o.getChildByClass(t,"pswp__scroll-wrap"),s.container=o.getChildByClass(s.scrollWrap,"pswp__container"),h=s.container.style,s.itemHolders=x=[{el:s.container.children[0],wrap:0,index:-1},{el:s.container.children[1],wrap:0,index:-1},{el:s.container.children[2],wrap:0,index:-1}],x[0].el.style.display=x[2].el.style.display="none",function(){if(z){var e=H.perspective&&!E;return w="translate"+(e?"3d(":"("),void(y=H.perspective?", 0px)":")")}z="left",o.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,o=e*t.h;i.width=n+"px",i.height=o+"px",i.left=t.initialPosition.x+"px",i.top=t.initialPosition.y+"px"},Lt=function(){if(et){var t=et,e=s.currItem,i=e.fitRatio>1?1:e.fitRatio,n=i*e.w,o=i*e.h;t.width=n+"px",t.height=o+"px",t.left=ht.x+"px",t.top=ht.y+"px"}}}(),m={resize:s.updateSize,orientationchange:function(){clearTimeout(B),B=setTimeout((function(){ut.x!==s.scrollWrap.clientWidth&&s.updateSize()}),500)},scroll:Gt,keydown:$t,click:Nt};var n=H.isOldIOSPhone||H.isOldAndroid||H.isMobileOpera;for(H.animationName&&H.transform&&!n||(a.showAnimationDuration=a.hideAnimationDuration=0),i=0;i=je())&&(c=0),s.currItem=We(c),(H.isOldIOSPhone||H.isOldAndroid)&&(vt=!1),t.setAttribute("aria-hidden","false"),a.modal&&(vt?t.style.position="fixed":(t.style.position="absolute",t.style.top=o.getScrollY()+"px")),void 0===F&&(kt("initialLayout"),F=A=o.getScrollY());var d="pswp--open ";for(a.mainClass&&(d+=a.mainClass+" "),a.showHideOpacity&&(d+="pswp--animate_opacity "),d+=E?"pswp--touch":"pswp--notouch",d+=H.animationName?" pswp--css_animation":"",d+=H.svg?" pswp--svg":"",o.addClass(t,d),s.updateSize(),u=-1,gt=null,i=0;i<3;i++)Ot((i+u)*mt.x,x[i].el.style);M||o.bind(s.scrollWrap,f,s),St("initialZoomInEnd",(function(){s.setContent(x[0],c-1),s.setContent(x[2],c+1),x[0].el.style.display=x[2].el.style.display="block",a.focus&&t.focus(),o.bind(document,"keydown",s),H.transform&&o.bind(s.scrollWrap,"click",s),a.mouseUsed||o.bind(document,"mousemove",Ht),o.bind(window,"resize scroll orientationchange",s),kt("bindEvents")})),s.setContent(x[1],c),s.updateCurrItem(),kt("afterInit"),vt||(b=setInterval((function(){qt||Y||K||g!==s.currItem.initialZoomLevel||s.updateSize()}),1e3)),o.addClass(t,"pswp--visible")}},close:function(){r&&(r=!1,l=!0,kt("close"),o.unbind(window,"resize scroll orientationchange",s),o.unbind(window,"scroll",m.scroll),o.unbind(document,"keydown",s),o.unbind(document,"mousemove",Ht),H.transform&&o.unbind(s.scrollWrap,"click",s),Y&&o.unbind(window,p,s),clearTimeout(B),kt("unbindEvents"),$e(s.currItem,null,!0,s.destroy))},destroy:function(){kt("destroy"),Fe&&clearTimeout(Fe),t.setAttribute("aria-hidden","true"),t.className=D,b&&clearInterval(b),o.unbind(s.scrollWrap,f,s),o.unbind(window,"scroll",s),fe(),Xt(),_t=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=x.shift(),x[2]=e,u++,Ot((u+2)*mt.x,e.el.style),s.setContent(e,c-i+n+1+1)):(e=x.pop(),x.unshift(e),u--,Ot(u*mt.x,e.el.style),s.setContent(e,c+i-n-1-1));if(et&&1===Math.abs(gt)){var o=We(_);o.initialZoomLevel!==g&&(qe(o,ut),Ze(o),Et(o))}gt=0,s.updateCurrZoomItem(),_=c,kt("afterChange")}}},updateSize:function(e){if(!vt&&a.modal){var i=o.getScrollY();if(F!==i&&(t.style.top=i+"px",F=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=s.scrollWrap.clientWidth,ut.y=s.scrollWrap.clientHeight,Gt(),mt.x=ut.x+Math.round(ut.x*a.spacing),mt.y=ut.y,Pt(mt.x*pt),kt("beforeResize"),void 0!==u){for(var n,r,l,d=0;d<3;d++)n=x[d],Ot((d+u)*mt.x,n.el.style),l=c+d-1,a.loop&&je()>2&&(l=xt(l)),(r=We(l))&&(C||r.needsUpdate||!r.bounds)?(s.cleanSlide(r),s.setContent(n,l),1===d&&(s.currItem=r,s.updateCurrZoomItem(!0)),r.needsUpdate=!1):-1===n.index&&l>=0&&s.setContent(n,l),r&&r.container&&(qe(r,ut),Ze(r),Et(r));C=!1}v=g=s.currItem.initialZoomLevel,(tt=s.currItem.bounds)&&(ht.x=tt.center.x,ht.y=tt.center.y,Lt(!0)),kt("resize")},zoomTo:function(t,e,i,n,s){e&&(v=g,he.x=Math.abs(e.x)-ht.x,he.y=Math.abs(e.y)-ht.y,At(ct,ht));var a=Bt(t,!1),r={};jt("x",a,r,t),jt("y",a,r,t);var l=g,d=ht.x,c=ht.y;Mt(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),s&&s(e),Lt(1===e)};i?Zt("customZoomTo",0,1,i,n||o.easing.sine.inOut,h):h(1)}},Kt={},Jt={},te={},ee={},ie={},ne=[],oe={},se=[],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(){Y&&(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),kt("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-s.currItem.initialPosition.y;return 1-Math.abs(t/(ut.y/2))},xe={},_e={},Se=[],ke=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],xe),t.touches.length>1&&(Se[1]=ye(t.touches[1],_e))):(xe.x=t.pageX,xe.y=t.pageY,xe.id="",Se[0]=xe),Se},Te=function(t,e){var i,n,o,r,l=ht[t]+e[t],d=e[t]>0,c=ce.x+e.x,h=ce.x-oe.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)&&je()>1?(r=c,h<0&&c>oe.x&&(r=oe.x)):tt.min.x!==tt.max.x&&(o=l)):(l0)&&je()>1?(r=c,h>0&&cs.currItem.fitRatio&&(ht[t]+=e[t]*i)):(void 0!==r&&(Pt(r,!0),Z=r!==oe.x),tt.min.x!==tt.max.x&&(void 0!==o?ht.x=o:Z||(ht.x+=e.x*i)),void 0!==r)},Ie=function(t){if(!("mousedown"===t.type&&t.button>0)){if(Re)return void t.preventDefault();if(!G||"mousedown"!==t.type){if(we(t,!0)&&t.preventDefault(),kt("pointerDown"),L){var e=o.arraySearch(ne,t.pointerId,"id");e<0&&(e=ne.length),ne[e]={x:t.pageX,y:t.pageY,id:t.pointerId}}var i=ke(t),n=i.length;Q=null,Xt(),Y&&1!==n||(Y=ot=!0,o.bind(window,p,s),$=rt=st=N=Z=V=q=U=!1,nt=null,kt("firstTouchStart",i),At(ct,ht),dt.x=dt.y=0,At(ee,i[0]),At(ie,ee),oe.x=mt.x*pt,se=[{x:ee.x,y:ee.y}],W=R=Tt(),Bt(g,!0),fe(),me()),!K&&n>1&&!it&&!Z&&(v=g,U=!1,K=q=!0,dt.y=dt.x=0,At(ct,ht),At(Kt,i[0]),At(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=o.arraySearch(ne,t.pointerId,"id");if(e>-1){var i=ne[e];i.x=t.pageX,i.y=t.pageY}}if(Y){var n=ke(t);if(nt||V||K)Q=n;else if(ce.x!==mt.x*pt)nt="h";else{var s=Math.abs(n[0].x-ee.x)-Math.abs(n[0].y-ee.y);Math.abs(s)>=10&&(nt=s>0?"h":"v",Q=n)}}},Le=function(){if(Q){var t=Q.length;if(0!==t)if(At(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;At(Jt,Q[1]),U||(U=!0,kt("zoomGestureStarted"));var e=pe(Kt,Jt),i=Ae(e);i>s.currItem.initialZoomLevel+s.currItem.initialZoomLevel/15&&(rt=!0);var n=1,o=Rt(),r=Wt();if(i1&&(n=1),i=o-n*(o/3);else i>r&&((n=(i-r)/(6*o))>1&&(n=1),i=r+n*o);n<0&&(n=0),e,be(Kt,Jt,le),dt.x+=le.x-ue.x,dt.y+=le.y-ue.y,At(ue,le),ht.x=Dt("x",i),ht.y=Dt("y",i),$=i>g,g=i,Lt()}else{if(!nt)return;if(ot&&(ot=!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===s.currItem.initialZoomLevel){dt.y+=te.y,ht.y+=te.y;var d=Ce();return N=!0,kt("onVerticalDrag",d),It(d),void Lt()}(function(t,e,i){if(t-W>50){var n=se.length>2?se.shift():{};n.x=e,n.y=i,se.push(n),W=t}})(Tt(),Kt.x,Kt.y),V=!0,tt=s.currItem.bounds,Te("x",te)||(Te("y",te),Mt(ht),Lt())}}},Ee=function(t){if(H.isOldAndroid){if(G&&"mouseup"===t.type)return;t.type.indexOf("touch")>-1&&(clearTimeout(G),G=setTimeout((function(){G=0}),600))}var e;if(kt("pointerUp"),we(t,!1)&&t.preventDefault(),L){var i=o.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=ke(t),l=r.length;if("mouseup"===t.type&&(l=0),2===l)return Q=null,!0;1===l&&At(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"})),kt("touchRelease",t,e));var d=-1;if(0===l&&(Y=!1,o.unbind(window,p,s),fe(),K?d=0:-1!==de&&(d=Tt()-de)),de=1===l?Tt():-1,n=-1!==d&&d<150?"zoom":"swipe",K&&l<2&&(K=!1,1===l&&(n="zoomPointerUp"),kt("zoomGestureEnded")),Q=null,V||U||it||N)if(Xt(),j||(j=Oe()),j.calculateSwipeSpeed("x"),N){if(Ce()s.currItem.fitRatio&&Pe(j))}},Oe=function(){var t,e,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(n){se.length>1?(t=Tt()-W+50,e=se[se.length-2][n]):(t=Tt()-R,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?je()-1:0,r=!0):c>=je()&&(c=a.loop?0:je()-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,kt("mainScrollAnimStart"),Zt("mainScroll",ce.x,u,h,o.easing.cubic.out,Pt,(function(){Xt(),it=!1,re=-1,(i||re!==c)&&s.updateCurrItem(),kt("mainScrollAnimComplete")})),i&&s.updateCurrItem(!0),i},Ae=function(t){return 1/J*t*v},Me=function(){var t=g,e=Rt(),i=Wt();gi&&(t=i);var n,a=at;return st&&!$&&!rt&&g1||navigator.msMaxTouchPoints>1),s.likelyTouchDevice=E,m[S]=Ie,m[k]=ze,m[T]=Ee,I&&(m[I]=m[T]),H.touch&&(f+=" mousedown",p+=" mousemove mouseup",m.mousedown=m[S],m.mousemove=m[k],m.mouseup=m[T]),E||(a.allowPanToNext=!1)}}});var Fe,He,Be,Re,We,je,$e=function(e,i,n,r){var l;Fe&&clearTimeout(Fe),Re=!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?(s.template.removeAttribute("style"),s.bg.removeAttribute("style")):(It(1),i&&(i.style.display="block"),o.addClass(t,"pswp--animated-in"),kt("initialZoom"+(n?"OutEnd":"InEnd"))),r&&r(),Re=!1};if(!h||!l||void 0===l.x)return kt("initialZoom"+(n?"Out":"In")),g=e.initialZoomLevel,At(ht,e.initialPosition),Lt(),t.style.opacity=n?0:1,It(1),void(h?setTimeout((function(){u()}),h):u());!function(){var i=d,r=!s.currItem.src||s.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-A,s[r?"template":"bg"].style.opacity=.001,Lt()),Vt("initialZoom"),n&&!i&&o.removeClass(t,"pswp--animated-in"),r&&(n?o[(i?"remove":"add")+"Class"](t,"pswp--animate_opacity"):setTimeout((function(){o.addClass(t,"pswp--animate_opacity")}),30)),Fe=setTimeout((function(){if(kt("initialZoom"+(n?"Out":"In")),n){var s=l.w/e.w,a={x:ht.x,y:ht.y},d=g,c=at,p=function(e){1===e?(g=s,ht.x=l.x,ht.y=l.y-F):(g=(s-d)*e+d,ht.x=(l.x-a.x)*e+a.x,ht.y=(l.y-F-a.y)*e+a.y),Lt(),r?t.style.opacity=1-e:It(c-e*c)};i?Zt("initialZoom",0,1,h,o.easing.cubic.out,p,u):(p(1),Fe=setTimeout(u,h+20))}else g=e.initialZoomLevel,At(ht,e.initialPosition),Lt(),It(1),r?t.style.opacity=1:It(1),Fe=setTimeout(u,h+20)}),n?25:90)}()},Ne={},Ge=[],Ye={index:0,errorMsg:'
The image could not be loaded.
',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return He.length}},qe=function(t,e,i){if(t.src&&!t.loadError){var n=!i;if(n&&(t.vGap||(t.vGap={top:0,bottom:0}),kt("parseVerticalMargin",t)),Ne.x=e.x,Ne.y=e.y-t.vGap.top-t.vGap.bottom,n){var o=Ne.x/t.w,s=Ne.y/t.h;t.fitRatio=o1&&(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((Ne.x-e)/2),n.center.y=Math.round((Ne.y-i)/2)+t.vGap.top,n.max.x=e>Ne.x?Math.round(Ne.x-e):n.center.x,n.max.y=i>Ne.y?Math.round(Ne.y-i)+t.vGap.top:n.center.y,n.min.x=e>Ne.x?0:n.center.x,n.min.y=i>Ne.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,o,a){e.loadError||n&&(e.imageAppended=!0,Ze(e,n,e===s.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=o.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),o=i?t.h:Math.round(t.h*t.fitRatio);t.placeholder&&!t.loaded&&(t.placeholder.style.width=n+"px",t.placeholder.style.height=o+"px"),e.style.width=n+"px",e.style.height=o+"px"}},Qe=function(){if(Ge.length){for(var t,e=0;e=0,o=Math.min(i[0],je()),r=Math.min(i[1],je());for(e=1;e<=(n?r:o);e++)s.lazyLoadItem(c+e);for(e=1;e<=(n?o:r);e++)s.lazyLoadItem(c-e)})),St("initialLayout",(function(){s.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!==He[t]&&He[t]},allowProgressiveImg:function(){return a.forceProgressiveLoading||!E||a.mouseUsed||screen.width>1200},setContent:function(t,e){a.loop&&(e=xt(e));var i=s.getItemAt(t.index);i&&(i.container=null);var n,l=s.getItemAt(e);if(l){kt("gettingData",e,l),t.index=e,t.item=l;var d=l.container=o.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=o.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&&s.updateCurrZoomItem());i.imageAppended?!Re&&i.placeholder&&(i.placeholder.style.display="none",i.placeholder=null):H.transform&&(it||Re)?Ge.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,kt("imageLoadComplete",e,i)}},o.features.transform){var h="pswp__img pswp__img--placeholder";h+=l.msrc?"":" pswp__img--placeholder--blank";var u=o.createEl(h,l.msrc?"img":"");l.msrc&&(u.src=l.msrc),Ze(l,u),d.appendChild(u),l.placeholder=u}l.loading||Ve(l),s.allowProgressiveImg()&&(!Be&&H.transform?Ge.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,$e(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"),o={origEvent:t,target:t.target,releasePoint:e,pointerType:i||"touch"};n.initCustomEvent("pswpTap",!0,!0,o),t.target.dispatchEvent(n)};Ct("Tap",{publicMethods:{initTap:function(){St("firstTouchStart",s.onTapStart),St("touchRelease",s.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 kt("doubleTap",i);if("mouse"===e.type)return void ei(t,e,"mouse");if("BUTTON"===t.target.tagName.toUpperCase()||o.hasClass(t.target,"pswp__single-tap"))return void ei(t,e);At(ti,i),Ke=setTimeout((function(){ei(t,e),Ke=null}),300)}}}}),Ct("DesktopZoom",{publicMethods:{initDesktopZoom:function(){M||(E?St("mouseUsed",(function(){s.setupDesktopZoom()})):s.setupDesktopZoom(!0))},setupDesktopZoom:function(e){Je={};var i="wheel mousewheel DOMMouseScroll";St("bindEvents",(function(){o.bind(t,i,s.handleMouseWheel)})),St("unbindEvents",(function(){Je&&o.unbind(t,i,s.handleMouseWheel)})),s.mouseZoomedIn=!1;var n,a=function(){s.mouseZoomedIn&&(o.removeClass(t,"pswp--zoomed-in"),s.mouseZoomedIn=!1),g<1?o.addClass(t,"pswp--zoom-allowed"):o.removeClass(t,"pswp--zoom-allowed"),r()},r=function(){n&&(o.removeClass(t,"pswp--dragging"),n=!1)};St("resize",a),St("afterChange",a),St("pointerDown",(function(){s.mouseZoomedIn&&(n=!0,o.addClass(t,"pswp--dragging"))})),St("pointerUp",r),e||a()},handleMouseWheel:function(t){if(g<=s.currItem.fitRatio)return a.modal&&(!a.closeOnScroll||qt||Y?t.preventDefault():z&&Math.abs(t.deltaY)>2&&(d=!0,s.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(),s.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,s.currItem),n=g===i;s.mouseZoomedIn=!n,s.zoomTo(n?s.currItem.initialZoomLevel:i,e,333),o[(n?"remove":"add")+"Class"](t,"pswp--zoomed-in")}}});var ii,ni,oi,si,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),oi&&clearTimeout(oi)},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&&o.bind(window,"hashchange",s.onHashChange)}),40)}},onHashChange:function(){return mi()===li?(ci=!0,void s.close()):void(si||(ai=!0,s.goTo(vi().pid),ai=!1))},updateURL:function(){gi(),ai||(di?ii=setTimeout(wi,800):wi())}}}),o.extend(s,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,o,s,a,r,l,d,c,h,u,p,f,m,g,v,w,y,b=this,C=!1,x=!0,_=!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},k=function(t){if(v)return!0;t=t||window.event,g.timeToIdle&&g.mouseUsed&&!c&&M();for(var i,n,o=(t.target||t.srcElement).getAttribute("class")||"",s=0;s-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)}},T=function(){return!t.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},I=function(t,i,n){e[(n?"add":"remove")+"Class"](t,"pswp__"+i)},z=function(){var t=1===g.getNumItemsFn();t!==m&&(I(n,"ui--one-slide",t),m=t)},L=function(){I(l,"share-modal--hidden",_)},E=function(){return(_=!_)?(e.removeClass(l,"pswp__share-modal--fade-in"),setTimeout((function(){_&&L()}),300)):(L(),setTimeout((function(){_||e.addClass(l,"pswp__share-modal--fade-in")}),30)),_||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)),_||E(),1))},P=function(){for(var t,e,i,n,o="",s=0;s