UNPKG

137 kBJavaScriptView Raw
1var xa=Object.create,De=Object.defineProperty,Sa=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty,Ta=Object.getOwnPropertyNames,La=Object.getOwnPropertyDescriptor;var bs=i=>De(i,"__esModule",{value:!0});var Ea=(i,t)=>()=>(t||(t={exports:{}},i(t.exports,t)),t.exports),Ma=(i,t)=>{for(var e in t)De(i,e,{get:t[e],enumerable:!0})},Na=(i,t,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ta(t))!wa.call(i,r)&&r!=="default"&&De(i,r,{get:()=>t[r],enumerable:!(e=La(t,r))||e.enumerable});return i},$=i=>Na(bs(De(i!=null?xa(Sa(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var fh=Ea((Yd,Xi)=>{"use strict";var le=typeof Reflect=="object"?Reflect:null,ih=le&&typeof le.apply=="function"?le.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},$r;le&&typeof le.ownKeys=="function"?$r=le.ownKeys:Object.getOwnPropertySymbols?$r=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:$r=function(t){return Object.getOwnPropertyNames(t)};function yc(i){console&&console.warn&&console.warn(i)}var sh=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}Xi.exports=g;Xi.exports.once=_c;g.EventEmitter=g;g.prototype._events=void 0;g.prototype._eventsCount=0;g.prototype._maxListeners=void 0;var nh=10;function Rr(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return nh},set:function(i){if(typeof i!="number"||i<0||sh(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");nh=i}});g.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};g.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||sh(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function oh(i){return i._maxListeners===void 0?g.defaultMaxListeners:i._maxListeners}g.prototype.getMaxListeners=function(){return oh(this)};g.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s=t==="error",n=this._events;if(n!==void 0)s=s&&n.error===void 0;else if(!s)return!1;if(s){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var h=n[t];if(h===void 0)return!1;if(typeof h=="function")ih(h,this,e);else for(var u=h.length,c=lh(h,u),r=0;r<u;++r)ih(c[r],this,e);return!0};function hh(i,t,e,r){var s,n,o;if(Rr(e),n=i._events,n===void 0?(n=i._events=Object.create(null),i._eventsCount=0):(n.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),n=i._events),o=n[t]),o===void 0)o=n[t]=e,++i._eventsCount;else if(typeof o=="function"?o=n[t]=r?[e,o]:[o,e]:r?o.unshift(e):o.push(e),s=oh(i),s>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=i,l.type=t,l.count=o.length,yc(l)}return i}g.prototype.addListener=function(t,e){return hh(this,t,e,!1)};g.prototype.on=g.prototype.addListener;g.prototype.prependListener=function(t,e){return hh(this,t,e,!0)};function bc(){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 ah(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},s=bc.bind(r);return s.listener=e,r.wrapFn=s,s}g.prototype.once=function(t,e){return Rr(e),this.on(t,ah(this,t,e)),this};g.prototype.prependOnceListener=function(t,e){return Rr(e),this.prependListener(t,ah(this,t,e)),this};g.prototype.removeListener=function(t,e){var r,s,n,o,l;if(Rr(e),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){l=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():vc(r,n),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,l||e)}return this};g.prototype.off=g.prototype.removeListener;g.prototype.removeAllListeners=function(t){var e,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n=Object.keys(r),o;for(s=0;s<n.length;++s)o=n[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this};function uh(i,t,e){var r=i._events;if(r===void 0)return[];var s=r[t];return s===void 0?[]:typeof s=="function"?e?[s.listener||s]:[s]:e?xc(s):lh(s,s.length)}g.prototype.listeners=function(t){return uh(this,t,!0)};g.prototype.rawListeners=function(t){return uh(this,t,!1)};g.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):ch.call(i,t)};g.prototype.listenerCount=ch;function ch(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}g.prototype.eventNames=function(){return this._eventsCount>0?$r(this._events):[]};function lh(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function vc(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function xc(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function _c(i,t){return new Promise(function(e,r){function s(){n!==void 0&&i.removeListener("error",n),e([].slice.call(arguments))}var n;t!=="error"&&(n=function(l){i.removeListener(t,s),r(l)},i.once("error",n)),i.once(t,s)})}});bs(exports);Ma(exports,{CUSTOM_TYPES:()=>_i,Comment:()=>nt,Component:()=>At,CustomEvent:()=>P,Document:()=>Z,DocumentFragment:()=>Kt,Easer:()=>Mr,Element:()=>p,ElementRoute:()=>$e,ElementRouteTo:()=>Br,Event:()=>C,EventHandler:()=>Cr,Fragment:()=>yt,HTMLButtonElement:()=>Qt,HTMLElement:()=>O,HTMLHtmlElement:()=>ur,HTMLInputElement:()=>Wt,HTMLLinkElement:()=>fr,HTMLOptionElement:()=>Jt,HTMLScriptElement:()=>cr,HTMLSelectElement:()=>Yt,HTMLStyleElement:()=>dr,HTMLTextAreaElement:()=>Xt,ImbaElement:()=>Ao,IntersectionEventDefaults:()=>Ne,KeyboardEvent:()=>Se,LazyProxy:()=>Be,Location:()=>Ut,Manifest:()=>Xe,MouseEvent:()=>Zt,Node:()=>w,PointerEvent:()=>xe,RenderContext:()=>q,Router:()=>Fe,SVGElement:()=>te,SVGSVGElement:()=>pr,Scheduler:()=>We,ShadowRoot:()=>vi,StyleDeclaration:()=>hr,Text:()=>wt,UIEvent:()=>ve,Window:()=>yi,_dirname_:()=>nn,_filename_:()=>oi,_run_:()=>on,asset:()=>un,autorun:()=>aa,clearInterval:()=>Zr,clearTimeout:()=>ti,colors:()=>Do,commit:()=>H,createAtom:()=>Wh,createComment:()=>ot,createComponent:()=>xi,createDynamic:()=>Jn,createElement:()=>Wn,createFragment:()=>Qn,createIndexedList:()=>xo,createKeyedList:()=>Oo,createLiveFragment:()=>po,createRenderContext:()=>er,createSVGElement:()=>Xn,createSlot:()=>ee,createTextNode:()=>we,customElements:()=>qn,defineTag:()=>Zn,deserializeData:()=>qe,document:()=>lr,emit:()=>A,events:()=>Tl,getDeepPropertyDescriptor:()=>fe,getRenderContext:()=>Sn,getSuperTagType:()=>Un,getTagType:()=>st,get_document:()=>Rt,hooks:()=>Ze,hotkeys:()=>rh,hydrate:()=>Ro,listen:()=>R,manifest:()=>x,mount:()=>Pi,observable:()=>ua,once:()=>k,parseTime:()=>Pt,patchManifest:()=>Ue,process:()=>Qe,proxy:()=>ze,render:()=>zo,renderContext:()=>E,renderer:()=>$t,reportChanged:()=>fa,reportObserved:()=>da,router:()=>Hh,run:()=>ca,scheduler:()=>N,serializeData:()=>vs,serve:()=>sn,servers:()=>xt,setInterval:()=>Jr,setTimeout:()=>Qr,styles:()=>ki,toCamelCase:()=>xs,transitions:()=>Me,unlisten:()=>bt,unmount:()=>Fi,use_dom_bind:()=>Uo,use_dom_teleport:()=>nl,use_dom_transitions:()=>dl,use_events:()=>Ll,use_events_hotkey:()=>eh,use_events_intersect:()=>Vl,use_events_keyboard:()=>Nr,use_events_mouse:()=>ne,use_events_pointer:()=>Ml,use_events_resize:()=>zl,use_events_selection:()=>Kl,use_events_touch:()=>$l,use_hooks:()=>cn,use_router:()=>Ah,use_slots:()=>fo,use_styles:()=>jo,use_window:()=>Bn,αaction:()=>_a,αautorun:()=>ya,αcomputed:()=>pa,αlazy:()=>fn,αobservable:()=>ma,αref:()=>ga});function je(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Dc=Symbol.for("#__initor__"),jc=Symbol.for("#__inited__"),Oa=Symbol.for("#type"),Ge=Symbol.for("#__listeners__"),Ca=/-./g,Be=class{static for(t){return new Proxy({},new this(t))}constructor(t){this.getter=t}get target(){return this.getter()}get(t,e){return this.target[e]}set(t,e,r){return this.target[e]=r,!0}};function ze(i,t={}){return new Proxy(t,new Be(i))}function Pt(i){let t=typeof i;if(t=="number")return i;if(t=="string"){if(/^\d+fps$/.test(i))return 1e3/parseFloat(i);if(/^([-+]?[\d\.]+)s$/.test(i))return parseFloat(i)*1e3;if(/^([-+]?[\d\.]+)ms$/.test(i))return parseFloat(i)}return null}function vs(i){let t=new Map,e=[],r=!1,s=function(h,u){if(u&&u[Oa]&&h!==""){let c=t.get(u);return t.has(u)||(t.set(u,c="$$"+e.length+"$$"),e.push(u)),h==null?u:c}return u},n=JSON.stringify(i,s,2),o=0;for(r=!0;o<e.length;)e[o]=JSON.stringify(e[o],s,2),o++;let l="";for(let h=0,u=je(e),c=u.length;h<c;h++){let a=u[h];l+='"$$'+h+'$$":'+a+`,
2`}return n="{"+l+n.slice(1),n}function qe(i,t=null){let e={},r=/\$\$\d+\$\$/,s=function(l){return e[l]||(e[l]=t?t(l):{})},n=function(l,h){if(typeof h=="string"){if(h[0]=="$"&&r.test(h))return s(h)}else if(typeof l=="string"&&l[0]=="$"&&r.test(l)){let u=s(l);return Object.assign(u,h),u}return h};return JSON.parse(i,n)}function Ue(i,t){var e,r,s,n;let o={},l={added:[],changed:[],removed:[],all:[],urls:{}};if(i.assets)for(let h=0,u=je(i.assets),c=u.length;h<c;h++){let a=u[h],d=a.originalPath||a.path;o[d]=a,a.url&&((e=t.urls)[r=a.url]||(e[r]=a))}for(let h=0,u=je(t.assets||[]),c=u.length;h<c;h++){let a=u[h],d=a.originalPath||a.path,m=o[d];a.url&&i.urls&&(i.urls[a.url]=a),m?(m.hash!=a.hash&&(m.invalidated=Date.now(),m.replacedBy=a,a.replaces=m,l.changed.push(a),l.all.push(a),m==i.main&&(l.main=a)),s=o[d],delete o[d]):(l.added.push(a),l.all.push(a))}for(let h=0,u=Object.keys(o),c=u.length,a,d;h<c;h++)a=u[h],d=o[a],d.removed=Date.now(),l.all.push(d);for(let h=0,u=je(l.all),c=u.length;h<c;h++){let a=u[h];(l[n=a.type]||(l[n]=[])).push(a)}return l.removed=Object.values(o),t.changes=l,t}function xs(i){return i.indexOf("-")>=0?i.replace(Ca,function(t){return t.charAt(1).toUpperCase()}):i}function fe(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:fe(Reflect.getPrototypeOf(i),t,e)}var Ss=function(i,t,e){let r,s,n;for(;(r=e)&&(e=e.next);)(s=e.listener)&&(e.path&&s[e.path]?n=t?s[e.path].apply(s,t):s[e.path]():n=t?s.apply(e,t):s.call(e)),e.times&&--e.times<=0&&(r.next=e.next,e.listener=null)};function R(i,t,e,r){var s;let n,o,l;return n=i[Ge]||(i[Ge]={}),o=n[t]||(n[t]={}),l=o.tail||(o.tail=o.next={}),l.listener=e,l.path=r,o.tail=l.next={},l}function k(i,t,e){let r=R(i,t,e);return r.times=1,r}function bt(i,t,e,r){let s,n,o=i[Ge];if(!!o&&(s=o[t])){for(;(n=s)&&(s=s.next);)if(s==e||s.listener==e){n.next=s.next,s.listener=null;break}}}function A(i,t,e){let r;(r=i[Ge])&&(r[t]&&Ss(t,e,r[t]),r.all&&Ss(t,[t,e],r.all))}function ka(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var ws=Symbol.for("#__init__"),Bc=Symbol.for("#__initor__"),zc=Symbol.for("#__inited__"),Ts=Symbol.for("#schedule"),Xr=Symbol.for("#frames"),Ke=Symbol.for("#interval"),Dt=Symbol.for("#stage"),jt=Symbol.for("#scheduled"),Ye=Symbol.for("#version"),Pa=Symbol.for("#fps"),Ls=Symbol.for("#ticker"),Fa=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var qc=1/60,Es=class{constructor(t=null){this[ws](t)}[ws](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[Xr],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/(1e3/60)<=2?this.owner.on("raf",this):this[Ke]=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[Ke]&&(globalThis.clearInterval(this[Ke]),this[Ke]=null),this.active=!1,this}},We=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Dt]=-1,this[Xr]=0,this[jt]=!1,this[Ye]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Pa]=0,t.$promise=null,t.$resolve=null,this[Ls]=function(e){return t[jt]=!1,t.tick(e)}}touch(){return this[Ye]++}get version(){return this[Ye]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[jt]||this[Ts](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Dt]==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[Xr]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Dt]=1,this[Ye]++,r.length)for(let n=0,o=ka(r),l=o.length;n<l;n++){let h=o[n];typeof h=="string"&&this.listeners[h]?e.listeners[h].forEach(function(u){if(u.tick instanceof Function)return u.tick(e,h);if(u instanceof Function)return u(e,h)}):h instanceof Function?h(e.dt,e):h.tick&&h.tick(e.dt,e)}return this[Dt]=this[jt]?0:-1,e.$promise&&(e.$resolve(e),e.$promise=e.$resolve=null),e.listeners.raf&&e.add("raf"),e}[Ts](){return this[jt]||(this[jt]=!0,this[Dt]==-1&&(this[Dt]=0),Fa(this[Ls])),this}schedule(t,e){var r,s;return e||(e=t[r=this.id]||(t[r]={value:!0})),(e[s=this.id]||(e[s]=new Es({owner:this,target:t}))).update(e,!0)}unschedule(t,e={}){e||(e=t[this.id]);let r=e&&e[this.id];return r&&r.active&&r.deactivate(),this}},N=new We;function H(){return N.add("commit").promise}function Qr(i,t){return globalThis.setTimeout(function(){i(),H()},t)}function Jr(i,t){return globalThis.setInterval(function(){i(),H()},t)}var Zr=globalThis.clearInterval,ti=globalThis.clearTimeout,de=globalThis.imba||(globalThis.imba={});de.commit=H;de.setTimeout=Qr;de.setInterval=Jr;de.clearInterval=Zr;de.clearTimeout=ti;var Ms=$(require("events")),ft=$(require("fs")),et=$(require("path"));var Ns=Symbol.for("#__initor__"),Os=Symbol.for("#__inited__"),$a=Symbol.for("#refresh"),Cs=Symbol.for("#__init__"),ei=Symbol.for("#manifest"),ks=Symbol.for("#absPath"),ri=Symbol.for("#raw"),Ps=Symbol.for("#watch"),Fs=Symbol(),$s=class{constructor(t){this[ei]=t}get absPath(){return this[ks]||(this[ks]=this[ei].resolve(this))}get name(){return et.default.basename(this.path)}get body(){return this.readSync()}readSync(){return ft.default.readFileSync(this.absPath,"utf-8")}pipe(t){return ft.default.createReadStream(this.absPath).pipe(t)}toString(){return this.url||this.absPath}},Xe=class extends Ms.EventEmitter{static[Cs](){return this.prototype[Ns]=Fs,this}constructor(t={}){var e;super();e=this,this.options=t,this.data={},this.path=t.path,this.refs={},e.reviver=function(r){return new $s(e)},e.init(t.data),this[Ns]===Fs&&this[Os]&&this[Os]()}get srcdir(){return et.default.resolve(et.default.dirname(this.path),this.data.srcdir)}get outdir(){return et.default.resolve(et.default.dirname(this.path),this.data.outdir)}get changes(){return this.data.changes||{}}get inputs(){return this.data.inputs}get outputs(){return this.data.outputs}get assets(){return this.data.assets}get urls(){return this.data.urls||{}}get main(){return this.data.main}get cwd(){return process.cwd()}get raw(){return this.data[ri]}resolve(t){return t._=="input"?et.default.resolve(this.srcdir||this.cwd,t.path):t._=="output"?et.default.resolve(this.outdir,t.path):et.default.resolve(this.cwd,t.path||t)}resolveAssetPath(t){return et.default.resolve(this.outdir,t)}read(t){return ft.default.readFileSync(this.resolve(t),"utf-8")}loadFromFile(t){return ft.default.existsSync(t)?ft.default.readFileSync(t,"utf-8"):"{}"}init(t=null){return(t||this.path)&&this.update(t),this}update(t){if(t==null&&(this.path?t=this.loadFromFile(this.path):console.warn("cannot update manifest without path")),typeof t=="string"){let e=t;t=qe(t,this.reviver),t[ri]=e}return this.data=Ue(this.data||{},t),this.data.changes.all.length&&this.emit("change",this.diff,this),this.data.changes.main&&this.emit("change:main",this.data.main,this),this.data.changes}serializeForBrowser(){return this.data[ri]}[$a](t){return!0}watch(){var t=this;if(this[Ps]!=!0?(this[Ps]=!0,!0):!1)return t.path&&!process.env.IMBA_HMR&&ft.default.watch(this.path,function(e,r){let s=ft.default.existsSync(t.path),n=s&&ft.default.statSync(t.path);s&&t.update()})}on(t,e){return this.watch(),super.on(...arguments)}};Xe[Cs]();var Rs=class{static for(t){return new Proxy({},new this(t))}constructor(t){this.getter=t}get target(){return this.getter()}get(t,e){return this.target[e]}set(t,e,r){return this.target[e]=r,!0}},x=Rs.for(function(){return globalThis[ei]});var si=$(require("cluster")),vt=$(require("fs")),Ft=$(require("path")),Bs=$(require("events"));var ii=$(require("perf_hooks")),Gt=Symbol.for("#spinner"),Xc=Symbol.for("#__initor__"),Qc=Symbol.for("#__inited__"),Ra=Symbol.for("#ctime"),As=Symbol.for("#IMBA_OPTIONS"),Aa={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},Q={bold:function(i){return""+i+""},red:function(i){return""+i+""},green:function(i){return""+i+""},yellow:function(i){return""+i+""},blue:function(i){return""+i+""},gray:function(i){return""+i+""},white:function(i){return""+i+""},f:function(i,t){let e=Aa[i];return"["+e[0]+"m"+t+"["+e[1]+"m"}};Q.warn=Q.yellow;Q.error=Q.red;var pe=process.platform!=="win32"||process.env.CI||process.env.TERM==="xterm-256color",Ha={info:Q.f("yellowBright",pe?"ℹ":"i"),success:Q.green(pe?"✔":"√"),warning:Q.yellow(pe?"⚠":"!!"),error:Q.red(pe?"×":"✖"),debug:Q.blue(pe?"ℹ":"i")},Hs=["debug","info","success","warning","error","silent"],Ia={"-1":"socket","4":"ip4","6":"ip6"};function Va(i){let t=Q.f;return i=i.replace(/https?\:[^\s\n\)\]]+/g,function(e){return t("blueBright",e)}),i=i.replace(/^[\t\s]*\>[^\n]+/gm,function(e){return t("bold",e)}),i=i.replace(/\t/g," "),i=i.replace(/^/gm," "),i}function Is(i,...t){let e=Q.f;return i=i.replace(/\%([\w\.]+)/g,function(r,s){let n=t.shift();if(s=="markdown")return Va(n);if(s=="kb")return e("dim",(n/1e3).toFixed(1)+"kb");if(s=="path"||s=="bold")return e("bold",n);if(s=="dim")return e("dim",n);if(s=="address"){let o=Ia[n.addressType];return n.port?e("blueBright",[n.address||"http://127.0.0.1",n.port].join(":")):e("blueBright",o)}else{if(s=="ms")return e("yellow",Math.round(n)+"ms");if(s=="d")return e("blueBright",n);if(s=="red")return e("redBright",n);if(s=="green")return e("greenBright",n);if(s=="yellow")return e("yellowBright",n);if(s=="ref")return e("yellowBright","#"+(n.id||n));if(s=="elapsed"){n!=null&&t.unshift(n);let o=ii.performance.now();return e("yellow",Math.round(o)+"ms")}else if(s=="heap"){n!=null&&t.unshift(n);let o=process.memoryUsage().heapUsed/1024/1024;return e("yellow",o.toFixed(2)+"mb")}else return n}}),[i,...t]}var Vs=null,Ds=null,js=class{static get main(){return Ds||(Ds=new this)}constructor({prefix:t=null,loglevel:e}={}){this[Ra]=Date.now(),this.prefix=t?Is(...t)[0]:"",this.loglevel=e||process.env.IMBA_LOGLEVEL||globalThis[As]&&globalThis[As].loglevel||"info"}write(t,...e){if(Hs.indexOf(t)<Hs.indexOf(this.loglevel))return this;let r=Ha[t]||t,[s,...n]=Is(...e);return this.prefix&&(s=this.prefix+s),this[Gt]&&this[Gt].isSpinning?(t=="success"&&(this[Gt].clear(),console.log(r+" "+s,...n),this[Gt].frame()),this[Gt].text=s):console.log(r+" "+s,...n)}debug(...t){return this.write("debug",...t)}log(...t){return this.write("info",...t)}info(...t){return this.write("info",...t)}warn(...t){return this.write("warn",...t)}error(...t){return this.write("error",...t)}success(...t){return this.write("success",...t)}ts(...t){return this.write("debug",...t,ii.performance.now())}spinner(){}get[Gt](){return Vs}get proxy(){var t=this;let e=function(...r){return t.info(...r)};return e.info=t.info.bind(t),e.warn=t.warn.bind(t),e.error=t.error.bind(t),e.debug=t.debug.bind(t),e.success=t.success.bind(t),e.ts=t.ts.bind(t),e.logger=t,e}async time(t,e){let r=Date.now();if(e){let s=await e();return this.info(""+t+" %ms",Date.now()-r),s}}},Gs=new js().proxy;var zs=$(require("module")),qs=$(require("http")),ef=$(require("https")),Us=$(require("http2"));function B(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Ks=Symbol.for("#setup"),Ys=Symbol.for("#__initor__"),Ws=Symbol.for("#__inited__"),Xs=Symbol.for("#__init__"),Qs=Symbol.for("#setup?"),Js=Symbol.for("#watch"),Da=Symbol.for("#dom"),ja=Symbol.for("#server"),Ga=Symbol.for("#raw"),Zs=Symbol(),ni={html:{"Content-Type":"text/html"},js:{"Content-Type":"text/javascript"},mjs:{"Content-Type":"text/javascript"},json:{"Content-Type":"application/json"},css:{"Content-Type":"text/css"},otf:{"Content-Type":"font/otf"},ttf:{"Content-Type":"font/ttf"},woff:{"Content-Type":"font/woff"},woff2:{"Content-Type":"font/woff2"},svg:{"Content-Type":"image/svg+xml"},avif:{"Content-Type":"image/avif"},gif:{"Content-Type":"image/gif"},png:{"Content-Type":"image/png"},apng:{"Content-Type":"image/apng"},webp:{"Content-Type":"image/webp"},jpg:{"Content-Type":"image/jpeg"},jpeg:{"Content-Type":"image/jpeg"},bmp:{"Content-Type":"image/bmp"},webm:{"Content-Type":"video/webm"},weba:{"Content-Type":"audio/webm"},avi:{"Content-Type":"video/x-msvideo"},mp3:{"Content-Type":"audio/mpeg"},mp4:{"Content-Type":"video/mp4"},m4a:{"Content-Type":"audio/m4a"},mpeg:{"Content-Type":"video/mpeg"},wav:{"Content-Type":"audio/wav"},ogg:{"Content-Type":"audio/ogg"},ogv:{"Content-Type":"video/ogg"},oga:{"Content-Type":"audio/ogg"},opus:{"Content-Type":"audio/opus"}},z=globalThis.process,tn=class extends Set{call(t,...e){var r;r=[];for(let s of B(this))r.push(s[t](...e));return r}close(t={}){var e;e=[];for(let r of B(this))e.push(r.close(t));return e}reload(t={}){var e;e=[];for(let r of B(this))e.push(r.reload(t));return e}broadcast(t,...e){var r;r=[];for(let s of B(this))r.push(s.broadcast(t,...e));return r}emit(t,e){var r;r=[];for(let s of B(this))r.push(s.emit(t,e));return r}},xt=new tn,Qe=new(class extends Bs.EventEmitter{static[Xs](){return this.prototype[Ys]=Zs,this}constructor(){var t;super(...arguments);t=this,this.autoreload=!1,this.state={},si.default.isWorker&&z.on("message",function(e){if(t.emit("message",e),e[0]=="emit")return t.emit(...e.slice(1))}),this[Ys]===Zs&&this[Ws]&&this[Ws]()}[Ks](){var t=this;if(!!(this[Qs]!=!0?(this[Qs]=!0,!0):!1))return t.on("reloading",function(e){var r;console.log("is reloading - from outside"),t.state.reloading=!0,r=[];for(let s of B(xt))r.push(s.pause());return r}),t.on("reloaded",async function(e){var r;t.state.reloaded=!0,console.log("is reloaded - from outside"),r=[];for(let n of B(xt))r.push(n.close());let s=r;return setTimeout(function(){return z.exit(0)},100),await Promise.all(s),z.exit(0)}),t.on("manifest:change",function(e){if(z.env.IMBA_HMR)return x.update(e)}),t.on("manifest:error",function(e){if(z.env.IMBA_HMR)return x.errors=e,xt.broadcast("errors",x.errors)}),!0}send(t){if(z.send instanceof Function)return z.send(t)}on(t,e){return t=="change"&&this.watch(),super.on(...arguments)}watch(){var t=this;if(this[Js]!=!0?(this[Js]=!0,!0):!1)return x.on("change:main",function(){return t.emit("change",x)})}reload(){if(!(this.isReloading!=!0?(this.isReloading=!0,!0):!1))return this;if(this.state.reloading=!0,!z.env.IMBA_SERVE){console.warn("not possible to gracefully reload servers not started via imba start");return}this.send("reload")}}[Xs]()),en=class{constructor(t,e={}){this.url=t,[this.path,this.query]=t.split("?"),this.ext=Ft.default.extname(this.path),this.headers={"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public"},Object.assign(this.headers,ni[this.ext.slice(1)]||{})}respond(t,e){let r=x.urls[this.url],s=this.headers,n=r?x.resolve(r):x.resolveAssetPath("public"+this.path);if(!n)return console.log("found no path for",r,this.url),e.writeHead(404,{}),e.end();if(r&&(r.ttl>0&&(s["cache-control"]="max-age="+r.ttl),r.imports)){let o=[];for(let l=0,h=B(r.imports),u=h.length;l<u;l++){let c=h[l];o.push("<"+c.url+">; rel=modulepreload; as=script")}s.Link=o.join(", ")}return vt.default.access(n,vt.default.constants.R_OK,function(o){if(o)return console.log("could not find path",n),e.writeHead(404,{}),e.end();try{let l=vt.default.createReadStream(n);return e.writeHead(200,s),l.pipe(e)}catch(l){return e.writeHead(503,{}),e.end()}})}createReadStream(){return vt.default.createReadStream(this.path)}pipe(t){return this.createReadStream().pipe(t)}},rn=class{static wrap(t,e={}){return new this(t,e)}constructor(t,e){var r=this;xt.add(this),this.id=Math.random(),this.options=e,this.closed=!1,this.paused=!1,this.server=t,this.clients=new Set,this.stalledResponses=[],this.assetResponders={},z.env.IMBA_PATH&&(this.devtoolsPath=Ft.default.resolve(z.env.IMBA_PATH,"dist","hmr.js")),this.scheme=t instanceof qs.default.Server?"http":"https";let s=this.server._events.request,n=globalThis[Da];t.off("request",s),s[ja]=this,t.on("listening",function(){let o=r.server.address(),l=o.address;(l=="::"||l=="0.0.0.0")&&(l="localhost");let h=""+r.scheme+"://"+l+":"+o.port+"/";return Gs.info("listening on %bold",h)}),x.on("change",function(o,l){return r.broadcast("manifest",l.data[Ga])}),r.handler=function(o,l){var h;let u=o instanceof Us.Http2ServerRequest,c=o.url,a="/__assets__/";if(r.paused||r.closed)return l.statusCode=302,l.setHeader("Location",o.url),u||l.setHeader("Connection","close"),r.closed?(u&&o.stream.session.close(),l.end()):r.stalledResponses.push(l);if(c=="/__hmr__.js"&&r.devtoolsPath){let f=vt.default.createReadStream(r.devtoolsPath);return l.writeHead(200,ni.js),f.pipe(l)}if(c=="/__hmr__"){let f={"Content-Type":"text/event-stream","Cache-Control":"no-cache"};return u||(f.Connection="keep-alive"),l.writeHead(200,f),r.clients.add(l),r.broadcast("init",x.serializeForBrowser(),[l]),o.on("close",function(){return r.clients.delete(l)}),!0}if(c.indexOf(a)==0||x.urls[c])return((h=r.assetResponders)[c]||(h[c]=new en(c,r))).respond(o,l);let d=o.headers,m;if(u?m=d[":scheme"]+"://"+d[":authority"]:m=(o.connection.encrypted?"https":"http")+"://"+d.host,e.static){let f=new URL(c,m),y=Ft.default.extname(f.pathname),_=ni[y.slice(1)];if(_){let M=Ft.default.resolve(x.cwd,"."+f.pathname);if(vt.default.existsSync(M)){vt.default.readFile(M,function(X,v){return X?(l.writeHead(500,{}),l.write("Error getting the file: "+X)):(l.writeHead(200,_),l.end(v))});return}}}if(n){let f=new n.Location(o.url,m);return n.Document.create({location:f},function(){return s(o,l)})}else return s(o,l)},t.on("request",r.handler),t.on("close",function(){return console.log("server is closing!!!")}),si.default.isWorker&&(Qe[Ks](),Qe.send("serve"))}broadcast(t,e={},r=this.clients){e=JSON.stringify(e);let s="data: "+e+`
3
4
5`;for(let n of B(r))n.write("event: "+t+`
6`),n.write(`id: imba
7`),n.write(s);return this}pause(){return(this.paused!=!0?(this.paused=!0,!0):!1)&&this.broadcast("paused"),this}resume(){if(this.paused!=!1?(this.paused=!1,!0):!1)return this.broadcast("resumed"),this.flushStalledResponses()}flushStalledResponses(){for(let t=0,e=B(this.stalledResponses),r=e.length;t<r;t++)e[t].end();return this.stalledResponses=[]}close(){var t=this;return this.pause(),new Promise(function(e){return t.closed=!0,t.server.close(e),t.flushStalledResponses()})}};function sn(i,...t){return rn.wrap(i,...t)}function oi(i){return Ft.default.resolve(z.cwd(),i)}function nn(i){return Ft.default.dirname(oi(i))}function on(i,t){try{let e=x.srcdir,r=e+"/server.imba",s=require.resolve.paths(e+"/server.imba");return require.main.paths.unshift(...zs.Module._nodeModulePaths(x.srcdir))}catch(e){}}var lf=Symbol.for("#__initor__"),hf=Symbol.for("#__inited__"),ln=Symbol.for("#__init__"),hn=Symbol.for("#warned"),Bt=Symbol.for("#asset"),Je=class{static wrap(t){let e=new Je(t);return new Proxy(e,e)}constructor(t){this.meta=t}get input(){return x.inputs[this.meta.input]}get asset(){return globalThis._MF_?this.meta:this.input?this.input.asset:null}set(t,e,r){return!0}get(t,e){return this.meta.meta&&this.meta.meta[e]!=null?this.meta.meta[e]:this.asset?e=="absPath"&&!this.asset.absPath?this.asset.url:this.asset[e]:((this.meta[hn]!=!0?(this.meta[hn]=!0,!0):!1)&&console.warn("Asset for '"+this.meta.input+"' not found"),e=="valueOf"?function(){return""}:null)}},an=class{constructor(t=null){this[ln](t)}[ln](t=null){this.url=t?t.url:void 0,this.meta=t?t.meta:void 0}adoptNode(t){var e;if((e=this.meta)==null?void 0:e.content){for(let r=this.meta.attributes,s=0,n=Object.keys(r),o=n.length,l,h;s<o;s++)l=n[s],h=r[l],t.setAttribute(l,h);t.innerHTML=this.meta.content}return this}toString(){return this.url}toStyleString(){return"url("+this.url+")"}};function un(i){var t,e;if(i[Bt])return i[Bt];if(i.type=="svg")return i[Bt]||(i[Bt]=new an(i));if(i.input){let r=globalThis._MF_&&globalThis._MF_[i.input];return r&&(Object.assign(i,r),i.toString=function(){return this.absPath}),i[Bt]||(i[Bt]=Je.wrap(i))}return i}var Ze={on:function(i,t){return R(this,i,t)},inited:function(i){return A(this,"inited",[i])}};function cn(){return!0}function fn(i,t,e){if(e.get){let r=e.get;e.get=function(){let s=r.call(this);return Object.defineProperty(this,t,{enumerable:!1,value:s}),s}}return e}function Ba(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var J={"":[-1,{id:1,slot:1,part:1,elementTiming:"elementtiming"}],HTML:[-1,{title:1,lang:1,translate:1,dir:1,accessKey:"accesskey",draggable:1,spellcheck:1,autocapitalize:1,inputMode:"inputmode",style:1,tabIndex:"tabindex",enterKeyHint:"enterkeyhint"}],HTMLAnchor:[1,{target:1,download:1,ping:1,rel:1,relList:"rel",hreflang:1,type:1,referrerPolicy:"referrerpolicy",coords:1,charset:1,name:1,rev:1,shape:1,href:1}],HTMLArea:[1,{alt:1,coords:1,download:1,shape:1,target:1,ping:1,rel:1,relList:"rel",referrerPolicy:"referrerpolicy",href:1}],HTMLMedia:[1,{src:1,crossOrigin:"crossorigin",preload:1,controlsList:"controlslist"}],HTMLAudio:[4,{}],HTMLBase:[1,{href:1,target:1}],HTMLQuote:[1,{cite:1}],HTMLBody:[1,{text:1,link:1,vLink:"vlink",aLink:"alink",bgColor:"bgcolor",background:1}],HTMLBR:[1,{clear:1}],HTMLButton:[1,{formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",name:1,type:1,value:1}],HTMLCanvas:[1,{width:1,height:1}],HTMLTableCaption:[1,{align:1}],HTMLTableCol:[1,{span:1,align:1,ch:"char",chOff:"charoff",vAlign:"valign",width:1}],HTMLData:[1,{value:1}],HTMLDataList:[1,{}],HTMLMod:[1,{cite:1,dateTime:"datetime"}],HTMLDetails:[1,{}],HTMLDialog:[1,{}],HTMLDiv:[1,{align:1}],HTMLDList:[1,{}],HTMLEmbed:[1,{src:1,type:1,width:1,height:1,align:1,name:1}],HTMLFieldSet:[1,{name:1}],HTMLForm:[1,{acceptCharset:"accept-charset",action:1,autocomplete:1,enctype:1,encoding:"enctype",method:1,name:1,target:1}],HTMLHeading:[1,{align:1}],HTMLHead:[1,{}],HTMLHR:[1,{align:1,color:1,size:1,width:1}],HTMLHtml:[1,{version:1}],HTMLIFrame:[1,{src:1,srcdoc:1,name:1,sandbox:1,width:1,height:1,referrerPolicy:"referrerpolicy",csp:1,allow:1,align:1,scrolling:1,frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",loading:1}],HTMLImage:[1,{alt:1,src:1,srcset:1,sizes:1,crossOrigin:"crossorigin",useMap:"usemap",width:1,height:1,referrerPolicy:"referrerpolicy",decoding:1,name:1,lowsrc:1,align:1,hspace:1,vspace:1,longDesc:"longdesc",border:1,loading:1}],HTMLInput:[1,{accept:1,alt:1,autocomplete:1,dirName:"dirname",formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",height:1,max:1,maxLength:"maxlength",min:1,minLength:"minlength",name:1,pattern:1,placeholder:1,src:1,step:1,type:1,defaultValue:"value",value:1,width:1,align:1,useMap:"usemap",required:1}],HTMLLabel:[1,{htmlFor:"for"}],HTMLLegend:[1,{align:1}],HTMLLI:[1,{value:1,type:1}],HTMLLink:[1,{href:1,crossOrigin:"crossorigin",rel:1,relList:"rel",media:1,hreflang:1,type:1,as:1,referrerPolicy:"referrerpolicy",sizes:1,imageSrcset:"imagesrcset",imageSizes:"imagesizes",charset:1,rev:1,target:1,integrity:1}],HTMLMap:[1,{name:1}],HTMLMenu:[1,{}],HTMLMeta:[1,{name:1,httpEquiv:"http-equiv",content:1,scheme:1,property:1,charset:1}],HTMLMeter:[1,{value:1,min:1,max:1,low:1,high:1,optimum:1}],HTMLObject:[1,{data:1,type:1,name:1,useMap:"usemap",width:1,height:1,align:1,archive:1,code:1,hspace:1,standby:1,vspace:1,codeBase:"codebase",codeType:"codetype",border:1}],HTMLOList:[1,{start:1,type:1}],HTMLOptGroup:[1,{label:1}],HTMLOption:[1,{label:1,value:1}],HTMLOutput:[1,{htmlFor:"for",name:1}],HTMLParagraph:[1,{align:1}],HTMLParam:[1,{name:1,value:1,type:1,valueType:"valuetype"}],HTMLPicture:[1,{}],HTMLPre:[1,{width:1}],HTMLProgress:[1,{value:1,max:1}],HTMLScript:[1,{src:1,type:1,charset:1,crossOrigin:"crossorigin",referrerPolicy:"referrerpolicy",event:1,htmlFor:"for",integrity:1,defer:1,async:1}],HTMLSelect:[1,{autocomplete:1,name:1,size:1,value:1,required:1}],HTMLSlot:[1,{name:1}],HTMLSource:[1,{src:1,type:1,srcset:1,sizes:1,media:1}],HTMLSpan:[1,{}],HTMLStyle:[1,{media:1,type:1}],HTMLTable:[1,{align:1,border:1,frame:1,rules:1,summary:1,width:1,bgColor:"bgcolor",cellPadding:"cellpadding",cellSpacing:"cellspacing"}],HTMLTableSection:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign"}],HTMLTableCell:[1,{colSpan:"colspan",rowSpan:"rowspan",headers:1,align:1,axis:1,height:1,width:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor",abbr:1,scope:1}],HTMLTemplate:[1,{}],HTMLTextArea:[1,{autocomplete:1,cols:1,dirName:"dirname",maxLength:"maxlength",minLength:"minlength",name:1,placeholder:1,rows:1,wrap:1}],HTMLTime:[1,{dateTime:"datetime"}],HTMLTitle:[1,{}],HTMLTableRow:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor"}],HTMLTrack:[1,{kind:1,src:1,srclang:1,label:1}],HTMLUList:[1,{type:1}],HTMLVideo:[4,{width:1,height:1,poster:1}],SVG:[-1,{}],SVGGraphics:[66,{transform:1}],SVGA:[67,{}],SVGAnimation:[66,{}],SVGAnimate:[69,{}],SVGAnimateMotion:[69,{}],SVGAnimateTransform:[69,{}],SVGGeometry:[67,{}],SVGCircle:[73,{cx:1,cy:1,r:1}],SVGClipPath:[67,{clipPathUnits:1}],SVGDefs:[67,{}],SVGDesc:[66,{}],SVGDiscard:[66,{}],SVGEllipse:[73,{cx:1,cy:1,rx:1,ry:1}],SVGFEBlend:[66,{mode:1,x:1,y:1,width:1,height:1}],SVGFEColorMatrix:[66,{type:1,values:1,x:1,y:1,width:1,height:1}],SVGFEComponentTransfer:[66,{x:1,y:1,width:1,height:1}],SVGFEComposite:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEConvolveMatrix:[66,{orderX:1,orderY:1,kernelMatrix:1,divisor:1,edgeMode:1,x:1,y:1,width:1,height:1}],SVGFEDiffuseLighting:[66,{surfaceScale:1,diffuseConstant:1,x:1,y:1,width:1,height:1}],SVGFEDisplacementMap:[66,{xChannelSelector:1,yChannelSelector:1,x:1,y:1,width:1,height:1}],SVGFEDistantLight:[66,{}],SVGFEDropShadow:[66,{dx:1,dy:1,stdDeviationX:1,stdDeviationY:1,x:1,y:1,width:1,height:1}],SVGFEFlood:[66,{x:1,y:1,width:1,height:1}],SVGComponentTransferFunction:[66,{type:1,tableValues:1,slope:1,amplitude:1,exponent:1}],SVGFEFuncA:[90,{}],SVGFEFuncB:[90,{}],SVGFEFuncG:[90,{}],SVGFEFuncR:[90,{}],SVGFEGaussianBlur:[66,{x:1,y:1,width:1,height:1}],SVGFEImage:[66,{preserveAspectRatio:1,x:1,y:1,width:1,height:1}],SVGFEMerge:[66,{x:1,y:1,width:1,height:1}],SVGFEMergeNode:[66,{}],SVGFEMorphology:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEOffset:[66,{x:1,y:1,width:1,height:1}],SVGFEPointLight:[66,{}],SVGFESpecularLighting:[66,{surfaceScale:1,specularConstant:1,specularExponent:1,x:1,y:1,width:1,height:1}],SVGFESpotLight:[66,{specularExponent:1}],SVGFETile:[66,{x:1,y:1,width:1,height:1}],SVGFETurbulence:[66,{numOctaves:1,stitchTiles:1,type:1,x:1,y:1,width:1,height:1}],SVGFilter:[66,{filterUnits:1,primitiveUnits:1,x:1,y:1,width:1,height:1}],SVGForeignObject:[67,{x:1,y:1,width:1,height:1}],SVGG:[67,{}],SVGImage:[67,{x:1,y:1,width:1,height:1,preserveAspectRatio:1}],SVGLine:[73,{x1:1,y1:1,x2:1,y2:1}],SVGGradient:[66,{gradientUnits:1,gradientTransform:1,spreadMethod:1}],SVGLinearGradient:[111,{x1:1,y1:1,x2:1,y2:1}],SVGMarker:[66,{refX:1,refY:1,markerUnits:1,markerWidth:1,markerHeight:1,orientType:1,orientAngle:1,viewBox:1,preserveAspectRatio:1}],SVGMask:[66,{maskUnits:1,maskContentUnits:1,x:1,y:1,width:1,height:1}],SVGMetadata:[66,{}],SVGMPath:[66,{}],SVGPath:[73,{}],SVGPattern:[66,{patternUnits:1,patternContentUnits:1,patternTransform:1,x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGPolygon:[73,{}],SVGPolyline:[73,{}],SVGRadialGradient:[111,{cx:1,cy:1,r:1,fx:1,fy:1,fr:1}],SVGRect:[73,{x:1,y:1,width:1,height:1,rx:1,ry:1}],SVGScript:[66,{}],SVGSet:[69,{}],SVGStop:[66,{}],SVGStyle:[66,{}],SVGSVG:[67,{x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGSwitch:[67,{}],SVGSymbol:[66,{viewBox:1,preserveAspectRatio:1}],SVGTextContent:[67,{textLength:1,lengthAdjust:1}],SVGTextPositioning:[130,{x:1,y:1,dx:1,dy:1,rotate:1}],SVGText:[131,{}],SVGTextPath:[130,{startOffset:1,method:1,spacing:1}],SVGTitle:[66,{}],SVGTSpan:[131,{}],SVGUse:[67,{x:1,y:1,width:1,height:1}],SVGView:[66,{viewBox:1,preserveAspectRatio:1}]},L={a:2,abbr:1,address:1,area:3,article:1,aside:1,audio:5,b:1,base:6,bdi:1,bdo:1,blockquote:7,body:8,br:9,button:10,canvas:11,caption:12,cite:1,code:1,col:13,colgroup:13,data:14,datalist:15,dd:1,del:16,details:17,dfn:1,dialog:18,div:19,dl:20,dt:1,em:1,embed:21,fieldset:22,figcaption:1,figure:1,footer:1,form:23,h1:24,h2:24,h3:24,h4:24,h5:24,h6:24,head:25,header:1,hgroup:1,hr:26,html:27,i:1,iframe:28,img:29,input:30,ins:16,kbd:1,label:31,legend:32,li:33,link:34,main:1,map:35,mark:1,menu:36,meta:37,meter:38,nav:1,noscript:1,object:39,ol:40,optgroup:41,option:42,output:43,p:44,param:45,picture:46,pre:47,progress:48,q:7,rp:1,rt:1,ruby:1,s:1,samp:1,script:49,section:1,select:50,slot:51,small:1,source:52,span:53,strike:1,strong:1,style:54,sub:1,summary:1,sup:1,table:55,tbody:56,td:57,template:58,textarea:59,tfoot:56,th:57,thead:56,time:60,title:61,tr:62,track:63,u:1,ul:64,var:1,video:65,wbr:1,svg_a:68,svg_animate:70,svg_animateMotion:71,svg_animateTransform:72,svg_audio:66,svg_canvas:66,svg_circle:74,svg_clipPath:75,svg_defs:76,svg_desc:77,svg_discard:78,svg_ellipse:79,svg_feBlend:80,svg_feColorMatrix:81,svg_feComponentTransfer:82,svg_feComposite:83,svg_feConvolveMatrix:84,svg_feDiffuseLighting:85,svg_feDisplacementMap:86,svg_feDistantLight:87,svg_feDropShadow:88,svg_feFlood:89,svg_feFuncA:91,svg_feFuncB:92,svg_feFuncG:93,svg_feFuncR:94,svg_feGaussianBlur:95,svg_feImage:96,svg_feMerge:97,svg_feMergeNode:98,svg_feMorphology:99,svg_feOffset:100,svg_fePointLight:101,svg_feSpecularLighting:102,svg_feSpotLight:103,svg_feTile:104,svg_feTurbulence:105,svg_filter:106,svg_foreignObject:107,svg_g:108,svg_iframe:66,svg_image:109,svg_line:110,svg_linearGradient:112,svg_marker:113,svg_mask:114,svg_metadata:115,svg_mpath:116,svg_path:117,svg_pattern:118,svg_polygon:119,svg_polyline:120,svg_radialGradient:121,svg_rect:122,svg_script:123,svg_set:124,svg_stop:125,svg_style:126,svg_svg:127,svg_switch:128,svg_symbol:129,svg_text:132,svg_textPath:133,svg_title:134,svg_tspan:135,svg_unknown:66,svg_use:136,svg_video:66,svg_view:137},li=Object.keys(J);for(let i=0,t=Ba(li),e=t.length;i<e;i++){let r=t[i],s=J[r];s.name=r+"Element",s.up=J[li[s[0]]]}for(let i=0,t=Object.keys(L),e=t.length,r,s;i<e;i++)r=t[i],s=L[r],L[r]=J[li[s]],r.indexOf("svg_")==0&&(L[r.replace("_",":")]=L[r]);var hi=$(require("async_hooks"));var dn=Symbol.for("#toStringDeopt"),mf=Symbol.for("#__initor__"),gf=Symbol.for("#__inited__"),pn=Symbol.for("#symbols"),mn=Symbol.for("#batches"),gn=Symbol.for("#extras"),yn=Symbol.for("#stacks"),zt=class{constructor(t){this.dom=t,this.string=""}contains(t){return this.dom.classList.contains(t)}add(t){return this.contains(t)?this:(this.string+=(this.string?" ":"")+t,this.dom.classList.add(t),this)}remove(t){if(!this.contains(t))return this;let e=new RegExp("(^|\\s)"+t+"(?=\\s|$)","g");return this.string=this.string.replace(e,""),this.dom.classList.remove(t),this}toggle(t,e){return e===void 0&&(e=!this.contains(t)),e?this.add(t):this.remove(t)}incr(t,e=0){var r=this;let s=this.stacks,n=s[t]||0;return n<1&&this.add(t),e>0&&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[pn],s=this[mn],n=!0;if(!r)r=this[pn]=[t],s=this[mn]=[e||""],this.toString=this.valueOf=this[dn];else{let o=r.indexOf(t),l=e||"";o==-1?(r.push(t),s.push(l)):s[o]!=l?s[o]=l:n=!1}n&&(this[gn]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[dn](){return this.string+(this[gn]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[yn]||(this[yn]={})}};var tr=Symbol.for("#__init__"),_n=Symbol.for("#__initor__"),bn=Symbol.for("#__inited__"),ai=Symbol.for("#getRenderContext"),za=Symbol.for("#getDynamicContext"),vn=Symbol(),E={context:null},xn=class{constructor(t=null){this[tr](t)}[tr](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()}},$t=new xn,q=class extends Map{static[tr](){return this.prototype[_n]=vn,this}constructor(t,e=null){super();this._=t,this.sym=e,this[_n]===vn&&this[bn]&&this[bn]()}pop(){return E.context=null}[ai](t){let e=this.get(t);return e||this.set(t,e=new q(this._,t)),E.context=e}[za](t,e){return this[ai](t)[ai](e)}run(t){return this.value=t,E.context==this&&(E.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};q[tr]();function er(i,t=Symbol(),e=i){return E.context=i[t]||(i[t]=new q(e,t))}function Sn(){let i=E.context,t=i||new q(null);return globalThis.DEBUG_IMBA&&!i&&$t.stack.length>0&&console.warn("detected unmemoized nodes in",$t.stack,"see https://imba.io",t),i&&(E.context=null),t}function ui(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var rt=Symbol.for("#__initor__"),it=Symbol.for("#__inited__"),U=Symbol.for("#__init__"),ci=Symbol.for("#parent"),wn=Symbol.for("#context"),Tn=Symbol.for("#closestNode"),qa=Symbol.for("#parentNode"),Ua=Symbol.for("##inited"),fi=Symbol.for("#getRenderContext"),Ka=Symbol.for("#getDynamicContext"),di=Symbol.for("#replaceChild"),me=Symbol.for("#appendChild"),Ln=Symbol.for("#removeChild"),St=Symbol.for("#insertInto"),En=Symbol.for("#insertChild"),ge=Symbol.for("#removeFrom"),Mn=Symbol.for("#removeFromDeopt"),qt=Symbol.for("#replaceWith"),Nn=Symbol.for("#replaceWithDeopt"),pi=Symbol.for("#placeholderNode"),Ya=Symbol.for("#attachToParent"),Wa=Symbol.for("#detachFromParent"),Xa=Symbol.for("#placeChild"),Qa=Symbol.for("#beforeReconcile"),Ja=Symbol.for("#afterReconcile"),Za=Symbol.for("#afterVisit"),On=Symbol.for("#document"),rr=Symbol.for("#htmlNodeName"),Cn=Symbol.for("#ImbaElement"),kn=Symbol.for("#flags"),ir=Symbol.for("#scripts"),mi=Symbol.for("#location"),Pn=Symbol.for("##document"),Fn=Symbol.for("##parent"),tu=Symbol.for("##up"),$n=Symbol.for("##context"),ye=Symbol.for("#domNode"),sr=Symbol.for("##placeholderNode"),Rn=Symbol.for("#domDeopt"),eu=Symbol.for("#insertIntoDeopt"),An=Symbol.for("##classList"),nr=Symbol.for("##style"),Hn=Symbol.for("##dataset"),dt=Symbol.for("#asset"),gi=Symbol.for("#innerHTML"),ru=Symbol.for("#isRichElement"),_e=Symbol.for("#src"),iu=Symbol.for("#getSlot"),su=Symbol.for("#cssns"),nu=Symbol.for("#cssid"),ou=Symbol.for("#dom"),In=Symbol(),Vn=Symbol(),Dn=Symbol(),jn=Symbol(),Gn=Symbol(),pt=null,Ut=class extends URL{},yi=class{get document(){return this[On]||(this[On]=new this.Document(this))}get location(){return this.document.location}};function Bn(){return!0}var lu={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},mt=null,hu={},zn=class{define(){return this}get(){return this}upgrade(){}whenDefined(){}},qn=new zn,_i={};function st(i,t){let e=i;if(typeof i=="string"&&(i=J[i]||L[i]||J[i+"Element"]||L["svg_"+i]),i instanceof w)return i;if(!i)return st("HTML");if(i&&!i.klass){class r extends st(i.up){}i.klass=r}if(i&&!i.idl){i.idl=!0;let r=Object.getOwnPropertyDescriptors(i.klass.prototype);for(let s=i[1],n=0,o=Object.keys(s),l=o.length,h,u;n<l;n++){h=o[n],u=s[h];let c=u==1?h:u;r[c]||c=="style"||Object.defineProperty(i.klass.prototype,h,{set:function(a){this.setAttribute(c,a)},get:function(){return this.getAttribute(c)}})}}return i.klass}function Un(i,t,e){let r=st(i,t);if(!(r==e||r.prototype instanceof e||r.prototype[rr])){let n=r.prototype[Cn];if(!n){n=class extends r{static[U](){return this.prototype[rt]=In,this}constructor(){super(...arguments);this.__slots={},this.__F=0,this[rt]===In&&this[it]&&this[it]()}}[U](),r.prototype[Cn]=n;let o=Object.getOwnPropertyDescriptors(e.prototype);Object.defineProperties(n.prototype,o),n.prototype[rr]=i}return n}return r}var or=function(i){let t=typeof i=="string"?i:String(i);return t.indexOf('"')>=0&&(t=t.replace(/\"/g,"&quot;")),t},bi=function(i,t){let e=typeof i=="string"?i:String(i);return t=="script"||(e.indexOf('"')>=0&&(e=e.replace(/\"/g,"&quot;")),e.indexOf("<")>=0&&(e=e.replace(/\</g,"&lt;")),e.indexOf(">")>=0&&(e=e.replace(/\>/g,"&gt;"))),e},Z=class{static create(t,e){let r=new Z;return r[wn]=t,r.location=t.location,pt||(pt=new hi.AsyncLocalStorage),pt.run(r,e),r}constructor(){}get flags(){return this[kn]||(this[kn]=new zt({classList:new be(this)}))}get scripts(){return this[ir]||(this[ir]=[])}set location(t){typeof t=="string"&&(t=new Ut(t)),this[mi]=t}get location(){return this[mi]||(this[mi]=new Ut("http://localhost/"))}createElement(t){let e=st(t),r=new e(t);return r.nodeName=t,r}createElementNS(t,e){if(t=="http://www.w3.org/2000/svg"){let r=st("svg_"+e),s=new r;return s.nodeName=e,s}return this.createElement(e)}createTextNode(t){return new wt(t)}createComment(t){return new nt(t)}createDocumentFragment(){return new Kt}getElementById(t){return null}},Tt=new Z,lr=Tt;function Rt(){var i;return pt&&((i=pt==null?void 0:pt.getStore)==null?void 0:i.call(pt))||Tt}var be=class{constructor(t,e){this.classes=e||[],this.dom=t}add(t){return this.classes.indexOf(t)<0&&this.classes.push(t),this}remove(t){let e=this.classes.indexOf(t);return e>=0&&(this.classes[e]=""),this}toggle(t){return this.contains(t)?this.remove(t):this.add(t),this}contains(t){return this.classes.indexOf(t)>=0}clone(t){return new be(t,this.classes.slice(0))}toString(){return this.classes.join(" ").trim()}},hr=class{constructor(){}removeProperty(t){var e;return e=this[t],delete this[t],e}setProperty(t,e){return this[t]=e}toString(){let t=[];for(let e=this,r=0,s=Object.keys(e),n=s.length,o,l;r<n;r++)o=s[r],l=e[o],l instanceof Function||t.push(""+o+": "+l);return t.join(";")}},ar=class{static wrap(t){return new Proxy(t.attributes,new ar)}set(t,e,r){return t["data-"+e]=r,!0}get(t,e){return t["data-"+e]}},au={get(i,t){let e=i,r;for(;e&&r==null;)(e=e[ci])&&(r=e[t]);return r}},w=class{toString(){return this.outerHTML}get outerHTML(){return""}text$(t){return this.textContent=t,this}get ownerDocument(){return this[Pn]||(this[Pn]=Rt())}get[ci](){return this[Fn]||this.parentNode||this[tu]}get[wn](){return this[$n]||(this[$n]=new Proxy(this,au))}get[Tn](){return this}get[qa](){return this[ci][Tn]}[U](){return this}[Ua](){return this}[fi](t){return er(this,t)}[Ka](t,e){return this[fi](t)[fi](e)}[di](t,e){let r=this[En](t,e);return this[Ln](e),r}[me](t){return t[St](this,null)}[Ln](t){return t[ge](this)}[St](t,e){return e?t.insertBefore(this,e):t.appendChild(this),this}[En](t,e){return t[St](this,e)}[ge](t){return t.removeChild(this)}[Mn](t){return t.removeChild(this[ye]||this)}[qt](t,e){return e[di](t,this)}[Nn](t,e){return e[di](t,this[ye]||this)}get[pi](){return this[sr]||(this[sr]=globalThis.document.createComment("placeholder"))}set[pi](t){let e=this[sr];this[sr]=t,e&&e!=t&&e.parentNode&&e[qt](t)}[Ya](){let t=this[ye],e=t&&t.parentNode;return t&&e&&t!=this&&(this[ye]=null,this[St](e,t),t[ge](e)),this}[Wa](){(this[Rn]!=!0?(this[Rn]=!0,!0):!1)&&(this[qt]=this[Nn],this[ge]=this[Mn],this[St]=this[eu]);let t=this[pi];return this.parentNode&&t!=this&&(t[St](this.parentNode,this),this[ge](this.parentNode)),this[ye]=t,this}[Xa](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof nt)return r;let n=new nt("");return r?r[qt](n,this):n[St](this,null)}if(t===r)return t;if(s!=="object"){let n,o=t;return e&128&&e&256,r?r instanceof wt?(r.textContent=o,r):(n=lr.createTextNode(o),r[qt](n,this),n):(this.appendChild(n=lr.createTextNode(o)),n)}else return r?r[qt](t,this):t[St](this,null)}},wt=class extends w{static[U](){return this.prototype[rt]=Vn,this}constructor(t){super();this.textContent=t||"",this[rt]===Vn&&this[it]&&this[it]()}get outerHTML(){return this.textContent}};wt[U]();var nt=class extends w{static[U](){return this.prototype[rt]=Dn,this}constructor(t){super();this.value=t,this[rt]===Dn&&this[it]&&this[it]()}get outerHTML(){return"<!-- "+bi(this.value)+" -->"}toString(){return this.tag&&this.tag.toNodeString?this.tag.toNodeString():this.outerHTML}};nt[U]();var p=class extends w{static[U](){return this.prototype[rt]=jn,this}constructor(t){super();this.nodeName=t,this.childNodes=[],this.attributes={},this[rt]===jn&&this[it]&&this[it]()}emit(t,e,r={bubbles:!0}){console.warn("Element#emit not supported on node")}get classList(){return this[An]||(this[An]=new be(this))}get style(){return this[nr]||(this[nr]=new hr)}get dataset(){return this[Hn]||(this[Hn]=ar.wrap(this))}get richValue(){return this.value}set richValue(t){this.value=t}set asset(t){this[dt]=t}get asset(){return this[dt]}flag$(){return this}flagIf$(){return this}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t}removeChild(t){let e=this.childNodes.indexOf(t);return e>=0&&this.childNodes.splice(e,1),this}replaceChild(t,e){let r=this.childNodes.indexOf(e);return r>=0&&(this.childNodes.splice(r,1,t),t.parentNode=this),e}insertBefore(t,e){let r=this.childNodes.indexOf(e);return this.childNodes.splice(r,0,t),this}setAttribute(t,e){return this.attributes[t]=e,this}setAttributeNS(t,e,r){return this.setAttribute(t+":"+e,r)}getAttribute(t){return this.attributes?this.attributes[t]:void 0}getAttributeNS(t,e){return this.getAttribute(t+":"+e)}removeAttribute(t){var e;return e=this.attributes[t],delete this.attributes[t],!0}addEventListener(){return this}removeEventListener(){return this}resolve(){return this}set innerHTML(t){this[gi]=t}get innerHTML(){let t="";if(this[gi])return this[gi];if(this.textContent!=null)return bi(this.textContent);for(let e=0,r=ui(this.childNodes),s=r.length;e<s;e++){let n=r[e];typeof n=="string"||n instanceof String?t+=bi(n,this.nodeName):typeof n=="number"||n instanceof Number?t+=""+n:n&&(t+=n.outerHTML)}return t}get outerHTML(){let t=this.nodeName,e=this[rr],r=""+t;e&&(r=""+e+" is='"+t+"'",t=e);let s,n=this.classList.toString();this.dehydrate&&(n=n?"_ssr_ "+n:"_ssr_",this.dehydrate()),(s=this.id)&&(r+=' id="'+or(s)+'"'),n&&(r+=' class="'+or(n)+'"');for(let o=this.attributes,l=0,h=Object.keys(o),u=h.length,c,a;l<u;l++)c=h[l],a=o[c],r+=" "+c+'="'+or(a)+'"';return this[nr]&&(r+=' style="'+or(this[nr].toString())+'"'),lu[t]?"<"+r+">":"<"+r+">"+this.innerHTML+"</"+t+">"}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get firstElementChild(){let t=this.childNodes.length,e=0;for(;e<t;){let r=this.childNodes[e++];if(r instanceof p)return r}return null}get lastElementChild(){let t=this.childNodes.length;for(;t>0;){let e=this.childNodes[--t];if(e instanceof p)return e}return null}get className(){return this.classList.toString()}set className(t){this.classList.classes=(t||"").split(" "),this.classList.toString()}log(...t){return console.log(...t),this}text$(t){return this.textContent=t,this}[Qa](){return this}[Ja](){return this}[Za](){this.render&&this.render()}get flags(){return this.$flags||(this.$flags=new zt(this),this.flag$==p.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=fe(this,t,p);!r||!r.set?this.setAttribute(t,e):this[t]=e}};p[U]();p.prototype.setns$=p.prototype.setAttributeNS;p.prototype[ru]=!0;var Kt=class extends p{static[U](){return this.prototype[rt]=Gn,this}constructor(){super(null);this[rt]===Gn&&this[it]&&this[it]()}get outerHTML(){return this.innerHTML}};Kt[U]();var vi=class extends Kt{get outerHTML(){return this.innerHTML}},O=class extends p{},ur=class extends O{get scripts(){return this[ir]||(this[ir]=[])}get outerHTML(){let t=mt;mt=this;let e=super.outerHTML,r=new Set,s=[],n=[];if((process.env.IMBA_HMR||globalThis.IMBA_HMR)&&n.push("<script src='/__hmr__.js'></script>"),!this.styles){for(let o=0,l=ui(this.scripts),h=l.length;o<h;o++){let c=l[o].src,a=x.urls[c];a&&a.css&&r.add(a.css)}for(let o of ui(r))n.push("<link rel='stylesheet' href='"+o.url+"'>")}if(mt=t,n.length){let o=e.indexOf("</head>");o==-1&&(o=e.indexOf("<body>")),o==-1&&(o=0),e=e.slice(0,o)+`
8`+n.join(`
9`)+`
10`+e.slice(o)}return"<!DOCTYPE html>"+e}},Yt=class extends O{},Wt=class extends O{},Xt=class extends O{},Qt=class extends O{},Jt=class extends O{},cr=class extends O{get outerHTML(){return mt&&(mt.scripts||(mt.scripts=[])).push(this),this[dt]&&(this[dt].js?(this.setAttribute("src",this[dt].js.url),this.setAttribute("type","module")):console.warn("could not find browser entrypoint for "+this[dt].path)),super.outerHTML}},fr=class extends O{get outerHTML(){if(this[dt]){let t=this.getAttribute("rel"),e;t=="stylesheet"&&((e=this[dt].css.url)||console.warn("could not find stylesheet for "+this[dt].path)),e&&this.setAttribute("href",e)}return super.outerHTML}},dr=class extends O{set src(t){this[_e]!=t?(this[_e]=t,!0):!1}get src(){return this[_e]}get outerHTML(){if(mt&&this.src&&(mt.styles||(mt.styles=[])).push(this),this.src){this.nodeName="link",this.setAttribute("rel","stylesheet"),this.setAttribute("href",String(this.src));let t=super.outerHTML;return this.nodeName="style",t}return super.outerHTML}},C=class{},ve=class extends C{},Zt=class extends ve{},xe=class extends Zt{},Se=class extends ve{},P=class extends C{},Kn={};function Yn(i,t,e){if(!i)return e[t]=null;if(e[t]!==void 0)return e[t];let r=Object.getOwnPropertyDescriptor(i,t);return r!==void 0||i==te?e[t]=r||null:Yn(Reflect.getPrototypeOf(i),t,e)}var te=class extends p{set$(t,e){var r;let s=Kn[r=this.nodeName]||(Kn[r]={}),n=Yn(this,t,s);!n||!n.set?this.setAttribute(t,e):this[t]=e}},pr=class extends te{set src(t){(this[_e]!=t?(this[_e]=t,!0):!1)&&t&&t.adoptNode&&t.adoptNode(this)}};J[""].klass=p;J.HTML.klass=O;J.SVG.klass=te;L.html.klass=ur;L.select.klass=Yt;L.input.klass=Wt;L.textarea.klass=Xt;L.button.klass=Qt;L.option.klass=Jt;L.script.klass=cr;L.style.klass=dr;L.link.klass=fr;L.svg_svg.klass=pr;st("");st("HTML");st("SVG");function Wn(i,t,e,r){let s=Tt.createElement(i);return e&&(s.className=e),r!==null&&s.text$(r),t&&t[me]&&t[me](s),s}function Xn(i,t,e,r,s){let n=Tt.createElementNS("http://www.w3.org/2000/svg",i);return e&&(n.className=e),t&&t[me]&&t[me](n),r&&(n.textContent=r),n}function ot(i){return Tt.createComment(i)}function we(i){return Tt.createTextNode(i)}function Qn(){return Tt.createDocumentFragment()}function xi(i,t,e,r,s){let n;return typeof i!="string"&&(i.prototype instanceof O?(n=new i,n.nodeName=i.nodeName):i&&i.nodeName&&(i=i.nodeName)),n||(n=Tt.createElement(i)),n[Fn]=t,n[U](),r!==null&&n[iu]("__").text$(r),(e||n.flags$ns)&&n.flag$(e||""),n}function Jn(i,t,e,r){if(i==null||i==null)return ot("");if(i instanceof w)return i;if(typeof i=="string"||i&&i.prototype instanceof w)return xi(i,t,e,r)}function Zn(i,t,e={}){J[i]=_i[i]={idl:!0,name:i,klass:t};let r=t.nodeName=i,s=t.prototype;if(i.indexOf("-")==-1&&(r=t.nodeName=""+i+"-tag",hu[i]=r),e.extends&&(s[rr]=e.extends),e.cssns){let n=(s._ns_||"")+" "+e.cssns;s._ns_=n.trim()+" ",s[su]=e.cssns}if(e.cssid){let n=(s.flags$ns||"")+" "+e.cssid;s[nu]=e.cssid,s.flags$ns=n.trim()+" "}return t}globalThis[ou]={Location:Ut,Document:Z};function Si(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function uu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var mr=Symbol.for("#parent"),to=Symbol.for("#closestNode"),cu=Symbol.for("#isRichElement"),fu=Symbol.for("#afterVisit"),eo=Symbol.for("#__initor__"),ro=Symbol.for("#__inited__"),io=Symbol.for("#appendChild"),so=Symbol.for("#removeChild"),gt=Symbol.for("#insertInto"),gr=Symbol.for("#replaceWith"),no=Symbol.for("#insertChild"),yr=Symbol.for("#removeFrom"),oo=Symbol.for("#placeChild"),lo=Symbol.for("#__init__"),du=Symbol.for("#registerFunctionalSlot"),pu=Symbol.for("#getFunctionalSlot"),ho=Symbol.for("#getSlot"),wi=Symbol.for("##parent"),_r=Symbol.for("##up"),ao=Symbol.for("##flags"),mu=Symbol.for("#domFlags"),K=Symbol.for("#end"),uo=Symbol.for("#textContent"),br=Symbol.for("#textNode"),Ti=Symbol.for("#functionalSlots"),co=Symbol();function fo(){return!0}var yt=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[mr](t){this[wi]=t}get[mr](){return this[wi]||this[_r]}get[to](){return this[mr][to]}get[cu](){return!0}get flags(){return this[ao]||(this[ao]=new zt(this))}flagSync$(){return this}[fu](){return this}},gu=0,vr=class extends yt{static[lo](){return this.prototype[eo]=co,this}constructor(t,e){super(...arguments);this[_r]=e,this.parentNode=null,this[mu]=t,this.childNodes=[],this[K]=ot("slot"+gu++),e&&e[io](this),this[eo]===co&&this[ro]&&this[ro]()}get[mr](){return this[wi]||this.parentNode||this[_r]}set textContent(t){this[uo]=t}get textContent(){return this[uo]}hasChildNodes(){for(let t=0,e=Si(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(s instanceof yt&&s.hasChildNodes())return!0;if(!(s instanceof nt)){if(s instanceof w)return!0}}return!1}text$(t){return this[br]?this[br].textContent=t:this[br]=this[oo](t),this[br]}appendChild(t){return this.parentNode&&t[gt](this.parentNode,this[K]),this.childNodes.push(t)}[io](t){return this.parentNode&&t[gt](this.parentNode,this[K]),this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[no](t,e);let r=this.childNodes.indexOf(e);return r>=0&&this.childNodes.splice(r,0,t),t}[so](t){this.parentNode&&this.parentNode[so](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[gt](t,e){let r=this.parentNode;if(this.parentNode!=t?(this.parentNode=t,!0):!1){this[K]&&(e=this[K][gt](t,e));for(let s=0,n=Si(this.childNodes),o=n.length;s<o;s++)n[s][gt](t,e)}return this}[gr](t,e){let r=t[gt](e,this[K]);return this[yr](e),r}[no](t,e){if(this.parentNode&&this.insertBefore(t,e||this[K]),e){let r=this.childNodes.indexOf(e);r>=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[yr](t){for(let e=0,r=Si(this.childNodes),s=r.length;e<s;e++)r[e][yr](t);return this[K]&&this[K][yr](t),this.parentNode=null,this}[oo](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&r instanceof nt)return r;let o=ot("");if(r){let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,o),s&&r[gr](o,s),o}return this.childNodes.push(o),s&&o[gt](s,this[K]),o}if(t===r)return t;if(n!=="object"){let o,l=t;if(r){if(r instanceof wt)return r.textContent=l,r;{o=we(l);let h=this.childNodes.indexOf(r);return this.childNodes.splice(h,1,o),s&&r[gr](o,s),o}}else return this.childNodes.push(o=we(l)),s&&o[gt](s,this[K]),o}else if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,t),s&&r[gr](t,s),t}else return this.childNodes.push(t),s&&t[gt](s,this[K]),t}};vr[lo]();function po(i,t){return new vr(i,t)}function ee(i,t){let e=new vr(i,null);return e[_r]=t,e}var mo=class{[du](t){let e=this[Ti]||(this[Ti]={});return e[t]||(e[t]=ee(0,this))}[pu](t,e){let r=this[Ti];return r&&r[t]||this[ho](t,e)}[ho](t,e){var r;return t=="__"&&!this.render?this:(r=this.__slots)[t]||(r[t]=ee(0,this))}};uu(w.prototype,mo.prototype);function yu(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var _u=Symbol.for("#afterVisit"),xr=Symbol.for("#insertInto"),go=Symbol.for("#appendChild"),bu=Symbol.for("#replaceWith"),Li=Symbol.for("#removeFrom"),yo=Symbol.for("#__initor__"),_o=Symbol.for("#__inited__"),bo=Symbol.for("#__init__"),vu=Symbol.for("#domFlags"),xu=Symbol.for("##parent"),Lt=Symbol.for("#end"),Su=Symbol.for("#removeChild"),wu=Symbol.for("#insertChild"),vo=Symbol(),Ei=class extends yt{static[bo](){return this.prototype[yo]=vo,this}constructor(t,e){super(...arguments);this[vu]=t,this[xu]=e,t&256||(this[Lt]=ot("list")),this.$=this.childNodes,this.length=0,e&&e[go](this),this[yo]===vo&&this[_o]&&this[_o]()}hasChildNodes(){return this.length!=0}[_u](t){let e=this.length;if(this.length=t,e==t)return;let r=this.parentNode;if(!r)return;let s=this.childNodes,n=this[Lt];if(e>t)for(;e>t;)r[Su](s[--e]);else if(t>e)for(;t>e;)r[wu](s[e++],n);this.length=t}[xr](t,e){this.parentNode=t,this[Lt]&&this[Lt][xr](t,e),e=this[Lt];for(let r=0,s=yu(this.childNodes),n=s.length;r<n;r++){let o=s[r];if(r==this.length)break;o[xr](t,e)}return this}[go](t){}[bu](t,e){let r=t[xr](e,this[Lt]);return this[Li](e),r}[Li](t){let e=this.length;for(;e>0;)this.childNodes[--e][Li](t);this[Lt]&&t.removeChild(this[Lt]),this.parentNode=null}};Ei[bo]();function xo(i,t){return new Ei(i,t)}function So(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Mi=Symbol.for("#appendChild"),Sr=Symbol.for("#insertChild"),Tu=Symbol.for("#replaceWith"),wr=Symbol.for("#insertInto"),Ni=Symbol.for("#removeFrom"),Lu=Symbol.for("#afterVisit"),wo=Symbol.for("#__initor__"),To=Symbol.for("#__inited__"),Lo=Symbol.for("#__init__"),Tr=Symbol.for("#domFlags"),Eo=Symbol.for("##parent"),Et=Symbol.for("#end"),Mo=Symbol.for("#removeChild"),No=Symbol(),Oi=class extends yt{static[Lo](){return this.prototype[wo]=No,this}constructor(t,e){super(...arguments);this[Tr]=t,this[Eo]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new q(this,Symbol()),t&256||(this[Et]=ot("map")),e&&e[Mi](this),this[wo]===No&&this[To]&&this[To]()}[Mi](t){if(this.parentNode)return this.parentNode[Sr](t,this[Et])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Tr]&1)){this.array.push(t),this[Mi](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[Sr](t,n.nextSibling)}else s[Sr](t,this.childNodes[e+1]||this[Et])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[Ni](t.parentNode)}[Sr](t,e){}[Tu](t,e){let r=t[wr](e,this[Et]);return this[Ni](e),r}[wr](t,e){this[Eo]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=So(this.array),o=n.length;s<o;s++)n[s][wr](t,e);this[Et]&&this[Et][wr](t,e)}return this}[Ni](t){for(let e=0,r=So(this.array),s=r.length;e<s;e++){let n=r[e];t[Mo](n)}return this[Et]&&t[Mo](this[Et]),this.parentNode=null}[Lu](t){var e=this;if(!(this[Tr]&1)){this[Tr]|=1;return}if(this.dirty&&(e.changes.forEach(function(r,s){if(r==-1)return e.removeChild(s)}),e.changes.clear(),e.dirty=!1),e.array.length>t)for(;e.array.length>t;){let r=e.array.pop();e.removeChild(r)}}};Oi[Lo]();function Oo(i,t){return new Oi(i,t)}var re=Symbol.for("#__init__"),Co=Symbol.for("#__initor__"),ko=Symbol.for("#__inited__"),Eu=Symbol.for("##inited"),Mu=Symbol.for("#afterVisit"),Nu=Symbol.for("#beforeReconcile"),Ou=Symbol.for("#afterReconcile"),Po=Symbol.for("#__hooks__"),ie=Symbol.for("#autorender"),Fo=Symbol(),$o=new class{constructor(i=null){this[re](i)}[re](i=null){var t;this.items=i&&(t=i.items)!==void 0?t:[],this.current=i&&(t=i.current)!==void 0?t:null,this.lastQueued=i&&(t=i.lastQueued)!==void 0?t:null,this.tests=i&&(t=i.tests)!==void 0?t:0}flush(){let i=null;for(;i=this.items.shift();){if(!i.parentNode||i.hydratedΦ)continue;let t=this.current;this.current=i,i.__F|=1024,i.connectedCallback(),this.current=t}}queue(i){var t=this;let e=this.items.length,r=0,s=this.lastQueued;this.lastQueued=i;let n=w.DOCUMENT_POSITION_PRECEDING,o=w.DOCUMENT_POSITION_FOLLOWING;if(e){let l=this.items.indexOf(s),h=l,u=function(a,d){return t.tests++,a.compareDocumentPosition(d)};(l==-1||s.nodeName!=i.nodeName)&&(h=l=0);let c=t.items[h];for(;c&&u(c,i)&o;)c=t.items[++h];if(h!=l)c?t.items.splice(h,0,i):t.items.push(i);else{for(;c&&u(c,i)&n;)c=t.items[--h];h!=l&&(c?t.items.splice(h+1,0,i):t.items.unshift(i))}}else t.items.push(i),t.current||globalThis.queueMicrotask(t.flush.bind(t))}};function Ro(){return $o.flush()}var At=class extends O{static[re](){return this.prototype[Co]=Fo,this}constructor(){super();this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[Co]===Fo&&this[ko]&&this[ko]()}setup$(){return this.__slots={},this.__F=0}[re](){return this.__F|=1|2,this}[Eu](){if(this[Po])return this[Po].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Φ?(this.__F|=256,this.render&&this.render(),this.rendered(),this.__F=(this.__F|512)&~256&~8192):(this.__F|=8192,this)}get autoschedule(){return(this.__F&64)!=0}set autoschedule(t){t?this.__F|=64:this.__F&=~64}set autorender(t){let e=this[ie]||(this[ie]={});e.value=t,this.mountedΦ&&N.schedule(this,e)}get renderΦ(){return!this.suspendedΦ}get mountingΦ(){return(this.__F&16)!=0}get mountedΦ(){return(this.__F&32)!=0}get awakenedΦ(){return(this.__F&8)!=0}get renderedΦ(){return(this.__F&512)!=0}get suspendedΦ(){return(this.__F&4096)!=0}get renderingΦ(){return(this.__F&256)!=0}get scheduledΦ(){return(this.__F&128)!=0}get hydratedΦ(){return(this.__F&2)!=0}get ssrΦ(){return(this.__F&1024)!=0}schedule(){return N.on("commit",this),this.__F|=128,this}unschedule(){return N.un("commit",this),this.__F&=~128,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&=~4096,this.commit()),this}[Mu](){return this.visit()}[Nu](){return this.__F&1024&&(this.__F=this.__F&~1024,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&&$t.push(this),this}[Ou](){return globalThis.DEBUG_IMBA&&$t.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){$o.queue(this);return}if(t&(16|32))return;this.__F|=16,e||this[re](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),A(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(N.commit),t=this.__F=(this.__F|32)&~16,t&64&&this.schedule(),this[ie]&&N.schedule(this,this[ie]),this}disconnectedCallback(){if(this.__F=this.__F&(~32&~16),this.__F&128&&this.unschedule(),A(this,"unmount"),this.unmount(),this[ie])return N.unschedule(this,this[ie])}};At[re]();var Ao=At;function Cu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Ho=Symbol.for("#__init__"),qf=Symbol.for("#__initor__"),Uf=Symbol.for("#__inited__"),ku={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};var Io={prefix:1,suffix:1,content:1},Ci={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]]},Pu=new RegExp("^("+Object.keys(Ci).join("|")+")(\\d+(?:\\.\\d+)?)$"),Fu=/^([xyz])$/,$u=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,Ru=`*,::before,::after {
11box-sizing: border-box;
12border-width: 0;
13border-style: solid;
14border-color: currentColor;
15}`,Vo=class{constructor(t=null){this[Ho](t)}[Ho](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",Ru))}toString(){return Object.values(this.entries).map(function(t){return t.css}).join(`
16
17`)}toValue(t,e,r,s=null){let n;Io[r]&&(t=String(t));let o=typeof t;if(o=="number"){if(e||(Fu.test(r)?e="px":$u.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return ku[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(o=="string"){if(r&&Io[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(Pu)){let h=Ci[n[1]][parseInt(n[2])],u="100%";if(typeof s=="number"?u=s+"%":typeof s=="string"&&(u=s),h)return"hsla("+h[0]+","+h[1]+"%,"+h[2]+"%,"+u+")"}}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]}},ki=new Vo,Do=Object.keys(Ci);function jo(){return!0}var Go=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let o=ki.toValue(e,r,s,n);this.style.setProperty(t,o)}};Cu(p.prototype,Go.prototype);var Au=Symbol.for("#insertInto"),Bo=Symbol.for("#removeFrom");function zo(i,t={}){let e=E.context;E.context=t;let r=i(t);return E.context==t&&(E.context=e),r}function Pi(i,t){return console.warn("imba.mount not supported on server"),String(i);let e=t||globalThis.document.body,r=i;if(i instanceof Function){let s=new q(e,null),n=function(){let o=E.context;E.context=s;let l=i(s);return E.context==s&&(E.context=o),l};r=n(),N.listen("commit",n)}else r.__F|=64;return r[Au](e),r}function Fi(i){return i&&i[Bo]&&i[Bo](i.parentNode),i}var qo=globalThis.imba||(globalThis.imba={});qo.mount=Pi;qo.unmount=Fi;function se(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Te(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Le=Symbol.for("#afterVisit");function Uo(){return!0}var Hu={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},$i=function(i){return i instanceof Array||i&&i.has instanceof Function},Ri=function(i,t){return i==t?!0:i instanceof Array?i.indexOf(t)>=0:i&&i.has instanceof Function?i.has(t):i&&i.contains instanceof Function?i.contains(t):!1},Ai=function(i,t){if(i instanceof Array)return i.push(t);if(i&&i.add instanceof Function)return i.add(t)},Hi=function(i,t){if(i instanceof Array){let e=i.indexOf(t);if(e>=0)return i.splice(e,1)}else if(i&&i.delete instanceof Function)return i.delete(t)};function Iu(i){function t(){return i[0]?i[0][i[1]]:void 0}function e(r){return i[0]?i[0][i[1]]=r:null}return{get:t,set:e}}var Ko=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this.$$bound&&Hu[this.nodeName]&&(this.$$bound=!0,this.change$&&this.addEventListener("change",this.change$=this.change$.bind(this)),this.input$&&this.addEventListener("input",this.input$=this.input$.bind(this),{capture:!0}),this.click$&&this.addEventListener("click",this.click$=this.click$.bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?Iu(r):r),r}};se(p.prototype,Ko.prototype);Object.defineProperty(p.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(i){return this.setRichValue(i)}});var Yo=class{change$(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,o=Te(r),l=o.length;n<l;n++){let h=o[n];s.indexOf(h)==-1&&Hi(e,h)}for(let n=0,o=Te(s),l=o.length;n<l;n++){let h=o[n];(!r||r.indexOf(h)==-1)&&Ai(e,h)}}else this.data=s[0];return H(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=Te(this.selectedOptions),s=r.length;e<s;e++){let n=r[e];t.push(n.richValue)}return this.$$value=t}syncValue(){let t=this.data;if(this.multiple){let e=[];for(let r=0,s=Te(this.options),n=s.length;r<n;r++){let o=s[r],l=o.richValue,h=Ri(t,l);o.selected=h,h&&e.push(l)}this.$$value=e}else for(let e=0,r=Te(this.options),s=r.length;e<s;e++){let o=r[e].richValue;if(o==t){this.$$value=[o],this.selectedIndex=e;break}}}[Le](){return this.syncValue()}};se(Yt.prototype,Yo.prototype);var Wo=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}};se(Jt.prototype,Wo.prototype);var Xo=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}input$(t){return this.data=this.value,H()}[Le](){let t=this.data;if(t==null&&(t=""),this.$$bound&&this.value!=t)return this.value=t}};se(Xt.prototype,Xo.prototype);var Qo=class{input$(t){let e=this.type;if(!(e=="checkbox"||e=="radio"))return this.$$value=void 0,this.data=this.richValue,H()}change$(t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;$i(e)?s?Ai(e,r):Hi(e,r):this.data=s?r:!1}return H()}setRichValue(t){this.$$value!==t&&(this.$$value=t,this.value!==t&&(this.value=t))}getRichValue(){if(this.$$value!==void 0)return this.$$value;let t=this.value,e=this.type;return e=="range"||e=="number"?(t=this.valueAsNumber,Number.isNaN(t)&&(t=null)):e=="checkbox"&&(t==null||t==="on")&&(t=!0),t}[Le](){if(this.$$bound){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=Ri(e,this.richValue)}else this.richValue=this.data}}};se(Wt.prototype,Qo.prototype);var Jo=class{get checked(){return this.$checked}set checked(t){t!=this.$checked&&(this.$checked=t,this.flags.toggle("checked",!!t))}setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}click$(t){let e=this.data,r=this.checked,s=this.richValue;return $i(e)?r?Hi(e,s):Ai(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[Le](),H()}[Le](){if(this.$$bound){let t=this.data,e=this.$$value==null?!0:this.$$value;$i(t)?this.checked=Ri(t,e):this.checked=t==e}}};se(Qt.prototype,Jo.prototype);function Zo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Vu=Symbol.for("#getSlot"),Du=Symbol.for("#container"),ju=Symbol.for("#afterVisit"),Ht=Symbol.for("#__init__"),tl=Symbol.for("#__initor__"),el=Symbol.for("#__inited__"),Lr=Symbol.for("#listeners"),lt=Symbol.for("#slot"),Gu=Symbol.for("#parent"),V=Symbol.for("##container"),Ii=Symbol.for("#domTarget"),rl=Symbol.for("#insertInto"),Bu=Symbol.for("#removeFrom"),zu=Symbol.for("#self"),qu=Symbol.for("#target"),il=Symbol(),Er=class extends At{static[Ht](){return this.prototype[tl]=il,this}constructor(){super(...arguments);super[Ht]||this[Ht](),this[tl]===il&&this[el]&&this[el]()}[Ht](t=null){super[Ht]&&super[Ht](...arguments),this.to=t?t.to:void 0}build(){return this[Lr]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[Vu](t,e){return this[lt]||(this[lt]=ee(0,this[Gu])),this[lt]}get[Du](){if(!this[V]){let t=this.className;this[V]=this.doc.createElement("div"),this[V].className=t,this[V].style.cssText="display:contents !important;"}return this[V]}get domTarget(){return this[Ii]||(this[Ii]=this.to instanceof p?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){return this[V]?this[V].style:super.style}get classList(){return this[V]?this[V].classList:super.classList}get className(){return this[V]?this[V].className:super.className}set className(t){this[V]?this[V].className=t:super.className=t}[ju](){if(this.mountedΦ&&this[lt]&&!this[lt].parentNode)return this[lt][rl](this.target)}mount(){for(let e=0,r=Zo(this[Lr]),s=r.length;e<s;e++){let[n,o,l]=r[e];this.eventTarget.addEventListener(n,o,l)}let t=this.domTarget;return this[lt]&&this[lt][rl](t),this}unmount(){for(let t=0,e=Zo(this[Lr]),r=e.length;t<r;t++){let[s,n,o]=e[t];this.eventTarget.removeEventListener(s,n,o)}return this[lt]&&this[lt][Bu](this.domTarget),this[Ii]=null,this}addEventListener(t,e,r={}){var s;if(e[zu]=this,this[Lr].push([t,e,r]),this.mountedΦ&&((s=this.eventTarget)==null?void 0:s.addEventListener))return this.eventTarget.addEventListener(t,e,r)}};Er[Ht]();var sl=class extends Er{get domTarget(){return this.doc.body}get eventTarget(){return this.win}addEventListener(t,e,r={}){return e[qu]=this.domTarget.parentNode,super.addEventListener(...arguments)}on$resize(t,e,r,s){return this.addEventListener("resize",r,s),r}};globalThis.customElements&&(globalThis.customElements.define("i-teleport",Er),globalThis.customElements.define("i-global",sl));function nl(){return!0}function It(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Uu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var ol=Symbol.for("#__init__"),nd=Symbol.for("#__initor__"),od=Symbol.for("#__inited__"),ll=Symbol.for("#imba"),Vi=Symbol.for("#insertInto"),Di=Symbol.for("#removeFrom"),Ku=Symbol.for("#all"),Ee=Symbol.for("#phase"),_t=Symbol.for("#nodes"),Yu=Symbol.for("#sizes"),hl=Symbol.for("#mode"),al=Symbol.for("#enabled"),ul=Symbol.for("#anims"),ji=Symbol.for("#_easer_"),cl=class{constructor(t=null){this[ol](t)}[ol](t=null){var e;this.selectors=t&&(e=t.selectors)!==void 0?e:{}}addSelectors(t,e){var r;return((r=this.selectors)[e]||(r[e]=[])).push(...t),!0}getSelectors(...t){let e=[];for(let r=0,s=It(t),n=s.length;r<n;r++){let o=s[r];this.selectors[o]&&e.push(...this.selectors[o])}return e&&e.length?e.join(","):null}nodesForBase(t,e="transition"){let r=[t],s=(this.selectors[e]||[]).join(",");if(s=="")return r;let n=t.querySelectorAll(s);for(let o=0,l=It(n),h=l.length;o<h;o++){let u=l[o];u.closest("._ease_")==t&&r.push(u)}return r[Ku]=n,r}nodesWithSize(t,e="in"){let r=this.getSelectors("_off_sized","_"+e+"_sized");return r?t.filter(function(s){return s.matches(r)}):[]}},Me=new cl,Wu=globalThis.imba||(globalThis.imba={});Wu.transitions=Me;var Mr=class{constructor(t){this.dom=t,this[Ee]=null,this[_t]=[],this[Yu]=new Map}log(...t){}get flags(){return this.dom.flags}flag(t){for(let e=0,r=It(this[_t]),s=r.length;e<s;e++)r[e].flags.add(t);return this}unflag(t){for(let e=0,r=It(this[_t]),s=r.length;e<s;e++)r[e].flags.remove(t);return this}commit(){return this.dom.offsetWidth}enable(t){return t&&(this[hl]=t),(this[al]!=!0?(this[al]=!0,!0):!1)?(this.dom[Vi]=this[Vi].bind(this),this.dom[Di]=this[Di].bind(this),this.flags.add("_ease_")):this}disable(){return this.flags.unflag("_ease_"),!0}set phase(t){var r,s,n,o,l,h,u,c,a,d,m,f;let e=this[Ee];(this[Ee]!=t?(this[Ee]=t,!0):!1)&&(e&&this.flags.remove("_"+e+"_"),t&&this.flags.add("_"+t+"_"),this.flags.toggle("_easing_",!!t),t||(this.unflag("_out_"),this.unflag("_in_"),this.unflag("_off_"),this[_t]=null),t=="enter"&&e=="leave"&&((s=(r=this.dom)==null?void 0:r.transitionΞoutΞcancel)==null||s.call(r,this)),t=="leave"&&e=="enter"&&((o=(n=this.dom)==null?void 0:n.transitionΞinΞcancel)==null||o.call(n,this)),t=="enter"&&((h=(l=this.dom)==null?void 0:l.transitionΞin)==null||h.call(l,this)),t=="leave"&&((c=(u=this.dom)==null?void 0:u.transitionΞout)==null||c.call(u,this)),e=="leave"&&!t&&((d=(a=this.dom)==null?void 0:a.transitionΞoutΞend)==null||d.call(a,this)),e=="enter"&&!t&&((f=(m=this.dom)==null?void 0:m.transitionΞinΞend)==null||f.call(m,this)))}get phase(){return this[Ee]}get leavingΦ(){return this.phase=="leave"}get enteringΦ(){return this.phase=="enter"}get idleΦ(){return this.phase==null}track(t){var e=this;let r={before:Rt().getAnimations()};return this.commit(),t(),this.commit(),r.after=Rt().getAnimations(),r.fresh=r.after.filter(function(s){return r.before.indexOf(s)==-1}),r.deep=r.fresh.filter(function(s){let n;return!!((n=s.effect.target)&&n.closest("._ease_")!=e.dom)}),r.own=r.fresh.filter(function(s){return r.deep.indexOf(s)==-1}),r.finished=Promise.all(r.own.map(function(s){return s.finished})),r}getAnimatedNodes(){return Me.nodesForBase(this.dom)}getNodeSizes(t="in",e=this[_t]){let r=Me.nodesWithSize(e,t),s=new Map;for(let n=0,o=It(r),l=o.length;n<l;n++){let h=o[n],u=(this&&this[ll]||globalThis[ll]).window.getComputedStyle(h);s.set(h,{width:u.width,height:u.height})}return s}applyNodeSizes(t){for(let[e,r]of It(t))e.style.width=r.width,e.style.height=r.height;return t}clearNodeSizes(t){for(let[e,r]of It(t))e.style.removeProperty("width"),e.style.removeProperty("height");return t}[Vi](t,e){var h,u;var r=this;let s;if(this.enteringΦ)return this.dom;let n=function(){if(s&&r.clearNodeSizes(s),r.enteringΦ)return r.phase=null};if(r.leavingΦ)return r.track(function(){return r.phase="enter",r.unflag("_off_"),r.unflag("_out_")}).finished.then(n,function(a){return r.log("error cancel leave",a)}),r.dom;let o=Rt().contains(t);return e?t.insertBefore(r.dom,e):t.appendChild(r.dom),this[_t]=r.getAnimatedNodes(),r.flag("_instant_"),r.unflag("_out_"),r.commit(),s=this[_t].sized=r.getNodeSizes("in"),(u=(h=r.dom)==null?void 0:h.transitionΞinΞinit)==null||u.call(h,r),r.flag("_off_"),r.flag("_in_"),r.commit(),r.unflag("_instant_"),(this[ul]=r.track(function(){return r.phase="enter",r.applyNodeSizes(s),r.unflag("_off_"),r.unflag("_in_")})).finished.then(n,function(c){return r.clearNodeSizes(s),r.log("cancelled insert into",c)}),r.dom}[Di](t){var e=this;if(this.leavingΦ)return;let r,s=function(){if(e.phase=="leave")return t.removeChild(e.dom),e.phase=null};if(e.enteringΦ&&this[hl]!="forward"){let o=e.track(function(){return e.flag("_off_"),e.flag("_in_"),e.unflag("_out_"),e.phase="leave",e.clearNodeSizes(e[_t].sized)});e.log("cancel enter anims own",o.own,o),o.finished.then(s,function(l){return e.log("error cancel entering",l)});return}this[_t]=e.getAnimatedNodes(),r=e.getNodeSizes("out"),e.applyNodeSizes(r);let n=this[ul]=e.track(function(){return e.phase="leave",e.flag("_off_"),e.flag("_out_"),e.clearNodeSizes(r)});if(!n.own.length){s();return}n.finished.then(s,function(){return!0})}},fl=class{transitionΞinΞinit(t){return!0}transitionΞin(t){return!0}transitionΞinΞend(t){return!0}transitionΞinΞcancel(t){return!0}transitionΞout(t){return!0}transitionΞoutΞend(t){return!0}transitionΞoutΞcancel(t){return!0}get ease(){return this[ji]||(this[ji]=new Mr(this))}set ease(t){var e,r;if(t==!1){(r=(e=this[ji])==null?void 0:e.disable)==null||r.call(e);return}this.ease.enable(t)}};Uu(p.prototype,fl.prototype);function dl(){return!0}function Xu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Nr(){return!0}var pl=class{αesc(){return this.keyCode==27}αtab(){return this.keyCode==9}αenter(){return this.keyCode==13}αspace(){return this.keyCode==32}αup(){return this.keyCode==38}αdown(){return this.keyCode==40}αleft(){return this.keyCode==37}αright(){return this.keyCode==39}αdel(){return this.keyCode==8||this.keyCode==46}αkey(t){if(typeof t=="string")return this.key==t;if(typeof t=="number")return this.keyCode==t}};Xu(Se.prototype,pl.prototype);function Qu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function ne(){return!0}var ml=class{αleft(){return this.button==0}αmiddle(){return this.button==1}αright(){return this.button==2}αshift(){return!!this.shiftKey}αalt(){return!!this.altKey}αctrl(){return!!this.ctrlKey}αmeta(){return!!this.metaKey}αmod(){let t=globalThis.navigator.platform;return/^(Mac|iPhone|iPad|iPod)/.test(t||"")?!!this.metaKey:!!this.ctrlKey}};Qu(Zt.prototype,ml.prototype);function Gi(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function gl(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Ju=Symbol.for("#extendType"),Zu=Symbol.for("#modifierState"),Or=Symbol.for("#sharedModifierState"),yl=Symbol.for("#onceHandlerEnd"),bd=Symbol.for("#__initor__"),vd=Symbol.for("#__inited__"),_l=Symbol.for("#extendDescriptors"),D=Symbol.for("#context"),bl=Symbol.for("#self"),tc=Symbol.for("#target"),vl=Symbol.for("#stopPropagation"),xl=Symbol.for("#defaultPrevented");Nr();ne();var Sl=class{[Ju](t){var e,r,s;let n=t[_l]||(t[_l]=(r=Object.getOwnPropertyDescriptors(t.prototype),s=r.constructor,delete r.constructor,r));return Object.defineProperties(this,n)}};Gi(P.prototype,Sl.prototype);var wl=class{get[Zu](){var t,e;return(t=this[D])[e=this[D].step]||(t[e]={})}get[Or](){var t,e;return(t=this[D].handler)[e=this[D].step]||(t[e]={})}[yl](t){return k(this[D],"end",t)}αsel(t){return!!this.target.matches(String(t))}αclosest(t){return!!this.target.closest(String(t))}αlog(...t){return console.info(...t),!0}αtrusted(){return!!this.isTrusted}αif(t){return!!t}αwait(t=250){return new Promise(function(e){return setTimeout(e,Pt(t))})}αself(){return this.target==this[D].element}αcooldown(t=250){let e=this[Or];return e.active?!1:(e.active=!0,e.target=this[D].element,e.target.flags.incr("cooldown"),this[yl](function(){return setTimeout(function(){return e.target.flags.decr("cooldown"),e.active=!1},Pt(t))}),!0)}αthrottle(t=250){let e=this[Or];return e.active?(e.next&&e.next(!1),new Promise(function(r){return e.next=function(s){return e.next=null,r(s)}})):(e.active=!0,e.el||(e.el=this[D].element),e.el.flags.incr("throttled"),k(this[D],"end",function(){let r=Pt(t);return e.interval=setInterval(function(){e.next?e.next(!0):(clearInterval(e.interval),e.el.flags.decr("throttled"),e.active=!1)},r)}),!0)}αdebounce(t=250){let e=this[Or],r=this;return e.queue||(e.queue=[]),e.queue.push(e.last=r),new Promise(function(s){return setTimeout(function(){return e.last==r?(r.debounced=e.queue,e.last=null,e.queue=[],s(!0)):s(!1)},Pt(t))})}αflag(t,e){let{element:r,step:s,state:n,id:o,current:l}=this[D],h=e instanceof p?e:e?r.closest(e):r;if(!h)return!0;this[D].commit=!0,n[s]=o,h.flags.incr(t);let u=Date.now();return k(l,"end",function(){let c=Date.now()-u,a=Math.max(250-c,0);return setTimeout(function(){return h.flags.decr(t)},a)}),!0}αbusy(t){return this.αflag("busy",t)}αmod(t){return this.αflag("mod-"+t,globalThis.document.documentElement)}αoutside(){let{handler:t}=this[D];if(t&&t[bl])return!t[bl].parentNode.contains(this.target)}};Gi(C.prototype,wl.prototype);var Tl={};function Ll(){return!0}var Cr=class{constructor(t,e){this.params=t,this.closure=e}getHandlerForMethod(t,e){return t?t[e]?t:this.getHandlerForMethod(t.parentNode,e):null}emit(t,...e){return A(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return k(this,t,...e)}un(t,...e){return bt(this,t,...e)}get passiveΦ(){return this.params.passive}get captureΦ(){return this.params.capture}get silentΦ(){return this.params.silent}get globalΦ(){return this.params.global}async handleEvent(t){let e=this[tc]||t.currentTarget,r=this.params,s=null,n=r.silence||r.silent;this.count||(this.count=0),this.state||(this.state={});let o={element:e,event:t,modifiers:r,handler:this,id:++this.count,step:-1,state:this.state,commit:null,current:null};if(o.current=o,t.handle$mod&&t.handle$mod.apply(o,r.options||[])==!1)return;let l=C[this.type+"$handle"]||C[t.type+"$handle"]||t.handle$mod;if(!(l&&l.apply(o,r.options||[])==!1)){this.currentEvents||(this.currentEvents=new Set),this.currentEvents.add(t);for(let h=0,u=Object.keys(r),c=u.length,a,d;h<c;h++){if(a=u[h],d=r[a],o.step++,a[0]=="_")continue;a.indexOf("~")>0&&(a=a.split("~")[0]);let m=null,f=[t,o],y,_=null,M,G=!1,X=typeof a=="string";if(a[0]=="$"&&a[1]=="_"&&d[0]instanceof Function)a=d[0],a.passive||(o.commit=!0),f=[t,o].concat(d.slice(1)),_=e;else if(d instanceof Array){f=d.slice(),m=f;for(let v=0,F=gl(f),tt=F.length;v<tt;v++){let ce=F[v];if(typeof ce=="string"&&ce[0]=="~"&&ce[1]=="$"){let ys=ce.slice(2).split("."),Ve=o[ys.shift()]||t;for(let Wr=0,_s=gl(ys),ba=_s.length;Wr<ba;Wr++){let va=_s[Wr];Ve=Ve?Ve[va]:void 0}f[v]=Ve}}}if(typeof a=="string"&&(M=a.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/))&&(m||(m=f=[]),f.unshift(M[2]),a=M[1]),a=="trap")t[vl]=!0,t.stopImmediatePropagation(),t[xl]=!0,t.preventDefault();else if(a=="stop")t[vl]=!0,t.stopImmediatePropagation();else if(a=="prevent")t[xl]=!0,t.preventDefault();else if(a=="commit")o.commit=!0;else if(a=="once")e.removeEventListener(t.type,this);else{if(a=="options"||a=="silence"||a=="silent")continue;if(a=="emit"){let v=f[0],F=f[1],tt=new P(v,{bubbles:!0,detail:F});tt.originalEvent=t;let ce=e.dispatchEvent(tt)}else if(typeof a=="string"){a[0]=="!"&&(G=!0,a=a.slice(1));let v="α"+a,F=t[v];F||(F=this.type&&C[this.type+"$"+a+"$mod"]),F||(F=t[a+"$mod"]||C[t.type+"$"+a]||C[a+"$mod"]),F instanceof Function?(a=F,_=o,f=m||[],t[v]&&(_=t,t[D]=o)):a[0]=="_"?(a=a.slice(1),_=this.closure):_=this.getHandlerForMethod(e,a)}}try{a instanceof Function?y=a.apply(_||e,f):_&&(y=_[a].apply(_,f)),y&&y.then instanceof Function&&y!=N.$promise&&(o.commit&&!n&&N.commit(),y=await y)}catch(v){s=v;break}if(G&&y===!0||!G&&y===!1)break;o.value=y}if(A(o,"end",o),o.commit&&!n&&N.commit(),this.currentEvents.delete(t),this.currentEvents.size==0&&this.emit("idle"),s)throw s}}},El=class{on$(t,e,r){let s="on$"+t,n;n=new Cr(e,r);let o=e.capture||!1,l=e.passive,h=o;return l&&(h={passive:l,capture:o}),this[s]instanceof Function?n=this[s](e,r,n,h):this.addEventListener(t,n,h),n}};Gi(p.prototype,El.prototype);var Bi=new class{get iosΦ(){let i=globalThis.navigator.platform||"";return!!(i.match(/iPhone|iPod|iPad/)||i=="MacIntel"&&globalThis.navigator.maxTouchPoints>2)}};function oe(i,t){let e=t;return i instanceof Element?i:typeof i=="string"?i=="this"||i==""?e:i=="up"?e.parentNode:i=="op"?e.offsetParent:e.closest(i)||e.querySelector(i)||globalThis.document.querySelector(i):null}function Mt(i){if(typeof i=="string"){let[t,e,r]=i.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(e),r]}else if(typeof i=="number")return[i]}function kr(i,t=1){let e=1/t;return Math.round(i*e)/e}function ec(i,t,e){return t>e?Math.max(e,Math.min(t,i)):Math.min(e,Math.max(t,i))}function zi(i,t,e,r,s=.1){let[n,o]=Mt(e),[l,h]=Mt(r),[u,c]=Mt(s);return o=="%"&&(n=(t-i)*(n/100)),h=="%"&&(l=(t-i)*(l/100)),c=="%"&&(u=(l-n)*(u/100)),function(a,d){let m=(a-i)/(t-i),f=n+(l-n)*m;return s&&(f=kr(f,u)),d&&(f=ec(f,n,l)),f}}function rc(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}ne();function Ml(){return!0}var Nl=class{αprimary(){return!!this.isPrimary}αmouse(){return this.pointerType=="mouse"}αpen(){return this.pointerType=="pen"}αtouch(){return this.pointerType=="touch"}αpressure(t=.5){return this.pressure>=t}αlock(){return!0}};rc(xe.prototype,Nl.prototype);function ic(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Ol=Symbol.for("#capture"),ht=Symbol.for("#step"),sc=Symbol.for("#cancel"),qi=Symbol.for("#reframe"),Pd=Symbol.for("#__initor__"),Fd=Symbol.for("#__inited__"),Cl=Symbol.for("#mods"),Ui=Symbol.for("#dx"),Ki=Symbol.for("#dy"),Nt=Symbol.for("#context"),Pr=Symbol.for("#locked"),kl=Symbol.for("#teardown"),Pl=Symbol.for("#x"),Fl=Symbol.for("#y"),nc=Symbol.for("#pinTarget");function $l(){return!0}var Rl=null,Al=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[Cl]={}}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Φ(){return this.phase!="ended"}get endedΦ(){return this.phase=="ended"}get dx(){return this[Ui]==null?this.event.x-this.start.x:this[Ui]}get dy(){return this[Ki]==null?this.event.y-this.start.y:this[Ki]}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 A(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return k(this,t,...e)}un(t,...e){return bt(this,t,...e)}αflag(t,e){let{element:r}=this[Nt],s=Date.now(),n=e instanceof p?e:e?r.closest(e):r;return(this[ht].setup!=!0?(this[ht].setup=!0,!0):!1)&&(n.flags.incr(t),k(this,"end",function(){return n.flags.decr(t)})),!0}αlock(){return this[Ol](),!0}[Ol](){if(this[Pr]!=!0?(this[Pr]=!0,!0):!1)return this[Nt].element.setPointerCapture(this.pointerId)}get[ht](){var t,e;return(t=this[Cl])[e=this[Nt].step]||(t[e]={})}[sc](){return this[kl]()}αmoved(t,e){let r=this[ht],{element:s,state:n,event:o}=this[Nt];if(!r.setup){let a=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,a=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[d,m]=Mt(a);r.threshold=d,r.sy=d,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,m&&m!="px"&&console.warn("only px threshold allowed in @touch.moved")}if(r.active)return!0;if(r.cancelled)return!1;let l=r.threshold,h=this.x-r.x0,u=this.y-r.y0;r.x=Math.max(r.x,Math.abs(h)),r.y=Math.max(r.y,Math.abs(u)),r.left=Math.max(r.left,-h),r.right=Math.max(r.right,h),r.up=Math.max(r.up,-u),r.down=Math.max(r.down,u),r.dist=Math.max(r.dist,Math.sqrt(h*h+u*u));let c=r[r.dir];if(c>l&&c>=r.x&&c>=r.y){r.active=!0;let a=n.pinTarget;return s.flags.incr("_move_"),a&&a.flags.incr("_move_"),this.preventDefault(),k(this,"end",function(){return a&&a.flags.decr("_move_"),s.flags.decr("_move_")}),!0}else if(r.x>l||r.y>l)return r.cancelled=!0,!1;return!1}αhold(t=250){var e=this;let r=this[ht],s=this[Nt].element;if(r.cancelled)return!1;if(r.setup&&!r.active){let n=this.clientX,o=this.clientY,l=n-r.x,h=o-r.y;Math.sqrt(l*l+h*h)>5&&!r.cancelled&&(clearTimeout(r.timeout),r.cancelled=!0)}if(r.setup!=!0?(r.setup=!0,!0):!1){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),k(e,"end",function(){return r.active&&s.flags.decr("_hold_"),clearTimeout(r.timeout),n&&n(!1),n=null}),new Promise(function(o){return n=o})}return r.active}αsync(t,e="x",r="y"){let s=this[ht];return(s.setup!=!0?(s.setup=!0,!0):!1)?(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[Nt].commit=!0,!0}αapply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[Nt].commit=!0,!0}αcss(t="x",e="y"){let r=this[ht];if(r.setup!=!0?(r.setup=!0,!0):!1)r.el=this[Nt].element,r.x=r.el[Pl]||0,r.y=r.el[Fl]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[Pl]=r.x+(this.x-r.tx),n=r.el[Fl]=r.y+(this.y-r.ty);t&&r.el.style.setProperty("--x",s+"px"),e&&r.el.style.setProperty("--y",n+"px")}return!0}αend(){return this.phase=="ended"}αshift(){return!!this.shiftKey}αalt(){return!!this.altKey}αctrl(){return!!this.ctrlKey}αmeta(){return!!this.metaKey}αprimary(){return!!this.isPrimary}αmouse(){return this.pointerType=="mouse"}αpen(){return this.pointerType=="pen"}αtouch(){return this.pointerType=="touch"}αpressure(t=.5){return this.pressure>=t}αlog(...t){return console.info(...t),!0}αleft(){return this.originalEvent.button==0}αmiddle(){return this.originalEvent.button==1}αright(){return this.originalEvent.button==2}αround(t=1,e=t){return this.x=kr(this.x,t),this.y=kr(this.y,e),!0}[qi](...t){let e=this[ht];if(e.setup!=!0?(e.setup=!0,!0):!1){let r=this.target,s=t.length,n=t[0],o=0,l="100%",h=0,u=typeof n;u=="number"||u=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(n)||n instanceof Array?n=null:u=="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?h=t[1]:s>2&&([o,l,h=0]=t.slice(1));let c=n.getBoundingClientRect();o instanceof Array||(o=[o,o]),l instanceof Array||(l=[l,l]),h instanceof Array||(h=[h,h]),e.rect=c,e.x=zi(c.left,c.right,o[0],l[0],h[0]),e.y=zi(c.top,c.bottom,o[1],l[1],h[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[Ui]=r-this.x0,this[Ki]=s-this.y0}return!0}αfit(...t){return this[ht].clamp=!0,this[qi](...t)}αreframe(...t){return this[qi](...t)}αpin(...t){let e=this[ht];if(e.setup!=!0?(e.setup=!0,!0):!1){let r=oe(t[0],this.target);r instanceof p||t.unshift(r=this.target);let s=t[1]||0,n=t[2]==null?t[2]=s:t[2],o=r.getBoundingClientRect();e.x=this.clientX-(o.left+o.width*s),e.y=this.clientY-(o.top+o.height*n),r&&(this[nc]=r,r.flags.incr("_touch_"),k(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},Hl=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),Bi.iosΦ&&globalThis.parent!=globalThis&&(Rl!=!0?(Rl=!0,!0):!1)&&globalThis.parent.postMessage("setupTouchFix"),r}};ic(p.prototype,Hl.prototype);C.touch$handle=function(){let i=this.event,t=this.element,e=this.state.pointerId,r=this.modifiers,s=this.handler,n=Bi.iosΦ;if(this.current=this.state,e!=null)return e==i.pointerId;if(r.ctrl&&!i.ctrlKey||r.alt&&!i.altKey||r.meta&&!i.metaKey||r.shift&&!i.shiftKey||r.if&&!r.if[0]||r.self&&i.target!=t||r.primary&&!i.isPrimary||r.pen&&i.pointerType!="pen"||r.mouse&&i.pointerType!="mouse"||r.touch&&i.pointerType!="touch"||r.sel&&!i.target.matches(String(r.sel[0])))return;let o=this.state=s.state=this.current=new Al(i,s,t);e=o.pointerId;let l=function(f){return f.preventDefault(),!1},h=null,u=Symbol(),c=function(f){let y=o.clientX,_=o.clientY,M=f.clientX,G=f.clientY;(o[Pr]||o.defaultPrevented)&&(f.pointerId==o.pointerId||y==M&&_==G)&&(f.preventDefault(),f.stopPropagation()),c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null)},a=function(f){if(!(o.type=="touchmove"&&f.changedTouches[0].identifier!=e)&&(o.defaultPrevented||o[Pr]))return f.preventDefault()},d=function(f){let y=f.type,_=o.phase;if(f.pointerId&&o.pointerId!=f.pointerId||f[u])return;f[u]=!0;let M=y=="pointerup"||y=="pointercancel";if(f.pressure==0&&f.pointerType=="mouse"&&y=="pointermove"&&o.originalEvent.pressure>0)return h(f);y=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=f.clientX,o.y=f.clientY),o.event=f,M&&(o.phase="ended");try{s.handleEvent(o)}catch(G){}if(_=="init"&&!M&&(o.phase="active"),M&&h)return h(f)},m=!1;return h=function(f){if(!m&&(m=!0,t.flags.decr("_touch_"),o.phase!="ended"&&(o.phase="ended",o.x=o.clientX,o.y=o.clientY,s.handleEvent(o)),o.emit("end"),r.passive||--s.prevents==0&&t.style.removeProperty("touch-action"),s.state={},globalThis.removeEventListener("pointermove",d,{passive:!!r.passive}),globalThis.removeEventListener("pointerup",d),globalThis.removeEventListener("pointercancel",d),setTimeout(function(){if(c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null),n&&a)return globalThis.removeEventListener("touchend",a),globalThis.removeEventListener("touchmove",a,{passive:!1}),a=null},100),!r.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[kl]=h,r.passive||(s.prevents||(s.prevents=0),s.prevents++,t.style.setProperty("touch-action","none"),t.offsetWidth),t.flags.incr("_touch_"),globalThis.addEventListener("pointermove",d,{passive:!!r.passive}),globalThis.addEventListener("pointerup",d),globalThis.addEventListener("pointercancel",d),globalThis.addEventListener("click",c,{capture:!0}),n&&!r.passive&&(globalThis.addEventListener("touchend",a),globalThis.addEventListener("touchmove",a,{passive:!1})),r.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),d(i),!1};function Il(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function oc(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var lc=Symbol.for("#context"),hc=Symbol.for("#extendType");function Vl(){return!0}var Dl=new(globalThis.WeakMap||Map),Ne={threshold:[0]},ac={};C.intersect$handle=function(){let i=this.event.detail.observer;return this.modifiers._observer==i};var jl=class extends Pin(){return this.delta>=0&&this.entry.isIntersecting}αout(){return this.delta<0}αcss(t="ratio"){return this.target.style.setProperty("--ratio",this.ratio),!0}αflag(t,e){let{state:r,step:s}=this[lc],n=oe(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 uc(i,t){return function(e,r){let s=r.prevRatios||(r.prevRatios=new WeakMap);for(let n=0,o=Il(e),l=o.length;n<l;n++){let h=o[n],u=s.get(h.target)||0,c=h.intersectionRatio,a={entry:h,ratio:c,from:u,delta:c-u,observer:r},d=new P(i,{bubbles:!1,detail:a});d[hc](jl),d.entry=h,d.isIntersecting=h.isIntersecting,d.delta=a.delta,d.ratio=a.ratio,s.set(h.target,c),h.target.dispatchEvent(d)}}}function Gl(i=Ne){let t=i.threshold.join("-")+i.rootMargin;!i.root&&Ne.root&&(i.root||(i.root=Ne.root));let e=i.root||ac,r=Dl.get(e);return r||Dl.set(e,r={}),r[t]||(r[t]=new IntersectionObserver(uc("intersect",t),i))}var Bl=class{on$intersect(t,e,r,s){let n;if(t.options){let o=[],l={threshold:o};for(let h=0,u=Il(t.options),c=u.length;h<c;h++){let a=u[h];a instanceof p||a instanceof Z?l.root=a:typeof a=="number"?o.push(a):typeof a=="string"?l.rootMargin=a:typeof a=="object"&&Object.assign(l,a)}if(o.length==1){let h=o[0];if(h>1)for(o[0]=0;o.length<h;)o.push(o.length/(h-1))}o.length==0&&o.push(0),n=Gl(l)}else n=Gl();return t._observer=n,n.observe(this),this.addEventListener("intersect",r,s),r}};oc(p.prototype,Bl.prototype);function cc(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function fc(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var dc=Symbol.for("#extendType");function zl(){return!0}var Fr=null,ql=class extends P{αcss(t="1elw",e="1elh",r=""){let s=this.target;if(s.offsetParent){let n=Mt(t),o=Mt(e),l=oe(r,s),h=n?"--u_"+n[1]:"--"+t,u=o?"--u_"+o[1]:"--"+e,c=n?this.width/n[0]:this.width,a=o?this.height/o[0]:this.height;l.style.setProperty(h,c),l.style.setProperty(u,a)}return!0}};function pc(){return globalThis.ResizeObserver||Fr||(console.warn(":resize not supported in this browser"),Fr={observe:function(){return!0}}),Fr||(Fr=new ResizeObserver(function(i){for(let t=0,e=cc(i),r=e.length;t<r;t++){let s=e[t],n=new P("resize",{bubbles:!1,detail:s});n.entry=s,n.rect=s.contentRect,n.width=s.target.offsetWidth,n.height=s.target.offsetHeight,n[dc](ql),s.target.dispatchEvent(n);let o=new P("resized",{bubbles:!0,detail:s});s.target.dispatchEvent(o)}}))}var Ul=class{on$resize(t,e,r,s){return pc().observe(this),this.addEventListener("resize",r,s),r}};fc(p.prototype,Ul.prototype);function mc(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Kl(){return!0}var Yi,Yl=Symbol();function gc(){if(!Yi)return Yi=function(i){if(i[Yl])return;i[Yl]=!0;let t=globalThis.document.activeElement;if(t&&t.matches("input,textarea")){let e=new P("selection",{detail:{start:t.selectionStart,end:t.selectionEnd}});return t.dispatchEvent(e)}},globalThis.document.addEventListener("selectionchange",Yi)}var Wl=class{on$selection(t,e,r,s){return gc(),this.addEventListener("selection",r,s),r}};mc(p.prototype,Wl.prototype);var Xl=Symbol.for("#string"),Ql=Symbol.for("#html"),Ot={win:{sep:"+",name:"win",order:["meta","ctrl","mod","alt","option","shift"].reverse(),labels:{option:"alt",mod:"ctrl",meta:"win"}},mac:{sep:"",name:"mac",order:["ctrl","alt","option","shift","mod","command"].reverse(),labels:{left:"→",up:"↑",down:"↓",right:"←",plus:"+",tab:"⇥",meta:"⌘",mod:"⌘",ctrl:"⌃",option:"⌥",alt:"⌥",del:"⌦",shift:"⇧",enter:"↩",esc:"⎋",backspace:"⌫"}}};Ot.auto=Ot.win;var Wi={};function Jl(i,t="auto"){let e=""+i+":"+t;if(Wi[e])return Wi[e];let r=Ot[t]||Ot.win,s=i.split(" ").map(function(n){return n.split("+").sort(function(u,c){return r.order.indexOf(c)-r.order.indexOf(u)}).map(function(u){let c=r.labels[u]||u;return c=c[0].toUpperCase()+(c.slice(1)||"")})});return Wi[e]=s}function Zl(i,t){var e;let r=Jl(i,t),s=Ot[t]||Ot.win;return r[Xl]||(r[Xl]=r.map(function(n){return n.join(s.sep)}).join(" "))}function th(i,t){var e;let r=Jl(i,t),s=Ot[t]||Ot.win;return r[Ql]||(r[Ql]=r.map(function(n){return"<kbd>"+n.map(function(o){return"<kbd>"+o+"</kbd>"}).join("")+"</kbd>"}).join(" "))}function eh(){return!0}var rh=new class{humanize(t,e="auto"){return Zl(t,e)}htmlify(t,e="auto"){return th(t,e)}};var wh=$(fh());var Qi=Symbol.for("#getQueryParam"),dh=Symbol.for("#setQueryParam"),Xd=Symbol.for("#__initor__"),Qd=Symbol.for("#__inited__"),ph=Symbol.for("#query");var at=class{static parse(t,e){return t instanceof at?t:new at(t,e)}constructor(t,e){this.router=e,this.parse(t)}parse(t){var r;let e;return t instanceof URL||(t=new URL(t,this.router.origin)),(e=(r=this.router)==null?void 0:r.aliases[t.pathname])&&(t.pathname=e),this.url=t,this}get activeΦ(){return this.router.location==this}reparse(){return this.parse(this.url)}get searchParams(){return this.url.searchParams}search(){let t=this.searchParams?this.searchParams.toString():"";return t?"?"+t:""}update(t){if(t instanceof Object)for(let e=0,r=Object.keys(t),s=r.length,n,o;e<s;e++)n=r[e],o=t[n],this.searchParams.set(n,o);else typeof t=="string"&&this.parse(t);return this}clone(){return new at(this.url.href,this.router)}equals(t){return this.toString()==String(t)}get href(){return this.url.href}get path(){return this.url.href.slice(this.url.origin.length)}get pathname(){return this.url.pathname}get query(){return this[ph]||(this[ph]=new Proxy({},{get:this[Qi].bind(this),set:this[dh].bind(this)}))}toString(){return this.href}[Qi](t,e){return this.searchParams.get(e)}[dh](t,e,r){return this[Qi](t,e)!=r&&(r==null||r==""?this.searchParams.delete(e):this.searchParams.set(e,r),this.activeΦ&&(this.router.history.replaceState({},null,this.url.toString()),this.router.touch())),!0}};var Zd=Symbol.for("#__initor__"),tp=Symbol.for("#__inited__"),Ji=class{constructor(t){this.router=t,this.stack=[],this.pos=-1}pushState(t,e,r){return this.stack.length=Math.max(this.pos,0),this.stack[++this.pos]=[t,e,r],this}replaceState(t,e,r){return this.stack.length=this.pos,this.stack[this.pos]=[t,e,r]}popState(){return this.stack.length=this.pos+1,this.pos-=1,this.stack.pop()}currentState(){return this.stack[this.pos]}};var ip=Symbol.for("#__initor__"),sp=Symbol.for("#__inited__"),Ar=class{constructor(t,e,r){this.router=t,e&&(this.location=at.parse(e),this.original=this.location.clone()),this.referrer=r}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 mh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var op=Symbol.for("#__initor__"),lp=Symbol.for("#__inited__"),Hr=Symbol.for("#routes"),Zi=Symbol.for("#match"),Sc=Symbol.for("#symbol"),gh=Symbol.for("#matches"),ts=new Map,es={},yh={};function wc(i){if(!ts.has(i)){let t=new Map;return ts.set(i,t),t}return ts.get(i)}function Tc(i,t){let e=wc(i);if(!e.has(t)){let r=Object.create(i);return Object.assign(r,t),e.set(t,r),r}return e.get(t)}var _h=class{};function Lc(i){if(es[i])return es[i];let t=es[i]={url:i},e=i.indexOf("?"),r=i.indexOf("#");if(r>=0&&(t.hash=i.slice(r+1),i=t.url=i.slice(0,r)),e>=0){let s=t.query=i.slice(e+1);i=i.slice(0,e),t.query=yh[s]||(yh[s]=new URLSearchParams(s))}return t.path=i,t}var rs=class{constructor(t){this.router=t,this.fullPath="",this[Hr]={},this[Zi]=new _h,this[Zi].path=""}route(t){var e;return(e=this[Hr])[t]||(e[t]=new Ir(this.router,t,this))}match(){return this[Zi]}resolve(t){return"/"}},Ir=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[Sc]=Symbol(),this[gh]={},this[Hr]={}}route(t){var e;return(e=this[Hr])[t]||(e[t]=new Ir(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,o=mh(s.join("?").split("&")),l=o.length;n<l;n++){let h=o[n];if(!h)continue;let[u,c]=h.split("=");u[0]=="!"&&(this.dynamic=!0,u=u.slice(1),c=!1),c===""&&(c=!1),c&&c[0]==":"&&(this.dynamic=!0),this.query[u]=c||c!==!1}}if(t=t.replace(/\:(\w+|\*)(\.)?/g,function(s,n,o){return e.dynamic=!0,n!="*"&&e.groups.push(n),o?"([^/#.?]+).":"([^/#?]+)"}),t==""&&e.query)return;t="^"+t;let r=t[t.length-1];r=="$"&&(t=t.slice(0,-1)+"(?=/?[#?]|/?$)"),r!="/"&&r!="$"&&t!="^/"&&(t=t+"(?=[/#?]|$)"),e.regex=new RegExp(t)}match(t=this.router.path){var h,u;var e,r;let s=this.parent.match(t);if(!s)return null;let n=Lc(t),o=n.url,l="";if(s.path&&n.path.indexOf(s.path)==0&&(l=s.path+"/",o=o.slice(l.length)),e=this.regex?o.match(this.regex):[""]){let c=l+e[0],a=[this.$path],d={};if(this.groups.length)for(let y=0,_=mh(e),M=_.length,G;y<M;y++){let X=_[y];(G=this.groups[y-1])&&(d[G]=X,a.push(X))}if(this.query)for(let y=this.query,_=0,M=Object.keys(y),G=M.length,X,v;_<G;_++){X=M[_],v=y[X];let F=X,tt=(u=(h=n.query)==null?void 0:h.get)==null?void 0:u.call(h,X);if(v===!1){if(tt)return null;a.push("1");continue}if(v[0]==":"&&(F=v.slice(1),v=!0),v==!0&&tt||v==tt)d[F]=tt,a.push(tt);else return null}let m=a.join("*");d=(r=this[gh])[m]||(r[m]=d);let f=Tc(s,d);return f.path=c,f}return null}resolve(t=this.router.path){if(this.raw[0]=="/"&&!this.dynamic)return this.raw.replace(/\$/g,"");let e=this.parent.match(t),r=this.parent.resolve(t),s;if(this.dynamic){let n=this.match(t);return n?n.path:null}return this.raw[0]=="?"?s=(r||"/")+this.raw:s=r+"/"+this.raw,s.replace(/\$/g,"").replace(/\/\/+/g,"/")}};var bh=Symbol.for("#__initor__"),vh=Symbol.for("#__inited__"),xh=Symbol.for("#__init__"),Vr=Symbol.for("#idler"),Oe=Symbol.for("#resolve"),Sh=Symbol(),Dr=class extends Set{static[xh](){return this.prototype[bh]=Sh,this}constructor(){super();this[Vr]=Promise.resolve(this),this[bh]===Sh&&this[vh]&&this[vh]()}emit(t,...e){return A(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return k(this,t,...e)}un(t,...e){return bt(this,t,...e)}add(t){var e=this;if(t instanceof Function&&(t=t()),!this.has(t)){t.then(function(){return e.delete(t)});let r=e.size==0;super.add(t),r&&(this[Vr]=this[Oe]=null,e.emit("busy",e))}return t}delete(t){return super.delete(t)?(this.size==0&&(this[Oe]&&(this[Oe](this),this[Oe]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[Vr]||(this[Vr]=new Promise(function(e){return t[Oe]=e}))}};Dr[xh]();function is(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Th=Symbol.for("#__initor__"),Lh=Symbol.for("#__inited__"),Eh=Symbol.for("#__init__"),ss=Symbol.for("#enter"),ns=Symbol.for("#resolved"),os=Symbol.for("#leave"),Mh=Symbol.for("#router"),Ec=Symbol.for("#routes"),Ct=Symbol.for("#version"),ls=Symbol.for("#doc"),Nh=Symbol.for("#origin"),hs=Symbol.for("#request"),Oh=Symbol.for("#hash"),Y=Symbol.for("#routeTo"),jr=Symbol.for("#path"),ut=Symbol.for("#match"),Ce=Symbol.for("#options"),Mc=Symbol.for("#cache"),Ch=Symbol.for("#unmatched"),ke=Symbol.for("#active"),Nc=Symbol.for("#resolvedPath"),Oc=Symbol.for("#dataKey"),Cc=Symbol.for("#activeKey"),Pe=Symbol.for("#urlKey"),he=Symbol.for("#dataMap"),Gr=Symbol.for("#href"),kt=Symbol.for("#route"),kh=Symbol.for("#context"),Ph=Symbol.for("#afterVisit"),Fh=Symbol.for("#routeHandler"),kc=Symbol.for("#attachToParent"),Pc=Symbol.for("#detachFromParent"),$h=Symbol();var Rh=class{get router(){return this[Mh]||(this[Mh]=new Fe(this))}};is(Z.prototype,Rh.prototype);function Ah(){return!0}var Hh=ze(function(){return globalThis.document.router}),Fe=class extends wh.EventEmitter{static[Eh](){return this.prototype[Th]=$h,this}constructor(t,e={}){super();this[Ec]={},this.aliases={},this.redirects={},this.rules={},this.options=e,this.busy=[],this[Ct]=0,this[ls]=t,this.queue=new Dr,this.webΦ=!!t.defaultView,this.root=new rs(this),this.history=new Ji(this),this.location=new at(e.url||t.location.href,this),this.mode=e.mode||"history",this.setup(),this[Th]===$h&&this[Lh]&&this[Lh]()}get origin(){return this[Nh]||(this[Nh]=this[ls].location.origin)}get query(){return this.location.query}init(){return this.refresh({mode:"replace"}),this}alias(t,e){return this.aliases[t]=e,this.location.reparse(),this}touch(){return this[Ct]++}option(t,e){return e==null?this.options[t]:(this.options[t]=e,this)}get realpath(){return this.location.path}get state(){return{}}get ctx(){return this[hs]}pushState(t,e,r){return this.history.pushState(t,e||null,String(r))}replaceState(t,e,r){return this.history.replaceState(t,e||null,String(r))}refresh(t={}){if(this.refreshing)return;this.refreshing=!0;let e=this.location,r=at.parse(t.location||this.realpath,this),s=t.mode,n=this[hs];if(!r.equals(e)||!n){let o=new Ar(this,r,e);o.mode=s,this[hs]=o,this.emit("beforechange",o),o.aborted&&(!o.forceAbort&&globalThis.window.confirm("Are you sure you want to leave? You might have unsaved changes")?o.aborted=!1:s=="pop"?this.pushState(this.state,null,String(e)):s=="replace"&&this.replaceState(this.state,null,String(e))),o.aborted||(this.location=o.location,s=="push"?this.pushState(t.state||this.state,null,String(this.location)):s=="replace"&&this.replaceState(t.state||this.state,null,String(this.location)),this.emit("change",o),this.touch(),H())}return this.refreshing=!1,this}onpopstate(t){return this.refresh({pop:!0,mode:"pop"}),this}onbeforeunload(t){let e=new Ar(this,null,this.location);if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[Oh]=this[ls].location.hash),H()}setup(){return 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[Y]&&(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[Y]&&e[Y].resolve();let r=e.getAttribute("href"),s=new URL(e.href),n=s.href.slice(s.origin.length),o=this.realpath.split("#")[0],l=n.split("#")[0];return o==l?globalThis.document.location.hash=s.hash:e[Y]?e[Y].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 s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++)l=n[s],h=t[l],e.push([l,globalThis.encodeURI(h)].join("="));return e.join("&")}return t||""}get hash(){return this[Oh]}set hash(t){}match(t){return this.route(t).match(this.path)}route(t){return this.root.route(t)}go(t,e={}){let r=this.location.clone().update(t,e);return this.refresh({push:!0,mode:"push",location:r,state:e}),this}replace(t,e={}){let r=this.location.clone().update(t,e);return this.refresh({replace:!0,mode:"replace",location:r,state:e})}};Fe[Eh]();var $e=class{constructor(t,e,r,s={}){this.parent=r,this.node=t,this[jr]=e,this[ut]=null,this[Ce]=s,this[Mc]={},this[Ch]={},this[ke]=null,this[Nc]=null,this[Oc]=Symbol(),this[Cc]=Symbol(),this[Pe]=Symbol()}get router(){return this.node.ownerDocument.router}get route(){return(this.parent?this.parent.route:this.router).route(this[jr])}get match(){return this[ut]}get params(){return this[ut]||this[Ch]}get state(){let t=this[he]||(this[he]=new Map),e=this.params,r=this[he].get(e);return r||this[he].set(e,r={}),r}set state(t){(this[he]||(this[he]=new Map)).set(this.params,t)}set path(t){(this[jr]!=t?(this[jr]=t,!0):!1)&&this.router.touch()}get isActive(){return!!this[ke]}resolve(){let t=this.router[Ct];if(!(this[Ct]!=t?(this[Ct]=t,!0):!1))return;let e=this.route,r=this[Ce],s=this.router.path,n=e.match(s),o=this[ke],l=this[ut],h=n!=l,u=n&&n[this[Pe]];return n&&(this[ke]=!0,this[ut]=n,n[this[Pe]]=s),n&&(h||u!=s)&&this[ns](n,l,u),!o&&n&&this[ss](),!n&&(o||o===null)&&(this[ke]=!1,this[os]()),this[ut]}[ss](){var t,e;return this.node.flags.remove("not-routed"),this.node.flags.add("routed"),(e=(t=this.node)==null?void 0:t.routeDidEnter)==null?void 0:e.call(t,this)}[ns](t,e,r=""){var s,n;return(n=(s=this.node)==null?void 0:s.routeDidResolve)==null?void 0:n.call(s,this,t,e,r)}[os](){var t,e;return this.node.flags.add("not-routed"),this.node.flags.remove("routed"),(e=(t=this.node)==null?void 0:t.routeDidLeave)==null?void 0:e.call(t,this)}},Br=class extends $e{[ss](){return this}[ns](){return this}[os](){return this}resolve(){let t=this.router[Ct];if(!(this[Ct]!=t?(this[Ct]=t,!0):!1))return;let e=this[Ce],r=this.route,s=this.router.path,n=this.route.resolve(s),o=this.route.match(s);o&&(this[ut]=o,this[ut][this[Pe]]=s),e.sticky&&this[ut]&&(n=this[ut][this[Pe]]),(this[Gr]!=n?(this[Gr]=n,!0):!1)&&this.node.nodeName=="A"&&this.node.setAttribute("href",n),this.node.flags.toggle("active",!!o)}go(){return this.resolve(),this[Ce]&&this[Ce].replace?this.router.replace(this[Gr]):this.router.go(this[Gr])}},Ih=class{get router(){return this.ownerDocument.router}};is(w.prototype,Ih.prototype);var Vh=class{set route(t){if(this[kt]){this[kt].path=t;return}let e=t[0]!="/"?this[kh].route:null;this[kt]=new $e(this,t,e,this.route__),this[Ph]=this.end$routed}get route(){return this[kt]}set routeΞto(t){var e=this;if(this[Y]){this[Y].path=t;return}let r=t[0]!="/"?this[kh].route:null;this[kt]=this[Y]=new Br(this,t,r,this.routeTo__),this[Ph]=this.end$routeTo,e.onclick=function(s){if(!s.altKey&&!s.metaKey&&!s[Fh])return s.preventDefault(),s[Fh]=e[Y],e[Y].go()}}end$routed(){if(!(this[kt]&&(this[kt].resolve(),!this[kt].isActive))&&this.visit)return this.visit()}end$routeTo(){if(this[Y]&&this[Y].resolve(),this.visit)return this.visit()}routeDidEnter(t){return this[kc]()}routeDidLeave(t){return this[Pc]()}routeDidResolve(t,e,r){var s=this;this.routed instanceof Function&&e!=r&&s.router.queue.add(async function(){s.suspend();let n=await s.routed(e,t.state,r);return s.unsuspend()})}};is(p.prototype,Vh.prototype);function ct(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function as(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Np=Symbol.for("#__initor__"),Op=Symbol.for("#__inited__"),Re=Symbol.for("##reactive"),Vt=Symbol.for("##referenced"),Ae=Symbol.for("##dereferenced"),zr=Symbol.for("#map"),Dh=Symbol.for("#__init__"),jh=Symbol.for("#child"),He=Symbol.for("#reactions"),T={TOUCHING:1<<1,STALE:1<<2,OBJECT:1<<3,RUNNING:1<<4,INVALIDATING:1<<5,POSSIBLY_STALE:1<<6,AUTORUN:1<<7},I=0,Gh=!1;var Fc=0,Bh=1,us={META:new Map,VALUE:new Map,REF:new Map},j=Symbol.for("~"),zh=Symbol.for("~~"),cs=function(i,t){return t.has(i)||t.set(i,Symbol()),t.get(i)},qr=function(i){return typeof i=="symbol"?cs(i,us.VALUE):Symbol.for(i)},fs=function(i){return typeof i=="symbol"?cs(i,us.META):Symbol.for("#"+i+"__")},ds=function(i){return typeof i=="symbol"?cs(i,us.REF):Symbol.for("~"+i)},S=function(i,t){return I&&b.add(i[j]),t},W=function(i,t){return i[j].invalidated(0),t},ae=function(i,t,e){let r=i[j];return r||(r=i[j]=new Ur(T.OBJECT),Object.defineProperties(i,e)),t&&r.addSubscriber(t),i},ps=function(i,t){let e=i[j];return e&&e.removeSubscriber(t),i},qh=class{constructor(t){this.changes=new Map,this.cleanup(),t&&this.reset(t)}reset(t=[]){return this.array=t,this.initialLength=t.length}cleanup(){return this.idx=0,this.array=null,this.changes.clear(),this.dirty=!1}push(t){if(this.initialLength==0){this.array.indexOf(t)<0&&(this.changes.set(t,1),this.array.push(t),this.idx++);return}let e=this.array[this.idx];if(e===t)return++this.idx;{let r=this.array.indexOf(t),s=this.changes.get(t);if(r===-1)this.array.splice(this.idx,0,t),this.changes.set(t,1),this.idx++;else if(r===this.idx+1)e&&this.changes.set(e,-1),this.array.splice(this.idx,1),++this.idx;else{if(r<this.idx)return;r>this.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 ms(i){var t,e;let r=Object.getOwnPropertyDescriptors(i.prototype);return t=r.name,delete r.name,e=r.constructor,delete r.constructor,r}function $c(){if(!!(Gh!=!0?(Gh=!0,!0):!1))return Ze.on("inited",function(i){let t=i[zh];if(t){let e=i instanceof w,r=i[j]||(i[j]={});for(let s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++){l=n[s],h=t[l];let u=r[l]=new Ie(i[l],i,h);e||u.call()}e&&(R(i,"mount",function(){var s;s=[];for(let n=0,o=ct(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof Ie&&h.activate())}return s}),R(i,"unmount",function(){var s;s=[];for(let n=0,o=ct(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof Ie&&h.deactivate())}return s}))}})}function Rc(i,t=zh){return i.hasOwnProperty(t)||(i[t]=Object.assign({},i[t]||{})),i[t]}var Kr=class{constructor(t,e=0){this.depth=e,this.parent=t,this.target=null,this.patcher=new qh}get activeΦ(){return b==this}get rootΦ(){return this==ue}reset(t){return this.tracking=!0,this.target=t,this.beacon=t.beacon,this.patcher.reset(t.observing||(t.observing=[])),this}add(t){if(this.tracking&&t)return this.patcher.push(t)}react(t){return ue.reactions.add(t)}push(t){return b=this.child.reset(t)}pop(){let t=null;if(this.beacon){t=this.patcher.end();let e=this.patcher.changes;if(e.size)for(let[s,n]of ct(e))n===1?s.addSubscriber(this.beacon):s.removeSubscriber(this.beacon)}return this.patcher.cleanup(),this.target=this.beacon=null,b=this.parent,b==ue&&ue.flush(),t}get child(){return this[jh]||(this[jh]=new Kr(this,this.depth+1))}get reactions(){return this[He]||(this[He]=new Set)}flush(){if(!this[He])return;let t=this[He];this[He]=null;for(let e of ct(t))e.call()}},Uh=class extends Kr{add(){return!0}},b=new Uh(null,0),ue=b,Ac=function(){return b.tracking=!1},Kh=function(i,t,e,r,s){let n=i[e],o=i[s];return o||(o=i[s]=new Ur(0,r,n,t)),b.add(o,i),n},Yh=function(i,t,e,r,s,n){let o=i[e];if(r!=o){i[e]=r;let l=i[n];l&&l.changed(0,r,o)}},Ur=class{constructor(t,e,r,s){return this.id=Bh++,this.observer=null,this.observers=null,r&&r[Vt]&&r[Vt](this),this}changed(t,e,r){if(Fc++,r&&r[Ae]&&r[Ae](this,e),e&&e[Vt]&&e[Vt](this,r),this.observer&&this.observer.invalidated(t+1,this,e,r),this.observers)for(let s=0,n=ct(this.observers),o=n.length;s<o;s++)n[s].invalidated(t+1,this,e,r);b==ue&&b.flush()}invalidated(t,e){if(this.observer&&this.observer.invalidated(t+1,this),this.observers)for(let r=0,s=ct(this.observers),n=s.length;r<n;r++)s[r].invalidated(t+1,this);return t==0&&b==ue&&b.flush(),!0}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(t);r>=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return b.add(this)}};function Wh(i){return new Ur(null,null,null,i)}var Xh=class extends Array{push(){return W(this,super.push(...arguments))}pop(){return W(this,super.pop(...arguments))}unshift(){return W(this,super.unshift(...arguments))}shift(){return W(this,super.shift(...arguments))}splice(){return W(this,super.splice(...arguments))}at(){return S(this,super.at(...arguments))}map(){return S(this,super.map(...arguments))}flatMap(){return S(this,super.flatMap(...arguments))}flat(){return S(this,super.flat(...arguments))}filter(){return S(this,super.filter(...arguments))}find(){return S(this,super.find(...arguments))}slice(){return S(this,super.slice(...arguments))}sort(){return S(this,super.sort(...arguments))}get len(){return S(this,this.length)}set len(t){this.length=t,W(this)}toIterable(){return I&&b.add(this[j]),this}[Symbol.iterator](){return S(this,super[Symbol.iterator](...arguments))}},Qh=ms(Xh),Jh=class{get len(){return this.length}set len(t){this.length=t}get[Re](){return ae(this,null,Qh)}[Vt](t){return ae(this,t,Qh)}[Ae](t){return ps(this,t)}};as(Array.prototype,Jh.prototype);var Zh=class extends Set{has(){return S(this,super.has(...arguments))}keys(){return S(this,super.keys(...arguments))}values(){return S(this,super.values(...arguments))}entries(){return S(this,super.entries(...arguments))}add(){return W(this,super.add(...arguments))}clear(){return W(this,super.clear(...arguments))}delete(){return W(this,super.delete(...arguments))}},ta=ms(Zh),ea=class{get[Re](){return ae(this,null,ta)}[Vt](t){return ae(this,t,ta)}[Ae](t){return ps(this,t)}};as(Set.prototype,ea.prototype);var ra=class extends Map{get(){return S(this,super.get(...arguments))}has(){return S(this,super.has(...arguments))}keys(){return S(this,super.keys(...arguments))}values(){return S(this,super.values(...arguments))}entries(){return S(this,super.entries(...arguments))}set(){return W(this,super.set(...arguments))}clear(){return W(this,super.clear(...arguments))}delete(){return W(this,super.delete(...arguments))}},ia=ms(ra),sa=class{get[Re](){return ae(this,null,ia)}[Vt](t){return ae(this,t,ia)}[Ae](t){return ps(this,t)}};as(Map.prototype,sa.prototype);var na=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=qr(t),o=ds(t),l=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return I?Kh(this,t,n,r,o):this[n]},set:function(u){return I||!!this[o]?Yh(this,t,n,u,r,o):this[n]=u}},h=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return I?(Object.defineProperty(this,t,l),this[t]):this[n]},set:function(u){return this[n]=u,this[o]=null,Object.defineProperty(this,t,l)}}}},oa=class{constructor(t=null){this[Dh](t)}[Dh](t=null){var e;this[zr]=t&&(e=t[zr])!==void 0?e:new Map}for(t){let e=this[zr].get(t);return e||this[zr].set(t,e=[]),e}get(t){let e=this.for(t);return e[j]||e[Re],I&&S(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)}},la=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new oa;let s=ds(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return I?Kh(this,t,e,r,s):this[e]},set:function(l){let h=this[e];if(I||!!this[s]?Yh(this,t,e,l,r,s):this[e]=l,h!=l&&(h&&r.index.delete(h,this),l))return r.index.add(l,this)}},o=r.lazyDescriptor={set:function(l){return this[e]=l,l&&r.index.add(l,this),Object.defineProperty(this,t,n),this[s]=null}}}where(t){return this.index.get(t)}},Yr=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|=T.STALE|T.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=ct(this.observers),n=s.length;r<n;r++)s[r].invalidated(t,this);return this}}value(){if(I&&b.add(this),(this.flags&T.POSSIBLY_STALE)==0)return this.target[this.vkey];I++,this.flags|=T.RUNNING,b.push(this);let t=this.func.call(this.target);b.pop(this);let e=this.target[this.vkey];return this.target[this.vkey]=t,this.flags&=~(T.STALE|T.POSSIBLY_STALE|T.RUNNING),t!==e&&this.version++,I--,t}},ha=class{constructor(t,e){this.name=t;let r=ds(t),s=qr(t),n=this.descriptor={enumerable:!1,configurable:!1,get:function(){return this[r].value()}},o=this.lazyDescriptor={enumerable:!1,get:function(){let l=this[r]=new Yr(this,e,s);return Object.defineProperty(this,t,n),l.value()}}}},Ie=class{get beacon(){return this}constructor(t,e,r={}){this.cb=t,this.context=e,this.options=r,this.flags=0,this.id=Bh++,this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.observing=[],this.timeout=null}get runningΦ(){return this.flags&T.RUNNING}invalidated(t,e){return e instanceof Yr?(this.flags|=T.POSSIBLY_STALE,this.checkComputedValues.add(e)):this.flags|=T.STALE,b.react(this)}activate(){return this.observing=[],this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.call(),this}deactivate(){return this.dispose()}call(){var t=this;if(I&&console.warn("should not call reaction inside an autorunning context?"),this.flags&T.POSSIBLY_STALE&&(this.flags&T.STALE)==0){let e=!1;for(let r of ct(this.checkComputedValues)){let s=this.cachedComputedVersions.get(r);r.value();let n=r.version;if(s!=n){e=!0;break}}if(!e){this.flags&=~T.POSSIBLY_STALE,this.checkComputedValues.clear();return}}if(this.options.delay){clearTimeout(this.timeout);let e=this.options.delay;typeof e!="number"&&(e=1e3),t.timeout=setTimeout(function(){return t.run()},e);return}return t.run()}run(){I++,this.flags|=T.RUNNING;let t=b.push(this),e=this.cb.call(this.context,Ac),r=b.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=ct(r),o=n.length;s<o;s++){let l=n[s];l instanceof Yr&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(T.RUNNING|T.STALE|T.POSSIBLY_STALE),I--,e}dispose(){this.timeout&&clearTimeout(this.timeout);for(let t=0,e=ct(this.observing),r=e.length;t<r;t++)e[t].removeSubscriber(this);return this.observing=this.context=this.cb=this.checkComputedValues=this.cachedComputedVersions=null,this}},gs=class{constructor(t,e){this.context=e,this.cb=t}run(t=this.context,e=[]){b.push(this);let r=this.cb.apply(t,e);return b.pop(this),r}};function aa(i,t={}){let e=new Ie(i,globalThis,t);return e.call(),e}function ua(i){return i[Re]}function ca(i){return new gs(i,globalThis).run()}function fa(i){return i&&i[j]&&i[j].invalidated(0),i}function da(i){return i&&i[j]&&i[j].reportObserved(),i}function pa(i,t,e){let r=fs(t);return(i[r]=new ha(t,e.get)).lazyDescriptor}function ma(i,t,e){let r=fs(t),s=qr(t),n=this[0]||{},o=i[r]=new na(t,n);return e?(Object.defineProperty(i,s,Object.assign({},e)),o.lazyDescriptor):(Object.defineProperty(i,t,o.lazyDescriptor),null)}function ga(i,t,e){let r=fs(t);return i.constructor[t],(i[r]=new la(t,qr(t))).lazyDescriptor}function ya(i,t,e){let r=Rc(i),s=this[0]||{};return s.flags=T.AUTORUN,$c(),r[t]=s,e}function _a(i,t,e){if(e.value){let r=new gs(e.value,null);e.value=function(){return r.run(this,arguments)}}return e}0&&(module.exports={CUSTOM_TYPES,Comment,Component,CustomEvent,Document,DocumentFragment,Easer,Element,ElementRoute,ElementRouteTo,Event,EventHandler,Fragment,HTMLButtonElement,HTMLElement,HTMLHtmlElement,HTMLInputElement,HTMLLinkElement,HTMLOptionElement,HTMLScriptElement,HTMLSelectElement,HTMLStyleElement,HTMLTextAreaElement,ImbaElement,IntersectionEventDefaults,KeyboardEvent,LazyProxy,Location,Manifest,MouseEvent,Node,PointerEvent,RenderContext,Router,SVGElement,SVGSVGElement,Scheduler,ShadowRoot,StyleDeclaration,Text,UIEvent,Window,_dirname_,_filename_,_run_,asset,autorun,clearInterval,clearTimeout,colors,commit,createAtom,createComment,createComponent,createDynamic,createElement,createFragment,createIndexedList,createKeyedList,createLiveFragment,createRenderContext,createSVGElement,createSlot,createTextNode,customElements,defineTag,deserializeData,document,emit,events,getDeepPropertyDescriptor,getRenderContext,getSuperTagType,getTagType,get_document,hooks,hotkeys,hydrate,listen,manifest,mount,observable,once,parseTime,patchManifest,process,proxy,render,renderContext,renderer,reportChanged,reportObserved,router,run,scheduler,serializeData,serve,servers,setInterval,setTimeout,styles,toCamelCase,transitions,unlisten,unmount,use_dom_bind,use_dom_teleport,use_dom_transitions,use_events,use_events_hotkey,use_events_intersect,use_events_keyboard,use_events_mouse,use_events_pointer,use_events_resize,use_events_selection,use_events_touch,use_hooks,use_router,use_slots,use_styles,use_window,αaction,αautorun,αcomputed,αlazy,αobservable,αref});