1!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(e,t,i,o){var r={features:null,bind:function(e,t,i,o){var r=(o?"remove":"add")+"EventListener";t=t.split(" ");for(var l=0;l<t.length;l++)t[l]&&e[r](t[l],i,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var i=document.createElement(t||"div");return e&&(i.className=e),i},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,i){r.bind(e,t,i,!0)},removeClass:function(e,t){var i=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){r.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var i=e.firstChild;i;){if(r.hasClass(i,t))return i;i=i.nextSibling}},arraySearch:function(e,t,i){for(var o=e.length;o--;)if(e[o][i]===t)return o;return-1},extend:function(e,t,i){for(var o in t)if(t.hasOwnProperty(o)){if(i&&e.hasOwnProperty(o))continue;e[o]=t[o]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(r.features)return r.features;var e=r.createEl().style,t="",i={};if(i.oldIE=document.all&&!document.addEventListener,i.touch="ontouchstart"in window,window.requestAnimationFrame&&(i.raf=window.requestAnimationFrame,i.caf=window.cancelAnimationFrame),i.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!i.pointerEvent){var o=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var l=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);l&&l.length>0&&((l=parseInt(l[1],10))>=1&&8>l&&(i.isOldIOSPhone=!0))}var s=o.match(/Android\s([0-9\.]*)/),u=s?s[1]:0;(u=parseFloat(u))>=1&&(4.4>u&&(i.isOldAndroid=!0),i.androidVersion=u),i.isMobileOpera=/opera mini|o
1pera mobi/i.test(o)}for(var d,p,m=["transform","perspective","animationName"],f=["","webkit","Moz","ms","O"],y=0;4>y;y++){t=f[y];for(var x=0;3>x;x++)d=m[x],p=t+(t?d.charAt(0).toUpperCase()+d.slice(1):d),!i[d]&&p in e&&(i[d]=p);t&&!i.raf&&(t=t.toLowerCase(),i.raf=window[t+"RequestAnimationFrame"],i.raf&&(i.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}if(!i.raf){var v=0;i.raf=function(e){var t=(new Date).getTime(),i=Math.max(0,16-(t-v)),o=window.setTimeout((function(){e(t+i)}),i);return v=t+i,o},i.caf=function(e){clearTimeout(e)}}return i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r.features=i,i}};r.detectFeatures(),r.features.oldIE&&(r.bind=function(e,t,i,o){t=t.split(" ");for(var r,l=(o?"detach":"attach")+"Event",g=function(){i.handleEvent.call(i)},s=0;s<t.length;s++)if(r=t[s])if("object"==typeof i&&i.handleEvent){if(o){if(!i["oldIE"+r])return!1}else i["oldIE"+r]=g;e[l]("on"+r,i["oldIE"+r])}else e[l]("on"+r,i)});var l=this,s={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};r.extend(s,o);var u,d,p,m,f,y,x,v,w,b,I,C,D,M,T,S,A,E,O,R,Z,P,F,L,_,z,N,U,H,Y,B,W,G,X,V,K,q,$,J,Q,ee,te,ne,ie,oe,ae,re,le,se,ue,ce,de,pe,me,fe,he={x:0,y:0},ye={x:0,y:0},xe={x:0,y:0},ve={},ge=0,we={},be={x:0,y:0},Ie=0,Ce=!0,De=[],Me={},Te=!1,ya=function(e,t){r.extend(l,t.publicMethods),De.push(e)},za=function(e){var t=nt();return e>t-1?e-t:0>e?t+e:e},Se={},Ba=function(e,t){return Se[e]||(Se[e]=[]),Se[e].push(t)},Ca=function(e){var t=Se[e];if(t){var i=Array.prototype.slice.call(arguments);i.shift();for(var o=0;o<t.length;o++)t[o].apply(l,i)}},Da=function(){return(new Date).getTime()},Ea=function(e){pe=e,l.bg.style.opacity=e*s.bgOpacity},Fa=function(e,t,i,o,r){(!Te||r&&r!==l.currItem)&&(o/=r?r.fitRatio:l.currItem.fitRatio),e[P]=C+t+"px, "+i+"px"+D+" scale("+o+")"},Ga=function(e){le&&(e&&(b>l.currItem.fitRatio?Te||(lc(l.currItem,!1,!0),Te=!0):Te&&(lc(l.currItem),Te=!1)),Fa(le,xe.x,xe.y,b))},Ha=function(e){e.container&&Fa(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Ia=function(e,t){t[P]=C+e+"px, 0px"+D},Ja=function(e,t){if(!s.loop&&t){var i=m+(be.x*ge-e)/be.x,o=Math.round(e-We.x);(0>i&&o>0||i>=nt()-1&&0>o)&&(e=We.x+o*s.mainScrollEndFriction)}We.x=e,Ia(e,f)},Ka=function(e,t){var i=Ge[e]-we[e];return ye[e]+he[e]+i-i*(t/I)},La=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Ma=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Ae=null,Oa=function(){Ae&&(r.unbind(document,"mousemove",Oa),r.addClass(e,"pswp--has_mouse"),s.mouseUsed=!0,Ca("mouseUsed")),Ae=setTimeout((function(){Ae=null}),100)},Ra=function(e,t){var i=hc(l.currItem,ve,e);return t&&(re=i),i},Sa=function(e){return e||(e=l.currItem),e.initialZoomLevel},Ta=function(e){return e||(e=l.currItem),e.w>0?s.maxSpreadZoom:1},Ua=function(e,t,i,o){return o===l.currItem.initialZoomLevel?(i[e]=l.currItem.initialPosition[e],!0):(i[e]=Ka(e,o),i[e]>t.min[e]?(i[e]=t.min[e],!0):i[e]<t.max[e]&&(i[e]=t.max[e],!0))},Wa=function(e){var t="";s.escKey&&27===e.keyCode?t="close":s.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,l[t]()))},Xa=function(e){e&&(ee||Q||se||K)&&(e.preventDefault(),e.stopPropagation())},Ya=function(){l.setScrollOffset(0,r.getScrollY())},Ee={},Oe=0,_a=function(e){Ee[e]&&(Ee[e].raf&&z(Ee[e].raf),Oe--,delete Ee[e])},ab=function(e){Ee[e]&&_a(e),Ee[e]||(Oe++,Ee[e]={})},bb=function(){for(var e in Ee)Ee.hasOwnProperty(e)&&_a(e)},cb=function(e,t,i,o,r,l,s){var u,d=Da();ab(e);var j=function(){if(Ee[e]){if((u=Da()-d)>=o)return _a(e),l(i),void(s&&s());l((i-t)*r(u/o)+t),Ee[e].raf=_(j)}};j()},ke={shout:Ca,listen:Ba,viewportSize:ve,options:s,isMainScrollAnimating:function(){return se},getZoomLevel:function(){return b},getCurrentIndex:function(){return m},isDragging:function(){return $},isZooming:function(){return oe},setScrollOffset:function(e,t){we.x=e,Y=we.y=t,Ca("updateScrollOffset",we)},applyZoomPan:function(e,t,i,o){xe.x=t,xe.y=i,b=e,Ga(o)},init:function(){if(!u&&!d){var i;l.framework=r,l.template=e,l.bg=r.getChildByClass(e,"pswp__bg"),N=e.className,u=!0,B=r.detectFeatures(),_=B.raf,z=B.caf,P=B.transform,H=B.oldIE,l.scrollWrap=r.getChildByClass(e,"pswp__scroll-wrap"),l.container=r.getChildByClass(l.scrollWrap,"pswp__container"),f=l.container.style,l.itemHolders=S=[{el:l.container.children[0],wrap:0,index:-1},{el:l.container.children[1],wrap:0,index:-1},{el:l.container.children[2],wrap:0,index:-1}],S[0].el.style.display=S[2].el.style.display="none",function(){if(P){var t=B.perspective&&!L;return C="translate"+(t?"3d(":"("),void(D=B.perspective?", 0px)":")")}P="left",r.addClass(e,"pswp--ie"),Ia=function(e,t){t.left=e+"px"},Ha=function(e){var t=e.fitRatio>1?1:e.fitRatio,i=e.container.style,o=t*e.w,r=t*e.h;i.width=o+"px",i.height=r+"px",i.left=e.initialPosition.x+"px",i.top=e.initialPosition.y+"px"},Ga=function(){if(le){var e=le,t=l.currItem,i=t.fitRatio>1?1:t.fitRatio,o=i*t.w,r=i*t.h;e.width=o+"px",e.height=r+"px",e.left=xe.x+"px",e.top=xe.y+"px"}}}(),w={resize:l.updateSize,scroll:Ya,keydown:Wa,click:Xa};var o=B.isOldIOSPhone||B.isOldAndroid||B.isMobileOpera;for(B.animationName&&B.transform&&!o||(s.showAnimationDuration=s.hideAnimationDuration=0),i=0;i<De.length;i++)l["init"+De[i]]();if(t)(l.ui=new t(l,r)).init();Ca("firstUpdate"),m=m||s.index||0,(isNaN(m)||0>m||m>
1=nt())&&(m=0),l.currItem=tt(m),(B.isOldIOSPhone||B.isOldAndroid)&&(Ce=!1),e.setAttribute("aria-hidden","false"),s.modal&&(Ce?e.style.position="fixed":(e.style.position="absolute",e.style.top=r.getScrollY()+"px")),void 0===Y&&(Ca("initialLayout"),Y=U=r.getScrollY());var p="pswp--open ";for(s.mainClass&&(p+=s.mainClass+" "),s.showHideOpacity&&(p+="pswp--animate_opacity "),p+=L?"pswp--touch":"pswp--notouch",p+=B.animationName?" pswp--css_animation":"",p+=B.svg?" pswp--svg":"",r.addClass(e,p),l.updateSize(),y=-1,Ie=null,i=0;3>i;i++)Ia((i+y)*be.x,S[i].el.style);H||r.bind(l.scrollWrap,v,l),Ba("initialZoomInEnd",(function(){l.setContent(S[0],m-1),l.setContent(S[2],m+1),S[0].el.style.display=S[2].el.style.display="block",s.focus&&e.focus(),r.bind(document,"keydown",l),B.transform&&r.bind(l.scrollWrap,"click",l),s.mouseUsed||r.bind(document,"mousemove",Oa),r.bind(window,"resize scroll",l),Ca("bindEvents")})),l.setContent(S[1],m),l.updateCurrItem(),Ca("afterInit"),Ce||(M=setInterval((function(){Oe||$||oe||b!==l.currItem.initialZoomLevel||l.updateSize()}),1e3)),r.addClass(e,"pswp--visible")}},close:function(){u&&(u=!1,d=!0,Ca("close"),r.unbind(window,"resize",l),r.unbind(window,"scroll",w.scroll),r.unbind(document,"keydown",l),r.unbind(document,"mousemove",Oa),B.transform&&r.unbind(l.scrollWrap,"click",l),$&&r.unbind(window,x,l),Ca("unbindEvents"),bc(l.currItem,null,!0,l.destroy))},destroy:function(){Ca("destroy"),je&&clearTimeout(je),e.setAttribute("aria-hidden","true"),e.className=N,M&&clearInterval(M),r.unbind(l.scrollWrap,v,l),r.unbind(window,"scroll",l),yb(),bb(),Se=null},panTo:function(e,t,i){i||(e>re.min.x?e=re.min.x:e<re.max.x&&(e=re.max.x),t>re.min.y?t=re.min.y:t<re.max.y&&(t=re.max.y)),xe.x=e,xe.y=t,Ga()},handleEvent:function(e){e=e||window.event,w[e.type]&&w[e.type](e)},goTo:function(e){var t=(e=za(e))-m;Ie=t,m=e,l.currItem=tt(m),ge-=t,Ja(be.x*ge),bb(),se=!1,l.updateCurrItem()},next:function(){l.goTo(m+1)},prev:function(){l.goTo(m-1)},updateCurrZoomItem:function(e){if(e&&Ca("beforeChange",0),S[1].el.children.length){var t=S[1].el.children[0];le=r.hasClass(t,"pswp__zoom-wrap")?t.style:null}else le=null;re=l.currItem.bounds,I=b=l.currItem.initialZoomLevel,xe.x=re.center.x,xe.y=re.center.y,e&&Ca("afterChange")},invalidateCurrItems:function(){T=!0;for(var e=0;3>e;e++)S[e].item&&(S[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==Ie){var t,i=Math.abs(Ie);if(!(e&&2>i)){l.currItem=tt(m),Te=!1,Ca("beforeChange",Ie),i>=3&&(y+=Ie+(Ie>0?-3:3),i=3);for(var o=0;i>o;o++)Ie>0?(t=S.shift(),S[2]=t,y++,Ia((y+2)*be.x,t.el.style),l.setContent(t,m-i+o+1+1)):(t=S.pop(),S.unshift(t),y--,Ia(y*be.x,t.el.style),l.setContent(t,m+i-o-1-1));if(le&&1===Math.abs(Ie)){var r=tt(A);r.initialZoomLevel!==b&&(hc(r,ve),lc(r),Ha(r))}Ie=0,l.updateCurrZoomItem(),A=m,Ca("afterChange")}}},updateSize:function(t){if(!Ce&&s.modal){var i=r.getScrollY();if(Y!==i&&(e.style.top=i+"px",Y=i),!t&&Me.x===window.innerWidth&&Me.y===window.innerHeight)return;Me.x=window.innerWidth,Me.y=window.innerHeight,e.style.height=Me.y+"px"}if(ve.x=l.scrollWrap.clientWidth,ve.y=l.scrollWrap.clientHeight,Ya(),be.x=ve.x+Math.round(ve.x*s.spacing),be.y=ve.y,Ja(be.x*ge),Ca("beforeResize"),void 0!==y){for(var o,u,d,p=0;3>p;p++)o=S[p],Ia((p+y)*be.x,o.el.style),d=m+p-1,s.loop&&nt()>2&&(d=za(d)),(u=tt(d))&&(T||u.needsUpdate||!u.bounds)?(l.cleanSlide(u),l.setContent(o,d),1===p&&(l.currItem=u,l.updateCurrZoomItem(!0)),u.needsUpdate=!1):-1===o.index&&d>=0&&l.setContent(o,d),u&&u.container&&(hc(u,ve),lc(u),Ha(u));T=!1}I=b=l.currItem.initialZoomLevel,(re=l.currItem.bounds)&&(xe.x=re.center.x,xe.y=re.center.y,Ga(!0)),Ca("resize")},zoomTo:function(e,t,i,o,l){t&&(I=b,Ge.x=Math.abs(t.x)-xe.x,Ge.y=Math.abs(t.y)-xe.y,La(ye,xe));var s=Ra(e,!1),u={};Ua("x",s,u,e),Ua("y",s,u,e);var d=b,p=xe.x,m=xe.y;Ma(u);var k=function(t){1===t?(b=e,xe.x=u.x,xe.y=u.y):(b=(e-d)*t+d,xe.x=(u.x-p)*t+p,xe.y=(u.y-m)*t+m),l&&l(t),Ga(1===t)};i?cb("customZoomTo",0,1,i,o||r.easing.sine.inOut,k):k(1)}},Re={},Ze={},Pe={},Fe={},Le={},_e=[],ze={},Ne=[],Ue={},He=0,Ye={x:0,y:0},Be=0,We={x:0,y:0},Ge={x:0,y:0},Xe={x:0,y:0},xb=function(e,t){return Ue.x=Math.abs(e.x-t.x),Ue.y=Math.abs(e.y-t.y),Math.sqrt(Ue.x*Ue.x+Ue.y*Ue.y)},yb=function(){te&&(z(te),te=null)},zb=function(){$&&(te=_(zb),Pb())},Bb=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:Bb(e.parentNode,t)))},Ve={},Db=function(e,t){return Ve.prevent=!Bb(e.target,s.isClickableElement),Ca("preventDragEvent",e,t,Ve),Ve.prevent},Eb=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Fb=function(e,t,i){i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y)},Hb=function(){var e=xe.y-l.currItem.initialPosition.y;return 1-Math.abs(e/(ve.y/2))},Ke={},qe={},$e=[],Lb=function(e){for(;$e.length>0;)$e.pop();return F?(fe=0,_e.forEach((function(e){0===fe?$e[0]=e:1===fe&&($e[1]=e),fe++}))):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&($e[0]=Eb(e.touches[0],Ke),e.touches.length>1&&($e[1]=Eb(e.touches[1],qe))):(Ke.x=e.pageX,Ke.y=e.pageY,Ke.id="",$e[0]=Ke),$e},Mb=function(e,t){var i,o,r,u,d=xe[e]+t[e],p=t[e]>0,m=We.x+t.x,f=We.x-ze.x;return i=d>
1re.min[e]||d<re.max[e]?s.panEndFriction:1,d=xe[e]+t[e]*i,!s.allowPanToNext&&b!==l.currItem.initialZoomLevel||(le?"h"!==ue||"x"!==e||Q||(p?(d>re.min[e]&&(i=s.panEndFriction,re.min[e]-d,o=re.min[e]-ye[e]),(0>=o||0>f)&&nt()>1?(u=m,0>f&&m>ze.x&&(u=ze.x)):re.min.x!==re.max.x&&(r=d)):(d<re.max[e]&&(i=s.panEndFriction,d-re.max[e],o=ye[e]-re.max[e]),(0>=o||f>0)&&nt()>1?(u=m,f>0&&m<ze.x&&(u=ze.x)):re.min.x!==re.max.x&&(r=d))):u=m,"x"!==e)?void(se||ne||b>l.currItem.fitRatio&&(xe[e]+=t[e]*i)):(void 0!==u&&(Ja(u,!0),ne=u!==ze.x),re.min.x!==re.max.x&&(void 0!==r?xe.x=r:ne||(xe.x+=t.x*i)),void 0!==u)},Nb=function(e){if(!("mousedown"===e.type&&e.button>0)){if(et)return void e.preventDefault();if(!q||"mousedown"!==e.type){if(Db(e,!0)&&e.preventDefault(),Ca("pointerDown"),F){var t=r.arraySearch(_e,e.pointerId,"id");0>t&&(t=_e.length),_e[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var i=Lb(e),o=i.length;ie=null,bb(),$&&1!==o||($=ce=!0,r.bind(window,x,l),V=me=de=K=ne=ee=J=Q=!1,ue=null,Ca("firstTouchStart",i),La(ye,xe),he.x=he.y=0,La(Fe,i[0]),La(Le,Fe),ze.x=be.x*ge,Ne=[{x:Fe.x,y:Fe.y}],G=W=Da(),Ra(b,!0),yb(),zb()),!oe&&o>1&&!se&&!ne&&(I=b,Q=!1,oe=J=!0,he.y=he.x=0,La(ye,xe),La(Re,i[0]),La(Ze,i[1]),Fb(Re,Ze,Xe),Ge.x=Math.abs(Xe.x)-xe.x,Ge.y=Math.abs(Xe.y)-xe.y,ae=xb(Re,Ze))}}},Ob=function(e){if(e.preventDefault(),F){var t=r.arraySearch(_e,e.pointerId,"id");if(t>-1){var i=_e[t];i.x=e.pageX,i.y=e.pageY}}if($){var o=Lb(e);if(ue||ee||oe)ie=o;else if(We.x!==be.x*ge)ue="h";else{var l=Math.abs(o[0].x-Fe.x)-Math.abs(o[0].y-Fe.y);Math.abs(l)>=10&&(ue=l>0?"h":"v",ie=o)}}},Pb=function(){if(ie){var e=ie.length;if(0!==e)if(La(Re,ie[0]),Pe.x=Re.x-Fe.x,Pe.y=Re.y-Fe.y,oe&&e>1){if(Fe.x=Re.x,Fe.y=Re.y,!Pe.x&&!Pe.y&&function(e,t){return e.x===t.x&&e.y===t.y}(ie[1],Ze))return;La(Ze,ie[1]),Q||(Q=!0,Ca("zoomGestureStarted"));var t=xb(Re,Ze),i=Ub(t);i>l.currItem.initialZoomLevel+l.currItem.initialZoomLevel/15&&(me=!0);var o=1,r=Sa(),u=Ta();if(r>i)if(s.pinchToClose&&!me&&I<=l.currItem.initialZoomLevel){var d=1-(r-i)/(r/1.2);Ea(d),Ca("onPinchClose",d),de=!0}else(o=(r-i)/r)>1&&(o=1),i=r-o*(r/3);else i>u&&((o=(i-u)/(6*r))>1&&(o=1),i=u+o*r);0>o&&(o=0),Fb(Re,Ze,Ye),he.x+=Ye.x-Xe.x,he.y+=Ye.y-Xe.y,La(Xe,Ye),xe.x=Ka("x",i),xe.y=Ka("y",i),V=i>b,b=i,Ga()}else{if(!ue)return;if(ce&&(ce=!1,Math.abs(Pe.x)>=10&&(Pe.x-=ie[0].x-Le.x),Math.abs(Pe.y)>=10&&(Pe.y-=ie[0].y-Le.y)),Fe.x=Re.x,Fe.y=Re.y,0===Pe.x&&0===Pe.y)return;if("v"===ue&&s.closeOnVerticalDrag&&"fit"===s.scaleMode&&b===l.currItem.initialZoomLevel){he.y+=Pe.y,xe.y+=Pe.y;var p=Hb();return K=!0,Ca("onVerticalDrag",p),Ea(p),void Ga()}(function(e,t,i){if(e-G>50){var o=Ne.length>2?Ne.shift():{};o.x=t,o.y=i,Ne.push(o),G=e}})(Da(),Re.x,Re.y),ee=!0,re=l.currItem.bounds,Mb("x",Pe)||(Mb("y",Pe),Ma(xe),Ga())}}},Qb=function(e){if(B.isOldAndroid){if(q&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(q),q=setTimeout((function(){q=0}),600))}var t;if(Ca("pointerUp"),Db(e,!1)&&e.preventDefault(),F){var i=r.arraySearch(_e,e.pointerId,"id");if(i>-1)if(t=_e.splice(i,1)[0],navigator.pointerEnabled)t.type=e.pointerType||"mouse";else{t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}}var o,u=Lb(e),d=u.length;if("mouseup"===e.type&&(d=0),2===d)return ie=null,!0;1===d&&La(Le,u[0]),0!==d||ue||se||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Ca("touchRelease",e,t));var p=-1;if(0===d&&($=!1,r.unbind(window,x,l),yb(),oe?p=0:-1!==Be&&(p=Da()-Be)),Be=1===d?Da():-1,o=-1!==p&&150>p?"zoom":"swipe",oe&&2>d&&(oe=!1,1===d&&(o="zoomPointerUp"),Ca("zoomGestureEnded")),ie=null,ee||Q||se||K)if(bb(),X||(X=Rb()),X.calculateSwipeSpeed("x"),K){if(Hb()<s.verticalDragRange)l.close();else{var m=xe.y,f=pe;cb("verticalDrag",0,1,300,r.easing.cubic.out,(function(e){xe.y=(l.currItem.initialPosition.y-m)*e+m,Ea((1-f)*e+f),Ga()})),Ca("onVerticalDrag",1)}}else{if((ne||se)&&0===d){if(Tb(o,X))return;o="zoomPointerUp"}if(!se)return"swipe"!==o?void Vb():void(!ne&&b>l.currItem.fitRatio&&Sb(X))}},Rb=function(){var e,t,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{}
1,backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(o){Ne.length>1?(e=Da()-G+50,t=Ne[Ne.length-2][o]):(e=Da()-W,t=Le[o]),i.lastFlickOffset[o]=Fe[o]-t,i.lastFlickDist[o]=Math.abs(i.lastFlickOffset[o]),i.lastFlickDist[o]>20?i.lastFlickSpeed[o]=i.lastFlickOffset[o]/e:i.lastFlickSpeed[o]=0,Math.abs(i.lastFlickSpeed[o])<.1&&(i.lastFlickSpeed[o]=0),i.slowDownRatio[o]=.95,i.slowDownRatioReverse[o]=1-i.slowDownRatio[o],i.speedDecelerationRatio[o]=1},calculateOverBoundsAnimOffset:function(e,t){i.backAnimStarted[e]||(xe[e]>re.min[e]?i.backAnimDestination[e]=re.min[e]:xe[e]<re.max[e]&&(i.backAnimDestination[e]=re.max[e]),void 0!==i.backAnimDestination[e]&&(i.slowDownRatio[e]=.7,i.slowDownRatioReverse[e]=1-i.slowDownRatio[e],i.speedDecelerationRatioAbs[e]<.05&&(i.lastFlickSpeed[e]=0,i.backAnimStarted[e]=!0,cb("bounceZoomPan"+e,xe[e],i.backAnimDestination[e],t||300,r.easing.sine.out,(function(t){xe[e]=t,Ga()})))))},calculateAnimOffset:function(e){i.backAnimStarted[e]||(i.speedDecelerationRatio[e]=i.speedDecelerationRatio[e]*(i.slowDownRatio[e]+i.slowDownRatioReverse[e]-i.slowDownRatioReverse[e]*i.timeDiff/10),i.speedDecelerationRatioAbs[e]=Math.abs(i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]),i.distanceOffset[e]=i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]*i.timeDiff,xe[e]+=i.distanceOffset[e])},panAnimLoop:function(){return Ee.zoomPan&&(Ee.zoomPan.raf=_(i.panAnimLoop),i.now=Da(),i.timeDiff=i.now-i.lastNow,i.lastNow=i.now,i.calculateAnimOffset("x"),i.calculateAnimOffset("y"),Ga(),i.calculateOverBoundsAnimOffset("x"),i.calculateOverBoundsAnimOffset("y"),i.speedDecelerationRatioAbs.x<.05&&i.speedDecelerationRatioAbs.y<.05)?(xe.x=Math.round(xe.x),xe.y=Math.round(xe.y),Ga(),void _a("zoomPan")):void 0}};return i},Sb=function(e){return e.calculateSwipeSpeed("y"),re=l.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(ab("zoomPan"),e.lastNow=Da(),void e.panAnimLoop())},Tb=function(e,t){var i,o,u;if(se||(He=m),"swipe"===e){var d=Fe.x-Le.x,p=t.lastFlickDist.x<10;d>30&&(p||t.lastFlickOffset.x>20)?o=-1:-30>d&&(p||t.lastFlickOffset.x<-20)&&(o=1)}o&&(0>(m+=o)?(m=s.loop?nt()-1:0,u=!0):m>=nt()&&(m=s.loop?0:nt()-1,u=!0),(!u||s.loop)&&(Ie+=o,ge-=o,i=!0));var f,y=be.x*ge,x=Math.abs(y-We.x);return i||y>We.x==t.lastFlickSpeed.x>0?(f=Math.abs(t.lastFlickSpeed.x)>0?x/Math.abs(t.lastFlickSpeed.x):333,f=Math.min(f,400),f=Math.max(f,250)):f=333,He===m&&(i=!1),se=!0,Ca("mainScrollAnimStart"),cb("mainScroll",We.x,y,f,r.easing.cubic.out,Ja,(function(){bb(),se=!1,He=-1,(i||He!==m)&&l.updateCurrItem(),Ca("mainScrollAnimComplete")})),i&&l.updateCurrItem(!0),i},Ub=function(e){return 1/ae*e*I},Vb=function(){var e=b,t=Sa(),i=Ta();t>b?e=t:b>i&&(e=i);var o,s=pe;return de&&!V&&!me&&t>b?(l.close(),!0):(de&&(o=function(e){Ea((1-s)*e+s)}),l.zoomTo(e,0,200,r.easing.cubic.out,o),!0)};ya("Gestures",{publicMethods:{initGestures:function(){var a=function(e,t,i,o,r){E=e+t,O=e+i,R=e+o,Z=r?e+r:""};(F=B.pointerEvent)&&B.touch&&(B.touch=!1),F?navigator.pointerEnabled?a("pointer","down","move","up","cancel"):a("MSPointer","Down","Move","Up","Cancel"):B.touch?(a("touch","start","move","end","cancel"),L=!0):a("mouse","down","move","up"),x=O+" "+R+" "+Z,v=E,F&&!L&&(L=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),l.likelyTouchDevice=L,w[E]=Nb,w[O]=Ob,w[R]=Qb,Z&&(w[Z]=w[R]),B.touch&&(v+=" mousedown",x+=" mousemove mouseup",w.mousedown=w[E],w.mousemove=w[O],w.mouseup=w[R]),L||(s.allowPanToNext=!1)}}});var je,Je,Qe,et,tt,nt,bc=function(t,i,o,u){var d;je&&clearTimeout(je),et=!0,Qe=!0,t.initialLayout?(d=t.initialLayout,t.initialLayout=null):d=s.getThumbBoundsFn&&s.getThumbBoundsFn(m);var f=o?s.hideAnimationDuration:s.showAnimationDuration,k=function(){_a("initialZoom"),o?(l.template.removeAttribute("style"),l.bg.removeAttribute("style")):(Ea(1),i&&(i.style.display="block"),r.addClass(e,"pswp--animated-in"),Ca("initialZoom"+(o?"OutEnd":"InEnd"))),u&&u(),et=!1};if(!f||!d||void 0===d.x)return Ca("initialZoom"+(o?"Out":"In")),b=t.initialZoomLevel,La(xe,t.initialPosition),Ga(),e.style.opacity=o?0:1,Ea(1),void(f?setTimeout((function(){k()}),f):k());!function(){var i=p,u=!l.currItem.src||l.currItem.loadError||s.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),o||(b=d.w/t.w,xe.x=d.x,xe.y=d.y-U,l[u?"template":"bg"].style.opacity=.001,Ga()),ab("initialZoom"),o&&!i&&r.removeClass(e,"pswp--animated-in"),u&&(o?r[(i?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout((function(){r.addClass(e,"pswp--animate_opacity")}),30)),je=setTimeout((function(){if(Ca("initialZoom"+(o?"Out":"In")),o){var l=d.w/t.w,s={x:xe.x,y:xe.y},p=b,m=pe,n=function(t){1===t?(b=l,xe.x=d.x,xe.y=d.y-Y):(b=(l-p)*t+p,xe.x=(d.x-s.x)*t+s.x,xe.y=(d.y-Y-s.y)*t+s.y),Ga(),u?e.style.opacity=1-t:Ea(m-t*m)};i?cb("initialZoom",0,1,f,r.easing.cubic.out,n,k):(n(1),je=setTimeout(k,f+20))}else b=t.initialZoomLevel,La(xe,t.initialPosition),Ga(),Ea(1),u?e.style.opacity=1:Ea(1),je=setTimeout(k,f+20)}),o?25:90)}()},it={},ot=[],at={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Je.length}},hc=function(e,t,i){if(e.src&&!e.loadError){var o=!i;if(o&&(e.vGap||(e.vGap={top:0,bottom:0}),Ca("parseVerticalMargin",e)),it.x=t.x,it.y=t.y-e.vGap.top-e.vGap.bottom,o){var r=it.x/e.w,l=it.y/e.h;e.fitRatio=l>r?r:l;var u=s.scaleMode;"orig"===u?i=1:"fit"===u&&(i=e.fitRatio),i>1&&(i=1),e.initialZoomLevel=i,e.bounds||(e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!i)return;return function(e,t,i){var o=e.bounds;o.center.x=Math.round((it.x-t)/2),o.center.y=Math.round((it.y-i)/2)+e.vGap.top,o.max.x=t>it.x?Math.round(it.x-t):o.center.x,o.max.y=i>it.y?Math.round(it.y-i)+e.vGap.top:o.center.y,o.min.x=t>it.x?0:o.center.x,o.min.y=i>it.y?e.vGap.top:o.center.y}(e,e.w*i,e.h*i),o&&i===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}
1,e.initialPosition=e.bounds.center,e.bounds},ic=function(e,t,i,o,r,s){t.loadError||o&&(t.imageAppended=!0,lc(t,o,t===l.currItem&&Te),i.appendChild(o),s&&setTimeout((function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)}),500))},jc=function(e){e.loading=!0,e.loaded=!1;var t=e.img=r.createEl("pswp__img","img"),c=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=c,t.onerror=function(){e.loadError=!0,c()},t.src=e.src,t},kc=function(e,t){return e.src&&e.loadError&&e.container?(t&&(e.container.innerHTML=""),e.container.innerHTML=s.errorMsg.replace("%url%",e.src),!0):void 0},lc=function(e,t,i){if(e.src){t||(t=e.container.lastChild);var o=i?e.w:Math.round(e.w*e.fitRatio),r=i?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=o+"px",e.placeholder.style.height=r+"px"),t.style.width=o+"px",t.style.height=r+"px"}},mc=function(){if(ot.length){for(var e,t=0;t<ot.length;t++)(e=ot[t]).holder.index===e.index&&ic(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);ot=[]}};ya("Controller",{publicMethods:{lazyLoadItem:function(e){e=za(e);var t=tt(e);t&&(!t.loaded&&!t.loading||T)&&(Ca("gettingData",e,t),t.src&&jc(t))},initController:function(){r.extend(s,at,!0),l.items=Je=i,tt=l.getItemAt,nt=s.getNumItemsFn,s.loop,nt()<3&&(s.loop=!1),Ba("beforeChange",(function(e){var t,i=s.preload,o=null===e||e>=0,r=Math.min(i[0],nt()),u=Math.min(i[1],nt());for(t=1;(o?u:r)>=t;t++)l.lazyLoadItem(m+t);for(t=1;(o?r:u)>=t;t++)l.lazyLoadItem(m-t)})),Ba("initialLayout",(function(){l.currItem.initialLayout=s.getThumbBoundsFn&&s.getThumbBoundsFn(m)})),Ba("mainScrollAnimComplete",mc),Ba("initialZoomInEnd",mc),Ba("destroy",(function(){for(var e,t=0;t<Je.length;t++)(e=Je[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);ot=null}))},getItemAt:function(e){return e>=0&&void 0!==Je[e]&&Je[e]},allowProgressiveImg:function(){return s.forceProgressiveLoading||!L||s.mouseUsed||screen.width>1200},setContent:function(e,t){s.loop&&(t=za(t));var i=l.getItemAt(e.index);i&&(i.container=null);var o,d=l.getItemAt(t);if(d){Ca("gettingData",t,d),e.index=t,e.item=d;var p=d.container=r.createEl("pswp__zoom-wrap");if(!d.src&&d.html&&(d.html.tagName?p.appendChild(d.html):p.innerHTML=d.html),kc(d),hc(d,ve),!d.src||d.loadError||d.loaded)d.src&&!d.loadError&&((o=r.createEl("pswp__img","img")).style.opacity=1,o.src=d.src,lc(d,o),ic(0,d,p,o));else{if(d.loadComplete=function(i){if(u){if(e&&e.index===t){if(kc(i,!0))return i.loadComplete=i.img=null,hc(i,ve),Ha(i),void(e.index===m&&l.updateCurrZoomItem());i.imageAppended?!et&&i.placeholder&&(i.placeholder.style.display="none",i.placeholder=null):B.transform&&(se||et)?ot.push({item:i,baseDiv:p,img:i.img,index:t,holder:e,clearPlaceholder:!0}):ic(0,i,p,i.img,0,!0)}i.loadComplete=null,i.img=null,Ca("imageLoadComplete",t,i)}},r.features.transform){var f="pswp__img pswp__img--placeholder";f+=d.msrc?"":" pswp__img--placeholder--blank";var y=r.createEl(f,d.msrc?"img":"");d.msrc&&(y.src=d.msrc),lc(d,y),p.appendChild(y),d.placeholder=y}d.loading||jc(d),l.allowProgressiveImg()&&(!Qe&&B.transform?ot.push({item:d,baseDiv:p,img:d.img,index:t,holder:e}):ic(0,d,p,d.img,0,!0))}Qe||t!==m?Ha(d):(le=p.style,bc(d,o||d.img)),e.el.innerHTML="",e.el.appendChild(p)}else e.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var rt,lt,st={},pc=function(e,t,i){var o=document.createEvent("CustomEvent"),r={origEvent:e,target:e.target,releasePoint:t,pointerType:i||"touch"};o.initCustomEvent("pswpTap",!0,!0,r),e.target.dispatchEvent(o)};ya("Tap",{publicMethods:{initTap:function(){Ba("firstTouchStart",l.onTapStart),Ba("touchRelease",l.onTapRelease),Ba("destroy",(function(){st={},rt=null}))},onTapStart:function(e){e.length>1&&(clearTimeout(rt),rt=null)},onTapRelease:function(e,t){if(t&&!ee&&!J&&!Oe){var i=t;if(rt&&(clearTimeout(rt),rt=null,function(e,t){return Math.abs(e.x-t.x)<25&&Math.abs(e.y-t.y)<25}(i,st)))return void Ca("doubleTap",i);if("mouse"===t.type)return void pc(e,t,"mouse");if("BUTTON"===e.target.tagName.toUpperCase()||r.hasClass(e.target,"pswp__single-tap"))return void pc(e,t);La(st,i),rt=setTimeout((function(){pc(e,t),rt=null}),300)}}}}),ya("DesktopZoom",{publicMethods:{initDesktopZoom:function(){H||(L?Ba("mouseUsed",(function(){l.
1setupDesktopZoom()})):l.setupDesktopZoom(!0))},setupDesktopZoom:function(t){lt={};var i="wheel mousewheel DOMMouseScroll";Ba("bindEvents",(function(){r.bind(e,i,l.handleMouseWheel)})),Ba("unbindEvents",(function(){lt&&r.unbind(e,i,l.handleMouseWheel)})),l.mouseZoomedIn=!1;var o,g=function(){l.mouseZoomedIn&&(r.removeClass(e,"pswp--zoomed-in"),l.mouseZoomedIn=!1),1>b?r.addClass(e,"pswp--zoom-allowed"):r.removeClass(e,"pswp--zoom-allowed"),h()},h=function(){o&&(r.removeClass(e,"pswp--dragging"),o=!1)};Ba("resize",g),Ba("afterChange",g),Ba("pointerDown",(function(){l.mouseZoomedIn&&(o=!0,r.addClass(e,"pswp--dragging"))})),Ba("pointerUp",h),t||g()},handleMouseWheel:function(e){if(b<=l.currItem.fitRatio)return s.modal&&(!s.closeOnScroll||Oe||$?e.preventDefault():P&&Math.abs(e.deltaY)>2&&(p=!0,l.close())),!0;if(e.stopPropagation(),lt.x=0,"deltaX"in e)1===e.deltaMode?(lt.x=18*e.deltaX,lt.y=18*e.deltaY):(lt.x=e.deltaX,lt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(lt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?lt.y=-.16*e.wheelDeltaY:lt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;lt.y=e.detail}Ra(b,!0);var t=xe.x-lt.x,i=xe.y-lt.y;(s.modal||t<=re.min.x&&t>=re.max.x&&i<=re.min.y&&i>=re.max.y)&&e.preventDefault(),l.panTo(t,i)},toggleDesktopZoom:function(t){t=t||{x:ve.x/2+we.x,y:ve.y/2+we.y};var i=s.getDoubleTapZoom(!0,l.currItem),o=b===i;l.mouseZoomedIn=!o,l.zoomTo(o?l.currItem.initialZoomLevel:i,t,333),r[(o?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var ut,ct,dt,pt,mt,ft,ht,yt,xt,vt,gt,wt,bt={history:!0,galleryUID:1},Ec=function(){return gt.hash.substring(1)},Fc=function(){ut&&clearTimeout(ut),dt&&clearTimeout(dt)},Gc=function(){var e=Ec(),t={};if(e.length<5)return t;var i,o=e.split("&");for(i=0;i<o.length;i++)if(o[i]){var r=o[i].split("=");r.length<2||(t[r[0]]=r[1])}if(s.galleryPIDs){var l=t.pid;for(t.pid=0,i=0;i<Je.length;i++)if(Je[i].pid===l){t.pid=i;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Hc=function(){if(dt&&clearTimeout(dt),Oe||$)dt=setTimeout(Hc,500);else{pt?clearTimeout(ct):pt=!0;var e=m+1,t=tt(m);t.hasOwnProperty("pid")&&(e=t.pid);var i=ht+"&gid="+s.galleryUID+"&pid="+e;yt||-1===gt.hash.indexOf(i)&&(vt=!0);var o=gt.href.split("#")[0]+"#"+i;wt?"#"+i!==window.location.hash&&history[yt?"replaceState":"pushState"]("",document.title,o):yt?gt.replace(o):gt.hash=i,yt=!0,ct=setTimeout((function(){pt=!1}),60)}};ya("History",{publicMethods:{initHistory:function(){if(r.extend(s,bt,!0),s.history){gt=window.location,vt=!1,xt=!1,yt=!1,ht=Ec(),wt="pushState"in history,ht.indexOf("gid=")>-1&&(ht=(ht=ht.split("&gid=")[0]).split("?gid=")[0]),Ba("afterChange",l.updateURL),Ba("unbindEvents",(function(){r.unbind(window,"hashchange",l.onHashChange)}));var a=function(){ft=!0,xt||(vt?history.back():ht?gt.hash=ht:wt?history.pushState("",document.title,gt.pathname+gt.search):gt.hash=""),Fc()};Ba("unbindEvents",(function(){p&&a()})),Ba("destroy",(function(){ft||a()})),Ba("firstUpdate",(function(){m=Gc().pid}));var e=ht.indexOf("pid=");e>-1&&("&"===(ht=ht.substring(0,e)).slice(-1)&&(ht=ht.slice(0,-1))),setTimeout((function(){u&&r.bind(window,"hashchange",l.onHashChange)}),40)}},onHashChange:function(){return Ec()===ht?(xt=!0,void l.close()):void(pt||(mt=!0,l.goTo(Gc().pid),mt=!1))},updateURL:function(){Fc(),mt||(yt?ut=setTimeout(Hc,800):Hc())}}}),r.extend(l,ke)}}));
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.