@hprint/core 0.0.7 → 0.0.8

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,7 +1,7 @@
1
1
  import { fabric } from 'fabric';
2
2
  import { IEditor, IPluginTempl } from '@hprint/core';
3
3
  import { SelectEvent, SelectMode } from '../../plugins/src/types/eventType';
4
- type IPlugin = Pick<ServersPlugin, 'insert' | 'loadJSON' | 'getJson' | 'dragAddItem' | 'clipboard' | 'clipboardBase64' | 'saveJson' | 'saveSvg' | 'getBase64' | 'saveImg' | 'clear' | 'preview' | 'staticPreview' | 'getSelectMode' | 'getExtensionKey'>;
4
+ type IPlugin = Pick<ServersPlugin, 'insert' | 'loadJSON' | 'getJson' | 'dragAddItem' | 'clipboard' | 'clipboardBase64' | 'saveJson' | 'saveSvg' | 'getBase64' | 'getSVG' | 'saveImg' | 'clear' | 'preview' | 'staticPreview' | 'getSelectMode' | 'getExtensionKey'>;
5
5
  declare module '@hprint/core' {
6
6
  interface IEditor extends IPlugin {
7
7
  }
@@ -41,13 +41,21 @@ declare class ServersPlugin implements IPluginTempl {
41
41
  saveSvg(): void;
42
42
  saveImg(): void;
43
43
  getBase64(): Promise<string>;
44
+ getSVG(options?: {
45
+ width?: string;
46
+ height?: string;
47
+ }): Promise<string>;
44
48
  preview(): Promise<string>;
45
49
  staticPreview(): Promise<string>;
46
- _getSaveSvgOption(): {
50
+ _getSaveSvgOption(options?: {
51
+ ignoreFont?: boolean;
52
+ width?: string;
53
+ height?: string;
54
+ }): {
47
55
  fontOption: {};
48
56
  svgOption: {
49
- width: number | undefined;
50
- height: number | undefined;
57
+ width: string | number | undefined;
58
+ height: string | number | undefined;
51
59
  viewBox: {
52
60
  x: number | undefined;
53
61
  y: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ServersPlugin.d.ts","sourceRoot":"","sources":["../src/ServersPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE5E,KAAK,OAAO,GAAG,IAAI,CACf,aAAa,EACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,aAAa,GACb,WAAW,GACX,iBAAiB,GACjB,UAAU,GACV,SAAS,GACT,WAAW,GACX,SAAS,GACT,OAAO,GACP,SAAS,GACT,eAAe,GACf,eAAe,GACf,iBAAiB,CACtB,CAAC;AAEF,OAAO,QAAQ,cAAc,CAAC;IAE1B,UAAU,OAAQ,SAAQ,OAAO;KAAI;CACxC;AAaD,cAAM,aAAc,YAAW,YAAY;IAuB5B,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,MAAM,EAAE,OAAO;IAvBnB,YAAY,EAAE,UAAU,CAAC;IAChC,MAAM,CAAC,UAAU,SAAmB;IACpC,MAAM,CAAC,IAAI,WAgBT;IACF,MAAM,CAAC,MAAM,+BAA0D;gBAG5D,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,MAAM,EAAE,OAAO;IAM1B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,gBAAgB;IAmBxB,aAAa;IAIb,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI;IAc5B,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE;IAajD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI;IAuDzD,UAAU,CAAC,IAAI,EAAE,GAAG;IAW1B,gBAAgB,CAAC,IAAI,EAAE,GAAG;IAQ1B,OAAO,CAAC,OAAO,CAAC,EAAE;QACd,QAAQ,CAAC,EAAE,OAAO,CAAA;KACrB;;;;IAaD,eAAe;IAmBf;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS;IAyBlD,SAAS;IAKH,eAAe;IAKf,QAAQ;IAUd,OAAO;IAcP,OAAO;IAWP,SAAS;IAaT,OAAO;IAcP,aAAa;IAIb,iBAAiB;;;;;;;;;;;;;IAmCjB,cAAc;;;;;;;;;;IAkBd,KAAK;IAWL,OAAO;CAGV;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ServersPlugin.d.ts","sourceRoot":"","sources":["../src/ServersPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE5E,KAAK,OAAO,GAAG,IAAI,CACf,aAAa,EACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,aAAa,GACb,WAAW,GACX,iBAAiB,GACjB,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,eAAe,GACf,eAAe,GACf,iBAAiB,CACtB,CAAC;AAEF,OAAO,QAAQ,cAAc,CAAC;IAE1B,UAAU,OAAQ,SAAQ,OAAO;KAAG;CACvC;AAaD,cAAM,aAAc,YAAW,YAAY;IAwB5B,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,MAAM,EAAE,OAAO;IAxBnB,YAAY,EAAE,UAAU,CAAC;IAChC,MAAM,CAAC,UAAU,SAAmB;IACpC,MAAM,CAAC,IAAI,WAiBT;IACF,MAAM,CAAC,MAAM,+BAA0D;gBAG5D,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,MAAM,EAAE,OAAO;IAM1B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,gBAAgB;IAmBxB,aAAa;IAIb,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI;IAc5B,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE;IAajD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI;IAuDzD,UAAU,CAAC,IAAI,EAAE,GAAG;IAW1B,gBAAgB,CAAC,IAAI,EAAE,GAAG;IAQ1B,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;;;;IAaxC,eAAe;IAmBf;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS;IAyBlD,SAAS;IAKH,eAAe;IAKf,QAAQ;IAUd,OAAO;IAcP,OAAO;IAWP,SAAS;IAaT,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAqBpD,OAAO;IAcP,aAAa;IAIb,iBAAiB,CAAC,OAAO,CAAC,EAAE;QACxB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB;;;;;;;;;;;;;IAqCD,cAAc;;;;;;;;;;IAkBd,KAAK;IAWL,OAAO;CAGV;AAED,eAAe,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function _r(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}function yr(f){if(Object.prototype.hasOwnProperty.call(f,"__esModule"))return f;var r=f.default;if(typeof r=="function"){var g=function _(){var y=!1;try{y=this instanceof _}catch{}return y?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};g.prototype=r.prototype}else g={};return Object.defineProperty(g,"__esModule",{value:!0}),Object.keys(f).forEach(function(_){var y=Object.getOwnPropertyDescriptor(f,_);Object.defineProperty(g,_,y.get?y:{enumerable:!0,get:function(){return f[_]}})}),g}var Ee={exports:{}},Ui;function Cr(){if(Ui)return Ee.exports;Ui=1;var f=typeof Reflect=="object"?Reflect:null,r=f&&typeof f.apply=="function"?f.apply:function(v,b,S){return Function.prototype.apply.call(v,b,S)},g;f&&typeof f.ownKeys=="function"?g=f.ownKeys:Object.getOwnPropertySymbols?g=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:g=function(v){return Object.getOwnPropertyNames(v)};function _(p){console&&console.warn&&console.warn(p)}var y=Number.isNaN||function(v){return v!==v};function C(){C.init.call(this)}Ee.exports=C,Ee.exports.once=u,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var T=10;function c(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(p){if(typeof p!="number"||p<0||y(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");T=p}}),C.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},C.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||y(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function i(p){return p._maxListeners===void 0?C.defaultMaxListeners:p._maxListeners}C.prototype.getMaxListeners=function(){return i(this)},C.prototype.emit=function(v){for(var b=[],S=1;S<arguments.length;S++)b.push(arguments[S]);var E=v==="error",F=this._events;if(F!==void 0)E=E&&F.error===void 0;else if(!E)return!1;if(E){var R;if(b.length>0&&(R=b[0]),R instanceof Error)throw R;var z=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw z.context=R,z}var K=F[v];if(K===void 0)return!1;if(typeof K=="function")r(K,this,b);else for(var Z=K.length,q=o(K,Z),S=0;S<Z;++S)r(q[S],this,b);return!0};function l(p,v,b,S){var E,F,R;if(c(b),F=p._events,F===void 0?(F=p._events=Object.create(null),p._eventsCount=0):(F.newListener!==void 0&&(p.emit("newListener",v,b.listener?b.listener:b),F=p._events),R=F[v]),R===void 0)R=F[v]=b,++p._eventsCount;else if(typeof R=="function"?R=F[v]=S?[b,R]:[R,b]:S?R.unshift(b):R.push(b),E=i(p),E>0&&R.length>E&&!R.warned){R.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");z.name="MaxListenersExceededWarning",z.emitter=p,z.type=v,z.count=R.length,_(z)}return p}C.prototype.addListener=function(v,b){return l(this,v,b,!1)},C.prototype.on=C.prototype.addListener,C.prototype.prependListener=function(v,b){return l(this,v,b,!0)};function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function t(p,v,b){var S={fired:!1,wrapFn:void 0,target:p,type:v,listener:b},E=a.bind(S);return E.listener=b,S.wrapFn=E,E}C.prototype.once=function(v,b){return c(b),this.on(v,t(this,v,b)),this},C.prototype.prependOnceListener=function(v,b){return c(b),this.prependListener(v,t(this,v,b)),this},C.prototype.removeListener=function(v,b){var S,E,F,R,z;if(c(b),E=this._events,E===void 0)return this;if(S=E[v],S===void 0)return this;if(S===b||S.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete E[v],E.removeListener&&this.emit("removeListener",v,S.listener||b));else if(typeof S!="function"){for(F=-1,R=S.length-1;R>=0;R--)if(S[R]===b||S[R].listener===b){z=S[R].listener,F=R;break}if(F<0)return this;F===0?S.shift():h(S,F),S.length===1&&(E[v]=S[0]),E.removeListener!==void 0&&this.emit("removeListener",v,z||b)}return this},C.prototype.off=C.prototype.removeListener,C.prototype.removeAllListeners=function(v){var b,S,E;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[v]),this;if(arguments.length===0){var F=Object.keys(S),R;for(E=0;E<F.length;++E)R=F[E],R!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=S[v],typeof b=="function")this.removeListener(v,b);else if(b!==void 0)for(E=b.length-1;E>=0;E--)this.removeListener(v,b[E]);return this};function n(p,v,b){var S=p._events;if(S===void 0)return[];var E=S[v];return E===void 0?[]:typeof E=="function"?b?[E.listener||E]:[E]:b?s(E):o(E,E.length)}C.prototype.listeners=function(v){return n(this,v,!0)},C.prototype.rawListeners=function(v){return n(this,v,!1)},C.listenerCount=function(p,v){return typeof p.listenerCount=="function"?p.listenerCount(v):e.call(p,v)},C.prototype.listenerCount=e;function e(p){var v=this._events;if(v!==void 0){var b=v[p];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function o(p,v){for(var b=new Array(v),S=0;S<v;++S)b[S]=p[S];return b}function h(p,v){for(;v+1<p.length;v++)p[v]=p[v+1];p.pop()}function s(p){for(var v=new Array(p.length),b=0;b<v.length;++b)v[b]=p[b].listener||p[b];return v}function u(p,v){return new Promise(function(b,S){function E(R){p.removeListener(v,F),S(R)}function F(){typeof p.removeListener=="function"&&p.removeListener("error",E),b([].slice.call(arguments))}m(p,v,F,{once:!0}),v!=="error"&&d(p,E,{once:!0})})}function d(p,v,b){typeof p.on=="function"&&m(p,"error",v,b)}function m(p,v,b,S){if(typeof p.on=="function")S.once?p.once(v,b):p.on(v,b);else if(typeof p.addEventListener=="function")p.addEventListener(v,function E(F){S.once&&p.removeEventListener(v,E),b(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof p)}return Ee.exports}var br=Cr();const Sr=_r(br);var ze=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ge(f,r,g){f.addEventListener?f.addEventListener(r,g,!1):f.attachEvent&&f.attachEvent("on".concat(r),function(){g(window.event)})}function Cn(f,r){for(var g=r.slice(0,r.length-1),_=0;_<g.length;_++)g[_]=f[g[_].toLowerCase()];return g}function bn(f){typeof f!="string"&&(f=""),f=f.replace(/\s/g,"");for(var r=f.split(","),g=r.lastIndexOf("");g>=0;)r[g-1]+=",",r.splice(g,1),g=r.lastIndexOf("");return r}function wr(f,r){for(var g=f.length>=r.length?f:r,_=f.length>=r.length?r:f,y=!0,C=0;C<g.length;C++)_.indexOf(g[C])===-1&&(y=!1);return y}var Sn={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ze?173:189,"=":ze?61:187,";":ze?59:186,"'":222,"[":219,"]":221,"\\":220},$t={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},zi={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},vt={16:!1,18:!1,17:!1,91:!1},pt={};for(var Pe=1;Pe<20;Pe++)Sn["f".concat(Pe)]=111+Pe;var ft=[],Gi=!1,wn="all",xn=[],Xe=function(r){return Sn[r.toLowerCase()]||$t[r.toLowerCase()]||r.toUpperCase().charCodeAt(0)};function Tn(f){wn=f||"all"}function pe(){return wn||"all"}function xr(){return ft.slice(0)}function Tr(f){var r=f.target||f.srcElement,g=r.tagName,_=!0;return(r.isContentEditable||(g==="INPUT"||g==="TEXTAREA"||g==="SELECT")&&!r.readOnly)&&(_=!1),_}function Or(f){return typeof f=="string"&&(f=Xe(f)),ft.indexOf(f)!==-1}function Er(f,r){var g,_;f||(f=pe());for(var y in pt)if(Object.prototype.hasOwnProperty.call(pt,y))for(g=pt[y],_=0;_<g.length;)g[_].scope===f?g.splice(_,1):_++;pe()===f&&Tn(r||"all")}function Pr(f){var r=f.keyCode||f.which||f.charCode,g=ft.indexOf(r);if(g>=0&&ft.splice(g,1),f.key&&f.key.toLowerCase()==="meta"&&ft.splice(0,ft.length),(r===93||r===224)&&(r=91),r in vt){vt[r]=!1;for(var _ in $t)$t[_]===r&&(It[_]=!1)}}function kr(f){if(!f)Object.keys(pt).forEach(function(T){return delete pt[T]});else if(Array.isArray(f))f.forEach(function(T){T.key&&qe(T)});else if(typeof f=="object")f.key&&qe(f);else if(typeof f=="string"){for(var r=arguments.length,g=new Array(r>1?r-1:0),_=1;_<r;_++)g[_-1]=arguments[_];var y=g[0],C=g[1];typeof y=="function"&&(C=y,y=""),qe({key:f,scope:y,method:C,splitKey:"+"})}}var qe=function(r){var g=r.key,_=r.scope,y=r.method,C=r.splitKey,T=C===void 0?"+":C,c=bn(g);c.forEach(function(i){var l=i.split(T),a=l.length,t=l[a-1],n=t==="*"?"*":Xe(t);if(pt[n]){_||(_=pe());var e=a>1?Cn($t,l):[];pt[n]=pt[n].filter(function(o){var h=y?o.method===y:!0;return!(h&&o.scope===_&&wr(o.mods,e))})}})};function qi(f,r,g,_){if(r.element===_){var y;if(r.scope===g||r.scope==="all"){y=r.mods.length>0;for(var C in vt)Object.prototype.hasOwnProperty.call(vt,C)&&(!vt[C]&&r.mods.indexOf(+C)>-1||vt[C]&&r.mods.indexOf(+C)===-1)&&(y=!1);(r.mods.length===0&&!vt[16]&&!vt[18]&&!vt[17]&&!vt[91]||y||r.shortcut==="*")&&r.method(f,r)===!1&&(f.preventDefault?f.preventDefault():f.returnValue=!1,f.stopPropagation&&f.stopPropagation(),f.cancelBubble&&(f.cancelBubble=!0))}}}function Ki(f,r){var g=pt["*"],_=f.keyCode||f.which||f.charCode;if(It.filter.call(this,f)){if((_===93||_===224)&&(_=91),ft.indexOf(_)===-1&&_!==229&&ft.push(_),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(o){var h=zi[o];f[o]&&ft.indexOf(h)===-1?ft.push(h):!f[o]&&ft.indexOf(h)>-1?ft.splice(ft.indexOf(h),1):o==="metaKey"&&f[o]&&ft.length===3&&(f.ctrlKey||f.shiftKey||f.altKey||(ft=ft.slice(ft.indexOf(h))))}),_ in vt){vt[_]=!0;for(var y in $t)$t[y]===_&&(It[y]=!0);if(!g)return}for(var C in vt)Object.prototype.hasOwnProperty.call(vt,C)&&(vt[C]=f[zi[C]]);f.getModifierState&&!(f.altKey&&!f.ctrlKey)&&f.getModifierState("AltGraph")&&(ft.indexOf(17)===-1&&ft.push(17),ft.indexOf(18)===-1&&ft.push(18),vt[17]=!0,vt[18]=!0);var T=pe();if(g)for(var c=0;c<g.length;c++)g[c].scope===T&&(f.type==="keydown"&&g[c].keydown||f.type==="keyup"&&g[c].keyup)&&qi(f,g[c],T,r);if(_ in pt){for(var i=0;i<pt[_].length;i++)if((f.type==="keydown"&&pt[_][i].keydown||f.type==="keyup"&&pt[_][i].keyup)&&pt[_][i].key){for(var l=pt[_][i],a=l.splitKey,t=l.key.split(a),n=[],e=0;e<t.length;e++)n.push(Xe(t[e]));n.sort().join("")===ft.sort().join("")&&qi(f,l,T,r)}}}}function Ar(f){return xn.indexOf(f)>-1}function It(f,r,g){ft=[];var _=bn(f),y=[],C="all",T=document,c=0,i=!1,l=!0,a="+";for(g===void 0&&typeof r=="function"&&(g=r),Object.prototype.toString.call(r)==="[object Object]"&&(r.scope&&(C=r.scope),r.element&&(T=r.element),r.keyup&&(i=r.keyup),r.keydown!==void 0&&(l=r.keydown),typeof r.splitKey=="string"&&(a=r.splitKey)),typeof r=="string"&&(C=r);c<_.length;c++)f=_[c].split(a),y=[],f.length>1&&(y=Cn($t,f)),f=f[f.length-1],f=f==="*"?"*":Xe(f),f in pt||(pt[f]=[]),pt[f].push({keyup:i,keydown:l,scope:C,mods:y,shortcut:_[c],method:g,key:_[c],splitKey:a,element:T});typeof T<"u"&&!Ar(T)&&window&&(xn.push(T),Ge(T,"keydown",function(t){Ki(t,T)}),Gi||(Gi=!0,Ge(window,"focus",function(){ft=[]})),Ge(T,"keyup",function(t){Ki(t,T),Pr(t)}))}var Ke={setScope:Tn,getScope:pe,deleteScope:Er,getPressedKeyCodes:xr,isPressed:Or,filter:Tr,unbind:kr};for(var $e in Ke)Object.prototype.hasOwnProperty.call(Ke,$e)&&(It[$e]=Ke[$e]);if(typeof window<"u"){var Dr=window.hotkeys;It.noConflict=function(f){return f&&window.hotkeys===It&&(window.hotkeys=Dr),It},window.hotkeys=It}class Ie{constructor(r,g){this.container=r,this.dom=null,this.shown=!1,this.root=!0,this.parent=null,this.submenus=[],this.items=g,this._onclick=_=>{this.dom&&_.target!=this.dom&&_.target.parentElement!=this.dom&&!_.target.classList.contains("item")&&!_.target.parentElement.classList.contains("item")&&this.hideAll()},this._oncontextmenu=_=>{_.preventDefault(),_.target!=this.dom&&_.target.parentElement!=this.dom&&!_.target.classList.contains("item")&&!_.target.parentElement.classList.contains("item")&&(this.hideAll(),this.show(_.clientX,_.clientY))},this._oncontextmenu_keydown=_=>{_.keyCode==93&&(_.preventDefault(),this.hideAll(),this.show(_.clientX,_.clientY))},this._onblur=()=>{this.hideAll()}}getMenuDom(){const r=document.createElement("div");r.classList.add("context");for(const g of this.items)r.appendChild(this.itemToDomEl(g));return r}itemToDomEl(r){const g=document.createElement("div");if(r===null)return g.classList="separator",g;r.hasOwnProperty("color")&&/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r.color.toString())&&(g.style.cssText=`color: ${r.color}`),g.classList.add("item");const _=document.createElement("span");_.classList="label",_.innerText=r.hasOwnProperty("text")?r.text.toString():"",g.appendChild(_),r.hasOwnProperty("disabled")&&r.disabled?g.classList.add("disabled"):g.classList.add("enabled");const y=document.createElement("span");if(y.classList="hotkey",y.innerText=r.hasOwnProperty("hotkey")?r.hotkey.toString():"",g.appendChild(y),r.hasOwnProperty("subitems")&&Array.isArray(r.subitems)&&r.subitems.length>0){const C=new Ie(this.container,r.subitems);C.root=!1,C.parent=this;const T=()=>{if(r.hasOwnProperty("disabled")&&r.disabled==!0)return;this.hideSubMenus();const c=this.dom.offsetLeft+this.dom.clientWidth+g.offsetLeft,i=this.dom.offsetTop+g.offsetTop;C.shown?C.hide():C.show(c,i)};this.submenus.push(C),g.classList.add("has-subitems"),g.addEventListener("click",T),g.addEventListener("mousemove",T)}else if(r.hasOwnProperty("submenu")&&r.submenu instanceof Ie){const C=r.submenu;C.root=!1,C.parent=this;const T=()=>{if(r.hasOwnProperty("disabled")&&r.disabled==!0)return;this.hideSubMenus();const c=this.dom.offsetLeft+this.dom.clientWidth+g.offsetLeft,i=this.dom.offsetTop+g.offsetTop;C.shown?C.hide():C.show(c,i)};this.submenus.push(C),g.classList.add("has-subitems"),g.addEventListener("click",T),g.addEventListener("mousemove",T)}else g.addEventListener("click",()=>{if(this.hideSubMenus(),!g.classList.contains("disabled"))if(r.hasOwnProperty("onclick")&&typeof r.onclick=="function"){const C={handled:!1,item:g,label:_,hotkey:y,items:this.items,data:r};r.onclick(C),C.handled||this.hide()}else this.hide()}),g.addEventListener("mousemove",()=>{this.hideSubMenus()});return g}hideAll(){if(this.root&&!this.parent){this.shown&&(this.hideSubMenus(),this.shown=!1,this.container.removeChild(this.dom),this.parent&&this.parent.shown&&this.parent.hide());return}this.parent.hide()}hide(){this.dom&&this.shown&&(this.shown=!1,this.hideSubMenus(),this.container.removeChild(this.dom),this.parent&&this.parent.shown&&this.parent.hide())}hideSubMenus(){for(const r of this.submenus)r.shown&&(r.shown=!1,r.container.removeChild(r.dom)),r.hideSubMenus()}show(r,g){this.dom=this.getMenuDom(),this.dom.style.left=`${r}px`,this.dom.style.top=`${g}px`,this.shown=!0,this.container.appendChild(this.dom)}install(){this.container.addEventListener("contextmenu",this._oncontextmenu),this.container.addEventListener("keydown",this._oncontextmenu_keydown),this.container.addEventListener("click",this._onclick),window.addEventListener("blur",this._onblur)}setData(r){this.items=r}uninstall(){this.dom=null,this.container.removeEventListener("keydown",this._oncontextmenu_keydown),this.container.removeEventListener("click",this._onclick),window.removeEventListener("blur",this._onblur)}}var ke,Mr=new Uint8Array(16);function Lr(){if(!ke&&(ke=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ke))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(Mr)}const Fr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Rr(f){return typeof f=="string"&&Fr.test(f)}var mt=[];for(var Je=0;Je<256;++Je)mt.push((Je+256).toString(16).substr(1));function Ir(f){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=(mt[f[r+0]]+mt[f[r+1]]+mt[f[r+2]]+mt[f[r+3]]+"-"+mt[f[r+4]]+mt[f[r+5]]+"-"+mt[f[r+6]]+mt[f[r+7]]+"-"+mt[f[r+8]]+mt[f[r+9]]+"-"+mt[f[r+10]]+mt[f[r+11]]+mt[f[r+12]]+mt[f[r+13]]+mt[f[r+14]]+mt[f[r+15]]).toLowerCase();if(!Rr(g))throw TypeError("Stringified UUID is invalid");return g}function On(f,r,g){f=f||{};var _=f.random||(f.rng||Lr)();return _[6]=_[6]&15|64,_[8]=_[8]&63|128,Ir(_)}function jr(f){const r=Object.create(null);for(const g of f.split(","))r[g]=1;return g=>g in r}const me=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const ee=()=>{},Br=f=>f.charCodeAt(0)===111&&f.charCodeAt(1)===110&&(f.charCodeAt(2)>122||f.charCodeAt(2)<97),Vt=Object.assign,Hr=Object.prototype.hasOwnProperty,Si=(f,r)=>Hr.call(f,r),gt=Array.isArray,ie=f=>Ye(f)==="[object Map]",Nr=f=>Ye(f)==="[object Set]",Ct=f=>typeof f=="function",jt=f=>typeof f=="string",xe=f=>typeof f=="symbol",xt=f=>f!==null&&typeof f=="object",Wr=f=>(xt(f)||Ct(f))&&Ct(f.then)&&Ct(f.catch),Xr=Object.prototype.toString,Ye=f=>Xr.call(f),En=f=>Ye(f).slice(8,-1),Yr=f=>Ye(f)==="[object Object]",Di=f=>jt(f)&&f!=="NaN"&&f[0]!=="-"&&""+parseInt(f,10)===f,Pn=f=>{const r=Object.create(null);return(g=>r[g]||(r[g]=f(g)))},kn=Pn(f=>f.charAt(0).toUpperCase()+f.slice(1)),Vr=Pn(f=>f?`on${kn(f)}`:""),Yt=(f,r)=>!Object.is(f,r);let $i;const Ve=()=>$i||($i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(f){if(gt(f)){const r={};for(let g=0;g<f.length;g++){const _=f[g],y=jt(_)?qr(_):Mi(_);if(y)for(const C in y)r[C]=y[C]}return r}else if(jt(f)||xt(f))return f}const Ur=/;(?![^(]*\))/g,zr=/:([^]+)/,Gr=/\/\*[^]*?\*\//g;function qr(f){const r={};return f.replace(Gr,"").split(Ur).forEach(g=>{if(g){const _=g.split(zr);_.length>1&&(r[_[0].trim()]=_[1].trim())}}),r}function Li(f){let r="";if(jt(f))r=f;else if(gt(f))for(let g=0;g<f.length;g++){const _=Li(f[g]);_&&(r+=_+" ")}else if(xt(f))for(const g in f)f[g]&&(r+=g+" ");return r.trim()}function At(f,...r){console.warn(`[Vue warn] ${f}`,...r)}let ct;const Qe=new WeakSet;class Kr{constructor(r){this.fn=r,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Qe.has(this)&&(Qe.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dn(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ji(this),Mn(this);const r=ct,g=Pt;ct=this,Pt=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&ct!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),Ln(this),ct=r,Pt=g,this.flags&=-3}}stop(){if(this.flags&1){for(let r=this.deps;r;r=r.nextDep)Ii(r);this.deps=this.depsTail=void 0,Ji(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Qe.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){wi(this)&&this.run()}get dirty(){return wi(this)}}let An=0,fe,de;function Dn(f,r=!1){if(f.flags|=8,r){f.next=de,de=f;return}f.next=fe,fe=f}function Fi(){An++}function Ri(){if(--An>0)return;if(de){let r=de;for(de=void 0;r;){const g=r.next;r.next=void 0,r.flags&=-9,r=g}}let f;for(;fe;){let r=fe;for(fe=void 0;r;){const g=r.next;if(r.next=void 0,r.flags&=-9,r.flags&1)try{r.trigger()}catch(_){f||(f=_)}r=g}}if(f)throw f}function Mn(f){for(let r=f.deps;r;r=r.nextDep)r.version=-1,r.prevActiveLink=r.dep.activeLink,r.dep.activeLink=r}function Ln(f){let r,g=f.depsTail,_=g;for(;_;){const y=_.prevDep;_.version===-1?(_===g&&(g=y),Ii(_),$r(_)):r=_,_.dep.activeLink=_.prevActiveLink,_.prevActiveLink=void 0,_=y}f.deps=r,f.depsTail=g}function wi(f){for(let r=f.deps;r;r=r.nextDep)if(r.dep.version!==r.version||r.dep.computed&&(Fn(r.dep.computed)||r.dep.version!==r.version))return!0;return!!f._dirty}function Fn(f){if(f.flags&4&&!(f.flags&16)||(f.flags&=-17,f.globalVersion===ve)||(f.globalVersion=ve,!f.isSSR&&f.flags&128&&(!f.deps&&!f._dirty||!wi(f))))return;f.flags|=2;const r=f.dep,g=ct,_=Pt;ct=f,Pt=!0;try{Mn(f);const y=f.fn(f._value);(r.version===0||Yt(y,f._value))&&(f.flags|=128,f._value=y,r.version++)}catch(y){throw r.version++,y}finally{ct=g,Pt=_,Ln(f),f.flags&=-3}}function Ii(f,r=!1){const{dep:g,prevSub:_,nextSub:y}=f;if(_&&(_.nextSub=y,f.prevSub=void 0),y&&(y.prevSub=_,f.nextSub=void 0),process.env.NODE_ENV!=="production"&&g.subsHead===f&&(g.subsHead=y),g.subs===f&&(g.subs=_,!_&&g.computed)){g.computed.flags&=-5;for(let C=g.computed.deps;C;C=C.nextDep)Ii(C,!0)}!r&&!--g.sc&&g.map&&g.map.delete(g.key)}function $r(f){const{prevDep:r,nextDep:g}=f;r&&(r.nextDep=g,f.prevDep=void 0),g&&(g.prevDep=r,f.nextDep=void 0)}let Pt=!0;const Rn=[];function se(){Rn.push(Pt),Pt=!1}function oe(){const f=Rn.pop();Pt=f===void 0?!0:f}function Ji(f){const{cleanup:r}=f;if(f.cleanup=void 0,r){const g=ct;ct=void 0;try{r()}finally{ct=g}}}let ve=0;class Jr{constructor(r,g){this.sub=r,this.dep=g,this.version=g.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ji{constructor(r){this.computed=r,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(r){if(!ct||!Pt||ct===this.computed)return;let g=this.activeLink;if(g===void 0||g.sub!==ct)g=this.activeLink=new Jr(ct,this),ct.deps?(g.prevDep=ct.depsTail,ct.depsTail.nextDep=g,ct.depsTail=g):ct.deps=ct.depsTail=g,In(g);else if(g.version===-1&&(g.version=this.version,g.nextDep)){const _=g.nextDep;_.prevDep=g.prevDep,g.prevDep&&(g.prevDep.nextDep=_),g.prevDep=ct.depsTail,g.nextDep=void 0,ct.depsTail.nextDep=g,ct.depsTail=g,ct.deps===g&&(ct.deps=_)}return process.env.NODE_ENV!=="production"&&ct.onTrack&&ct.onTrack(Vt({effect:ct},r)),g}trigger(r){this.version++,ve++,this.notify(r)}notify(r){Fi();try{if(process.env.NODE_ENV!=="production")for(let g=this.subsHead;g;g=g.nextSub)g.sub.onTrigger&&!(g.sub.flags&8)&&g.sub.onTrigger(Vt({effect:g.sub},r));for(let g=this.subs;g;g=g.prevSub)g.sub.notify()&&g.sub.dep.notify()}finally{Ri()}}}function In(f){if(f.dep.sc++,f.sub.flags&4){const r=f.dep.computed;if(r&&!f.dep.subs){r.flags|=20;for(let _=r.deps;_;_=_.nextDep)In(_)}const g=f.dep.subs;g!==f&&(f.prevSub=g,g&&(g.nextSub=f)),process.env.NODE_ENV!=="production"&&f.dep.subsHead===void 0&&(f.dep.subsHead=f),f.dep.subs=f}}const xi=new WeakMap,qt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Ti=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),_e=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function wt(f,r,g){if(Pt&&ct){let _=xi.get(f);_||xi.set(f,_=new Map);let y=_.get(g);y||(_.set(g,y=new ji),y.map=_,y.key=g),process.env.NODE_ENV!=="production"?y.track({target:f,type:r,key:g}):y.track()}}function Wt(f,r,g,_,y,C){const T=xi.get(f);if(!T){ve++;return}const c=i=>{i&&(process.env.NODE_ENV!=="production"?i.trigger({target:f,type:r,key:g,newValue:_,oldValue:y,oldTarget:C}):i.trigger())};if(Fi(),r==="clear")T.forEach(c);else{const i=gt(f),l=i&&Di(g);if(i&&g==="length"){const a=Number(_);T.forEach((t,n)=>{(n==="length"||n===_e||!xe(n)&&n>=a)&&c(t)})}else switch((g!==void 0||T.has(void 0))&&c(T.get(g)),l&&c(T.get(_e)),r){case"add":i?l&&c(T.get("length")):(c(T.get(qt)),ie(f)&&c(T.get(Ti)));break;case"delete":i||(c(T.get(qt)),ie(f)&&c(T.get(Ti)));break;case"set":ie(f)&&c(T.get(qt));break}}Ri()}function Jt(f){const r=at(f);return r===f?r:(wt(r,"iterate",_e),Tt(f)?r:r.map(Bt))}function Bi(f){return wt(f=at(f),"iterate",_e),f}function Ht(f,r){return Dt(f)?ne(f)?Ce(Bt(r)):Ce(r):Bt(r)}const Qr={__proto__:null,[Symbol.iterator](){return Ze(this,Symbol.iterator,f=>Ht(this,f))},concat(...f){return Jt(this).concat(...f.map(r=>gt(r)?Jt(r):r))},entries(){return Ze(this,"entries",f=>(f[1]=Ht(this,f[1]),f))},every(f,r){return Ft(this,"every",f,r,void 0,arguments)},filter(f,r){return Ft(this,"filter",f,r,g=>g.map(_=>Ht(this,_)),arguments)},find(f,r){return Ft(this,"find",f,r,g=>Ht(this,g),arguments)},findIndex(f,r){return Ft(this,"findIndex",f,r,void 0,arguments)},findLast(f,r){return Ft(this,"findLast",f,r,g=>Ht(this,g),arguments)},findLastIndex(f,r){return Ft(this,"findLastIndex",f,r,void 0,arguments)},forEach(f,r){return Ft(this,"forEach",f,r,void 0,arguments)},includes(...f){return ti(this,"includes",f)},indexOf(...f){return ti(this,"indexOf",f)},join(f){return Jt(this).join(f)},lastIndexOf(...f){return ti(this,"lastIndexOf",f)},map(f,r){return Ft(this,"map",f,r,void 0,arguments)},pop(){return ce(this,"pop")},push(...f){return ce(this,"push",f)},reduce(f,...r){return Qi(this,"reduce",f,r)},reduceRight(f,...r){return Qi(this,"reduceRight",f,r)},shift(){return ce(this,"shift")},some(f,r){return Ft(this,"some",f,r,void 0,arguments)},splice(...f){return ce(this,"splice",f)},toReversed(){return Jt(this).toReversed()},toSorted(f){return Jt(this).toSorted(f)},toSpliced(...f){return Jt(this).toSpliced(...f)},unshift(...f){return ce(this,"unshift",f)},values(){return Ze(this,"values",f=>Ht(this,f))}};function Ze(f,r,g){const _=Bi(f),y=_[r]();return _!==f&&!Tt(f)&&(y._next=y.next,y.next=()=>{const C=y._next();return C.done||(C.value=g(C.value)),C}),y}const Zr=Array.prototype;function Ft(f,r,g,_,y,C){const T=Bi(f),c=T!==f&&!Tt(f),i=T[r];if(i!==Zr[r]){const t=i.apply(f,C);return c?Bt(t):t}let l=g;T!==f&&(c?l=function(t,n){return g.call(this,Ht(f,t),n,f)}:g.length>2&&(l=function(t,n){return g.call(this,t,n,f)}));const a=i.call(T,l,_);return c&&y?y(a):a}function Qi(f,r,g,_){const y=Bi(f);let C=g;return y!==f&&(Tt(f)?g.length>3&&(C=function(T,c,i){return g.call(this,T,c,i,f)}):C=function(T,c,i){return g.call(this,T,Ht(f,c),i,f)}),y[r](C,..._)}function ti(f,r,g){const _=at(f);wt(_,"iterate",_e);const y=_[r](...g);return(y===-1||y===!1)&&je(g[0])?(g[0]=at(g[0]),_[r](...g)):y}function ce(f,r,g=[]){se(),Fi();const _=at(f)[r].apply(f,g);return Ri(),oe(),_}const ts=jr("__proto__,__v_isRef,__isVue"),jn=new Set(Object.getOwnPropertyNames(Symbol).filter(f=>f!=="arguments"&&f!=="caller").map(f=>Symbol[f]).filter(xe));function es(f){xe(f)||(f=String(f));const r=at(this);return wt(r,"has",f),r.hasOwnProperty(f)}class Bn{constructor(r=!1,g=!1){this._isReadonly=r,this._isShallow=g}get(r,g,_){if(g==="__v_skip")return r.__v_skip;const y=this._isReadonly,C=this._isShallow;if(g==="__v_isReactive")return!y;if(g==="__v_isReadonly")return y;if(g==="__v_isShallow")return C;if(g==="__v_raw")return _===(y?C?us:Wn:C?hs:Nn).get(r)||Object.getPrototypeOf(r)===Object.getPrototypeOf(_)?r:void 0;const T=gt(r);if(!y){let i;if(T&&(i=Qr[g]))return i;if(g==="hasOwnProperty")return es}const c=Reflect.get(r,g,Ot(r)?r:_);if((xe(g)?jn.has(g):ts(g))||(y||wt(r,"get",g),C))return c;if(Ot(c)){const i=T&&Di(g)?c:c.value;return y&&xt(i)?ye(i):i}return xt(c)?y?ye(c):Xn(c):c}}class is extends Bn{constructor(r=!1){super(!1,r)}set(r,g,_,y){let C=r[g];const T=gt(r)&&Di(g);if(!this._isShallow){const l=Dt(C);if(!Tt(_)&&!Dt(_)&&(C=at(C),_=at(_)),!T&&Ot(C)&&!Ot(_))return l?(process.env.NODE_ENV!=="production"&&At(`Set operation on key "${String(g)}" failed: target is readonly.`,r[g]),!0):(C.value=_,!0)}const c=T?Number(g)<r.length:Si(r,g),i=Reflect.set(r,g,_,Ot(r)?r:y);return r===at(y)&&(c?Yt(_,C)&&Wt(r,"set",g,_,C):Wt(r,"add",g,_)),i}deleteProperty(r,g){const _=Si(r,g),y=r[g],C=Reflect.deleteProperty(r,g);return C&&_&&Wt(r,"delete",g,void 0,y),C}has(r,g){const _=Reflect.has(r,g);return(!xe(g)||!jn.has(g))&&wt(r,"has",g),_}ownKeys(r){return wt(r,"iterate",gt(r)?"length":qt),Reflect.ownKeys(r)}}class ns extends Bn{constructor(r=!1){super(!0,r)}set(r,g){return process.env.NODE_ENV!=="production"&&At(`Set operation on key "${String(g)}" failed: target is readonly.`,r),!0}deleteProperty(r,g){return process.env.NODE_ENV!=="production"&&At(`Delete operation on key "${String(g)}" failed: target is readonly.`,r),!0}}const rs=new is,ss=new ns,Oi=f=>f,Ae=f=>Reflect.getPrototypeOf(f);function os(f,r,g){return function(..._){const y=this.__v_raw,C=at(y),T=ie(C),c=f==="entries"||f===Symbol.iterator&&T,i=f==="keys"&&T,l=y[f](..._),a=g?Oi:r?Ce:Bt;return!r&&wt(C,"iterate",i?Ti:qt),{next(){const{value:t,done:n}=l.next();return n?{value:t,done:n}:{value:c?[a(t[0]),a(t[1])]:a(t),done:n}},[Symbol.iterator](){return this}}}}function De(f){return function(...r){if(process.env.NODE_ENV!=="production"){const g=r[0]?`on key "${r[0]}" `:"";At(`${kn(f)} operation ${g}failed: target is readonly.`,at(this))}return f==="delete"?!1:f==="clear"?void 0:this}}function as(f,r){const g={get(y){const C=this.__v_raw,T=at(C),c=at(y);f||(Yt(y,c)&&wt(T,"get",y),wt(T,"get",c));const{has:i}=Ae(T),l=r?Oi:f?Ce:Bt;if(i.call(T,y))return l(C.get(y));if(i.call(T,c))return l(C.get(c));C!==T&&C.get(y)},get size(){const y=this.__v_raw;return!f&&wt(at(y),"iterate",qt),y.size},has(y){const C=this.__v_raw,T=at(C),c=at(y);return f||(Yt(y,c)&&wt(T,"has",y),wt(T,"has",c)),y===c?C.has(y):C.has(y)||C.has(c)},forEach(y,C){const T=this,c=T.__v_raw,i=at(c),l=r?Oi:f?Ce:Bt;return!f&&wt(i,"iterate",qt),c.forEach((a,t)=>y.call(C,l(a),l(t),T))}};return Vt(g,f?{add:De("add"),set:De("set"),delete:De("delete"),clear:De("clear")}:{add(y){!r&&!Tt(y)&&!Dt(y)&&(y=at(y));const C=at(this);return Ae(C).has.call(C,y)||(C.add(y),Wt(C,"add",y,y)),this},set(y,C){!r&&!Tt(C)&&!Dt(C)&&(C=at(C));const T=at(this),{has:c,get:i}=Ae(T);let l=c.call(T,y);l?process.env.NODE_ENV!=="production"&&Zi(T,c,y):(y=at(y),l=c.call(T,y));const a=i.call(T,y);return T.set(y,C),l?Yt(C,a)&&Wt(T,"set",y,C,a):Wt(T,"add",y,C),this},delete(y){const C=at(this),{has:T,get:c}=Ae(C);let i=T.call(C,y);i?process.env.NODE_ENV!=="production"&&Zi(C,T,y):(y=at(y),i=T.call(C,y));const l=c?c.call(C,y):void 0,a=C.delete(y);return i&&Wt(C,"delete",y,void 0,l),a},clear(){const y=at(this),C=y.size!==0,T=process.env.NODE_ENV!=="production"?ie(y)?new Map(y):new Set(y):void 0,c=y.clear();return C&&Wt(y,"clear",void 0,void 0,T),c}}),["keys","values","entries",Symbol.iterator].forEach(y=>{g[y]=os(y,f,r)}),g}function Hn(f,r){const g=as(f,r);return(_,y,C)=>y==="__v_isReactive"?!f:y==="__v_isReadonly"?f:y==="__v_raw"?_:Reflect.get(Si(g,y)&&y in _?g:_,y,C)}const ls={get:Hn(!1,!1)},cs={get:Hn(!0,!1)};function Zi(f,r,g){const _=at(g);if(_!==g&&r.call(f,_)){const y=En(f);At(`Reactive ${y} contains both the raw and reactive versions of the same object${y==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Nn=new WeakMap,hs=new WeakMap,Wn=new WeakMap,us=new WeakMap;function fs(f){switch(f){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(f){return f.__v_skip||!Object.isExtensible(f)?0:fs(En(f))}function Xn(f){return Dt(f)?f:Yn(f,!1,rs,ls,Nn)}function ye(f){return Yn(f,!0,ss,cs,Wn)}function Yn(f,r,g,_,y){if(!xt(f))return process.env.NODE_ENV!=="production"&&At(`value cannot be made ${r?"readonly":"reactive"}: ${String(f)}`),f;if(f.__v_raw&&!(r&&f.__v_isReactive))return f;const C=ds(f);if(C===0)return f;const T=y.get(f);if(T)return T;const c=new Proxy(f,C===2?_:g);return y.set(f,c),c}function ne(f){return Dt(f)?ne(f.__v_raw):!!(f&&f.__v_isReactive)}function Dt(f){return!!(f&&f.__v_isReadonly)}function Tt(f){return!!(f&&f.__v_isShallow)}function je(f){return f?!!f.__v_raw:!1}function at(f){const r=f&&f.__v_raw;return r?at(r):f}const Bt=f=>xt(f)?Xn(f):f,Ce=f=>xt(f)?ye(f):f;function Ot(f){return f?f.__v_isRef===!0:!1}function Ut(f){return gs(f,!1)}function gs(f,r){return Ot(f)?f:new ps(f,r)}class ps{constructor(r,g){this.dep=new ji,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=g?r:at(r),this._value=g?r:Bt(r),this.__v_isShallow=g}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(r){const g=this._rawValue,_=this.__v_isShallow||Tt(r)||Dt(r);r=_?r:at(r),Yt(r,g)&&(this._rawValue=r,this._value=_?r:Bt(r),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:r,oldValue:g}):this.dep.trigger())}}function ms(f){return Ot(f)?f.value:f}class vs{constructor(r,g,_){this.fn=r,this.setter=g,this._value=void 0,this.dep=new ji(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ve-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!g,this.isSSR=_}notify(){if(this.flags|=16,!(this.flags&8)&&ct!==this)return Dn(this,!0),!0;process.env.NODE_ENV}get value(){const r=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Fn(this),r&&(r.version=this.dep.version),this._value}set value(r){this.setter?this.setter(r):process.env.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function _s(f,r,g=!1){let _,y;Ct(f)?_=f:(_=f.get,y=f.set);const C=new vs(_,y,g);return process.env.NODE_ENV,C}const Me={},Be=new WeakMap;let Gt;function ys(f,r=!1,g=Gt){if(g){let _=Be.get(g);_||Be.set(g,_=[]),_.push(f)}else process.env.NODE_ENV!=="production"&&!r&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Cs(f,r,g=me){const{immediate:_,deep:y,once:C,scheduler:T,augmentJob:c,call:i}=g,l=p=>{(g.onWarn||At)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=p=>y?p:Tt(p)||y===!1||y===0?Xt(p,1):Xt(p);let t,n,e,o,h=!1,s=!1;if(Ot(f)?(n=()=>f.value,h=Tt(f)):ne(f)?(n=()=>a(f),h=!0):gt(f)?(s=!0,h=f.some(p=>ne(p)||Tt(p)),n=()=>f.map(p=>{if(Ot(p))return p.value;if(ne(p))return a(p);if(Ct(p))return i?i(p,2):p();process.env.NODE_ENV!=="production"&&l(p)})):Ct(f)?r?n=i?()=>i(f,2):f:n=()=>{if(e){se();try{e()}finally{oe()}}const p=Gt;Gt=t;try{return i?i(f,3,[o]):f(o)}finally{Gt=p}}:(n=ee,process.env.NODE_ENV!=="production"&&l(f)),r&&y){const p=n,v=y===!0?1/0:y;n=()=>Xt(p(),v)}const u=()=>{t.stop()};if(C&&r){const p=r;r=(...v)=>{p(...v),u()}}let d=s?new Array(f.length).fill(Me):Me;const m=p=>{if(!(!(t.flags&1)||!t.dirty&&!p))if(r){const v=t.run();if(y||h||(s?v.some((b,S)=>Yt(b,d[S])):Yt(v,d))){e&&e();const b=Gt;Gt=t;try{const S=[v,d===Me?void 0:s&&d[0]===Me?[]:d,o];d=v,i?i(r,3,S):r(...S)}finally{Gt=b}}}else t.run()};return c&&c(m),t=new Kr(n),t.scheduler=T?()=>T(m,!1):m,o=p=>ys(p,!1,t),e=t.onStop=()=>{const p=Be.get(t);if(p){if(i)i(p,4);else for(const v of p)v();Be.delete(t)}},process.env.NODE_ENV!=="production"&&(t.onTrack=g.onTrack,t.onTrigger=g.onTrigger),r?_?m(!0):d=t.run():T?T(m.bind(null,!0),!0):t.run(),u.pause=t.pause.bind(t),u.resume=t.resume.bind(t),u.stop=u,u}function Xt(f,r=1/0,g){if(r<=0||!xt(f)||f.__v_skip||(g=g||new Map,(g.get(f)||0)>=r))return f;if(g.set(f,r),r--,Ot(f))Xt(f.value,r,g);else if(gt(f))for(let _=0;_<f.length;_++)Xt(f[_],r,g);else if(Nr(f)||ie(f))f.forEach(_=>{Xt(_,r,g)});else if(Yr(f)){for(const _ in f)Xt(f[_],r,g);for(const _ of Object.getOwnPropertySymbols(f))Object.prototype.propertyIsEnumerable.call(f,_)&&Xt(f[_],r,g)}return f}const Kt=[];function bs(f){Kt.push(f)}function Ss(){Kt.pop()}let ei=!1;function yt(f,...r){if(ei)return;ei=!0,se();const g=Kt.length?Kt[Kt.length-1].component:null,_=g&&g.appContext.config.warnHandler,y=ws();if(_)Ue(_,g,11,[f+r.map(C=>{var T,c;return(c=(T=C.toString)==null?void 0:T.call(C))!=null?c:JSON.stringify(C)}).join(""),g&&g.proxy,y.map(({vnode:C})=>`at <${sr(g,C.type)}>`).join(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function _r(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}function yr(f){if(Object.prototype.hasOwnProperty.call(f,"__esModule"))return f;var r=f.default;if(typeof r=="function"){var g=function _(){var y=!1;try{y=this instanceof _}catch{}return y?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};g.prototype=r.prototype}else g={};return Object.defineProperty(g,"__esModule",{value:!0}),Object.keys(f).forEach(function(_){var y=Object.getOwnPropertyDescriptor(f,_);Object.defineProperty(g,_,y.get?y:{enumerable:!0,get:function(){return f[_]}})}),g}var Ee={exports:{}},Ui;function Cr(){if(Ui)return Ee.exports;Ui=1;var f=typeof Reflect=="object"?Reflect:null,r=f&&typeof f.apply=="function"?f.apply:function(v,b,S){return Function.prototype.apply.call(v,b,S)},g;f&&typeof f.ownKeys=="function"?g=f.ownKeys:Object.getOwnPropertySymbols?g=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:g=function(v){return Object.getOwnPropertyNames(v)};function _(p){console&&console.warn&&console.warn(p)}var y=Number.isNaN||function(v){return v!==v};function C(){C.init.call(this)}Ee.exports=C,Ee.exports.once=u,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var T=10;function c(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(p){if(typeof p!="number"||p<0||y(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");T=p}}),C.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},C.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||y(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function i(p){return p._maxListeners===void 0?C.defaultMaxListeners:p._maxListeners}C.prototype.getMaxListeners=function(){return i(this)},C.prototype.emit=function(v){for(var b=[],S=1;S<arguments.length;S++)b.push(arguments[S]);var E=v==="error",F=this._events;if(F!==void 0)E=E&&F.error===void 0;else if(!E)return!1;if(E){var R;if(b.length>0&&(R=b[0]),R instanceof Error)throw R;var z=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw z.context=R,z}var K=F[v];if(K===void 0)return!1;if(typeof K=="function")r(K,this,b);else for(var Z=K.length,q=o(K,Z),S=0;S<Z;++S)r(q[S],this,b);return!0};function l(p,v,b,S){var E,F,R;if(c(b),F=p._events,F===void 0?(F=p._events=Object.create(null),p._eventsCount=0):(F.newListener!==void 0&&(p.emit("newListener",v,b.listener?b.listener:b),F=p._events),R=F[v]),R===void 0)R=F[v]=b,++p._eventsCount;else if(typeof R=="function"?R=F[v]=S?[b,R]:[R,b]:S?R.unshift(b):R.push(b),E=i(p),E>0&&R.length>E&&!R.warned){R.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");z.name="MaxListenersExceededWarning",z.emitter=p,z.type=v,z.count=R.length,_(z)}return p}C.prototype.addListener=function(v,b){return l(this,v,b,!1)},C.prototype.on=C.prototype.addListener,C.prototype.prependListener=function(v,b){return l(this,v,b,!0)};function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function t(p,v,b){var S={fired:!1,wrapFn:void 0,target:p,type:v,listener:b},E=a.bind(S);return E.listener=b,S.wrapFn=E,E}C.prototype.once=function(v,b){return c(b),this.on(v,t(this,v,b)),this},C.prototype.prependOnceListener=function(v,b){return c(b),this.prependListener(v,t(this,v,b)),this},C.prototype.removeListener=function(v,b){var S,E,F,R,z;if(c(b),E=this._events,E===void 0)return this;if(S=E[v],S===void 0)return this;if(S===b||S.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete E[v],E.removeListener&&this.emit("removeListener",v,S.listener||b));else if(typeof S!="function"){for(F=-1,R=S.length-1;R>=0;R--)if(S[R]===b||S[R].listener===b){z=S[R].listener,F=R;break}if(F<0)return this;F===0?S.shift():h(S,F),S.length===1&&(E[v]=S[0]),E.removeListener!==void 0&&this.emit("removeListener",v,z||b)}return this},C.prototype.off=C.prototype.removeListener,C.prototype.removeAllListeners=function(v){var b,S,E;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[v]),this;if(arguments.length===0){var F=Object.keys(S),R;for(E=0;E<F.length;++E)R=F[E],R!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=S[v],typeof b=="function")this.removeListener(v,b);else if(b!==void 0)for(E=b.length-1;E>=0;E--)this.removeListener(v,b[E]);return this};function n(p,v,b){var S=p._events;if(S===void 0)return[];var E=S[v];return E===void 0?[]:typeof E=="function"?b?[E.listener||E]:[E]:b?s(E):o(E,E.length)}C.prototype.listeners=function(v){return n(this,v,!0)},C.prototype.rawListeners=function(v){return n(this,v,!1)},C.listenerCount=function(p,v){return typeof p.listenerCount=="function"?p.listenerCount(v):e.call(p,v)},C.prototype.listenerCount=e;function e(p){var v=this._events;if(v!==void 0){var b=v[p];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function o(p,v){for(var b=new Array(v),S=0;S<v;++S)b[S]=p[S];return b}function h(p,v){for(;v+1<p.length;v++)p[v]=p[v+1];p.pop()}function s(p){for(var v=new Array(p.length),b=0;b<v.length;++b)v[b]=p[b].listener||p[b];return v}function u(p,v){return new Promise(function(b,S){function E(R){p.removeListener(v,F),S(R)}function F(){typeof p.removeListener=="function"&&p.removeListener("error",E),b([].slice.call(arguments))}m(p,v,F,{once:!0}),v!=="error"&&d(p,E,{once:!0})})}function d(p,v,b){typeof p.on=="function"&&m(p,"error",v,b)}function m(p,v,b,S){if(typeof p.on=="function")S.once?p.once(v,b):p.on(v,b);else if(typeof p.addEventListener=="function")p.addEventListener(v,function E(F){S.once&&p.removeEventListener(v,E),b(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof p)}return Ee.exports}var br=Cr();const Sr=_r(br);var ze=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ge(f,r,g){f.addEventListener?f.addEventListener(r,g,!1):f.attachEvent&&f.attachEvent("on".concat(r),function(){g(window.event)})}function Cn(f,r){for(var g=r.slice(0,r.length-1),_=0;_<g.length;_++)g[_]=f[g[_].toLowerCase()];return g}function bn(f){typeof f!="string"&&(f=""),f=f.replace(/\s/g,"");for(var r=f.split(","),g=r.lastIndexOf("");g>=0;)r[g-1]+=",",r.splice(g,1),g=r.lastIndexOf("");return r}function wr(f,r){for(var g=f.length>=r.length?f:r,_=f.length>=r.length?r:f,y=!0,C=0;C<g.length;C++)_.indexOf(g[C])===-1&&(y=!1);return y}var Sn={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ze?173:189,"=":ze?61:187,";":ze?59:186,"'":222,"[":219,"]":221,"\\":220},$t={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},zi={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_t={16:!1,18:!1,17:!1,91:!1},pt={};for(var Pe=1;Pe<20;Pe++)Sn["f".concat(Pe)]=111+Pe;var ft=[],Gi=!1,wn="all",xn=[],Xe=function(r){return Sn[r.toLowerCase()]||$t[r.toLowerCase()]||r.toUpperCase().charCodeAt(0)};function Tn(f){wn=f||"all"}function pe(){return wn||"all"}function xr(){return ft.slice(0)}function Tr(f){var r=f.target||f.srcElement,g=r.tagName,_=!0;return(r.isContentEditable||(g==="INPUT"||g==="TEXTAREA"||g==="SELECT")&&!r.readOnly)&&(_=!1),_}function Or(f){return typeof f=="string"&&(f=Xe(f)),ft.indexOf(f)!==-1}function Er(f,r){var g,_;f||(f=pe());for(var y in pt)if(Object.prototype.hasOwnProperty.call(pt,y))for(g=pt[y],_=0;_<g.length;)g[_].scope===f?g.splice(_,1):_++;pe()===f&&Tn(r||"all")}function Pr(f){var r=f.keyCode||f.which||f.charCode,g=ft.indexOf(r);if(g>=0&&ft.splice(g,1),f.key&&f.key.toLowerCase()==="meta"&&ft.splice(0,ft.length),(r===93||r===224)&&(r=91),r in _t){_t[r]=!1;for(var _ in $t)$t[_]===r&&(It[_]=!1)}}function kr(f){if(!f)Object.keys(pt).forEach(function(T){return delete pt[T]});else if(Array.isArray(f))f.forEach(function(T){T.key&&qe(T)});else if(typeof f=="object")f.key&&qe(f);else if(typeof f=="string"){for(var r=arguments.length,g=new Array(r>1?r-1:0),_=1;_<r;_++)g[_-1]=arguments[_];var y=g[0],C=g[1];typeof y=="function"&&(C=y,y=""),qe({key:f,scope:y,method:C,splitKey:"+"})}}var qe=function(r){var g=r.key,_=r.scope,y=r.method,C=r.splitKey,T=C===void 0?"+":C,c=bn(g);c.forEach(function(i){var l=i.split(T),a=l.length,t=l[a-1],n=t==="*"?"*":Xe(t);if(pt[n]){_||(_=pe());var e=a>1?Cn($t,l):[];pt[n]=pt[n].filter(function(o){var h=y?o.method===y:!0;return!(h&&o.scope===_&&wr(o.mods,e))})}})};function qi(f,r,g,_){if(r.element===_){var y;if(r.scope===g||r.scope==="all"){y=r.mods.length>0;for(var C in _t)Object.prototype.hasOwnProperty.call(_t,C)&&(!_t[C]&&r.mods.indexOf(+C)>-1||_t[C]&&r.mods.indexOf(+C)===-1)&&(y=!1);(r.mods.length===0&&!_t[16]&&!_t[18]&&!_t[17]&&!_t[91]||y||r.shortcut==="*")&&r.method(f,r)===!1&&(f.preventDefault?f.preventDefault():f.returnValue=!1,f.stopPropagation&&f.stopPropagation(),f.cancelBubble&&(f.cancelBubble=!0))}}}function Ki(f,r){var g=pt["*"],_=f.keyCode||f.which||f.charCode;if(It.filter.call(this,f)){if((_===93||_===224)&&(_=91),ft.indexOf(_)===-1&&_!==229&&ft.push(_),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(o){var h=zi[o];f[o]&&ft.indexOf(h)===-1?ft.push(h):!f[o]&&ft.indexOf(h)>-1?ft.splice(ft.indexOf(h),1):o==="metaKey"&&f[o]&&ft.length===3&&(f.ctrlKey||f.shiftKey||f.altKey||(ft=ft.slice(ft.indexOf(h))))}),_ in _t){_t[_]=!0;for(var y in $t)$t[y]===_&&(It[y]=!0);if(!g)return}for(var C in _t)Object.prototype.hasOwnProperty.call(_t,C)&&(_t[C]=f[zi[C]]);f.getModifierState&&!(f.altKey&&!f.ctrlKey)&&f.getModifierState("AltGraph")&&(ft.indexOf(17)===-1&&ft.push(17),ft.indexOf(18)===-1&&ft.push(18),_t[17]=!0,_t[18]=!0);var T=pe();if(g)for(var c=0;c<g.length;c++)g[c].scope===T&&(f.type==="keydown"&&g[c].keydown||f.type==="keyup"&&g[c].keyup)&&qi(f,g[c],T,r);if(_ in pt){for(var i=0;i<pt[_].length;i++)if((f.type==="keydown"&&pt[_][i].keydown||f.type==="keyup"&&pt[_][i].keyup)&&pt[_][i].key){for(var l=pt[_][i],a=l.splitKey,t=l.key.split(a),n=[],e=0;e<t.length;e++)n.push(Xe(t[e]));n.sort().join("")===ft.sort().join("")&&qi(f,l,T,r)}}}}function Ar(f){return xn.indexOf(f)>-1}function It(f,r,g){ft=[];var _=bn(f),y=[],C="all",T=document,c=0,i=!1,l=!0,a="+";for(g===void 0&&typeof r=="function"&&(g=r),Object.prototype.toString.call(r)==="[object Object]"&&(r.scope&&(C=r.scope),r.element&&(T=r.element),r.keyup&&(i=r.keyup),r.keydown!==void 0&&(l=r.keydown),typeof r.splitKey=="string"&&(a=r.splitKey)),typeof r=="string"&&(C=r);c<_.length;c++)f=_[c].split(a),y=[],f.length>1&&(y=Cn($t,f)),f=f[f.length-1],f=f==="*"?"*":Xe(f),f in pt||(pt[f]=[]),pt[f].push({keyup:i,keydown:l,scope:C,mods:y,shortcut:_[c],method:g,key:_[c],splitKey:a,element:T});typeof T<"u"&&!Ar(T)&&window&&(xn.push(T),Ge(T,"keydown",function(t){Ki(t,T)}),Gi||(Gi=!0,Ge(window,"focus",function(){ft=[]})),Ge(T,"keyup",function(t){Ki(t,T),Pr(t)}))}var Ke={setScope:Tn,getScope:pe,deleteScope:Er,getPressedKeyCodes:xr,isPressed:Or,filter:Tr,unbind:kr};for(var $e in Ke)Object.prototype.hasOwnProperty.call(Ke,$e)&&(It[$e]=Ke[$e]);if(typeof window<"u"){var Dr=window.hotkeys;It.noConflict=function(f){return f&&window.hotkeys===It&&(window.hotkeys=Dr),It},window.hotkeys=It}class Ie{constructor(r,g){this.container=r,this.dom=null,this.shown=!1,this.root=!0,this.parent=null,this.submenus=[],this.items=g,this._onclick=_=>{this.dom&&_.target!=this.dom&&_.target.parentElement!=this.dom&&!_.target.classList.contains("item")&&!_.target.parentElement.classList.contains("item")&&this.hideAll()},this._oncontextmenu=_=>{_.preventDefault(),_.target!=this.dom&&_.target.parentElement!=this.dom&&!_.target.classList.contains("item")&&!_.target.parentElement.classList.contains("item")&&(this.hideAll(),this.show(_.clientX,_.clientY))},this._oncontextmenu_keydown=_=>{_.keyCode==93&&(_.preventDefault(),this.hideAll(),this.show(_.clientX,_.clientY))},this._onblur=()=>{this.hideAll()}}getMenuDom(){const r=document.createElement("div");r.classList.add("context");for(const g of this.items)r.appendChild(this.itemToDomEl(g));return r}itemToDomEl(r){const g=document.createElement("div");if(r===null)return g.classList="separator",g;r.hasOwnProperty("color")&&/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r.color.toString())&&(g.style.cssText=`color: ${r.color}`),g.classList.add("item");const _=document.createElement("span");_.classList="label",_.innerText=r.hasOwnProperty("text")?r.text.toString():"",g.appendChild(_),r.hasOwnProperty("disabled")&&r.disabled?g.classList.add("disabled"):g.classList.add("enabled");const y=document.createElement("span");if(y.classList="hotkey",y.innerText=r.hasOwnProperty("hotkey")?r.hotkey.toString():"",g.appendChild(y),r.hasOwnProperty("subitems")&&Array.isArray(r.subitems)&&r.subitems.length>0){const C=new Ie(this.container,r.subitems);C.root=!1,C.parent=this;const T=()=>{if(r.hasOwnProperty("disabled")&&r.disabled==!0)return;this.hideSubMenus();const c=this.dom.offsetLeft+this.dom.clientWidth+g.offsetLeft,i=this.dom.offsetTop+g.offsetTop;C.shown?C.hide():C.show(c,i)};this.submenus.push(C),g.classList.add("has-subitems"),g.addEventListener("click",T),g.addEventListener("mousemove",T)}else if(r.hasOwnProperty("submenu")&&r.submenu instanceof Ie){const C=r.submenu;C.root=!1,C.parent=this;const T=()=>{if(r.hasOwnProperty("disabled")&&r.disabled==!0)return;this.hideSubMenus();const c=this.dom.offsetLeft+this.dom.clientWidth+g.offsetLeft,i=this.dom.offsetTop+g.offsetTop;C.shown?C.hide():C.show(c,i)};this.submenus.push(C),g.classList.add("has-subitems"),g.addEventListener("click",T),g.addEventListener("mousemove",T)}else g.addEventListener("click",()=>{if(this.hideSubMenus(),!g.classList.contains("disabled"))if(r.hasOwnProperty("onclick")&&typeof r.onclick=="function"){const C={handled:!1,item:g,label:_,hotkey:y,items:this.items,data:r};r.onclick(C),C.handled||this.hide()}else this.hide()}),g.addEventListener("mousemove",()=>{this.hideSubMenus()});return g}hideAll(){if(this.root&&!this.parent){this.shown&&(this.hideSubMenus(),this.shown=!1,this.container.removeChild(this.dom),this.parent&&this.parent.shown&&this.parent.hide());return}this.parent.hide()}hide(){this.dom&&this.shown&&(this.shown=!1,this.hideSubMenus(),this.container.removeChild(this.dom),this.parent&&this.parent.shown&&this.parent.hide())}hideSubMenus(){for(const r of this.submenus)r.shown&&(r.shown=!1,r.container.removeChild(r.dom)),r.hideSubMenus()}show(r,g){this.dom=this.getMenuDom(),this.dom.style.left=`${r}px`,this.dom.style.top=`${g}px`,this.shown=!0,this.container.appendChild(this.dom)}install(){this.container.addEventListener("contextmenu",this._oncontextmenu),this.container.addEventListener("keydown",this._oncontextmenu_keydown),this.container.addEventListener("click",this._onclick),window.addEventListener("blur",this._onblur)}setData(r){this.items=r}uninstall(){this.dom=null,this.container.removeEventListener("keydown",this._oncontextmenu_keydown),this.container.removeEventListener("click",this._onclick),window.removeEventListener("blur",this._onblur)}}var ke,Mr=new Uint8Array(16);function Lr(){if(!ke&&(ke=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ke))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(Mr)}const Fr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Rr(f){return typeof f=="string"&&Fr.test(f)}var vt=[];for(var Je=0;Je<256;++Je)vt.push((Je+256).toString(16).substr(1));function Ir(f){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=(vt[f[r+0]]+vt[f[r+1]]+vt[f[r+2]]+vt[f[r+3]]+"-"+vt[f[r+4]]+vt[f[r+5]]+"-"+vt[f[r+6]]+vt[f[r+7]]+"-"+vt[f[r+8]]+vt[f[r+9]]+"-"+vt[f[r+10]]+vt[f[r+11]]+vt[f[r+12]]+vt[f[r+13]]+vt[f[r+14]]+vt[f[r+15]]).toLowerCase();if(!Rr(g))throw TypeError("Stringified UUID is invalid");return g}function On(f,r,g){f=f||{};var _=f.random||(f.rng||Lr)();return _[6]=_[6]&15|64,_[8]=_[8]&63|128,Ir(_)}function jr(f){const r=Object.create(null);for(const g of f.split(","))r[g]=1;return g=>g in r}const me=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const ee=()=>{},Br=f=>f.charCodeAt(0)===111&&f.charCodeAt(1)===110&&(f.charCodeAt(2)>122||f.charCodeAt(2)<97),Vt=Object.assign,Hr=Object.prototype.hasOwnProperty,Si=(f,r)=>Hr.call(f,r),gt=Array.isArray,ie=f=>Ye(f)==="[object Map]",Nr=f=>Ye(f)==="[object Set]",Ct=f=>typeof f=="function",jt=f=>typeof f=="string",xe=f=>typeof f=="symbol",xt=f=>f!==null&&typeof f=="object",Wr=f=>(xt(f)||Ct(f))&&Ct(f.then)&&Ct(f.catch),Xr=Object.prototype.toString,Ye=f=>Xr.call(f),En=f=>Ye(f).slice(8,-1),Yr=f=>Ye(f)==="[object Object]",Di=f=>jt(f)&&f!=="NaN"&&f[0]!=="-"&&""+parseInt(f,10)===f,Pn=f=>{const r=Object.create(null);return(g=>r[g]||(r[g]=f(g)))},kn=Pn(f=>f.charAt(0).toUpperCase()+f.slice(1)),Vr=Pn(f=>f?`on${kn(f)}`:""),Yt=(f,r)=>!Object.is(f,r);let $i;const Ve=()=>$i||($i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(f){if(gt(f)){const r={};for(let g=0;g<f.length;g++){const _=f[g],y=jt(_)?qr(_):Mi(_);if(y)for(const C in y)r[C]=y[C]}return r}else if(jt(f)||xt(f))return f}const Ur=/;(?![^(]*\))/g,zr=/:([^]+)/,Gr=/\/\*[^]*?\*\//g;function qr(f){const r={};return f.replace(Gr,"").split(Ur).forEach(g=>{if(g){const _=g.split(zr);_.length>1&&(r[_[0].trim()]=_[1].trim())}}),r}function Li(f){let r="";if(jt(f))r=f;else if(gt(f))for(let g=0;g<f.length;g++){const _=Li(f[g]);_&&(r+=_+" ")}else if(xt(f))for(const g in f)f[g]&&(r+=g+" ");return r.trim()}function At(f,...r){console.warn(`[Vue warn] ${f}`,...r)}let ct;const Qe=new WeakSet;class Kr{constructor(r){this.fn=r,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Qe.has(this)&&(Qe.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dn(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ji(this),Mn(this);const r=ct,g=Pt;ct=this,Pt=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&ct!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),Ln(this),ct=r,Pt=g,this.flags&=-3}}stop(){if(this.flags&1){for(let r=this.deps;r;r=r.nextDep)Ii(r);this.deps=this.depsTail=void 0,Ji(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Qe.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){wi(this)&&this.run()}get dirty(){return wi(this)}}let An=0,fe,de;function Dn(f,r=!1){if(f.flags|=8,r){f.next=de,de=f;return}f.next=fe,fe=f}function Fi(){An++}function Ri(){if(--An>0)return;if(de){let r=de;for(de=void 0;r;){const g=r.next;r.next=void 0,r.flags&=-9,r=g}}let f;for(;fe;){let r=fe;for(fe=void 0;r;){const g=r.next;if(r.next=void 0,r.flags&=-9,r.flags&1)try{r.trigger()}catch(_){f||(f=_)}r=g}}if(f)throw f}function Mn(f){for(let r=f.deps;r;r=r.nextDep)r.version=-1,r.prevActiveLink=r.dep.activeLink,r.dep.activeLink=r}function Ln(f){let r,g=f.depsTail,_=g;for(;_;){const y=_.prevDep;_.version===-1?(_===g&&(g=y),Ii(_),$r(_)):r=_,_.dep.activeLink=_.prevActiveLink,_.prevActiveLink=void 0,_=y}f.deps=r,f.depsTail=g}function wi(f){for(let r=f.deps;r;r=r.nextDep)if(r.dep.version!==r.version||r.dep.computed&&(Fn(r.dep.computed)||r.dep.version!==r.version))return!0;return!!f._dirty}function Fn(f){if(f.flags&4&&!(f.flags&16)||(f.flags&=-17,f.globalVersion===ve)||(f.globalVersion=ve,!f.isSSR&&f.flags&128&&(!f.deps&&!f._dirty||!wi(f))))return;f.flags|=2;const r=f.dep,g=ct,_=Pt;ct=f,Pt=!0;try{Mn(f);const y=f.fn(f._value);(r.version===0||Yt(y,f._value))&&(f.flags|=128,f._value=y,r.version++)}catch(y){throw r.version++,y}finally{ct=g,Pt=_,Ln(f),f.flags&=-3}}function Ii(f,r=!1){const{dep:g,prevSub:_,nextSub:y}=f;if(_&&(_.nextSub=y,f.prevSub=void 0),y&&(y.prevSub=_,f.nextSub=void 0),process.env.NODE_ENV!=="production"&&g.subsHead===f&&(g.subsHead=y),g.subs===f&&(g.subs=_,!_&&g.computed)){g.computed.flags&=-5;for(let C=g.computed.deps;C;C=C.nextDep)Ii(C,!0)}!r&&!--g.sc&&g.map&&g.map.delete(g.key)}function $r(f){const{prevDep:r,nextDep:g}=f;r&&(r.nextDep=g,f.prevDep=void 0),g&&(g.prevDep=r,f.nextDep=void 0)}let Pt=!0;const Rn=[];function se(){Rn.push(Pt),Pt=!1}function oe(){const f=Rn.pop();Pt=f===void 0?!0:f}function Ji(f){const{cleanup:r}=f;if(f.cleanup=void 0,r){const g=ct;ct=void 0;try{r()}finally{ct=g}}}let ve=0;class Jr{constructor(r,g){this.sub=r,this.dep=g,this.version=g.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ji{constructor(r){this.computed=r,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(r){if(!ct||!Pt||ct===this.computed)return;let g=this.activeLink;if(g===void 0||g.sub!==ct)g=this.activeLink=new Jr(ct,this),ct.deps?(g.prevDep=ct.depsTail,ct.depsTail.nextDep=g,ct.depsTail=g):ct.deps=ct.depsTail=g,In(g);else if(g.version===-1&&(g.version=this.version,g.nextDep)){const _=g.nextDep;_.prevDep=g.prevDep,g.prevDep&&(g.prevDep.nextDep=_),g.prevDep=ct.depsTail,g.nextDep=void 0,ct.depsTail.nextDep=g,ct.depsTail=g,ct.deps===g&&(ct.deps=_)}return process.env.NODE_ENV!=="production"&&ct.onTrack&&ct.onTrack(Vt({effect:ct},r)),g}trigger(r){this.version++,ve++,this.notify(r)}notify(r){Fi();try{if(process.env.NODE_ENV!=="production")for(let g=this.subsHead;g;g=g.nextSub)g.sub.onTrigger&&!(g.sub.flags&8)&&g.sub.onTrigger(Vt({effect:g.sub},r));for(let g=this.subs;g;g=g.prevSub)g.sub.notify()&&g.sub.dep.notify()}finally{Ri()}}}function In(f){if(f.dep.sc++,f.sub.flags&4){const r=f.dep.computed;if(r&&!f.dep.subs){r.flags|=20;for(let _=r.deps;_;_=_.nextDep)In(_)}const g=f.dep.subs;g!==f&&(f.prevSub=g,g&&(g.nextSub=f)),process.env.NODE_ENV!=="production"&&f.dep.subsHead===void 0&&(f.dep.subsHead=f),f.dep.subs=f}}const xi=new WeakMap,qt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Ti=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),_e=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function wt(f,r,g){if(Pt&&ct){let _=xi.get(f);_||xi.set(f,_=new Map);let y=_.get(g);y||(_.set(g,y=new ji),y.map=_,y.key=g),process.env.NODE_ENV!=="production"?y.track({target:f,type:r,key:g}):y.track()}}function Wt(f,r,g,_,y,C){const T=xi.get(f);if(!T){ve++;return}const c=i=>{i&&(process.env.NODE_ENV!=="production"?i.trigger({target:f,type:r,key:g,newValue:_,oldValue:y,oldTarget:C}):i.trigger())};if(Fi(),r==="clear")T.forEach(c);else{const i=gt(f),l=i&&Di(g);if(i&&g==="length"){const a=Number(_);T.forEach((t,n)=>{(n==="length"||n===_e||!xe(n)&&n>=a)&&c(t)})}else switch((g!==void 0||T.has(void 0))&&c(T.get(g)),l&&c(T.get(_e)),r){case"add":i?l&&c(T.get("length")):(c(T.get(qt)),ie(f)&&c(T.get(Ti)));break;case"delete":i||(c(T.get(qt)),ie(f)&&c(T.get(Ti)));break;case"set":ie(f)&&c(T.get(qt));break}}Ri()}function Jt(f){const r=at(f);return r===f?r:(wt(r,"iterate",_e),Tt(f)?r:r.map(Bt))}function Bi(f){return wt(f=at(f),"iterate",_e),f}function Ht(f,r){return Dt(f)?ne(f)?Ce(Bt(r)):Ce(r):Bt(r)}const Qr={__proto__:null,[Symbol.iterator](){return Ze(this,Symbol.iterator,f=>Ht(this,f))},concat(...f){return Jt(this).concat(...f.map(r=>gt(r)?Jt(r):r))},entries(){return Ze(this,"entries",f=>(f[1]=Ht(this,f[1]),f))},every(f,r){return Ft(this,"every",f,r,void 0,arguments)},filter(f,r){return Ft(this,"filter",f,r,g=>g.map(_=>Ht(this,_)),arguments)},find(f,r){return Ft(this,"find",f,r,g=>Ht(this,g),arguments)},findIndex(f,r){return Ft(this,"findIndex",f,r,void 0,arguments)},findLast(f,r){return Ft(this,"findLast",f,r,g=>Ht(this,g),arguments)},findLastIndex(f,r){return Ft(this,"findLastIndex",f,r,void 0,arguments)},forEach(f,r){return Ft(this,"forEach",f,r,void 0,arguments)},includes(...f){return ti(this,"includes",f)},indexOf(...f){return ti(this,"indexOf",f)},join(f){return Jt(this).join(f)},lastIndexOf(...f){return ti(this,"lastIndexOf",f)},map(f,r){return Ft(this,"map",f,r,void 0,arguments)},pop(){return ce(this,"pop")},push(...f){return ce(this,"push",f)},reduce(f,...r){return Qi(this,"reduce",f,r)},reduceRight(f,...r){return Qi(this,"reduceRight",f,r)},shift(){return ce(this,"shift")},some(f,r){return Ft(this,"some",f,r,void 0,arguments)},splice(...f){return ce(this,"splice",f)},toReversed(){return Jt(this).toReversed()},toSorted(f){return Jt(this).toSorted(f)},toSpliced(...f){return Jt(this).toSpliced(...f)},unshift(...f){return ce(this,"unshift",f)},values(){return Ze(this,"values",f=>Ht(this,f))}};function Ze(f,r,g){const _=Bi(f),y=_[r]();return _!==f&&!Tt(f)&&(y._next=y.next,y.next=()=>{const C=y._next();return C.done||(C.value=g(C.value)),C}),y}const Zr=Array.prototype;function Ft(f,r,g,_,y,C){const T=Bi(f),c=T!==f&&!Tt(f),i=T[r];if(i!==Zr[r]){const t=i.apply(f,C);return c?Bt(t):t}let l=g;T!==f&&(c?l=function(t,n){return g.call(this,Ht(f,t),n,f)}:g.length>2&&(l=function(t,n){return g.call(this,t,n,f)}));const a=i.call(T,l,_);return c&&y?y(a):a}function Qi(f,r,g,_){const y=Bi(f);let C=g;return y!==f&&(Tt(f)?g.length>3&&(C=function(T,c,i){return g.call(this,T,c,i,f)}):C=function(T,c,i){return g.call(this,T,Ht(f,c),i,f)}),y[r](C,..._)}function ti(f,r,g){const _=at(f);wt(_,"iterate",_e);const y=_[r](...g);return(y===-1||y===!1)&&je(g[0])?(g[0]=at(g[0]),_[r](...g)):y}function ce(f,r,g=[]){se(),Fi();const _=at(f)[r].apply(f,g);return Ri(),oe(),_}const ts=jr("__proto__,__v_isRef,__isVue"),jn=new Set(Object.getOwnPropertyNames(Symbol).filter(f=>f!=="arguments"&&f!=="caller").map(f=>Symbol[f]).filter(xe));function es(f){xe(f)||(f=String(f));const r=at(this);return wt(r,"has",f),r.hasOwnProperty(f)}class Bn{constructor(r=!1,g=!1){this._isReadonly=r,this._isShallow=g}get(r,g,_){if(g==="__v_skip")return r.__v_skip;const y=this._isReadonly,C=this._isShallow;if(g==="__v_isReactive")return!y;if(g==="__v_isReadonly")return y;if(g==="__v_isShallow")return C;if(g==="__v_raw")return _===(y?C?us:Wn:C?hs:Nn).get(r)||Object.getPrototypeOf(r)===Object.getPrototypeOf(_)?r:void 0;const T=gt(r);if(!y){let i;if(T&&(i=Qr[g]))return i;if(g==="hasOwnProperty")return es}const c=Reflect.get(r,g,Ot(r)?r:_);if((xe(g)?jn.has(g):ts(g))||(y||wt(r,"get",g),C))return c;if(Ot(c)){const i=T&&Di(g)?c:c.value;return y&&xt(i)?ye(i):i}return xt(c)?y?ye(c):Xn(c):c}}class is extends Bn{constructor(r=!1){super(!1,r)}set(r,g,_,y){let C=r[g];const T=gt(r)&&Di(g);if(!this._isShallow){const l=Dt(C);if(!Tt(_)&&!Dt(_)&&(C=at(C),_=at(_)),!T&&Ot(C)&&!Ot(_))return l?(process.env.NODE_ENV!=="production"&&At(`Set operation on key "${String(g)}" failed: target is readonly.`,r[g]),!0):(C.value=_,!0)}const c=T?Number(g)<r.length:Si(r,g),i=Reflect.set(r,g,_,Ot(r)?r:y);return r===at(y)&&(c?Yt(_,C)&&Wt(r,"set",g,_,C):Wt(r,"add",g,_)),i}deleteProperty(r,g){const _=Si(r,g),y=r[g],C=Reflect.deleteProperty(r,g);return C&&_&&Wt(r,"delete",g,void 0,y),C}has(r,g){const _=Reflect.has(r,g);return(!xe(g)||!jn.has(g))&&wt(r,"has",g),_}ownKeys(r){return wt(r,"iterate",gt(r)?"length":qt),Reflect.ownKeys(r)}}class ns extends Bn{constructor(r=!1){super(!0,r)}set(r,g){return process.env.NODE_ENV!=="production"&&At(`Set operation on key "${String(g)}" failed: target is readonly.`,r),!0}deleteProperty(r,g){return process.env.NODE_ENV!=="production"&&At(`Delete operation on key "${String(g)}" failed: target is readonly.`,r),!0}}const rs=new is,ss=new ns,Oi=f=>f,Ae=f=>Reflect.getPrototypeOf(f);function os(f,r,g){return function(..._){const y=this.__v_raw,C=at(y),T=ie(C),c=f==="entries"||f===Symbol.iterator&&T,i=f==="keys"&&T,l=y[f](..._),a=g?Oi:r?Ce:Bt;return!r&&wt(C,"iterate",i?Ti:qt),{next(){const{value:t,done:n}=l.next();return n?{value:t,done:n}:{value:c?[a(t[0]),a(t[1])]:a(t),done:n}},[Symbol.iterator](){return this}}}}function De(f){return function(...r){if(process.env.NODE_ENV!=="production"){const g=r[0]?`on key "${r[0]}" `:"";At(`${kn(f)} operation ${g}failed: target is readonly.`,at(this))}return f==="delete"?!1:f==="clear"?void 0:this}}function as(f,r){const g={get(y){const C=this.__v_raw,T=at(C),c=at(y);f||(Yt(y,c)&&wt(T,"get",y),wt(T,"get",c));const{has:i}=Ae(T),l=r?Oi:f?Ce:Bt;if(i.call(T,y))return l(C.get(y));if(i.call(T,c))return l(C.get(c));C!==T&&C.get(y)},get size(){const y=this.__v_raw;return!f&&wt(at(y),"iterate",qt),y.size},has(y){const C=this.__v_raw,T=at(C),c=at(y);return f||(Yt(y,c)&&wt(T,"has",y),wt(T,"has",c)),y===c?C.has(y):C.has(y)||C.has(c)},forEach(y,C){const T=this,c=T.__v_raw,i=at(c),l=r?Oi:f?Ce:Bt;return!f&&wt(i,"iterate",qt),c.forEach((a,t)=>y.call(C,l(a),l(t),T))}};return Vt(g,f?{add:De("add"),set:De("set"),delete:De("delete"),clear:De("clear")}:{add(y){!r&&!Tt(y)&&!Dt(y)&&(y=at(y));const C=at(this);return Ae(C).has.call(C,y)||(C.add(y),Wt(C,"add",y,y)),this},set(y,C){!r&&!Tt(C)&&!Dt(C)&&(C=at(C));const T=at(this),{has:c,get:i}=Ae(T);let l=c.call(T,y);l?process.env.NODE_ENV!=="production"&&Zi(T,c,y):(y=at(y),l=c.call(T,y));const a=i.call(T,y);return T.set(y,C),l?Yt(C,a)&&Wt(T,"set",y,C,a):Wt(T,"add",y,C),this},delete(y){const C=at(this),{has:T,get:c}=Ae(C);let i=T.call(C,y);i?process.env.NODE_ENV!=="production"&&Zi(C,T,y):(y=at(y),i=T.call(C,y));const l=c?c.call(C,y):void 0,a=C.delete(y);return i&&Wt(C,"delete",y,void 0,l),a},clear(){const y=at(this),C=y.size!==0,T=process.env.NODE_ENV!=="production"?ie(y)?new Map(y):new Set(y):void 0,c=y.clear();return C&&Wt(y,"clear",void 0,void 0,T),c}}),["keys","values","entries",Symbol.iterator].forEach(y=>{g[y]=os(y,f,r)}),g}function Hn(f,r){const g=as(f,r);return(_,y,C)=>y==="__v_isReactive"?!f:y==="__v_isReadonly"?f:y==="__v_raw"?_:Reflect.get(Si(g,y)&&y in _?g:_,y,C)}const ls={get:Hn(!1,!1)},cs={get:Hn(!0,!1)};function Zi(f,r,g){const _=at(g);if(_!==g&&r.call(f,_)){const y=En(f);At(`Reactive ${y} contains both the raw and reactive versions of the same object${y==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Nn=new WeakMap,hs=new WeakMap,Wn=new WeakMap,us=new WeakMap;function fs(f){switch(f){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(f){return f.__v_skip||!Object.isExtensible(f)?0:fs(En(f))}function Xn(f){return Dt(f)?f:Yn(f,!1,rs,ls,Nn)}function ye(f){return Yn(f,!0,ss,cs,Wn)}function Yn(f,r,g,_,y){if(!xt(f))return process.env.NODE_ENV!=="production"&&At(`value cannot be made ${r?"readonly":"reactive"}: ${String(f)}`),f;if(f.__v_raw&&!(r&&f.__v_isReactive))return f;const C=ds(f);if(C===0)return f;const T=y.get(f);if(T)return T;const c=new Proxy(f,C===2?_:g);return y.set(f,c),c}function ne(f){return Dt(f)?ne(f.__v_raw):!!(f&&f.__v_isReactive)}function Dt(f){return!!(f&&f.__v_isReadonly)}function Tt(f){return!!(f&&f.__v_isShallow)}function je(f){return f?!!f.__v_raw:!1}function at(f){const r=f&&f.__v_raw;return r?at(r):f}const Bt=f=>xt(f)?Xn(f):f,Ce=f=>xt(f)?ye(f):f;function Ot(f){return f?f.__v_isRef===!0:!1}function Ut(f){return gs(f,!1)}function gs(f,r){return Ot(f)?f:new ps(f,r)}class ps{constructor(r,g){this.dep=new ji,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=g?r:at(r),this._value=g?r:Bt(r),this.__v_isShallow=g}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(r){const g=this._rawValue,_=this.__v_isShallow||Tt(r)||Dt(r);r=_?r:at(r),Yt(r,g)&&(this._rawValue=r,this._value=_?r:Bt(r),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:r,oldValue:g}):this.dep.trigger())}}function ms(f){return Ot(f)?f.value:f}class vs{constructor(r,g,_){this.fn=r,this.setter=g,this._value=void 0,this.dep=new ji(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ve-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!g,this.isSSR=_}notify(){if(this.flags|=16,!(this.flags&8)&&ct!==this)return Dn(this,!0),!0;process.env.NODE_ENV}get value(){const r=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Fn(this),r&&(r.version=this.dep.version),this._value}set value(r){this.setter?this.setter(r):process.env.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function _s(f,r,g=!1){let _,y;Ct(f)?_=f:(_=f.get,y=f.set);const C=new vs(_,y,g);return process.env.NODE_ENV,C}const Me={},Be=new WeakMap;let Gt;function ys(f,r=!1,g=Gt){if(g){let _=Be.get(g);_||Be.set(g,_=[]),_.push(f)}else process.env.NODE_ENV!=="production"&&!r&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Cs(f,r,g=me){const{immediate:_,deep:y,once:C,scheduler:T,augmentJob:c,call:i}=g,l=p=>{(g.onWarn||At)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=p=>y?p:Tt(p)||y===!1||y===0?Xt(p,1):Xt(p);let t,n,e,o,h=!1,s=!1;if(Ot(f)?(n=()=>f.value,h=Tt(f)):ne(f)?(n=()=>a(f),h=!0):gt(f)?(s=!0,h=f.some(p=>ne(p)||Tt(p)),n=()=>f.map(p=>{if(Ot(p))return p.value;if(ne(p))return a(p);if(Ct(p))return i?i(p,2):p();process.env.NODE_ENV!=="production"&&l(p)})):Ct(f)?r?n=i?()=>i(f,2):f:n=()=>{if(e){se();try{e()}finally{oe()}}const p=Gt;Gt=t;try{return i?i(f,3,[o]):f(o)}finally{Gt=p}}:(n=ee,process.env.NODE_ENV!=="production"&&l(f)),r&&y){const p=n,v=y===!0?1/0:y;n=()=>Xt(p(),v)}const u=()=>{t.stop()};if(C&&r){const p=r;r=(...v)=>{p(...v),u()}}let d=s?new Array(f.length).fill(Me):Me;const m=p=>{if(!(!(t.flags&1)||!t.dirty&&!p))if(r){const v=t.run();if(y||h||(s?v.some((b,S)=>Yt(b,d[S])):Yt(v,d))){e&&e();const b=Gt;Gt=t;try{const S=[v,d===Me?void 0:s&&d[0]===Me?[]:d,o];d=v,i?i(r,3,S):r(...S)}finally{Gt=b}}}else t.run()};return c&&c(m),t=new Kr(n),t.scheduler=T?()=>T(m,!1):m,o=p=>ys(p,!1,t),e=t.onStop=()=>{const p=Be.get(t);if(p){if(i)i(p,4);else for(const v of p)v();Be.delete(t)}},process.env.NODE_ENV!=="production"&&(t.onTrack=g.onTrack,t.onTrigger=g.onTrigger),r?_?m(!0):d=t.run():T?T(m.bind(null,!0),!0):t.run(),u.pause=t.pause.bind(t),u.resume=t.resume.bind(t),u.stop=u,u}function Xt(f,r=1/0,g){if(r<=0||!xt(f)||f.__v_skip||(g=g||new Map,(g.get(f)||0)>=r))return f;if(g.set(f,r),r--,Ot(f))Xt(f.value,r,g);else if(gt(f))for(let _=0;_<f.length;_++)Xt(f[_],r,g);else if(Nr(f)||ie(f))f.forEach(_=>{Xt(_,r,g)});else if(Yr(f)){for(const _ in f)Xt(f[_],r,g);for(const _ of Object.getOwnPropertySymbols(f))Object.prototype.propertyIsEnumerable.call(f,_)&&Xt(f[_],r,g)}return f}const Kt=[];function bs(f){Kt.push(f)}function Ss(){Kt.pop()}let ei=!1;function yt(f,...r){if(ei)return;ei=!0,se();const g=Kt.length?Kt[Kt.length-1].component:null,_=g&&g.appContext.config.warnHandler,y=ws();if(_)Ue(_,g,11,[f+r.map(C=>{var T,c;return(c=(T=C.toString)==null?void 0:T.call(C))!=null?c:JSON.stringify(C)}).join(""),g&&g.proxy,y.map(({vnode:C})=>`at <${sr(g,C.type)}>`).join(`
2
2
  `),y]);else{const C=[`[Vue warn]: ${f}`,...r];y.length&&C.push(`
3
3
  `,...xs(y)),console.warn(...C)}oe(),ei=!1}function ws(){let f=Kt[Kt.length-1];if(!f)return[];const r=[];for(;f;){const g=r[0];g&&g.vnode===f?g.recurseCount++:r.push({vnode:f,recurseCount:0});const _=f.component&&f.component.parent;f=_&&_.vnode}return r}function xs(f){const r=[];return f.forEach((g,_)=>{r.push(..._===0?[]:[`
4
4
  `],...Ts(g))}),r}function Ts({vnode:f,recurseCount:r}){const g=r>0?`... (${r} recursive calls)`:"",_=f.component?f.component.parent==null:!1,y=` at <${sr(f.component,f.type,_)}`,C=">"+g;return f.props?[y,...Os(f.props),C]:[y+C]}function Os(f){const r=[],g=Object.keys(f);return g.slice(0,3).forEach(_=>{r.push(...Vn(_,f[_]))}),g.length>3&&r.push(" ..."),r}function Vn(f,r,g){return jt(r)?(r=JSON.stringify(r),g?r:[`${f}=${r}`]):typeof r=="number"||typeof r=="boolean"||r==null?g?r:[`${f}=${r}`]:Ot(r)?(r=Vn(f,at(r.value),!0),g?r:[`${f}=Ref<`,r,">"]):Ct(r)?[`${f}=fn${r.name?`<${r.name}>`:""}`]:(r=at(r),g?r:[`${f}=`,r])}const Hi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ue(f,r,g,_){try{return _?f(..._):f()}catch(y){Wi(y,r,g)}}function Ni(f,r,g,_){if(Ct(f)){const y=Ue(f,r,g,_);return y&&Wr(y)&&y.catch(C=>{Wi(C,r,g)}),y}if(gt(f)){const y=[];for(let C=0;C<f.length;C++)y.push(Ni(f[C],r,g,_));return y}else process.env.NODE_ENV!=="production"&&yt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof f}`)}function Wi(f,r,g,_=!0){const y=r?r.vnode:null,{errorHandler:C,throwUnhandledErrorInProduction:T}=r&&r.appContext.config||me;if(r){let c=r.parent;const i=r.proxy,l=process.env.NODE_ENV!=="production"?Hi[g]:`https://vuejs.org/error-reference/#runtime-${g}`;for(;c;){const a=c.ec;if(a){for(let t=0;t<a.length;t++)if(a[t](f,i,l)===!1)return}c=c.parent}if(C){se(),Ue(C,null,10,[f,i,l]),oe();return}}Es(f,g,y,_,T)}function Es(f,r,g,_=!0,y=!1){if(process.env.NODE_ENV!=="production"){const C=Hi[r];if(g&&bs(g),yt(`Unhandled error${C?` during execution of ${C}`:""}`),g&&Ss(),_)throw f;console.error(f)}else{if(y)throw f;console.error(f)}}const Et=[];let Rt=-1;const re=[];let Nt=null,Qt=0;const Ps=Promise.resolve();let Ei=null;const ks=100;function As(f){let r=Rt+1,g=Et.length;for(;r<g;){const _=r+g>>>1,y=Et[_],C=be(y);C<f||C===f&&y.flags&2?r=_+1:g=_}return r}function Un(f){if(!(f.flags&1)){const r=be(f),g=Et[Et.length-1];!g||!(f.flags&2)&&r>=be(g)?Et.push(f):Et.splice(As(r),0,f),f.flags|=1,zn()}}function zn(){Ei||(Ei=Ps.then(qn))}function Gn(f){gt(f)?re.push(...f):Nt&&f.id===-1?Nt.splice(Qt+1,0,f):f.flags&1||(re.push(f),f.flags|=1),zn()}function Ds(f){if(re.length){const r=[...new Set(re)].sort((g,_)=>be(g)-be(_));if(re.length=0,Nt){Nt.push(...r);return}for(Nt=r,process.env.NODE_ENV!=="production"&&(f=f||new Map),Qt=0;Qt<Nt.length;Qt++){const g=Nt[Qt];process.env.NODE_ENV!=="production"&&Kn(f,g)||(g.flags&4&&(g.flags&=-2),g.flags&8||g(),g.flags&=-2)}Nt=null,Qt=0}}const be=f=>f.id==null?f.flags&2?-1:1/0:f.id;function qn(f){process.env.NODE_ENV!=="production"&&(f=f||new Map);const r=process.env.NODE_ENV!=="production"?g=>Kn(f,g):ee;try{for(Rt=0;Rt<Et.length;Rt++){const g=Et[Rt];if(g&&!(g.flags&8)){if(process.env.NODE_ENV!=="production"&&r(g))continue;g.flags&4&&(g.flags&=-2),Ue(g,g.i,g.i?15:14),g.flags&4||(g.flags&=-2)}}}finally{for(;Rt<Et.length;Rt++){const g=Et[Rt];g&&(g.flags&=-2)}Rt=-1,Et.length=0,Ds(f),Ei=null,(Et.length||re.length)&&qn(f)}}function Kn(f,r){const g=f.get(r)||0;if(g>ks){const _=r.i,y=_&&rr(_.type);return Wi(`Maximum recursive updates exceeded${y?` in component <${y}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return f.set(r,g+1),!1}const ii=new Map;process.env.NODE_ENV!=="production"&&(Ve().__VUE_HMR_RUNTIME__={createRecord:ni(Ms),rerender:ni(Ls),reload:ni(Fs)});const He=new Map;function Ms(f,r){return He.has(f)?!1:(He.set(f,{initialDef:Ne(r),instances:new Set}),!0)}function Ne(f){return or(f)?f.__vccOpts:f}function Ls(f,r){const g=He.get(f);g&&(g.initialDef.render=r,[...g.instances].forEach(_=>{r&&(_.render=r,Ne(_.type).render=r),_.renderCache=[],_.job.flags&8||_.update()}))}function Fs(f,r){const g=He.get(f);if(!g)return;r=Ne(r),tn(g.initialDef,r);const _=[...g.instances];for(let y=0;y<_.length;y++){const C=_[y],T=Ne(C.type);let c=ii.get(T);c||(T!==g.initialDef&&tn(T,r),ii.set(T,c=new Set)),c.add(C),C.appContext.propsCache.delete(C.type),C.appContext.emitsCache.delete(C.type),C.appContext.optionsCache.delete(C.type),C.ceReload?(c.add(C),C.ceReload(r.styles),c.delete(C)):C.parent?Un(()=>{C.job.flags&8||(C.parent.update(),c.delete(C))}):C.appContext.reload?C.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),C.root.ce&&C!==C.root&&C.root.ce._removeChildStyle(T)}Gn(()=>{ii.clear()})}function tn(f,r){Vt(f,r);for(const g in f)g!=="__file"&&!(g in r)&&delete f[g]}function ni(f){return(r,g)=>{try{return f(r,g)}catch(_){console.error(_),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Zt,Le=[];function $n(f,r){var g,_;Zt=f,Zt?(Zt.enabled=!0,Le.forEach(({event:y,args:C})=>Zt.emit(y,...C)),Le=[]):typeof window<"u"&&window.HTMLElement&&!((_=(g=window.navigator)==null?void 0:g.userAgent)!=null&&_.includes("jsdom"))?((r.__VUE_DEVTOOLS_HOOK_REPLAY__=r.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(C=>{$n(C,r)}),setTimeout(()=>{Zt||(r.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Le=[])},3e3)):Le=[]}let Se=null,Rs=null;const Is=f=>f.__isTeleport;function Jn(f,r){f.shapeFlag&6&&f.component?(f.transition=r,Jn(f.component.subTree,r)):f.shapeFlag&128?(f.ssContent.transition=r.clone(f.ssContent),f.ssFallback.transition=r.clone(f.ssFallback)):f.transition=r}Ve().requestIdleCallback;Ve().cancelIdleCallback;function js(f,r,g=ae,_=!1){if(g){const y=g[f]||(g[f]=[]),C=r.__weh||(r.__weh=(...T)=>{se();const c=oo(g),i=Ni(r,g,f,T);return c(),oe(),i});return _?y.unshift(C):y.push(C),C}else if(process.env.NODE_ENV!=="production"){const y=Vr(Hi[f].replace(/ hook$/,""));yt(`${y} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Bs=f=>(r,g=ae)=>{(!we||f==="sp")&&js(f,(..._)=>r(..._),g)},Hs=Bs("m"),Ns=Symbol.for("v-ndc"),Ws={};process.env.NODE_ENV!=="production"&&(Ws.ownKeys=f=>(yt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(f)));let Xs=null;function Ys(f,r,g=!1){const _=Yi();if(_||Xs){let y=_?_.parent==null||_.ce?_.vnode.appContext&&_.vnode.appContext.provides:_.parent.provides:void 0;if(y&&f in y)return y[f];if(arguments.length>1)return g&&Ct(r)?r.call(_&&_.proxy):r;process.env.NODE_ENV!=="production"&&yt(`injection "${String(f)}" not found.`)}else process.env.NODE_ENV!=="production"&&yt("inject() can only be used inside setup() or functional components.")}const Vs=Symbol.for("v-scx"),Us=()=>{{const f=Ys(Vs);return f||process.env.NODE_ENV!=="production"&&yt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),f}};function Qn(f,r,g){return process.env.NODE_ENV!=="production"&&!Ct(r)&&yt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),zs(f,r,g)}function zs(f,r,g=me){const{immediate:_,deep:y,flush:C,once:T}=g;process.env.NODE_ENV!=="production"&&!r&&(_!==void 0&&yt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),y!==void 0&&yt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),T!==void 0&&yt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=Vt({},g);process.env.NODE_ENV!=="production"&&(c.onWarn=yt);const i=r&&_||!r&&C!=="post";let l;if(we){if(C==="sync"){const e=Us();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!i){const e=()=>{};return e.stop=ee,e.resume=ee,e.pause=ee,e}}const a=ae;c.call=(e,o,h)=>Ni(e,a,o,h);let t=!1;C==="post"?c.scheduler=e=>{qs(e,a&&a.suspense)}:C!=="sync"&&(t=!0,c.scheduler=(e,o)=>{o?e():Un(e)}),c.augmentJob=e=>{r&&(e.flags|=4),t&&(e.flags|=2,a&&(e.id=a.uid,e.i=a))};const n=Cs(f,r,c);return we&&(l?l.push(n):i&&n()),n}const Gs={},Zn=f=>Object.getPrototypeOf(f)===Gs,qs=$s,Ks=f=>f.__isSuspense;function $s(f,r){r&&r.pendingBranch?gt(f)?r.effects.push(...f):r.effects.push(f):Gn(f)}const tr=Symbol.for("v-fgt"),Js=Symbol.for("v-txt"),Qs=Symbol.for("v-cmt");function Zs(f){return f?f.__v_isVNode===!0:!1}const to=(...f)=>ir(...f),er=({key:f})=>f??null,Fe=({ref:f,ref_key:r,ref_for:g})=>(typeof f=="number"&&(f=""+f),f!=null?jt(f)||Ot(f)||Ct(f)?{i:Se,r:f,k:r,f:!!g}:f:null);function eo(f,r=null,g=null,_=0,y=null,C=f===tr?0:1,T=!1,c=!1){const i={__v_isVNode:!0,__v_skip:!0,type:f,props:r,key:r&&er(r),ref:r&&Fe(r),scopeId:Rs,slotScopeIds:null,children:g,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:C,patchFlag:_,dynamicProps:y,dynamicChildren:null,appContext:null,ctx:Se};return c?(Xi(i,g),C&128&&f.normalize(i)):g&&(i.shapeFlag|=jt(g)?8:16),process.env.NODE_ENV!=="production"&&i.key!==i.key&&yt("VNode created with invalid key (NaN). VNode type:",i.type),i}const io=process.env.NODE_ENV!=="production"?to:ir;function ir(f,r=null,g=null,_=0,y=null,C=!1){if((!f||f===Ns)&&(process.env.NODE_ENV!=="production"&&!f&&yt(`Invalid vnode type when creating vnode: ${f}.`),f=Qs),Zs(f)){const c=We(f,r,!0);return g&&Xi(c,g),c.patchFlag=-2,c}if(or(f)&&(f=f.__vccOpts),r){r=no(r);let{class:c,style:i}=r;c&&!jt(c)&&(r.class=Li(c)),xt(i)&&(je(i)&&!gt(i)&&(i=Vt({},i)),r.style=Mi(i))}const T=jt(f)?1:Ks(f)?128:Is(f)?64:xt(f)?4:Ct(f)?2:0;return process.env.NODE_ENV!=="production"&&T&4&&je(f)&&(f=at(f),yt("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
@@ -438,7 +438,7 @@ gl_FragColor.rgb *= color.a;
438
438
  `?(e++,n[e]=0):n[e]++;n[0]>0&&(this.insertCharStyleObject(t.lineIndex,t.charIndex,n[0],a),a=a&&a.slice(n[0]+1)),e&&this.insertNewlineStyleObject(t.lineIndex,t.charIndex+n[0],e);for(var o=1;o<e;o++)n[o]>0?this.insertCharStyleObject(t.lineIndex+o,0,n[o],a):a&&this.styles[t.lineIndex+o]&&a[0]&&(this.styles[t.lineIndex+o][0]=a[0]),a=a&&a.slice(n[o]+1);n[o]>0&&this.insertCharStyleObject(t.lineIndex+o,0,n[o],a)},setSelectionStartEndWithShift:function(i,l,a){a<=i?(l===i?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=i),this.selectionStart=a):a>i&&a<l?this._selectionDirection==="right"?this.selectionEnd=a:this.selectionStart=a:(l===i?this._selectionDirection="right":this._selectionDirection==="left"&&(this._selectionDirection="right",this.selectionStart=l),this.selectionEnd=a)},setSelectionInBoundaries:function(){var i=this.text.length;this.selectionStart>i?this.selectionStart=i:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>i?this.selectionEnd=i:this.selectionEnd<0&&(this.selectionEnd=0)}})})(),r.util.object.extend(r.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(c){if(this.canvas){this.__newClickTime=+new Date;var i=c.pointer;this.isTripleClick(i)&&(this.fire("tripleclick",c),this._stopEvent(c.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=i,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(c){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===c.x&&this.__lastPointer.y===c.y},_stopEvent:function(c){c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(c){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(c.e))},tripleClickHandler:function(c){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(c.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(c.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(c){!this.canvas||!this.editable||c.e.button&&c.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(c){if(this.__isMousedown=!1,!(!this.editable||this.group||c.transform&&c.transform.actionPerformed||c.e.button&&c.e.button!==1)){if(this.canvas){var i=this.canvas._activeObject;if(i&&i!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(c.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(c){var i=this.getSelectionStartFromPointer(c),l=this.selectionStart,a=this.selectionEnd;c.shiftKey?this.setSelectionStartEndWithShift(l,a,i):(this.selectionStart=i,this.selectionEnd=i),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(c){for(var i=this.getLocalPointer(c),l=0,a=0,t=0,n=0,e=0,o,h,s=0,u=this._textLines.length;s<u&&t<=i.y;s++)t+=this.getHeightOfLine(s)*this.scaleY,e=s,s>0&&(n+=this._textLines[s-1].length+this.missingNewlineOffset(s-1));o=this._getLineLeftOffset(e),a=o*this.scaleX,h=this._textLines[e],this.direction==="rtl"&&(i.x=this.width*this.scaleX-i.x+a);for(var d=0,m=h.length;d<m&&(l=a,a+=this.__charBounds[e][d].kernedWidth*this.scaleX,a<=i.x);d++)n++;return this._getNewSelectionStartFromOffset(i,l,a,n,m)},_getNewSelectionStartFromOffset:function(c,i,l,a,t){var n=c.x-i,e=l-c.x,o=e>n||e<0?0:1,h=a+o;return this.flipX&&(h=t-h),h>this._text.length&&(h=this._text.length),h}}),r.util.object.extend(r.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=r.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var c=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+c.top+"; left: "+c.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+c.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):r.document.body.appendChild(this.hiddenTextarea),r.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),r.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),r.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),r.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),r.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),r.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),r.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),r.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),r.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(r.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(c){if(this.isEditing){var i=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(c.keyCode in i)this[i[c.keyCode]](c);else if(c.keyCode in this.ctrlKeysMapDown&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapDown[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),c.keyCode>=33&&c.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(c){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(c.keyCode in this.ctrlKeysMapUp&&(c.ctrlKey||c.metaKey))this[this.ctrlKeysMapUp[c.keyCode]](c);else return;c.stopImmediatePropagation(),c.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(c){var i=this.fromPaste;if(this.fromPaste=!1,c&&c.stopPropagation(),!!this.isEditing){var l=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,a=this._text.length,t=l.length,n,e,o=t-a,h=this.selectionStart,s=this.selectionEnd,u=h!==s,d,m,p;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var v=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),b=h>v.selectionStart;u?(n=this._text.slice(h,s),o+=s-h):t<a&&(b?n=this._text.slice(s+o,s):n=this._text.slice(h,h-o)),e=l.slice(v.selectionEnd-o,v.selectionEnd),n&&n.length&&(e.length&&(d=this.getSelectionStyles(h,h+1,!1),d=e.map(function(){return d[0]})),u?(m=h,p=s):b?(m=s-n.length,p=s):(m=s,p=s+n.length),this.removeStyleFromTo(m,p)),e.length&&(i&&e.join("")===r.copiedText&&!r.disableStyleCopyPaste&&(d=r.copiedTextStyle),this.insertNewStyleBlock(e,h,d)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(c){this.compositionStart=c.target.selectionStart,this.compositionEnd=c.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(r.copiedText=this.getSelectedText(),r.disableStyleCopyPaste?r.copiedTextStyle=null:r.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(c){return c&&c.clipboardData||r.window.clipboardData},_getWidthBeforeCursor:function(c,i){var l=this._getLineLeftOffset(c),a;return i>0&&(a=this.__charBounds[c][i-1],l+=a.left+a.width),l},getDownCursorOffset:function(c,i){var l=this._getSelectionForOffset(c,i),a=this.get2DCursorLocation(l),t=a.lineIndex;if(t===this._textLines.length-1||c.metaKey||c.keyCode===34)return this._text.length-l;var n=a.charIndex,e=this._getWidthBeforeCursor(t,n),o=this._getIndexOnLine(t+1,e),h=this._textLines[t].slice(n);return h.length+o+1+this.missingNewlineOffset(t)},_getSelectionForOffset:function(c,i){return c.shiftKey&&this.selectionStart!==this.selectionEnd&&i?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(c,i){var l=this._getSelectionForOffset(c,i),a=this.get2DCursorLocation(l),t=a.lineIndex;if(t===0||c.metaKey||c.keyCode===33)return-l;var n=a.charIndex,e=this._getWidthBeforeCursor(t,n),o=this._getIndexOnLine(t-1,e),h=this._textLines[t].slice(0,n),s=this.missingNewlineOffset(t-1);return-this._textLines[t-1].length+o-h.length+(1-s)},_getIndexOnLine:function(c,i){for(var l=this._textLines[c],a=this._getLineLeftOffset(c),t=a,n=0,e,o,h=0,s=l.length;h<s;h++)if(e=this.__charBounds[c][h].width,t+=e,t>i){o=!0;var u=t-e,d=t,m=Math.abs(u-i),p=Math.abs(d-i);n=p<m?h:h-1;break}return o||(n=l.length-1),n},moveCursorDown:function(c){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",c)},moveCursorUp:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",c)},_moveCursorUpOrDown:function(c,i){var l="get"+c+"CursorOffset",a=this[l](i,this._selectionDirection==="right");i.shiftKey?this.moveCursorWithShift(a):this.moveCursorWithoutShift(a),a!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(c){var i=this._selectionDirection==="left"?this.selectionStart+c:this.selectionEnd+c;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,i),c!==0},moveCursorWithoutShift:function(c){return c<0?(this.selectionStart+=c,this.selectionEnd=this.selectionStart):(this.selectionEnd+=c,this.selectionStart=this.selectionEnd),c!==0},moveCursorLeft:function(c){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",c)},_move:function(c,i,l){var a;if(c.altKey)a=this["findWordBoundary"+l](this[i]);else if(c.metaKey||c.keyCode===35||c.keyCode===36)a=this["findLineBoundary"+l](this[i]);else return this[i]+=l==="Left"?-1:1,!0;if(typeof a<"u"&&this[i]!==a)return this[i]=a,!0},_moveLeft:function(c,i){return this._move(c,i,"Left")},_moveRight:function(c,i){return this._move(c,i,"Right")},moveCursorLeftWithoutShift:function(c){var i=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(i=this._moveLeft(c,"selectionStart")),this.selectionEnd=this.selectionStart,i},moveCursorLeftWithShift:function(c){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(c,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(c,"selectionStart")},moveCursorRight:function(c){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",c)},_moveCursorLeftOrRight:function(c,i){var l="moveCursor"+c+"With";this._currentCursorOpacity=1,i.shiftKey?l+="Shift":l+="outShift",this[l](i)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(c){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(c,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(c,"selectionEnd")},moveCursorRightWithoutShift:function(c){var i=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(i=this._moveRight(c,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,i},removeChars:function(c,i){typeof i>"u"&&(i=c+1),this.removeStyleFromTo(c,i),this._text.splice(c,i-c),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(c,i,l,a){typeof a>"u"&&(a=l),a>l&&this.removeStyleFromTo(l,a);var t=r.util.string.graphemeSplit(c);this.insertNewStyleBlock(t,l,i),this._text=[].concat(this._text.slice(0,l),t,this._text.slice(a)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),(function(){var c=r.util.toFixed,i=/ +/g;r.util.object.extend(r.Text.prototype,{_toSVG:function(){var l=this._getSVGLeftTopOffsets(),a=this._getSVGTextAndBg(l.textTop,l.textLeft);return this._wrapSVGTextAndBg(a)},toSVG:function(l){return this._createBaseSVGMarkup(this._toSVG(),{reviver:l,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(l){var a=!0,t=this.getSvgTextDecoration(this);return[l.textBgRects.join(""),' <text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(a),'"',this.addPaintOrder()," >",l.textSpans.join(""),`</text>
439
439
  `]},_getSVGTextAndBg:function(l,a){var t=[],n=[],e=l,o;this._setSVGBg(n);for(var h=0,s=this._textLines.length;h<s;h++)o=this._getLineLeftOffset(h),(this.textBackgroundColor||this.styleHas("textBackgroundColor",h))&&this._setSVGTextLineBg(n,h,a+o,e),this._setSVGTextLineText(t,h,a+o,e),e+=this.getHeightOfLine(h);return{textSpans:t,textBgRects:n}},_createTextCharSpan:function(l,a,t,n){var e=l!==l.trim()||l.match(i),o=this.getSvgSpanStyles(a,e),h=o?'style="'+o+'"':"",s=a.deltaY,u="",d=r.Object.NUM_FRACTION_DIGITS;return s&&(u=' dy="'+c(s,d)+'" '),['<tspan x="',c(t,d),'" y="',c(n,d),'" ',u,h,">",r.util.string.escapeXml(l),"</tspan>"].join("")},_setSVGTextLineText:function(l,a,t,n){var e=this.getHeightOfLine(a),o=this.textAlign.indexOf("justify")!==-1,h,s,u="",d,m,p=0,v=this._textLines[a],b;n+=e*(1-this._fontSizeFraction)/this.lineHeight;for(var S=0,E=v.length-1;S<=E;S++)b=S===E||this.charSpacing,u+=v[S],d=this.__charBounds[a][S],p===0?(t+=d.kernedWidth-d.width,p+=d.width):p+=d.kernedWidth,o&&!b&&this._reSpaceAndTab.test(v[S])&&(b=!0),b||(h=h||this.getCompleteStyleDeclaration(a,S),s=this.getCompleteStyleDeclaration(a,S+1),b=r.util.hasStyleChanged(h,s,!0)),b&&(m=this._getStyleDeclaration(a,S)||{},l.push(this._createTextCharSpan(u,m,t,n)),u="",h=s,t+=p,p=0)},_pushTextBgRect:function(l,a,t,n,e,o){var h=r.Object.NUM_FRACTION_DIGITS;l.push(" <rect ",this._getFillAttributes(a),' x="',c(t,h),'" y="',c(n,h),'" width="',c(e,h),'" height="',c(o,h),`"></rect>
440
440
  `)},_setSVGTextLineBg:function(l,a,t,n){for(var e=this._textLines[a],o=this.getHeightOfLine(a)/this.lineHeight,h=0,s=0,u,d,m=this.getValueOfPropertyAt(a,0,"textBackgroundColor"),p=0,v=e.length;p<v;p++)u=this.__charBounds[a][p],d=this.getValueOfPropertyAt(a,p,"textBackgroundColor"),d!==m?(m&&this._pushTextBgRect(l,m,t+s,n,h,o),s=u.left,h=u.width,m=d):h+=u.kernedWidth;d&&this._pushTextBgRect(l,d,t+s,n,h,o)},_getFillAttributes:function(l){var a=l&&typeof l=="string"?new r.Color(l):"";return!a||!a.getSource()||a.getAlpha()===1?'fill="'+l+'"':'opacity="'+a.getAlpha()+'" fill="'+a.setAlpha(1).toRgb()+'"'},_getSVGLineTopOffset:function(l){for(var a=0,t=0,n=0;n<l;n++)a+=this.getHeightOfLine(n);return t=this.getHeightOfLine(n),{lineTop:a,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(l){var a=r.Object.prototype.getSvgStyles.call(this,l);return a+" white-space: pre;"}})})(),(function(c){var i=c.fabric||(c.fabric={});i.Textbox=i.util.createClass(i.IText,i.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:i.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(l){for(var a=0,t=0,n=0,e={},o=0;o<l.graphemeLines.length;o++)l.graphemeText[n]===`
441
- `&&o>0?(t=0,n++,a++):!this.splitByGrapheme&&this._reSpaceAndTab.test(l.graphemeText[n])&&o>0&&(t++,n++),e[o]={line:a,offset:t},n+=l.graphemeLines[o].length,t+=l.graphemeLines[o].length;return e},styleHas:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[a];t&&(a=t.line)}return i.Text.prototype.styleHas.call(this,l,a)},isEmptyStyles:function(l){if(!this.styles)return!0;var a=0,t=l+1,n,e,o=!1,h=this._styleMap[l],s=this._styleMap[l+1];h&&(l=h.line,a=h.offset),s&&(t=s.line,o=t===l,n=s.offset),e=typeof l>"u"?this.styles:{line:this.styles[l]};for(var u in e)for(var d in e[u])if(d>=a&&(!o||d<n))for(var m in e[u][d])return!1;return!0},_getStyleDeclaration:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[l];if(!t)return null;l=t.line,a=t.offset+a}return this.callSuper("_getStyleDeclaration",l,a)},_setStyleDeclaration:function(l,a,t){var n=this._styleMap[l];l=n.line,a=n.offset+a,this.styles[l][a]=t},_deleteStyleDeclaration:function(l,a){var t=this._styleMap[l];l=t.line,a=t.offset+a,delete this.styles[l][a]},_getLineStyle:function(l){var a=this._styleMap[l];return!!this.styles[a.line]},_setLineStyle:function(l){var a=this._styleMap[l];this.styles[a.line]={}},_wrapText:function(l,a){var t=[],n;for(this.isWrapping=!0,n=0;n<l.length;n++)t=t.concat(this._wrapLine(l[n],n,a));return this.isWrapping=!1,t},_measureWord:function(l,a,t){var n=0,e,o=!0;t=t||0;for(var h=0,s=l.length;h<s;h++){var u=this._getGraphemeBox(l[h],a,h+t,e,o);n+=u.kernedWidth,e=l[h]}return n},_wrapLine:function(l,a,t,R){var e=0,o=this.splitByGrapheme,h=[],s=[],u=o?i.util.string.graphemeSplit(l):l.split(this._wordJoiners),d="",m=0,p=o?"":" ",v=0,b=0,S=0,E=!0,F=this._getWidthOfCharSpacing(),R=R||0;u.length===0&&u.push([]),t-=R;for(var z=0;z<u.length;z++)d=o?u[z]:i.util.string.graphemeSplit(u[z]),v=this._measureWord(d,a,m),m+=d.length,e+=b+v-F,e>t&&!E?(h.push(s),s=[],e=v,E=!0):e+=F,!E&&!o&&s.push(p),s=s.concat(d),b=o?0:this._measureWord([p],a,m),m++,E=!1,v>S&&(S=v);return z&&h.push(s),S+R>this.dynamicMinWidth&&(this.dynamicMinWidth=S-F+R),h},isEndOfWrapping:function(l){return!this._styleMap[l+1]||this._styleMap[l+1].line!==this._styleMap[l].line},missingNewlineOffset:function(l){return this.splitByGrapheme?this.isEndOfWrapping(l)?1:0:1},_splitTextIntoLines:function(l){for(var a=i.Text.prototype._splitTextIntoLines.call(this,l),t=this._wrapText(a.lines,this.width),n=new Array(t.length),e=0;e<t.length;e++)n[e]=t[e].join("");return a.lines=n,a.graphemeLines=t,a},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var l={};for(var a in this._styleMap)this._textLines[a]&&(l[this._styleMap[a].line]=1);for(var a in this.styles)l[a]||delete this.styles[a]},toObject:function(l){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(l))}}),i.Textbox.fromObject=function(l,a){var t=i.util.stylesFromArray(l.styles,l.text),n=Object.assign({},l,{styles:t});return i.Object._fromObject("Textbox",n,a,"text")}})(f),(function(){var c=r.controlsUtils,i=c.scaleSkewCursorStyleHandler,l=c.scaleCursorStyleHandler,a=c.scalingEqually,t=c.scalingYOrSkewingX,n=c.scalingXOrSkewingY,e=c.scaleOrSkewActionName,o=r.Object.prototype.controls;if(o.ml=new r.Control({x:-.5,y:0,cursorStyleHandler:i,actionHandler:n,getActionName:e}),o.mr=new r.Control({x:.5,y:0,cursorStyleHandler:i,actionHandler:n,getActionName:e}),o.mb=new r.Control({x:0,y:.5,cursorStyleHandler:i,actionHandler:t,getActionName:e}),o.mt=new r.Control({x:0,y:-.5,cursorStyleHandler:i,actionHandler:t,getActionName:e}),o.tl=new r.Control({x:-.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),o.tr=new r.Control({x:.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),o.bl=new r.Control({x:-.5,y:.5,cursorStyleHandler:l,actionHandler:a}),o.br=new r.Control({x:.5,y:.5,cursorStyleHandler:l,actionHandler:a}),o.mtr=new r.Control({x:0,y:-.5,actionHandler:c.rotationWithSnapping,cursorStyleHandler:c.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),r.Textbox){var h=r.Textbox.prototype.controls={};h.mtr=o.mtr,h.tr=o.tr,h.br=o.br,h.tl=o.tl,h.bl=o.bl,h.mt=o.mt,h.mb=o.mb,h.mr=new r.Control({x:.5,y:0,actionHandler:c.changeWidth,cursorStyleHandler:i,actionName:"resizing"}),h.ml=new r.Control({x:-.5,y:0,actionHandler:c.changeWidth,cursorStyleHandler:i,actionName:"resizing"})}})()})(si)),si}var _t=No(),ue=(f=>(f.ONE="selectOne",f.MULTI="selectMultiple",f.CANCEL="selectCancel",f))(ue||{}),te=(f=>(f.EMPTY="",f.ONE="one",f.MULTI="multiple",f))(te||{});function dr(f){f&&f.forEach(r=>{r.objects?dr(r.objects):r.type==="text"&&(r.type="textbox")})}const ge=class ge{constructor(r,g){this.canvas=r,this.editor=g,this.selectedMode=te.EMPTY,this._initSelectEvent()}_initSelectEvent(){this.canvas.on("selection:created",()=>this._emitSelectEvent()),this.canvas.on("selection:updated",()=>this._emitSelectEvent()),this.canvas.on("selection:cleared",()=>this._emitSelectEvent())}_emitSelectEvent(){if(!this.canvas)throw TypeError("还未初始化");const r=this.canvas.getActiveObjects().filter(g=>!(g instanceof _t.fabric.GuideLine));r&&r.length===1?(this.selectedMode=te.ONE,this.editor.emit(ue.ONE,r)):r&&r.length>1?(this.selectedMode=te.MULTI,this.editor.emit(ue.MULTI,r)):this.editor.emit(ue.CANCEL)}getSelectMode(){return String(this.selectedMode)}insert(r){ur({accept:".json"}).then(g=>{if(g&&g.length>0){const _=g[0],y=new FileReader;y.readAsText(_,"UTF-8"),y.onload=()=>{this.loadJSON(y.result,r)}}})}renderITextPath(r){r.forEach(g=>{const _=this.canvas.getObjects().find(y=>y.id===g.id);_&&_t.fabric.Path.fromObject(g.path,y=>{_.set("path",y)})})}async loadJSON(r,g){const _=typeof r=="string"?JSON.parse(r):r,y=[];_.objects.forEach(T=>{!T.id&&(T.id=On()),T.type==="i-text"&&T.path&&(y.push({id:T.id,path:T.path}),T.path=null)});const C=await this._transform(_);r=JSON.stringify(C),this.editor.hooksEntity.hookImportBefore.callAsync(r,()=>{this.canvas.loadFromJSON(r,()=>{this.renderITextPath(y),this.canvas.renderAll(),this.editor.hooksEntity.hookImportAfter.callAsync(r,()=>{this.editor?.updateDrawStatus&&typeof this.editor.updateDrawStatus=="function"&&this.editor.updateDrawStatus(!!_.overlayImage),this.canvas.renderAll(),g&&g(),this.editor.emit("loadJson")})},(T,c)=>{this.editor.hooksEntity.hookTransformObjectEnd.callAsync({originObject:T,fabricObject:c},()=>{this.canvas.renderAll()})})})}async _transform(r){if(await this.promiseCallAsync(r),r.objects){const g=r.objects.map(_=>this._transform(_));await Promise.all(g)}return r}promiseCallAsync(r){return new Promise(g=>{this.editor.hooksEntity.hookTransform.callAsync(r,()=>{g(r)})})}getJson(r){const g=this.getExtensionKey(),_=this.canvas.toJSON(g);return r?.clearSrc&&_.objects.forEach(y=>{["qrcode","barcode"].includes(y.extensionType)&&(y.src="")}),_}getExtensionKey(){return["id","gradientAngle","selectable","hasControls","linkData","editable","extensionType","extension","verticalAlign","roundValue","getBase64","lockScalingX","lockScalingY","_originSize"]}dragAddItem(r,g){if(g){const{left:y,top:C}=this.canvas.getSelectionElement().getBoundingClientRect();if(g.x<y||g.y<C||r.width===void 0)return;const T={x:g.x-y,y:g.y-C},c=this.canvas.restorePointerVpt(T);r.left=c.x-r.width/2,r.top=c.y}const{width:_}=this._getSaveOption();_&&r.scaleToWidth(_/2),this.canvas.add(r),this.canvas.setActiveObject(r),!g&&this.editor.position("center"),this.canvas.requestRenderAll()}clipboard(){const r=this.getJson();return ki(JSON.stringify(r,null," "))}async clipboardBase64(){const r=await this.preview();return ki(r)}async saveJson(){const r=this.getJson();await dr(r.objects);const g=`data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(r,null," "))}`;Re(g,"json")}saveSvg(){this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const{fontOption:r,svgOption:g}=this._getSaveSvgOption();_t.fabric.fontPaths={...r};const _=this.canvas.toSVG(g),y=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(_)}`;this.editor.hooksEntity.hookSaveAfter.callAsync(y,()=>{Re(y,"svg")})})}saveImg(){this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const r=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]);const g=this.canvas.toDataURL(r);this.editor.hooksEntity.hookSaveAfter.callAsync(g,()=>{Re(g,"png")})})}getBase64(){return new Promise(r=>{this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const g=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]);const _=this.canvas.toDataURL(g);this.editor.hooksEntity.hookSaveAfter.callAsync(_,()=>r(_))})})}preview(){return new Promise(r=>{this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const g=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]),this.canvas.renderAll();const _=this.canvas.toDataURL(g);this.editor.hooksEntity.hookSaveAfter.callAsync(_,()=>{r(_)})})})}staticPreview(){return new Promise(r=>{})}_getSaveSvgOption(){const r=this.canvas.getObjects().find(l=>l.id==="workspace");let g=this.canvas.getObjects().filter(l=>l.type=="textbox").map(l=>l.fontFamily);g=Array.from(new Set(g));const _=this.editor.getPlugin("FontPlugin").cacheList,y={};for(const l of g){const a=_.find(t=>t.name===l);y[l]=a.file}console.log("_getSaveSvgOption",y);const{left:C,top:T,width:c,height:i}=r;return{fontOption:y,svgOption:{width:c,height:i,viewBox:{x:C,y:T,width:c,height:i}}}}_getSaveOption(){const r=this.canvas.getObjects().find(c=>c.id==="workspace"),{left:g,top:_,width:y,height:C}=r;return{name:"New Image",format:"jpeg",quality:1,multiplier:5,width:y,height:C,left:g,top:_}}clear(){this.canvas.getObjects().forEach(r=>{r.id!=="workspace"&&this.canvas.remove(r)}),this.editor?.setWorkspaseBg("#fff"),this.canvas.discardActiveObject(),this.canvas.renderAll()}destroy(){console.log("pluginDestroy")}};ge.pluginName="ServersPlugin",ge.apis=["insert","loadJSON","getJson","dragAddItem","clipboard","clipboardBase64","saveJson","saveSvg","saveImg","getBase64","clear","preview","staticPreview","getSelectMode","getExtensionKey"],ge.events=[te.ONE,te.MULTI,ue.CANCEL];let Ai=ge;var St={},ai={},rn;function gr(){return rn||(rn=1,ai.deprecate=(f,r)=>{let g=!0;return function(){return g&&(console.warn(`DeprecationWarning: ${r}`),g=!1),f.apply(this,arguments)}}),ai}var li,sn;function Mt(){if(sn)return li;sn=1;const r=gr().deprecate(()=>{},"Hook.context is deprecated and will be removed");function g(...T){return this.call=this._createCall("sync"),this.call(...T)}function _(...T){return this.callAsync=this._createCall("async"),this.callAsync(...T)}function y(...T){return this.promise=this._createCall("promise"),this.promise(...T)}class C{constructor(c=[],i=void 0){this._args=c,this.name=i,this.taps=[],this.interceptors=[],this._call=g,this.call=g,this._callAsync=_,this.callAsync=_,this._promise=y,this.promise=y,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(c){throw new Error("Abstract: should be overridden")}_createCall(c){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:c})}_tap(c,i,l){if(typeof i=="string")i={name:i.trim()};else if(typeof i!="object"||i===null)throw new Error("Invalid tap options");if(typeof i.name!="string"||i.name==="")throw new Error("Missing name for tap");typeof i.context<"u"&&r(),i=Object.assign({type:c,fn:l},i),i=this._runRegisterInterceptors(i),this._insert(i)}tap(c,i){this._tap("sync",c,i)}tapAsync(c,i){this._tap("async",c,i)}tapPromise(c,i){this._tap("promise",c,i)}_runRegisterInterceptors(c){for(const i of this.interceptors)if(i.register){const l=i.register(c);l!==void 0&&(c=l)}return c}withOptions(c){const i=l=>Object.assign({},c,typeof l=="string"?{name:l}:l);return{name:this.name,tap:(l,a)=>this.tap(i(l),a),tapAsync:(l,a)=>this.tapAsync(i(l),a),tapPromise:(l,a)=>this.tapPromise(i(l),a),intercept:l=>this.intercept(l),isUsed:()=>this.isUsed(),withOptions:l=>this.withOptions(i(l))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(c){if(this._resetCompilation(),this.interceptors.push(Object.assign({},c)),c.register)for(let i=0;i<this.taps.length;i++)this.taps[i]=c.register(this.taps[i])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(c){this._resetCompilation();let i;typeof c.before=="string"?i=new Set([c.before]):Array.isArray(c.before)&&(i=new Set(c.before));let l=0;typeof c.stage=="number"&&(l=c.stage);let a=this.taps.length;for(;a>0;){a--;const t=this.taps[a];this.taps[a+1]=t;const n=t.stage||0;if(i){if(i.has(t.name)){i.delete(t.name);continue}if(i.size>0)continue}if(!(n>l)){a++;break}}this.taps[a]=c}}return Object.setPrototypeOf(C.prototype,null),li=C,li}var ci,on;function Lt(){if(on)return ci;on=1;class f{constructor(g){this.config=g,this.options=void 0,this._args=void 0}create(g){this.init(g);let _;switch(this.options.type){case"sync":_=new Function(this.args(),`"use strict";
441
+ `&&o>0?(t=0,n++,a++):!this.splitByGrapheme&&this._reSpaceAndTab.test(l.graphemeText[n])&&o>0&&(t++,n++),e[o]={line:a,offset:t},n+=l.graphemeLines[o].length,t+=l.graphemeLines[o].length;return e},styleHas:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[a];t&&(a=t.line)}return i.Text.prototype.styleHas.call(this,l,a)},isEmptyStyles:function(l){if(!this.styles)return!0;var a=0,t=l+1,n,e,o=!1,h=this._styleMap[l],s=this._styleMap[l+1];h&&(l=h.line,a=h.offset),s&&(t=s.line,o=t===l,n=s.offset),e=typeof l>"u"?this.styles:{line:this.styles[l]};for(var u in e)for(var d in e[u])if(d>=a&&(!o||d<n))for(var m in e[u][d])return!1;return!0},_getStyleDeclaration:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[l];if(!t)return null;l=t.line,a=t.offset+a}return this.callSuper("_getStyleDeclaration",l,a)},_setStyleDeclaration:function(l,a,t){var n=this._styleMap[l];l=n.line,a=n.offset+a,this.styles[l][a]=t},_deleteStyleDeclaration:function(l,a){var t=this._styleMap[l];l=t.line,a=t.offset+a,delete this.styles[l][a]},_getLineStyle:function(l){var a=this._styleMap[l];return!!this.styles[a.line]},_setLineStyle:function(l){var a=this._styleMap[l];this.styles[a.line]={}},_wrapText:function(l,a){var t=[],n;for(this.isWrapping=!0,n=0;n<l.length;n++)t=t.concat(this._wrapLine(l[n],n,a));return this.isWrapping=!1,t},_measureWord:function(l,a,t){var n=0,e,o=!0;t=t||0;for(var h=0,s=l.length;h<s;h++){var u=this._getGraphemeBox(l[h],a,h+t,e,o);n+=u.kernedWidth,e=l[h]}return n},_wrapLine:function(l,a,t,R){var e=0,o=this.splitByGrapheme,h=[],s=[],u=o?i.util.string.graphemeSplit(l):l.split(this._wordJoiners),d="",m=0,p=o?"":" ",v=0,b=0,S=0,E=!0,F=this._getWidthOfCharSpacing(),R=R||0;u.length===0&&u.push([]),t-=R;for(var z=0;z<u.length;z++)d=o?u[z]:i.util.string.graphemeSplit(u[z]),v=this._measureWord(d,a,m),m+=d.length,e+=b+v-F,e>t&&!E?(h.push(s),s=[],e=v,E=!0):e+=F,!E&&!o&&s.push(p),s=s.concat(d),b=o?0:this._measureWord([p],a,m),m++,E=!1,v>S&&(S=v);return z&&h.push(s),S+R>this.dynamicMinWidth&&(this.dynamicMinWidth=S-F+R),h},isEndOfWrapping:function(l){return!this._styleMap[l+1]||this._styleMap[l+1].line!==this._styleMap[l].line},missingNewlineOffset:function(l){return this.splitByGrapheme?this.isEndOfWrapping(l)?1:0:1},_splitTextIntoLines:function(l){for(var a=i.Text.prototype._splitTextIntoLines.call(this,l),t=this._wrapText(a.lines,this.width),n=new Array(t.length),e=0;e<t.length;e++)n[e]=t[e].join("");return a.lines=n,a.graphemeLines=t,a},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var l={};for(var a in this._styleMap)this._textLines[a]&&(l[this._styleMap[a].line]=1);for(var a in this.styles)l[a]||delete this.styles[a]},toObject:function(l){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(l))}}),i.Textbox.fromObject=function(l,a){var t=i.util.stylesFromArray(l.styles,l.text),n=Object.assign({},l,{styles:t});return i.Object._fromObject("Textbox",n,a,"text")}})(f),(function(){var c=r.controlsUtils,i=c.scaleSkewCursorStyleHandler,l=c.scaleCursorStyleHandler,a=c.scalingEqually,t=c.scalingYOrSkewingX,n=c.scalingXOrSkewingY,e=c.scaleOrSkewActionName,o=r.Object.prototype.controls;if(o.ml=new r.Control({x:-.5,y:0,cursorStyleHandler:i,actionHandler:n,getActionName:e}),o.mr=new r.Control({x:.5,y:0,cursorStyleHandler:i,actionHandler:n,getActionName:e}),o.mb=new r.Control({x:0,y:.5,cursorStyleHandler:i,actionHandler:t,getActionName:e}),o.mt=new r.Control({x:0,y:-.5,cursorStyleHandler:i,actionHandler:t,getActionName:e}),o.tl=new r.Control({x:-.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),o.tr=new r.Control({x:.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),o.bl=new r.Control({x:-.5,y:.5,cursorStyleHandler:l,actionHandler:a}),o.br=new r.Control({x:.5,y:.5,cursorStyleHandler:l,actionHandler:a}),o.mtr=new r.Control({x:0,y:-.5,actionHandler:c.rotationWithSnapping,cursorStyleHandler:c.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),r.Textbox){var h=r.Textbox.prototype.controls={};h.mtr=o.mtr,h.tr=o.tr,h.br=o.br,h.tl=o.tl,h.bl=o.bl,h.mt=o.mt,h.mb=o.mb,h.mr=new r.Control({x:.5,y:0,actionHandler:c.changeWidth,cursorStyleHandler:i,actionName:"resizing"}),h.ml=new r.Control({x:-.5,y:0,actionHandler:c.changeWidth,cursorStyleHandler:i,actionName:"resizing"})}})()})(si)),si}var mt=No(),ue=(f=>(f.ONE="selectOne",f.MULTI="selectMultiple",f.CANCEL="selectCancel",f))(ue||{}),te=(f=>(f.EMPTY="",f.ONE="one",f.MULTI="multiple",f))(te||{});function dr(f){f&&f.forEach(r=>{r.objects?dr(r.objects):r.type==="text"&&(r.type="textbox")})}const ge=class ge{constructor(r,g){this.canvas=r,this.editor=g,this.selectedMode=te.EMPTY,this._initSelectEvent()}_initSelectEvent(){this.canvas.on("selection:created",()=>this._emitSelectEvent()),this.canvas.on("selection:updated",()=>this._emitSelectEvent()),this.canvas.on("selection:cleared",()=>this._emitSelectEvent())}_emitSelectEvent(){if(!this.canvas)throw TypeError("还未初始化");const r=this.canvas.getActiveObjects().filter(g=>!(g instanceof mt.fabric.GuideLine));r&&r.length===1?(this.selectedMode=te.ONE,this.editor.emit(ue.ONE,r)):r&&r.length>1?(this.selectedMode=te.MULTI,this.editor.emit(ue.MULTI,r)):this.editor.emit(ue.CANCEL)}getSelectMode(){return String(this.selectedMode)}insert(r){ur({accept:".json"}).then(g=>{if(g&&g.length>0){const _=g[0],y=new FileReader;y.readAsText(_,"UTF-8"),y.onload=()=>{this.loadJSON(y.result,r)}}})}renderITextPath(r){r.forEach(g=>{const _=this.canvas.getObjects().find(y=>y.id===g.id);_&&mt.fabric.Path.fromObject(g.path,y=>{_.set("path",y)})})}async loadJSON(r,g){const _=typeof r=="string"?JSON.parse(r):r,y=[];_.objects.forEach(T=>{!T.id&&(T.id=On()),T.type==="i-text"&&T.path&&(y.push({id:T.id,path:T.path}),T.path=null)});const C=await this._transform(_);r=JSON.stringify(C),this.editor.hooksEntity.hookImportBefore.callAsync(r,()=>{this.canvas.loadFromJSON(r,()=>{this.renderITextPath(y),this.canvas.renderAll(),this.editor.hooksEntity.hookImportAfter.callAsync(r,()=>{this.editor?.updateDrawStatus&&typeof this.editor.updateDrawStatus=="function"&&this.editor.updateDrawStatus(!!_.overlayImage),this.canvas.renderAll(),g&&g(),this.editor.emit("loadJson")})},(T,c)=>{this.editor.hooksEntity.hookTransformObjectEnd.callAsync({originObject:T,fabricObject:c},()=>{this.canvas.renderAll()})})})}async _transform(r){if(await this.promiseCallAsync(r),r.objects){const g=r.objects.map(_=>this._transform(_));await Promise.all(g)}return r}promiseCallAsync(r){return new Promise(g=>{this.editor.hooksEntity.hookTransform.callAsync(r,()=>{g(r)})})}getJson(r){const g=this.getExtensionKey(),_=this.canvas.toJSON(g);return r?.clearSrc&&_.objects.forEach(y=>{["qrcode","barcode"].includes(y.extensionType)&&(y.src="")}),_}getExtensionKey(){return["id","gradientAngle","selectable","hasControls","linkData","editable","extensionType","extension","verticalAlign","roundValue","getBase64","lockScalingX","lockScalingY","_originSize"]}dragAddItem(r,g){if(g){const{left:y,top:C}=this.canvas.getSelectionElement().getBoundingClientRect();if(g.x<y||g.y<C||r.width===void 0)return;const T={x:g.x-y,y:g.y-C},c=this.canvas.restorePointerVpt(T);r.left=c.x-r.width/2,r.top=c.y}const{width:_}=this._getSaveOption();_&&r.scaleToWidth(_/2),this.canvas.add(r),this.canvas.setActiveObject(r),!g&&this.editor.position("center"),this.canvas.requestRenderAll()}clipboard(){const r=this.getJson();return ki(JSON.stringify(r,null," "))}async clipboardBase64(){const r=await this.preview();return ki(r)}async saveJson(){const r=this.getJson();await dr(r.objects);const g=`data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(r,null," "))}`;Re(g,"json")}saveSvg(){this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const{fontOption:r,svgOption:g}=this._getSaveSvgOption();mt.fabric.fontPaths={...r};const _=this.canvas.toSVG(g),y=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(_)}`;this.editor.hooksEntity.hookSaveAfter.callAsync(y,()=>{Re(y,"svg")})})}saveImg(){this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const r=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]);const g=this.canvas.toDataURL(r);this.editor.hooksEntity.hookSaveAfter.callAsync(g,()=>{Re(g,"png")})})}getBase64(){return new Promise(r=>{this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const g=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]);const _=this.canvas.toDataURL(g);this.editor.hooksEntity.hookSaveAfter.callAsync(_,()=>r(_))})})}getSVG(r){return new Promise(g=>{this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{this.canvas.setViewportTransform([1,0,0,1,0,0]);const{fontOption:_,svgOption:y}=this._getSaveSvgOption({ignoreFont:!0,width:r?.width,height:r?.height});mt.fabric.fontPaths={..._};const C=this.canvas.toSVG(y);this.editor.hooksEntity.hookSaveAfter.callAsync(C,()=>g(C))})})}preview(){return new Promise(r=>{this.editor.hooksEntity.hookSaveBefore.callAsync("",()=>{const g=this._getSaveOption();this.canvas.setViewportTransform([1,0,0,1,0,0]),this.canvas.renderAll();const _=this.canvas.toDataURL(g);this.editor.hooksEntity.hookSaveAfter.callAsync(_,()=>{r(_)})})})}staticPreview(){return new Promise(r=>{})}_getSaveSvgOption(r){const g=this.canvas.getObjects().find(a=>a.id==="workspace");let _=this.canvas.getObjects().filter(a=>a.type=="textbox").map(a=>a.fontFamily);_=Array.from(new Set(_));const y=this.editor.getPlugin("FontPlugin").cacheList,C={};if(!r?.ignoreFont)for(const a of _){const t=y.find(n=>n.name===a);C[a]=t.file}console.log("_getSaveSvgOption",C);const{left:T,top:c,width:i,height:l}=g;return{fontOption:C,svgOption:{width:r?.width??i,height:r?.height??l,viewBox:{x:T,y:c,width:i,height:l}}}}_getSaveOption(){const r=this.canvas.getObjects().find(c=>c.id==="workspace"),{left:g,top:_,width:y,height:C}=r;return{name:"New Image",format:"jpeg",quality:1,multiplier:5,width:y,height:C,left:g,top:_}}clear(){this.canvas.getObjects().forEach(r=>{r.id!=="workspace"&&this.canvas.remove(r)}),this.editor?.setWorkspaseBg("#fff"),this.canvas.discardActiveObject(),this.canvas.renderAll()}destroy(){console.log("pluginDestroy")}};ge.pluginName="ServersPlugin",ge.apis=["insert","loadJSON","getJson","dragAddItem","clipboard","clipboardBase64","saveJson","saveSvg","saveImg","getBase64","getSVG","clear","preview","staticPreview","getSelectMode","getExtensionKey"],ge.events=[te.ONE,te.MULTI,ue.CANCEL];let Ai=ge;var St={},ai={},rn;function gr(){return rn||(rn=1,ai.deprecate=(f,r)=>{let g=!0;return function(){return g&&(console.warn(`DeprecationWarning: ${r}`),g=!1),f.apply(this,arguments)}}),ai}var li,sn;function Mt(){if(sn)return li;sn=1;const r=gr().deprecate(()=>{},"Hook.context is deprecated and will be removed");function g(...T){return this.call=this._createCall("sync"),this.call(...T)}function _(...T){return this.callAsync=this._createCall("async"),this.callAsync(...T)}function y(...T){return this.promise=this._createCall("promise"),this.promise(...T)}class C{constructor(c=[],i=void 0){this._args=c,this.name=i,this.taps=[],this.interceptors=[],this._call=g,this.call=g,this._callAsync=_,this.callAsync=_,this._promise=y,this.promise=y,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(c){throw new Error("Abstract: should be overridden")}_createCall(c){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:c})}_tap(c,i,l){if(typeof i=="string")i={name:i.trim()};else if(typeof i!="object"||i===null)throw new Error("Invalid tap options");if(typeof i.name!="string"||i.name==="")throw new Error("Missing name for tap");typeof i.context<"u"&&r(),i=Object.assign({type:c,fn:l},i),i=this._runRegisterInterceptors(i),this._insert(i)}tap(c,i){this._tap("sync",c,i)}tapAsync(c,i){this._tap("async",c,i)}tapPromise(c,i){this._tap("promise",c,i)}_runRegisterInterceptors(c){for(const i of this.interceptors)if(i.register){const l=i.register(c);l!==void 0&&(c=l)}return c}withOptions(c){const i=l=>Object.assign({},c,typeof l=="string"?{name:l}:l);return{name:this.name,tap:(l,a)=>this.tap(i(l),a),tapAsync:(l,a)=>this.tapAsync(i(l),a),tapPromise:(l,a)=>this.tapPromise(i(l),a),intercept:l=>this.intercept(l),isUsed:()=>this.isUsed(),withOptions:l=>this.withOptions(i(l))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(c){if(this._resetCompilation(),this.interceptors.push(Object.assign({},c)),c.register)for(let i=0;i<this.taps.length;i++)this.taps[i]=c.register(this.taps[i])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(c){this._resetCompilation();let i;typeof c.before=="string"?i=new Set([c.before]):Array.isArray(c.before)&&(i=new Set(c.before));let l=0;typeof c.stage=="number"&&(l=c.stage);let a=this.taps.length;for(;a>0;){a--;const t=this.taps[a];this.taps[a+1]=t;const n=t.stage||0;if(i){if(i.has(t.name)){i.delete(t.name);continue}if(i.size>0)continue}if(!(n>l)){a++;break}}this.taps[a]=c}}return Object.setPrototypeOf(C.prototype,null),li=C,li}var ci,on;function Lt(){if(on)return ci;on=1;class f{constructor(g){this.config=g,this.options=void 0,this._args=void 0}create(g){this.init(g);let _;switch(this.options.type){case"sync":_=new Function(this.args(),`"use strict";
442
442
  ${this.header()}${this.contentWithInterceptors({onError:y=>`throw ${y};
443
443
  `,onResult:y=>`return ${y};
444
444
  `,resultReturns:!0,onDone:()=>"",rethrowIfPossible:!0})}`);break;case"async":_=new Function(this.args({after:"_callback"}),`"use strict";
@@ -566,4 +566,4 @@ ${s()}}
566
566
  `,resultReturns:t,onDone:n,rethrowIfPossible:e})}}const _=new g,y=()=>{throw new Error("tapAsync is not supported on a SyncBailHook")},C=()=>{throw new Error("tapPromise is not supported on a SyncBailHook")};function T(i){return _.setup(this,i),_.create(i)}function c(i=[],l=void 0){const a=new f(i,l);return a.constructor=c,a.tapAsync=y,a.tapPromise=C,a.compile=T,a}return c.prototype=null,_i=c,_i}var yi,mn;function $o(){if(mn)return yi;mn=1;const f=Mt(),r=Lt();class g extends r{content({onError:l,onDone:a,rethrowIfPossible:t}){return this.callTapsSeries({onError:(n,e)=>l(e),onDone:a,rethrowIfPossible:t})}}const _=new g,y=()=>{throw new Error("tapAsync is not supported on a SyncHook")},C=()=>{throw new Error("tapPromise is not supported on a SyncHook")};function T(i){return _.setup(this,i),_.create(i)}function c(i=[],l=void 0){const a=new f(i,l);return a.constructor=c,a.tapAsync=y,a.tapPromise=C,a.compile=T,a}return c.prototype=null,yi=c,yi}var Ci,vn;function Jo(){if(vn)return Ci;vn=1;const f=Mt(),r=Lt();class g extends r{content({onError:l,onDone:a,rethrowIfPossible:t}){return this.callTapsLooping({onError:(n,e)=>l(e),onDone:a,rethrowIfPossible:t})}}const _=new g,y=()=>{throw new Error("tapAsync is not supported on a SyncLoopHook")},C=()=>{throw new Error("tapPromise is not supported on a SyncLoopHook")};function T(i){return _.setup(this,i),_.create(i)}function c(i=[],l=void 0){const a=new f(i,l);return a.constructor=c,a.tapAsync=y,a.tapPromise=C,a.compile=T,a}return c.prototype=null,Ci=c,Ci}var bi,_n;function Qo(){if(_n)return bi;_n=1;const f=Mt(),r=Lt();class g extends r{content({onError:l,onResult:a,resultReturns:t,rethrowIfPossible:n}){return this.callTapsSeries({onError:(e,o)=>l(o),onResult:(e,o,h)=>{let s="";return s+=`if(${o} !== undefined) {
567
567
  `,s+=`${this._args[0]} = ${o};
568
568
  `,s+=`}
569
- `,s+=h(),s},onDone:()=>a(this._args[0]),doneReturns:t,rethrowIfPossible:n})}}const _=new g,y=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")},C=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")};function T(i){return _.setup(this,i),_.create(i)}function c(i=[],l=void 0){if(i.length<1)throw new Error("Waterfall hooks must have at least one argument");const a=new f(i,l);return a.constructor=c,a.tapAsync=y,a.tapPromise=C,a.compile=T,a}return c.prototype=null,bi=c,bi}var yn;function Zo(){return yn||(yn=1,St.AsyncParallelBailHook=Wo(),St.AsyncParallelHook=Xo(),St.AsyncSeriesBailHook=Yo(),St.AsyncSeriesHook=Vo(),St.AsyncSeriesLoopHook=Uo(),St.AsyncSeriesWaterfallHook=zo(),St.HookMap=Go(),St.MultiHook=qo(),St.SyncBailHook=Ko(),St.SyncHook=$o(),St.SyncLoopHook=Jo(),St.SyncWaterfallHook=Qo(),St.__esModule=!0),St}var ta=Zo();class ea extends Sr{constructor(){super(...arguments),this.canvas=null,this.contextMenu=null,this.pluginMap={},this.customEvents=[],this.customApis=[],this.hooks=["hookImportBefore","hookImportAfter","hookSaveBefore","hookSaveAfter","hookTransform","hookTransformObjectEnd"],this.hooksEntity={}}init(r,g){this.canvas=r,g?.contextMenu!==!1&&(this._initContextMenu(),this._bindContextMenu()),this._initActionHooks(),this._initServersPlugin(),this.Utils=fr}get fabricCanvas(){return this.canvas}use(r,g){if(this._checkPlugin(r)&&this.canvas){this._saveCustomAttr(r);const _=new r(this.canvas,this,g||{});_.pluginName=r.pluginName,this.pluginMap[r.pluginName]=_,this._bindingHooks(_),this._bindingHotkeys(_),this._bindingApis(_)}return this}destory(){this.canvas=null,this.contextMenu=null,this.pluginMap={},this.customEvents=[],this.customApis=[],this.hooksEntity={}}getPlugin(r){if(this.pluginMap[r])return this.pluginMap[r]}_checkPlugin(r){const{pluginName:g,events:_=[],apis:y=[]}=r;if(this.pluginMap[g])throw new Error(g+"插件重复初始化");return _.forEach(C=>{if(this.customEvents.find(T=>T===C))throw new Error(g+"插件中"+C+"重复")}),y.forEach(C=>{if(this.customApis.find(T=>T===C))throw new Error(g+"插件中"+C+"重复")}),!0}_bindingHooks(r){this.hooks.forEach(g=>{const _=r[g];_&&this.hooksEntity[g].tapPromise(r.pluginName+g,function(){const y=_.apply(r,[...arguments]);return y instanceof Promise?y:Promise.resolve(y)})})}_bindingHotkeys(r){r?.hotkeys?.forEach(g=>{It(g,{keyup:!0},_=>{r.hotkeyEvent&&r.hotkeyEvent(g,_)})})}_saveCustomAttr(r){const{events:g=[],apis:_=[]}=r;this.customApis=this.customApis.concat(_),this.customEvents=this.customEvents.concat(g)}_bindingApis(r){const{apis:g=[]}=r.constructor||{};g.forEach(_=>{this[_]=function(){return r[_].apply(r,[...arguments])}})}_bindContextMenu(){this.canvas&&this.canvas.on("mouse:down",r=>{if(r.button===3){let g=[];Object.keys(this.pluginMap).forEach(_=>{const y=this.pluginMap[_],C=y.contextMenu&&y.contextMenu();C&&(g=g.concat(C))}),this._renderMenu(r,g)}})}_renderMenu(r,g){g.length!==0&&this.contextMenu&&(this.contextMenu.hideAll(),this.contextMenu.setData(g),this.contextMenu.show(r.e.clientX,r.e.clientY))}_initActionHooks(){this.hooks.forEach(r=>{this.hooksEntity[r]=new ta.AsyncSeriesHook(["data"])})}_initContextMenu(){this.contextMenu=new Ie(this.canvas.wrapperEl,[]),this.contextMenu.install()}_initServersPlugin(){this.use(Ai)}off(r,g){return g?super.off(r,g):this}}_t.fabric.Rect=_t.fabric.util.createClass(_t.fabric.Rect,{type:"rect",initialize:function(f){f||(f={}),this.callSuper("initialize",f)},_render(f){const r=this.roundValue||0;this.rx=1/this.scaleX*r,this.ry=1/this.scaleY*r,this.callSuper("_render",f)}});_t.fabric.Rect.fromObject=function(f,r){return _t.fabric.Object._fromObject("Rect",f,r)};const ia=_t.fabric.Rect;_t.fabric.Textbox=_t.fabric.util.createClass(_t.fabric.Textbox,{type:"textbox",_renderChars:function(f,r,g,_,y,C){var T=this.getHeightOfLine(C),c=this.textAlign.indexOf("justify")!==-1,i,l,a="",t,n=0,e,o=this.path,h=!c&&this.charSpacing===0&&this.isEmptyStyles(C)&&!o,s=this.direction==="ltr",u=this.direction==="ltr"?1:-1,d,m=r.canvas.getAttribute("dir");if(r.save(),m!==this.direction&&(r.canvas.setAttribute("dir",s?"ltr":"rtl"),r.direction=s?"ltr":"rtl",r.textAlign=s?"left":"right"),y-=T*this._fontSizeFraction/this.lineHeight,h){this._renderChar(f,r,C,0,g.join(""),_,y,T),r.restore();return}for(var p=0,v=g.length-1;p<=v;p++)e=p===v||this.charSpacing||o,a+=g[p],t=this.__charBounds[C][p],n===0?(_+=u*(t.kernedWidth-t.width),n+=t.width):n+=t.kernedWidth,c&&!e&&this._reSpaceAndTab.test(g[p])&&(e=!0),e||(i=i||this.getCompleteStyleDeclaration(C,p),l=this.getCompleteStyleDeclaration(C,p+1),e=_t.fabric.util.hasStyleChanged(i,l,!1)),o?(r.save(),r.translate(t.renderLeft,t.renderTop),r.rotate(t.angle),this._renderChar(f,r,C,p,a,-n/2,0,T),r.restore()):(d=_,this._renderChar(f,r,C,p,a,d,y,T)),a="",i=l,_+=u*n,n=0;r.restore()},enlargeSpaces:function(){for(var f,r,g,_,y,C,T,c=0,i=this._textLines.length;c<i;c++)if(!(this.textAlign!=="justify"&&(c===i-1||this.isEndOfWrapping(c)))&&(_=0,y=this._textLines[c],r=this.getLineWidth(c),r<this.width&&(T=this.textLines[c].split(""))&&T.length>1)){g=T.length,f=(this.width-r)/(g-1);for(var l=0,a=y.length;l<=a;l++)C=this.__charBounds[c][l],C.left+=_,l<a-1&&(C.width+=f,C.kernedWidth+=f,_+=f)}}});_t.fabric.Textbox.fromObject=function(f,r){const{text:g}=f;return r(new _t.fabric.Textbox(g,f))};const na=_t.fabric.Rect;exports.CustomRect=ia;exports.CustomTextbox=na;exports.Utils=fr;exports.default=ea;exports.fabric=_t.fabric;
569
+ `,s+=h(),s},onDone:()=>a(this._args[0]),doneReturns:t,rethrowIfPossible:n})}}const _=new g,y=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")},C=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")};function T(i){return _.setup(this,i),_.create(i)}function c(i=[],l=void 0){if(i.length<1)throw new Error("Waterfall hooks must have at least one argument");const a=new f(i,l);return a.constructor=c,a.tapAsync=y,a.tapPromise=C,a.compile=T,a}return c.prototype=null,bi=c,bi}var yn;function Zo(){return yn||(yn=1,St.AsyncParallelBailHook=Wo(),St.AsyncParallelHook=Xo(),St.AsyncSeriesBailHook=Yo(),St.AsyncSeriesHook=Vo(),St.AsyncSeriesLoopHook=Uo(),St.AsyncSeriesWaterfallHook=zo(),St.HookMap=Go(),St.MultiHook=qo(),St.SyncBailHook=Ko(),St.SyncHook=$o(),St.SyncLoopHook=Jo(),St.SyncWaterfallHook=Qo(),St.__esModule=!0),St}var ta=Zo();class ea extends Sr{constructor(){super(...arguments),this.canvas=null,this.contextMenu=null,this.pluginMap={},this.customEvents=[],this.customApis=[],this.hooks=["hookImportBefore","hookImportAfter","hookSaveBefore","hookSaveAfter","hookTransform","hookTransformObjectEnd"],this.hooksEntity={}}init(r,g){this.canvas=r,g?.contextMenu!==!1&&(this._initContextMenu(),this._bindContextMenu()),this._initActionHooks(),this._initServersPlugin(),this.Utils=fr}get fabricCanvas(){return this.canvas}use(r,g){if(this._checkPlugin(r)&&this.canvas){this._saveCustomAttr(r);const _=new r(this.canvas,this,g||{});_.pluginName=r.pluginName,this.pluginMap[r.pluginName]=_,this._bindingHooks(_),this._bindingHotkeys(_),this._bindingApis(_)}return this}destory(){this.canvas=null,this.contextMenu=null,this.pluginMap={},this.customEvents=[],this.customApis=[],this.hooksEntity={}}getPlugin(r){if(this.pluginMap[r])return this.pluginMap[r]}_checkPlugin(r){const{pluginName:g,events:_=[],apis:y=[]}=r;if(this.pluginMap[g])throw new Error(g+"插件重复初始化");return _.forEach(C=>{if(this.customEvents.find(T=>T===C))throw new Error(g+"插件中"+C+"重复")}),y.forEach(C=>{if(this.customApis.find(T=>T===C))throw new Error(g+"插件中"+C+"重复")}),!0}_bindingHooks(r){this.hooks.forEach(g=>{const _=r[g];_&&this.hooksEntity[g].tapPromise(r.pluginName+g,function(){const y=_.apply(r,[...arguments]);return y instanceof Promise?y:Promise.resolve(y)})})}_bindingHotkeys(r){r?.hotkeys?.forEach(g=>{It(g,{keyup:!0},_=>{r.hotkeyEvent&&r.hotkeyEvent(g,_)})})}_saveCustomAttr(r){const{events:g=[],apis:_=[]}=r;this.customApis=this.customApis.concat(_),this.customEvents=this.customEvents.concat(g)}_bindingApis(r){const{apis:g=[]}=r.constructor||{};g.forEach(_=>{this[_]=function(){return r[_].apply(r,[...arguments])}})}_bindContextMenu(){this.canvas&&this.canvas.on("mouse:down",r=>{if(r.button===3){let g=[];Object.keys(this.pluginMap).forEach(_=>{const y=this.pluginMap[_],C=y.contextMenu&&y.contextMenu();C&&(g=g.concat(C))}),this._renderMenu(r,g)}})}_renderMenu(r,g){g.length!==0&&this.contextMenu&&(this.contextMenu.hideAll(),this.contextMenu.setData(g),this.contextMenu.show(r.e.clientX,r.e.clientY))}_initActionHooks(){this.hooks.forEach(r=>{this.hooksEntity[r]=new ta.AsyncSeriesHook(["data"])})}_initContextMenu(){this.contextMenu=new Ie(this.canvas.wrapperEl,[]),this.contextMenu.install()}_initServersPlugin(){this.use(Ai)}off(r,g){return g?super.off(r,g):this}}mt.fabric.Rect=mt.fabric.util.createClass(mt.fabric.Rect,{type:"rect",initialize:function(f){f||(f={}),this.callSuper("initialize",f)},_render(f){const r=this.roundValue||0;this.rx=1/this.scaleX*r,this.ry=1/this.scaleY*r,this.callSuper("_render",f)}});mt.fabric.Rect.fromObject=function(f,r){return mt.fabric.Object._fromObject("Rect",f,r)};const ia=mt.fabric.Rect;mt.fabric.Textbox=mt.fabric.util.createClass(mt.fabric.Textbox,{type:"textbox",_renderChars:function(f,r,g,_,y,C){var T=this.getHeightOfLine(C),c=this.textAlign.indexOf("justify")!==-1,i,l,a="",t,n=0,e,o=this.path,h=!c&&this.charSpacing===0&&this.isEmptyStyles(C)&&!o,s=this.direction==="ltr",u=this.direction==="ltr"?1:-1,d,m=r.canvas.getAttribute("dir");if(r.save(),m!==this.direction&&(r.canvas.setAttribute("dir",s?"ltr":"rtl"),r.direction=s?"ltr":"rtl",r.textAlign=s?"left":"right"),y-=T*this._fontSizeFraction/this.lineHeight,h){this._renderChar(f,r,C,0,g.join(""),_,y,T),r.restore();return}for(var p=0,v=g.length-1;p<=v;p++)e=p===v||this.charSpacing||o,a+=g[p],t=this.__charBounds[C][p],n===0?(_+=u*(t.kernedWidth-t.width),n+=t.width):n+=t.kernedWidth,c&&!e&&this._reSpaceAndTab.test(g[p])&&(e=!0),e||(i=i||this.getCompleteStyleDeclaration(C,p),l=this.getCompleteStyleDeclaration(C,p+1),e=mt.fabric.util.hasStyleChanged(i,l,!1)),o?(r.save(),r.translate(t.renderLeft,t.renderTop),r.rotate(t.angle),this._renderChar(f,r,C,p,a,-n/2,0,T),r.restore()):(d=_,this._renderChar(f,r,C,p,a,d,y,T)),a="",i=l,_+=u*n,n=0;r.restore()},enlargeSpaces:function(){for(var f,r,g,_,y,C,T,c=0,i=this._textLines.length;c<i;c++)if(!(this.textAlign!=="justify"&&(c===i-1||this.isEndOfWrapping(c)))&&(_=0,y=this._textLines[c],r=this.getLineWidth(c),r<this.width&&(T=this.textLines[c].split(""))&&T.length>1)){g=T.length,f=(this.width-r)/(g-1);for(var l=0,a=y.length;l<=a;l++)C=this.__charBounds[c][l],C.left+=_,l<a-1&&(C.width+=f,C.kernedWidth+=f,_+=f)}}});mt.fabric.Textbox.fromObject=function(f,r){const{text:g}=f;return r(new mt.fabric.Textbox(g,f))};const na=mt.fabric.Rect;exports.CustomRect=ia;exports.CustomTextbox=na;exports.Utils=fr;exports.default=ea;exports.fabric=mt.fabric;