-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.467dd0.js
7 lines (7 loc) · 48.5 KB
/
main.467dd0.js
1
2
3
4
5
6
7
!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="./",t(0)}({0:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}n(348),n(138);var i=n(141),r=o(i),a=n(140),l=o(a),s=n(136),c=o(s),u=n(68);(0,u.addLoadEvent)(function(){l.default.init(),r.default.init(),c.default.init()})},68:function(e,t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t,n){return t||n?String.fromCharCode(t||n):a[e]||e}function t(e){return d[e]}var i=/"|<|>|&| |'|&#(\d+);|&#(\d+)/g,r=/['<> "&]/g,a={""":'"',"<":"<",">":">","&":"&"," ":" "},l=/\u00a0/g,s=/<br\s*\/?>/gi,c=/\r?\n/g,u=/\s/g,d={};for(var p in a)d[a[p]]=p;return a["'"]="'",d["'"]="'",{encode:function(e){return e?(""+e).replace(r,t).replace(c,"<br/>").replace(u," "):""},decode:function(t){return t?(""+t).replace(s,"\n").replace(i,e).replace(l," "):""},encodeBase16:function(e){if(!e)return e;e+="";for(var t=[],n=0,o=e.length;o>n;n++)t.push(e.charCodeAt(n).toString(16).toUpperCase());return t.join("")},encodeBase16forJSON:function(e){if(!e)return e;e=e.replace(/[\u4E00-\u9FBF]/gi,function(e){return escape(e).replace("%u","\\u")});for(var t=[],n=0,o=e.length;o>n;n++)t.push(e.charCodeAt(n).toString(16).toUpperCase());return t.join("")},decodeBase16:function(e){if(!e)return e;e+="";for(var t=[],n=0,o=e.length;o>n;n+=2)t.push(String.fromCharCode("0x"+e.slice(n,n+2)));return t.join("")},encodeObject:function(e){if(e instanceof Array)for(var t=0,i=e.length;i>t;t++)e[t]=o.encodeObject(e[t]);else if("object"==("undefined"==typeof e?"undefined":n(e)))for(var r in e)e[r]=o.encodeObject(e[r]);else if("string"==typeof e)return o.encode(e);return e},loadScript:function(e){var t=document.createElement("script");document.getElementsByTagName("body")[0].appendChild(t),t.setAttribute("src",e)},addLoadEvent:function(e){var t=window.onload;"function"!=typeof window.onload?window.onload=e:window.onload=function(){t(),e()}}}}();e.exports=o},96:function(e,t){function n(e,t){e.classList?e.classList.add(t):e.className+=" "+t}e.exports=n},97:function(e,t){function n(e,t){if(e.classList)e.classList.remove(t);else{var n=new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi");e.className=e.className.replace(n," ")}}e.exports=n},136:function(e,t){"use strict";function n(){o(document.getElementById("js-jump-container"),document.getElementById("container"))}var o=function(e,t,n){function o(){e.style.display=(t.scrollTop||document.documentElement.scrollTop||document.body.scrollTop)>(n||500)?"block":"none"}function i(e,t){var n=null;return function(){var o=this,i=arguments;n&&clearTimeout(n),n=setTimeout(function(){return"function"==typeof e&&e.apply(o,i)},t)}}if(e){var r=null,a=window.onscroll,l=e.onclick;(t||window).onscroll=i(function(){"function"==typeof a&&a.apply(this,arguments),o()},100),e.onclick=function(){"function"==typeof l&&l.apply(this,arguments);t.scrollTop||document.documentElement.scrollTop||document.body.scrollTop;r=setInterval(function(){var e=t.scrollTop||document.documentElement.scrollTop||document.body.scrollTop,n=Math.max(10,e/6);e-=n,e>0?(t.scrollTop=t.scrollTop-n,window.scrollTo(0,e)):(t.scrollTop=0,window.scrollTo(0,0),clearInterval(r))},10)}}};e.exports={init:n}},138:function(e,t){"use strict";!function(e,t,n){function o(){l(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),r(),i()}function i(){for(var e=0;e<c.length;e++)c[e].alpha<=0?(t.body.removeChild(c[e].el),c.splice(e,1)):(c[e].y--,c[e].scale+=.004,c[e].alpha-=.013,c[e].el.style.cssText="left:"+c[e].x+"px;top:"+c[e].y+"px;opacity:"+c[e].alpha+";transform:scale("+c[e].scale+","+c[e].scale+") rotate(45deg);background:"+c[e].color+";z-index:99999");requestAnimationFrame(i)}function r(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),a(e)}}function a(e){var n=t.createElement("div");n.className="heart",c.push({el:n,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(n)}function l(e){var n=t.createElement("style");n.type="text/css";try{n.appendChild(t.createTextNode(e))}catch(t){n.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(n)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var c=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),o()}(window,document)},140:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,t.sTitle).replace(/<%-sDesc%>/g,t.sDesc).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function r(){var e=document.querySelector(".js-wx-box"),t=document.querySelector(".mask");(0,c.default)(e,"in"),(0,c.default)(e,"ready"),(0,c.default)(t,"in")}function a(){var e=document.querySelector(".js-wx-box"),t=document.querySelector(".mask");(0,d.default)(e,"in"),(0,d.default)(e,"ready"),(0,d.default)(t,"in")}function l(e,t){"weibo"===e?i("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",t):"qq"===e?i("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",t):"douban"===e?i("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",t):"qzone"===e?i("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",t):"facebook"===e?i("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",t):"twitter"===e?i("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>",t):"google"===e?i("https://plus.google.com/share?url=<%-sUrl%>",t):"weixin"===e&&r()}var s=n(96),c=o(s),u=n(97),d=o(u),p=function(){var e=document.querySelectorAll(".share-sns");if(e&&0!==e.length){var t=window.location.href,n=document.querySelector("title").innerHTML,o=document.querySelectorAll(".article-entry img"),i=o.length?document.querySelector(".article-entry img").getAttribute("src"):"";""===i||/^(http:|https:)?\/\//.test(i)||(i=window.location.origin+i),e.forEach(function(e){e.onclick=function(o){var r=e.getAttribute("data-type");l(r,{sUrl:t,sPic:i,sTitle:n,sDesc:n})}}),document.querySelector(".mask").onclick=a,document.querySelector(".js-modal-close").onclick=a}};e.exports={init:p}},141:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(){var e=document.querySelectorAll(".pswp")[0],t=document.querySelectorAll(".article-entry img:not(.reward-img)");t.forEach(function(n,o){n.onclick=function(){if(!document.querySelector(".left-col.show")){var n=[];t.forEach(function(e,t){var o=(e.getAttribute("data-idx",t),e.getAttribute("data-target")||e.getAttribute("src")),i=e.getAttribute("alt"),r=new Image;r.src=o,n.push({src:o,w:r.width||e.width,h:r.height||e.height,title:i})});var i=new a.default(e,s.default,n,{index:parseInt(o)});i.init()}}})}var r=n(351),a=o(r),l=n(350),s=o(l);n(346),n(347),window.PhotoSwipe=a.default,window.PhotoSwipeUI_Default=s.default,e.exports={init:i}},346:function(e,t){},347:function(e,t){},348:function(e,t){},350:function(e,t,n){var o,i;/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(r,a){o=a,i="function"==typeof o?o.call(t,n,t,e):o,!(void 0!==i&&(e.exports=i))}(this,function(){"use strict";var e=function(e,t){var n,o,i,r,a,l,s,c,u,d,p,m,f,h,v,g,y,w,x,b=this,T=!1,C=!0,I=!0,E={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.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 e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},S=function(e){if(g)return!0;e=e||window.event,v.timeToIdle&&v.mouseUsed&&!u&&P();for(var n,o,i=e.target||e.srcElement,r=i.getAttribute("class")||"",a=0;a<H.length;a++)n=H[a],n.onTap&&r.indexOf("pswp__"+n.name)>-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),g=!0;var l=t.features.isOldAndroid?600:30;y=setTimeout(function(){g=!1},l)}},D=function(){return!e.likelyTouchDevice||v.mouseUsed||screen.width>v.fitControlsWidth},k=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},_=function(){var e=1===v.getNumItemsFn();e!==h&&(k(o,"ui--one-slide",e),h=e)},A=function(){k(s,"share-modal--hidden",I)},M=function(){return I=!I,I?(t.removeClass(s,"pswp__share-modal--fade-in"),setTimeout(function(){I&&A()},300)):(A(),setTimeout(function(){I||t.addClass(s,"pswp__share-modal--fade-in")},30)),I||O(),!1},F=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),!!n.href&&(!!n.hasAttribute("download")||(window.open(n.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)),I||M(),!1))},O=function(){for(var e,t,n,o,i,r="",a=0;a<v.shareButtons.length;a++)e=v.shareButtons[a],n=v.getImageURLForShare(e),o=v.getPageURLForShare(e),i=v.getTextForShare(e),t=e.url.replace("{{url}}",encodeURIComponent(o)).replace("{{image_url}}",encodeURIComponent(n)).replace("{{raw_image_url}}",n).replace("{{text}}",encodeURIComponent(i)),r+='<a href="'+t+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",v.parseShareButtonOut&&(r=v.parseShareButtonOut(e,r));s.children[0].innerHTML=r,s.children[0].onclick=F},R=function(e){for(var n=0;n<v.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+v.closeElClasses[n]))return!0},L=0,P=function(){clearTimeout(x),L=0,u&&b.setIdle(!1)},Z=function(e){e=e?e:window.event;var t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(x),x=setTimeout(function(){b.setIdle(!0)},v.timeToIdleOutside))},z=function(){v.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=b.getFullscreenAPI()),n?(t.bind(document,n.eventK,b.updateFullscreen),b.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs"))},U=function(){v.preloaderEl&&(q(!0),d("beforeChange",function(){clearTimeout(f),f=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&q(!1):q(!0)},v.loadingIndicatorDelay)}),d("imageLoadComplete",function(t,n){e.currItem===n&&q(!0)}))},q=function(e){m!==e&&(k(p,"preloader--active",!e),m=e)},N=function(e){var n=e.vGap;if(D()){var a=v.barsSize;if(v.captionEl&&"auto"===a.bottom)if(r||(r=t.createEl("pswp__caption pswp__caption--fake"),r.appendChild(t.createEl("pswp__caption__center")),o.insertBefore(r,i),t.addClass(o,"pswp__ui--fit")),v.addCaptionHTMLFn(e,r,!0)){var l=r.clientHeight;n.bottom=parseInt(l,10)||44}else n.bottom=a.top;else n.bottom="auto"===a.bottom?0:a.bottom;n.top=a.top}else n.top=n.bottom=0},B=function(){v.timeToIdle&&d("mouseUsed",function(){t.bind(document,"mousemove",P),t.bind(document,"mouseout",Z),w=setInterval(function(){L++,2===L&&b.setIdle(!0)},v.timeToIdle/2)})},K=function(){d("onVerticalDrag",function(e){C&&e<.95?b.hideControls():!C&&e>=.95&&b.showControls()});var e;d("onPinchClose",function(t){C&&t<.9?(b.hideControls(),e=!0):e&&!C&&t>.9&&b.showControls()}),d("zoomGestureEnded",function(){e=!1,e&&!C&&b.showControls()})},H=[{name:"caption",option:"captionEl",onInit:function(e){i=e}},{name:"share-modal",option:"shareEl",onInit:function(e){s=e},onTap:function(){M()}},{name:"button--share",option:"shareEl",onInit:function(e){l=e},onTap:function(){M()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){a=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){p=e}}],W=function(){var e,n,i,r=function(o){if(o)for(var r=o.length,a=0;a<r;a++){e=o[a],n=e.className;for(var l=0;l<H.length;l++)i=H[l],n.indexOf("pswp__"+i.name)>-1&&(v[i.option]?(t.removeClass(e,"pswp__element--disabled"),i.onInit&&i.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};r(o.children);var a=t.getChildByClass(o,"pswp__top-bar");a&&r(a.children)};b.init=function(){t.extend(e.options,E,!0),v=e.options,o=t.getChildByClass(e.scrollWrap,"pswp__ui"),d=e.listen,K(),d("beforeChange",b.update),d("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(v.getDoubleTapZoom(!1,e.currItem),t,333)}),d("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(o.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),d("bindEvents",function(){t.bind(o,"pswpTap click",S),t.bind(e.scrollWrap,"pswpTap",b.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",b.onMouseOver)}),d("unbindEvents",function(){I||M(),w&&clearInterval(w),t.unbind(document,"mouseout",Z),t.unbind(document,"mousemove",P),t.unbind(o,"pswpTap click",S),t.unbind(e.scrollWrap,"pswpTap",b.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",b.onMouseOver),n&&(t.unbind(document,n.eventK,b.updateFullscreen),n.isFullscreen()&&(v.hideAnimationDuration=0,n.exit()),n=null)}),d("destroy",function(){v.captionEl&&(r&&o.removeChild(r),t.removeClass(i,"pswp__caption--empty")),s&&(s.children[0].onclick=null),t.removeClass(o,"pswp__ui--over-close"),t.addClass(o,"pswp__ui--hidden"),b.setIdle(!1)}),v.showAnimationDuration||t.removeClass(o,"pswp__ui--hidden"),d("initialZoomIn",function(){v.showAnimationDuration&&t.removeClass(o,"pswp__ui--hidden")}),d("initialZoomOut",function(){t.addClass(o,"pswp__ui--hidden")}),d("parseVerticalMargin",N),W(),v.shareEl&&l&&s&&(I=!0),_(),B(),z(),U()},b.setIdle=function(e){u=e,k(o,"ui--idle",e)},b.update=function(){C&&e.currItem?(b.updateIndexIndicator(),v.captionEl&&(v.addCaptionHTMLFn(e.currItem,i),k(i,"caption--empty",!e.currItem.title)),T=!0):T=!1,I||M(),_()},b.updateFullscreen=function(o){o&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},b.updateIndexIndicator=function(){v.counterEl&&(a.innerHTML=e.getCurrentIndex()+1+v.indexIndicatorSep+v.getNumItemsFn())},b.onGlobalTap=function(n){n=n||window.event;var o=n.target||n.srcElement;if(!g)if(n.detail&&"mouse"===n.detail.pointerType){if(R(o))return void e.close();t.hasClass(o,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?v.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(v.tapToToggleControls&&(C?b.hideControls():b.showControls()),v.tapToClose&&(t.hasClass(o,"pswp__img")||R(o)))return void e.close()},b.onMouseOver=function(e){e=e||window.event;var t=e.target||e.srcElement;k(o,"ui--over-close",R(t))},b.hideControls=function(){t.addClass(o,"pswp__ui--hidden"),C=!1},b.showControls=function(){C=!0,T||b.update(),t.removeClass(o,"pswp__ui--hidden")},b.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},b.getFullscreenAPI=function(){var t,n=document.documentElement,o="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:o}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+o}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+o}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return c=v.closeOnScroll,v.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return v.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}};return e})},351:function(e,t,n){var o,i;/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(r,a){o=a,i="function"==typeof o?o.call(t,n,t,e):o,!(void 0!==i&&(e.exports=i))}(this,function(){"use strict";var e=function(e,t,n,o){var i={features:null,bind:function(e,t,n,o){var i=(o?"remove":"add")+"EventListener";t=t.split(" ");for(var r=0;r<t.length;r++)t[r]&&e[i](t[r],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){i.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){i.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 n=e.firstChild;n;){if(i.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var o=e.length;o--;)if(e[o][n]===t)return o;return-1},extend:function(e,t,n){for(var o in t)if(t.hasOwnProperty(o)){if(n&&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(i.features)return i.features;var e=i.createEl(),t=e.style,n="",o={};if(o.oldIE=document.all&&!document.addEventListener,o.touch="ontouchstart"in window,window.requestAnimationFrame&&(o.raf=window.requestAnimationFrame,o.caf=window.cancelAnimationFrame),o.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!o.pointerEvent){var r=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);a&&a.length>0&&(a=parseInt(a[1],10),a>=1&&a<8&&(o.isOldIOSPhone=!0))}var l=r.match(/Android\s([0-9\.]*)/),s=l?l[1]:0;s=parseFloat(s),s>=1&&(s<4.4&&(o.isOldAndroid=!0),o.androidVersion=s),o.isMobileOpera=/opera mini|opera mobi/i.test(r)}for(var c,u,d=["transform","perspective","animationName"],p=["","webkit","Moz","ms","O"],m=0;m<4;m++){n=p[m];for(var f=0;f<3;f++)c=d[f],u=n+(n?c.charAt(0).toUpperCase()+c.slice(1):c),!o[c]&&u in t&&(o[c]=u);n&&!o.raf&&(n=n.toLowerCase(),o.raf=window[n+"RequestAnimationFrame"],o.raf&&(o.caf=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]))}if(!o.raf){var h=0;o.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-h)),o=window.setTimeout(function(){e(t+n)},n);return h=t+n,o},o.caf=function(e){clearTimeout(e)}}return o.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,i.features=o,o}};i.detectFeatures(),i.features.oldIE&&(i.bind=function(e,t,n,o){t=t.split(" ");for(var i,r=(o?"detach":"attach")+"Event",a=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(i=t[l])if("object"==typeof n&&n.handleEvent){if(o){if(!n["oldIE"+i])return!1}else n["oldIE"+i]=a;e[r]("on"+i,n["oldIE"+i])}else e[r]("on"+i,n)});var r=this,a=25,l=3,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?1:t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};i.extend(s,o);var c,u,d,p,m,f,h,v,g,y,w,x,b,T,C,I,E,S,D,k,_,A,M,F,O,R,L,P,Z,z,U,q,N,B,K,H,W,Y,G,j,V,X,$,J,Q,ee,te,ne,oe,ie,re,ae,le,se,ce,ue,de,pe=function(){return{x:0,y:0}},me=pe(),fe=pe(),he=pe(),ve={},ge=0,ye={},we=pe(),xe=0,be=!0,Te=[],Ce={},Ie=!1,Ee=function(e,t){i.extend(r,t.publicMethods),Te.push(e)},Se=function(e){var t=en();return e>t-1?e-t:e<0?t+e:e},De={},ke=function(e,t){return De[e]||(De[e]=[]),De[e].push(t)},_e=function(e){var t=De[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(r,n)}},Ae=function(){return(new Date).getTime()},Me=function(e){ce=e,r.bg.style.opacity=e*s.bgOpacity},Fe=function(e,t,n,o,i){(!Ie||i&&i!==r.currItem)&&(o/=i?i.fitRatio:r.currItem.fitRatio),e[A]=x+t+"px, "+n+"px"+b+" scale("+o+")"},Oe=function(e){ie&&(e&&(y>r.currItem.fitRatio?Ie||(mn(r.currItem,!1,!0),Ie=!0):Ie&&(mn(r.currItem),Ie=!1)),Fe(ie,he.x,he.y,y))},Re=function(e){e.container&&Fe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Le=function(e,t){t[A]=x+e+"px, 0px"+b},Pe=function(e,t){if(!s.loop&&t){var n=p+(we.x*ge-e)/we.x,o=Math.round(e-wt.x);(n<0&&o>0||n>=en()-1&&o<0)&&(e=wt.x+o*s.mainScrollEndFriction)}wt.x=e,Le(e,m)},Ze=function(e,t){var n=xt[e]-ye[e];return fe[e]+me[e]+n-n*(t/w)},ze=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Ue=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},qe=null,Ne=function(){qe&&(i.unbind(document,"mousemove",Ne),i.addClass(e,"pswp--has_mouse"),s.mouseUsed=!0,_e("mouseUsed")),qe=setTimeout(function(){qe=null},100)},Be=function(){i.bind(document,"keydown",r),U.transform&&i.bind(r.scrollWrap,"click",r),s.mouseUsed||i.bind(document,"mousemove",Ne),i.bind(window,"resize scroll orientationchange",r),_e("bindEvents")},Ke=function(){i.unbind(window,"resize scroll orientationchange",r),i.unbind(window,"scroll",g.scroll),i.unbind(document,"keydown",r),i.unbind(document,"mousemove",Ne),U.transform&&i.unbind(r.scrollWrap,"click",r),G&&i.unbind(window,h,r),clearTimeout(q),_e("unbindEvents")},He=function(e,t){var n=cn(r.currItem,ve,e);return t&&(oe=n),n},We=function(e){return e||(e=r.currItem),e.initialZoomLevel},Ye=function(e){return e||(e=r.currItem),e.w>0?s.maxSpreadZoom:1},Ge=function(e,t,n,o){return o===r.currItem.initialZoomLevel?(n[e]=r.currItem.initialPosition[e],!0):(n[e]=Ze(e,o),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},je=function(){if(A){var t=U.perspective&&!F;return x="translate"+(t?"3d(":"("),void(b=U.perspective?", 0px)":")")}A="left",i.addClass(e,"pswp--ie"),Le=function(e,t){t.left=e+"px"},Re=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,o=t*e.w,i=t*e.h;n.width=o+"px",n.height=i+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Oe=function(){if(ie){var e=ie,t=r.currItem,n=t.fitRatio>1?1:t.fitRatio,o=n*t.w,i=n*t.h;e.width=o+"px",e.height=i+"px",e.left=he.x+"px",e.top=he.y+"px"}}},Ve=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,r[t]()))},Xe=function(e){e&&(X||V||re||W)&&(e.preventDefault(),e.stopPropagation())},$e=function(){r.setScrollOffset(0,i.getScrollY())},Je={},Qe=0,et=function(e){Je[e]&&(Je[e].raf&&R(Je[e].raf),Qe--,delete Je[e])},tt=function(e){Je[e]&&et(e),Je[e]||(Qe++,Je[e]={})},nt=function(){for(var e in Je)Je.hasOwnProperty(e)&&et(e)},ot=function(e,t,n,o,i,r,a){var l,s=Ae();tt(e);var c=function(){if(Je[e]){if(l=Ae()-s,l>=o)return et(e),r(n),void(a&&a());r((n-t)*i(l/o)+t),Je[e].raf=O(c)}};c()},it={shout:_e,listen:ke,viewportSize:ve,options:s,isMainScrollAnimating:function(){return re},getZoomLevel:function(){return y},getCurrentIndex:function(){return p},isDragging:function(){return G},isZooming:function(){return ee},setScrollOffset:function(e,t){ye.x=e,z=ye.y=t,_e("updateScrollOffset",ye)},applyZoomPan:function(e,t,n,o){he.x=t,he.y=n,y=e,Oe(o)},init:function(){if(!c&&!u){var n;r.framework=i,r.template=e,r.bg=i.getChildByClass(e,"pswp__bg"),L=e.className,c=!0,U=i.detectFeatures(),O=U.raf,R=U.caf,A=U.transform,Z=U.oldIE,r.scrollWrap=i.getChildByClass(e,"pswp__scroll-wrap"),r.container=i.getChildByClass(r.scrollWrap,"pswp__container"),m=r.container.style,r.itemHolders=I=[{el:r.container.children[0],wrap:0,index:-1},{el:r.container.children[1],wrap:0,index:-1},{el:r.container.children[2],wrap:0,index:-1}],I[0].el.style.display=I[2].el.style.display="none",je(),g={resize:r.updateSize,orientationchange:function(){clearTimeout(q),q=setTimeout(function(){ve.x!==r.scrollWrap.clientWidth&&r.updateSize()},500)},scroll:$e,keydown:Ve,click:Xe};var o=U.isOldIOSPhone||U.isOldAndroid||U.isMobileOpera;for(U.animationName&&U.transform&&!o||(s.showAnimationDuration=s.hideAnimationDuration=0),n=0;n<Te.length;n++)r["init"+Te[n]]();if(t){var a=r.ui=new t(r,i);a.init()}_e("firstUpdate"),p=p||s.index||0,(isNaN(p)||p<0||p>=en())&&(p=0),r.currItem=Qt(p),(U.isOldIOSPhone||U.isOldAndroid)&&(be=!1),e.setAttribute("aria-hidden","false"),s.modal&&(be?e.style.position="fixed":(e.style.position="absolute",e.style.top=i.getScrollY()+"px")),void 0===z&&(_e("initialLayout"),z=P=i.getScrollY());var d="pswp--open ";for(s.mainClass&&(d+=s.mainClass+" "),s.showHideOpacity&&(d+="pswp--animate_opacity "),d+=F?"pswp--touch":"pswp--notouch",d+=U.animationName?" pswp--css_animation":"",d+=U.svg?" pswp--svg":"",i.addClass(e,d),r.updateSize(),f=-1,xe=null,n=0;n<l;n++)Le((n+f)*we.x,I[n].el.style);Z||i.bind(r.scrollWrap,v,r),ke("initialZoomInEnd",function(){r.setContent(I[0],p-1),r.setContent(I[2],p+1),I[0].el.style.display=I[2].el.style.display="block",s.focus&&e.focus(),Be()}),r.setContent(I[1],p),r.updateCurrItem(),_e("afterInit"),be||(T=setInterval(function(){Qe||G||ee||y!==r.currItem.initialZoomLevel||r.updateSize()},1e3)),i.addClass(e,"pswp--visible")}},close:function(){c&&(c=!1,u=!0,_e("close"),Ke(),nn(r.currItem,null,!0,r.destroy))},destroy:function(){_e("destroy"),Vt&&clearTimeout(Vt),e.setAttribute("aria-hidden","true"),e.className=L,T&&clearInterval(T),i.unbind(r.scrollWrap,v,r),i.unbind(window,"scroll",r),Et(),nt(),De=null},panTo:function(e,t,n){n||(e>oe.min.x?e=oe.min.x:e<oe.max.x&&(e=oe.max.x),t>oe.min.y?t=oe.min.y:t<oe.max.y&&(t=oe.max.y)),he.x=e,he.y=t,Oe()},handleEvent:function(e){e=e||window.event,g[e.type]&&g[e.type](e)},goTo:function(e){e=Se(e);var t=e-p;xe=t,p=e,r.currItem=Qt(p),ge-=t,Pe(we.x*ge),nt(),re=!1,r.updateCurrItem()},next:function(){r.goTo(p+1)},prev:function(){r.goTo(p-1)},updateCurrZoomItem:function(e){if(e&&_e("beforeChange",0),I[1].el.children.length){var t=I[1].el.children[0];ie=i.hasClass(t,"pswp__zoom-wrap")?t.style:null}else ie=null;oe=r.currItem.bounds,w=y=r.currItem.initialZoomLevel,he.x=oe.center.x,he.y=oe.center.y,e&&_e("afterChange")},invalidateCurrItems:function(){C=!0;for(var e=0;e<l;e++)I[e].item&&(I[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==xe){var t,n=Math.abs(xe);if(!(e&&n<2)){r.currItem=Qt(p),Ie=!1,_e("beforeChange",xe),n>=l&&(f+=xe+(xe>0?-l:l),n=l);for(var o=0;o<n;o++)xe>0?(t=I.shift(),I[l-1]=t,f++,Le((f+2)*we.x,t.el.style),r.setContent(t,p-n+o+1+1)):(t=I.pop(),I.unshift(t),f--,Le(f*we.x,t.el.style),r.setContent(t,p+n-o-1-1));if(ie&&1===Math.abs(xe)){var i=Qt(E);i.initialZoomLevel!==y&&(cn(i,ve),mn(i),Re(i))}xe=0,r.updateCurrZoomItem(),E=p,_e("afterChange")}}},updateSize:function(t){if(!be&&s.modal){var n=i.getScrollY();if(z!==n&&(e.style.top=n+"px",z=n),!t&&Ce.x===window.innerWidth&&Ce.y===window.innerHeight)return;Ce.x=window.innerWidth,Ce.y=window.innerHeight,e.style.height=Ce.y+"px"}if(ve.x=r.scrollWrap.clientWidth,ve.y=r.scrollWrap.clientHeight,$e(),we.x=ve.x+Math.round(ve.x*s.spacing),we.y=ve.y,Pe(we.x*ge),_e("beforeResize"),void 0!==f){for(var o,a,c,u=0;u<l;u++)o=I[u],Le((u+f)*we.x,o.el.style),c=p+u-1,s.loop&&en()>2&&(c=Se(c)),a=Qt(c),a&&(C||a.needsUpdate||!a.bounds)?(r.cleanSlide(a),r.setContent(o,c),1===u&&(r.currItem=a,r.updateCurrZoomItem(!0)),a.needsUpdate=!1):o.index===-1&&c>=0&&r.setContent(o,c),a&&a.container&&(cn(a,ve),mn(a),Re(a));C=!1}w=y=r.currItem.initialZoomLevel,oe=r.currItem.bounds,oe&&(he.x=oe.center.x,he.y=oe.center.y,Oe(!0)),_e("resize")},zoomTo:function(e,t,n,o,r){t&&(w=y,xt.x=Math.abs(t.x)-he.x,xt.y=Math.abs(t.y)-he.y,ze(fe,he));var a=He(e,!1),l={};Ge("x",a,l,e),Ge("y",a,l,e);var s=y,c={x:he.x,y:he.y};Ue(l);var u=function(t){1===t?(y=e,he.x=l.x,he.y=l.y):(y=(e-s)*t+s,he.x=(l.x-c.x)*t+c.x,he.y=(l.y-c.y)*t+c.y),r&&r(t),Oe(1===t)};n?ot("customZoomTo",0,1,n,o||i.easing.sine.inOut,u):u(1)}},rt=30,at=10,lt={},st={},ct={},ut={},dt={},pt=[],mt={},ft=[],ht={},vt=0,gt=pe(),yt=0,wt=pe(),xt=pe(),bt=pe(),Tt=function(e,t){return e.x===t.x&&e.y===t.y},Ct=function(e,t){return Math.abs(e.x-t.x)<a&&Math.abs(e.y-t.y)<a},It=function(e,t){return ht.x=Math.abs(e.x-t.x),ht.y=Math.abs(e.y-t.y),Math.sqrt(ht.x*ht.x+ht.y*ht.y)},Et=function(){$&&(R($),$=null)},St=function(){G&&($=O(St),Bt())},Dt=function(){return!("fit"===s.scaleMode&&y===r.currItem.initialZoomLevel)},kt=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:kt(e.parentNode,t)))},_t={},At=function(e,t){return _t.prevent=!kt(e.target,s.isClickableElement),_e("preventDragEvent",e,t,_t),_t.prevent},Mt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Ft=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Ot=function(e,t,n){if(e-B>50){var o=ft.length>2?ft.shift():{};o.x=t,o.y=n,ft.push(o),B=e}},Rt=function(){var e=he.y-r.currItem.initialPosition.y;return 1-Math.abs(e/(ve.y/2))},Lt={},Pt={},Zt=[],zt=function(e){for(;Zt.length>0;)Zt.pop();return M?(de=0,pt.forEach(function(e){0===de?Zt[0]=e:1===de&&(Zt[1]=e),de++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Zt[0]=Mt(e.touches[0],Lt),e.touches.length>1&&(Zt[1]=Mt(e.touches[1],Pt))):(Lt.x=e.pageX,Lt.y=e.pageY,Lt.id="",Zt[0]=Lt),Zt},Ut=function(e,t){var n,o,i,a,l=0,c=he[e]+t[e],u=t[e]>0,d=wt.x+t.x,p=wt.x-mt.x;return n=c>oe.min[e]||c<oe.max[e]?s.panEndFriction:1,c=he[e]+t[e]*n,!s.allowPanToNext&&y!==r.currItem.initialZoomLevel||(ie?"h"!==ae||"x"!==e||V||(u?(c>oe.min[e]&&(n=s.panEndFriction,l=oe.min[e]-c,o=oe.min[e]-fe[e]),(o<=0||p<0)&&en()>1?(a=d,p<0&&d>mt.x&&(a=mt.x)):oe.min.x!==oe.max.x&&(i=c)):(c<oe.max[e]&&(n=s.panEndFriction,l=c-oe.max[e],o=fe[e]-oe.max[e]),(o<=0||p>0)&&en()>1?(a=d,p>0&&d<mt.x&&(a=mt.x)):oe.min.x!==oe.max.x&&(i=c))):a=d,"x"!==e)?void(re||J||y>r.currItem.fitRatio&&(he[e]+=t[e]*n)):(void 0!==a&&(Pe(a,!0),J=a!==mt.x),oe.min.x!==oe.max.x&&(void 0!==i?he.x=i:J||(he.x+=t.x*n)),void 0!==a)},qt=function(e){if(!("mousedown"===e.type&&e.button>0)){if(Jt)return void e.preventDefault();if(!Y||"mousedown"!==e.type){if(At(e,!0)&&e.preventDefault(),_e("pointerDown"),M){var t=i.arraySearch(pt,e.pointerId,"id");t<0&&(t=pt.length),pt[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=zt(e),o=n.length;Q=null,nt(),G&&1!==o||(G=le=!0,i.bind(window,h,r),H=ue=se=W=J=X=j=V=!1,ae=null,_e("firstTouchStart",n),ze(fe,he),me.x=me.y=0,ze(ut,n[0]),ze(dt,ut),mt.x=we.x*ge,ft=[{x:ut.x,y:ut.y}],B=N=Ae(),He(y,!0),Et(),St()),!ee&&o>1&&!re&&!J&&(w=y,V=!1,ee=j=!0,me.y=me.x=0,ze(fe,he),ze(lt,n[0]),ze(st,n[1]),Ft(lt,st,bt),xt.x=Math.abs(bt.x)-he.x,xt.y=Math.abs(bt.y)-he.y,te=ne=It(lt,st))}}},Nt=function(e){if(e.preventDefault(),M){var t=i.arraySearch(pt,e.pointerId,"id");if(t>-1){var n=pt[t];n.x=e.pageX,n.y=e.pageY}}if(G){var o=zt(e);if(ae||X||ee)Q=o;else if(wt.x!==we.x*ge)ae="h";else{var r=Math.abs(o[0].x-ut.x)-Math.abs(o[0].y-ut.y);Math.abs(r)>=at&&(ae=r>0?"h":"v",Q=o)}}},Bt=function(){if(Q){var e=Q.length;if(0!==e)if(ze(lt,Q[0]),ct.x=lt.x-ut.x,ct.y=lt.y-ut.y,ee&&e>1){if(ut.x=lt.x,ut.y=lt.y,!ct.x&&!ct.y&&Tt(Q[1],st))return;ze(st,Q[1]),V||(V=!0,_e("zoomGestureStarted"));var t=It(lt,st),n=Gt(t);n>r.currItem.initialZoomLevel+r.currItem.initialZoomLevel/15&&(ue=!0);var o=1,i=We(),a=Ye();if(n<i)if(s.pinchToClose&&!ue&&w<=r.currItem.initialZoomLevel){var l=i-n,c=1-l/(i/1.2);Me(c),_e("onPinchClose",c),se=!0}else o=(i-n)/i,o>1&&(o=1),n=i-o*(i/3);else n>a&&(o=(n-a)/(6*i),o>1&&(o=1),n=a+o*i);o<0&&(o=0),te=t,Ft(lt,st,gt),me.x+=gt.x-bt.x,me.y+=gt.y-bt.y,ze(bt,gt),he.x=Ze("x",n),he.y=Ze("y",n),H=n>y,y=n,Oe()}else{if(!ae)return;if(le&&(le=!1,Math.abs(ct.x)>=at&&(ct.x-=Q[0].x-dt.x),Math.abs(ct.y)>=at&&(ct.y-=Q[0].y-dt.y)),ut.x=lt.x,ut.y=lt.y,0===ct.x&&0===ct.y)return;if("v"===ae&&s.closeOnVerticalDrag&&!Dt()){me.y+=ct.y,he.y+=ct.y;var u=Rt();return W=!0,_e("onVerticalDrag",u),Me(u),void Oe()}Ot(Ae(),lt.x,lt.y),X=!0,oe=r.currItem.bounds;var d=Ut("x",ct);d||(Ut("y",ct),Ue(he),Oe())}}},Kt=function(e){if(U.isOldAndroid){if(Y&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(Y),Y=setTimeout(function(){Y=0},600))}_e("pointerUp"),At(e,!1)&&e.preventDefault();var t;if(M){var n=i.arraySearch(pt,e.pointerId,"id");if(n>-1)if(t=pt.splice(n,1)[0],navigator.msPointerEnabled){var o={4:"mouse",2:"touch",3:"pen"};t.type=o[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}else t.type=e.pointerType||"mouse"}var a,l=zt(e),c=l.length;if("mouseup"===e.type&&(c=0),2===c)return Q=null,!0;1===c&&ze(dt,l[0]),0!==c||ae||re||(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"})),_e("touchRelease",e,t));var u=-1;if(0===c&&(G=!1,i.unbind(window,h,r),Et(),ee?u=0:yt!==-1&&(u=Ae()-yt)),yt=1===c?Ae():-1,a=u!==-1&&u<150?"zoom":"swipe",ee&&c<2&&(ee=!1,1===c&&(a="zoomPointerUp"),_e("zoomGestureEnded")),Q=null,X||V||re||W)if(nt(),K||(K=Ht()),K.calculateSwipeSpeed("x"),W){var d=Rt();if(d<s.verticalDragRange)r.close();else{var p=he.y,m=ce;ot("verticalDrag",0,1,300,i.easing.cubic.out,function(e){he.y=(r.currItem.initialPosition.y-p)*e+p,Me((1-m)*e+m),Oe()}),_e("onVerticalDrag",1)}}else{if((J||re)&&0===c){var f=Yt(a,K);if(f)return;a="zoomPointerUp"}if(!re)return"swipe"!==a?void jt():void(!J&&y>r.currItem.fitRatio&&Wt(K))}},Ht=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(o){ft.length>1?(e=Ae()-B+50,t=ft[ft.length-2][o]):(e=Ae()-N,t=dt[o]),n.lastFlickOffset[o]=ut[o]-t,n.lastFlickDist[o]=Math.abs(n.lastFlickOffset[o]),n.lastFlickDist[o]>20?n.lastFlickSpeed[o]=n.lastFlickOffset[o]/e:n.lastFlickSpeed[o]=0,Math.abs(n.lastFlickSpeed[o])<.1&&(n.lastFlickSpeed[o]=0),n.slowDownRatio[o]=.95,n.slowDownRatioReverse[o]=1-n.slowDownRatio[o],n.speedDecelerationRatio[o]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(he[e]>oe.min[e]?n.backAnimDestination[e]=oe.min[e]:he[e]<oe.max[e]&&(n.backAnimDestination[e]=oe.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,ot("bounceZoomPan"+e,he[e],n.backAnimDestination[e],t||300,i.easing.sine.out,function(t){he[e]=t,Oe()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,he[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Je.zoomPan&&(Je.zoomPan.raf=O(n.panAnimLoop),n.now=Ae(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Oe(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return he.x=Math.round(he.x),he.y=Math.round(he.y),Oe(),void et("zoomPan")}};return n},Wt=function(e){return e.calculateSwipeSpeed("y"),oe=r.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):(tt("zoomPan"),e.lastNow=Ae(),void e.panAnimLoop())},Yt=function(e,t){var n;re||(vt=p);var o;if("swipe"===e){var a=ut.x-dt.x,l=t.lastFlickDist.x<10;a>rt&&(l||t.lastFlickOffset.x>20)?o=-1:a<-rt&&(l||t.lastFlickOffset.x<-20)&&(o=1)}var c;o&&(p+=o,p<0?(p=s.loop?en()-1:0,c=!0):p>=en()&&(p=s.loop?0:en()-1,c=!0),c&&!s.loop||(xe+=o,ge-=o,n=!0));var u,d=we.x*ge,m=Math.abs(d-wt.x);return n||d>wt.x==t.lastFlickSpeed.x>0?(u=Math.abs(t.lastFlickSpeed.x)>0?m/Math.abs(t.lastFlickSpeed.x):333,u=Math.min(u,400),u=Math.max(u,250)):u=333,vt===p&&(n=!1),re=!0,_e("mainScrollAnimStart"),ot("mainScroll",wt.x,d,u,i.easing.cubic.out,Pe,function(){nt(),re=!1,vt=-1,(n||vt!==p)&&r.updateCurrItem(),_e("mainScrollAnimComplete")}),n&&r.updateCurrItem(!0),n},Gt=function(e){return 1/ne*e*w},jt=function(){var e=y,t=We(),n=Ye();y<t?e=t:y>n&&(e=n);var o,a=1,l=ce;return se&&!H&&!ue&&y<t?(r.close(),!0):(se&&(o=function(e){Me((a-l)*e+l)}),r.zoomTo(e,0,200,i.easing.cubic.out,o),!0)};Ee("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,o,i){S=e+t,D=e+n,k=e+o,_=i?e+i:""};M=U.pointerEvent,M&&U.touch&&(U.touch=!1),M?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):U.touch?(e("touch","start","move","end","cancel"),F=!0):e("mouse","down","move","up"),h=D+" "+k+" "+_,v=S,M&&!F&&(F=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),r.likelyTouchDevice=F,g[S]=qt,g[D]=Nt,g[k]=Kt,_&&(g[_]=g[k]),U.touch&&(v+=" mousedown",h+=" mousemove mouseup",g.mousedown=g[S],g.mousemove=g[D],g.mouseup=g[k]),F||(s.allowPanToNext=!1)}}});var Vt,Xt,$t,Jt,Qt,en,tn,nn=function(t,n,o,a){Vt&&clearTimeout(Vt),Jt=!0,$t=!0;var l;t.initialLayout?(l=t.initialLayout,t.initialLayout=null):l=s.getThumbBoundsFn&&s.getThumbBoundsFn(p);var c=o?s.hideAnimationDuration:s.showAnimationDuration,u=function(){et("initialZoom"),o?(r.template.removeAttribute("style"),r.bg.removeAttribute("style")):(Me(1),n&&(n.style.display="block"),i.addClass(e,"pswp--animated-in"),_e("initialZoom"+(o?"OutEnd":"InEnd"))),a&&a(),Jt=!1};if(!c||!l||void 0===l.x)return _e("initialZoom"+(o?"Out":"In")),y=t.initialZoomLevel,ze(he,t.initialPosition),Oe(),e.style.opacity=o?0:1,Me(1),void(c?setTimeout(function(){u()},c):u());var m=function(){var n=d,a=!r.currItem.src||r.currItem.loadError||s.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),o||(y=l.w/t.w,he.x=l.x,he.y=l.y-P,r[a?"template":"bg"].style.opacity=.001,Oe()),tt("initialZoom"),o&&!n&&i.removeClass(e,"pswp--animated-in"),a&&(o?i[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){i.addClass(e,"pswp--animate_opacity")},30)),Vt=setTimeout(function(){if(_e("initialZoom"+(o?"Out":"In")),o){var r=l.w/t.w,s={x:he.x,y:he.y},d=y,p=ce,m=function(t){1===t?(y=r,he.x=l.x,he.y=l.y-z):(y=(r-d)*t+d,he.x=(l.x-s.x)*t+s.x,he.y=(l.y-z-s.y)*t+s.y),Oe(),a?e.style.opacity=1-t:Me(p-t*p)};n?ot("initialZoom",0,1,c,i.easing.cubic.out,m,u):(m(1),Vt=setTimeout(u,c+20))}else y=t.initialZoomLevel,ze(he,t.initialPosition),Oe(),Me(1),a?e.style.opacity=1:Me(1),Vt=setTimeout(u,c+20)},o?25:90)};m()},on={},rn=[],an={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 Xt.length}},ln=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},sn=function(e,t,n){var o=e.bounds;o.center.x=Math.round((on.x-t)/2),o.center.y=Math.round((on.y-n)/2)+e.vGap.top,o.max.x=t>on.x?Math.round(on.x-t):o.center.x,o.max.y=n>on.y?Math.round(on.y-n)+e.vGap.top:o.center.y,o.min.x=t>on.x?0:o.center.x,o.min.y=n>on.y?e.vGap.top:o.center.y},cn=function(e,t,n){if(e.src&&!e.loadError){var o=!n;if(o&&(e.vGap||(e.vGap={top:0,bottom:0}),_e("parseVerticalMargin",e)),on.x=t.x,on.y=t.y-e.vGap.top-e.vGap.bottom,o){var i=on.x/e.w,r=on.y/e.h;e.fitRatio=i<r?i:r;var a=s.scaleMode;"orig"===a?n=1:"fit"===a&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=ln())}if(!n)return;return sn(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=ln(),e.initialPosition=e.bounds.center,e.bounds},un=function(e,t,n,o,i,a){t.loadError||o&&(t.imageAppended=!0,mn(t,o,t===r.currItem&&Ie),n.appendChild(o),a&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},dn=function(e){e.loading=!0,e.loaded=!1;var t=e.img=i.createEl("pswp__img","img"),n=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=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},pn=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=s.errorMsg.replace("%url%",e.src),!0},mn=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var o=n?e.w:Math.round(e.w*e.fitRatio),i=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=o+"px",e.placeholder.style.height=i+"px"),t.style.width=o+"px",t.style.height=i+"px"}},fn=function(){if(rn.length){for(var e,t=0;t<rn.length;t++)e=rn[t],e.holder.index===e.index&&un(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);rn=[]}};Ee("Controller",{publicMethods:{lazyLoadItem:function(e){e=Se(e);var t=Qt(e);t&&(!t.loaded&&!t.loading||C)&&(_e("gettingData",e,t),t.src&&dn(t))},initController:function(){i.extend(s,an,!0),r.items=Xt=n,Qt=r.getItemAt,en=s.getNumItemsFn,tn=s.loop,en()<3&&(s.loop=!1),ke("beforeChange",function(e){var t,n=s.preload,o=null===e||e>=0,i=Math.min(n[0],en()),a=Math.min(n[1],en());for(t=1;t<=(o?a:i);t++)r.lazyLoadItem(p+t);for(t=1;t<=(o?i:a);t++)r.lazyLoadItem(p-t)}),ke("initialLayout",function(){r.currItem.initialLayout=s.getThumbBoundsFn&&s.getThumbBoundsFn(p)}),ke("mainScrollAnimComplete",fn),ke("initialZoomInEnd",fn),ke("destroy",function(){for(var e,t=0;t<Xt.length;t++)e=Xt[t],e.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);rn=null})},getItemAt:function(e){return e>=0&&(void 0!==Xt[e]&&Xt[e])},allowProgressiveImg:function(){return s.forceProgressiveLoading||!F||s.mouseUsed||screen.width>1200},setContent:function(e,t){s.loop&&(t=Se(t));var n=r.getItemAt(e.index);n&&(n.container=null);var o,a=r.getItemAt(t);if(!a)return void(e.el.innerHTML="");_e("gettingData",t,a),e.index=t,e.item=a;var l=a.container=i.createEl("pswp__zoom-wrap");if(!a.src&&a.html&&(a.html.tagName?l.appendChild(a.html):l.innerHTML=a.html),pn(a),cn(a,ve),!a.src||a.loadError||a.loaded)a.src&&!a.loadError&&(o=i.createEl("pswp__img","img"),o.style.opacity=1,o.src=a.src,mn(a,o),un(t,a,l,o,!0));else{if(a.loadComplete=function(n){if(c){if(e&&e.index===t){if(pn(n,!0))return n.loadComplete=n.img=null,cn(n,ve),Re(n),void(e.index===p&&r.updateCurrZoomItem());n.imageAppended?!Jt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):U.transform&&(re||Jt)?rn.push({item:n,baseDiv:l,img:n.img,index:t,holder:e,clearPlaceholder:!0}):un(t,n,l,n.img,re||Jt,!0)}n.loadComplete=null,n.img=null,_e("imageLoadComplete",t,n)}},i.features.transform){var u="pswp__img pswp__img--placeholder";u+=a.msrc?"":" pswp__img--placeholder--blank";var d=i.createEl(u,a.msrc?"img":"");a.msrc&&(d.src=a.msrc),mn(a,d),l.appendChild(d),a.placeholder=d}a.loading||dn(a),r.allowProgressiveImg()&&(!$t&&U.transform?rn.push({item:a,baseDiv:l,img:a.img,index:t,holder:e}):un(t,a,l,a.img,!0,!0))}$t||t!==p?Re(a):(ie=l.style,nn(a,o||a.img)),e.el.innerHTML="",e.el.appendChild(l)},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var hn,vn={},gn=function(e,t,n){var o=document.createEvent("CustomEvent"),i={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,i),e.target.dispatchEvent(o)};Ee("Tap",{publicMethods:{initTap:function(){ke("firstTouchStart",r.onTapStart),ke("touchRelease",r.onTapRelease),ke("destroy",function(){vn={},hn=null})},onTapStart:function(e){e.length>1&&(clearTimeout(hn),hn=null)},onTapRelease:function(e,t){if(t&&!X&&!j&&!Qe){var n=t;if(hn&&(clearTimeout(hn),hn=null,Ct(n,vn)))return void _e("doubleTap",n);if("mouse"===t.type)return void gn(e,t,"mouse");var o=e.target.tagName.toUpperCase();if("BUTTON"===o||i.hasClass(e.target,"pswp__single-tap"))return void gn(e,t);ze(vn,n),hn=setTimeout(function(){gn(e,t),hn=null},300)}}}});var yn;Ee("DesktopZoom",{publicMethods:{initDesktopZoom:function(){Z||(F?ke("mouseUsed",function(){r.setupDesktopZoom()}):r.setupDesktopZoom(!0))},setupDesktopZoom:function(t){yn={};var n="wheel mousewheel DOMMouseScroll";ke("bindEvents",function(){i.bind(e,n,r.handleMouseWheel)}),ke("unbindEvents",function(){yn&&i.unbind(e,n,r.handleMouseWheel)}),r.mouseZoomedIn=!1;var o,a=function(){r.mouseZoomedIn&&(i.removeClass(e,"pswp--zoomed-in"),r.mouseZoomedIn=!1),y<1?i.addClass(e,"pswp--zoom-allowed"):i.removeClass(e,"pswp--zoom-allowed"),l()},l=function(){o&&(i.removeClass(e,"pswp--dragging"),o=!1)};ke("resize",a),ke("afterChange",a),ke("pointerDown",function(){r.mouseZoomedIn&&(o=!0,i.addClass(e,"pswp--dragging"))}),ke("pointerUp",l),t||a()},handleMouseWheel:function(e){if(y<=r.currItem.fitRatio)return s.modal&&(!s.closeOnScroll||Qe||G?e.preventDefault():A&&Math.abs(e.deltaY)>2&&(d=!0,r.close())),!0;if(e.stopPropagation(),yn.x=0,"deltaX"in e)1===e.deltaMode?(yn.x=18*e.deltaX,yn.y=18*e.deltaY):(yn.x=e.deltaX,yn.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(yn.x=-.16*e.wheelDeltaX),e.wheelDeltaY?yn.y=-.16*e.wheelDeltaY:yn.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;yn.y=e.detail}He(y,!0);var t=he.x-yn.x,n=he.y-yn.y;(s.modal||t<=oe.min.x&&t>=oe.max.x&&n<=oe.min.y&&n>=oe.max.y)&&e.preventDefault(),r.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:ve.x/2+ye.x,y:ve.y/2+ye.y};var n=s.getDoubleTapZoom(!0,r.currItem),o=y===n;r.mouseZoomedIn=!o,r.zoomTo(o?r.currItem.initialZoomLevel:n,t,333),i[(o?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var wn,xn,bn,Tn,Cn,In,En,Sn,Dn,kn,_n,An,Mn={history:!0,galleryUID:1},Fn=function(){return _n.hash.substring(1)},On=function(){wn&&clearTimeout(wn),bn&&clearTimeout(bn)},Rn=function(){var e=Fn(),t={};if(e.length<5)return t;var n,o=e.split("&");for(n=0;n<o.length;n++)if(o[n]){var i=o[n].split("=");i.length<2||(t[i[0]]=i[1])}if(s.galleryPIDs){var r=t.pid;for(t.pid=0,n=0;n<Xt.length;n++)if(Xt[n].pid===r){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Ln=function(){if(bn&&clearTimeout(bn),Qe||G)return void(bn=setTimeout(Ln,500));Tn?clearTimeout(xn):Tn=!0;var e=p+1,t=Qt(p);t.hasOwnProperty("pid")&&(e=t.pid);var n=En+"&gid="+s.galleryUID+"&pid="+e;Sn||_n.hash.indexOf(n)===-1&&(kn=!0);var o=_n.href.split("#")[0]+"#"+n;An?"#"+n!==window.location.hash&&history[Sn?"replaceState":"pushState"]("",document.title,o):Sn?_n.replace(o):_n.hash=n,Sn=!0,xn=setTimeout(function(){Tn=!1},60)};Ee("History",{publicMethods:{initHistory:function(){if(i.extend(s,Mn,!0),s.history){_n=window.location,kn=!1,Dn=!1,Sn=!1,En=Fn(),An="pushState"in history,En.indexOf("gid=")>-1&&(En=En.split("&gid=")[0],En=En.split("?gid=")[0]),ke("afterChange",r.updateURL),ke("unbindEvents",function(){i.unbind(window,"hashchange",r.onHashChange)});var e=function(){In=!0,Dn||(kn?history.back():En?_n.hash=En:An?history.pushState("",document.title,_n.pathname+_n.search):_n.hash=""),On()};ke("unbindEvents",function(){d&&e()}),ke("destroy",function(){In||e()}),ke("firstUpdate",function(){p=Rn().pid});var t=En.indexOf("pid=");t>-1&&(En=En.substring(0,t),"&"===En.slice(-1)&&(En=En.slice(0,-1))),setTimeout(function(){c&&i.bind(window,"hashchange",r.onHashChange)},40)}},onHashChange:function(){return Fn()===En?(Dn=!0,void r.close()):void(Tn||(Cn=!0,r.goTo(Rn().pid),Cn=!1))},updateURL:function(){On(),Cn||(Sn?wn=setTimeout(Ln,800):Ln())}}}),i.extend(r,it)};return e})}});