vue-cropperjs2 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- (function(k,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(k=typeof globalThis<"u"?globalThis:k||self,d(k["vue-cropperjs2"]={},k.Vue))})(this,function(k,d){"use strict";const F=typeof window<"u"&&typeof window.document<"u",R=F?window:{},dt=F?"ontouchstart"in R.document.documentElement:!1,ft=F?"PointerEvent"in R:!1,z="cropper",j=`${z}-canvas`,ae=`${z}-crosshair`,oe=`${z}-grid`,re=`${z}-handle`,q=`${z}-image`,_=`${z}-selection`,he=`${z}-shade`,ce=`${z}-viewer`,V="select",gt="move",H="scale",ut="rotate",J="transform",D="none",bt="n-resize",Ct="e-resize",vt="s-resize",yt="w-resize",U="ne-resize",Z="nw-resize",K="se-resize",G="sw-resize",le="action",de=dt?"touchend touchcancel":"mouseup",fe=dt?"touchmove":"mousemove",Et=ft?"pointerdown":dt?"touchstart":"mousedown",wt=ft?"pointermove":fe,St=ft?"pointerup pointercancel":de,At="error",Tt="keydown",Y="load",kt="wheel",L="action",W="actionend",ue="actionmove",X="actionstart",B="change",$t="transform";function $e(o){return typeof o=="string"}const xt=Number.isNaN||R.isNaN;function $(o){return typeof o=="number"&&!xt(o)}function x(o){return $(o)&&o>0&&o<1/0}function me(o){return typeof o>"u"}function Ot(o){return typeof o=="object"&&o!==null}const{hasOwnProperty:pe}=Object.prototype;function Q(o){if(!Ot(o))return!1;try{const{constructor:t}=o,{prototype:e}=t;return t&&e&&pe.call(e,"isPrototypeOf")}catch{return!1}}function mt(o){return typeof o=="function"}function Nt(o){return typeof o=="object"&&o!==null&&o.nodeType===1}const ge=/([a-z\d])([A-Z])/g;function Rt(o){return String(o).replace(ge,"$1-$2").toLowerCase()}const be=/-[A-z\d]/g;function It(o){return o.replace(be,t=>t.slice(1).toUpperCase())}const Pt=/\s\s*/;function y(o,t,e,i){t.trim().split(Pt).forEach(s=>{o.removeEventListener(s,e,i)})}function E(o,t,e,i){t.trim().split(Pt).forEach(s=>{o.addEventListener(s,e,i)})}function Mt(o,t,e,i){E(o,t,e,Object.assign(Object.assign({},i),{once:!0}))}const Ce={bubbles:!0,cancelable:!0,composed:!0};function ve(o,t,e,i){return o.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign(Object.assign({},Ce),{detail:e}),i)))}const zt=Promise.resolve();function ye(o,t){return t?zt.then(o?t.bind(o):t):zt}function _t(o){const{documentElement:t}=o.ownerDocument,e=o.getBoundingClientRect();return{left:e.left+(R.pageXOffset-t.clientLeft),top:e.top+(R.pageYOffset-t.clientTop)}}const Ee=/deg|g?rad|turn$/i;function pt(o){const t=parseFloat(o)||0;if(t!==0){const[e="rad"]=String(o).match(Ee)||[];switch(e.toLowerCase()){case"deg":return t/360*(Math.PI*2);case"grad":return t/400*(Math.PI*2);case"turn":return t*(Math.PI*2)}}return t}const Dt="contain",we="cover";function tt(o,t=Dt){const{aspectRatio:e}=o;let{width:i,height:s}=o;const n=x(i),h=x(s);if(n&&h){const a=s*e;t===Dt&&a>i||t===we&&a<i?s=i/e:i=s*e}else n?s=i/e:h&&(i=s*e);return{width:i,height:s}}function Bt(o,...t){if(t.length===0)return o;const[e,i,s,n,h,a]=o,[l,c,r,u,m,p]=t[0];return o=[e*l+s*c,i*l+n*c,e*r+s*u,i*r+n*u,e*m+s*p+h,i*m+n*p+a],Bt(o,...t.slice(1))}var Se=":host([hidden]){display:none!important}";const Ae=/left|top|width|height/i,Wt="open",et=new WeakMap,it=new WeakMap,Xt=new Map,Ht=R.document&&Array.isArray(R.document.adoptedStyleSheets)&&"replaceSync"in R.CSSStyleSheet.prototype;class M extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${Se}`}constructor(){var t,e;super(),this.shadowRootMode=Wt,this.slottable=!0;const i=(e=(t=Object.getPrototypeOf(this))===null||t===void 0?void 0:t.constructor)===null||e===void 0?void 0:e.$name;i&&Xt.set(i,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(t,e,i){if(Object.is(i,e))return;const s=It(t),n=this[s];let h=i;switch(typeof n){case"boolean":h=i!==null&&i!=="false";break;case"number":h=Number(i);break}switch(this[s]=h,t){case"theme-color":{const a=it.get(this),l=this.$sharedStyle;a&&l&&(Ht?a.replaceSync(l):a.textContent=l);break}}}$propertyChangedCallback(t,e,i){if(!Object.is(i,e))switch(t=Rt(t),typeof i){case"boolean":i===!0?this.hasAttribute(t)||this.setAttribute(t,""):this.removeAttribute(t);break;case"number":xt(i)?i="":i=String(i);default:i?this.getAttribute(t)!==i&&this.setAttribute(t,i):this.removeAttribute(t)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach(e=>{const i=It(e);let s=this[i];me(s)||this.$propertyChangedCallback(i,void 0,s),Object.defineProperty(this,i,{enumerable:!0,configurable:!0,get(){return s},set(n){const h=s;s=n,this.$propertyChangedCallback(i,h,n)}})});const t=this.attachShadow({mode:this.shadowRootMode||Wt});if(this.shadowRoot||et.set(this,t),it.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){const e=document.createElement("template");e.innerHTML=this.$template,t.appendChild(e.content)}if(this.slottable){const e=document.createElement("slot");t.appendChild(e)}}disconnectedCallback(){it.has(this)&&it.delete(this),et.has(this)&&et.delete(this)}$getTagNameOf(t){var e;return(e=Xt.get(t))!==null&&e!==void 0?e:t}$setStyles(t){return Object.keys(t).forEach(e=>{let i=t[e];$(i)&&(i!==0&&Ae.test(e)?i=`${i}px`:i=String(i)),this.style[e]=i}),this}$getShadowRoot(){return this.shadowRoot||et.get(this)}$addStyles(t){let e;const i=this.$getShadowRoot();return Ht?(e=new CSSStyleSheet,e.replaceSync(t),i.adoptedStyleSheets=i.adoptedStyleSheets.concat(e)):(e=document.createElement("style"),e.textContent=t,i.appendChild(e)),e}$emit(t,e,i){return ve(this,t,e,i)}$nextTick(t){return ye(this,t)}static $define(t,e){Ot(t)&&(e=t,t=""),t||(t=this.$name||this.name),t=Rt(t),F&&R.customElements&&!R.customElements.get(t)&&customElements.define(t,this,e)}}M.$version="2.0.0-rc.2";var Te=':host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}';class st extends M{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=Te,this.$action=D,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.disabled||this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(t,e,i){if(!Object.is(i,e))switch(super.$propertyChangedCallback(t,e,i),t){case"disabled":i?this.$unbind():this.$bind();break}}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),E(this,Et,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),E(this.ownerDocument,wt,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),E(this.ownerDocument,St,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),E(this,kt,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(y(this,Et,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(y(this.ownerDocument,wt,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(y(this.ownerDocument,St,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(y(this,kt,this.$onWheel,{capture:!0}),this.$onWheel=null)}$handlePointerDown(t){const{buttons:e,button:i,type:s}=t;if(this.disabled||(s==="pointerdown"&&t.pointerType==="mouse"||s==="mousedown")&&($(e)&&e!==1||$(i)&&i!==0||t.ctrlKey))return;const{$pointers:n}=this;let h="";if(t.changedTouches)Array.from(t.changedTouches).forEach(({identifier:a,pageX:l,pageY:c})=>{n.set(a,{startX:l,startY:c,endX:l,endY:c})});else{const{pointerId:a=0,pageX:l,pageY:c}=t;n.set(a,{startX:l,startY:c,endX:l,endY:c})}n.size>1?h=J:Nt(t.target)&&(h=t.target.action||t.target.getAttribute(le)||""),this.$emit(X,{action:h,relatedEvent:t})!==!1&&(t.preventDefault(),this.$action=h,this.style.willChange="transform")}$handlePointerMove(t){const{$action:e,$pointers:i}=this;if(this.disabled||e===D||i.size===0||this.$emit(ue,{action:e,relatedEvent:t})===!1)return;if(t.preventDefault(),t.changedTouches)Array.from(t.changedTouches).forEach(({identifier:n,pageX:h,pageY:a})=>{const l=i.get(n);l&&Object.assign(l,{endX:h,endY:a})});else{const{pointerId:n=0,pageX:h,pageY:a}=t,l=i.get(n);l&&Object.assign(l,{endX:h,endY:a})}const s={action:e,relatedEvent:t};if(e===J){const n=new Map(i);let h=0,a=0,l=0,c=0,r=t.pageX,u=t.pageY;i.forEach((f,A)=>{n.delete(A),n.forEach(w=>{let g=w.startX-f.startX,v=w.startY-f.startY,b=w.endX-f.endX,C=w.endY-f.endY,S=0,T=0,O=0,N=0;if(g===0?v<0?O=Math.PI*2:v>0&&(O=Math.PI):g>0?O=Math.PI/2+Math.atan(v/g):g<0&&(O=Math.PI*1.5+Math.atan(v/g)),b===0?C<0?N=Math.PI*2:C>0&&(N=Math.PI):b>0?N=Math.PI/2+Math.atan(C/b):b<0&&(N=Math.PI*1.5+Math.atan(C/b)),N>0||O>0){const I=N-O,P=Math.abs(I);P>h&&(h=P,l=I,r=(f.startX+w.startX)/2,u=(f.startY+w.startY)/2)}if(g=Math.abs(g),v=Math.abs(v),b=Math.abs(b),C=Math.abs(C),g>0&&v>0?S=Math.sqrt(g*g+v*v):g>0?S=g:v>0&&(S=v),b>0&&C>0?T=Math.sqrt(b*b+C*C):b>0?T=b:C>0&&(T=C),S>0&&T>0){const I=(T-S)/S,P=Math.abs(I);P>a&&(a=P,c=I,r=(f.startX+w.startX)/2,u=(f.startY+w.startY)/2)}})});const m=h>0,p=a>0;m&&p?(s.rotate=l,s.scale=c,s.centerX=r,s.centerY=u):m?(s.action=ut,s.rotate=l,s.centerX=r,s.centerY=u):p?(s.action=H,s.scale=c,s.centerX=r,s.centerY=u):s.action=D}else{const[n]=Array.from(i.values());Object.assign(s,n)}i.forEach(n=>{n.startX=n.endX,n.startY=n.endY}),s.action!==D&&this.$emit(L,s,{cancelable:!1})}$handlePointerUp(t){const{$action:e,$pointers:i}=this;if(!(this.disabled||e===D)&&this.$emit(W,{action:e,relatedEvent:t})!==!1){if(t.preventDefault(),t.changedTouches)Array.from(t.changedTouches).forEach(({identifier:s})=>{i.delete(s)});else{const{pointerId:s=0}=t;i.delete(s)}i.size===0&&(this.style.willChange="",this.$action=D)}}$handleWheel(t){if(this.disabled||(t.preventDefault(),this.$wheeling))return;this.$wheeling=!0,setTimeout(()=>{this.$wheeling=!1},50);const i=(t.deltaY>0?-1:1)*this.scaleStep;this.$emit(L,{action:H,scale:i,relatedEvent:t},{cancelable:!1})}$setAction(t){return $e(t)&&(this.$action=t),this}$toCanvas(t){return new Promise((e,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const s=document.createElement("canvas");let n=this.offsetWidth,h=this.offsetHeight,a=1;Q(t)&&(x(t.width)||x(t.height))&&({width:n,height:h}=tt({aspectRatio:n/h,width:t.width,height:t.height}),a=n/this.offsetWidth),s.width=n,s.height=h;const l=this.querySelector(this.$getTagNameOf(q));if(!l){e(s);return}l.$ready().then(c=>{const r=s.getContext("2d");if(r){const[u,m,p,f,A,w]=l.$getTransform();let g=A,v=w,b=c.naturalWidth,C=c.naturalHeight;a!==1&&(g*=a,v*=a,b*=a,C*=a);const S=b/2,T=C/2;r.fillStyle="transparent",r.fillRect(0,0,n,h),Q(t)&&mt(t.beforeDraw)&&t.beforeDraw.call(this,r,s),r.save(),r.translate(S,T),r.transform(u,m,p,f,g,v),r.translate(-S,-T),r.drawImage(c,0,0,b,C),r.restore()}e(s)}).catch(i)})}}st.$name=j,st.$version="2.0.0-rc.2";var ke=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}";const Yt=new WeakMap,Lt=["alt","crossorigin","decoding","importance","loading","referrerpolicy","sizes","src","srcset"];class nt extends M{constructor(){super(...arguments),this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=ke,this.$image=new Image,this.initialCenterSize="contain",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1}set $canvas(t){Yt.set(this,t)}get $canvas(){return Yt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Lt,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(t,e,i){Object.is(i,e)||(super.attributeChangedCallback(t,e,i),Lt.includes(t)&&this.$image.setAttribute(t,i))}$propertyChangedCallback(t,e,i){if(!Object.is(i,e))switch(super.$propertyChangedCallback(t,e,i),t){case"initialCenterSize":this.$nextTick(()=>{this.$center(i)});break}}connectedCallback(){super.connectedCallback();const{$image:t}=this,e=this.closest(this.$getTagNameOf(j));e&&(this.$canvas=e,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=i=>{var s,n;this.$actionStartTarget=(n=(s=i.detail)===null||s===void 0?void 0:s.relatedEvent)===null||n===void 0?void 0:n.target},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),E(e,X,this.$onCanvasActionStart),E(e,W,this.$onCanvasActionEnd),E(e,L,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),E(t,Y,this.$onLoad),this.$getShadowRoot().appendChild(t)}disconnectedCallback(){const{$image:t,$canvas:e}=this;e&&(this.$onCanvasActionStart&&(y(e,X,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(y(e,W,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(y(e,L,this.$onCanvasAction),this.$onCanvasAction=null)),t&&this.$onLoad&&(y(t,Y,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(t),super.disconnectedCallback()}$handleLoad(){const{$image:t}=this;this.$setStyles({width:t.naturalWidth,height:t.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize)}$handleAction(t){if(this.hidden||!(this.rotatable||this.scalable||this.translatable))return;const{$canvas:e}=this,{detail:i}=t;if(i){const{relatedEvent:s}=i;let{action:n}=i;switch(n===J&&(!this.rotatable||!this.scalable)&&(this.rotatable?n=ut:this.scalable?n=H:n=D),n){case gt:if(this.translatable){let h=null;s&&(h=s.target.closest(this.$getTagNameOf(_))),h||(h=e.querySelector(this.$getTagNameOf(_))),h&&h.multiple&&!h.active&&(h=e.querySelector(`${this.$getTagNameOf(_)}[active]`)),(!h||h.hidden||!h.movable||h.dynamic||!(this.$actionStartTarget&&h.contains(this.$actionStartTarget)))&&this.$move(i.endX-i.startX,i.endY-i.startY)}break;case ut:if(this.rotatable)if(s){const{x:h,y:a}=this.getBoundingClientRect();this.$rotate(i.rotate,s.clientX-h,s.clientY-a)}else this.$rotate(i.rotate);break;case H:if(this.scalable)if(s){const h=s.target.closest(this.$getTagNameOf(_));if(!h||!h.zoomable||h.zoomable&&h.dynamic){const{x:a,y:l}=this.getBoundingClientRect();this.$zoom(i.scale,s.clientX-a,s.clientY-l)}}else this.$zoom(i.scale);break;case J:if(this.rotatable&&this.scalable){const{rotate:h}=i;let{scale:a}=i;a<0?a=1/(1-a):a+=1;const l=Math.cos(h),c=Math.sin(h),[r,u,m,p]=[l*a,c*a,-c*a,l*a];if(s){const f=this.getBoundingClientRect(),A=s.clientX-f.x,w=s.clientY-f.y,[g,v,b,C]=this.$matrix,S=f.width/2,T=f.height/2,O=A-S,N=w-T,I=(O*C-b*N)/(g*C-b*v),P=(N*g-v*O)/(g*C-b*v);this.$transform(r,u,m,p,I*(1-r)+P*m,P*(1-p)+I*u)}else this.$transform(r,u,m,p,0,0)}break}}}$ready(t){const{$image:e}=this,i=new Promise((s,n)=>{const h=new Error("Failed to load the image source");if(e.complete)e.naturalWidth>0&&e.naturalHeight>0?s(e):n(h);else{const a=()=>{y(e,At,l),s(e)},l=()=>{y(e,Y,a),n(h)};Mt(e,Y,a),Mt(e,At,l)}});return mt(t)&&i.then(s=>(t(s),s)),i}$center(t){const{parentElement:e}=this;if(!e)return this;const i=e.getBoundingClientRect(),s=i.width,n=i.height,{x:h,y:a,width:l,height:c}=this.getBoundingClientRect(),r=h+l/2,u=a+c/2,m=i.x+s/2,p=i.y+n/2;if(this.$move(m-r,p-u),t&&(l!==s||c!==n)){const f=s/l,A=n/c;switch(t){case"cover":this.$scale(Math.max(f,A));break;case"contain":this.$scale(Math.min(f,A));break}}return this}$move(t,e=t){if(this.translatable&&$(t)&&$(e)){const[i,s,n,h]=this.$matrix,a=(t*h-n*e)/(i*h-n*s),l=(e*i-s*t)/(i*h-n*s);this.$translate(a,l)}return this}$moveTo(t,e=t){if(this.translatable&&$(t)&&$(e)){const[i,s,n,h]=this.$matrix,a=(t*h-n*e)/(i*h-n*s),l=(e*i-s*t)/(i*h-n*s);this.$setTransform(i,s,n,h,a,l)}return this}$rotate(t,e,i){if(this.rotatable){const s=pt(t),n=Math.cos(s),h=Math.sin(s),[a,l,c,r]=[n,h,-h,n];if($(e)&&$(i)){const[u,m,p,f]=this.$matrix,{width:A,height:w}=this.getBoundingClientRect(),g=A/2,v=w/2,b=e-g,C=i-v,S=(b*f-p*C)/(u*f-p*m),T=(C*u-m*b)/(u*f-p*m);this.$transform(a,l,c,r,S*(1-a)-T*c,T*(1-r)-S*l)}else this.$transform(a,l,c,r,0,0)}return this}$zoom(t,e,i){if(!this.scalable||t===0)return this;if(t<0?t=1/(1-t):t+=1,$(e)&&$(i)){const[s,n,h,a]=this.$matrix,{width:l,height:c}=this.getBoundingClientRect(),r=l/2,u=c/2,m=e-r,p=i-u,f=(m*a-h*p)/(s*a-h*n),A=(p*s-n*m)/(s*a-h*n);this.$transform(t,0,0,t,f*(1-t),A*(1-t))}else this.$scale(t);return this}$scale(t,e=t){return this.scalable&&this.$transform(t,0,0,e,0,0),this}$skew(t,e=0){if(this.skewable){const i=pt(t),s=pt(e);this.$transform(1,Math.tan(s),Math.tan(i),1,0,0)}return this}$translate(t,e=t){return this.translatable&&$(t)&&$(e)&&this.$transform(1,0,0,1,t,e),this}$transform(t,e,i,s,n,h){return $(t)&&$(e)&&$(i)&&$(s)&&$(n)&&$(h)?this.$setTransform(Bt(this.$matrix,[t,e,i,s,n,h])):this}$setTransform(t,e,i,s,n,h){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(t)&&([t,e,i,s,n,h]=t),$(t)&&$(e)&&$(i)&&$(s)&&$(n)&&$(h))){const a=[...this.$matrix],l=[t,e,i,s,n,h];if(this.$emit($t,{matrix:l,oldMatrix:a})===!1)return this;this.$matrix=l,this.style.transform=`matrix(${l.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}}nt.$name=q,nt.$version="2.0.0-rc.2";var xe=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}";const jt=new WeakMap;class at extends M{constructor(){super(...arguments),this.$onCanvasChange=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$style=xe,this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(t){jt.set(this,t)}get $canvas(){return jt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(j));if(t){this.$canvas=t,this.style.position="absolute";const e=t.querySelector(this.$getTagNameOf(_));e&&(this.$onCanvasActionStart=i=>{e.hidden&&i.detail.action===V&&(this.hidden=!1)},this.$onCanvasActionEnd=i=>{e.hidden&&i.detail.action===V&&(this.hidden=!0)},this.$onCanvasChange=i=>{const{x:s,y:n,width:h,height:a}=i.detail;this.$change(s,n,h,a),(e.hidden||s===0&&n===0&&h===0&&a===0)&&(this.hidden=!0)},E(t,X,this.$onCanvasActionStart),E(t,W,this.$onCanvasActionEnd),E(t,B,this.$onCanvasChange))}this.$render()}disconnectedCallback(){const{$canvas:t}=this;t&&(this.$onCanvasActionStart&&(y(t,X,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(y(t,W,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasChange&&(y(t,B,this.$onCanvasChange),this.$onCanvasChange=null)),super.disconnectedCallback()}$change(t,e,i=this.width,s=this.height){return!$(t)||!$(e)||!$(i)||!$(s)||t===this.x&&e===this.y&&i===this.width&&s===this.height?this:(this.hidden&&(this.hidden=!1),this.x=t,this.y=e,this.width=i,this.height=s,this.$render())}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:R.innerWidth})}}at.$name=he,at.$version="2.0.0-rc.2";var Oe=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}';class ot extends M{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=Oe,this.action=D,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}}ot.$name=re,ot.$version="2.0.0-rc.2";var Ne=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}';const Ut=new WeakMap;class rt extends M{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=Ne,this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(t){Ut.set(this,t)}get $canvas(){return Ut.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(t,e,i){if(!Object.is(i,e))switch(super.$propertyChangedCallback(t,e,i),t){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick(()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)});break;case"aspectRatio":case"initialAspectRatio":this.$nextTick(()=>{this.$initSelection()});break;case"initialCoverage":this.$nextTick(()=>{x(i)&&i<=1&&this.$initSelection(!0,!0)});break;case"keyboard":this.$nextTick(()=>{this.$canvas&&(i?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),E(this.ownerDocument,Tt,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(y(this.ownerDocument,Tt,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))});break;case"multiple":this.$nextTick(()=>{if(this.$canvas){const s=this.$getSelections();i?(s.forEach(n=>{n.active=!1}),this.active=!0,this.$emit(B,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,s.slice(1).forEach(n=>{this.$removeSelection(n)}))}});break;case"precise":this.$nextTick(()=>{this.$change(this.x,this.y)});break;case"linked":i&&(this.dynamic=!0);break}}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(j));t?(this.$canvas=t,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),E(t,X,this.$onCanvasActionStart),E(t,W,this.$onCanvasActionEnd),E(t,L,this.$onCanvasAction)):this.$render()}disconnectedCallback(){const{$canvas:t}=this;t&&(this.$onCanvasActionStart&&(y(t,X,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(y(t,W,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(y(t,L,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let t=[];return this.parentElement&&(t=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(_)))),t}$initSelection(t=!1,e=!1){const{initialCoverage:i,parentElement:s}=this;if(x(i)&&s){const n=this.aspectRatio||this.initialAspectRatio;let h=(e?0:this.width)||s.offsetWidth*i,a=(e?0:this.height)||s.offsetHeight*i;x(n)&&({width:h,height:a}=tt({aspectRatio:n,width:h,height:a})),this.$change(this.x,this.y,h,a),t&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){const t=this.cloneNode(!0);return this.hasAttribute("id")&&t.removeAttribute("id"),t.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(t,this.nextSibling),t}$removeSelection(t=this){if(this.parentElement){const e=this.$getSelections();if(e.length>1){const i=e.indexOf(t),s=e[i+1]||e[i-1];s&&(t.active=!1,this.parentElement.removeChild(t),s.active=!0,s.$emit(B,{x:s.x,y:s.y,width:s.width,height:s.height}))}else this.$clear()}}$handleActionStart(t){var e,i;const s=(i=(e=t.detail)===null||e===void 0?void 0:e.relatedEvent)===null||i===void 0?void 0:i.target;this.$action="",this.$actionStartTarget=s,!this.hidden&&this.multiple&&!this.active&&s===this&&this.parentElement&&(this.$getSelections().forEach(n=>{n.active=!1}),this.active=!0,this.$emit(B,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(t){const{currentTarget:e,detail:i}=t;if(!e||!i)return;const{relatedEvent:s}=i;let{action:n}=i;if(!n&&this.multiple&&(n=this.$action||(s==null?void 0:s.target.action),this.$action=n),!n||this.hidden&&n!==V||this.multiple&&!this.active&&n!==H)return;const h=i.endX-i.startX,a=i.endY-i.startY,{width:l,height:c}=this;let{aspectRatio:r}=this;switch(!x(r)&&s.shiftKey&&(r=x(l)&&x(c)?l/c:1),n){case V:if(h!==0&&a!==0){const{$canvas:u}=this,m=_t(e);(this.multiple&&!this.hidden?this.$createSelection():this).$change(i.startX-m.left,i.startY-m.top,Math.abs(h),Math.abs(a),r),h<0?a<0?n=Z:a>0&&(n=G):h>0&&(a<0?n=U:a>0&&(n=K)),u&&(u.$action=n)}break;case gt:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(h,a);break;case H:if(s&&this.zoomable&&(this.dynamic||this.contains(s.target))){const u=_t(e);this.$zoom(i.scale,s.pageX-u.left,s.pageY-u.top)}break;default:this.$resize(n,h,a,r)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(t){if(this.hidden||!this.keyboard||this.multiple&&!this.active||t.defaultPrevented)return;const{activeElement:e}=document;if(!(e&&(["INPUT","TEXTAREA"].includes(e.tagName)||["true","plaintext-only"].includes(e.contentEditable))))switch(t.key){case"Backspace":t.metaKey&&(t.preventDefault(),this.$removeSelection());break;case"Delete":t.preventDefault(),this.$removeSelection();break;case"ArrowLeft":t.preventDefault(),this.$move(-1,0);break;case"ArrowRight":t.preventDefault(),this.$move(1,0);break;case"ArrowUp":t.preventDefault(),this.$move(0,-1);break;case"ArrowDown":t.preventDefault(),this.$move(0,1);break;case"+":t.preventDefault(),this.$zoom(.1);break;case"-":t.preventDefault(),this.$zoom(-.1);break}}$center(){const{parentElement:t}=this;if(!t)return this;const e=(t.offsetWidth-this.width)/2,i=(t.offsetHeight-this.height)/2;return this.$change(e,i)}$move(t,e=t){return this.$moveTo(this.x+t,this.y+e)}$moveTo(t,e=t){return this.movable?this.$change(t,e):this}$resize(t,e=0,i=0,s=this.aspectRatio){if(!this.resizable)return this;const n=x(s),{$canvas:h}=this;let{x:a,y:l,width:c,height:r}=this;switch(t){case bt:l+=i,r-=i,r<0&&(t=vt,r=-r,l-=r),n&&(e=i*s,a+=e/2,c-=e,c<0&&(c=-c,a-=c));break;case Ct:c+=e,c<0&&(t=yt,c=-c,a-=c),n&&(i=e/s,l-=i/2,r+=i,r<0&&(r=-r,l-=r));break;case vt:r+=i,r<0&&(t=bt,r=-r,l-=r),n&&(e=i*s,a-=e/2,c+=e,c<0&&(c=-c,a-=c));break;case yt:a+=e,c-=e,c<0&&(t=Ct,c=-c,a-=c),n&&(i=e/s,l+=i/2,r-=i,r<0&&(r=-r,l-=r));break;case U:n&&(i=-e/s),l+=i,r-=i,c+=e,c<0&&r<0?(t=G,c=-c,r=-r,a-=c,l-=r):c<0?(t=Z,c=-c,a-=c):r<0&&(t=K,r=-r,l-=r);break;case Z:n&&(i=e/s),a+=e,l+=i,c-=e,r-=i,c<0&&r<0?(t=K,c=-c,r=-r,a-=c,l-=r):c<0?(t=U,c=-c,a-=c):r<0&&(t=G,r=-r,l-=r);break;case K:n&&(i=e/s),c+=e,r+=i,c<0&&r<0?(t=Z,c=-c,r=-r,a-=c,l-=r):c<0?(t=G,c=-c,a-=c):r<0&&(t=U,r=-r,l-=r);break;case G:n&&(i=-e/s),a+=e,c-=e,r+=i,c<0&&r<0?(t=U,c=-c,r=-r,a-=c,l-=r):c<0?(t=K,c=-c,a-=c):r<0&&(t=Z,r=-r,l-=r);break}return h&&h.$setAction(t),this.$change(a,l,c,r)}$zoom(t,e,i){if(!this.zoomable||t===0)return this;t<0?t=1/(1-t):t+=1;const{width:s,height:n}=this,h=s*t,a=n*t;let l=this.x,c=this.y;return $(e)&&$(i)?(l-=(h-s)*((e-this.x)/s),c-=(a-n)*((i-this.y)/n)):(l-=(h-s)/2,c-=(a-n)/2),this.$change(l,c,h,a)}$change(t,e,i=this.width,s=this.height,n=this.aspectRatio,h=!1){return this.$changing||!$(t)||!$(e)||!$(i)||!$(s)||i<0||s<0?this:(x(n)&&({width:i,height:s}=tt({aspectRatio:n,width:i,height:s},"cover")),this.precise||(t=Math.round(t),e=Math.round(e),i=Math.round(i),s=Math.round(s)),t===this.x&&e===this.y&&i===this.width&&s===this.height&&Object.is(n,this.aspectRatio)&&!h?this:(this.hidden&&(this.hidden=!1),this.$emit(B,{x:t,y:e,width:i,height:s})===!1?this:(this.$changing=!0,this.x=t,this.y=e,this.width=i,this.height=s,this.$changing=!1,this.$render())))}$reset(){const{x:t,y:e,width:i,height:s}=this.$initialSelection;return this.$change(t,e,i,s)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(t){return new Promise((e,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const s=document.createElement("canvas");let{width:n,height:h}=this,a=1;if(Q(t)&&(x(t.width)||x(t.height))&&({width:n,height:h}=tt({aspectRatio:n/h,width:t.width,height:t.height}),a=n/this.width),s.width=n,s.height=h,!this.$canvas){e(s);return}const l=this.$canvas.querySelector(this.$getTagNameOf(q));if(!l){e(s);return}l.$ready().then(c=>{const r=s.getContext("2d");if(r){const[u,m,p,f,A,w]=l.$getTransform(),g=-this.x,v=-this.y,b=(g*f-p*v)/(u*f-p*m),C=(v*u-m*g)/(u*f-p*m);let S=u*b+p*C+A,T=m*b+f*C+w,O=c.naturalWidth,N=c.naturalHeight;a!==1&&(S*=a,T*=a,O*=a,N*=a);const I=O/2,P=N/2;r.fillStyle="transparent",r.fillRect(0,0,n,h),Q(t)&&mt(t.beforeDraw)&&t.beforeDraw.call(this,r,s),r.save(),r.translate(I,P),r.transform(u,m,p,f,S,T),r.translate(-I,-P),r.drawImage(c,0,0,O,N),r.restore()}e(s)}).catch(i)})}}rt.$name=_,rt.$version="2.0.0-rc.2";var Re=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}";class ht extends M{constructor(){super(...arguments),this.$style=Re,this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(t,e,i){Object.is(i,e)||(super.$propertyChangedCallback(t,e,i),(t==="rows"||t==="columns")&&this.$nextTick(()=>{this.$render()}))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){const t=this.$getShadowRoot(),e=document.createDocumentFragment();for(let i=0;i<this.rows;i+=1){const s=document.createElement("span");s.setAttribute("role","row");for(let n=0;n<this.columns;n+=1){const h=document.createElement("span");h.setAttribute("role","gridcell"),s.appendChild(h)}e.appendChild(s)}t&&(t.innerHTML="",t.appendChild(e))}}ht.$name=oe,ht.$version="2.0.0-rc.2";var Ie=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}';class ct extends M{constructor(){super(...arguments),this.$style=Ie,this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}}ct.$name=ae,ct.$version="2.0.0-rc.2";var Pe=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}";const Zt=new WeakMap,Kt=new WeakMap,Gt=new WeakMap,Ft=new WeakMap,Me="both",ze="horizontal",qt="vertical",_e="none";class lt extends M{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=Pe,this.resize=qt,this.selection="",this.slottable=!1}set $image(t){Kt.set(this,t)}get $image(){return Kt.get(this)}set $sourceImage(t){Ft.set(this,t)}get $sourceImage(){return Ft.get(this)}set $canvas(t){Zt.set(this,t)}get $canvas(){return Zt.get(this)}set $selection(t){Gt.set(this,t)}get $selection(){return Gt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){super.connectedCallback();let t=null;if(this.selection?t=this.ownerDocument.querySelector(this.selection):t=this.closest(this.$getTagNameOf(_)),Nt(t)){this.$selection=t,this.$onSelectionChange=this.$handleSelectionChange.bind(this),E(t,B,this.$onSelectionChange);const e=t.closest(this.$getTagNameOf(j));if(e){this.$canvas=e;const i=e.querySelector(this.$getTagNameOf(q));i&&(this.$sourceImage=i,this.$image=i.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),E(i.$image,Y,this.$onSourceImageLoad),E(i,$t,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){const{$selection:t,$sourceImage:e}=this;t&&this.$onSelectionChange&&(y(t,B,this.$onSelectionChange),this.$onSelectionChange=null),e&&this.$onSourceImageLoad&&(y(e.$image,Y,this.$onSourceImageLoad),this.$onSourceImageLoad=null),e&&this.$onSourceImageTransform&&(y(e,$t,this.$onSourceImageTransform),this.$onSourceImageTransform=null),super.disconnectedCallback()}$handleSelectionChange(t){this.$render(t.detail)}$handleSourceImageLoad(){const{$image:t,$sourceImage:e}=this,i=t.getAttribute("src"),s=e.getAttribute("src");s&&s!==i&&(t.setAttribute("src",s),t.$ready(()=>{setTimeout(()=>{this.$render()},50)}))}$handleSourceImageTransform(t){this.$render(void 0,t.detail.matrix)}$render(t,e){const{$canvas:i,$selection:s}=this;!t&&!s.hidden&&(t=s),(!t||t.x===0&&t.y===0&&t.width===0&&t.height===0)&&(t={x:0,y:0,width:i.offsetWidth,height:i.offsetHeight});const{x:n,y:h,width:a,height:l}=t,c={},{clientWidth:r,clientHeight:u}=this;let m=r,p=u,f=NaN;switch(this.resize){case Me:f=1,m=a,p=l,c.width=a,c.height=l;break;case ze:f=l>0?u/l:0,m=a*f,c.width=m;break;case qt:f=a>0?r/a:0,p=l*f,c.height=p;break;case _e:default:r>0?f=a>0?r/a:0:u>0&&(f=l>0?u/l:0)}this.$scale=f,this.$setStyles(c),this.$sourceImage&&this.$transformImageByOffset(e??this.$sourceImage.$getTransform(),-n,-h)}$transformImageByOffset(t,e,i){const{$image:s,$scale:n,$sourceImage:h}=this;if(h&&s&&n>=0){const[a,l,c,r,u,m]=t,p=(e*r-c*i)/(a*r-c*l),f=(i*a-l*e)/(a*r-c*l),A=a*p+c*f+u,w=l*p+r*f+m;s.$ready(g=>{this.$setStyles.call(s,{width:g.naturalWidth*n,height:g.naturalHeight*n})}),s.$setTransform(a,l,c,r,A*n,w*n)}}}lt.$name=ce,lt.$version="2.0.0-rc.2";/*! Cropper.js v2.0.0-rc.2 | (c) 2015-present Chen Fengyuan | MIT */st.$define(),ct.$define(),ht.$define(),ot.$define(),nt.$define(),rt.$define(),at.$define(),lt.$define();const Vt=d.defineComponent({__name:"CropperCanvas",props:{background:{type:Boolean,default:!1}},setup(o){st.$define();const t=d.h("cropper-canvas",{background:o.background,style:"height: 500px"});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t)),null,{default:d.withCtx(()=>[d.renderSlot(e.$slots,"default")]),_:3}))}}),Jt=d.defineComponent({__name:"CropperImage",props:{src:{},alt:{},initialCenterSize:{default:"contain"},rotatable:{type:Boolean,default:!1},scalable:{type:Boolean,default:!1},skewable:{type:Boolean,default:!1},slottable:{type:Boolean,default:!1},translatable:{type:Boolean,default:!1}},setup(o){nt.$define();const t=d.h("cropper-image",{src:o.src,alt:o.alt,initialCenterSize:o.initialCenterSize,rotatable:o.rotatable,scalable:o.scalable,skewable:o.skewable,slottable:o.slottable,translatable:o.translatable});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),Qt=d.defineComponent({__name:"CropperShade",props:{x:{default:0},y:{default:0},width:{default:0},height:{default:0},slottable:{type:Boolean,default:!1},themeColor:{default:"rgba(0, 0, 0, 0.65)"},hidden:{type:Boolean,default:!1}},setup(o){at.$define();const t=d.h("cropper-shade",{x:o.x,y:o.y,width:o.width,height:o.height,slottable:o.slottable,themeColor:o.themeColor,hidden:o.hidden});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),te=d.defineComponent({__name:"CropperHandle",props:{action:{default:"none"},plain:{type:Boolean,default:!1},slottable:{type:Boolean,default:!1},themeColor:{default:"rgba(51, 153, 255, 0.5)"}},setup(o){ot.$define();const t=d.h("cropper-handle",{action:o.action,plain:o.plain,slottable:o.slottable,themeColor:o.themeColor});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),ee=d.defineComponent({__name:"CropperSelection",props:{x:{default:0},y:{default:0},width:{default:0},height:{default:0},aspectRatio:{},initialAspectRatio:{},initialCoverage:{},dynamic:{type:Boolean,default:!1},movable:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},keyboard:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},precise:{type:Boolean,default:!1}},setup(o,{expose:t}){rt.$define();const e=d.h("cropper-selection",{x:o.x,y:o.y,width:o.width,height:o.height,aspectRatio:o.aspectRatio,initialAspectRatio:o.initialAspectRatio,initialCoverage:o.initialCoverage,dynamic:o.dynamic,movable:o.movable,resizable:o.resizable,zoomable:o.zoomable,multiple:o.multiple,keyboard:o.keyboard,outlined:o.outlined,precise:o.precise}),i=d.useTemplateRef("sel");return t({selection:i}),(s,n)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(e)),{ref:"sel"},{default:d.withCtx(()=>[d.renderSlot(s.$slots,"default")]),_:3},512))}}),ie=d.defineComponent({__name:"CropperCrosshair",props:{centered:{type:Boolean,default:!1}},setup(o){ct.$define();const t=d.h("cropper-crosshair",{centered:o.centered});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),se=d.defineComponent({__name:"CropperGrid",props:{role:{default:"grid"},covered:{type:Boolean,default:!1}},setup(o){ht.$define();const t=d.h("cropper-grid",{role:o.role,covered:o.covered});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),ne=d.defineComponent({__name:"CropperViewer",props:{resize:{default:"vertical"},selection:{default:""}},setup(o){lt.$define();const t=d.h("cropper-viewer",{resize:o.resize,selection:o.selection});return(e,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(t))))}}),De={install:o=>{o.component("CropperCanvas",Vt),o.component("CropperImage",Jt),o.component("CropperShade",Qt),o.component("CropperHandle",te),o.component("CropperSelection",ee),o.component("CropperCrosshair",ie),o.component("CropperGrid",se),o.component("CropperViewer",ne)}};k.CropperCanvas=Vt,k.CropperCrosshair=ie,k.CropperGrid=se,k.CropperHandle=te,k.CropperImage=Jt,k.CropperSelection=ee,k.CropperShade=Qt,k.CropperViewer=ne,k.default=De,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/user-5.png DELETED
Binary file
package/dist/vite.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>