diff --git a/index.html b/index.html index 69d819e..cae9228 100644 --- a/index.html +++ b/index.html @@ -58,21 +58,21 @@ * @vue/reactivity v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let pA;class ci{constructor(A=!1){this.detached=A,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=pA,!A&&pA&&(this.index=(pA.scopes||(pA.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let A,g;if(this.scopes)for(A=0,g=this.scopes.length;A0)return;if(Ug){let A=Ug;for(Ug=void 0;A;){const g=A.next;A.next=void 0,A.flags&=-9,A=g}}let I;for(;Fg;){let A=Fg;for(Fg=void 0;A;){const g=A.next;if(A.next=void 0,A.flags&=-9,A.flags&1)try{A.trigger()}catch(C){I||(I=C)}A=g}}if(I)throw I}function VE(I){for(let A=I.deps;A;A=A.nextDep)A.version=-1,A.prevActiveLink=A.dep.activeLink,A.dep.activeLink=A}function ZE(I){let A,g=I.depsTail,C=g;for(;C;){const B=C.prevDep;C.version===-1?(C===g&&(g=B),pB(C),hi(C)):A=C,C.dep.activeLink=C.prevActiveLink,C.prevActiveLink=void 0,C=B}I.deps=A,I.depsTail=g}function QB(I){for(let A=I.deps;A;A=A.nextDep)if(A.dep.version!==A.version||A.dep.computed&&(vE(A.dep.computed)||A.dep.version!==A.version))return!0;return!!I._dirty}function vE(I){if(I.flags&4&&!(I.flags&16)||(I.flags&=-17,I.globalVersion===Yg))return;I.globalVersion=Yg;const A=I.dep;if(I.flags|=2,A.version>0&&!I.isSSR&&I.deps&&!QB(I)){I.flags&=-3;return}const g=iA,C=QI;iA=I,QI=!0;try{VE(I);const B=I.fn(I._value);(A.version===0||VA(B,I._value))&&(I._value=B,A.version++)}catch(B){throw A.version++,B}finally{iA=g,QI=C,ZE(I),I.flags&=-3}}function pB(I,A=!1){const{dep:g,prevSub:C,nextSub:B}=I;if(C&&(C.nextSub=B,I.prevSub=void 0),B&&(B.prevSub=C,I.nextSub=void 0),g.subs===I&&(g.subs=C,!C&&g.computed)){g.computed.flags&=-5;for(let Q=g.computed.deps;Q;Q=Q.nextDep)pB(Q,!0)}!A&&!--g.sc&&g.map&&g.map.delete(g.key)}function hi(I){const{prevDep:A,nextDep:g}=I;A&&(A.nextDep=g,I.prevDep=void 0),g&&(g.prevDep=A,I.nextDep=void 0)}let QI=!0;const OE=[];function bI(){OE.push(QI),QI=!1}function LI(){const I=OE.pop();QI=I===void 0?!0:I}function cQ(I){const{cleanup:A}=I;if(I.cleanup=void 0,A){const g=iA;iA=void 0;try{A()}finally{iA=g}}}let Yg=0;class wi{constructor(A,g){this.sub=A,this.dep=g,this.version=g.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class GC{constructor(A){this.computed=A,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(A){if(!iA||!QI||iA===this.computed)return;let g=this.activeLink;if(g===void 0||g.sub!==iA)g=this.activeLink=new wi(iA,this),iA.deps?(g.prevDep=iA.depsTail,iA.depsTail.nextDep=g,iA.depsTail=g):iA.deps=iA.depsTail=g,xE(g);else if(g.version===-1&&(g.version=this.version,g.nextDep)){const C=g.nextDep;C.prevDep=g.prevDep,g.prevDep&&(g.prevDep.nextDep=C),g.prevDep=iA.depsTail,g.nextDep=void 0,iA.depsTail.nextDep=g,iA.depsTail=g,iA.deps===g&&(iA.deps=C)}return g}trigger(A){this.version++,Yg++,this.notify(A)}notify(A){kB();try{for(let g=this.subs;g;g=g.prevSub)g.sub.notify()&&g.sub.dep.notify()}finally{KB()}}}function xE(I){if(I.dep.sc++,I.sub.flags&4){const A=I.dep.computed;if(A&&!I.dep.subs){A.flags|=20;for(let C=A.deps;C;C=C.nextDep)xE(C)}const g=I.dep.subs;g!==I&&(I.prevSub=g,g&&(g.nextSub=I)),I.dep.subs=I}}const oC=new WeakMap,qI=Symbol(""),EB=Symbol(""),Jg=Symbol("");function UA(I,A,g){if(QI&&iA){let C=oC.get(I);C||oC.set(I,C=new Map);let B=C.get(g);B||(C.set(g,B=new GC),B.map=C,B.key=g),B.track()}}function NI(I,A,g,C,B,Q){const E=oC.get(I);if(!E){Yg++;return}const e=t=>{t&&t.trigger()};if(kB(),A==="clear")E.forEach(e);else{const t=q(I),o=t&&JB(g);if(t&&g==="length"){const i=Number(C);E.forEach((s,a)=>{(a==="length"||a===Jg||!yI(a)&&a>=i)&&e(s)})}else switch((g!==void 0||E.has(void 0))&&e(E.get(g)),o&&e(E.get(Jg)),A){case"add":t?o&&e(E.get("length")):(e(E.get(qI)),Eg(I)&&e(E.get(EB)));break;case"delete":t||(e(E.get(qI)),Eg(I)&&e(E.get(EB)));break;case"set":Eg(I)&&e(E.get(qI));break}}KB()}function Ni(I,A){const g=oC.get(I);return g&&g.get(A)}function Ag(I){const A=gA(I);return A===I?A:(UA(A,"iterate",Jg),$A(I)?A:A.map(mA))}function FC(I){return UA(I=gA(I),"iterate",Jg),I}const Ri={__proto__:null,[Symbol.iterator](){return qC(this,Symbol.iterator,mA)},concat(...I){return Ag(this).concat(...I.map(A=>q(A)?Ag(A):A))},entries(){return qC(this,"entries",I=>(I[1]=mA(I[1]),I))},every(I,A){return DI(this,"every",I,A,void 0,arguments)},filter(I,A){return DI(this,"filter",I,A,g=>g.map(mA),arguments)},find(I,A){return DI(this,"find",I,A,mA,arguments)},findIndex(I,A){return DI(this,"findIndex",I,A,void 0,arguments)},findLast(I,A){return DI(this,"findLast",I,A,mA,arguments)},findLastIndex(I,A){return DI(this,"findLastIndex",I,A,void 0,arguments)},forEach(I,A){return DI(this,"forEach",I,A,void 0,arguments)},includes(...I){return WC(this,"includes",I)},indexOf(...I){return WC(this,"indexOf",I)},join(I){return Ag(this).join(I)},lastIndexOf(...I){return WC(this,"lastIndexOf",I)},map(I,A){return DI(this,"map",I,A,void 0,arguments)},pop(){return Dg(this,"pop")},push(...I){return Dg(this,"push",I)},reduce(I,...A){return DQ(this,"reduce",I,A)},reduceRight(I,...A){return DQ(this,"reduceRight",I,A)},shift(){return Dg(this,"shift")},some(I,A){return DI(this,"some",I,A,void 0,arguments)},splice(...I){return Dg(this,"splice",I)},toReversed(){return Ag(this).toReversed()},toSorted(I){return Ag(this).toSorted(I)},toSpliced(...I){return Ag(this).toSpliced(...I)},unshift(...I){return Dg(this,"unshift",I)},values(){return qC(this,"values",mA)}};function qC(I,A,g){const C=FC(I),B=C[A]();return C!==I&&!$A(I)&&(B._next=B.next,B.next=()=>{const Q=B._next();return Q.value&&(Q.value=g(Q.value)),Q}),B}const ui=Array.prototype;function DI(I,A,g,C,B,Q){const E=FC(I),e=E!==I&&!$A(I),t=E[A];if(t!==ui[A]){const s=t.apply(I,Q);return e?mA(s):s}let o=g;E!==I&&(e?o=function(s,a){return g.call(this,mA(s),a,I)}:g.length>2&&(o=function(s,a){return g.call(this,s,a,I)}));const i=t.call(E,o,C);return e&&B?B(i):i}function DQ(I,A,g,C){const B=FC(I);let Q=g;return B!==I&&($A(I)?g.length>3&&(Q=function(E,e,t){return g.call(this,E,e,t,I)}):Q=function(E,e,t){return g.call(this,E,mA(e),t,I)}),B[A](Q,...C)}function WC(I,A,g){const C=gA(I);UA(C,"iterate",Jg);const B=C[A](...g);return(B===-1||B===!1)&&TB(g[0])?(g[0]=gA(g[0]),C[A](...g)):B}function Dg(I,A,g=[]){bI(),kB();const C=gA(I)[A].apply(I,g);return KB(),LI(),C}const fi=mB("__proto__,__v_isRef,__isVue"),qE=new Set(Object.getOwnPropertyNames(Symbol).filter(I=>I!=="arguments"&&I!=="caller").map(I=>Symbol[I]).filter(yI));function di(I){yI(I)||(I=String(I));const A=gA(this);return UA(A,"has",I),A.hasOwnProperty(I)}class WE{constructor(A=!1,g=!1){this._isReadonly=A,this._isShallow=g}get(A,g,C){const B=this._isReadonly,Q=this._isShallow;if(g==="__v_isReactive")return!B;if(g==="__v_isReadonly")return B;if(g==="__v_isShallow")return Q;if(g==="__v_raw")return C===(B?Q?ki:zE:Q?XE:PE).get(A)||Object.getPrototypeOf(A)===Object.getPrototypeOf(C)?A:void 0;const E=q(A);if(!B){let t;if(E&&(t=Ri[g]))return t;if(g==="hasOwnProperty")return di}const e=Reflect.get(A,g,yA(A)?A:C);return(yI(g)?qE.has(g):fi(g))||(B||UA(A,"get",g),Q)?e:yA(e)?E&&JB(g)?e:e.value:rA(e)?B?UC(e):ZA(e):e}}class jE extends WE{constructor(A=!1){super(!1,A)}set(A,g,C,B){let Q=A[g];if(!this._isShallow){const t=kI(Q);if(!$A(C)&&!kI(C)&&(Q=gA(Q),C=gA(C)),!q(A)&&yA(Q)&&!yA(C))return t?!1:(Q.value=C,!0)}const E=q(A)&&JB(g)?Number(g)I,jg=I=>Reflect.getPrototypeOf(I);function Ui(I,A,g){return function(...C){const B=this.__v_raw,Q=gA(B),E=Eg(Q),e=I==="entries"||I===Symbol.iterator&&E,t=I==="keys"&&E,o=B[I](...C),i=g?eB:A?tB:mA;return!A&&UA(Q,"iterate",t?EB:qI),{next(){const{value:s,done:a}=o.next();return a?{value:s,done:a}:{value:e?[i(s[0]),i(s[1])]:i(s),done:a}},[Symbol.iterator](){return this}}}}function Pg(I){return function(...A){return I==="delete"?!1:I==="clear"?void 0:this}}function mi(I,A){const g={get(B){const Q=this.__v_raw,E=gA(Q),e=gA(B);I||(VA(B,e)&&UA(E,"get",B),UA(E,"get",e));const{has:t}=jg(E),o=A?eB:I?tB:mA;if(t.call(E,B))return o(Q.get(B));if(t.call(E,e))return o(Q.get(e));Q!==E&&Q.get(B)},get size(){const B=this.__v_raw;return!I&&UA(gA(B),"iterate",qI),Reflect.get(B,"size",B)},has(B){const Q=this.__v_raw,E=gA(Q),e=gA(B);return I||(VA(B,e)&&UA(E,"has",B),UA(E,"has",e)),B===e?Q.has(B):Q.has(B)||Q.has(e)},forEach(B,Q){const E=this,e=E.__v_raw,t=gA(e),o=A?eB:I?tB:mA;return!I&&UA(t,"iterate",qI),e.forEach((i,s)=>B.call(Q,o(i),o(s),E))}};return MA(g,I?{add:Pg("add"),set:Pg("set"),delete:Pg("delete"),clear:Pg("clear")}:{add(B){!A&&!$A(B)&&!kI(B)&&(B=gA(B));const Q=gA(this);return jg(Q).has.call(Q,B)||(Q.add(B),NI(Q,"add",B,B)),this},set(B,Q){!A&&!$A(Q)&&!kI(Q)&&(Q=gA(Q));const E=gA(this),{has:e,get:t}=jg(E);let o=e.call(E,B);o||(B=gA(B),o=e.call(E,B));const i=t.call(E,B);return E.set(B,Q),o?VA(Q,i)&&NI(E,"set",B,Q):NI(E,"add",B,Q),this},delete(B){const Q=gA(this),{has:E,get:e}=jg(Q);let t=E.call(Q,B);t||(B=gA(B),t=E.call(Q,B)),e&&e.call(Q,B);const o=Q.delete(B);return t&&NI(Q,"delete",B,void 0),o},clear(){const B=gA(this),Q=B.size!==0,E=B.clear();return Q&&NI(B,"clear",void 0,void 0),E}}),["keys","values","entries",Symbol.iterator].forEach(B=>{g[B]=Ui(B,I,A)}),g}function bB(I,A){const g=mi(I,A);return(C,B,Q)=>B==="__v_isReactive"?!I:B==="__v_isReadonly"?I:B==="__v_raw"?C:Reflect.get(CA(g,B)&&B in C?g:C,B,Q)}const Si={get:bB(!1,!1)},Yi={get:bB(!1,!0)},Ji={get:bB(!0,!1)};const PE=new WeakMap,XE=new WeakMap,zE=new WeakMap,ki=new WeakMap;function Ki(I){switch(I){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pi(I){return I.__v_skip||!Object.isExtensible(I)?0:Ki(Ei(I))}function ZA(I){return kI(I)?I:LB(I,!1,Mi,Si,PE)}function WI(I){return LB(I,!1,Fi,Yi,XE)}function UC(I){return LB(I,!0,Gi,Ji,zE)}function LB(I,A,g,C,B){if(!rA(I)||I.__v_raw&&!(A&&I.__v_isReactive))return I;const Q=B.get(I);if(Q)return Q;const E=pi(I);if(E===0)return I;const e=new Proxy(I,E===2?C:g);return B.set(I,e),e}function eg(I){return kI(I)?eg(I.__v_raw):!!(I&&I.__v_isReactive)}function kI(I){return!!(I&&I.__v_isReadonly)}function $A(I){return!!(I&&I.__v_isShallow)}function TB(I){return I?!!I.__v_raw:!1}function gA(I){const A=I&&I.__v_raw;return A?gA(A):I}function bi(I){return!CA(I,"__v_skip")&&Object.isExtensible(I)&&JE(I,"__v_skip",!0),I}const mA=I=>rA(I)?ZA(I):I,tB=I=>rA(I)?UC(I):I;function yA(I){return I?I.__v_isRef===!0:!1}function oA(I){return $E(I,!1)}function _E(I){return $E(I,!0)}function $E(I,A){return yA(I)?I:new Li(I,A)}class Li{constructor(A,g){this.dep=new GC,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=g?A:gA(A),this._value=g?A:mA(A),this.__v_isShallow=g}get value(){return this.dep.track(),this._value}set value(A){const g=this._rawValue,C=this.__v_isShallow||$A(A)||kI(A);A=C?A:gA(A),VA(A,g)&&(this._rawValue=A,this._value=C?A:mA(A),this.dep.trigger())}}function h(I){return yA(I)?I.value:I}const Ti={get:(I,A,g)=>A==="__v_raw"?I:h(Reflect.get(I,A,g)),set:(I,A,g,C)=>{const B=I[A];return yA(B)&&!yA(g)?(B.value=g,!0):Reflect.set(I,A,g,C)}};function Ae(I){return eg(I)?I:new Proxy(I,Ti)}class Hi{constructor(A){this.__v_isRef=!0,this._value=void 0;const g=this.dep=new GC,{get:C,set:B}=A(g.track.bind(g),g.trigger.bind(g));this._get=C,this._set=B}get value(){return this._value=this._get()}set value(A){this._set(A)}}function Ie(I){return new Hi(I)}class Vi{constructor(A,g,C){this._object=A,this._key=g,this._defaultValue=C,this.__v_isRef=!0,this._value=void 0}get value(){const A=this._object[this._key];return this._value=A===void 0?this._defaultValue:A}set value(A){this._object[this._key]=A}get dep(){return Ni(gA(this._object),this._key)}}class Zi{constructor(A){this._getter=A,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function vi(I,A,g){return yA(I)?I:j(I)?new Zi(I):rA(I)&&arguments.length>1?Oi(I,A,g):oA(I)}function Oi(I,A,g){const C=I[A];return yA(C)?C:new Vi(I,A,g)}class xi{constructor(A,g,C){this.fn=A,this.setter=g,this._value=void 0,this.dep=new GC(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yg-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!g,this.isSSR=C}notify(){if(this.flags|=16,!(this.flags&8)&&iA!==this)return HE(this,!0),!0}get value(){const A=this.dep.track();return vE(this),A&&(A.version=this.dep.version),this._value}set value(A){this.setter&&this.setter(A)}}function qi(I,A,g=!1){let C,B;return j(I)?C=I:(C=I.get,B=I.set),new xi(C,B,g)}const Xg={},sC=new WeakMap;let vI;function Wi(I,A=!1,g=vI){if(g){let C=sC.get(g);C||sC.set(g,C=[]),C.push(I)}}function ji(I,A,g=BA){const{immediate:C,deep:B,once:Q,scheduler:E,augmentJob:e,call:t}=g,o=w=>B?w:$A(w)||B===!1||B===0?SI(w,1):SI(w);let i,s,a,c,N=!1,M=!1;if(yA(I)?(s=()=>I.value,N=$A(I)):eg(I)?(s=()=>o(I),N=!0):q(I)?(M=!0,N=I.some(w=>eg(w)||$A(w)),s=()=>I.map(w=>{if(yA(w))return w.value;if(eg(w))return o(w);if(j(w))return t?t(w,2):w()})):j(I)?A?s=t?()=>t(I,2):I:s=()=>{if(a){bI();try{a()}finally{LI()}}const w=vI;vI=i;try{return t?t(I,3,[c]):I(c)}finally{vI=w}}:s=aI,A&&B){const w=s,Z=B===!0?1/0:B;s=()=>SI(w(),Z)}const d=bE(),m=()=>{i.stop(),d&&YB(d.effects,i)};if(Q&&A){const w=A;A=(...Z)=>{w(...Z),m()}}let b=M?new Array(I.length).fill(Xg):Xg;const R=w=>{if(!(!(i.flags&1)||!i.dirty&&!w))if(A){const Z=i.run();if(B||N||(M?Z.some((sA,DA)=>VA(sA,b[DA])):VA(Z,b))){a&&a();const sA=vI;vI=i;try{const DA=[Z,b===Xg?void 0:M&&b[0]===Xg?[]:b,c];t?t(A,3,DA):A(...DA),b=Z}finally{vI=sA}}}else i.run()};return e&&e(R),i=new LE(s),i.scheduler=E?()=>E(R,!1):R,c=w=>Wi(w,!1,i),a=i.onStop=()=>{const w=sC.get(i);if(w){if(t)t(w,4);else for(const Z of w)Z();sC.delete(i)}},A?C?R(!0):b=i.run():E?E(R.bind(null,!0),!0):i.run(),m.pause=i.pause.bind(i),m.resume=i.resume.bind(i),m.stop=m,m}function SI(I,A=1/0,g){if(A<=0||!rA(I)||I.__v_skip||(g=g||new Set,g.has(I)))return I;if(g.add(I),A--,yA(I))SI(I.value,A,g);else if(q(I))for(let C=0;C{SI(C,A,g)});else if(SE(I)){for(const C in I)SI(I[C],A,g);for(const C of Object.getOwnPropertySymbols(I))Object.prototype.propertyIsEnumerable.call(I,C)&&SI(I[C],A,g)}return I}/** +**/let pA;class ci{constructor(A=!1){this.detached=A,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=pA,!A&&pA&&(this.index=(pA.scopes||(pA.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let A,g;if(this.scopes)for(A=0,g=this.scopes.length;A0)return;if(Ug){let A=Ug;for(Ug=void 0;A;){const g=A.next;A.next=void 0,A.flags&=-9,A=g}}let I;for(;Fg;){let A=Fg;for(Fg=void 0;A;){const g=A.next;if(A.next=void 0,A.flags&=-9,A.flags&1)try{A.trigger()}catch(C){I||(I=C)}A=g}}if(I)throw I}function VE(I){for(let A=I.deps;A;A=A.nextDep)A.version=-1,A.prevActiveLink=A.dep.activeLink,A.dep.activeLink=A}function ZE(I){let A,g=I.depsTail,C=g;for(;C;){const B=C.prevDep;C.version===-1?(C===g&&(g=B),pB(C),hi(C)):A=C,C.dep.activeLink=C.prevActiveLink,C.prevActiveLink=void 0,C=B}I.deps=A,I.depsTail=g}function QB(I){for(let A=I.deps;A;A=A.nextDep)if(A.dep.version!==A.version||A.dep.computed&&(vE(A.dep.computed)||A.dep.version!==A.version))return!0;return!!I._dirty}function vE(I){if(I.flags&4&&!(I.flags&16)||(I.flags&=-17,I.globalVersion===Yg))return;I.globalVersion=Yg;const A=I.dep;if(I.flags|=2,A.version>0&&!I.isSSR&&I.deps&&!QB(I)){I.flags&=-3;return}const g=iA,C=QI;iA=I,QI=!0;try{VE(I);const B=I.fn(I._value);(A.version===0||VA(B,I._value))&&(I._value=B,A.version++)}catch(B){throw A.version++,B}finally{iA=g,QI=C,ZE(I),I.flags&=-3}}function pB(I,A=!1){const{dep:g,prevSub:C,nextSub:B}=I;if(C&&(C.nextSub=B,I.prevSub=void 0),B&&(B.prevSub=C,I.nextSub=void 0),g.subs===I&&(g.subs=C,!C&&g.computed)){g.computed.flags&=-5;for(let Q=g.computed.deps;Q;Q=Q.nextDep)pB(Q,!0)}!A&&!--g.sc&&g.map&&g.map.delete(g.key)}function hi(I){const{prevDep:A,nextDep:g}=I;A&&(A.nextDep=g,I.prevDep=void 0),g&&(g.prevDep=A,I.nextDep=void 0)}let QI=!0;const OE=[];function bI(){OE.push(QI),QI=!1}function LI(){const I=OE.pop();QI=I===void 0?!0:I}function cQ(I){const{cleanup:A}=I;if(I.cleanup=void 0,A){const g=iA;iA=void 0;try{A()}finally{iA=g}}}let Yg=0;class wi{constructor(A,g){this.sub=A,this.dep=g,this.version=g.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class GC{constructor(A){this.computed=A,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(A){if(!iA||!QI||iA===this.computed)return;let g=this.activeLink;if(g===void 0||g.sub!==iA)g=this.activeLink=new wi(iA,this),iA.deps?(g.prevDep=iA.depsTail,iA.depsTail.nextDep=g,iA.depsTail=g):iA.deps=iA.depsTail=g,xE(g);else if(g.version===-1&&(g.version=this.version,g.nextDep)){const C=g.nextDep;C.prevDep=g.prevDep,g.prevDep&&(g.prevDep.nextDep=C),g.prevDep=iA.depsTail,g.nextDep=void 0,iA.depsTail.nextDep=g,iA.depsTail=g,iA.deps===g&&(iA.deps=C)}return g}trigger(A){this.version++,Yg++,this.notify(A)}notify(A){kB();try{for(let g=this.subs;g;g=g.prevSub)g.sub.notify()&&g.sub.dep.notify()}finally{KB()}}}function xE(I){if(I.dep.sc++,I.sub.flags&4){const A=I.dep.computed;if(A&&!I.dep.subs){A.flags|=20;for(let C=A.deps;C;C=C.nextDep)xE(C)}const g=I.dep.subs;g!==I&&(I.prevSub=g,g&&(g.nextSub=I)),I.dep.subs=I}}const oC=new WeakMap,qI=Symbol(""),EB=Symbol(""),Jg=Symbol("");function UA(I,A,g){if(QI&&iA){let C=oC.get(I);C||oC.set(I,C=new Map);let B=C.get(g);B||(C.set(g,B=new GC),B.map=C,B.key=g),B.track()}}function NI(I,A,g,C,B,Q){const E=oC.get(I);if(!E){Yg++;return}const e=t=>{t&&t.trigger()};if(kB(),A==="clear")E.forEach(e);else{const t=q(I),o=t&&JB(g);if(t&&g==="length"){const i=Number(C);E.forEach((s,a)=>{(a==="length"||a===Jg||!yI(a)&&a>=i)&&e(s)})}else switch((g!==void 0||E.has(void 0))&&e(E.get(g)),o&&e(E.get(Jg)),A){case"add":t?o&&e(E.get("length")):(e(E.get(qI)),Eg(I)&&e(E.get(EB)));break;case"delete":t||(e(E.get(qI)),Eg(I)&&e(E.get(EB)));break;case"set":Eg(I)&&e(E.get(qI));break}}KB()}function Ni(I,A){const g=oC.get(I);return g&&g.get(A)}function Ag(I){const A=gA(I);return A===I?A:(UA(A,"iterate",Jg),$A(I)?A:A.map(mA))}function FC(I){return UA(I=gA(I),"iterate",Jg),I}const Ri={__proto__:null,[Symbol.iterator](){return qC(this,Symbol.iterator,mA)},concat(...I){return Ag(this).concat(...I.map(A=>q(A)?Ag(A):A))},entries(){return qC(this,"entries",I=>(I[1]=mA(I[1]),I))},every(I,A){return DI(this,"every",I,A,void 0,arguments)},filter(I,A){return DI(this,"filter",I,A,g=>g.map(mA),arguments)},find(I,A){return DI(this,"find",I,A,mA,arguments)},findIndex(I,A){return DI(this,"findIndex",I,A,void 0,arguments)},findLast(I,A){return DI(this,"findLast",I,A,mA,arguments)},findLastIndex(I,A){return DI(this,"findLastIndex",I,A,void 0,arguments)},forEach(I,A){return DI(this,"forEach",I,A,void 0,arguments)},includes(...I){return WC(this,"includes",I)},indexOf(...I){return WC(this,"indexOf",I)},join(I){return Ag(this).join(I)},lastIndexOf(...I){return WC(this,"lastIndexOf",I)},map(I,A){return DI(this,"map",I,A,void 0,arguments)},pop(){return Dg(this,"pop")},push(...I){return Dg(this,"push",I)},reduce(I,...A){return DQ(this,"reduce",I,A)},reduceRight(I,...A){return DQ(this,"reduceRight",I,A)},shift(){return Dg(this,"shift")},some(I,A){return DI(this,"some",I,A,void 0,arguments)},splice(...I){return Dg(this,"splice",I)},toReversed(){return Ag(this).toReversed()},toSorted(I){return Ag(this).toSorted(I)},toSpliced(...I){return Ag(this).toSpliced(...I)},unshift(...I){return Dg(this,"unshift",I)},values(){return qC(this,"values",mA)}};function qC(I,A,g){const C=FC(I),B=C[A]();return C!==I&&!$A(I)&&(B._next=B.next,B.next=()=>{const Q=B._next();return Q.value&&(Q.value=g(Q.value)),Q}),B}const ui=Array.prototype;function DI(I,A,g,C,B,Q){const E=FC(I),e=E!==I&&!$A(I),t=E[A];if(t!==ui[A]){const s=t.apply(I,Q);return e?mA(s):s}let o=g;E!==I&&(e?o=function(s,a){return g.call(this,mA(s),a,I)}:g.length>2&&(o=function(s,a){return g.call(this,s,a,I)}));const i=t.call(E,o,C);return e&&B?B(i):i}function DQ(I,A,g,C){const B=FC(I);let Q=g;return B!==I&&($A(I)?g.length>3&&(Q=function(E,e,t){return g.call(this,E,e,t,I)}):Q=function(E,e,t){return g.call(this,E,mA(e),t,I)}),B[A](Q,...C)}function WC(I,A,g){const C=gA(I);UA(C,"iterate",Jg);const B=C[A](...g);return(B===-1||B===!1)&&TB(g[0])?(g[0]=gA(g[0]),C[A](...g)):B}function Dg(I,A,g=[]){bI(),kB();const C=gA(I)[A].apply(I,g);return KB(),LI(),C}const fi=mB("__proto__,__v_isRef,__isVue"),qE=new Set(Object.getOwnPropertyNames(Symbol).filter(I=>I!=="arguments"&&I!=="caller").map(I=>Symbol[I]).filter(yI));function di(I){yI(I)||(I=String(I));const A=gA(this);return UA(A,"has",I),A.hasOwnProperty(I)}class WE{constructor(A=!1,g=!1){this._isReadonly=A,this._isShallow=g}get(A,g,C){const B=this._isReadonly,Q=this._isShallow;if(g==="__v_isReactive")return!B;if(g==="__v_isReadonly")return B;if(g==="__v_isShallow")return Q;if(g==="__v_raw")return C===(B?Q?ki:zE:Q?XE:PE).get(A)||Object.getPrototypeOf(A)===Object.getPrototypeOf(C)?A:void 0;const E=q(A);if(!B){let t;if(E&&(t=Ri[g]))return t;if(g==="hasOwnProperty")return di}const e=Reflect.get(A,g,yA(A)?A:C);return(yI(g)?qE.has(g):fi(g))||(B||UA(A,"get",g),Q)?e:yA(e)?E&&JB(g)?e:e.value:rA(e)?B?UC(e):ZA(e):e}}class jE extends WE{constructor(A=!1){super(!1,A)}set(A,g,C,B){let Q=A[g];if(!this._isShallow){const t=kI(Q);if(!$A(C)&&!kI(C)&&(Q=gA(Q),C=gA(C)),!q(A)&&yA(Q)&&!yA(C))return t?!1:(Q.value=C,!0)}const E=q(A)&&JB(g)?Number(g)I,jg=I=>Reflect.getPrototypeOf(I);function Ui(I,A,g){return function(...C){const B=this.__v_raw,Q=gA(B),E=Eg(Q),e=I==="entries"||I===Symbol.iterator&&E,t=I==="keys"&&E,o=B[I](...C),i=g?eB:A?tB:mA;return!A&&UA(Q,"iterate",t?EB:qI),{next(){const{value:s,done:a}=o.next();return a?{value:s,done:a}:{value:e?[i(s[0]),i(s[1])]:i(s),done:a}},[Symbol.iterator](){return this}}}}function Pg(I){return function(...A){return I==="delete"?!1:I==="clear"?void 0:this}}function mi(I,A){const g={get(B){const Q=this.__v_raw,E=gA(Q),e=gA(B);I||(VA(B,e)&&UA(E,"get",B),UA(E,"get",e));const{has:t}=jg(E),o=A?eB:I?tB:mA;if(t.call(E,B))return o(Q.get(B));if(t.call(E,e))return o(Q.get(e));Q!==E&&Q.get(B)},get size(){const B=this.__v_raw;return!I&&UA(gA(B),"iterate",qI),Reflect.get(B,"size",B)},has(B){const Q=this.__v_raw,E=gA(Q),e=gA(B);return I||(VA(B,e)&&UA(E,"has",B),UA(E,"has",e)),B===e?Q.has(B):Q.has(B)||Q.has(e)},forEach(B,Q){const E=this,e=E.__v_raw,t=gA(e),o=A?eB:I?tB:mA;return!I&&UA(t,"iterate",qI),e.forEach((i,s)=>B.call(Q,o(i),o(s),E))}};return MA(g,I?{add:Pg("add"),set:Pg("set"),delete:Pg("delete"),clear:Pg("clear")}:{add(B){!A&&!$A(B)&&!kI(B)&&(B=gA(B));const Q=gA(this);return jg(Q).has.call(Q,B)||(Q.add(B),NI(Q,"add",B,B)),this},set(B,Q){!A&&!$A(Q)&&!kI(Q)&&(Q=gA(Q));const E=gA(this),{has:e,get:t}=jg(E);let o=e.call(E,B);o||(B=gA(B),o=e.call(E,B));const i=t.call(E,B);return E.set(B,Q),o?VA(Q,i)&&NI(E,"set",B,Q):NI(E,"add",B,Q),this},delete(B){const Q=gA(this),{has:E,get:e}=jg(Q);let t=E.call(Q,B);t||(B=gA(B),t=E.call(Q,B)),e&&e.call(Q,B);const o=Q.delete(B);return t&&NI(Q,"delete",B,void 0),o},clear(){const B=gA(this),Q=B.size!==0,E=B.clear();return Q&&NI(B,"clear",void 0,void 0),E}}),["keys","values","entries",Symbol.iterator].forEach(B=>{g[B]=Ui(B,I,A)}),g}function bB(I,A){const g=mi(I,A);return(C,B,Q)=>B==="__v_isReactive"?!I:B==="__v_isReadonly"?I:B==="__v_raw"?C:Reflect.get(CA(g,B)&&B in C?g:C,B,Q)}const Si={get:bB(!1,!1)},Yi={get:bB(!1,!0)},Ji={get:bB(!0,!1)};const PE=new WeakMap,XE=new WeakMap,zE=new WeakMap,ki=new WeakMap;function Ki(I){switch(I){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pi(I){return I.__v_skip||!Object.isExtensible(I)?0:Ki(Ei(I))}function ZA(I){return kI(I)?I:LB(I,!1,Mi,Si,PE)}function WI(I){return LB(I,!1,Fi,Yi,XE)}function UC(I){return LB(I,!0,Gi,Ji,zE)}function LB(I,A,g,C,B){if(!rA(I)||I.__v_raw&&!(A&&I.__v_isReactive))return I;const Q=B.get(I);if(Q)return Q;const E=pi(I);if(E===0)return I;const e=new Proxy(I,E===2?C:g);return B.set(I,e),e}function eg(I){return kI(I)?eg(I.__v_raw):!!(I&&I.__v_isReactive)}function kI(I){return!!(I&&I.__v_isReadonly)}function $A(I){return!!(I&&I.__v_isShallow)}function TB(I){return I?!!I.__v_raw:!1}function gA(I){const A=I&&I.__v_raw;return A?gA(A):I}function bi(I){return!CA(I,"__v_skip")&&Object.isExtensible(I)&&JE(I,"__v_skip",!0),I}const mA=I=>rA(I)?ZA(I):I,tB=I=>rA(I)?UC(I):I;function yA(I){return I?I.__v_isRef===!0:!1}function oA(I){return $E(I,!1)}function _E(I){return $E(I,!0)}function $E(I,A){return yA(I)?I:new Li(I,A)}class Li{constructor(A,g){this.dep=new GC,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=g?A:gA(A),this._value=g?A:mA(A),this.__v_isShallow=g}get value(){return this.dep.track(),this._value}set value(A){const g=this._rawValue,C=this.__v_isShallow||$A(A)||kI(A);A=C?A:gA(A),VA(A,g)&&(this._rawValue=A,this._value=C?A:mA(A),this.dep.trigger())}}function h(I){return yA(I)?I.value:I}const Ti={get:(I,A,g)=>A==="__v_raw"?I:h(Reflect.get(I,A,g)),set:(I,A,g,C)=>{const B=I[A];return yA(B)&&!yA(g)?(B.value=g,!0):Reflect.set(I,A,g,C)}};function Ae(I){return eg(I)?I:new Proxy(I,Ti)}class Hi{constructor(A){this.__v_isRef=!0,this._value=void 0;const g=this.dep=new GC,{get:C,set:B}=A(g.track.bind(g),g.trigger.bind(g));this._get=C,this._set=B}get value(){return this._value=this._get()}set value(A){this._set(A)}}function Ie(I){return new Hi(I)}class Vi{constructor(A,g,C){this._object=A,this._key=g,this._defaultValue=C,this.__v_isRef=!0,this._value=void 0}get value(){const A=this._object[this._key];return this._value=A===void 0?this._defaultValue:A}set value(A){this._object[this._key]=A}get dep(){return Ni(gA(this._object),this._key)}}class Zi{constructor(A){this._getter=A,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function vi(I,A,g){return yA(I)?I:j(I)?new Zi(I):rA(I)&&arguments.length>1?Oi(I,A,g):oA(I)}function Oi(I,A,g){const C=I[A];return yA(C)?C:new Vi(I,A,g)}class xi{constructor(A,g,C){this.fn=A,this.setter=g,this._value=void 0,this.dep=new GC(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yg-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!g,this.isSSR=C}notify(){if(this.flags|=16,!(this.flags&8)&&iA!==this)return HE(this,!0),!0}get value(){const A=this.dep.track();return vE(this),A&&(A.version=this.dep.version),this._value}set value(A){this.setter&&this.setter(A)}}function qi(I,A,g=!1){let C,B;return j(I)?C=I:(C=I.get,B=I.set),new xi(C,B,g)}const Xg={},sC=new WeakMap;let vI;function Wi(I,A=!1,g=vI){if(g){let C=sC.get(g);C||sC.set(g,C=[]),C.push(I)}}function ji(I,A,g=BA){const{immediate:C,deep:B,once:Q,scheduler:E,augmentJob:e,call:t}=g,o=w=>B?w:$A(w)||B===!1||B===0?SI(w,1):SI(w);let i,s,a,c,N=!1,M=!1;if(yA(I)?(s=()=>I.value,N=$A(I)):eg(I)?(s=()=>o(I),N=!0):q(I)?(M=!0,N=I.some(w=>eg(w)||$A(w)),s=()=>I.map(w=>{if(yA(w))return w.value;if(eg(w))return o(w);if(j(w))return t?t(w,2):w()})):j(I)?A?s=t?()=>t(I,2):I:s=()=>{if(a){bI();try{a()}finally{LI()}}const w=vI;vI=i;try{return t?t(I,3,[c]):I(c)}finally{vI=w}}:s=aI,A&&B){const w=s,Z=B===!0?1/0:B;s=()=>SI(w(),Z)}const d=bE(),U=()=>{i.stop(),d&&YB(d.effects,i)};if(Q&&A){const w=A;A=(...Z)=>{w(...Z),U()}}let b=M?new Array(I.length).fill(Xg):Xg;const R=w=>{if(!(!(i.flags&1)||!i.dirty&&!w))if(A){const Z=i.run();if(B||N||(M?Z.some((sA,DA)=>VA(sA,b[DA])):VA(Z,b))){a&&a();const sA=vI;vI=i;try{const DA=[Z,b===Xg?void 0:M&&b[0]===Xg?[]:b,c];t?t(A,3,DA):A(...DA),b=Z}finally{vI=sA}}}else i.run()};return e&&e(R),i=new LE(s),i.scheduler=E?()=>E(R,!1):R,c=w=>Wi(w,!1,i),a=i.onStop=()=>{const w=sC.get(i);if(w){if(t)t(w,4);else for(const Z of w)Z();sC.delete(i)}},A?C?R(!0):b=i.run():E?E(R.bind(null,!0),!0):i.run(),U.pause=i.pause.bind(i),U.resume=i.resume.bind(i),U.stop=U,U}function SI(I,A=1/0,g){if(A<=0||!rA(I)||I.__v_skip||(g=g||new Set,g.has(I)))return I;if(g.add(I),A--,yA(I))SI(I.value,A,g);else if(q(I))for(let C=0;C{SI(C,A,g)});else if(SE(I)){for(const C in I)SI(I[C],A,g);for(const C of Object.getOwnPropertySymbols(I))Object.prototype.propertyIsEnumerable.call(I,C)&&SI(I[C],A,g)}return I}/** * @vue/runtime-core v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Tg(I,A,g,C){try{return C?I(...C):I()}catch(B){mC(B,A,g)}}function lI(I,A,g,C){if(j(I)){const B=Tg(I,A,g,C);return B&&UE(B)&&B.catch(Q=>{mC(Q,A,g)}),B}if(q(I)){const B=[];for(let Q=0;Q>>1,B=bA[C],Q=kg(B);Q=kg(g)?bA.push(I):bA.splice(Xi(A),0,I),I.flags|=1,Ce()}}function Ce(){nC||(nC=ge.then(Qe))}function zi(I){q(I)?tg.push(...I):FI&&I.id===-1?FI.splice(gg+1,0,I):I.flags&1||(tg.push(I),I.flags|=1),Ce()}function hQ(I,A,g=sI+1){for(;gkg(g)-kg(C));if(tg.length=0,FI){FI.push(...A);return}for(FI=A,gg=0;ggI.id==null?I.flags&2?-1:1/0:I.id;function Qe(I){try{for(sI=0;sI{C._d&&yQ(-1);const Q=rC(A);let E;try{E=I(...B)}finally{rC(Q),C._d&&yQ(1)}return E};return C._n=!0,C._c=!0,C._d=!0,C}function VI(I,A,g,C){const B=I.dirs,Q=A&&A.dirs;for(let E=0;EI.__isTeleport;function VB(I,A){I.shapeFlag&6&&I.component?(I.transition=A,VB(I.component.subTree,A)):I.shapeFlag&128?(I.ssContent.transition=A.clone(I.ssContent),I.ssFallback.transition=A.clone(I.ssFallback)):I.transition=A}function ee(I){I.ids=[I.ids[0]+I.ids[2]+++"-",0,0]}function iB(I,A,g,C,B=!1){if(q(I)){I.forEach((N,M)=>iB(N,A&&(q(A)?A[M]:A),g,C,B));return}if(ig(C)&&!B)return;const Q=C.shapeFlag&4?jB(C.component):C.el,E=B?null:Q,{i:e,r:t}=I,o=A&&A.r,i=e.refs===BA?e.refs={}:e.refs,s=e.setupState,a=gA(s),c=s===BA?()=>!1:N=>CA(a,N);if(o!=null&&o!==t&&(fA(o)?(i[o]=null,c(o)&&(s[o]=null)):yA(o)&&(o.value=null)),j(t))Tg(t,e,12,[E,i]);else{const N=fA(t),M=yA(t);if(N||M){const d=()=>{if(I.f){const m=N?c(t)?s[t]:i[t]:t.value;B?q(m)&&YB(m,Q):q(m)?m.includes(Q)||m.push(Q):N?(i[t]=[Q],c(t)&&(s[t]=i[t])):(t.value=[Q],I.k&&(i[I.k]=t.value))}else N?(i[t]=E,c(t)&&(s[t]=E)):M&&(t.value=E,I.k&&(i[I.k]=E))};E?(d.id=-1,WA(d,g)):d()}}}MC().requestIdleCallback;MC().cancelIdleCallback;const ig=I=>!!I.type.__asyncLoader,te=I=>I.type.__isKeepAlive;function Io(I,A){ie(I,"a",A)}function go(I,A){ie(I,"da",A)}function ie(I,A,g=YA){const C=I.__wdc||(I.__wdc=()=>{let B=g;for(;B;){if(B.isDeactivated)return;B=B.parent}return I()});if(YC(A,C,g),g){let B=g.parent;for(;B&&B.parent;)te(B.parent.vnode)&&Co(C,A,g,B),B=B.parent}}function Co(I,A,g,C){const B=YC(A,I,C,!0);JC(()=>{YB(C[A],B)},g)}function YC(I,A,g=YA,C=!1){if(g){const B=g[I]||(g[I]=[]),Q=A.__weh||(A.__weh=(...E)=>{bI();const e=Hg(g),t=lI(A,g,I,E);return e(),LI(),t});return C?B.unshift(Q):B.push(Q),Q}}const MI=I=>(A,g=YA)=>{(!pg||I==="sp")&&YC(I,(...C)=>A(...C),g)},Bo=MI("bm"),ng=MI("m"),Qo=MI("bu"),Eo=MI("u"),eo=MI("bum"),JC=MI("um"),to=MI("sp"),io=MI("rtg"),oo=MI("rtc");function so(I,A=YA){YC("ec",I,A)}const no=Symbol.for("v-ndc");function XA(I,A,g,C){let B;const Q=g,E=q(I);if(E||fA(I)){const e=E&&eg(I);let t=!1;e&&(t=!$A(I),I=FC(I)),B=new Array(I.length);for(let o=0,i=I.length;oA(e,t,void 0,Q));else{const e=Object.keys(I);B=new Array(e.length);for(let t=0,o=e.length;txB(A)?!(A.type===KI||A.type===nA&&!se(A.children)):!0)?I:null}const oB=I=>I?Ye(I)?jB(I):oB(I.parent):null,mg=MA(Object.create(null),{$:I=>I,$el:I=>I.vnode.el,$data:I=>I.data,$props:I=>I.props,$attrs:I=>I.attrs,$slots:I=>I.slots,$refs:I=>I.refs,$parent:I=>oB(I.parent),$root:I=>oB(I.root),$host:I=>I.ce,$emit:I=>I.emit,$options:I=>ZB(I),$forceUpdate:I=>I.f||(I.f=()=>{HB(I.update)}),$nextTick:I=>I.n||(I.n=SC.bind(I.proxy)),$watch:I=>po.bind(I)}),jC=(I,A)=>I!==BA&&!I.__isScriptSetup&&CA(I,A),ro={get({_:I},A){if(A==="__v_skip")return!0;const{ctx:g,setupState:C,data:B,props:Q,accessCache:E,type:e,appContext:t}=I;let o;if(A[0]!=="$"){const c=E[A];if(c!==void 0)switch(c){case 1:return C[A];case 2:return B[A];case 4:return g[A];case 3:return Q[A]}else{if(jC(C,A))return E[A]=1,C[A];if(B!==BA&&CA(B,A))return E[A]=2,B[A];if((o=I.propsOptions[0])&&CA(o,A))return E[A]=3,Q[A];if(g!==BA&&CA(g,A))return E[A]=4,g[A];sB&&(E[A]=0)}}const i=mg[A];let s,a;if(i)return A==="$attrs"&&UA(I.attrs,"get",""),i(I);if((s=e.__cssModules)&&(s=s[A]))return s;if(g!==BA&&CA(g,A))return E[A]=4,g[A];if(a=t.config.globalProperties,CA(a,A))return a[A]},set({_:I},A,g){const{data:C,setupState:B,ctx:Q}=I;return jC(B,A)?(B[A]=g,!0):C!==BA&&CA(C,A)?(C[A]=g,!0):CA(I.props,A)||A[0]==="$"&&A.slice(1)in I?!1:(Q[A]=g,!0)},has({_:{data:I,setupState:A,accessCache:g,ctx:C,appContext:B,propsOptions:Q}},E){let e;return!!g[E]||I!==BA&&CA(I,E)||jC(A,E)||(e=Q[0])&&CA(e,E)||CA(C,E)||CA(mg,E)||CA(B.config.globalProperties,E)},defineProperty(I,A,g){return g.get!=null?I._.accessCache[A]=0:CA(g,"value")&&this.set(I,A,g.value,null),Reflect.defineProperty(I,A,g)}};function aC(I){return q(I)?I.reduce((A,g)=>(A[g]=null,A),{}):I}function ne(I,A){return!I||!A?I||A:q(I)&&q(A)?I.concat(A):MA({},aC(I),aC(A))}let sB=!0;function ao(I){const A=ZB(I),g=I.proxy,C=I.ctx;sB=!1,A.beforeCreate&&wQ(A.beforeCreate,I,"bc");const{data:B,computed:Q,methods:E,watch:e,provide:t,inject:o,created:i,beforeMount:s,mounted:a,beforeUpdate:c,updated:N,activated:M,deactivated:d,beforeDestroy:m,beforeUnmount:b,destroyed:R,unmounted:w,render:Z,renderTracked:sA,renderTriggered:DA,errorCaptured:hA,serverPrefetch:vA,expose:P,inheritAttrs:O,components:wA,directives:PA,filters:HC}=A;if(o&&lo(o,C,null),E)for(const aA in E){const eA=E[aA];j(eA)&&(C[aA]=eA.bind(g))}if(B){const aA=B.call(g,g);rA(aA)&&(I.data=ZA(aA))}if(sB=!0,Q)for(const aA in Q){const eA=Q[aA],TI=j(eA)?eA.bind(g,g):j(eA.get)?eA.get.bind(g,g):aI,qg=!j(eA)&&j(eA.set)?eA.set.bind(g):aI,HI=uA({get:TI,set:qg});Object.defineProperty(C,aA,{enumerable:!0,configurable:!0,get:()=>HI.value,set:eI=>HI.value=eI})}if(e)for(const aA in e)re(e[aA],C,g,aA);if(t){const aA=j(t)?t.call(g):t;Reflect.ownKeys(aA).forEach(eA=>{Ro(eA,aA[eA])})}i&&wQ(i,I,"c");function JA(aA,eA){q(eA)?eA.forEach(TI=>aA(TI.bind(g))):eA&&aA(eA.bind(g))}if(JA(Bo,s),JA(ng,a),JA(Qo,c),JA(Eo,N),JA(Io,M),JA(go,d),JA(so,hA),JA(oo,sA),JA(io,DA),JA(eo,b),JA(JC,w),JA(to,vA),q(P))if(P.length){const aA=I.exposed||(I.exposed={});P.forEach(eA=>{Object.defineProperty(aA,eA,{get:()=>g[eA],set:TI=>g[eA]=TI})})}else I.exposed||(I.exposed={});Z&&I.render===aI&&(I.render=Z),O!=null&&(I.inheritAttrs=O),wA&&(I.components=wA),PA&&(I.directives=PA),vA&&ee(I)}function lo(I,A,g=aI){q(I)&&(I=nB(I));for(const C in I){const B=I[C];let Q;rA(B)?"default"in B?Q=BC(B.from||C,B.default,!0):Q=BC(B.from||C):Q=BC(B),yA(Q)?Object.defineProperty(A,C,{enumerable:!0,configurable:!0,get:()=>Q.value,set:E=>Q.value=E}):A[C]=Q}}function wQ(I,A,g){lI(q(I)?I.map(C=>C.bind(A.proxy)):I.bind(A.proxy),A,g)}function re(I,A,g,C){let B=C.includes(".")?Me(g,C):()=>g[C];if(fA(I)){const Q=A[I];j(Q)&&AI(B,Q)}else if(j(I))AI(B,I.bind(g));else if(rA(I))if(q(I))I.forEach(Q=>re(Q,A,g,C));else{const Q=j(I.handler)?I.handler.bind(g):A[I.handler];j(Q)&&AI(B,Q,I)}}function ZB(I){const A=I.type,{mixins:g,extends:C}=A,{mixins:B,optionsCache:Q,config:{optionMergeStrategies:E}}=I.appContext,e=Q.get(A);let t;return e?t=e:!B.length&&!g&&!C?t=A:(t={},B.length&&B.forEach(o=>lC(t,o,E,!0)),lC(t,A,E)),rA(A)&&Q.set(A,t),t}function lC(I,A,g,C=!1){const{mixins:B,extends:Q}=A;Q&&lC(I,Q,g,!0),B&&B.forEach(E=>lC(I,E,g,!0));for(const E in A)if(!(C&&E==="expose")){const e=co[E]||g&&g[E];I[E]=e?e(I[E],A[E]):A[E]}return I}const co={data:NQ,props:RQ,emits:RQ,methods:dg,computed:dg,beforeCreate:KA,created:KA,beforeMount:KA,mounted:KA,beforeUpdate:KA,updated:KA,beforeDestroy:KA,beforeUnmount:KA,destroyed:KA,unmounted:KA,activated:KA,deactivated:KA,errorCaptured:KA,serverPrefetch:KA,components:dg,directives:dg,watch:ho,provide:NQ,inject:Do};function NQ(I,A){return A?I?function(){return MA(j(I)?I.call(this,this):I,j(A)?A.call(this,this):A)}:A:I}function Do(I,A){return dg(nB(I),nB(A))}function nB(I){if(q(I)){const A={};for(let g=0;g1)return g&&j(A)?A.call(C&&C.proxy):A}}const le={},ce=()=>Object.create(le),De=I=>Object.getPrototypeOf(I)===le;function uo(I,A,g,C=!1){const B={},Q=ce();I.propsDefaults=Object.create(null),he(I,A,B,Q);for(const E in I.propsOptions[0])E in B||(B[E]=void 0);g?I.props=C?B:WI(B):I.type.props?I.props=B:I.props=Q,I.attrs=Q}function fo(I,A,g,C){const{props:B,attrs:Q,vnode:{patchFlag:E}}=I,e=gA(B),[t]=I.propsOptions;let o=!1;if((C||E>0)&&!(E&16)){if(E&8){const i=I.vnode.dynamicProps;for(let s=0;s{t=!0;const[a,c]=we(s,A,!0);MA(E,a),c&&e.push(...c)};!g&&A.mixins.length&&A.mixins.forEach(i),I.extends&&i(I.extends),I.mixins&&I.mixins.forEach(i)}if(!Q&&!t)return rA(I)&&C.set(I,Qg),Qg;if(q(Q))for(let i=0;iI[0]==="_"||I==="$stable",vB=I=>q(I)?I.map(nI):[nI(I)],Mo=(I,A,g)=>{if(A._n)return A;const C=_i((...B)=>vB(A(...B)),g);return C._c=!1,C},Re=(I,A,g)=>{const C=I._ctx;for(const B in I){if(Ne(B))continue;const Q=I[B];if(j(Q))A[B]=Mo(B,Q,C);else if(Q!=null){const E=vB(Q);A[B]=()=>E}}},ue=(I,A)=>{const g=vB(A);I.slots.default=()=>g},fe=(I,A,g)=>{for(const C in A)(g||C!=="_")&&(I[C]=A[C])},Go=(I,A,g)=>{const C=I.slots=ce();if(I.vnode.shapeFlag&32){const B=A._;B?(fe(C,A,g),g&&JE(C,"_",B,!0)):Re(A,C)}else A&&ue(I,A)},Fo=(I,A,g)=>{const{vnode:C,slots:B}=I;let Q=!0,E=BA;if(C.shapeFlag&32){const e=A._;e?g&&e===1?Q=!1:fe(B,A,g):(Q=!A.$stable,Re(A,B)),E=A}else A&&(ue(I,A),E={default:1});if(Q)for(const e in B)!Ne(e)&&E[e]==null&&delete B[e]},WA=Zo;function Uo(I){return mo(I)}function mo(I,A){const g=MC();g.__VUE__=!0;const{insert:C,remove:B,patchProp:Q,createElement:E,createText:e,createComment:t,setText:o,setElementText:i,parentNode:s,nextSibling:a,setScopeId:c=aI,insertStaticContent:N}=I,M=(n,l,u,S=null,G=null,U=null,T=void 0,p=null,K=!!l.dynamicChildren)=>{if(n===l)return;n&&!hg(n,l)&&(S=Wg(n),eI(n,G,U,!0),n=null),l.patchFlag===-2&&(K=!1,l.dynamicChildren=null);const{type:Y,ref:v,shapeFlag:H}=l;switch(Y){case KC:d(n,l,u,S);break;case KI:m(n,l,u,S);break;case QC:n==null&&b(l,u,S,T);break;case nA:wA(n,l,u,S,G,U,T,p,K);break;default:H&1?Z(n,l,u,S,G,U,T,p,K):H&6?PA(n,l,u,S,G,U,T,p,K):(H&64||H&128)&&Y.process(n,l,u,S,G,U,T,p,K,lg)}v!=null&&G&&iB(v,n&&n.ref,U,l||n,!l)},d=(n,l,u,S)=>{if(n==null)C(l.el=e(l.children),u,S);else{const G=l.el=n.el;l.children!==n.children&&o(G,l.children)}},m=(n,l,u,S)=>{n==null?C(l.el=t(l.children||""),u,S):l.el=n.el},b=(n,l,u,S)=>{[n.el,n.anchor]=N(n.children,l,u,S,n.el,n.anchor)},R=({el:n,anchor:l},u,S)=>{let G;for(;n&&n!==l;)G=a(n),C(n,u,S),n=G;C(l,u,S)},w=({el:n,anchor:l})=>{let u;for(;n&&n!==l;)u=a(n),B(n),n=u;B(l)},Z=(n,l,u,S,G,U,T,p,K)=>{l.type==="svg"?T="svg":l.type==="math"&&(T="mathml"),n==null?sA(l,u,S,G,U,T,p,K):vA(n,l,G,U,T,p,K)},sA=(n,l,u,S,G,U,T,p)=>{let K,Y;const{props:v,shapeFlag:H,transition:V,dirs:x}=n;if(K=n.el=E(n.type,U,v&&v.is,v),H&8?i(K,n.children):H&16&&hA(n.children,K,null,S,G,PC(n,U),T,p),x&&VI(n,null,S,"created"),DA(K,n,n.scopeId,T,S),v){for(const tA in v)tA!=="value"&&!Gg(tA)&&Q(K,tA,null,v[tA],U,S);"value"in v&&Q(K,"value",null,v.value,U),(Y=v.onVnodeBeforeMount)&&iI(Y,S,n)}x&&VI(n,null,S,"beforeMount");const $=So(G,V);$&&V.beforeEnter(K),C(K,l,u),((Y=v&&v.onVnodeMounted)||$||x)&&WA(()=>{Y&&iI(Y,S,n),$&&V.enter(K),x&&VI(n,null,S,"mounted")},G)},DA=(n,l,u,S,G)=>{if(u&&c(n,u),S)for(let U=0;U{for(let Y=K;Y{const p=l.el=n.el;let{patchFlag:K,dynamicChildren:Y,dirs:v}=l;K|=n.patchFlag&16;const H=n.props||BA,V=l.props||BA;let x;if(u&&ZI(u,!1),(x=V.onVnodeBeforeUpdate)&&iI(x,u,l,n),v&&VI(l,n,u,"beforeUpdate"),u&&ZI(u,!0),(H.innerHTML&&V.innerHTML==null||H.textContent&&V.textContent==null)&&i(p,""),Y?P(n.dynamicChildren,Y,p,u,S,PC(l,G),U):T||eA(n,l,p,null,u,S,PC(l,G),U,!1),K>0){if(K&16)O(p,H,V,u,G);else if(K&2&&H.class!==V.class&&Q(p,"class",null,V.class,G),K&4&&Q(p,"style",H.style,V.style,G),K&8){const $=l.dynamicProps;for(let tA=0;tA<$.length;tA++){const QA=$[tA],OA=H[QA],FA=V[QA];(FA!==OA||QA==="value")&&Q(p,QA,OA,FA,G,u)}}K&1&&n.children!==l.children&&i(p,l.children)}else!T&&Y==null&&O(p,H,V,u,G);((x=V.onVnodeUpdated)||v)&&WA(()=>{x&&iI(x,u,l,n),v&&VI(l,n,u,"updated")},S)},P=(n,l,u,S,G,U,T)=>{for(let p=0;p{if(l!==u){if(l!==BA)for(const U in l)!Gg(U)&&!(U in u)&&Q(n,U,l[U],null,G,S);for(const U in u){if(Gg(U))continue;const T=u[U],p=l[U];T!==p&&U!=="value"&&Q(n,U,p,T,G,S)}"value"in u&&Q(n,"value",l.value,u.value,G)}},wA=(n,l,u,S,G,U,T,p,K)=>{const Y=l.el=n?n.el:e(""),v=l.anchor=n?n.anchor:e("");let{patchFlag:H,dynamicChildren:V,slotScopeIds:x}=l;x&&(p=p?p.concat(x):x),n==null?(C(Y,u,S),C(v,u,S),hA(l.children||[],u,v,G,U,T,p,K)):H>0&&H&64&&V&&n.dynamicChildren?(P(n.dynamicChildren,V,u,G,U,T,p),(l.key!=null||G&&l===G.subTree)&&de(n,l,!0)):eA(n,l,u,v,G,U,T,p,K)},PA=(n,l,u,S,G,U,T,p,K)=>{l.slotScopeIds=p,n==null?l.shapeFlag&512?G.ctx.activate(l,u,S,T,K):HC(l,u,S,G,U,T,K):tQ(n,l,K)},HC=(n,l,u,S,G,U,T)=>{const p=n.component=Po(n,S,G);if(te(n)&&(p.ctx.renderer=lg),Xo(p,!1,T),p.asyncDep){if(G&&G.registerDep(p,JA,T),!n.el){const K=p.subTree=SA(KI);m(null,K,l,u)}}else JA(p,n,l,u,G,U,T)},tQ=(n,l,u)=>{const S=l.component=n.component;if(Ho(n,l,u))if(S.asyncDep&&!S.asyncResolved){aA(S,l,u);return}else S.next=l,S.update();else l.el=n.el,S.vnode=l},JA=(n,l,u,S,G,U,T)=>{const p=()=>{if(n.isMounted){let{next:H,bu:V,u:x,parent:$,vnode:tA}=n;{const xA=ye(n);if(xA){H&&(H.el=tA.el,aA(n,H,T)),xA.asyncDep.then(()=>{n.isUnmounted||p()});return}}let QA=H,OA;ZI(n,!1),H?(H.el=tA.el,aA(n,H,T)):H=tA,V&&vC(V),(OA=H.props&&H.props.onVnodeBeforeUpdate)&&iI(OA,$,H,tA),ZI(n,!0);const FA=XC(n),II=n.subTree;n.subTree=FA,M(II,FA,s(II.el),Wg(II),n,G,U),H.el=FA.el,QA===null&&Vo(n,FA.el),x&&WA(x,G),(OA=H.props&&H.props.onVnodeUpdated)&&WA(()=>iI(OA,$,H,tA),G)}else{let H;const{el:V,props:x}=l,{bm:$,m:tA,parent:QA,root:OA,type:FA}=n,II=ig(l);if(ZI(n,!1),$&&vC($),!II&&(H=x&&x.onVnodeBeforeMount)&&iI(H,QA,l),ZI(n,!0),V&&nQ){const xA=()=>{n.subTree=XC(n),nQ(V,n.subTree,n,G,null)};II&&FA.__asyncHydrate?FA.__asyncHydrate(V,n,xA):xA()}else{OA.ce&&OA.ce._injectChildStyle(FA);const xA=n.subTree=XC(n);M(null,xA,u,S,n,G,U),l.el=xA.el}if(tA&&WA(tA,G),!II&&(H=x&&x.onVnodeMounted)){const xA=l;WA(()=>iI(H,QA,xA),G)}(l.shapeFlag&256||QA&&ig(QA.vnode)&&QA.vnode.shapeFlag&256)&&n.a&&WA(n.a,G),n.isMounted=!0,l=u=S=null}};n.scope.on();const K=n.effect=new LE(p);n.scope.off();const Y=n.update=K.run.bind(K),v=n.job=K.runIfDirty.bind(K);v.i=n,v.id=n.uid,K.scheduler=()=>HB(v),ZI(n,!0),Y()},aA=(n,l,u)=>{l.component=n;const S=n.vnode.props;n.vnode=l,n.next=null,fo(n,l.props,S,u),Fo(n,l.children,u),bI(),hQ(n),LI()},eA=(n,l,u,S,G,U,T,p,K=!1)=>{const Y=n&&n.children,v=n?n.shapeFlag:0,H=l.children,{patchFlag:V,shapeFlag:x}=l;if(V>0){if(V&128){qg(Y,H,u,S,G,U,T,p,K);return}else if(V&256){TI(Y,H,u,S,G,U,T,p,K);return}}x&8?(v&16&&ag(Y,G,U),H!==Y&&i(u,H)):v&16?x&16?qg(Y,H,u,S,G,U,T,p,K):ag(Y,G,U,!0):(v&8&&i(u,""),x&16&&hA(H,u,S,G,U,T,p,K))},TI=(n,l,u,S,G,U,T,p,K)=>{n=n||Qg,l=l||Qg;const Y=n.length,v=l.length,H=Math.min(Y,v);let V;for(V=0;Vv?ag(n,G,U,!0,!1,H):hA(l,u,S,G,U,T,p,K,H)},qg=(n,l,u,S,G,U,T,p,K)=>{let Y=0;const v=l.length;let H=n.length-1,V=v-1;for(;Y<=H&&Y<=V;){const x=n[Y],$=l[Y]=K?UI(l[Y]):nI(l[Y]);if(hg(x,$))M(x,$,u,null,G,U,T,p,K);else break;Y++}for(;Y<=H&&Y<=V;){const x=n[H],$=l[V]=K?UI(l[V]):nI(l[V]);if(hg(x,$))M(x,$,u,null,G,U,T,p,K);else break;H--,V--}if(Y>H){if(Y<=V){const x=V+1,$=xV)for(;Y<=H;)eI(n[Y],G,U,!0),Y++;else{const x=Y,$=Y,tA=new Map;for(Y=$;Y<=V;Y++){const qA=l[Y]=K?UI(l[Y]):nI(l[Y]);qA.key!=null&&tA.set(qA.key,Y)}let QA,OA=0;const FA=V-$+1;let II=!1,xA=0;const cg=new Array(FA);for(Y=0;Y=FA){eI(qA,G,U,!0);continue}let tI;if(qA.key!=null)tI=tA.get(qA.key);else for(QA=$;QA<=V;QA++)if(cg[QA-$]===0&&hg(qA,l[QA])){tI=QA;break}tI===void 0?eI(qA,G,U,!0):(cg[tI-$]=Y+1,tI>=xA?xA=tI:II=!0,M(qA,l[tI],u,null,G,U,T,p,K),OA++)}const rQ=II?Yo(cg):Qg;for(QA=rQ.length-1,Y=FA-1;Y>=0;Y--){const qA=$+Y,tI=l[qA],aQ=qA+1{const{el:U,type:T,transition:p,children:K,shapeFlag:Y}=n;if(Y&6){HI(n.component.subTree,l,u,S);return}if(Y&128){n.suspense.move(l,u,S);return}if(Y&64){T.move(n,l,u,lg);return}if(T===nA){C(U,l,u);for(let H=0;Hp.enter(U),G);else{const{leave:H,delayLeave:V,afterLeave:x}=p,$=()=>C(U,l,u),tA=()=>{H(U,()=>{$(),x&&x()})};V?V(U,$,tA):tA()}else C(U,l,u)},eI=(n,l,u,S=!1,G=!1)=>{const{type:U,props:T,ref:p,children:K,dynamicChildren:Y,shapeFlag:v,patchFlag:H,dirs:V,cacheIndex:x}=n;if(H===-2&&(G=!1),p!=null&&iB(p,null,u,n,!0),x!=null&&(l.renderCache[x]=void 0),v&256){l.ctx.deactivate(n);return}const $=v&1&&V,tA=!ig(n);let QA;if(tA&&(QA=T&&T.onVnodeBeforeUnmount)&&iI(QA,l,n),v&6)Ci(n.component,u,S);else{if(v&128){n.suspense.unmount(u,S);return}$&&VI(n,null,l,"beforeUnmount"),v&64?n.type.remove(n,l,u,lg,S):Y&&!Y.hasOnce&&(U!==nA||H>0&&H&64)?ag(Y,l,u,!1,!0):(U===nA&&H&384||!G&&v&16)&&ag(K,l,u),S&&iQ(n)}(tA&&(QA=T&&T.onVnodeUnmounted)||$)&&WA(()=>{QA&&iI(QA,l,n),$&&VI(n,null,l,"unmounted")},u)},iQ=n=>{const{type:l,el:u,anchor:S,transition:G}=n;if(l===nA){gi(u,S);return}if(l===QC){w(n);return}const U=()=>{B(u),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(n.shapeFlag&1&&G&&!G.persisted){const{leave:T,delayLeave:p}=G,K=()=>T(u,U);p?p(n.el,U,K):K()}else U()},gi=(n,l)=>{let u;for(;n!==l;)u=a(n),B(n),n=u;B(l)},Ci=(n,l,u)=>{const{bum:S,scope:G,job:U,subTree:T,um:p,m:K,a:Y}=n;fQ(K),fQ(Y),S&&vC(S),G.stop(),U&&(U.flags|=8,eI(T,n,l,u)),p&&WA(p,l),WA(()=>{n.isUnmounted=!0},l),l&&l.pendingBranch&&!l.isUnmounted&&n.asyncDep&&!n.asyncResolved&&n.suspenseId===l.pendingId&&(l.deps--,l.deps===0&&l.resolve())},ag=(n,l,u,S=!1,G=!1,U=0)=>{for(let T=U;T{if(n.shapeFlag&6)return Wg(n.component.subTree);if(n.shapeFlag&128)return n.suspense.next();const l=a(n.anchor||n.el),u=l&&l[$i];return u?a(u):l};let VC=!1;const oQ=(n,l,u)=>{n==null?l._vnode&&eI(l._vnode,null,null,!0):M(l._vnode||null,n,l,null,null,null,u),l._vnode=n,VC||(VC=!0,hQ(),Be(),VC=!1)},lg={p:M,um:eI,m:HI,r:iQ,mt:HC,mc:hA,pc:eA,pbc:P,n:Wg,o:I};let sQ,nQ;return{render:oQ,hydrate:sQ,createApp:No(oQ,sQ)}}function PC({type:I,props:A},g){return g==="svg"&&I==="foreignObject"||g==="mathml"&&I==="annotation-xml"&&A&&A.encoding&&A.encoding.includes("html")?void 0:g}function ZI({effect:I,job:A},g){g?(I.flags|=32,A.flags|=4):(I.flags&=-33,A.flags&=-5)}function So(I,A){return(!I||I&&!I.pendingBranch)&&A&&!A.persisted}function de(I,A,g=!1){const C=I.children,B=A.children;if(q(C)&&q(B))for(let Q=0;Q>1,I[g[e]]0&&(A[C]=g[Q-1]),g[Q]=C)}}for(Q=g.length,E=g[Q-1];Q-- >0;)g[Q]=E,E=A[E];return g}function ye(I){const A=I.subTree.component;if(A)return A.asyncDep&&!A.asyncResolved?A:ye(A)}function fQ(I){if(I)for(let A=0;ABC(Jo);function Ko(I,A){return OB(I,null,{flush:"sync"})}function AI(I,A,g){return OB(I,A,g)}function OB(I,A,g=BA){const{immediate:C,deep:B,flush:Q,once:E}=g,e=MA({},g),t=A&&C||!A&&Q!=="post";let o;if(pg){if(Q==="sync"){const c=ko();o=c.__watcherHandles||(c.__watcherHandles=[])}else if(!t){const c=()=>{};return c.stop=aI,c.resume=aI,c.pause=aI,c}}const i=YA;e.call=(c,N,M)=>lI(c,i,N,M);let s=!1;Q==="post"?e.scheduler=c=>{WA(c,i&&i.suspense)}:Q!=="sync"&&(s=!0,e.scheduler=(c,N)=>{N?c():HB(c)}),e.augmentJob=c=>{A&&(c.flags|=4),s&&(c.flags|=2,i&&(c.id=i.uid,c.i=i))};const a=ji(I,A,e);return pg&&(o?o.push(a):t&&a()),a}function po(I,A,g){const C=this.proxy,B=fA(I)?I.includes(".")?Me(C,I):()=>C[I]:I.bind(C,C);let Q;j(A)?Q=A:(Q=A.handler,g=A);const E=Hg(this),e=OB(B,Q.bind(C),g);return E(),e}function Me(I,A){const g=A.split(".");return()=>{let C=I;for(let B=0;B{let i,s=BA,a;return Ko(()=>{const c=I[B];VA(i,c)&&(i=c,o())}),{get(){return t(),g.get?g.get(i):i},set(c){const N=g.set?g.set(c):c;if(!VA(N,i)&&!(s!==BA&&VA(c,s)))return;const M=C.vnode.props;M&&(A in M||B in M||Q in M)&&(`onUpdate:${A}`in M||`onUpdate:${B}`in M||`onUpdate:${Q}`in M)||(i=c,o()),C.emit(`update:${A}`,N),VA(c,N)&&VA(c,s)&&!VA(N,a)&&o(),s=c,a=N}}});return e[Symbol.iterator]=()=>{let t=0;return{next(){return t<2?{value:t++?E||BA:e,done:!1}:{done:!0}}}},e}const Ge=(I,A)=>A==="modelValue"||A==="model-value"?I.modelModifiers:I[`${A}Modifiers`]||I[`${dI(A)}Modifiers`]||I[`${pI(A)}Modifiers`];function bo(I,A,...g){if(I.isUnmounted)return;const C=I.vnode.props||BA;let B=g;const Q=A.startsWith("update:"),E=Q&&Ge(C,A.slice(7));E&&(E.trim&&(B=g.map(i=>fA(i)?i.trim():i)),E.number&&(B=g.map(ii)));let e,t=C[e=ZC(A)]||C[e=ZC(dI(A))];!t&&Q&&(t=C[e=ZC(pI(A))]),t&&lI(t,I,6,B);const o=C[e+"Once"];if(o){if(!I.emitted)I.emitted={};else if(I.emitted[e])return;I.emitted[e]=!0,lI(o,I,6,B)}}function Fe(I,A,g=!1){const C=A.emitsCache,B=C.get(I);if(B!==void 0)return B;const Q=I.emits;let E={},e=!1;if(!j(I)){const t=o=>{const i=Fe(o,A,!0);i&&(e=!0,MA(E,i))};!g&&A.mixins.length&&A.mixins.forEach(t),I.extends&&t(I.extends),I.mixins&&I.mixins.forEach(t)}return!Q&&!e?(rA(I)&&C.set(I,null),null):(q(Q)?Q.forEach(t=>E[t]=null):MA(E,Q),rA(I)&&C.set(I,E),E)}function kC(I,A){return!I||!fC(A)?!1:(A=A.slice(2).replace(/Once$/,""),CA(I,A[0].toLowerCase()+A.slice(1))||CA(I,pI(A))||CA(I,A))}function XC(I){const{type:A,vnode:g,proxy:C,withProxy:B,propsOptions:[Q],slots:E,attrs:e,emit:t,render:o,renderCache:i,props:s,data:a,setupState:c,ctx:N,inheritAttrs:M}=I,d=rC(I);let m,b;try{if(g.shapeFlag&4){const w=B||C,Z=w;m=nI(o.call(Z,w,i,s,c,a,N)),b=e}else{const w=A;m=nI(w.length>1?w(s,{attrs:e,slots:E,emit:t}):w(s,null)),b=A.props?e:Lo(e)}}catch(w){Sg.length=0,mC(w,I,1),m=SA(KI)}let R=m;if(b&&M!==!1){const w=Object.keys(b),{shapeFlag:Z}=R;w.length&&Z&7&&(Q&&w.some(SB)&&(b=To(b,Q)),R=sg(R,b,!1,!0))}return g.dirs&&(R=sg(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(g.dirs):g.dirs),g.transition&&VB(R,g.transition),m=R,rC(d),m}const Lo=I=>{let A;for(const g in I)(g==="class"||g==="style"||fC(g))&&((A||(A={}))[g]=I[g]);return A},To=(I,A)=>{const g={};for(const C in I)(!SB(C)||!(C.slice(9)in A))&&(g[C]=I[C]);return g};function Ho(I,A,g){const{props:C,children:B,component:Q}=I,{props:E,children:e,patchFlag:t}=A,o=Q.emitsOptions;if(A.dirs||A.transition)return!0;if(g&&t>=0){if(t&1024)return!0;if(t&16)return C?dQ(C,E,o):!!E;if(t&8){const i=A.dynamicProps;for(let s=0;sI.__isSuspense;function Zo(I,A){A&&A.pendingBranch?q(I)?A.effects.push(...I):A.effects.push(I):zi(I)}const nA=Symbol.for("v-fgt"),KC=Symbol.for("v-txt"),KI=Symbol.for("v-cmt"),QC=Symbol.for("v-stc"),Sg=[];let jA=null;function z(I=!1){Sg.push(jA=I?null:[])}function vo(){Sg.pop(),jA=Sg[Sg.length-1]||null}let Kg=1;function yQ(I){Kg+=I,I<0&&jA&&(jA.hasOnce=!0)}function me(I){return I.dynamicChildren=Kg>0?jA||Qg:null,vo(),Kg>0&&jA&&jA.push(I),I}function IA(I,A,g,C,B,Q){return me(F(I,A,g,C,B,Q,!0))}function JI(I,A,g,C,B){return me(SA(I,A,g,C,B,!0))}function xB(I){return I?I.__v_isVNode===!0:!1}function hg(I,A){return I.type===A.type&&I.key===A.key}const Se=({key:I})=>I??null,EC=({ref:I,ref_key:A,ref_for:g})=>(typeof I=="number"&&(I=""+I),I!=null?fA(I)||yA(I)||j(I)?{i:LA,r:I,k:A,f:!!g}:I:null);function F(I,A=null,g=null,C=0,B=null,Q=I===nA?0:1,E=!1,e=!1){const t={__v_isVNode:!0,__v_skip:!0,type:I,props:A,key:A&&Se(A),ref:A&&EC(A),scopeId:Ee,slotScopeIds:null,children:g,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:Q,patchFlag:C,dynamicProps:B,dynamicChildren:null,appContext:null,ctx:LA};return e?(qB(t,g),Q&128&&I.normalize(t)):g&&(t.shapeFlag|=fA(g)?8:16),Kg>0&&!E&&jA&&(t.patchFlag>0||Q&6)&&t.patchFlag!==32&&jA.push(t),t}const SA=Oo;function Oo(I,A=null,g=null,C=0,B=null,Q=!1){if((!I||I===no)&&(I=KI),xB(I)){const e=sg(I,A,!0);return g&&qB(e,g),Kg>0&&!Q&&jA&&(e.shapeFlag&6?jA[jA.indexOf(I)]=e:jA.push(e)),e.patchFlag=-2,e}if(As(I)&&(I=I.__vccOpts),A){A=xo(A);let{class:e,style:t}=A;e&&!fA(e)&&(A.class=xI(e)),rA(t)&&(TB(t)&&!q(t)&&(t=MA({},t)),A.style=OI(t))}const E=fA(I)?1:Ue(I)?128:Ao(I)?64:rA(I)?4:j(I)?2:0;return F(I,A,g,C,B,E,Q,!0)}function xo(I){return I?TB(I)||De(I)?MA({},I):I:null}function sg(I,A,g=!1,C=!1){const{props:B,ref:Q,patchFlag:E,children:e,transition:t}=I,o=A?Mg(B||{},A):B,i={__v_isVNode:!0,__v_skip:!0,type:I.type,props:o,key:o&&Se(o),ref:A&&A.ref?g&&Q?q(Q)?Q.concat(EC(A)):[Q,EC(A)]:EC(A):Q,scopeId:I.scopeId,slotScopeIds:I.slotScopeIds,children:e,target:I.target,targetStart:I.targetStart,targetAnchor:I.targetAnchor,staticCount:I.staticCount,shapeFlag:I.shapeFlag,patchFlag:A&&I.type!==nA?E===-1?16:E|16:E,dynamicProps:I.dynamicProps,dynamicChildren:I.dynamicChildren,appContext:I.appContext,dirs:I.dirs,transition:t,component:I.component,suspense:I.suspense,ssContent:I.ssContent&&sg(I.ssContent),ssFallback:I.ssFallback&&sg(I.ssFallback),el:I.el,anchor:I.anchor,ctx:I.ctx,ce:I.ce};return t&&C&&VB(i,t.clone(i)),i}function qo(I=" ",A=0){return SA(KC,null,I,A)}function MQ(I,A){const g=SA(QC,null,I);return g.staticCount=A,g}function GI(I="",A=!1){return A?(z(),JI(KI,null,I)):SA(KI,null,I)}function nI(I){return I==null||typeof I=="boolean"?SA(KI):q(I)?SA(nA,null,I.slice()):xB(I)?UI(I):SA(KC,null,String(I))}function UI(I){return I.el===null&&I.patchFlag!==-1||I.memo?I:sg(I)}function qB(I,A){let g=0;const{shapeFlag:C}=I;if(A==null)A=null;else if(q(A))g=16;else if(typeof A=="object")if(C&65){const B=A.default;B&&(B._c&&(B._d=!1),qB(I,B()),B._c&&(B._d=!0));return}else{g=32;const B=A._;!B&&!De(A)?A._ctx=LA:B===3&&LA&&(LA.slots._===1?A._=1:(A._=2,I.patchFlag|=1024))}else j(A)?(A={default:A,_ctx:LA},g=32):(A=String(A),C&64?(g=16,A=[qo(A)]):g=8);I.children=A,I.shapeFlag|=g}function Mg(...I){const A={};for(let g=0;gYA||LA;let cC,aB;{const I=MC(),A=(g,C)=>{let B;return(B=I[g])||(B=I[g]=[]),B.push(C),Q=>{B.length>1?B.forEach(E=>E(Q)):B[0](Q)}};cC=A("__VUE_INSTANCE_SETTERS__",g=>YA=g),aB=A("__VUE_SSR_SETTERS__",g=>pg=g)}const Hg=I=>{const A=YA;return cC(I),I.scope.on(),()=>{I.scope.off(),cC(A)}},GQ=()=>{YA&&YA.scope.off(),cC(null)};function Ye(I){return I.vnode.shapeFlag&4}let pg=!1;function Xo(I,A=!1,g=!1){A&&aB(A);const{props:C,children:B}=I.vnode,Q=Ye(I);uo(I,C,Q,A),Go(I,B,g);const E=Q?zo(I,A):void 0;return A&&aB(!1),E}function zo(I,A){const g=I.type;I.accessCache=Object.create(null),I.proxy=new Proxy(I.ctx,ro);const{setup:C}=g;if(C){bI();const B=I.setupContext=C.length>1?$o(I):null,Q=Hg(I),E=Tg(C,I,0,[I.props,B]),e=UE(E);if(LI(),Q(),(e||I.sp)&&!ig(I)&&ee(I),e){if(E.then(GQ,GQ),A)return E.then(t=>{FQ(I,t,A)}).catch(t=>{mC(t,I,0)});I.asyncDep=E}else FQ(I,E,A)}else Je(I,A)}function FQ(I,A,g){j(A)?I.type.__ssrInlineRender?I.ssrRender=A:I.render=A:rA(A)&&(I.setupState=Ae(A)),Je(I,g)}let UQ;function Je(I,A,g){const C=I.type;if(!I.render){if(!A&&UQ&&!C.render){const B=C.template||ZB(I).template;if(B){const{isCustomElement:Q,compilerOptions:E}=I.appContext.config,{delimiters:e,compilerOptions:t}=C,o=MA(MA({isCustomElement:Q,delimiters:e},E),t);C.render=UQ(B,o)}}I.render=C.render||aI}{const B=Hg(I);bI();try{ao(I)}finally{LI(),B()}}}const _o={get(I,A){return UA(I,"get",""),I[A]}};function $o(I){const A=g=>{I.exposed=g||{}};return{attrs:new Proxy(I.attrs,_o),slots:I.slots,emit:I.emit,expose:A}}function jB(I){return I.exposed?I.exposeProxy||(I.exposeProxy=new Proxy(Ae(bi(I.exposed)),{get(A,g){if(g in A)return A[g];if(g in mg)return mg[g](I)},has(A,g){return g in A||g in mg}})):I.proxy}function As(I){return j(I)&&"__vccOpts"in I}const uA=(I,A)=>qi(I,A,pg),Is="3.5.12";/** +**/function Tg(I,A,g,C){try{return C?I(...C):I()}catch(B){mC(B,A,g)}}function lI(I,A,g,C){if(j(I)){const B=Tg(I,A,g,C);return B&&UE(B)&&B.catch(Q=>{mC(Q,A,g)}),B}if(q(I)){const B=[];for(let Q=0;Q>>1,B=bA[C],Q=kg(B);Q=kg(g)?bA.push(I):bA.splice(Xi(A),0,I),I.flags|=1,Ce()}}function Ce(){nC||(nC=ge.then(Qe))}function zi(I){q(I)?tg.push(...I):FI&&I.id===-1?FI.splice(gg+1,0,I):I.flags&1||(tg.push(I),I.flags|=1),Ce()}function hQ(I,A,g=sI+1){for(;gkg(g)-kg(C));if(tg.length=0,FI){FI.push(...A);return}for(FI=A,gg=0;ggI.id==null?I.flags&2?-1:1/0:I.id;function Qe(I){try{for(sI=0;sI{C._d&&yQ(-1);const Q=rC(A);let E;try{E=I(...B)}finally{rC(Q),C._d&&yQ(1)}return E};return C._n=!0,C._c=!0,C._d=!0,C}function VI(I,A,g,C){const B=I.dirs,Q=A&&A.dirs;for(let E=0;EI.__isTeleport;function VB(I,A){I.shapeFlag&6&&I.component?(I.transition=A,VB(I.component.subTree,A)):I.shapeFlag&128?(I.ssContent.transition=A.clone(I.ssContent),I.ssFallback.transition=A.clone(I.ssFallback)):I.transition=A}function ee(I){I.ids=[I.ids[0]+I.ids[2]+++"-",0,0]}function iB(I,A,g,C,B=!1){if(q(I)){I.forEach((N,M)=>iB(N,A&&(q(A)?A[M]:A),g,C,B));return}if(ig(C)&&!B)return;const Q=C.shapeFlag&4?jB(C.component):C.el,E=B?null:Q,{i:e,r:t}=I,o=A&&A.r,i=e.refs===BA?e.refs={}:e.refs,s=e.setupState,a=gA(s),c=s===BA?()=>!1:N=>CA(a,N);if(o!=null&&o!==t&&(fA(o)?(i[o]=null,c(o)&&(s[o]=null)):yA(o)&&(o.value=null)),j(t))Tg(t,e,12,[E,i]);else{const N=fA(t),M=yA(t);if(N||M){const d=()=>{if(I.f){const U=N?c(t)?s[t]:i[t]:t.value;B?q(U)&&YB(U,Q):q(U)?U.includes(Q)||U.push(Q):N?(i[t]=[Q],c(t)&&(s[t]=i[t])):(t.value=[Q],I.k&&(i[I.k]=t.value))}else N?(i[t]=E,c(t)&&(s[t]=E)):M&&(t.value=E,I.k&&(i[I.k]=E))};E?(d.id=-1,WA(d,g)):d()}}}MC().requestIdleCallback;MC().cancelIdleCallback;const ig=I=>!!I.type.__asyncLoader,te=I=>I.type.__isKeepAlive;function Io(I,A){ie(I,"a",A)}function go(I,A){ie(I,"da",A)}function ie(I,A,g=YA){const C=I.__wdc||(I.__wdc=()=>{let B=g;for(;B;){if(B.isDeactivated)return;B=B.parent}return I()});if(YC(A,C,g),g){let B=g.parent;for(;B&&B.parent;)te(B.parent.vnode)&&Co(C,A,g,B),B=B.parent}}function Co(I,A,g,C){const B=YC(A,I,C,!0);JC(()=>{YB(C[A],B)},g)}function YC(I,A,g=YA,C=!1){if(g){const B=g[I]||(g[I]=[]),Q=A.__weh||(A.__weh=(...E)=>{bI();const e=Hg(g),t=lI(A,g,I,E);return e(),LI(),t});return C?B.unshift(Q):B.push(Q),Q}}const MI=I=>(A,g=YA)=>{(!pg||I==="sp")&&YC(I,(...C)=>A(...C),g)},Bo=MI("bm"),ng=MI("m"),Qo=MI("bu"),Eo=MI("u"),eo=MI("bum"),JC=MI("um"),to=MI("sp"),io=MI("rtg"),oo=MI("rtc");function so(I,A=YA){YC("ec",I,A)}const no=Symbol.for("v-ndc");function XA(I,A,g,C){let B;const Q=g,E=q(I);if(E||fA(I)){const e=E&&eg(I);let t=!1;e&&(t=!$A(I),I=FC(I)),B=new Array(I.length);for(let o=0,i=I.length;oA(e,t,void 0,Q));else{const e=Object.keys(I);B=new Array(e.length);for(let t=0,o=e.length;txB(A)?!(A.type===KI||A.type===nA&&!se(A.children)):!0)?I:null}const oB=I=>I?Ye(I)?jB(I):oB(I.parent):null,mg=MA(Object.create(null),{$:I=>I,$el:I=>I.vnode.el,$data:I=>I.data,$props:I=>I.props,$attrs:I=>I.attrs,$slots:I=>I.slots,$refs:I=>I.refs,$parent:I=>oB(I.parent),$root:I=>oB(I.root),$host:I=>I.ce,$emit:I=>I.emit,$options:I=>ZB(I),$forceUpdate:I=>I.f||(I.f=()=>{HB(I.update)}),$nextTick:I=>I.n||(I.n=SC.bind(I.proxy)),$watch:I=>po.bind(I)}),jC=(I,A)=>I!==BA&&!I.__isScriptSetup&&CA(I,A),ro={get({_:I},A){if(A==="__v_skip")return!0;const{ctx:g,setupState:C,data:B,props:Q,accessCache:E,type:e,appContext:t}=I;let o;if(A[0]!=="$"){const c=E[A];if(c!==void 0)switch(c){case 1:return C[A];case 2:return B[A];case 4:return g[A];case 3:return Q[A]}else{if(jC(C,A))return E[A]=1,C[A];if(B!==BA&&CA(B,A))return E[A]=2,B[A];if((o=I.propsOptions[0])&&CA(o,A))return E[A]=3,Q[A];if(g!==BA&&CA(g,A))return E[A]=4,g[A];sB&&(E[A]=0)}}const i=mg[A];let s,a;if(i)return A==="$attrs"&&UA(I.attrs,"get",""),i(I);if((s=e.__cssModules)&&(s=s[A]))return s;if(g!==BA&&CA(g,A))return E[A]=4,g[A];if(a=t.config.globalProperties,CA(a,A))return a[A]},set({_:I},A,g){const{data:C,setupState:B,ctx:Q}=I;return jC(B,A)?(B[A]=g,!0):C!==BA&&CA(C,A)?(C[A]=g,!0):CA(I.props,A)||A[0]==="$"&&A.slice(1)in I?!1:(Q[A]=g,!0)},has({_:{data:I,setupState:A,accessCache:g,ctx:C,appContext:B,propsOptions:Q}},E){let e;return!!g[E]||I!==BA&&CA(I,E)||jC(A,E)||(e=Q[0])&&CA(e,E)||CA(C,E)||CA(mg,E)||CA(B.config.globalProperties,E)},defineProperty(I,A,g){return g.get!=null?I._.accessCache[A]=0:CA(g,"value")&&this.set(I,A,g.value,null),Reflect.defineProperty(I,A,g)}};function aC(I){return q(I)?I.reduce((A,g)=>(A[g]=null,A),{}):I}function ne(I,A){return!I||!A?I||A:q(I)&&q(A)?I.concat(A):MA({},aC(I),aC(A))}let sB=!0;function ao(I){const A=ZB(I),g=I.proxy,C=I.ctx;sB=!1,A.beforeCreate&&wQ(A.beforeCreate,I,"bc");const{data:B,computed:Q,methods:E,watch:e,provide:t,inject:o,created:i,beforeMount:s,mounted:a,beforeUpdate:c,updated:N,activated:M,deactivated:d,beforeDestroy:U,beforeUnmount:b,destroyed:R,unmounted:w,render:Z,renderTracked:sA,renderTriggered:DA,errorCaptured:hA,serverPrefetch:vA,expose:P,inheritAttrs:O,components:wA,directives:PA,filters:HC}=A;if(o&&lo(o,C,null),E)for(const aA in E){const eA=E[aA];j(eA)&&(C[aA]=eA.bind(g))}if(B){const aA=B.call(g,g);rA(aA)&&(I.data=ZA(aA))}if(sB=!0,Q)for(const aA in Q){const eA=Q[aA],TI=j(eA)?eA.bind(g,g):j(eA.get)?eA.get.bind(g,g):aI,qg=!j(eA)&&j(eA.set)?eA.set.bind(g):aI,HI=uA({get:TI,set:qg});Object.defineProperty(C,aA,{enumerable:!0,configurable:!0,get:()=>HI.value,set:eI=>HI.value=eI})}if(e)for(const aA in e)re(e[aA],C,g,aA);if(t){const aA=j(t)?t.call(g):t;Reflect.ownKeys(aA).forEach(eA=>{Ro(eA,aA[eA])})}i&&wQ(i,I,"c");function JA(aA,eA){q(eA)?eA.forEach(TI=>aA(TI.bind(g))):eA&&aA(eA.bind(g))}if(JA(Bo,s),JA(ng,a),JA(Qo,c),JA(Eo,N),JA(Io,M),JA(go,d),JA(so,hA),JA(oo,sA),JA(io,DA),JA(eo,b),JA(JC,w),JA(to,vA),q(P))if(P.length){const aA=I.exposed||(I.exposed={});P.forEach(eA=>{Object.defineProperty(aA,eA,{get:()=>g[eA],set:TI=>g[eA]=TI})})}else I.exposed||(I.exposed={});Z&&I.render===aI&&(I.render=Z),O!=null&&(I.inheritAttrs=O),wA&&(I.components=wA),PA&&(I.directives=PA),vA&&ee(I)}function lo(I,A,g=aI){q(I)&&(I=nB(I));for(const C in I){const B=I[C];let Q;rA(B)?"default"in B?Q=BC(B.from||C,B.default,!0):Q=BC(B.from||C):Q=BC(B),yA(Q)?Object.defineProperty(A,C,{enumerable:!0,configurable:!0,get:()=>Q.value,set:E=>Q.value=E}):A[C]=Q}}function wQ(I,A,g){lI(q(I)?I.map(C=>C.bind(A.proxy)):I.bind(A.proxy),A,g)}function re(I,A,g,C){let B=C.includes(".")?Me(g,C):()=>g[C];if(fA(I)){const Q=A[I];j(Q)&&AI(B,Q)}else if(j(I))AI(B,I.bind(g));else if(rA(I))if(q(I))I.forEach(Q=>re(Q,A,g,C));else{const Q=j(I.handler)?I.handler.bind(g):A[I.handler];j(Q)&&AI(B,Q,I)}}function ZB(I){const A=I.type,{mixins:g,extends:C}=A,{mixins:B,optionsCache:Q,config:{optionMergeStrategies:E}}=I.appContext,e=Q.get(A);let t;return e?t=e:!B.length&&!g&&!C?t=A:(t={},B.length&&B.forEach(o=>lC(t,o,E,!0)),lC(t,A,E)),rA(A)&&Q.set(A,t),t}function lC(I,A,g,C=!1){const{mixins:B,extends:Q}=A;Q&&lC(I,Q,g,!0),B&&B.forEach(E=>lC(I,E,g,!0));for(const E in A)if(!(C&&E==="expose")){const e=co[E]||g&&g[E];I[E]=e?e(I[E],A[E]):A[E]}return I}const co={data:NQ,props:RQ,emits:RQ,methods:dg,computed:dg,beforeCreate:KA,created:KA,beforeMount:KA,mounted:KA,beforeUpdate:KA,updated:KA,beforeDestroy:KA,beforeUnmount:KA,destroyed:KA,unmounted:KA,activated:KA,deactivated:KA,errorCaptured:KA,serverPrefetch:KA,components:dg,directives:dg,watch:ho,provide:NQ,inject:Do};function NQ(I,A){return A?I?function(){return MA(j(I)?I.call(this,this):I,j(A)?A.call(this,this):A)}:A:I}function Do(I,A){return dg(nB(I),nB(A))}function nB(I){if(q(I)){const A={};for(let g=0;g1)return g&&j(A)?A.call(C&&C.proxy):A}}const le={},ce=()=>Object.create(le),De=I=>Object.getPrototypeOf(I)===le;function uo(I,A,g,C=!1){const B={},Q=ce();I.propsDefaults=Object.create(null),he(I,A,B,Q);for(const E in I.propsOptions[0])E in B||(B[E]=void 0);g?I.props=C?B:WI(B):I.type.props?I.props=B:I.props=Q,I.attrs=Q}function fo(I,A,g,C){const{props:B,attrs:Q,vnode:{patchFlag:E}}=I,e=gA(B),[t]=I.propsOptions;let o=!1;if((C||E>0)&&!(E&16)){if(E&8){const i=I.vnode.dynamicProps;for(let s=0;s{t=!0;const[a,c]=we(s,A,!0);MA(E,a),c&&e.push(...c)};!g&&A.mixins.length&&A.mixins.forEach(i),I.extends&&i(I.extends),I.mixins&&I.mixins.forEach(i)}if(!Q&&!t)return rA(I)&&C.set(I,Qg),Qg;if(q(Q))for(let i=0;iI[0]==="_"||I==="$stable",vB=I=>q(I)?I.map(nI):[nI(I)],Mo=(I,A,g)=>{if(A._n)return A;const C=_i((...B)=>vB(A(...B)),g);return C._c=!1,C},Re=(I,A,g)=>{const C=I._ctx;for(const B in I){if(Ne(B))continue;const Q=I[B];if(j(Q))A[B]=Mo(B,Q,C);else if(Q!=null){const E=vB(Q);A[B]=()=>E}}},ue=(I,A)=>{const g=vB(A);I.slots.default=()=>g},fe=(I,A,g)=>{for(const C in A)(g||C!=="_")&&(I[C]=A[C])},Go=(I,A,g)=>{const C=I.slots=ce();if(I.vnode.shapeFlag&32){const B=A._;B?(fe(C,A,g),g&&JE(C,"_",B,!0)):Re(A,C)}else A&&ue(I,A)},Fo=(I,A,g)=>{const{vnode:C,slots:B}=I;let Q=!0,E=BA;if(C.shapeFlag&32){const e=A._;e?g&&e===1?Q=!1:fe(B,A,g):(Q=!A.$stable,Re(A,B)),E=A}else A&&(ue(I,A),E={default:1});if(Q)for(const e in B)!Ne(e)&&E[e]==null&&delete B[e]},WA=Zo;function Uo(I){return mo(I)}function mo(I,A){const g=MC();g.__VUE__=!0;const{insert:C,remove:B,patchProp:Q,createElement:E,createText:e,createComment:t,setText:o,setElementText:i,parentNode:s,nextSibling:a,setScopeId:c=aI,insertStaticContent:N}=I,M=(n,l,u,S=null,G=null,m=null,T=void 0,p=null,K=!!l.dynamicChildren)=>{if(n===l)return;n&&!hg(n,l)&&(S=Wg(n),eI(n,G,m,!0),n=null),l.patchFlag===-2&&(K=!1,l.dynamicChildren=null);const{type:Y,ref:v,shapeFlag:H}=l;switch(Y){case KC:d(n,l,u,S);break;case KI:U(n,l,u,S);break;case QC:n==null&&b(l,u,S,T);break;case nA:wA(n,l,u,S,G,m,T,p,K);break;default:H&1?Z(n,l,u,S,G,m,T,p,K):H&6?PA(n,l,u,S,G,m,T,p,K):(H&64||H&128)&&Y.process(n,l,u,S,G,m,T,p,K,lg)}v!=null&&G&&iB(v,n&&n.ref,m,l||n,!l)},d=(n,l,u,S)=>{if(n==null)C(l.el=e(l.children),u,S);else{const G=l.el=n.el;l.children!==n.children&&o(G,l.children)}},U=(n,l,u,S)=>{n==null?C(l.el=t(l.children||""),u,S):l.el=n.el},b=(n,l,u,S)=>{[n.el,n.anchor]=N(n.children,l,u,S,n.el,n.anchor)},R=({el:n,anchor:l},u,S)=>{let G;for(;n&&n!==l;)G=a(n),C(n,u,S),n=G;C(l,u,S)},w=({el:n,anchor:l})=>{let u;for(;n&&n!==l;)u=a(n),B(n),n=u;B(l)},Z=(n,l,u,S,G,m,T,p,K)=>{l.type==="svg"?T="svg":l.type==="math"&&(T="mathml"),n==null?sA(l,u,S,G,m,T,p,K):vA(n,l,G,m,T,p,K)},sA=(n,l,u,S,G,m,T,p)=>{let K,Y;const{props:v,shapeFlag:H,transition:V,dirs:x}=n;if(K=n.el=E(n.type,m,v&&v.is,v),H&8?i(K,n.children):H&16&&hA(n.children,K,null,S,G,PC(n,m),T,p),x&&VI(n,null,S,"created"),DA(K,n,n.scopeId,T,S),v){for(const tA in v)tA!=="value"&&!Gg(tA)&&Q(K,tA,null,v[tA],m,S);"value"in v&&Q(K,"value",null,v.value,m),(Y=v.onVnodeBeforeMount)&&iI(Y,S,n)}x&&VI(n,null,S,"beforeMount");const $=So(G,V);$&&V.beforeEnter(K),C(K,l,u),((Y=v&&v.onVnodeMounted)||$||x)&&WA(()=>{Y&&iI(Y,S,n),$&&V.enter(K),x&&VI(n,null,S,"mounted")},G)},DA=(n,l,u,S,G)=>{if(u&&c(n,u),S)for(let m=0;m{for(let Y=K;Y{const p=l.el=n.el;let{patchFlag:K,dynamicChildren:Y,dirs:v}=l;K|=n.patchFlag&16;const H=n.props||BA,V=l.props||BA;let x;if(u&&ZI(u,!1),(x=V.onVnodeBeforeUpdate)&&iI(x,u,l,n),v&&VI(l,n,u,"beforeUpdate"),u&&ZI(u,!0),(H.innerHTML&&V.innerHTML==null||H.textContent&&V.textContent==null)&&i(p,""),Y?P(n.dynamicChildren,Y,p,u,S,PC(l,G),m):T||eA(n,l,p,null,u,S,PC(l,G),m,!1),K>0){if(K&16)O(p,H,V,u,G);else if(K&2&&H.class!==V.class&&Q(p,"class",null,V.class,G),K&4&&Q(p,"style",H.style,V.style,G),K&8){const $=l.dynamicProps;for(let tA=0;tA<$.length;tA++){const QA=$[tA],OA=H[QA],FA=V[QA];(FA!==OA||QA==="value")&&Q(p,QA,OA,FA,G,u)}}K&1&&n.children!==l.children&&i(p,l.children)}else!T&&Y==null&&O(p,H,V,u,G);((x=V.onVnodeUpdated)||v)&&WA(()=>{x&&iI(x,u,l,n),v&&VI(l,n,u,"updated")},S)},P=(n,l,u,S,G,m,T)=>{for(let p=0;p{if(l!==u){if(l!==BA)for(const m in l)!Gg(m)&&!(m in u)&&Q(n,m,l[m],null,G,S);for(const m in u){if(Gg(m))continue;const T=u[m],p=l[m];T!==p&&m!=="value"&&Q(n,m,p,T,G,S)}"value"in u&&Q(n,"value",l.value,u.value,G)}},wA=(n,l,u,S,G,m,T,p,K)=>{const Y=l.el=n?n.el:e(""),v=l.anchor=n?n.anchor:e("");let{patchFlag:H,dynamicChildren:V,slotScopeIds:x}=l;x&&(p=p?p.concat(x):x),n==null?(C(Y,u,S),C(v,u,S),hA(l.children||[],u,v,G,m,T,p,K)):H>0&&H&64&&V&&n.dynamicChildren?(P(n.dynamicChildren,V,u,G,m,T,p),(l.key!=null||G&&l===G.subTree)&&de(n,l,!0)):eA(n,l,u,v,G,m,T,p,K)},PA=(n,l,u,S,G,m,T,p,K)=>{l.slotScopeIds=p,n==null?l.shapeFlag&512?G.ctx.activate(l,u,S,T,K):HC(l,u,S,G,m,T,K):tQ(n,l,K)},HC=(n,l,u,S,G,m,T)=>{const p=n.component=Po(n,S,G);if(te(n)&&(p.ctx.renderer=lg),Xo(p,!1,T),p.asyncDep){if(G&&G.registerDep(p,JA,T),!n.el){const K=p.subTree=SA(KI);U(null,K,l,u)}}else JA(p,n,l,u,G,m,T)},tQ=(n,l,u)=>{const S=l.component=n.component;if(Ho(n,l,u))if(S.asyncDep&&!S.asyncResolved){aA(S,l,u);return}else S.next=l,S.update();else l.el=n.el,S.vnode=l},JA=(n,l,u,S,G,m,T)=>{const p=()=>{if(n.isMounted){let{next:H,bu:V,u:x,parent:$,vnode:tA}=n;{const xA=ye(n);if(xA){H&&(H.el=tA.el,aA(n,H,T)),xA.asyncDep.then(()=>{n.isUnmounted||p()});return}}let QA=H,OA;ZI(n,!1),H?(H.el=tA.el,aA(n,H,T)):H=tA,V&&vC(V),(OA=H.props&&H.props.onVnodeBeforeUpdate)&&iI(OA,$,H,tA),ZI(n,!0);const FA=XC(n),II=n.subTree;n.subTree=FA,M(II,FA,s(II.el),Wg(II),n,G,m),H.el=FA.el,QA===null&&Vo(n,FA.el),x&&WA(x,G),(OA=H.props&&H.props.onVnodeUpdated)&&WA(()=>iI(OA,$,H,tA),G)}else{let H;const{el:V,props:x}=l,{bm:$,m:tA,parent:QA,root:OA,type:FA}=n,II=ig(l);if(ZI(n,!1),$&&vC($),!II&&(H=x&&x.onVnodeBeforeMount)&&iI(H,QA,l),ZI(n,!0),V&&nQ){const xA=()=>{n.subTree=XC(n),nQ(V,n.subTree,n,G,null)};II&&FA.__asyncHydrate?FA.__asyncHydrate(V,n,xA):xA()}else{OA.ce&&OA.ce._injectChildStyle(FA);const xA=n.subTree=XC(n);M(null,xA,u,S,n,G,m),l.el=xA.el}if(tA&&WA(tA,G),!II&&(H=x&&x.onVnodeMounted)){const xA=l;WA(()=>iI(H,QA,xA),G)}(l.shapeFlag&256||QA&&ig(QA.vnode)&&QA.vnode.shapeFlag&256)&&n.a&&WA(n.a,G),n.isMounted=!0,l=u=S=null}};n.scope.on();const K=n.effect=new LE(p);n.scope.off();const Y=n.update=K.run.bind(K),v=n.job=K.runIfDirty.bind(K);v.i=n,v.id=n.uid,K.scheduler=()=>HB(v),ZI(n,!0),Y()},aA=(n,l,u)=>{l.component=n;const S=n.vnode.props;n.vnode=l,n.next=null,fo(n,l.props,S,u),Fo(n,l.children,u),bI(),hQ(n),LI()},eA=(n,l,u,S,G,m,T,p,K=!1)=>{const Y=n&&n.children,v=n?n.shapeFlag:0,H=l.children,{patchFlag:V,shapeFlag:x}=l;if(V>0){if(V&128){qg(Y,H,u,S,G,m,T,p,K);return}else if(V&256){TI(Y,H,u,S,G,m,T,p,K);return}}x&8?(v&16&&ag(Y,G,m),H!==Y&&i(u,H)):v&16?x&16?qg(Y,H,u,S,G,m,T,p,K):ag(Y,G,m,!0):(v&8&&i(u,""),x&16&&hA(H,u,S,G,m,T,p,K))},TI=(n,l,u,S,G,m,T,p,K)=>{n=n||Qg,l=l||Qg;const Y=n.length,v=l.length,H=Math.min(Y,v);let V;for(V=0;Vv?ag(n,G,m,!0,!1,H):hA(l,u,S,G,m,T,p,K,H)},qg=(n,l,u,S,G,m,T,p,K)=>{let Y=0;const v=l.length;let H=n.length-1,V=v-1;for(;Y<=H&&Y<=V;){const x=n[Y],$=l[Y]=K?UI(l[Y]):nI(l[Y]);if(hg(x,$))M(x,$,u,null,G,m,T,p,K);else break;Y++}for(;Y<=H&&Y<=V;){const x=n[H],$=l[V]=K?UI(l[V]):nI(l[V]);if(hg(x,$))M(x,$,u,null,G,m,T,p,K);else break;H--,V--}if(Y>H){if(Y<=V){const x=V+1,$=xV)for(;Y<=H;)eI(n[Y],G,m,!0),Y++;else{const x=Y,$=Y,tA=new Map;for(Y=$;Y<=V;Y++){const qA=l[Y]=K?UI(l[Y]):nI(l[Y]);qA.key!=null&&tA.set(qA.key,Y)}let QA,OA=0;const FA=V-$+1;let II=!1,xA=0;const cg=new Array(FA);for(Y=0;Y=FA){eI(qA,G,m,!0);continue}let tI;if(qA.key!=null)tI=tA.get(qA.key);else for(QA=$;QA<=V;QA++)if(cg[QA-$]===0&&hg(qA,l[QA])){tI=QA;break}tI===void 0?eI(qA,G,m,!0):(cg[tI-$]=Y+1,tI>=xA?xA=tI:II=!0,M(qA,l[tI],u,null,G,m,T,p,K),OA++)}const rQ=II?Yo(cg):Qg;for(QA=rQ.length-1,Y=FA-1;Y>=0;Y--){const qA=$+Y,tI=l[qA],aQ=qA+1{const{el:m,type:T,transition:p,children:K,shapeFlag:Y}=n;if(Y&6){HI(n.component.subTree,l,u,S);return}if(Y&128){n.suspense.move(l,u,S);return}if(Y&64){T.move(n,l,u,lg);return}if(T===nA){C(m,l,u);for(let H=0;Hp.enter(m),G);else{const{leave:H,delayLeave:V,afterLeave:x}=p,$=()=>C(m,l,u),tA=()=>{H(m,()=>{$(),x&&x()})};V?V(m,$,tA):tA()}else C(m,l,u)},eI=(n,l,u,S=!1,G=!1)=>{const{type:m,props:T,ref:p,children:K,dynamicChildren:Y,shapeFlag:v,patchFlag:H,dirs:V,cacheIndex:x}=n;if(H===-2&&(G=!1),p!=null&&iB(p,null,u,n,!0),x!=null&&(l.renderCache[x]=void 0),v&256){l.ctx.deactivate(n);return}const $=v&1&&V,tA=!ig(n);let QA;if(tA&&(QA=T&&T.onVnodeBeforeUnmount)&&iI(QA,l,n),v&6)Ci(n.component,u,S);else{if(v&128){n.suspense.unmount(u,S);return}$&&VI(n,null,l,"beforeUnmount"),v&64?n.type.remove(n,l,u,lg,S):Y&&!Y.hasOnce&&(m!==nA||H>0&&H&64)?ag(Y,l,u,!1,!0):(m===nA&&H&384||!G&&v&16)&&ag(K,l,u),S&&iQ(n)}(tA&&(QA=T&&T.onVnodeUnmounted)||$)&&WA(()=>{QA&&iI(QA,l,n),$&&VI(n,null,l,"unmounted")},u)},iQ=n=>{const{type:l,el:u,anchor:S,transition:G}=n;if(l===nA){gi(u,S);return}if(l===QC){w(n);return}const m=()=>{B(u),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(n.shapeFlag&1&&G&&!G.persisted){const{leave:T,delayLeave:p}=G,K=()=>T(u,m);p?p(n.el,m,K):K()}else m()},gi=(n,l)=>{let u;for(;n!==l;)u=a(n),B(n),n=u;B(l)},Ci=(n,l,u)=>{const{bum:S,scope:G,job:m,subTree:T,um:p,m:K,a:Y}=n;fQ(K),fQ(Y),S&&vC(S),G.stop(),m&&(m.flags|=8,eI(T,n,l,u)),p&&WA(p,l),WA(()=>{n.isUnmounted=!0},l),l&&l.pendingBranch&&!l.isUnmounted&&n.asyncDep&&!n.asyncResolved&&n.suspenseId===l.pendingId&&(l.deps--,l.deps===0&&l.resolve())},ag=(n,l,u,S=!1,G=!1,m=0)=>{for(let T=m;T{if(n.shapeFlag&6)return Wg(n.component.subTree);if(n.shapeFlag&128)return n.suspense.next();const l=a(n.anchor||n.el),u=l&&l[$i];return u?a(u):l};let VC=!1;const oQ=(n,l,u)=>{n==null?l._vnode&&eI(l._vnode,null,null,!0):M(l._vnode||null,n,l,null,null,null,u),l._vnode=n,VC||(VC=!0,hQ(),Be(),VC=!1)},lg={p:M,um:eI,m:HI,r:iQ,mt:HC,mc:hA,pc:eA,pbc:P,n:Wg,o:I};let sQ,nQ;return{render:oQ,hydrate:sQ,createApp:No(oQ,sQ)}}function PC({type:I,props:A},g){return g==="svg"&&I==="foreignObject"||g==="mathml"&&I==="annotation-xml"&&A&&A.encoding&&A.encoding.includes("html")?void 0:g}function ZI({effect:I,job:A},g){g?(I.flags|=32,A.flags|=4):(I.flags&=-33,A.flags&=-5)}function So(I,A){return(!I||I&&!I.pendingBranch)&&A&&!A.persisted}function de(I,A,g=!1){const C=I.children,B=A.children;if(q(C)&&q(B))for(let Q=0;Q>1,I[g[e]]0&&(A[C]=g[Q-1]),g[Q]=C)}}for(Q=g.length,E=g[Q-1];Q-- >0;)g[Q]=E,E=A[E];return g}function ye(I){const A=I.subTree.component;if(A)return A.asyncDep&&!A.asyncResolved?A:ye(A)}function fQ(I){if(I)for(let A=0;ABC(Jo);function Ko(I,A){return OB(I,null,{flush:"sync"})}function AI(I,A,g){return OB(I,A,g)}function OB(I,A,g=BA){const{immediate:C,deep:B,flush:Q,once:E}=g,e=MA({},g),t=A&&C||!A&&Q!=="post";let o;if(pg){if(Q==="sync"){const c=ko();o=c.__watcherHandles||(c.__watcherHandles=[])}else if(!t){const c=()=>{};return c.stop=aI,c.resume=aI,c.pause=aI,c}}const i=YA;e.call=(c,N,M)=>lI(c,i,N,M);let s=!1;Q==="post"?e.scheduler=c=>{WA(c,i&&i.suspense)}:Q!=="sync"&&(s=!0,e.scheduler=(c,N)=>{N?c():HB(c)}),e.augmentJob=c=>{A&&(c.flags|=4),s&&(c.flags|=2,i&&(c.id=i.uid,c.i=i))};const a=ji(I,A,e);return pg&&(o?o.push(a):t&&a()),a}function po(I,A,g){const C=this.proxy,B=fA(I)?I.includes(".")?Me(C,I):()=>C[I]:I.bind(C,C);let Q;j(A)?Q=A:(Q=A.handler,g=A);const E=Hg(this),e=OB(B,Q.bind(C),g);return E(),e}function Me(I,A){const g=A.split(".");return()=>{let C=I;for(let B=0;B{let i,s=BA,a;return Ko(()=>{const c=I[B];VA(i,c)&&(i=c,o())}),{get(){return t(),g.get?g.get(i):i},set(c){const N=g.set?g.set(c):c;if(!VA(N,i)&&!(s!==BA&&VA(c,s)))return;const M=C.vnode.props;M&&(A in M||B in M||Q in M)&&(`onUpdate:${A}`in M||`onUpdate:${B}`in M||`onUpdate:${Q}`in M)||(i=c,o()),C.emit(`update:${A}`,N),VA(c,N)&&VA(c,s)&&!VA(N,a)&&o(),s=c,a=N}}});return e[Symbol.iterator]=()=>{let t=0;return{next(){return t<2?{value:t++?E||BA:e,done:!1}:{done:!0}}}},e}const Ge=(I,A)=>A==="modelValue"||A==="model-value"?I.modelModifiers:I[`${A}Modifiers`]||I[`${dI(A)}Modifiers`]||I[`${pI(A)}Modifiers`];function bo(I,A,...g){if(I.isUnmounted)return;const C=I.vnode.props||BA;let B=g;const Q=A.startsWith("update:"),E=Q&&Ge(C,A.slice(7));E&&(E.trim&&(B=g.map(i=>fA(i)?i.trim():i)),E.number&&(B=g.map(ii)));let e,t=C[e=ZC(A)]||C[e=ZC(dI(A))];!t&&Q&&(t=C[e=ZC(pI(A))]),t&&lI(t,I,6,B);const o=C[e+"Once"];if(o){if(!I.emitted)I.emitted={};else if(I.emitted[e])return;I.emitted[e]=!0,lI(o,I,6,B)}}function Fe(I,A,g=!1){const C=A.emitsCache,B=C.get(I);if(B!==void 0)return B;const Q=I.emits;let E={},e=!1;if(!j(I)){const t=o=>{const i=Fe(o,A,!0);i&&(e=!0,MA(E,i))};!g&&A.mixins.length&&A.mixins.forEach(t),I.extends&&t(I.extends),I.mixins&&I.mixins.forEach(t)}return!Q&&!e?(rA(I)&&C.set(I,null),null):(q(Q)?Q.forEach(t=>E[t]=null):MA(E,Q),rA(I)&&C.set(I,E),E)}function kC(I,A){return!I||!fC(A)?!1:(A=A.slice(2).replace(/Once$/,""),CA(I,A[0].toLowerCase()+A.slice(1))||CA(I,pI(A))||CA(I,A))}function XC(I){const{type:A,vnode:g,proxy:C,withProxy:B,propsOptions:[Q],slots:E,attrs:e,emit:t,render:o,renderCache:i,props:s,data:a,setupState:c,ctx:N,inheritAttrs:M}=I,d=rC(I);let U,b;try{if(g.shapeFlag&4){const w=B||C,Z=w;U=nI(o.call(Z,w,i,s,c,a,N)),b=e}else{const w=A;U=nI(w.length>1?w(s,{attrs:e,slots:E,emit:t}):w(s,null)),b=A.props?e:Lo(e)}}catch(w){Sg.length=0,mC(w,I,1),U=SA(KI)}let R=U;if(b&&M!==!1){const w=Object.keys(b),{shapeFlag:Z}=R;w.length&&Z&7&&(Q&&w.some(SB)&&(b=To(b,Q)),R=sg(R,b,!1,!0))}return g.dirs&&(R=sg(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(g.dirs):g.dirs),g.transition&&VB(R,g.transition),U=R,rC(d),U}const Lo=I=>{let A;for(const g in I)(g==="class"||g==="style"||fC(g))&&((A||(A={}))[g]=I[g]);return A},To=(I,A)=>{const g={};for(const C in I)(!SB(C)||!(C.slice(9)in A))&&(g[C]=I[C]);return g};function Ho(I,A,g){const{props:C,children:B,component:Q}=I,{props:E,children:e,patchFlag:t}=A,o=Q.emitsOptions;if(A.dirs||A.transition)return!0;if(g&&t>=0){if(t&1024)return!0;if(t&16)return C?dQ(C,E,o):!!E;if(t&8){const i=A.dynamicProps;for(let s=0;sI.__isSuspense;function Zo(I,A){A&&A.pendingBranch?q(I)?A.effects.push(...I):A.effects.push(I):zi(I)}const nA=Symbol.for("v-fgt"),KC=Symbol.for("v-txt"),KI=Symbol.for("v-cmt"),QC=Symbol.for("v-stc"),Sg=[];let jA=null;function z(I=!1){Sg.push(jA=I?null:[])}function vo(){Sg.pop(),jA=Sg[Sg.length-1]||null}let Kg=1;function yQ(I){Kg+=I,I<0&&jA&&(jA.hasOnce=!0)}function me(I){return I.dynamicChildren=Kg>0?jA||Qg:null,vo(),Kg>0&&jA&&jA.push(I),I}function IA(I,A,g,C,B,Q){return me(F(I,A,g,C,B,Q,!0))}function JI(I,A,g,C,B){return me(SA(I,A,g,C,B,!0))}function xB(I){return I?I.__v_isVNode===!0:!1}function hg(I,A){return I.type===A.type&&I.key===A.key}const Se=({key:I})=>I??null,EC=({ref:I,ref_key:A,ref_for:g})=>(typeof I=="number"&&(I=""+I),I!=null?fA(I)||yA(I)||j(I)?{i:LA,r:I,k:A,f:!!g}:I:null);function F(I,A=null,g=null,C=0,B=null,Q=I===nA?0:1,E=!1,e=!1){const t={__v_isVNode:!0,__v_skip:!0,type:I,props:A,key:A&&Se(A),ref:A&&EC(A),scopeId:Ee,slotScopeIds:null,children:g,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:Q,patchFlag:C,dynamicProps:B,dynamicChildren:null,appContext:null,ctx:LA};return e?(qB(t,g),Q&128&&I.normalize(t)):g&&(t.shapeFlag|=fA(g)?8:16),Kg>0&&!E&&jA&&(t.patchFlag>0||Q&6)&&t.patchFlag!==32&&jA.push(t),t}const SA=Oo;function Oo(I,A=null,g=null,C=0,B=null,Q=!1){if((!I||I===no)&&(I=KI),xB(I)){const e=sg(I,A,!0);return g&&qB(e,g),Kg>0&&!Q&&jA&&(e.shapeFlag&6?jA[jA.indexOf(I)]=e:jA.push(e)),e.patchFlag=-2,e}if(As(I)&&(I=I.__vccOpts),A){A=xo(A);let{class:e,style:t}=A;e&&!fA(e)&&(A.class=xI(e)),rA(t)&&(TB(t)&&!q(t)&&(t=MA({},t)),A.style=OI(t))}const E=fA(I)?1:Ue(I)?128:Ao(I)?64:rA(I)?4:j(I)?2:0;return F(I,A,g,C,B,E,Q,!0)}function xo(I){return I?TB(I)||De(I)?MA({},I):I:null}function sg(I,A,g=!1,C=!1){const{props:B,ref:Q,patchFlag:E,children:e,transition:t}=I,o=A?Mg(B||{},A):B,i={__v_isVNode:!0,__v_skip:!0,type:I.type,props:o,key:o&&Se(o),ref:A&&A.ref?g&&Q?q(Q)?Q.concat(EC(A)):[Q,EC(A)]:EC(A):Q,scopeId:I.scopeId,slotScopeIds:I.slotScopeIds,children:e,target:I.target,targetStart:I.targetStart,targetAnchor:I.targetAnchor,staticCount:I.staticCount,shapeFlag:I.shapeFlag,patchFlag:A&&I.type!==nA?E===-1?16:E|16:E,dynamicProps:I.dynamicProps,dynamicChildren:I.dynamicChildren,appContext:I.appContext,dirs:I.dirs,transition:t,component:I.component,suspense:I.suspense,ssContent:I.ssContent&&sg(I.ssContent),ssFallback:I.ssFallback&&sg(I.ssFallback),el:I.el,anchor:I.anchor,ctx:I.ctx,ce:I.ce};return t&&C&&VB(i,t.clone(i)),i}function qo(I=" ",A=0){return SA(KC,null,I,A)}function MQ(I,A){const g=SA(QC,null,I);return g.staticCount=A,g}function GI(I="",A=!1){return A?(z(),JI(KI,null,I)):SA(KI,null,I)}function nI(I){return I==null||typeof I=="boolean"?SA(KI):q(I)?SA(nA,null,I.slice()):xB(I)?UI(I):SA(KC,null,String(I))}function UI(I){return I.el===null&&I.patchFlag!==-1||I.memo?I:sg(I)}function qB(I,A){let g=0;const{shapeFlag:C}=I;if(A==null)A=null;else if(q(A))g=16;else if(typeof A=="object")if(C&65){const B=A.default;B&&(B._c&&(B._d=!1),qB(I,B()),B._c&&(B._d=!0));return}else{g=32;const B=A._;!B&&!De(A)?A._ctx=LA:B===3&&LA&&(LA.slots._===1?A._=1:(A._=2,I.patchFlag|=1024))}else j(A)?(A={default:A,_ctx:LA},g=32):(A=String(A),C&64?(g=16,A=[qo(A)]):g=8);I.children=A,I.shapeFlag|=g}function Mg(...I){const A={};for(let g=0;gYA||LA;let cC,aB;{const I=MC(),A=(g,C)=>{let B;return(B=I[g])||(B=I[g]=[]),B.push(C),Q=>{B.length>1?B.forEach(E=>E(Q)):B[0](Q)}};cC=A("__VUE_INSTANCE_SETTERS__",g=>YA=g),aB=A("__VUE_SSR_SETTERS__",g=>pg=g)}const Hg=I=>{const A=YA;return cC(I),I.scope.on(),()=>{I.scope.off(),cC(A)}},GQ=()=>{YA&&YA.scope.off(),cC(null)};function Ye(I){return I.vnode.shapeFlag&4}let pg=!1;function Xo(I,A=!1,g=!1){A&&aB(A);const{props:C,children:B}=I.vnode,Q=Ye(I);uo(I,C,Q,A),Go(I,B,g);const E=Q?zo(I,A):void 0;return A&&aB(!1),E}function zo(I,A){const g=I.type;I.accessCache=Object.create(null),I.proxy=new Proxy(I.ctx,ro);const{setup:C}=g;if(C){bI();const B=I.setupContext=C.length>1?$o(I):null,Q=Hg(I),E=Tg(C,I,0,[I.props,B]),e=UE(E);if(LI(),Q(),(e||I.sp)&&!ig(I)&&ee(I),e){if(E.then(GQ,GQ),A)return E.then(t=>{FQ(I,t,A)}).catch(t=>{mC(t,I,0)});I.asyncDep=E}else FQ(I,E,A)}else Je(I,A)}function FQ(I,A,g){j(A)?I.type.__ssrInlineRender?I.ssrRender=A:I.render=A:rA(A)&&(I.setupState=Ae(A)),Je(I,g)}let UQ;function Je(I,A,g){const C=I.type;if(!I.render){if(!A&&UQ&&!C.render){const B=C.template||ZB(I).template;if(B){const{isCustomElement:Q,compilerOptions:E}=I.appContext.config,{delimiters:e,compilerOptions:t}=C,o=MA(MA({isCustomElement:Q,delimiters:e},E),t);C.render=UQ(B,o)}}I.render=C.render||aI}{const B=Hg(I);bI();try{ao(I)}finally{LI(),B()}}}const _o={get(I,A){return UA(I,"get",""),I[A]}};function $o(I){const A=g=>{I.exposed=g||{}};return{attrs:new Proxy(I.attrs,_o),slots:I.slots,emit:I.emit,expose:A}}function jB(I){return I.exposed?I.exposeProxy||(I.exposeProxy=new Proxy(Ae(bi(I.exposed)),{get(A,g){if(g in A)return A[g];if(g in mg)return mg[g](I)},has(A,g){return g in A||g in mg}})):I.proxy}function As(I){return j(I)&&"__vccOpts"in I}const uA=(I,A)=>qi(I,A,pg),Is="3.5.12";/** * @vue/runtime-dom v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let lB;const mQ=typeof window<"u"&&window.trustedTypes;if(mQ)try{lB=mQ.createPolicy("vue",{createHTML:I=>I})}catch{}const ke=lB?I=>lB.createHTML(I):I=>I,gs="http://www.w3.org/2000/svg",Cs="http://www.w3.org/1998/Math/MathML",wI=typeof document<"u"?document:null,SQ=wI&&wI.createElement("template"),Bs={insert:(I,A,g)=>{A.insertBefore(I,g||null)},remove:I=>{const A=I.parentNode;A&&A.removeChild(I)},createElement:(I,A,g,C)=>{const B=A==="svg"?wI.createElementNS(gs,I):A==="mathml"?wI.createElementNS(Cs,I):g?wI.createElement(I,{is:g}):wI.createElement(I);return I==="select"&&C&&C.multiple!=null&&B.setAttribute("multiple",C.multiple),B},createText:I=>wI.createTextNode(I),createComment:I=>wI.createComment(I),setText:(I,A)=>{I.nodeValue=A},setElementText:(I,A)=>{I.textContent=A},parentNode:I=>I.parentNode,nextSibling:I=>I.nextSibling,querySelector:I=>wI.querySelector(I),setScopeId(I,A){I.setAttribute(A,"")},insertStaticContent(I,A,g,C,B,Q){const E=g?g.previousSibling:A.lastChild;if(B&&(B===Q||B.nextSibling))for(;A.insertBefore(B.cloneNode(!0),g),!(B===Q||!(B=B.nextSibling)););else{SQ.innerHTML=ke(C==="svg"?`${I}`:C==="mathml"?`${I}`:I);const e=SQ.content;if(C==="svg"||C==="mathml"){const t=e.firstChild;for(;t.firstChild;)e.appendChild(t.firstChild);e.removeChild(t)}A.insertBefore(e,g)}return[E?E.nextSibling:A.firstChild,g?g.previousSibling:A.lastChild]}},Qs=Symbol("_vtc");function Es(I,A,g){const C=I[Qs];C&&(A=(A?[A,...C]:[...C]).join(" ")),A==null?I.removeAttribute("class"):g?I.setAttribute("class",A):I.className=A}const YQ=Symbol("_vod"),es=Symbol("_vsh"),ts=Symbol(""),is=/(^|;)\s*display\s*:/;function os(I,A,g){const C=I.style,B=fA(g);let Q=!1;if(g&&!B){if(A)if(fA(A))for(const E of A.split(";")){const e=E.slice(0,E.indexOf(":")).trim();g[e]==null&&eC(C,e,"")}else for(const E in A)g[E]==null&&eC(C,E,"");for(const E in g)E==="display"&&(Q=!0),eC(C,E,g[E])}else if(B){if(A!==g){const E=C[ts];E&&(g+=";"+E),C.cssText=g,Q=is.test(g)}}else A&&I.removeAttribute("style");YQ in I&&(I[YQ]=Q?C.display:"",I[es]&&(C.display="none"))}const JQ=/\s*!important$/;function eC(I,A,g){if(q(g))g.forEach(C=>eC(I,A,C));else if(g==null&&(g=""),A.startsWith("--"))I.setProperty(A,g);else{const C=ss(I,A);JQ.test(g)?I.setProperty(pI(C),g.replace(JQ,""),"important"):I[C]=g}}const kQ=["Webkit","Moz","ms"],zC={};function ss(I,A){const g=zC[A];if(g)return g;let C=dI(A);if(C!=="filter"&&C in I)return zC[A]=C;C=YE(C);for(let B=0;B_C||(cs.then(()=>_C=0),_C=Date.now());function hs(I,A){const g=C=>{if(!C._vts)C._vts=Date.now();else if(C._vts<=g.attached)return;lI(ws(C,g.value),A,5,[C])};return g.value=I,g.attached=Ds(),g}function ws(I,A){if(q(A)){const g=I.stopImmediatePropagation;return I.stopImmediatePropagation=()=>{g.call(I),I._stopped=!0},A.map(C=>B=>!B._stopped&&C&&C(B))}else return A}const HQ=I=>I.charCodeAt(0)===111&&I.charCodeAt(1)===110&&I.charCodeAt(2)>96&&I.charCodeAt(2)<123,Ns=(I,A,g,C,B,Q)=>{const E=B==="svg";A==="class"?Es(I,C,E):A==="style"?os(I,g,C):fC(A)?SB(A)||as(I,A,g,C,Q):(A[0]==="."?(A=A.slice(1),!0):A[0]==="^"?(A=A.slice(1),!1):Rs(I,A,C,E))?(bQ(I,A,C),!I.tagName.includes("-")&&(A==="value"||A==="checked"||A==="selected")&&pQ(I,A,C,E,Q,A!=="value")):I._isVueCE&&(/[A-Z]/.test(A)||!fA(C))?bQ(I,dI(A),C,Q,A):(A==="true-value"?I._trueValue=C:A==="false-value"&&(I._falseValue=C),pQ(I,A,C,E))};function Rs(I,A,g,C){if(C)return!!(A==="innerHTML"||A==="textContent"||A in I&&HQ(A)&&j(g));if(A==="spellcheck"||A==="draggable"||A==="translate"||A==="form"||A==="list"&&I.tagName==="INPUT"||A==="type"&&I.tagName==="TEXTAREA")return!1;if(A==="width"||A==="height"){const B=I.tagName;if(B==="IMG"||B==="VIDEO"||B==="CANVAS"||B==="SOURCE")return!1}return HQ(A)&&fA(g)?!1:A in I}const us=["ctrl","shift","alt","meta"],fs={stop:I=>I.stopPropagation(),prevent:I=>I.preventDefault(),self:I=>I.target!==I.currentTarget,ctrl:I=>!I.ctrlKey,shift:I=>!I.shiftKey,alt:I=>!I.altKey,meta:I=>!I.metaKey,left:I=>"button"in I&&I.button!==0,middle:I=>"button"in I&&I.button!==1,right:I=>"button"in I&&I.button!==2,exact:(I,A)=>us.some(g=>I[`${g}Key`]&&!A.includes(g))},cB=(I,A)=>{const g=I._withMods||(I._withMods={}),C=A.join(".");return g[C]||(g[C]=(B,...Q)=>{for(let E=0;E{const A=ys().createApp(...I),{mount:g}=A;return A.mount=C=>{const B=Fs(C);if(!B)return;const Q=A._component;!j(Q)&&!Q.render&&!Q.template&&(Q.template=B.innerHTML),B.nodeType===1&&(B.textContent="");const E=g(B,!1,Gs(B));return B instanceof Element&&(B.removeAttribute("v-cloak"),B.setAttribute("data-v-app","")),E},A};function Gs(I){if(I instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&I instanceof MathMLElement)return"mathml"}function Fs(I){return fA(I)?document.querySelector(I):I}const ZQ=""+new URL("logo.svg",import.meta.url).href;function Us(I){return bE()?(Di(I),!0):!1}function HA(I){return typeof I=="function"?I():h(I)}const ms=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ss=Object.prototype.toString,Ys=I=>Ss.call(I)==="[object Object]",$C=(I,A,g)=>Math.min(g,Math.max(A,I)),Ke=()=>{};function Js(I,A){function g(...C){return new Promise((B,Q)=>{Promise.resolve(I(()=>A.apply(this,C),{fn:A,thisArg:this,args:C})).then(B).catch(Q)})}return g}const pe=I=>I();function ks(I=pe){const A=oA(!0);function g(){A.value=!1}function C(){A.value=!0}const B=(...Q)=>{A.value&&I(...Q)};return{isActive:UC(A),pause:g,resume:C,eventFilter:B}}function Ks(I){return WB()}function ps(...I){if(I.length!==1)return vi(...I);const A=I[0];return typeof A=="function"?UC(Ie(()=>({get:A,set:Ke}))):oA(A)}function bs(I,A,g={}){const{eventFilter:C=pe,...B}=g;return AI(I,Js(C,A),B)}function Ls(I,A,g={}){const{eventFilter:C,...B}=g,{eventFilter:Q,pause:E,resume:e,isActive:t}=ks(C);return{stop:bs(I,A,{...B,eventFilter:Q}),pause:E,resume:e,isActive:t}}function Ts(I,A=!0,g){Ks()?ng(I,g):A?I():SC(I)}const DC=ms?window:void 0;function Hs(I){var A;const g=HA(I);return(A=g==null?void 0:g.$el)!=null?A:g}function DB(...I){let A,g,C,B;if(typeof I[0]=="string"||Array.isArray(I[0])?([g,C,B]=I,A=DC):[A,g,C,B]=I,!A)return Ke;Array.isArray(g)||(g=[g]),Array.isArray(C)||(C=[C]);const Q=[],E=()=>{Q.forEach(i=>i()),Q.length=0},e=(i,s,a,c)=>(i.addEventListener(s,a,c),()=>i.removeEventListener(s,a,c)),t=AI(()=>[Hs(A),HA(B)],([i,s])=>{if(E(),!i)return;const a=Ys(s)?{...s}:s;Q.push(...g.flatMap(c=>C.map(N=>e(i,c,N,a))))},{immediate:!0,flush:"post"}),o=()=>{t(),E()};return Us(o),o}function Vs(I){return typeof I=="function"?I:typeof I=="string"?A=>A.key===I:Array.isArray(I)?A=>I.includes(A.key):()=>!0}function Zs(...I){let A,g,C={};I.length===3?(A=I[0],g=I[1],C=I[2]):I.length===2?typeof I[1]=="object"?(A=!0,g=I[0],C=I[1]):(A=I[0],g=I[1]):(A=!0,g=I[0]);const{target:B=DC,eventName:Q="keydown",passive:E=!1,dedupe:e=!1}=C,t=Vs(A);return DB(B,Q,i=>{i.repeat&&HA(e)||t(i)&&g(i)},E)}function vs(I,A,g={}){return Zs(I,A,{...g,eventName:"keydown"})}const zg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_g="__vueuse_ssr_handlers__",Os=xs();function xs(){return _g in zg||(zg[_g]=zg[_g]||{}),zg[_g]}function qs(I,A){return Os[I]||A}function Ws(I){return I==null?"any":I instanceof Set?"set":I instanceof Map?"map":I instanceof Date?"date":typeof I=="boolean"?"boolean":typeof I=="string"?"string":typeof I=="object"?"object":Number.isNaN(I)?"any":"number"}const js={boolean:{read:I=>I==="true",write:I=>String(I)},object:{read:I=>JSON.parse(I),write:I=>JSON.stringify(I)},number:{read:I=>Number.parseFloat(I),write:I=>String(I)},any:{read:I=>I,write:I=>String(I)},string:{read:I=>I,write:I=>String(I)},map:{read:I=>new Map(JSON.parse(I)),write:I=>JSON.stringify(Array.from(I.entries()))},set:{read:I=>new Set(JSON.parse(I)),write:I=>JSON.stringify(Array.from(I))},date:{read:I=>new Date(I),write:I=>I.toISOString()}},vQ="vueuse-storage";function XI(I,A,g,C={}){var B;const{flush:Q="pre",deep:E=!0,listenToStorageChanges:e=!0,writeDefaults:t=!0,mergeDefaults:o=!1,shallow:i,window:s=DC,eventFilter:a,onError:c=P=>{console.error(P)},initOnMounted:N}=C,M=(i?_E:oA)(typeof A=="function"?A():A);if(!g)try{g=qs("getDefaultStorage",()=>{var P;return(P=DC)==null?void 0:P.localStorage})()}catch(P){c(P)}if(!g)return M;const d=HA(A),m=Ws(d),b=(B=C.serializer)!=null?B:js[m],{pause:R,resume:w}=Ls(M,()=>sA(M.value),{flush:Q,deep:E,eventFilter:a});s&&e&&Ts(()=>{g instanceof Storage?DB(s,"storage",hA):DB(s,vQ,vA),N&&hA()}),N||hA();function Z(P,O){if(s){const wA={key:I,oldValue:P,newValue:O,storageArea:g};s.dispatchEvent(g instanceof Storage?new StorageEvent("storage",wA):new CustomEvent(vQ,{detail:wA}))}}function sA(P){try{const O=g.getItem(I);if(P==null)Z(O,null),g.removeItem(I);else{const wA=b.write(P);O!==wA&&(g.setItem(I,wA),Z(O,wA))}}catch(O){c(O)}}function DA(P){const O=P?P.newValue:g.getItem(I);if(O==null)return t&&d!=null&&g.setItem(I,b.write(d)),d;if(!P&&o){const wA=b.read(O);return typeof o=="function"?o(wA,d):m==="object"&&!Array.isArray(wA)?{...d,...wA}:wA}else return typeof O!="string"?O:b.read(O)}function hA(P){if(!(P&&P.storageArea!==g)){if(P&&P.key==null){M.value=d;return}if(!(P&&P.key!==I)){R();try{(P==null?void 0:P.newValue)!==b.write(M.value)&&(M.value=DA(P))}catch(O){c(O)}finally{P?SC(w):w()}}}}function vA(P){hA(P.detail)}return M}function OQ(I,A){const g=_E(o()),C=ps(I),B=uA({get(){var i;let a=C.value.indexOf(g.value);return a<0&&(a=(i=void 0)!=null?i:0),a},set(i){Q(i)}});function Q(i){const s=C.value,a=s.length,c=(i%a+a)%a,N=s[c];return g.value=N,N}function E(i=1){return Q(B.value+i)}function e(i=1){return E(i)}function t(i=1){return E(-i)}function o(){var i,s;return(s=HA((i=void 0)!=null?i:HA(I)[0]))!=null?s:void 0}return AI(C,()=>Q(B.value)),{state:g,index:B,next:e,prev:t,go:Q}}function Ps(){try{return"constructor"in GestureEvent}catch{return!1}}function be(){return typeof window<"u"&&"ontouchstart"in window}function Le(I){return"pointerId"in I?null:I.type==="touchend"?I.changedTouches:I.targetTouches}function PB(I){return Array.from(Le(I)).map(A=>A.identifier)}function zA(I){const A="buttons"in I?I.buttons:0,{shiftKey:g,altKey:C,metaKey:B,ctrlKey:Q}=I;return{buttons:A,shiftKey:g,altKey:C,metaKey:B,ctrlKey:Q}}const Vg=I=>I;function Cg(I,A=Vg){const g=Le(I),{clientX:C,clientY:B}=g?g[0]:I;return A([C,B])}function xQ(I,A,g=Vg){const[C,B]=Array.from(I.touches).filter(c=>A.includes(c.identifier));if(!C||!B)throw Error("The event doesn't have two pointers matching the pointerIds");const Q=B.clientX-C.clientX,E=B.clientY-C.clientY,e=(B.clientX+C.clientX)/2,t=(B.clientY+C.clientY)/2,o=Math.hypot(Q,E),i=-(Math.atan2(Q,E)*180)/Math.PI,s=g([o,i]),a=g([e,t]);return{values:s,origin:a}}function Xs(I,A=Vg){const{scrollX:g,scrollY:C,scrollLeft:B,scrollTop:Q}=I.currentTarget;return A([g||B||0,C||Q||0])}const qQ=40,WQ=800;function Te(I,A=Vg){let{deltaX:g,deltaY:C,deltaMode:B}=I;return B===1?(g*=qQ,C*=qQ):B===2&&(g*=WQ,C*=WQ),A([g,C])}function jQ(I,A=Vg){return A([I.scale,I.rotation])}function He(){}function Ve(...I){return I.length===0?He:I.length===1?I[0]:function(){var A;for(let g of I)A=g.apply(this,arguments)||A;return A}}function YI(I,A){if(I===void 0){if(A===void 0)throw new Error("Must define fallback value if undefined is expected");I=A}return Array.isArray(I)?I:[I,I]}function PQ(I,A){return Object.assign({},A,I||{})}function hC(I,...A){return typeof I=="function"?I(...A):I}function wg(I){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:He,canceled:!1,memo:void 0,args:void 0,...I}}function hB(){const I={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},A=wg({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),g=wg({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),C=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),B=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),Q=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:I,drag:A,pinch:g,wheel:C,move:B,scroll:Q}}var zs=Object.defineProperty,_s=(I,A,g)=>A in I?zs(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,TA=(I,A,g)=>(_s(I,typeof A!="symbol"?A+"":A,g),g);class $s{constructor(A){this.classes=A,TA(this,"nativeRefs"),TA(this,"config"),TA(this,"handlers"),TA(this,"state"),TA(this,"timeouts"),TA(this,"domListeners"),TA(this,"windowListeners"),TA(this,"pointerIds",new Set),TA(this,"touchIds",new Set),TA(this,"supportsTouchEvents",be()),TA(this,"supportsGestureEvents",Ps()),TA(this,"bind",(...g)=>{const C={};for(let B of this.classes)new B(this,g).addBindings(C);for(let B in this.nativeRefs)lA(C,B,Q=>this.nativeRefs[B]({...this.state.shared,event:Q,args:g}));return this.config.domTarget?Cn(this,C):Bn(this,C)}),TA(this,"clean",()=>{const{eventOptions:g,domTarget:C}=this.config,B=h(C);B&&Zg(B,Oe(this.domListeners),g),Object.values(this.timeouts).forEach(clearTimeout),An(this)}),TA(this,"reset",()=>{this.state=hB()}),this.classes=A,this.state=hB(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function Ze(I,A){"pointerId"in A?I.pointerIds.add(A.pointerId):I.touchIds=new Set(PB(A))}function ve(I,A){"pointerId"in A?I.pointerIds.delete(A.pointerId):PB(A).forEach(g=>I.touchIds.delete(g))}function An(I){const{config:{window:A,eventOptions:g},windowListeners:C}=I,B=h(A);if(B){for(let Q in C){const E=C[Q];Zg(B,E,g)}I.windowListeners={}}}function In({config:I,windowListeners:A},g,C=I.eventOptions){const B=h(I.window);B&&(Zg(B,A[g],C),delete A[g])}function gn({config:I,windowListeners:A},g,C=[],B=I.eventOptions){const Q=h(I.window);Q&&(Zg(Q,A[g],B),xe(Q,A[g]=C,B))}function Cn({config:I,domListeners:A},g){const{eventOptions:C,domTarget:B}=I,Q=h(B);if(!Q)throw new Error("domTarget must be defined");Zg(Q,Oe(A),C);for(let[E,e]of Object.entries(g)){const t=E.slice(2).toLowerCase();A.push([t,Ve(...e)])}xe(Q,A,C)}function Bn({config:I},A){const g={},C=I.eventOptions.capture?"Capture":"";for(let[B,Q]of Object.entries(A)){const E=Array.isArray(Q)?Q:[Q],e=B+C;g[e]=Ve(...E)}return g}function Oe(I=[]){return I.splice(0,I.length)}function lA(I,A,g){I[A]||(I[A]=[]),I[A].push(g)}function xe(I,A=[],g={}){if(I)for(let[C,B]of A)I.addEventListener(C,B,g)}function Zg(I,A=[],g={}){if(I)for(let[C,B]of A)I.removeEventListener(C,B,g)}function wC(I,A){return I.map((g,C)=>g+A[C])}function XB(I,A){return I.map((g,C)=>g-A[C])}function bg(I){return Math.hypot(...I)}function qe(I,A=I){const g=bg(A),C=g===0?0:1/g,B=A.map(E=>C*E);return{distance:bg(I),direction:B}}function We(I,A,g){const C=bg(A),B=C===0?0:1/C,Q=g===0?0:1/g,E=Q*C,e=A.map(i=>Q*i),t=A.map(i=>B*i),o=bg(I);return{velocities:e,velocity:E,distance:o,direction:t}}function NC(I){return Math.sign?Math.sign(I):+(I>0)-+(I<0)||+I}function Qn(I,A,g){return Math.max(A,Math.min(I,g))}function En(I,A){return Math.pow(I,A*5)}function XQ(I,A,g){return A===0||Math.abs(A)===1/0?En(I,g):I*A*g/(A+g*I)}function zQ(I,A,g,C=.15){return C===0?Qn(I,A,g):Ig?+XQ(I-g,g-A,C)+g:I}var en=Object.defineProperty,tn=(I,A,g)=>A in I?en(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,$g=(I,A,g)=>(tn(I,typeof A!="symbol"?A+"":A,g),g);const _A=new Map,on=I=>I;class je{constructor(A,g=[]){this.controller=A,this.args=g,$g(this,"debounced",!0),$g(this,"setTimeout",(C,B=140,...Q)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(C,B,...Q)}),$g(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),$g(this,"fireGestureHandler",(C=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!C&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const t=this.state.active,o=this.state._active;this.state.active=o,this.state.first=o&&!t,this.state.last=t&&!o,this.controller.state.shared[this.ingKey]=o}const B=this.controller.pointerIds.size||this.controller.touchIds.size,Q=this.controller.state.shared.buttons>0||B>0,E={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:B,down:Q},e=this.handler(E);return this.state.memo=e!==void 0?e:this.state.memo,E}),this.controller=A,this.args=g}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||on}updateSharedState(A){Object.assign(this.controller.state.shared,A)}updateGestureState(A){Object.assign(this.state,A)}checkIntentionality(A,g){return{_intentional:A,_blocked:!1}}getMovement(A){const{rubberband:g,threshold:C}=this.config,{_bounds:B,_initial:Q,_active:E,_intentional:e,lastOffset:t,movement:o}=this.state,i=this.getInternalMovement(A,this.state),s=this.transform(C).map(Math.abs),a=e[0]===!1?_Q(i[0],s[0]):e[0],c=e[1]===!1?_Q(i[1],s[1]):e[1],N=this.checkIntentionality([a,c],i);if(N._blocked)return{...N,_movement:i,delta:[0,0]};const M=N._intentional,d=i;let m=[M[0]!==!1?i[0]-M[0]:0,M[1]!==!1?i[1]-M[1]:0];const b=wC(m,t),R=E?g:[0,0];return m=$Q(B,wC(m,Q),R),{...N,intentional:M[0]!==!1||M[1]!==!1,_initial:Q,_movement:d,movement:m,values:A,offset:$Q(B,b,R),delta:XB(m,o)}}clean(){this.clearTimeout()}}function _Q(I,A){return Math.abs(I)>=A?NC(I)*A:!1}function $Q(I,[A,g],[C,B]){const[[Q,E],[e,t]]=I;return[zQ(A,Q,E,C),zQ(g,e,t,B)]}function dA({state:I},A,g){const{timeStamp:C,type:B}=A,Q=I.values,E=g?0:C-I.startTime;return{_lastEventType:B,event:A,timeStamp:C,elapsedTime:E,previous:Q}}function jI({state:I,config:A,stateKey:g,args:C},B,Q){const E=I.offset,e=Q.timeStamp,{initial:t,bounds:o}=A,i={...hB()[g],_active:!0,args:C,values:B,initial:B,offset:E,lastOffset:E,startTime:e};return{...i,_initial:hC(t,i),_bounds:hC(o,i)}}class pC extends je{getInternalMovement(A,g){return XB(A,g.initial)}checkIntentionality(A,g){if(A[0]===!1&&A[1]===!1)return{_intentional:A,axis:this.state.axis};const[C,B]=g.map(Math.abs),Q=this.state.axis||(C>B?"x":CA in I?sn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,GA=(I,A,g)=>(nn(I,typeof A!="symbol"?A+"":A,g),g);const rn=3;function AE(I){"persist"in I&&typeof I.persist=="function"&&I.persist()}class an extends pC{constructor(){super(...arguments),GA(this,"ingKey","dragging"),GA(this,"stateKey","drag"),GA(this,"setPointerCapture",A=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:g,pointerId:C}=A;g&&"setPointerCapture"in g&&g.setPointerCapture(C),this.updateGestureState({_dragTarget:g,_dragPointerId:C})}),GA(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:A,_dragPointerId:g}=this.state;if(g&&A&&"releasePointerCapture"in A&&(!("hasPointerCapture"in A)||A.hasPointerCapture(g)))try{A.releasePointerCapture(g)}catch{}}),GA(this,"preventScroll",A=>{this.state._dragPreventScroll&&A.cancelable&&A.preventDefault()}),GA(this,"getEventId",A=>this.config.useTouch?A.changedTouches[0].identifier:A.pointerId),GA(this,"isValidEvent",A=>this.state._pointerId===this.getEventId(A)),GA(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),GA(this,"setUpWindowScrollDetection",A=>{AE(A),gn(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,A)}),GA(this,"setUpDelayedDragTrigger",A=>{this.state._dragDelayed=!0,AE(A),this.setTimeout(this.startDrag.bind(this),this.config.delay,A)}),GA(this,"setStartState",A=>{const g=Cg(A,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),_pointerId:this.getEventId(A)}),this.updateGestureState(this.getMovement(g))}),GA(this,"onDragStart",A=>{Ze(this.controller,A),!(!this.enabled||this.state._active)&&(this.setStartState(A),this.setPointerCapture(A),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(A):this.config.delay>0?this.setUpDelayedDragTrigger(A):this.startDrag(A,!0))}),GA(this,"onDragChange",A=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(A)||this.state._lastEventType===A.type&&A.timeStamp===this.state.timeStamp)return;let g;if(document.pointerLockElement){const{movementX:t,movementY:o}=A;g=wC(this.transform([t,o]),this.state.values)}else g=Cg(A,this.transform);const C=this.getKinematics(g,A);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(A);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&C.axis)if(C.axis==="x")this.startDrag(A);else{this.state._active=!1;return}else return;else return}const B=zA(A);this.updateSharedState(B);const Q=dA(this,A),E=bg(C._movement);let{_dragIsTap:e}=this.state;e&&E>=rn&&(e=!1),this.updateGestureState({...Q,...C,_dragIsTap:e}),this.fireGestureHandler()}),GA(this,"onDragEnd",A=>{if(ve(this.controller,A),!this.isValidEvent(A)||(this.clean(),!this.state._active))return;this.state._active=!1;const g=this.state._dragIsTap,[C,B]=this.state.velocities,[Q,E]=this.state.movement,[e,t]=this.state._intentional,[o,i]=this.config.swipeVelocity,[s,a]=this.config.swipeDistance,c=this.config.swipeDuration,N={...dA(this,A),...this.getMovement(this.state.values)},M=[0,0];N.elapsedTimeo&&Math.abs(Q)>s&&(M[0]=NC(C)),t!==!1&&Math.abs(B)>i&&Math.abs(E)>a&&(M[1]=NC(B))),this.updateSharedState({buttons:0}),this.updateGestureState({...N,tap:g,swipe:M}),this.fireGestureHandler(this.config.filterTaps&&g===!0)}),GA(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),In(this.controller,this.stateKey)}),GA(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),SC(this.fireGestureHandler))}),GA(this,"onClick",A=>{this.state._dragIsTap||A.stopPropagation()})}startDrag(A,g=!1){!this.state._active||this.state._dragStarted||(g||this.setStartState(A),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(A){if(this.config.useTouch?(lA(A,"onTouchStart",this.onDragStart),lA(A,"onTouchMove",this.onDragChange),lA(A,"onTouchEnd",this.onDragEnd),lA(A,"onTouchCancel",this.onDragEnd)):(lA(A,"onPointerDown",this.onDragStart),lA(A,"onPointerMove",this.onDragChange),lA(A,"onPointerUp",this.onDragEnd),lA(A,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const g=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";lA(A,g,this.onClick)}}}function vg(I={},A){const g={};for(const[C,B]of Object.entries(A))switch(typeof B){case"function":g[C]=B.call(g,I[C],C,I);break;case"object":g[C]=vg(I[C],B);break;case"boolean":B&&(g[C]=I[C]);break}return g}const ln=180,cn=.15,Dn=.5,hn=50,wn=250,Pe={threshold(I=0){return YI(I)},rubberband(I=0){switch(I){case!0:return YI(cn);case!1:return YI(0);default:return YI(I)}},enabled(I=!0){return I},triggerAllEvents(I=!1){return I},initial(I=0){return typeof I=="function"?I:YI(I)},transform:!0},zB={...Pe,axis:!0,lockDirection(I=!1){return I},bounds(I={}){if(typeof I=="function")return Q=>zB.bounds(I(Q));const{left:A=-1/0,right:g=1/0,top:C=-1/0,bottom:B=1/0}=I;return[[A,g],[C,B]]}},Nn=typeof window<"u"&&window.document&&window.document.createElement,Rn={enabled(I=!0){return I},domTarget:!0,window(I=Nn?window:void 0){return I},eventOptions({passive:I=!0,capture:A=!1}={}){return{passive:I,capture:A}},transform:!0},un={...Pe,bounds(I,A,{distanceBounds:g={},angleBounds:C={}}){const B=E=>{const e=PQ(hC(g,E),{min:-1/0,max:1/0});return[e.min,e.max]},Q=E=>{const e=PQ(hC(C,E),{min:-1/0,max:1/0});return[e.min,e.max]};return typeof g!="function"&&typeof C!="function"?[B(),Q()]:E=>[B(E),Q(E)]}},fn={...zB,useTouch(I=!0){return I&&be()},preventWindowScrollY(I=!1){return I},threshold(I,A,{filterTaps:g=!1,lockDirection:C=!1,axis:B=void 0}){const Q=YI(I,g?3:C||B?1:0);return this.filterTaps=g,Q},swipeVelocity(I=Dn){return YI(I)},swipeDistance(I=hn){return YI(I)},swipeDuration(I=wn){return I},delay(I=0){switch(I){case!0:return ln;case!1:return 0;default:return I}}};function dn(I){return vg(I,Rn)}function AB(I={}){return vg(I,zB)}function yn(I={}){return vg(I,un)}function Mn(I={}){return vg(I,fn)}function Gn(I,A=new Set){const{drag:g,wheel:C,move:B,scroll:Q,pinch:E,hover:e,eventOptions:t,window:o,transform:i,domTarget:s,enabled:a}=I,c=dn({domTarget:s,eventOptions:t,transform:i,window:o,enabled:a});return A.has("onDrag")&&(c.drag=Mn(g)),A.has("onWheel")&&(c.wheel=AB(C)),A.has("onScroll")&&(c.scroll=AB(Q)),A.has("onMove")&&(c.move=AB(B)),A.has("onPinch")&&(c.pinch=yn(E)),A.has("onHover")&&(c.hover={enabled:!0,...e}),c}function Fn(I,A,g={}){const C=Un(I),B=new $s(C);return B.config=A,B.handlers=I,B.nativeRefs=g,WB()&&!A.manual&&(ng(B.bind),JC(B.clean)),B}function Un(I){const A=new Set;return I.drag&&A.add(_A.get("drag")),I.wheel&&A.add(_A.get("wheel")),I.scroll&&A.add(_A.get("scroll")),I.move&&A.add(_A.get("move")),I.pinch&&A.add(_A.get("pinch")),I.hover&&A.add(_A.get("hover")),A}var mn=Object.defineProperty,Sn=(I,A,g)=>A in I?mn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,oI=(I,A,g)=>(Sn(I,typeof A!="symbol"?A+"":A,g),g);class IE extends pC{constructor(){super(...arguments),oI(this,"ingKey","moving"),oI(this,"stateKey","move"),oI(this,"debounced",!0),oI(this,"onMove",A=>{this.enabled&&(this.setTimeout(this.onMoveEnd),this.state._active?this.onMoveChange(A):this.onMoveStart(A))}),oI(this,"onMoveStart",A=>{this.updateSharedState(zA(A));const g=Cg(A,this.transform);this.updateGestureState({...jI(this,g,A),...dA(this,A,!0)}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),oI(this,"onMoveChange",A=>{this.updateSharedState(zA(A));const g=Cg(A,this.transform);this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)}),this.fireGestureHandler()}),oI(this,"onMoveEnd",()=>{if(this.clean(),!this.state._active)return;const A=this.state.values;this.updateGestureState(this.getMovement(A)),this.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),this.fireGestureHandler()}),oI(this,"hoverTransform",()=>this.controller.config.hover.transform||this.controller.config.transform),oI(this,"onPointerEnter",A=>{if(this.controller.state.shared.hovering=!0,!!this.controller.config.enabled){if(this.controller.config.hover.enabled){const g=Cg(A,this.hoverTransform()),C={...this.controller.state.shared,...this.state,...dA(this,A,!0),args:this.args,values:g,active:!0,hovering:!0};this.controller.handlers.hover({...C,...this.mapStateValues(C)})}"move"in this.controller.handlers&&this.onMoveStart(A)}}),oI(this,"onPointerLeave",A=>{if(this.controller.state.shared.hovering=!1,"move"in this.controller.handlers&&this.onMoveEnd(),!this.controller.config.hover.enabled)return;const g=Cg(A,this.hoverTransform()),C={...this.controller.state.shared,...this.state,...dA(this,A),args:this.args,values:g,active:!1};this.controller.handlers.hover({...C,...this.mapStateValues(C)})})}addBindings(A){"move"in this.controller.handlers&&lA(A,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(lA(A,"onPointerEnter",this.onPointerEnter),lA(A,"onPointerLeave",this.onPointerLeave))}}class Yn extends je{getInternalMovement(A,g){const C=g.values[1];let[B,Q=C]=A,E=Q-C,e=g.turns;return Math.abs(E)>270&&(e+=NC(E)),XB([B,Q-360*e],g.initial)}getKinematics(A,g){const C=this.getMovement(A),B=(A[1]-C._movement[1]-this.state.initial[1])/360,Q=g.timeStamp-this.state.timeStamp,{distance:E,velocity:e,...t}=We(C.movement,C.delta,Q);return{turns:B,...C,...t}}mapStateValues(A){return{da:A.values,vdva:A.velocities}}}var Jn=Object.defineProperty,kn=(I,A,g)=>A in I?Jn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,kA=(I,A,g)=>(kn(I,typeof A!="symbol"?A+"":A,g),g);const Kn=7,pn=260;class bn extends Yn{constructor(){super(...arguments),kA(this,"ingKey","pinching"),kA(this,"stateKey","pinch"),kA(this,"onPinchStart",A=>{Ze(this.controller,A);const g=this.controller.touchIds;if(!this.enabled||this.state._active&&this.state._pointerIds.every(E=>g.has(E))||g.size<2)return;const C=Array.from(g).slice(0,2),{values:B,origin:Q}=xQ(A,C,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,B,A),...dA(this,A,!0),_pointerIds:C,cancel:this.onCancel,origin:Q}),this.updateGestureState(this.getMovement(B)),this.fireGestureHandler()}),kA(this,"onPinchChange",A=>{const{canceled:g,_active:C}=this.state;if(g||!C||A.timeStamp===this.state.timeStamp)return;const B=zA(A);this.updateSharedState(B);try{const{values:Q,origin:E}=xQ(A,this.state._pointerIds,this.transform),e=this.getKinematics(Q,A);this.updateGestureState({...dA(this,A),...e,origin:E}),this.fireGestureHandler()}catch{this.onPinchEnd(A)}}),kA(this,"onPinchEnd",A=>{ve(this.controller,A);const g=PB(A);this.state._pointerIds.every(C=>!g.includes(C))||(this.clean(),this.state._active&&(this.updateGestureState({...dA(this,A),...this.getMovement(this.state.values),_active:!1}),this.fireGestureHandler()))}),kA(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({_active:!1,canceled:!0}),this.fireGestureHandler())}),kA(this,"onGestureStart",A=>{if(!this.enabled)return;A.preventDefault();const g=jQ(A,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),origin:[A.clientX,A.clientY],cancel:this.onCancel}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),kA(this,"onGestureChange",A=>{const{canceled:g,_active:C}=this.state;if(g||!C)return;A.preventDefault();const B=zA(A);this.updateSharedState(B);const Q=jQ(A,this.transform);Q[0]=(Q[0]-this.state.event.scale)*pn+this.state.values[0];const E=this.getKinematics(Q,A);this.updateGestureState({...dA(this,A),...E,origin:[A.clientX,A.clientY]}),this.fireGestureHandler()}),kA(this,"onGestureEnd",A=>{this.clean(),this.state._active&&(this.updateGestureState({...dA(this,A),...this.getMovement(this.state.values),_active:!1,origin:[A.clientX,A.clientY]}),this.fireGestureHandler())}),kA(this,"wheelShouldRun",A=>this.enabled&&A.ctrlKey),kA(this,"getWheelValuesFromEvent",A=>{const[,g]=Te(A,this.transform),{values:[C,B]}=this.state;return{values:[C-g*Kn,B!==void 0?B:0],origin:[A.clientX,A.clientY],delta:[0,g]}}),kA(this,"onWheel",A=>{this.wheelShouldRun(A)&&(this.setTimeout(this.onWheelEnd),this.state._active?this.onWheelChange(A):this.onWheelStart(A))}),kA(this,"onWheelStart",A=>{const{values:g,delta:C,origin:B}=this.getWheelValuesFromEvent(A);A.cancelable&&A.preventDefault(),this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values,offset:g,delta:C,origin:B}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),kA(this,"onWheelChange",A=>{A.cancelable&&A.preventDefault(),this.updateSharedState(zA(A));const{values:g,origin:C,delta:B}=this.getWheelValuesFromEvent(A);this.updateGestureState({...dA(this,A),...this.getKinematics(g,A),origin:C,delta:B}),this.fireGestureHandler()}),kA(this,"onWheelEnd",()=>{this.clean(),this.state._active&&(this.state._active=!1,this.updateGestureState(this.getMovement(this.state.values)),this.fireGestureHandler())})}addBindings(A){this.controller.config.domTarget&&!this.controller.supportsTouchEvents&&this.controller.supportsGestureEvents?(lA(A,"onGestureStart",this.onGestureStart),lA(A,"onGestureChange",this.onGestureChange),lA(A,"onGestureEnd",this.onGestureEnd)):(lA(A,"onTouchStart",this.onPinchStart),lA(A,"onTouchMove",this.onPinchChange),lA(A,"onTouchEnd",this.onPinchEnd),lA(A,"onTouchCancel",this.onPinchEnd),lA(A,"onWheel",this.onWheel))}}var Ln=Object.defineProperty,Tn=(I,A,g)=>A in I?Ln(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,Ng=(I,A,g)=>(Tn(I,typeof A!="symbol"?A+"":A,g),g);class Hn extends pC{constructor(){super(...arguments),Ng(this,"ingKey","scrolling"),Ng(this,"stateKey","scroll"),Ng(this,"debounced",!0),Ng(this,"handleEvent",A=>{if(!this.enabled)return;this.clearTimeout(),this.setTimeout(this.onEnd);const g=Xs(A,this.transform);if(this.updateSharedState(zA(A)),this.state._active)this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)});else{this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values});const C=this.getMovement(g),B=qe(C.delta);this.updateGestureState(C),this.updateGestureState(B)}this.fireGestureHandler()}),Ng(this,"onEnd",()=>{this.clean(),this.state._active&&(this.updateGestureState({...this.getMovement(this.state.values),_active:!1,velocities:[0,0],velocity:0}),this.fireGestureHandler())})}addBindings(A){lA(A,"onScroll",this.handleEvent)}}var Vn=Object.defineProperty,Zn=(I,A,g)=>A in I?Vn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,Rg=(I,A,g)=>(Zn(I,typeof A!="symbol"?A+"":A,g),g);class vn extends pC{constructor(){super(...arguments),Rg(this,"ingKey","wheeling"),Rg(this,"stateKey","wheel"),Rg(this,"debounced",!0),Rg(this,"handleEvent",A=>{if(A.ctrlKey&&"pinch"in this.controller.handlers||!this.enabled)return;this.setTimeout(this.onEnd),this.updateSharedState(zA(A));const g=wC(Te(A,this.transform),this.state.values);if(this.state._active)this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)});else{this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values});const C=this.getMovement(g),B=qe(C.delta);this.updateGestureState(C),this.updateGestureState(B)}this.fireGestureHandler()}),Rg(this,"onEnd",()=>{if(this.clean(),!this.state._active)return;const A=this.getMovement(this.state.values);this.updateGestureState(A),this.updateGestureState({_active:!1,velocities:[0,0],velocity:0}),this.fireGestureHandler()})}addBindings(A){lA(A,"onWheel",this.handleEvent)}}const On=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function xn(I){const A={},g={},C=new Set;for(let B in I)On.test(B)?(C.add(RegExp.lastMatch),g[B]=I[B]):A[B]=I[B];return[g,A,C]}function uI(I,A){const[g,C,B]=xn(I);_A.set("drag",an),_A.set("hover",IE),_A.set("move",IE),_A.set("pinch",bn),_A.set("scroll",Hn),_A.set("wheel",vn);const Q=Gn(A,B),E={};return B.has("onDrag")&&(E.drag=ug(g,"onDrag")),B.has("onWheel")&&(E.wheel=ug(g,"onWheel")),B.has("onScroll")&&(E.scroll=ug(g,"onScroll")),B.has("onMove")&&(E.move=ug(g,"onMove")),B.has("onPinch")&&(E.pinch=ug(g,"onPinch")),B.has("onHover")&&(E.hover=g.onHover),Fn(E,Q,C)}function ug(I,A){const g=A+"Start",C=A+"End";return Q=>{let E;return Q.first&&g in I&&I[g](Q),A in I&&(E=I[A](Q)),Q.last&&C in I&&I[C](Q),E}}function fI(I,A,g){if(typeof I=="function"||kI(I))return uA(()=>$C(HA(I),HA(A),HA(g)));const C=oA(I);return uA({get(){return C.value=$C(C.value,HA(A),HA(g))},set(B){C.value=$C(B,HA(A),HA(g))}})}function gE(I){return uA(()=>Math.round(HA(I)))}const Xe=(I,A)=>{const g=I.__vccOpts||I;for(const[C,B]of A)g[C]=B;return g},qn={viewBox:"-2 -2 104 124"},Wn={stroke:"currentColor"},jn=["stroke","stroke-dashoffset"],Pn=["transform"],Xn={transform:"translate(50,50)","text-anchor":"middle","dominant-baseline":"middle",fill:"currentColor"},zn=["transform"],_n={transform:"translate(0,20)"},$n={class:"font-bold",transform:"translate(0,58)"},Ar=45,Ir={__name:"ControlRotary",props:ne({max:{type:Number,default:100},min:{type:Number,default:0},step:{type:Number,default:1},param:{type:String,default:"param"},unit:{type:String,default:""},fixed:{type:Number,default:1},cc:{type:Number,default:0},channel:{type:Number,default:0}},{modelValue:{default:50},modelModifiers:{}}),emits:["update:modelValue"],setup(I){const A=I,g=yg(I,"modelValue"),C=ZA({internal:fI(0,0,100),initial:uA(()=>(g.value-A.min)/(A.max-A.min)*100)}),B=uA({get:()=>Math.round((C.internal/100*(A.max-A.min)+A.min)/A.step)*A.step,set:e=>{C.internal=(e-A.min)/(A.max-A.min)*100}});AI(g,e=>{B.value=e},{immediate:!0});const Q=oA();uI({onDrag:({delta:[e,t],dragging:o,shiftKey:i,event:s})=>{s&&s.preventDefault();const a=i?12:s.type==="wheel"?-8:2;C.internal=fI(0,C.internal-t/a+e/a,100),g.value=B.value},onWheel:({delta:[e,t],event:o})=>{o&&o.preventDefault(),C.internal=fI(0,C.internal+t/8-e/8,100),g.value=B.value}},{wheel:{preventWindowScrollY:!0},eventOptions:{capture:!1,passive:!1},domTarget:Q});const E=Math.PI*2*Ar-50;return(e,t)=>(z(),IA("div",{class:"knob",ref_key:"knob",ref:Q,onDblclick:t[0]||(t[0]=o=>{C.internal=C.initial,g.value=B.value})},[t[3]||(t[3]=F("div",{class:"i-ph-arrows-horizontal absolute text-10px top-14px opacity-70"},null,-1)),(z(),IA("svg",qn,[F("g",Wn,[t[2]||(t[2]=F("path",{d:"M25,90 a 45,45,1,1,1,50,0",fill:"none",stroke:"#9996","stroke-width":"8","stroke-linecap":"round"},null,-1)),F("path",{d:"M25,90 a 45,45,1,1,1,50,0",fill:"none",stroke:`hsla(${C.internal*3.6}deg,70%,50%,0.8)`,"stroke-width":"12","stroke-linecap":"round","stroke-dasharray":E,"stroke-dashoffset":E-E*(C.internal/100)},null,8,jn),F("g",{transform:`translate(50,52.5) rotate(${C.internal*2.9}) `},t[1]||(t[1]=[F("circle",{"stroke-width":"2",fill:"none",r:38,opacity:"0.6"},null,-1)]),8,Pn)]),F("g",Xn,[F("text",{class:"font-bold text-2xl",transform:`translate(0,${I.unit?-3:5})`},[oe(e.$slots,"default",{},()=>[F("tspan",null,EA(B.value.toFixed(I.fixed)),1)])],8,zn),F("text",_n,[F("tspan",null,EA(I.unit),1)]),F("text",$n,[F("tspan",null,EA(I.param.toUpperCase()),1)])])]))],544))}},AC=Xe(Ir,[["__scopeId","data-v-f32ad27f"]]);function gr(I,A){return Object.keys(I.values).forEach(g=>I.values[g]=I.values[g]&&parseFloat(I.values[g].toFixed(A))),I}function ze(I,A,g){const C=A-1,B=g[$e(C,g.length)];return B.marker!=="Z"?B:ze(I,C,g)}function _e(I,A,g){const C=A+1,B=g[$e(C,g.length)];return B.marker==="Z"?_e(I,C,g):B}function Cr(I,A,g){let C=g[A-1]||{values:{x:0,y:0}};if(I.marker===I.marker.toLowerCase())switch(I.marker=I.marker.toUpperCase(),I.marker){case"M":I.values.x+=C.values.x,I.values.y+=C.values.y;break;case"L":case"A":I.values.x+=C.values.x,I.values.y+=C.values.y;break;case"H":I.marker="L",I.values.x+=C.values.x,I.values.y=C.values.y;break;case"V":I.marker="L",I.values.x=C.values.x,I.values.y+=C.values.y;break;case"C":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x1+=C.values.x,I.values.y1+=C.values.y,I.values.x2+=C.values.x,I.values.y2+=C.values.y;break;case"S":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x2+=C.values.x,I.values.y2+=C.values.y;break;case"Q":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x1+=C.values.x,I.values.y1+=C.values.y;break;case"T":I.values.x+=C.values.x,I.values.y+=C.values.y;break}else if(I.marker===I.marker.toUpperCase())switch(I.marker){case"H":I.marker="L",I.values.y=C.values.y;break;case"V":I.marker="L",I.values.x=C.values.x;break}if(I.marker==="Z"){let B=function(E,e){return E[e].marker==="M"?E[e]:B(E,e-1)},Q=B(g,A);I.values.x=Q.values.x,I.values.y=Q.values.y}return I}function Br(I,A){const g=[];switch(I.toUpperCase()){case"M":for(let C=0;CMath.round(Math.abs(C.values[Q]-I.values[Q]))===0)&&(I.overlap=!0)}return I}function wB(I,A){const g=["x","y"].every(C=>Math.round(Math.abs(I[A].values[C]-I[0].values[C]))===0);I[A].marker==="L"&&g&&(I[A].overlap=!0,wB(I,A-1)),I[A].marker==="Z"&&wB(I,A-1)}function Er(I,A,g){const C=BE(I.values,g.values),B=BE(A.values,I.values);return Math.min(B,C)}function CE(I,A){return Math.atan2(A.x-I.x,A.y-I.y)}function BE(I,A){const g=I.x-A.x,C=I.y-A.y;return Math.sqrt(Math.pow(g,2)+Math.pow(C,2))}function QE(I,A){return Math.sin(I)*A}function EE(I,A){return Math.cos(I)*A}function eE(I,A){const g=A/Math.tan(I);return g===1/0||g===-1/0||isNaN(g)?A:g}function er(I,A){return A*Math.tan(I)}function tr(I,A){let g,C=0,B=I*(180/Math.PI);return B<0&&B>=-180||B>180&&B<360?g=eE(I/2,-A):(g=eE(I/2,A),C=1,g===1/0&&(g=A)),{offset:g,sweepFlag:C}}function ir(I){const A=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return I.map(g=>{let C="";if(g.marker!=="Z"){const B=Object.keys(g.values);C=A.filter(Q=>B.indexOf(Q)!==-1).map(Q=>g.values[Q]).join()}return`${g.marker}${C}`}).join("").trim()}function or(I){const A=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,g=/-?[0-9]*\.?\d+/g;return[...I.matchAll(A)].map(C=>({marker:C[0],index:C.index})).reduceRight((C,B)=>{const Q=I.substring(B.index,C.length?C[C.length-1].index:I.length);return C.concat([{marker:B.marker,index:B.index,chunk:Q.length>0?Q.substr(1,Q.length-1):Q}])},[]).reverse().flatMap(C=>{const B=C.chunk.match(g),Q=B?B.map(parseFloat):[];return Br(C.marker,Q)}).map(Cr)}function sr(I,A,g){let C=[],B=[];return I.forEach(Q=>gr(Q,g)),I.forEach(Q=>{Q.marker==="M"&&C.push([]),C[C.length-1].push(Q)}),C.forEach(Q=>{Q.map(Qr),wB(Q,Q.length-1);const E=Q[Q.length-1].marker=="Z";Q.filter(e=>!e.overlap).map((e,t,o)=>{const s=ze(e,t,o),a=_e(e,t,o),c=CE(e.values,s.values),N=CE(e.values,a.values),M=N-c,d=M*(180/Math.PI),m=Er(e,s,a),b=Math.abs(er(M/2,m/2)),R=Math.min(A,b),w=tr(M,R),Z=w.offset,sA=w.sweepFlag,DA=(t==0||t==o.length-1)&&!E;switch(e.marker){case"M":case"L":const hA=[e.values.x+QE(c,Z),e.values.y+EE(c,Z)],vA=[e.values.x+QE(N,Z),e.values.y+EE(N,Z)];DA?B.push({marker:e.marker,values:e.values}):B.push({marker:e.marker,values:{x:parseFloat(hA[0].toFixed(3)),y:parseFloat(hA[1].toFixed(3))}}),!DA&&(a.marker==="L"||a.marker==="M")&&B.push({marker:"A",radius:R,values:{radiusX:parseFloat(R.toFixed(3)),radiusY:parseFloat(R.toFixed(3)),rotation:d,largeArc:0,sweep:sA,x:parseFloat(vA[0].toFixed(3)),y:parseFloat(vA[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":B.push({marker:e.marker,values:e.values});break}})}),{path:ir(B),commands:B}}function nr(I,A,g){return sr([...or(I)],A,g)}const rr=["viewBox"],ar=["width","height","transform"],lr=["font-size","transform"],cr=["transform"],Dr=["x"],hr=["x"],wr=["x"],Nr=["x"],Rr=["transform"],ur=["x"],fr=["x"],dr=["x"],yr=["x"],Mr=["d","stroke-width"],Gr={class:"levels op-50",stroke:"currentColor","stroke-linecap":"round","stroke-width":"0.5"},Fr=["x2","transform"],Ur=["x2","transform"],mr=["x2","transform"],Sr=["x2","transform"],Yr={class:"controls op-50",stroke:"currentColor",fill:"transparent","stroke-dasharray":"0.05 1","stroke-linecap":"round","stroke-width":"0.5"},Jr=["width","height"],kr=["width","height","transform"],Kr=["width","height","transform"],pr=["width","height","transform"],tE={__name:"ControlAdsr",props:ne({width:{type:Number,default:60},height:{type:Number,default:20},pad:{type:Number,default:3},title:{type:String,default:"Envelope"}},{a:{type:Number,default:1},aModifiers:{},d:{type:Number,default:1},dModifiers:{},s:{type:Number,default:.7},sModifiers:{},r:{type:Number,default:1},rModifiers:{}}),emits:["update:a","update:d","update:s","update:r"],setup(I){const A=I,g=yg(I,"a"),C=yg(I,"d"),B=yg(I,"s"),Q=yg(I,"r"),E=uA(()=>nr(` +**/let lB;const mQ=typeof window<"u"&&window.trustedTypes;if(mQ)try{lB=mQ.createPolicy("vue",{createHTML:I=>I})}catch{}const ke=lB?I=>lB.createHTML(I):I=>I,gs="http://www.w3.org/2000/svg",Cs="http://www.w3.org/1998/Math/MathML",wI=typeof document<"u"?document:null,SQ=wI&&wI.createElement("template"),Bs={insert:(I,A,g)=>{A.insertBefore(I,g||null)},remove:I=>{const A=I.parentNode;A&&A.removeChild(I)},createElement:(I,A,g,C)=>{const B=A==="svg"?wI.createElementNS(gs,I):A==="mathml"?wI.createElementNS(Cs,I):g?wI.createElement(I,{is:g}):wI.createElement(I);return I==="select"&&C&&C.multiple!=null&&B.setAttribute("multiple",C.multiple),B},createText:I=>wI.createTextNode(I),createComment:I=>wI.createComment(I),setText:(I,A)=>{I.nodeValue=A},setElementText:(I,A)=>{I.textContent=A},parentNode:I=>I.parentNode,nextSibling:I=>I.nextSibling,querySelector:I=>wI.querySelector(I),setScopeId(I,A){I.setAttribute(A,"")},insertStaticContent(I,A,g,C,B,Q){const E=g?g.previousSibling:A.lastChild;if(B&&(B===Q||B.nextSibling))for(;A.insertBefore(B.cloneNode(!0),g),!(B===Q||!(B=B.nextSibling)););else{SQ.innerHTML=ke(C==="svg"?`${I}`:C==="mathml"?`${I}`:I);const e=SQ.content;if(C==="svg"||C==="mathml"){const t=e.firstChild;for(;t.firstChild;)e.appendChild(t.firstChild);e.removeChild(t)}A.insertBefore(e,g)}return[E?E.nextSibling:A.firstChild,g?g.previousSibling:A.lastChild]}},Qs=Symbol("_vtc");function Es(I,A,g){const C=I[Qs];C&&(A=(A?[A,...C]:[...C]).join(" ")),A==null?I.removeAttribute("class"):g?I.setAttribute("class",A):I.className=A}const YQ=Symbol("_vod"),es=Symbol("_vsh"),ts=Symbol(""),is=/(^|;)\s*display\s*:/;function os(I,A,g){const C=I.style,B=fA(g);let Q=!1;if(g&&!B){if(A)if(fA(A))for(const E of A.split(";")){const e=E.slice(0,E.indexOf(":")).trim();g[e]==null&&eC(C,e,"")}else for(const E in A)g[E]==null&&eC(C,E,"");for(const E in g)E==="display"&&(Q=!0),eC(C,E,g[E])}else if(B){if(A!==g){const E=C[ts];E&&(g+=";"+E),C.cssText=g,Q=is.test(g)}}else A&&I.removeAttribute("style");YQ in I&&(I[YQ]=Q?C.display:"",I[es]&&(C.display="none"))}const JQ=/\s*!important$/;function eC(I,A,g){if(q(g))g.forEach(C=>eC(I,A,C));else if(g==null&&(g=""),A.startsWith("--"))I.setProperty(A,g);else{const C=ss(I,A);JQ.test(g)?I.setProperty(pI(C),g.replace(JQ,""),"important"):I[C]=g}}const kQ=["Webkit","Moz","ms"],zC={};function ss(I,A){const g=zC[A];if(g)return g;let C=dI(A);if(C!=="filter"&&C in I)return zC[A]=C;C=YE(C);for(let B=0;B_C||(cs.then(()=>_C=0),_C=Date.now());function hs(I,A){const g=C=>{if(!C._vts)C._vts=Date.now();else if(C._vts<=g.attached)return;lI(ws(C,g.value),A,5,[C])};return g.value=I,g.attached=Ds(),g}function ws(I,A){if(q(A)){const g=I.stopImmediatePropagation;return I.stopImmediatePropagation=()=>{g.call(I),I._stopped=!0},A.map(C=>B=>!B._stopped&&C&&C(B))}else return A}const HQ=I=>I.charCodeAt(0)===111&&I.charCodeAt(1)===110&&I.charCodeAt(2)>96&&I.charCodeAt(2)<123,Ns=(I,A,g,C,B,Q)=>{const E=B==="svg";A==="class"?Es(I,C,E):A==="style"?os(I,g,C):fC(A)?SB(A)||as(I,A,g,C,Q):(A[0]==="."?(A=A.slice(1),!0):A[0]==="^"?(A=A.slice(1),!1):Rs(I,A,C,E))?(bQ(I,A,C),!I.tagName.includes("-")&&(A==="value"||A==="checked"||A==="selected")&&pQ(I,A,C,E,Q,A!=="value")):I._isVueCE&&(/[A-Z]/.test(A)||!fA(C))?bQ(I,dI(A),C,Q,A):(A==="true-value"?I._trueValue=C:A==="false-value"&&(I._falseValue=C),pQ(I,A,C,E))};function Rs(I,A,g,C){if(C)return!!(A==="innerHTML"||A==="textContent"||A in I&&HQ(A)&&j(g));if(A==="spellcheck"||A==="draggable"||A==="translate"||A==="form"||A==="list"&&I.tagName==="INPUT"||A==="type"&&I.tagName==="TEXTAREA")return!1;if(A==="width"||A==="height"){const B=I.tagName;if(B==="IMG"||B==="VIDEO"||B==="CANVAS"||B==="SOURCE")return!1}return HQ(A)&&fA(g)?!1:A in I}const us=["ctrl","shift","alt","meta"],fs={stop:I=>I.stopPropagation(),prevent:I=>I.preventDefault(),self:I=>I.target!==I.currentTarget,ctrl:I=>!I.ctrlKey,shift:I=>!I.shiftKey,alt:I=>!I.altKey,meta:I=>!I.metaKey,left:I=>"button"in I&&I.button!==0,middle:I=>"button"in I&&I.button!==1,right:I=>"button"in I&&I.button!==2,exact:(I,A)=>us.some(g=>I[`${g}Key`]&&!A.includes(g))},cB=(I,A)=>{const g=I._withMods||(I._withMods={}),C=A.join(".");return g[C]||(g[C]=(B,...Q)=>{for(let E=0;E{const A=ys().createApp(...I),{mount:g}=A;return A.mount=C=>{const B=Fs(C);if(!B)return;const Q=A._component;!j(Q)&&!Q.render&&!Q.template&&(Q.template=B.innerHTML),B.nodeType===1&&(B.textContent="");const E=g(B,!1,Gs(B));return B instanceof Element&&(B.removeAttribute("v-cloak"),B.setAttribute("data-v-app","")),E},A};function Gs(I){if(I instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&I instanceof MathMLElement)return"mathml"}function Fs(I){return fA(I)?document.querySelector(I):I}const ZQ=""+new URL("logo.svg",import.meta.url).href;function Us(I){return bE()?(Di(I),!0):!1}function HA(I){return typeof I=="function"?I():h(I)}const ms=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ss=Object.prototype.toString,Ys=I=>Ss.call(I)==="[object Object]",$C=(I,A,g)=>Math.min(g,Math.max(A,I)),Ke=()=>{};function Js(I,A){function g(...C){return new Promise((B,Q)=>{Promise.resolve(I(()=>A.apply(this,C),{fn:A,thisArg:this,args:C})).then(B).catch(Q)})}return g}const pe=I=>I();function ks(I=pe){const A=oA(!0);function g(){A.value=!1}function C(){A.value=!0}const B=(...Q)=>{A.value&&I(...Q)};return{isActive:UC(A),pause:g,resume:C,eventFilter:B}}function Ks(I){return WB()}function ps(...I){if(I.length!==1)return vi(...I);const A=I[0];return typeof A=="function"?UC(Ie(()=>({get:A,set:Ke}))):oA(A)}function bs(I,A,g={}){const{eventFilter:C=pe,...B}=g;return AI(I,Js(C,A),B)}function Ls(I,A,g={}){const{eventFilter:C,...B}=g,{eventFilter:Q,pause:E,resume:e,isActive:t}=ks(C);return{stop:bs(I,A,{...B,eventFilter:Q}),pause:E,resume:e,isActive:t}}function Ts(I,A=!0,g){Ks()?ng(I,g):A?I():SC(I)}const DC=ms?window:void 0;function Hs(I){var A;const g=HA(I);return(A=g==null?void 0:g.$el)!=null?A:g}function DB(...I){let A,g,C,B;if(typeof I[0]=="string"||Array.isArray(I[0])?([g,C,B]=I,A=DC):[A,g,C,B]=I,!A)return Ke;Array.isArray(g)||(g=[g]),Array.isArray(C)||(C=[C]);const Q=[],E=()=>{Q.forEach(i=>i()),Q.length=0},e=(i,s,a,c)=>(i.addEventListener(s,a,c),()=>i.removeEventListener(s,a,c)),t=AI(()=>[Hs(A),HA(B)],([i,s])=>{if(E(),!i)return;const a=Ys(s)?{...s}:s;Q.push(...g.flatMap(c=>C.map(N=>e(i,c,N,a))))},{immediate:!0,flush:"post"}),o=()=>{t(),E()};return Us(o),o}function Vs(I){return typeof I=="function"?I:typeof I=="string"?A=>A.key===I:Array.isArray(I)?A=>I.includes(A.key):()=>!0}function Zs(...I){let A,g,C={};I.length===3?(A=I[0],g=I[1],C=I[2]):I.length===2?typeof I[1]=="object"?(A=!0,g=I[0],C=I[1]):(A=I[0],g=I[1]):(A=!0,g=I[0]);const{target:B=DC,eventName:Q="keydown",passive:E=!1,dedupe:e=!1}=C,t=Vs(A);return DB(B,Q,i=>{i.repeat&&HA(e)||t(i)&&g(i)},E)}function vs(I,A,g={}){return Zs(I,A,{...g,eventName:"keydown"})}const zg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_g="__vueuse_ssr_handlers__",Os=xs();function xs(){return _g in zg||(zg[_g]=zg[_g]||{}),zg[_g]}function qs(I,A){return Os[I]||A}function Ws(I){return I==null?"any":I instanceof Set?"set":I instanceof Map?"map":I instanceof Date?"date":typeof I=="boolean"?"boolean":typeof I=="string"?"string":typeof I=="object"?"object":Number.isNaN(I)?"any":"number"}const js={boolean:{read:I=>I==="true",write:I=>String(I)},object:{read:I=>JSON.parse(I),write:I=>JSON.stringify(I)},number:{read:I=>Number.parseFloat(I),write:I=>String(I)},any:{read:I=>I,write:I=>String(I)},string:{read:I=>I,write:I=>String(I)},map:{read:I=>new Map(JSON.parse(I)),write:I=>JSON.stringify(Array.from(I.entries()))},set:{read:I=>new Set(JSON.parse(I)),write:I=>JSON.stringify(Array.from(I))},date:{read:I=>new Date(I),write:I=>I.toISOString()}},vQ="vueuse-storage";function XI(I,A,g,C={}){var B;const{flush:Q="pre",deep:E=!0,listenToStorageChanges:e=!0,writeDefaults:t=!0,mergeDefaults:o=!1,shallow:i,window:s=DC,eventFilter:a,onError:c=P=>{console.error(P)},initOnMounted:N}=C,M=(i?_E:oA)(typeof A=="function"?A():A);if(!g)try{g=qs("getDefaultStorage",()=>{var P;return(P=DC)==null?void 0:P.localStorage})()}catch(P){c(P)}if(!g)return M;const d=HA(A),U=Ws(d),b=(B=C.serializer)!=null?B:js[U],{pause:R,resume:w}=Ls(M,()=>sA(M.value),{flush:Q,deep:E,eventFilter:a});s&&e&&Ts(()=>{g instanceof Storage?DB(s,"storage",hA):DB(s,vQ,vA),N&&hA()}),N||hA();function Z(P,O){if(s){const wA={key:I,oldValue:P,newValue:O,storageArea:g};s.dispatchEvent(g instanceof Storage?new StorageEvent("storage",wA):new CustomEvent(vQ,{detail:wA}))}}function sA(P){try{const O=g.getItem(I);if(P==null)Z(O,null),g.removeItem(I);else{const wA=b.write(P);O!==wA&&(g.setItem(I,wA),Z(O,wA))}}catch(O){c(O)}}function DA(P){const O=P?P.newValue:g.getItem(I);if(O==null)return t&&d!=null&&g.setItem(I,b.write(d)),d;if(!P&&o){const wA=b.read(O);return typeof o=="function"?o(wA,d):U==="object"&&!Array.isArray(wA)?{...d,...wA}:wA}else return typeof O!="string"?O:b.read(O)}function hA(P){if(!(P&&P.storageArea!==g)){if(P&&P.key==null){M.value=d;return}if(!(P&&P.key!==I)){R();try{(P==null?void 0:P.newValue)!==b.write(M.value)&&(M.value=DA(P))}catch(O){c(O)}finally{P?SC(w):w()}}}}function vA(P){hA(P.detail)}return M}function OQ(I,A){const g=_E(o()),C=ps(I),B=uA({get(){var i;let a=C.value.indexOf(g.value);return a<0&&(a=(i=void 0)!=null?i:0),a},set(i){Q(i)}});function Q(i){const s=C.value,a=s.length,c=(i%a+a)%a,N=s[c];return g.value=N,N}function E(i=1){return Q(B.value+i)}function e(i=1){return E(i)}function t(i=1){return E(-i)}function o(){var i,s;return(s=HA((i=void 0)!=null?i:HA(I)[0]))!=null?s:void 0}return AI(C,()=>Q(B.value)),{state:g,index:B,next:e,prev:t,go:Q}}function Ps(){try{return"constructor"in GestureEvent}catch{return!1}}function be(){return typeof window<"u"&&"ontouchstart"in window}function Le(I){return"pointerId"in I?null:I.type==="touchend"?I.changedTouches:I.targetTouches}function PB(I){return Array.from(Le(I)).map(A=>A.identifier)}function zA(I){const A="buttons"in I?I.buttons:0,{shiftKey:g,altKey:C,metaKey:B,ctrlKey:Q}=I;return{buttons:A,shiftKey:g,altKey:C,metaKey:B,ctrlKey:Q}}const Vg=I=>I;function Cg(I,A=Vg){const g=Le(I),{clientX:C,clientY:B}=g?g[0]:I;return A([C,B])}function xQ(I,A,g=Vg){const[C,B]=Array.from(I.touches).filter(c=>A.includes(c.identifier));if(!C||!B)throw Error("The event doesn't have two pointers matching the pointerIds");const Q=B.clientX-C.clientX,E=B.clientY-C.clientY,e=(B.clientX+C.clientX)/2,t=(B.clientY+C.clientY)/2,o=Math.hypot(Q,E),i=-(Math.atan2(Q,E)*180)/Math.PI,s=g([o,i]),a=g([e,t]);return{values:s,origin:a}}function Xs(I,A=Vg){const{scrollX:g,scrollY:C,scrollLeft:B,scrollTop:Q}=I.currentTarget;return A([g||B||0,C||Q||0])}const qQ=40,WQ=800;function Te(I,A=Vg){let{deltaX:g,deltaY:C,deltaMode:B}=I;return B===1?(g*=qQ,C*=qQ):B===2&&(g*=WQ,C*=WQ),A([g,C])}function jQ(I,A=Vg){return A([I.scale,I.rotation])}function He(){}function Ve(...I){return I.length===0?He:I.length===1?I[0]:function(){var A;for(let g of I)A=g.apply(this,arguments)||A;return A}}function YI(I,A){if(I===void 0){if(A===void 0)throw new Error("Must define fallback value if undefined is expected");I=A}return Array.isArray(I)?I:[I,I]}function PQ(I,A){return Object.assign({},A,I||{})}function hC(I,...A){return typeof I=="function"?I(...A):I}function wg(I){return{_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:He,canceled:!1,memo:void 0,args:void 0,...I}}function hB(){const I={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},A=wg({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),g=wg({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),C=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),B=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),Q=wg({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:I,drag:A,pinch:g,wheel:C,move:B,scroll:Q}}var zs=Object.defineProperty,_s=(I,A,g)=>A in I?zs(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,TA=(I,A,g)=>(_s(I,typeof A!="symbol"?A+"":A,g),g);class $s{constructor(A){this.classes=A,TA(this,"nativeRefs"),TA(this,"config"),TA(this,"handlers"),TA(this,"state"),TA(this,"timeouts"),TA(this,"domListeners"),TA(this,"windowListeners"),TA(this,"pointerIds",new Set),TA(this,"touchIds",new Set),TA(this,"supportsTouchEvents",be()),TA(this,"supportsGestureEvents",Ps()),TA(this,"bind",(...g)=>{const C={};for(let B of this.classes)new B(this,g).addBindings(C);for(let B in this.nativeRefs)lA(C,B,Q=>this.nativeRefs[B]({...this.state.shared,event:Q,args:g}));return this.config.domTarget?Cn(this,C):Bn(this,C)}),TA(this,"clean",()=>{const{eventOptions:g,domTarget:C}=this.config,B=h(C);B&&Zg(B,Oe(this.domListeners),g),Object.values(this.timeouts).forEach(clearTimeout),An(this)}),TA(this,"reset",()=>{this.state=hB()}),this.classes=A,this.state=hB(),this.timeouts={},this.domListeners=[],this.windowListeners={}}}function Ze(I,A){"pointerId"in A?I.pointerIds.add(A.pointerId):I.touchIds=new Set(PB(A))}function ve(I,A){"pointerId"in A?I.pointerIds.delete(A.pointerId):PB(A).forEach(g=>I.touchIds.delete(g))}function An(I){const{config:{window:A,eventOptions:g},windowListeners:C}=I,B=h(A);if(B){for(let Q in C){const E=C[Q];Zg(B,E,g)}I.windowListeners={}}}function In({config:I,windowListeners:A},g,C=I.eventOptions){const B=h(I.window);B&&(Zg(B,A[g],C),delete A[g])}function gn({config:I,windowListeners:A},g,C=[],B=I.eventOptions){const Q=h(I.window);Q&&(Zg(Q,A[g],B),xe(Q,A[g]=C,B))}function Cn({config:I,domListeners:A},g){const{eventOptions:C,domTarget:B}=I,Q=h(B);if(!Q)throw new Error("domTarget must be defined");Zg(Q,Oe(A),C);for(let[E,e]of Object.entries(g)){const t=E.slice(2).toLowerCase();A.push([t,Ve(...e)])}xe(Q,A,C)}function Bn({config:I},A){const g={},C=I.eventOptions.capture?"Capture":"";for(let[B,Q]of Object.entries(A)){const E=Array.isArray(Q)?Q:[Q],e=B+C;g[e]=Ve(...E)}return g}function Oe(I=[]){return I.splice(0,I.length)}function lA(I,A,g){I[A]||(I[A]=[]),I[A].push(g)}function xe(I,A=[],g={}){if(I)for(let[C,B]of A)I.addEventListener(C,B,g)}function Zg(I,A=[],g={}){if(I)for(let[C,B]of A)I.removeEventListener(C,B,g)}function wC(I,A){return I.map((g,C)=>g+A[C])}function XB(I,A){return I.map((g,C)=>g-A[C])}function bg(I){return Math.hypot(...I)}function qe(I,A=I){const g=bg(A),C=g===0?0:1/g,B=A.map(E=>C*E);return{distance:bg(I),direction:B}}function We(I,A,g){const C=bg(A),B=C===0?0:1/C,Q=g===0?0:1/g,E=Q*C,e=A.map(i=>Q*i),t=A.map(i=>B*i),o=bg(I);return{velocities:e,velocity:E,distance:o,direction:t}}function NC(I){return Math.sign?Math.sign(I):+(I>0)-+(I<0)||+I}function Qn(I,A,g){return Math.max(A,Math.min(I,g))}function En(I,A){return Math.pow(I,A*5)}function XQ(I,A,g){return A===0||Math.abs(A)===1/0?En(I,g):I*A*g/(A+g*I)}function zQ(I,A,g,C=.15){return C===0?Qn(I,A,g):Ig?+XQ(I-g,g-A,C)+g:I}var en=Object.defineProperty,tn=(I,A,g)=>A in I?en(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,$g=(I,A,g)=>(tn(I,typeof A!="symbol"?A+"":A,g),g);const _A=new Map,on=I=>I;class je{constructor(A,g=[]){this.controller=A,this.args=g,$g(this,"debounced",!0),$g(this,"setTimeout",(C,B=140,...Q)=>{clearTimeout(this.controller.timeouts[this.stateKey]),this.controller.timeouts[this.stateKey]=window.setTimeout(C,B,...Q)}),$g(this,"clearTimeout",()=>{clearTimeout(this.controller.timeouts[this.stateKey])}),$g(this,"fireGestureHandler",(C=!1)=>{if(this.state._blocked)return this.debounced||(this.state._active=!1,this.clean()),null;if(!C&&!this.state.intentional&&!this.config.triggerAllEvents)return null;if(this.state.intentional){const t=this.state.active,o=this.state._active;this.state.active=o,this.state.first=o&&!t,this.state.last=t&&!o,this.controller.state.shared[this.ingKey]=o}const B=this.controller.pointerIds.size||this.controller.touchIds.size,Q=this.controller.state.shared.buttons>0||B>0,E={...this.controller.state.shared,...this.state,...this.mapStateValues(this.state),locked:!!document.pointerLockElement,touches:B,down:Q},e=this.handler(E);return this.state.memo=e!==void 0?e:this.state.memo,E}),this.controller=A,this.args=g}get config(){return this.controller.config[this.stateKey]}get enabled(){return this.controller.config.enabled&&this.config.enabled}get state(){return this.controller.state[this.stateKey]}get handler(){return this.controller.handlers[this.stateKey]}get transform(){return this.config.transform||this.controller.config.transform||on}updateSharedState(A){Object.assign(this.controller.state.shared,A)}updateGestureState(A){Object.assign(this.state,A)}checkIntentionality(A,g){return{_intentional:A,_blocked:!1}}getMovement(A){const{rubberband:g,threshold:C}=this.config,{_bounds:B,_initial:Q,_active:E,_intentional:e,lastOffset:t,movement:o}=this.state,i=this.getInternalMovement(A,this.state),s=this.transform(C).map(Math.abs),a=e[0]===!1?_Q(i[0],s[0]):e[0],c=e[1]===!1?_Q(i[1],s[1]):e[1],N=this.checkIntentionality([a,c],i);if(N._blocked)return{...N,_movement:i,delta:[0,0]};const M=N._intentional,d=i;let U=[M[0]!==!1?i[0]-M[0]:0,M[1]!==!1?i[1]-M[1]:0];const b=wC(U,t),R=E?g:[0,0];return U=$Q(B,wC(U,Q),R),{...N,intentional:M[0]!==!1||M[1]!==!1,_initial:Q,_movement:d,movement:U,values:A,offset:$Q(B,b,R),delta:XB(U,o)}}clean(){this.clearTimeout()}}function _Q(I,A){return Math.abs(I)>=A?NC(I)*A:!1}function $Q(I,[A,g],[C,B]){const[[Q,E],[e,t]]=I;return[zQ(A,Q,E,C),zQ(g,e,t,B)]}function dA({state:I},A,g){const{timeStamp:C,type:B}=A,Q=I.values,E=g?0:C-I.startTime;return{_lastEventType:B,event:A,timeStamp:C,elapsedTime:E,previous:Q}}function jI({state:I,config:A,stateKey:g,args:C},B,Q){const E=I.offset,e=Q.timeStamp,{initial:t,bounds:o}=A,i={...hB()[g],_active:!0,args:C,values:B,initial:B,offset:E,lastOffset:E,startTime:e};return{...i,_initial:hC(t,i),_bounds:hC(o,i)}}class pC extends je{getInternalMovement(A,g){return XB(A,g.initial)}checkIntentionality(A,g){if(A[0]===!1&&A[1]===!1)return{_intentional:A,axis:this.state.axis};const[C,B]=g.map(Math.abs),Q=this.state.axis||(C>B?"x":CA in I?sn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,GA=(I,A,g)=>(nn(I,typeof A!="symbol"?A+"":A,g),g);const rn=3;function AE(I){"persist"in I&&typeof I.persist=="function"&&I.persist()}class an extends pC{constructor(){super(...arguments),GA(this,"ingKey","dragging"),GA(this,"stateKey","drag"),GA(this,"setPointerCapture",A=>{if(this.config.useTouch||document.pointerLockElement)return;const{target:g,pointerId:C}=A;g&&"setPointerCapture"in g&&g.setPointerCapture(C),this.updateGestureState({_dragTarget:g,_dragPointerId:C})}),GA(this,"releasePointerCapture",()=>{if(this.config.useTouch||document.pointerLockElement)return;const{_dragTarget:A,_dragPointerId:g}=this.state;if(g&&A&&"releasePointerCapture"in A&&(!("hasPointerCapture"in A)||A.hasPointerCapture(g)))try{A.releasePointerCapture(g)}catch{}}),GA(this,"preventScroll",A=>{this.state._dragPreventScroll&&A.cancelable&&A.preventDefault()}),GA(this,"getEventId",A=>this.config.useTouch?A.changedTouches[0].identifier:A.pointerId),GA(this,"isValidEvent",A=>this.state._pointerId===this.getEventId(A)),GA(this,"shouldPreventWindowScrollY",this.config.preventWindowScrollY&&this.controller.supportsTouchEvents),GA(this,"setUpWindowScrollDetection",A=>{AE(A),gn(this.controller,this.stateKey,[["touchmove",this.preventScroll],["touchend",this.clean.bind(this)],["touchcancel",this.clean.bind(this)]],{passive:!1}),this.setTimeout(this.startDrag.bind(this),250,A)}),GA(this,"setUpDelayedDragTrigger",A=>{this.state._dragDelayed=!0,AE(A),this.setTimeout(this.startDrag.bind(this),this.config.delay,A)}),GA(this,"setStartState",A=>{const g=Cg(A,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),_pointerId:this.getEventId(A)}),this.updateGestureState(this.getMovement(g))}),GA(this,"onDragStart",A=>{Ze(this.controller,A),!(!this.enabled||this.state._active)&&(this.setStartState(A),this.setPointerCapture(A),this.shouldPreventWindowScrollY?this.setUpWindowScrollDetection(A):this.config.delay>0?this.setUpDelayedDragTrigger(A):this.startDrag(A,!0))}),GA(this,"onDragChange",A=>{if(this.state.canceled||!this.state._active||!this.isValidEvent(A)||this.state._lastEventType===A.type&&A.timeStamp===this.state.timeStamp)return;let g;if(document.pointerLockElement){const{movementX:t,movementY:o}=A;g=wC(this.transform([t,o]),this.state.values)}else g=Cg(A,this.transform);const C=this.getKinematics(g,A);if(!this.state._dragStarted){if(this.state._dragDelayed){this.startDrag(A);return}if(this.shouldPreventWindowScrollY)if(!this.state._dragPreventScroll&&C.axis)if(C.axis==="x")this.startDrag(A);else{this.state._active=!1;return}else return;else return}const B=zA(A);this.updateSharedState(B);const Q=dA(this,A),E=bg(C._movement);let{_dragIsTap:e}=this.state;e&&E>=rn&&(e=!1),this.updateGestureState({...Q,...C,_dragIsTap:e}),this.fireGestureHandler()}),GA(this,"onDragEnd",A=>{if(ve(this.controller,A),!this.isValidEvent(A)||(this.clean(),!this.state._active))return;this.state._active=!1;const g=this.state._dragIsTap,[C,B]=this.state.velocities,[Q,E]=this.state.movement,[e,t]=this.state._intentional,[o,i]=this.config.swipeVelocity,[s,a]=this.config.swipeDistance,c=this.config.swipeDuration,N={...dA(this,A),...this.getMovement(this.state.values)},M=[0,0];N.elapsedTimeo&&Math.abs(Q)>s&&(M[0]=NC(C)),t!==!1&&Math.abs(B)>i&&Math.abs(E)>a&&(M[1]=NC(B))),this.updateSharedState({buttons:0}),this.updateGestureState({...N,tap:g,swipe:M}),this.fireGestureHandler(this.config.filterTaps&&g===!0)}),GA(this,"clean",()=>{super.clean(),this.state._dragStarted=!1,this.releasePointerCapture(),In(this.controller,this.stateKey)}),GA(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({canceled:!0,_active:!1}),this.updateSharedState({buttons:0}),SC(this.fireGestureHandler))}),GA(this,"onClick",A=>{this.state._dragIsTap||A.stopPropagation()})}startDrag(A,g=!1){!this.state._active||this.state._dragStarted||(g||this.setStartState(A),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())}addBindings(A){if(this.config.useTouch?(lA(A,"onTouchStart",this.onDragStart),lA(A,"onTouchMove",this.onDragChange),lA(A,"onTouchEnd",this.onDragEnd),lA(A,"onTouchCancel",this.onDragEnd)):(lA(A,"onPointerDown",this.onDragStart),lA(A,"onPointerMove",this.onDragChange),lA(A,"onPointerUp",this.onDragEnd),lA(A,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){const g=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";lA(A,g,this.onClick)}}}function vg(I={},A){const g={};for(const[C,B]of Object.entries(A))switch(typeof B){case"function":g[C]=B.call(g,I[C],C,I);break;case"object":g[C]=vg(I[C],B);break;case"boolean":B&&(g[C]=I[C]);break}return g}const ln=180,cn=.15,Dn=.5,hn=50,wn=250,Pe={threshold(I=0){return YI(I)},rubberband(I=0){switch(I){case!0:return YI(cn);case!1:return YI(0);default:return YI(I)}},enabled(I=!0){return I},triggerAllEvents(I=!1){return I},initial(I=0){return typeof I=="function"?I:YI(I)},transform:!0},zB={...Pe,axis:!0,lockDirection(I=!1){return I},bounds(I={}){if(typeof I=="function")return Q=>zB.bounds(I(Q));const{left:A=-1/0,right:g=1/0,top:C=-1/0,bottom:B=1/0}=I;return[[A,g],[C,B]]}},Nn=typeof window<"u"&&window.document&&window.document.createElement,Rn={enabled(I=!0){return I},domTarget:!0,window(I=Nn?window:void 0){return I},eventOptions({passive:I=!0,capture:A=!1}={}){return{passive:I,capture:A}},transform:!0},un={...Pe,bounds(I,A,{distanceBounds:g={},angleBounds:C={}}){const B=E=>{const e=PQ(hC(g,E),{min:-1/0,max:1/0});return[e.min,e.max]},Q=E=>{const e=PQ(hC(C,E),{min:-1/0,max:1/0});return[e.min,e.max]};return typeof g!="function"&&typeof C!="function"?[B(),Q()]:E=>[B(E),Q(E)]}},fn={...zB,useTouch(I=!0){return I&&be()},preventWindowScrollY(I=!1){return I},threshold(I,A,{filterTaps:g=!1,lockDirection:C=!1,axis:B=void 0}){const Q=YI(I,g?3:C||B?1:0);return this.filterTaps=g,Q},swipeVelocity(I=Dn){return YI(I)},swipeDistance(I=hn){return YI(I)},swipeDuration(I=wn){return I},delay(I=0){switch(I){case!0:return ln;case!1:return 0;default:return I}}};function dn(I){return vg(I,Rn)}function AB(I={}){return vg(I,zB)}function yn(I={}){return vg(I,un)}function Mn(I={}){return vg(I,fn)}function Gn(I,A=new Set){const{drag:g,wheel:C,move:B,scroll:Q,pinch:E,hover:e,eventOptions:t,window:o,transform:i,domTarget:s,enabled:a}=I,c=dn({domTarget:s,eventOptions:t,transform:i,window:o,enabled:a});return A.has("onDrag")&&(c.drag=Mn(g)),A.has("onWheel")&&(c.wheel=AB(C)),A.has("onScroll")&&(c.scroll=AB(Q)),A.has("onMove")&&(c.move=AB(B)),A.has("onPinch")&&(c.pinch=yn(E)),A.has("onHover")&&(c.hover={enabled:!0,...e}),c}function Fn(I,A,g={}){const C=Un(I),B=new $s(C);return B.config=A,B.handlers=I,B.nativeRefs=g,WB()&&!A.manual&&(ng(B.bind),JC(B.clean)),B}function Un(I){const A=new Set;return I.drag&&A.add(_A.get("drag")),I.wheel&&A.add(_A.get("wheel")),I.scroll&&A.add(_A.get("scroll")),I.move&&A.add(_A.get("move")),I.pinch&&A.add(_A.get("pinch")),I.hover&&A.add(_A.get("hover")),A}var mn=Object.defineProperty,Sn=(I,A,g)=>A in I?mn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,oI=(I,A,g)=>(Sn(I,typeof A!="symbol"?A+"":A,g),g);class IE extends pC{constructor(){super(...arguments),oI(this,"ingKey","moving"),oI(this,"stateKey","move"),oI(this,"debounced",!0),oI(this,"onMove",A=>{this.enabled&&(this.setTimeout(this.onMoveEnd),this.state._active?this.onMoveChange(A):this.onMoveStart(A))}),oI(this,"onMoveStart",A=>{this.updateSharedState(zA(A));const g=Cg(A,this.transform);this.updateGestureState({...jI(this,g,A),...dA(this,A,!0)}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),oI(this,"onMoveChange",A=>{this.updateSharedState(zA(A));const g=Cg(A,this.transform);this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)}),this.fireGestureHandler()}),oI(this,"onMoveEnd",()=>{if(this.clean(),!this.state._active)return;const A=this.state.values;this.updateGestureState(this.getMovement(A)),this.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),this.fireGestureHandler()}),oI(this,"hoverTransform",()=>this.controller.config.hover.transform||this.controller.config.transform),oI(this,"onPointerEnter",A=>{if(this.controller.state.shared.hovering=!0,!!this.controller.config.enabled){if(this.controller.config.hover.enabled){const g=Cg(A,this.hoverTransform()),C={...this.controller.state.shared,...this.state,...dA(this,A,!0),args:this.args,values:g,active:!0,hovering:!0};this.controller.handlers.hover({...C,...this.mapStateValues(C)})}"move"in this.controller.handlers&&this.onMoveStart(A)}}),oI(this,"onPointerLeave",A=>{if(this.controller.state.shared.hovering=!1,"move"in this.controller.handlers&&this.onMoveEnd(),!this.controller.config.hover.enabled)return;const g=Cg(A,this.hoverTransform()),C={...this.controller.state.shared,...this.state,...dA(this,A),args:this.args,values:g,active:!1};this.controller.handlers.hover({...C,...this.mapStateValues(C)})})}addBindings(A){"move"in this.controller.handlers&&lA(A,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(lA(A,"onPointerEnter",this.onPointerEnter),lA(A,"onPointerLeave",this.onPointerLeave))}}class Yn extends je{getInternalMovement(A,g){const C=g.values[1];let[B,Q=C]=A,E=Q-C,e=g.turns;return Math.abs(E)>270&&(e+=NC(E)),XB([B,Q-360*e],g.initial)}getKinematics(A,g){const C=this.getMovement(A),B=(A[1]-C._movement[1]-this.state.initial[1])/360,Q=g.timeStamp-this.state.timeStamp,{distance:E,velocity:e,...t}=We(C.movement,C.delta,Q);return{turns:B,...C,...t}}mapStateValues(A){return{da:A.values,vdva:A.velocities}}}var Jn=Object.defineProperty,kn=(I,A,g)=>A in I?Jn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,kA=(I,A,g)=>(kn(I,typeof A!="symbol"?A+"":A,g),g);const Kn=7,pn=260;class bn extends Yn{constructor(){super(...arguments),kA(this,"ingKey","pinching"),kA(this,"stateKey","pinch"),kA(this,"onPinchStart",A=>{Ze(this.controller,A);const g=this.controller.touchIds;if(!this.enabled||this.state._active&&this.state._pointerIds.every(E=>g.has(E))||g.size<2)return;const C=Array.from(g).slice(0,2),{values:B,origin:Q}=xQ(A,C,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,B,A),...dA(this,A,!0),_pointerIds:C,cancel:this.onCancel,origin:Q}),this.updateGestureState(this.getMovement(B)),this.fireGestureHandler()}),kA(this,"onPinchChange",A=>{const{canceled:g,_active:C}=this.state;if(g||!C||A.timeStamp===this.state.timeStamp)return;const B=zA(A);this.updateSharedState(B);try{const{values:Q,origin:E}=xQ(A,this.state._pointerIds,this.transform),e=this.getKinematics(Q,A);this.updateGestureState({...dA(this,A),...e,origin:E}),this.fireGestureHandler()}catch{this.onPinchEnd(A)}}),kA(this,"onPinchEnd",A=>{ve(this.controller,A);const g=PB(A);this.state._pointerIds.every(C=>!g.includes(C))||(this.clean(),this.state._active&&(this.updateGestureState({...dA(this,A),...this.getMovement(this.state.values),_active:!1}),this.fireGestureHandler()))}),kA(this,"onCancel",()=>{this.state.canceled||(this.updateGestureState({_active:!1,canceled:!0}),this.fireGestureHandler())}),kA(this,"onGestureStart",A=>{if(!this.enabled)return;A.preventDefault();const g=jQ(A,this.transform);this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),origin:[A.clientX,A.clientY],cancel:this.onCancel}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),kA(this,"onGestureChange",A=>{const{canceled:g,_active:C}=this.state;if(g||!C)return;A.preventDefault();const B=zA(A);this.updateSharedState(B);const Q=jQ(A,this.transform);Q[0]=(Q[0]-this.state.event.scale)*pn+this.state.values[0];const E=this.getKinematics(Q,A);this.updateGestureState({...dA(this,A),...E,origin:[A.clientX,A.clientY]}),this.fireGestureHandler()}),kA(this,"onGestureEnd",A=>{this.clean(),this.state._active&&(this.updateGestureState({...dA(this,A),...this.getMovement(this.state.values),_active:!1,origin:[A.clientX,A.clientY]}),this.fireGestureHandler())}),kA(this,"wheelShouldRun",A=>this.enabled&&A.ctrlKey),kA(this,"getWheelValuesFromEvent",A=>{const[,g]=Te(A,this.transform),{values:[C,B]}=this.state;return{values:[C-g*Kn,B!==void 0?B:0],origin:[A.clientX,A.clientY],delta:[0,g]}}),kA(this,"onWheel",A=>{this.wheelShouldRun(A)&&(this.setTimeout(this.onWheelEnd),this.state._active?this.onWheelChange(A):this.onWheelStart(A))}),kA(this,"onWheelStart",A=>{const{values:g,delta:C,origin:B}=this.getWheelValuesFromEvent(A);A.cancelable&&A.preventDefault(),this.updateSharedState(zA(A)),this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values,offset:g,delta:C,origin:B}),this.updateGestureState(this.getMovement(g)),this.fireGestureHandler()}),kA(this,"onWheelChange",A=>{A.cancelable&&A.preventDefault(),this.updateSharedState(zA(A));const{values:g,origin:C,delta:B}=this.getWheelValuesFromEvent(A);this.updateGestureState({...dA(this,A),...this.getKinematics(g,A),origin:C,delta:B}),this.fireGestureHandler()}),kA(this,"onWheelEnd",()=>{this.clean(),this.state._active&&(this.state._active=!1,this.updateGestureState(this.getMovement(this.state.values)),this.fireGestureHandler())})}addBindings(A){this.controller.config.domTarget&&!this.controller.supportsTouchEvents&&this.controller.supportsGestureEvents?(lA(A,"onGestureStart",this.onGestureStart),lA(A,"onGestureChange",this.onGestureChange),lA(A,"onGestureEnd",this.onGestureEnd)):(lA(A,"onTouchStart",this.onPinchStart),lA(A,"onTouchMove",this.onPinchChange),lA(A,"onTouchEnd",this.onPinchEnd),lA(A,"onTouchCancel",this.onPinchEnd),lA(A,"onWheel",this.onWheel))}}var Ln=Object.defineProperty,Tn=(I,A,g)=>A in I?Ln(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,Ng=(I,A,g)=>(Tn(I,typeof A!="symbol"?A+"":A,g),g);class Hn extends pC{constructor(){super(...arguments),Ng(this,"ingKey","scrolling"),Ng(this,"stateKey","scroll"),Ng(this,"debounced",!0),Ng(this,"handleEvent",A=>{if(!this.enabled)return;this.clearTimeout(),this.setTimeout(this.onEnd);const g=Xs(A,this.transform);if(this.updateSharedState(zA(A)),this.state._active)this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)});else{this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values});const C=this.getMovement(g),B=qe(C.delta);this.updateGestureState(C),this.updateGestureState(B)}this.fireGestureHandler()}),Ng(this,"onEnd",()=>{this.clean(),this.state._active&&(this.updateGestureState({...this.getMovement(this.state.values),_active:!1,velocities:[0,0],velocity:0}),this.fireGestureHandler())})}addBindings(A){lA(A,"onScroll",this.handleEvent)}}var Vn=Object.defineProperty,Zn=(I,A,g)=>A in I?Vn(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,Rg=(I,A,g)=>(Zn(I,typeof A!="symbol"?A+"":A,g),g);class vn extends pC{constructor(){super(...arguments),Rg(this,"ingKey","wheeling"),Rg(this,"stateKey","wheel"),Rg(this,"debounced",!0),Rg(this,"handleEvent",A=>{if(A.ctrlKey&&"pinch"in this.controller.handlers||!this.enabled)return;this.setTimeout(this.onEnd),this.updateSharedState(zA(A));const g=wC(Te(A,this.transform),this.state.values);if(this.state._active)this.updateGestureState({...dA(this,A),...this.getKinematics(g,A)});else{this.updateGestureState({...jI(this,g,A),...dA(this,A,!0),initial:this.state.values});const C=this.getMovement(g),B=qe(C.delta);this.updateGestureState(C),this.updateGestureState(B)}this.fireGestureHandler()}),Rg(this,"onEnd",()=>{if(this.clean(),!this.state._active)return;const A=this.getMovement(this.state.values);this.updateGestureState(A),this.updateGestureState({_active:!1,velocities:[0,0],velocity:0}),this.fireGestureHandler()})}addBindings(A){lA(A,"onWheel",this.handleEvent)}}const On=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function xn(I){const A={},g={},C=new Set;for(let B in I)On.test(B)?(C.add(RegExp.lastMatch),g[B]=I[B]):A[B]=I[B];return[g,A,C]}function uI(I,A){const[g,C,B]=xn(I);_A.set("drag",an),_A.set("hover",IE),_A.set("move",IE),_A.set("pinch",bn),_A.set("scroll",Hn),_A.set("wheel",vn);const Q=Gn(A,B),E={};return B.has("onDrag")&&(E.drag=ug(g,"onDrag")),B.has("onWheel")&&(E.wheel=ug(g,"onWheel")),B.has("onScroll")&&(E.scroll=ug(g,"onScroll")),B.has("onMove")&&(E.move=ug(g,"onMove")),B.has("onPinch")&&(E.pinch=ug(g,"onPinch")),B.has("onHover")&&(E.hover=g.onHover),Fn(E,Q,C)}function ug(I,A){const g=A+"Start",C=A+"End";return Q=>{let E;return Q.first&&g in I&&I[g](Q),A in I&&(E=I[A](Q)),Q.last&&C in I&&I[C](Q),E}}function fI(I,A,g){if(typeof I=="function"||kI(I))return uA(()=>$C(HA(I),HA(A),HA(g)));const C=oA(I);return uA({get(){return C.value=$C(C.value,HA(A),HA(g))},set(B){C.value=$C(B,HA(A),HA(g))}})}function gE(I){return uA(()=>Math.round(HA(I)))}const Xe=(I,A)=>{const g=I.__vccOpts||I;for(const[C,B]of A)g[C]=B;return g},qn={viewBox:"-2 -2 104 124"},Wn={stroke:"currentColor"},jn=["stroke","stroke-dashoffset"],Pn=["transform"],Xn={transform:"translate(50,50)","text-anchor":"middle","dominant-baseline":"middle",fill:"currentColor"},zn=["transform"],_n={transform:"translate(0,20)"},$n={class:"font-bold",transform:"translate(0,58)"},Ar=45,Ir={__name:"ControlRotary",props:ne({max:{type:Number,default:100},min:{type:Number,default:0},step:{type:Number,default:1},param:{type:String,default:"param"},unit:{type:String,default:""},fixed:{type:Number,default:1},cc:{type:Number,default:0},channel:{type:Number,default:0}},{modelValue:{default:50},modelModifiers:{}}),emits:["update:modelValue"],setup(I){const A=I,g=yg(I,"modelValue"),C=ZA({internal:fI(0,0,100),initial:uA(()=>(g.value-A.min)/(A.max-A.min)*100)}),B=uA({get:()=>Math.round((C.internal/100*(A.max-A.min)+A.min)/A.step)*A.step,set:e=>{C.internal=(e-A.min)/(A.max-A.min)*100}});AI(g,e=>{B.value=e},{immediate:!0});const Q=oA();uI({onDrag:({delta:[e,t],dragging:o,shiftKey:i,event:s})=>{s&&s.preventDefault();const a=i?12:s.type==="wheel"?-8:2;C.internal=fI(0,C.internal-t/a+e/a,100),g.value=B.value},onWheel:({delta:[e,t],event:o})=>{o&&o.preventDefault(),C.internal=fI(0,C.internal+t/8-e/8,100),g.value=B.value}},{wheel:{preventWindowScrollY:!0},eventOptions:{capture:!1,passive:!1},domTarget:Q});const E=Math.PI*2*Ar-50;return(e,t)=>(z(),IA("div",{class:"knob",ref_key:"knob",ref:Q,onDblclick:t[0]||(t[0]=o=>{C.internal=C.initial,g.value=B.value})},[t[3]||(t[3]=F("div",{class:"i-ph-arrows-horizontal absolute text-10px top-14px opacity-70"},null,-1)),(z(),IA("svg",qn,[F("g",Wn,[t[2]||(t[2]=F("path",{d:"M25,90 a 45,45,1,1,1,50,0",fill:"none",stroke:"#9996","stroke-width":"8","stroke-linecap":"round"},null,-1)),F("path",{d:"M25,90 a 45,45,1,1,1,50,0",fill:"none",stroke:`hsla(${C.internal*3.6}deg,70%,50%,0.8)`,"stroke-width":"12","stroke-linecap":"round","stroke-dasharray":E,"stroke-dashoffset":E-E*(C.internal/100)},null,8,jn),F("g",{transform:`translate(50,52.5) rotate(${C.internal*2.9}) `},t[1]||(t[1]=[F("circle",{"stroke-width":"2",fill:"none",r:38,opacity:"0.6"},null,-1)]),8,Pn)]),F("g",Xn,[F("text",{class:"font-bold text-2xl",transform:`translate(0,${I.unit?-3:5})`},[oe(e.$slots,"default",{},()=>[F("tspan",null,EA(B.value.toFixed(I.fixed)),1)])],8,zn),F("text",_n,[F("tspan",null,EA(I.unit),1)]),F("text",$n,[F("tspan",null,EA(I.param.toUpperCase()),1)])])]))],544))}},AC=Xe(Ir,[["__scopeId","data-v-f32ad27f"]]);function gr(I,A){return Object.keys(I.values).forEach(g=>I.values[g]=I.values[g]&&parseFloat(I.values[g].toFixed(A))),I}function ze(I,A,g){const C=A-1,B=g[$e(C,g.length)];return B.marker!=="Z"?B:ze(I,C,g)}function _e(I,A,g){const C=A+1,B=g[$e(C,g.length)];return B.marker==="Z"?_e(I,C,g):B}function Cr(I,A,g){let C=g[A-1]||{values:{x:0,y:0}};if(I.marker===I.marker.toLowerCase())switch(I.marker=I.marker.toUpperCase(),I.marker){case"M":I.values.x+=C.values.x,I.values.y+=C.values.y;break;case"L":case"A":I.values.x+=C.values.x,I.values.y+=C.values.y;break;case"H":I.marker="L",I.values.x+=C.values.x,I.values.y=C.values.y;break;case"V":I.marker="L",I.values.x=C.values.x,I.values.y+=C.values.y;break;case"C":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x1+=C.values.x,I.values.y1+=C.values.y,I.values.x2+=C.values.x,I.values.y2+=C.values.y;break;case"S":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x2+=C.values.x,I.values.y2+=C.values.y;break;case"Q":I.values.x+=C.values.x,I.values.y+=C.values.y,I.values.x1+=C.values.x,I.values.y1+=C.values.y;break;case"T":I.values.x+=C.values.x,I.values.y+=C.values.y;break}else if(I.marker===I.marker.toUpperCase())switch(I.marker){case"H":I.marker="L",I.values.y=C.values.y;break;case"V":I.marker="L",I.values.x=C.values.x;break}if(I.marker==="Z"){let B=function(E,e){return E[e].marker==="M"?E[e]:B(E,e-1)},Q=B(g,A);I.values.x=Q.values.x,I.values.y=Q.values.y}return I}function Br(I,A){const g=[];switch(I.toUpperCase()){case"M":for(let C=0;CMath.round(Math.abs(C.values[Q]-I.values[Q]))===0)&&(I.overlap=!0)}return I}function wB(I,A){const g=["x","y"].every(C=>Math.round(Math.abs(I[A].values[C]-I[0].values[C]))===0);I[A].marker==="L"&&g&&(I[A].overlap=!0,wB(I,A-1)),I[A].marker==="Z"&&wB(I,A-1)}function Er(I,A,g){const C=BE(I.values,g.values),B=BE(A.values,I.values);return Math.min(B,C)}function CE(I,A){return Math.atan2(A.x-I.x,A.y-I.y)}function BE(I,A){const g=I.x-A.x,C=I.y-A.y;return Math.sqrt(Math.pow(g,2)+Math.pow(C,2))}function QE(I,A){return Math.sin(I)*A}function EE(I,A){return Math.cos(I)*A}function eE(I,A){const g=A/Math.tan(I);return g===1/0||g===-1/0||isNaN(g)?A:g}function er(I,A){return A*Math.tan(I)}function tr(I,A){let g,C=0,B=I*(180/Math.PI);return B<0&&B>=-180||B>180&&B<360?g=eE(I/2,-A):(g=eE(I/2,A),C=1,g===1/0&&(g=A)),{offset:g,sweepFlag:C}}function ir(I){const A=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return I.map(g=>{let C="";if(g.marker!=="Z"){const B=Object.keys(g.values);C=A.filter(Q=>B.indexOf(Q)!==-1).map(Q=>g.values[Q]).join()}return`${g.marker}${C}`}).join("").trim()}function or(I){const A=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,g=/-?[0-9]*\.?\d+/g;return[...I.matchAll(A)].map(C=>({marker:C[0],index:C.index})).reduceRight((C,B)=>{const Q=I.substring(B.index,C.length?C[C.length-1].index:I.length);return C.concat([{marker:B.marker,index:B.index,chunk:Q.length>0?Q.substr(1,Q.length-1):Q}])},[]).reverse().flatMap(C=>{const B=C.chunk.match(g),Q=B?B.map(parseFloat):[];return Br(C.marker,Q)}).map(Cr)}function sr(I,A,g){let C=[],B=[];return I.forEach(Q=>gr(Q,g)),I.forEach(Q=>{Q.marker==="M"&&C.push([]),C[C.length-1].push(Q)}),C.forEach(Q=>{Q.map(Qr),wB(Q,Q.length-1);const E=Q[Q.length-1].marker=="Z";Q.filter(e=>!e.overlap).map((e,t,o)=>{const s=ze(e,t,o),a=_e(e,t,o),c=CE(e.values,s.values),N=CE(e.values,a.values),M=N-c,d=M*(180/Math.PI),U=Er(e,s,a),b=Math.abs(er(M/2,U/2)),R=Math.min(A,b),w=tr(M,R),Z=w.offset,sA=w.sweepFlag,DA=(t==0||t==o.length-1)&&!E;switch(e.marker){case"M":case"L":const hA=[e.values.x+QE(c,Z),e.values.y+EE(c,Z)],vA=[e.values.x+QE(N,Z),e.values.y+EE(N,Z)];DA?B.push({marker:e.marker,values:e.values}):B.push({marker:e.marker,values:{x:parseFloat(hA[0].toFixed(3)),y:parseFloat(hA[1].toFixed(3))}}),!DA&&(a.marker==="L"||a.marker==="M")&&B.push({marker:"A",radius:R,values:{radiusX:parseFloat(R.toFixed(3)),radiusY:parseFloat(R.toFixed(3)),rotation:d,largeArc:0,sweep:sA,x:parseFloat(vA[0].toFixed(3)),y:parseFloat(vA[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":B.push({marker:e.marker,values:e.values});break}})}),{path:ir(B),commands:B}}function nr(I,A,g){return sr([...or(I)],A,g)}const rr=["viewBox"],ar=["width","height","transform"],lr=["font-size","transform"],cr=["transform"],Dr=["x"],hr=["x"],wr=["x"],Nr=["x"],Rr=["transform"],ur=["x"],fr=["x"],dr=["x"],yr=["x"],Mr=["d","stroke-width"],Gr={class:"levels op-50",stroke:"currentColor","stroke-linecap":"round","stroke-width":"0.5"},Fr=["x2","transform"],Ur=["x2","transform"],mr=["x2","transform"],Sr=["x2","transform"],Yr={class:"controls op-50",stroke:"currentColor",fill:"transparent","stroke-dasharray":"0.05 1","stroke-linecap":"round","stroke-width":"0.5"},Jr=["width","height"],kr=["width","height","transform"],Kr=["width","height","transform"],pr=["width","height","transform"],tE={__name:"ControlAdsr",props:ne({width:{type:Number,default:60},height:{type:Number,default:20},pad:{type:Number,default:3},title:{type:String,default:"Envelope"}},{a:{type:Number,default:1},aModifiers:{},d:{type:Number,default:1},dModifiers:{},s:{type:Number,default:.7},sModifiers:{},r:{type:Number,default:1},rModifiers:{}}),emits:["update:a","update:d","update:s","update:r"],setup(I){const A=I,g=yg(I,"a"),C=yg(I,"d"),B=yg(I,"s"),Q=yg(I,"r"),E=uA(()=>nr(` M 0 ${A.height} l ${A.width/4*g.value/10} ${-A.height} l ${A.width/4*C.value/10} ${A.height*(1-B.value)} L ${A.width-A.width/2*(Q.value/10)} ${A.height*(1-B.value)} L ${A.width} ${A.height} -`,2,2).path),e=oA(),t=oA(),o=oA(),i=oA(),s=m(g),a=m(C),c=m(B,.01),N=m(Q),M={wheel:{preventWindowScrollY:!0},eventOptions:{capture:!1,passive:!1}};uI({onDrag:s,onWheel:s},{...M,domTarget:e}),uI({onDrag:a,onWheel:a},{...M,domTarget:t}),uI({onDrag:c,onWheel:c},{...M,domTarget:o}),uI({onDrag:N,onWheel:N},{...M,domTarget:i});const d=oA(!1);function m(b,R=.1){return function(Z){const{delta:[sA,DA],dragging:hA,wheeling:vA,shiftKey:P,event:O}=Z;if(O&&O.preventDefault(),d.value=hA||vA,!d.value)return;const wA=P?12:O.type==="wheel"?-8:2;let PA=DA/wA-sA/wA;b.value+=-PA*R}}return(b,R)=>(z(),IA("svg",{class:"min-w-45 max-w-55 m-1 touch-none",ref:"knob",version:"1.1",baseProfile:"full",viewBox:`${-I.pad} ${-I.pad*2} ${I.width+I.pad*2} ${I.height+I.pad*3}`,xmlns:"http://www.w3.org/2000/svg"},[F("rect",{width:I.width+I.pad*2,height:I.height+I.pad*2,rx:"2",transform:`translate(${-I.pad} ${-I.pad})`,fill:"transparent"},null,8,ar),F("text",{"text-anchor":"start","font-size":I.pad*1.4,"dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${-I.pad})`},EA(I.title),9,lr),F("g",{class:"numbers","text-anchor":"middle","font-size":"5","dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${I.height*.25})`},[F("text",{x:I.width/8},EA(g.value.toFixed(2)),9,Dr),F("text",{x:3*I.width/8},EA(C.value.toFixed(2)),9,hr),F("text",{x:5*I.width/8},EA(B.value.toFixed(2)),9,wr),F("text",{x:7*I.width/8},EA(Q.value.toFixed(2)),9,Nr)],8,cr),F("g",{class:"titles","text-anchor":"middle","font-size":"4","dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${I.height*.75})`},[F("text",{x:I.width/8},"ATT",8,ur),F("text",{x:3*I.width/8},"DEC",8,fr),F("text",{x:5*I.width/8},"SUS",8,dr),F("text",{x:7*I.width/8},"REL",8,yr)],8,Rr),F("path",{fill:"currentColor","fill-opacity":"0.2",stroke:"currentColor",d:E.value,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":d.value?1:.5},null,8,Mr),F("g",Gr,[F("line",{x2:I.width/4,transform:`translate(${0*I.width/4} ${I.height*(1-g.value/10)})`},null,8,Fr),F("line",{x2:I.width/4,transform:`translate(${1*I.width/4} ${I.height*(1-C.value/10)})`},null,8,Ur),F("line",{x2:I.width/4,transform:`translate(${2*I.width/4} ${I.height*(1-B.value)})`},null,8,mr),F("line",{x2:I.width/4,transform:`translate(${3*I.width/4} ${I.height*(1-Q.value/10)})`},null,8,Sr)]),F("g",Yr,[F("rect",{ref_key:"attPan",ref:e,width:I.width/4,height:I.height},null,8,Jr),F("rect",{ref_key:"decPan",ref:t,width:I.width/4,height:I.height,transform:`translate(${I.width/4} 0)`},null,8,kr),F("rect",{ref_key:"susPan",ref:o,width:I.width/4,height:I.height,transform:`translate(${I.width/2} 0)`},null,8,Kr),F("rect",{ref_key:"relPan",ref:i,width:I.width/4,height:I.height,transform:`translate(${3*I.width/4} 0)`},null,8,pr)])],8,rr))}};function _B(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}var br=function(A,g,C,B){var Q=C?C.call(B,A,g):void 0;if(Q!==void 0)return!!Q;if(A===g)return!0;if(typeof A!="object"||!A||typeof g!="object"||!g)return!1;var E=Object.keys(A),e=Object.keys(g);if(E.length!==e.length)return!1;for(var t=Object.prototype.hasOwnProperty.bind(g),o=0;oA in I?It(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,cA=(I,A)=>{for(var g in A||(A={}))qr.call(A,g)&&oE(I,g,A[g]);if(iE)for(var g of iE(A))Wr.call(A,g)&&oE(I,g,A[g]);return I},jr=(I,A)=>Or(I,xr(A)),cI=(I,A)=>{for(var g in A)It(I,g,{get:A[g],enumerable:!0})},$B={};cI($B,{_1:()=>gt,_2:()=>Ct,_3:()=>Qt,_4:()=>Et,_5:()=>et,_6:()=>tt,_7:()=>it,_8:()=>ot,__1:()=>AQ,__2:()=>Bt,__3:()=>Pr,__4:()=>Xr,__5:()=>zr,__6:()=>_r,__7:()=>$r,__8:()=>Aa,app:()=>_});function sE(I,A,g){for(var C=new Array(g),B=0,Q=A;B=0)return function(t,o){return function(i){return _(t,o.concat([i]))}}(C,g);A=sE(g,Q,-e|0),I=C.apply(null,sE(g,0,Q))}}function gt(I,A){var g=I.length;if(g===1)return I(A);switch(g){case 1:return I(A);case 2:return function(C){return I(A,C)};case 3:return function(C,B){return I(A,C,B)};case 4:return function(C,B,Q){return I(A,C,B,Q)};case 5:return function(C,B,Q,E){return I(A,C,B,Q,E)};case 6:return function(C,B,Q,E,e){return I(A,C,B,Q,E,e)};case 7:return function(C,B,Q,E,e,t){return I(A,C,B,Q,E,e,t)};default:return _(I,[A])}}function AQ(I){var A=I.length;return A===1?I:function(g){return gt(I,g)}}function Ct(I,A,g){var C=I.length;if(C===2)return I(A,g);switch(C){case 1:return _(I(A),[g]);case 2:return I(A,g);case 3:return function(B){return I(A,g,B)};case 4:return function(B,Q){return I(A,g,B,Q)};case 5:return function(B,Q,E){return I(A,g,B,Q,E)};case 6:return function(B,Q,E,e){return I(A,g,B,Q,E,e)};case 7:return function(B,Q,E,e,t){return I(A,g,B,Q,E,e,t)};default:return _(I,[A,g])}}function Bt(I){var A=I.length;return A===2?I:function(g,C){return Ct(I,g,C)}}function Qt(I,A,g,C){var B=I.length;if(B===3)return I(A,g,C);switch(B){case 1:return _(I(A),[g,C]);case 2:return _(I(A,g),[C]);case 3:return I(A,g,C);case 4:return function(Q){return I(A,g,C,Q)};case 5:return function(Q,E){return I(A,g,C,Q,E)};case 6:return function(Q,E,e){return I(A,g,C,Q,E,e)};case 7:return function(Q,E,e,t){return I(A,g,C,Q,E,e,t)};default:return _(I,[A,g,C])}}function Pr(I){var A=I.length;return A===3?I:function(g,C,B){return Qt(I,g,C,B)}}function Et(I,A,g,C,B){var Q=I.length;if(Q===4)return I(A,g,C,B);switch(Q){case 1:return _(I(A),[g,C,B]);case 2:return _(I(A,g),[C,B]);case 3:return _(I(A,g,C),[B]);case 4:return I(A,g,C,B);case 5:return function(E){return I(A,g,C,B,E)};case 6:return function(E,e){return I(A,g,C,B,E,e)};case 7:return function(E,e,t){return I(A,g,C,B,E,e,t)};default:return _(I,[A,g,C,B])}}function Xr(I){var A=I.length;return A===4?I:function(g,C,B,Q){return Et(I,g,C,B,Q)}}function et(I,A,g,C,B,Q){var E=I.length;if(E===5)return I(A,g,C,B,Q);switch(E){case 1:return _(I(A),[g,C,B,Q]);case 2:return _(I(A,g),[C,B,Q]);case 3:return _(I(A,g,C),[B,Q]);case 4:return _(I(A,g,C,B),[Q]);case 5:return I(A,g,C,B,Q);case 6:return function(e){return I(A,g,C,B,Q,e)};case 7:return function(e,t){return I(A,g,C,B,Q,e,t)};default:return _(I,[A,g,C,B,Q])}}function zr(I){var A=I.length;return A===5?I:function(g,C,B,Q,E){return et(I,g,C,B,Q,E)}}function tt(I,A,g,C,B,Q,E){var e=I.length;if(e===6)return I(A,g,C,B,Q,E);switch(e){case 1:return _(I(A),[g,C,B,Q,E]);case 2:return _(I(A,g),[C,B,Q,E]);case 3:return _(I(A,g,C),[B,Q,E]);case 4:return _(I(A,g,C,B),[Q,E]);case 5:return _(I(A,g,C,B,Q),[E]);case 6:return I(A,g,C,B,Q,E);case 7:return function(t){return I(A,g,C,B,Q,E,t)};default:return _(I,[A,g,C,B,Q,E])}}function _r(I){var A=I.length;return A===6?I:function(g,C,B,Q,E,e){return tt(I,g,C,B,Q,E,e)}}function it(I,A,g,C,B,Q,E,e){var t=I.length;if(t===7)return I(A,g,C,B,Q,E,e);switch(t){case 1:return _(I(A),[g,C,B,Q,E,e]);case 2:return _(I(A,g),[C,B,Q,E,e]);case 3:return _(I(A,g,C),[B,Q,E,e]);case 4:return _(I(A,g,C,B),[Q,E,e]);case 5:return _(I(A,g,C,B,Q),[E,e]);case 6:return _(I(A,g,C,B,Q,E),[e]);case 7:return I(A,g,C,B,Q,E,e);default:return _(I,[A,g,C,B,Q,E,e])}}function $r(I){var A=I.length;return A===7?I:function(g,C,B,Q,E,e,t){return it(I,g,C,B,Q,E,e,t)}}function ot(I,A,g,C,B,Q,E,e,t){var o=I.length;if(o===8)return I(A,g,C,B,Q,E,e,t);switch(o){case 1:return _(I(A),[g,C,B,Q,E,e,t]);case 2:return _(I(A,g),[C,B,Q,E,e,t]);case 3:return _(I(A,g,C),[B,Q,E,e,t]);case 4:return _(I(A,g,C,B),[Q,E,e,t]);case 5:return _(I(A,g,C,B,Q),[E,e,t]);case 6:return _(I(A,g,C,B,Q,E),[e,t]);case 7:return _(I(A,g,C,B,Q,E,e),[t]);default:return _(I,[A,g,C,B,Q,E,e,t])}}function Aa(I){var A=I.length;return A===8?I:function(g,C,B,Q,E,e,t,o){return ot(I,g,C,B,Q,E,e,t,o)}}var st={};cI(st,{$$Map:()=>Ra,$$Set:()=>ua,RenderDelegate:()=>fa,mount:()=>Rt,renderWithDelegate:()=>da,stepGarbageCollector:()=>ya,visit:()=>ut});var nt={};cI(nt,{create:()=>wt,isNode:()=>wa,shallowCopy:()=>Nt,symbol:()=>IQ});function nE(I){var A=typeof I;return A==="undefined"?3:I===null?2:A==="number"?{TAG:0,_0:I}:A==="bigint"?{TAG:5,_0:I}:A==="string"?{TAG:1,_0:I}:A==="boolean"?I===!0?1:0:A==="symbol"?{TAG:4,_0:I}:A==="function"?{TAG:2,_0:I}:{TAG:3,_0:I}}function Ia(I,A){switch(A){case 0:return typeof I>"u";case 1:return I===null;case 2:return typeof I=="boolean";case 3:return typeof I=="number";case 4:return typeof I=="string";case 5:return typeof I=="function";case 6:return typeof I=="object";case 7:return typeof I=="symbol";case 8:return typeof I=="bigint"}}function ga(I){return I===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:I!==null&&I.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:I.BS_PRIVATE_NESTED_SOME_NONE+1|0}:I}function Ca(I){if(!(I!==null&&I.BS_PRIVATE_NESTED_SOME_NONE!==void 0))return I;var A=I.BS_PRIVATE_NESTED_SOME_NONE;if(A!==0)return{BS_PRIVATE_NESTED_SOME_NONE:A-1|0}}function Ba(I,A){return{hd:A,tl:I}}function Qa(I,A){for(;;){var g=A,C=I;if(!C)return g;var B={hd:C.hd,tl:0};g.tl=B,A=B,I=C.tl}}function Ea(I,A,g){for(;;){var C=A,B=I;if(!B)return;var Q={hd:g(B.hd),tl:0};C.tl=Q,A=Q,I=B.tl}}function ea(I,A,g,C){for(;;){var B=C,Q=g,E=A;if(!Q)return;var e={hd:I(E,Q.hd),tl:0};B.tl=e,C=e,g=Q.tl,A=E+1|0}}function ta(I,A){if(!I)return A;var g={hd:I.hd,tl:0};return Qa(I.tl,g).tl=A,g}function ia(I,A){if(!I)return 0;var g={hd:A(I.hd),tl:0};return Ea(I.tl,g,A),g}function rt(I,A){return ia(I,AQ(A))}function oa(I,A){if(!I)return 0;var g={hd:A(0,I.hd),tl:0};return ea(A,1,I.tl,g),g}function sa(I,A){return oa(I,Bt(A))}function at(I){for(var A=I,g=0;;){var C=g,B=A;if(!B)return C;g=C+1|0,A=B.tl}}function na(I,A,g){for(;;){var C=g,B=A;if(!C)return;I[B]=C.hd,g=C.tl,A=B+1|0}}function lt(I){for(var A=I.length-1|0,g=0;;){var C=g,B=A;if(B<0)return C;g={hd:I[B],tl:C},A=B-1|0}}function ra(I){var A=at(I),g=new Array(A);return na(g,0,I),g}function aa(I,A){for(;;){var g=I;if(!g)return;A(g.hd),I=g.tl}}function ct(I,A){aa(I,AQ(A))}function la(I,A,g){for(;;){var C=A,B=I;if(!B)return C;A=g(C,B.hd),I=B.tl}}function Dt(I,A,g,C){for(let B in C)if(C.hasOwnProperty(B)){const Q=C[B];(!g.hasOwnProperty(B)||!Lr(g[B],Q))&&((typeof Q>"u"||Q===null||typeof Q=="number"&&isNaN(Q)||typeof Q=="number"&&!isFinite(Q))&&console.warn(`Warning: applying a potentially erroneous property value. ${B}: ${Q}`),I.setProperty(A,B,Q),g[B]=Q)}}function ca(I,A){if(A in I)return ga(I[A])}function Da(I){if(I!==void 0)return Ca(I);throw new Error("getExn")}function rE(I,A,g,C){Dt(I,A,g,C)}function ht(I,A){return Math.imul(I^A,16777619)}function IB(I,A){for(var g=I,C=0,B=A.length;C<=B;++C)g=ht(g,A.charCodeAt(C)|0);return g}function ha(I,A,g){var C=IB(-2128831035,I),B=ca(A,"key"),Q=B!==void 0&&Ia(B,4)?IB(C,B):IB(C,Da(JSON.stringify(A)));return la(g,Q,ht)&2147483647}var IQ="__ELEM_NODE__";function wt(I,A,g){var C=lt(g),B=rt(C,function(Q){return Q.hash});return{symbol:IQ,hash:ha(I,A,B),kind:I,props:A,children:C}}function wa(I){var A=nE(I);if(typeof A=="number"||A.TAG!==3)return!1;var g=nE(I.symbol);return typeof g=="number"||g.TAG!==1?!1:g._0===IQ}function Nt(I){return{symbol:I.symbol,hash:I.hash,kind:I.kind,props:Object.assign({},I.props),generation:{contents:0}}}function Na(I){return Array.from(I.values())}var Ra={valuesArray:Na},ua={},fa={};function Rt(I,A){var g=I.getNodeMap();if(g.has(A.hash)){var C=g.get(A.hash);rE(I,C.hash,C.props,A.props),C.generation.contents=0;return}I.createNode(A.hash,A.kind),rE(I,A.hash,{},A.props),ct(A.children,function(B){I.appendChild(A.hash,B.hash)}),g.set(A.hash,Nt(A))}function ut(I,A,g){for(;;){var C=g,B=function(e){A.add(e.hash)};if(!C)return;var Q=C.tl,E=C.hd;if(A.has(E.hash)){g=Q;continue}B(E),Rt(I,E),g=ta(E.children,Q)}}function da(I,A){var g=new Set,C=sa(lt(A),function(B,Q){return wt("root",{channel:B},[Q])});ut(I,g,C),I.activateRoots(ra(rt(C,function(B){return B.hash}))),I.commitUpdates()}function ya(I){var A=I.getNodeMap(),g=I.getTerminalGeneration(),C=Array.from(A.values()).reduce(function(B,Q){return Q.generation.contents=Q.generation.contents+1|0,Q.generation.contents>=g?(I.deleteNode(Q.hash),Ba(B,Q)):B},0);if(at(C)>0)return I.commitUpdates(),ct(C,function(B){A.delete(B.hash)})}var Ma=$B,ft=st,Ga=function(I,A){return Ma._2(ft.renderWithDelegate,I,A)};ft.stepGarbageCollector;var Fa=$B,gQ=nt,dt=function(I,A,g){return Fa._3(gQ.create,I,A,g)},Ua=gQ.isNode;gQ.shallowCopy;function D(I){return typeof I=="number"?dt("const",{value:I},[]):(Vr(L(I),`Whoops, expecting a Node type here! Got: ${typeof I}`),I)}function L(I){return Ua(I)}function f(I,A,g){return dt(I,A,g.map(D))}var _I={};cI(_I,{accum:()=>Ja,biquad:()=>Ql,capture:()=>nl,constant:()=>yt,convolve:()=>va,counter:()=>Ya,delay:()=>$a,env:()=>za,fft:()=>sl,latch:()=>pa,maxhold:()=>ba,meter:()=>tl,metro:()=>Ha,mm1p:()=>gl,once:()=>La,phasor:()=>ka,pole:()=>Xa,prewarp:()=>Il,rand:()=>Ta,sample:()=>Va,sampleseq:()=>ja,sampleseq2:()=>Pa,scope:()=>ol,sdelay:()=>Al,seq:()=>Oa,seq2:()=>xa,snapshot:()=>il,sparseq:()=>qa,sparseq2:()=>Wa,sr:()=>ma,svf:()=>Cl,svfshelf:()=>Bl,syncphasor:()=>Ka,table:()=>Za,tapIn:()=>El,tapOut:()=>el,time:()=>Sa,z:()=>_a});function yt(I){return f("const",I,[])}function ma(){return f("sr",{},[])}function Sa(){return f("time",{},[])}function Ya(I,A){return typeof I=="number"||L(I)?f("counter",{},[D(I)]):f("counter",I,[D(A)])}function Ja(I,A,g){return typeof I=="number"||L(I)?f("accum",{},[D(I),D(A)]):f("accum",I,[D(A),D(g)])}function ka(I,A){return typeof I=="number"||L(I)?f("phasor",{},[D(I)]):f("phasor",I,[D(A)])}function Ka(I,A,g){return typeof I=="number"||L(I)?f("sphasor",{},[D(I),D(A)]):f("sphasor",I,[D(A),D(g)])}function pa(I,A,g){return typeof I=="number"||L(I)?f("latch",{},[D(I),D(A)]):f("latch",I,[D(A),D(g)])}function ba(I,A,g){return typeof I=="number"||L(I)?f("maxhold",{},[D(I),D(A)]):f("maxhold",I,[D(A),D(g)])}function La(I,A){return typeof I=="number"||L(I)?f("once",{},[D(I)]):f("once",I,[D(A)])}function Ta(I){return typeof I<"u"?f("rand",I,[]):f("rand",{},[])}function Ha(I){return typeof I<"u"?f("metro",I,[]):f("metro",{},[])}function Va(I,A,g){return f("sample",I,[D(A),D(g)])}function Za(I,A){return f("table",I,[D(A)])}function va(I,A){return f("convolve",I,[D(A)])}function Oa(I,A,g){return f("seq",I,[D(A),D(g)])}function xa(I,A,g){return f("seq2",I,[D(A),D(g)])}function qa(I,A,g){return f("sparseq",I,[D(A),D(g)])}function Wa(I,A){return f("sparseq2",I,[D(A)])}function ja(I,A){return f("sampleseq",I,[D(A)])}function Pa(I,A){return f("sampleseq2",I,[D(A)])}function Xa(I,A,g){return typeof I=="number"||L(I)?f("pole",{},[D(I),D(A)]):f("pole",I,[D(A),D(g)])}function za(I,A,g,C){return typeof I=="number"||L(I)?f("env",{},[D(I),D(A),D(g)]):f("env",I,[D(A),D(g),D(C)])}function _a(I,A){return typeof I=="number"||L(I)?f("z",{},[D(I)]):f("z",I,[D(A)])}function $a(I,A,g,C){return typeof I=="number"||L(I)?f("delay",{},[D(I),D(A),D(g)]):f("delay",I,[D(A),D(g),D(C)])}function Al(I,A){return f("sdelay",I,[D(A)])}function Il(I){return f("prewarp",{},[I])}function gl(I,A,g){return typeof I=="number"||L(I)?f("mm1p",{},[D(I),D(A)]):f("mm1p",I,[D(A),D(g)])}function Cl(I,A,g,C){return typeof I=="number"||L(I)?f("svf",{},[D(I),D(A),D(g)]):f("svf",I,[D(A),D(g),D(C)])}function Bl(I,A,g,C,B){return typeof I=="number"||L(I)?f("svfshelf",{},[D(I),D(A),D(g),D(C)]):f("svfshelf",I,[D(A),D(g),D(C),D(B)])}function Ql(I,A,g,C,B,Q,E){return typeof I=="number"||L(I)?f("biquad",{},[D(I),D(A),D(g),D(C),D(B),D(Q)]):f("biquad",I,[D(A),D(g),D(C),D(B),D(Q),D(E)])}function El(I){return f("tapIn",I,[])}function el(I,A){return f("tapOut",I,[D(A)])}function tl(I,A){return typeof I=="number"||L(I)?f("meter",{},[D(I)]):f("meter",I,[D(A)])}function il(I,A,g){return typeof I=="number"||L(I)?f("snapshot",{},[D(I),D(A)]):f("snapshot",I,[D(A),D(g)])}function ol(I,...A){return typeof I=="number"||L(I)?f("scope",{},[I,...A].map(D)):f("scope",I,A.map(D))}function sl(I,A){return typeof I=="number"||L(I)?f("fft",{},[D(I)]):f("fft",I,[D(A)])}function nl(I,A,g){return typeof I=="number"||L(I)?f("capture",{},[D(I),D(A)]):f("capture",I,[D(A),D(g)])}var Mt={};cI(Mt,{compress:()=>Wl,skcompress:()=>jl});var $I={};cI($I,{abs:()=>Ml,add:()=>Kl,and:()=>Jl,asinh:()=>Dl,ceil:()=>Rl,cos:()=>al,div:()=>Ll,eq:()=>Yl,exp:()=>yl,floor:()=>ul,ge:()=>Ul,geq:()=>ml,identity:()=>Gt,le:()=>Gl,leq:()=>Fl,ln:()=>hl,log:()=>wl,log2:()=>Nl,max:()=>Vl,min:()=>Hl,mod:()=>Tl,mul:()=>bl,or:()=>kl,pow:()=>Sl,round:()=>fl,sin:()=>rl,sqrt:()=>dl,sub:()=>pl,tan:()=>ll,tanh:()=>cl});function Gt(I,A){return typeof I=="number"||L(I)?f("in",{},[D(I)]):typeof A=="number"||L(A)?f("in",I,[D(A)]):f("in",I,[])}function rl(I,A){return typeof I=="number"||L(I)?f("sin",{},[D(I)]):f("sin",I,[D(A)])}function al(I,A){return typeof I=="number"||L(I)?f("cos",{},[D(I)]):f("cos",I,[D(A)])}function ll(I,A){return typeof I=="number"||L(I)?f("tan",{},[D(I)]):f("tan",I,[D(A)])}function cl(I,A){return typeof I=="number"||L(I)?f("tanh",{},[D(I)]):f("tanh",I,[D(A)])}function Dl(I,A){return typeof I=="number"||L(I)?f("asinh",{},[D(I)]):f("asinh",I,[D(A)])}function hl(I,A){return typeof I=="number"||L(I)?f("ln",{},[D(I)]):f("ln",I,[D(A)])}function wl(I,A){return typeof I=="number"||L(I)?f("log",{},[D(I)]):f("log",I,[D(A)])}function Nl(I,A){return typeof I=="number"||L(I)?f("log2",{},[D(I)]):f("log2",I,[D(A)])}function Rl(I,A){return typeof I=="number"||L(I)?f("ceil",{},[D(I)]):f("ceil",I,[D(A)])}function ul(I,A){return typeof I=="number"||L(I)?f("floor",{},[D(I)]):f("floor",I,[D(A)])}function fl(I,A){return typeof I=="number"||L(I)?f("round",{},[D(I)]):f("round",I,[D(A)])}function dl(I,A){return typeof I=="number"||L(I)?f("sqrt",{},[D(I)]):f("sqrt",I,[D(A)])}function yl(I,A){return typeof I=="number"||L(I)?f("exp",{},[D(I)]):f("exp",I,[D(A)])}function Ml(I,A){return typeof I=="number"||L(I)?f("abs",{},[D(I)]):f("abs",I,[D(A)])}function Gl(I,A,g){return typeof I=="number"||L(I)?f("le",{},[D(I),D(A)]):f("le",I,[D(A),D(g)])}function Fl(I,A,g){return typeof I=="number"||L(I)?f("leq",{},[D(I),D(A)]):f("leq",I,[D(A),D(g)])}function Ul(I,A,g){return typeof I=="number"||L(I)?f("ge",{},[D(I),D(A)]):f("ge",I,[D(A),D(g)])}function ml(I,A,g){return typeof I=="number"||L(I)?f("geq",{},[D(I),D(A)]):f("geq",I,[D(A),D(g)])}function Sl(I,A,g){return typeof I=="number"||L(I)?f("pow",{},[D(I),D(A)]):f("pow",I,[D(A),D(g)])}function Yl(I,A,g){return typeof I=="number"||L(I)?f("eq",{},[D(I),D(A)]):f("eq",I,[D(A),D(g)])}function Jl(I,A,g){return typeof I=="number"||L(I)?f("and",{},[D(I),D(A)]):f("and",I,[D(A),D(g)])}function kl(I,A,g){return typeof I=="number"||L(I)?f("or",{},[D(I),D(A)]):f("or",I,[D(A),D(g)])}function Kl(I,...A){return typeof I=="number"||L(I)?f("add",{},[I,...A].map(D)):f("add",I,A.map(D))}function pl(I,...A){return typeof I=="number"||L(I)?f("sub",{},[I,...A].map(D)):f("sub",I,A.map(D))}function bl(I,...A){return typeof I=="number"||L(I)?f("mul",{},[I,...A].map(D)):f("mul",I,A.map(D))}function Ll(I,...A){return typeof I=="number"||L(I)?f("div",{},[I,...A].map(D)):f("div",I,A.map(D))}function Tl(I,...A){return typeof I=="number"||L(I)?f("mod",{},[I,...A].map(D)):f("mod",I,A.map(D))}function Hl(I,...A){return typeof I=="number"||L(I)?f("min",{},[I,...A].map(D)):f("min",I,A.map(D))}function Vl(I,...A){return typeof I=="number"||L(I)?f("max",{},[I,...A].map(D)):f("max",I,A.map(D))}var Og={};cI(Og,{db2gain:()=>Ol,gain2db:()=>xl,hann:()=>ql,ms2samps:()=>Zl,select:()=>Ft,tau2pole:()=>vl});var RA=cA(cA({},_I),$I);function Zl(I){return RA.mul(RA.sr(),RA.div(I,1e3))}function vl(I){return RA.exp(RA.div(-1,RA.mul(I,RA.sr())))}function Ol(I){return RA.pow(10,RA.mul(I,1/20))}function xl(I){return Ft(RA.ge(I,0),RA.max(-120,RA.mul(20,RA.log(I))),-120)}function Ft(I,A,g){return RA.add(RA.mul(I,A),RA.mul(RA.sub(1,I),g))}function ql(I){return RA.mul(.5,RA.sub(1,RA.cos(RA.mul(2*Math.PI,I))))}var X=cA(cA(cA({},_I),$I),Og);function Wl(I,A,g,C,B,Q){const E=X.env(X.tau2pole(X.mul(.001,I)),X.tau2pole(X.mul(.001,A)),B),e=X.gain2db(E),t=X.sub(1,X.div(1,C)),o=X.mul(t,X.sub(g,e)),i=X.min(0,o),s=X.db2gain(i);return X.mul(Q,s)}function jl(I,A,g,C,B,Q,E){const e=X.env(X.tau2pole(X.mul(.001,I)),X.tau2pole(X.mul(.001,A)),Q),t=X.gain2db(e),o=X.sub(g,X.div(B,2)),i=X.add(g,X.div(B,2)),s=X.and(X.geq(t,o),X.leq(t,i)),a=X.sub(1,X.div(1,C)),c=X.select(s,X.mul(X.div(a,2),X.mul(X.div(X.sub(t,o),B),X.sub(o,t))),X.mul(a,X.sub(g,t))),N=X.min(0,c),M=X.db2gain(N);return X.mul(E,M)}var Ut={};cI(Ut,{adsr:()=>ec});var bC={};cI(bC,{allpass:()=>gc,bandpass:()=>Ac,dcblock:()=>Xl,df11:()=>zl,highpass:()=>$l,highshelf:()=>Qc,lowpass:()=>_l,lowshelf:()=>Bc,notch:()=>Ic,peak:()=>Cc,pink:()=>Ec,sm:()=>Pl,smooth:()=>NB,zero:()=>CQ});var W=cA(cA(cA({},_I),$I),Og);function NB(I,A,g){return typeof I=="number"||L(I)?W.pole(I,W.mul(W.sub(1,I),A)):W.pole(I,A,W.mul(W.sub(1,A),g))}function Pl(I,A){return typeof I=="number"||L(I)?NB(W.tau2pole(.02),I):NB(I,W.tau2pole(.02),A)}function CQ(I,A,g,C){let[B,Q,E]=typeof I=="number"||L(I)?[I,A,g]:[A,g,C];return W.sub(W.mul(B,E),W.mul(Q,W.z(E)))}function Xl(I,A){let g=typeof I=="number"||L(I)?I:A;return W.pole(.995,CQ(1,1,g))}function zl(I,A,g,C,B){let[Q,E,e,t]=typeof I=="number"||L(I)?[I,A,g,C]:[A,g,C,B];return W.pole(e,CQ(Q,E,t))}function _l(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"lowpass"},I,A,g):W.svf(Object.assign({},I,{mode:"lowpass"}),A,g,C)}function $l(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"highpass"},I,A,g):W.svf(Object.assign({},I,{mode:"highpass"}),A,g,C)}function Ac(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"bandpass"},I,A,g):W.svf(Object.assign({},I,{mode:"bandpass"}),A,g,C)}function Ic(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"notch"},I,A,g):W.svf(Object.assign({},I,{mode:"notch"}),A,g,C)}function gc(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"allpass"},I,A,g):W.svf(Object.assign({},I,{mode:"allpass"}),A,g,C)}function Cc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"peak"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"peak"}),A,g,C,B)}function Bc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"lowshelf"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"lowshelf"}),A,g,C,B)}function Qc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"highshelf"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"highshelf"}),A,g,C,B)}function Ec(I,A){let g=typeof I=="number"||L(I)?I:A;return((B,Q,E)=>W.min(Q,W.max(B,E)))(-1,1,W.mul(W.db2gain(-30),W.add(W.pole(.99765,W.mul(g,.099046)),W.pole(.963,W.mul(g,.2965164)),W.pole(.57,W.mul(g,1.0526913)),W.mul(.1848,g))))}var gI=cA(cA(cA(cA({},_I),$I),bC),Og);function ec(I,A,g,C,B,Q){let E=typeof I=="number"||L(I)?[I,A,g,C,B]:[A,g,C,B,Q],[e,t,o,i,s]=E,a=gI.mul(e,gI.sr()),c=gI.le(gI.counter(s),a),N=gI.select(s,gI.select(c,1,o),0),M=gI.select(s,gI.select(c,e,t),i),d=gI.tau2pole(gI.div(M,6.91));return gI.smooth(d,N)}var mt={};cI(mt,{blepsaw:()=>sc,blepsquare:()=>nc,bleptriangle:()=>rc,cycle:()=>tc,noise:()=>fB,pinknoise:()=>ac,saw:()=>uB,square:()=>ic,train:()=>RB,triangle:()=>oc});var AA=cA(cA(cA({},_I),$I),bC);function RB(I,A){return typeof I=="number"||L(I)?AA.le(AA.phasor(I,0),.5):AA.le(AA.phasor(I,A,0),.5)}function tc(I,A){return typeof I=="number"||L(I)?AA.sin(AA.mul(2*Math.PI,AA.phasor(I,0))):AA.sin(AA.mul(2*Math.PI,AA.phasor(I,A,0)))}function uB(I,A){return typeof I=="number"||L(I)?AA.sub(AA.mul(2,AA.phasor(I,0)),1):AA.sub(AA.mul(2,AA.phasor(I,A,0)),1)}function ic(I,A){return typeof I=="number"||L(I)?AA.sub(AA.mul(2,RB(I)),1):AA.sub(AA.mul(2,RB(I,A)),1)}function oc(I,A){return typeof I=="number"||L(I)?AA.mul(2,AA.sub(.5,AA.abs(uB(I)))):AA.mul(2,AA.sub(.5,AA.abs(uB(I,A))))}function sc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("blepsaw",{},[C])}function nc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("blepsquare",{},[C])}function rc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("bleptriangle",{},[C])}function fB(I){return typeof I>"u"?AA.sub(AA.mul(2,AA.rand()),1):AA.sub(AA.mul(2,AA.rand(I)),1)}function ac(I){return typeof I>"u"?AA.pink(fB()):AA.pink(fB(I))}var lc=class extends vr{constructor(){super()}},r=jr(cA(cA(cA(cA(cA(cA(cA({},_I),Mt),Ut),bC),$I),mt),Og),{const:yt,in:Gt}),Ig={CREATE_NODE:0,DELETE_NODE:1,APPEND_CHILD:2,SET_PROPERTY:3,ACTIVATE_ROOTS:4,COMMIT_UPDATES:5},cc=class{constructor(){this.nodeMap=new Map,this.currentActiveRoots=new Set,this.clear()}clear(){this.nodesAdded=0,this.nodesRemoved=0,this.edgesAdded=0,this.propsWritten=0,this.batch={createNode:[],deleteNode:[],appendChild:[],setProperty:[],activateRoots:[],commitUpdates:[]}}getNodeMap(){return this.nodeMap}getTerminalGeneration(){return 4}createNode(I,A){this.nodesAdded++,this.batch.createNode.push([Ig.CREATE_NODE,I,A])}deleteNode(I){this.nodesRemoved++,this.batch.deleteNode.push([Ig.DELETE_NODE,I])}appendChild(I,A){this.edgesAdded++,this.batch.appendChild.push([Ig.APPEND_CHILD,I,A])}setProperty(I,A,g){this.propsWritten++,this.batch.setProperty.push([Ig.SET_PROPERTY,I,A,g])}activateRoots(I){I.length===this.currentActiveRoots.size&&I.every(g=>this.currentActiveRoots.has(g))||(this.batch.activateRoots.push([Ig.ACTIVATE_ROOTS,I]),this.currentActiveRoots=new Set(I))}commitUpdates(){this.batch.commitUpdates.push([Ig.COMMIT_UPDATES])}getPackedInstructions(){return[...this.batch.createNode,...this.batch.deleteNode,...this.batch.appendChild,...this.batch.setProperty,...this.batch.activateRoots,...this.batch.commitUpdates]}};function aE(){return typeof performance>"u"?Date.now():performance.now()}var Dc=class{constructor(I){this._delegate=new cc,this._sendMessage=I,this._nextRefId=0}createRef(I,A,g){let C=`__refKey:${this._nextRefId++}`,B=f(I,Object.assign({key:C},A),g);return[B,E=>{if(!this._delegate.nodeMap.has(B.hash))throw new Error("Cannot update a ref that has not been mounted; make sure you render your node first");const e=this._delegate.nodeMap.get(B.hash);this._delegate.clear(),Dt(this._delegate,B.hash,e.props,E),this._delegate.commitUpdates();const t=this._delegate.getPackedInstructions();return Promise.resolve(this._sendMessage(t))}]}render(...I){const A=aE();this._delegate.clear(),Ga(this._delegate,I.map(D));const g=aE(),C=this._delegate.getPackedInstructions();return Promise.resolve(this._sendMessage(C)).then(B=>({result:B,nodesAdded:this._delegate.nodesAdded,edgesAdded:this._delegate.edgesAdded,propsWritten:this._delegate.propsWritten,elapsedTimeMs:g-A}))}};function hc(I,A){var g={};for(var C in I)Object.prototype.hasOwnProperty.call(I,C)&&A.indexOf(C)<0&&(g[C]=I[C]);if(I!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,C=Object.getOwnPropertySymbols(I);BA())))}(A,I,g)}var r,X=A=>{throw new q(A.O.S.P.name+" instance already deleted")},m=!1,x=()=>{},e=(A,I,g)=>I===g?A:void 0===g.U||null===(A=e(A,I,g.U))?null:g.pa(A),z={},P=[],p=()=>{for(;P.length;){var A=P.pop();A.O.aa=!1,A.delete()}},u={},v=(A,I)=>{if(!I.S||!I.R)throw new W("makeClassHandle requires ptr and ptrType");if(!!I.V!=!!I.T)throw new W("Both smartPtrType and smartPtr must be specified");return I.count={value:1},$(Object.create(A,{O:{value:I,writable:!0}}))},$=A=>"undefined"==typeof FinalizationRegistry?($=A=>A,A):(m=new FinalizationRegistry((A=>{--(A=A.O).count.value,0===A.count.value&&(A.T?A.V.Z(A.T):A.S.P.Z(A.R))})),x=A=>{m.unregister(A)},($=A=>{var I=A.O;return I.T&&m.register(A,{O:I},A),A})(A));function _(){}var AA=(A,I)=>Object.defineProperty(I,"name",{value:A}),IA=(A,I,g)=>{if(void 0===A[I].Y){var C=A[I];A[I]=function(){if(!A[I].Y.hasOwnProperty(arguments.length))throw new q(`Function \'${g}\' called with an invalid number of arguments (${arguments.length}) - expects one of (${A[I].Y})!`);return A[I].Y[arguments.length].apply(this,arguments)},A[I].Y=[],A[I].Y[C.ea]=C}};function gA(A,I,g,C,Q,B,E,D){this.name=A,this.constructor=I,this.ba=g,this.Z=C,this.U=Q,this.qa=B,this.da=E,this.pa=D,this.va=[]}var CA=(A,I,g)=>{for(;I!==g;){if(!I.da)throw new q(`Expected null or instance of ${g.name}, got an instance of ${I.name}`);A=I.da(A),I=I.U}return A};function QA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);return 0}if(!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return CA(I.O.R,I.O.S.P,this.P)}function BA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);if(this.ga){var g=this.wa();return null!==A&&A.push(this.Z,g),g}return 0}if(!I||!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.fa&&I.O.S.fa)throw new q(`Cannot convert argument of type ${I.O.V?I.O.V.name:I.O.S.name} to parameter type ${this.name}`);if(g=CA(I.O.R,I.O.S.P,this.P),this.ga){if(void 0===I.O.T)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.ya){case 0:if(I.O.V!==this)throw new q(`Cannot convert argument of type ${I.O.V?I.O.V.name:I.O.S.name} to parameter type ${this.name}`);g=I.O.T;break;case 1:g=I.O.T;break;case 2:if(I.O.V===this)g=I.O.T;else{var C=I.clone();g=this.xa(g,LA((()=>C.delete()))),null!==A&&A.push(this.Z,g)}break;default:throw new q("Unsupporting sharing policy")}}return g}function EA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);return 0}if(!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(I.O.S.fa)throw new q(`Cannot convert argument of type ${I.O.S.name} to parameter type ${this.name}`);return CA(I.O.R,I.O.S.P,this.P)}function DA(A){return this.fromWireType(F[A>>2])}function iA(A,I,g,C,Q,B,E,D,i,w,R){this.name=A,this.P=I,this.ha=g,this.fa=C,this.ga=Q,this.ua=B,this.ya=E,this.ma=D,this.wa=i,this.xa=w,this.Z=R,Q||void 0!==I.U?this.toWireType=BA:(this.toWireType=C?QA:EA,this.W=null)}var wA,RA,oA=[],NA=A=>{var I=oA[A];return I||(A>=oA.length&&(oA.length=A+1),oA[A]=I=wA.get(A)),I},GA=(A,I)=>{var g=(A=d(A)).includes("j")?((A,I)=>{var g=[];return function(){if(g.length=0,Object.assign(g,arguments),A.includes("j")){var Q=C["dynCall_"+A];Q=g&&g.length?Q.apply(null,[I].concat(g)):Q.call(null,I)}else Q=NA(I).apply(null,g);return Q}})(A,I):NA(I);if("function"!=typeof g)throw new q(`unknown function pointer with signature ${A}: ${I}`);return g},FA=A=>{A=AI(A);var I=d(A);return II(A),I},UA=(A,I)=>{var g=[],C={};throw I.forEach((function A(I){C[I]||b[I]||(t[I]?t[I].forEach(A):(g.push(I),C[I]=!0))})),new RA(`${A}: `+g.map(FA).join([", "]))},MA=(A,I)=>{for(var g=[],C=0;C>2]);return g},JA=A=>{for(;A.length;){var I=A.pop();A.pop()(I)}};function yA(A){for(var I=1;IE)throw new q("argTypes array size mismatch! Must at least get return value and \'this\' types!");var D=null!==I[1]&&null!==g,i=yA(I);for(g="void"!==I[0].name,C=[O,C,Q,JA,I[0],I[1]],Q=0;Q{A>=SA.ja&&0==--SA.get(A).na&&(SA.X[A]=void 0,SA.ia.push(A))},cA=A=>{if(!A)throw new q("Cannot use deleted val. handle = "+A);return SA.get(A).value},LA=A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:A={na:1,value:A};var I=SA.ia.pop()||SA.X.length;return SA.X[I]=A,I}};function lA(A){return this.fromWireType(G[A>>2])}for(var HA={name:"emscripten::val",fromWireType:A=>{var I=cA(A);return KA(A),I},toWireType:(A,I)=>LA(I),argPackAdvance:8,readValueFromPointer:lA,W:null},TA=A=>{if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A},ZA=(A,I)=>{switch(I){case 4:return function(A){return this.fromWireType(U[A>>2])};case 8:return function(A){return this.fromWireType(M[A>>3])};default:throw new TypeError(`invalid float width (${I}): ${A}`)}},VA=(A,I,g)=>{switch(I){case 1:return g?A=>w[A>>0]:A=>R[A>>0];case 2:return g?A=>o[A>>1]:A=>N[A>>1];case 4:return g?A=>G[A>>2]:A=>F[A>>2];default:throw new TypeError(`invalid integer width (${I}): ${A}`)}},qA="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,WA="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,dA=(A,I)=>{for(var g=A>>1,C=g+I/2;!(g>=C)&&N[g];)++g;if(32<(g<<=1)-A&&WA)return WA.decode(R.subarray(A,g));for(g="",C=0;!(C>=I/2);++C){var Q=o[A+2*C>>1];if(0==Q)break;g+=String.fromCharCode(Q)}return g},jA=(A,I,g)=>{if(g??=2147483647,2>g)return 0;var C=I;g=(g-=2)<2*A.length?g/2:A.length;for(var Q=0;Q>1]=A.charCodeAt(Q),I+=2;return o[I>>1]=0,I-C},bA=A=>2*A.length,tA=(A,I)=>{for(var g=0,C="";!(g>=I/4);){var Q=G[A+4*g>>2];if(0==Q)break;++g,65536<=Q?(Q-=65536,C+=String.fromCharCode(55296|Q>>10,56320|1023&Q)):C+=String.fromCharCode(Q)}return C},OA=(A,I,g)=>{if(g??=2147483647,4>g)return 0;var C=I;g=C+g-4;for(var Q=0;Q=B)B=65536+((1023&B)<<10)|1023&A.charCodeAt(++Q);if(G[I>>2]=B,(I+=4)+4>g)break}return G[I>>2]=0,I-C},nA=A=>{for(var I=0,g=0;g=C&&++g,I+=4}return I},fA=(A,I)=>{var g=b[A];if(void 0===g)throw A=I+" has unknown type "+FA(A),new q(A);return g},rA=(A,I,g)=>{var C=[];return A=A.toWireType(C,g),C.length&&(F[I>>2]=LA(C)),A},XA=[],mA={},xA=A=>{var I=mA[A];return void 0===I?d(A):I},eA=()=>"object"==typeof globalThis?globalThis:Function("return this")(),zA=A=>(zA=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return A=>crypto.getRandomValues(A);c("initRandomDevice")})())(A),PA=Array(256),pA=0;256>pA;++pA)PA[pA]=String.fromCharCode(pA);V=PA,q=C.BindingError=class extends Error{constructor(A){super(A),this.name="BindingError"}},W=C.InternalError=class extends Error{constructor(A){super(A),this.name="InternalError"}},Object.assign(_.prototype,{isAliasOf:function(A){if(!(this instanceof _&&A instanceof _))return!1;var I=this.O.S.P,g=this.O.R;A.O=A.O;var C=A.O.S.P;for(A=A.O.R;I.U;)g=I.da(g),I=I.U;for(;C.U;)A=C.da(A),C=C.U;return I===C&&g===A},clone:function(){if(this.O.R||X(this),this.O.ca)return this.O.count.value+=1,this;var A=$,I=Object,g=I.create,C=Object.getPrototypeOf(this),Q=this.O;return(A=A(g.call(I,C,{O:{value:{count:Q.count,aa:Q.aa,ca:Q.ca,R:Q.R,S:Q.S,T:Q.T,V:Q.V}}}))).O.count.value+=1,A.O.aa=!1,A},delete(){if(this.O.R||X(this),this.O.aa&&!this.O.ca)throw new q("Object already scheduled for deletion");x(this);var A=this.O;--A.count.value,0===A.count.value&&(A.T?A.V.Z(A.T):A.S.P.Z(A.R)),this.O.ca||(this.O.T=void 0,this.O.R=void 0)},isDeleted:function(){return!this.O.R},deleteLater:function(){if(this.O.R||X(this),this.O.aa&&!this.O.ca)throw new q("Object already scheduled for deletion");return P.push(this),1===P.length&&r&&r(p),this.O.aa=!0,this}}),C.getInheritedInstanceCount=()=>Object.keys(u).length,C.getLiveInheritedInstances=()=>{var A,I=[];for(A in u)u.hasOwnProperty(A)&&I.push(u[A]);return I},C.flushPendingDeletes=p,C.setDelayFunction=A=>{r=A,P.length&&r&&r(p)},Object.assign(iA.prototype,{ra(A){return this.ma&&(A=this.ma(A)),A},la(A){this.Z?.(A)},argPackAdvance:8,readValueFromPointer:DA,fromWireType:function(A){function I(){return this.ga?v(this.P.ba,{S:this.ua,R:g,V:this,T:A}):v(this.P.ba,{S:this,R:A})}var g=this.ra(A);if(!g)return this.la(A),null;var C=((A,I)=>{if(void 0===I)throw new q("ptr should not be undefined");for(;A.U;)I=A.da(I),A=A.U;return u[I]})(this.P,g);if(void 0!==C)return 0===C.O.count.value?(C.O.R=g,C.O.T=A,C.clone()):(C=C.clone(),this.la(A),C);if(C=this.P.qa(g),!(C=z[C]))return I.call(this);C=this.fa?C.oa:C.pointerType;var Q=e(g,this.P,C.P);return null===Q?I.call(this):this.ga?v(C.P.ba,{S:C,R:Q,V:this,T:A}):v(C.P.ba,{S:C,R:Q})}}),RA=C.UnboundTypeError=(hA=Error,(aA=AA(kA="UnboundTypeError",(function(A){this.name=kA,this.message=A,void 0!==(A=Error(A).stack)&&(this.stack=this.toString()+"\\n"+A.replace(/^Error(:[^\\n]*)?\\n/,""))}))).prototype=Object.create(hA.prototype),aA.prototype.constructor=aA,aA.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},aA),SA.X.push({value:void 0},{value:null},{value:!0},{value:!1}),Object.assign(SA,{ja:SA.X.length}),C.count_emval_handles=()=>{for(var A=0,I=SA.ja;I{var C=new Z(A);throw F[C.R+16>>2]=0,F[C.R+4>>2]=I,F[C.R+8>>2]=g,A},x:()=>{},C:(A,I,g,C)=>{f(A,{name:I=d(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?g:C},argPackAdvance:8,readValueFromPointer:function(A){return this.fromWireType(R[A])},W:null})},H:(A,I,g,Q,B,E,D,i,w,R,o,N,G)=>{o=d(o),E=GA(B,E),i&&=GA(D,i),R&&=GA(w,R),G=GA(N,G);var F=(A=>{if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=I&&57>=I?`_${A}`:A})(o);((A,I)=>{if(C.hasOwnProperty(A))throw new q(`Cannot register public name \'${A}\' twice`);C[A]=I})(F,(function(){UA(`Cannot construct ${o} due to unbound types`,[Q])})),n([A,I,g],Q?[Q]:[],(function(I){if(I=I[0],Q)var g=I.P,B=g.ba;else B=_.prototype;I=AA(o,(function(){if(Object.getPrototypeOf(this)!==D)throw new q("Use \'new\' to construct "+o);if(void 0===N.$)throw new q(o+" has no accessible constructor");var A=N.$[arguments.length];if(void 0===A)throw new q(`Tried to invoke ctor of ${o} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(N.$).toString()}) parameters instead!`);return A.apply(this,arguments)}));var D=Object.create(B,{constructor:{value:I}});I.prototype=D;var w,N=new gA(o,I,D,G,g,E,i,R);N.U&&((w=N.U).ka??(w.ka=[]),N.U.ka.push(N));return g=new iA(o,N,!0,!1,!1),w=new iA(o+"*",N,!1,!1,!1),B=new iA(o+" const*",N,!1,!0,!1),z[A]={pointerType:w,oa:B},((A,I)=>{if(!C.hasOwnProperty(A))throw new W("Replacing nonexistant public symbol");C[A]=I,C[A].ea=void 0})(F,I),[g,w,B]}))},G:(A,I,g,C,Q,B)=>{var E=MA(I,g);Q=GA(C,Q),n([],[A],(function(A){var g=`constructor ${(A=A[0]).name}`;if(void 0===A.P.$&&(A.P.$=[]),void 0!==A.P.$[I-1])throw new q(`Cannot register multiple constructors with identical number of parameters (${I-1}) for class \'${A.name}\'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return A.P.$[I-1]=()=>{UA(`Cannot construct ${A.name} due to unbound types`,E)},n([],E,(C=>(C.splice(1,0,null),A.P.$[I-1]=sA(g,C,null,Q,B),[]))),[]}))},e:(A,I,g,C,Q,B,E,D,i)=>{var w=MA(g,C);I=(A=>{const I=(A=A.trim()).indexOf("(");return-1!==I?A.substr(0,I):A})(I=d(I)),B=GA(Q,B),n([],[A],(function(A){function C(){UA(`Cannot call ${Q} due to unbound types`,w)}var Q=`${(A=A[0]).name}.${I}`;I.startsWith("@@")&&(I=Symbol[I.substring(2)]),D&&A.P.va.push(I);var R=A.P.ba,o=R[I];return void 0===o||void 0===o.Y&&o.className!==A.name&&o.ea===g-2?(C.ea=g-2,C.className=A.name,R[I]=C):(IA(R,I,Q),R[I].Y[g-2]=C),n([],w,(function(C){return C=sA(Q,C,A,B,E,i),void 0===R[I].Y?(C.ea=g-2,R[I]=C):R[I].Y[g-2]=C,[]})),[]}))},B:A=>f(A,HA),u:(A,I,g)=>{f(A,{name:I=d(I),fromWireType:A=>A,toWireType:(A,I)=>I,argPackAdvance:8,readValueFromPointer:ZA(I,g),W:null})},g:(A,I,g,C,Q)=>{if(I=d(I),-1===Q&&(Q=4294967295),Q=A=>A,0===C){var B=32-8*g;Q=A=>A<>>B}var E=I.includes("unsigned")?function(A,I){return I>>>0}:function(A,I){return I};f(A,{name:I,fromWireType:Q,toWireType:E,argPackAdvance:8,readValueFromPointer:VA(I,g,0!==C),W:null})},b:(A,I,g)=>{function C(A){return new Q(w.buffer,F[A+4>>2],F[A>>2])}var Q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];f(A,{name:g=d(g),fromWireType:C,argPackAdvance:8,readValueFromPointer:C},{sa:!0})},t:(A,I)=>{var g="std::string"===(I=d(I));f(A,{name:I,fromWireType:function(A){var I=F[A>>2],C=A+4;if(g)for(var Q=C,B=0;B<=I;++B){var E=C+B;if(B==I||0==R[E]){if(Q){var D=Q,i=R,w=D+(E-Q);for(Q=D;i[Q]&&!(Q>=w);)++Q;if(16(o=224==(240&o)?(15&o)<<12|N<<6|G:(7&o)<<18|N<<12|G<<6|63&i[D++])?w+=String.fromCharCode(o):(o-=65536,w+=String.fromCharCode(55296|o>>10,56320|1023&o))}}else w+=String.fromCharCode(o)}D=w}}else D="";if(void 0===U)var U=D;else U+=String.fromCharCode(0),U+=D;Q=E+1}}else{for(U=Array(I),B=0;B=E?Q++:2047>=E?Q+=2:55296<=E&&57343>=E?(Q+=4,++C):Q+=3}else Q=I.length;if(E=(Q=_A(4+(C=Q)+1))+4,F[Q>>2]=C,g&&B){if(B=E,E=C+1,C=R,0=i)i=65536+((1023&i)<<10)|1023&I.charCodeAt(++D);if(127>=i){if(B>=E)break;C[B++]=i}else{if(2047>=i){if(B+1>=E)break;C[B++]=192|i>>6}else{if(65535>=i){if(B+2>=E)break;C[B++]=224|i>>12}else{if(B+3>=E)break;C[B++]=240|i>>18,C[B++]=128|i>>12&63}C[B++]=128|i>>6&63}C[B++]=128|63&i}}C[B]=0}}else if(B)for(B=0;B{if(g=d(g),2===I)var C=dA,Q=jA,B=bA,E=()=>N,D=1;else 4===I&&(C=tA,Q=OA,B=nA,E=()=>F,D=2);f(A,{name:g,fromWireType:A=>{for(var g,Q=F[A>>2],B=E(),i=A+4,w=0;w<=Q;++w){var R=A+4+w*I;w!=Q&&0!=B[R>>D]||(i=C(i,R-i),void 0===g?g=i:(g+=String.fromCharCode(0),g+=i),i=R+I)}return II(A),g},toWireType:(A,C)=>{if("string"!=typeof C)throw new q(`Cannot pass non-string to C++ string type ${g}`);var E=B(C),i=_A(4+E+I);return F[i>>2]=E>>D,Q(C,i+4,E+I),null!==A&&A.push(II,i),i},argPackAdvance:8,readValueFromPointer:lA,W(A){II(A)}})},D:(A,I)=>{f(A,{ta:!0,name:I=d(I),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},k:(A,I,g)=>(A=cA(A),I=fA(I,"emval::as"),rA(I,g,A)),p:(A,I,g,C)=>(A=XA[A])(null,I=cA(I),g,C),s:(A,I,g,C,Q)=>(A=XA[A])(I=cA(I),I[g=xA(g)],C,Q),a:KA,j:A=>0===A?LA(eA()):(A=xA(A),LA(eA()[A])),h:(A,I,g)=>{I=((A,I)=>{for(var g=Array(A),C=0;C>2],"parameter "+C);return g})(A,I);var C=I.shift();A--;var Q="return function (obj, func, destructorsRef, args) {\\n",B=0,E=[];0===g&&E.push("obj");for(var D=["retType"],i=[C],w=0;wA.name)).join(", ")}) => ${C.name}>`,(A=>{var I=XA.length;return XA.push(A),I})(AA(g,A))},i:(A,I)=>(A=cA(A),I=cA(I),LA(A[I])),f:A=>{4(A=cA(A))instanceof(I=cA(I)),F:A=>"number"==typeof(A=cA(A)),E:A=>"string"==typeof(A=cA(A)),w:()=>LA([]),l:A=>LA(xA(A)),v:()=>LA({}),d:A=>{var I=cA(A);JA(I),KA(A)},n:(A,I,g)=>{A=cA(A),I=cA(I),g=cA(g),A[I]=g},c:(A,I)=>(A=(A=fA(A,"_emval_take_value")).readValueFromPointer(I),LA(A)),q:()=>{c("")},A:(A,I,g)=>R.copyWithin(A,I,I+g),z:A=>{var I=R.length;if(2147483648<(A>>>=0))return!1;for(var g=1;4>=g;g*=2){var C=I*(1+.2/g);C=Math.min(C,A+100663296);var Q=Math;C=Math.max(A,C);A:{Q=(Q.min.call(Q,2147483648,C+(65536-C%65536)%65536)-i.buffer.byteLength+65535)/65536;try{i.grow(Q),y();var B=1;break A}catch(A){}B=void 0}if(B)return!0}return!1},y:(A,I)=>(zA(R.subarray(A,A+I)),0)},$A=function(){function A(A){return $A=A.exports,i=$A.I,y(),wA=$A.L,s.unshift($A.J),a--,C.monitorRunDependencies?.(a),0==a&&(null!==S&&(clearInterval(S),S=null),K&&(A=K,K=null,A())),$A}var I={a:vA};if(a++,C.monitorRunDependencies?.(a),C.instantiateWasm)try{return C.instantiateWasm(I,A)}catch(A){D(`Module.instantiateWasm callback failed with error: ${A}`),g(A)}return I=function(A){if(L==L&&E)var I=new Uint8Array(E);else{if(l(I=L)){I=atob(I.slice(37));for(var g=new Uint8Array(I.length),C=0;CModule));';class uc extends lc{initialize(A,g={},C=16){return hI(this,void 0,void 0,function*(){fg(typeof A=="object"&&A!==null,"First argument to initialize must be a valid AudioContext instance."),fg(typeof g=="object"&&g!==null,"The optional second argument to initialize must be an object."),typeof A._elemWorkletRegistry!="object"&&(A._elemWorkletRegistry={});const B=A._elemWorkletRegistry;if(!B.hasOwnProperty(gB)){const Q=new Blob([Rc,Nc],{type:"text/javascript"}),E=URL.createObjectURL(Q);if(!A.audioWorklet)throw new Error("BaseAudioContext.audioWorklet is missing; are you running in a secure context (https)?");yield A.audioWorklet.addModule(E),B[gB]=!0}return this._promiseMap=new Map,this._nextRequestId=0,this._worklet=new AudioWorkletNode(A,`ElementaryAudioWorkletProcessor@${gB}`,Object.assign({numberOfInputs:0,numberOfOutputs:1,outputChannelCount:[2]},g)),yield new Promise((Q,E)=>{this._worklet.port.onmessage=e=>{const[t,o]=e.data;if(t==="load")return this._renderer=new Dc(i=>hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("renderInstructions",{batch:i})})),Q(this._worklet),this.emit(t,o);if(t==="events")return o.forEach(i=>{this.emit(i.type,i.event)});if(t==="reply"){const{requestId:i,result:s}=o,{resolve:a,reject:c}=this._promiseMap.get(i);return this._promiseMap.delete(i),a(s)}},this._timer=window.setInterval(()=>{this._worklet.port.postMessage({requestType:"processQueuedEvents"})},C)})})}_sendWorkletRequest(A,g){fg(this._worklet,"Can't send request before worklet is ready. Have you initialized your WebRenderer instance?");let C=this._nextRequestId++;return this._worklet.port.postMessage({requestId:C,requestType:A,payload:g}),new Promise((B,Q)=>{this._promiseMap.set(C,{resolve:B,reject:Q})})}createRef(A,g,C){return this._renderer.createRef(A,g,C)}render(...A){return hI(this,void 0,void 0,function*(){const g=yield this._renderer.render(...A),{result:C}=g,B=hc(g,["result"]);return C.success?Promise.resolve(B):Promise.reject(C)})}updateVirtualFileSystem(A){return hI(this,void 0,void 0,function*(){return fg(typeof A=="object"&&A!==null,"Virtual file system must be an object mapping string type keys to Array|Float32Array type values"),Object.keys(A).forEach(function(C){const B=typeof A[C]=="object"&&(Array.isArray(A[C])||A[C]instanceof Float32Array);fg(B,"Virtual file system must be an object mapping string type keys to Array|Float32Array type values")}),yield this._sendWorkletRequest("updateSharedResourceMap",{resources:A})})}pruneVirtualFileSystem(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("pruneVirtualFileSystem",{})})}listVirtualFileSystem(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("listVirtualFileSystem",{})})}reset(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("reset",{})})}setCurrentTime(A){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("setCurrentTime",{time:A})})}setCurrentTimeMs(A){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("setCurrentTimeMs",{time:A})})}}function fc(I,A="ref"){const g=ZA({}),C=WI({}),B=WI({}),Q=WI({});let E=!1;for(let t in I){const o=I[t];for(let i in o){const s=o[i];g[t]=g[t]||{},g[t][i]=fI(s!=null&&s.nostore?s.value:XI(`${A}:${t}_${i}`,s.value),s.min,s.max),!(s!=null&&s.hidden)&&(Q[t]=Q[t]||{},Q[t][i]=s)}}function e(t){for(let o in I){const i=I[o];for(let s in i){let[a,c]=t.createRef("const",{value:g[o][s]},[]);C[o]=C[o]||{},C[o][s]=r.smooth(r.tau2pole(.01),a),B[o]=B[o]||{},B[o][s]=c}}E=!0}return AI(g,()=>{if(E)for(let t in g){const o=I[t];for(let i in o)B[t][i]({value:g[t][i]})}},{deep:!0}),{controls:g,cv:C,setters:B,groups:Q,initRefs:e}}const IC=["gate","midi","vel"];function dc(I=6){const A=ZA(Array(I).fill(null).map(()=>Object.fromEntries(IC.map(a=>[a,{value:0,ref:null,setter:null}])))),g=oA(!1);function C(a){for(let c in A)for(let N in IC){const M=IC[N],[d,m]=a.createRef("const",{value:A[c][M].value},[]);A[c][M].ref=r.smooth(r.tau2pole(.001),d),A[c][M].setter=m}g.value=!0}const B=oA(0);function Q(a,c){if(c>0){const N=s(B);E(N,{gate:1,midi:a,vel:c})}else e(A,a)}function E(a,c){if(!g.value)return;const N=A[a];Object.entries(c).forEach(([M,d])=>{var m,b;M in N&&d!==void 0&&(N[M].value=d,(b=(m=N[M]).setter)==null||b.call(m,{value:d}))})}function e(a,c){a.forEach((N,M)=>{N.midi.value===c&&E(M,{gate:0})})}function t(){A.forEach((a,c)=>E(c,{gate:0}))}function o(a){return Object.fromEntries(IC.map(c=>[c,i(a,c)]))}function i(a,c){return r.meter({name:`synth-voice-${a}-${c}`},A[a][c].ref||r.const({value:A[a][c].value}))}function s(a){const c=a.value;let N=c;do{if(A[N].gate.value===0)return a.value=(N+1)%A.length,N;N=(N+1)%A.length}while(N!==c);return a.value=(c+1)%A.length,c}return{voices:A,initVoices:C,updateVoice:E,cycleNote:Q,stopAll:t,getVoiceParams:o}}const yc=41,Mc=42,Gc=43,Fc=44,Uc=45,mc=46,Sc=47,Yc=48,Jc=49,kc=50,Kc=51,pc=52,bc=53,Lc=54,Tc=55,Hc=56,Vc=57,Zc=58,vc=59,Oc=60,xc=24,qc=25,Wc=26,jc=27,Pc=28,Xc=29,zc=30,_c=31,$c=32,AD=33,ID=34,gD=35,CD=36,BD=37,QD=38,ED=39,eD=40,gC={KeyQ:yc,Digit2:Mc,KeyW:Gc,Digit3:Fc,KeyE:Uc,Digit4:mc,KeyR:Sc,KeyT:Yc,Digit6:Jc,KeyY:kc,Digit7:Kc,KeyU:pc,KeyI:bc,Digit9:Lc,KeyO:Tc,Digit0:Hc,KeyP:Vc,Minus:Zc,BracketLeft:vc,BracketRIght:Oc,KeyZ:xc,KeyS:qc,KeyX:Wc,KeyD:jc,KeyC:Pc,KeyV:Xc,KeyG:zc,KeyB:_c,KeyH:$c,KeyN:AD,KeyJ:ID,KeyM:gD,Comma:CD,KeyL:BD,Period:QD,Semicolon:ED,Slash:eD},tD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},shape:{value:.2,min:0,max:1,step:.01},vibdep:{value:.1,min:0,max:.5,step:.01,fixed:2},vibrate:{value:2,min:1,max:8,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function iD({gate:I,midi:A,vel:g},C,B){const Q=xg(r.add(A,r.mul(C.vibdep,r.cycle(r.mul(C.vibrate,r.div(B,60)))))),E=r.blepsquare(Q),e=r.blepsaw(Q);let t=r.div(15,B);const o=r.adsr(r.mul(C.attack,t),r.mul(C.decay,t),C.sustain,r.mul(C.release,t),I),i=r.adsr(r.mul(C.fattack,t),r.mul(C.fdecay,t),C.fsustain,r.mul(C.frelease,t),I),s=r.mul(o,r.add(r.mul(r.cos(r.mul(C.shape,Math.PI/2)),E),r.mul(r.sin(r.mul(C.shape,Math.PI/2)),e))),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,i))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s);return r.tanh(r.mul(C.on,C.gain,g,c))}const St=[[1,1,1,1,1,1,1,1],[1,-1,1,-1,1,-1,1,-1],[1,1,-1,-1,1,1,-1,-1],[1,-1,-1,1,1,-1,-1,1],[1,1,1,1,-1,-1,-1,-1],[1,-1,1,-1,-1,1,-1,1],[1,1,-1,-1,-1,-1,1,1],[1,-1,-1,1,-1,1,1,-1]];function CB(I,...A){const g=A.length,C=Math.sqrt(1/g),B=A.map(function(Q,E){const e=I*((E+1)/g);return r.sdelay({size:e},Q)});return St.map(function(Q,E){return r.add(...Q.map(function(e,t){return r.mul(e*C,B[t])}))})}function lE(I,A,g,C,B,...Q){const E=Q.length,e=Math.sqrt(1/E),t=r.mul(B,.02);if(E!==8)throw new Error("Invalid FDN step!");const o=Q.map(function(s,a){return r.add(s,r.mul(C,r.smooth(.105,r.tapIn({name:`${I}:fdn${a}`}))))});return St.map(function(s,a){return r.add(...s.map(function(c,N){return r.mul(c*e,o[N])}))}).map(function(s,a){const c=(m,b,R)=>r.add(m,r.mul(R,r.cycle(b))),N=m=>A*(m/1e3),M=r.mul(r.add(1,r.mul(3,g)),N((a+1)*17)),d=c(M,r.add(.1,r.mul(a,t)),N(2.5));return r.tapOut({name:`${I}:fdn${a}`},r.delay({size:N(750)},d,0,s))})}function oD(I,A,g){const C=I.key,B=I.sampleRate,Q=r.sm(I.size),E=r.sm(I.decay),e=r.sm(I.mod),t=r.sm(I.mix),o=r.mul(.5,r.add(A,g)),i=r.mul(.5,r.sub(A,g)),s=[A,g,o,i],a=[...s,...s.map(Z=>r.mul(-1,Z))],c=Z=>B*(Z/1e3),N=CB(c(43),...a),M=CB(c(97),...N),d=CB(c(117),...M),m=lE(`${C}:d4`,B,Q,.004,e,...d),b=lE(`${C}:r0`,B,Q,E,e,...m),R=r.mul(.25,r.add(b[0],b[2],b[4],b[6])),w=r.mul(.25,r.add(b[1],b[3],b[5],b[7]));return[r.select(t,R,A),r.select(t,w,g)]}const sD={on:{value:1,min:0,max:1,step:1,hidden:!0},size:{value:.2,min:0,max:1,step:.01},decay:{value:.5,min:0,max:1,step:.01},mod:{value:.5,min:0,max:1,step:.01},mix:{value:.5,min:0,max:1,step:.01}},nD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.1,min:0,max:1,step:.01},feedback:{value:.1,min:0,max:1,step:.01},shift:{value:.4,min:0,max:1,step:.01}};function rD([I,A],g,C){return[0,1].map(B=>r.add(B&&A||I,r.mul(g.on,g.gain,r.delay({size:44100},r.ms2samps(r.mul(r.div(6e4,C),r.add(1,r.mul(B===0?-.5:.5,g.shift)))),g.feedback,B&&A||I))))}const aD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},color:{value:0,min:0,max:1,step:.001},bandq:{value:5,min:0,max:10,step:.1},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function lD({gate:I,midi:A,vel:g},C,B){let Q=r.div(15,B);const E=r.adsr(r.mul(C.attack,Q),r.mul(C.decay,Q),C.sustain,r.mul(C.release,Q),I),e=r.adsr(r.mul(C.fattack,Q),r.mul(C.fdecay,Q),C.fsustain,r.mul(C.frelease,Q),I),t=r.cos(r.mul(C.color,Math.PI/2)),o=r.sin(r.mul(C.color,Math.PI/2)),i=r.add(r.mul(t,r.noise()),r.mul(o,r.pinknoise())),s=r.bandpass(xg(A),C.bandq,i),a=r.max(20,r.min(2e4,r.add(C.cutoff,r.mul(r.mul(C.fenv,2e4),e)))),c=r.lowpass(a,C.cutq,s);return r.tanh(r.mul(C.on,C.gain,g,E,c))}const cD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},noise:{value:.95,min:0,max:2,step:.01,fixed:2},feedback:{value:.95,min:.8,max:.99,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},bandq:{value:1,min:0,max:50,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function DD({gate:I,midi:A,vel:g},C,B){const Q=xg(A);let E=r.div(15,B);const e=r.adsr(r.mul(C.attack,E),r.mul(C.decay,E),C.sustain,r.mul(C.release,E),I),t=r.adsr(r.mul(C.fattack,E),r.mul(C.fdecay,E),C.fsustain,r.mul(C.frelease,E),I),o=r.div(r.sr(),Q),i=r.mul(e,r.noise(),C.noise),s=r.bandpass(Q,C.bandq,i),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,t))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s),N=r.delay({size:44100},o,C.feedback,c);return r.mul(C.on,C.gain,g,r.tanh(N))}const hD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0}};function wD({gate:I,midi:A,vel:g},C,B){const Q=xg(A);let E=r.div(15,B);const e=r.adsr(r.mul(C.attack,E),r.mul(C.decay,E),C.sustain,r.mul(C.release,E),I),t=r.sample({path:"piano"},I,r.div(Q,440)),o=r.mul(t,g,e,C.on,C.gain);return r.mul(48,r.compress(10,100,-48,2,o,o))}const ND={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},shape:{value:.2,min:0,max:1,step:.01},vibdep:{value:.1,min:0,max:.5,step:.01,fixed:2},vibrate:{value:2,min:1,max:8,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function RD({gate:I,midi:A,vel:g},C,B){const Q=xg(r.add(A,r.mul(C.vibdep,r.cycle(r.mul(C.vibrate,r.div(B,60)))))),E=r.cycle(Q),e=r.triangle(Q);let t=r.div(15,B);const o=r.adsr(r.mul(C.attack,t),r.mul(C.decay,t),C.sustain,r.mul(C.release,t),I),i=r.adsr(r.mul(C.fattack,t),r.mul(C.fdecay,t),C.fsustain,r.mul(C.frelease,t),I),s=r.mul(o,r.add(r.mul(r.cos(r.mul(C.shape,Math.PI/2)),E),r.mul(r.sin(r.mul(C.shape,Math.PI/2)),e))),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,i))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s);return r.tanh(r.mul(C.on,C.gain,g,c))}const cE={synth:{bpm:{value:120,min:10,max:500,step:1},vol:{value:.5,min:0,max:1,step:.01}},round:ND,fat:tD,noise:aD,string:cD,sampler:hD,srvb:sD,pingpong:nD},xg=I=>r.mul(440,r.pow(2,r.smooth(r.tau2pole(.001),r.div(r.sub(I,69),12))));class BI{constructor(A=!1){this.eventMap={},this.eventsSuspended=A==!0}addListener(A,g,C={}){if(typeof A=="string"&&A.length<1||A instanceof String&&A.length<1||typeof A!="string"&&!(A instanceof String)&&A!==BI.ANY_EVENT)throw new TypeError("The 'event' parameter must be a string or EventEmitter.ANY_EVENT.");if(typeof g!="function")throw new TypeError("The callback must be a function.");const B=new DE(A,this,g,C);return this.eventMap[A]||(this.eventMap[A]=[]),C.prepend?this.eventMap[A].unshift(B):this.eventMap[A].push(B),B}addOneTimeListener(A,g,C={}){C.remaining=1,this.addListener(A,g,C)}static get ANY_EVENT(){return Symbol.for("Any event")}hasListener(A,g){return A===void 0?this.eventMap[BI.ANY_EVENT]&&this.eventMap[BI.ANY_EVENT].length>0?!0:Object.entries(this.eventMap).some(([,C])=>C.length>0):this.eventMap[A]&&this.eventMap[A].length>0?g instanceof DE?this.eventMap[A].filter(B=>B===g).length>0:typeof g=="function"?this.eventMap[A].filter(B=>B.callback===g).length>0:g==null:!1}get eventNames(){return Object.keys(this.eventMap)}getListeners(A){return this.eventMap[A]||[]}suspendEvent(A){this.getListeners(A).forEach(g=>{g.suspended=!0})}unsuspendEvent(A){this.getListeners(A).forEach(g=>{g.suspended=!1})}getListenerCount(A){return this.getListeners(A).length}emit(A,...g){if(typeof A!="string"&&!(A instanceof String))throw new TypeError("The 'event' parameter must be a string.");if(this.eventsSuspended)return;let C=[],B=this.eventMap[BI.ANY_EVENT]||[];return this.eventMap[A]&&(B=B.concat(this.eventMap[A])),B.forEach(Q=>{if(Q.suspended)return;let E=[...g];Array.isArray(Q.arguments)&&(E=E.concat(Q.arguments)),Q.remaining>0&&(C.push(Q.callback.apply(Q.context,E)),Q.count++),--Q.remaining<1&&Q.remove()}),C}removeListener(A,g,C={}){if(A===void 0){this.eventMap={};return}else if(!this.eventMap[A])return;let B=this.eventMap[A].filter(Q=>g&&Q.callback!==g||C.remaining&&C.remaining!==Q.remaining||C.context&&C.context!==Q.context);B.length?this.eventMap[A]=B:delete this.eventMap[A]}async waitFor(A,g={}){return g.duration=parseInt(g.duration),(isNaN(g.duration)||g.duration<=0)&&(g.duration=1/0),new Promise((C,B)=>{let Q,E=this.addListener(A,()=>{clearTimeout(Q),C()},{remaining:1});g.duration!==1/0&&(Q=setTimeout(()=>{E.remove(),B("The duration expired before the event was emitted.")},g.duration))})}get eventCount(){return Object.keys(this.eventMap).length}}class DE{constructor(A,g,C,B={}){if(typeof A!="string"&&!(A instanceof String)&&A!==BI.ANY_EVENT)throw new TypeError("The 'event' parameter must be a string or EventEmitter.ANY_EVENT.");if(!g)throw new ReferenceError("The 'target' parameter is mandatory.");if(typeof C!="function")throw new TypeError("The 'callback' must be a function.");B.arguments!==void 0&&!Array.isArray(B.arguments)&&(B.arguments=[B.arguments]),B=Object.assign({context:g,remaining:1/0,arguments:void 0,duration:1/0},B),B.duration!==1/0&&setTimeout(()=>this.remove(),B.duration),this.arguments=B.arguments,this.callback=C,this.context=B.context,this.count=0,this.event=A,this.remaining=parseInt(B.remaining)>=1?parseInt(B.remaining):1/0,this.suspended=!1,this.target=g}remove(){this.target.removeListener(this.event,this.callback,{context:this.context,remaining:this.remaining})}}/** +`,2,2).path),e=oA(),t=oA(),o=oA(),i=oA(),s=U(g),a=U(C),c=U(B,.01),N=U(Q),M={wheel:{preventWindowScrollY:!0},eventOptions:{capture:!1,passive:!1}};uI({onDrag:s,onWheel:s},{...M,domTarget:e}),uI({onDrag:a,onWheel:a},{...M,domTarget:t}),uI({onDrag:c,onWheel:c},{...M,domTarget:o}),uI({onDrag:N,onWheel:N},{...M,domTarget:i});const d=oA(!1);function U(b,R=.1){return function(Z){const{delta:[sA,DA],dragging:hA,wheeling:vA,shiftKey:P,event:O}=Z;if(O&&O.preventDefault(),d.value=hA||vA,!d.value)return;const wA=P?12:O.type==="wheel"?-8:2;let PA=DA/wA-sA/wA;b.value+=-PA*R}}return(b,R)=>(z(),IA("svg",{class:"min-w-45 max-w-55 m-1 touch-none",ref:"knob",version:"1.1",baseProfile:"full",viewBox:`${-I.pad} ${-I.pad*2} ${I.width+I.pad*2} ${I.height+I.pad*3}`,xmlns:"http://www.w3.org/2000/svg"},[F("rect",{width:I.width+I.pad*2,height:I.height+I.pad*2,rx:"2",transform:`translate(${-I.pad} ${-I.pad})`,fill:"transparent"},null,8,ar),F("text",{"text-anchor":"start","font-size":I.pad*1.4,"dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${-I.pad})`},EA(I.title),9,lr),F("g",{class:"numbers","text-anchor":"middle","font-size":"5","dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${I.height*.25})`},[F("text",{x:I.width/8},EA(g.value.toFixed(2)),9,Dr),F("text",{x:3*I.width/8},EA(C.value.toFixed(2)),9,hr),F("text",{x:5*I.width/8},EA(B.value.toFixed(2)),9,wr),F("text",{x:7*I.width/8},EA(Q.value.toFixed(2)),9,Nr)],8,cr),F("g",{class:"titles","text-anchor":"middle","font-size":"4","dominant-baseline":"middle",fill:"currentColor",transform:`translate(0 ${I.height*.75})`},[F("text",{x:I.width/8},"ATT",8,ur),F("text",{x:3*I.width/8},"DEC",8,fr),F("text",{x:5*I.width/8},"SUS",8,dr),F("text",{x:7*I.width/8},"REL",8,yr)],8,Rr),F("path",{fill:"currentColor","fill-opacity":"0.2",stroke:"currentColor",d:E.value,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":d.value?1:.5},null,8,Mr),F("g",Gr,[F("line",{x2:I.width/4,transform:`translate(${0*I.width/4} ${I.height*(1-g.value/10)})`},null,8,Fr),F("line",{x2:I.width/4,transform:`translate(${1*I.width/4} ${I.height*(1-C.value/10)})`},null,8,Ur),F("line",{x2:I.width/4,transform:`translate(${2*I.width/4} ${I.height*(1-B.value)})`},null,8,mr),F("line",{x2:I.width/4,transform:`translate(${3*I.width/4} ${I.height*(1-Q.value/10)})`},null,8,Sr)]),F("g",Yr,[F("rect",{ref_key:"attPan",ref:e,width:I.width/4,height:I.height},null,8,Jr),F("rect",{ref_key:"decPan",ref:t,width:I.width/4,height:I.height,transform:`translate(${I.width/4} 0)`},null,8,kr),F("rect",{ref_key:"susPan",ref:o,width:I.width/4,height:I.height,transform:`translate(${I.width/2} 0)`},null,8,Kr),F("rect",{ref_key:"relPan",ref:i,width:I.width/4,height:I.height,transform:`translate(${3*I.width/4} 0)`},null,8,pr)])],8,rr))}};function _B(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}var br=function(A,g,C,B){var Q=C?C.call(B,A,g):void 0;if(Q!==void 0)return!!Q;if(A===g)return!0;if(typeof A!="object"||!A||typeof g!="object"||!g)return!1;var E=Object.keys(A),e=Object.keys(g);if(E.length!==e.length)return!1;for(var t=Object.prototype.hasOwnProperty.bind(g),o=0;oA in I?It(I,A,{enumerable:!0,configurable:!0,writable:!0,value:g}):I[A]=g,cA=(I,A)=>{for(var g in A||(A={}))qr.call(A,g)&&oE(I,g,A[g]);if(iE)for(var g of iE(A))Wr.call(A,g)&&oE(I,g,A[g]);return I},jr=(I,A)=>Or(I,xr(A)),cI=(I,A)=>{for(var g in A)It(I,g,{get:A[g],enumerable:!0})},$B={};cI($B,{_1:()=>gt,_2:()=>Ct,_3:()=>Qt,_4:()=>Et,_5:()=>et,_6:()=>tt,_7:()=>it,_8:()=>ot,__1:()=>AQ,__2:()=>Bt,__3:()=>Pr,__4:()=>Xr,__5:()=>zr,__6:()=>_r,__7:()=>$r,__8:()=>Aa,app:()=>_});function sE(I,A,g){for(var C=new Array(g),B=0,Q=A;B=0)return function(t,o){return function(i){return _(t,o.concat([i]))}}(C,g);A=sE(g,Q,-e|0),I=C.apply(null,sE(g,0,Q))}}function gt(I,A){var g=I.length;if(g===1)return I(A);switch(g){case 1:return I(A);case 2:return function(C){return I(A,C)};case 3:return function(C,B){return I(A,C,B)};case 4:return function(C,B,Q){return I(A,C,B,Q)};case 5:return function(C,B,Q,E){return I(A,C,B,Q,E)};case 6:return function(C,B,Q,E,e){return I(A,C,B,Q,E,e)};case 7:return function(C,B,Q,E,e,t){return I(A,C,B,Q,E,e,t)};default:return _(I,[A])}}function AQ(I){var A=I.length;return A===1?I:function(g){return gt(I,g)}}function Ct(I,A,g){var C=I.length;if(C===2)return I(A,g);switch(C){case 1:return _(I(A),[g]);case 2:return I(A,g);case 3:return function(B){return I(A,g,B)};case 4:return function(B,Q){return I(A,g,B,Q)};case 5:return function(B,Q,E){return I(A,g,B,Q,E)};case 6:return function(B,Q,E,e){return I(A,g,B,Q,E,e)};case 7:return function(B,Q,E,e,t){return I(A,g,B,Q,E,e,t)};default:return _(I,[A,g])}}function Bt(I){var A=I.length;return A===2?I:function(g,C){return Ct(I,g,C)}}function Qt(I,A,g,C){var B=I.length;if(B===3)return I(A,g,C);switch(B){case 1:return _(I(A),[g,C]);case 2:return _(I(A,g),[C]);case 3:return I(A,g,C);case 4:return function(Q){return I(A,g,C,Q)};case 5:return function(Q,E){return I(A,g,C,Q,E)};case 6:return function(Q,E,e){return I(A,g,C,Q,E,e)};case 7:return function(Q,E,e,t){return I(A,g,C,Q,E,e,t)};default:return _(I,[A,g,C])}}function Pr(I){var A=I.length;return A===3?I:function(g,C,B){return Qt(I,g,C,B)}}function Et(I,A,g,C,B){var Q=I.length;if(Q===4)return I(A,g,C,B);switch(Q){case 1:return _(I(A),[g,C,B]);case 2:return _(I(A,g),[C,B]);case 3:return _(I(A,g,C),[B]);case 4:return I(A,g,C,B);case 5:return function(E){return I(A,g,C,B,E)};case 6:return function(E,e){return I(A,g,C,B,E,e)};case 7:return function(E,e,t){return I(A,g,C,B,E,e,t)};default:return _(I,[A,g,C,B])}}function Xr(I){var A=I.length;return A===4?I:function(g,C,B,Q){return Et(I,g,C,B,Q)}}function et(I,A,g,C,B,Q){var E=I.length;if(E===5)return I(A,g,C,B,Q);switch(E){case 1:return _(I(A),[g,C,B,Q]);case 2:return _(I(A,g),[C,B,Q]);case 3:return _(I(A,g,C),[B,Q]);case 4:return _(I(A,g,C,B),[Q]);case 5:return I(A,g,C,B,Q);case 6:return function(e){return I(A,g,C,B,Q,e)};case 7:return function(e,t){return I(A,g,C,B,Q,e,t)};default:return _(I,[A,g,C,B,Q])}}function zr(I){var A=I.length;return A===5?I:function(g,C,B,Q,E){return et(I,g,C,B,Q,E)}}function tt(I,A,g,C,B,Q,E){var e=I.length;if(e===6)return I(A,g,C,B,Q,E);switch(e){case 1:return _(I(A),[g,C,B,Q,E]);case 2:return _(I(A,g),[C,B,Q,E]);case 3:return _(I(A,g,C),[B,Q,E]);case 4:return _(I(A,g,C,B),[Q,E]);case 5:return _(I(A,g,C,B,Q),[E]);case 6:return I(A,g,C,B,Q,E);case 7:return function(t){return I(A,g,C,B,Q,E,t)};default:return _(I,[A,g,C,B,Q,E])}}function _r(I){var A=I.length;return A===6?I:function(g,C,B,Q,E,e){return tt(I,g,C,B,Q,E,e)}}function it(I,A,g,C,B,Q,E,e){var t=I.length;if(t===7)return I(A,g,C,B,Q,E,e);switch(t){case 1:return _(I(A),[g,C,B,Q,E,e]);case 2:return _(I(A,g),[C,B,Q,E,e]);case 3:return _(I(A,g,C),[B,Q,E,e]);case 4:return _(I(A,g,C,B),[Q,E,e]);case 5:return _(I(A,g,C,B,Q),[E,e]);case 6:return _(I(A,g,C,B,Q,E),[e]);case 7:return I(A,g,C,B,Q,E,e);default:return _(I,[A,g,C,B,Q,E,e])}}function $r(I){var A=I.length;return A===7?I:function(g,C,B,Q,E,e,t){return it(I,g,C,B,Q,E,e,t)}}function ot(I,A,g,C,B,Q,E,e,t){var o=I.length;if(o===8)return I(A,g,C,B,Q,E,e,t);switch(o){case 1:return _(I(A),[g,C,B,Q,E,e,t]);case 2:return _(I(A,g),[C,B,Q,E,e,t]);case 3:return _(I(A,g,C),[B,Q,E,e,t]);case 4:return _(I(A,g,C,B),[Q,E,e,t]);case 5:return _(I(A,g,C,B,Q),[E,e,t]);case 6:return _(I(A,g,C,B,Q,E),[e,t]);case 7:return _(I(A,g,C,B,Q,E,e),[t]);default:return _(I,[A,g,C,B,Q,E,e,t])}}function Aa(I){var A=I.length;return A===8?I:function(g,C,B,Q,E,e,t,o){return ot(I,g,C,B,Q,E,e,t,o)}}var st={};cI(st,{$$Map:()=>Ra,$$Set:()=>ua,RenderDelegate:()=>fa,mount:()=>Rt,renderWithDelegate:()=>da,stepGarbageCollector:()=>ya,visit:()=>ut});var nt={};cI(nt,{create:()=>wt,isNode:()=>wa,shallowCopy:()=>Nt,symbol:()=>IQ});function nE(I){var A=typeof I;return A==="undefined"?3:I===null?2:A==="number"?{TAG:0,_0:I}:A==="bigint"?{TAG:5,_0:I}:A==="string"?{TAG:1,_0:I}:A==="boolean"?I===!0?1:0:A==="symbol"?{TAG:4,_0:I}:A==="function"?{TAG:2,_0:I}:{TAG:3,_0:I}}function Ia(I,A){switch(A){case 0:return typeof I>"u";case 1:return I===null;case 2:return typeof I=="boolean";case 3:return typeof I=="number";case 4:return typeof I=="string";case 5:return typeof I=="function";case 6:return typeof I=="object";case 7:return typeof I=="symbol";case 8:return typeof I=="bigint"}}function ga(I){return I===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:I!==null&&I.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:I.BS_PRIVATE_NESTED_SOME_NONE+1|0}:I}function Ca(I){if(!(I!==null&&I.BS_PRIVATE_NESTED_SOME_NONE!==void 0))return I;var A=I.BS_PRIVATE_NESTED_SOME_NONE;if(A!==0)return{BS_PRIVATE_NESTED_SOME_NONE:A-1|0}}function Ba(I,A){return{hd:A,tl:I}}function Qa(I,A){for(;;){var g=A,C=I;if(!C)return g;var B={hd:C.hd,tl:0};g.tl=B,A=B,I=C.tl}}function Ea(I,A,g){for(;;){var C=A,B=I;if(!B)return;var Q={hd:g(B.hd),tl:0};C.tl=Q,A=Q,I=B.tl}}function ea(I,A,g,C){for(;;){var B=C,Q=g,E=A;if(!Q)return;var e={hd:I(E,Q.hd),tl:0};B.tl=e,C=e,g=Q.tl,A=E+1|0}}function ta(I,A){if(!I)return A;var g={hd:I.hd,tl:0};return Qa(I.tl,g).tl=A,g}function ia(I,A){if(!I)return 0;var g={hd:A(I.hd),tl:0};return Ea(I.tl,g,A),g}function rt(I,A){return ia(I,AQ(A))}function oa(I,A){if(!I)return 0;var g={hd:A(0,I.hd),tl:0};return ea(A,1,I.tl,g),g}function sa(I,A){return oa(I,Bt(A))}function at(I){for(var A=I,g=0;;){var C=g,B=A;if(!B)return C;g=C+1|0,A=B.tl}}function na(I,A,g){for(;;){var C=g,B=A;if(!C)return;I[B]=C.hd,g=C.tl,A=B+1|0}}function lt(I){for(var A=I.length-1|0,g=0;;){var C=g,B=A;if(B<0)return C;g={hd:I[B],tl:C},A=B-1|0}}function ra(I){var A=at(I),g=new Array(A);return na(g,0,I),g}function aa(I,A){for(;;){var g=I;if(!g)return;A(g.hd),I=g.tl}}function ct(I,A){aa(I,AQ(A))}function la(I,A,g){for(;;){var C=A,B=I;if(!B)return C;A=g(C,B.hd),I=B.tl}}function Dt(I,A,g,C){for(let B in C)if(C.hasOwnProperty(B)){const Q=C[B];(!g.hasOwnProperty(B)||!Lr(g[B],Q))&&((typeof Q>"u"||Q===null||typeof Q=="number"&&isNaN(Q)||typeof Q=="number"&&!isFinite(Q))&&console.warn(`Warning: applying a potentially erroneous property value. ${B}: ${Q}`),I.setProperty(A,B,Q),g[B]=Q)}}function ca(I,A){if(A in I)return ga(I[A])}function Da(I){if(I!==void 0)return Ca(I);throw new Error("getExn")}function rE(I,A,g,C){Dt(I,A,g,C)}function ht(I,A){return Math.imul(I^A,16777619)}function IB(I,A){for(var g=I,C=0,B=A.length;C<=B;++C)g=ht(g,A.charCodeAt(C)|0);return g}function ha(I,A,g){var C=IB(-2128831035,I),B=ca(A,"key"),Q=B!==void 0&&Ia(B,4)?IB(C,B):IB(C,Da(JSON.stringify(A)));return la(g,Q,ht)&2147483647}var IQ="__ELEM_NODE__";function wt(I,A,g){var C=lt(g),B=rt(C,function(Q){return Q.hash});return{symbol:IQ,hash:ha(I,A,B),kind:I,props:A,children:C}}function wa(I){var A=nE(I);if(typeof A=="number"||A.TAG!==3)return!1;var g=nE(I.symbol);return typeof g=="number"||g.TAG!==1?!1:g._0===IQ}function Nt(I){return{symbol:I.symbol,hash:I.hash,kind:I.kind,props:Object.assign({},I.props),generation:{contents:0}}}function Na(I){return Array.from(I.values())}var Ra={valuesArray:Na},ua={},fa={};function Rt(I,A){var g=I.getNodeMap();if(g.has(A.hash)){var C=g.get(A.hash);rE(I,C.hash,C.props,A.props),C.generation.contents=0;return}I.createNode(A.hash,A.kind),rE(I,A.hash,{},A.props),ct(A.children,function(B){I.appendChild(A.hash,B.hash)}),g.set(A.hash,Nt(A))}function ut(I,A,g){for(;;){var C=g,B=function(e){A.add(e.hash)};if(!C)return;var Q=C.tl,E=C.hd;if(A.has(E.hash)){g=Q;continue}B(E),Rt(I,E),g=ta(E.children,Q)}}function da(I,A){var g=new Set,C=sa(lt(A),function(B,Q){return wt("root",{channel:B},[Q])});ut(I,g,C),I.activateRoots(ra(rt(C,function(B){return B.hash}))),I.commitUpdates()}function ya(I){var A=I.getNodeMap(),g=I.getTerminalGeneration(),C=Array.from(A.values()).reduce(function(B,Q){return Q.generation.contents=Q.generation.contents+1|0,Q.generation.contents>=g?(I.deleteNode(Q.hash),Ba(B,Q)):B},0);if(at(C)>0)return I.commitUpdates(),ct(C,function(B){A.delete(B.hash)})}var Ma=$B,ft=st,Ga=function(I,A){return Ma._2(ft.renderWithDelegate,I,A)};ft.stepGarbageCollector;var Fa=$B,gQ=nt,dt=function(I,A,g){return Fa._3(gQ.create,I,A,g)},Ua=gQ.isNode;gQ.shallowCopy;function D(I){return typeof I=="number"?dt("const",{value:I},[]):(Vr(L(I),`Whoops, expecting a Node type here! Got: ${typeof I}`),I)}function L(I){return Ua(I)}function f(I,A,g){return dt(I,A,g.map(D))}var _I={};cI(_I,{accum:()=>Ja,biquad:()=>Ql,capture:()=>nl,constant:()=>yt,convolve:()=>va,counter:()=>Ya,delay:()=>$a,env:()=>za,fft:()=>sl,latch:()=>pa,maxhold:()=>ba,meter:()=>tl,metro:()=>Ha,mm1p:()=>gl,once:()=>La,phasor:()=>ka,pole:()=>Xa,prewarp:()=>Il,rand:()=>Ta,sample:()=>Va,sampleseq:()=>ja,sampleseq2:()=>Pa,scope:()=>ol,sdelay:()=>Al,seq:()=>Oa,seq2:()=>xa,snapshot:()=>il,sparseq:()=>qa,sparseq2:()=>Wa,sr:()=>ma,svf:()=>Cl,svfshelf:()=>Bl,syncphasor:()=>Ka,table:()=>Za,tapIn:()=>El,tapOut:()=>el,time:()=>Sa,z:()=>_a});function yt(I){return f("const",I,[])}function ma(){return f("sr",{},[])}function Sa(){return f("time",{},[])}function Ya(I,A){return typeof I=="number"||L(I)?f("counter",{},[D(I)]):f("counter",I,[D(A)])}function Ja(I,A,g){return typeof I=="number"||L(I)?f("accum",{},[D(I),D(A)]):f("accum",I,[D(A),D(g)])}function ka(I,A){return typeof I=="number"||L(I)?f("phasor",{},[D(I)]):f("phasor",I,[D(A)])}function Ka(I,A,g){return typeof I=="number"||L(I)?f("sphasor",{},[D(I),D(A)]):f("sphasor",I,[D(A),D(g)])}function pa(I,A,g){return typeof I=="number"||L(I)?f("latch",{},[D(I),D(A)]):f("latch",I,[D(A),D(g)])}function ba(I,A,g){return typeof I=="number"||L(I)?f("maxhold",{},[D(I),D(A)]):f("maxhold",I,[D(A),D(g)])}function La(I,A){return typeof I=="number"||L(I)?f("once",{},[D(I)]):f("once",I,[D(A)])}function Ta(I){return typeof I<"u"?f("rand",I,[]):f("rand",{},[])}function Ha(I){return typeof I<"u"?f("metro",I,[]):f("metro",{},[])}function Va(I,A,g){return f("sample",I,[D(A),D(g)])}function Za(I,A){return f("table",I,[D(A)])}function va(I,A){return f("convolve",I,[D(A)])}function Oa(I,A,g){return f("seq",I,[D(A),D(g)])}function xa(I,A,g){return f("seq2",I,[D(A),D(g)])}function qa(I,A,g){return f("sparseq",I,[D(A),D(g)])}function Wa(I,A){return f("sparseq2",I,[D(A)])}function ja(I,A){return f("sampleseq",I,[D(A)])}function Pa(I,A){return f("sampleseq2",I,[D(A)])}function Xa(I,A,g){return typeof I=="number"||L(I)?f("pole",{},[D(I),D(A)]):f("pole",I,[D(A),D(g)])}function za(I,A,g,C){return typeof I=="number"||L(I)?f("env",{},[D(I),D(A),D(g)]):f("env",I,[D(A),D(g),D(C)])}function _a(I,A){return typeof I=="number"||L(I)?f("z",{},[D(I)]):f("z",I,[D(A)])}function $a(I,A,g,C){return typeof I=="number"||L(I)?f("delay",{},[D(I),D(A),D(g)]):f("delay",I,[D(A),D(g),D(C)])}function Al(I,A){return f("sdelay",I,[D(A)])}function Il(I){return f("prewarp",{},[I])}function gl(I,A,g){return typeof I=="number"||L(I)?f("mm1p",{},[D(I),D(A)]):f("mm1p",I,[D(A),D(g)])}function Cl(I,A,g,C){return typeof I=="number"||L(I)?f("svf",{},[D(I),D(A),D(g)]):f("svf",I,[D(A),D(g),D(C)])}function Bl(I,A,g,C,B){return typeof I=="number"||L(I)?f("svfshelf",{},[D(I),D(A),D(g),D(C)]):f("svfshelf",I,[D(A),D(g),D(C),D(B)])}function Ql(I,A,g,C,B,Q,E){return typeof I=="number"||L(I)?f("biquad",{},[D(I),D(A),D(g),D(C),D(B),D(Q)]):f("biquad",I,[D(A),D(g),D(C),D(B),D(Q),D(E)])}function El(I){return f("tapIn",I,[])}function el(I,A){return f("tapOut",I,[D(A)])}function tl(I,A){return typeof I=="number"||L(I)?f("meter",{},[D(I)]):f("meter",I,[D(A)])}function il(I,A,g){return typeof I=="number"||L(I)?f("snapshot",{},[D(I),D(A)]):f("snapshot",I,[D(A),D(g)])}function ol(I,...A){return typeof I=="number"||L(I)?f("scope",{},[I,...A].map(D)):f("scope",I,A.map(D))}function sl(I,A){return typeof I=="number"||L(I)?f("fft",{},[D(I)]):f("fft",I,[D(A)])}function nl(I,A,g){return typeof I=="number"||L(I)?f("capture",{},[D(I),D(A)]):f("capture",I,[D(A),D(g)])}var Mt={};cI(Mt,{compress:()=>Wl,skcompress:()=>jl});var $I={};cI($I,{abs:()=>Ml,add:()=>Kl,and:()=>Jl,asinh:()=>Dl,ceil:()=>Rl,cos:()=>al,div:()=>Ll,eq:()=>Yl,exp:()=>yl,floor:()=>ul,ge:()=>Ul,geq:()=>ml,identity:()=>Gt,le:()=>Gl,leq:()=>Fl,ln:()=>hl,log:()=>wl,log2:()=>Nl,max:()=>Vl,min:()=>Hl,mod:()=>Tl,mul:()=>bl,or:()=>kl,pow:()=>Sl,round:()=>fl,sin:()=>rl,sqrt:()=>dl,sub:()=>pl,tan:()=>ll,tanh:()=>cl});function Gt(I,A){return typeof I=="number"||L(I)?f("in",{},[D(I)]):typeof A=="number"||L(A)?f("in",I,[D(A)]):f("in",I,[])}function rl(I,A){return typeof I=="number"||L(I)?f("sin",{},[D(I)]):f("sin",I,[D(A)])}function al(I,A){return typeof I=="number"||L(I)?f("cos",{},[D(I)]):f("cos",I,[D(A)])}function ll(I,A){return typeof I=="number"||L(I)?f("tan",{},[D(I)]):f("tan",I,[D(A)])}function cl(I,A){return typeof I=="number"||L(I)?f("tanh",{},[D(I)]):f("tanh",I,[D(A)])}function Dl(I,A){return typeof I=="number"||L(I)?f("asinh",{},[D(I)]):f("asinh",I,[D(A)])}function hl(I,A){return typeof I=="number"||L(I)?f("ln",{},[D(I)]):f("ln",I,[D(A)])}function wl(I,A){return typeof I=="number"||L(I)?f("log",{},[D(I)]):f("log",I,[D(A)])}function Nl(I,A){return typeof I=="number"||L(I)?f("log2",{},[D(I)]):f("log2",I,[D(A)])}function Rl(I,A){return typeof I=="number"||L(I)?f("ceil",{},[D(I)]):f("ceil",I,[D(A)])}function ul(I,A){return typeof I=="number"||L(I)?f("floor",{},[D(I)]):f("floor",I,[D(A)])}function fl(I,A){return typeof I=="number"||L(I)?f("round",{},[D(I)]):f("round",I,[D(A)])}function dl(I,A){return typeof I=="number"||L(I)?f("sqrt",{},[D(I)]):f("sqrt",I,[D(A)])}function yl(I,A){return typeof I=="number"||L(I)?f("exp",{},[D(I)]):f("exp",I,[D(A)])}function Ml(I,A){return typeof I=="number"||L(I)?f("abs",{},[D(I)]):f("abs",I,[D(A)])}function Gl(I,A,g){return typeof I=="number"||L(I)?f("le",{},[D(I),D(A)]):f("le",I,[D(A),D(g)])}function Fl(I,A,g){return typeof I=="number"||L(I)?f("leq",{},[D(I),D(A)]):f("leq",I,[D(A),D(g)])}function Ul(I,A,g){return typeof I=="number"||L(I)?f("ge",{},[D(I),D(A)]):f("ge",I,[D(A),D(g)])}function ml(I,A,g){return typeof I=="number"||L(I)?f("geq",{},[D(I),D(A)]):f("geq",I,[D(A),D(g)])}function Sl(I,A,g){return typeof I=="number"||L(I)?f("pow",{},[D(I),D(A)]):f("pow",I,[D(A),D(g)])}function Yl(I,A,g){return typeof I=="number"||L(I)?f("eq",{},[D(I),D(A)]):f("eq",I,[D(A),D(g)])}function Jl(I,A,g){return typeof I=="number"||L(I)?f("and",{},[D(I),D(A)]):f("and",I,[D(A),D(g)])}function kl(I,A,g){return typeof I=="number"||L(I)?f("or",{},[D(I),D(A)]):f("or",I,[D(A),D(g)])}function Kl(I,...A){return typeof I=="number"||L(I)?f("add",{},[I,...A].map(D)):f("add",I,A.map(D))}function pl(I,...A){return typeof I=="number"||L(I)?f("sub",{},[I,...A].map(D)):f("sub",I,A.map(D))}function bl(I,...A){return typeof I=="number"||L(I)?f("mul",{},[I,...A].map(D)):f("mul",I,A.map(D))}function Ll(I,...A){return typeof I=="number"||L(I)?f("div",{},[I,...A].map(D)):f("div",I,A.map(D))}function Tl(I,...A){return typeof I=="number"||L(I)?f("mod",{},[I,...A].map(D)):f("mod",I,A.map(D))}function Hl(I,...A){return typeof I=="number"||L(I)?f("min",{},[I,...A].map(D)):f("min",I,A.map(D))}function Vl(I,...A){return typeof I=="number"||L(I)?f("max",{},[I,...A].map(D)):f("max",I,A.map(D))}var Og={};cI(Og,{db2gain:()=>Ol,gain2db:()=>xl,hann:()=>ql,ms2samps:()=>Zl,select:()=>Ft,tau2pole:()=>vl});var RA=cA(cA({},_I),$I);function Zl(I){return RA.mul(RA.sr(),RA.div(I,1e3))}function vl(I){return RA.exp(RA.div(-1,RA.mul(I,RA.sr())))}function Ol(I){return RA.pow(10,RA.mul(I,1/20))}function xl(I){return Ft(RA.ge(I,0),RA.max(-120,RA.mul(20,RA.log(I))),-120)}function Ft(I,A,g){return RA.add(RA.mul(I,A),RA.mul(RA.sub(1,I),g))}function ql(I){return RA.mul(.5,RA.sub(1,RA.cos(RA.mul(2*Math.PI,I))))}var X=cA(cA(cA({},_I),$I),Og);function Wl(I,A,g,C,B,Q){const E=X.env(X.tau2pole(X.mul(.001,I)),X.tau2pole(X.mul(.001,A)),B),e=X.gain2db(E),t=X.sub(1,X.div(1,C)),o=X.mul(t,X.sub(g,e)),i=X.min(0,o),s=X.db2gain(i);return X.mul(Q,s)}function jl(I,A,g,C,B,Q,E){const e=X.env(X.tau2pole(X.mul(.001,I)),X.tau2pole(X.mul(.001,A)),Q),t=X.gain2db(e),o=X.sub(g,X.div(B,2)),i=X.add(g,X.div(B,2)),s=X.and(X.geq(t,o),X.leq(t,i)),a=X.sub(1,X.div(1,C)),c=X.select(s,X.mul(X.div(a,2),X.mul(X.div(X.sub(t,o),B),X.sub(o,t))),X.mul(a,X.sub(g,t))),N=X.min(0,c),M=X.db2gain(N);return X.mul(E,M)}var Ut={};cI(Ut,{adsr:()=>ec});var bC={};cI(bC,{allpass:()=>gc,bandpass:()=>Ac,dcblock:()=>Xl,df11:()=>zl,highpass:()=>$l,highshelf:()=>Qc,lowpass:()=>_l,lowshelf:()=>Bc,notch:()=>Ic,peak:()=>Cc,pink:()=>Ec,sm:()=>Pl,smooth:()=>NB,zero:()=>CQ});var W=cA(cA(cA({},_I),$I),Og);function NB(I,A,g){return typeof I=="number"||L(I)?W.pole(I,W.mul(W.sub(1,I),A)):W.pole(I,A,W.mul(W.sub(1,A),g))}function Pl(I,A){return typeof I=="number"||L(I)?NB(W.tau2pole(.02),I):NB(I,W.tau2pole(.02),A)}function CQ(I,A,g,C){let[B,Q,E]=typeof I=="number"||L(I)?[I,A,g]:[A,g,C];return W.sub(W.mul(B,E),W.mul(Q,W.z(E)))}function Xl(I,A){let g=typeof I=="number"||L(I)?I:A;return W.pole(.995,CQ(1,1,g))}function zl(I,A,g,C,B){let[Q,E,e,t]=typeof I=="number"||L(I)?[I,A,g,C]:[A,g,C,B];return W.pole(e,CQ(Q,E,t))}function _l(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"lowpass"},I,A,g):W.svf(Object.assign({},I,{mode:"lowpass"}),A,g,C)}function $l(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"highpass"},I,A,g):W.svf(Object.assign({},I,{mode:"highpass"}),A,g,C)}function Ac(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"bandpass"},I,A,g):W.svf(Object.assign({},I,{mode:"bandpass"}),A,g,C)}function Ic(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"notch"},I,A,g):W.svf(Object.assign({},I,{mode:"notch"}),A,g,C)}function gc(I,A,g,C){return typeof I=="number"||L(I)?W.svf({mode:"allpass"},I,A,g):W.svf(Object.assign({},I,{mode:"allpass"}),A,g,C)}function Cc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"peak"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"peak"}),A,g,C,B)}function Bc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"lowshelf"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"lowshelf"}),A,g,C,B)}function Qc(I,A,g,C,B){return typeof I=="number"||L(I)?W.svfshelf({mode:"highshelf"},I,A,g,C):W.svfshelf(Object.assign({},I,{mode:"highshelf"}),A,g,C,B)}function Ec(I,A){let g=typeof I=="number"||L(I)?I:A;return((B,Q,E)=>W.min(Q,W.max(B,E)))(-1,1,W.mul(W.db2gain(-30),W.add(W.pole(.99765,W.mul(g,.099046)),W.pole(.963,W.mul(g,.2965164)),W.pole(.57,W.mul(g,1.0526913)),W.mul(.1848,g))))}var gI=cA(cA(cA(cA({},_I),$I),bC),Og);function ec(I,A,g,C,B,Q){let E=typeof I=="number"||L(I)?[I,A,g,C,B]:[A,g,C,B,Q],[e,t,o,i,s]=E,a=gI.mul(e,gI.sr()),c=gI.le(gI.counter(s),a),N=gI.select(s,gI.select(c,1,o),0),M=gI.select(s,gI.select(c,e,t),i),d=gI.tau2pole(gI.div(M,6.91));return gI.smooth(d,N)}var mt={};cI(mt,{blepsaw:()=>sc,blepsquare:()=>nc,bleptriangle:()=>rc,cycle:()=>tc,noise:()=>fB,pinknoise:()=>ac,saw:()=>uB,square:()=>ic,train:()=>RB,triangle:()=>oc});var AA=cA(cA(cA({},_I),$I),bC);function RB(I,A){return typeof I=="number"||L(I)?AA.le(AA.phasor(I,0),.5):AA.le(AA.phasor(I,A,0),.5)}function tc(I,A){return typeof I=="number"||L(I)?AA.sin(AA.mul(2*Math.PI,AA.phasor(I,0))):AA.sin(AA.mul(2*Math.PI,AA.phasor(I,A,0)))}function uB(I,A){return typeof I=="number"||L(I)?AA.sub(AA.mul(2,AA.phasor(I,0)),1):AA.sub(AA.mul(2,AA.phasor(I,A,0)),1)}function ic(I,A){return typeof I=="number"||L(I)?AA.sub(AA.mul(2,RB(I)),1):AA.sub(AA.mul(2,RB(I,A)),1)}function oc(I,A){return typeof I=="number"||L(I)?AA.mul(2,AA.sub(.5,AA.abs(uB(I)))):AA.mul(2,AA.sub(.5,AA.abs(uB(I,A))))}function sc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("blepsaw",{},[C])}function nc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("blepsquare",{},[C])}function rc(I,A){let C=!(typeof I=="number"||L(I))?A:I;return f("bleptriangle",{},[C])}function fB(I){return typeof I>"u"?AA.sub(AA.mul(2,AA.rand()),1):AA.sub(AA.mul(2,AA.rand(I)),1)}function ac(I){return typeof I>"u"?AA.pink(fB()):AA.pink(fB(I))}var lc=class extends vr{constructor(){super()}},r=jr(cA(cA(cA(cA(cA(cA(cA({},_I),Mt),Ut),bC),$I),mt),Og),{const:yt,in:Gt}),Ig={CREATE_NODE:0,DELETE_NODE:1,APPEND_CHILD:2,SET_PROPERTY:3,ACTIVATE_ROOTS:4,COMMIT_UPDATES:5},cc=class{constructor(){this.nodeMap=new Map,this.currentActiveRoots=new Set,this.clear()}clear(){this.nodesAdded=0,this.nodesRemoved=0,this.edgesAdded=0,this.propsWritten=0,this.batch={createNode:[],deleteNode:[],appendChild:[],setProperty:[],activateRoots:[],commitUpdates:[]}}getNodeMap(){return this.nodeMap}getTerminalGeneration(){return 4}createNode(I,A){this.nodesAdded++,this.batch.createNode.push([Ig.CREATE_NODE,I,A])}deleteNode(I){this.nodesRemoved++,this.batch.deleteNode.push([Ig.DELETE_NODE,I])}appendChild(I,A){this.edgesAdded++,this.batch.appendChild.push([Ig.APPEND_CHILD,I,A])}setProperty(I,A,g){this.propsWritten++,this.batch.setProperty.push([Ig.SET_PROPERTY,I,A,g])}activateRoots(I){I.length===this.currentActiveRoots.size&&I.every(g=>this.currentActiveRoots.has(g))||(this.batch.activateRoots.push([Ig.ACTIVATE_ROOTS,I]),this.currentActiveRoots=new Set(I))}commitUpdates(){this.batch.commitUpdates.push([Ig.COMMIT_UPDATES])}getPackedInstructions(){return[...this.batch.createNode,...this.batch.deleteNode,...this.batch.appendChild,...this.batch.setProperty,...this.batch.activateRoots,...this.batch.commitUpdates]}};function aE(){return typeof performance>"u"?Date.now():performance.now()}var Dc=class{constructor(I){this._delegate=new cc,this._sendMessage=I,this._nextRefId=0}createRef(I,A,g){let C=`__refKey:${this._nextRefId++}`,B=f(I,Object.assign({key:C},A),g);return[B,E=>{if(!this._delegate.nodeMap.has(B.hash))throw new Error("Cannot update a ref that has not been mounted; make sure you render your node first");const e=this._delegate.nodeMap.get(B.hash);this._delegate.clear(),Dt(this._delegate,B.hash,e.props,E),this._delegate.commitUpdates();const t=this._delegate.getPackedInstructions();return Promise.resolve(this._sendMessage(t))}]}render(...I){const A=aE();this._delegate.clear(),Ga(this._delegate,I.map(D));const g=aE(),C=this._delegate.getPackedInstructions();return Promise.resolve(this._sendMessage(C)).then(B=>({result:B,nodesAdded:this._delegate.nodesAdded,edgesAdded:this._delegate.edgesAdded,propsWritten:this._delegate.propsWritten,elapsedTimeMs:g-A}))}};function hc(I,A){var g={};for(var C in I)Object.prototype.hasOwnProperty.call(I,C)&&A.indexOf(C)<0&&(g[C]=I[C]);if(I!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,C=Object.getOwnPropertySymbols(I);BA())))}(A,I,g)}var r,X=A=>{throw new q(A.O.S.P.name+" instance already deleted")},m=!1,x=()=>{},e=(A,I,g)=>I===g?A:void 0===g.U||null===(A=e(A,I,g.U))?null:g.pa(A),z={},P=[],p=()=>{for(;P.length;){var A=P.pop();A.O.aa=!1,A.delete()}},u={},v=(A,I)=>{if(!I.S||!I.R)throw new W("makeClassHandle requires ptr and ptrType");if(!!I.V!=!!I.T)throw new W("Both smartPtrType and smartPtr must be specified");return I.count={value:1},$(Object.create(A,{O:{value:I,writable:!0}}))},$=A=>"undefined"==typeof FinalizationRegistry?($=A=>A,A):(m=new FinalizationRegistry((A=>{--(A=A.O).count.value,0===A.count.value&&(A.T?A.V.Z(A.T):A.S.P.Z(A.R))})),x=A=>{m.unregister(A)},($=A=>{var I=A.O;return I.T&&m.register(A,{O:I},A),A})(A));function _(){}var AA=(A,I)=>Object.defineProperty(I,"name",{value:A}),IA=(A,I,g)=>{if(void 0===A[I].Y){var C=A[I];A[I]=function(){if(!A[I].Y.hasOwnProperty(arguments.length))throw new q(`Function \'${g}\' called with an invalid number of arguments (${arguments.length}) - expects one of (${A[I].Y})!`);return A[I].Y[arguments.length].apply(this,arguments)},A[I].Y=[],A[I].Y[C.ea]=C}};function gA(A,I,g,C,Q,B,E,D){this.name=A,this.constructor=I,this.ba=g,this.Z=C,this.U=Q,this.qa=B,this.da=E,this.pa=D,this.va=[]}var CA=(A,I,g)=>{for(;I!==g;){if(!I.da)throw new q(`Expected null or instance of ${g.name}, got an instance of ${I.name}`);A=I.da(A),I=I.U}return A};function QA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);return 0}if(!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return CA(I.O.R,I.O.S.P,this.P)}function BA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);if(this.ga){var g=this.wa();return null!==A&&A.push(this.Z,g),g}return 0}if(!I||!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.fa&&I.O.S.fa)throw new q(`Cannot convert argument of type ${I.O.V?I.O.V.name:I.O.S.name} to parameter type ${this.name}`);if(g=CA(I.O.R,I.O.S.P,this.P),this.ga){if(void 0===I.O.T)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.ya){case 0:if(I.O.V!==this)throw new q(`Cannot convert argument of type ${I.O.V?I.O.V.name:I.O.S.name} to parameter type ${this.name}`);g=I.O.T;break;case 1:g=I.O.T;break;case 2:if(I.O.V===this)g=I.O.T;else{var C=I.clone();g=this.xa(g,LA((()=>C.delete()))),null!==A&&A.push(this.Z,g)}break;default:throw new q("Unsupporting sharing policy")}}return g}function EA(A,I){if(null===I){if(this.ha)throw new q(`null is not a valid ${this.name}`);return 0}if(!I.O)throw new q(`Cannot pass "${TA(I)}" as a ${this.name}`);if(!I.O.R)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(I.O.S.fa)throw new q(`Cannot convert argument of type ${I.O.S.name} to parameter type ${this.name}`);return CA(I.O.R,I.O.S.P,this.P)}function DA(A){return this.fromWireType(F[A>>2])}function iA(A,I,g,C,Q,B,E,D,i,w,R){this.name=A,this.P=I,this.ha=g,this.fa=C,this.ga=Q,this.ua=B,this.ya=E,this.ma=D,this.wa=i,this.xa=w,this.Z=R,Q||void 0!==I.U?this.toWireType=BA:(this.toWireType=C?QA:EA,this.W=null)}var wA,RA,oA=[],NA=A=>{var I=oA[A];return I||(A>=oA.length&&(oA.length=A+1),oA[A]=I=wA.get(A)),I},GA=(A,I)=>{var g=(A=d(A)).includes("j")?((A,I)=>{var g=[];return function(){if(g.length=0,Object.assign(g,arguments),A.includes("j")){var Q=C["dynCall_"+A];Q=g&&g.length?Q.apply(null,[I].concat(g)):Q.call(null,I)}else Q=NA(I).apply(null,g);return Q}})(A,I):NA(I);if("function"!=typeof g)throw new q(`unknown function pointer with signature ${A}: ${I}`);return g},FA=A=>{A=AI(A);var I=d(A);return II(A),I},UA=(A,I)=>{var g=[],C={};throw I.forEach((function A(I){C[I]||b[I]||(t[I]?t[I].forEach(A):(g.push(I),C[I]=!0))})),new RA(`${A}: `+g.map(FA).join([", "]))},MA=(A,I)=>{for(var g=[],C=0;C>2]);return g},JA=A=>{for(;A.length;){var I=A.pop();A.pop()(I)}};function yA(A){for(var I=1;IE)throw new q("argTypes array size mismatch! Must at least get return value and \'this\' types!");var D=null!==I[1]&&null!==g,i=yA(I);for(g="void"!==I[0].name,C=[O,C,Q,JA,I[0],I[1]],Q=0;Q{A>=SA.ja&&0==--SA.get(A).na&&(SA.X[A]=void 0,SA.ia.push(A))},cA=A=>{if(!A)throw new q("Cannot use deleted val. handle = "+A);return SA.get(A).value},LA=A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:A={na:1,value:A};var I=SA.ia.pop()||SA.X.length;return SA.X[I]=A,I}};function lA(A){return this.fromWireType(G[A>>2])}for(var HA={name:"emscripten::val",fromWireType:A=>{var I=cA(A);return KA(A),I},toWireType:(A,I)=>LA(I),argPackAdvance:8,readValueFromPointer:lA,W:null},TA=A=>{if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A},ZA=(A,I)=>{switch(I){case 4:return function(A){return this.fromWireType(U[A>>2])};case 8:return function(A){return this.fromWireType(M[A>>3])};default:throw new TypeError(`invalid float width (${I}): ${A}`)}},VA=(A,I,g)=>{switch(I){case 1:return g?A=>w[A>>0]:A=>R[A>>0];case 2:return g?A=>o[A>>1]:A=>N[A>>1];case 4:return g?A=>G[A>>2]:A=>F[A>>2];default:throw new TypeError(`invalid integer width (${I}): ${A}`)}},qA="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,WA="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,dA=(A,I)=>{for(var g=A>>1,C=g+I/2;!(g>=C)&&N[g];)++g;if(32<(g<<=1)-A&&WA)return WA.decode(R.subarray(A,g));for(g="",C=0;!(C>=I/2);++C){var Q=o[A+2*C>>1];if(0==Q)break;g+=String.fromCharCode(Q)}return g},jA=(A,I,g)=>{if(g??=2147483647,2>g)return 0;var C=I;g=(g-=2)<2*A.length?g/2:A.length;for(var Q=0;Q>1]=A.charCodeAt(Q),I+=2;return o[I>>1]=0,I-C},bA=A=>2*A.length,tA=(A,I)=>{for(var g=0,C="";!(g>=I/4);){var Q=G[A+4*g>>2];if(0==Q)break;++g,65536<=Q?(Q-=65536,C+=String.fromCharCode(55296|Q>>10,56320|1023&Q)):C+=String.fromCharCode(Q)}return C},OA=(A,I,g)=>{if(g??=2147483647,4>g)return 0;var C=I;g=C+g-4;for(var Q=0;Q=B)B=65536+((1023&B)<<10)|1023&A.charCodeAt(++Q);if(G[I>>2]=B,(I+=4)+4>g)break}return G[I>>2]=0,I-C},nA=A=>{for(var I=0,g=0;g=C&&++g,I+=4}return I},fA=(A,I)=>{var g=b[A];if(void 0===g)throw A=I+" has unknown type "+FA(A),new q(A);return g},rA=(A,I,g)=>{var C=[];return A=A.toWireType(C,g),C.length&&(F[I>>2]=LA(C)),A},XA=[],mA={},xA=A=>{var I=mA[A];return void 0===I?d(A):I},eA=()=>"object"==typeof globalThis?globalThis:Function("return this")(),zA=A=>(zA=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return A=>crypto.getRandomValues(A);c("initRandomDevice")})())(A),PA=Array(256),pA=0;256>pA;++pA)PA[pA]=String.fromCharCode(pA);V=PA,q=C.BindingError=class extends Error{constructor(A){super(A),this.name="BindingError"}},W=C.InternalError=class extends Error{constructor(A){super(A),this.name="InternalError"}},Object.assign(_.prototype,{isAliasOf:function(A){if(!(this instanceof _&&A instanceof _))return!1;var I=this.O.S.P,g=this.O.R;A.O=A.O;var C=A.O.S.P;for(A=A.O.R;I.U;)g=I.da(g),I=I.U;for(;C.U;)A=C.da(A),C=C.U;return I===C&&g===A},clone:function(){if(this.O.R||X(this),this.O.ca)return this.O.count.value+=1,this;var A=$,I=Object,g=I.create,C=Object.getPrototypeOf(this),Q=this.O;return(A=A(g.call(I,C,{O:{value:{count:Q.count,aa:Q.aa,ca:Q.ca,R:Q.R,S:Q.S,T:Q.T,V:Q.V}}}))).O.count.value+=1,A.O.aa=!1,A},delete(){if(this.O.R||X(this),this.O.aa&&!this.O.ca)throw new q("Object already scheduled for deletion");x(this);var A=this.O;--A.count.value,0===A.count.value&&(A.T?A.V.Z(A.T):A.S.P.Z(A.R)),this.O.ca||(this.O.T=void 0,this.O.R=void 0)},isDeleted:function(){return!this.O.R},deleteLater:function(){if(this.O.R||X(this),this.O.aa&&!this.O.ca)throw new q("Object already scheduled for deletion");return P.push(this),1===P.length&&r&&r(p),this.O.aa=!0,this}}),C.getInheritedInstanceCount=()=>Object.keys(u).length,C.getLiveInheritedInstances=()=>{var A,I=[];for(A in u)u.hasOwnProperty(A)&&I.push(u[A]);return I},C.flushPendingDeletes=p,C.setDelayFunction=A=>{r=A,P.length&&r&&r(p)},Object.assign(iA.prototype,{ra(A){return this.ma&&(A=this.ma(A)),A},la(A){this.Z?.(A)},argPackAdvance:8,readValueFromPointer:DA,fromWireType:function(A){function I(){return this.ga?v(this.P.ba,{S:this.ua,R:g,V:this,T:A}):v(this.P.ba,{S:this,R:A})}var g=this.ra(A);if(!g)return this.la(A),null;var C=((A,I)=>{if(void 0===I)throw new q("ptr should not be undefined");for(;A.U;)I=A.da(I),A=A.U;return u[I]})(this.P,g);if(void 0!==C)return 0===C.O.count.value?(C.O.R=g,C.O.T=A,C.clone()):(C=C.clone(),this.la(A),C);if(C=this.P.qa(g),!(C=z[C]))return I.call(this);C=this.fa?C.oa:C.pointerType;var Q=e(g,this.P,C.P);return null===Q?I.call(this):this.ga?v(C.P.ba,{S:C,R:Q,V:this,T:A}):v(C.P.ba,{S:C,R:Q})}}),RA=C.UnboundTypeError=(hA=Error,(aA=AA(kA="UnboundTypeError",(function(A){this.name=kA,this.message=A,void 0!==(A=Error(A).stack)&&(this.stack=this.toString()+"\\n"+A.replace(/^Error(:[^\\n]*)?\\n/,""))}))).prototype=Object.create(hA.prototype),aA.prototype.constructor=aA,aA.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},aA),SA.X.push({value:void 0},{value:null},{value:!0},{value:!1}),Object.assign(SA,{ja:SA.X.length}),C.count_emval_handles=()=>{for(var A=0,I=SA.ja;I{var C=new Z(A);throw F[C.R+16>>2]=0,F[C.R+4>>2]=I,F[C.R+8>>2]=g,A},x:()=>{},C:(A,I,g,C)=>{f(A,{name:I=d(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?g:C},argPackAdvance:8,readValueFromPointer:function(A){return this.fromWireType(R[A])},W:null})},H:(A,I,g,Q,B,E,D,i,w,R,o,N,G)=>{o=d(o),E=GA(B,E),i&&=GA(D,i),R&&=GA(w,R),G=GA(N,G);var F=(A=>{if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=I&&57>=I?`_${A}`:A})(o);((A,I)=>{if(C.hasOwnProperty(A))throw new q(`Cannot register public name \'${A}\' twice`);C[A]=I})(F,(function(){UA(`Cannot construct ${o} due to unbound types`,[Q])})),n([A,I,g],Q?[Q]:[],(function(I){if(I=I[0],Q)var g=I.P,B=g.ba;else B=_.prototype;I=AA(o,(function(){if(Object.getPrototypeOf(this)!==D)throw new q("Use \'new\' to construct "+o);if(void 0===N.$)throw new q(o+" has no accessible constructor");var A=N.$[arguments.length];if(void 0===A)throw new q(`Tried to invoke ctor of ${o} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(N.$).toString()}) parameters instead!`);return A.apply(this,arguments)}));var D=Object.create(B,{constructor:{value:I}});I.prototype=D;var w,N=new gA(o,I,D,G,g,E,i,R);N.U&&((w=N.U).ka??(w.ka=[]),N.U.ka.push(N));return g=new iA(o,N,!0,!1,!1),w=new iA(o+"*",N,!1,!1,!1),B=new iA(o+" const*",N,!1,!0,!1),z[A]={pointerType:w,oa:B},((A,I)=>{if(!C.hasOwnProperty(A))throw new W("Replacing nonexistant public symbol");C[A]=I,C[A].ea=void 0})(F,I),[g,w,B]}))},G:(A,I,g,C,Q,B)=>{var E=MA(I,g);Q=GA(C,Q),n([],[A],(function(A){var g=`constructor ${(A=A[0]).name}`;if(void 0===A.P.$&&(A.P.$=[]),void 0!==A.P.$[I-1])throw new q(`Cannot register multiple constructors with identical number of parameters (${I-1}) for class \'${A.name}\'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return A.P.$[I-1]=()=>{UA(`Cannot construct ${A.name} due to unbound types`,E)},n([],E,(C=>(C.splice(1,0,null),A.P.$[I-1]=sA(g,C,null,Q,B),[]))),[]}))},e:(A,I,g,C,Q,B,E,D,i)=>{var w=MA(g,C);I=(A=>{const I=(A=A.trim()).indexOf("(");return-1!==I?A.substr(0,I):A})(I=d(I)),B=GA(Q,B),n([],[A],(function(A){function C(){UA(`Cannot call ${Q} due to unbound types`,w)}var Q=`${(A=A[0]).name}.${I}`;I.startsWith("@@")&&(I=Symbol[I.substring(2)]),D&&A.P.va.push(I);var R=A.P.ba,o=R[I];return void 0===o||void 0===o.Y&&o.className!==A.name&&o.ea===g-2?(C.ea=g-2,C.className=A.name,R[I]=C):(IA(R,I,Q),R[I].Y[g-2]=C),n([],w,(function(C){return C=sA(Q,C,A,B,E,i),void 0===R[I].Y?(C.ea=g-2,R[I]=C):R[I].Y[g-2]=C,[]})),[]}))},B:A=>f(A,HA),u:(A,I,g)=>{f(A,{name:I=d(I),fromWireType:A=>A,toWireType:(A,I)=>I,argPackAdvance:8,readValueFromPointer:ZA(I,g),W:null})},g:(A,I,g,C,Q)=>{if(I=d(I),-1===Q&&(Q=4294967295),Q=A=>A,0===C){var B=32-8*g;Q=A=>A<>>B}var E=I.includes("unsigned")?function(A,I){return I>>>0}:function(A,I){return I};f(A,{name:I,fromWireType:Q,toWireType:E,argPackAdvance:8,readValueFromPointer:VA(I,g,0!==C),W:null})},b:(A,I,g)=>{function C(A){return new Q(w.buffer,F[A+4>>2],F[A>>2])}var Q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];f(A,{name:g=d(g),fromWireType:C,argPackAdvance:8,readValueFromPointer:C},{sa:!0})},t:(A,I)=>{var g="std::string"===(I=d(I));f(A,{name:I,fromWireType:function(A){var I=F[A>>2],C=A+4;if(g)for(var Q=C,B=0;B<=I;++B){var E=C+B;if(B==I||0==R[E]){if(Q){var D=Q,i=R,w=D+(E-Q);for(Q=D;i[Q]&&!(Q>=w);)++Q;if(16(o=224==(240&o)?(15&o)<<12|N<<6|G:(7&o)<<18|N<<12|G<<6|63&i[D++])?w+=String.fromCharCode(o):(o-=65536,w+=String.fromCharCode(55296|o>>10,56320|1023&o))}}else w+=String.fromCharCode(o)}D=w}}else D="";if(void 0===U)var U=D;else U+=String.fromCharCode(0),U+=D;Q=E+1}}else{for(U=Array(I),B=0;B=E?Q++:2047>=E?Q+=2:55296<=E&&57343>=E?(Q+=4,++C):Q+=3}else Q=I.length;if(E=(Q=_A(4+(C=Q)+1))+4,F[Q>>2]=C,g&&B){if(B=E,E=C+1,C=R,0=i)i=65536+((1023&i)<<10)|1023&I.charCodeAt(++D);if(127>=i){if(B>=E)break;C[B++]=i}else{if(2047>=i){if(B+1>=E)break;C[B++]=192|i>>6}else{if(65535>=i){if(B+2>=E)break;C[B++]=224|i>>12}else{if(B+3>=E)break;C[B++]=240|i>>18,C[B++]=128|i>>12&63}C[B++]=128|i>>6&63}C[B++]=128|63&i}}C[B]=0}}else if(B)for(B=0;B{if(g=d(g),2===I)var C=dA,Q=jA,B=bA,E=()=>N,D=1;else 4===I&&(C=tA,Q=OA,B=nA,E=()=>F,D=2);f(A,{name:g,fromWireType:A=>{for(var g,Q=F[A>>2],B=E(),i=A+4,w=0;w<=Q;++w){var R=A+4+w*I;w!=Q&&0!=B[R>>D]||(i=C(i,R-i),void 0===g?g=i:(g+=String.fromCharCode(0),g+=i),i=R+I)}return II(A),g},toWireType:(A,C)=>{if("string"!=typeof C)throw new q(`Cannot pass non-string to C++ string type ${g}`);var E=B(C),i=_A(4+E+I);return F[i>>2]=E>>D,Q(C,i+4,E+I),null!==A&&A.push(II,i),i},argPackAdvance:8,readValueFromPointer:lA,W(A){II(A)}})},D:(A,I)=>{f(A,{ta:!0,name:I=d(I),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},k:(A,I,g)=>(A=cA(A),I=fA(I,"emval::as"),rA(I,g,A)),p:(A,I,g,C)=>(A=XA[A])(null,I=cA(I),g,C),s:(A,I,g,C,Q)=>(A=XA[A])(I=cA(I),I[g=xA(g)],C,Q),a:KA,j:A=>0===A?LA(eA()):(A=xA(A),LA(eA()[A])),h:(A,I,g)=>{I=((A,I)=>{for(var g=Array(A),C=0;C>2],"parameter "+C);return g})(A,I);var C=I.shift();A--;var Q="return function (obj, func, destructorsRef, args) {\\n",B=0,E=[];0===g&&E.push("obj");for(var D=["retType"],i=[C],w=0;wA.name)).join(", ")}) => ${C.name}>`,(A=>{var I=XA.length;return XA.push(A),I})(AA(g,A))},i:(A,I)=>(A=cA(A),I=cA(I),LA(A[I])),f:A=>{4(A=cA(A))instanceof(I=cA(I)),F:A=>"number"==typeof(A=cA(A)),E:A=>"string"==typeof(A=cA(A)),w:()=>LA([]),l:A=>LA(xA(A)),v:()=>LA({}),d:A=>{var I=cA(A);JA(I),KA(A)},n:(A,I,g)=>{A=cA(A),I=cA(I),g=cA(g),A[I]=g},c:(A,I)=>(A=(A=fA(A,"_emval_take_value")).readValueFromPointer(I),LA(A)),q:()=>{c("")},A:(A,I,g)=>R.copyWithin(A,I,I+g),z:A=>{var I=R.length;if(2147483648<(A>>>=0))return!1;for(var g=1;4>=g;g*=2){var C=I*(1+.2/g);C=Math.min(C,A+100663296);var Q=Math;C=Math.max(A,C);A:{Q=(Q.min.call(Q,2147483648,C+(65536-C%65536)%65536)-i.buffer.byteLength+65535)/65536;try{i.grow(Q),y();var B=1;break A}catch(A){}B=void 0}if(B)return!0}return!1},y:(A,I)=>(zA(R.subarray(A,A+I)),0)},$A=function(){function A(A){return $A=A.exports,i=$A.I,y(),wA=$A.L,s.unshift($A.J),a--,C.monitorRunDependencies?.(a),0==a&&(null!==S&&(clearInterval(S),S=null),K&&(A=K,K=null,A())),$A}var I={a:vA};if(a++,C.monitorRunDependencies?.(a),C.instantiateWasm)try{return C.instantiateWasm(I,A)}catch(A){D(`Module.instantiateWasm callback failed with error: ${A}`),g(A)}return I=function(A){if(L==L&&E)var I=new Uint8Array(E);else{if(l(I=L)){I=atob(I.slice(37));for(var g=new Uint8Array(I.length),C=0;CModule));';class uc extends lc{initialize(A,g={},C=16){return hI(this,void 0,void 0,function*(){fg(typeof A=="object"&&A!==null,"First argument to initialize must be a valid AudioContext instance."),fg(typeof g=="object"&&g!==null,"The optional second argument to initialize must be an object."),typeof A._elemWorkletRegistry!="object"&&(A._elemWorkletRegistry={});const B=A._elemWorkletRegistry;if(!B.hasOwnProperty(gB)){const Q=new Blob([Rc,Nc],{type:"text/javascript"}),E=URL.createObjectURL(Q);if(!A.audioWorklet)throw new Error("BaseAudioContext.audioWorklet is missing; are you running in a secure context (https)?");yield A.audioWorklet.addModule(E),B[gB]=!0}return this._promiseMap=new Map,this._nextRequestId=0,this._worklet=new AudioWorkletNode(A,`ElementaryAudioWorkletProcessor@${gB}`,Object.assign({numberOfInputs:0,numberOfOutputs:1,outputChannelCount:[2]},g)),yield new Promise((Q,E)=>{this._worklet.port.onmessage=e=>{const[t,o]=e.data;if(t==="load")return this._renderer=new Dc(i=>hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("renderInstructions",{batch:i})})),Q(this._worklet),this.emit(t,o);if(t==="events")return o.forEach(i=>{this.emit(i.type,i.event)});if(t==="reply"){const{requestId:i,result:s}=o,{resolve:a,reject:c}=this._promiseMap.get(i);return this._promiseMap.delete(i),a(s)}},this._timer=window.setInterval(()=>{this._worklet.port.postMessage({requestType:"processQueuedEvents"})},C)})})}_sendWorkletRequest(A,g){fg(this._worklet,"Can't send request before worklet is ready. Have you initialized your WebRenderer instance?");let C=this._nextRequestId++;return this._worklet.port.postMessage({requestId:C,requestType:A,payload:g}),new Promise((B,Q)=>{this._promiseMap.set(C,{resolve:B,reject:Q})})}createRef(A,g,C){return this._renderer.createRef(A,g,C)}render(...A){return hI(this,void 0,void 0,function*(){const g=yield this._renderer.render(...A),{result:C}=g,B=hc(g,["result"]);return C.success?Promise.resolve(B):Promise.reject(C)})}updateVirtualFileSystem(A){return hI(this,void 0,void 0,function*(){return fg(typeof A=="object"&&A!==null,"Virtual file system must be an object mapping string type keys to Array|Float32Array type values"),Object.keys(A).forEach(function(C){const B=typeof A[C]=="object"&&(Array.isArray(A[C])||A[C]instanceof Float32Array);fg(B,"Virtual file system must be an object mapping string type keys to Array|Float32Array type values")}),yield this._sendWorkletRequest("updateSharedResourceMap",{resources:A})})}pruneVirtualFileSystem(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("pruneVirtualFileSystem",{})})}listVirtualFileSystem(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("listVirtualFileSystem",{})})}reset(){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("reset",{})})}setCurrentTime(A){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("setCurrentTime",{time:A})})}setCurrentTimeMs(A){return hI(this,void 0,void 0,function*(){return yield this._sendWorkletRequest("setCurrentTimeMs",{time:A})})}}function fc(I,A="ref"){const g=ZA({}),C=WI({}),B=WI({}),Q=WI({});let E=!1;for(let t in I){const o=I[t];for(let i in o){const s=o[i];g[t]=g[t]||{},g[t][i]=fI(s!=null&&s.nostore?s.value:XI(`${A}:${t}_${i}`,s.value),s.min,s.max),!(s!=null&&s.hidden)&&(Q[t]=Q[t]||{},Q[t][i]=s)}}function e(t){for(let o in I){const i=I[o];for(let s in i){let[a,c]=t.createRef("const",{value:g[o][s]},[]);C[o]=C[o]||{},C[o][s]=r.smooth(r.tau2pole(.01),a),B[o]=B[o]||{},B[o][s]=c}}E=!0}return AI(g,()=>{if(E)for(let t in g){const o=I[t];for(let i in o)B[t][i]({value:g[t][i]})}},{deep:!0}),{controls:g,cv:C,setters:B,groups:Q,initRefs:e}}const IC=["gate","midi","vel"];function dc(I=6){const A=ZA(Array(I).fill(null).map(()=>Object.fromEntries(IC.map(a=>[a,{value:0,ref:null,setter:null}])))),g=oA(!1);function C(a){for(let c in A)for(let N in IC){const M=IC[N],[d,U]=a.createRef("const",{value:A[c][M].value},[]);A[c][M].ref=r.smooth(r.tau2pole(.001),d),A[c][M].setter=U}g.value=!0}const B=oA(0);function Q(a,c){if(c>0){const N=s(B);E(N,{gate:1,midi:a,vel:c})}else e(A,a)}function E(a,c){if(!g.value)return;const N=A[a];Object.entries(c).forEach(([M,d])=>{var U,b;M in N&&d!==void 0&&(N[M].value=d,(b=(U=N[M]).setter)==null||b.call(U,{value:d}))})}function e(a,c){a.forEach((N,M)=>{N.midi.value===c&&E(M,{gate:0})})}function t(){A.forEach((a,c)=>E(c,{gate:0}))}function o(a){return Object.fromEntries(IC.map(c=>[c,i(a,c)]))}function i(a,c){return r.meter({name:`synth-voice-${a}-${c}`},A[a][c].ref||r.const({value:A[a][c].value}))}function s(a){const c=a.value;let N=c;do{if(A[N].gate.value===0)return a.value=(N+1)%A.length,N;N=(N+1)%A.length}while(N!==c);return a.value=(c+1)%A.length,c}return{voices:A,initVoices:C,updateVoice:E,cycleNote:Q,stopAll:t,getVoiceParams:o}}const yc=41,Mc=42,Gc=43,Fc=44,Uc=45,mc=46,Sc=47,Yc=48,Jc=49,kc=50,Kc=51,pc=52,bc=53,Lc=54,Tc=55,Hc=56,Vc=57,Zc=58,vc=59,Oc=60,xc=24,qc=25,Wc=26,jc=27,Pc=28,Xc=29,zc=30,_c=31,$c=32,AD=33,ID=34,gD=35,CD=36,BD=37,QD=38,ED=39,eD=40,gC={KeyQ:yc,Digit2:Mc,KeyW:Gc,Digit3:Fc,KeyE:Uc,Digit4:mc,KeyR:Sc,KeyT:Yc,Digit6:Jc,KeyY:kc,Digit7:Kc,KeyU:pc,KeyI:bc,Digit9:Lc,KeyO:Tc,Digit0:Hc,KeyP:Vc,Minus:Zc,BracketLeft:vc,BracketRIght:Oc,KeyZ:xc,KeyS:qc,KeyX:Wc,KeyD:jc,KeyC:Pc,KeyV:Xc,KeyG:zc,KeyB:_c,KeyH:$c,KeyN:AD,KeyJ:ID,KeyM:gD,Comma:CD,KeyL:BD,Period:QD,Semicolon:ED,Slash:eD},tD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},octave:{value:0,min:-2,max:2,step:1},shape:{value:.2,min:0,max:1,step:.01},vibdep:{value:.1,min:0,max:.5,step:.01,fixed:2},vibrate:{value:2,min:1,max:8,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function iD({gate:I,midi:A,vel:g},C,B){const Q=r.mul(r.pow(2,C.octave),xg(r.add(A,r.mul(C.vibdep,r.cycle(r.mul(C.vibrate,r.div(B,60))))))),E=r.blepsquare(Q),e=r.blepsaw(Q);let t=r.div(15,B);const o=r.adsr(r.mul(C.attack,t),r.mul(C.decay,t),C.sustain,r.mul(C.release,t),I),i=r.adsr(r.mul(C.fattack,t),r.mul(C.fdecay,t),C.fsustain,r.mul(C.frelease,t),I),s=r.mul(o,r.add(r.mul(r.cos(r.mul(C.shape,Math.PI/2)),E),r.mul(r.sin(r.mul(C.shape,Math.PI/2)),e))),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,i))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s);return r.tanh(r.mul(C.on,C.gain,g,c))}const St=[[1,1,1,1,1,1,1,1],[1,-1,1,-1,1,-1,1,-1],[1,1,-1,-1,1,1,-1,-1],[1,-1,-1,1,1,-1,-1,1],[1,1,1,1,-1,-1,-1,-1],[1,-1,1,-1,-1,1,-1,1],[1,1,-1,-1,-1,-1,1,1],[1,-1,-1,1,-1,1,1,-1]];function CB(I,...A){const g=A.length,C=Math.sqrt(1/g),B=A.map(function(Q,E){const e=I*((E+1)/g);return r.sdelay({size:e},Q)});return St.map(function(Q,E){return r.add(...Q.map(function(e,t){return r.mul(e*C,B[t])}))})}function lE(I,A,g,C,B,...Q){const E=Q.length,e=Math.sqrt(1/E),t=r.mul(B,.02);if(E!==8)throw new Error("Invalid FDN step!");const o=Q.map(function(s,a){return r.add(s,r.mul(C,r.smooth(.105,r.tapIn({name:`${I}:fdn${a}`}))))});return St.map(function(s,a){return r.add(...s.map(function(c,N){return r.mul(c*e,o[N])}))}).map(function(s,a){const c=(U,b,R)=>r.add(U,r.mul(R,r.cycle(b))),N=U=>A*(U/1e3),M=r.mul(r.add(1,r.mul(3,g)),N((a+1)*17)),d=c(M,r.add(.1,r.mul(a,t)),N(2.5));return r.tapOut({name:`${I}:fdn${a}`},r.delay({size:N(750)},d,0,s))})}function oD(I,A,g){const C=I.key,B=I.sampleRate,Q=r.sm(I.size),E=r.sm(I.decay),e=r.sm(I.mod),t=r.sm(I.mix),o=r.mul(.5,r.add(A,g)),i=r.mul(.5,r.sub(A,g)),s=[A,g,o,i],a=[...s,...s.map(Z=>r.mul(-1,Z))],c=Z=>B*(Z/1e3),N=CB(c(43),...a),M=CB(c(97),...N),d=CB(c(117),...M),U=lE(`${C}:d4`,B,Q,.004,e,...d),b=lE(`${C}:r0`,B,Q,E,e,...U),R=r.mul(.25,r.add(b[0],b[2],b[4],b[6])),w=r.mul(.25,r.add(b[1],b[3],b[5],b[7]));return[r.select(t,R,A),r.select(t,w,g)]}const sD={on:{value:1,min:0,max:1,step:1,hidden:!0},size:{value:.2,min:0,max:1,step:.01},decay:{value:.5,min:0,max:1,step:.01},mod:{value:.5,min:0,max:1,step:.01},mix:{value:.5,min:0,max:1,step:.01}},nD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.1,min:0,max:1,step:.01},feedback:{value:.1,min:0,max:1,step:.01},shift:{value:.4,min:0,max:1,step:.01}};function rD([I,A],g,C){return[0,1].map(B=>r.add(B&&A||I,r.mul(g.on,g.gain,r.delay({size:44100},r.ms2samps(r.mul(r.div(6e4,C),r.add(1,r.mul(B===0?-.5:.5,g.shift)))),g.feedback,B&&A||I))))}const aD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},octave:{value:0,min:-2,max:2,step:1},color:{value:0,min:0,max:1,step:.001},bandq:{value:5,min:0,max:10,step:.1},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function lD({gate:I,midi:A,vel:g},C,B){let Q=r.mul(r.pow(2,C.octave),xg(A)),E=r.div(15,B);const e=r.adsr(r.mul(C.attack,E),r.mul(C.decay,E),C.sustain,r.mul(C.release,E),I),t=r.adsr(r.mul(C.fattack,E),r.mul(C.fdecay,E),C.fsustain,r.mul(C.frelease,E),I),o=r.cos(r.mul(C.color,Math.PI/2)),i=r.sin(r.mul(C.color,Math.PI/2)),s=r.add(r.mul(o,r.noise()),r.mul(i,r.pinknoise())),a=r.bandpass(Q,C.bandq,s),c=r.max(20,r.min(2e4,r.add(C.cutoff,r.mul(r.mul(C.fenv,2e4),t)))),N=r.lowpass(c,C.cutq,a);return r.tanh(r.mul(C.on,C.gain,g,e,N))}const cD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},octave:{value:0,min:-2,max:2,step:1},noise:{value:.95,min:0,max:2,step:.01,fixed:2},feedback:{value:.95,min:.8,max:.99,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},bandq:{value:1,min:0,max:50,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function DD({gate:I,midi:A,vel:g},C,B){const Q=r.mul(r.pow(2,C.octave),xg(A));let E=r.div(15,B);const e=r.adsr(r.mul(C.attack,E),r.mul(C.decay,E),C.sustain,r.mul(C.release,E),I),t=r.adsr(r.mul(C.fattack,E),r.mul(C.fdecay,E),C.fsustain,r.mul(C.frelease,E),I),o=r.div(r.sr(),Q),i=r.mul(e,r.noise(),C.noise),s=r.bandpass(Q,C.bandq,i),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,t))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s),N=r.delay({size:44100},o,C.feedback,c);return r.mul(C.on,C.gain,g,r.tanh(N))}const hD={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},octave:{value:0,min:-2,max:2,step:1},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0}};function wD({gate:I,midi:A,vel:g},C,B){const Q=r.mul(r.pow(2,C.octave),xg(A));let E=r.div(15,B);const e=r.adsr(r.mul(C.attack,E),r.mul(C.decay,E),C.sustain,r.mul(C.release,E),I),t=r.sample({path:"piano"},I,r.div(Q,440)),o=r.mul(t,g,e,C.on,C.gain),i=r.lowpass(C.cutoff,C.cutq,o);return r.mul(48,r.compress(10,100,-48,2,i,i))}const ND={on:{value:1,min:0,max:1,step:1,hidden:!0},gain:{value:.8,min:0,max:2,step:.01},octave:{value:0,min:-2,max:2,step:1},shape:{value:.2,min:0,max:1,step:.01},vibdep:{value:.1,min:0,max:.5,step:.01,fixed:2},vibrate:{value:2,min:1,max:8,step:.01},cutoff:{value:200,min:10,max:2e4,step:1},cutq:{value:1.1,min:0,max:5,step:.1},attack:{value:1,min:.01,max:10,step:.01,hidden:!0},decay:{value:1,min:.1,max:10,step:.1,hidden:!0},sustain:{value:.5,min:0,max:1,step:.01,hidden:!0},release:{value:1,min:.1,max:10,step:.1,hidden:!0},fenv:{value:.5,min:-.95,max:8,step:.01},fattack:{value:1,min:.01,max:10,step:.01,hidden:!0},fdecay:{value:1,min:.1,max:10,step:.1,hidden:!0},fsustain:{value:.5,min:0,max:1,step:.01,hidden:!0},frelease:{value:1,min:.01,max:10,step:.1,hidden:!0}};function RD({gate:I,midi:A,vel:g},C,B){const Q=r.mul(r.pow(2,C.octave),xg(r.add(A,r.mul(C.vibdep,r.cycle(r.mul(C.vibrate,r.div(B,60))))))),E=r.cycle(Q),e=r.triangle(Q);let t=r.div(15,B);const o=r.adsr(r.mul(C.attack,t),r.mul(C.decay,t),C.sustain,r.mul(C.release,t),I),i=r.adsr(r.mul(C.fattack,t),r.mul(C.fdecay,t),C.fsustain,r.mul(C.frelease,t),I),s=r.mul(o,r.add(r.mul(r.cos(r.mul(C.shape,Math.PI/2)),E),r.mul(r.sin(r.mul(C.shape,Math.PI/2)),e))),a=r.add(C.cutoff,r.mul(C.cutoff,r.mul(C.fenv,i))),c=r.lowpass(r.max(20,r.min(2e4,a)),C.cutq,s);return r.tanh(r.mul(C.on,C.gain,g,c))}const cE={synth:{bpm:{value:120,min:10,max:500,step:1},vol:{value:.5,min:0,max:1,step:.01}},round:ND,fat:tD,noise:aD,string:cD,sampler:hD,srvb:sD,pingpong:nD},xg=I=>r.mul(440,r.pow(2,r.smooth(r.tau2pole(.001),r.div(r.sub(I,69),12))));class BI{constructor(A=!1){this.eventMap={},this.eventsSuspended=A==!0}addListener(A,g,C={}){if(typeof A=="string"&&A.length<1||A instanceof String&&A.length<1||typeof A!="string"&&!(A instanceof String)&&A!==BI.ANY_EVENT)throw new TypeError("The 'event' parameter must be a string or EventEmitter.ANY_EVENT.");if(typeof g!="function")throw new TypeError("The callback must be a function.");const B=new DE(A,this,g,C);return this.eventMap[A]||(this.eventMap[A]=[]),C.prepend?this.eventMap[A].unshift(B):this.eventMap[A].push(B),B}addOneTimeListener(A,g,C={}){C.remaining=1,this.addListener(A,g,C)}static get ANY_EVENT(){return Symbol.for("Any event")}hasListener(A,g){return A===void 0?this.eventMap[BI.ANY_EVENT]&&this.eventMap[BI.ANY_EVENT].length>0?!0:Object.entries(this.eventMap).some(([,C])=>C.length>0):this.eventMap[A]&&this.eventMap[A].length>0?g instanceof DE?this.eventMap[A].filter(B=>B===g).length>0:typeof g=="function"?this.eventMap[A].filter(B=>B.callback===g).length>0:g==null:!1}get eventNames(){return Object.keys(this.eventMap)}getListeners(A){return this.eventMap[A]||[]}suspendEvent(A){this.getListeners(A).forEach(g=>{g.suspended=!0})}unsuspendEvent(A){this.getListeners(A).forEach(g=>{g.suspended=!1})}getListenerCount(A){return this.getListeners(A).length}emit(A,...g){if(typeof A!="string"&&!(A instanceof String))throw new TypeError("The 'event' parameter must be a string.");if(this.eventsSuspended)return;let C=[],B=this.eventMap[BI.ANY_EVENT]||[];return this.eventMap[A]&&(B=B.concat(this.eventMap[A])),B.forEach(Q=>{if(Q.suspended)return;let E=[...g];Array.isArray(Q.arguments)&&(E=E.concat(Q.arguments)),Q.remaining>0&&(C.push(Q.callback.apply(Q.context,E)),Q.count++),--Q.remaining<1&&Q.remove()}),C}removeListener(A,g,C={}){if(A===void 0){this.eventMap={};return}else if(!this.eventMap[A])return;let B=this.eventMap[A].filter(Q=>g&&Q.callback!==g||C.remaining&&C.remaining!==Q.remaining||C.context&&C.context!==Q.context);B.length?this.eventMap[A]=B:delete this.eventMap[A]}async waitFor(A,g={}){return g.duration=parseInt(g.duration),(isNaN(g.duration)||g.duration<=0)&&(g.duration=1/0),new Promise((C,B)=>{let Q,E=this.addListener(A,()=>{clearTimeout(Q),C()},{remaining:1});g.duration!==1/0&&(Q=setTimeout(()=>{E.remove(),B("The duration expired before the event was emitted.")},g.duration))})}get eventCount(){return Object.keys(this.eventMap).length}}class DE{constructor(A,g,C,B={}){if(typeof A!="string"&&!(A instanceof String)&&A!==BI.ANY_EVENT)throw new TypeError("The 'event' parameter must be a string or EventEmitter.ANY_EVENT.");if(!g)throw new ReferenceError("The 'target' parameter is mandatory.");if(typeof C!="function")throw new TypeError("The 'callback' must be a function.");B.arguments!==void 0&&!Array.isArray(B.arguments)&&(B.arguments=[B.arguments]),B=Object.assign({context:g,remaining:1/0,arguments:void 0,duration:1/0},B),B.duration!==1/0&&setTimeout(()=>this.remove(),B.duration),this.arguments=B.arguments,this.callback=C,this.context=B.context,this.count=0,this.event=A,this.remaining=parseInt(B.remaining)>=1?parseInt(B.remaining):1/0,this.suspended=!1,this.target=g}remove(){this.target.removeListener(this.event,this.callback,{context:this.context,remaining:this.remaining})}}/** * The `Enumerations` class contains enumerations and arrays of elements used throughout the * library. All its properties are static and should be referenced using the class name. For * example: `Enumerations.CHANNEL_MESSAGES`. @@ -336,8 +336,8 @@ `)();global.navigator||(global.navigator={}),Object.assign(global.navigator,e)}try{}catch{global.performance=await Object.getPrototypeOf(async function(){}).constructor(` let perf_hooks = await import("perf_hooks"); return perf_hooks.performance; - `)()}}if(this.validation=A.validation!==!1,this.validation&&(typeof A=="function"&&(A={callback:A,sysex:g}),g&&(A.sysex=!0)),this.enabled)return typeof A.callback=="function"&&A.callback(),Promise.resolve();const C={timestamp:this.time,target:this,type:"error",error:void 0},B={timestamp:this.time,target:this,type:"midiaccessgranted"},Q={timestamp:this.time,target:this,type:"enabled"};try{typeof A.requestMIDIAccessFunction=="function"?this.interface=await A.requestMIDIAccessFunction({sysex:A.sysex,software:A.software}):this.interface=await navigator.requestMIDIAccess({sysex:A.sysex,software:A.software})}catch(E){return C.error=E,this.emit("error",C),typeof A.callback=="function"&&A.callback(E),Promise.reject(E)}this.emit("midiaccessgranted",B),this.interface.onstatechange=this._onInterfaceStateChange.bind(this);try{await this._updateInputsAndOutputs()}catch(E){return C.error=E,this.emit("error",C),typeof A.callback=="function"&&A.callback(E),Promise.reject(E)}return this.emit("enabled",Q),typeof A.callback=="function"&&A.callback(),Promise.resolve(this)}async disable(){return this.interface&&(this.interface.onstatechange=void 0),this._destroyInputsAndOutputs().then(()=>{navigator&&typeof navigator.close=="function"&&navigator.close(),this.interface=null;let A={timestamp:this.time,target:this,type:"disabled"};this.emit("disabled",A),this.removeListener()})}getInputById(A,g={disconnected:!1}){if(this.validation){if(!this.enabled)throw new Error("WebMidi is not enabled.");if(!A)return}if(g.disconnected){for(let C=0;C=0&&A<=127?k.getNoteDetails(k.offsetNumber(A,this.octaveOffset)).octave:!1}sanitizeChannels(A){return this.validation&&console.warn("The sanitizeChannels() method has been moved to the utilities class."),k.sanitizeChannels(A)}toMIDIChannels(A){return this.validation&&console.warn("The toMIDIChannels() method has been deprecated. Use Utilities.sanitizeChannels() instead."),k.sanitizeChannels(A)}guessNoteNumber(A){return this.validation&&console.warn("The guessNoteNumber() method has been deprecated. Use Utilities.guessNoteNumber() instead."),k.guessNoteNumber(A,this.octaveOffset)}getValidNoteArray(A,g={}){return this.validation&&console.warn("The getValidNoteArray() method has been moved to the Utilities.buildNoteArray()"),k.buildNoteArray(A,g)}convertToTimestamp(A){return this.validation&&console.warn("The convertToTimestamp() method has been moved to Utilities.toTimestamp()."),k.toTimestamp(A)}async _destroyInputsAndOutputs(){let A=[];return this.inputs.forEach(g=>A.push(g.destroy())),this.outputs.forEach(g=>A.push(g.destroy())),Promise.all(A).then(()=>{this._inputs=[],this._outputs=[]})}_onInterfaceStateChange(A){this._updateInputsAndOutputs();let g={timestamp:A.timeStamp,type:A.port.state,target:this};if(A.port.state==="connected"&&A.port.connection==="open"){A.port.type==="output"?g.port=this.getOutputById(A.port.id):A.port.type==="input"&&(g.port=this.getInputById(A.port.id)),this.emit(A.port.state,g);const C=Object.assign({},g);C.type="portschanged",this.emit(C.type,C)}else if(A.port.state==="disconnected"&&A.port.connection==="pending"){A.port.type==="input"?g.port=this.getInputById(A.port.id,{disconnected:!0}):A.port.type==="output"&&(g.port=this.getOutputById(A.port.id,{disconnected:!0})),this.emit(A.port.state,g);const C=Object.assign({},g);C.type="portschanged",this.emit(C.type,C)}}async _updateInputsAndOutputs(){return Promise.all([this._updateInputs(),this._updateOutputs()])}async _updateInputs(){if(!this.interface)return;for(let g=this._inputs.length-1;g>=0;g--){const C=this._inputs[g];Array.from(this.interface.inputs.values()).find(Q=>Q===C._midiInput)||(this._disconnectedInputs.push(C),this._inputs.splice(g,1))}let A=[];return this.interface.inputs.forEach(g=>{if(!this._inputs.find(C=>C._midiInput===g)){let C=this._disconnectedInputs.find(B=>B._midiInput===g);C||(C=new dD(g)),this._inputs.push(C),A.push(C.open())}}),Promise.all(A)}async _updateOutputs(){if(!this.interface)return;for(let g=this._outputs.length-1;g>=0;g--){const C=this._outputs[g];Array.from(this.interface.outputs.values()).find(Q=>Q===C._midiOutput)||(this._disconnectedOutputs.push(C),this._outputs.splice(g,1))}let A=[];return this.interface.outputs.forEach(g=>{if(!this._outputs.find(C=>C._midiOutput===g)){let C=this._disconnectedOutputs.find(B=>B._midiOutput===g);C||(C=new dB(g)),this._outputs.push(C),A.push(C.open())}}),Promise.all(A)}get enabled(){return this.interface!==null}get inputs(){return this._inputs}get isNode(){return this.validation&&console.warn("WebMidi.isNode has been deprecated. Use Utilities.isNode instead."),k.isNode}get isBrowser(){return this.validation&&console.warn("WebMidi.isBrowser has been deprecated. Use Utilities.isBrowser instead."),k.isBrowser}get octaveOffset(){return this._octaveOffset}set octaveOffset(A){if(this.validation&&(A=parseInt(A),isNaN(A)))throw new TypeError("The 'octaveOffset' property must be an integer.");this._octaveOffset=A}get outputs(){return this._outputs}get supported(){return typeof navigator<"u"&&!!navigator.requestMIDIAccess}get sysexEnabled(){return!!(this.interface&&this.interface.sysexEnabled)}get time(){return performance.now()}get version(){return"3.1.11"}get flavour(){return"esm"}get CHANNEL_EVENTS(){return this.validation&&console.warn("The CHANNEL_EVENTS enum has been moved to Enumerations.CHANNEL_EVENTS."),y.CHANNEL_EVENTS}get MIDI_SYSTEM_MESSAGES(){return this.validation&&console.warn("The MIDI_SYSTEM_MESSAGES enum has been moved to Enumerations.SYSTEM_MESSAGES."),y.SYSTEM_MESSAGES}get MIDI_CHANNEL_MODE_MESSAGES(){return this.validation&&console.warn("The MIDI_CHANNEL_MODE_MESSAGES enum has been moved to Enumerations.CHANNEL_MODE_MESSAGES."),y.CHANNEL_MODE_MESSAGES}get MIDI_CONTROL_CHANGE_MESSAGES(){return this.validation&&console.warn("The MIDI_CONTROL_CHANGE_MESSAGES enum has been replaced by the Enumerations.CONTROL_CHANGE_MESSAGES array."),y.MIDI_CONTROL_CHANGE_MESSAGES}get MIDI_REGISTERED_PARAMETER(){return this.validation&&console.warn("The MIDI_REGISTERED_PARAMETER enum has been moved to Enumerations.REGISTERED_PARAMETERS."),y.REGISTERED_PARAMETERS}get NOTES(){return this.validation&&console.warn("The NOTES enum has been deprecated."),["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"]}}const J=new yD;J.constructor=null;const RC=WI({}),yB=WI({}),RI=ZA({enabled:!1,playing:!1,stopped:!0}),Jt=ZA({number:57,velocity:0,channel:1,timestamp:0,port:null}),kt=ZA({}),tC=WI([]);function LC(){return ng(()=>{RI.enabled||RI.enabled===null||J.enable().then(()=>{RI.enabled=!0,wE(),J.addListener("connected",wE),J.addListener("disconnected",I=>{I.port.type=="input"?delete RC[I.port.id]:I.port.type=="output"&&delete yB[I.port.id]})}).catch(I=>RI.enabled=null)}),{midi:RI,inputs:RC,outputs:yB,WebMidi:J,midiLog:tC,midiNote:Jt,activeNotes:kt}}function wE(){J.inputs.forEach(I=>{RC[I.id]={name:I.name,manufacturer:I.manufacturer,event:null},I.removeListener(),I.addListener("start",()=>{RI.playing=!0,RI.stopped=!1}),I.addListener("stop",()=>{RI.playing=!1,RI.stopped=Date.now()}),I.addListener("midimessage",g=>{var Q;if(((Q=g==null?void 0:g.message)==null?void 0:Q.type)==="clock")return;const{timestamp:C,message:B}=g;RC[I.id].message=B,tC.unshift({timestamp:C,message:B}),tC.length>100&&tC.pop()}),I.addListener("noteon",A),I.addListener("noteoff",A);function A({type:g,note:{number:C,attack:B},message:{channel:Q},timestamp:E,port:{id:e}}){const t=g=="noteoff"?0:B;Object.assign(Jt,{number:C,velocity:t,channel:Q,timestamp:E,port:e}),kt[C]=t}}),J.outputs.forEach(I=>{yB[I.id]={name:I.name,manufacturer:I.manufacturer}})}const MB=ZA({}),GB=ZA({}),mI=ZA({});function MD(){const I=oA(!1),A=oA(!1);let g,C;const{controls:B,cv:Q,groups:E,initRefs:e}=fc(cE,"el"),{voices:t,cycleNote:o,initVoices:i,getVoiceParams:s,stopAll:a}=dc();async function c(){if(I.value)return;I.value=!0,A.value=!0,g=new(window.AudioContext||window.webkitAudioContext),C=new uc,(await C.initialize(g,{numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[2]})).connect(g.destination),e(C),i(C),C.on("meter",O=>MB[O.source]={max:O.max,min:O.min}),C.on("scope",O=>GB[O.source]=Array.from(O==null?void 0:O.data[0].values())),C.on("fft",O=>mI[O.source]=[Array.from(O==null?void 0:O.data.real.values()),Array.from(O==null?void 0:O.data.imag.values())]),C.on("error",O=>console.log(O));let w=await fetch("/A4.mp3"),Z=await g.decodeAudioData(await w.arrayBuffer());C.updateVirtualFileSystem({piano:Z.getChannelData(0)});const sA=r.tanh(r.mul(Q.synth.vol,r.add(...t.map((O,wA)=>{const PA=s(wA);return r.add(RD(PA,Q.round,Q.synth.bpm),iD(PA,Q.fat,Q.synth.bpm),lD(PA,Q.noise,Q.synth.bpm),DD(PA,Q.string,Q.synth.bpm),wD(PA,Q.sampler,Q.synth.bpm))})))),DA=r.mul(0,r.meter({name:"sample_rate"},r.sr())),hA=r.fft({name:"main",size:2048},r.scope({name:"main",size:512},r.add(DA,sA))),vA=rD([hA,hA],Q.pingpong,Q.synth.bpm),P=oD({key:"srvb",sampleRate:48e3,size:Q.srvb.size,decay:Q.srvb.decay,mod:Q.srvb.mod,mix:r.mul(Q.srvb.mix,Q.srvb.on)},...vA);C.render(...P)}function N(R=57,w=1){A.value||c(),g.state==="suspended"&&g.resume(),o(R,w)}function M(R=57){o(R,0)}const d=fI(2,0,4),{midiNote:m,activeNotes:b}=LC();return document.addEventListener("keydown",R=>{if(R.code=="Digit1"&&d.value--,R.code=="Equal"&&d.value++,R.repeat||!gC[R.code]||R.ctrlKey||R.altKey||R.metaKey)return;R.code=="Slash"&&R.preventDefault();const w=gC[R.code]+d.value*12;Object.assign(m,{number:w,velocity:1,channel:0,timestamp:Date.now(),port:"keyboard"}),b[w]=1}),document.addEventListener("keyup",R=>{if(!gC[R.code])return;const w=gC[R.code]+d.value*12;Object.assign(m,{number:w,velocity:0,channel:0,timestamp:Date.now(),port:"keyboard"}),b[w]=0}),{controls:B,params:cE,keyOffset:d,groups:E,play:N,stop:M,stopAll:a,initiated:I,started:A,meters:MB,scopes:GB,FFTs:mI,voices:t}}const CI=["A","A#","B","C","C#","D","D#","E","F","F#","G","G#"],GD=["1P","2m","2M","3m","3M","4P","TT","5P","6m","6M","7m","7M"];function rI(I=0,A,g=1,C=1){return A===void 0&&(A=Math.floor(I/12)),`hsla(${I%12*30},${g*100}%,${Math.abs(A+2)*6}%,${C})`}function FD(I,A,g){return rI(UD(I)+12*2,void 0,A,g)}function UD(I,A=440){return 12*(Math.log(Number(I)/A)/Math.log(2))}const mD={__name:"ShowFFT",props:{name:{default:"main",type:String}},setup(I){const A=I,g=ZA({sr:uA(()=>{var Q;return((Q=MB.sample_rate)==null?void 0:Q.max)||48e3}),data:uA(()=>(mI==null?void 0:mI[A.name])||[[],[]]),freq:uA(()=>g.data[0].map((Q,E)=>E*g.sr/(g.data[0].length||1))),total:uA(()=>g.data[0].map((Q,E)=>Math.log2(1+Math.abs(Q)+Math.abs(g.data[1][E]))))});let C=oA(null);ng(B),AI(()=>mI==null?void 0:mI[A.name],B,{deep:!0});function B(){if(!C.value||!(g!=null&&g.total))return;let Q=C.value.getContext("2d");Q.clearRect(0,0,C.value.width,C.value.height);for(let E=0;E(z(),IA("canvas",{class:"max-w-full w-full",ref_key:"canvas",ref:C,height:"320",width:"800"},null,512))}},SD={__name:"ShowScope",props:{name:{default:"main",type:String},color:{default:"white",type:String},triggerLevel:{default:0,type:Number}},setup(I){const A=I,g=oA(null);let C=null;ng(()=>{g.value&&(g.value.width=g.value.clientWidth,g.value.height=g.value.clientHeight),B()}),JC(()=>{Q()});function B(){C=requestAnimationFrame(e)}function Q(){C&&cancelAnimationFrame(C)}function E(t,o){for(let i=0;io)return i;return 0}function e(){if(!g.value)return;const t=g.value.getContext("2d"),{width:o,height:i}=g.value,s=GB[A.name];if(!s||s.length<2){C=requestAnimationFrame(e);return}t.clearRect(0,0,o,i),t.strokeStyle=A.color,t.lineWidth=3;const a=E(s,A.triggerLevel),c=o/s.length;t.beginPath();for(let N=0;N(z(),IA("canvas",{class:"w-full h-full",ref_key:"canvas",ref:g},null,512))}},YD="0.3.4";function Kt(I){return I!==null&&typeof I=="object"&&"name"in I&&typeof I.name=="string"}function pt(I){return I!==null&&typeof I=="object"&&"step"in I&&typeof I.step=="number"&&"alt"in I&&typeof I.alt=="number"&&!isNaN(I.step)&&!isNaN(I.alt)}var bt=[0,2,4,-1,1,3,5],Lt=bt.map(I=>Math.floor(I*7/12));function Tt(I){const{step:A,alt:g,oct:C,dir:B=1}=I,Q=bt[A]+7*g;if(C===void 0)return[B*Q];const E=C-Lt[A]-4*g;return[B*Q,B*E]}var JD=[3,0,4,1,5,2,6];function kD(I){const[A,g,C]=I,B=JD[KD(A)],Q=Math.floor((A+1)/7);if(g===void 0)return{step:B,alt:Q,dir:C};const E=g+4*Q+Lt[B];return{step:B,alt:Q,oct:E,dir:C}}function KD(I){const A=(I+1)%7;return A<0?7+A:A}var NE=(I,A)=>Array(Math.abs(A)+1).join(I),FB=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),pD="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",bD="(AA|A|P|M|m|d|dd)([-+]?\\d+)",LD=new RegExp("^"+pD+"|"+bD+"$");function TD(I){const A=LD.exec(`${I}`);return A===null?["",""]:A[1]?[A[1],A[2]]:[A[4],A[3]]}var RE={};function uC(I){return typeof I=="string"?RE[I]||(RE[I]=HD(I)):pt(I)?uC(ZD(I)):Kt(I)?uC(I.name):FB}var uE=[0,2,4,5,7,9,11],Ht="PMMPPMM";function HD(I){const A=TD(I);if(A[0]==="")return FB;const g=+A[0],C=A[1],B=(Math.abs(g)-1)%7,Q=Ht[B];if(Q==="M"&&C==="P")return FB;const E=Q==="M"?"majorable":"perfectable",e=""+g+C,t=g<0?-1:1,o=g===8||g===-8?g:t*(B+1),i=VD(E,C),s=Math.floor((Math.abs(g)-1)/7),a=t*(uE[B]+i+12*s),c=(t*(uE[B]+i)%12+12)%12,N=Tt({step:B,alt:i,oct:s,dir:t});return{empty:!1,name:e,num:g,q:C,step:B,alt:i,dir:t,type:E,simple:o,semitones:a,chroma:c,coord:N,oct:s}}function VD(I,A){return A==="M"&&I==="majorable"||A==="P"&&I==="perfectable"?0:A==="m"&&I==="majorable"?-1:/^A+$/.test(A)?A.length:/^d+$/.test(A)?-1*(I==="perfectable"?A.length:A.length+1):0}function ZD(I){const{step:A,alt:g,oct:C=0,dir:B}=I;if(!B)return"";const Q=A+1+7*C,E=Q===0?A+1:Q,e=B<0?"-":"",t=Ht[A]==="M"?"majorable":"perfectable";return e+E+vD(t,g)}function vD(I,A){return A===0?I==="majorable"?"M":"P":A===-1&&I==="majorable"?"m":A>0?NE("A",A):NE("d",I==="perfectable"?A:A+1)}var fE=(I,A)=>Array(Math.abs(A)+1).join(I),Vt=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),dE=new Map,OD=I=>"CDEFGAB".charAt(I),xD=I=>I<0?fE("b",-I):fE("#",I),qD=I=>I[0]==="b"?-I.length:I.length;function EI(I){const A=JSON.stringify(I),g=dE.get(A);if(g)return g;const C=typeof I=="string"?zD(I):pt(I)?EI(_D(I)):Kt(I)?EI(I.name):Vt;return dE.set(A,C),C}var WD=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function jD(I){const A=WD.exec(I);return A?[A[1].toUpperCase(),A[2].replace(/x/g,"##"),A[3],A[4]]:["","","",""]}function PD(I){return EI(kD(I))}var XD=(I,A)=>(I%A+A)%A,BB=[0,2,4,5,7,9,11];function zD(I){const A=jD(I);if(A[0]===""||A[3]!=="")return Vt;const g=A[0],C=A[1],B=A[2],Q=(g.charCodeAt(0)+3)%7,E=qD(C),e=B.length?+B:void 0,t=Tt({step:Q,alt:E,oct:e}),o=g+C+B,i=g+C,s=(BB[Q]+E+120)%12,a=e===void 0?XD(BB[Q]+E,12)-12*99:BB[Q]+E+12*(e+1),c=a>=0&&a<=127?a:null,N=e===void 0?null:Math.pow(2,(a-69)/12)*440;return{empty:!1,acc:C,alt:E,chroma:s,coord:t,freq:N,height:a,letter:g,midi:c,name:o,oct:e,pc:i,step:Q}}function _D(I){const{step:A,alt:g,oct:C}=I,B=OD(A);if(!B)return"";const Q=B+xD(g);return C||C===0?Q+C:Q}function Zt(I,A){const g=EI(I),C=Array.isArray(A)?A:uC(A).coord;if(g.empty||!C||C.length<2)return"";const B=g.coord,Q=B.length===1?[B[0]+C[0]]:[B[0]+C[0],B[1]+C[1]];return PD(Q).name}function BQ(I,A){const g=A.length,C=(I%g+g)%g;return A.slice(C,g).concat(A.slice(0,C))}var zI={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},vt=I=>Number(I).toString(2).padStart(12,"0"),yE=I=>parseInt(I,2),$D=/^[01]{12}$/;function Ot(I){return $D.test(I)}var Ah=I=>typeof I=="number"&&I>=0&&I<=4095,Ih=I=>I&&Ot(I.chroma),ME={[zI.chroma]:zI};function QQ(I){const A=Ot(I)?I:Ah(I)?vt(I):Array.isArray(I)?eh(I):Ih(I)?I.chroma:zI.chroma;return ME[A]=ME[A]||Eh(A)}var gh=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Ch(I){const A=[];for(let g=0;g<12;g++)I.charAt(g)==="1"&&A.push(gh[g]);return A}function Bh(I){const A=QQ(I);return g=>{const C=EI(g);return A&&!C.empty&&A.chroma.charAt(C.chroma)==="1"}}function Qh(I){const A=I.split("");return A.map((g,C)=>BQ(C,A).join(""))}function Eh(I){const A=yE(I),g=Qh(I).map(yE).filter(Q=>Q>=2048).sort()[0],C=vt(g),B=Ch(I);return{empty:!1,name:"",setNum:A,chroma:I,normalized:C,intervals:B}}function eh(I){if(I.length===0)return zI.chroma;let A;const g=[0,0,0,0,0,0,0,0,0,0,0,0];for(let C=0;Csh(B,Q))}function sh(I,A){iC[A]=I}function nh(I){const A=g=>I.indexOf(g)!==-1;return A("5A")?"Augmented":A("3M")?"Major":A("5d")?"Diminished":A("3m")?"Minor":"Unknown"}ih.forEach(([I,A,g])=>oh(I.split(" "),g.split(" "),A));xt.sort((I,A)=>I.setNum-A.setNum);var rh=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],ah=rh,qt={...zI,intervals:[],aliases:[]},TC=[],PI={};function Wt(){return TC.map(I=>I.name)}function rg(I){return PI[I]||qt}var jt=rg;function Lg(){return TC.slice()}var Pt=Lg;function Xt(){return Object.keys(PI)}function zt(){TC=[],PI={}}function EQ(I,A,g=[]){const C={...QQ(I),name:A,intervals:I,aliases:g};return TC.push(C),PI[C.name]=C,PI[C.setNum]=C,PI[C.chroma]=C,C.aliases.forEach(B=>_t(C,B)),C}function _t(I,A){PI[A]=I}ah.forEach(([I,A,...g])=>EQ(I.split(" "),A,g));var lh={names:Wt,get:rg,all:Lg,add:EQ,removeAll:zt,keys:Xt,entries:Pt,scaleType:jt};const CC=Object.freeze(Object.defineProperty({__proto__:null,NoScaleType:qt,add:EQ,addAlias:_t,all:Lg,default:lh,entries:Pt,get:rg,keys:Xt,names:Wt,removeAll:zt,scaleType:jt},Symbol.toStringTag,{value:"Module"}));var ch=I=>I.name,Dh=I=>I.map(EI).filter(A=>!A.empty),$t=(I,A)=>I.height-A.height;function hh(I,A){return A=A||$t,Dh(I).sort(A).map(ch)}function wh(I){return hh(I,$t).filter((A,g,C)=>g===0||A!==C[g-1])}var eQ=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],GE={...zI,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},Nh=eQ.map(Rh),UB={};Nh.forEach(I=>{UB[I.name]=I,I.aliases.forEach(A=>{UB[A]=I})});function Ai(I){return typeof I=="string"?UB[I.toLowerCase()]||GE:I&&I.name?Ai(I.name):GE}function Rh(I){const[A,g,C,B,Q,E,e]=I,t=e?[e]:[],o=Number(g).toString(2);return{empty:!1,intervals:rg(B).intervals,modeNum:A,chroma:o,normalized:o,name:B,setNum:g,alt:C,triad:Q,seventh:E,aliases:t}}function Ii(I){return(A,g)=>{const C=Ai(A);if(C.empty)return[];const B=BQ(C.modeNum,I),Q=C.intervals.map(E=>Zt(g,E));return B.map((E,e)=>Q[e]+E)}}Ii(eQ.map(I=>I[4]));Ii(eQ.map(I=>I[5]));var uh={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function fh(I){if(typeof I!="string")return["",""];const A=I.indexOf(" "),g=EI(I.substring(0,A));if(g.empty){const B=EI(I);return B.empty?["",I]:[B.name,""]}const C=I.substring(g.name.length+1).toLowerCase();return[g.name,C.length?C:""]}function dh(I){const A=Array.isArray(I)?I:fh(I),g=EI(A[0]).name,C=rg(A[1]);if(C.empty)return uh;const B=C.name,Q=g?C.intervals.map(e=>Zt(g,e)):[],E=g?g+" "+B:B;return{...C,name:E,type:B,tonic:g,notes:Q}}function yh(I){const A=I.map(B=>EI(B).pc).filter(B=>B),g=A[0],C=wh(A);return BQ(C.indexOf(g),C)}function Mh(){const I=fI(XI("midi-keys-begin",45),0,127),A=fI(XI("midi-keys-end",83),I,127),g=gE(I),C=gE(A),B=oA(),Q=oA(),E=uA(()=>Array(C.value+1-g.value).fill(0).map((e,t)=>t+g.value));return uI({onDrag(e){e.event.preventDefault();let t=I.value+e.delta[0]/5;t+1<=A.value&&(I.value=Math.round(t))},onWheel(e){e.event.preventDefault();let t=I.value-e.velocities[0]/5;t+1<=A.value&&(I.value=Math.round(t))}},{domTarget:B,eventOptions:{passive:!1}}),uI({onDrag(e){e.event.preventDefault();let t=A.value+e.delta[0]/5;t>I.value&&(A.value=t)},onWheel(e){e.event.preventDefault();let t=A.value-e.velocities[0]/5;t-1>I.value&&(A.value=t)}},{domTarget:Q,eventOptions:{passive:!1}}),{begin:I,end:A,roundBegin:g,roundEnd:C,beginControl:B,endControl:Q,range:E}}const Gh=[...CI].map((I,A)=>({name:I,pitch:A})),NA=ZA({tonic:fI(XI("global-tonic",0),0,11),note:uA(()=>Gh[NA.tonic]),chroma:XI("global-chroma","101011010101"),set:uA(()=>rg(NA.chroma)),full:uA(()=>{let I=NA.note.name+"4 "+NA.set.name;return dh(I)}),pcs:uA(()=>yh(NA.full.notes)),isIn:uA(()=>Bh(NA.pcs))}),Fh=["transform"],Uh=["width","height","fill"],mh={class:"marks pointer-events-none"},Sh=["x1","x2","y2","stroke"],Yh=["r","cx","cy","opacity","fill"],Jh=["x","y","font-size"],kh=["x","y","font-size"],Kh=["fill","y","x","font-size","font-weight"],ph={__name:"MidiKeysNote",props:{note:{type:Number,default:0},step:{type:Number,default:0},width:{type:Number,default:1200},height:{type:Number,default:400},pressed:{type:Boolean,default:!1}},setup(I){const{activeNotes:A,midiNote:g}=LC();function C(e,t=10){return e=Math.max(0,Math.min(1,e)),Math.log(1+t*e)/Math.log(1+t)}function B(e,t){t==null||t.preventDefault();const o=t.target.getBoundingClientRect(),i=t.clientY-o.top,s=o.height,a=i/s,N=.3+C(a)*.7,M=NA.isIn(CI[(e+3)%12])?1:.5,d=N*M;Object.assign(g,{number:e,velocity:d,channel:0,timestamp:Date.now(),port:"keys"}),A[e]=d}function Q(e){Object.assign(g,{number:e,velocity:0,channel:0,timestamp:Date.now(),port:"keys"}),A[e]=0}const E=oA();return(e,t)=>(z(),IA("g",{class:"note",transform:`translate(${I.step*I.width},0)`,"text-anchor":"middle",ref_key:"noteKey",ref:E},[F("rect",{width:I.width,height:I.height,fill:h(rI)(I.note+3,void 0,h(A)[I.note]?1:.1,h(NA).isIn(h(CI)[(I.note+3)%12])?1:.4),onPointerdown:t[0]||(t[0]=cB(o=>B(I.note,o),["prevent"])),onPointerenter:t[1]||(t[1]=o=>I.pressed?B(I.note,o):null),onPointerleave:t[2]||(t[2]=o=>Q(I.note)),onPointerup:t[3]||(t[3]=cB(o=>Q(I.note),["prevent"])),onTouchcancel:t[4]||(t[4]=o=>Q(I.note))},null,40,Uh),F("g",mh,[h(NA).tonic==(I.note+3)%12?(z(),IA("line",{key:0,x1:I.width/2,x2:I.width/2,y1:0,y2:I.height,"stroke-width":"6",opacity:.9,stroke:h(A)[I.note]?"white":h(rI)(I.note+3,0,1,1)},null,8,Sh)):GI("",!0),F("circle",{r:h(NA).tonic==(I.note+3)%12?I.width/3:I.width/8,cx:I.width/2,cy:I.height-I.width/2,opacity:h(A)[I.note]?1:.3,fill:h(NA).isIn(h(CI)[(I.note+3)%12])?"white":"black"},null,8,Yh),F("text",{class:"opacity-75 number",x:I.width/2,y:I.width*1.8,"font-size":I.width*.333},EA(h(GD)[(I.note+3-h(NA).tonic)%12]),9,Jh),F("text",{class:"opacity-55",x:I.width/2,y:I.width+14,"font-size":I.width*.333},EA(I.note),9,kh),F("text",{fill:h(NA).isIn(h(CI)[(I.note+3)%12])?"black":"#777e",y:I.width/2+10,x:I.width/2,"font-size":I.width*.5,"font-weight":h(NA).tonic==(I.note+3)%12?"bold":"normal"},EA(h(CI)[(I.note+3)%12]),9,Kh)])],8,Fh))}},bh=["viewBox"],Lh=["transform"],Th=["transform"],Hh=["height","width","fill"],Vh=["x","y"],Zh=["transform","stroke"],vh=["transform"],Oh=["transform"],xh=["width","height"],qh=["y"],Wh=["transform","opacity"],jh=["transform"],Ph={class:"show",transform:"translate(30,15)"},Xh=["cy","fill"],zh=["transform"],_h=["height","width","fill"],$h=["y"],Aw=["transform"],Iw=["height","width","fill"],gw=["x","y"],Cw=["transform"],Bw=["transform","stroke"],Qw=["x","width"],Ew=["transform"],ew=["transform"],tw=["width","height"],iw={__name:"MidiKeys",props:{width:{type:Number,default:1100},height:{type:Number,default:340},controlOffset:{type:Number,default:100},slotOffset:{type:Number,default:100}},setup(I){const{activeNotes:A}=LC(),{roundBegin:g,roundEnd:C,beginControl:B,endControl:Q,range:E}=Mh(),e=oA(),t=oA(),o=oA(!1),i=oA(),s=oA(NA.tonic*100);AI(s,m=>{NA.tonic=Math.round((m/100%12+12)%12)}),uI({onDrag(m){m.event.preventDefault(),s.value+=m.delta[0]},onWheel(m){m.event.preventDefault(),s.value-=m.velocities[0]}},{domTarget:i,eventOptions:{passive:!1}});const a=oA(),c=fI(XI("midikeys-scale",1),1,Lg().length-1);uI({onDrag(m){m.event.preventDefault(),c.value+=m.delta[0]/5},onWheel(m){m.event.preventDefault(),c.value-=m.velocities[0]/5}},{domTarget:a,eventOptions:{passive:!1}});const N=uA(()=>{let m=Math.round(c.value);return Lg()[m]});AI(N,m=>{NA.chroma=m.chroma});const M=XI("filter-keys",!0),d=uA(()=>M.value?E.value.filter(m=>NA.isIn(CI[(m+3)%12])):E.value);return(m,b)=>(z(),IA("svg",{class:"cursor-pointer select-none touch-none shadow-xl mx-auto",viewBox:`0 -${I.slotOffset} ${I.width} ${I.height+I.controlOffset}`,version:"1.1",baseProfile:"full",xmlns:"http://www.w3.org/2000/svg",style:{"touch-action":"none"},ref_key:"svg",ref:e,onPointerdown:b[1]||(b[1]=R=>o.value=!0),onPointercancel:b[2]||(b[2]=R=>o.value=!1),onPointerup:b[3]||(b[3]=R=>o.value=!1),onPointerleave:b[4]||(b[4]=R=>o.value=!1)},[F("g",{class:"slot",transform:`translate(0,${-I.slotOffset-I.controlOffset})`},[oe(m.$slots,"default",{},void 0)],8,Lh),F("g",{class:"offset",transform:`translate(0,${-I.controlOffset})`},[F("g",{class:"tonic",ref_key:"tonicControl",ref:i},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(NA).tonic,3,.8)},null,8,Hh),F("text",{class:"font-bold text-5xl",x:I.width/10,"text-anchor":"middle",y:I.controlOffset*.75},EA(h(CI)[h(NA).tonic%12]),9,Vh),(z(!0),IA(nA,null,XA(h(CI),(R,w)=>(z(),IA("line",{transform:`translate(${(w/12+1/24)*I.width/5},0)`,y2:16,"stroke-width":"6","stroke-linecap":"round",stroke:h(rI)(w,5,.4)},null,8,Zh))),256)),F("line",{y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${(s.value/1200%1+1)%1*I.width/5+I.width/120},0)`,stroke:"white"},null,8,vh)],512),F("g",{class:"scale",ref_key:"scaleControl",ref:a,transform:`translate(${I.width/5},0)`},[F("rect",{width:I.width*2/5,height:I.controlOffset,fill:"#aaa"},null,8,xh),F("text",{class:"text-4xl",x:50,y:I.controlOffset*.75},EA(N.value.name),9,qh),(z(!0),IA(nA,null,XA(h(CC).all().length,(R,w)=>(z(),IA("line",{transform:`translate(${(w/h(CC).all().length+1/h(CC).all().length)*I.width*2/5},0)`,y2:36,opacity:R==Math.round(h(c))?1:.2,"stroke-width":"2","stroke-linecap":"round",stroke:"currentColor"},null,8,Wh))),256)),F("line",{y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${h(c)/h(CC).all().length*I.width*2/5},0)`,stroke:"white"},null,8,jh),F("g",Ph,[F("circle",{onClick:b[0]||(b[0]=R=>M.value=!h(M)),cy:I.controlOffset*.5,r:"10",fill:h(M)?"black":"transparent",stroke:"black","stroke-width":4},null,8,Xh)])],8,Oh),F("g",{class:"begin",ref_key:"beginControl",ref:B,transform:`translate(${I.width*3/5},0)`},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(g)+3,void 0,h(A)[h(g)]?1:.1)},null,8,_h),F("text",{class:"font-bold text-5xl pointer-events-none",x:10,y:I.controlOffset*.75},EA(h(CI)[(h(g)+3)%12])+EA(Math.floor((Math.round(h(g))+3)/12)-1),9,$h)],8,zh),F("g",{class:"end",ref_key:"endControl",ref:Q,transform:`translate(${I.width*4/5},0)`},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(C)+3,void 0,h(A)[h(C)]?1:.1)},null,8,Iw),F("text",{class:"font-bold text-5xl pointer-events-none",x:I.width/5-20,"text-anchor":"end",y:I.controlOffset*.75},EA(h(CI)[(h(C)+3)%12])+EA(Math.floor((h(C)+3)/12)-1),9,gw)],8,Aw),F("g",{class:"range pointer-events-none",transform:`translate(${I.width*3/5},0)`},[(z(),IA(nA,null,XA(127,(R,w)=>F("line",{transform:`translate(${w/127*I.width*2/5},0)`,y2:16,opacity:".3","stroke-width":"2","stroke-linecap":"round",stroke:(w+3)%12==h(NA).tonic?h(rI)((w+3)%12):"white"},null,8,Bw)),64)),F("rect",{class:"ranger",x:h(g)/127*I.width*2/5,width:(h(C)-h(g))/127*I.width*2/5,height:"20",fill:"gray",opacity:.8},null,8,Qw),F("line",{class:"begin",y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${h(g)/127*I.width*2/5},0)`,stroke:"white"},null,8,Ew),F("line",{class:"end",y2:20,"stroke-width":"8","stroke-linecap":"round",stroke:"white",transform:`translate(${h(C)/127*I.width*2/5},0)`},null,8,ew)],8,Cw)],8,Th),F("g",{class:"keys",ref_key:"area",ref:t},[F("rect",{width:I.width,height:I.height,fill:"#333"},null,8,tw),(z(!0),IA(nA,null,XA(d.value,(R,w)=>(z(),JI(ph,{key:R,note:R,step:w,width:I.width/d.value.length,height:I.height,pressed:o.value},null,8,["note","step","width","height","pressed"]))),128))],512)],40,bh))}},ow=Xe(iw,[["__scopeId","data-v-3033e57b"]]),sw={class:"flex flex-col items-start transition-all duration-500 ease-out select-none rounded-8 shadow-xl w-full h-full text-white flex-1"},nw={class:"bg-dark-800 bg-op-40 p-2 text-light-800 flex gap-2 items-center flex-wrap w-full"},rw={class:"flex gap-1 items-center no-underline",href:"https://github.com/chromatone/elements/",target:"_blank"},aw={class:"sticky top-0 rounded-lg w-full z-100 shadow-lg"},lw={class:"flex flex-col p-2 pb-12 pt-4 gap-2"},cw={class:"flex items-center gap-2 flex-wrap w-full"},Dw={class:"gap-2 columns-2"},hw={class:"flex flex-wrap items-center border-1 rounded-xl"},ww={class:"flex flex-wrap gap-2 flex-1"},Nw=["onClick"],Rw=["onClick"],uw={class:"p-0"},fw={class:"flex flex-wrap gap-2"},dw={class:"relative flex flex-wrap items-center border-1 rounded-xl"},yw={class:"flex flex-wrap flex-1"},Mw={class:"flex flex-wrap gap-2 flex-1"},Gw=["onClick"],Fw=["onClick"],Uw={class:"p-0"},mw={key:0,class:"flex flex-wrap gap-2"},Sw={class:"text-xs"},Yw={class:"text-lg"},Jw={key:1,class:"bg-dark-300 p-2 flex w-full flex-col gap-1 max-h-16 overflow-y-scroll"},kw={class:"uppercase"},Kw={key:0,class:"i-la-cog"},pw={key:1,class:"op-80"},bw={class:"op-80"},Lw={class:"op-80"},Tw={__name:"App",setup(I){const{play:A,stop:g,stopAll:C,started:B,controls:Q,groups:E,voices:e,params:t}=MD(),{inputs:o,midiLog:i,midiNote:s}=LC();AI(s,b=>A(b.number,b.velocity)),vs("Escape",()=>{C()});const a=["round","fat","string","noise","sampler"],c=["pingpong","srvb"],{state:N}=OQ(c),{next:M,state:d,go:m}=OQ(a);return(b,R)=>(z(),IA("div",sw,[F("div",nw,[R[18]||(R[18]=MQ('

Chromatone

Elements

',3)),F("a",rw,[R[16]||(R[16]=F("div",{class:"i-la-github"},null,-1)),F("span",null,"v."+EA(h(YD)),1)]),h(B)?GI("",!0):(z(),IA("article",{key:0,class:"z-1000 fixed top-0 left-0 right-0 p-8 flex flex-col gap-6 bg-dark-800 bg-op-50 backdrop-blur",onPointerdown:R[0]||(R[0]=w=>h(A)(h(s).number)),onPointerup:R[1]||(R[1]=w=>h(g)(h(s).number))},R[17]||(R[17]=[MQ('

Chromatone

Elements

Multilayered polyphonic synthesizer app

Explore unique sounds of 6 voice polyphony, 5 layers of sound generators for each of them and 2 global effects with any MIDI controller, laptop keyboard and flexible onscreen keyboard with choice of scales while analyzing the output on the global oscilloscope and colorized FFT time-frequency bars. Notes and frequencies are set according to Chromatone.

',4)]),32))]),F("div",aw,[F("div",{class:"relative z-10 w-full bg-dark-800 bg-op-50 backdrop-blur",onPointerdown:R[2]||(R[2]=w=>h(A)(h(s).number)),onPointerup:R[3]||(R[3]=w=>h(g)(h(s).number))},[SA(mD,{class:"max-h-30vh"}),SA(SD,{class:"absolute top-0 pointer-events-none"})],32)]),F("div",lw,[F("div",cw,[F("button",{class:"active-brightness-120 transition hover-op-100 op-80 border-2 text-xl p-4 cursor-pointer rounded-full active-bg-green-200",style:OI({backgroundColor:h(rI)(h(s).number+3)}),onPointerdown:R[4]||(R[4]=w=>h(A)(h(s).number)),onPointerup:R[5]||(R[5]=w=>h(g)(h(s).number))},null,36),F("div",Dw,[(z(!0),IA(nA,null,XA(h(e),w=>(z(),IA("div",{class:"p-2 flex-1 rounded-xl",key:w,style:OI({backgroundColor:h(rI)(w.midi.value-9,void 0,void 0,w.gate.value?1:.1)})},null,4))),128))]),F("div",hw,[SA(AC,Mg({modelValue:h(Q).synth.vol,"onUpdate:modelValue":R[6]||(R[6]=w=>h(Q).synth.vol=w)},h(t).synth.vol,{param:"VOL"}),null,16,["modelValue"]),SA(AC,Mg({modelValue:h(Q).synth.bpm,"onUpdate:modelValue":R[7]||(R[7]=w=>h(Q).synth.bpm=w)},h(t).synth.bpm,{param:"BPM"}),null,16,["modelValue"])]),F("div",ww,[(z(),IA(nA,null,XA(a,w=>F("a",{class:xI(["cursor-pointer no-underline uppercase p-2 bg-dark-300 rounded-xl border-1 border-black border-op-20 flex items-center gap-2 text-sm flex-1 transition",{"bg-dark-800":h(Q)[w].on,"border-white border-op-90":h(d)==w}]),key:w,onClick:Z=>d.value=w},[F("button",{class:xI(["p-1 rounded-full bg-dark-100 border-1",{"border-white border-op-90":h(Q)[w].on}]),style:OI({opacity:h(Q)[w].on?1:.2}),onClick:cB(Z=>h(Q)[w].on==0?h(Q)[w].on=1:h(Q)[w].on=0,["prevent","stop"])},R[19]||(R[19]=[F("div",{class:"i-la-power-off"},null,-1)]),14,Rw),F("div",uw,EA(w),1)],10,Nw)),64))])]),F("div",fw,[F("div",dw,[(z(!0),IA(nA,null,XA(h(E)[h(d)],(w,Z)=>(z(),JI(AC,Mg({key:Z,class:"w-4em flex-1",modelValue:h(Q)[h(d)][Z],"onUpdate:modelValue":sA=>h(Q)[h(d)][Z]=sA,ref_for:!0},h(t)[h(d)][Z],{param:Z}),null,16,["modelValue","onUpdate:modelValue","param"]))),128)),F("div",yw,[h(Q)[h(d)].attack?(z(),JI(tE,{key:0,title:"Amplitude Envelope",a:h(Q)[h(d)].attack,"onUpdate:a":R[8]||(R[8]=w=>h(Q)[h(d)].attack=w),d:h(Q)[h(d)].decay,"onUpdate:d":R[9]||(R[9]=w=>h(Q)[h(d)].decay=w),s:h(Q)[h(d)].sustain,"onUpdate:s":R[10]||(R[10]=w=>h(Q)[h(d)].sustain=w),r:h(Q)[h(d)].release,"onUpdate:r":R[11]||(R[11]=w=>h(Q)[h(d)].release=w)},null,8,["a","d","s","r"])):GI("",!0),h(Q)[h(d)].fattack?(z(),JI(tE,{key:1,title:"Filter Envelope",a:h(Q)[h(d)].fattack,"onUpdate:a":R[12]||(R[12]=w=>h(Q)[h(d)].fattack=w),d:h(Q)[h(d)].fdecay,"onUpdate:d":R[13]||(R[13]=w=>h(Q)[h(d)].fdecay=w),s:h(Q)[h(d)].fsustain,"onUpdate:s":R[14]||(R[14]=w=>h(Q)[h(d)].fsustain=w),r:h(Q)[h(d)].frelease,"onUpdate:r":R[15]||(R[15]=w=>h(Q)[h(d)].frelease=w)},null,8,["a","d","s","r"])):GI("",!0)])]),F("div",Mw,[(z(),IA(nA,null,XA(c,w=>F("a",{class:xI(["no-underline uppercase p-2 bg-dark-300 rounded-xl border-1 border-black border-op-20 flex items-center gap-2",{"bg-dark-800":h(N)==w,"border-white border-op-90":h(N)==w}]),key:w,onClick:Z=>N.value=w},[F("button",{class:xI(["p-1 rounded-full bg-dark-100 border-1",{"border-white border-op-90":h(Q)[w].on}]),style:OI({opacity:h(Q)[w].on?1:.2}),onClick:Z=>h(Q)[w].on==0?h(Q)[w].on=1:h(Q)[w].on=0},R[20]||(R[20]=[F("div",{class:"i-la-power-off"},null,-1)]),14,Fw),F("div",Uw,EA(w),1)],10,Gw)),64))]),(z(!0),IA(nA,null,XA([h(N)],w=>(z(),IA("div",{class:"relative flex flex-wrap items-center border-1 rounded-xl",key:w,style:{flex:"0 1 350px"}},[(z(!0),IA(nA,null,XA(h(E)[w],(Z,sA)=>(z(),JI(AC,Mg({key:sA,class:"w-4em flex-1",modelValue:h(Q)[w][sA],"onUpdate:modelValue":DA=>h(Q)[w][sA]=DA,ref_for:!0},h(t)[w][sA],{param:sA}),null,16,["modelValue","onUpdate:modelValue","param"]))),128))]))),128))])]),R[21]||(R[21]=F("div",{class:"flex-1"},null,-1)),SA(ow),h(o).length?(z(),IA("div",mw,[(z(!0),IA(nA,null,XA(h(o),(w,Z)=>(z(),IA("div",{class:"p-2 rounded-md bg-dark-300",key:Z},[F("div",Sw,EA(w==null?void 0:w.manufacturer),1),F("div",Yw,EA(w.name),1)]))),128))])):GI("",!0),h(i).length?(z(),IA("div",Jw,[(z(!0),IA(nA,null,XA(h(i),w=>(z(),IA("div",{class:"p-1 text-xs flex flex items-center gap-2",key:w},[F("div",kw,EA(w.message.type),1),w.message.isSystemMessage?(z(),IA("div",Kw)):GI("",!0),w.message.isChannelMessage?(z(),IA("div",pw,"CH"+EA(w.message.channel),1)):GI("",!0),F("div",bw,EA(w.message.dataBytes[0]),1),F("div",Lw,EA(w.message.dataBytes[1]),1)]))),128))])):GI("",!0)]))}};Ms(Tw).mount("#app"); - + `)()}}if(this.validation=A.validation!==!1,this.validation&&(typeof A=="function"&&(A={callback:A,sysex:g}),g&&(A.sysex=!0)),this.enabled)return typeof A.callback=="function"&&A.callback(),Promise.resolve();const C={timestamp:this.time,target:this,type:"error",error:void 0},B={timestamp:this.time,target:this,type:"midiaccessgranted"},Q={timestamp:this.time,target:this,type:"enabled"};try{typeof A.requestMIDIAccessFunction=="function"?this.interface=await A.requestMIDIAccessFunction({sysex:A.sysex,software:A.software}):this.interface=await navigator.requestMIDIAccess({sysex:A.sysex,software:A.software})}catch(E){return C.error=E,this.emit("error",C),typeof A.callback=="function"&&A.callback(E),Promise.reject(E)}this.emit("midiaccessgranted",B),this.interface.onstatechange=this._onInterfaceStateChange.bind(this);try{await this._updateInputsAndOutputs()}catch(E){return C.error=E,this.emit("error",C),typeof A.callback=="function"&&A.callback(E),Promise.reject(E)}return this.emit("enabled",Q),typeof A.callback=="function"&&A.callback(),Promise.resolve(this)}async disable(){return this.interface&&(this.interface.onstatechange=void 0),this._destroyInputsAndOutputs().then(()=>{navigator&&typeof navigator.close=="function"&&navigator.close(),this.interface=null;let A={timestamp:this.time,target:this,type:"disabled"};this.emit("disabled",A),this.removeListener()})}getInputById(A,g={disconnected:!1}){if(this.validation){if(!this.enabled)throw new Error("WebMidi is not enabled.");if(!A)return}if(g.disconnected){for(let C=0;C=0&&A<=127?k.getNoteDetails(k.offsetNumber(A,this.octaveOffset)).octave:!1}sanitizeChannels(A){return this.validation&&console.warn("The sanitizeChannels() method has been moved to the utilities class."),k.sanitizeChannels(A)}toMIDIChannels(A){return this.validation&&console.warn("The toMIDIChannels() method has been deprecated. Use Utilities.sanitizeChannels() instead."),k.sanitizeChannels(A)}guessNoteNumber(A){return this.validation&&console.warn("The guessNoteNumber() method has been deprecated. Use Utilities.guessNoteNumber() instead."),k.guessNoteNumber(A,this.octaveOffset)}getValidNoteArray(A,g={}){return this.validation&&console.warn("The getValidNoteArray() method has been moved to the Utilities.buildNoteArray()"),k.buildNoteArray(A,g)}convertToTimestamp(A){return this.validation&&console.warn("The convertToTimestamp() method has been moved to Utilities.toTimestamp()."),k.toTimestamp(A)}async _destroyInputsAndOutputs(){let A=[];return this.inputs.forEach(g=>A.push(g.destroy())),this.outputs.forEach(g=>A.push(g.destroy())),Promise.all(A).then(()=>{this._inputs=[],this._outputs=[]})}_onInterfaceStateChange(A){this._updateInputsAndOutputs();let g={timestamp:A.timeStamp,type:A.port.state,target:this};if(A.port.state==="connected"&&A.port.connection==="open"){A.port.type==="output"?g.port=this.getOutputById(A.port.id):A.port.type==="input"&&(g.port=this.getInputById(A.port.id)),this.emit(A.port.state,g);const C=Object.assign({},g);C.type="portschanged",this.emit(C.type,C)}else if(A.port.state==="disconnected"&&A.port.connection==="pending"){A.port.type==="input"?g.port=this.getInputById(A.port.id,{disconnected:!0}):A.port.type==="output"&&(g.port=this.getOutputById(A.port.id,{disconnected:!0})),this.emit(A.port.state,g);const C=Object.assign({},g);C.type="portschanged",this.emit(C.type,C)}}async _updateInputsAndOutputs(){return Promise.all([this._updateInputs(),this._updateOutputs()])}async _updateInputs(){if(!this.interface)return;for(let g=this._inputs.length-1;g>=0;g--){const C=this._inputs[g];Array.from(this.interface.inputs.values()).find(Q=>Q===C._midiInput)||(this._disconnectedInputs.push(C),this._inputs.splice(g,1))}let A=[];return this.interface.inputs.forEach(g=>{if(!this._inputs.find(C=>C._midiInput===g)){let C=this._disconnectedInputs.find(B=>B._midiInput===g);C||(C=new dD(g)),this._inputs.push(C),A.push(C.open())}}),Promise.all(A)}async _updateOutputs(){if(!this.interface)return;for(let g=this._outputs.length-1;g>=0;g--){const C=this._outputs[g];Array.from(this.interface.outputs.values()).find(Q=>Q===C._midiOutput)||(this._disconnectedOutputs.push(C),this._outputs.splice(g,1))}let A=[];return this.interface.outputs.forEach(g=>{if(!this._outputs.find(C=>C._midiOutput===g)){let C=this._disconnectedOutputs.find(B=>B._midiOutput===g);C||(C=new dB(g)),this._outputs.push(C),A.push(C.open())}}),Promise.all(A)}get enabled(){return this.interface!==null}get inputs(){return this._inputs}get isNode(){return this.validation&&console.warn("WebMidi.isNode has been deprecated. Use Utilities.isNode instead."),k.isNode}get isBrowser(){return this.validation&&console.warn("WebMidi.isBrowser has been deprecated. Use Utilities.isBrowser instead."),k.isBrowser}get octaveOffset(){return this._octaveOffset}set octaveOffset(A){if(this.validation&&(A=parseInt(A),isNaN(A)))throw new TypeError("The 'octaveOffset' property must be an integer.");this._octaveOffset=A}get outputs(){return this._outputs}get supported(){return typeof navigator<"u"&&!!navigator.requestMIDIAccess}get sysexEnabled(){return!!(this.interface&&this.interface.sysexEnabled)}get time(){return performance.now()}get version(){return"3.1.11"}get flavour(){return"esm"}get CHANNEL_EVENTS(){return this.validation&&console.warn("The CHANNEL_EVENTS enum has been moved to Enumerations.CHANNEL_EVENTS."),y.CHANNEL_EVENTS}get MIDI_SYSTEM_MESSAGES(){return this.validation&&console.warn("The MIDI_SYSTEM_MESSAGES enum has been moved to Enumerations.SYSTEM_MESSAGES."),y.SYSTEM_MESSAGES}get MIDI_CHANNEL_MODE_MESSAGES(){return this.validation&&console.warn("The MIDI_CHANNEL_MODE_MESSAGES enum has been moved to Enumerations.CHANNEL_MODE_MESSAGES."),y.CHANNEL_MODE_MESSAGES}get MIDI_CONTROL_CHANGE_MESSAGES(){return this.validation&&console.warn("The MIDI_CONTROL_CHANGE_MESSAGES enum has been replaced by the Enumerations.CONTROL_CHANGE_MESSAGES array."),y.MIDI_CONTROL_CHANGE_MESSAGES}get MIDI_REGISTERED_PARAMETER(){return this.validation&&console.warn("The MIDI_REGISTERED_PARAMETER enum has been moved to Enumerations.REGISTERED_PARAMETERS."),y.REGISTERED_PARAMETERS}get NOTES(){return this.validation&&console.warn("The NOTES enum has been deprecated."),["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"]}}const J=new yD;J.constructor=null;const RC=WI({}),yB=WI({}),RI=ZA({enabled:!1,playing:!1,stopped:!0}),Jt=ZA({number:57,velocity:0,channel:1,timestamp:0,port:null}),kt=ZA({}),tC=WI([]);function LC(){return ng(()=>{RI.enabled||RI.enabled===null||J.enable().then(()=>{RI.enabled=!0,wE(),J.addListener("connected",wE),J.addListener("disconnected",I=>{I.port.type=="input"?delete RC[I.port.id]:I.port.type=="output"&&delete yB[I.port.id]})}).catch(I=>RI.enabled=null)}),{midi:RI,inputs:RC,outputs:yB,WebMidi:J,midiLog:tC,midiNote:Jt,activeNotes:kt}}function wE(){J.inputs.forEach(I=>{RC[I.id]={name:I.name,manufacturer:I.manufacturer,event:null},I.removeListener(),I.addListener("start",()=>{RI.playing=!0,RI.stopped=!1}),I.addListener("stop",()=>{RI.playing=!1,RI.stopped=Date.now()}),I.addListener("midimessage",g=>{var Q;if(((Q=g==null?void 0:g.message)==null?void 0:Q.type)==="clock")return;const{timestamp:C,message:B}=g;RC[I.id].message=B,tC.unshift({timestamp:C,message:B}),tC.length>100&&tC.pop()}),I.addListener("noteon",A),I.addListener("noteoff",A);function A({type:g,note:{number:C,attack:B},message:{channel:Q},timestamp:E,port:{id:e}}){const t=g=="noteoff"?0:B;Object.assign(Jt,{number:C,velocity:t,channel:Q,timestamp:E,port:e}),kt[C]=t}}),J.outputs.forEach(I=>{yB[I.id]={name:I.name,manufacturer:I.manufacturer}})}const MB=ZA({}),GB=ZA({}),mI=ZA({});function MD(){const I=oA(!1),A=oA(!1);let g,C;const{controls:B,cv:Q,groups:E,initRefs:e}=fc(cE,"el"),{voices:t,cycleNote:o,initVoices:i,getVoiceParams:s,stopAll:a}=dc();async function c(){if(I.value)return;I.value=!0,A.value=!0,g=new(window.AudioContext||window.webkitAudioContext),C=new uc,(await C.initialize(g,{numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[2]})).connect(g.destination),e(C),i(C),C.on("meter",O=>MB[O.source]={max:O.max,min:O.min}),C.on("scope",O=>GB[O.source]=Array.from(O==null?void 0:O.data[0].values())),C.on("fft",O=>mI[O.source]=[Array.from(O==null?void 0:O.data.real.values()),Array.from(O==null?void 0:O.data.imag.values())]),C.on("error",O=>console.log(O));let w=await fetch("/A4.mp3"),Z=await g.decodeAudioData(await w.arrayBuffer());C.updateVirtualFileSystem({piano:Z.getChannelData(0)});const sA=r.tanh(r.mul(Q.synth.vol,r.add(...t.map((O,wA)=>{const PA=s(wA);return r.add(RD(PA,Q.round,Q.synth.bpm),iD(PA,Q.fat,Q.synth.bpm),lD(PA,Q.noise,Q.synth.bpm),DD(PA,Q.string,Q.synth.bpm),wD(PA,Q.sampler,Q.synth.bpm))})))),DA=r.mul(0,r.meter({name:"sample_rate"},r.sr())),hA=r.fft({name:"main",size:2048},r.scope({name:"main",size:512},r.add(DA,sA))),vA=rD([hA,hA],Q.pingpong,Q.synth.bpm),P=oD({key:"srvb",sampleRate:48e3,size:Q.srvb.size,decay:Q.srvb.decay,mod:Q.srvb.mod,mix:r.mul(Q.srvb.mix,Q.srvb.on)},...vA);C.render(...P)}function N(R=57,w=1){A.value||c(),g.state==="suspended"&&g.resume(),o(R,w)}function M(R=57){o(R,0)}const d=fI(2,0,4),{midiNote:U,activeNotes:b}=LC();return document.addEventListener("keydown",R=>{if(R.code=="Digit1"&&d.value--,R.code=="Equal"&&d.value++,R.repeat||!gC[R.code]||R.ctrlKey||R.altKey||R.metaKey)return;R.code=="Slash"&&R.preventDefault();const w=gC[R.code]+d.value*12;Object.assign(U,{number:w,velocity:1,channel:0,timestamp:Date.now(),port:"keyboard"}),b[w]=1}),document.addEventListener("keyup",R=>{if(!gC[R.code])return;const w=gC[R.code]+d.value*12;Object.assign(U,{number:w,velocity:0,channel:0,timestamp:Date.now(),port:"keyboard"}),b[w]=0}),{controls:B,params:cE,keyOffset:d,groups:E,play:N,stop:M,stopAll:a,initiated:I,started:A,meters:MB,scopes:GB,FFTs:mI,voices:t}}const CI=["A","A#","B","C","C#","D","D#","E","F","F#","G","G#"],GD=["1P","2m","2M","3m","3M","4P","TT","5P","6m","6M","7m","7M"];function rI(I=0,A,g=1,C=1){return A===void 0&&(A=Math.floor(I/12)),`hsla(${I%12*30},${g*100}%,${Math.abs(A+2)*6}%,${C})`}function FD(I,A,g){return rI(UD(I)+12*2,void 0,A,g)}function UD(I,A=440){return 12*(Math.log(Number(I)/A)/Math.log(2))}const mD={__name:"ShowFFT",props:{name:{default:"main",type:String}},setup(I){const A=I,g=ZA({sr:uA(()=>{var Q;return((Q=MB.sample_rate)==null?void 0:Q.max)||48e3}),data:uA(()=>(mI==null?void 0:mI[A.name])||[[],[]]),freq:uA(()=>g.data[0].map((Q,E)=>E*g.sr/(g.data[0].length||1))),total:uA(()=>g.data[0].map((Q,E)=>Math.log2(1+Math.abs(Q)+Math.abs(g.data[1][E]))))});let C=oA(null);ng(B),AI(()=>mI==null?void 0:mI[A.name],B,{deep:!0});function B(){if(!C.value||!(g!=null&&g.total))return;let Q=C.value.getContext("2d");Q.clearRect(0,0,C.value.width,C.value.height);for(let E=0;E(z(),IA("canvas",{class:"max-w-full w-full",ref_key:"canvas",ref:C,height:"320",width:"800"},null,512))}},SD={__name:"ShowScope",props:{name:{default:"main",type:String},color:{default:"white",type:String},triggerLevel:{default:0,type:Number}},setup(I){const A=I,g=oA(null);let C=null;ng(()=>{g.value&&(g.value.width=g.value.clientWidth,g.value.height=g.value.clientHeight),B()}),JC(()=>{Q()});function B(){C=requestAnimationFrame(e)}function Q(){C&&cancelAnimationFrame(C)}function E(t,o){for(let i=0;io)return i;return 0}function e(){if(!g.value)return;const t=g.value.getContext("2d"),{width:o,height:i}=g.value,s=GB[A.name];if(!s||s.length<2){C=requestAnimationFrame(e);return}t.clearRect(0,0,o,i),t.strokeStyle=A.color,t.lineWidth=3;const a=E(s,A.triggerLevel),c=o/s.length;t.beginPath();for(let N=0;N(z(),IA("canvas",{class:"w-full h-full",ref_key:"canvas",ref:g},null,512))}},YD="0.4.0";function Kt(I){return I!==null&&typeof I=="object"&&"name"in I&&typeof I.name=="string"}function pt(I){return I!==null&&typeof I=="object"&&"step"in I&&typeof I.step=="number"&&"alt"in I&&typeof I.alt=="number"&&!isNaN(I.step)&&!isNaN(I.alt)}var bt=[0,2,4,-1,1,3,5],Lt=bt.map(I=>Math.floor(I*7/12));function Tt(I){const{step:A,alt:g,oct:C,dir:B=1}=I,Q=bt[A]+7*g;if(C===void 0)return[B*Q];const E=C-Lt[A]-4*g;return[B*Q,B*E]}var JD=[3,0,4,1,5,2,6];function kD(I){const[A,g,C]=I,B=JD[KD(A)],Q=Math.floor((A+1)/7);if(g===void 0)return{step:B,alt:Q,dir:C};const E=g+4*Q+Lt[B];return{step:B,alt:Q,oct:E,dir:C}}function KD(I){const A=(I+1)%7;return A<0?7+A:A}var NE=(I,A)=>Array(Math.abs(A)+1).join(I),FB=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),pD="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",bD="(AA|A|P|M|m|d|dd)([-+]?\\d+)",LD=new RegExp("^"+pD+"|"+bD+"$");function TD(I){const A=LD.exec(`${I}`);return A===null?["",""]:A[1]?[A[1],A[2]]:[A[4],A[3]]}var RE={};function uC(I){return typeof I=="string"?RE[I]||(RE[I]=HD(I)):pt(I)?uC(ZD(I)):Kt(I)?uC(I.name):FB}var uE=[0,2,4,5,7,9,11],Ht="PMMPPMM";function HD(I){const A=TD(I);if(A[0]==="")return FB;const g=+A[0],C=A[1],B=(Math.abs(g)-1)%7,Q=Ht[B];if(Q==="M"&&C==="P")return FB;const E=Q==="M"?"majorable":"perfectable",e=""+g+C,t=g<0?-1:1,o=g===8||g===-8?g:t*(B+1),i=VD(E,C),s=Math.floor((Math.abs(g)-1)/7),a=t*(uE[B]+i+12*s),c=(t*(uE[B]+i)%12+12)%12,N=Tt({step:B,alt:i,oct:s,dir:t});return{empty:!1,name:e,num:g,q:C,step:B,alt:i,dir:t,type:E,simple:o,semitones:a,chroma:c,coord:N,oct:s}}function VD(I,A){return A==="M"&&I==="majorable"||A==="P"&&I==="perfectable"?0:A==="m"&&I==="majorable"?-1:/^A+$/.test(A)?A.length:/^d+$/.test(A)?-1*(I==="perfectable"?A.length:A.length+1):0}function ZD(I){const{step:A,alt:g,oct:C=0,dir:B}=I;if(!B)return"";const Q=A+1+7*C,E=Q===0?A+1:Q,e=B<0?"-":"",t=Ht[A]==="M"?"majorable":"perfectable";return e+E+vD(t,g)}function vD(I,A){return A===0?I==="majorable"?"M":"P":A===-1&&I==="majorable"?"m":A>0?NE("A",A):NE("d",I==="perfectable"?A:A+1)}var fE=(I,A)=>Array(Math.abs(A)+1).join(I),Vt=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),dE=new Map,OD=I=>"CDEFGAB".charAt(I),xD=I=>I<0?fE("b",-I):fE("#",I),qD=I=>I[0]==="b"?-I.length:I.length;function EI(I){const A=JSON.stringify(I),g=dE.get(A);if(g)return g;const C=typeof I=="string"?zD(I):pt(I)?EI(_D(I)):Kt(I)?EI(I.name):Vt;return dE.set(A,C),C}var WD=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function jD(I){const A=WD.exec(I);return A?[A[1].toUpperCase(),A[2].replace(/x/g,"##"),A[3],A[4]]:["","","",""]}function PD(I){return EI(kD(I))}var XD=(I,A)=>(I%A+A)%A,BB=[0,2,4,5,7,9,11];function zD(I){const A=jD(I);if(A[0]===""||A[3]!=="")return Vt;const g=A[0],C=A[1],B=A[2],Q=(g.charCodeAt(0)+3)%7,E=qD(C),e=B.length?+B:void 0,t=Tt({step:Q,alt:E,oct:e}),o=g+C+B,i=g+C,s=(BB[Q]+E+120)%12,a=e===void 0?XD(BB[Q]+E,12)-12*99:BB[Q]+E+12*(e+1),c=a>=0&&a<=127?a:null,N=e===void 0?null:Math.pow(2,(a-69)/12)*440;return{empty:!1,acc:C,alt:E,chroma:s,coord:t,freq:N,height:a,letter:g,midi:c,name:o,oct:e,pc:i,step:Q}}function _D(I){const{step:A,alt:g,oct:C}=I,B=OD(A);if(!B)return"";const Q=B+xD(g);return C||C===0?Q+C:Q}function Zt(I,A){const g=EI(I),C=Array.isArray(A)?A:uC(A).coord;if(g.empty||!C||C.length<2)return"";const B=g.coord,Q=B.length===1?[B[0]+C[0]]:[B[0]+C[0],B[1]+C[1]];return PD(Q).name}function BQ(I,A){const g=A.length,C=(I%g+g)%g;return A.slice(C,g).concat(A.slice(0,C))}var zI={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},vt=I=>Number(I).toString(2).padStart(12,"0"),yE=I=>parseInt(I,2),$D=/^[01]{12}$/;function Ot(I){return $D.test(I)}var Ah=I=>typeof I=="number"&&I>=0&&I<=4095,Ih=I=>I&&Ot(I.chroma),ME={[zI.chroma]:zI};function QQ(I){const A=Ot(I)?I:Ah(I)?vt(I):Array.isArray(I)?eh(I):Ih(I)?I.chroma:zI.chroma;return ME[A]=ME[A]||Eh(A)}var gh=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Ch(I){const A=[];for(let g=0;g<12;g++)I.charAt(g)==="1"&&A.push(gh[g]);return A}function Bh(I){const A=QQ(I);return g=>{const C=EI(g);return A&&!C.empty&&A.chroma.charAt(C.chroma)==="1"}}function Qh(I){const A=I.split("");return A.map((g,C)=>BQ(C,A).join(""))}function Eh(I){const A=yE(I),g=Qh(I).map(yE).filter(Q=>Q>=2048).sort()[0],C=vt(g),B=Ch(I);return{empty:!1,name:"",setNum:A,chroma:I,normalized:C,intervals:B}}function eh(I){if(I.length===0)return zI.chroma;let A;const g=[0,0,0,0,0,0,0,0,0,0,0,0];for(let C=0;Csh(B,Q))}function sh(I,A){iC[A]=I}function nh(I){const A=g=>I.indexOf(g)!==-1;return A("5A")?"Augmented":A("3M")?"Major":A("5d")?"Diminished":A("3m")?"Minor":"Unknown"}ih.forEach(([I,A,g])=>oh(I.split(" "),g.split(" "),A));xt.sort((I,A)=>I.setNum-A.setNum);var rh=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],ah=rh,qt={...zI,intervals:[],aliases:[]},TC=[],PI={};function Wt(){return TC.map(I=>I.name)}function rg(I){return PI[I]||qt}var jt=rg;function Lg(){return TC.slice()}var Pt=Lg;function Xt(){return Object.keys(PI)}function zt(){TC=[],PI={}}function EQ(I,A,g=[]){const C={...QQ(I),name:A,intervals:I,aliases:g};return TC.push(C),PI[C.name]=C,PI[C.setNum]=C,PI[C.chroma]=C,C.aliases.forEach(B=>_t(C,B)),C}function _t(I,A){PI[A]=I}ah.forEach(([I,A,...g])=>EQ(I.split(" "),A,g));var lh={names:Wt,get:rg,all:Lg,add:EQ,removeAll:zt,keys:Xt,entries:Pt,scaleType:jt};const CC=Object.freeze(Object.defineProperty({__proto__:null,NoScaleType:qt,add:EQ,addAlias:_t,all:Lg,default:lh,entries:Pt,get:rg,keys:Xt,names:Wt,removeAll:zt,scaleType:jt},Symbol.toStringTag,{value:"Module"}));var ch=I=>I.name,Dh=I=>I.map(EI).filter(A=>!A.empty),$t=(I,A)=>I.height-A.height;function hh(I,A){return A=A||$t,Dh(I).sort(A).map(ch)}function wh(I){return hh(I,$t).filter((A,g,C)=>g===0||A!==C[g-1])}var eQ=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],GE={...zI,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},Nh=eQ.map(Rh),UB={};Nh.forEach(I=>{UB[I.name]=I,I.aliases.forEach(A=>{UB[A]=I})});function Ai(I){return typeof I=="string"?UB[I.toLowerCase()]||GE:I&&I.name?Ai(I.name):GE}function Rh(I){const[A,g,C,B,Q,E,e]=I,t=e?[e]:[],o=Number(g).toString(2);return{empty:!1,intervals:rg(B).intervals,modeNum:A,chroma:o,normalized:o,name:B,setNum:g,alt:C,triad:Q,seventh:E,aliases:t}}function Ii(I){return(A,g)=>{const C=Ai(A);if(C.empty)return[];const B=BQ(C.modeNum,I),Q=C.intervals.map(E=>Zt(g,E));return B.map((E,e)=>Q[e]+E)}}Ii(eQ.map(I=>I[4]));Ii(eQ.map(I=>I[5]));var uh={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function fh(I){if(typeof I!="string")return["",""];const A=I.indexOf(" "),g=EI(I.substring(0,A));if(g.empty){const B=EI(I);return B.empty?["",I]:[B.name,""]}const C=I.substring(g.name.length+1).toLowerCase();return[g.name,C.length?C:""]}function dh(I){const A=Array.isArray(I)?I:fh(I),g=EI(A[0]).name,C=rg(A[1]);if(C.empty)return uh;const B=C.name,Q=g?C.intervals.map(e=>Zt(g,e)):[],E=g?g+" "+B:B;return{...C,name:E,type:B,tonic:g,notes:Q}}function yh(I){const A=I.map(B=>EI(B).pc).filter(B=>B),g=A[0],C=wh(A);return BQ(C.indexOf(g),C)}function Mh(){const I=fI(XI("midi-keys-begin",45),0,127),A=fI(XI("midi-keys-end",83),I,127),g=gE(I),C=gE(A),B=oA(),Q=oA(),E=uA(()=>Array(C.value+1-g.value).fill(0).map((e,t)=>t+g.value));return uI({onDrag(e){e.event.preventDefault();let t=I.value+e.delta[0]/5-e.delta[1]/5;t+1<=A.value&&(I.value=Math.round(t))},onWheel(e){e.event.preventDefault();let t=I.value-e.velocities[0]/5+e.velocities[1]/5;t+1<=A.value&&(I.value=Math.round(t))}},{domTarget:B,eventOptions:{passive:!1}}),uI({onDrag(e){e.event.preventDefault();let t=A.value+e.delta[0]/5-e.delta[1]/5;t>I.value&&(A.value=t)},onWheel(e){e.event.preventDefault();let t=A.value-e.velocities[0]/5+e.velocities[1]/5;t-1>I.value&&(A.value=t)}},{domTarget:Q,eventOptions:{passive:!1}}),{begin:I,end:A,roundBegin:g,roundEnd:C,beginControl:B,endControl:Q,range:E}}const Gh=[...CI].map((I,A)=>({name:I,pitch:A})),NA=ZA({tonic:fI(XI("global-tonic",0),0,11),note:uA(()=>Gh[NA.tonic]),chroma:XI("global-chroma","101011010101"),set:uA(()=>rg(NA.chroma)),full:uA(()=>{let I=NA.note.name+"4 "+NA.set.name;return dh(I)}),pcs:uA(()=>yh(NA.full.notes)),isIn:uA(()=>Bh(NA.pcs))}),Fh=["transform"],Uh=["width","height","fill"],mh={class:"marks pointer-events-none"},Sh=["x1","x2","y2","stroke"],Yh=["r","cx","cy","opacity","fill"],Jh=["x","y","font-size"],kh=["x","y","font-size"],Kh=["fill","y","x","font-size","font-weight"],ph={__name:"MidiKeysNote",props:{note:{type:Number,default:0},step:{type:Number,default:0},width:{type:Number,default:1200},height:{type:Number,default:400},pressed:{type:Boolean,default:!1}},setup(I){const{activeNotes:A,midiNote:g}=LC();function C(e,t=10){return e=Math.max(0,Math.min(1,e)),Math.log(1+t*e)/Math.log(1+t)}function B(e,t){t==null||t.preventDefault();const o=t.target.getBoundingClientRect(),i=t.clientY-o.top,s=o.height,a=i/s,N=.3+C(a)*.7,M=NA.isIn(CI[(e+3)%12])?1:.5,d=N*M;Object.assign(g,{number:e,velocity:d,channel:0,timestamp:Date.now(),port:"keys"}),A[e]=d}function Q(e){Object.assign(g,{number:e,velocity:0,channel:0,timestamp:Date.now(),port:"keys"}),A[e]=0}const E=oA();return(e,t)=>(z(),IA("g",{class:"note",transform:`translate(${I.step*I.width},0)`,"text-anchor":"middle",ref_key:"noteKey",ref:E},[F("rect",{width:I.width,height:I.height,fill:h(rI)(I.note+3,void 0,h(A)[I.note]?1:.1,h(NA).isIn(h(CI)[(I.note+3)%12])?1:.4),onPointerdown:t[0]||(t[0]=cB(o=>B(I.note,o),["prevent"])),onPointerenter:t[1]||(t[1]=o=>I.pressed?B(I.note,o):null),onPointerleave:t[2]||(t[2]=o=>Q(I.note)),onPointerup:t[3]||(t[3]=cB(o=>Q(I.note),["prevent"])),onTouchcancel:t[4]||(t[4]=o=>Q(I.note))},null,40,Uh),F("g",mh,[h(NA).tonic==(I.note+3)%12?(z(),IA("line",{key:0,x1:I.width/2,x2:I.width/2,y1:0,y2:I.height,"stroke-width":"6",opacity:.9,stroke:h(A)[I.note]?"white":h(rI)(I.note+3,0,1,1)},null,8,Sh)):GI("",!0),F("circle",{r:h(NA).tonic==(I.note+3)%12?I.width/3:I.width/8,cx:I.width/2,cy:I.height-I.width/2,opacity:h(A)[I.note]?1:.3,fill:h(NA).isIn(h(CI)[(I.note+3)%12])?"white":"black"},null,8,Yh),F("text",{class:"opacity-75 number",x:I.width/2,y:I.width*1.8,"font-size":I.width*.333},EA(h(GD)[(I.note+3-h(NA).tonic)%12]),9,Jh),F("text",{class:"opacity-55",x:I.width/2,y:I.width+14,"font-size":I.width*.333},EA(I.note),9,kh),F("text",{fill:h(NA).isIn(h(CI)[(I.note+3)%12])?"black":"#777e",y:I.width/2+10,x:I.width/2,"font-size":I.width*.5,"font-weight":h(NA).tonic==(I.note+3)%12?"bold":"normal"},EA(h(CI)[(I.note+3)%12]),9,Kh)])],8,Fh))}},bh=["viewBox"],Lh=["transform"],Th=["transform"],Hh=["height","width","fill"],Vh=["x","y"],Zh=["transform","stroke"],vh=["transform"],Oh=["transform"],xh=["width","height"],qh=["y"],Wh=["transform","opacity"],jh=["transform"],Ph={class:"show",transform:"translate(30,15)"},Xh=["cy","fill"],zh=["transform"],_h=["height","width","fill"],$h=["y"],Aw=["transform"],Iw=["height","width","fill"],gw=["x","y"],Cw=["transform"],Bw=["transform","stroke"],Qw=["x","width"],Ew=["transform"],ew=["transform"],tw=["width","height"],iw={__name:"MidiKeys",props:{width:{type:Number,default:1100},height:{type:Number,default:340},controlOffset:{type:Number,default:100},slotOffset:{type:Number,default:100}},setup(I){const{activeNotes:A}=LC(),{roundBegin:g,roundEnd:C,beginControl:B,endControl:Q,range:E}=Mh(),e=oA(),t=oA(),o=oA(!1),i=oA(),s=oA(NA.tonic*100);AI(s,U=>{NA.tonic=Math.round((U/100%12+12)%12)}),uI({onDrag(U){U.event.preventDefault(),s.value+=U.delta[0]-U.delta[1]},onWheel(U){U.event.preventDefault(),s.value-=U.velocities[0]+U.velocities[1]*4}},{domTarget:i,eventOptions:{passive:!1}});const a=oA(),c=fI(XI("midikeys-scale",1),1,Lg().length-1);uI({onDrag(U){U.event.preventDefault(),c.value+=U.delta[0]/5-U.delta[1]/5},onWheel(U){U.event.preventDefault(),c.value-=U.velocities[0]/5-U.velocities[1]/5}},{domTarget:a,eventOptions:{passive:!1}});const N=uA(()=>{let U=Math.round(c.value);return Lg()[U]});AI(N,U=>{NA.chroma=U.chroma});const M=XI("filter-keys",!0),d=uA(()=>M.value?E.value.filter(U=>NA.isIn(CI[(U+3)%12])):E.value);return(U,b)=>(z(),IA("svg",{class:"cursor-pointer select-none touch-none shadow-xl mx-auto",viewBox:`0 -${I.slotOffset} ${I.width} ${I.height+I.controlOffset}`,version:"1.1",baseProfile:"full",xmlns:"http://www.w3.org/2000/svg",style:{"touch-action":"none"},ref_key:"svg",ref:e,onPointerdown:b[1]||(b[1]=R=>o.value=!0),onPointercancel:b[2]||(b[2]=R=>o.value=!1),onPointerup:b[3]||(b[3]=R=>o.value=!1),onPointerleave:b[4]||(b[4]=R=>o.value=!1)},[F("g",{class:"slot",transform:`translate(0,${-I.slotOffset-I.controlOffset})`},[oe(U.$slots,"default",{},void 0)],8,Lh),F("g",{class:"offset cursor-grab active-cursor-grabbing",transform:`translate(0,${-I.controlOffset})`},[F("g",{class:"tonic",ref_key:"tonicControl",ref:i},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(NA).tonic,3,.8)},null,8,Hh),F("text",{class:"font-bold text-5xl",x:I.width/10,"text-anchor":"middle",y:I.controlOffset*.75},EA(h(CI)[h(NA).tonic%12]),9,Vh),(z(!0),IA(nA,null,XA(h(CI),(R,w)=>(z(),IA("line",{transform:`translate(${(w/12+1/24)*I.width/5},0)`,y2:16,"stroke-width":"6","stroke-linecap":"round",stroke:h(rI)(w,5,.4)},null,8,Zh))),256)),F("line",{y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${(s.value/1200%1+1)%1*I.width/5+I.width/120},0)`,stroke:"white"},null,8,vh)],512),F("g",{class:"scale",ref_key:"scaleControl",ref:a,transform:`translate(${I.width/5},0)`},[F("rect",{width:I.width*2/5,height:I.controlOffset,fill:"#aaa"},null,8,xh),F("text",{class:"text-4xl",x:50,y:I.controlOffset*.75},EA(N.value.name),9,qh),(z(!0),IA(nA,null,XA(h(CC).all().length,(R,w)=>(z(),IA("line",{transform:`translate(${(w/h(CC).all().length+1/h(CC).all().length)*I.width*2/5},0)`,y2:36,opacity:R==Math.round(h(c))?1:.2,"stroke-width":"2","stroke-linecap":"round",stroke:"currentColor"},null,8,Wh))),256)),F("line",{y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${h(c)/h(CC).all().length*I.width*2/5},0)`,stroke:"white"},null,8,jh),F("g",Ph,[F("circle",{onClick:b[0]||(b[0]=R=>M.value=!h(M)),cy:I.controlOffset*.5,r:"10",fill:h(M)?"black":"transparent",stroke:"black","stroke-width":4},null,8,Xh)])],8,Oh),F("g",{class:"begin",ref_key:"beginControl",ref:B,transform:`translate(${I.width*3/5},0)`},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(g)+3,void 0,h(A)[h(g)]?1:.1)},null,8,_h),F("text",{class:"font-bold text-5xl pointer-events-none",x:10,y:I.controlOffset*.75},EA(h(CI)[(h(g)+3)%12])+EA(Math.floor((Math.round(h(g))+3)/12)-1),9,$h)],8,zh),F("g",{class:"end",ref_key:"endControl",ref:Q,transform:`translate(${I.width*4/5},0)`},[F("rect",{height:I.controlOffset,width:I.width/5,fill:h(rI)(h(C)+3,void 0,h(A)[h(C)]?1:.1)},null,8,Iw),F("text",{class:"font-bold text-5xl pointer-events-none",x:I.width/5-20,"text-anchor":"end",y:I.controlOffset*.75},EA(h(CI)[(h(C)+3)%12])+EA(Math.floor((h(C)+3)/12)-1),9,gw)],8,Aw),F("g",{class:"range pointer-events-none",transform:`translate(${I.width*3/5},0)`},[(z(),IA(nA,null,XA(127,(R,w)=>F("line",{transform:`translate(${w/127*I.width*2/5},0)`,y2:16,opacity:".3","stroke-width":"2","stroke-linecap":"round",stroke:(w+3)%12==h(NA).tonic?h(rI)((w+3)%12):"white"},null,8,Bw)),64)),F("rect",{class:"ranger",x:h(g)/127*I.width*2/5,width:(h(C)-h(g))/127*I.width*2/5,height:"20",fill:"gray",opacity:.8},null,8,Qw),F("line",{class:"begin",y2:20,"stroke-width":"8","stroke-linecap":"round",transform:`translate(${h(g)/127*I.width*2/5},0)`,stroke:"white"},null,8,Ew),F("line",{class:"end",y2:20,"stroke-width":"8","stroke-linecap":"round",stroke:"white",transform:`translate(${h(C)/127*I.width*2/5},0)`},null,8,ew)],8,Cw)],8,Th),F("g",{class:"keys",ref_key:"area",ref:t},[F("rect",{width:I.width,height:I.height,fill:"#333"},null,8,tw),(z(!0),IA(nA,null,XA(d.value,(R,w)=>(z(),JI(ph,{key:R,note:R,step:w,width:I.width/d.value.length,height:I.height,pressed:o.value},null,8,["note","step","width","height","pressed"]))),128))],512)],40,bh))}},ow=Xe(iw,[["__scopeId","data-v-326a680a"]]),sw={class:"flex flex-col items-start transition-all duration-500 ease-out select-none rounded-8 shadow-xl w-full h-full text-white flex-1"},nw={class:"bg-dark-800 bg-op-40 p-2 text-light-800 flex gap-2 items-center flex-wrap w-full"},rw={class:"flex gap-1 items-center no-underline",href:"https://github.com/chromatone/elements/",target:"_blank"},aw={class:"flex flex-col p-2 pb-12 pt-4 gap-2"},lw={class:"flex items-center gap-2 flex-wrap w-full"},cw={class:"gap-2 columns-2"},Dw={class:"flex flex-wrap items-center border-1 rounded-xl"},hw={class:"flex flex-wrap gap-2 flex-1"},ww=["onClick"],Nw=["onClick"],Rw={class:"p-0"},uw={class:"flex flex-wrap gap-2"},fw={class:"relative flex flex-wrap items-center border-1 rounded-xl"},dw={class:"flex flex-wrap flex-1"},yw={class:"flex flex-wrap gap-2 flex-1"},Mw=["onClick"],Gw=["onClick"],Fw={class:"p-0"},Uw={class:"sticky top-0 rounded-lg w-full z-100 shadow-lg"},mw={key:0,class:"flex flex-wrap gap-2"},Sw={class:"text-xs"},Yw={class:"text-lg"},Jw={key:1,class:"bg-dark-300 p-2 flex w-full flex-col gap-1 max-h-16 overflow-y-scroll"},kw={class:"uppercase"},Kw={key:0,class:"i-la-cog"},pw={key:1,class:"op-80"},bw={class:"op-80"},Lw={class:"op-80"},Tw={__name:"App",setup(I){const{play:A,stop:g,stopAll:C,started:B,controls:Q,groups:E,voices:e,params:t}=MD(),{inputs:o,midiLog:i,midiNote:s}=LC();AI(s,b=>A(b.number,b.velocity)),vs("Escape",()=>{C()});const a=["round","fat","string","noise","sampler"],c=["pingpong","srvb"],{state:N}=OQ(c),{next:M,state:d,go:U}=OQ(a);return(b,R)=>(z(),IA("div",sw,[F("div",nw,[R[18]||(R[18]=MQ('

Chromatone

Elements

',3)),F("a",rw,[R[16]||(R[16]=F("div",{class:"i-la-github"},null,-1)),F("span",null,"v."+EA(h(YD)),1)]),h(B)?GI("",!0):(z(),IA("article",{key:0,class:"z-1000 fixed top-0 left-0 right-0 p-8 flex flex-col gap-6 bg-dark-800 bg-op-50 backdrop-blur",onPointerdown:R[0]||(R[0]=w=>h(A)(h(s).number)),onPointerup:R[1]||(R[1]=w=>h(g)(h(s).number))},R[17]||(R[17]=[MQ('

Chromatone

Elements

Multilayered polyphonic synthesizer app

Explore unique sounds of 6 voice polyphony, 5 layers of sound generators for each of them and 2 global effects with any MIDI controller, laptop keyboard and flexible onscreen keyboard with choice of scales while analyzing the output on the global oscilloscope and colorized FFT time-frequency bars. Notes and frequencies are set according to Chromatone.

',4)]),32))]),F("div",aw,[F("div",lw,[F("button",{class:"active-brightness-120 transition hover-op-100 op-80 border-2 text-xl p-4 cursor-pointer rounded-full active-bg-green-200",style:OI({backgroundColor:h(rI)(h(s).number+3)}),onPointerdown:R[2]||(R[2]=w=>h(A)(h(s).number)),onPointerup:R[3]||(R[3]=w=>h(g)(h(s).number))},null,36),F("div",cw,[(z(!0),IA(nA,null,XA(h(e),w=>(z(),IA("div",{class:"p-2 flex-1 rounded-xl",key:w,style:OI({backgroundColor:h(rI)(w.midi.value-9,void 0,void 0,w.gate.value?1:.1)})},null,4))),128))]),F("div",Dw,[SA(AC,Mg({modelValue:h(Q).synth.vol,"onUpdate:modelValue":R[4]||(R[4]=w=>h(Q).synth.vol=w)},h(t).synth.vol,{param:"VOL"}),null,16,["modelValue"]),SA(AC,Mg({modelValue:h(Q).synth.bpm,"onUpdate:modelValue":R[5]||(R[5]=w=>h(Q).synth.bpm=w)},h(t).synth.bpm,{param:"BPM"}),null,16,["modelValue"])]),F("div",hw,[(z(),IA(nA,null,XA(a,w=>F("a",{class:xI(["cursor-pointer no-underline uppercase p-2 bg-dark-300 rounded-xl border-1 border-black border-op-20 flex items-center gap-2 text-sm flex-1 transition",{"bg-dark-800":h(Q)[w].on,"border-white border-op-90":h(d)==w}]),key:w,onClick:Z=>d.value=w},[F("button",{class:xI(["p-1 rounded-full bg-dark-100 border-1",{"border-white border-op-90":h(Q)[w].on}]),style:OI({opacity:h(Q)[w].on?1:.2}),onClick:cB(Z=>h(Q)[w].on==0?h(Q)[w].on=1:h(Q)[w].on=0,["prevent","stop"])},R[19]||(R[19]=[F("div",{class:"i-la-power-off"},null,-1)]),14,Nw),F("div",Rw,EA(w),1)],10,ww)),64))])]),F("div",uw,[F("div",fw,[(z(!0),IA(nA,null,XA(h(E)[h(d)],(w,Z)=>(z(),JI(AC,Mg({key:Z,class:"w-4em flex-1",modelValue:h(Q)[h(d)][Z],"onUpdate:modelValue":sA=>h(Q)[h(d)][Z]=sA,ref_for:!0},h(t)[h(d)][Z],{param:Z}),null,16,["modelValue","onUpdate:modelValue","param"]))),128)),F("div",dw,[h(Q)[h(d)].attack?(z(),JI(tE,{key:0,title:"Amplitude Envelope",a:h(Q)[h(d)].attack,"onUpdate:a":R[6]||(R[6]=w=>h(Q)[h(d)].attack=w),d:h(Q)[h(d)].decay,"onUpdate:d":R[7]||(R[7]=w=>h(Q)[h(d)].decay=w),s:h(Q)[h(d)].sustain,"onUpdate:s":R[8]||(R[8]=w=>h(Q)[h(d)].sustain=w),r:h(Q)[h(d)].release,"onUpdate:r":R[9]||(R[9]=w=>h(Q)[h(d)].release=w)},null,8,["a","d","s","r"])):GI("",!0),h(Q)[h(d)].fattack?(z(),JI(tE,{key:1,title:"Filter Envelope",a:h(Q)[h(d)].fattack,"onUpdate:a":R[10]||(R[10]=w=>h(Q)[h(d)].fattack=w),d:h(Q)[h(d)].fdecay,"onUpdate:d":R[11]||(R[11]=w=>h(Q)[h(d)].fdecay=w),s:h(Q)[h(d)].fsustain,"onUpdate:s":R[12]||(R[12]=w=>h(Q)[h(d)].fsustain=w),r:h(Q)[h(d)].frelease,"onUpdate:r":R[13]||(R[13]=w=>h(Q)[h(d)].frelease=w)},null,8,["a","d","s","r"])):GI("",!0)])]),F("div",yw,[(z(),IA(nA,null,XA(c,w=>F("a",{class:xI(["no-underline uppercase p-2 bg-dark-300 rounded-xl border-1 border-black border-op-20 flex items-center gap-2",{"bg-dark-800":h(N)==w,"border-white border-op-90":h(N)==w}]),key:w,onClick:Z=>N.value=w},[F("button",{class:xI(["p-1 rounded-full bg-dark-100 border-1",{"border-white border-op-90":h(Q)[w].on}]),style:OI({opacity:h(Q)[w].on?1:.2}),onClick:Z=>h(Q)[w].on==0?h(Q)[w].on=1:h(Q)[w].on=0},R[20]||(R[20]=[F("div",{class:"i-la-power-off"},null,-1)]),14,Gw),F("div",Fw,EA(w),1)],10,Mw)),64))]),(z(!0),IA(nA,null,XA([h(N)],w=>(z(),IA("div",{class:"relative flex flex-wrap items-center border-1 rounded-xl",key:w,style:{flex:"0 1 350px"}},[(z(!0),IA(nA,null,XA(h(E)[w],(Z,sA)=>(z(),JI(AC,Mg({key:sA,class:"w-4em flex-1",modelValue:h(Q)[w][sA],"onUpdate:modelValue":DA=>h(Q)[w][sA]=DA,ref_for:!0},h(t)[w][sA],{param:sA}),null,16,["modelValue","onUpdate:modelValue","param"]))),128))]))),128))])]),R[21]||(R[21]=F("div",{class:"flex-1"},null,-1)),SA(ow),F("div",Uw,[F("div",{class:"relative z-10 w-full bg-dark-800 bg-op-50 backdrop-blur",onPointerdown:R[14]||(R[14]=w=>h(A)(h(s).number)),onPointerup:R[15]||(R[15]=w=>h(g)(h(s).number))},[SA(mD,{class:"max-h-30vh"}),SA(SD,{class:"absolute top-0 pointer-events-none"})],32)]),h(o).length?(z(),IA("div",mw,[(z(!0),IA(nA,null,XA(h(o),(w,Z)=>(z(),IA("div",{class:"p-2 rounded-md bg-dark-300",key:Z},[F("div",Sw,EA(w==null?void 0:w.manufacturer),1),F("div",Yw,EA(w.name),1)]))),128))])):GI("",!0),h(i).length?(z(),IA("div",Jw,[(z(!0),IA(nA,null,XA(h(i),w=>(z(),IA("div",{class:"p-1 text-xs flex flex items-center gap-2",key:w},[F("div",kw,EA(w.message.type),1),w.message.isSystemMessage?(z(),IA("div",Kw)):GI("",!0),w.message.isChannelMessage?(z(),IA("div",pw,"CH"+EA(w.message.channel),1)):GI("",!0),F("div",bw,EA(w.message.dataBytes[0]),1),F("div",Lw,EA(w.message.dataBytes[1]),1)]))),128))])):GI("",!0)]))}};Ms(Tw).mount("#app"); + diff --git a/manifest.json b/manifest.json index b886539..4d2b80a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "id": "elements-v.0.3.4", + "id": "elements-v.0.4.0", "name": "Elements Synth", "short_name": "Elements", "description": "Web polyphonic multilayered digital synthesizer", diff --git a/sw.js b/sw.js index 560b6bd..f7ba91f 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'elements-cache-v.0.3.4'; +const CACHE_NAME = 'elements-cache-v.0.4.0'; const ASSETS_TO_CACHE = [ '/', '/index.html',