vue-pure-admin/dist/static/js/index-z33neZGJ.js
2024-01-08 00:03:57 +08:00

11 lines
52 KiB
JavaScript

var Ne=Object.defineProperty,Se=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var Ut=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable;var jt=(a,t,i)=>t in a?Ne(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,ht=(a,t)=>{for(var i in t||(t={}))Le.call(t,i)&&jt(a,i,t[i]);if(Ut)for(var i of Ut(t))Be.call(t,i)&&jt(a,i,t[i]);return a},Gt=(a,t)=>Se(a,Ae(t));var qt=(a,t,i)=>new Promise((e,n)=>{var r=d=>{try{s(i.next(d))}catch(l){n(l)}},o=d=>{try{s(i.throw(d))}catch(l){n(l)}},s=d=>d.done?e(d.value):Promise.resolve(d.value).then(r,o);s((i=i.apply(a,t)).next())});import{f as Y,m as X,g as z,aP as Ie,d as Ft,r as J,K as mt,o as ke,ac as ze,aQ as He,u as Pe,aR as $e,i as B,k,Q as Ye,aS as Xe,aT as We,v as Ve,aU as Ue,aV as je,e as A,z as Ge,T as qe}from"./index-24ofiFkH.js";/*!
* Cropper.js v1.6.1
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2023-09-17T03:44:19.860Z
*/function Qt(a,t){var i=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);t&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),i.push.apply(i,e)}return i}function ue(a){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?Qt(Object(i),!0).forEach(function(e){Ke(a,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(i,e))})}return a}function Et(a){"@babel/helpers - typeof";return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(a)}function Fe(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(a,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,fe(e.key),e)}}function Qe(a,t,i){return t&&Kt(a.prototype,t),i&&Kt(a,i),Object.defineProperty(a,"prototype",{writable:!1}),a}function Ke(a,t,i){return t=fe(t),t in a?Object.defineProperty(a,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[t]=i,a}function pe(a){return Ze(a)||Je(a)||ti(a)||ei()}function Ze(a){if(Array.isArray(a))return Tt(a)}function Je(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function ti(a,t){if(a){if(typeof a=="string")return Tt(a,t);var i=Object.prototype.toString.call(a).slice(8,-1);if(i==="Object"&&a.constructor&&(i=a.constructor.name),i==="Map"||i==="Set")return Array.from(a);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Tt(a,t)}}function Tt(a,t){(t==null||t>a.length)&&(t=a.length);for(var i=0,e=new Array(t);i<t;i++)e[i]=a[i];return e}function ei(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ii(a,t){if(typeof a!="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var e=i.call(a,t||"default");if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(a)}function fe(a){var t=ii(a,"string");return typeof t=="symbol"?t:String(t)}var xt=typeof window!="undefined"&&typeof window.document!="undefined",q=xt?window:{},kt=xt&&q.document.documentElement?"ontouchstart"in q.document.documentElement:!1,zt=xt?"PointerEvent"in q:!1,_="cropper",Ht="all",ge="crop",ve="move",me="zoom",tt="e",et="w",at="s",F="n",ct="ne",lt="nw",dt="se",ut="sw",Ot="".concat(_,"-crop"),Zt="".concat(_,"-disabled"),$="".concat(_,"-hidden"),Jt="".concat(_,"-hide"),ai="".concat(_,"-invisible"),yt="".concat(_,"-modal"),Rt="".concat(_,"-move"),ft="".concat(_,"Action"),wt="".concat(_,"Preview"),Pt="crop",we="move",be="none",Nt="crop",St="cropend",At="cropmove",Lt="cropstart",te="dblclick",ri=kt?"touchstart":"mousedown",ni=kt?"touchmove":"mousemove",oi=kt?"touchend touchcancel":"mouseup",ee=zt?"pointerdown":ri,ie=zt?"pointermove":ni,ae=zt?"pointerup pointercancel":oi,re="ready",ne="resize",oe="wheel",Bt="zoom",se="image/jpeg",si=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,hi=/^data:/,ci=/^data:image\/jpeg;base64,/,li=/^img|canvas$/i,ye=200,xe=100,he={viewMode:0,dragMode:Pt,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:ye,minContainerHeight:xe,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},di='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',ui=Number.isNaN||q.isNaN;function w(a){return typeof a=="number"&&!ui(a)}var ce=function(t){return t>0&&t<1/0};function _t(a){return typeof a=="undefined"}function it(a){return Et(a)==="object"&&a!==null}var pi=Object.prototype.hasOwnProperty;function rt(a){if(!it(a))return!1;try{var t=a.constructor,i=t.prototype;return t&&i&&pi.call(i,"isPrototypeOf")}catch(e){return!1}}function P(a){return typeof a=="function"}var fi=Array.prototype.slice;function De(a){return Array.from?Array.from(a):fi.call(a)}function L(a,t){return a&&P(t)&&(Array.isArray(a)||w(a.length)?De(a).forEach(function(i,e){t.call(a,i,e,a)}):it(a)&&Object.keys(a).forEach(function(i){t.call(a,a[i],i,a)})),a}var C=Object.assign||function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];return it(t)&&e.length>0&&e.forEach(function(r){it(r)&&Object.keys(r).forEach(function(o){t[o]=r[o]})}),t},gi=/\.\d*(?:0|9){12}\d*$/;function ot(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return gi.test(a)?Math.round(a*t)/t:a}var vi=/^width|height|left|top|marginLeft|marginTop$/;function Q(a,t){var i=a.style;L(t,function(e,n){vi.test(n)&&w(e)&&(e="".concat(e,"px")),i[n]=e})}function mi(a,t){return a.classList?a.classList.contains(t):a.className.indexOf(t)>-1}function I(a,t){if(t){if(w(a.length)){L(a,function(e){I(e,t)});return}if(a.classList){a.classList.add(t);return}var i=a.className.trim();i?i.indexOf(t)<0&&(a.className="".concat(i," ").concat(t)):a.className=t}}function G(a,t){if(t){if(w(a.length)){L(a,function(i){G(i,t)});return}if(a.classList){a.classList.remove(t);return}a.className.indexOf(t)>=0&&(a.className=a.className.replace(t,""))}}function nt(a,t,i){if(t){if(w(a.length)){L(a,function(e){nt(e,t,i)});return}i?I(a,t):G(a,t)}}var wi=/([a-z\d])([A-Z])/g;function $t(a){return a.replace(wi,"$1-$2").toLowerCase()}function It(a,t){return it(a[t])?a[t]:a.dataset?a.dataset[t]:a.getAttribute("data-".concat($t(t)))}function gt(a,t,i){it(i)?a[t]=i:a.dataset?a.dataset[t]=i:a.setAttribute("data-".concat($t(t)),i)}function bi(a,t){if(it(a[t]))try{delete a[t]}catch(i){a[t]=void 0}else if(a.dataset)try{delete a.dataset[t]}catch(i){a.dataset[t]=void 0}else a.removeAttribute("data-".concat($t(t)))}var Me=/\s\s*/,_e=function(){var a=!1;if(xt){var t=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return a=!0,t},set:function(r){t=r}});q.addEventListener("test",i,e),q.removeEventListener("test",i,e)}return a}();function j(a,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Me).forEach(function(r){if(!_e){var o=a.listeners;o&&o[r]&&o[r][i]&&(n=o[r][i],delete o[r][i],Object.keys(o[r]).length===0&&delete o[r],Object.keys(o).length===0&&delete a.listeners)}a.removeEventListener(r,n,e)})}function V(a,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Me).forEach(function(r){if(e.once&&!_e){var o=a.listeners,s=o===void 0?{}:o;n=function(){delete s[r][i],a.removeEventListener(r,n,e);for(var l=arguments.length,h=new Array(l),c=0;c<l;c++)h[c]=arguments[c];i.apply(a,h)},s[r]||(s[r]={}),s[r][i]&&a.removeEventListener(r,s[r][i],e),s[r][i]=n,a.listeners=s}a.addEventListener(r,n,e)})}function st(a,t,i){var e;return P(Event)&&P(CustomEvent)?e=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0}):(e=document.createEvent("CustomEvent"),e.initCustomEvent(t,!0,!0,i)),a.dispatchEvent(e)}function Ce(a){var t=a.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ct=q.location,yi=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function le(a){var t=a.match(yi);return t!==null&&(t[1]!==Ct.protocol||t[2]!==Ct.hostname||t[3]!==Ct.port)}function de(a){var t="timestamp=".concat(new Date().getTime());return a+(a.indexOf("?")===-1?"?":"&")+t}function pt(a){var t=a.rotate,i=a.scaleX,e=a.scaleY,n=a.translateX,r=a.translateY,o=[];w(n)&&n!==0&&o.push("translateX(".concat(n,"px)")),w(r)&&r!==0&&o.push("translateY(".concat(r,"px)")),w(t)&&t!==0&&o.push("rotate(".concat(t,"deg)")),w(i)&&i!==1&&o.push("scaleX(".concat(i,")")),w(e)&&e!==1&&o.push("scaleY(".concat(e,")"));var s=o.length?o.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function xi(a){var t=ue({},a),i=0;return L(a,function(e,n){delete t[n],L(t,function(r){var o=Math.abs(e.startX-r.startX),s=Math.abs(e.startY-r.startY),d=Math.abs(e.endX-r.endX),l=Math.abs(e.endY-r.endY),h=Math.sqrt(o*o+s*s),c=Math.sqrt(d*d+l*l),u=(c-h)/h;Math.abs(u)>Math.abs(i)&&(i=u)})}),i}function bt(a,t){var i=a.pageX,e=a.pageY,n={endX:i,endY:e};return t?n:ue({startX:i,startY:e},n)}function Di(a){var t=0,i=0,e=0;return L(a,function(n){var r=n.startX,o=n.startY;t+=r,i+=o,e+=1}),t/=e,i/=e,{pageX:t,pageY:i}}function K(a){var t=a.aspectRatio,i=a.height,e=a.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ce(e),o=ce(i);if(r&&o){var s=i*t;n==="contain"&&s>e||n==="cover"&&s<e?i=e/t:e=i*t}else r?i=e/t:o&&(e=i*t);return{width:e,height:i}}function Mi(a){var t=a.width,i=a.height,e=a.degree;if(e=Math.abs(e)%180,e===90)return{width:i,height:t};var n=e%90*Math.PI/180,r=Math.sin(n),o=Math.cos(n),s=t*o+i*r,d=t*r+i*o;return e>90?{width:d,height:s}:{width:s,height:d}}function _i(a,t,i,e){var n=t.aspectRatio,r=t.naturalWidth,o=t.naturalHeight,s=t.rotate,d=s===void 0?0:s,l=t.scaleX,h=l===void 0?1:l,c=t.scaleY,u=c===void 0?1:c,v=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,y=e.fillColor,T=y===void 0?"transparent":y,O=e.imageSmoothingEnabled,E=O===void 0?!0:O,U=e.imageSmoothingQuality,M=U===void 0?"low":U,p=e.maxWidth,x=p===void 0?1/0:p,N=e.maxHeight,m=N===void 0?1/0:N,b=e.minWidth,D=b===void 0?0:b,R=e.minHeight,S=R===void 0?0:R,W=document.createElement("canvas"),H=W.getContext("2d"),Z=K({aspectRatio:v,width:x,height:m}),vt=K({aspectRatio:v,width:D,height:S},"cover"),Dt=Math.min(Z.width,Math.max(vt.width,g)),Mt=Math.min(Z.height,Math.max(vt.height,f)),Yt=K({aspectRatio:n,width:x,height:m}),Xt=K({aspectRatio:n,width:D,height:S},"cover"),Wt=Math.min(Yt.width,Math.max(Xt.width,r)),Vt=Math.min(Yt.height,Math.max(Xt.height,o)),Oe=[-Wt/2,-Vt/2,Wt,Vt];return W.width=ot(Dt),W.height=ot(Mt),H.fillStyle=T,H.fillRect(0,0,Dt,Mt),H.save(),H.translate(Dt/2,Mt/2),H.rotate(d*Math.PI/180),H.scale(h,u),H.imageSmoothingEnabled=E,H.imageSmoothingQuality=M,H.drawImage.apply(H,[a].concat(pe(Oe.map(function(Re){return Math.floor(ot(Re))})))),H.restore(),W}var Ee=String.fromCharCode;function Ci(a,t,i){var e="";i+=t;for(var n=t;n<i;n+=1)e+=Ee(a.getUint8(n));return e}var Ei=/^data:.*,/;function Ti(a){var t=a.replace(Ei,""),i=atob(t),e=new ArrayBuffer(i.length),n=new Uint8Array(e);return L(n,function(r,o){n[o]=i.charCodeAt(o)}),e}function Oi(a,t){for(var i=[],e=8192,n=new Uint8Array(a);n.length>0;)i.push(Ee.apply(null,De(n.subarray(0,e)))),n=n.subarray(e);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function Ri(a){var t=new DataView(a),i;try{var e,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1<o;){if(t.getUint8(s)===255&&t.getUint8(s+1)===225){n=s;break}s+=1}if(n){var d=n+4,l=n+10;if(Ci(t,d,4)==="Exif"){var h=t.getUint16(l);if(e=h===18761,(e||h===19789)&&t.getUint16(l+2,e)===42){var c=t.getUint32(l+4,e);c>=8&&(r=l+c)}}}if(r){var u=t.getUint16(r,e),v,g;for(g=0;g<u;g+=1)if(v=r+g*12+2,t.getUint16(v,e)===274){v+=8,i=t.getUint16(v,e),t.setUint16(v,1,e);break}}}catch(f){i=1}return i}function Ni(a){var t=0,i=1,e=1;switch(a){case 2:i=-1;break;case 3:t=-180;break;case 4:e=-1;break;case 5:t=90,e=-1;break;case 6:t=90;break;case 7:t=90,i=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:i,scaleY:e}}var Si={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,i=this.options,e=this.container,n=this.cropper,r=Number(i.minContainerWidth),o=Number(i.minContainerHeight);I(n,$),G(t,$);var s={width:Math.max(e.offsetWidth,r>=0?r:ye),height:Math.max(e.offsetHeight,o>=0?o:xe)};this.containerData=s,Q(n,{width:s.width,height:s.height}),I(t,$),G(n,$)},initCanvas:function(){var t=this.containerData,i=this.imageData,e=this.options.viewMode,n=Math.abs(i.rotate)%180===90,r=n?i.naturalHeight:i.naturalWidth,o=n?i.naturalWidth:i.naturalHeight,s=r/o,d=t.width,l=t.height;t.height*s>t.width?e===3?d=t.height*s:l=t.width/s:e===3?l=t.width/s:d=t.height*s;var h={aspectRatio:s,naturalWidth:r,naturalHeight:o,width:d,height:l};this.canvasData=h,this.limited=e===1||e===2,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=C({},h)},limitCanvas:function(t,i){var e=this.options,n=this.containerData,r=this.canvasData,o=this.cropBoxData,s=e.viewMode,d=r.aspectRatio,l=this.cropped&&o;if(t){var h=Number(e.minCanvasWidth)||0,c=Number(e.minCanvasHeight)||0;s>1?(h=Math.max(h,n.width),c=Math.max(c,n.height),s===3&&(c*d>h?h=c*d:c=h/d)):s>0&&(h?h=Math.max(h,l?o.width:0):c?c=Math.max(c,l?o.height:0):l&&(h=o.width,c=o.height,c*d>h?h=c*d:c=h/d));var u=K({aspectRatio:d,width:h,height:c});h=u.width,c=u.height,r.minWidth=h,r.minHeight=c,r.maxWidth=1/0,r.maxHeight=1/0}if(i)if(s>(l?0:1)){var v=n.width-r.width,g=n.height-r.height;r.minLeft=Math.min(0,v),r.minTop=Math.min(0,g),r.maxLeft=Math.max(0,v),r.maxTop=Math.max(0,g),l&&this.limited&&(r.minLeft=Math.min(o.left,o.left+(o.width-r.width)),r.minTop=Math.min(o.top,o.top+(o.height-r.height)),r.maxLeft=o.left,r.maxTop=o.top,s===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,v),r.maxLeft=Math.max(0,v)),r.height>=n.height&&(r.minTop=Math.min(0,g),r.maxTop=Math.max(0,g))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,i){var e=this.canvasData,n=this.imageData;if(i){var r=Mi({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=r.width,s=r.height,d=e.width*(o/e.naturalWidth),l=e.height*(s/e.naturalHeight);e.left-=(d-e.width)/2,e.top-=(l-e.height)/2,e.width=d,e.height=l,e.aspectRatio=o/s,e.naturalWidth=o,e.naturalHeight=s,this.limitCanvas(!0,!1)}(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCanvas(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,Q(this.canvas,C({width:e.width,height:e.height},pt({translateX:e.left,translateY:e.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var i=this.canvasData,e=this.imageData,n=e.naturalWidth*(i.width/i.naturalWidth),r=e.naturalHeight*(i.height/i.naturalHeight);C(e,{width:n,height:r,left:(i.width-n)/2,top:(i.height-r)/2}),Q(this.image,C({width:e.width,height:e.height},pt(C({translateX:e.left,translateY:e.top},e)))),t&&this.output()},initCropBox:function(){var t=this.options,i=this.canvasData,e=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:i.width,height:i.height};e&&(i.height*e>i.width?r.height=r.width/e:r.width=r.height*e),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=i.left+(i.width-r.width)/2,r.top=i.top+(i.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=C({},r)},limitCropBox:function(t,i){var e=this.options,n=this.containerData,r=this.canvasData,o=this.cropBoxData,s=this.limited,d=e.aspectRatio;if(t){var l=Number(e.minCropBoxWidth)||0,h=Number(e.minCropBoxHeight)||0,c=s?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,u=s?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;l=Math.min(l,n.width),h=Math.min(h,n.height),d&&(l&&h?h*d>l?h=l/d:l=h*d:l?h=l/d:h&&(l=h*d),u*d>c?u=c/d:c=u*d),o.minWidth=Math.min(l,c),o.minHeight=Math.min(h,u),o.maxWidth=c,o.maxHeight=u}i&&(s?(o.minLeft=Math.max(0,r.left),o.minTop=Math.max(0,r.top),o.maxLeft=Math.min(n.width,r.left+r.width)-o.width,o.maxTop=Math.min(n.height,r.top+r.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,i=this.containerData,e=this.cropBoxData;(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCropBox(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,t.movable&&t.cropBoxMovable&&gt(this.face,ft,e.width>=i.width&&e.height>=i.height?ve:Ht),Q(this.cropBox,C({width:e.width,height:e.height},pt({translateX:e.left,translateY:e.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),st(this.element,Nt,this.getData())}},Ai={initPreview:function(){var t=this.element,i=this.crossOrigin,e=this.options.preview,n=i?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",o=document.createElement("img");if(i&&(o.crossOrigin=i),o.src=n,o.alt=r,this.viewBox.appendChild(o),this.viewBoxImage=o,!!e){var s=e;typeof e=="string"?s=t.ownerDocument.querySelectorAll(e):e.querySelector&&(s=[e]),this.previews=s,L(s,function(d){var l=document.createElement("img");gt(d,wt,{width:d.offsetWidth,height:d.offsetHeight,html:d.innerHTML}),i&&(l.crossOrigin=i),l.src=n,l.alt=r,l.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',d.innerHTML="",d.appendChild(l)})}},resetPreview:function(){L(this.previews,function(t){var i=It(t,wt);Q(t,{width:i.width,height:i.height}),t.innerHTML=i.html,bi(t,wt)})},preview:function(){var t=this.imageData,i=this.canvasData,e=this.cropBoxData,n=e.width,r=e.height,o=t.width,s=t.height,d=e.left-i.left-t.left,l=e.top-i.top-t.top;!this.cropped||this.disabled||(Q(this.viewBoxImage,C({width:o,height:s},pt(C({translateX:-d,translateY:-l},t)))),L(this.previews,function(h){var c=It(h,wt),u=c.width,v=c.height,g=u,f=v,y=1;n&&(y=u/n,f=r*y),r&&f>v&&(y=v/r,g=n*y,f=v),Q(h,{width:g,height:f}),Q(h.getElementsByTagName("img")[0],C({width:o*y,height:s*y},pt(C({translateX:-d*y,translateY:-l*y},t))))}))}},Li={bind:function(){var t=this.element,i=this.options,e=this.cropper;P(i.cropstart)&&V(t,Lt,i.cropstart),P(i.cropmove)&&V(t,At,i.cropmove),P(i.cropend)&&V(t,St,i.cropend),P(i.crop)&&V(t,Nt,i.crop),P(i.zoom)&&V(t,Bt,i.zoom),V(e,ee,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&V(e,oe,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&V(e,te,this.onDblclick=this.dblclick.bind(this)),V(t.ownerDocument,ie,this.onCropMove=this.cropMove.bind(this)),V(t.ownerDocument,ae,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&V(window,ne,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,e=this.cropper;P(i.cropstart)&&j(t,Lt,i.cropstart),P(i.cropmove)&&j(t,At,i.cropmove),P(i.cropend)&&j(t,St,i.cropend),P(i.crop)&&j(t,Nt,i.crop),P(i.zoom)&&j(t,Bt,i.zoom),j(e,ee,this.onCropStart),i.zoomable&&i.zoomOnWheel&&j(e,oe,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&j(e,te,this.onDblclick),j(t.ownerDocument,ie,this.onCropMove),j(t.ownerDocument,ae,this.onCropEnd),i.responsive&&j(window,ne,this.onResize)}},Bi={resize:function(){if(!this.disabled){var t=this.options,i=this.container,e=this.containerData,n=i.offsetWidth/e.width,r=i.offsetHeight/e.height,o=Math.abs(n-1)>Math.abs(r-1)?n:r;if(o!==1){var s,d;t.restore&&(s=this.getCanvasData(),d=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(L(s,function(l,h){s[h]=l*o})),this.setCropBoxData(L(d,function(l,h){d[h]=l*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===be||this.setDragMode(mi(this.dragBox,Ot)?we:Pt)},wheel:function(t){var i=this,e=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*e,t)))},cropStart:function(t){var i=t.buttons,e=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(w(i)&&i!==1||w(e)&&e!==0||t.ctrlKey))){var n=this.options,r=this.pointers,o;t.changedTouches?L(t.changedTouches,function(s){r[s.identifier]=bt(s)}):r[t.pointerId||0]=bt(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?o=me:o=It(t.target,ft),si.test(o)&&st(this.element,Lt,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===ge&&(this.cropping=!0,I(this.dragBox,yt)))}},cropMove:function(t){var i=this.action;if(!(this.disabled||!i)){var e=this.pointers;t.preventDefault(),st(this.element,At,{originalEvent:t,action:i})!==!1&&(t.changedTouches?L(t.changedTouches,function(n){C(e[n.identifier]||{},bt(n,!0))}):C(e[t.pointerId||0]||{},bt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,e=this.pointers;t.changedTouches?L(t.changedTouches,function(n){delete e[n.identifier]}):delete e[t.pointerId||0],i&&(t.preventDefault(),Object.keys(e).length||(this.action=""),this.cropping&&(this.cropping=!1,nt(this.dragBox,yt,this.cropped&&this.options.modal)),st(this.element,St,{originalEvent:t,action:i}))}}},Ii={change:function(t){var i=this.options,e=this.canvasData,n=this.containerData,r=this.cropBoxData,o=this.pointers,s=this.action,d=i.aspectRatio,l=r.left,h=r.top,c=r.width,u=r.height,v=l+c,g=h+u,f=0,y=0,T=n.width,O=n.height,E=!0,U;!d&&t.shiftKey&&(d=c&&u?c/u:1),this.limited&&(f=r.minLeft,y=r.minTop,T=f+Math.min(n.width,e.width,e.left+e.width),O=y+Math.min(n.height,e.height,e.top+e.height));var M=o[Object.keys(o)[0]],p={x:M.endX-M.startX,y:M.endY-M.startY},x=function(m){switch(m){case tt:v+p.x>T&&(p.x=T-v);break;case et:l+p.x<f&&(p.x=f-l);break;case F:h+p.y<y&&(p.y=y-h);break;case at:g+p.y>O&&(p.y=O-g);break}};switch(s){case Ht:l+=p.x,h+=p.y;break;case tt:if(p.x>=0&&(v>=T||d&&(h<=y||g>=O))){E=!1;break}x(tt),c+=p.x,c<0&&(s=et,c=-c,l-=c),d&&(u=c/d,h+=(r.height-u)/2);break;case F:if(p.y<=0&&(h<=y||d&&(l<=f||v>=T))){E=!1;break}x(F),u-=p.y,h+=p.y,u<0&&(s=at,u=-u,h-=u),d&&(c=u*d,l+=(r.width-c)/2);break;case et:if(p.x<=0&&(l<=f||d&&(h<=y||g>=O))){E=!1;break}x(et),c-=p.x,l+=p.x,c<0&&(s=tt,c=-c,l-=c),d&&(u=c/d,h+=(r.height-u)/2);break;case at:if(p.y>=0&&(g>=O||d&&(l<=f||v>=T))){E=!1;break}x(at),u+=p.y,u<0&&(s=F,u=-u,h-=u),d&&(c=u*d,l+=(r.width-c)/2);break;case ct:if(d){if(p.y<=0&&(h<=y||v>=T)){E=!1;break}x(F),u-=p.y,h+=p.y,c=u*d}else x(F),x(tt),p.x>=0?v<T?c+=p.x:p.y<=0&&h<=y&&(E=!1):c+=p.x,p.y<=0?h>y&&(u-=p.y,h+=p.y):(u-=p.y,h+=p.y);c<0&&u<0?(s=ut,u=-u,c=-c,h-=u,l-=c):c<0?(s=lt,c=-c,l-=c):u<0&&(s=dt,u=-u,h-=u);break;case lt:if(d){if(p.y<=0&&(h<=y||l<=f)){E=!1;break}x(F),u-=p.y,h+=p.y,c=u*d,l+=r.width-c}else x(F),x(et),p.x<=0?l>f?(c-=p.x,l+=p.x):p.y<=0&&h<=y&&(E=!1):(c-=p.x,l+=p.x),p.y<=0?h>y&&(u-=p.y,h+=p.y):(u-=p.y,h+=p.y);c<0&&u<0?(s=dt,u=-u,c=-c,h-=u,l-=c):c<0?(s=ct,c=-c,l-=c):u<0&&(s=ut,u=-u,h-=u);break;case ut:if(d){if(p.x<=0&&(l<=f||g>=O)){E=!1;break}x(et),c-=p.x,l+=p.x,u=c/d}else x(at),x(et),p.x<=0?l>f?(c-=p.x,l+=p.x):p.y>=0&&g>=O&&(E=!1):(c-=p.x,l+=p.x),p.y>=0?g<O&&(u+=p.y):u+=p.y;c<0&&u<0?(s=ct,u=-u,c=-c,h-=u,l-=c):c<0?(s=dt,c=-c,l-=c):u<0&&(s=lt,u=-u,h-=u);break;case dt:if(d){if(p.x>=0&&(v>=T||g>=O)){E=!1;break}x(tt),c+=p.x,u=c/d}else x(at),x(tt),p.x>=0?v<T?c+=p.x:p.y>=0&&g>=O&&(E=!1):c+=p.x,p.y>=0?g<O&&(u+=p.y):u+=p.y;c<0&&u<0?(s=lt,u=-u,c=-c,h-=u,l-=c):c<0?(s=ut,c=-c,l-=c):u<0&&(s=ct,u=-u,h-=u);break;case ve:this.move(p.x,p.y),E=!1;break;case me:this.zoom(xi(o),t),E=!1;break;case ge:if(!p.x||!p.y){E=!1;break}U=Ce(this.cropper),l=M.startX-U.left,h=M.startY-U.top,c=r.minWidth,u=r.minHeight,p.x>0?s=p.y>0?dt:ct:p.x<0&&(l-=c,s=p.y>0?ut:lt),p.y<0&&(h-=u),this.cropped||(G(this.cropBox,$),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(r.width=c,r.height=u,r.left=l,r.top=h,this.action=s,this.renderCropBox()),L(o,function(N){N.startX=N.endX,N.startY=N.endY})}},ki={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&I(this.dragBox,yt),G(this.cropBox,$),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=C({},this.initialImageData),this.canvasData=C({},this.initialCanvasData),this.cropBoxData=C({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(C(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),G(this.dragBox,yt),I(this.cropBox,$)),this},replace:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,L(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,G(this.cropper,Zt)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,I(this.cropper,Zt)),this},destroy:function(){var t=this.element;return t[_]?(t[_]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,n=e.left,r=e.top;return this.moveTo(_t(t)?t:n+Number(t),_t(i)?i:r+Number(i))},moveTo:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(w(t)&&(e.left=t,n=!0),w(i)&&(e.top=i,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,i){var e=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(e.width*t/e.naturalWidth,null,i)},zoomTo:function(t,i,e){var n=this.options,r=this.canvasData,o=r.width,s=r.height,d=r.naturalWidth,l=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var h=d*t,c=l*t;if(st(this.element,Bt,{ratio:t,oldRatio:o/d,originalEvent:e})===!1)return this;if(e){var u=this.pointers,v=Ce(this.cropper),g=u&&Object.keys(u).length?Di(u):{pageX:e.pageX,pageY:e.pageY};r.left-=(h-o)*((g.pageX-v.left-r.left)/o),r.top-=(c-s)*((g.pageY-v.top-r.top)/s)}else rt(i)&&w(i.x)&&w(i.y)?(r.left-=(h-o)*((i.x-r.left)/o),r.top-=(c-s)*((i.y-r.top)/s)):(r.left-=(h-o)/2,r.top-=(c-s)/2);r.width=h,r.height=c,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),w(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,w(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(w(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.imageData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(w(t)&&(e.scaleX=t,n=!0),w(i)&&(e.scaleY=i,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.options,e=this.imageData,n=this.canvasData,r=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var s=e.width/e.naturalWidth;if(L(o,function(h,c){o[c]=h/s}),t){var d=Math.round(o.y+o.height),l=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=l-o.x,o.height=d-o.y}}else o={x:0,y:0,width:0,height:0};return i.rotatable&&(o.rotate=e.rotate||0),i.scalable&&(o.scaleX=e.scaleX||1,o.scaleY=e.scaleY||1),o},setData:function(t){var i=this.options,e=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&rt(t)){var o=!1;i.rotatable&&w(t.rotate)&&t.rotate!==e.rotate&&(e.rotate=t.rotate,o=!0),i.scalable&&(w(t.scaleX)&&t.scaleX!==e.scaleX&&(e.scaleX=t.scaleX,o=!0),w(t.scaleY)&&t.scaleY!==e.scaleY&&(e.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=e.width/e.naturalWidth;w(t.x)&&(r.left=t.x*s+n.left),w(t.y)&&(r.top=t.y*s+n.top),w(t.width)&&(r.width=t.width*s),w(t.height)&&(r.height=t.height*s),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?C({},this.containerData):{}},getImageData:function(){return this.sized?C({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&L(["left","top","width","height","naturalWidth","naturalHeight"],function(e){i[e]=t[e]}),i},setCanvasData:function(t){var i=this.canvasData,e=i.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(w(t.left)&&(i.left=t.left),w(t.top)&&(i.top=t.top),w(t.width)?(i.width=t.width,i.height=t.width/e):w(t.height)&&(i.height=t.height,i.width=t.height*e),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,e=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(w(t.left)&&(i.left=t.left),w(t.top)&&(i.top=t.top),w(t.width)&&t.width!==i.width&&(n=!0,i.width=t.width),w(t.height)&&t.height!==i.height&&(r=!0,i.height=t.height),e&&(n?i.height=i.width/e:r&&(i.width=i.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,e=_i(this.image,this.imageData,i,t);if(!this.cropped)return e;var n=this.getData(t.rounded),r=n.x,o=n.y,s=n.width,d=n.height,l=e.width/Math.floor(i.naturalWidth);l!==1&&(r*=l,o*=l,s*=l,d*=l);var h=s/d,c=K({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),u=K({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),v=K({aspectRatio:h,width:t.width||(l!==1?e.width:s),height:t.height||(l!==1?e.height:d)}),g=v.width,f=v.height;g=Math.min(c.width,Math.max(u.width,g)),f=Math.min(c.height,Math.max(u.height,f));var y=document.createElement("canvas"),T=y.getContext("2d");y.width=ot(g),y.height=ot(f),T.fillStyle=t.fillColor||"transparent",T.fillRect(0,0,g,f);var O=t.imageSmoothingEnabled,E=O===void 0?!0:O,U=t.imageSmoothingQuality;T.imageSmoothingEnabled=E,U&&(T.imageSmoothingQuality=U);var M=e.width,p=e.height,x=r,N=o,m,b,D,R,S,W;x<=-s||x>M?(x=0,m=0,D=0,S=0):x<=0?(D=-x,x=0,m=Math.min(M,s+x),S=m):x<=M&&(D=0,m=Math.min(s,M-x),S=m),m<=0||N<=-d||N>p?(N=0,b=0,R=0,W=0):N<=0?(R=-N,N=0,b=Math.min(p,d+N),W=b):N<=p&&(R=0,b=Math.min(d,p-N),W=b);var H=[x,N,m,b];if(S>0&&W>0){var Z=g/s;H.push(D*Z,R*Z,S*Z,W*Z)}return T.drawImage.apply(T,[e].concat(pe(H.map(function(vt){return Math.floor(ot(vt))})))),y},setAspectRatio:function(t){var i=this.options;return!this.disabled&&!_t(t)&&(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,e=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===Pt,o=i.movable&&t===we;t=r||o?t:be,i.dragMode=t,gt(e,ft,t),nt(e,Ot,r),nt(e,Rt,o),i.cropBoxMovable||(gt(n,ft,t),nt(n,Ot,r),nt(n,Rt,o))}return this}},zi=q.Cropper,Te=function(){function a(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Fe(this,a),!t||!li.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=C({},he,rt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Qe(a,[{key:"init",value:function(){var i=this.element,e=i.tagName.toLowerCase(),n;if(!i[_]){if(i[_]=this,e==="img"){if(this.isImg=!0,n=i.getAttribute("src")||"",this.originalUrl=n,!n)return;n=i.src}else e==="canvas"&&window.HTMLCanvasElement&&(n=i.toDataURL());this.load(n)}}},{key:"load",value:function(i){var e=this;if(i){this.url=i,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(hi.test(i)){ci.test(i)?this.read(Ti(i)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==se&&o.abort()},o.onload=function(){e.read(o.response)},o.onloadend=function(){e.reloading=!1,e.xhr=null},r.checkCrossOrigin&&le(i)&&n.crossOrigin&&(i=de(i)),o.open("GET",i,!0),o.responseType="arraybuffer",o.withCredentials=n.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(i){var e=this.options,n=this.imageData,r=Ri(i),o=0,s=1,d=1;if(r>1){this.url=Oi(i,se);var l=Ni(r);o=l.rotate,s=l.scaleX,d=l.scaleY}e.rotatable&&(n.rotate=o),e.scalable&&(n.scaleX=s,n.scaleY=d),this.clone()}},{key:"clone",value:function(){var i=this.element,e=this.url,n=i.crossOrigin,r=e;this.options.checkCrossOrigin&&le(e)&&(n||(n="anonymous"),r=de(e)),this.crossOrigin=n,this.crossOriginUrl=r;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r||e,o.alt=i.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),I(o,Jt),i.parentNode.insertBefore(o,i.nextSibling)}},{key:"start",value:function(){var i=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var n=q.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent),r=function(l,h){C(i.imageData,{naturalWidth:l,naturalHeight:h,aspectRatio:l/h}),i.initialImageData=C({},i.imageData),i.sizing=!1,i.sized=!0,i.build()};if(e.naturalWidth&&!n){r(e.naturalWidth,e.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){r(o.width,o.height),n||s.removeChild(o)},o.src=e.src,n||(o.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;",s.appendChild(o))}},{key:"stop",value:function(){var i=this.image;i.onload=null,i.onerror=null,i.parentNode.removeChild(i),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var i=this.element,e=this.options,n=this.image,r=i.parentNode,o=document.createElement("div");o.innerHTML=di;var s=o.querySelector(".".concat(_,"-container")),d=s.querySelector(".".concat(_,"-canvas")),l=s.querySelector(".".concat(_,"-drag-box")),h=s.querySelector(".".concat(_,"-crop-box")),c=h.querySelector(".".concat(_,"-face"));this.container=r,this.cropper=s,this.canvas=d,this.dragBox=l,this.cropBox=h,this.viewBox=s.querySelector(".".concat(_,"-view-box")),this.face=c,d.appendChild(n),I(i,$),r.insertBefore(s,i.nextSibling),G(n,Jt),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,I(h,$),e.guides||I(h.getElementsByClassName("".concat(_,"-dashed")),$),e.center||I(h.getElementsByClassName("".concat(_,"-center")),$),e.background&&I(s,"".concat(_,"-bg")),e.highlight||I(c,ai),e.cropBoxMovable&&(I(c,Rt),gt(c,ft,Ht)),e.cropBoxResizable||(I(h.getElementsByClassName("".concat(_,"-line")),$),I(h.getElementsByClassName("".concat(_,"-point")),$)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),P(e.ready)&&V(i,re,e.ready,{once:!0}),st(i,re)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var i=this.cropper.parentNode;i&&i.removeChild(this.cropper),G(this.element,$)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=zi,a}},{key:"setDefaults",value:function(i){C(he,rt(i)&&i)}}]),a}();C(Te.prototype,Si,Ai,Li,Bi,Ii,ki);const Hi={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Pi=z("path",{fill:"currentColor",d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8m756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2"},null,-1),$i=[Pi];function Yi(a,t){return Y(),X("svg",Hi,[...$i])}const Xi={render:Yi},Wi={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Vi=z("path",{fill:"currentColor",d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13M878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8"},null,-1),Ui=[Vi];function ji(a,t){return Y(),X("svg",Wi,[...Ui])}const Gi={render:ji},qi={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},Fi=z("path",{d:"m296.992 216.992-272 272L3.008 512l21.984 23.008 272 272 46.016-46.016L126.016 544h772L680.992 760.992l46.016 46.016 272-272L1020.992 512l-21.984-23.008-272-272-46.048 46.048L898.016 480h-772l216.96-216.992z"},null,-1),Qi=[Fi];function Ki(a,t){return Y(),X("svg",qi,[...Qi])}const Zi={render:Ki},Ji={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},ta=z("path",{d:"m512 67.008-23.008 21.984-256 256 46.048 46.048L480 190.016v644L279.008 632.96l-46.048 46.08 256 256 23.008 21.984 23.008-21.984 256-256-46.016-46.016L544 834.016v-644l200.992 200.96 46.016-45.984-256-256z"},null,-1),ea=[ta];function ia(a,t){return Y(),X("svg",Ji,[...ea])}const aa={render:ia},ra={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},na=z("path",{fill:"currentColor",d:"M868 545.5 536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2"},null,-1),oa=[na];function sa(a,t){return Y(),X("svg",ra,[...oa])}const ha={render:sa},ca={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},la=Ie('<path d="M956.8 988.8H585.6c-16 0-25.6-9.6-25.6-28.8V576c0-16 9.6-28.8 25.6-28.8h371.2c16 0 25.6 9.6 25.6 28.8v384c0 16-9.6 28.8-25.6 28.8M608 937.6h326.4V598.4H608zm-121.6 44.8C262.4 982.4 144 848 144 595.2c0-19.2 9.6-28.8 25.6-28.8s25.6 12.8 25.6 28.8c0 220.8 96 326.4 288 326.4 16 0 25.6 12.8 25.6 28.8s-6.4 32-22.4 32"></path><path d="M262.4 694.4c-6.4 0-9.6-3.2-16-6.4L160 601.6c-9.6-9.6-9.6-22.4 0-28.8s22.4-9.6 28.8 0l86.4 86.4c9.6 9.6 9.6 22.4 0 28.8-3.2 3.2-6.4 6.4-12.8 6.4"></path><path d="M86.4 694.4c-6.4 0-9.6-3.2-16-6.4-9.6-9.6-9.6-22.4 0-28.8l86.4-86.4c9.6-9.6 22.4-9.6 28.8 0 9.6 9.6 9.6 22.4 0 28.8L99.2 688c-3.2 3.2-6.4 6.4-12.8 6.4m790.4-249.6c-16 0-28.8-12.8-28.8-32 0-224-99.2-336-300.8-336-16 0-28.8-12.8-28.8-32s9.6-32 28.8-32c233.6 0 355.2 137.6 355.2 396.8 0 22.4-9.6 35.2-25.6 35.2"></path><path d="M876.8 448c-6.4 0-9.6-3.2-16-6.4l-86.4-86.4c-9.6-9.6-9.6-22.4 0-28.8s22.4-9.6 28.8 0l86.4 86.4c9.6 9.6 9.6 22.4 0 28.8 0 3.2-6.4 6.4-12.8 6.4"></path><path d="M876.8 448c-6.4 0-9.6-3.2-16-6.4-9.6-9.6-9.6-22.4 0-28.8l86.4-86.4c9.6-9.6 22.4-9.6 28.8 0s9.6 22.4 0 28.8l-86.4 86.4c-3.2 3.2-6.4 6.4-12.8 6.4M288 524.8C156.8 524.8 48 416 48 278.4S156.8 35.2 288 35.2 528 144 528 281.6 419.2 524.8 288 524.8m-3.2-432c-99.2 0-179.2 83.2-179.2 185.6S185.6 464 284.8 464 464 380.8 464 278.4 384 92.8 284.8 92.8"></path>',5),da=[la];function ua(a,t){return Y(),X("svg",ca,[...da])}const pa={render:ua},fa={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},ga=z("path",{fill:"currentColor",d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2"},null,-1),va=[ga];function ma(a,t){return Y(),X("svg",fa,[...va])}const wa={render:ma},ba={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},ya=z("path",{fill:"currentColor",d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 0 0 0 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1),xa=[ya];function Da(a,t){return Y(),X("svg",ba,[...xa])}const Ma={render:Da},_a={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Ca=z("path",{fill:"currentColor",d:"M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8"},null,-1),Ea=[Ca];function Ta(a,t){return Y(),X("svg",_a,[...Ea])}const Oa={render:Ta},Ra={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Na=z("path",{fill:"currentColor",d:"M869 487.8 491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 0 0 0-48.4"},null,-1),Sa=[Na];function Aa(a,t){return Y(),X("svg",Ra,[...Sa])}const La={render:Aa},Ba={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Ia=z("path",{fill:"currentColor",d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H188V494h440z"},null,-1),ka=z("path",{fill:"currentColor",d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8 11 40.7 14 82.7 8.9 124.8-.7 5.4-1.4 10.8-2.4 16.1h74.9c14.8-103.6-11.3-213-81-302.3"},null,-1),za=[Ia,ka];function Ha(a,t){return Y(),X("svg",Ba,[...za])}const Pa={render:Ha},$a={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Ya=z("path",{fill:"currentColor",d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430"},null,-1),Xa=[Ya];function Wa(a,t){return Y(),X("svg",$a,[...Xa])}const Va={render:Wa},Ua={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},ja=z("path",{fill:"currentColor",d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2-69.6 89.2-95.7 198.6-81.1 302.4h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8"},null,-1),Ga=z("path",{fill:"currentColor",d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H396V494h440z"},null,-1),qa=[ja,Ga];function Fa(a,t){return Y(),X("svg",Ua,[...qa])}const Qa={render:Fa},Ka={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Za=z("path",{fill:"currentColor",d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430"},null,-1),Ja=[Za];function tr(a,t){return Y(),X("svg",Ka,[...Ja])}const er={render:tr},ir={aspectRatio:1,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,autoCrop:!0,background:!0,highlight:!0,center:!0,responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,scalable:!0,modal:!0,guides:!0,movable:!0,rotatable:!0},ar={src:{type:String,required:!0},alt:{type:String},circled:{type:Boolean,default:!1},realTimePreview:{type:Boolean,default:!0},height:{type:[String,Number],default:"360px"},crossorigin:{type:String,default:void 0},imageStyle:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},rr=Ft({name:"ReCropper",props:ar,setup(a,{attrs:t,emit:i}){const e=J(),n=J(),r=J(),o=J(!1),s=J(),d=J(a.circled),l=J(a.src);let h=1,c=1;const u=Ye(O,80),v=mt(()=>ht({height:a.height,maxWidth:"100%"},a.imageStyle)),g=mt(()=>[t.class,{"re-circled":d.value}]),f=mt(()=>["p-[6px]","h-[30px]","w-[30px]","outline-none","rounded-[4px]","cursor-pointer","hover:bg-[rgba(0,0,0,0.06)]"]),y=mt(()=>({height:`${a.height}`.replace(/px/,"")+"px"}));ke(T),ze(()=>{var m;(m=r.value)==null||m.destroy()}),He(e,()=>{M("reset")});function T(){return qt(this,null,function*(){const m=Pe(n);m&&(r.value=new Te(m,ht(Gt(ht({},ir),{ready:()=>{o.value=!0,O(),$e(400).then(()=>i("readied",r.value))},crop(){u()},zoom(){u()},cropmove(){u()}}),a.options)))})}function O(){a.realTimePreview&&E()}function E(){if(!r.value)return;(d.value?U():r.value.getCroppedCanvas()).toBlob(b=>{if(!b)return;const D=new FileReader;D.readAsDataURL(b),D.onloadend=R=>{var S;!((S=R.target)!=null&&S.result)||!b||(s.value=R.target.result,i("cropper",{base64:R.target.result,blob:b,info:ht({size:b.size},r.value.getData())}))},D.onerror=()=>{i("error")}})}function U(){const m=r.value.getCroppedCanvas(),b=document.createElement("canvas"),D=b.getContext("2d"),R=m.width,S=m.height;return b.width=R,b.height=S,D.imageSmoothingEnabled=!0,D.drawImage(m,0,0,R,S),D.globalCompositeOperation="destination-in",D.beginPath(),D.arc(R/2,S/2,Math.min(R,S)/2,0,2*Math.PI,!0),D.fill(),b}function M(m,b){var D,R,S,W;m==="scaleX"&&(h=b=h===-1?1:-1),m==="scaleY"&&(c=b=c===-1?1:-1),b&&We(b)?(R=(D=r.value)==null?void 0:D[m])==null||R.call(D,...b):(W=(S=r.value)==null?void 0:S[m])==null||W.call(S,b)}function p(m){const b=new FileReader;return b.readAsDataURL(m),l.value="",b.onload=D=>{var R;l.value=(R=D.target)==null?void 0:R.result},b.onloadend=()=>{T()},!1}const x=Ft({directives:{longpress:Ue},setup(){return()=>B("div",{class:"flex flex-wrap w-[60px] justify-between"},[B(je,{accept:"image/*","show-file-list":!1,"before-upload":p},{default:()=>[k(B(Gi,{class:f.value},null),[[A("tippy"),{content:"上传",placement:"left-start"}]])]}),k(B(Oa,{class:f.value,onClick:()=>Ge(s.value,"cropping.png")},null),[[A("tippy"),{content:"下载",placement:"right-start"}]]),k(B(pa,{class:f.value,onClick:()=>{d.value=!d.value,O()}},null),[[A("tippy"),{content:"圆形、矩形裁剪",placement:"left-start"}]]),k(B(Xi,{class:f.value,onClick:()=>M("reset")},null),[[A("tippy"),{content:"重置",placement:"right-start"}]]),k(B(ha,{class:f.value},null),[[A("tippy"),{content:"上移(可长按)",placement:"left-start"}],[A("longpress"),()=>M("move",[0,-10]),"0:100"]]),k(B(wa,{class:f.value},null),[[A("tippy"),{content:"下移(可长按)",placement:"right-start"}],[A("longpress"),()=>M("move",[0,10]),"0:100"]]),k(B(Ma,{class:f.value},null),[[A("tippy"),{content:"左移(可长按)",placement:"left-start"}],[A("longpress"),()=>M("move",[-10,0]),"0:100"]]),k(B(La,{class:f.value},null),[[A("tippy"),{content:"右移(可长按)",placement:"right-start"}],[A("longpress"),()=>M("move",[10,0]),"0:100"]]),k(B(Zi,{class:f.value,onClick:()=>M("scaleX",-1)},null),[[A("tippy"),{content:"水平翻转",placement:"left-start"}]]),k(B(aa,{class:f.value,onClick:()=>M("scaleY",-1)},null),[[A("tippy"),{content:"垂直翻转",placement:"right-start"}]]),k(B(Pa,{class:f.value,onClick:()=>M("rotate",-45)},null),[[A("tippy"),{content:"逆时针旋转",placement:"left-start"}]]),k(B(Qa,{class:f.value,onClick:()=>M("rotate",45)},null),[[A("tippy"),{content:"顺时针旋转",placement:"right-start"}]]),k(B(Va,{class:f.value},null),[[A("tippy"),{content:"放大(可长按)",placement:"left-start"}],[A("longpress"),()=>M("zoom",.1),"0:100"]]),k(B(er,{class:f.value},null),[[A("tippy"),{content:"缩小(可长按)",placement:"right-start"}],[A("longpress"),()=>M("zoom",-.1),"0:100"]])])}});function N(m){m.preventDefault();const{show:b,setProps:D}=Xe(e,{content:x,arrow:!1,theme:"light",trigger:"manual",interactive:!0,appendTo:"parent",animation:"perspective",placement:"bottom-end"});D({getReferenceClientRect:()=>({width:0,height:0,top:m.clientY,bottom:m.clientY,left:m.clientX,right:m.clientX})}),b()}return{inSrc:l,props:a,imgElRef:n,tippyElRef:e,getClass:g,getWrapperStyle:y,getImageStyle:v,isReady:o,croppered:E,onContextmenu:N}},render(){const{inSrc:a,isReady:t,getClass:i,getImageStyle:e,onContextmenu:n,getWrapperStyle:r}=this,{alt:o,crossorigin:s}=this.props;return a?B("div",{ref:"tippyElRef",class:i,style:r,onContextmenu:d=>n(d)},[k(B("img",{ref:"imgElRef",style:e,src:a,alt:o,crossorigin:s},null),[[Ve,t]])]):null}}),sr=qe(rr);export{sr as R};