/*! PhotoSwipe - v4.1.3 - 2019-01-08 * http://photoswipe.com * Copyright (c) 2019 Dmitry Semenov; */ !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(m,z,t,e){var _,N,U,p,H,Y,W,B,i,f,G,X,V,K,q,r,$,j,J,Q,ee,te,ne,o,ie,oe,ae,re,le,se,l,ce,ue,de,me,pe,fe,he,s,ye,xe,ge,ve,we,c,u,be,d,Ie,h,Ce,De,Te,Me,Se,Ae,y={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;ax.currItem.fitRatio?ze||(sn(x.currItem,!1,!0),ze=!0):ze&&(sn(x.currItem),ze=!1)),He(Ie,v.x,v.y,f))},Ye=function(e){e.container&&He(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},We=function(e,t){t[te]=X+e+"px, 0px"+V},Be=function(e,t){var n;!g.loop&&t&&(t=p+(b.x*Re-e)/b.x,n=Math.round(e-R.x),(t<0&&0=P()-1&&n<0)&&(e=R.x+n*g.mainScrollEndFriction)),R.x=e,We(e,H)},Ge=function(e,t){var n=vt[e]-Pe[e];return ke[e]+Oe[e]+n-t/G*n},S=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Xe=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Ve=null,Ke=function(){Ve&&(y.unbind(document,"mousemove",Ke),y.addClass(m,"pswp--has_mouse"),g.mouseUsed=!0,C("mouseUsed")),Ve=setTimeout(function(){Ve=null},100)},qe=function(e,t){e=on(x.currItem,w,e);return t&&(d=e),e},$e=function(e){return(e=e||x.currItem).initialZoomLevel},je=function(e){return 0<(e=e||x.currItem).w?g.maxSpreadZoom:1},Je=function(e,t,n,i){return i===x.currItem.initialZoomLevel?(n[e]=x.currItem.initialPosition[e],!0):(n[e]=Ge(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]=P())&&(p=0),x.currItem=jt(p),(l.isOldIOSPhone||l.isOldAndroid)&&(Ze=!1),m.setAttribute("aria-hidden","false"),g.modal&&(Ze?m.style.position="fixed":(m.style.position="absolute",m.style.top=y.getScrollY()+"px")),se===undefined&&(C("initialLayout"),se=re=y.getScrollY());var n="pswp--open ";for(g.mainClass&&(n+=g.mainClass+" "),g.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=o?"pswp--touch":"pswp--notouch")+(l.animationName?" pswp--css_animation":""))+(l.svg?" pswp--svg":""),y.addClass(m,n),x.updateSize(),Y=-1,I=null,e=0;e<3;e++)We((e+Y)*b.x,r[e].el.style);le||y.bind(x.scrollWrap,B,x),a("initialZoomInEnd",function(){x.setContent(r[0],p-1),x.setContent(r[2],p+1),r[0].el.style.display=r[2].el.style.display="block",g.focus&&m.focus(),y.bind(document,"keydown",x),l.transform&&y.bind(x.scrollWrap,"click",x),g.mouseUsed||y.bind(document,"mousemove",Ke),y.bind(window,"resize scroll orientationchange",x),C("bindEvents")}),x.setContent(r[1],p),x.updateCurrItem(),C("afterInit"),Ze||(K=setInterval(function(){nt||s||u||f!==x.currItem.initialZoomLevel||x.updateSize()},1e3)),y.addClass(m,"pswp--visible")}},close:function(){_&&(N=!(_=!1),C("close"),y.unbind(window,"resize scroll orientationchange",x),y.unbind(window,"scroll",i.scroll),y.unbind(document,"keydown",x),y.unbind(document,"mousemove",Ke),l.transform&&y.unbind(x.scrollWrap,"click",x),s&&y.unbind(window,W,x),clearTimeout(ce),C("unbindEvents"),Jt(x.currItem,null,!0,x.destroy))},destroy:function(){C("destroy"),Vt&&clearTimeout(Vt),m.setAttribute("aria-hidden","true"),m.className=ae,K&&clearInterval(K),y.unbind(x.scrollWrap,B,x),y.unbind(window,"scroll",x),Ct(),at(),Ue=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:ed.min.y?t=d.min.y:td.min[e]||ad.min[e]&&(c=g.panEndFriction,d.min[e],n=d.min[e]-ke[e]),(n<=0||s<0)&&1pt.x&&(o=pt.x)):d.min.x!==d.max.x&&(i=a)):(ax.currItem.fitRatio&&(v[e]+=t[e]*c)},_t=function(e){var t;"mousedown"===e.type&&0=ct&&(Ce=0x.currItem.initialZoomLevel+x.currItem.initialZoomLevel/15&&(Se=!0),t=1,n=$e(),i=je(),e=ct&&(O.x-=c[0].x-dt.x),Math.abs(O.y)>=ct&&(O.y-=c[0].y-dt.y)),k.x=E.x,k.y=E.y,0!==O.x||0!==O.y)){if("v"===Ce&&g.closeOnVerticalDrag)if(!Tt())return Oe.y+=O.y,v.y+=O.y,o=Rt(),fe=!0,C("onVerticalDrag",o),T(o),void M();kt(D(),E.x,E.y),ge=!0,d=x.currItem.bounds,zt("x",O)||(zt("y",O),Xe(v),M())}}},Ht=function(e){if(l.isOldAndroid){if(he&&"mouseup"===e.type)return;-1x.currItem.fitRatio&&Wt(me))}},Yt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1d.min[t]?i.backAnimDestination[t]=d.min[t]:v[t]=P()&&(p=g.loop?0:P()-1,o=!0),o&&!g.loop||(I+=i,Re-=i,n=!0));var n,i,o,e=b.x*Re,a=Math.abs(e-R.x),r=n||e>R.x==0The image could not be loaded.',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Kt.length}},tn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},nn=function(e,t,n){var i=e.bounds;i.center.x=Math.round((Z.x-t)/2),i.center.y=Math.round((Z.y-n)/2)+e.vGap.top,i.max.x=t>Z.x?Math.round(Z.x-t):i.center.x,i.max.y=n>Z.y?Math.round(Z.y-n)+e.vGap.top:i.center.y,i.min.x=t>Z.x?0:i.center.x,i.min.y=n>Z.y?e.vGap.top:i.center.y},on=function(e,t,n){var i,o;return!e.src||e.loadError?(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=tn(),e.initialPosition=e.bounds.center,e.bounds):((i=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),C("parseVerticalMargin",e)),Z.x=t.x,Z.y=t.y-e.vGap.top-e.vGap.bottom,i&&(t=Z.x/e.w,o=Z.y/e.h,e.fitRatio=t=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),x.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:w.x/2+Pe.x,y:w.y/2+Pe.y};var t=g.getDoubleTapZoom(!0,x.currItem),n=f===t;x.mouseZoomedIn=!n,x.zoomTo(n?x.currItem.initialZoomLevel:t,e,333),y[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}}),{history:!0,galleryUID:1}),Dn=function(){return L.hash.substring(1)},Tn=function(){dn&&clearTimeout(dn),pn&&clearTimeout(pn)},Mn=function(){var e=Dn(),t={};if(!(e.length<5)){var n,i=e.split("&");for(a=0;a