var hr=Object.defineProperty;var Rl=Object.getOwnPropertyDescriptor;var Vl=Object.getOwnPropertyNames;var zl=Object.prototype.hasOwnProperty;var ql=(t,e)=>{for(var r in e)hr(t,r,{get:e[r],enumerable:!0})},Kl=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Vl(e))!zl.call(t,n)&&n!==r&&hr(t,n,{get:()=>e[n],enumerable:!(s=Rl(e,n))||s.enumerable});return t};var Ul=t=>Kl(hr({},"__esModule",{value:!0}),t);var mc={};ql(mc,{Accessor:()=>Us,CUSTOM_TYPES:()=>Is,Comment:()=>ue,Component:()=>me,CustomEvent:()=>A,Document:()=>ce,DocumentFragment:()=>Ko,Easer:()=>nr,Element:()=>O,ElementRoute:()=>lr,ElementRouteTo:()=>Ks,Emitter:()=>Ze,Event:()=>et,EventHandler:()=>Vs,Fragment:()=>Ft,HTMLButtonElement:()=>Cs,HTMLElement:()=>er,HTMLHtmlElement:()=>zo,HTMLInputElement:()=>$s,HTMLOptionElement:()=>Ls,HTMLScriptElement:()=>qo,HTMLSelectElement:()=>ks,HTMLTextAreaElement:()=>Ps,ImbaElement:()=>il,IntersectionEventDefaults:()=>ye,KeyboardEvent:()=>Ns,LazyProxy:()=>gs,MouseEvent:()=>Es,Node:()=>Y,PointerEvent:()=>Os,RenderContext:()=>mt,Router:()=>or,SVGElement:()=>rr,Scheduler:()=>vs,ShadowRoot:()=>Uo,TYPES:()=>fe,Text:()=>tr,UIEvent:()=>Vo,Window:()=>Bo,accessor:()=>Ml,autorun:()=>Tl,awaits:()=>El,clearInterval:()=>_s,clearTimeout:()=>xs,colors:()=>ol,commit:()=>C,createAtom:()=>wl,createComment:()=>_t,createComponent:()=>js,createDynamic:()=>Qo,createElement:()=>Go,createFragment:()=>Xo,createIndexedList:()=>rl,createKeyedList:()=>sl,createLiveFragment:()=>el,createRenderContext:()=>Ts,createSVGElement:()=>Wo,createSlot:()=>pe,createTextNode:()=>sr,customElements:()=>Ho,defineTag:()=>Zo,descriptor:()=>Fl,emit:()=>tt,events:()=>fl,getDeepPropertyDescriptor:()=>ae,getRenderContext:()=>Ro,getSuperTagType:()=>Jo,getTagType:()=>Ms,get_document:()=>de,hooks:()=>ws,hotkeys:()=>zs,hydrate:()=>nl,listen:()=>Z,locals:()=>Sl,mount:()=>As,observable:()=>Ol,once:()=>q,parseTime:()=>It,proxy:()=>ys,render:()=>hl,renderContext:()=>L,renderer:()=>Mt,reportChanged:()=>kl,reportObserved:()=>$l,router:()=>xl,run:()=>Nl,scheduler:()=>F,serve:()=>Do,session:()=>qs,setInterval:()=>Ss,setTimeout:()=>bs,styles:()=>Fs,toCamelCase:()=>Mo,transitions:()=>ge,unlisten:()=>jt,unmount:()=>Ds,use_dom_bind:()=>al,use_dom_teleport:()=>ul,use_dom_transitions:()=>cl,use_events:()=>dl,use_events_hotkey:()=>bl,use_events_intersect:()=>gl,use_events_keyboard:()=>Rs,use_events_mouse:()=>ir,use_events_pointer:()=>pl,use_events_resize:()=>yl,use_events_selection:()=>vl,use_events_touch:()=>ml,use_hooks:()=>Fo,use_router:()=>_l,use_slots:()=>tl,use_styles:()=>ll,use_window:()=>Yo,\u03B1action:()=>jl,\u03B1autorun:()=>Il,\u03B1computed:()=>Pl,\u03B1lazy:()=>Ao,\u03B1observable:()=>Cl,\u03B1prop:()=>Al,\u03B1ref:()=>Ll});module.exports=Ul(mc);var Bl=Object.create,Bs=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,Yl=Object.getOwnPropertyNames,Gl=Object.getPrototypeOf,Wl=Object.prototype.hasOwnProperty,Xl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ql=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Yl(e))!Wl.call(t,n)&&n!==r&&Bs(t,n,{get:()=>e[n],enumerable:!(s=Hl(e,n))||s.enumerable});return t},Jl=(t,e,r)=>(r=t!=null?Bl(Gl(t)):{},Ql(e||!t||!t.__esModule?Bs(r,"default",{value:t,enumerable:!0}):r,t)),Zl=Xl((t,e)=>{"use strict";var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(h,f,d){return Function.prototype.apply.call(h,f,d)},n;r&&typeof r.ownKeys=="function"?n=r.ownKeys:Object.getOwnPropertySymbols?n=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:n=function(h){return Object.getOwnPropertyNames(h)};function i(h){console&&console.warn&&console.warn(h)}var o=Number.isNaN||function(h){return h!==h};function l(){l.init.call(this)}e.exports=l,e.exports.once=E,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var a=10;function p(h){if(typeof h!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof h)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(h){if(typeof h!="number"||h<0||o(h))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+h+".");a=h}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||o(h))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+h+".");return this._maxListeners=h,this};function u(h){return h._maxListeners===void 0?l.defaultMaxListeners:h._maxListeners}l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(h){for(var f=[],d=1;d0&&(T=f[0]),T instanceof Error)throw T;var N=new Error("Unhandled error."+(T?" ("+T.message+")":""));throw N.context=T,N}var D=w[h];if(D===void 0)return!1;if(typeof D=="function")s(D,this,f);else for(var ve=D.length,Dl=S(D,ve),d=0;d0&&N.length>w&&!N.warned){N.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=h,D.type=f,D.count=N.length,i(D)}return h}l.prototype.addListener=function(h,f){return y(this,h,f,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(h,f){return y(this,h,f,!0)};function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(h,f,d){var v={fired:!1,wrapFn:void 0,target:h,type:f,listener:d},w=b.bind(v);return w.listener=d,v.wrapFn=w,w}l.prototype.once=function(h,f){return p(f),this.on(h,_(this,h,f)),this},l.prototype.prependOnceListener=function(h,f){return p(f),this.prependListener(h,_(this,h,f)),this},l.prototype.removeListener=function(h,f){var d,v,w,T,N;if(p(f),v=this._events,v===void 0)return this;if(d=v[h],d===void 0)return this;if(d===f||d.listener===f)--this._eventsCount===0?this._events=Object.create(null):(delete v[h],v.removeListener&&this.emit("removeListener",h,d.listener||f));else if(typeof d!="function"){for(w=-1,T=d.length-1;T>=0;T--)if(d[T]===f||d[T].listener===f){N=d[T].listener,w=T;break}if(w<0)return this;w===0?d.shift():g(d,w),d.length===1&&(v[h]=d[0]),v.removeListener!==void 0&&this.emit("removeListener",h,N||f)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(h){var f,d,v;if(d=this._events,d===void 0)return this;if(d.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):d[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete d[h]),this;if(arguments.length===0){var w=Object.keys(d),T;for(v=0;v=0;v--)this.removeListener(h,f[v]);return this};function c(h,f,d){var v=h._events;if(v===void 0)return[];var w=v[f];return w===void 0?[]:typeof w=="function"?d?[w.listener||w]:[w]:d?x(w):S(w,w.length)}l.prototype.listeners=function(h){return c(this,h,!0)},l.prototype.rawListeners=function(h){return c(this,h,!1)},l.listenerCount=function(h,f){return typeof h.listenerCount=="function"?h.listenerCount(f):m.call(h,f)},l.prototype.listenerCount=m;function m(h){var f=this._events;if(f!==void 0){var d=f[h];if(typeof d=="function")return 1;if(d!==void 0)return d.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function S(h,f){for(var d=new Array(f),v=0;v=0?t.replace(th,function(e){return e.charAt(1).toUpperCase()}):t}function ae(t,e,r){if(!t)return;let s=Object.getOwnPropertyDescriptor(t,e);return s||t==r?s||void 0:ae(Reflect.getPrototypeOf(t),e,r)}var Hs=function(t,e,r){let s,n,i;for(;(s=r)&&(r=r.next);)(n=r.listener)&&(r.path&&n[r.path]?i=e?n[r.path].apply(n,e):n[r.path]():i=e?n.apply(r,e):n.call(r)),r.times&&--r.times<=0&&(s.next=r.next,r.listener=null)};function Z(t,e,r,s){var n;let i,o,l;return i=t[be]||(t[be]={}),o=i[e]||(i[e]={}),l=o.tail||(o.tail=o.next={}),l.listener=r,l.path=s,o.tail=l.next={},l}function q(t,e,r){let s=Z(t,e,r);return s.times=1,s}function jt(t,e,r,s){let n,i,o=t[be];if(!!o&&(n=o[e])){for(;(i=n)&&(n=n.next);)if(n==r||n.listener==r){i.next=n.next,n.listener=null;break}}}function tt(t,e,r){let s;(s=t[be])&&(s[e]&&Hs(e,r,s[e]),s.all&&Hs(e,[e,r],s.all))}var Ze=class{emit(t,...e){return tt(this,t,e)}on(t,...e){return Z(this,t,...e)}once(t,...e){return q(this,t,...e)}un(t,...e){return jt(this,t,...e)}};function eh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ys=Symbol.for("#__init__"),Gs=Symbol.for("#schedule"),ar=Symbol.for("#frames"),Se=Symbol.for("#interval"),xt=Symbol.for("#stage"),wt=Symbol.for("#scheduled"),_e=Symbol.for("#version"),rh=Symbol.for("#fps"),Ws=Symbol.for("#ticker"),sh=globalThis.requestAnimationFrame||function(t){return globalThis.setTimeout(t,1e3/60)},yc=1/60,nh=class{constructor(t=null){this[Ys](t)}[Ys](t=null){var e;this.owner=t&&(e=t.owner)!==void 0?e:null,this.target=t&&(e=t.target)!==void 0?e:null,this.active=t&&(e=t.active)!==void 0?e:!1,this.value=t&&(e=t.value)!==void 0?e:void 0,this.skip=t&&(e=t.skip)!==void 0?e:0,this.last=t&&(e=t.last)!==void 0?e:0}tick(t,e){return this.last=this.owner[ar],this.target.tick(this,e),1}update(t,e){let r=this.active,s=t.value;return this.value!=s&&(this.deactivate(),this.value=s),(this.value||r||e)&&this.activate(),this}queue(){this.owner.add(this)}activate(){return this.value===!0?this.owner.on("commit",this):this.value===!1||typeof this.value=="number"&&(this.value/16.666666666666668<=2?this.owner.on("raf",this):this[Se]=globalThis.setInterval(this.queue.bind(this),this.value)),this.active=!0,this}deactivate(){return this.value===!0&&this.owner.un("commit",this),this.owner.un("raf",this),this[Se]&&(globalThis.clearInterval(this[Se]),this[Se]=null),this.active=!1,this}},vs=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[xt]=-1,this[ar]=0,this[wt]=!1,this[_e]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[rh]=0,t.$promise=null,t.$resolve=null,this[Ws]=function(e){return t[wt]=!1,t.tick(e)}}touch(){return this[_e]++}get version(){return this[_e]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[wt]||this[Gs](),this}get committing\u03A6(){return this.queue.indexOf("commit")>=0}get syncing\u03A6(){return this[xt]==1}listen(t,e){let r=this.listeners[t],s=!r;return r||(r=this.listeners[t]=new Set),r.add(e),t=="raf"&&s&&this.add("raf"),this}unlisten(t,e){var r;let s=this.listeners[t];return s&&s.delete(e),t=="raf"&&s&&s.size==0&&(r=this.listeners.raf,delete this.listeners.raf),this}on(t,e){return this.listen(t,e)}un(t,e){return this.unlisten(t,e)}get promise(){var t=this;return t.$promise||(t.$promise=new Promise(function(e){return t.$resolve=e}))}tick(t){var e=this;let r=this.queue,s=this[ar]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[xt]=1,this[_e]++,r.length)for(let n=0,i=eh(r),o=i.length;n0&&setTimeout(function(){return r.decr(t)},e),s[t]=Math.max(n,0)+1}decr(t){let e=this.stacks,r=e[t]||0;return r==1&&this.remove(t),e[t]=Math.max(r,1)-1}reconcile(t,e){let r=this[Qs],s=this[Js],n=!0;if(!r)r=this[Qs]=[t],s=this[Js]=[e||""],this.toString=this.valueOf=this[Xs];else{let i=r.indexOf(t),o=e||"";i==-1?(r.push(t),s.push(o)):s[i]!=o?s[i]=o:n=!1}n&&(this[Zs]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Xs](){return this.string+(this[Zs]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[tn]||(this[tn]={})}},xe=Symbol.for("#__init__"),rn=Symbol.for("#__initor__"),sn=Symbol.for("#__inited__"),ur=Symbol.for("#getRenderContext"),ih=Symbol.for("#getDynamicContext"),nn=Symbol(),L={context:null},oh=class{constructor(t=null){this[xe](t)}[xe](t=null){var e;this.stack=t&&(e=t.stack)!==void 0?e:[]}push(t){return this.stack.push(t)}pop(t){return this.stack.pop()}},Mt=new oh,mt=class extends Map{static[xe](){return this.prototype[rn]=nn,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[rn]===nn&&this[sn]&&this[sn]()}pop(){return L.context=null}[ur](t){let e=this.get(t);return e||this.set(t,e=new mt(this._,t)),L.context=e}[ih](t,e){return this[ur](t)[ur](e)}run(t){return this.value=t,L.context==this&&(L.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};mt[xe]();function Ts(t,e=Symbol(),r=t){return L.context=t[e]||(t[e]=new mt(r,e))}function Ro(){let t=L.context,e=t||new mt(null);return globalThis.DEBUG_IMBA&&!t&&Mt.stack.length>0&&console.warn("detected unmemoized nodes in",Mt.stack.slice(0),"see https://imba.io",e),t&&(L.context=null),e}function Dt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function lh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Rt=Symbol.for("#parent"),on=Symbol.for("#closestNode"),hh=Symbol.for("#parentNode"),ah=Symbol.for("#context"),we=Symbol.for("#__init__"),ln=Symbol.for("##inited"),cr=Symbol.for("#getRenderContext"),uh=Symbol.for("#getDynamicContext"),hn=Symbol.for("#insertChild"),Vt=Symbol.for("#appendChild"),fr=Symbol.for("#replaceChild"),an=Symbol.for("#removeChild"),rt=Symbol.for("#insertInto"),un=Symbol.for("#insertIntoDeopt"),zt=Symbol.for("#removeFrom"),cn=Symbol.for("#removeFromDeopt"),Tt=Symbol.for("#replaceWith"),fn=Symbol.for("#replaceWithDeopt"),dr=Symbol.for("#placeholderNode"),ch=Symbol.for("#attachToParent"),fh=Symbol.for("#detachFromParent"),dh=Symbol.for("#placeChild"),ph=Symbol.for("#beforeReconcile"),mh=Symbol.for("#afterReconcile"),gh=Symbol.for("#afterVisit"),yh=Symbol.for("#visitContext"),dn=Symbol.for("#__initor__"),pn=Symbol.for("#__inited__"),mn=Symbol.for("##parent"),pr=Symbol.for("##up"),gn=Symbol.for("##context"),gt=Symbol.for("#domNode"),Te=Symbol.for("##placeholderNode"),yn=Symbol.for("#domDeopt"),Ee=Symbol.for("##visitContext"),vn=Symbol.for("#isRichElement"),bn=Symbol.for("#src"),Et=Symbol.for("#htmlNodeName"),vh=Symbol.for("#getSlot"),Sn=Symbol.for("#ImbaElement"),_n=Symbol.for("#cssns"),bh=Symbol.for("#cssid"),xn=Symbol(),{Event:et,UIEvent:Vo,MouseEvent:Es,PointerEvent:Os,KeyboardEvent:Ns,CustomEvent:A,Node:Y,Comment:ue,Text:tr,Element:O,HTMLElement:er,HTMLHtmlElement:zo,HTMLSelectElement:ks,HTMLInputElement:$s,HTMLTextAreaElement:Ps,HTMLButtonElement:Cs,HTMLOptionElement:Ls,HTMLScriptElement:qo,SVGElement:rr,DocumentFragment:Ko,ShadowRoot:Uo,Document:ce,Window:Bo,customElements:Ho}=globalThis.window,wn={};function Tn(t,e,r){if(!t)return r[e]=null;if(r[e]!==void 0)return r[e];let s=Object.getOwnPropertyDescriptor(t,e);return s!==void 0||t==rr?r[e]=s||null:Tn(Reflect.getPrototypeOf(t),e,r)}var mr={},gr={},fe={},Is={};function de(){return globalThis.document}function Yo(){return!0}var Sh={get(t,e){let r=t,s;for(;r&&s==null;)(r=r[Rt])&&(s=r[e]);return s},set(t,e,r){let s=t,n;for(;s&&n==null;){if(ae(s,e,O))return s[e]=r,!0;s=s[Rt]}return!0}},_h=class{get flags(){return this.documentElement.flags}};Dt(ce.prototype,_h.prototype);var xh=class{get[Rt](){return this[mn]||this.parentNode||this[pr]}get[on](){return this}get[hh](){return this[Rt][on]}get[ah](){return this[gn]||(this[gn]=new Proxy(this,Sh))}[we](){return this}[ln](){return this}[cr](t){return Ts(this,t)}[uh](t,e){return this[cr](t)[cr](e)}[hn](t,e){return t[rt](this,e)}[Vt](t){return t[rt](this,null)}[fr](t,e){let r=this[hn](t,e);return this[an](e),r}[an](t){return t[zt](this)}[rt](t,e=null){return e?t.insertBefore(this,e):t.appendChild(this),this}[un](t,e){return e?t.insertBefore(this[gt]||this,e):t.appendChild(this[gt]||this),this}[zt](t){return t.removeChild(this)}[cn](t){return t.removeChild(this[gt]||this)}[Tt](t,e){return e[fr](t,this)}[fn](t,e){return e[fr](t,this[gt]||this)}get[dr](){return this[Te]||(this[Te]=globalThis.document.createComment("placeholder"))}set[dr](t){let e=this[Te];this[Te]=t,e&&e!=t&&e.parentNode&&e[Tt](t)}[ch](){let t=this[gt],e=t&&t.parentNode;return t&&e&&t!=this&&(this[gt]=null,this[rt](e,t),t[zt](e)),this}[fh](){this[yn]!=!0&&(this[yn]=!0,!0)&&(this[Tt]=this[fn],this[zt]=this[cn],this[rt]=this[un],this[pr]||(this[pr]=this[Rt]));let t=this[dr];return this.parentNode&&t!=this&&(t[rt](this.parentNode,this),this[zt](this.parentNode)),this[gt]=t,this}[dh](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof ue)return r;let n=globalThis.document.createComment("");return r?r[Tt](n,this):n[rt](this,null)}if(t===r)return t;if(s!=="object"){let n,i=t;return e&128&&e&256,r?r instanceof tr?(r.textContent=i,r):(n=globalThis.document.createTextNode(i),r[Tt](n,this),n):(this.appendChild(n=globalThis.document.createTextNode(i)),n)}else{if(globalThis.DEBUG_IMBA&&!t[rt])throw console.warn("Tried to insert",t,"into",this),new TypeError("Only DOM Nodes can be inserted into DOM");return r?r[Tt](t,this):t[rt](this,null)}}};Dt(Y.prototype,xh.prototype);var wh=class{log(...t){return console.log(...t)}emit(t,e,r={bubbles:!0,cancelable:!0}){e!=null&&(r.detail=e);let s=new A(t,r),n=this.dispatchEvent(s);return s}text$(t){return this.textContent=t,this}[ph](){return this}[mh](){return this}[gh](){this.render&&this.render(),this[Ee]&&(this[Ee]=null)}get[yh](){return this[Ee]||(this[Ee]={})}get flags(){return this.$flags||(this.$flags=new en(this),this.flag$==O.prototype.flag$&&(this.flags$ext=this.className),this.flagDeopt$()),this.$flags}flag$(t){let e=this.flags$ns;this.className=e?e+(this.flags$ext=t):this.flags$ext=t}flagDeopt$(){var t=this;this.flag$=this.flagExt$,t.flagSelf$=function(e){return t.flagSync$(t.flags$own=e)}}flagExt$(t){return this.flagSync$(this.flags$ext=t)}flagSelf$(t){return this.flagDeopt$(),this.flagSelf$(t)}flagSync$(){return this.className=(this.flags$ns||"")+(this.flags$ext||"")+" "+(this.flags$own||"")+" "+(this.$flags||"")}set$(t,e){let r=ae(this,t,O);!r||!r.set?this.setAttribute(t,e):this[t]=e}get richValue(){return this.value}set richValue(t){this.value=t}};Dt(O.prototype,wh.prototype),O.prototype.setns$=O.prototype.setAttributeNS,O.prototype[vn]=!0;function Go(t,e,r,s){let n=globalThis.document.createElement(t);return r&&(n.className=r),s!==null&&n.text$(s),e&&e[Vt]&&e[Vt](n),n}var Th=class{set$(t,e){var r;let s=wn[r=this.nodeName]||(wn[r]={}),n=Tn(this,t,s);!n||!n.set?this.setAttribute(t,e):this[t]=e}flag$(t){let e=this.flags$ns;this.setAttribute("class",e?e+(this.flags$ext=t):this.flags$ext=t)}flagSelf$(t){var e=this;return e.flag$=function(r){return e.flagSync$(e.flags$ext=r)},e.flagSelf$=function(r){return e.flagSync$(e.flags$own=r)},e.flagSelf$(t)}flagSync$(){return this.setAttribute("class",(this.flags$ns||"")+(this.flags$ext||"")+" "+(this.flags$own||"")+" "+(this.$flags||""))}};Dt(rr.prototype,Th.prototype);var Eh=class{set src(t){if(this[bn]!=t&&(this[bn]=t,!0)){if(t&&t.adoptNode)t.adoptNode(this);else if(t&&t.type=="svg"){if(t.attributes)for(let e=t.attributes,r=0,s=Object.keys(e),n=s.length,i,o;r-1||En.indexOf("CriOS")>=0||En.indexOf("FxiOS")>=0,Ne=!Nh,On=new Map,kh=class extends er{connectedCallback(){return Ne?this.parentNode.removeChild(this):this.parentNode.connectedCallback()}disconnectedCallback(){if(!Ne)return this.parentNode.disconnectedCallback()}};window.customElements.define("i-hook",kh);function $h(t,e){let r=On.get(e);if(!r){r={};let s=e.prototype,n=[s];for(;(s=s&&Object.getPrototypeOf(s))&&s.constructor!=t.constructor;)n.unshift(s);for(let i=0,o=lh(n),l=o.length;i=0&&this.childNodes.splice(r,0,t),t}[Cn](t){this.parentNode&&this.parentNode[Cn](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[Ln](t,e){this.parentNode&&this.parentNode[Ln](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[st](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[K]&&(e=this[K][st](t,e));for(let s=0,n=yr(this.childNodes),i=n.length;s=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[Pe](t){for(let e=0,r=yr(this.childNodes),s=r.length;et)for(;e>t;)r[Uh](s[--e]);else if(t>e)for(;t>e;)r[Bh](s[e++],n);this.length=t}[Le](t,e){this.parentNode=t,this[ht]&&this[ht][Le](t,e),e=this[ht];for(let r=0,s=Rh(this.childNodes),n=s.length;r0;)this.childNodes[--e][_r](t);this[ht]&&t.removeChild(this[ht]),this.parentNode=null}};Bn[Kn]();function rl(t,e){return new Bn(t,e)}function Hn(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var xr=Symbol.for("#appendChild"),Ie=Symbol.for("#insertChild"),Hh=Symbol.for("#replaceWith"),je=Symbol.for("#insertInto"),wr=Symbol.for("#removeFrom"),Yh=Symbol.for("#afterVisit"),Yn=Symbol.for("#__initor__"),Gn=Symbol.for("#__inited__"),Wn=Symbol.for("#__init__"),Me=Symbol.for("#domFlags"),Xn=Symbol.for("##parent"),at=Symbol.for("#end"),Qn=Symbol.for("#removeChild"),Jn=Symbol(),Zn=class extends Ft{static[Wn](){return this.prototype[Yn]=Jn,this}constructor(t,e){super(...arguments),this[Me]=t,this[Xn]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new mt(this,Symbol()),t&256||(this[at]=_t("map")),e&&e[xr](this),this[Yn]===Jn&&this[Gn]&&this[Gn]()}[xr](t){if(this.parentNode)return this.parentNode[Ie](t,this[at])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Me]&1)){this.array.push(t),this[xr](t);return}let r=this.array[e];if(r!==t){this.dirty=!0;let s=this.array.indexOf(t),n=this.changes.get(t);s===-1?(this.array.splice(e,0,t),this.insertChild(t,e,s)):s===e+1?(r&&this.changes.set(r,-1),this.array.splice(e,1)):(s>=0&&this.array.splice(s,1),this.array.splice(e,0,t),this.moveChild(t,e,s)),n==-1&&this.changes.delete(t)}}insertChild(t,e,r){let s=this.parentNode;if(s)if(e>0){let n=this.array[e-1];s[Ie](t,n.nextSibling)}else s[Ie](t,this.childNodes[e+1]||this[at])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[wr](t.parentNode)}[Ie](t,e){}[Hh](t,e){let r=t[je](e,this[at]);return this[wr](e),r}[je](t,e){this[Xn]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=Hn(this.array),i=n.length;st)for(;e.array.length>t;){let r=e.array.pop();e.removeChild(r)}}};Zn[Wn]();function sl(t,e){return new Zn(t,e)}var Ot=Symbol.for("#__init__"),ti=Symbol.for("#__initor__"),ei=Symbol.for("#__inited__"),Gh=Symbol.for("##inited"),Wh=Symbol.for("#afterVisit"),Xh=Symbol.for("#beforeReconcile"),Qh=Symbol.for("#afterReconcile"),ri=Symbol.for("#__hooks__"),Nt=Symbol.for("#autorender"),Fe=Symbol.for("##visitContext"),si=Symbol(),ni=new class{constructor(t=null){this[Ot](t)}[Ot](t=null){var e;this.items=t&&(e=t.items)!==void 0?e:[],this.current=t&&(e=t.current)!==void 0?e:null,this.lastQueued=t&&(e=t.lastQueued)!==void 0?e:null,this.tests=t&&(e=t.tests)!==void 0?e:0}flush(){let t=null;for(;t=this.items.shift();){if(!t.parentNode||t.hydrated\u03A6)continue;let e=this.current;this.current=t,t.__F|=1024,t.connectedCallback(),this.current=e}}queue(t){var e=this;let r=this.items.length,s=0,n=this.lastQueued;this.lastQueued=t;let i=Y.DOCUMENT_POSITION_PRECEDING,o=Y.DOCUMENT_POSITION_FOLLOWING;if(r){let l=this.items.indexOf(n),a=l,p=function(y,b){return e.tests++,y.compareDocumentPosition(b)};(l==-1||n.nodeName!=t.nodeName)&&(a=l=0);let u=e.items[a];for(;u&&p(u,t)&o;)u=e.items[++a];if(a!=l)u?e.items.splice(a,0,t):e.items.push(t);else{for(;u&&p(u,t)&i;)u=e.items[--a];a!=l&&(u?e.items.splice(a+1,0,t):e.items.unshift(t))}}else e.items.push(t),e.current||globalThis.queueMicrotask(e.flush.bind(e))}};function nl(){return ni.flush()}var me=class extends er{static[Ot](){return this.prototype[ti]=si,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[ti]===si&&this[ei]&&this[ei]()}setup$(){return this.__slots={},this.__F=0}[Ot](){return this.__F|=3,this}[Gh](){if(this[ri])return this[ri].inited(this)}flag$(t){this.className=this.flags$ext=t}build(){return this}awaken(){return this}mount(){return this}unmount(){return this}rendered(){return this}dehydrate(){return this}hydrate(){return this.autoschedule=!0,this}tick(){return this.commit()}visit(){return this.commit()}commit(){return this.render\u03A6?(this.__F|=256,this.render&&this.render(),this.rendered(),this.__F=(this.__F|512)&-257&-8193):(this.__F|=8192,this)}get autoschedule(){return(this.__F&64)!=0}set autoschedule(t){t?this.__F|=64:this.__F&=-65}set autorender(t){let e=this[Nt]||(this[Nt]={});e.value=t,this.mounted\u03A6&&F.schedule(this,e)}get render\u03A6(){return!this.suspended\u03A6}get mounting\u03A6(){return(this.__F&16)!=0}get mounted\u03A6(){return(this.__F&32)!=0}get awakened\u03A6(){return(this.__F&8)!=0}get rendered\u03A6(){return(this.__F&512)!=0}get suspended\u03A6(){return(this.__F&4096)!=0}get rendering\u03A6(){return(this.__F&256)!=0}get scheduled\u03A6(){return(this.__F&128)!=0}get hydrated\u03A6(){return(this.__F&2)!=0}get ssr\u03A6(){return(this.__F&1024)!=0}schedule(){return F.on("commit",this),this.__F|=128,this}unschedule(){return F.un("commit",this),this.__F&=-129,this}async suspend(t=null){let e=this.flags.incr("@suspended");return this.__F|=4096,t instanceof Function&&(await t(),this.unsuspend()),this}unsuspend(){return this.flags.decr("@suspended")==0&&(this.__F&=-4097,this.commit()),this}[Wh](){if(this.visit(),this[Fe])return this[Fe]=null}[Xh](){return this.__F&1024&&(this.__F=this.__F&-1025,this.classList.remove("_ssr_"),this.flags$ext&&this.flags$ext.indexOf("_ssr_")==0&&(this.flags$ext=this.flags$ext.slice(5)),this.__F&512||(this.innerHTML="")),globalThis.DEBUG_IMBA&&Mt.push(this),this[Fe]&&(this[Fe]=null),this}[Qh](){return globalThis.DEBUG_IMBA&&Mt.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){ni.queue(this);return}if(t&48)return;this.__F|=16,e||this[Ot](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),tt(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(F.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[Nt]&&F.schedule(this,this[Nt]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),tt(this,"unmount"),this.unmount(),this[Nt])return F.unschedule(this,this[Nt])}};me[Ot]();var il=me;function Jh(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var ii=Symbol.for("#__init__"),Zh={cm:1,mm:1,Q:1,pc:1,pt:1,px:1,em:1,ex:1,ch:1,rem:1,vw:1,vh:1,vmin:1,vmax:1,s:1,ms:1,fr:1,"%":1,in:1,turn:1,grad:1,rad:1,deg:1,Hz:1,kHz:1},oi={prefix:1,suffix:1,content:1},Tr={rose:[[356,100,97],[356,100,95],[353,96,90],[353,96,82],[351,95,71],[350,89,60],[347,77,50],[345,83,41],[343,80,35],[342,75,30]],pink:[[327,73,97],[326,78,95],[326,85,90],[327,87,82],[329,86,70],[330,81,60],[333,71,51],[335,78,42],[336,74,35],[336,69,30]],fuchsia:[[289,100,98],[287,100,95],[288,96,91],[291,93,83],[292,91,73],[292,84,61],[293,69,49],[295,72,40],[295,70,33],[297,64,28]],purple:[[270,100,98],[269,100,95],[269,100,92],[269,97,85],[270,95,75],[271,91,65],[271,81,56],[272,72,47],[273,67,39],[274,66,32]],violet:[[250,100,98],[251,91,95],[251,95,92],[252,95,85],[255,92,76],[258,90,66],[262,83,58],[263,70,50],[263,69,42],[264,67,35]],indigo:[[226,100,97],[226,100,94],[228,96,89],[230,94,82],[234,89,74],[239,84,67],[243,75,59],[245,58,51],[244,55,41],[242,47,34]],blue:[[214,100,97],[214,95,93],[213,97,87],[212,96,78],[213,94,68],[217,91,60],[221,83,53],[224,76,48],[226,71,40],[224,64,33]],sky:[[204,100,97],[204,94,94],[201,94,86],[199,95,74],[198,93,60],[199,89,48],[200,98,39],[201,96,32],[201,90,27],[202,80,24]],cyan:[[183,100,96],[185,96,90],[186,94,82],[187,92,69],[188,86,53],[189,94,43],[192,91,36],[193,82,31],[194,70,27],[196,64,24]],teal:[[166,76,97],[167,85,89],[168,84,78],[171,77,64],[172,66,50],[173,80,40],[175,84,32],[175,77,26],[176,69,22],[176,61,19]],emerald:[[152,81,96],[149,80,90],[152,76,80],[156,72,67],[158,64,52],[160,84,39],[161,94,30],[163,94,24],[163,88,20],[164,86,16]],green:[[138,76,97],[141,84,93],[141,79,85],[142,77,73],[142,69,58],[142,71,45],[142,76,36],[142,72,29],[143,64,24],[144,61,20]],lime:[[78,92,95],[80,89,89],[81,88,80],[82,85,67],[83,78,55],[84,81,44],[85,85,35],[86,78,27],[86,69,23],[88,61,20]],yellow:[[55,92,95],[55,97,88],[53,98,77],[50,98,64],[48,96,53],[45,93,47],[41,96,40],[35,92,33],[32,81,29],[28,73,26]],amber:[[48,100,96],[48,96,89],[48,97,77],[46,97,65],[43,96,56],[38,92,50],[32,95,44],[26,90,37],[23,83,31],[22,78,26]],orange:[[33,100,96],[34,100,92],[32,98,83],[31,97,72],[27,96,61],[25,95,53],[21,90,48],[17,88,40],[15,79,34],[15,75,28]],red:[[0,86,97],[0,93,94],[0,96,89],[0,94,82],[0,91,71],[0,84,60],[0,72,51],[0,74,42],[0,70,35],[0,63,31]],warmer:[[60,9,98],[60,5,96],[20,6,90],[24,6,83],[24,5,64],[25,5,45],[33,5,32],[30,6,25],[12,6,15],[24,10,10]],warm:[[0,0,98],[0,0,96],[0,0,90],[0,0,83],[0,0,64],[0,0,45],[0,0,32],[0,0,25],[0,0,15],[0,0,9]],gray:[[0,0,98],[240,5,96],[240,6,90],[240,5,84],[240,5,65],[240,4,46],[240,5,34],[240,5,26],[240,4,16],[240,6,10]],cool:[[210,20,98],[220,14,96],[220,13,91],[216,12,84],[218,11,65],[220,9,46],[215,14,34],[217,19,27],[215,28,17],[221,39,11]],cooler:[[210,40,98],[210,40,96],[214,32,91],[213,27,84],[215,20,65],[215,16,47],[215,19,35],[215,25,27],[217,33,17],[222,47,11]]},ta=new RegExp("^("+Object.keys(Tr).join("|")+")(\\d+(?:\\.\\d+)?)$"),ea=/^([xyz])$/,ra=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,sa=`*,::before,::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }`,na=class{constructor(t=null){this[ii](t)}[ii](t=null){var e;this.entries=t&&(e=t.entries)!==void 0?e:{}}register(t,e){let r=this.entries[t];r?r&&(r.css=e,r.node&&(r.node.textContent=e)):(r=this.entries[t]={sourceId:t,css:e},this.entries.resets||this.register("resets",sa),r.node=globalThis.document.createElement("style"),r.node.setAttribute("data-id",t),r.node.textContent=r.css,globalThis.document.head.appendChild(r.node))}toString(){return Object.values(this.entries).map(function(t){return t.css}).join(` `)}toValue(t,e,r,s=null){let n;oi[r]&&(t=String(t));let i=typeof t;if(i=="number"){if(e||(ea.test(r)?e="px":ra.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return Zh[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(i=="string"){if(r&&oi[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(ta)){let o=Tr[n[1]][parseInt(n[2])],l="100%";if(typeof s=="number"?l=s+"%":typeof s=="string"&&(l=s),o)return"hsla("+o[0]+","+o[1]+"%,"+o[2]+"%,"+l+")"}}else if(t&&t.toStyleString instanceof Function)return t.toStyleString();return t}parseDimension(t){if(typeof t=="string"){let[e,r,s]=t.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(r),s]}else if(typeof t=="number")return[t]}},Fs=new na,ol=Object.keys(Tr);function ll(){return!0}var ia=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let i=Fs.toValue(e,r,s,n);this.style.setProperty(t,i)}};Jh(O.prototype,ia.prototype);var oa=Symbol.for("#insertInto"),li=Symbol.for("#removeFrom");function hl(t,e={}){let r=L.context;L.context=e;let s=t(e);return L.context==e&&(L.context=r),s}function As(t,e){let r=e||globalThis.document.body,s=t;if(t instanceof Function){let n=new mt(r,null),i=function(){let o=L.context;L.context=n;let l=t(n);return L.context==n&&(L.context=o),l};s=i(),F.listen("commit",i)}else s.__F|=64;return s[oa](r),s}function Ds(t){return t&&t[li]&&t[li](t.parentNode),t}var hi=globalThis.imba||(globalThis.imba={});hi.mount=As,hi.unmount=Ds;function kt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function qt(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Kt=Symbol.for("##onchange"),Ut=Symbol.for("#afterVisit"),Bt=Symbol.for("##oninput"),Ae=Symbol.for("##onclick"),Ht=Symbol.for("##bound"),ut=Symbol.for("##visitContext");function al(){return!0}var la={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},Er=function(t){return t instanceof Array||t&&t.has instanceof Function},Or=function(t,e){return t==e?!0:t instanceof Array?t.indexOf(e)>=0:t&&t.has instanceof Function?t.has(e):t&&t.contains instanceof Function?t.contains(e):!1},Nr=function(t,e){if(t instanceof Array)return t.push(e);if(t&&t.add instanceof Function)return t.add(e)},kr=function(t,e){if(t instanceof Array){let r=t.indexOf(e);if(r>=0)return t.splice(r,1)}else if(t&&t.delete instanceof Function)return t.delete(e)};function ha(t){function e(){return t[0]?t[0][t[1]]:void 0}function r(s){return t[0]?t[0][t[1]]=s:null}return{get:e,set:r}}var aa=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Ht]&&la[this.nodeName]&&(this[Ht]=!0,this[Kt]&&this.addEventListener("change",this[Kt]=this[Kt].bind(this)),this[Bt]&&this.addEventListener("input",this[Bt]=this[Bt].bind(this),{capture:!0}),this[Ae]&&this.addEventListener("click",this[Ae]=this[Ae].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?ha(r):r),r}};kt(O.prototype,aa.prototype),Object.defineProperty(O.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(t){return this.setRichValue(t)}});var ua=class{[Kt](t){let e=this.data,r=this.$$value;this.$$value=void 0;let s=this.getRichValue();if(this.multiple){if(r)for(let n=0,i=qt(r),o=i.length;n0&&(u=u.split("~")[0]);let b=null,_=[t,i],c,m=null,S,g=!1,x=typeof u=="string";if(u[0]=="$"&&u[1]=="_"&&y[0]instanceof Function)u=y[0],u.passive||(i.commit=!0),_=[t,i].concat(y.slice(1)),m=e;else if(y instanceof Array){_=y.slice(),b=_;for(let E=0,h=Si(_),f=h.length;E2)}};function Fr(t,e){let r=e;return t instanceof Element?t:typeof t=="string"?t=="this"||t==""?r:t=="up"?r.parentNode:t=="op"?r.offsetParent:r.closest(t)||r.querySelector(t)||globalThis.document.querySelector(t):null}function $t(t){if(typeof t=="string"){let[e,r,s]=t.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(r),s]}else if(typeof t=="number")return[t]}function Ar(t,e=1){let r=1/e;return Math.round(t*r)/r}function za(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.min(r,Math.max(e,t))}function Oi(t,e,r,s,n=.1){let[i,o]=$t(r),[l,a]=$t(s),[p,u]=$t(n);return o=="%"&&(i=(e-t)*(i/100)),a=="%"&&(l=(e-t)*(l/100)),u=="%"&&(p=(l-i)*(p/100)),function(y,b){let _=(y-t)/(e-t),c=i+(l-i)*_;return n&&(c=Ar(c,p)),b&&(c=za(c,i,l)),c}}function qa(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}ir();function pl(){return!0}var Ka=class{\u03B1primary(){return!!this.isPrimary}\u03B1mouse(){return this.pointerType=="mouse"}\u03B1pen(){return this.pointerType=="pen"}\u03B1touch(){return this.pointerType=="touch"}\u03B1pressure(t=.5){return this.pressure>=t}\u03B1lock(){return!0}};qa(Os.prototype,Ka.prototype);function Ua(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Ni=Symbol.for("#capture"),W=Symbol.for("#step"),Ba=Symbol.for("#cancel"),Dr=Symbol.for("#reframe"),ki=Symbol.for("#mods"),Rr=Symbol.for("#dx"),Vr=Symbol.for("#dy"),ft=Symbol.for("#context"),qe=Symbol.for("#locked"),$i=Symbol.for("#teardown"),Pi=Symbol.for("#x"),Ci=Symbol.for("#y"),Ha=Symbol.for("#pinTarget");function ml(){return!0}var Li=null,Ya=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[ki]={}}set event(t){this.events.push(t)}get ctrlKey(){return this.originalEvent.ctrlKey}get altKey(){return this.originalEvent.altKey}get shiftKey(){return this.originalEvent.shiftKey}get metaKey(){return this.originalEvent.metaKey}get isPrimary(){return this.originalEvent.isPrimary}get pointerType(){return this.originalEvent.pointerType}get start(){return this.originalEvent}get originalTarget(){return this.originalEvent.target}get event(){return this.events[this.events.length-1]}get elapsed(){return this.event.timeStamp-this.events[0].timeStamp}get type(){return this.event.type}get pointerId(){return this.originalEvent.pointerId}get pressure(){return this.event.pressure}get clientX(){return this.event.clientX}get clientY(){return this.event.clientY}get offsetX(){return this.event.offsetX}get offsetY(){return this.event.offsetY}get active\u03A6(){return this.phase!="ended"}get ended\u03A6(){return this.phase=="ended"}get dx(){return this[Rr]==null?this.event.x-this.start.x:this[Rr]}get dy(){return this[Vr]==null?this.event.y-this.start.y:this[Vr]}stopImmediatePropagation(){return this.cancelBubble=!0,this.event.stopImmediatePropagation(),this}stopPropagation(){return this.cancelBubble=!0,this.event.stopPropagation(),this}preventDefault(){return this.defaultPrevented=!0,this.event.preventDefault()}emit(t,...e){return tt(this,t,e)}on(t,...e){return Z(this,t,...e)}once(t,...e){return q(this,t,...e)}un(t,...e){return jt(this,t,...e)}\u03B1flag(t,e){let{element:r}=this[ft],s=Date.now(),n=e instanceof O?e:e?r.closest(e):r;return this[W].setup!=!0&&(this[W].setup=!0,!0)&&(n.flags.incr(t),q(this,"end",function(){return n.flags.decr(t)})),!0}\u03B1lock(){return this[Ni](),!0}[Ni](){if(this[qe]!=!0&&(this[qe]=!0,!0))return this[ft].element.setPointerCapture(this.pointerId)}get[W](){var t,e;return(t=this[ki])[e=this[ft].step]||(t[e]={})}[Ba](){return this[$i]()}\u03B1moved(t,e){let r=this[W],{element:s,state:n,event:i}=this[ft];if(!r.setup){let u=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,u=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[y,b]=$t(u);r.threshold=y,r.sy=y,r.x0=this.x,r.y0=this.y,r.dir||(r.dir="dist"),r.x=r.left=r.right=r.y=r.up=r.down=r.dist=0,b&&b!="px"&&console.warn("only px threshold allowed in @touch.moved")}if(r.active)return!0;if(r.cancelled)return!1;let o=r.threshold,l=this.x-r.x0,a=this.y-r.y0;r.x=Math.max(r.x,Math.abs(l)),r.y=Math.max(r.y,Math.abs(a)),r.left=Math.max(r.left,-l),r.right=Math.max(r.right,l),r.up=Math.max(r.up,-a),r.down=Math.max(r.down,a),r.dist=Math.max(r.dist,Math.sqrt(l*l+a*a));let p=r[r.dir];if(p>o&&p>=r.x&&p>=r.y){r.active=!0;let u=n.pinTarget;return s.flags.incr("@move"),u&&u.flags.incr("@move"),this.preventDefault(),q(this,"end",function(){return u&&u.flags.decr("@move"),s.flags.decr("@move")}),!0}else if(r.x>o||r.y>o)return r.cancelled=!0,!1;return!1}\u03B1hold(t=250){var e=this;let r=this[W],s=this[ft].element;if(r.cancelled)return!1;if(r.setup&&!r.active){let n=this.clientX,i=this.clientY,o=n-r.x,l=i-r.y;Math.sqrt(o*o+l*l)>5&&!r.cancelled&&(clearTimeout(r.timeout),r.cancelled=!0)}if(r.setup!=!0&&(r.setup=!0,!0)){r.active=!1,r.x=this.clientX,r.y=this.clientY;let n;return r.timeout=setTimeout(function(){return r.active=!0,e.preventDefault(),s.flags.incr("@hold"),n&&n(!0),n=null},t),q(e,"end",function(){return r.active&&s.flags.decr("@hold"),clearTimeout(r.timeout),n&&n(!1),n=null}),new Promise(function(i){return n=i})}return r.active}\u03B1sync(t,e="x",r="y"){let s=this[W];return s.setup!=!0&&(s.setup=!0,!0)?(s.x=t[e]||0,s.y=t[r]||0,s.tx=this.x,s.ty=this.y):(e&&(t[e]=s.x+(this.x-s.tx)),r&&(t[r]=s.y+(this.y-s.ty))),this[ft].commit=!0,!0}\u03B1apply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[ft].commit=!0,!0}\u03B1css(t="x",e="y"){let r=this[W];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[ft].element,r.x=r.el[Pi]||0,r.y=r.el[Ci]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[Pi]=r.x+(this.x-r.tx),n=r.el[Ci]=r.y+(this.y-r.ty);t&&r.el.style.setProperty("--x",s+"px"),e&&r.el.style.setProperty("--y",n+"px")}return!0}\u03B1end(){return this.phase=="ended"}\u03B1shift(){return!!this.shiftKey}\u03B1alt(){return!!this.altKey}\u03B1ctrl(){return!!this.ctrlKey}\u03B1meta(){return!!this.metaKey}\u03B1primary(){return!!this.isPrimary}\u03B1mouse(){return this.pointerType=="mouse"}\u03B1pen(){return this.pointerType=="pen"}\u03B1touch(){return this.pointerType=="touch"}\u03B1pressure(t=.5){return this.pressure>=t}\u03B1log(...t){return console.info(...t),!0}\u03B1left(){return this.originalEvent.button==0}\u03B1middle(){return this.originalEvent.button==1}\u03B1right(){return this.originalEvent.button==2}\u03B1round(t=1,e=t){return this.x=Ar(this.x,t),this.y=Ar(this.y,e),!0}[Dr](...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,n=t[0],i=0,o="100%",l=0,a=typeof n;a=="number"||a=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(n)||n instanceof Array?n=null:a=="string"&&(n=="this"||n==""?n=r:n=="up"?n=r.parentNode:n=="op"?n=r.offsetParent:n=r.closest(n)||r.querySelector(n)),n==null&&(s++,t.unshift(n=r)),s==2?l=t[1]:s>2&&([i,o,l=0]=t.slice(1));let p=n.getBoundingClientRect();i instanceof Array||(i=[i,i]),o instanceof Array||(o=[o,o]),l instanceof Array||(l=[l,l]),e.rect=p,e.x=Oi(p.left,p.right,i[0],o[0],l[0]),e.y=Oi(p.top,p.bottom,i[1],o[1],l[1]),this.x0=this.x=e.x(this.x,e.clamp),this.y0=this.y=e.y(this.y,e.clamp)}else{let r=this.x=e.x(this.x,e.clamp),s=this.y=e.y(this.y,e.clamp);this[Rr]=r-this.x0,this[Vr]=s-this.y0}return!0}\u03B1fit(...t){return this[W].clamp=!0,this[Dr](...t)}\u03B1reframe(...t){return this[Dr](...t)}\u03B1pin(...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=Fr(t[0],this.target);r instanceof O||t.unshift(r=this.target);let s=t[1]||0,n=t[2]==null?t[2]=s:t[2],i=r.getBoundingClientRect();e.x=this.clientX-(i.left+i.width*s),e.y=this.clientY-(i.top+i.height*n),r&&(this[Ha]=r,r.flags.incr("_touch_"),q(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},Ga=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),Mr.ios\u03A6&&globalThis.parent!=globalThis&&Li!=!0&&(Li=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};if(Ua(O.prototype,Ga.prototype),globalThis.parent==globalThis&&Mr.ios\u03A6){let t=function(e){if(e.data=="setupTouchFix")return globalThis.addEventListener("touchmove",function(){return!1},{passive:!1}),globalThis.removeEventListener("message",t)};globalThis.addEventListener("message",t)}et.touch$handle=function(){let t=this.event,e=this.element,r=this.state.pointerId,s=this.modifiers,n=this.handler,i=Mr.ios\u03A6;if(this.current=this.state,r!=null)return r==t.pointerId;if(s.ctrl&&!t.ctrlKey||s.alt&&!t.altKey||s.meta&&!t.metaKey||s.shift&&!t.shiftKey||s.if&&!s.if[0]||s.self&&t.target!=e||s.primary&&!t.isPrimary||s.pen&&t.pointerType!="pen"||s.mouse&&t.pointerType!="mouse"||s.touch&&t.pointerType!="touch"||s.sel&&!t.target.matches(String(s.sel[0])))return;let o=this.state=n.state=this.current=new Ya(t,n,e);r=o.pointerId;let l=function(c){return c.preventDefault(),!1},a=null,p=Symbol(),u=function(c){let m=o.clientX,S=o.clientY,g=c.clientX,x=c.clientY;(o[qe]||o.defaultPrevented)&&(c.pointerId==o.pointerId||m==g&&S==x)&&(c.preventDefault(),c.stopPropagation()),u&&(globalThis.removeEventListener("click",u,{capture:!0}),u=null)},y=function(c){if(!(o.type=="touchmove"&&c.changedTouches[0].identifier!=r)&&(o.defaultPrevented||o[qe]))return c.preventDefault()},b=function(c){let m=c.type,S=o.phase;if(c.pointerId&&o.pointerId!=c.pointerId||c[p])return;c[p]=!0;let g=m=="pointerup"||m=="pointercancel";if(c.pressure==0&&c.pointerType=="mouse"&&m=="pointermove"&&o.originalEvent.pressure>0)return a(c);m=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=c.clientX,o.y=c.clientY),o.event=c,g&&(o.phase="ended");try{n.handleEvent(o)}catch{}if(S=="init"&&!g&&(o.phase="active"),g&&a)return a(c)},_=!1;return a=function(c){if(!_&&(_=!0,e.flags.decr("_touch_"),o.phase!="ended"&&(o.phase="ended",o.x=o.clientX,o.y=o.clientY,n.handleEvent(o)),o.emit("end"),s.passive||--n.prevents==0&&e.style.removeProperty("touch-action"),n.state={},globalThis.removeEventListener("pointermove",b,{passive:!!s.passive}),globalThis.removeEventListener("pointerup",b),globalThis.removeEventListener("pointercancel",b),setTimeout(function(){if(u&&(globalThis.removeEventListener("click",u,{capture:!0}),u=null),i&&y)return globalThis.removeEventListener("touchend",y),globalThis.removeEventListener("touchmove",y,{passive:!1}),y=null},100),!s.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[$i]=a,s.passive||(n.prevents||(n.prevents=0),n.prevents++,e.style.setProperty("touch-action","none"),e.offsetWidth),e.flags.incr("_touch_"),globalThis.addEventListener("pointermove",b,{passive:!!s.passive}),globalThis.addEventListener("pointerup",b),globalThis.addEventListener("pointercancel",b),globalThis.addEventListener("click",u,{capture:!0}),i&&!s.passive&&(globalThis.addEventListener("touchend",y),globalThis.addEventListener("touchmove",y,{passive:!1})),s.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),b(t),!1};function Ii(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function Wa(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Xa=Symbol.for("#context"),Qa=Symbol.for("#extendType");function gl(){return!0}var ji=new(globalThis.WeakMap||Map),ye={threshold:[0]},Ja={};et.intersect$handle=function(){let t=this.event.detail.observer;return this.modifiers._observer==t};var Za=class extends A{\u03B1in(){return this.delta>=0&&this.entry.isIntersecting}\u03B1out(){return this.delta<0}\u03B1css(t="ratio"){return this.target.style.setProperty("--ratio",this.ratio),!0}\u03B1flag(t,e){let{state:r,step:s}=this[Xa],n=Fr(e||"",this.target);return this.isIntersecting&&!r[s]?(n.flags.incr(t),r[s]=!0):r[s]&&!this.isIntersecting&&(n.flags.decr(t),r[s]=!1),!0}};function tu(t,e){return function(r,s){let n=s.prevRatios||(s.prevRatios=new WeakMap);for(let i=0,o=Ii(r),l=o.length;i1)for(i[0]=0;i.length"+i.map(function(o){return""+o+""}).join("")+""}).join(" "))}var dt={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},Vi={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},zi={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},qi={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},Gt;for(Q=1;Q<20;++Q)dt[111+Q]="f"+Q;var Q;for(Q=0;Q<=9;++Q)dt[Q+96]=Q.toString();function Br(t,e,r){if(t.addEventListener){t.addEventListener(e,r,!1);return}t.attachEvent("on"+e,r)}function Hr(t,e,r){if(t.removeEventListener){t.removeEventListener(e,r,!1);return}t.detachEvent("on"+e,r)}function Ki(t){if(t.type=="keypress"){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return dt[t.which]?dt[t.which]:Vi[t.which]?Vi[t.which]:String.fromCharCode(t.which).toLowerCase()}function du(t,e){return t.sort().join(",")===e.sort().join(",")}function pu(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}function mu(t){if(t.preventDefault){t.preventDefault();return}t.returnValue=!1}function gu(t){if(t.stopPropagation){t.stopPropagation();return}t.cancelBubble=!0}function Yr(t){return t=="shift"||t=="ctrl"||t=="alt"||t=="meta"}function yu(){if(!Gt){Gt={};for(var t in dt)t>95&&t<112||dt.hasOwnProperty(t)&&(Gt[dt[t]]=t)}return Gt}function vu(t,e,r){return r||(r=yu()[t]?"keydown":"keypress"),r=="keypress"&&e.length&&(r="keydown"),r}function bu(t){return t==="+"?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function Ui(t,e){var r,s,n,i=[];for(r=bu(t),n=0;n1){b(c,E,m,S);return}h=Ui(c,S),e._callbacks[h.key]=e._callbacks[h.key]||[],a(h.key,h.modifiers,{type:h.action},g,c,x),e._callbacks[h.key][g?"unshift":"push"]({callback:m,modifiers:h.modifiers,action:h.action,seq:g,level:x,combo:c})}e._bindMultiple=function(c,m,S){for(var g=0;g-1||Bi(e,r.target)?!1:e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"||e.isContentEditable},j.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},j.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(dt[e]=t[e]);Gt=null},j.init=function(){var t=j(document);for(var e in t)e.charAt(0)!=="_"&&(j[e]=function(r){return function(){return t[r].apply(t,arguments)}}(e))};function Wt(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function Su(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Gr=Symbol.for("#updateHotKeys"),_u=Symbol.for("#inInput"),Wr=Symbol.for("#inEditable"),xu=Symbol.for("#hotkeyTarget"),Hi=Symbol.for("#hotkeyCombos"),wu=Symbol.for("#extendType"),Xt=Symbol.for("#combos"),Yi=Symbol.for("#target"),Qt=Symbol.for("#hotkeyHandlers"),Tu=Symbol.for("#defaultPrevented"),Eu=Symbol.for("#visit"),Gi=Symbol.for("#key"),Ou;try{Ou=(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)}catch{}function bl(){return!0}var Xr={esc:!0},Nu=class extends A{\u03B1focus(t){let e=this.target,r=e.ownerDocument;return t&&(e=e.querySelector(t)||e.closest(t)||r.querySelector(t)),e==r.body?r.activeElement!=r.body&&r.activeElement.blur():e.focus(),!0}\u03B1repeat(){return!0}},ku=function(t,e,r){return e.tagName=="INPUT"&&(r=="down"||r=="up")?!1:e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"?Xr[r]?(t[_u]=!0,t[Wr]=!0,!1):!0:e.contentEditable&&(e.contentEditable=="true"||e.contentEditable=="plaintext-only")?Xr[r]?(t[Wr]=!0,!1):!0:!1},zs=new class{constructor(){this.combos={"*":{}},this.identifiers={},this.labels={},this.handler=this.handle.bind(this),this.mousetrap=null,this.hothandler=this.handle.bind(this)}addKeycodes(t){return j.addKeycodes(t)}trigger(t){var e,r;return(r=(e=this.mousetrap)==null?void 0:e.trigger)==null?void 0:r.call(e,t)}register(t,e={}){return this.mousetrap||(this.mousetrap=j(globalThis.document),this.mousetrap.stopCallback=ku),this.combos[t]||(this.combos[t]=!0,this.mousetrap.bind(t,this.handler)),(e.capture||e.force)&&(Xr[t]=!0),this}comboIdentifier(t){var e;return(e=this.identifiers)[t]||(e[t]=t.replace(/\+/g,"_").replace(/\ /g,"-").replace(/\*/g,"all").replace(/\|/g," "))}humanize(t,e="auto"){return cu(t,e)}htmlify(t,e="auto"){return fu(t,e)}matchCombo(t){return!0}handle(t,e){var r;let s=t.target&&t.target[xu]||t.target||globalThis.document.body,n=Array.from(globalThis.document.querySelectorAll("[data-hotkey]")),i=s.ownerDocument,o=s;for(;o&&o!=i&&o.hotkeys!==!0;)o=o.parentNode;if(n=n.reverse().filter(function(u){let y=u[Hi];if(!(y&&(y[e]||y["*"])))return!1;let b=u;for(;b&&b!=i;){if(b.hotkeys===!1)return!1;b=b.parentNode}return!0}),!n.length)return;let l={combo:e,originalEvent:t,targets:n},a=new A("hotkey",{bubbles:!0,detail:l});a[wu](Nu),a.originalEvent=t,a.hotkey=e,s.dispatchEvent(a);let p=[];for(let u=0,y=Wt(n),b=y.length;u=this.length))return(e=this[Zt])[t]||(e[t]=Zr.from(this,this.cache[t]))}buildState(t,e,r=!0){let s={data:t,index:this.index+1,path:e||this.router.path,type:r?"push":"replace"};return new Zr(this,s,!0)}pushState(t,e,r,s=!0){return t instanceof Zr||(t=this.buildState(t,r,s)),this.index=t.index,this.cache[this.index]=t,this[Zt][this.index]=t,this[Zt].length=this.cache.length=Math.max(t.index+1,0),globalThis.history[s?"pushState":"replaceState"](String(t),e||null,t.path),this}replaceState(t,e,r){return this.pushState(t,e,r,!1)}},Zi=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=vt.parse(e),this.original=this.location.clone()),this.referrer=r}get apply(){return this.params.apply||[]}get revert(){return this.params.revert||[]}get state(){return this.params.state}get mode(){return this.params.mode}redirect(t){var e,r;return(r=(e=this.location)==null?void 0:e.update)==null||r.call(e,t),this}get path(){var t;return(t=this.location)==null?void 0:t.path}get url(){var t,e;return(e=(t=this.location)==null?void 0:t.toString)==null?void 0:e.call(t)}set path(t){this.location.path=t}abort(t=!1){return this.aborted=!0,t&&(this.forceAbort=t),this}match(t){return this.location?this.router.route(t).match(this.path):null}};function to(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ue=Symbol.for("#routes"),ts=Symbol.for("#match"),Lu=Symbol.for("#symbol"),eo=Symbol.for("#matches"),es=new Map,rs={},ro={},Iu=/.*/;function ju(t){if(!es.has(t)){let e=new Map;return es.set(t,e),e}return es.get(t)}function Mu(t,e){let r=ju(t);if(!r.has(e)){let s=Object.create(t);return Object.assign(s,e),r.set(e,s),s}return r.get(e)}var Fu=class{};function Au(t){if(rs[t])return rs[t];let e=rs[t]={url:t},r=t.indexOf("?"),s=t.indexOf("#");if(s>=0&&(e.hash=t.slice(s+1),t=e.url=t.slice(0,s)),r>=0){let n=e.query=t.slice(r+1);t=t.slice(0,r),e.query=ro[n]||(ro[n]=new URLSearchParams(n))}return e.path=t,e}var Du=class{constructor(t){this.router=t,this.fullPath="",this[Ue]={},this[ts]=new Fu,this[ts].path=""}route(t){var e;return(e=this[Ue])[t]||(e[t]=new so(this.router,t,this))}match(){return this[ts]}resolve(t){return"/"}},so=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[Lu]=Symbol(),this[eo]={},this[Ue]={}}route(t){var e;return(e=this[Ue])[t]||(e[t]=new so(this.router,t,this))}get fullPath(){return""+this.parent.fullPath+"/"+this.$path}load(t){return this.router.queue.add(t)}set path(t){var e=this;if(this.$path==t)return;if(this.raw=t,this.$path=t,this.groups=[],this.cache={},this.dynamic=!1,t.indexOf("?")>=0){let s=t.split("?");t=s.shift(),this.query={};for(let n=0,i=to(s.join("?").split("&")),o=i.length;ne&&(s.apply=this.history.slice(e+1,r+1))}}catch{}return this.refresh(s),this}onbeforeunload(t){let e=new Zi(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[ee]=this[Pt].location.hash),C()}setup(){this.onclick=this.onclick.bind(this),this.onhashchange=this.onhashchange.bind(this);let t=globalThis.window;return this[ee]=this[Pt].location.hash,this.location=vt.parse(this.realpath,this),t.onpopstate=this.onpopstate.bind(this),t.onbeforeunload=this.onbeforeunload.bind(this),t.addEventListener("hashchange",this.onhashchange),t.addEventListener("click",this.onclick,{capture:!0}),t.document.documentElement.emit("routerinit",this),this.refresh,this}onclick(t){if(t.metaKey||t.altKey)return;let e=null,r=null,s=t.target;for(;s&&(!e||!r);)!e&&s.nodeName=="A"&&(e=s),!r&&s[U]&&(r=s),s=s.parentNode;if(e&&r!=e&&(!r||r.contains(e))){let n=e.getAttribute("href");n&&!n.match(/\:\/\//)&&(!e.getAttribute("target")||e.getAttribute("target")=="_self")&&!e.classList.contains("external")&&e.addEventListener("click",this.onclicklink.bind(this),{once:!0})}return!0}onclicklink(t){let e=t.currentTarget||t.target;e[U]&&e[U].resolve();let r=e.getAttribute("href"),s=new URL(e.href),n=s.href.slice(s.origin.length),i=this.realpath.split("#")[0],o=n.split("#")[0];return i==o?globalThis.document.location.hash=s.hash:e[U]?e[U].go():this.go(n),t.stopPropagation(),t.preventDefault()}get url(){return this.location.url}get path(){let t=this.location.path;return this.aliases[t]||t}get pathname(){return this.location.pathname}serializeParams(t){var e;if(t instanceof Object){e=[];for(let r=0,s=Object.keys(t),n=s.length,i,o;rthis.idx&&this.array.splice(r,1),this.array.splice(this.idx,0,t)}if(s==-1)return this.changes.delete(t)}}end(){if(this.array.length>=this.idx)for(;this.array.length>this.idx;)this.changes.set(this.array.pop(),-1);return this.array}patch(){return this.end()}};function ps(t){var e,r;let s=Object.getOwnPropertyDescriptors(t.prototype);return e=s.name,delete s.name,r=s.constructor,delete s.constructor,s}function Zu(){if(To!=!0&&(To=!0,!0))return ws.on("inited",function(t){let e=t[Oo];if(e){let r=t instanceof Y,s=t[z]||(t[z]={});for(let n=0,i=Object.keys(e),o=i.length,l,a;n=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return k.add(this)}};function wl(t){return new ms(null,null,null,t)}var sc=class extends Array{push(){return B(this,super.push(...arguments))}pop(){return B(this,super.pop(...arguments))}unshift(){return B(this,super.unshift(...arguments))}shift(){return B(this,super.shift(...arguments))}splice(){return B(this,super.splice(...arguments))}at(){return P(this,super.at(...arguments))}map(){return P(this,super.map(...arguments))}flatMap(){return P(this,super.flatMap(...arguments))}flat(){return P(this,super.flat(...arguments))}filter(){return P(this,super.filter(...arguments))}find(){return P(this,super.find(...arguments))}slice(){return P(this,super.slice(...arguments))}sort(){return P(this,super.sort(...arguments))}get len(){return P(this,this.length)}set len(t){this.length=t,B(this)}toIterable(){return I&&k.add(this[z]),this}[Symbol.iterator](){return P(this,super[Symbol.iterator](...arguments))}},Po=ps(sc),nc=class{get len(){return this.length}set len(t){this.length=t}get[ie](){return Lt(this,null,Po)}[bt](t){return Lt(this,t,Po)}[oe](t){return ds(this,t)}};ls(Array.prototype,nc.prototype);var ic=class extends Set{has(){return P(this,super.has(...arguments))}keys(){return P(this,super.keys(...arguments))}values(){return P(this,super.values(...arguments))}entries(){return P(this,super.entries(...arguments))}add(){return B(this,super.add(...arguments))}clear(){return B(this,super.clear(...arguments))}delete(){return B(this,super.delete(...arguments))}},Co=ps(ic),oc=class{get[ie](){return Lt(this,null,Co)}[bt](t){return Lt(this,t,Co)}[oe](t){return ds(this,t)}};ls(Set.prototype,oc.prototype);var lc=class extends Map{get(){return P(this,super.get(...arguments))}has(){return P(this,super.has(...arguments))}keys(){return P(this,super.keys(...arguments))}values(){return P(this,super.values(...arguments))}entries(){return P(this,super.entries(...arguments))}set(){return B(this,super.set(...arguments))}clear(){return B(this,super.clear(...arguments))}delete(){return B(this,super.delete(...arguments))}},Lo=ps(lc),hc=class{get[ie](){return Lt(this,null,Lo)}[bt](t){return Lt(this,t,Lo)}[oe](t){return ds(this,t)}};ls(Map.prototype,hc.prototype);var ac=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=Xe(t),i=fs(t),o=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return I?ko(this,t,n,r,i):this[n]},set:function(a){return I||!!this[i]?$o(this,t,n,a,r,i):this[n]=a}},l=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return I?(Object.defineProperty(this,t,o),this[t]):this[n]},set:function(a){return this[n]=a,this[i]=null,Object.defineProperty(this,t,o)}}}},uc=class{constructor(t=null){this[wo](t)}[wo](t=null){var e;this[Ge]=t&&(e=t[Ge])!==void 0?e:new Map}for(t){let e=this[Ge].get(t);return e||this[Ge].set(t,e=[]),e}get(t){let e=this.for(t);return e[z]||e[ie],I&&P(e),e}add(t,e){return this.for(t).push(e)}delete(t,e){let r=this.for(t),s=r.indexOf(e);r.splice(s,1)}},cc=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new uc;let s=fs(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return I?ko(this,t,e,r,s):this[e]},set:function(o){let l=this[e];if(I||!!this[s]?$o(this,t,e,o,r,s):this[e]=o,l!=o&&(l&&r.index.delete(l,this),o))return r.index.add(o,this)}},i=r.lazyDescriptor={set:function(o){return this[e]=o,o&&r.index.add(o,this),Object.defineProperty(this,t,n),this[s]=null}}}where(t){return this.index.get(t)}},Qe=class{constructor(t,e,r){this.observing=null,this.observers=null,this.flags=68,this.target=t,this.func=e,this.vkey=r,this.version=0}get beacon(){return this}addSubscriber(t){this.observer?(this.observers||(this.observers=[]),this.observers.push(t)):this.observer=t}removeSubscriber(t){if(this.observer==t)return this.observer=null;let e=this.observers,r=e.indexOf(this);r>=0&&e.splice(r,1)}invalidated(t,e){if(this.flags|=$.STALE|$.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=H(this.observers),n=s.length;r