├── .babelrc ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── LICENSE ├── README.md ├── dist ├── 91ca01537932789056de6f9902446dc1.png ├── b257fa9c5ac8c515ac4d77a667ce2943.svg ├── e34aafbb485a96eaf2a789b2bf3af6fe.gif ├── e3f799c6dec9af194c86decdf7392405.png ├── vue-picture-swipe.js └── vue-picture-swipe.js.map ├── example └── index.html ├── package.json ├── src ├── VuePictureSwipe.vue ├── icons │ ├── rotate-left.svg │ ├── rotate-right.svg │ └── rotate.png └── main.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "modules": false 7 | } 8 | ] 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": "airbnb-base" 3 | }; -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [master, ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [master] 9 | schedule: 10 | - cron: '0 8 * * 5' 11 | 12 | jobs: 13 | analyse: 14 | name: Analyse 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v2 20 | with: 21 | # We must fetch at least the immediate parents so that if this is 22 | # a pull request then we can checkout the head. 23 | fetch-depth: 2 24 | 25 | # If this run was triggered by a pull request event, then checkout 26 | # the head of the pull request instead of the merge commit. 27 | - run: git checkout HEAD^2 28 | if: ${{ github.event_name == 'pull_request' }} 29 | 30 | # Initializes the CodeQL tools for scanning. 31 | - name: Initialize CodeQL 32 | uses: github/codeql-action/init@v1 33 | # Override language selection by uncommenting this and choosing your languages 34 | # with: 35 | # languages: go, javascript, csharp, python, cpp, java 36 | 37 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 38 | # If this step fails, then you should remove it and run the build manually (see below) 39 | - name: Autobuild 40 | uses: github/codeql-action/autobuild@v1 41 | 42 | # ℹ️ Command-line programs to run using the OS shell. 43 | # 📚 https://git.io/JvXDl 44 | 45 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 46 | # and modify them (or add more) to build your code if your project 47 | # uses a compiled language 48 | 49 | #- run: | 50 | # make bootstrap 51 | # make release 52 | 53 | - name: Perform CodeQL Analysis 54 | uses: github/codeql-action/analyze@v1 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-present Raphaël Huchet 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Picture Swipe Gallery 2 | 3 | [![npm download](https://img.shields.io/npm/dt/vue-picture-swipe.svg)](https://www.npmjs.com/package/vue-picture-swipe) 4 | [![npm version](https://img.shields.io/npm/v/vue-picture-swipe.svg)](https://www.npmjs.com/package/vue-picture-swipe) 5 | [![Package Quality](http://npm.packagequality.com/shield/vue-picture-swipe.svg)](http://packagequality.com/#?package=vue-picture-swipe) 6 | [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) 7 | [![MIT License](https://img.shields.io/github/license/rap2hpoutre/vue-picture-swipe.svg)](https://github.com/rap2hpoutre/vue-picture-swipe/blob/master/LICENSE) 8 | 9 | This component is a simple wrapper for the awesome [Photoswipe](http://photoswipe.com/). 10 | It's a [Vue](https://vuejs.org/) plugin that displays a gallery of image with swipe function (and more). 11 | Includes lazy (smart) loading (mobile friendly) and thumbnails. 12 | 13 | 14 | ## Demo 15 | 16 | 17 | 18 | ## Install 19 | 20 | ```bash 21 | npm install --save vue-picture-swipe 22 | ``` 23 | 24 | ## Usage 25 | 26 | You can use it as you want. Here are some examples if you want to use it inline, or in a `.vue` file component or even with Laravel. 27 | 28 | ### Inline usage 29 | 30 | You can using it inline: 31 | 32 | ```html 33 | 37 | ``` 38 | 39 | Just remember to register the component: 40 | 41 | ```javascript 42 | import VuePictureSwipe from 'vue-picture-swipe'; 43 | Vue.component('vue-picture-swipe', VuePictureSwipe); 44 | 45 | new Vue({ 46 | el: '#app' 47 | }) 48 | ``` 49 | 50 | ### Usage in another component 51 | 52 | Create a component `Example.vue`. Then paste this: 53 | 54 | ```vue 55 | 58 | 80 | ``` 81 | 82 | ### Usage with Laravel 83 | 84 | Edit `resources/assets/js/app.js` and add this just before the `new Vue` lines. 85 | 86 | ```javascript 87 | import VuePictureSwipe from 'vue-picture-swipe'; 88 | Vue.component('vue-picture-swipe', VuePictureSwipe); 89 | ``` 90 | 91 | Then run your watcher: 92 | 93 | ```sh 94 | npm run watch 95 | ``` 96 | 97 | ## Advanced usage 98 | 99 | ### PhotoSwipe options 100 | 101 | Use `options` for [Photoswipe options](http://photoswipe.com/documentation/options.html). 102 | 103 | ```html 104 | 105 | 106 | ``` 107 | 108 | ### PhotoSwipe instance 109 | 110 | You can access the PhotoSwipe instance via setting a ref, the instance object is exposed as `pswp`. 111 | 112 | ```html 113 | 114 | ``` 115 | ```js 116 | this.$refs.pictureSwipe.pswp 117 | ``` 118 | 119 | ### Events 120 | 121 | | open | Attributes | Listen to | Description | 122 | | --- | --- | --- | --- | 123 | | Open | none | @open | Emitted after gallery opens | 124 | | Close | none | @close | Emitted after gallery closes | 125 | 126 | 127 | ## Why? 128 | 129 | I did not found any vue component that uses thumbnail (smaller version of images) and is mobile-friendly (swipe) 130 | 131 | - [This one](https://github.com/LS1231/vue-preview) is documented (and issued) in chinese only and has no thumbnails. Edit: I translated the readme (with google translate) and submitted [a PR that was accepted](https://github.com/LS1231/vue-preview/pull/32), so now, the documentation is in english) 132 | - [This one](https://github.com/zhaohaodang/vue-see) is documented (and issued) in chinese too and has no thumbnails either. 133 | - [This one](https://github.com/ymyang/vue-photoswipe) has no documentation. 134 | - [This one](https://github.com/SabatinoMasala/vue-simple-photoswipe) is a kind of fork of the previous one 135 | - ... 136 | 137 | So I created mine. 138 | 139 | 140 | 141 | Source: https://xkcd.com/927/ 142 | -------------------------------------------------------------------------------- /dist/91ca01537932789056de6f9902446dc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rap2hpoutre/vue-picture-swipe/b58abc2f834e7c4ccf2ab7ecc5700cfd559b9518/dist/91ca01537932789056de6f9902446dc1.png -------------------------------------------------------------------------------- /dist/b257fa9c5ac8c515ac4d77a667ce2943.svg: -------------------------------------------------------------------------------- 1 | default-skin 2 -------------------------------------------------------------------------------- /dist/e34aafbb485a96eaf2a789b2bf3af6fe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rap2hpoutre/vue-picture-swipe/b58abc2f834e7c4ccf2ab7ecc5700cfd559b9518/dist/e34aafbb485a96eaf2a789b2bf3af6fe.gif -------------------------------------------------------------------------------- /dist/e3f799c6dec9af194c86decdf7392405.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rap2hpoutre/vue-picture-swipe/b58abc2f834e7c4ccf2ab7ecc5700cfd559b9518/dist/e3f799c6dec9af194c86decdf7392405.png -------------------------------------------------------------------------------- /dist/vue-picture-swipe.js: -------------------------------------------------------------------------------- 1 | var VuePictureSwipe=function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[n].concat(r).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i=0&&u.splice(t,1)}function b(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,o,i,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var a=c++;n=p||(p=b(t)),o=x.bind(null,n,a,!1),i=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),o=k.bind(null,n,t),i=function(){w(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),o=C.bind(null,n),i=function(){w(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=m(e,t);return f(n,t),function(e){for(var o=[],i=0;i0&&(r=parseInt(r[1],10))>=1&&r<8&&(n.isOldIOSPhone=!0)}var a=o.match(/Android\s([0-9\.]*)/),s=a?a[1]:0;(s=parseFloat(s))>=1&&(s<4.4&&(n.isOldAndroid=!0),n.androidVersion=s),n.isMobileOpera=/opera mini|opera mobi/i.test(o)}for(var l,p,c=["transform","perspective","animationName"],u=["","webkit","Moz","ms","O"],d=0;d<4;d++){t=u[d];for(var f=0;f<3;f++)l=c[f],p=t+(t?l.charAt(0).toUpperCase()+l.slice(1):l),!n[l]&&p in e&&(n[l]=p);t&&!n.raf&&(t=t.toLowerCase(),n.raf=window[t+"RequestAnimationFrame"],n.raf&&(n.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}if(!n.raf){var m=0;n.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-m)),o=window.setTimeout((function(){e(t+n)}),n);return m=t+n,o},n.caf=function(e){clearTimeout(e)}}return n.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,i.features=n,n}};i.detectFeatures(),i.features.oldIE&&(i.bind=function(e,t,n,o){t=t.split(" ");for(var i,a=(o?"detach":"attach")+"Event",s=function(){n.handleEvent.call(n)},l=0;lt-1?e-t:e<0?t+e:e},ke={},Ie=function(e,t){return ke[e]||(ke[e]=[]),ke[e].push(t)},Te=function(e){var t=ke[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;oa.currItem.fitRatio?ye||($t(a.currItem,!1,!0),ye=!0):ye&&($t(a.currItem),ye=!1)),De(ne,de.x,de.y,b))},Oe=function(e){e.container&&De(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Ae=function(e,t){t[D]=v+e+"px, 0px"+_},Re=function(e,t){if(!s.loop&&t){var n=u+(we.x*me-e)/we.x,o=Math.round(e-ut.x);(n<0&&o>0||n>=Zt()-1&&o<0)&&(e=ut.x+o*s.mainScrollEndFriction)}ut.x=e,Ae(e,d)},ze=function(e,t){var n=dt[e]-he[e];return ue[e]+ce[e]+n-n*(t/g)},Fe=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Le=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Pe=null,Ue=function t(){Pe&&(i.unbind(document,"mousemove",t),i.addClass(e,"pswp--has_mouse"),s.mouseUsed=!0,Te("mouseUsed")),Pe=setTimeout((function(){Pe=null}),100)},Ne=function(e,t){var n=Wt(a.currItem,fe,e);return t&&(te=n),n},Ze=function(e){return e||(e=a.currItem),e.initialZoomLevel},Be=function(e){return e||(e=a.currItem),e.w>0?s.maxSpreadZoom:1},je=function(e,t,n,o){return o===a.currItem.initialZoomLevel?(n[e]=a.currItem.initialPosition[e],!0):(n[e]=ze(e,o),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]=o)return qe(e),r(n),void(a&&a());r((n-t)*i(s/o)+t),Ye[e].raf=A(p)}}()},Je={shout:Te,listen:Ie,viewportSize:fe,options:s,isMainScrollAnimating:function(){return oe},getZoomLevel:function(){return b},getCurrentIndex:function(){return u},isDragging:function(){return Y},isZooming:function(){return Q},setScrollOffset:function(e,t){he.x=e,P=he.y=t,Te("updateScrollOffset",he)},applyZoomPan:function(e,t,n,o){de.x=t,de.y=n,b=e,Me(o)},init:function(){if(!l&&!p){var n;a.framework=i,a.template=e,a.bg=i.getChildByClass(e,"pswp__bg"),z=e.className,l=!0,U=i.detectFeatures(),A=U.raf,R=U.caf,D=U.transform,L=U.oldIE,a.scrollWrap=i.getChildByClass(e,"pswp__scroll-wrap"),a.container=i.getChildByClass(a.scrollWrap,"pswp__container"),d=a.container.style,a.itemHolders=C=[{el:a.container.children[0],wrap:0,index:-1},{el:a.container.children[1],wrap:0,index:-1},{el:a.container.children[2],wrap:0,index:-1}],C[0].el.style.display=C[2].el.style.display="none",function(){if(D){var t=U.perspective&&!O;return v="translate"+(t?"3d(":"("),void(_=U.perspective?", 0px)":")")}D="left",i.addClass(e,"pswp--ie"),Ae=function(e,t){t.left=e+"px"},Oe=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"},Me=function(){if(ne){var e=ne,t=a.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=de.x+"px",e.top=de.y+"px"}}}(),w={resize:a.updateSize,orientationchange:function(){clearTimeout(N),N=setTimeout((function(){fe.x!==a.scrollWrap.clientWidth&&a.updateSize()}),500)},scroll:We,keydown:Ke,click:He};var o=U.isOldIOSPhone||U.isOldAndroid||U.isMobileOpera;for(U.animationName&&U.transform&&!o||(s.showAnimationDuration=s.hideAnimationDuration=0),n=0;n=Zt())&&(u=0),a.currItem=Nt(u),(U.isOldIOSPhone||U.isOldAndroid)&&(ge=!1),e.setAttribute("aria-hidden","false"),s.modal&&(ge?e.style.position="fixed":(e.style.position="absolute",e.style.top=i.getScrollY()+"px")),void 0===P&&(Te("initialLayout"),P=F=i.getScrollY());var r="pswp--open ";for(s.mainClass&&(r+=s.mainClass+" "),s.showHideOpacity&&(r+="pswp--animate_opacity "),r+=O?"pswp--touch":"pswp--notouch",r+=U.animationName?" pswp--css_animation":"",r+=U.svg?" pswp--svg":"",i.addClass(e,r),a.updateSize(),f=-1,be=null,n=0;n<3;n++)Ae((n+f)*we.x,C[n].el.style);L||i.bind(a.scrollWrap,h,a),Ie("initialZoomInEnd",(function(){a.setContent(C[0],u-1),a.setContent(C[2],u+1),C[0].el.style.display=C[2].el.style.display="block",s.focus&&e.focus(),i.bind(document,"keydown",a),U.transform&&i.bind(a.scrollWrap,"click",a),s.mouseUsed||i.bind(document,"mousemove",Ue),i.bind(window,"resize scroll orientationchange",a),Te("bindEvents")})),a.setContent(C[1],u),a.updateCurrItem(),Te("afterInit"),ge||(y=setInterval((function(){Ge||Y||Q||b!==a.currItem.initialZoomLevel||a.updateSize()}),1e3)),i.addClass(e,"pswp--visible")}},close:function(){l&&(l=!1,p=!0,Te("close"),i.unbind(window,"resize scroll orientationchange",a),i.unbind(window,"scroll",w.scroll),i.unbind(document,"keydown",a),i.unbind(document,"mousemove",Ue),U.transform&&i.unbind(a.scrollWrap,"click",a),Y&&i.unbind(window,m,a),clearTimeout(N),Te("unbindEvents"),Bt(a.currItem,null,!0,a.destroy))},destroy:function(){Te("destroy"),Ft&&clearTimeout(Ft),e.setAttribute("aria-hidden","true"),e.className=z,y&&clearInterval(y),i.unbind(a.scrollWrap,h,a),i.unbind(window,"scroll",a),ht(),Ve(),ke=null},panTo:function(e,t,n){n||(e>te.min.x?e=te.min.x:ete.min.y?t=te.min.y:t=3&&(f+=be+(be>0?-3:3),n=3);for(var o=0;o0?(t=C.shift(),C[2]=t,f++,Ae((f+2)*we.x,t.el.style),a.setContent(t,u-n+o+1+1)):(t=C.pop(),C.unshift(t),f--,Ae(f*we.x,t.el.style),a.setContent(t,u+n-o-1-1));if(ne&&1===Math.abs(be)){var i=Nt(k);i.initialZoomLevel!==b&&(Wt(i,fe),$t(i),Oe(i))}be=0,a.updateCurrZoomItem(),k=u,Te("afterChange")}}},updateSize:function(t){if(!ge&&s.modal){var n=i.getScrollY();if(P!==n&&(e.style.top=n+"px",P=n),!t&&_e.x===window.innerWidth&&_e.y===window.innerHeight)return;_e.x=window.innerWidth,_e.y=window.innerHeight,e.style.height=_e.y+"px"}if(fe.x=a.scrollWrap.clientWidth,fe.y=a.scrollWrap.clientHeight,We(),we.x=fe.x+Math.round(fe.x*s.spacing),we.y=fe.y,Re(we.x*me),Te("beforeResize"),void 0!==f){for(var o,r,l,p=0;p<3;p++)o=C[p],Ae((p+f)*we.x,o.el.style),l=u+p-1,s.loop&&Zt()>2&&(l=Ce(l)),(r=Nt(l))&&(x||r.needsUpdate||!r.bounds)?(a.cleanSlide(r),a.setContent(o,l),1===p&&(a.currItem=r,a.updateCurrZoomItem(!0)),r.needsUpdate=!1):-1===o.index&&l>=0&&a.setContent(o,l),r&&r.container&&(Wt(r,fe),$t(r),Oe(r));x=!1}g=b=a.currItem.initialZoomLevel,(te=a.currItem.bounds)&&(de.x=te.center.x,de.y=te.center.y,Me(!0)),Te("resize")},zoomTo:function(e,t,n,o,r){t&&(g=b,dt.x=Math.abs(t.x)-de.x,dt.y=Math.abs(t.y)-de.y,Fe(ue,de));var a=Ne(e,!1),s={};je("x",a,s,e),je("y",a,s,e);var l=b,p=de.x,c=de.y;Le(s);var u=function(t){1===t?(b=e,de.x=s.x,de.y=s.y):(b=(e-l)*t+l,de.x=(s.x-p)*t+p,de.y=(s.y-c)*t+c),r&&r(t),Me(1===t)};n?Xe("customZoomTo",0,1,n,o||i.easing.sine.inOut,u):u(1)}},Qe={},et={},tt={},nt={},ot={},it=[],rt={},at=[],st={},lt=0,pt={x:0,y:0},ct=0,ut={x:0,y:0},dt={x:0,y:0},ft={x:0,y:0},mt=function(e,t){return st.x=Math.abs(e.x-t.x),st.y=Math.abs(e.y-t.y),Math.sqrt(st.x*st.x+st.y*st.y)},ht=function(){V&&(R(V),V=null)},wt={},bt=function(e,t){return wt.prevent=!function e(t,n){return!(!t||t===document)&&!(t.getAttribute("class")&&t.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(n(t)?t:e(t.parentNode,n))}(e.target,s.isClickableElement),Te("preventDragEvent",e,t,wt),wt.prevent},gt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},vt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},_t=function(){var e=de.y-a.currItem.initialPosition.y;return 1-Math.abs(e/(fe.y/2))},yt={},xt={},Ct=[],kt=function(e){for(;Ct.length>0;)Ct.pop();return M?(pe=0,it.forEach((function(e){0===pe?Ct[0]=e:1===pe&&(Ct[1]=e),pe++}))):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Ct[0]=gt(e.touches[0],yt),e.touches.length>1&&(Ct[1]=gt(e.touches[1],xt))):(yt.x=e.pageX,yt.y=e.pageY,yt.id="",Ct[0]=yt),Ct},It=function(e,t){var n,o,i,r,l=de[e]+t[e],p=t[e]>0,c=ut.x+t.x,u=ut.x-rt.x;if(n=l>te.min[e]||lte.min[e]&&(n=s.panEndFriction,te.min[e],o=te.min[e]-ue[e]),(o<=0||u<0)&&Zt()>1?(r=c,u<0&&c>rt.x&&(r=rt.x)):te.min.x!==te.max.x&&(i=l)):(l0)&&Zt()>1?(r=c,u>0&&ca.currItem.fitRatio&&(de[e]+=t[e]*n)},Tt=function(e){if(!("mousedown"===e.type&&e.button>0))if(Ut)e.preventDefault();else if(!W||"mousedown"!==e.type){if(bt(e,!0)&&e.preventDefault(),Te("pointerDown"),M){var t=i.arraySearch(it,e.pointerId,"id");t<0&&(t=it.length),it[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=kt(e),o=n.length;J=null,Ve(),Y&&1!==o||(Y=re=!0,i.bind(window,m,a),K=le=ae=H=X=$=G=q=!1,ie=null,Te("firstTouchStart",n),Fe(ue,de),ce.x=ce.y=0,Fe(nt,n[0]),Fe(ot,nt),rt.x=we.x*me,at=[{x:nt.x,y:nt.y}],B=Z=Ee(),Ne(b,!0),ht(),function e(){Y&&(V=A(e),St())}()),!Q&&o>1&&!oe&&!X&&(g=b,q=!1,Q=G=!0,ce.y=ce.x=0,Fe(ue,de),Fe(Qe,n[0]),Fe(et,n[1]),vt(Qe,et,ft),dt.x=Math.abs(ft.x)-de.x,dt.y=Math.abs(ft.y)-de.y,ee=mt(Qe,et))}},Et=function(e){if(e.preventDefault(),M){var t=i.arraySearch(it,e.pointerId,"id");if(t>-1){var n=it[t];n.x=e.pageX,n.y=e.pageY}}if(Y){var o=kt(e);if(ie||$||Q)J=o;else if(ut.x!==we.x*me)ie="h";else{var r=Math.abs(o[0].x-nt.x)-Math.abs(o[0].y-nt.y);Math.abs(r)>=10&&(ie=r>0?"h":"v",J=o)}}},St=function(){if(J){var e=J.length;if(0!==e)if(Fe(Qe,J[0]),tt.x=Qe.x-nt.x,tt.y=Qe.y-nt.y,Q&&e>1){if(nt.x=Qe.x,nt.y=Qe.y,!tt.x&&!tt.y&&function(e,t){return e.x===t.x&&e.y===t.y}(J[1],et))return;Fe(et,J[1]),q||(q=!0,Te("zoomGestureStarted"));var t=mt(Qe,et),n=Rt(t);n>a.currItem.initialZoomLevel+a.currItem.initialZoomLevel/15&&(le=!0);var o=1,i=Ze(),r=Be();if(n1&&(o=1),n=i-o*(i/3);else n>r&&((o=(n-r)/(6*i))>1&&(o=1),n=r+o*i);o<0&&(o=0),vt(Qe,et,pt),ce.x+=pt.x-ft.x,ce.y+=pt.y-ft.y,Fe(ft,pt),de.x=ze("x",n),de.y=ze("y",n),K=n>b,b=n,Me()}else{if(!ie)return;if(re&&(re=!1,Math.abs(tt.x)>=10&&(tt.x-=J[0].x-ot.x),Math.abs(tt.y)>=10&&(tt.y-=J[0].y-ot.y)),nt.x=Qe.x,nt.y=Qe.y,0===tt.x&&0===tt.y)return;if("v"===ie&&s.closeOnVerticalDrag&&"fit"===s.scaleMode&&b===a.currItem.initialZoomLevel){ce.y+=tt.y,de.y+=tt.y;var p=_t();return H=!0,Te("onVerticalDrag",p),Se(p),void Me()}!function(e,t,n){if(e-B>50){var o=at.length>2?at.shift():{};o.x=t,o.y=n,at.push(o),B=e}}(Ee(),Qe.x,Qe.y),$=!0,te=a.currItem.bounds,It("x",tt)||(It("y",tt),Le(de),Me())}}},Dt=function(e){if(U.isOldAndroid){if(W&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(W),W=setTimeout((function(){W=0}),600))}var t;if(Te("pointerUp"),bt(e,!1)&&e.preventDefault(),M){var n=i.arraySearch(it,e.pointerId,"id");n>-1&&(t=it.splice(n,1)[0],navigator.msPointerEnabled?(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type||(t.type=e.pointerType||"mouse")):t.type=e.pointerType||"mouse")}var o,r=kt(e),l=r.length;if("mouseup"===e.type&&(l=0),2===l)return J=null,!0;1===l&&Fe(ot,r[0]),0!==l||ie||oe||(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"})),Te("touchRelease",e,t));var p=-1;if(0===l&&(Y=!1,i.unbind(window,m,a),ht(),Q?p=0:-1!==ct&&(p=Ee()-ct)),ct=1===l?Ee():-1,o=-1!==p&&p<150?"zoom":"swipe",Q&&l<2&&(Q=!1,1===l&&(o="zoomPointerUp"),Te("zoomGestureEnded")),J=null,$||q||oe||H)if(Ve(),j||(j=Mt()),j.calculateSwipeSpeed("x"),H)if(_t()a.currItem.fitRatio&&Ot(j):zt())}},Mt=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(o){at.length>1?(e=Ee()-B+50,t=at[at.length-2][o]):(e=Ee()-Z,t=ot[o]),n.lastFlickOffset[o]=nt[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]||(de[e]>te.min[e]?n.backAnimDestination[e]=te.min[e]:de[e]30&&(p||t.lastFlickOffset.x>20)?o=-1:l<-30&&(p||t.lastFlickOffset.x<-20)&&(o=1)}o&&((u+=o)<0?(u=s.loop?Zt()-1:0,r=!0):u>=Zt()&&(u=s.loop?0:Zt()-1,r=!0),r&&!s.loop||(be+=o,me-=o,n=!0));var c,d=we.x*me,f=Math.abs(d-ut.x);return n||d>ut.x==t.lastFlickSpeed.x>0?(c=Math.abs(t.lastFlickSpeed.x)>0?f/Math.abs(t.lastFlickSpeed.x):333,c=Math.min(c,400),c=Math.max(c,250)):c=333,lt===u&&(n=!1),oe=!0,Te("mainScrollAnimStart"),Xe("mainScroll",ut.x,d,c,i.easing.cubic.out,Re,(function(){Ve(),oe=!1,lt=-1,(n||lt!==u)&&a.updateCurrItem(),Te("mainScrollAnimComplete")})),n&&a.updateCurrItem(!0),n},Rt=function(e){return 1/ee*e*g},zt=function(){var e=b,t=Ze(),n=Be();bn&&(e=n);var o,r=se;return ae&&!K&&!le&&b1||navigator.msMaxTouchPoints>1),a.likelyTouchDevice=O,w[I]=Tt,w[T]=Et,w[E]=Dt,S&&(w[S]=w[E]),U.touch&&(h+=" mousedown",m+=" mousemove mouseup",w.mousedown=w[I],w.mousemove=w[T],w.mouseup=w[E]),O||(s.allowPanToNext=!1)}}});var Ft,Lt,Pt,Ut,Nt,Zt,Bt=function(t,n,o,r){var l;Ft&&clearTimeout(Ft),Ut=!0,Pt=!0,t.initialLayout?(l=t.initialLayout,t.initialLayout=null):l=s.getThumbBoundsFn&&s.getThumbBoundsFn(u);var p,d,f=o?s.hideAnimationDuration:s.showAnimationDuration,m=function(){qe("initialZoom"),o?(a.template.removeAttribute("style"),a.bg.removeAttribute("style")):(Se(1),n&&(n.style.display="block"),i.addClass(e,"pswp--animated-in"),Te("initialZoom"+(o?"OutEnd":"InEnd"))),r&&r(),Ut=!1};if(!f||!l||void 0===l.x)return Te("initialZoom"+(o?"Out":"In")),b=t.initialZoomLevel,Fe(de,t.initialPosition),Me(),e.style.opacity=o?0:1,Se(1),void(f?setTimeout((function(){m()}),f):m());p=c,d=!a.currItem.src||a.currItem.loadError||s.showHideOpacity,t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),o||(b=l.w/t.w,de.x=l.x,de.y=l.y-F,a[d?"template":"bg"].style.opacity=.001,Me()),$e("initialZoom"),o&&!p&&i.removeClass(e,"pswp--animated-in"),d&&(o?i[(p?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout((function(){i.addClass(e,"pswp--animate_opacity")}),30)),Ft=setTimeout((function(){if(Te("initialZoom"+(o?"Out":"In")),o){var n=l.w/t.w,r={x:de.x,y:de.y},a=b,s=se,c=function(t){1===t?(b=n,de.x=l.x,de.y=l.y-P):(b=(n-a)*t+a,de.x=(l.x-r.x)*t+r.x,de.y=(l.y-P-r.y)*t+r.y),Me(),d?e.style.opacity=1-t:Se(s-t*s)};p?Xe("initialZoom",0,1,f,i.easing.cubic.out,c,m):(c(1),Ft=setTimeout(m,f+20))}else b=t.initialZoomLevel,Fe(de,t.initialPosition),Me(),Se(1),d?e.style.opacity=1:Se(1),Ft=setTimeout(m,f+20)}),o?25:90)},jt={},Kt=[],Ht={index:0,errorMsg:'
The image could not be loaded.
',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Lt.length}},Wt=function(e,t,n){if(e.src&&!e.loadError){var o=!n;if(o&&(e.vGap||(e.vGap={top:0,bottom:0}),Te("parseVerticalMargin",e)),jt.x=t.x,jt.y=t.y-e.vGap.top-e.vGap.bottom,o){var i=jt.x/e.w,r=jt.y/e.h;e.fitRatio=i1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!n)return;return function(e,t,n){var o=e.bounds;o.center.x=Math.round((jt.x-t)/2),o.center.y=Math.round((jt.y-n)/2)+e.vGap.top,o.max.x=t>jt.x?Math.round(jt.x-t):o.center.x,o.max.y=n>jt.y?Math.round(jt.y-n)+e.vGap.top:o.center.y,o.min.x=t>jt.x?0:o.center.x,o.min.y=n>jt.y?e.vGap.top:o.center.y}(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={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},e.initialPosition=e.bounds.center,e.bounds},Yt=function(e,t,n,o,i,r){t.loadError||o&&(t.imageAppended=!0,$t(t,o,t===a.currItem&&ye),n.appendChild(o),r&&setTimeout((function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)}),500))},Gt=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},qt=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},$t=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"}},Vt=function(){if(Kt.length){for(var e,t=0;t=0,i=Math.min(n[0],Zt()),r=Math.min(n[1],Zt());for(t=1;t<=(o?r:i);t++)a.lazyLoadItem(u+t);for(t=1;t<=(o?i:r);t++)a.lazyLoadItem(u-t)})),Ie("initialLayout",(function(){a.currItem.initialLayout=s.getThumbBoundsFn&&s.getThumbBoundsFn(u)})),Ie("mainScrollAnimComplete",Vt),Ie("initialZoomInEnd",Vt),Ie("destroy",(function(){for(var e,t=0;t=0&&void 0!==Lt[e]&&Lt[e]},allowProgressiveImg:function(){return s.forceProgressiveLoading||!O||s.mouseUsed||screen.width>1200},setContent:function(e,t){s.loop&&(t=Ce(t));var n=a.getItemAt(e.index);n&&(n.container=null);var o,r=a.getItemAt(t);if(r){Te("gettingData",t,r),e.index=t,e.item=r;var p=r.container=i.createEl("pswp__zoom-wrap");if(!r.src&&r.html&&(r.html.tagName?p.appendChild(r.html):p.innerHTML=r.html),qt(r),Wt(r,fe),!r.src||r.loadError||r.loaded)r.src&&!r.loadError&&((o=i.createEl("pswp__img","img")).style.opacity=1,o.src=r.src,$t(r,o),Yt(0,r,p,o));else{if(r.loadComplete=function(n){if(l){if(e&&e.index===t){if(qt(n,!0))return n.loadComplete=n.img=null,Wt(n,fe),Oe(n),void(e.index===u&&a.updateCurrZoomItem());n.imageAppended?!Ut&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):U.transform&&(oe||Ut)?Kt.push({item:n,baseDiv:p,img:n.img,index:t,holder:e,clearPlaceholder:!0}):Yt(0,n,p,n.img,0,!0)}n.loadComplete=null,n.img=null,Te("imageLoadComplete",t,n)}},i.features.transform){var c="pswp__img pswp__img--placeholder";c+=r.msrc?"":" pswp__img--placeholder--blank";var d=i.createEl(c,r.msrc?"img":"");r.msrc&&(d.src=r.msrc),$t(r,d),p.appendChild(d),r.placeholder=d}r.loading||Gt(r),a.allowProgressiveImg()&&(!Pt&&U.transform?Kt.push({item:r,baseDiv:p,img:r.img,index:t,holder:e}):Yt(0,r,p,r.img,0,!0))}Pt||t!==u?Oe(r):(ne=p.style,Bt(r,o||r.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 Xt,Jt,Qt={},en=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)};xe("Tap",{publicMethods:{initTap:function(){Ie("firstTouchStart",a.onTapStart),Ie("touchRelease",a.onTapRelease),Ie("destroy",(function(){Qt={},Xt=null}))},onTapStart:function(e){e.length>1&&(clearTimeout(Xt),Xt=null)},onTapRelease:function(e,t){var n,o;if(t&&!$&&!G&&!Ge){var r=t;if(Xt&&(clearTimeout(Xt),Xt=null,n=r,o=Qt,Math.abs(n.x-o.x)<25&&Math.abs(n.y-o.y)<25))return void Te("doubleTap",r);if("mouse"===t.type)return void en(e,t,"mouse");if("BUTTON"===e.target.tagName.toUpperCase()||i.hasClass(e.target,"pswp__single-tap"))return void en(e,t);Fe(Qt,r),Xt=setTimeout((function(){en(e,t),Xt=null}),300)}}}}),xe("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(O?Ie("mouseUsed",(function(){a.setupDesktopZoom()})):a.setupDesktopZoom(!0))},setupDesktopZoom:function(t){Jt={};var n="wheel mousewheel DOMMouseScroll";Ie("bindEvents",(function(){i.bind(e,n,a.handleMouseWheel)})),Ie("unbindEvents",(function(){Jt&&i.unbind(e,n,a.handleMouseWheel)})),a.mouseZoomedIn=!1;var o,r=function(){a.mouseZoomedIn&&(i.removeClass(e,"pswp--zoomed-in"),a.mouseZoomedIn=!1),b<1?i.addClass(e,"pswp--zoom-allowed"):i.removeClass(e,"pswp--zoom-allowed"),s()},s=function(){o&&(i.removeClass(e,"pswp--dragging"),o=!1)};Ie("resize",r),Ie("afterChange",r),Ie("pointerDown",(function(){a.mouseZoomedIn&&(o=!0,i.addClass(e,"pswp--dragging"))})),Ie("pointerUp",s),t||r()},handleMouseWheel:function(e){if(b<=a.currItem.fitRatio)return s.modal&&(!s.closeOnScroll||Ge||Y?e.preventDefault():D&&Math.abs(e.deltaY)>2&&(c=!0,a.close())),!0;if(e.stopPropagation(),Jt.x=0,"deltaX"in e)1===e.deltaMode?(Jt.x=18*e.deltaX,Jt.y=18*e.deltaY):(Jt.x=e.deltaX,Jt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(Jt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?Jt.y=-.16*e.wheelDeltaY:Jt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;Jt.y=e.detail}Ne(b,!0);var t=de.x-Jt.x,n=de.y-Jt.y;(s.modal||t<=te.min.x&&t>=te.max.x&&n<=te.min.y&&n>=te.max.y)&&e.preventDefault(),a.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:fe.x/2+he.x,y:fe.y/2+he.y};var n=s.getDoubleTapZoom(!0,a.currItem),o=b===n;a.mouseZoomedIn=!o,a.zoomTo(o?a.currItem.initialZoomLevel:n,t,333),i[(o?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var tn,nn,on,rn,an,sn,ln,pn,cn,un,dn,fn,mn={history:!0,galleryUID:1},hn=function(){return dn.hash.substring(1)},wn=function(){tn&&clearTimeout(tn),on&&clearTimeout(on)},bn=function(){var e=hn(),t={};if(e.length<5)return t;var n,o=e.split("&");for(n=0;n-1&&"&"===(ln=ln.substring(0,t)).slice(-1)&&(ln=ln.slice(0,-1)),setTimeout((function(){l&&i.bind(window,"hashchange",a.onHashChange)}),40)}},onHashChange:function(){if(hn()===ln)return cn=!0,void a.close();rn||(an=!0,a.goTo(bn().pid),an=!1)},updateURL:function(){wn(),an||(pn?tn=setTimeout(gn,800):gn())}}}),i.extend(a,Je)}})?o.call(t,n,t,e):o)||(e.exports=i)},function(e,t,n){var o,i;"function"==typeof Symbol&&Symbol.iterator;void 0===(i="function"==typeof(o=function(){"use strict";return function(e,t){var n,o,i,r,a,s,l,p,c,u,d,f,m,h,w,b,g,v,_=this,y=!1,x=!0,C=!0,k={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},I=function(e){if(b)return!0;e=e||window.event,w.timeToIdle&&w.mouseUsed&&!c&&z();for(var n,o,i=(e.target||e.srcElement).getAttribute("class")||"",r=0;r-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),b=!0;var a=t.features.isOldAndroid?600:30;setTimeout((function(){b=!1}),a)}},T=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},E=function(){var e=1===w.getNumItemsFn();e!==h&&(T(o,"ui--one-slide",e),h=e)},S=function(){T(l,"share-modal--hidden",C)},D=function(){return(C=!C)?(t.removeClass(l,"pswp__share-modal--fade-in"),setTimeout((function(){C&&S()}),300)):(S(),setTimeout((function(){C||t.addClass(l,"pswp__share-modal--fade-in")}),30)),C||O(),!1},M=function(t){var n=(t=t||window.event).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)),C||D(),1))},O=function(){for(var e,t,n,o,i="",r=0;r