(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d30b4"],{"5aa3":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.viewerZIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.handleMaskClick(t)}}}),e._v(" "),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:e.hide}},[n("i",{staticClass:"el-icon-close"})]),e._v(" "),e.isSingle?e._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),e._v(" "),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],e._v(" "),n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return e.handleActions("zoomOut")}}}),e._v(" "),n("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return e.handleActions("zoomIn")}}}),e._v(" "),n("i",{staticClass:"el-image-viewer__actions__divider"}),e._v(" "),n("i",{class:e.mode.icon,on:{click:e.toggleMode}}),e._v(" "),n("i",{staticClass:"el-image-viewer__actions__divider"}),e._v(" "),n("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return e.handleActions("anticlocelise")}}}),e._v(" "),n("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.handleActions("clocelise")}}})])]),e._v(" "),n("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(t,i){return i===e.index?n("img",{key:t,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg,referrerpolicy:"no-referrer"},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])},o=[],r=n("6e6d");const a=r["default"].prototype.$isServer,s=/([\:\-\_]+(.))/g,l=/^moz([A-Z])/,c=a?0:Number(document.documentMode),d=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},u=function(e){return e.replace(s,(function(e,t,n,i){return i?n.toUpperCase():n})).replace(l,"Moz$1")},f=function(){return!a&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)}}(),m=function(){return!a&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)}}();function h(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function p(e,t){if(e){for(var n=e.className,i=(t||"").split(" "),o=0,r=i.length;o{var t={};return e&&"[object Function]"===t.toString.call(e)};"object"===typeof Int8Array||!r["default"].prototype.$isServer&&"function"===typeof document.childNodes||(y=function(e){return"function"===typeof e||!1});Object.prototype.hasOwnProperty;const b=function(){return!r["default"].prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function w(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(i=>{e.apply(this,n),t=!1}))}}var _=function(e){for(let t=1,n=arguments.length;tp(s,e))}setTimeout(()=>{v(s,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(s):document.body.appendChild(s),t&&(s.style.zIndex=t),s.tabIndex=0,s.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:i})},closeModal:function(e){const t=this.modalStack,n=O();if(t.length>0){const i=t[t.length-1];if(i.id===e){if(i.modalClass){let e=i.modalClass.trim().split(/\s+/);e.forEach(e=>v(n,e))}t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(let n=t.length-1;n>=0;n--)if(t[n].id===e){t.splice(n,1);break}}0===t.length&&(this.modalFade&&p(n,"v-modal-leave"),setTimeout(()=>{0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",I.modalDom=void 0),v(n,"v-modal-leave")},200))}};Object.defineProperty(I,"zIndex",{configurable:!0,get(){return C||(k=k||(r["default"].prototype.$ELEMENT||{}).zIndex||2e3,C=!0),k},set(e){k=e}});const L=function(){if(!r["default"].prototype.$isServer&&I.modalStack.length>0){const e=I.modalStack[I.modalStack.length-1];if(!e)return;const t=I.getInstance(e.id);return t}};r["default"].prototype.$isServer||window.addEventListener("keydown",(function(e){if(27===e.keyCode){const e=L();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}}));var z=I;let E;var N=function(){if(r["default"].prototype.$isServer)return 0;if(void 0!==E)return E;const e=document.createElement("div");e.className="el-scrollbar__wrap",e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const t=e.offsetWidth;e.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%",e.appendChild(n);const i=n.offsetWidth;return e.parentNode.removeChild(e),E=t-i,E};let F,A=1;Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;function j(e){return j="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},j(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function D(e){for(var t=1;te?this.zIndex:e}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg:function(e){var t=this;this.$nextTick((function(e){var n=t.$refs.img[0];n.complete||(t.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var e=this;this._keyDownHandler=function(t){t.stopPropagation();var n=t.keyCode;switch(n){case 27:e.hide();break;case 32:e.toggleMode();break;case 37:e.prev();break;case 38:e.handleActions("zoomIn");break;case 39:e.next();break;case 40:e.handleActions("zoomOut");break}},this._mouseWheelHandler=w((function(t){var n=t.wheelDelta?t.wheelDelta:-t.detail;n>0?e.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):e.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),f(document,"keydown",this._keyDownHandler),f(document,H,this._mouseWheelHandler)},deviceSupportUninstall:function(){m(document,"keydown",this._keyDownHandler),m(document,H,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(e){this.loading=!1},handleImgError:function(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown:function(e){var t=this;if(!this.loading&&0===e.button){var n=this.transform,i=n.offsetX,o=n.offsetY,r=e.pageX,a=e.pageY;this._dragHandler=w((function(e){t.transform.offsetX=i+e.pageX-r,t.transform.offsetY=o+e.pageY-a})),f(document,"mousemove",this._dragHandler),f(document,"mouseup",(function(e){m(document,"mousemove",t._dragHandler)})),e.preventDefault()}},handleMaskClick:function(){this.maskClosable&&this.hide()},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var e=Object.keys(B),t=Object.values(B),n=t.indexOf(this.mode),i=(n+1)%e.length;this.mode=B[e[i]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var e=this.urlList.length;this.index=(this.index-1+e)%e}},next:function(){if(!this.isLast||this.infinite){var e=this.urlList.length;this.index=(this.index+1)%e}},handleActions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=D({zoomRate:.2,rotateDeg:90,enableTransition:!0},t),i=n.zoomRate,o=n.rotateDeg,r=n.enableTransition,a=this.transform;switch(e){case"zoomOut":a.scale>.2&&(a.scale=parseFloat((a.scale-i).toFixed(3)));break;case"zoomIn":a.scale=parseFloat((a.scale+i).toFixed(3));break;case"clocelise":a.deg+=o;break;case"anticlocelise":a.deg-=o;break}a.enableTransition=r}}},mounted:function(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},X=W,Y=n("829d"),R=Object(Y["a"])(X,i,o,!1,null,null,null);t["a"]=R.exports}}]);