@ue-too/board-vue-adapter 0.12.1 → 0.12.2

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.
package/index.d.ts CHANGED
@@ -5,3 +5,4 @@
5
5
  export {};
6
6
  export { default as Board } from './board.vue';
7
7
  export * from './useBoard';
8
+ export { default as Test } from './Test.vue';
package/index.js CHANGED
@@ -1,6 +1,90 @@
1
- var U7="./board-t9wjc05n.vue";function dQ(Q){let J=Object.create(null);for(let X of Q.split(","))J[X]=1;return(X)=>(X in J)}var f=Object.freeze({}),$7=Object.freeze([]),UQ=()=>{},D8=()=>!1;var C=Object.assign,H6=(Q,J)=>{let X=Q.indexOf(J);if(X>-1)Q.splice(X,1)},K7=Object.prototype.hasOwnProperty,V=(Q,J)=>K7.call(Q,J),T=Array.isArray,$Q=(Q)=>pQ(Q)==="[object Map]",j8=(Q)=>pQ(Q)==="[object Set]";var I=(Q)=>typeof Q==="function",LQ=(Q)=>typeof Q==="string",KQ=(Q)=>typeof Q==="symbol",k=(Q)=>Q!==null&&typeof Q==="object",Z8=(Q)=>{return(k(Q)||I(Q))&&I(Q.then)&&I(Q.catch)},_7=Object.prototype.toString,pQ=(Q)=>_7.call(Q),lQ=(Q)=>{return pQ(Q).slice(8,-1)},F8=(Q)=>pQ(Q)==="[object Object]",cQ=(Q)=>LQ(Q)&&Q!=="NaN"&&Q[0]!=="-"&&""+parseInt(Q,10)===Q;var sQ=(Q)=>{let J=Object.create(null);return(X)=>{return J[X]||(J[X]=Q(X))}},W7=/-\w/g,B7=sQ((Q)=>{return Q.replace(W7,(J)=>J.slice(1).toUpperCase())}),E7=/\B([A-Z])/g,D7=sQ((Q)=>Q.replace(E7,"-$1").toLowerCase()),iQ=sQ((Q)=>{return Q.charAt(0).toUpperCase()+Q.slice(1)}),H8=sQ((Q)=>{return Q?`on${iQ(Q)}`:""}),c=(Q,J)=>!Object.is(Q,J);var M6=(Q,J,X,Y=!1)=>{Object.defineProperty(Q,J,{configurable:!0,enumerable:!1,writable:Y,value:X})};var E8,TQ=()=>{return E8||(E8=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{})};var j7="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var Z7=dQ(j7+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function s(Q,...J){console.warn(`[Vue warn] ${Q}`,...J)}var nQ;function A8(){return nQ}var O;var O6=new WeakSet;class eQ{constructor(Q){if(this.fn=Q,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,nQ&&nQ.active)nQ.effects.push(this)}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,O6.has(this))O6.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))z8(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,M8(this),I8(this);let Q=O,J=u;O=this,u=!0;try{return this.fn()}finally{if(O!==this)s("Active effect was not restored correctly - this is likely a Vue internal bug.");L8(this),O=Q,u=J,this.flags&=-3}}stop(){if(this.flags&1){for(let Q=this.deps;Q;Q=Q.nextDep)P6(Q);this.deps=this.depsTail=void 0,M8(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)O6.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(V6(this))this.run()}get dirty(){return V6(this)}}var V8=0,PQ,wQ;function z8(Q,J=!1){if(Q.flags|=8,J){Q.next=wQ,wQ=Q;return}Q.next=PQ,PQ=Q}function T6(){V8++}function R6(){if(--V8>0)return;if(wQ){let J=wQ;wQ=void 0;while(J){let X=J.next;J.next=void 0,J.flags&=-9,J=X}}let Q;while(PQ){let J=PQ;PQ=void 0;while(J){let X=J.next;if(J.next=void 0,J.flags&=-9,J.flags&1)try{J.trigger()}catch(Y){if(!Q)Q=Y}J=X}}if(Q)throw Q}function I8(Q){for(let J=Q.deps;J;J=J.nextDep)J.version=-1,J.prevActiveLink=J.dep.activeLink,J.dep.activeLink=J}function L8(Q){let J,X=Q.depsTail,Y=X;while(Y){let G=Y.prevDep;if(Y.version===-1){if(Y===X)X=G;P6(Y),F7(Y)}else J=Y;Y.dep.activeLink=Y.prevActiveLink,Y.prevActiveLink=void 0,Y=G}Q.deps=J,Q.depsTail=X}function V6(Q){for(let J=Q.deps;J;J=J.nextDep)if(J.dep.version!==J.version||J.dep.computed&&(T8(J.dep.computed)||J.dep.version!==J.version))return!0;if(Q._dirty)return!0;return!1}function T8(Q){if(Q.flags&4&&!(Q.flags&16))return;if(Q.flags&=-17,Q.globalVersion===SQ)return;if(Q.globalVersion=SQ,!Q.isSSR&&Q.flags&128&&(!Q.deps&&!Q._dirty||!V6(Q)))return;Q.flags|=2;let J=Q.dep,X=O,Y=u;O=Q,u=!0;try{I8(Q);let G=Q.fn(Q._value);if(J.version===0||c(G,Q._value))Q.flags|=128,Q._value=G,J.version++}catch(G){throw J.version++,G}finally{O=X,u=Y,L8(Q),Q.flags&=-3}}function P6(Q,J=!1){let{dep:X,prevSub:Y,nextSub:G}=Q;if(Y)Y.nextSub=G,Q.prevSub=void 0;if(G)G.prevSub=Y,Q.nextSub=void 0;if(X.subsHead===Q)X.subsHead=G;if(X.subs===Q){if(X.subs=Y,!Y&&X.computed){X.computed.flags&=-5;for(let q=X.computed.deps;q;q=q.nextDep)P6(q,!0)}}if(!J&&!--X.sc&&X.map)X.map.delete(X.key)}function F7(Q){let{prevDep:J,nextDep:X}=Q;if(J)J.nextDep=X,Q.prevDep=void 0;if(X)X.prevDep=J,Q.nextDep=void 0}var u=!0,R8=[];function BQ(){R8.push(u),u=!1}function EQ(){let Q=R8.pop();u=Q===void 0?!0:Q}function M8(Q){let{cleanup:J}=Q;if(Q.cleanup=void 0,J){let X=O;O=void 0;try{J()}finally{O=X}}}var SQ=0;class P8{constructor(Q,J){this.sub=Q,this.dep=J,this.version=J.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Q6{constructor(Q){this.computed=Q,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,this.subsHead=void 0}track(Q){if(!O||!u||O===this.computed)return;let J=this.activeLink;if(J===void 0||J.sub!==O){if(J=this.activeLink=new P8(O,this),!O.deps)O.deps=O.depsTail=J;else J.prevDep=O.depsTail,O.depsTail.nextDep=J,O.depsTail=J;w8(J)}else if(J.version===-1){if(J.version=this.version,J.nextDep){let X=J.nextDep;if(X.prevDep=J.prevDep,J.prevDep)J.prevDep.nextDep=X;if(J.prevDep=O.depsTail,J.nextDep=void 0,O.depsTail.nextDep=J,O.depsTail=J,O.deps===J)O.deps=X}}if(O.onTrack)O.onTrack(C({effect:O},Q));return J}trigger(Q){this.version++,SQ++,this.notify(Q)}notify(Q){T6();try{for(let J=this.subsHead;J;J=J.nextSub)if(J.sub.onTrigger&&!(J.sub.flags&8))J.sub.onTrigger(C({effect:J.sub},Q));for(let J=this.subs;J;J=J.prevSub)if(J.sub.notify())J.sub.dep.notify()}finally{R6()}}}function w8(Q){if(Q.dep.sc++,Q.sub.flags&4){let J=Q.dep.computed;if(J&&!Q.dep.subs){J.flags|=20;for(let Y=J.deps;Y;Y=Y.nextDep)w8(Y)}let X=Q.dep.subs;if(X!==Q){if(Q.prevSub=X,X)X.nextSub=Q}if(Q.dep.subsHead===void 0)Q.dep.subsHead=Q;Q.dep.subs=Q}}var z6=new WeakMap,WQ=Symbol("Object iterate"),I6=Symbol("Map keys iterate"),bQ=Symbol("Array iterate");function R(Q,J,X){if(u&&O){let Y=z6.get(Q);if(!Y)z6.set(Q,Y=new Map);let G=Y.get(X);if(!G)Y.set(X,G=new Q6),G.map=Y,G.key=X;G.track({target:Q,type:J,key:X})}}function a(Q,J,X,Y,G,q){let U=z6.get(Q);if(!U){SQ++;return}let $=(_)=>{if(_)_.trigger({target:Q,type:J,key:X,newValue:Y,oldValue:G,oldTarget:q})};if(T6(),J==="clear")U.forEach($);else{let _=T(Q),D=_&&cQ(X);if(_&&X==="length"){let j=Number(Y);U.forEach((K,W)=>{if(W==="length"||W===bQ||!KQ(W)&&W>=j)$(K)})}else{if(X!==void 0||U.has(void 0))$(U.get(X));if(D)$(U.get(bQ));switch(J){case"add":if(!_){if($(U.get(WQ)),$Q(Q))$(U.get(I6))}else if(D)$(U.get("length"));break;case"delete":if(!_){if($(U.get(WQ)),$Q(Q))$(U.get(I6))}break;case"set":if($Q(Q))$(U.get(WQ));break}}}R6()}function HQ(Q){let J=H(Q);if(J===Q)return J;return R(J,"iterate",bQ),P(Q)?J:J.map(i)}function J6(Q){return R(Q=H(Q),"iterate",bQ),Q}function XQ(Q,J){if(g(Q))return n(Q)?MQ(i(J)):MQ(J);return i(J)}var H7={__proto__:null,[Symbol.iterator](){return N6(this,Symbol.iterator,(Q)=>XQ(this,Q))},concat(...Q){return HQ(this).concat(...Q.map((J)=>T(J)?HQ(J):J))},entries(){return N6(this,"entries",(Q)=>{return Q[1]=XQ(this,Q[1]),Q})},every(Q,J){return r(this,"every",Q,J,void 0,arguments)},filter(Q,J){return r(this,"filter",Q,J,(X)=>X.map((Y)=>XQ(this,Y)),arguments)},find(Q,J){return r(this,"find",Q,J,(X)=>XQ(this,X),arguments)},findIndex(Q,J){return r(this,"findIndex",Q,J,void 0,arguments)},findLast(Q,J){return r(this,"findLast",Q,J,(X)=>XQ(this,X),arguments)},findLastIndex(Q,J){return r(this,"findLastIndex",Q,J,void 0,arguments)},forEach(Q,J){return r(this,"forEach",Q,J,void 0,arguments)},includes(...Q){return A6(this,"includes",Q)},indexOf(...Q){return A6(this,"indexOf",Q)},join(Q){return HQ(this).join(Q)},lastIndexOf(...Q){return A6(this,"lastIndexOf",Q)},map(Q,J){return r(this,"map",Q,J,void 0,arguments)},pop(){return RQ(this,"pop")},push(...Q){return RQ(this,"push",Q)},reduce(Q,...J){return O8(this,"reduce",Q,J)},reduceRight(Q,...J){return O8(this,"reduceRight",Q,J)},shift(){return RQ(this,"shift")},some(Q,J){return r(this,"some",Q,J,void 0,arguments)},splice(...Q){return RQ(this,"splice",Q)},toReversed(){return HQ(this).toReversed()},toSorted(Q){return HQ(this).toSorted(Q)},toSpliced(...Q){return HQ(this).toSpliced(...Q)},unshift(...Q){return RQ(this,"unshift",Q)},values(){return N6(this,"values",(Q)=>XQ(this,Q))}};function N6(Q,J,X){let Y=J6(Q),G=Y[J]();if(Y!==Q&&!P(Q))G._next=G.next,G.next=()=>{let q=G._next();if(!q.done)q.value=X(q.value);return q};return G}var M7=Array.prototype;function r(Q,J,X,Y,G,q){let U=J6(Q),$=U!==Q&&!P(Q),_=U[J];if(_!==M7[J]){let K=_.apply(Q,q);return $?i(K):K}let D=X;if(U!==Q){if($)D=function(K,W){return X.call(this,XQ(Q,K),W,Q)};else if(X.length>2)D=function(K,W){return X.call(this,K,W,Q)}}let j=_.call(U,D,Y);return $&&G?G(j):j}function O8(Q,J,X,Y){let G=J6(Q),q=X;if(G!==Q){if(!P(Q))q=function(U,$,_){return X.call(this,U,XQ(Q,$),_,Q)};else if(X.length>3)q=function(U,$,_){return X.call(this,U,$,_,Q)}}return G[J](q,...Y)}function A6(Q,J,X){let Y=H(Q);R(Y,"iterate",bQ);let G=Y[J](...X);if((G===-1||G===!1)&&C6(X[0]))return X[0]=H(X[0]),Y[J](...X);return G}function RQ(Q,J,X=[]){BQ(),T6();let Y=H(Q)[J].apply(Q,X);return R6(),EQ(),Y}var O7=dQ("__proto__,__v_isRef,__isVue"),S8=new Set(Object.getOwnPropertyNames(Symbol).filter((Q)=>Q!=="arguments"&&Q!=="caller").map((Q)=>Symbol[Q]).filter(KQ));function N7(Q){if(!KQ(Q))Q=String(Q);let J=H(this);return R(J,"has",Q),J.hasOwnProperty(Q)}class w6{constructor(Q=!1,J=!1){this._isReadonly=Q,this._isShallow=J}get(Q,J,X){if(J==="__v_skip")return Q.__v_skip;let Y=this._isReadonly,G=this._isShallow;if(J==="__v_isReactive")return!Y;else if(J==="__v_isReadonly")return Y;else if(J==="__v_isShallow")return G;else if(J==="__v_raw"){if(X===(Y?G?k8:C8:G?w7:f8).get(Q)||Object.getPrototypeOf(Q)===Object.getPrototypeOf(X))return Q;return}let q=T(Q);if(!Y){let $;if(q&&($=H7[J]))return $;if(J==="hasOwnProperty")return N7}let U=Reflect.get(Q,J,w(Q)?Q:X);if(KQ(J)?S8.has(J):O7(J))return U;if(!Y)R(Q,"get",J);if(G)return U;if(w(U)){let $=q&&cQ(J)?U:U.value;return Y&&k($)?fQ($):$}if(k(U))return Y?fQ(U):X6(U);return U}}class b8 extends w6{constructor(Q=!1){super(!1,Q)}set(Q,J,X,Y){let G=Q[J],q=T(Q)&&cQ(J);if(!this._isShallow){let _=g(G);if(!P(X)&&!g(X))G=H(G),X=H(X);if(!q&&w(G)&&!w(X))if(_)return s(`Set operation on key "${String(J)}" failed: target is readonly.`,Q[J]),!0;else return G.value=X,!0}let U=q?Number(J)<Q.length:V(Q,J),$=Reflect.set(Q,J,X,w(Q)?Q:Y);if(Q===H(Y)){if(!U)a(Q,"add",J,X);else if(c(X,G))a(Q,"set",J,X,G)}return $}deleteProperty(Q,J){let X=V(Q,J),Y=Q[J],G=Reflect.deleteProperty(Q,J);if(G&&X)a(Q,"delete",J,void 0,Y);return G}has(Q,J){let X=Reflect.has(Q,J);if(!KQ(J)||!S8.has(J))R(Q,"has",J);return X}ownKeys(Q){return R(Q,"iterate",T(Q)?"length":WQ),Reflect.ownKeys(Q)}}class S6 extends w6{constructor(Q=!1){super(!0,Q)}set(Q,J){return s(`Set operation on key "${String(J)}" failed: target is readonly.`,Q),!0}deleteProperty(Q,J){return s(`Delete operation on key "${String(J)}" failed: target is readonly.`,Q),!0}}var A7=new b8,V7=new S6;var z7=new S6(!0),L6=(Q)=>Q,rQ=(Q)=>Reflect.getPrototypeOf(Q);function I7(Q,J,X){return function(...Y){let G=this.__v_raw,q=H(G),U=$Q(q),$=Q==="entries"||Q===Symbol.iterator&&U,_=Q==="keys"&&U,D=G[Q](...Y),j=X?L6:J?MQ:i;return!J&&R(q,"iterate",_?I6:WQ),{next(){let{value:K,done:W}=D.next();return W?{value:K,done:W}:{value:$?[j(K[0]),j(K[1])]:j(K),done:W}},[Symbol.iterator](){return this}}}}function aQ(Q){return function(...J){{let X=J[0]?`on key "${J[0]}" `:"";s(`${iQ(Q)} operation ${X}failed: target is readonly.`,H(this))}return Q==="delete"?!1:Q==="clear"?void 0:this}}function L7(Q,J){let X={get(G){let q=this.__v_raw,U=H(q),$=H(G);if(!Q){if(c(G,$))R(U,"get",G);R(U,"get",$)}let{has:_}=rQ(U),D=J?L6:Q?MQ:i;if(_.call(U,G))return D(q.get(G));else if(_.call(U,$))return D(q.get($));else if(q!==U)q.get(G)},get size(){let G=this.__v_raw;return!Q&&R(H(G),"iterate",WQ),G.size},has(G){let q=this.__v_raw,U=H(q),$=H(G);if(!Q){if(c(G,$))R(U,"has",G);R(U,"has",$)}return G===$?q.has(G):q.has(G)||q.has($)},forEach(G,q){let U=this,$=U.__v_raw,_=H($),D=J?L6:Q?MQ:i;return!Q&&R(_,"iterate",WQ),$.forEach((j,K)=>{return G.call(q,D(j),D(K),U)})}};return C(X,Q?{add:aQ("add"),set:aQ("set"),delete:aQ("delete"),clear:aQ("clear")}:{add(G){if(!J&&!P(G)&&!g(G))G=H(G);let q=H(this);if(!rQ(q).has.call(q,G))q.add(G),a(q,"add",G,G);return this},set(G,q){if(!J&&!P(q)&&!g(q))q=H(q);let U=H(this),{has:$,get:_}=rQ(U),D=$.call(U,G);if(!D)G=H(G),D=$.call(U,G);else N8(U,$,G);let j=_.call(U,G);if(U.set(G,q),!D)a(U,"add",G,q);else if(c(q,j))a(U,"set",G,q,j);return this},delete(G){let q=H(this),{has:U,get:$}=rQ(q),_=U.call(q,G);if(!_)G=H(G),_=U.call(q,G);else N8(q,U,G);let D=$?$.call(q,G):void 0,j=q.delete(G);if(_)a(q,"delete",G,void 0,D);return j},clear(){let G=H(this),q=G.size!==0,U=$Q(G)?new Map(G):new Set(G),$=G.clear();if(q)a(G,"clear",void 0,void 0,U);return $}}),["keys","values","entries",Symbol.iterator].forEach((G)=>{X[G]=I7(G,Q,J)}),X}function b6(Q,J){let X=L7(Q,J);return(Y,G,q)=>{if(G==="__v_isReactive")return!Q;else if(G==="__v_isReadonly")return Q;else if(G==="__v_raw")return Y;return Reflect.get(V(X,G)&&G in Y?X:Y,G,q)}}var T7={get:b6(!1,!1)};var R7={get:b6(!0,!1)},P7={get:b6(!0,!0)};function N8(Q,J,X){let Y=H(X);if(Y!==X&&J.call(Q,Y)){let G=lQ(Q);s(`Reactive ${G} contains both the raw and reactive versions of the same object${G==="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.`)}}var f8=new WeakMap,w7=new WeakMap,C8=new WeakMap,k8=new WeakMap;function S7(Q){switch(Q){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function b7(Q){return Q.__v_skip||!Object.isExtensible(Q)?0:S7(lQ(Q))}function X6(Q){if(g(Q))return Q;return f6(Q,!1,A7,T7,f8)}function fQ(Q){return f6(Q,!0,V7,R7,C8)}function OQ(Q){return f6(Q,!0,z7,P7,k8)}function f6(Q,J,X,Y,G){if(!k(Q))return s(`value cannot be made ${J?"readonly":"reactive"}: ${String(Q)}`),Q;if(Q.__v_raw&&!(J&&Q.__v_isReactive))return Q;let q=b7(Q);if(q===0)return Q;let U=G.get(Q);if(U)return U;let $=new Proxy(Q,q===2?Y:X);return G.set(Q,$),$}function n(Q){if(g(Q))return n(Q.__v_raw);return!!(Q&&Q.__v_isReactive)}function g(Q){return!!(Q&&Q.__v_isReadonly)}function P(Q){return!!(Q&&Q.__v_isShallow)}function C6(Q){return Q?!!Q.__v_raw:!1}function H(Q){let J=Q&&Q.__v_raw;return J?H(J):Q}function k6(Q){if(!V(Q,"__v_skip")&&Object.isExtensible(Q))M6(Q,"__v_skip",!0);return Q}var i=(Q)=>k(Q)?X6(Q):Q,MQ=(Q)=>k(Q)?fQ(Q):Q;function w(Q){return Q?Q.__v_isRef===!0:!1}function Y6(Q){return f7(Q,!0)}function f7(Q,J){if(w(Q))return Q;return new x8(Q,J)}class x8{constructor(Q,J){this.dep=new Q6,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=J?Q:H(Q),this._value=J?Q:i(Q),this.__v_isShallow=J}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(Q){let J=this._rawValue,X=this.__v_isShallow||P(Q)||g(Q);if(Q=X?Q:H(Q),c(Q,J))this._rawValue=Q,this._value=X?Q:i(Q),this.dep.trigger({target:this,type:"set",key:"value",newValue:Q,oldValue:J})}}function g8(Q){return w(Q)?Q.value:Q}var C7={get:(Q,J,X)=>J==="__v_raw"?Q:g8(Reflect.get(Q,J,X)),set:(Q,J,X,Y)=>{let G=Q[J];if(w(G)&&!w(X))return G.value=X,!0;else return Reflect.set(Q,J,X,Y)}};function x6(Q){return n(Q)?Q:new Proxy(Q,C7)}class y8{constructor(Q,J,X){this.fn=Q,this.setter=J,this._value=void 0,this.dep=new Q6(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=SQ-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!J,this.isSSR=X}notify(){if(this.flags|=16,!(this.flags&8)&&O!==this)return z8(this,!0),!0}get value(){let Q=this.dep.track({target:this,type:"get",key:"value"});if(T8(this),Q)Q.version=this.dep.version;return this._value}set value(Q){if(this.setter)this.setter(Q);else s("Write operation failed: computed value is readonly")}}function h8(Q,J,X=!1){let Y,G;if(I(Q))Y=Q;else Y=Q.get,G=Q.set;let q=new y8(Y,G,X);if(J&&!X)q.onTrack=J.onTrack,q.onTrigger=J.onTrigger;return q}var oQ={},tQ=new WeakMap,_Q=void 0;function v8(Q,J=!1,X=_Q){if(X){let Y=tQ.get(X);if(!Y)tQ.set(X,Y=[]);Y.push(Q)}else if(!J)s("onWatcherCleanup() was called when there was no active watcher to associate with.")}function u8(Q,J,X=f){let{immediate:Y,deep:G,once:q,scheduler:U,augmentJob:$,call:_}=X,D=(F)=>{(X.onWarn||s)("Invalid watch source: ",F,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},j=(F)=>{if(G)return F;if(P(F)||G===!1||G===0)return o(F,1);return o(F)},K,W,E,Z,N=!1,S=!1;if(w(Q))W=()=>Q.value,N=P(Q);else if(n(Q))W=()=>j(Q),N=!0;else if(T(Q))S=!0,N=Q.some((F)=>n(F)||P(F)),W=()=>Q.map((F)=>{if(w(F))return F.value;else if(n(F))return j(F);else if(I(F))return _?_(F,2):F();else D(F)});else if(I(Q))if(J)W=_?()=>_(Q,2):Q;else W=()=>{if(E){BQ();try{E()}finally{EQ()}}let F=_Q;_Q=K;try{return _?_(Q,3,[Z]):Q(Z)}finally{_Q=F}};else W=UQ,D(Q);if(J&&G){let F=W,L=G===!0?1/0:G;W=()=>o(F(),L)}let qQ=A8(),v=()=>{if(K.stop(),qQ&&qQ.active)H6(qQ.effects,K)};if(q&&J){let F=J;J=(...L)=>{F(...L),v()}}let l=S?Array(Q.length).fill(oQ):oQ,JQ=(F)=>{if(!(K.flags&1)||!K.dirty&&!F)return;if(J){let L=K.run();if(G||N||(S?L.some((F6,mQ)=>c(F6,l[mQ])):c(L,l))){if(E)E();let F6=_Q;_Q=K;try{let mQ=[L,l===oQ?void 0:S&&l[0]===oQ?[]:l,Z];l=L,_?_(J,3,mQ):J(...mQ)}finally{_Q=F6}}}else K.run()};if($)$(JQ);if(K=new eQ(W),K.scheduler=U?()=>U(JQ,!1):JQ,Z=(F)=>v8(F,!1,K),E=K.onStop=()=>{let F=tQ.get(K);if(F){if(_)_(F,4);else for(let L of F)L();tQ.delete(K)}},K.onTrack=X.onTrack,K.onTrigger=X.onTrigger,J)if(Y)JQ(!0);else l=K.run();else if(U)U(JQ.bind(null,!0),!0);else K.run();return v.pause=K.pause.bind(K),v.resume=K.resume.bind(K),v.stop=v,v}function o(Q,J=1/0,X){if(J<=0||!k(Q)||Q.__v_skip)return Q;if(X=X||new Map,(X.get(Q)||0)>=J)return Q;if(X.set(Q,J),J--,w(Q))o(Q.value,J,X);else if(T(Q))for(let Y=0;Y<Q.length;Y++)o(Q[Y],J,X);else if(j8(Q)||$Q(Q))Q.forEach((Y)=>{o(Y,J,X)});else if(F8(Q)){for(let Y in Q)o(Q[Y],J,X);for(let Y of Object.getOwnPropertySymbols(Q))if(Object.prototype.propertyIsEnumerable.call(Q,Y))o(Q[Y],J,X)}return Q}var DQ=[];function h7(Q){DQ.push(Q)}function v7(){DQ.pop()}var g6=!1;function z(Q,...J){if(g6)return;g6=!0,BQ();let X=DQ.length?DQ[DQ.length-1].component:null,Y=X&&X.appContext.config.warnHandler,G=u7();if(Y)_6(Y,X,11,[Q+J.map((q)=>{var U,$;return($=(U=q.toString)==null?void 0:U.call(q))!=null?$:JSON.stringify(q)}).join(""),X&&X.proxy,G.map(({vnode:q})=>`at <${U9(X,q.type)}>`).join(`
2
- `),G]);else{let q=[`[Vue warn]: ${Q}`,...J];if(G.length)q.push(`
3
- `,...m7(G));console.warn(...q)}EQ(),g6=!1}function u7(){let Q=DQ[DQ.length-1];if(!Q)return[];let J=[];while(Q){let X=J[0];if(X&&X.vnode===Q)X.recurseCount++;else J.push({vnode:Q,recurseCount:0});let Y=Q.component&&Q.component.parent;Q=Y&&Y.vnode}return J}function m7(Q){let J=[];return Q.forEach((X,Y)=>{J.push(...Y===0?[]:[`
4
- `],...d7(X))}),J}function d7({vnode:Q,recurseCount:J}){let X=J>0?`... (${J} recursive calls)`:"",Y=Q.component?Q.component.parent==null:!1,G=` at <${U9(Q.component,Q.type,Y)}`,q=">"+X;return Q.props?[G,...p7(Q.props),q]:[G+q]}function p7(Q){let J=[],X=Object.keys(Q);if(X.slice(0,3).forEach((Y)=>{J.push(...s8(Y,Q[Y]))}),X.length>3)J.push(" ...");return J}function s8(Q,J,X){if(LQ(J))return J=JSON.stringify(J),X?J:[`${Q}=${J}`];else if(typeof J==="number"||typeof J==="boolean"||J==null)return X?J:[`${Q}=${J}`];else if(w(J))return J=s8(Q,H(J.value),!0),X?J:[`${Q}=Ref<`,J,">"];else if(I(J))return[`${Q}=fn${J.name?`<${J.name}>`:""}`];else return J=H(J),X?J:[`${Q}=`,J]}var l6={["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 _6(Q,J,X,Y){try{return Y?Q(...Y):Q()}catch(G){s6(G,J,X)}}function c6(Q,J,X,Y){if(I(Q)){let G=_6(Q,J,X,Y);if(G&&Z8(G))G.catch((q)=>{s6(q,J,X)});return G}if(T(Q)){let G=[];for(let q=0;q<Q.length;q++)G.push(c6(Q[q],J,X,Y));return G}else z(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof Q}`)}function s6(Q,J,X,Y=!0){let G=J?J.vnode:null,{errorHandler:q,throwUnhandledErrorInProduction:U}=J&&J.appContext.config||f;if(J){let{parent:$,proxy:_}=J,D=l6[X];while($){let j=$.ec;if(j){for(let K=0;K<j.length;K++)if(j[K](Q,_,D)===!1)return}$=$.parent}if(q){BQ(),_6(q,null,10,[Q,_,D]),EQ();return}}l7(Q,X,G,Y,U)}function l7(Q,J,X,Y=!0,G=!1){{let q=l6[J];if(X)h7(X);if(z(`Unhandled error${q?` during execution of ${q}`:""}`),X)v7();if(Y)throw Q;else console.error(Q)}}var y=[],t=-1,AQ=[],YQ=null,NQ=0,i8=Promise.resolve(),G6=null,c7=100;function s7(Q){let J=G6||i8;return Q?J.then(this?Q.bind(this):Q):J}function i7(Q){let J=t+1,X=y.length;while(J<X){let Y=J+X>>>1,G=y[Y],q=xQ(G);if(q<Q||q===Q&&G.flags&2)J=Y+1;else X=Y}return J}function i6(Q){if(!(Q.flags&1)){let J=xQ(Q),X=y[y.length-1];if(!X||!(Q.flags&2)&&J>=xQ(X))y.push(Q);else y.splice(i7(J),0,Q);Q.flags|=1,r8()}}function r8(){if(!G6)G6=i8.then(o8)}function a8(Q){if(!T(Q)){if(YQ&&Q.id===-1)YQ.splice(NQ+1,0,Q);else if(!(Q.flags&1))AQ.push(Q),Q.flags|=1}else AQ.push(...Q);r8()}function r7(Q){if(AQ.length){let J=[...new Set(AQ)].sort((X,Y)=>xQ(X)-xQ(Y));if(AQ.length=0,YQ){YQ.push(...J);return}YQ=J,Q=Q||new Map;for(NQ=0;NQ<YQ.length;NQ++){let X=YQ[NQ];if(n8(Q,X))continue;if(X.flags&4)X.flags&=-2;if(!(X.flags&8))X();X.flags&=-2}YQ=null,NQ=0}}var xQ=(Q)=>Q.id==null?Q.flags&2?-1:1/0:Q.id;function o8(Q){Q=Q||new Map;let J=(X)=>n8(Q,X);try{for(t=0;t<y.length;t++){let X=y[t];if(X&&!(X.flags&8)){if(J(X))continue;if(X.flags&4)X.flags&=-2;if(_6(X,X.i,X.i?15:14),!(X.flags&4))X.flags&=-2}}}finally{for(;t<y.length;t++){let X=y[t];if(X)X.flags&=-2}if(t=-1,y.length=0,r7(Q),G6=null,y.length||AQ.length)o8(Q)}}function n8(Q,J){let X=Q.get(J)||0;if(X>c7){let Y=J.i,G=Y&&q9(Y.type);return s6(`Maximum recursive updates exceeded${G?` in component <${G}>`:""}. 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 Q.set(J,X+1),!1}var q6=!1,y6=new Map;TQ().__VUE_HMR_RUNTIME__={createRecord:h6(a7),rerender:h6(o7),reload:h6(n7)};var U6=new Map;function a7(Q,J){if(U6.has(Q))return!1;return U6.set(Q,{initialDef:$6(J),instances:new Set}),!0}function $6(Q){return N1(Q)?Q.__vccOpts:Q}function o7(Q,J){let X=U6.get(Q);if(!X)return;X.initialDef.render=J,[...X.instances].forEach((Y)=>{if(J)Y.render=J,$6(Y.type).render=J;if(Y.renderCache=[],q6=!0,!(Y.job.flags&8))Y.update();q6=!1})}function n7(Q,J){let X=U6.get(Q);if(!X)return;J=$6(J),m8(X.initialDef,J);let Y=[...X.instances];for(let G=0;G<Y.length;G++){let q=Y[G],U=$6(q.type),$=y6.get(U);if(!$){if(U!==X.initialDef)m8(U,J);y6.set(U,$=new Set)}if($.add(q),q.appContext.propsCache.delete(q.type),q.appContext.emitsCache.delete(q.type),q.appContext.optionsCache.delete(q.type),q.ceReload)$.add(q),q.ceReload(J.styles),$.delete(q);else if(q.parent)i6(()=>{if(!(q.job.flags&8))q6=!0,q.parent.update(),q6=!1,$.delete(q)});else if(q.appContext.reload)q.appContext.reload();else if(typeof window<"u")window.location.reload();else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");if(q.root.ce&&q!==q.root)q.root.ce._removeChildStyle(U)}a8(()=>{y6.clear()})}function m8(Q,J){C(Q,J);for(let X in Q)if(X!=="__file"&&!(X in J))delete Q[X]}function h6(Q){return(J,X)=>{try{return Q(J,X)}catch(Y){console.error(Y),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}var m6=null;var TJ=Symbol("_vte");var RJ=Symbol("_leaveCb"),PJ=Symbol("_enterCb");var wJ=TQ().requestIdleCallback||((Q)=>setTimeout(Q,1)),SJ=TQ().cancelIdleCallback||((Q)=>clearTimeout(Q));function t7(Q,J,X=x,Y=!1){if(X){let G=X[Q]||(X[Q]=[]),q=J.__weh||(J.__weh=(...U)=>{BQ();let $=G9(X),_=c6(J,X,Q,U);return $(),EQ(),_});if(Y)G.unshift(q);else G.push(q);return q}else{let G=H8(l6[Q].replace(/ hook$/,""));z(`${G} 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.`)}}var e=(Q)=>(J,X=x)=>{if(!gQ||Q==="sp")t7(Q,(...Y)=>J(...Y),X)},bJ=e("bm"),t8=e("m"),fJ=e("bu"),CJ=e("u"),kJ=e("bum"),e8=e("um"),xJ=e("sp"),gJ=e("rtg"),yJ=e("rtc");var d6=(Q)=>{if(!Q)return null;if(F1(Q))return H1(Q);return d6(Q.parent)},kQ=C(Object.create(null),{$:(Q)=>Q,$el:(Q)=>Q.vnode.el,$data:(Q)=>Q.data,$props:(Q)=>OQ(Q.props),$attrs:(Q)=>OQ(Q.attrs),$slots:(Q)=>OQ(Q.slots),$refs:(Q)=>OQ(Q.refs),$parent:(Q)=>d6(Q.parent),$root:(Q)=>d6(Q.root),$host:(Q)=>Q.ce,$emit:(Q)=>Q.emit,$options:(Q)=>__VUE_OPTIONS_API__?X1(Q):Q.type,$forceUpdate:(Q)=>Q.f||(Q.f=()=>{i6(Q.update)}),$nextTick:(Q)=>Q.n||(Q.n=s7.bind(Q.proxy)),$watch:(Q)=>__VUE_OPTIONS_API__?_1.bind(Q):UQ}),e7=(Q)=>Q==="_"||Q==="$",v6=(Q,J)=>Q!==f&&!Q.__isScriptSetup&&V(Q,J),Q1={get({_:Q},J){if(J==="__v_skip")return!0;let{ctx:X,setupState:Y,data:G,props:q,accessCache:U,type:$,appContext:_}=Q;if(J==="__isVue")return!0;if(J[0]!=="$"){let W=U[J];if(W!==void 0)switch(W){case 1:return Y[J];case 2:return G[J];case 4:return X[J];case 3:return q[J]}else if(v6(Y,J))return U[J]=1,Y[J];else if(__VUE_OPTIONS_API__&&G!==f&&V(G,J))return U[J]=2,G[J];else if(V(q,J))return U[J]=3,q[J];else if(X!==f&&V(X,J))return U[J]=4,X[J];else if(!__VUE_OPTIONS_API__||J1)U[J]=0}let D=kQ[J],j,K;if(D){if(J==="$attrs")R(Q.attrs,"get",""),E1();else if(J==="$slots")R(Q,"get",J);return D(Q)}else if((j=$.__cssModules)&&(j=j[J]))return j;else if(X!==f&&V(X,J))return U[J]=4,X[J];else if(K=_.config.globalProperties,V(K,J))return K[J];else if(m6&&(!LQ(J)||J.indexOf("__v")!==0)){if(G!==f&&e7(J[0])&&V(G,J))z(`Property ${JSON.stringify(J)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);else if(Q===m6)z(`Property ${JSON.stringify(J)} was accessed during render but is not defined on instance.`)}},set({_:Q},J,X){let{data:Y,setupState:G,ctx:q}=Q;if(v6(G,J))return G[J]=X,!0;else if(G.__isScriptSetup&&V(G,J))return z(`Cannot mutate <script setup> binding "${J}" from Options API.`),!1;else if(__VUE_OPTIONS_API__&&Y!==f&&V(Y,J))return Y[J]=X,!0;else if(V(Q.props,J))return z(`Attempting to mutate prop "${J}". Props are readonly.`),!1;if(J[0]==="$"&&J.slice(1)in Q)return z(`Attempting to mutate public property "${J}". Properties starting with $ are reserved and readonly.`),!1;else if(J in Q.appContext.config.globalProperties)Object.defineProperty(q,J,{enumerable:!0,configurable:!0,value:X});else q[J]=X;return!0},has({_:{data:Q,setupState:J,accessCache:X,ctx:Y,appContext:G,props:q,type:U}},$){let _;return!!(X[$]||__VUE_OPTIONS_API__&&Q!==f&&$[0]!=="$"&&V(Q,$)||v6(J,$)||V(q,$)||V(Y,$)||V(kQ,$)||V(G.config.globalProperties,$)||(_=U.__cssModules)&&_[$])},defineProperty(Q,J,X){if(X.get!=null)Q._.accessCache[J]=0;else if(V(X,"value"))this.set(Q,J,X.value,null);return Reflect.defineProperty(Q,J,X)}};Q1.ownKeys=(Q)=>{return z("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(Q)};function d8(Q){return T(Q)?Q.reduce((J,X)=>(J[X]=null,J),{}):Q}var J1=!0;function X1(Q){let J=Q.type,{mixins:X,extends:Y}=J,{mixins:G,optionsCache:q,config:{optionMergeStrategies:U}}=Q.appContext,$=q.get(J),_;if($)_=$;else if(!G.length&&!X&&!Y)_=J;else{if(_={},G.length)G.forEach((D)=>K6(_,D,U,!0));K6(_,J,U)}if(k(J))q.set(J,_);return _}function K6(Q,J,X,Y=!1){let{mixins:G,extends:q}=J;if(q)K6(Q,q,X,!0);if(G)G.forEach((U)=>K6(Q,U,X,!0));for(let U in J)if(Y&&U==="expose")z('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{let $=Y1[U]||X&&X[U];Q[U]=$?$(Q[U],J[U]):J[U]}return Q}var Y1={data:p8,props:c8,emits:c8,methods:CQ,computed:CQ,beforeCreate:b,created:b,beforeMount:b,mounted:b,beforeUpdate:b,updated:b,beforeDestroy:b,beforeUnmount:b,destroyed:b,unmounted:b,activated:b,deactivated:b,errorCaptured:b,serverPrefetch:b,components:CQ,directives:CQ,watch:q1,provide:p8,inject:G1};function p8(Q,J){if(!J)return Q;if(!Q)return J;return function(){return C(I(Q)?Q.call(this,this):Q,I(J)?J.call(this,this):J)}}function G1(Q,J){return CQ(l8(Q),l8(J))}function l8(Q){if(T(Q)){let J={};for(let X=0;X<Q.length;X++)J[Q[X]]=Q[X];return J}return Q}function b(Q,J){return Q?[...new Set([].concat(Q,J))]:J}function CQ(Q,J){return Q?C(Object.create(null),Q,J):J}function c8(Q,J){if(Q){if(T(Q)&&T(J))return[...new Set([...Q,...J])];return C(Object.create(null),d8(Q),d8(J!=null?J:{}))}else return J}function q1(Q,J){if(!Q)return J;if(!J)return Q;let X=C(Object.create(null),Q);for(let Y in J)X[Y]=b(Q[Y],J[Y]);return X}function U1(){return{app:null,config:{isNativeTag:D8,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var u6=null;function Q9(Q,J){if(!x||x.isMounted)z("provide() can only be used inside setup().");if(x){let X=x.provides,Y=x.parent&&x.parent.provides;if(Y===X)X=x.provides=Object.create(Y);X[Q]=J}}function r6(Q,J,X=!1){let Y=Y9();if(Y||u6){let G=u6?u6._context.provides:Y?Y.parent==null||Y.ce?Y.vnode.appContext&&Y.vnode.appContext.provides:Y.parent.provides:void 0;if(G&&Q in G)return G[Q];else if(arguments.length>1)return X&&I(J)?J.call(Y&&Y.proxy):J;else z(`injection "${String(Q)}" not found.`)}else z("inject() can only be used inside setup() or functional components.")}var $1=Symbol.for("v-scx"),K1=()=>{{let Q=r6($1);if(!Q)z("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.");return Q}};function J9(Q,J,X){if(!I(J))z("`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.");return X9(Q,J,X)}function X9(Q,J,X=f){let{immediate:Y,deep:G,flush:q,once:U}=X;if(!J){if(Y!==void 0)z('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.');if(G!==void 0)z('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.');if(U!==void 0)z('watch() "once" option is only respected when using the watch(source, callback, options?) signature.')}let $=C({},X);$.onWarn=z;let _=J&&Y||!J&&q!=="post",D;if(gQ){if(q==="sync"){let E=K1();D=E.__watcherHandles||(E.__watcherHandles=[])}else if(!_){let E=()=>{};return E.stop=UQ,E.resume=UQ,E.pause=UQ,E}}let j=x;$.call=(E,Z,N)=>c6(E,j,Z,N);let K=!1;if(q==="post")$.scheduler=(E)=>{D1(E,j&&j.suspense)};else if(q!=="sync")K=!0,$.scheduler=(E,Z)=>{if(Z)E();else i6(E)};$.augmentJob=(E)=>{if(J)E.flags|=4;if(K){if(E.flags|=2,j)E.id=j.uid,E.i=j}};let W=u8(Q,J,$);if(gQ){if(D)D.push(W);else if(_)W()}return W}function _1(Q,J,X){let Y=this.proxy,G=LQ(Q)?Q.includes(".")?W1(Y,Q):()=>Y[Q]:Q.bind(Y,Y),q;if(I(J))q=J;else q=J.handler,X=J;let U=G9(this),$=X9(G,q.bind(Y),X);return U(),$}function W1(Q,J){let X=J.split(".");return()=>{let Y=Q;for(let G=0;G<X.length&&Y;G++)Y=Y[X[G]];return Y}}var B1=!1;function E1(){B1=!0}var D1=j1;function j1(Q,J){if(J&&J.pendingBranch)if(T(Q))J.effects.push(...Q);else J.effects.push(Q);else a8(Q)}var hJ=U1();var x=null,Y9=()=>x||m6,p6,Z1;{let Q=TQ(),J=(X,Y)=>{let G;if(!(G=Q[X]))G=Q[X]=[];return G.push(Y),(q)=>{if(G.length>1)G.forEach((U)=>U(q));else G[0](q)}};p6=J("__VUE_INSTANCE_SETTERS__",(X)=>x=X),Z1=J("__VUE_SSR_SETTERS__",(X)=>gQ=X)}var G9=(Q)=>{let J=x;return p6(Q),Q.scope.on(),()=>{Q.scope.off(),p6(J)}};function F1(Q){return Q.vnode.shapeFlag&4}var gQ=!1;function H1(Q){if(Q.exposed)return Q.exposeProxy||(Q.exposeProxy=new Proxy(x6(k6(Q.exposed)),{get(J,X){if(X in J)return J[X];else if(X in kQ)return kQ[X](Q)},has(J,X){return X in J||X in kQ}}));else return Q.proxy}var M1=/(?:^|[-_])\w/g,O1=(Q)=>Q.replace(M1,(J)=>J.toUpperCase()).replace(/[-_]/g,"");function q9(Q,J=!0){return I(Q)?Q.displayName||Q.name:Q.name||J&&Q.__name}function U9(Q,J,X=!1){let Y=q9(J);if(!Y&&J.__file){let G=J.__file.match(/([^/\\]+)\.\w+$/);if(G)Y=G[1]}if(!Y&&Q){let G=(q)=>{for(let U in q)if(q[U]===J)return U};Y=G(Q.components)||Q.parent&&G(Q.parent.type.components)||G(Q.appContext.components)}return Y?O1(Y):X?"App":"Anonymous"}function N1(Q){return I(Q)&&"__vccOpts"in Q}var $9=(Q,J)=>{let X=h8(Q,J,gQ);{let Y=Y9();if(Y&&Y.appContext.config.warnRecursiveComputed)X._warnRecursive=!0}return X};function K9(){if(typeof window>"u")return;let Q={style:"color:#3ba776"},J={style:"color:#1677ff"},X={style:"color:#f5222d"},Y={style:"color:#eb2f96"},G={__vue_custom_formatter:!0,header(K){if(!k(K))return null;if(K.__isVue)return["div",Q,"VueInstance"];else if(w(K)){BQ();let W=K.value;return EQ(),["div",{},["span",Q,j(K)],"<",$(W),">"]}else if(n(K))return["div",{},["span",Q,P(K)?"ShallowReactive":"Reactive"],"<",$(K),`>${g(K)?" (readonly)":""}`];else if(g(K))return["div",{},["span",Q,P(K)?"ShallowReadonly":"Readonly"],"<",$(K),">"];return null},hasBody(K){return K&&K.__isVue},body(K){if(K&&K.__isVue)return["div",{},...q(K.$)]}};function q(K){let W=[];if(K.type.props&&K.props)W.push(U("props",H(K.props)));if(K.setupState!==f)W.push(U("setup",K.setupState));if(K.data!==f)W.push(U("data",H(K.data)));let E=_(K,"computed");if(E)W.push(U("computed",E));let Z=_(K,"inject");if(Z)W.push(U("injected",Z));return W.push(["div",{},["span",{style:Y.style+";opacity:0.66"},"$ (internal): "],["object",{object:K}]]),W}function U(K,W){if(W=C({},W),!Object.keys(W).length)return["span",{}];return["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},K],["div",{style:"padding-left:1.25em"},...Object.keys(W).map((E)=>{return["div",{},["span",Y,E+": "],$(W[E],!1)]})]]}function $(K,W=!0){if(typeof K==="number")return["span",J,K];else if(typeof K==="string")return["span",X,JSON.stringify(K)];else if(typeof K==="boolean")return["span",Y,K];else if(k(K))return["object",{object:W?H(K):K}];else return["span",X,String(K)]}function _(K,W){let E=K.type;if(I(E))return;let Z={};for(let N in K.ctx)if(D(E,N,W))Z[N]=K.ctx[N];return Z}function D(K,W,E){let Z=K[E];if(T(Z)&&Z.includes(W)||k(Z)&&W in Z)return!0;if(K.extends&&D(K.extends,W,E))return!0;if(K.mixins&&K.mixins.some((N)=>D(N,W,E)))return!0}function j(K){if(P(K))return"ShallowRef";if(K.effect)return"ComputedRef";return"Ref"}if(window.devtoolsFormatters)window.devtoolsFormatters.push(G);else window.devtoolsFormatters=[G]}function A1(){K9()}A1();class B{static addVector(Q,J){if(Q.z==null&&J.z==null)return{x:Q.x+J.x,y:Q.y+J.y};if(Q.z==null||J.z==null){if(Q.z==null)Q.z=0;if(J.z==null)J.z=0}return{x:Q.x+J.x,y:Q.y+J.y,z:Q.z+J.z}}static subVector(Q,J){if(Q.z==null&&J.z==null)return{x:Q.x-J.x,y:Q.y-J.y};if(Q.z==null||J.z==null){if(Q.z==null)Q.z=0;if(J.z==null)J.z=0}return{x:Q.x-J.x,y:Q.y-J.y,z:Q.z-J.z}}static multiplyVectorByScalar(Q,J){if(Q.z==null)return{x:Q.x*J,y:Q.y*J};return{x:Q.x*J,y:Q.y*J,z:Q.z*J}}static divideVectorByScalar(Q,J){if(J==0)return{x:Q.x,y:Q.y};if(Q.z==null)return{x:Q.x/J,y:Q.y/J};return{x:Q.x/J,y:Q.y/J,z:Q.z/J}}static magnitude(Q){if(Q.z==null)Q.z=0;return Math.sqrt(Q.x*Q.x+Q.y*Q.y+Q.z*Q.z)}static unitVector(Q){if(Q.z==null)Q.z=0;return this.magnitude(Q)!=0?{x:Q.x/this.magnitude(Q),y:Q.y/this.magnitude(Q),z:Q.z/this.magnitude(Q)}:{x:0,y:0,z:0}}static dotProduct(Q,J){if(Q.z==null&&J.z==null)return Q.x*J.x+Q.y*J.y;if(Q.z==null||J.z==null){if(Q.z==null)Q.z=0;if(J.z==null)J.z=0}return Q.x*J.x+Q.y*J.y+Q.z*J.z}static crossProduct(Q,J){if(Q.z==null||J.z==null){if(Q.z==null)Q.z=0;if(J.z==null)J.z=0}return{x:Q.y*J.z-Q.z*J.y,y:Q.z*J.x-Q.x*J.z,z:Q.x*J.y-Q.y*J.x}}static unitVectorFromA2B(Q,J){return this.unitVector(this.subVector(J,Q))}static rotatePoint(Q,J){return{x:Q.x*Math.cos(J)-Q.y*Math.sin(J),y:Q.x*Math.sin(J)+Q.y*Math.cos(J)}}static transform2NewAxis(Q,J){return{x:Q.x*Math.cos(J)+Q.y*Math.sin(J),y:-Q.x*Math.sin(J)+Q.y*Math.cos(J)}}static angleFromA2B(Q,J){return Math.atan2(Q.x*J.y-Q.y*J.x,Q.x*J.x+Q.y*J.y)}static transformPointWRTAnchor(Q,J,X){let Y=this.rotatePoint(this.subVector(Q,J),X);return this.addVector(Y,J)}static distanceBetweenPoints(Q,J){return this.magnitude(this.subVector(Q,J))}static flipYAxis(Q){return{x:Q.x,y:-Q.y,z:Q.z}}static linearInterpolation(Q,J,X){if(Q.z==null||J.z==null)return{x:Q.x+(J.x-Q.x)*X,y:Q.y+(J.y-Q.y)*X};else return{x:Q.x+(J.x-Q.x)*X,y:Q.y+(J.y-Q.y)*X,z:Q.z+(J.z-Q.z)*X}}static isEqual(Q,J){if(Q.z==null)Q.z=0;if(J.z==null)J.z=0;return Q.x==J.x&&Q.y==J.y&&Q.z==J.z}static getLineIntersection(Q,J,X,Y){let G=(Y.x-X.x)*(Q.y-X.y)-(Y.y-X.y)*(Q.x-X.x),q=(Y.y-X.y)*(J.x-Q.x)-(Y.x-X.x)*(J.y-Q.y);if(q===0)return{intersects:!1};let U=G/q;if(U>=0&&U<=1)return{intersects:!0,intersection:B.linearInterpolation(Q,J,U),offset:U};else return{intersects:!1}}}class m{observers=[];subscribe(Q,J){if(this.observers.push(Q),J?.signal){if(J.signal.aborted)return this.observers=this.observers.filter((Y)=>Y!==Q),()=>{};let X=()=>{this.observers=this.observers.filter((Y)=>Y!==Q),J.signal?.removeEventListener("abort",X)};J.signal.addEventListener("abort",X)}return()=>{this.observers=this.observers.filter((X)=>X!==Q)}}notify(...Q){this.observers.forEach((J)=>queueMicrotask(()=>J(...Q)))}}class yQ{observers=[];subscribe(Q,J){if(this.observers.push(Q),J?.signal){if(J.signal.aborted)return this.observers=this.observers.filter((Y)=>Y!==Q),()=>{};let X=()=>{this.observers=this.observers.filter((Y)=>Y!==Q),J.signal?.removeEventListener("abort",X)};J.signal.addEventListener("abort",X)}return()=>{this.observers=this.observers.filter((X)=>X!==Q)}}notify(...Q){this.observers.forEach((J)=>J(...Q))}}class a6{pan;zoom;rotate;all;constructor(){this.pan=new m,this.zoom=new m,this.rotate=new m,this.all=new m}notifyPan(Q,J){this.pan.notify(Q,J),this.all.notify({type:"pan",diff:Q.diff},J)}notifyZoom(Q,J){this.zoom.notify(Q,J),this.all.notify({type:"zoom",deltaZoomAmount:Q.deltaZoomAmount},J)}notifyRotate(Q,J){this.rotate.notify(Q,J),this.all.notify({type:"rotate",deltaRotation:Q.deltaRotation},J)}on(Q,J,X){switch(Q){case"pan":return this.pan.subscribe(J,X);case"zoom":return this.zoom.subscribe(J,X);case"rotate":return this.rotate.subscribe(J,X);case"all":return this.all.subscribe(J,X);default:throw Error(`Invalid event name: ${Q}`)}}}function _9(Q,J,X,Y){let{a:G,b:q,c:U,d:$,e:_,f:D}=Q,j=-Math.atan2(q,G),W=Math.sqrt(G*G+q*q)/J,E=[_,D];E=[E[0]/J,E[1]/J],E=[E[0]-X/2,E[1]-Y/2];let Z=Math.cos(j),N=Math.sin(j);E=[Z*E[0]-N*E[1],N*E[0]+Z*E[1]],E=[E[0]/W,E[1]/W];let S=-E[0],qQ=-E[1];return{position:{x:S,y:qQ},zoom:W,rotation:j}}function W9(Q){let{a:J,b:X,c:Y,d:G,e:q,f:U}=Q,$={x:q,y:U},_=J*G-X*Y;if(Math.abs(_)<0.0000000001)throw Error("Matrix is singular and cannot be decomposed");let D=Math.atan2(X,J),j=Math.cos(D),K=Math.sin(D),W=J*j+X*K,E=Y*-K+G*j,Z=D,N=W,S=E;if(W<0)N=-W,Z+=Math.PI;if(E<0)S=-E,Z+=Math.PI;while(Z>Math.PI)Z-=2*Math.PI;while(Z<-Math.PI)Z+=2*Math.PI;return{translation:$,rotation:Z,scale:{x:N,y:S}}}function W6(Q,J={x:0,y:0},X=!1){let Y=B.subVector(Q,J);if(X)Y.y=-Y.y;return Y}function o6(Q,J,X,Y,G=!1){let q=B.multiplyVectorByScalar(Q,1/X),U=B.rotatePoint(q,Y);if(G)U.y=-U.y;return B.addVector(U,J)}function B9(Q,J,X,Y,G=!1){let q=B.subVector(Q,J);if(G)q.y=-q.y;let U=B.multiplyVectorByScalar(q,X);return B.rotatePoint(U,-Y)}function hQ(Q,J,X,Y,G,q){let U=W6(J,{x:X/2,y:Y/2},!1);return o6(U,Q,G,q,!1)}function GQ(Q,J,X,Y){return o6(Q,J,X,Y,!1)}function B6(Q,J,X,Y){return B9(Q,J,X,Y,!1)}function n6(Q,J,X){return B.multiplyVectorByScalar(B.rotatePoint(Q,X),1/J)}function t6(Q,J){if(J==null)return!0;let X=!1,Y=!1,G=!1,q=!1;if(J.max==null||J.max.x==null||Q.x<=J.max.x)Y=!0;if(J.min==null||J.min.x==null||Q.x>=J.min.x)X=!0;if(J.max==null||J.max.y==null||Q.y<=J.max.y)G=!0;if(J.min==null||J.min.y==null||Q.y>=J.min.y)q=!0;return X&&Y&&G&&q}function jQ(Q,J){if(t6(Q,J)||J==null)return Q;let X={x:Q.x,y:Q.y},Y=J.min;if(Y!=null){if(Y.x!=null)X.x=Math.max(X.x,Y.x);if(Y.y!=null)X.y=Math.max(X.y,Y.y)}if(Y=J.max,Y!=null){if(Y.x!=null)X.x=Math.min(X.x,Y.x);if(Y.y!=null)X.y=Math.min(X.y,Y.y)}return X}function vQ(Q){if(Q==null||Q.min==null||Q.max==null||Q.min.x==null||Q.max.x==null)return;return Q.max.x-Q.min.x}function E9(Q){let J=vQ(Q);return J!=null?J/2:void 0}function E6(Q){if(Q==null||Q.min==null||Q.max==null||Q.min.y==null||Q.max.y==null)return;return Q.max.y-Q.min.y}function D9(Q){let J=E6(Q);return J!=null?J/2:void 0}function e6(Q,J,X,Y,G,q){if(Y==null)return Q;let U=hQ(Q,{x:0,y:X},J,X,G,q),$=hQ(Q,{x:0,y:0},J,X,G,q),_=hQ(Q,{x:J,y:X},J,X,G,q),D=hQ(Q,{x:J,y:0},J,X,G,q),j=jQ(U,Y),K=jQ(_,Y),W=jQ($,Y),E=jQ(D,Y),Z=B.subVector(j,U),N=B.subVector(K,_),S=B.subVector(W,$),qQ=B.subVector(E,D),v=[Z,N,S,qQ],l=Math.abs(v[0].x),JQ=Math.abs(v[0].y),F=v[0];return v.forEach((L)=>{if(Math.abs(L.x)>l)l=Math.abs(L.x),F.x=L.x;if(Math.abs(L.y)>JQ)JQ=Math.abs(L.y),F.y=L.y}),B.addVector(Q,F)}function VQ(Q,J){if(Q8(Q,J)||J===void 0)return Q;if(J.max)Q=Math.min(J.max,Q);if(J.min)Q=Math.max(J.min,Q);return Q}function Q8(Q,J){if(J===void 0)return!0;if(Q<=0||J!==void 0&&(J.max!==void 0&&J.max<Q||J.min!==void 0&&J.min>Q))return!1;return!0}function IQ(Q,J){if(J8(Q,J)||J===void 0)return Q;Q=h(Q);let X=zQ(J.start,Q),Y=zQ(J.end,Q);if(J.ccw&&(X<0||Y>0)||!J.ccw&&(X>0||Y<0)){if(Math.abs(X)===Math.abs(Y))return J.startAsTieBreaker?J.start:J.end;return Math.abs(X)<Math.abs(Y)?J.start:J.end}return Q}function J8(Q,J){if(J===void 0)return!0;if(h(J.start)===h(J.end))return!0;if(h(J.start+0.01)===h(J.end+0.01))return!0;let X=h(Q),Y=zQ(J.start,X),G=zQ(J.end,X);if(J.ccw&&(Y<0||G>0)||!J.ccw&&(Y>0||G<0))return!1;return!0}function h(Q){return Q=Q%(Math.PI*2),Q=(Q+Math.PI*2)%(Math.PI*2),Q}function zQ(Q,J){Q=h(Q),J=h(J);let X=J-Q;if(X>Math.PI)X=-(Math.PI*2-X);if(X<-Math.PI)X+=Math.PI*2;return X}class D6{_position;_rotation;_zoomLevel;currentCachedTransform;currentCachedTRS;_viewPortWidth;_viewPortHeight;_boundaries;_zoomBoundaries;_rotationBoundaries;constructor(Q=1000,J=1000,X={x:0,y:0},Y=0,G=1,q={min:{x:-1e4,y:-1e4},max:{x:1e4,y:1e4}},U={min:0.1,max:10},$=void 0){this._position=X,this._zoomLevel=G,this._rotation=Y,this._viewPortHeight=J,this._viewPortWidth=Q,this._zoomBoundaries=U,this._rotationBoundaries=$,this._boundaries=q}get boundaries(){return this._boundaries}set boundaries(Q){this._boundaries=Q}get viewPortWidth(){return this._viewPortWidth}set viewPortWidth(Q){this._viewPortWidth=Q}get viewPortHeight(){return this._viewPortHeight}set viewPortHeight(Q){this._viewPortHeight=Q}get position(){return{...this._position}}setPosition(Q){if(!t6(Q,this._boundaries))return!1;let J=B.subVector(Q,this._position);if(B.magnitude(J)<0.000000001&&B.magnitude(J)<1/this._zoomLevel)return!1;return this._position=Q,!0}get zoomLevel(){return this._zoomLevel}get zoomBoundaries(){return this._zoomBoundaries}set zoomBoundaries(Q){let J={...Q};if(J!==void 0&&J.min!==void 0&&J.max!==void 0&&J.min>J.max){let X=J.max;J.max=J.min,J.min=X}this._zoomBoundaries=J}setMaxZoomLevel(Q){if(this._zoomBoundaries==null)this._zoomBoundaries={min:void 0,max:void 0};if(this._zoomBoundaries.min!=null&&this._zoomBoundaries.min>Q||this._zoomLevel>Q)return!1;return this._zoomBoundaries.max=Q,console.trace("setMaxZoomLevel",Q),!0}setMinZoomLevel(Q){if(this._zoomBoundaries==null)this._zoomBoundaries={min:void 0,max:void 0};if(this._zoomBoundaries.max!=null&&this._zoomBoundaries.max<Q)return!1;if(this._zoomBoundaries.min=Q,this._zoomLevel<Q)this._zoomLevel=Q;return console.trace("setMinZoomLevel",Q),!0}setZoomLevel(Q){if(!Q8(Q,this._zoomBoundaries))return!1;if(this._zoomBoundaries!==void 0&&this._zoomBoundaries.max!==void 0&&VQ(Q,this._zoomBoundaries)==this._zoomBoundaries.max&&this._zoomLevel==this._zoomBoundaries.max)return!1;if(this._zoomBoundaries!==void 0&&this._zoomBoundaries.min!==void 0&&VQ(Q,this._zoomBoundaries)==this._zoomBoundaries.min&&this._zoomLevel==this._zoomBoundaries.min)return!1;return this._zoomLevel=Q,!0}get rotation(){return this._rotation}get rotationBoundaries(){return this._rotationBoundaries}set rotationBoundaries(Q){if(Q!==void 0&&Q.start!==void 0&&Q.end!==void 0&&Q.start>Q.end){let J=Q.end;Q.end=Q.start,Q.start=J}this._rotationBoundaries=Q}getTransform(Q=1,J=!0){if(this.currentCachedTransform!==void 0&&this.currentCachedTransform.devicePixelRatio===Q&&this.currentCachedTransform.alignCoorindate===J&&this.currentCachedTransform.position.x===this._position.x&&this.currentCachedTransform.position.y===this._position.y&&this.currentCachedTransform.rotation===this._rotation&&this.currentCachedTransform.zoomLevel===this._zoomLevel&&this.currentCachedTransform.viewPortWidth===this._viewPortWidth&&this.currentCachedTransform.viewPortHeight===this._viewPortHeight)return{...this.currentCachedTransform.transform,cached:!0};let X=Q*this._viewPortWidth/2,Y=Q*this._viewPortHeight/2,G=-this._position.x,q=J?-this._position.y:this._position.y,U=Q,$=this._zoomLevel,_=J?-this._rotation:this._rotation,D=Math.sin(_),j=Math.cos(_),K=$*U*j,W=$*U*D,E=-U*$*D,Z=$*U*j,N=U*$*j*G-U*$*D*q+X,S=U*$*D*G+U*$*j*q+Y;return this.currentCachedTransform={transform:{a:K,b:W,c:E,d:Z,e:N,f:S},position:this._position,rotation:this._rotation,zoomLevel:this._zoomLevel,alignCoorindate:J,devicePixelRatio:Q,viewPortWidth:this._viewPortWidth,viewPortHeight:this._viewPortHeight},{a:K,b:W,c:E,d:Z,e:N,f:S,cached:!1}}getTRS(Q=1,J=!0){let X=this.getTransform(Q,J);if(this.currentCachedTRS!==void 0&&this.currentCachedTRS.transformMatrix.a===X.a&&this.currentCachedTRS.transformMatrix.b===X.b&&this.currentCachedTRS.transformMatrix.c===X.c&&this.currentCachedTRS.transformMatrix.d===X.d&&this.currentCachedTRS.transformMatrix.e===X.e&&this.currentCachedTRS.transformMatrix.f===X.f)return{scale:this.currentCachedTRS.scale,rotation:this.currentCachedTRS.rotation,translation:this.currentCachedTRS.translation,cached:!0};let Y=W9(X);return this.currentCachedTRS={scale:Y.scale,rotation:Y.rotation,translation:Y.translation,transformMatrix:X},{scale:Y.scale,rotation:Y.rotation,translation:Y.translation,cached:!1}}setUsingTransformationMatrix(Q,J=1){let X=_9(Q,J,this._viewPortWidth,this._viewPortHeight);this.setPosition(X.position),this.setRotation(X.rotation),this.setZoomLevel(X.zoom)}setRotation(Q){if(!J8(Q,this._rotationBoundaries))return!1;if(Q=h(Q),this._rotationBoundaries!==void 0&&this._rotationBoundaries.end!==void 0&&IQ(Q,this._rotationBoundaries)==this._rotationBoundaries.end&&this._rotation==this._rotationBoundaries.end)return!1;if(this._rotationBoundaries!==void 0&&this._rotationBoundaries.start!==void 0&&IQ(Q,this._rotationBoundaries)==this._rotationBoundaries.start&&this._rotation==this._rotationBoundaries.start)return!1;return this._rotation=Q,!0}getCameraOriginInWindow(Q){return Q}convertFromViewPort2WorldSpace(Q){return GQ(Q,this._position,this._zoomLevel,this._rotation)}convertFromWorld2ViewPort(Q){return B6(Q,this._position,this._zoomLevel,this._rotation)}invertFromWorldSpace2ViewPort(Q){let J={x:this.viewPortWidth/2,y:this._viewPortHeight/2},X=B.subVector(Q,this._position);return X=B.rotatePoint(X,-this._rotation),X=B.multiplyVectorByScalar(X,this._zoomLevel),B.addVector(J,X)}setHorizontalBoundaries(Q,J){if(Q>J){let X=J;J=Q,Q=X}if(this._boundaries==null)this._boundaries={min:{x:void 0,y:void 0},max:{x:void 0,y:void 0}};if(this._boundaries.min==null)this._boundaries.min={x:void 0,y:void 0};if(this._boundaries.max==null)this._boundaries.max={x:void 0,y:void 0};this._boundaries.min.x=Q,this._boundaries.max.x=J}setVerticalBoundaries(Q,J){if(Q>J){let X=J;J=Q,Q=X}if(this._boundaries==null)this._boundaries={min:{x:void 0,y:void 0},max:{x:void 0,y:void 0}};if(this._boundaries.min==null)this._boundaries.min={x:void 0,y:void 0};if(this._boundaries.max==null)this._boundaries.max={x:void 0,y:void 0};this._boundaries.min.y=Q,this._boundaries.max.y=J}viewPortInWorldSpace(Q=!0){let J=GQ({x:-this._viewPortWidth/2,y:Q?-this._viewPortHeight/2:this._viewPortHeight/2},this._position,this._zoomLevel,this._rotation),X=GQ({x:this._viewPortWidth/2,y:Q?-this._viewPortHeight/2:this._viewPortHeight/2},this._position,this._zoomLevel,this._rotation),Y=GQ({x:-this._viewPortWidth/2,y:Q?this._viewPortHeight/2:-this._viewPortHeight/2},this._position,this._zoomLevel,this._rotation),G=GQ({x:this._viewPortWidth/2,y:Q?this._viewPortHeight/2:-this._viewPortHeight/2},this._position,this._zoomLevel,this._rotation);return{top:{left:J,right:X},bottom:{left:Y,right:G}}}viewPortAABB(Q){let{top:{left:J,right:X},bottom:{left:Y,right:G}}=this.viewPortInWorldSpace(Q);return{min:{x:Math.min(J.x,Y.x,X.x,G.x),y:Math.min(J.y,Y.y,X.y,G.y)},max:{x:Math.max(J.x,Y.x,X.x,G.x),y:Math.max(J.y,Y.y,X.y,G.y)}}}}var V1=1000,z1=1000,I1={min:0.1,max:10},L1={min:{x:-1e4,y:-1e4},max:{x:1e4,y:1e4}},T1=void 0;class ZQ{_baseCamera;_observer;constructor(Q=V1,J=z1,X={x:0,y:0},Y=0,G=1,q=L1,U=I1,$=T1){this._baseCamera=new D6(Q,J,X,Y,G,q,U,$),this._observer=new a6}get boundaries(){return this._baseCamera.boundaries}set boundaries(Q){this._baseCamera.boundaries=Q}get viewPortWidth(){return this._baseCamera.viewPortWidth}set viewPortWidth(Q){this._baseCamera.viewPortWidth=Q}get viewPortHeight(){return this._baseCamera.viewPortHeight}set viewPortHeight(Q){this._baseCamera.viewPortHeight=Q}get position(){return this._baseCamera.position}setPosition(Q){let J={...this._baseCamera.position};if(!this._baseCamera.setPosition(Q))return!1;return this._observer.notifyPan({diff:B.subVector(Q,J)},{position:this._baseCamera.position,rotation:this._baseCamera.rotation,zoomLevel:this._baseCamera.zoomLevel}),!0}get zoomLevel(){return this._baseCamera.zoomLevel}get zoomBoundaries(){return this._baseCamera.zoomBoundaries}set zoomBoundaries(Q){this._baseCamera.zoomBoundaries=Q}setMaxZoomLevel(Q){let J=this._baseCamera.zoomLevel;if(!this._baseCamera.setMaxZoomLevel(Q))return!1;return this._observer.notifyZoom({deltaZoomAmount:Q-J},{position:this._baseCamera.position,rotation:this._baseCamera.rotation,zoomLevel:this._baseCamera.zoomLevel}),!0}setMinZoomLevel(Q){if(!this._baseCamera.setMinZoomLevel(Q))return!1;return!0}setZoomLevel(Q){let J=this._baseCamera.zoomLevel;if(!this._baseCamera.setZoomLevel(Q))return!1;return this._observer.notifyZoom({deltaZoomAmount:this._baseCamera.zoomLevel-J},{position:this._baseCamera.position,rotation:this._baseCamera.rotation,zoomLevel:this._baseCamera.zoomLevel}),!0}get rotation(){return this._baseCamera.rotation}get rotationBoundaries(){return this._baseCamera.rotationBoundaries}set rotationBoundaries(Q){this._baseCamera.rotationBoundaries=Q}getTransform(Q=1,J=!0){return this._baseCamera.getTransform(Q,J)}setRotation(Q){let J=this._baseCamera.rotation;if(!this._baseCamera.setRotation(Q))return!1;return this._observer.notifyRotate({deltaRotation:Q-J},{position:this._baseCamera.position,rotation:this._baseCamera.rotation,zoomLevel:this._baseCamera.zoomLevel}),!0}getCameraOriginInWindow(Q){return Q}convertFromViewPort2WorldSpace(Q){return GQ(Q,this._baseCamera.position,this._baseCamera.zoomLevel,this._baseCamera.rotation)}convertFromWorld2ViewPort(Q){return B6(Q,this._baseCamera.position,this._baseCamera.zoomLevel,this._baseCamera.rotation)}invertFromWorldSpace2ViewPort(Q){let J={x:this._baseCamera.viewPortWidth/2,y:this._baseCamera.viewPortHeight/2},X=B.subVector(Q,this._baseCamera.position);return X=B.rotatePoint(X,-this._baseCamera.rotation),X=B.multiplyVectorByScalar(X,this._baseCamera.zoomLevel),B.addVector(J,X)}setHorizontalBoundaries(Q,J){if(Q>J){let X=J;J=Q,Q=X}if(this._baseCamera.boundaries==null)this._baseCamera.boundaries={min:void 0,max:void 0};if(this._baseCamera.boundaries.min==null)this._baseCamera.boundaries.min={x:void 0,y:void 0};if(this._baseCamera.boundaries.max==null)this._baseCamera.boundaries.max={x:void 0,y:void 0};this._baseCamera.boundaries.min.x=Q,this._baseCamera.boundaries.max.x=J}setVerticalBoundaries(Q,J){if(Q>J){let X=J;J=Q,Q=X}if(this._baseCamera.boundaries==null)this._baseCamera.boundaries={min:void 0,max:void 0};if(this._baseCamera.boundaries.min==null)this._baseCamera.boundaries.min={x:void 0,y:void 0};if(this._baseCamera.boundaries.max==null)this._baseCamera.boundaries.max={x:void 0,y:void 0};this._baseCamera.boundaries.min.y=Q,this._baseCamera.boundaries.max.y=J}on(Q,J,X){return this._observer.on(Q,J,X)}getTRS(Q=1,J=!0){return this._baseCamera.getTRS(Q,J)}setUsingTransformationMatrix(Q,J=1){this._baseCamera.setUsingTransformationMatrix(Q,J)}viewPortInWorldSpace(Q=!0){return this._baseCamera.viewPortInWorldSpace(Q)}viewPortAABB(Q=!0){return this._baseCamera.viewPortAABB(Q)}}class X8{_disabled=!1;_stateMachine;_orchestrator;_keyfirstPressed;_abortController;_canvas;constructor(Q,J,X){this._canvas=X,this.bindFunctions(),this._abortController=new AbortController,this._stateMachine=Q,this._orchestrator=J,this._keyfirstPressed=new Map}get disabled(){return this._disabled}set disabled(Q){this._disabled=Q}get stateMachine(){return this._stateMachine}get orchestrator(){return this._orchestrator}addEventListeners(Q){if(this._canvas==null)return;this._canvas.addEventListener("pointerdown",this.pointerDownHandler,{signal:Q}),this._canvas.addEventListener("pointerup",this.pointerUpHandler,{signal:Q}),this._canvas.addEventListener("pointermove",this.pointerMoveHandler,{signal:Q}),this._canvas.addEventListener("wheel",this.scrollHandler,{signal:Q}),window.addEventListener("keydown",this.keypressHandler,{signal:Q}),window.addEventListener("keyup",this.keyupHandler,{signal:Q})}setUp(){if(this._abortController.signal.aborted)this._abortController=new AbortController;this.addEventListeners(this._abortController.signal)}tearDown(){this._abortController.abort(),this._abortController=new AbortController,this._canvas=void 0}bindFunctions(){this.pointerDownHandler=this.pointerDownHandler.bind(this),this.pointerUpHandler=this.pointerUpHandler.bind(this),this.pointerMoveHandler=this.pointerMoveHandler.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.keypressHandler=this.keypressHandler.bind(this),this.keyupHandler=this.keyupHandler.bind(this)}processEvent(...Q){let J=this._stateMachine.happens(...Q);if(J.handled&&"output"in J)this._orchestrator.processInputEventOutput(J.output)}pointerDownHandler(Q){if(this._disabled)return;if(Q.button===0&&Q.pointerType==="mouse"){this.processEvent("leftPointerDown",{x:Q.clientX,y:Q.clientY});return}if(Q.button===1&&Q.pointerType==="mouse"){this.processEvent("middlePointerDown",{x:Q.clientX,y:Q.clientY});return}}pointerUpHandler(Q){if(this._disabled)return;if(Q.button===0&&Q.pointerType==="mouse"){this.processEvent("leftPointerUp",{x:Q.clientX,y:Q.clientY});return}if(Q.button===1&&Q.pointerType==="mouse"){this.processEvent("middlePointerUp",{x:Q.clientX,y:Q.clientY});return}}pointerMoveHandler(Q){if(this._disabled)return;if(Q.buttons===1&&Q.pointerType==="mouse"){this.processEvent("leftPointerMove",{x:Q.clientX,y:Q.clientY});return}if(Q.buttons===4&&Q.pointerType==="mouse"){this.processEvent("middlePointerMove",{x:Q.clientX,y:Q.clientY});return}this.processEvent("pointerMove",{x:Q.clientX,y:Q.clientY})}scrollHandler(Q){if(this._disabled)return;if(Q.preventDefault(),Q.ctrlKey)this.processEvent("scrollWithCtrl",{x:Q.clientX,y:Q.clientY,deltaX:Q.deltaX,deltaY:Q.deltaY});else this.processEvent("scroll",{x:Q.clientX,y:Q.clientY,deltaX:Q.deltaX,deltaY:Q.deltaY})}keypressHandler(Q){if(Q.target!==document.body)return;if(this._keyfirstPressed.has(Q.key))return;if(this._keyfirstPressed.set(Q.key,!0),Q.key===" ")this.processEvent("spacebarDown")}keyupHandler(Q){if(this._keyfirstPressed.has(Q.key))this._keyfirstPressed.delete(Q.key);if(Q.key===" ")this.processEvent("spacebarUp")}attach(Q){this.tearDown(),this._canvas=Q,this.setUp()}}class Y8{_canvas;_disabled;_panDisabled=!1;_zoomDisabled=!1;_rotateDisabled=!1;_stateMachine;_orchestrator;_abortController;constructor(Q,J,X){this._canvas=X,this._disabled=!1,this._stateMachine=Q,this._orchestrator=J,this._abortController=new AbortController,this.bindListeners()}get stateMachine(){return this._stateMachine}get orchestrator(){return this._orchestrator}get touchStateMachine(){return this._stateMachine}bindListeners(){this.touchstartHandler=this.touchstartHandler.bind(this),this.touchendHandler=this.touchendHandler.bind(this),this.touchcancelHandler=this.touchcancelHandler.bind(this),this.touchmoveHandler=this.touchmoveHandler.bind(this)}enableStrategy(){this._disabled=!1}disableStrategy(){this._disabled=!0}setUp(){if(this._canvas==null)return;if(this._abortController.signal.aborted)this._abortController=new AbortController;this._canvas.addEventListener("touchstart",this.touchstartHandler,{signal:this._abortController.signal}),this._canvas.addEventListener("touchend",this.touchendHandler,{signal:this._abortController.signal}),this._canvas.addEventListener("touchcancel",this.touchcancelHandler,{signal:this._abortController.signal}),this._canvas.addEventListener("touchmove",this.touchmoveHandler,{signal:this._abortController.signal})}tearDown(){this._abortController.abort(),this._abortController=new AbortController,this._canvas=void 0}get disabled(){return this._disabled}get panDisabled(){return this._panDisabled}set panDisabled(Q){this._panDisabled=Q}get zoomDisabled(){return this._zoomDisabled}set zoomDisabled(Q){this._zoomDisabled=Q}get rotateDisabled(){return this._rotateDisabled}set rotateDisabled(Q){this._rotateDisabled=Q}processEvent(...Q){let J=this._stateMachine.happens(...Q);if(J.handled&&"output"in J)this._orchestrator.processInputEventOutput(J.output)}touchstartHandler(Q){if(this._disabled)return;let J=[];for(let X=0;X<Q.changedTouches.length;X++)J.push({ident:Q.changedTouches[X].identifier,x:Q.changedTouches[X].clientX,y:Q.changedTouches[X].clientY});this.processEvent("touchstart",{points:J}),Q.preventDefault()}touchcancelHandler(Q){if(this._disabled)return;let J=[];for(let X=0;X<Q.changedTouches.length;X++)J.push({ident:Q.changedTouches[X].identifier,x:Q.changedTouches[X].clientX,y:Q.changedTouches[X].clientY});this.processEvent("touchend",{points:J})}touchendHandler(Q){if(this._disabled)return;let J=[];for(let X=0;X<Q.changedTouches.length;X++)J.push({ident:Q.changedTouches[X].identifier,x:Q.changedTouches[X].clientX,y:Q.changedTouches[X].clientY});this.processEvent("touchend",{points:J})}touchmoveHandler(Q){if(this._disabled)return;Q.preventDefault();let J=[];for(let X=0;X<Q.targetTouches.length;X++)J.push({ident:Q.targetTouches[X].identifier,x:Q.targetTouches[X].clientX,y:Q.targetTouches[X].clientY});this.processEvent("touchmove",{points:J})}attach(Q){this.tearDown(),this._canvas=Q,this.setUp()}}function j9(Q,J){return B.subVector(Q,J.position)}function Z9(Q,J,X={x:J.width/2,y:J.height/2},Y=!1){let G=j9(Q,J);return W6(G,X,Y)}function QQ(...Q){let J=Array.isArray(Q[0])?Q[0]:Q;return(X,...Y)=>{return J.reduce((G,q)=>q(G,...Y),X)}}class G8{lastRect;resizeObserver;intersectionObserver;mutationObserver;scrollHandler;resizeHandler;_observers;constructor(Q){if(this._observers=new yQ,this.resizeObserver=new ResizeObserver(((J)=>{for(let X of J){let Y=X.target.getBoundingClientRect(),G=d(Y,window.getComputedStyle(X.target));if(FQ(this.lastRect,G))this.publishPositionUpdate(G),this.lastRect=G}}).bind(this)),this.intersectionObserver=new IntersectionObserver(((J)=>{if(this.lastRect===void 0)return;for(let X of J)if(X.isIntersecting){let Y=X.boundingClientRect,G=d(Y,window.getComputedStyle(X.target));if(FQ(this.lastRect,G))this.publishPositionUpdate(G),this.lastRect=G}}).bind(this)),this.attributeCallBack=this.attributeCallBack.bind(this),this.mutationObserver=new MutationObserver(this.attributeCallBack),Q)this.attach(Q)}dispose(){if(this.resizeObserver.disconnect(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),this.scrollHandler)window.removeEventListener("scroll",this.scrollHandler);if(this.resizeHandler)window.removeEventListener("resize",this.resizeHandler)}attach(Q){this.dispose(),this.resizeObserver.observe(Q),this.intersectionObserver.observe(Q),this.mutationObserver.observe(Q,{attributes:!0,attributeFilter:["width","height","style"]});let J=Q.getBoundingClientRect(),X=d(J,window.getComputedStyle(Q));this.lastRect=X,this.scrollHandler=(()=>{if(this.lastRect===void 0)return;let Y=Q.getBoundingClientRect(),G=d(Y,window.getComputedStyle(Q));if(FQ(this.lastRect,G))this.publishPositionUpdate(G),this.lastRect=G}).bind(this),this.resizeHandler=(()=>{if(this.lastRect===void 0)return;let Y=Q.getBoundingClientRect(),G=d(Y,window.getComputedStyle(Q));if(FQ(this.lastRect,G))this.publishPositionUpdate(G),this.lastRect=G}).bind(this),window.addEventListener("scroll",this.scrollHandler,{passive:!0}),window.addEventListener("resize",this.resizeHandler,{passive:!0})}publishPositionUpdate(Q){this._observers.notify(Q)}onPositionUpdate(Q,J){return this._observers.subscribe(Q,J)}attributeCallBack(Q,J){for(let X of Q)if(X.type==="attributes"){if(X.attributeName==="width"){let Y=X.target,G=Y.getBoundingClientRect(),q=d(G,window.getComputedStyle(Y));if(FQ(this.lastRect,q))this.publishPositionUpdate(q),this.lastRect=q}else if(X.attributeName==="height"){let Y=X.target,G=Y.getBoundingClientRect(),q=d(G,window.getComputedStyle(Y));if(FQ(this.lastRect,q))this.publishPositionUpdate(q),this.lastRect=q}else if(X.attributeName==="style"){let Y=X.target,G=Y.getBoundingClientRect(),q=d(G,window.getComputedStyle(Y));if(FQ(this.lastRect,q))this.publishPositionUpdate(q),this.lastRect=q}}}}function d(Q,J){let X=parseFloat(J.paddingLeft),Y=parseFloat(J.paddingTop),G=parseFloat(J.paddingRight),q=parseFloat(J.paddingBottom),U=parseFloat(J.borderLeftWidth),$=parseFloat(J.borderTopWidth),_=parseFloat(J.borderRightWidth),D=parseFloat(J.borderBottomWidth),j=Q.left+X+U,K=Q.top+Y+$,W=Q.width-X-G-U-_,E=Q.height-Y-q-$-D;return new DOMRect(j,K,W,E)}function FQ(Q,J){if(Q===void 0)return!0;return Q.top!==J.top||Q.left!==J.left||Q.width!==J.width||Q.height!==J.height}var F9={fillRect:[1,3],strokeRect:[1,3],fillText:[2],strokeText:[1],lineTo:[1],moveTo:[1],quadraticCurveTo:[1,3],bezierCurveTo:[1,3,5],arc:[1],drawImage:[2],rect:[1,3],roundRect:[1,3]};function H9(Q){return new Proxy(Q,{get(J,X,Y){let G=Reflect.get(J,X,J);if(typeof X==="string"&&X in F9&&typeof G==="function")return function(...q){let U=[...q];if(X==="drawImage"&&q.length===9){let $=R1(q);return G.apply(J,$)}else{let $=F9[X];for(let _ of $)if(_<U.length)U[_]=-U[_];if(X==="drawImage"&&q.length===5)U[2]-=U[4]}return G.apply(J,U)};if(typeof G==="function")return function(...q){return G.apply(J,q)};return G},set(J,X,Y){return Reflect.set(J,X,Y)}})}function R1(Q){if(Q.length!==9)return Q;let J=[...Q],X=Q[0].height;if(X!==void 0)J[2]=X-J[2],J[6]=-J[6],J[6]-=J[8],J[4]=-J[4];return J}var M9=30,W4=M9*0.3,B4=M9*0.5;function O9(Q,J,X,Y){let G=vQ(Q),q=E6(Q);if(G==null||q==null)return;let U=Math.abs(G*Math.cos(Y)),$=Math.abs(q*Math.cos(Y)),_=Math.abs(G*Math.sin(Y)),D=Math.abs(q*Math.sin(Y)),j=J/U,K=J/$,W=X/_,E=X/D;if(j==1/0)j=0;if(K==1/0)K=0;if(W==1/0)W=0;if(E==1/0)E=0;let Z=X/q,N=J/G;return Math.max(Z,N,j,K,W,E)}function j6(Q,J){if(J==null)return!1;if(Q==null)return!0;if(J==1/0)return!1;if(Q!==void 0&&(Q.min==null||J>Q.min))return!0;return!1}function q8(Q,J,X,Y){let G=vQ(Q);if(G==null)return;let q=Math.abs(G*Math.cos(Y)),U=Math.abs(G*Math.sin(Y)),$=J/q,_=X/U;if($==1/0)return _;return Math.max(J/q,X/U)}class U8{pan;zoom;rotate;all;constructor(){this.pan=new m,this.zoom=new m,this.rotate=new m,this.all=new m}notifyPan(Q){this.pan.notify({diff:Q}),this.all.notify({type:"pan",diff:Q})}notifyZoom(Q,J){this.zoom.notify({deltaZoomAmount:Q,anchorPoint:J}),this.all.notify({type:"zoom",deltaZoomAmount:Q,anchorPoint:J})}notifyRotate(Q){this.rotate.notify({deltaRotation:Q}),this.all.notify({type:"rotate",deltaRotation:Q})}on(Q,J){switch(Q){case"pan":return this.pan.subscribe(J);case"zoom":return this.zoom.subscribe(J);case"rotate":return this.rotate.subscribe(J);case"all":return this.all.subscribe(J);default:throw Error("Invalid raw user input event name")}}}var M=()=>{};class p{_currentState;_states;_context;_statesArray;_stateChangeCallbacks;_happensCallbacks;_timeouts=void 0;_initialState;constructor(Q,J,X,Y=!0){if(this._states=Q,this._currentState="INITIAL",this._initialState=J,this._context=X,this._statesArray=Object.keys(Q),this._stateChangeCallbacks=[],this._happensCallbacks=[],Y)this.start()}reset(){this.wrapup(),this.switchTo("INITIAL"),this.start()}start(){if(this.currentState!=="INITIAL")return;this._context.setup(),this.switchTo(this._initialState),this._states[this._initialState].uponEnter(this._context,this,this._initialState)}wrapup(){if(this._currentState==="TERMINAL")return;let Q=this._currentState;if(Q!=="INITIAL")this._states[Q].beforeExit(this._context,this,"TERMINAL");this._context.cleanup(),this.switchTo("TERMINAL")}switchTo(Q){this._currentState=Q}happens(...Q){if(this._timeouts)clearTimeout(this._timeouts);if(this._currentState==="INITIAL"||this._currentState==="TERMINAL")return{handled:!1};this._happensCallbacks.forEach((X)=>X(Q,this._context));let J=this._states[this._currentState].handles(Q,this._context,this);if(J.handled&&J.nextState!==void 0&&J.nextState!==this._currentState){let X=this._currentState;this._states[this._currentState].beforeExit(this._context,this,J.nextState),this.switchTo(J.nextState),this._states[this._currentState].uponEnter(this._context,this,X);for(let Y of this._stateChangeCallbacks)Y(X,this._currentState)}return J}onStateChange(Q){this._stateChangeCallbacks.push(Q)}onHappens(Q){this._happensCallbacks.push(Q)}get currentState(){return this._currentState}setContext(Q){this._context=Q}get possibleStates(){return this._statesArray}get states(){return this._states}}class A{_guards={};_eventGuards={};_delay=void 0;get guards(){return this._guards}get eventGuards(){return this._eventGuards}get delay(){return this._delay}uponEnter(Q,J,X){}beforeExit(Q,J,X){}handles(Q,J,X){let Y=Q[0],G=Q[1];if(this.eventReactions[Y]){let q=this.eventReactions[Y].action(J,G,X),U=this.eventReactions[Y].defaultTargetState,$=this._eventGuards[Y],_={handled:!0,nextState:U},D=q!==void 0?{..._,output:q}:_;if($){let j=$.find((W)=>{if(this.guards[W.guard])return this.guards[W.guard](J);return!1});return j?{...D,nextState:j.target}:D}return D}return{handled:!1}}}class N9 extends p{constructor(Q,J,X){super(Q,J,X)}notifyPanInput(Q){return this.happens("userPanByInput",{diff:Q})}notifyPanToAnimationInput(Q){return this.happens("transitionPanToInput",{target:Q})}initateTransition(){return this.happens("initateTransition")}}class A9 extends A{constructor(){super()}eventReactions={userPanByInput:{action:this.userPanByInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},userPanToInput:{action:this.userPanToInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},lockedOnObjectPanByInput:{action:this.lockedOnObjectPanByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectPanToInput:{action:this.lockedOnObjectPanToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},initateTransition:{action:M,defaultTargetState:"TRANSITION"}};userPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}userPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}lockedOnObjectPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}lockedOnObjectPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}}class V9 extends A{constructor(){super()}eventReactions={userPanByInput:{action:this.userPanByInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},userPanToInput:{action:this.userPanToInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},transitionPanByInput:{action:this.transitionPanByInputHandler,defaultTargetState:"TRANSITION"},transitionPanToInput:{action:this.transitionPanToInputHandler,defaultTargetState:"TRANSITION"},lockedOnObjectPanByInput:{action:this.lockedOnObjectPanByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectPanToInput:{action:this.lockedOnObjectPanToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"}};userPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}userPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}transitionPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}transitionPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}lockedOnObjectPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}lockedOnObjectPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}}class z9 extends A{constructor(){super()}eventReactions={unlock:{action:M,defaultTargetState:"ACCEPTING_USER_INPUT"},lockedOnObjectPanByInput:{action:this.lockedOnObjectPanByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectPanToInput:{action:this.lockedOnObjectPanToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"}};lockedOnObjectPanByInputHandler(Q,J){return{type:"panByViewPort",delta:J.diff}}lockedOnObjectPanToInputHandler(Q,J){return{type:"panToWorld",target:J.target}}}function w1(){return{ACCEPTING_USER_INPUT:new A9,TRANSITION:new V9,LOCKED_ON_OBJECT:new z9}}function I9(Q={setup:M,cleanup:M}){return new N9(w1(),"ACCEPTING_USER_INPUT",Q)}class L9 extends A{_eventReactions={userZoomByAtInput:{action:this.userZoomByAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"},userZoomToAtInput:{action:this.userZoomToAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"},initiateTransition:{action:M,defaultTargetState:"TRANSITION"}};get eventReactions(){return this._eventReactions}userZoomByAtInput(Q,J){return{type:"zoomByAt",deltaZoom:J.deltaZoom,anchorPoint:J.anchorPoint}}userZoomToAtInput(Q,J){return{type:"zoomToAt",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}}class T9 extends A{constructor(){super()}_eventReactions={lockedOnObjectZoomByAtInput:{action:this.lockedOnObjectZoomByAtInput,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectZoomToAtInput:{action:this.lockedOnObjectZoomToAtInput,defaultTargetState:"LOCKED_ON_OBJECT"},transitionZoomByAtInput:{action:this.transitionZoomByAtInput,defaultTargetState:"TRANSITION"},transitionZoomToAtInput:{action:this.transitionZoomToAtInput,defaultTargetState:"TRANSITION"},transitionZoomToAtCenterInput:{action:this.transitionZoomToAtCenterInput,defaultTargetState:"TRANSITION"},transitionZoomToAtWorldInput:{action:this.transitionZoomToAtWorldInput,defaultTargetState:"TRANSITION"},userZoomByAtInput:{action:this.userZoomByAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"},userZoomToAtInput:{action:this.userZoomToAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"}};get eventReactions(){return this._eventReactions}lockedOnObjectZoomByAtInput(Q,J){return{type:"zoomBy",deltaZoom:J.deltaZoom}}lockedOnObjectZoomToAtInput(Q,J){return{type:"zoomTo",targetZoom:J.targetZoom}}userZoomByAtInput(Q,J){return{type:"zoomByAt",deltaZoom:J.deltaZoom,anchorPoint:J.anchorPoint}}userZoomToAtInput(Q,J){return{type:"zoomToAt",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}transitionZoomByAtInput(Q,J){return{type:"zoomByAt",deltaZoom:J.deltaZoom,anchorPoint:J.anchorPoint}}transitionZoomByAtCenterInput(Q,J){return{type:"zoomBy",deltaZoom:J.deltaZoom}}transitionZoomToAtInput(Q,J){return{type:"zoomToAt",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}transitionZoomToAtCenterInput(Q,J){return{type:"zoomTo",targetZoom:J.targetZoom}}transitionZoomToAtWorldInput(Q,J){return{type:"zoomToAtWorld",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}}class R9 extends A{constructor(){super()}_eventReactions={lockedOnObjectZoomByAtInput:{action:this.lockedOnObjectZoomByAtInput,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectZoomToAtInput:{action:this.lockedOnObjectZoomToAtInput,defaultTargetState:"LOCKED_ON_OBJECT"},userZoomByAtInput:{action:this.userZoomByAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"},userZoomToAtInput:{action:this.userZoomToAtInput,defaultTargetState:"ACCEPTING_USER_INPUT"}};get eventReactions(){return this._eventReactions}lockedOnObjectZoomByAtInput(Q,J){return{type:"zoomByAt",deltaZoom:J.deltaZoom,anchorPoint:J.anchorPoint}}lockedOnObjectZoomToAtInput(Q,J){return{type:"zoomToAt",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}userZoomByAtInput(Q,J){return{type:"zoomByAt",deltaZoom:J.deltaZoom,anchorPoint:J.anchorPoint}}userZoomToAtInput(Q,J){return{type:"zoomToAt",targetZoom:J.targetZoom,anchorPoint:J.anchorPoint}}}class P9 extends p{constructor(Q,J,X){super(Q,J,X)}notifyZoomByAtInput(Q,J){return this.happens("userZoomByAtInput",{deltaZoom:Q,anchorPoint:J})}notifyZoomByAtInputAnimation(Q,J){return this.happens("transitionZoomByAtInput",{deltaZoom:Q,anchorPoint:J})}notifyZoomToAtCenterInput(Q,J){return this.happens("transitionZoomToAtCenterInput",{targetZoom:Q,anchorPoint:J})}notifyZoomToAtWorldInput(Q,J){return this.happens("transitionZoomToAtWorldInput",{targetZoom:Q,anchorPoint:J})}initateTransition(){return this.happens("initiateTransition")}}function S1(){return{ACCEPTING_USER_INPUT:new L9,TRANSITION:new T9,LOCKED_ON_OBJECT:new R9}}function w9(Q={setup:M,cleanup:M}){return new P9(S1(),"ACCEPTING_USER_INPUT",Q)}class S9 extends p{constructor(Q,J,X){super(Q,J,X)}notifyRotateByInput(Q){return this.happens("userRotateByInput",{diff:Q})}notifyRotateToAnimationInput(Q){return this.happens("transitionRotateToInput",{target:Q})}initateTransition(){this.happens("initateTransition")}}class b9 extends A{constructor(){super()}eventReactions={userRotateByInput:{action:this.userRotateByInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},userRotateToInput:{action:this.userRotateToInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},lockedOnObjectRotateByInput:{action:this.lockedOnObjectRotateByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectRotateToInput:{action:this.lockedOnObjectRotateToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},initateTransition:{action:M,defaultTargetState:"TRANSITION"}};userRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}userRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}lockedOnObjectRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}lockedOnObjectRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}}class f9 extends A{constructor(){super()}eventReactions={userRotateByInput:{action:this.userRotateByInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},userRotateToInput:{action:this.userRotateToInputHandler,defaultTargetState:"ACCEPTING_USER_INPUT"},transitionRotateByInput:{action:this.transitionRotateByInputHandler,defaultTargetState:"TRANSITION"},transitionRotateToInput:{action:this.transitionRotateToInputHandler,defaultTargetState:"TRANSITION"},lockedOnObjectRotateByInput:{action:this.lockedOnObjectRotateByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectRotateToInput:{action:this.lockedOnObjectRotateToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"}};userRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}userRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}transitionRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}transitionRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}lockedOnObjectRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}lockedOnObjectRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}}class C9 extends A{constructor(){super()}eventReactions={unlock:{action:M,defaultTargetState:"ACCEPTING_USER_INPUT"},lockedOnObjectRotateByInput:{action:this.lockedOnObjectRotateByInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"},lockedOnObjectRotateToInput:{action:this.lockedOnObjectRotateToInputHandler,defaultTargetState:"LOCKED_ON_OBJECT"}};lockedOnObjectRotateByInputHandler(Q,J){return{type:"rotateBy",delta:J.diff}}lockedOnObjectRotateToInputHandler(Q,J){return{type:"rotateTo",target:J.target}}}function b1(){return{ACCEPTING_USER_INPUT:new b9,TRANSITION:new f9,LOCKED_ON_OBJECT:new C9}}function k9(Q={setup:M,cleanup:M}){return new S9(b1(),"ACCEPTING_USER_INPUT",Q)}class x9{_panStateMachine;_zoomStateMachine;_rotateStateMachine;constructor(Q,J,X){this._panStateMachine=Q,this._zoomStateMachine=J,this._rotateStateMachine=X}notifyPanToAnimationInput(Q){let J=this._panStateMachine.notifyPanToAnimationInput(Q);if(J.handled){let X=J.output;if(X!==void 0)switch(X.type){case"panByViewPort":return{allowPassThrough:!0,delta:X.delta};case"panToWorld":return{allowPassThrough:!0,delta:X.target};default:return{allowPassThrough:!1}}}return{allowPassThrough:!1}}notifyPanInput(Q){let J=this._panStateMachine.happens("userPanByInput",{diff:Q});if(J.handled&&"output"in J&&J.output){if(J.output.type!=="none")return{allowPassThrough:!0,delta:Q}}return{allowPassThrough:!1}}notifyZoomInput(Q,J){let X=this._zoomStateMachine.happens("userZoomByAtInput",{deltaZoom:Q,anchorPoint:J});if(X.handled&&"output"in X&&X.output){if(X.output.type!=="none")return{allowPassThrough:!0,delta:Q,anchorPoint:J}}return{allowPassThrough:!1}}notifyRotateByInput(Q){return this._rotateStateMachine.notifyRotateByInput(Q)}notifyRotateToAnimationInput(Q){return this._rotateStateMachine.notifyRotateToAnimationInput(Q)}notifyZoomInputAnimation(Q,J={x:0,y:0}){this._zoomStateMachine.notifyZoomToAtCenterInput(Q,J)}notifyZoomInputAnimationWorld(Q,J={x:0,y:0}){this._zoomStateMachine.notifyZoomToAtWorldInput(Q,J)}notifyRotationInput(Q){let J=this._rotateStateMachine.happens("userRotateByInput",{diff:Q});if(J.handled&&"output"in J&&J.output){if(J.output.type!=="none")return{allowPassThrough:!0,delta:Q}}return{allowPassThrough:!1}}initatePanTransition(){this._panStateMachine.initateTransition()}initateZoomTransition(){this._zoomStateMachine.initateTransition()}initateRotateTransition(){this._rotateStateMachine.initateTransition()}get rotateStateMachine(){return this._rotateStateMachine}get panStateMachine(){return this._panStateMachine}get zoomStateMachine(){return this._zoomStateMachine}}function g9(){let Q=I9(),J=w9(),X=k9();return new x9(Q,J,X)}function f1(Q,J,X){if(!X.clampZoom)return Q;return VQ(Q,J.zoomBoundaries)}function C1(Q,J,X){if(!X.clampZoom)return Q;let Y=J.zoomLevel+Q;return Y=VQ(Y,J.zoomBoundaries),Q=Y-J.zoomLevel,Q}function k1(Q,J,X){if(X.restrictZoom)return J.zoomLevel;return Q}function x1(Q,J,X){if(X.restrictZoom)return 0;return Q}function y9(){return QQ(f1,k1)}function h9(){return QQ(C1,x1)}function v9(){return QQ(g1,h1)}function u9(){return QQ(y1,v1)}function g1(Q,J,X){let Y=B.subVector(Q,J.position);if(Y=m9(Y,J,X),Y.x===0&&Y.y===0)return Q;return B.addVector(J.position,Y)}function y1(Q,J,X){return Q=m9(Q,J,X),Q}function h1(Q,J,X){if(!X.clampTranslation)return Q;let Y=jQ(Q,J.boundaries);if(X.limitEntireViewPort)Y=e6(Q,J.viewPortWidth,J.viewPortHeight,J.boundaries,J.zoomLevel,J.rotation);return Y}function v1(Q,J,X){if(!X.clampTranslation)return Q;let Y=B.subVector(jQ(B.addVector(J.position,Q),J.boundaries),J.position);if(X.limitEntireViewPort)Y=B.subVector(e6(B.addVector(J.position,Q),J.viewPortWidth,J.viewPortHeight,J.boundaries,J.zoomLevel,J.rotation),J.position);return Y}function m9(Q,J,X){if(X.restrictXTranslation&&X.restrictYTranslation)return{x:0,y:0};if(X.restrictRelativeXTranslation&&X.restrictRelativeYTranslation)return{x:0,y:0};if(X.restrictXTranslation)Q.x=0;if(X.restrictYTranslation)Q.y=0;if(X.restrictRelativeXTranslation){let Y=B.rotatePoint({x:0,y:1},J.rotation),G=B.dotProduct(Y,Q);Q=B.multiplyVectorByScalar(Y,G)}if(X.restrictRelativeYTranslation){let Y=B.rotatePoint({x:1,y:0},J.rotation),G=B.dotProduct(Y,Q);Q=B.multiplyVectorByScalar(Y,G)}return Q}function u1(Q,J,X){if(!X.clampRotation)return Q;let Y=h(J.rotation+Q),G=IQ(Y,J.rotationBoundaries);return zQ(J.rotation,G)}function m1(Q,J,X){if(X.restrictRotation)return 0;return Q}function d1(Q,J,X){if(!X.clampRotation)return Q;return IQ(Q,J.rotationBoundaries)}function p1(Q,J,X){if(X.restrictRotation)return J.rotation;return Q}function d9(){return QQ(m1,u1)}function p9(){return QQ(p1,d1)}class $8{_panBy;_panTo;_zoomTo;_zoomBy;_rotateBy;_rotateTo;_config;_camera;constructor(Q,J=new ZQ){this._panBy=u9(),this._panTo=v9(),this._zoomTo=y9(),this._zoomBy=h9(),this._rotateBy=d9(),this._rotateTo=p9(),this._config={...Q,restrictRotation:!1,clampRotation:!0},this._camera=J}zoomToAt(Q,J){let X=this._camera.convertFromViewPort2WorldSpace(J),Y=this._zoomTo(Q,this._camera,this._config);this._camera.setZoomLevel(Y);let G=this._camera.convertFromViewPort2WorldSpace(J),q=B.subVector(X,G),U=this._panBy(q,this._camera,this._config);this._camera.setPosition(B.addVector(this._camera.position,U))}zoomByAt(Q,J){let X=Q*this._camera.zoomLevel,Y=this._camera.convertFromViewPort2WorldSpace(J),G=this._zoomBy(X,this._camera,this._config);this._camera.setZoomLevel(this._camera.zoomLevel+G);let q=this._camera.convertFromViewPort2WorldSpace(J),U=B.subVector(Y,q),$=this._panBy(U,this._camera,this._config);this._camera.setPosition(B.addVector(this._camera.position,$))}zoomTo(Q){let J=this._zoomTo(Q,this._camera,this._config);this._camera.setZoomLevel(J)}zoomBy(Q){let J=this._zoomBy(Q,this._camera,this._config);this._camera.setZoomLevel(this._camera.zoomLevel+J)}zoomToAtWorld(Q,J){let X=this._camera.convertFromWorld2ViewPort(J),Y=this._zoomTo(Q,this._camera,this._config);this._camera.setZoomLevel(Y);let G=this._camera.convertFromWorld2ViewPort(J),q=B.subVector(G,X),U=n6(q,this._camera.zoomLevel,this._camera.rotation),$=this._panBy(U,this._camera,this._config);this._camera.setPosition(B.addVector(this._camera.position,$))}zoomByAtWorld(Q,J){let X=this._camera.convertFromWorld2ViewPort(J),Y=this._zoomBy(Q,this._camera,this._config);this._camera.setZoomLevel(this._camera.zoomLevel+Y);let G=this._camera.convertFromWorld2ViewPort(J),q=B.subVector(G,X),U=n6(q,this._camera.zoomLevel,this._camera.rotation),$=this._panBy(U,this._camera,this._config);this._camera.setPosition(B.addVector(this._camera.position,$))}panByViewPort(Q){let J=B.multiplyVectorByScalar(B.rotatePoint(Q,this._camera.rotation),1/this._camera.zoomLevel);this.panByWorld(J)}panByWorld(Q){let J=this._panBy(Q,this._camera,this._config);this._camera.setPosition(B.addVector(this._camera.position,J))}panToWorld(Q){let J=this._panTo(Q,this._camera,this._config);this._camera.setPosition(J)}panToViewPort(Q){let J=this._camera.convertFromViewPort2WorldSpace(Q);this.panToWorld(J)}rotateBy(Q){let J=this._rotateBy(Q,this._camera,this._config);this._camera.setRotation(this._camera.rotation+J)}rotateTo(Q){let J=this._rotateTo(Q,this._camera,this._config);this._camera.setRotation(J)}set limitEntireViewPort(Q){this._config.limitEntireViewPort=Q}get limitEntireViewPort(){return this._config.limitEntireViewPort}get camera(){return this._camera}set camera(Q){this._camera=Q}get config(){return this._config}set config(Q){this._config={...Q}}configure(Q){this._config={...this._config,...Q}}cleanup(){}setup(){}update(){}}class l9{width=0;height=0;position={x:0,y:0};setCursor=M;dimensions={width:0,height:0,position:{x:0,y:0}};detached=!1;tearDown=M}class K8{_width=0;_height=0;_position={x:0,y:0};_canvasPositionDimensionPublisher;_canvas;_internalSizeUpdateObservable;constructor(Q){if(this._internalSizeUpdateObservable=new yQ,Q){let J=Q.getBoundingClientRect(),X=d(J,window.getComputedStyle(Q));this._width=X.width,this._height=X.height,this._position={x:X.left,y:X.top},this._canvas=Q}this._canvasPositionDimensionPublisher=new G8(Q),this._canvasPositionDimensionPublisher.onPositionUpdate((J)=>{if(this._canvas==null){console.error("is not attached to any canvas should not have getting any updates");return}this._width=J.width,this._height=J.height,this._position={x:J.left,y:J.top},this._internalSizeUpdateObservable.notify({width:this._width,height:this._height,position:this._position})})}subscribe(Q,J){return this._internalSizeUpdateObservable.subscribe(Q,J)}notify(...Q){this._internalSizeUpdateObservable.notify(...Q)}get detached(){return this._canvas===void 0}get dimensions(){return{width:this._width,height:this._height,position:this._position}}get width(){return this._width}setWidth(Q){if(this._canvas)this._canvas.width=Q*window.devicePixelRatio,this._canvas.style.width=Q+"px"}setCanvasWidth(Q){if(this._canvas)this._canvas.width=Q*window.devicePixelRatio}setHeight(Q){if(this._canvas)this._canvas.height=Q*window.devicePixelRatio,this._canvas.style.height=Q+"px"}setCanvasHeight(Q){if(this._canvas)this._canvas.height=Q*window.devicePixelRatio}get height(){return this._height}get position(){return this._position}setCursor(Q){if(this._canvas)this._canvas.style.cursor=Q}tearDown(){this._canvasPositionDimensionPublisher.dispose(),this._canvas=void 0,this._width=0,this._height=0,this._position={x:0,y:0}}attach(Q){this._canvasPositionDimensionPublisher.attach(Q),this._canvas=Q;let J=Q.getBoundingClientRect(),X=d(J,window.getComputedStyle(Q));this._canvas.width=X.width*window.devicePixelRatio,this._canvas.height=X.height*window.devicePixelRatio;let Y=X.width/X.height;this._canvas.style.aspectRatio=Y.toString(),this._width=X.width,this._height=X.height,this._position={x:X.left,y:X.top},this._internalSizeUpdateObservable.notify({width:this._width,height:this._height,position:this._position})}logCanvasTrueSize(){if(this._canvas===void 0)return;console.log("canvas true size"),console.log("style width",this._canvas.style.width),console.log("style height",this._canvas.style.height),console.log("width",this._canvas.width),console.log("height",this._canvas.height),console.log("proxy width",this._width),console.log("proxy height",this._height)}}class c9{alignCoordinateSystem=!1;canvas=new l9;initialCursorPosition={x:0,y:0};constructor(){}toggleOnEdgeAutoCameraInput=M;toggleOffEdgeAutoCameraInput=M;setCursorPosition=M;setInitialCursorPosition(Q){}cleanup(){}setup(){}get kmtTrackpadTrackScore(){return 0}subtractKmtTrackpadTrackScore(){}addKmtTrackpadTrackScore(){}setMode(Q){}get mode(){return"kmt"}cancelCurrentAction(){}}class Z6{_alignCoordinateSystem;_canvasOperator;_initialCursorPosition;_kmtTrackpadTrackScore;_mode;_deciding=!0;constructor(Q){this._alignCoordinateSystem=!0,this._canvasOperator=Q,this._initialCursorPosition={x:0,y:0},this._kmtTrackpadTrackScore=0,this._mode="TBD"}get mode(){return this._mode}setMode(Q){this._deciding=!1,this._mode=Q}enableInputModeDetection(){this._deciding=!0,this._kmtTrackpadTrackScore=0}get kmtTrackpadTrackScore(){return this._kmtTrackpadTrackScore}subtractKmtTrackpadTrackScore(){if(!this._deciding)return;if(this._kmtTrackpadTrackScore--,this._kmtTrackpadTrackScore<-5)this._kmtTrackpadTrackScore=0,this._mode="trackpad"}addKmtTrackpadTrackScore(){if(!this._deciding)return;if(this._kmtTrackpadTrackScore++,this._kmtTrackpadTrackScore>5)this._kmtTrackpadTrackScore=0,this._mode="kmt"}get alignCoordinateSystem(){return this._alignCoordinateSystem}get canvas(){return this._canvasOperator}get initialCursorPosition(){return this._initialCursorPosition}set alignCoordinateSystem(Q){this._alignCoordinateSystem=Q}cancelCurrentAction(){this._initialCursorPosition={x:0,y:0}}setInitialCursorPosition(Q){this._initialCursorPosition=Q}cleanup(){}setup(){}}class _8{_touchPointsMap=new Map;_canvas;_alignCoordinateSystem;constructor(Q){this._canvas=Q,this._alignCoordinateSystem=!0}addTouchPoints(Q){Q.forEach((J)=>{this._touchPointsMap.set(J.ident,{...J})})}removeTouchPoints(Q){Q.forEach((J)=>{if(this._touchPointsMap.has(J))this._touchPointsMap.delete(J)})}getCurrentTouchPointsCount(){return this._touchPointsMap.size}getInitialTouchPointsPositions(Q){let J=[];return Q.forEach((X)=>{if(this._touchPointsMap.has(X)){let Y=this._touchPointsMap.get(X);if(Y)J.push(Y)}}),J}updateTouchPoints(Q){Q.forEach((J)=>{if(this._touchPointsMap.has(J.ident))this._touchPointsMap.set(J.ident,{...J})})}get alignCoordinateSystem(){return this._alignCoordinateSystem}set alignCoordinateSystem(Q){this._alignCoordinateSystem=Q}get canvas(){return this._canvas}cleanup(){}setup(){}}class s9 extends A{_eventReactions={touchstart:{action:this.touchstart,defaultTargetState:"IDLE"},touchend:{action:this.touchend,defaultTargetState:"IDLE"}};_guards={touchPointsCount:((Q)=>{return Q.getCurrentTouchPointsCount()===2}).bind(this)};_eventGuards={touchstart:[{guard:"touchPointsCount",target:"PENDING"}],touchend:[{guard:"touchPointsCount",target:"PENDING"}]};get eventReactions(){return this._eventReactions}touchstart(Q,J){Q.addTouchPoints(J.points)}touchend(Q,J){Q.removeTouchPoints(J.points.map((X)=>X.ident))}}class i9 extends A{_eventReactions={touchstart:{action:this.touchstart,defaultTargetState:"IDLE"},touchend:{action:this.touchend,defaultTargetState:"IDLE"},touchmove:{action:this.touchmove,defaultTargetState:"IN_PROGRESS"}};get eventReactions(){return this._eventReactions}touchstart(Q,J){Q.addTouchPoints(J.points)}touchend(Q,J){Q.removeTouchPoints(J.points.map((X)=>X.ident))}touchmove(Q,J){let X=J.points.map((E)=>E.ident),Y=Q.getInitialTouchPointsPositions(X),G=J.points,q=B.distanceBetweenPoints(Y[0],Y[1]),U=B.distanceBetweenPoints(G[0],G[1]),$=B.linearInterpolation(Y[0],Y[1],0.5),_=B.linearInterpolation(G[0],G[1],0.5),D=B.subVector($,_),j={x:Q.canvas.position.x+Q.canvas.width/2,y:Q.canvas.position.y+Q.canvas.height/2},K=B.subVector($,j),W=Math.abs(U-q)>B.distanceBetweenPoints($,_)?"ZOOMING":"PANNING";switch(Q.updateTouchPoints(G),W){case"ZOOMING":return{type:"zoom",delta:(U-q)*0.005,anchorPointInViewPort:K};case"PANNING":return{type:"pan",delta:D};default:return console.warn("Unknown panZoom state",W),{type:"none"}}}}class r9 extends A{_eventReactions={touchmove:{action:this.touchmove,defaultTargetState:"IN_PROGRESS"},touchend:{action:this.touchend,defaultTargetState:"IDLE"},touchstart:{action:()=>"IDLE",defaultTargetState:"IDLE"}};get eventReactions(){return this._eventReactions}touchmove(Q,J){let X=J.points.map((E)=>E.ident),Y=Q.getInitialTouchPointsPositions(X),G=J.points,q=B.distanceBetweenPoints(Y[0],Y[1]),U=B.distanceBetweenPoints(G[0],G[1]),$=B.linearInterpolation(Y[0],Y[1],0.5),_=B.linearInterpolation(G[0],G[1],0.5),D=B.subVector($,_),j={x:Q.canvas.position.x+Q.canvas.width/2,y:Q.canvas.position.y+Q.canvas.height/2},K=B.subVector($,j),W=Math.abs(U-q)>B.distanceBetweenPoints($,_)?"ZOOMING":"PANNING";switch(Q.updateTouchPoints(G),W){case"ZOOMING":if(!Q.alignCoordinateSystem)K.y=-K.y;return{type:"zoom",delta:-(q-U)*0.005,anchorPointInViewPort:K};case"PANNING":if(!Q.alignCoordinateSystem)D.y=-D.y;return{type:"pan",delta:D};default:return console.warn("Unknown panZoom state",W),{type:"none"}}}touchend(Q,J){Q.removeTouchPoints(J.points.map((X)=>X.ident))}}function a9(Q){return new p({IDLE:new s9,PENDING:new i9,IN_PROGRESS:new r9},"IDLE",Q)}class o9 extends A{constructor(){super()}_guards={isIdle:()=>!0};_eventGuards={};scrollPan=(Q,J)=>{let X={...J};if(!Q.alignCoordinateSystem)X.deltaY=-X.deltaY;return{type:"pan",delta:{x:X.deltaX,y:X.deltaY}}};scrollZoom=(Q,J)=>{let X=0.005;if(Math.abs(J.deltaY)>100)X=0.0005;let Y=J.deltaY*X,G={x:J.x,y:J.y},q=Z9(G,Q.canvas,{x:Q.canvas.width/2,y:Q.canvas.height/2},!Q.alignCoordinateSystem);return{type:"zoom",delta:-(Y*5),anchorPointInViewPort:q}};scrollHandler=(Q,J)=>{if(J.deltaX===0&&J.deltaY!==0)Q.addKmtTrackpadTrackScore();else if(J.deltaX!==0&&J.deltaY!==0)Q.subtractKmtTrackpadTrackScore();if(Q.mode==="kmt")return this.scrollZoom(Q,J);else return this.scrollPan(Q,J)};scrollWithCtrlHandler=(Q,J)=>{return this.scrollZoom(Q,J)};get eventReactions(){return this._eventReactions}_eventReactions={spacebarDown:{action:this.spacebarDownHandler,defaultTargetState:"READY_TO_PAN_VIA_SPACEBAR"},scroll:{action:this.scrollHandler,defaultTargetState:"IDLE"},scrollWithCtrl:{action:this.scrollWithCtrlHandler,defaultTargetState:"IDLE"},middlePointerDown:{action:this.middlePointerDownHandler,defaultTargetState:"READY_TO_PAN_VIA_SCROLL_WHEEL"},disable:{action:M,defaultTargetState:"DISABLED"}};uponEnter(Q){Q.canvas.setCursor("default")}spacebarDownHandler(Q,J){return 1}middlePointerDownHandler(Q,J){if(Q.addKmtTrackpadTrackScore(),Q.mode==="TBD")Q.setMode("kmt");Q.setInitialCursorPosition({x:J.x,y:J.y})}}class n9 extends A{constructor(){super()}uponEnter(Q){Q.canvas.setCursor("default")}beforeExit(Q){}get eventReactions(){return{enable:{action:M,defaultTargetState:"IDLE"}}}}class t9 extends A{constructor(){super()}_eventReactions={spacebarUp:{action:M,defaultTargetState:"IDLE"},leftPointerDown:{action:this.leftPointerDownHandler,defaultTargetState:"INITIAL_PAN"},disable:{action:(Q)=>Q.cancelCurrentAction(),defaultTargetState:"DISABLED"},leftPointerMove:{action:M,defaultTargetState:"READY_TO_PAN_VIA_SPACEBAR"}};uponEnter(Q){Q.canvas.setCursor("grab")}get eventReactions(){return this._eventReactions}leftPointerDownHandler(Q,J){Q.setInitialCursorPosition({x:J.x,y:J.y})}}class e9 extends A{constructor(){super()}_eventReactions={leftPointerUp:{action:M,defaultTargetState:"READY_TO_PAN_VIA_SPACEBAR"},leftPointerMove:{action:this.leftPointerMoveHandler,defaultTargetState:"PAN"},spacebarUp:{action:()=>"IDLE",defaultTargetState:"IDLE"},leftPointerDown:{action:()=>"PAN",defaultTargetState:"PAN"}};get eventReactions(){return this._eventReactions}uponEnter(Q){Q.canvas.setCursor("grabbing")}leftPointerMoveHandler(Q,J){let X={x:Q.initialCursorPosition.x-J.x,y:Q.initialCursorPosition.y-J.y};if(!Q.alignCoordinateSystem)X.y=-X.y;return Q.setInitialCursorPosition({x:J.x,y:J.y}),{type:"pan",delta:X}}}class Q7 extends A{constructor(){super()}_eventReactions={middlePointerUp:{action:M,defaultTargetState:"IDLE"},middlePointerMove:{action:M,defaultTargetState:"PAN_VIA_SCROLL_WHEEL"}};get eventReactions(){return this._eventReactions}uponEnter(Q){Q.canvas.setCursor("grabbing")}}class J7 extends A{constructor(){super()}_eventReactions={leftPointerUp:{action:M,defaultTargetState:"READY_TO_PAN_VIA_SPACEBAR"},leftPointerMove:{action:this.leftPointerMoveHandler,defaultTargetState:"PAN"},spacebarUp:{action:M,defaultTargetState:"IDLE"}};get eventReactions(){return this._eventReactions}uponEnter(Q){Q.canvas.setCursor("grabbing")}beforeExit(Q){Q.canvas.setCursor("default")}leftPointerMoveHandler(Q,J){let X={x:Q.initialCursorPosition.x-J.x,y:Q.initialCursorPosition.y-J.y};if(!Q.alignCoordinateSystem)X.y=-X.y;return Q.setInitialCursorPosition({x:J.x,y:J.y}),{type:"pan",delta:X}}}class X7 extends A{_eventReactions={middlePointerUp:{action:M,defaultTargetState:"IDLE"},middlePointerMove:{action:this.middlePointerMoveHandler,defaultTargetState:"PAN_VIA_SCROLL_WHEEL"}};get eventReactions(){return this._eventReactions}middlePointerMoveHandler(Q,J){let X={x:Q.initialCursorPosition.x-J.x,y:Q.initialCursorPosition.y-J.y};if(!Q.alignCoordinateSystem)X.y=-X.y;return Q.setInitialCursorPosition({x:J.x,y:J.y}),{type:"pan",delta:X}}uponEnter(Q){Q.canvas.setCursor("grabbing")}}function Y7(Q){let J={IDLE:new o9,READY_TO_PAN_VIA_SPACEBAR:new t9,INITIAL_PAN:new e9,PAN:new J7,READY_TO_PAN_VIA_SCROLL_WHEEL:new Q7,PAN_VIA_SCROLL_WHEEL:new X7,DISABLED:new n9};return new p(J,"IDLE",Q)}class W8{_cameraMux;_cameraRig;_publisher;constructor(Q,J,X){this._cameraMux=Q,this._cameraRig=J,this._publisher=X}processInputEventOutput(Q){if(this.isOutputEvent(Q))this.handleStateMachineOutput(Q);else if(Array.isArray(Q))Q.forEach((J)=>{if(this.isOutputEvent(J))this.handleStateMachineOutput(J)})}processInputEvent(Q){this.handleStateMachineOutput(Q)}isOutputEvent(Q){return Q&&typeof Q==="object"&&"type"in Q}handleStateMachineOutput(Q){switch(Q.type){case"pan":this._publisher?.notifyPan(Q.delta);let J=this._cameraMux.notifyPanInput(Q.delta);this.processPanMuxOutput(J);break;case"zoom":this._publisher?.notifyZoom(Q.delta,Q.anchorPointInViewPort);let X=this._cameraMux.notifyZoomInput(Q.delta,Q.anchorPointInViewPort);this.processZoomMuxOutput(X);break;case"rotate":this._publisher?.notifyRotate(Q.deltaRotation);let Y=this._cameraMux.notifyRotationInput(Q.deltaRotation);this.processRotateMuxOutput(Y);break;case"cursor":break;case"none":break}}processPanMuxOutput(Q){if(Q.allowPassThrough)this._cameraRig.panByViewPort(Q.delta)}processZoomMuxOutput(Q){if(Q.allowPassThrough)this._cameraRig.zoomByAt(Q.delta,Q.anchorPoint)}processRotateMuxOutput(Q){if(Q.allowPassThrough)this._cameraRig.rotateBy(Q.delta)}get publisher(){return this._publisher}get cameraMux(){return this._cameraMux}set cameraMux(Q){this._cameraMux=Q}}class uQ{_context;_reversedContext;_canvasProxy;_kmtParser;_touchParser;_alignCoordinateSystem=!0;_fullScreen=!1;cameraRig;_cameraMux;boardInputPublisher;_observableInputTracker;_touchInputTracker;_inputOrchestrator;_cachedCanvasWidth=0;_cachedCanvasHeight=0;lastUpdateTime=0;constructor(Q,J=!1){let X=new ZQ,Y=50000;X.boundaries={min:{x:-50000,y:-50000},max:{x:50000,y:50000}},this.bindFunctions(),this._canvasProxy=new K8(Q),this._canvasProxy.subscribe((U)=>{this.syncViewPortDimensions(U),this.syncCameraZoomLevel(U)}),this.cameraRig=new $8({limitEntireViewPort:!0,restrictRelativeXTranslation:!1,restrictRelativeYTranslation:!1,restrictXTranslation:!1,restrictYTranslation:!1,restrictZoom:!1,clampTranslation:!0,clampZoom:!0},X),this._cameraMux=g9(),this.boardInputPublisher=new U8,this._observableInputTracker=new Z6(this._canvasProxy),this._touchInputTracker=new _8(this._canvasProxy);let G=Y7(this._observableInputTracker),q=a9(this._touchInputTracker);if(this._inputOrchestrator=new W8(this._cameraMux,this.cameraRig,this.boardInputPublisher),this._kmtParser=new X8(G,this._inputOrchestrator,Q),this._touchParser=new Y8(q,this._inputOrchestrator,Q),Q!=null)console.log("canvas exists on creation of board"),this.attach(Q,J),this.syncViewPortDimensions({width:Q.width,height:Q.height})}syncViewPortDimensions(Q){this.camera.viewPortHeight=Q.height,this.camera.viewPortWidth=Q.width}attach(Q,J=!1){let X=Q.getContext("2d",{willReadFrequently:J});if(X==null){console.error("new canvas context is null");return}if(this._kmtParser.attach(Q),this._touchParser.attach(Q),this._canvasProxy.attach(Q),this.limitEntireViewPort)this.syncCameraZoomLevel(this._canvasProxy.dimensions);this._context=X,this._reversedContext=H9(this._context)}disableEventListeners(){this._kmtParser.tearDown(),this._touchParser.tearDown()}enableEventListeners(){this._kmtParser.setUp(),this._touchParser.setUp()}get inputOrchestrator(){return this._inputOrchestrator}tearDown(){this._kmtParser.tearDown(),this._touchParser.tearDown(),this._canvasProxy.tearDown()}bindFunctions(){this.step=this.step.bind(this)}get width(){return this._canvasProxy.width}get height(){return this._canvasProxy.height}set alignCoordinateSystem(Q){this._alignCoordinateSystem=Q,this._observableInputTracker.alignCoordinateSystem=Q,this._touchInputTracker.alignCoordinateSystem=Q}get alignCoordinateSystem(){return this._alignCoordinateSystem}get fullScreen(){return this._fullScreen}set fullScreen(Q){if(this._fullScreen=Q,this._fullScreen)this._canvasProxy.setWidth(window.innerWidth),this._canvasProxy.setHeight(window.innerHeight)}get context(){if(!this._alignCoordinateSystem)return this._reversedContext;return this._context}set limitEntireViewPort(Q){if(this.cameraRig.config.limitEntireViewPort=Q,this._canvasProxy.detached)return;if(Q)this.syncCameraZoomLevel(this._canvasProxy.dimensions)}get limitEntireViewPort(){return this.cameraRig.config.limitEntireViewPort}set kmtParser(Q){this._kmtParser.tearDown(),Q.setUp(),this._kmtParser=Q}get kmtParser(){return this._kmtParser}set touchParser(Q){this._touchParser.tearDown(),Q.setUp(),this._touchParser=Q}get touchParser(){return this._touchParser}get camera(){return this.cameraRig.camera}set camera(Q){if(!this._canvasProxy.detached)Q.viewPortHeight=this._canvasProxy.height/window.devicePixelRatio,Q.viewPortWidth=this._canvasProxy.width/window.devicePixelRatio;this.cameraRig.camera=Q}get cameraMux(){return this._cameraMux}set cameraMux(Q){this._cameraMux=Q,this._inputOrchestrator.cameraMux=Q}step(Q){if(this._canvasProxy.detached||this._context==null)return;this.cameraRig.update();let J=Q-this.lastUpdateTime;if(this.lastUpdateTime=Q,J=J/1000,this._context.reset(),this._context.clearRect(0,0,this._canvasProxy.width*window.devicePixelRatio,this._canvasProxy.height*window.devicePixelRatio),this._fullScreen&&(this._canvasProxy.width!=window.innerWidth||this._canvasProxy.height!=window.innerHeight))this._canvasProxy.setWidth(window.innerWidth),this._canvasProxy.setHeight(window.innerHeight);else{if(this._cachedCanvasWidth!==this._canvasProxy.width)this._cachedCanvasWidth=this._canvasProxy.width,this._canvasProxy.setCanvasWidth(this._canvasProxy.width);if(this._cachedCanvasHeight!==this._canvasProxy.height)this._cachedCanvasHeight=this._canvasProxy.height,this._canvasProxy.setCanvasHeight(this._canvasProxy.height)}let X=this.camera.getTransform(window.devicePixelRatio,this._alignCoordinateSystem);this._context.setTransform(X.a,X.b,X.c,X.d,X.e,X.f)}convertWindowPoint2WorldCoord(Q){let J=this._canvasProxy.dimensions,X={x:J.position.x+J.width/2,y:J.position.y+J.height/2},Y=B.subVector(Q,X);if(!this._alignCoordinateSystem)Y.y=-Y.y;return this.camera.convertFromViewPort2WorldSpace(Y)}on(Q,J){return this.camera.on(Q,J)}onInput(Q,J){return this.boardInputPublisher.on(Q,J)}get maxHalfTransHeight(){return D9(this.camera.boundaries)}get maxHalfTransWidth(){return E9(this.camera.boundaries)}syncCameraZoomLevel(Q){if(this.limitEntireViewPort){let J=O9(this.camera.boundaries,Q.width,Q.height,this.camera.rotation);if(J!=null&&j6(this.camera.zoomBoundaries,J))this.camera.setMinZoomLevel(J)}}setMaxTransWidthWithFixedMinBoundary(Q){let J=this.camera.boundaries,X=J==null?void 0:J.min,Y=X==null?void 0:X.x;if(Y==null)this.camera.setHorizontalBoundaries(-Q,Q);else this.camera.setHorizontalBoundaries(Y,Y+Q*2);if(this.limitEntireViewPort){let G=q8(this.camera.boundaries,this.camera.viewPortWidth,this.camera.viewPortHeight,this.camera.rotation);if(j6(this.camera.zoomBoundaries,G))this.camera.setMinZoomLevel(G)}}setMaxTransWidthWithFixedMaxBoundary(Q){let J=this.camera.boundaries,X=J==null?void 0:J.max,Y=X==null?void 0:X.x;if(Y==null)this.camera.setHorizontalBoundaries(-Q,Q);else this.camera.setHorizontalBoundaries(Y-Q*2,Y);if(this.limitEntireViewPort){let G=q8(this.camera.boundaries,this.camera.viewPortWidth,this.camera.viewPortHeight,this.camera.rotation);if(j6(this.camera.zoomBoundaries,G))this.camera.setMinZoomLevel(G)}}get restrictRelativeXTranslation(){return this.cameraRig.config.restrictRelativeXTranslation}get restrictRelativeYTranslation(){return this.cameraRig.config.restrictRelativeYTranslation}get restrictXTranslation(){return this.cameraRig.config.restrictXTranslation}get restrictYTranslation(){return this.cameraRig.config.restrictYTranslation}set restrictRelativeXTranslation(Q){this.cameraRig.config.restrictRelativeXTranslation=Q}set restrictRelativeYTranslation(Q){this.cameraRig.configure({restrictRelativeYTranslation:Q})}set restrictXTranslation(Q){this.cameraRig.configure({restrictXTranslation:Q})}set restrictYTranslation(Q){this.cameraRig.configure({restrictYTranslation:Q})}get restrictZoom(){return this.cameraRig.config.restrictZoom}set restrictZoom(Q){this.cameraRig.configure({restrictZoom:Q})}get restrictRotation(){return this.cameraRig.config.restrictRotation}set restrictRotation(Q){this.cameraRig.configure({restrictRotation:Q})}get clampTranslation(){return this.cameraRig.config.clampTranslation}set clampTranslation(Q){this.cameraRig.configure({clampTranslation:Q})}get clampZoom(){return this.cameraRig.config.clampZoom}set clampZoom(Q){this.cameraRig.configure({clampZoom:Q})}get clampRotation(){return this.cameraRig.config.clampRotation}set clampRotation(Q){this.cameraRig.configure({clampRotation:Q})}getCameraRig(){return this.cameraRig}setInputMode(Q){this._observableInputTracker.setMode(Q)}onCanvasDimensionChange(Q){return this._canvasProxy.subscribe(Q)}get canvasDimensions(){return this._canvasProxy.dimensions}}var G7=Symbol("BOARD");function jG(){Q9(G7,new uQ)}function B8(){let Q=r6(G7);if(!Q)throw Error("Board not found, are you using useBoard in a component that is not a child of a board provider?");return Q}function ZG(Q){let J=B8();J9(()=>Q,(X)=>{J.cameraMux=X},{immediate:!0})}function FG(Q){let J=B8(),X=J.camera[Q],Y=Y6(X);return J.camera.on(Q==="position"?"pan":Q==="zoomLevel"?"zoom":"rotate",(G,q)=>{Y.value=q[Q]}),Y}function l1(Q){let J=null,X=(Y)=>{Q?.(Y),J=requestAnimationFrame(X)};t8(()=>{J=requestAnimationFrame(X)}),e8(()=>{if(J!==null)cancelAnimationFrame(J)})}function HG(Q){let J=B8(),X=$9(()=>{return(Y)=>{J.step(Y);let G=J.context;if(G==null){console.warn("Canvas context not available");return}Q?.(Y,G)}});l1((Y)=>{X.value(Y)})}export{ZG as useCustomCameraMux,FG as useCameraState,B8 as useBoard,HG as useAnimationFrameWithBoard,l1 as useAnimationFrame,jG as provideBoard,U7 as Board,G7 as BOARD_SYMBOL};
5
-
6
- //# debugId=CCBF64BEEE3AD23664756E2164756E21
1
+ import { provide as d, inject as f, watch as p, shallowRef as _, onMounted as c, onUnmounted as v, computed as B, defineComponent as b, ref as h, createElementBlock as i, openBlock as s } from "vue";
2
+ import { Board as u } from "@ue-too/board";
3
+ const l = Symbol("BOARD");
4
+ function y() {
5
+ d(l, new u());
6
+ }
7
+ function r() {
8
+ const o = f(l);
9
+ if (!o)
10
+ throw new Error(
11
+ "Board not found, are you using useBoard in a component that is not a child of a board provider?"
12
+ );
13
+ return o;
14
+ }
15
+ function M(o) {
16
+ const n = r();
17
+ p(
18
+ () => o,
19
+ (e) => {
20
+ n.cameraMux = e;
21
+ },
22
+ { immediate: !0 }
23
+ );
24
+ }
25
+ function O(o) {
26
+ const n = r(), e = n.camera[o], t = _(e);
27
+ return n.camera.on(o === "position" ? "pan" : o === "zoomLevel" ? "zoom" : "rotate", (a, m) => {
28
+ t.value = m[o];
29
+ }), t;
30
+ }
31
+ function w(o) {
32
+ let n = null;
33
+ const e = (t) => {
34
+ o?.(t), n = requestAnimationFrame(e);
35
+ };
36
+ c(() => {
37
+ n = requestAnimationFrame(e);
38
+ }), v(() => {
39
+ n !== null && cancelAnimationFrame(n);
40
+ });
41
+ }
42
+ function x(o) {
43
+ const n = r(), e = B(() => (t) => {
44
+ n.step(t);
45
+ const a = n.context;
46
+ if (a == null) {
47
+ console.warn("Canvas context not available");
48
+ return;
49
+ }
50
+ o?.(t, a);
51
+ });
52
+ w((t) => {
53
+ e.value(t);
54
+ });
55
+ }
56
+ const R = /* @__PURE__ */ b({
57
+ __name: "board",
58
+ setup(o) {
59
+ const n = h(null), e = new u();
60
+ return c(() => {
61
+ n.value ? e.attach(n.value) : e.tearDown();
62
+ }), x((t, a) => {
63
+ e.step(t), a.fillStyle = "red", a.fillRect(0, 0, 100, 100);
64
+ }), (t, a) => (s(), i("canvas", {
65
+ ref_key: "canvas",
66
+ ref: n
67
+ }, " Your browser does not support the canvas tag. ", 512));
68
+ }
69
+ }), A = (o, n) => {
70
+ const e = o.__vccOpts || o;
71
+ for (const [t, a] of n)
72
+ e[t] = a;
73
+ return e;
74
+ }, C = {};
75
+ function F(o, n) {
76
+ return s(), i("div", null, "Test");
77
+ }
78
+ const g = /* @__PURE__ */ A(C, [["render", F]]);
79
+ export {
80
+ l as BOARD_SYMBOL,
81
+ R as Board,
82
+ g as Test,
83
+ y as provideBoard,
84
+ w as useAnimationFrame,
85
+ x as useAnimationFrameWithBoard,
86
+ r as useBoard,
87
+ O as useCameraState,
88
+ M as useCustomCameraMux
89
+ };
90
+ //# sourceMappingURL=index.js.map