UNPKG

sd-view-img

Version:
10 lines 52.8 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("sd-view-img",[],t):"object"==typeof exports?exports["sd-view-img"]=t():e["sd-view-img"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=3)}([function(e,t){function i(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var r=n(o);return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([r]).join("\n")}return[i].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=i(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&n[a[0]]||(i&&!a[2]?a[2]=i:i&&(a[2]="("+a[2]+") and ("+i+")"),t.push(a))}},t}},function(e,t,i){function n(e){for(var t=0;t<e.length;t++){var i=e[t],n=h[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(r(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{for(var a=[],o=0;o<i.parts.length;o++)a.push(r(i.parts[o]));h[i.id]={id:i.id,refs:1,parts:a}}}}function o(){var e=document.createElement("style");return e.type="text/css",u.appendChild(e),e}function r(e){var t,i,n=document.querySelector("style["+g+'~="'+e.id+'"]');if(n){if(v)return m;n.parentNode.removeChild(n)}if(w){var r=f++;n=d||(d=o()),t=a.bind(null,n,r,!1),i=a.bind(null,n,r,!0)}else n=o(),t=s.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}function a(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function s(e,t){var i=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),p.ssrId&&e.setAttribute(g,t.id),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=i(7),h={},u=l&&(document.head||document.getElementsByTagName("head")[0]),d=null,f=0,v=!1,m=function(){},p=null,g="data-vue-ssr-id",w="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,i,o){v=i,p=o||{};var r=c(e,t);return n(r),function(t){for(var i=[],o=0;o<r.length;o++){var a=r[o],s=h[a.id];s.refs--,i.push(s)}t?(r=c(e,t),n(r)):r=[];for(var o=0;o<i.length;o++){var s=i[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete h[s.id]}}}};var b=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}()},function(e,t,i){"use strict";var n=i(9),o=(i.n(n),i(11)),r=i.n(o);t.a={props:{isView:{type:Boolean,default:!1},bucketName:{type:String,require:!0},serviceMark:{type:String,require:!0},objectName:{type:String,default:""},fileName:{type:String,require:!0},alt:{type:String,default:""}},created:function(){this.getPresignDown(),this.isView&&this.initViewTool()},data:function(){return{imgUrl:"",viewer:null}},watch:{isView:{handler:function(e,t){t&&this.initViewTool()},immediate:!0},bucketName:{handler:function(e){e&&this.objectName&&this.serviceMark&&this.getPresignDown()},immediate:!0}},methods:{initViewTool:function(){var e=this.$refs.galleyImg;this.viewer=new r.a(e,{title:function(e){return e.alt+" ("+(this.index+1)+"/"+this.length+")"}})},handleView:function(){this.isView&&(this.viewer.update(),this.viewer.view())},getPresignDown:function(){var e=this,t={serviceMark:this.serviceMark,bucket:this.bucketName,objectName:this.objectName,expireTime:3600};this.$store.dispatch("authGetRequest",{url:"/bsp-com/com/oss/presign/getObject",params:t}).then(function(t){t.success?e.imgUrl=t.data.presignedUrl:e.$Modal.error({title:"温馨提示",content:t.msg})})}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4);i.d(t,"viewImg",function(){return n.a});var o={install:function(e){e.component("view-img",n.a)}};t.default=o},function(e,t,i){"use strict";function n(e){i(5)}var o=i(2),r=i(12),a=i(8),s=n,l=a(o.a,r.a,!1,s,"data-v-0752de4c",null);t.a=l.exports},function(e,t,i){var n=i(6);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("59a8d6aa",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t){e.exports=function(e,t){for(var i=[],n={},o=0;o<t.length;o++){var r=t[o],a=r[0],s=r[1],l=r[2],c=r[3],h={id:e+":"+o,css:s,media:l,sourceMap:c};n[a]?n[a].parts.push(h):i.push(n[a]={id:a,parts:[h]})}return i}},function(e,t){e.exports=function(e,t,i,n,o,r){var a,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(a=e,s=e.default);var c="function"==typeof s?s.options:s;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId=o);var h;if(r?(h=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=h):n&&(h=n),h){var u=c.functional,d=u?c.render:c.beforeCreate;u?(c._injectStyles=h,c.render=function(e,t){return h.call(t),d(e,t)}):c.beforeCreate=d?[].concat(d,h):[h]}return{esModule:a,exports:s,options:c}}},function(e,t,i){var n=i(10);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("148d1e31",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,'/*!\n * Viewer.js v1.10.4\n * https://fengyuanchen.github.io/viewerjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2022-02-13T08:39:57.620Z\n */.viewer-close:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen-exit:before,.viewer-fullscreen:before,.viewer-next:before,.viewer-one-to-one:before,.viewer-play:before,.viewer-prev:before,.viewer-reset:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-zoom-in:before,.viewer-zoom-out:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container ::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container ::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,50%);overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0;z-index:1}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:rgba(0,0,0,50%);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:rgba(0,0,0,80%)}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,80%);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{background-color:rgba(0,0,0,50%);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,80%)}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,50%)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@-webkit-keyframes viewer-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes viewer-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:viewer-spinner 1s linear infinite;animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,10%);border-left-color:rgba(255,255,255,50%);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}}',""])},function(e,t,i){/*! * Viewer.js v1.10.4 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * * Date: 2022-02-13T08:40:00.127Z */ !function(t,i){e.exports=i()}(0,function(){"use strict";function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(e){"@babel/helpers - typeof";return(i="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})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e){return"string"==typeof e}function l(e){return"number"==typeof e&&!ue(e)}function c(e){return void 0===e}function h(e){return"object"===i(e)&&null!==e}function u(e){if(!h(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&de.call(i,"isPrototypeOf")}catch(e){return!1}}function d(e){return"function"==typeof e}function f(e,t){if(e&&d(t))if(Array.isArray(e)||l(e.length)){var i,n=e.length;for(i=0;i<n&&!1!==t.call(e,e[i],i,e);i+=1);}else h(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)});return e}function v(e,t){var i=e.style;f(t,function(e,t){ve.test(t)&&l(e)&&(e+="px"),i[t]=e})}function m(e){return s(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}function p(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function g(e,t){if(e&&t){if(l(e.length))return void f(e,function(e){g(e,t)});if(e.classList)return void e.classList.add(t);var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function w(e,t){if(e&&t)return l(e.length)?void f(e,function(e){w(e,t)}):e.classList?void e.classList.remove(t):void(e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function b(e,t,i){if(t)return l(e.length)?void f(e,function(e){b(e,t,i)}):void(i?g(e,t):w(e,t))}function y(e){return e.replace(me,"$1-$2").toLowerCase()}function x(e,t){return h(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(y(t)))}function k(e,t,i){h(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(y(t)),i)}function z(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;t.trim().split(ce).forEach(function(t){if(!pe){var r=e.listeners;r&&r[t]&&r[t][i]&&(o=r[t][i],delete r[t][i],0===Object.keys(r[t]).length&&delete r[t],0===Object.keys(r).length&&delete e.listeners)}e.removeEventListener(t,o,n)})}function A(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;t.trim().split(ce).forEach(function(t){if(n.once&&!pe){var r=e.listeners,a=void 0===r?{}:r;o=function(){delete a[t][i],e.removeEventListener(t,o,n);for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];i.apply(e,s)},a[t]||(a[t]={}),a[t][i]&&e.removeEventListener(t,a[t][i],n),a[t][i]=o,e.listeners=a}e.addEventListener(t,o,n)})}function T(e,i,n,o){var r;return d(Event)&&d(CustomEvent)?r=new CustomEvent(i,t({bubbles:!0,cancelable:!0,detail:n},o)):(r=document.createEvent("CustomEvent"),r.initCustomEvent(i,!0,!0,n)),e.dispatchEvent(r)}function D(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function E(e){var t=e.rotate,i=e.scaleX,n=e.scaleY,o=e.translateX,r=e.translateY,a=[];l(o)&&0!==o&&a.push("translateX(".concat(o,"px)")),l(r)&&0!==r&&a.push("translateY(".concat(r,"px)")),l(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),l(i)&&1!==i&&a.push("scaleX(".concat(i,")")),l(n)&&1!==n&&a.push("scaleY(".concat(n,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function C(e){return s(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}function S(e,t,i){var n=document.createElement("img");if(e.naturalWidth&&!ge)return i(e.naturalWidth,e.naturalHeight),n;var o=document.body||document.documentElement;return n.onload=function(){i(n.width,n.height),ge||o.removeChild(n)},f(t.inheritedAttributes,function(t){var i=e.getAttribute(t);null!==i&&n.setAttribute(t,i)}),n.src=e.src,ge||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n)),n}function I(e){switch(e){case 2:return K;case 3:return Z;case 4:return V;default:return""}}function N(e){var i=t({},e),n=[];return f(e,function(e,t){delete i[t],f(i,function(t){var i=Math.abs(e.startX-t.startX),o=Math.abs(e.startY-t.startY),r=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(i*i+o*o),l=Math.sqrt(r*r+a*a),c=(l-s)/s;n.push(c)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}function O(e,i){var n=e.pageX,o=e.pageY,r={endX:n,endY:o};return i?r:t({timeStamp:Date.now(),startX:n,startY:o},r)}function R(e){var t=0,i=0,n=0;return f(e,function(e){var o=e.startX,r=e.startY;t+=o,i+=r,n+=1}),t/=n,i/=n,{pageX:t,pageY:i}}var F={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},M="undefined"!=typeof window&&void 0!==window.document,L=M?window:{},X=!(!M||!L.document.documentElement)&&"ontouchstart"in L.document.documentElement,P=!!M&&"PointerEvent"in L,j="".concat("viewer","-active"),Y="".concat("viewer","-close"),B="".concat("viewer","-fade"),q="".concat("viewer","-fixed"),U="".concat("viewer","-fullscreen"),W="".concat("viewer","-fullscreen-exit"),H="".concat("viewer","-hide"),V="".concat("viewer","-hide-md-down"),Z="".concat("viewer","-hide-sm-down"),K="".concat("viewer","-hide-xs-down"),_="".concat("viewer","-in"),G="".concat("viewer","-invisible"),J="".concat("viewer","-loading"),Q="".concat("viewer","-move"),$="".concat("viewer","-open"),ee="".concat("viewer","-show"),te="".concat("viewer","-transition"),ie=X?"touchend touchcancel":"mouseup",ne=X?"touchmove":"mousemove",oe=X?"touchstart":"mousedown",re=P?"pointerdown":oe,ae=P?"pointermove":ne,se=P?"pointerup pointercancel":ie,le="".concat("viewer","Action"),ce=/\s\s*/,he=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"],ue=Number.isNaN||L.isNaN,de=Object.prototype.hasOwnProperty,fe=Object.assign||function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return h(e)&&i.length>0&&i.forEach(function(t){h(t)&&Object.keys(t).forEach(function(i){e[i]=t[i]})}),e},ve=/^(?:width|height|left|top|marginLeft|marginTop)$/,me=/([a-z\d])([A-Z])/g,pe=function(){var e=!1;if(M){var t=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});L.addEventListener("test",i,n),L.removeEventListener("test",i,n)}return e}(),ge=L.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(L.navigator.userAgent),we={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,i=this.parent;t.inline&&(e={width:Math.max(i.offsetWidth,t.minWidth),height:Math.max(i.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=fe({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&v(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,i=this.options,n=this.list,o=[];n.innerHTML="",f(this.images,function(t,r){var a=t.src,s=t.alt||C(a),l=e.getImageURL(t);if(a||l){var c=document.createElement("li"),h=document.createElement("img");f(i.inheritedAttributes,function(e){var i=t.getAttribute(e);null!==i&&h.setAttribute(e,i)}),h.src=a||l,h.alt=s,h.setAttribute("data-original-url",l||a),c.setAttribute("data-index",r),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),i.keyboard&&c.setAttribute("tabindex",0),c.appendChild(h),n.appendChild(c),o.push(c)}}),this.items=o,f(o,function(t){var n,o,r=t.firstElementChild;k(r,"filled",!0),i.loading&&g(t,J),A(r,"load",n=function(n){z(r,"error",o),i.loading&&w(t,J),e.loadImage(n)},{once:!0}),A(r,"error",o=function(){z(r,"load",n),i.loading&&w(t,J)},{once:!0})}),i.transition&&A(t,"viewed",function(){g(n,te)},{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var i=t.nextElementSibling,n=parseInt(window.getComputedStyle(i||t).marginLeft,10),o=t.offsetWidth,r=o+n;v(this.list,fe({width:r*this.length-n},E({translateX:(this.viewerData.width-o)/2-r*e})))}},resetList:function(){var e=this.list;e.innerHTML="",w(e,te),v(e,E({translateX:0}))},initImage:function(e){var t,i=this,n=this.options,o=this.image,r=this.viewerData,a=this.footer.offsetHeight,s=r.width,l=Math.max(r.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=S(o,n,function(t,o){var r=t/o,a=s,h=l;i.imageInitializing=!1,l*r>s?h=s/r:a=l*r,a=Math.min(.9*a,t),h=Math.min(.9*h,o);var u=(s-a)/2,d=(l-h)/2,f={left:u,top:d,x:u,y:d,width:a,height:h,oldRatio:1,ratio:a/t,aspectRatio:r,naturalWidth:t,naturalHeight:o},v=fe({},f);n.rotatable&&(f.rotate=c.rotate||0,v.rotate=0),n.scalable&&(f.scaleX=c.scaleX||1,f.scaleY=c.scaleY||1,v.scaleX=1,v.scaleY=1),i.imageData=f,i.initialImageData=v,e&&e()})},renderImage:function(e){var t=this,i=this.image,n=this.imageData;if(v(i,fe({width:n.width,height:n.height,marginLeft:n.x,marginTop:n.y},E(n))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&p(i,te)){var o=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){z(i,"transitionend",o)}},A(i,"transitionend",o,{once:!0})}else e()},resetImage:function(){if(this.viewing||this.viewed){var e=this.image;this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null}}},be={bind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;A(t,"click",this.onClick=this.click.bind(this)),A(t,"dragstart",this.onDragStart=this.dragstart.bind(this)),A(i,re,this.onPointerDown=this.pointerdown.bind(this)),A(n,ae,this.onPointerMove=this.pointermove.bind(this)),A(n,se,this.onPointerUp=this.pointerup.bind(this)),A(n,"keydown",this.onKeyDown=this.keydown.bind(this)),A(window,"resize",this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&A(t,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&A(i,"dblclick",this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;z(t,"click",this.onClick),z(t,"dragstart",this.onDragStart),z(i,re,this.onPointerDown),z(n,ae,this.onPointerMove),z(n,se,this.onPointerUp),z(n,"keydown",this.onKeyDown),z(window,"resize",this.onResize),e.zoomable&&e.zoomOnWheel&&z(t,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&z(i,"dblclick",this.onDblclick)}},ye={click:function(e){var t=this.options,i=this.imageData,n=e.target,o=x(n,le);switch(o||"img"!==n.localName||"li"!==n.parentElement.localName||(n=n.parentElement,o=x(n,le)),X&&e.isTrusted&&n===this.canvas&&clearTimeout(this.clickCanvasTimeout),o){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.hide();break;case"view":this.view(x(n,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-i.scaleX||-1);break;case"flip-vertical":this.scaleY(-i.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(X&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,i=this.options,n=this.image,o=this.index,r=this.viewerData;w(n,G),i.loading&&w(this.canvas,J),n.style.cssText="height:0;"+"margin-left:".concat(r.width/2,"px;")+"margin-top:".concat(r.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){b(n,Q,i.movable),b(n,te,i.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,d(i.viewed)&&A(t,"viewed",i.viewed,{once:!0}),T(t,"viewed",{originalImage:e.images[o],index:o,image:n},{cancelable:!1})})})},loadImage:function(e){var t=e.target,i=t.parentNode,n=i.offsetWidth||30,o=i.offsetHeight||50,r=!!x(t,"filled");S(t,this.options,function(e,i){var a=e/i,s=n,l=o;o*a>n?r?s=o*a:l=n/a:r?l=n/a:s=o*a,v(t,fe({width:s,height:l},E({translateX:(n-s)/2,translateY:(o-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var i=e.keyCode||e.which||e.charCode;switch(i){case 13:this.viewer.contains(e.target)&&this.click(e)}if(this.fulled)switch(i){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,i=this.pointers,n=e.buttons,o=e.button;if(!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(l(n)&&1!==n||l(o)&&0!==o||e.ctrlKey))){e.preventDefault(),e.changedTouches?f(e.changedTouches,function(e){i[e.identifier]=O(e)}):i[e.pointerId||0]=O(e);var r=!!t.movable&&"move";t.zoomOnTouch&&t.zoomable&&Object.keys(i).length>1?r="zoom":t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(r="switch"),!t.transition||"move"!==r&&"zoom"!==r||w(this.image,te),this.action=r}},pointermove:function(e){var t=this.pointers,i=this.action;this.viewed&&i&&(e.preventDefault(),e.changedTouches?f(e.changedTouches,function(e){fe(t[e.identifier]||{},O(e,!0))}):fe(t[e.pointerId||0]||{},O(e,!0)),this.change(e))},pointerup:function(e){var t,i=this,n=this.options,o=this.action,r=this.pointers;e.changedTouches?f(e.changedTouches,function(e){t=r[e.identifier],delete r[e.identifier]}):(t=r[e.pointerId||0],delete r[e.pointerId||0]),o&&(e.preventDefault(),!n.transition||"move"!==o&&"zoom"!==o||g(this.image,te),this.action=!1,X&&"zoom"!==o&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){T(i.image,"dblclick",{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){i.imageClicked=!1},500)):(this.imageClicked=!1,n.backdrop&&"static"!==n.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){T(i.canvas,"click",{originalEvent:e})},50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();f(this.player.getElementsByTagName("img"),function(t){A(t,"load",e.loadImage.bind(e),{once:!0}),T(t,"load")})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var i=Number(this.options.zoomRatio)||.1,n=1;e.deltaY?n=e.deltaY>0?1:-1:e.wheelDelta?n=-e.wheelDelta/120:e.detail&&(n=e.detail>0?1:-1),this.zoom(-n*i,!0,e)}}},xe={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,i=this.options;if(i.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(d(i.show)&&A(t,"show",i.show,{once:!0}),!1===T(t,"show")||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var n=this.viewer;if(w(n,H),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("aria-hidden"),i.transition&&!e){var o=this.shown.bind(this);this.transitioning={abort:function(){z(n,"transitionend",o),w(n,_)}},g(n,te),n.initialOffsetWidth=n.offsetWidth,A(n,"transitionend",o,{once:!0}),g(n,_)}else g(n,_),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.element,n=this.options;if(n.inline||this.hiding||!this.isShown&&!this.showing)return this;if(d(n.hide)&&A(i,"hide",n.hide,{once:!0}),!1===T(i,"hide"))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var o=this.viewer,r=this.image,a=function(){w(o,_),e.hidden()};if(n.transition&&!t){var s=function t(i){i&&i.target===o&&(z(o,"transitionend",t),e.hidden())},l=function(){p(o,te)?(A(o,"transitionend",s),w(o,_)):a()};this.transitioning={abort:function(){e.viewed&&p(r,te)?z(r,"transitionend",l):p(o,te)&&z(o,"transitionend",s)}},this.viewed&&p(r,te)?(A(r,"transitionend",l,{once:!0}),this.zoomTo(0,!1,null,!0)):l()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var i=this.element,n=this.options,o=this.title,r=this.canvas,a=this.items[t],s=a.querySelector("img"),l=x(s,"originalUrl"),c=s.getAttribute("alt"),h=document.createElement("img");if(f(n.inheritedAttributes,function(e){var t=s.getAttribute(e);null!==t&&h.setAttribute(e,t)}),h.src=l,h.alt=c,d(n.view)&&A(i,"view",n.view,{once:!0}),!1===T(i,"view",{originalImage:this.images[t],index:t,image:h})||!this.isShown||this.hiding||this.played)return this;var u=this.items[this.index];u&&(w(u,j),u.removeAttribute("aria-selected")),g(a,j),a.setAttribute("aria-selected",!0),n.focus&&a.focus(),this.image=h,this.viewed=!1,this.index=t,this.imageData={},g(h,G),n.loading&&g(r,J),r.innerHTML="",r.appendChild(h),this.renderList(),o.innerHTML="";var v,p,b=function(){var t=e.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;o.innerHTML=m(d(i)?i.call(e,h,t):"".concat(c," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return A(i,"viewed",b,{once:!0}),this.viewing={abort:function(){z(i,"viewed",b),h.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(h.src="",z(h,"load",v),e.timeout&&clearTimeout(e.timeout))}},h.complete?this.load():(A(h,"load",v=function(){z(h,"error",p),e.load()},{once:!0}),A(h,"error",p=function(){z(h,"load",v),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),w(h,G),n.loading&&w(e.canvas,J)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){w(h,G),e.timeout=!1},1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,i=this.index+1;return i>t&&(i=e?0:t),this.view(i),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.imageData;return this.moveTo(c(e)?e:i.x+Number(e),c(t)?t:i.y+Number(t)),this},moveTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=this.element,r=this.options,a=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&r.movable){var s=a.x,c=a.y,h=!1;if(l(e)?h=!0:e=s,l(i)?h=!0:i=c,h){if(d(r.move)&&A(o,"move",r.move,{once:!0}),!1===T(o,"move",{x:e,y:i,oldX:s,oldY:c,originalEvent:n}))return this;a.x=e,a.y=i,a.left=e,a.top=i,this.moving=!0,this.renderImage(function(){t.moving=!1,d(r.moved)&&A(o,"moved",r.moved,{once:!0}),T(o,"moved",{x:e,y:i,oldX:s,oldY:c,originalEvent:n},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,i=this.element,n=this.options,o=this.imageData;if(e=Number(e),l(e)&&this.viewed&&!this.played&&n.rotatable){var r=o.rotate;if(d(n.rotate)&&A(i,"rotate",n.rotate,{once:!0}),!1===T(i,"rotate",{degree:e,oldDegree:r}))return this;o.rotate=e,this.rotating=!0,this.renderImage(function(){t.rotating=!1,d(n.rotated)&&A(i,"rotated",n.rotated,{once:!0}),T(i,"rotated",{degree:e,oldDegree:r},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.element,o=this.options,r=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&o.scalable){var a=r.scaleX,s=r.scaleY,c=!1;if(l(e)?c=!0:e=a,l(i)?c=!0:i=s,c){if(d(o.scale)&&A(n,"scale",o.scale,{once:!0}),!1===T(n,"scale",{scaleX:e,scaleY:i,oldScaleX:a,oldScaleY:s}))return this;r.scaleX=e,r.scaleY=i,this.scaling=!0,this.renderImage(function(){t.scaling=!1,d(o.scaled)&&A(n,"scaled",o.scaled,{once:!0}),T(n,"scaled",{scaleX:e,scaleY:i,oldScaleX:a,oldScaleY:s},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.imageData;return e=Number(e),e=e<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,t,i),this},zoomTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=this.element,a=this.options,s=this.pointers,c=this.imageData,h=c.x,u=c.y,f=c.width,v=c.height,m=c.naturalWidth,p=c.naturalHeight;if(e=Math.max(0,e),l(e)&&this.viewed&&!this.played&&(o||a.zoomable)){if(!o){var g=Math.max(.01,a.minZoomRatio),w=Math.min(100,a.maxZoomRatio);e=Math.min(Math.max(e,g),w)}if(n)switch(n.type){case"wheel":a.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var b=m*e,y=p*e,x=b-f,k=y-v,z=c.ratio;if(d(a.zoom)&&A(r,"zoom",a.zoom,{once:!0}),!1===T(r,"zoom",{ratio:e,oldRatio:z,originalEvent:n}))return this;if(this.zooming=!0,n){var E=D(this.viewer),C=s&&Object.keys(s).length>0?R(s):{pageX:n.pageX,pageY:n.pageY};c.x-=x*((C.pageX-E.left-h)/f),c.y-=k*((C.pageY-E.top-u)/v)}else c.x-=x/2,c.y-=k/2;c.left=c.x,c.top=c.y,c.width=b,c.height=y,c.oldRatio=z,c.ratio=e,this.renderImage(function(){t.zooming=!1,d(a.zoomed)&&A(r,"zoomed",a.zoomed,{once:!0}),T(r,"zoomed",{ratio:e,oldRatio:z,originalEvent:n},{cancelable:!1})}),i&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var i=this.element,n=this.options;if(d(n.play)&&A(i,"play",n.play,{once:!0}),!1===T(i,"play"))return this;var o=this.player,r=this.loadImage.bind(this),a=[],s=0,c=0;if(this.played=!0,this.onLoadWhenPlay=r,t&&this.requestFullscreen(t),g(o,ee),f(this.items,function(e,t){var i=e.querySelector("img"),l=document.createElement("img");l.src=x(i,"originalUrl"),l.alt=i.getAttribute("alt"),l.referrerPolicy=i.referrerPolicy,s+=1,g(l,B),b(l,te,n.transition),p(e,j)&&(g(l,_),c=t),a.push(l),A(l,"load",r,{once:!0}),o.appendChild(l)}),l(n.interval)&&n.interval>0){s>1&&function t(){e.playing=setTimeout(function(){w(a[c],_),c+=1,c=c<s?c:0,g(a[c],_),t()},n.interval)}()}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,i=this.options;if(d(i.stop)&&A(t,"stop",i.stop,{once:!0}),!1===T(t,"stop"))return this;var n=this.player;return this.played=!1,clearTimeout(this.playing),f(n.getElementsByTagName("img"),function(t){z(t,"load",e.onLoadWhenPlay)}),w(n,ee),n.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,i=this.viewer,n=this.image,o=this.list;return!this.isShown||this.played||this.fulled||!t.inline?this:(this.fulled=!0,this.open(),g(this.button,W),t.transition&&(w(o,te),this.viewed&&w(n,te)),g(i,q),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("style"),v(i,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=fe({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){g(n,te),g(o,te)},0)})}),this)},exit:function(){var e=this,t=this.options,i=this.viewer,n=this.image,o=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),w(this.button,W),t.transition&&(w(o,te),this.viewed&&w(n,te)),t.focus&&this.clearEnforceFocus(),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),w(i,q),v(i,{zIndex:t.zIndexInline}),this.viewerData=fe({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){g(n,te),g(o,te)},0)})}),this):this},tooltip:function(){var e=this,t=this.options,i=this.tooltipBox,n=this.imageData;return this.viewed&&!this.played&&t.tooltip?(i.textContent="".concat(Math.round(100*n.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&T(i,"transitionend"),g(i,ee),g(i,B),g(i,te),i.removeAttribute("aria-hidden"),i.initialOffsetWidth=i.offsetWidth,g(i,_)):(g(i,ee),i.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(A(i,"transitionend",function(){w(i,ee),w(i,B),w(i,te),i.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),w(i,_),e.fading=!0):(w(i,ee),i.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,e):this.zoomTo(1,!0,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=fe({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,i=this.options,n=this.isImg;if(n&&!t.parentNode)return this.destroy();var o=[];if(f(n?[t]:t.querySelectorAll("img"),function(t){d(i.filter)?i.filter.call(e,t)&&o.push(t):e.getImageURL(t)&&o.push(t)}),!o.length)return this;if(this.images=o,this.length=o.length,this.ready){var r=[];if(f(this.items,function(e,t){var i=e.querySelector("img"),n=o[t];n&&i?n.src===i.src&&n.alt===i.alt||r.push(t):r.push(t)}),v(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=r.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var s=this.items[this.index];g(s,j),s.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e.viewer?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||z(e,"click",this.onStart),e.viewer=void 0,this):this}},ke={getImageURL:function(e){var t=this.options.url;return t=s(t)?e.getAttribute(t):d(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),A(document,"focusin",this.onFocusin=function(t){var i=e.viewer,n=t.target;n===document||n===i||i.contains(n)||null!==n.getAttribute("tabindex")&&"true"===n.getAttribute("aria-modal")||i.focus()})},clearEnforceFocus:function(){this.onFocusin&&(z(document,"focusin",this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;g(e,$),e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px")},close:function(){var e=this.body;w(e,$),e.style.paddingRight=this.initialBodyPaddingRight},shown:function(){var e=this.element,t=this.options,i=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(i.focus(),this.enforceFocus()),d(t.shown)&&A(e,"shown",t.shown,{once:!0}),!1!==T(e,"shown")&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,i=this.viewer;t.fucus&&this.clearEnforceFocus(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),g(i,H),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),i.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(d(t.hidden)&&A(e,"hidden",t.hidden,{once:!0}),T(e,"hidden",null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var i=t.documentElement;i.requestFullscreen?u(e)?i.requestFullscreen(e):i.requestFullscreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i.mozRequestFullScreen?i.mozRequestFullScreen():i.msRequestFullscreen&&i.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,i=this.pointers,n=i[Object.keys(i)[0]];if(n){var o=n.endX-n.startX,r=n.endY-n.startY;switch(this.action){case"move":this.move(o,r,e);break;case"zoom":this.zoom(N(i),!1,e);break;case"switch":this.action="switched";var a=Math.abs(o);a>1&&a>Math.abs(r)&&(this.pointers={},o>1?this.prev(t.loop):o<-1&&this.next(t.loop))}f(i,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},ze=L.Viewer,Ae=function(e){return function(){return e+=1}}(-1),Te=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),!t||1!==t.nodeType)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=fe({},F,u(i)&&i),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.id=Ae(),this.init()}return r(e,[{key:"init",value:function(){var e=this,t=this.element,i=this.options;if(!t.viewer){t.viewer=this,i.focus&&!i.keyboard&&(i.focus=!1);var n="img"===t.localName,o=[];if(f(n?[t]:t.querySelectorAll("img"),function(t){d(i.filter)?i.filter.call(e,t)&&o.push(t):e.getImageURL(t)&&o.push(t)}),this.isImg=n,this.length=o.length,this.images=o,this.initBody(),c(document.createElement("viewer").style.transition)&&(i.transition=!1),i.inline){var r=0,a=function(){if((r+=1)===e.length){var t;e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0)}};this.initializing={abort:function(){f(o,function(e){e.complete||z(e,"load",a)})}},f(o,function(e){e.complete?a():A(e,"load",a,{once:!0})})}else A(t,"click",this.onStart=function(t){var n=t.target;"img"!==n.localName||d(i.filter)&&!i.filter.call(e,n)||e.view(e.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,i=e.parentNode,n=document.createElement("div");n.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>';var o=n.querySelector(".".concat("viewer","-container")),r=o.querySelector(".".concat("viewer","-title")),a=o.querySelector(".".concat("viewer","-toolbar")),h=o.query