Time slots app prototype
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
131 KiB

var yh=Object.create;var Ye=Object.defineProperty;var bh=Object.getOwnPropertyDescriptor;var _h=Object.getOwnPropertyNames;var vh=Object.getPrototypeOf,xh=Object.prototype.hasOwnProperty;var Sh=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),wh=(i,t)=>{for(var e in t)Ye(i,e,{get:t[e],enumerable:!0})},an=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _h(t))!xh.call(i,s)&&s!==e&&Ye(i,s,{get:()=>t[s],enumerable:!(r=bh(t,s))||r.enumerable});return i};var Rt=(i,t,e)=>(e=i!=null?yh(vh(i)):{},an(t||!i||!i.__esModule?Ye(e,"default",{value:i,enumerable:!0}):e,i)),Th=i=>an(Ye({},"__esModule",{value:!0}),i);var Fl=Sh((pd,Ts)=>{"use strict";var se=typeof Reflect=="object"?Reflect:null,Tl=se&&typeof se.apply=="function"?se.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Vr;se&&typeof se.ownKeys=="function"?Vr=se.ownKeys:Object.getOwnPropertySymbols?Vr=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Vr=function(t){return Object.getOwnPropertyNames(t)};function zu(i){console&&console.warn&&console.warn(i)}var Nl=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}Ts.exports=g;Ts.exports.once=Yu;g.EventEmitter=g;g.prototype._events=void 0;g.prototype._eventsCount=0;g.prototype._maxListeners=void 0;var Ll=10;function Dr(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 Ll},set:function(i){if(typeof i!="number"||i<0||Nl(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Ll=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||Nl(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 Cl(i){return i._maxListeners===void 0?g.defaultMaxListeners:i._maxListeners}g.prototype.getMaxListeners=function(){return Cl(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")Tl(h,this,e);else for(var a=h.length,c=El(h,a),r=0;r<a;++r)Tl(c[r],this,e);return!0};function Ol(i,t,e,r){var s,n,o;if(Dr(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=Cl(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,zu(l)}return i}g.prototype.addListener=function(t,e){return Ol(this,t,e,!1)};g.prototype.on=g.prototype.addListener;g.prototype.prependListener=function(t,e){return Ol(this,t,e,!0)};function Uu(){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 Ml(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},s=Uu.bind(r);return s.listener=e,r.wrapFn=s,s}g.prototype.once=function(t,e){return Dr(e),this.on(t,Ml(this,t,e)),this};g.prototype.prependOnceListener=function(t,e){return Dr(e),this.prependListener(t,Ml(this,t,e)),this};g.prototype.removeListener=function(t,e){var r,s,n,o,l;if(Dr(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():qu(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 Pl(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?Ku(s):El(s,s.length)}g.prototype.listeners=function(t){return Pl(this,t,!0)};g.prototype.rawListeners=function(t){return Pl(this,t,!1)};g.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):kl.call(i,t)};g.prototype.listenerCount=kl;function kl(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?Vr(this._events):[]};function El(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function qu(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function Ku(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function Yu(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)})}});var Fc={};wh(Fc,{Accessor:()=>Qr,CUSTOM_TYPES:()=>no,Comment:()=>rt,Component:()=>kt,CustomEvent:()=>k,Document:()=>J,DocumentFragment:()=>Ut,Easer:()=>Pe,Element:()=>d,ElementRoute:()=>je,ElementRouteTo:()=>Ur,Emitter:()=>Vt,Event:()=>P,EventHandler:()=>Er,Fragment:()=>ft,HTMLButtonElement:()=>Wt,HTMLElement:()=>M,HTMLHtmlElement:()=>ye,HTMLInputElement:()=>Kt,HTMLLinkElement:()=>ur,HTMLOptionElement:()=>Xt,HTMLScriptElement:()=>ar,HTMLSelectElement:()=>qt,HTMLStyleElement:()=>cr,HTMLTextAreaElement:()=>Yt,ImbaElement:()=>Da,IntersectionEventDefaults:()=>Ar,KeyboardEvent:()=>ve,LazyProxy:()=>Xe,Location:()=>Bt,MouseEvent:()=>Qt,Node:()=>T,PointerEvent:()=>_e,RenderContext:()=>B,Router:()=>He,SVGElement:()=>Jt,SVGSVGElement:()=>fr,Scheduler:()=>tr,ShadowRoot:()=>Ni,StyleDeclaration:()=>hr,Text:()=>_t,UIEvent:()=>be,Window:()=>Si,accessor:()=>Oc,autorun:()=>gc,awaits:()=>yc,clearInterval:()=>gn,clearTimeout:()=>yn,colors:()=>Ua,commit:()=>O,createAtom:()=>mc,createComment:()=>ut,createComponent:()=>lo,createDynamic:()=>ca,createElement:()=>ha,createFragment:()=>ua,createIndexedList:()=>Ma,createKeyedList:()=>Ea,createLiveFragment:()=>xa,createRenderContext:()=>pi,createSVGElement:()=>aa,createSlot:()=>Se,createTextNode:()=>dr,customElements:()=>na,defineTag:()=>fa,descriptor:()=>Mc,document:()=>Li,emit:()=>V,env:()=>Ah,events:()=>_u,getDeepPropertyDescriptor:()=>Qe,getRenderContext:()=>Dh,getSuperTagType:()=>oa,getTagType:()=>ht,get_document:()=>Zt,hooks:()=>ii,hotkeys:()=>Bu,hydrate:()=>Va,listen:()=>R,locals:()=>kc,mount:()=>Bo,observable:()=>bc,once:()=>F,parseTime:()=>Dt,proxy:()=>ti,render:()=>Ya,renderContext:()=>C,renderer:()=>Gt,reportChanged:()=>vc,reportObserved:()=>xc,router:()=>uc,run:()=>_c,scheduler:()=>I,serve:()=>Ih,session:()=>Ec,setInterval:()=>mn,setTimeout:()=>pn,styles:()=>Go,toCamelCase:()=>Nh,transitions:()=>Pr,unlisten:()=>gt,unmount:()=>zo,use_dom_bind:()=>Wa,use_dom_teleport:()=>ou,use_dom_transitions:()=>fu,use_events:()=>vu,use_events_hotkey:()=>$u,use_events_intersect:()=>ku,use_events_keyboard:()=>ts,use_events_mouse:()=>ke,use_events_pointer:()=>wu,use_events_resize:()=>Vu,use_events_selection:()=>ju,use_events_touch:()=>Cu,use_hooks:()=>Ph,use_router:()=>ac,use_slots:()=>_a,use_styles:()=>qa,use_window:()=>ia,αaction:()=>Nc,αautorun:()=>Lc,αcomputed:()=>Sc,αlazy:()=>kh,αobservable:()=>wc,αprop:()=>Pc,αref:()=>Tc});module.exports=Th(Fc);var We=Symbol.for("#__listeners__"),Lh=/-./g,Xe=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 ti(i,t={}){return new Proxy(t,new Xe(i))}function Dt(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 Nh(i){return i.indexOf("-")>=0?i.replace(Lh,function(t){return t.charAt(1).toUpperCase()}):i}function Qe(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:Qe(Reflect.getPrototypeOf(i),t,e)}var un=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[We]||(i[We]={}),o=n[t]||(n[t]={}),l=o.tail||(o.tail=o.next={}),l.listener=e,l.path=r,o.tail=l.next={},l}function F(i,t,e){let r=R(i,t,e);return r.times=1,r}function gt(i,t,e,r){let s,n,o=i[We];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 V(i,t,e){let r;(r=i[We])&&(r[t]&&un(t,e,r[t]),r.all&&un(t,[t,e],r.all))}var Vt=class{emit(t,...e){return V(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return F(this,t,...e)}un(t,...e){return gt(this,t,...e)}};function Ch(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var cn=Symbol.for("#__init__");var fn=Symbol.for("#schedule"),ei=Symbol.for("#frames"),Je=Symbol.for("#interval"),Ht=Symbol.for("#stage"),jt=Symbol.for("#scheduled"),Ze=Symbol.for("#version"),Oh=Symbol.for("#fps"),dn=Symbol.for("#ticker"),Mh=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var Rc=1/60,ri=class{constructor(t=null){this[cn](t)}[cn](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[ei],this.target.tick(this,e),1}update(t,e){let r=this.active,s=t.value;return this.value!=s&&(this.deactivate(),this.value=s),(this.value||r||e)&&this.activate(),this}queue(){this.owner.add(this)}activate(){return this.value===!0?this.owner.on("commit",this):this.value===!1||typeof this.value=="number"&&(this.value/16.666666666666668<=2?this.owner.on("raf",this):this[Je]=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[Je]&&(globalThis.clearInterval(this[Je]),this[Je]=null),this.active=!1,this}},tr=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Ht]=-1,this[ei]=0,this[jt]=!1,this[Ze]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Oh]=0,t.$promise=null,t.$resolve=null,this[dn]=function(e){return t[jt]=!1,t.tick(e)}}touch(){return this[Ze]++}get version(){return this[Ze]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[jt]||this[fn](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Ht]==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[ei]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Ht]=1,this[Ze]++,r.length)for(let n=0,o=Ch(r),l=o.length;n<l;n++){let h=o[n];typeof h=="string"&&this.listeners[h]?e.listeners[h].forEach(function(a){if(a.tick instanceof Function)return a.tick(e,h);if(a instanceof Function)return a(e,h)}):h instanceof Function?h(e.dt,e):h.tick&&h.tick(e.dt,e)}return this[Ht]=this[jt]?0:-1,e.$promise&&(e.$resolve(e),e.$promise=e.$resolve=null),e.listeners.raf&&e.add("raf"),e}[fn](){return this[jt]||(this[jt]=!0,this[Ht]==-1&&(this[Ht]=0),Mh(this[dn])),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 ri({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}},I=new tr;function O(){return I.add("commit").promise}function pn(i,t){return globalThis.setTimeout(function(){i(),O()},t)}function mn(i,t){return globalThis.setInterval(function(){i(),O()},t)}var gn=globalThis.clearInterval,yn=globalThis.clearTimeout,ae=globalThis.imba||(globalThis.imba={});ae.commit=O;ae.setTimeout=pn;ae.setInterval=mn;ae.clearInterval=gn;ae.clearTimeout=yn;var ii={on:function(i,t){return R(this,i,t)},inited:function(i){return V(this,"inited",[i])}};function Ph(){return!0}function kh(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}var hi=Rt(require("cluster")),X=Rt(require("fs")),yt=Rt(require("path")),Ln=require("events"),Nn=Rt(require("http"));function et(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Tn=Symbol.for("#setup"),bn=Symbol.for("#__initor__"),_n=Symbol.for("#__inited__"),vn=Symbol.for("#__init__"),xn=Symbol.for("#setup?"),Eh=Symbol.for("#dom"),Fh=Symbol.for("#server"),Sn=Symbol(),si={html:{"Content-Type":"text/html; charset=utf-8"},js:{"Content-Type":"text/javascript; charset=utf-8"},cjs:{"Content-Type":"text/javascript; charset=utf-8"},mjs:{"Content-Type":"text/javascript; charset=utf-8"},json:{"Content-Type":"application/json; charset=utf-8"},css:{"Content-Type":"text/css; charset=utf-8"},map:{"Content-Type":"application/json; charset=utf-8"},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"},ico:{"Content-Type":"image/x-icon"},bmp:{"Content-Type":"image/bmp"},pdf:{"Content-Type":"application/pdf"},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"},mov:{"Content-Type":"video/quicktime"},wmv:{"Content-Type":"video/x-ms-wmv"},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"}},H=globalThis.process,ni=class extends Set{call(t,...e){var r;r=[];for(let s of et(this))r.push(s[t](...e));return r}close(t={}){var e;e=[];for(let r of et(this))e.push(r.close(t));return e}reload(t={}){var e;e=[];for(let r of et(this))e.push(r.reload(t));return e}broadcast(t,...e){var r;r=[];for(let s of et(this))r.push(s.broadcast(t,...e));return r}emit(t,e){var r;r=[];for(let s of et(this))r.push(s.emit(t,e));return r}},ue=new ni,wn=new(class extends Ln.EventEmitter{static[vn](){return this.prototype[bn]=Sn,this}constructor(){var t;super(...arguments),t=this,this.autoreload=!1,this.state={},globalThis.IMBA_RUN&&hi.default.isWorker&&H.on("message",function(e){if(t.emit("message",e),e[0]=="emit")return t.emit(...e.slice(1))}),this[bn]===Sn&&this[_n]&&this[_n]()}[Tn](){var t=this;if(this[xn]!=!0&&(this[xn]=!0,!0))return this.on("rebuild",function(e){let r=globalThis.IMBA_MANIFEST;return globalThis.IMBA_MANIFEST=e,ue.broadcast("rebuild",e)}),t.on("reloading",function(e){var r;t.state.reloading=!0,r=[];for(let s of et(ue))r.push(s.pause());return r}),t.on("reloaded",async function(e){var r;t.state.reloaded=!0,ue.broadcast("reloaded"),await new Promise(function(n){return setTimeout(n,100)}),r=[];for(let n of et(ue))r.push(n.close());let s=r;return setTimeout(function(){return H.exit(0)},100),await Promise.all(s),H.exit(0)}),!0}send(t){if(H.send instanceof Function)return H.send(t)}on(t,e){return super.on(...arguments)}reload(){if(!(this.isReloading!=!0&&(this.isReloading=!0,!0)))return this;if(this.state.reloading=!0,!H.env.IMBA_SERVE){console.warn("not possible to gracefully reload servers not started via imba start");return}this.send("reload")}}[vn]());function Cn(i,t=[],e=0){let r=globalThis.IMBA_MANIFEST[i];if(t.indexOf(i)>=0)return t;if(r?.imports)for(let s=0,n=et(r?.imports),o=n.length;s<o;s++){let l=n[s];t.push(l),Cn(l,t,e+1)}return t}var oi=class{constructor(t,e,r={}){this.server=t,this.url=e,[this.pathname,this.query]=e.split("?"),this.ext=yt.default.extname(this.pathname),this.headers={"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public, max-age=31536000"},Object.assign(this.headers,t.options.assetHeaders||{}),Object.assign(this.headers,si[this.ext.slice(1)]||{}),this.headers["max-age"]=864e5,r.imports&&t.options.preload!==!1&&(this.headers.Link=Cn(e).map(function(s){return"<"+s+">; rel=modulepreload; as=script"}).join(", ")),this.path=t.localPathForUrl(e)}respond(t,e){var r=this;return X.default.access(this.path,X.default.constants.R_OK,function(s){if(s)return e.writeHead(404,{}),e.end();try{if(r.server.options.setHeaders&&r.server.options.setHeaders(e,r.path),globalThis.BUN)return X.default.readFile(r.path,function(n,o){return e.writeHead(200,r.headers),e.end(o)});{let n=X.default.createReadStream(r.path);return e.writeHead(200,r.headers),n.pipe(e)}}catch{return e.writeHead(503,{}),e.end()}})}createReadStream(){return X.default.createReadStream(this.path)}pipe(t){return this.createReadStream().pipe(t)}},li=class{static wrap(t,e={}){return new this(t,e)}localPathForUrl(t){var e,r,s;let n=t.replace(/\?.*$/,"");return(e=this.urlToLocalPathMap)[n]==null?e[n]=(r=yt.default.resolve(this.publicPath,"."+n),s=X.default.existsSync(r)&&r,!s&&this.staticDir&&(r=yt.default.resolve(this.staticDir,"."+n),s=X.default.existsSync(r)&&r),s):e[n]}headersForAsset(t){let e,r=yt.default.extname(t);return e=Object.assign({"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public"},si[r.slice(1)]||{})}get manifest(){return globalThis.IMBA_MANIFEST||{}}constructor(t,e={}){var r=this;ue.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={},this.urlToLocalPathMap={},this.publicExistsMap={};try{this.rootDir=H.env.IMBA_OUTDIR||yt.default.dirname(H.env.pm_exec_path||H.argv[1])}catch{}try{this.publicPath=yt.default.resolve(this.rootDir,H.env.IMBA_PUBDIR||globalThis.IMBA_PUBDIR||"public")}catch{}this.staticDir=globalThis.IMBA_STATICDIR||"",H.env.IMBA_PATH&&(this.devtoolsPath=yt.default.resolve(H.env.IMBA_PATH,"dist","hmr.js")),this.scheme=t instanceof Nn.default.Server?"http":"https";let s=this.server._events.request,n=globalThis[Eh];t.off("request",s),s[Fh]=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+"/";if(!H.env.IMBA_CLUSTER)return console.log("listening on "+h)}),globalThis.IMBA_HMR&&(globalThis.IMBA_HMR_PATH="/__hmr__.js"),r.handler=function(o,l){var h,a;let c=o.constructor.name=="Http2ServerRequest",u=o.url;if(r.paused||r.closed)return l.statusCode=302,l.setHeader("Location",o.url),c||l.setHeader("Connection","close"),r.closed?(c&&o.stream.session.close(),l.end()):r.stalledResponses.push(l);if(globalThis.IMBA_HMR){if(u=="/__hmr__.js"&&r.devtoolsPath){let m=X.default.createReadStream(r.devtoolsPath);return l.writeHead(200,si.js),m.pipe(l)}if(u=="/__hmr__"){let m={"Content-Type":"text/event-stream","Cache-Control":"no-cache"};return c||(m.Connection="keep-alive"),l.writeHead(200,m),r.clients.add(l),r.broadcast("init",globalThis.IMBA_MANIFEST,[l]),o.on("close",function(){return r.clients.delete(l)}),!0}}let p=o.headers,b;c?b=p[":scheme"]+"://"+p[":authority"]:b=(o.connection.encrypted?"https":"http")+"://"+p.host;let f=r.manifest[u];if(f&&r.localPathForUrl(u))return((a=r.assetResponders)[u]||(a[u]=new oi(r,u,f))).respond(o,l);if((u.match(/\.[A-Z\d]{8}\./)||u.match(/\.\w{1,4}($|\?)/))&&(h=r.localPathForUrl(u)))try{let m=r.headersForAsset(h);if(e.setHeaders&&e.setHeaders(l,h),globalThis.BUN)return X.default.readFile(h,function(_,S){return _?(l.writeHead(500,{}),l.write("Error getting the file: "+_)):(l.writeHead(200,m),l.end(S))});{let _=X.default.createReadStream(h);return l.writeHead(200,m),_.pipe(l)}}catch{return l.writeHead(503,{}),l.end()}if(n){let m=new n.Location(o.url,b);return n.Document.create({location:m},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!!!")}),globalThis.IMBA_RUN&&hi.default.isWorker&&(wn[Tn](),wn.send("serve"))}broadcast(t,e={},r=this.clients){e=JSON.stringify(e);let s="data: "+e+`
`;for(let n of et(r))n.write("event: "+t+`
`),n.write(`id: imba
`),n.write(s);return this}pause(){return this.paused!=!0&&(this.paused=!0,!0)&&this.broadcast("paused"),this}resume(){if(this.paused!=!1&&(this.paused=!1,!0))return this.broadcast("resumed"),this.flushStalledResponses()}flushStalledResponses(){for(let t=0,e=et(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 Ih(i,...t){return li.wrap(i,...t)}var ai=Rt(require("path")),Ah=new class{get rootDir(){return process.env.IMBA_OUTDIR||ai.default.dirname(process.env.pm_exec_path||process.argv[1])}get publicPath(){return ai.default.resolve(this.rootDir,process.env.IMBA_PUBDIR||globalThis.IMBA_PUBDIR||"public")}};function Rh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Q={"":[-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},ui=Object.keys(Q);for(let i=0,t=Rh(ui),e=t.length;i<e;i++){let r=t[i],s=Q[r];s.name=r+"Element",s.up=Q[ui[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]=Q[ui[s]],r.indexOf("svg_")==0&&(L[r.replace("_",":")]=L[r]);var ci=require("async_hooks");var On=Symbol.for("#toStringDeopt");var Mn=Symbol.for("#symbols"),Pn=Symbol.for("#batches"),kn=Symbol.for("#extras"),En=Symbol.for("#stacks"),Pt=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[Mn],s=this[Pn],n=!0;if(!r)r=this[Mn]=[t],s=this[Pn]=[e||""],this.toString=this.valueOf=this[On];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[kn]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[On](){return this.string+(this[kn]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[En]||(this[En]={})}};var er=Symbol.for("#__init__"),Fn=Symbol.for("#__initor__"),In=Symbol.for("#__inited__"),fi=Symbol.for("#getRenderContext"),Vh=Symbol.for("#getDynamicContext"),An=Symbol(),C={context:null},di=class{constructor(t=null){this[er](t)}[er](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()}},Gt=new di,B=class extends Map{static[er](){return this.prototype[Fn]=An,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[Fn]===An&&this[In]&&this[In]()}pop(){return C.context=null}[fi](t){let e=this.get(t);return e||this.set(t,e=new B(this._,t)),C.context=e}[Vh](t,e){return this[fi](t)[fi](e)}run(t){return this.value=t,C.context==this&&(C.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};B[er]();function pi(i,t=Symbol(),e=i){return C.context=i[t]||(i[t]=new B(e,t))}function Dh(){let i=C.context,t=i||new B(null);return globalThis.DEBUG_IMBA&&!i&&Gt.stack.length>0&&console.warn("detected unmemoized nodes in",Gt.stack.slice(0),"see https://imba.io",t),i&&(C.context=null),t}function vi(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var z=Symbol.for("#__initor__"),U=Symbol.for("#__inited__"),w=Symbol.for("#__init__"),xi=Symbol.for("#parent"),ro=Symbol.for("#context"),Rn=Symbol.for("#closestNode"),Hh=Symbol.for("#parentNode"),jh=Symbol.for("##inited"),mi=Symbol.for("#getRenderContext"),Gh=Symbol.for("#getDynamicContext"),gi=Symbol.for("#replaceChild"),me=Symbol.for("#appendChild"),Vn=Symbol.for("#removeChild"),bt=Symbol.for("#insertInto"),Dn=Symbol.for("#insertChild"),ce=Symbol.for("#removeFrom"),Hn=Symbol.for("#removeFromDeopt"),$t=Symbol.for("#replaceWith"),jn=Symbol.for("#replaceWithDeopt"),yi=Symbol.for("#placeholderNode"),$h=Symbol.for("#attachToParent"),Bh=Symbol.for("#detachFromParent"),zh=Symbol.for("#placeChild"),Uh=Symbol.for("#beforeReconcile"),qh=Symbol.for("#afterReconcile"),Kh=Symbol.for("#afterVisit"),Yh=Symbol.for("#visitContext"),Gn=Symbol.for("#document"),or=Symbol.for("#htmlNodeName"),$n=Symbol.for("#ImbaElement"),Bn=Symbol.for("#flags"),lr=Symbol.for("#scripts"),bi=Symbol.for("#location"),zn=Symbol.for("##document"),io=Symbol.for("##parent"),Wh=Symbol.for("##up"),Un=Symbol.for("##context"),fe=Symbol.for("#domNode"),rr=Symbol.for("##placeholderNode"),qn=Symbol.for("#domDeopt"),Xh=Symbol.for("#insertIntoDeopt"),Kn=Symbol.for("##classList"),ir=Symbol.for("##style"),Yn=Symbol.for("##dataset"),ot=Symbol.for("#asset"),_i=Symbol.for("#innerHTML"),sr=Symbol.for("##visitContext"),Qh=Symbol.for("#isRichElement"),de=Symbol.for("#src"),Jh=Symbol.for("#getSlot"),Zh=Symbol.for("#cssns"),ta=Symbol.for("#cssid"),ea=Symbol.for("#dom"),Wn=Symbol(),Xn=Symbol(),Qn=Symbol(),Jn=Symbol(),Zn=Symbol(),to=Symbol(),ra={},pe=null,Bt=class extends URL{},Si=class{get document(){return this[Gn]||(this[Gn]=new this.Document(this))}get location(){return this.document.location}};function ia(){return!0}var sa={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},lt=null,so={},wi=class{define(){return this}get(){return this}upgrade(){}whenDefined(){}},na=new wi,no={};function ht(i,t){let e=i;if(typeof i=="string"&&(i=Q[i]||L[i]||Q[i+"Element"]||L["svg_"+i]),i instanceof T)return i;if(!i)return ht("HTML");if(i&&!i.klass){class r extends ht(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,a;n<l;n++){h=o[n],a=s[h];let c=a==1?h:a;r[c]||c=="style"||Object.defineProperty(i.klass.prototype,h,{set:function(u){this.setAttribute(c,u)},get:function(){return this.getAttribute(c)}})}}return i.klass}function oa(i,t,e){let r=ht(i,t);if(!(r==e||r.prototype instanceof e||r.prototype[or])){let n=r.prototype[$n];if(!n){n=class extends r{static[w](){return this.prototype[z]=Wn,this}constructor(){super(...arguments),this.__slots={},this.__F=0,this[z]===Wn&&this[U]&&this[U]()}}[w](),r.prototype[$n]=n;let o=Object.getOwnPropertyDescriptors(e.prototype);Object.defineProperties(n.prototype,o),n.prototype[or]=i}return n}return r}var nr=function(i){let t=typeof i=="string"?i:String(i);return t.indexOf('"')>=0&&(t=t.replace(/\"/g,"&quot;")),t},Ti=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},J=class{static create(t,e){let r=new J;return r[ro]=t,r.location=t.location,pe||(pe=new ci.AsyncLocalStorage),pe.run(r,e),r}constructor(){}get flags(){return this[Bn]||(this[Bn]=new Pt({classList:new zt(this)}))}get scripts(){return this[lr]||(this[lr]=[])}set location(t){typeof t=="string"&&(t=new Bt(t)),this[bi]=t}get location(){return this[bi]||(this[bi]=new Bt("http://localhost/"))}createElement(t){let e=ht(t),r=new e(t);return r.nodeName=t,r}createElementNS(t,e){if(t=="http://www.w3.org/2000/svg"){let r=ht("svg_"+e),s=new r;return s.nodeName=e,s}return this.createElement(e)}createTextNode(t){return new _t(t)}createComment(t){return new rt(t)}createDocumentFragment(){return new Ut}getElementById(t){return null}},at=new J,Li=at;function Zt(){return pe&&pe?.getStore?.()||at}var zt=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 zt(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(";")}},ge=class{static wrap(t){return new Proxy(t.attributes,new ge)}set(t,e,r){return t["data-"+e]=r,!0}get(t,e){return t["data-"+e]}},la={get(i,t){let e=i,r;for(;e&&r==null;)(e=e[xi])&&(r=e[t]);return r}},T=class{toString(){return this.outerHTML}get outerHTML(){return""}text$(t){return this.textContent=t,this}get ownerDocument(){return this[zn]||(this[zn]=Zt())}get[xi](){return this[io]||this.parentNode||this[Wh]}get[ro](){return this[Un]||(this[Un]=new Proxy(this,la))}get[Rn](){return this}get[Hh](){return this[xi][Rn]}[w](){return this}[jh](){return this}[mi](t){return pi(this,t)}[Gh](t,e){return this[mi](t)[mi](e)}[gi](t,e){let r=this[Dn](t,e);return this[Vn](e),r}[me](t){return t[bt](this,null)}[Vn](t){return t[ce](this)}[bt](t,e){return e?t.insertBefore(this,e):t.appendChild(this),this}[Dn](t,e){return t[bt](this,e)}[ce](t){return t.removeChild(this)}[Hn](t){return t.removeChild(this[fe]||this)}[$t](t,e){return e[gi](t,this)}[jn](t,e){return e[gi](t,this[fe]||this)}get[yi](){return this[rr]||(this[rr]=at.createComment("placeholder"))}set[yi](t){let e=this[rr];this[rr]=t,e&&e!=t&&e.parentNode&&e[$t](t)}[$h](){let t=this[fe],e=t&&t.parentNode;return t&&e&&t!=this&&(this[fe]=null,this[bt](e,t),t[ce](e)),this}[Bh](){this[qn]!=!0&&(this[qn]=!0,!0)&&(this[$t]=this[jn],this[ce]=this[Hn],this[bt]=this[Xh]);let t=this[yi];return this.parentNode&&t!=this&&(t[bt](this.parentNode,this),this[ce](this.parentNode)),this[fe]=t,this}[zh](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof rt)return r;let n=new rt("");return r?r[$t](n,this):n[bt](this,null)}if(t===r)return t;if(s!=="object"){let n,o=t;return e&128&&e&256,r?r instanceof _t?(r.textContent=o,r):(n=Li.createTextNode(o),r[$t](n,this),n):(this.appendChild(n=Li.createTextNode(o)),n)}else return r?r[$t](t,this):t[bt](this,null)}},_t=class extends T{static[w](){return this.prototype[z]=Xn,this}constructor(t){super(),this.textContent=t??"",this[z]===Xn&&this[U]&&this[U]()}get outerHTML(){return this.textContent}};_t[w]();var rt=class extends T{static[w](){return this.prototype[z]=Qn,this}constructor(t){super(),this.value=t,this[z]===Qn&&this[U]&&this[U]()}get outerHTML(){return"<!-- "+Ti(this.value)+" -->"}toString(){return this.tag&&this.tag.toNodeString?this.tag.toNodeString():this.outerHTML}};rt[w]();var d=class extends T{static[w](){return this.prototype[z]=Jn,this}constructor(t){super(),this.nodeName=t,this.childNodes=[],this.attributes={},this[z]===Jn&&this[U]&&this[U]()}emit(t,e,r={bubbles:!0}){console.warn("Element#emit not supported on node")}get classList(){return this[Kn]||(this[Kn]=new zt(this))}get style(){return this[ir]||(this[ir]=new hr)}get dataset(){return this[Yn]||(this[Yn]=ge.wrap(this))}get richValue(){return this.value}set richValue(t){this.value=t}set asset(t){this[ot]=t}get asset(){return this[ot]}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[_i]=t}get innerHTML(){let t="";if(this[_i])return this[_i];if(this.textContent!=null)return Ti(this.textContent);for(let e=0,r=vi(this.childNodes),s=r.length;e<s;e++){let n=r[e];typeof n=="string"||n instanceof String?t+=Ti(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[or],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="'+nr(s)+'"'),n&&(r+=' class="'+nr(n)+'"');for(let o=this.attributes,l=0,h=Object.keys(o),a=h.length,c,u;l<a;l++)c=h[l],u=o[c],r+=" "+c+'="'+nr(u)+'"';return this[ir]&&(r+=' style="'+nr(this[ir].toString())+'"'),sa[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 d)return r}return null}get lastElementChild(){let t=this.childNodes.length;for(;t>0;){let e=this.childNodes[--t];if(e instanceof d)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)}text$(t){return this.textContent=t,this}[Uh](){return this}[qh](){return this}[Kh](){this.render&&this.render(),this[sr]&&(this[sr]=null)}get[Yh](){return this[sr]||(this[sr]={})}get flags(){return this.$flags||(this.$flags=new Pt(this),this.flag$==d.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=Qe(this,t,d);!r||!r.set?this.setAttribute(t,e):this[t]=e}};d[w]();d.prototype.setns$=d.prototype.setAttributeNS;d.prototype[Qh]=!0;var Ut=class extends d{static[w](){return this.prototype[z]=Zn,this}constructor(){super(null),this[z]===Zn&&this[U]&&this[U]()}get outerHTML(){return this.innerHTML}};Ut[w]();var Ni=class extends Ut{get outerHTML(){return this.innerHTML}},M=class extends d{},ye=class extends M{static[w](){return this.prototype[z]=to,this}constructor(){super(...arguments),super[w]||this[w](),this[z]===to&&this[U]&&this[U]()}[w](t=null){super[w]&&super[w](...arguments),this.hmr=t?t.hmr:void 0}get scripts(){return this[lr]||(this[lr]=[])}get outerHTML(){let t=lt;lt=this;let e=super.outerHTML,r=new Set,s=[],n=[];if(globalThis.IMBA_HMR_PATH&&this.hmr!==!1&&n.push("<script src='/__hmr__.js'><\/script>"),!this.styles){for(let o=0,l=vi(this.scripts),h=l.length;o<h;o++){let c=l[o].src,u=ra[c];u&&u.css&&r.add(u.css)}for(let o of vi(r))n.push("<link rel='stylesheet' href='"+o.url+"'>")}if(lt=t,n.length){let o=e.indexOf("</head>");o==-1&&(o=e.indexOf("<body>")),o==-1&&(o=0),e=e.slice(0,o)+`
`+n.join(`
`)+`
`+e.slice(o)}return"<!DOCTYPE html>"+e}};ye[w]();var qt=class extends M{},Kt=class extends M{},Yt=class extends M{},Wt=class extends M{},Xt=class extends M{},ar=class extends M{get outerHTML(){return lt&&(lt.scripts||(lt.scripts=[])).push(this),this[ot]&&(this[ot].js?(this.setAttribute("src",this[ot].js.url),this.setAttribute("type","module")):console.warn("could not find browser entrypoint for "+this[ot].path)),super.outerHTML}},ur=class extends M{get outerHTML(){if(this[ot]){let t=this.getAttribute("rel"),e;t=="stylesheet"&&((e=this[ot].css.url)||console.warn("could not find stylesheet for "+this[ot].path)),e&&this.setAttribute("href",e)}return super.outerHTML}},cr=class extends M{set src(t){this[de]!=t&&(this[de]=t)}get src(){return this[de]}get outerHTML(){if(lt&&this.src&&(lt.styles||(lt.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}},P=class{},be=class extends P{},Qt=class extends be{},_e=class extends Qt{},ve=class extends be{},k=class extends P{},eo={};function oo(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==Jt?e[t]=r||null:oo(Reflect.getPrototypeOf(i),t,e)}var Jt=class extends d{set$(t,e){var r;let s=eo[r=this.nodeName]||(eo[r]={}),n=oo(this,t,s);!n||!n.set?this.setAttribute(t,e):this[t]=e}},fr=class extends Jt{set src(t){if(this[de]!=t&&(this[de]=t,!0)){if(t&&t.adoptNode)t.adoptNode(this);else if(t&&t.type=="svg"){if(t.attributes)for(let e=t.attributes,r=0,s=Object.keys(e),n=s.length,o,l;r<n;r++)o=s[r],l=e[o],this.setAttribute(o,l);this.innerHTML=t.content}}}};Q[""].klass=d;Q.HTML.klass=M;Q.SVG.klass=Jt;L.html.klass=ye;L.select.klass=qt;L.input.klass=Kt;L.textarea.klass=Yt;L.button.klass=Wt;L.option.klass=Xt;L.script.klass=ar;L.style.klass=cr;L.link.klass=ur;L.svg_svg.klass=fr;ht("");ht("HTML");ht("SVG");function ha(i,t,e,r){let s=at.createElement(i);return e&&(s.className=e),r!==null&&s.text$(r),t&&t[me]&&t[me](s),s}function aa(i,t,e,r,s){let n=at.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 ut(i){return at.createComment(i)}function dr(i){return at.createTextNode(i)}function ua(){return at.createDocumentFragment()}function lo(i,t,e,r,s){let n;return typeof i!="string"&&(i.prototype instanceof M?(n=new i,n.nodeName=i.nodeName):i&&i.nodeName&&(i=i.nodeName)),n||(n=at.createElement(so[i]||i)),n[io]=t,n[w](),r!==null&&n[Jh]("__").text$(r),(e||n.flags$ns)&&n.flag$(e||""),n}function ca(i,t,e,r){if(i==null||i==null)return ut("");if(i instanceof T)return i;if(typeof i=="string"||i&&i.prototype instanceof T)return lo(i,t,e,r)}function fa(i,t,e={}){Q[i]=no[i]={idl:!0,name:i,klass:t};let r=t.nodeName=i,s=t.prototype;if(i.indexOf("-")==-1&&(r=t.nodeName=""+i+"-tag",so[i]=r),e.extends&&(s[or]=e.extends),e.cssns){let n=(s._ns_||"")+" "+e.cssns;s._ns_=n.trim()+" ",s[Zh]=e.cssns}if(e.cssid){let n=(s.flags$ns||"")+" "+e.cssid;s[ta]=e.cssid,s.flags$ns=n.trim()+" "}return t}globalThis[ea]={Location:Bt,Document:J};function Ci(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function da(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var yr=Symbol.for("#parent"),ho=Symbol.for("#closestNode"),pa=Symbol.for("#isRichElement"),ma=Symbol.for("#afterVisit"),ao=Symbol.for("#__initor__"),uo=Symbol.for("#__inited__"),co=Symbol.for("#appendChild"),fo=Symbol.for("#removeChild"),po=Symbol.for("#replaceChild"),ct=Symbol.for("#insertInto"),pr=Symbol.for("#replaceWith"),mo=Symbol.for("#insertChild"),mr=Symbol.for("#removeFrom"),go=Symbol.for("#placeChild"),xo=Symbol.for("#__init__"),ga=Symbol.for("#registerFunctionalSlot"),ya=Symbol.for("#getFunctionalSlot"),yo=Symbol.for("#getSlot"),Mi=Symbol.for("##parent"),vt=Symbol.for("##up"),bo=Symbol.for("##flags"),ba=Symbol.for("#domFlags"),q=Symbol.for("#end"),_o=Symbol.for("#textContent"),gr=Symbol.for("#textNode"),Oi=Symbol.for("#functionalSlots"),vo=Symbol();function _a(){return!0}var ft=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[yr](t){this[Mi]=t}get[yr](){return this[Mi]||this[vt]}get[ho](){return this[yr][ho]}get[pa](){return!0}get flags(){return this[bo]||(this[bo]=new Pt(this))}flagSync$(){return this}[ma](){return this}},va=0,xe=class extends ft{static[xo](){return this.prototype[ao]=vo,this}constructor(t,e){super(...arguments),this[vt]=e,this.parentNode=null,this[ba]=t,this.childNodes=[],this[q]=ut("slot"+va++),e&&e[co](this),this[ao]===vo&&this[uo]&&this[uo]()}get[yr](){return this[Mi]||this.parentNode||this[vt]}set textContent(t){this[_o]=t}get textContent(){return this[_o]}hasChildNodes(){for(let t=0,e=Ci(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(s instanceof ft&&s.hasChildNodes())return!0;if(!(s instanceof rt)){if(s instanceof T)return!0}}return!1}text$(t){return this[gr]?this[gr].textContent=t:this[gr]=this[go](t),this[gr]}appendChild(t){return this.parentNode&&t[ct](this.parentNode,this[q]),this.childNodes.push(t)}[co](t){var e;return this.parentNode?t[ct](this.parentNode,this[q]):t[vt]==null?t[vt]=this[vt]||this:t[vt],this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[mo](t,e);let r=this.childNodes.indexOf(e);return r>=0&&this.childNodes.splice(r,0,t),t}[fo](t){this.parentNode&&this.parentNode[fo](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[po](t,e){this.parentNode&&this.parentNode[po](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[ct](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[q]&&(e=this[q][ct](t,e));for(let s=0,n=Ci(this.childNodes),o=n.length;s<o;s++)n[s][ct](t,e)}return this}[pr](t,e){let r=t[ct](e,this[q]);return this[mr](e),r}[mo](t,e){if(this.parentNode&&this.insertBefore(t,e||this[q]),e){let r=this.childNodes.indexOf(e);r>=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[mr](t){for(let e=0,r=Ci(this.childNodes),s=r.length;e<s;e++)r[e][mr](t);return this[q]&&this[q][mr](t),this.parentNode=null,this}[go](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&r instanceof rt)return r;let o=ut("");if(r){let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,o),s&&r[pr](o,s),o}return this.childNodes.push(o),s&&o[ct](s,this[q]),o}if(t===r)return t;if(n!=="object"){let o,l=t;if(r){if(r instanceof _t)return r.textContent=l,r;{o=dr(l);let h=this.childNodes.indexOf(r);return this.childNodes.splice(h,1,o),s&&r[pr](o,s),o}}else return this.childNodes.push(o=dr(l)),s&&o[ct](s,this[q]),o}else if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,t),s&&r[pr](t,s),t}else return this.childNodes.push(t),s&&t[ct](s,this[q]),t}};xe[xo]();function xa(i,t){return new xe(i,t)}function Se(i,t){let e=new xe(i,null);return e[vt]=t,e}var Pi=class{[ga](t){let e=this[Oi]||(this[Oi]={});return e[t]||(e[t]=Se(0,this))}[ya](t,e){let r=this[Oi];return r&&r[t]||this[yo](t,e)}[yo](t,e){var r;return t=="__"&&!this.render?this:(r=this.__slots)[t]||(r[t]=Se(0,this))}};da(T.prototype,Pi.prototype);function Sa(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var wa=Symbol.for("#afterVisit"),br=Symbol.for("#insertInto"),So=Symbol.for("#appendChild"),Ta=Symbol.for("#replaceWith"),ki=Symbol.for("#removeFrom"),wo=Symbol.for("#__initor__"),To=Symbol.for("#__inited__"),No=Symbol.for("#__init__"),La=Symbol.for("#domFlags"),Na=Symbol.for("##parent"),xt=Symbol.for("#end"),Ca=Symbol.for("#removeChild"),Oa=Symbol.for("#insertChild"),Lo=Symbol(),_r=class extends ft{static[No](){return this.prototype[wo]=Lo,this}constructor(t,e){super(...arguments),this[La]=t,this[Na]=e,t&256||(this[xt]=ut("list")),this.$=this.childNodes,this.length=0,e&&e[So](this),this[wo]===Lo&&this[To]&&this[To]()}hasChildNodes(){return this.length!=0}[wa](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[xt];if(e>t)for(;e>t;)r[Ca](s[--e]);else if(t>e)for(;t>e;)r[Oa](s[e++],n);this.length=t}[br](t,e){this.parentNode=t,this[xt]&&this[xt][br](t,e),e=this[xt];for(let r=0,s=Sa(this.childNodes),n=s.length;r<n;r++){let o=s[r];if(r==this.length)break;o[br](t,e)}return this}[So](t){}[Ta](t,e){let r=t[br](e,this[xt]);return this[ki](e),r}[ki](t){let e=this.length;for(;e>0;)this.childNodes[--e][ki](t);this[xt]&&t.removeChild(this[xt]),this.parentNode=null}};_r[No]();function Ma(i,t){return new _r(i,t)}function Co(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Ei=Symbol.for("#appendChild"),vr=Symbol.for("#insertChild"),Pa=Symbol.for("#replaceWith"),xr=Symbol.for("#insertInto"),Fi=Symbol.for("#removeFrom"),ka=Symbol.for("#afterVisit"),Oo=Symbol.for("#__initor__"),Mo=Symbol.for("#__inited__"),Fo=Symbol.for("#__init__"),Sr=Symbol.for("#domFlags"),Po=Symbol.for("##parent"),St=Symbol.for("#end"),ko=Symbol.for("#removeChild"),Eo=Symbol(),wr=class extends ft{static[Fo](){return this.prototype[Oo]=Eo,this}constructor(t,e){super(...arguments),this[Sr]=t,this[Po]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new B(this,Symbol()),t&256||(this[St]=ut("map")),e&&e[Ei](this),this[Oo]===Eo&&this[Mo]&&this[Mo]()}[Ei](t){if(this.parentNode)return this.parentNode[vr](t,this[St])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Sr]&1)){this.array.push(t),this[Ei](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[vr](t,n.nextSibling)}else s[vr](t,this.childNodes[e+1]||this[St])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[Fi](t.parentNode)}[vr](t,e){}[Pa](t,e){let r=t[xr](e,this[St]);return this[Fi](e),r}[xr](t,e){this[Po]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=Co(this.array),o=n.length;s<o;s++)n[s][xr](t,e);this[St]&&this[St][xr](t,e)}return this}[Fi](t){for(let e=0,r=Co(this.array),s=r.length;e<s;e++){let n=r[e];t[ko](n)}return this[St]&&t[ko](this[St]),this.parentNode=null}[ka](t){var e=this;if(!(this[Sr]&1)){this[Sr]|=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)}}};wr[Fo]();function Ea(i,t){return new wr(i,t)}var ee=Symbol.for("#__init__"),Io=Symbol.for("#__initor__"),Ao=Symbol.for("#__inited__"),Fa=Symbol.for("##inited"),Ia=Symbol.for("#afterVisit"),Aa=Symbol.for("#beforeReconcile"),Ra=Symbol.for("#afterReconcile"),Ro=Symbol.for("#__hooks__"),te=Symbol.for("#autorender"),Tr=Symbol.for("##visitContext"),Vo=Symbol(),Do=new class{constructor(i=null){this[ee](i)}[ee](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=T.DOCUMENT_POSITION_PRECEDING,o=T.DOCUMENT_POSITION_FOLLOWING;if(e){let l=this.items.indexOf(s),h=l,a=function(u,p){return t.tests++,u.compareDocumentPosition(p)};(l==-1||s.nodeName!=i.nodeName)&&(h=l=0);let c=t.items[h];for(;c&&a(c,i)&o;)c=t.items[++h];if(h!=l)c?t.items.splice(h,0,i):t.items.push(i);else{for(;c&&a(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 Va(){return Do.flush()}var kt=class extends M{static[ee](){return this.prototype[Io]=Vo,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[Io]===Vo&&this[Ao]&&this[Ao]()}setup$(){return this.__slots={},this.__F=0}[ee](){return this.__F|=3,this}[Fa](){if(this[Ro])return this[Ro].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)&-257&-8193):(this.__F|=8192,this)}get autoschedule(){return(this.__F&64)!=0}set autoschedule(t){t?this.__F|=64:this.__F&=-65}set autorender(t){let e=this[te]||(this[te]={});e.value=t,this.mountedΦ&&I.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 I.on("commit",this),this.__F|=128,this}unschedule(){return I.un("commit",this),this.__F&=-129,this}async suspend(t=null){let e=this.flags.incr("@suspended");return this.__F|=4096,t instanceof Function&&(await t(),this.unsuspend()),this}unsuspend(){return this.flags.decr("@suspended")==0&&(this.__F&=-4097,this.commit()),this}[Ia](){if(this.visit(),this[Tr])return this[Tr]=null}[Aa](){return this.__F&1024&&(this.__F=this.__F&-1025,this.classList.remove("_ssr_"),this.flags$ext&&this.flags$ext.indexOf("_ssr_")==0&&(this.flags$ext=this.flags$ext.slice(5)),this.__F&512||(this.innerHTML="")),globalThis.DEBUG_IMBA&&Gt.push(this),this[Tr]&&(this[Tr]=null),this}[Ra](){return globalThis.DEBUG_IMBA&&Gt.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){Do.queue(this);return}if(t&48)return;this.__F|=16,e||this[ee](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),V(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(I.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[te]&&I.schedule(this,this[te]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),V(this,"unmount"),this.unmount(),this[te])return I.unschedule(this,this[te])}};kt[ee]();var Da=kt;function Ha(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Ho=Symbol.for("#__init__");var ja={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 jo={prefix:1,suffix:1,content:1},Ri={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]]},Ga=new RegExp("^("+Object.keys(Ri).join("|")+")(\\d+(?:\\.\\d+)?)$"),$a=/^([xyz])$/,Ba=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,za=`*,::before,::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: currentColor;
}`,Ii=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",za))}toString(){return Object.values(this.entries).map(function(t){return t.css}).join(`
`)}toValue(t,e,r,s=null){let n;jo[r]&&(t=String(t));let o=typeof t;if(o=="number"){if(e||($a.test(r)?e="px":Ba.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return ja[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(o=="string"){if(r&&jo[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(Ga)){let h=Ri[n[1]][parseInt(n[2])],a="100%";if(typeof s=="number"?a=s+"%":typeof s=="string"&&(a=s),h)return"hsla("+h[0]+","+h[1]+"%,"+h[2]+"%,"+a+")"}}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]}},Go=new Ii,Ua=Object.keys(Ri);function qa(){return!0}var Ai=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let o=Go.toValue(e,r,s,n);this.style.setProperty(t,o)}};Ha(d.prototype,Ai.prototype);var Ka=Symbol.for("#insertInto"),$o=Symbol.for("#removeFrom");function Ya(i,t={}){let e=C.context;C.context=t;let r=i(t);return C.context==t&&(C.context=e),r}function Bo(i,t){return console.error(`imba.mount not supported on server.
To spawn a dev-server for an imba client run:
> imba serve my-imba-file.imba`),String(i);let e=t||globalThis.document.body,r=i;if(i instanceof Function){let s=new B(e,null),n=function(){let o=C.context;C.context=s;let l=i(s);return C.context==s&&(C.context=o),l};r=n(),I.listen("commit",n)}else r.__F|=64;return r[Ka](e),r}function zo(i){return i&&i[$o]&&i[$o](i.parentNode),i}var Uo=globalThis.imba||(globalThis.imba={});Uo.mount=Bo;Uo.unmount=zo;function re(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function we(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Te=Symbol.for("##onchange"),Ne=Symbol.for("#afterVisit"),Le=Symbol.for("##oninput"),Lr=Symbol.for("##onclick"),Ce=Symbol.for("##bound"),wt=Symbol.for("##visitContext");function Wa(){return!0}var Xa={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},Vi=function(i){return i instanceof Array||i&&i.has instanceof Function},zi=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},Ui=function(i,t){if(i instanceof Array)return i.push(t);if(i&&i.add instanceof Function)return i.add(t)},qi=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 Qa(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 Di=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Ce]&&Xa[this.nodeName]&&(this[Ce]=!0,this[Te]&&this.addEventListener("change",this[Te]=this[Te].bind(this)),this[Le]&&this.addEventListener("input",this[Le]=this[Le].bind(this),{capture:!0}),this[Lr]&&this.addEventListener("click",this[Lr]=this[Lr].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?Qa(r):r),r}};re(d.prototype,Di.prototype);Object.defineProperty(d.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(i){return this.setRichValue(i)}});var Hi=class{[Te](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=we(r),l=o.length;n<l;n++){let h=o[n];s.indexOf(h)==-1&&qi(e,h)}for(let n=0,o=we(s),l=o.length;n<l;n++){let h=o[n];(!r||r.indexOf(h)==-1)&&Ui(e,h)}}else this.data=s[0];return O(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=we(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=we(this.options),n=s.length;r<n;r++){let o=s[r],l=o.richValue,h=zi(t,l);o.selected=h,h&&e.push(l)}this.$$value=e}else for(let e=0,r=we(this.options),s=r.length;e<s;e++){let o=r[e].richValue;if(o==t){this.$$value=[o],this.selectedIndex=e;break}}}[Ne](){if(this.syncValue(),this[wt])return this[wt]=null}};re(qt.prototype,Hi.prototype);var ji=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}};re(Xt.prototype,ji.prototype);var Gi=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Le](t){return this.data=this.value,O()}[Ne](){let t=this.data;if(t==null&&(t=""),this[Ce]&&this.value!=t&&(this.value=t),this[wt])return this[wt]=null}};re(Yt.prototype,Gi.prototype);var $i=class{[Le](t){let e=this.type;if(!(e=="checkbox"||e=="radio")&&!(e=="number"&&Number.isNaN(this.valueAsNumber)))return this.$$value=void 0,this.data=this.richValue,O()}[Te](t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;Vi(e)?s?Ui(e,r):qi(e,r):this.data=s?r:!1}return O()}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;if(e=="range"||e=="number"){let r=this.valueAsNumber;Number.isNaN(r)&&(r=Number(t.replace(/\,/,".")+0)),Number.isNaN(r)&&(r=null),t=r}else e=="checkbox"&&(t==null||t==="on")&&(t=!0);return t}[Ne](){if(this[Ce]){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=zi(e,this.richValue)}else this.richValue=this.data}this[wt]&&(this[wt]=null)}};re(Kt.prototype,$i.prototype);var Bi=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}[Lr](t){let e=this.data,r=this.checked,s=this.richValue;return Vi(e)?r?qi(e,s):Ui(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[Ne](),O()}[Ne](){if(this[Ce]){let t=this.data,e=this.$$value==null?!0:this.$$value;Vi(t)?this.checked=zi(t,e):this.checked=t==e}this[wt]&&(this[wt]=null)}};re(Wt.prototype,Bi.prototype);function qo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Ja=Symbol.for("#getSlot"),Za=Symbol.for("#container"),tu=Symbol.for("#afterVisit"),Et=Symbol.for("#__init__"),Ko=Symbol.for("#__initor__"),Yo=Symbol.for("#__inited__"),Nr=Symbol.for("#listeners"),it=Symbol.for("#slot"),eu=Symbol.for("#parent"),j=Symbol.for("##container"),Ki=Symbol.for("#domTarget"),Wo=Symbol.for("#insertInto"),ru=Symbol.for("#removeFrom"),iu=Symbol.for("#teleport"),su=Symbol.for("#self"),nu=Symbol.for("#target"),Xo=Symbol(),Oe=class extends kt{static[Et](){return this.prototype[Ko]=Xo,this}constructor(){super(...arguments),super[Et]||this[Et](),this[Ko]===Xo&&this[Yo]&&this[Yo]()}[Et](t=null){super[Et]&&super[Et](...arguments),this.to=t?t.to:void 0}build(){return this[Nr]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[Ja](t,e){return this[it]||(this[it]=Se(0,this[eu])),this[it]}get[Za](){if(!this[j]){let t=this.className;this[j]=this.doc.createElement("div"),this[j].className=t,this[j].style.cssText="display:contents !important;"}return this[j]}get domTarget(){return this[Ki]||(this[Ki]=this.to instanceof d?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){return this[j]?this[j].style:super.style}get classList(){return this[j]?this[j].classList:super.classList}get className(){return this[j]?this[j].className:super.className}set className(t){this[j]?this[j].className=t:super.className=t}[tu](){if(this.mountedΦ&&this[it]&&!this[it].parentNode)return this[it][Wo](this.target)}mount(){for(let e=0,r=qo(this[Nr]),s=r.length;e<s;e++){let[n,o,l]=r[e];this.eventTarget.addEventListener(n,o,l)}let t=this.domTarget;return this[it]&&this[it][Wo](t),this}unmount(){for(let t=0,e=qo(this[Nr]),r=e.length;t<r;t++){let[s,n,o]=e[t];this.eventTarget.removeEventListener(s,n,o)}return this[it]&&this[it][ru](this.domTarget),this[Ki]=null,this}addEventListener(t,e,r={}){if(e[iu]=this,e[su]=this,this[Nr].push([t,e,r]),this.mountedΦ&&this.eventTarget?.addEventListener)return this.eventTarget.addEventListener(t,e,r)}};Oe[Et]();var Yi=class extends Oe{get domTarget(){return this.doc.body}get eventTarget(){return this.win}addEventListener(t,e,r={}){return e[nu]=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",Oe),globalThis.customElements.define("i-global",Yi));function ou(){return!0}function Tt(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function lu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var pt=Symbol.for("#__init__"),Cr=Symbol.for("#__initor__"),Or=Symbol.for("#__inited__"),Qo=Symbol.for("#imba"),Wi=Symbol.for("#insertInto"),Xi=Symbol.for("#removeFrom"),hu=Symbol.for("#all"),Me=Symbol.for("#phase"),dt=Symbol.for("#nodes"),au=Symbol.for("#sizes"),Jo=Symbol.for("#mode"),Zo=Symbol.for("#enabled"),uu=Symbol.for("#easer"),tl=Symbol.for("#anims"),Qi=Symbol.for("#_easer_"),el=Symbol(),rl=Symbol(),Mr=class extends Vt{static[pt](){return this.prototype[Cr]=el,this}constructor(){super(...arguments),super[pt]||this[pt](),this[Cr]===el&&this[Or]&&this[Or]()}[pt](t=null){var e;super[pt]&&super[pt](...arguments),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=Tt(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=Tt(n),h=l.length;o<h;o++){let a=l[o];a.closest("._ease_")==t&&r.push(a)}return r[hu]=n,r}nodesWithSize(t,e="in"){let r=this.getSelectors("_off_sized","_"+e+"_sized");return r?t.filter(function(s){return s.matches(r)}):[]}};Mr[pt]();var Pr=new Mr,cu=globalThis.imba||(globalThis.imba={});cu.transitions=Pr;var Pe=class extends Vt{static[pt](){return this.prototype[Cr]=rl,this}constructor(t){super(),this.dom=t,this[Me]=null,this[dt]=[],this[au]=new Map,this[Cr]===rl&&this[Or]&&this[Or]()}log(...t){}get flags(){return this.dom.flags}flag(t){for(let e=0,r=Tt(this[dt]),s=r.length;e<s;e++)r[e].flags.add(t);return this}unflag(t){for(let e=0,r=Tt(this[dt]),s=r.length;e<s;e++)r[e].flags.remove(t);return this}commit(){return this.dom.offsetWidth}enable(t){return t&&(this[Jo]=t),this[Zo]!=!0&&(this[Zo]=!0,!0)?(this.dom[Wi]=this[Wi].bind(this),this.dom[Xi]=this[Xi].bind(this),this.flags.add("_ease_")):this}disable(){return this.flags.remove("_ease_"),!0}set phase(t){let e=this[Me];this[Me]!=t&&(this[Me]=t,!0)&&(e&&this.unflag("@"+e),t&&this.flag("@"+t),t||(this.unflag("@out"),this.unflag("@in"),this.unflag("@off"),this[dt]=null),t=="enter"&&e=="leave"&&this.dom?.transitionΞoutΞcancel?.(this),t=="leave"&&e=="enter"&&this.dom?.transitionΞinΞcancel?.(this),t=="enter"&&this.dom?.transitionΞin?.(this),t=="leave"&&this.dom?.transitionΞout?.(this),e=="leave"&&!t&&this.dom?.transitionΞoutΞend?.(this),e=="enter"&&!t&&this.dom?.transitionΞinΞend?.(this))}get phase(){return this[Me]}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:Zt().getAnimations()};return this.commit(),t(),this.commit(),r.after=Zt().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.own.length?r.finished=new Promise(function(s){let n=new Set(r.own),o=function(){if(n.delete(this),n.size==0)return s()};for(let l=0,h=Tt(r.own),a=h.length;l<a;l++){let c=h[l];c[uu]=e,c.addEventListener("finish",o,{once:!0}),c.addEventListener("cancel",o,{once:!0})}}):r.finished=Promise.resolve(!0),r}getAnimatedNodes(){return Pr.nodesForBase(this.dom)}getNodeSizes(t="in",e=this[dt]){let r=Pr.nodesWithSize(e,t),s=new Map;for(let n=0,o=Tt(r),l=o.length;n<l;n++){let h=o[n],a=(this&&this[Qo]||globalThis[Qo]).window.getComputedStyle(h);s.set(h,{width:a.width,height:a.height})}return s}applyNodeSizes(t){for(let[e,r]of Tt(t))e.style.width=r.width,e.style.height=r.height;return t}clearNodeSizes(t){if(!!t){for(let[e,r]of Tt(t))e.style.removeProperty("width"),e.style.removeProperty("height");return t}}[Wi](t,e){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=Zt().contains(t);return e?t.insertBefore(r.dom,e):t.appendChild(r.dom),this[dt]=r.getAnimatedNodes(),r.flag("_instant_"),r.unflag("@out"),r.commit(),s=this[dt].sized=r.getNodeSizes("in"),r.dom?.transitionΞinΞinit?.(r),r.flag("@off"),r.flag("@in"),r.flag("@enter"),r.commit(),r.unflag("_instant_"),(this[tl]=r.track(function(){return r.phase="enter",r.applyNodeSizes(s),r.unflag("@off"),r.unflag("@in")})).finished.then(n,function(h){return r.clearNodeSizes(s),r.log("cancelled insert into",h)}),r.dom}[Xi](t){var e=this;if(this.leavingΦ)return;let r,s=function(){if(e.phase=="leave")return e.dom.emit("easeoutend",{}),t.removeChild(e.dom),e.phase=null};if(e.enteringΦ&&this[Jo]!="forward"){let o=e.track(function(){return e.flag("@off"),e.flag("@in"),e.unflag("@out"),e.phase="leave",e.clearNodeSizes(e[dt].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[dt]=e.getAnimatedNodes(),r=e.getNodeSizes("out"),e.applyNodeSizes(r),e.flag("@leave");let n=this[tl]=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})}};Pe[pt]();var Ji=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[Qi]||(this[Qi]=new Pe(this))}set ease(t){if(t==!1){this[Qi]?.disable?.();return}this.ease.enable(t)}};lu(d.prototype,Ji.prototype);function fu(){return!0}function du(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function ts(){return!0}var Zi=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}};du(ve.prototype,Zi.prototype);function pu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function ke(){return!0}var es=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}};pu(Qt.prototype,es.prototype);function ns(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function il(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var mu=Symbol.for("#extendType"),gu=Symbol.for("#modifierState"),kr=Symbol.for("#sharedModifierState"),sl=Symbol.for("#onceHandlerEnd");var nl=Symbol.for("#extendDescriptors"),G=Symbol.for("#context"),ol=Symbol.for("#self"),yu=Symbol.for("#target"),ll=Symbol.for("#stopPropagation"),hl=Symbol.for("#defaultPrevented"),bu=Symbol.for("#teleport");ts();ke();var rs=class{[mu](t){var e,r,s;let n=t[nl]||(t[nl]=(r=Object.getOwnPropertyDescriptors(t.prototype),s=r.constructor,delete r.constructor,r));return Object.defineProperties(this,n)}};ns(k.prototype,rs.prototype);var is=class{get[gu](){var t,e;return(t=this[G])[e=this[G].step]||(t[e]={})}get[kr](){var t,e;return(t=this[G].handler)[e=this[G].step]||(t[e]={})}[sl](t){return F(this[G],"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,Dt(t))})}αself(){return this.target==this[G].element}αcooldown(t=250){let e=this[kr];return e.active?!1:(e.active=!0,e.target=this[G].element,e.target.flags.incr("cooldown"),this[sl](function(){return setTimeout(function(){return e.target.flags.decr("cooldown"),e.active=!1},Dt(t))}),!0)}αthrottle(t=250){let e=this[kr];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[G].element),e.el.flags.incr("throttled"),F(this[G],"end",function(){let r=Dt(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[kr],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)},Dt(t))})}αflag(t,e){let{element:r,step:s,state:n,id:o,current:l}=this[G],h=e instanceof d?e:e?r.closest(e):r;if(!h)return!0;this[G].commit=!0,n[s]=o,h.flags.incr(t);let a=Date.now();return F(l,"end",function(){let c=Date.now()-a,u=Math.max(250-c,0);return setTimeout(function(){return h.flags.decr(t)},u)}),!0}αbusy(t){return this.αflag("busy",t)}αoutside(){let{handler:t}=this[G];if(t&&t[ol])return!t[ol].parentNode.contains(this.target)}};ns(P.prototype,is.prototype);var _u={};function vu(){return!0}var Er=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 V(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return F(this,t,...e)}un(t,...e){return gt(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[yu]||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=P[this.type+"$handle"]||P[t.type+"$handle"]||t.handle$mod||this.guard;if(!(l&&l.apply(o,r.options||[])==!1)){this.currentEvents||(this.currentEvents=new Set),this.currentEvents.add(t);for(let h=0,a=Object.keys(r),c=a.length,u,p;h<c;h++){if(u=a[h],p=r[u],o.step++,u[0]=="_")continue;u.indexOf("~")>0&&(u=u.split("~")[0]);let b=null,f=[t,o],m,_=null,S,A=!1,Jr=typeof u=="string";if(u[0]=="$"&&u[1]=="_"&&p[0]instanceof Function)u=p[0],u.passive||(o.commit=!0),f=[t,o].concat(p.slice(1)),_=e;else if(p instanceof Array){f=p.slice(),b=f;for(let N=0,W=il(f),qe=W.length;N<qe;N++){let he=W[N];if(typeof he=="string"&&he[0]=="~"&&he[1]=="$"){let ln=he.slice(2).split("."),Ke=o[ln.shift()]||t;for(let Zr=0,hn=il(ln),mh=hn.length;Zr<mh;Zr++){let gh=hn[Zr];Ke=Ke?Ke[gh]:void 0}f[N]=Ke}}}if(typeof u=="string"&&(S=u.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/))&&(b||(b=f=[]),f.unshift(S[2]),u=S[1]),u=="trap")t[ll]=!0,t.stopImmediatePropagation(),t[hl]=!0,t.preventDefault();else if(u=="stop")t[ll]=!0,t.stopImmediatePropagation();else if(u=="prevent")t[hl]=!0,t.preventDefault();else if(u=="commit")o.commit=!0;else if(u=="once")e.removeEventListener(t.type,this);else{if(u=="options"||u=="silence"||u=="silent")continue;if(u=="emit"){let N=f[0],W=f[1],qe=new k(N,{bubbles:!0,detail:W});qe.originalEvent=t;let ph=(this[bu]||e).dispatchEvent(qe)}else if(typeof u=="string"){u[0]=="!"&&(A=!0,u=u.slice(1));let N="α"+u,W=t[N];W||(W=this.type&&P[this.type+"$"+u+"$mod"]),W||(W=t[u+"$mod"]||P[t.type+"$"+u]||P[u+"$mod"]),W instanceof Function?(u=W,_=o,f=b||[],t[N]&&(_=t,t[G]=o)):u[0]=="_"?(u=u.slice(1),_=this.closure):_=this.getHandlerForMethod(e,u)}}try{u instanceof Function?m=u.apply(_||e,f):_&&(m=_[u].apply(_,f)),m&&m.then instanceof Function&&m!=I.$promise&&(o.commit&&!n&&I.commit(),m=await m)}catch(N){s=N;break}if(A&&m===!0||!A&&m===!1)break;o.value=m}if(V(o,"end",o),o.commit&&!n&&I.commit(),this.currentEvents.delete(t),this.currentEvents.size==0&&this.emit("idle"),s!=null){if(this.type!="error"){let h=s instanceof Error?s.message:s,a=new k("error",{detail:h,bubbles:!0,cancelable:!0});a.error=s,a.originalEvent=t;let c=e.dispatchEvent(a);if(a.defaultPrevented)return}throw s}}}},ss=class{on$(t,e,r){let s="on$"+t,n;n=new Er(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}on$error(t,e,r,s){return t.options?.length&&(r.guard=function(...n){let o=this.event.error;return!!n.find(function(h){return o instanceof h})}),this.addEventListener("error",r,s),r}};ns(d.prototype,ss.prototype);var os=new class{get iosΦ(){let i=globalThis.navigator.platform||"";return!!(i.match(/iPhone|iPod|iPad/)||i=="MacIntel"&&globalThis.navigator.maxTouchPoints>2)}};function ie(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 Lt(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 Fr(i,t=1){let e=1/t;return Math.round(i*e)/e}function xu(i,t,e){return t>e?Math.max(e,Math.min(t,i)):Math.min(e,Math.max(t,i))}function ls(i,t,e,r,s=.1){let[n,o]=Lt(e),[l,h]=Lt(r),[a,c]=Lt(s);return o=="%"&&(n=(t-i)*(n/100)),h=="%"&&(l=(t-i)*(l/100)),c=="%"&&(a=(l-n)*(a/100)),function(u,p){let b=(u-i)/(t-i),f=n+(l-n)*b;return s&&(f=Fr(f,a)),p&&(f=xu(f,n,l)),f}}function Su(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}ke();function wu(){return!0}var as=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}};Su(_e.prototype,as.prototype);function Tu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var al=Symbol.for("#capture"),st=Symbol.for("#step"),Lu=Symbol.for("#cancel"),us=Symbol.for("#reframe");var ul=Symbol.for("#mods"),cs=Symbol.for("#dx"),fs=Symbol.for("#dy"),Nt=Symbol.for("#context"),Ir=Symbol.for("#locked"),pl=Symbol.for("#teardown"),cl=Symbol.for("#x"),fl=Symbol.for("#y"),Nu=Symbol.for("#pinTarget");function Cu(){return!0}var dl=null,ds=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[ul]={}}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[cs]==null?this.event.x-this.start.x:this[cs]}get dy(){return this[fs]==null?this.event.y-this.start.y:this[fs]}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 V(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return F(this,t,...e)}un(t,...e){return gt(this,t,...e)}αflag(t,e){let{element:r}=this[Nt],s=Date.now(),n=e instanceof d?e:e?r.closest(e):r;return this[st].setup!=!0&&(this[st].setup=!0,!0)&&(n.flags.incr(t),F(this,"end",function(){return n.flags.decr(t)})),!0}αlock(){return this[al](),!0}[al](){if(this[Ir]!=!0&&(this[Ir]=!0,!0))return this[Nt].element.setPointerCapture(this.pointerId)}get[st](){var t,e;return(t=this[ul])[e=this[Nt].step]||(t[e]={})}[Lu](){return this[pl]()}αmoved(t,e){let r=this[st],{element:s,state:n,event:o}=this[Nt];if(!r.setup){let u=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,u=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[p,b]=Lt(u);r.threshold=p,r.sy=p,r.x0=this.x,r.y0=this.y,r.dir||(r.dir="dist"),r.x=r.left=r.right=r.y=r.up=r.down=r.dist=0,b&&b!="px"&&console.warn("only px threshold allowed in @touch.moved")}if(r.active)return!0;if(r.cancelled)return!1;let l=r.threshold,h=this.x-r.x0,a=this.y-r.y0;r.x=Math.max(r.x,Math.abs(h)),r.y=Math.max(r.y,Math.abs(a)),r.left=Math.max(r.left,-h),r.right=Math.max(r.right,h),r.up=Math.max(r.up,-a),r.down=Math.max(r.down,a),r.dist=Math.max(r.dist,Math.sqrt(h*h+a*a));let c=r[r.dir];if(c>l&&c>=r.x&&c>=r.y){r.active=!0;let u=n.pinTarget;return s.flags.incr("@move"),u&&u.flags.incr("@move"),this.preventDefault(),F(this,"end",function(){return u&&u.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[st],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)){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),F(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[st];return s.setup!=!0&&(s.setup=!0,!0)?(s.x=t[e]||0,s.y=t[r]||0,s.tx=this.x,s.ty=this.y):(e&&(t[e]=s.x+(this.x-s.tx)),r&&(t[r]=s.y+(this.y-s.ty))),this[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[st];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[Nt].element,r.x=r.el[cl]||0,r.y=r.el[fl]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[cl]=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=Fr(this.x,t),this.y=Fr(this.y,e),!0}[us](...t){let e=this[st];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,n=t[0],o=0,l="100%",h=0,a=typeof n;a=="number"||a=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(n)||n instanceof Array?n=null:a=="string"&&(n=="this"||n==""?n=r:n=="up"?n=r.parentNode:n=="op"?n=r.offsetParent:n=r.closest(n)||r.querySelector(n)),n==null&&(s++,t.unshift(n=r)),s==2?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=ls(c.left,c.right,o[0],l[0],h[0]),e.y=ls(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[cs]=r-this.x0,this[fs]=s-this.y0}return!0}αfit(...t){return this[st].clamp=!0,this[us](...t)}αreframe(...t){return this[us](...t)}αpin(...t){let e=this[st];if(e.setup!=!0&&(e.setup=!0,!0)){let r=ie(t[0],this.target);r instanceof d||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[Nu]=r,r.flags.incr("_touch_"),F(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},ps=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),os.iosΦ&&globalThis.parent!=globalThis&&dl!=!0&&(dl=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};Tu(d.prototype,ps.prototype);P.touch$handle=function(){let i=this.event,t=this.element,e=this.state.pointerId,r=this.modifiers,s=this.handler,n=os.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 ds(i,s,t);e=o.pointerId;let l=function(f){return f.preventDefault(),!1},h=null,a=Symbol(),c=function(f){let m=o.clientX,_=o.clientY,S=f.clientX,A=f.clientY;(o[Ir]||o.defaultPrevented)&&(f.pointerId==o.pointerId||m==S&&_==A)&&(f.preventDefault(),f.stopPropagation()),c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null)},u=function(f){if(!(o.type=="touchmove"&&f.changedTouches[0].identifier!=e)&&(o.defaultPrevented||o[Ir]))return f.preventDefault()},p=function(f){let m=f.type,_=o.phase;if(f.pointerId&&o.pointerId!=f.pointerId||f[a])return;f[a]=!0;let S=m=="pointerup"||m=="pointercancel";if(f.pressure==0&&f.pointerType=="mouse"&&m=="pointermove"&&o.originalEvent.pressure>0)return h(f);m=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=f.clientX,o.y=f.clientY),o.event=f,S&&(o.phase="ended");try{s.handleEvent(o)}catch{}if(_=="init"&&!S&&(o.phase="active"),S&&h)return h(f)},b=!1;return h=function(f){if(!b&&(b=!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",p,{passive:!!r.passive}),globalThis.removeEventListener("pointerup",p),globalThis.removeEventListener("pointercancel",p),setTimeout(function(){if(c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null),n&&u)return globalThis.removeEventListener("touchend",u),globalThis.removeEventListener("touchmove",u,{passive:!1}),u=null},100),!r.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[pl]=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",p,{passive:!!r.passive}),globalThis.addEventListener("pointerup",p),globalThis.addEventListener("pointercancel",p),globalThis.addEventListener("click",c,{capture:!0}),n&&!r.passive&&(globalThis.addEventListener("touchend",u),globalThis.addEventListener("touchmove",u,{passive:!1})),r.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),p(i),!1};function yl(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Ou(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Mu=Symbol.for("#context"),Pu=Symbol.for("#extendType");function ku(){return!0}var ml=new(globalThis.WeakMap||Map),Ar={threshold:[0]},Eu={};P.intersect$handle=function(){let i=this.event.detail.observer;return this.modifiers._observer==i};var ms=class extends k{αin(){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[Mu],n=ie(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 Fu(i,t){return function(e,r){let s=r.prevRatios||(r.prevRatios=new WeakMap);for(let n=0,o=yl(e),l=o.length;n<l;n++){let h=o[n],a=s.get(h.target)||0,c=h.intersectionRatio,u={entry:h,ratio:c,from:a,delta:c-a,observer:r},p=new k(i,{bubbles:!1,detail:u});p[Pu](ms),p.entry=h,p.isIntersecting=h.isIntersecting,p.delta=u.delta,p.ratio=u.ratio,s.set(h.target,c),h.target.dispatchEvent(p)}}}function gl(i=Ar){let t=i.threshold.join("-")+i.rootMargin;!i.root&&Ar.root&&(i.root||(i.root=Ar.root));let e=i.root||Eu,r=ml.get(e);return r||ml.set(e,r={}),r[t]||(r[t]=new IntersectionObserver(Fu("intersect",t),i))}var gs=class{on$intersect(t,e,r,s){let n;if(t.options){let o=[],l={threshold:o};for(let h=0,a=yl(t.options),c=a.length;h<c;h++){let u=a[h];u instanceof d||u instanceof J?l.root=u:typeof u=="number"?o.push(u):typeof u=="string"?l.rootMargin=u:typeof u=="object"&&Object.assign(l,u)}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}};Ou(d.prototype,gs.prototype);function Iu(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Au(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var ys=Symbol.for("#width"),bs=Symbol.for("#height"),Ru=Symbol.for("#extendType");function Vu(){return!0}var Rr=null,_s=class extends k{αcss(t="1elw",e="1elh",r=""){let s=this.target;if(s.offsetParent){let n=Lt(t),o=Lt(e),l=ie(r,s),h=n?"--u_"+n[1]:"--"+t,a=o?"--u_"+o[1]:"--"+e,c=n?this.width/n[0]:this.width,u=o?this.height/o[0]:this.height;l.style.setProperty(h,c),l.style.setProperty(a,u)}return!0}get width(){return this[ys]==null?this[ys]=this.entry.target.offsetWidth:this[ys]}get height(){return this[bs]==null?this[bs]=this.entry.target.offsetHeight:this[bs]}};function Du(){return globalThis.ResizeObserver||Rr||(console.warn(":resize not supported in this browser"),Rr={observe:function(){return!0}}),Rr||(Rr=new ResizeObserver(function(i){for(let t=0,e=Iu(i),r=e.length;t<r;t++){let s=e[t],n=new k("resize",{bubbles:!1,detail:s});n.entry=s,n.rect=s.contentRect,n[Ru](_s),s.target.dispatchEvent(n);let o=new k("resized",{bubbles:!0,detail:s});s.target.dispatchEvent(o)}}))}var vs=class{on$resize(t,e,r,s){return Du().observe(this),this.addEventListener("resize",r,s),r}};Au(d.prototype,vs.prototype);function Hu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function ju(){return!0}var xs,bl=Symbol();function Gu(){if(!xs)return xs=function(i){if(i[bl])return;i[bl]=!0;let t=globalThis.document.activeElement;if(t&&t.matches("input,textarea")){let e=new k("selection",{detail:{start:t.selectionStart,end:t.selectionEnd}});return t.dispatchEvent(e)}},globalThis.document.addEventListener("selectionchange",xs)}var Ss=class{on$selection(t,e,r,s){return Gu(),this.addEventListener("selection",r,s),r}};Hu(d.prototype,Ss.prototype);var _l=Symbol.for("#string"),vl=Symbol.for("#html"),Ct={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:"⌫"}}};Ct.auto=Ct.win;var ws={};function xl(i,t="auto"){let e=""+i+":"+t;if(ws[e])return ws[e];let r=Ct[t]||Ct.win,s=i.split(" ").map(function(n){return n.split("+").sort(function(a,c){return r.order.indexOf(c)-r.order.indexOf(a)}).map(function(a){let c=r.labels[a]||a;return c=c[0].toUpperCase()+(c.slice(1)||"")})});return ws[e]=s}function Sl(i,t){var e;let r=xl(i,t),s=Ct[t]||Ct.win;return r[_l]||(r[_l]=r.map(function(n){return n.join(s.sep)}).join(" "))}function wl(i,t){var e;let r=xl(i,t),s=Ct[t]||Ct.win;return r[vl]||(r[vl]=r.map(function(n){return"<kbd>"+n.map(function(o){return"<kbd>"+o+"</kbd>"}).join("")+"</kbd>"}).join(" "))}function $u(){return!0}var Bu=new class{humanize(t,e="auto"){return Sl(t,e)}htmlify(t,e="auto"){return wl(t,e)}};var ih=Rt(Fl());var Ls=Symbol.for("#getQueryParam"),Il=Symbol.for("#setQueryParam");var Al=Symbol.for("#query");var Z=class{static parse(t,e){return t instanceof Z?t:new Z(t,e)}constructor(t,e){this.router=e,this.parse(t)}parse(t){let e;return t instanceof URL||(t=new URL(t,this.router.origin)),(e=this.router?.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 Z(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[Al]||(this[Al]=new Proxy({},{get:this[Ls].bind(this),set:this[Il].bind(this)}))}toString(){return this.href}[Ls](t,e){return this.searchParams.get(e)}[Il](t,e,r){return this[Ls](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 Hr=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]}slice(){return[]}};var Ee=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=Z.parse(e),this.original=this.location.clone()),this.referrer=r}get apply(){return this.params.apply||[]}get revert(){return this.params.revert||[]}get state(){return this.params.state}get mode(){return this.params.mode}redirect(t){return this.location?.update?.(t),this}get path(){return this.location?.path}get url(){return this.location?.toString?.()}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 Rl(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var jr=Symbol.for("#routes"),Ns=Symbol.for("#match"),Wu=Symbol.for("#symbol"),Vl=Symbol.for("#matches"),Cs=new Map,Os={},Dl={},Xu=/.*/;function Qu(i){if(!Cs.has(i)){let t=new Map;return Cs.set(i,t),t}return Cs.get(i)}function Ju(i,t){let e=Qu(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 Ms=class{};function Zu(i){if(Os[i])return Os[i];let t=Os[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=Dl[s]||(Dl[s]=new URLSearchParams(s))}return t.path=i,t}var Gr=class{constructor(t){this.router=t,this.fullPath="",this[jr]={},this[Ns]=new Ms,this[Ns].path=""}route(t){var e;return(e=this[jr])[t]||(e[t]=new Fe(this.router,t,this))}match(){return this[Ns]}resolve(t){return"/"}},Fe=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[Wu]=Symbol(),this[Vl]={},this[jr]={}}route(t){var e;return(e=this[jr])[t]||(e[t]=new Fe(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=Rl(s.join("?").split("&")),l=o.length;n<l;n++){let h=o[n];if(!h)continue;let[a,c]=h.split("=");a[0]=="!"&&(this.dynamic=!0,a=a.slice(1),c=!1),c===""&&(c=!1),c&&c[0]==":"&&(this.dynamic=!0),this.query[a]=c||c!==!1}}if(t=t.replace(/\:(\w+|\*)(\.)?/g,function(s,n,o){e.dynamic=!0,n!="*"&&e.groups.push(n);let l=e.router.matchers[n]||(o?"([^/#.?]+)":"([^/#?]+)");return o?""+l+".":l}),t==""&&e.query)return;if(t=="*")return e.regex=Xu,e;t="^"+t;let r=t[t.length-1];(r=="$"||r=="/")&&(t=t.slice(0,-1)+"(?=/?[#?]|/?$)"),r!="/"&&r!="$"&&t!="^/"&&(t=t+"(?=[/#?]|$)"),e.regex=new RegExp(t)}match(t=this.router.path){var e,r;let s=this.parent.match(t);if(!s)return null;let n=Zu(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 h=l+e[0],a=[this.$path],c={};if(this.groups.length)for(let b=0,f=Rl(e),m=f.length,_;b<m;b++){let S=f[b];(_=this.groups[b-1])&&(c[_]=S,a.push(S))}if(this.query)for(let b=this.query,f=0,m=Object.keys(b),_=m.length,S,A;f<_;f++){S=m[f],A=b[S];let Jr=S,N=n.query?.get?.(S);if(A===!1){if(N)return null;a.push("1");continue}if(A[0]==":"&&(Jr=A.slice(1),A=!0),A==!0&&N||A==N)c[Jr]=N,a.push(N);else return null}let u=a.join("*");c=(r=this[Vl])[u]||(r[u]=c);let p=Ju(s,c);return p.path=h,p}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 Hl=Symbol.for("#__initor__"),jl=Symbol.for("#__inited__"),$l=Symbol.for("#__init__"),$r=Symbol.for("#idler"),Ie=Symbol.for("#resolve"),Gl=Symbol(),Ae=class extends Set{static[$l](){return this.prototype[Hl]=Gl,this}constructor(){super(),this[$r]=Promise.resolve(this),this[Hl]===Gl&&this[jl]&&this[jl]()}emit(t,...e){return V(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return F(this,t,...e)}un(t,...e){return gt(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[$r]=this[Ie]=null,e.emit("busy",e))}return t}delete(t){return super.delete(t)?(this.size==0&&(this[Ie]&&(this[Ie](this),this[Ie]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[$r]||(this[$r]=new Promise(function(e){return t[Ie]=e}))}};Ae[$l]();function Vs(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Bl=Symbol.for("#__initor__"),zl=Symbol.for("#__inited__"),rh=Symbol.for("#__init__"),Es=Symbol.for("#enter"),Fs=Symbol.for("#resolved"),zr=Symbol.for("#leave"),Ul=Symbol.for("#afterVisitRouted"),ql=Symbol.for("#afterVisitRouteTo"),Kl=Symbol.for("#router"),Ps=Symbol.for("#doc"),mt=Symbol.for("#version"),tc=Symbol.for("#routes"),Yl=Symbol.for("#origin"),ks=Symbol.for("#request"),Wl=Symbol.for("#hash"),K=Symbol.for("#routeTo"),Re=Symbol.for("#path"),nt=Symbol.for("#match"),Ve=Symbol.for("#options"),ec=Symbol.for("#cache"),Xl=Symbol.for("#unmatched"),Ot=Symbol.for("#active"),rc=Symbol.for("#resolvedPath"),ic=Symbol.for("#dataKey"),sc=Symbol.for("#activeKey"),De=Symbol.for("#urlKey"),ne=Symbol.for("#dataMap"),Br=Symbol.for("#href"),D=Symbol.for("#route"),Ql=Symbol.for("#context"),Jl=Symbol.for("#afterVisit"),Zl=Symbol.for("#routeHandler"),nc=Symbol.for("#parentNode"),oc=Symbol.for("#visitContext"),th=Symbol.for("##visitContext"),lc=Symbol.for("#attachToParent"),hc=Symbol.for("#detachFromParent"),eh=Symbol();var Is=class{get router(){return this[Kl]||(this[Kl]=new He(this))}};Vs(J.prototype,Is.prototype);function ac(){return!0}var uc=ti(function(){return globalThis.document.router}),He=class extends ih.EventEmitter{static[rh](){return this.prototype[Bl]=eh,this}constructor(t,e={}){super(),this[Ps]=t,this[mt]=0,this[tc]={},this.aliases={},this.redirects={},this.rules={},this.matchers={},this.options=e,this.busy=[],this.queue=new Ae,this.root=new Gr(this),this.location=new Z(e.url||t.location.href,this),this.history=new Hr(this),this.mode=e.mode||"history",this.setup(),this[Bl]===eh&&this[zl]&&this[zl]()}get origin(){return this[Yl]||(this[Yl]=this[Ps].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[mt]++}option(t,e){return e==null?this.options[t]:(this.options[t]=e,this)}get realpath(){return this.location.path}get state(){return this.history.state}get states(){return this.history.currentStates}set state(t){}get ctx(){return this[ks]}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=Z.parse(t.location||this.realpath,this),s=t.mode,n=this[ks];if(!r.equals(e)||!n||t.state){let o=new Ee(this,r,e,t);this[ks]=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(o.state,null,String(this.location)):s=="replace"?this.replaceState(o.state,null,String(this.location)):s=="pop"&&(this.history.index=t.index),this.emit("change",o),this.touch(),O())}return this.refreshing=!1,this}onpopstate(t){let e=this.history.index,r=e,s={pop:!0,index:0,from:e,mode:"pop"};try{if(typeof t.state=="string"){let[n,o]=t.state.split("|");r=s.index=parseInt(o),r<e?s.revert=this.history.slice(r+1,e+1).reverse():r>e&&(s.apply=this.history.slice(e+1,r+1))}}catch{}return this.refresh(s),this}onbeforeunload(t){let e=new Ee(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[Wl]=this[Ps].location.hash),O()}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[K]&&(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[K]&&e[K].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[K]?e[K].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[Wl]}set hash(t){}match(t){return this.route(t).match(this.path)}route(t){return this.root.route(t)}go(t,e=null){if(typeof t=="object"&&e===null&&(e=t,t=this.path),typeof t=="number")return globalThis.history.go(t),this;let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!0);return this.refresh({push:!0,mode:"push",location:r,state:s,apply:[s]}),this}replace(t,e=null){typeof t=="object"&&e===null&&(e=t,t=this.path);let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!1);return this.refresh({replace:!0,mode:"replace",location:r,state:s,apply:[s]})}};He[rh]();var je=class{constructor(t,e,r,s={}){this.parent=r,this.node=t,this[Re]=e,this[nt]=null,this[Ve]=s,this[ec]={},this[Xl]={},this[Ot]=null,this[rc]=null,this[ic]=Symbol(),this[sc]=Symbol(),this[De]=Symbol()}get router(){return this.node.ownerDocument.router}get route(){return(this.parent?this.parent.route:this.router).route(this[Re])}get match(){return this[nt]}get params(){return this[nt]||this[Xl]}get state(){let t=this[ne]||(this[ne]=new Map),e=this.params,r=this[ne].get(e);return r||this[ne].set(e,r={}),r}set state(t){(this[ne]||(this[ne]=new Map)).set(this.params,t)}set path(t){this[Re]!=t&&(this[Re]=t,!0)&&this.router.touch()}get path(){return this[Re]}get isActive(){return!!this[Ot]}get activeΦ(){return!!this[Ot]}resolve(){let t=this.router[mt];if(!(this[mt]!=t&&(this[mt]=t,!0)))return;let e=this.route,r=this[Ve],s=this.router.path,n=e.match(s),o=this[Ot],l=this[nt],h=n!=l,a=n&&n[this[De]];return n&&(this[Ot]=!0,this[nt]=n,n[this[De]]=s),n&&(h||a!=s||!o)&&this[Fs](n,l,a),!o&&n&&this[Es](),!n&&(o||o===null)&&(this[Ot]=!1,this[zr]()),this[nt]}[Es](){return this.node.flags.remove("not-routed"),this.node.flags.add("routed"),this.node?.routeDidEnter?.(this)}[Fs](t,e,r=""){return this.node?.routeDidResolve?.(this,t,e,r)}[zr](){return this.node.flags.add("not-routed"),this.node.flags.remove("routed"),this.node?.routeDidLeave?.(this)}},Ur=class extends je{[Es](){return this}[Fs](){return this}[zr](){return this}resolve(){let t=this.router[mt];if(!(this[mt]!=t&&(this[mt]=t,!0)))return;let e=this[Ve],r=this.route,s=this.router.path,n=this.route.resolve(s),o=this.route.match(s);o&&(this[nt]=o,this[nt][this[De]]=s),e.sticky&&this[nt]&&(n=this[nt][this[De]]),this[Br]!=n&&(this[Br]=n,!0)&&this.node.nodeName=="A"&&this.node.setAttribute("href",n),this.node.flags.toggle("active",!!o)}go(){return this.resolve(),this[Ve]&&this[Ve].replace?this.router.replace(this[Br]):this.router.go(this[Br])}},As=class{get router(){return this.ownerDocument.router}};Vs(T.prototype,As.prototype);var Rs=class{set route(t){if(this[D]){this[D].path=t;return}let e=t[0]!="/"?this[Ql].route:null;this[D]=new je(this,t,e,this.route__),this[Jl]=this[Ul]}get route(){return this[D]}set routeΞto(t){var e=this;if(this[K]){this[K].path=t;return}let r=t[0]!="/"?this[Ql].route:null;this[D]=this[K]=new Ur(this,t,r,this.routeTo__),this[Jl]=this[ql],e.onclick=function(s){if(!s.altKey&&!s.metaKey&&!s[Zl])return s.preventDefault(),s[Zl]=e[K],e[K].go()}}[Ul](){if(this[D]){let t=this[nc],e=t&&t[oc];if(e&&e.matchedRoute&&e.matchedRoute!=this[D]){this[D][Ot]!=!1&&(this[D][Ot]=!1,!0)&&(this[D][zr](),this[D][mt]=-1);return}if(this[D].resolve(),this[D].activeΦ)e.matchedRoute=this[D];else return}if(this.visit&&this.visit(),this[th])return this[th]=null}[ql](){if(this[K]&&this[K].resolve(),this.visit)return this.visit()}routeDidEnter(t){return this[lc]()}routeDidLeave(t){return this[hc]()}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()})}};Vs(d.prototype,Rs.prototype);function tt(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Js(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Ue=Symbol.for("##reactive"),Ft=Symbol.for("##referenced"),$e=Symbol.for("##dereferenced"),qr=Symbol.for("#map"),sh=Symbol.for("#__init__"),Kr=Symbol.for("#child"),Ge=Symbol.for("#reactions"),Ds=Symbol.for("#promise"),v={TOUCHING:1<<1,STALE:1<<2,OBJECT:1<<3,RUNNING:1<<4,INVALIDATING:1<<5,POSSIBLY_STALE:1<<6,AUTORUN:1<<7},E=0,nh=!1;var cc=0,ah=1,Zs={META:new Map,VALUE:new Map,REF:new Map},$=Symbol.for("~"),uh=Symbol.for("~~"),tn=function(i,t){return t.has(i)||t.set(i,Symbol()),t.get(i)},Wr=function(i){return typeof i=="symbol"?tn(i,Zs.VALUE):Symbol.for(i)},en=function(i){return typeof i=="symbol"?tn(i,Zs.META):Symbol.for("#"+i+"__")},rn=function(i){return typeof i=="symbol"?tn(i,Zs.REF):Symbol.for("~"+i)},x=function(i,t){return E&&y.add(i[$]),t},Y=function(i,t){return i[$].invalidated(0),t},oe=function(i,t,e){let r=i[$];return r||(r=i[$]=new ze(v.OBJECT),Object.defineProperties(i,e)),t&&r.addSubscriber(t),i},sn=function(i,t){let e=i[$];return e&&e.removeSubscriber(t),i},Hs=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 nn(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 fc(){if(nh!=!0&&(nh=!0,!0))return ii.on("inited",function(i){let t=i[uh];if(t){let e=i instanceof T,r=i[$]||(i[$]={});for(let s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++){l=n[s],h=t[l];let a=r[l]=new At(i[l],i,h);e||a.call()}e&&(R(i,"mount",function(){var s;s=[];for(let n=0,o=tt(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof At&&h.activate())}return s}),R(i,"unmount",function(){var s;s=[];for(let n=0,o=tt(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof At&&h.deactivate())}return s}))}})}function dc(i,t=uh){return i.hasOwnProperty(t)||(i[t]=Object.assign({},i[t]||{})),i[t]}var Be=class{constructor(t,e=0){this.depth=e,this.parent=t,this.target=null,this.patcher=new Hs}get activeΦ(){return y==this}get rootΦ(){return this==It}get snapshot(){let t=[],e=this[Kr];for(;e&&e.target;)t.push({depth:e.depth,target:e.target,beacon:e.beacon}),e=e[Kr];return t}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 It.reactions.add(t)}push(t){return y=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 tt(e))n===1?s.addSubscriber(this.beacon):s.removeSubscriber(this.beacon)}return this.patcher.cleanup(),this.target=this.beacon=null,y=this.parent,y==It&&It.flush(),t}get child(){return this[Kr]||(this[Kr]=new Be(this,this.depth+1))}get reactions(){return this[Ge]||(this[Ge]=new Set)}flush(){if(!this[Ge])return;let t=this[Ge];this[Ge]=null;for(let e of tt(t))e.call()}},js=class extends Be{add(){return!0}},y=new js(null,0),It=y,pc=function(){return y.tracking=!1},ch=function(i,t,e,r,s){let n=i[e],o=i[s];return o||(o=i[s]=new ze(0,r,n,t)),y.add(o,i),n},fh=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)}},ze=class{constructor(t,e,r,s){return this.id=ah++,this.observer=null,this.observers=null,r&&r[Ft]&&r[Ft](this),this}changed(t,e,r){if(cc++,r&&r[$e]&&r[$e](this,e),e&&e[Ft]&&e[Ft](this,r),this.observer&&this.observer.invalidated(t+1,this,e,r),this.observers)for(let s=0,n=tt(this.observers),o=n.length;s<o;s++)n[s].invalidated(t+1,this,e,r);y==It&&y.flush()}invalidated(t,e){if(this.observer&&this.observer.invalidated(t+1,this),this.observers)for(let r=0,s=tt(this.observers),n=s.length;r<n;r++)s[r].invalidated(t+1,this);return t==0&&y==It&&y.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 y.add(this)}};function mc(i){return new ze(null,null,null,i)}var Gs=class extends Array{push(){return Y(this,super.push(...arguments))}pop(){return Y(this,super.pop(...arguments))}unshift(){return Y(this,super.unshift(...arguments))}shift(){return Y(this,super.shift(...arguments))}splice(){return Y(this,super.splice(...arguments))}at(){return x(this,super.at(...arguments))}map(){return x(this,super.map(...arguments))}flatMap(){return x(this,super.flatMap(...arguments))}flat(){return x(this,super.flat(...arguments))}filter(){return x(this,super.filter(...arguments))}find(){return x(this,super.find(...arguments))}slice(){return x(this,super.slice(...arguments))}sort(){return x(this,super.sort(...arguments))}get len(){return x(this,this.length)}set len(t){this.length=t,Y(this)}toIterable(){return E&&y.add(this[$]),this}[Symbol.iterator](){return x(this,super[Symbol.iterator](...arguments))}},oh=nn(Gs),$s=class{get len(){return this.length}set len(t){this.length=t}get[Ue](){return oe(this,null,oh)}[Ft](t){return oe(this,t,oh)}[$e](t){return sn(this,t)}};Js(Array.prototype,$s.prototype);var Bs=class extends Set{has(){return x(this,super.has(...arguments))}keys(){return x(this,super.keys(...arguments))}values(){return x(this,super.values(...arguments))}entries(){return x(this,super.entries(...arguments))}add(){return Y(this,super.add(...arguments))}clear(){return Y(this,super.clear(...arguments))}delete(){return Y(this,super.delete(...arguments))}},lh=nn(Bs),zs=class{get[Ue](){return oe(this,null,lh)}[Ft](t){return oe(this,t,lh)}[$e](t){return sn(this,t)}};Js(Set.prototype,zs.prototype);var Us=class extends Map{get(){return x(this,super.get(...arguments))}has(){return x(this,super.has(...arguments))}keys(){return x(this,super.keys(...arguments))}values(){return x(this,super.values(...arguments))}entries(){return x(this,super.entries(...arguments))}set(){return Y(this,super.set(...arguments))}clear(){return Y(this,super.clear(...arguments))}delete(){return Y(this,super.delete(...arguments))}},hh=nn(Us),qs=class{get[Ue](){return oe(this,null,hh)}[Ft](t){return oe(this,t,hh)}[$e](t){return sn(this,t)}};Js(Map.prototype,qs.prototype);var Ks=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=Wr(t),o=rn(t),l=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return E?ch(this,t,n,r,o):this[n]},set:function(a){return E||!!this[o]?fh(this,t,n,a,r,o):this[n]=a}},h=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return E?(Object.defineProperty(this,t,l),this[t]):this[n]},set:function(a){return this[n]=a,this[o]=null,Object.defineProperty(this,t,l)}}}},Ys=class{constructor(t=null){this[sh](t)}[sh](t=null){var e;this[qr]=t&&(e=t[qr])!==void 0?e:new Map}for(t){let e=this[qr].get(t);return e||this[qr].set(t,e=[]),e}get(t){let e=this.for(t);return e[$]||e[Ue],E&&x(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)}},Ws=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new Ys;let s=rn(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return E?ch(this,t,e,r,s):this[e]},set:function(l){let h=this[e];if(E||!!this[s]?fh(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)}},le=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|=v.STALE|v.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=tt(this.observers),n=s.length;r<n;r++)s[r].invalidated(t,this);return this}}value(){if(E&&y.add(this),(this.flags&v.POSSIBLY_STALE)==0)return this.target[this.vkey];E++,this.flags|=v.RUNNING,y.push(this);let t=this.func.call(this.target);y.pop(this);let e=this.target[this.vkey];return this.target[this.vkey]=t,this.flags&=~(v.STALE|v.POSSIBLY_STALE|v.RUNNING),t!==e&&this.version++,E--,t}},Xs=class{constructor(t,e){this.name=t;let r=rn(t),s=Wr(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 le(this,e,s);return Object.defineProperty(this,t,n),l.value()}}}},At=class{get beacon(){return this}constructor(t,e,r={}){this.cb=t,this.context=e,this.options=r,this.flags=0,this.id=ah++,this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.observing=[],this.timeout=null}get runningΦ(){return this.flags&v.RUNNING}invalidated(t,e){return e instanceof le?(this.flags|=v.POSSIBLY_STALE,this.checkComputedValues.add(e)):this.flags|=v.STALE,y.react(this)}activate(){return this.observing=[],this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.call(),this}deactivate(){if(this.timeout&&clearTimeout(this.timeout),this.observing)for(let t=0,e=tt(this.observing),r=e.length;t<r;t++)e[t].removeSubscriber(this);return this.observing=this.checkComputedValues=this.cachedComputedVersions=null,this}call(){var t=this;if(E&&console.warn("should not call reaction inside an autorunning context?",It.snapshot),this.flags&v.POSSIBLY_STALE&&(this.flags&v.STALE)==0){let e=!1;for(let r of tt(this.checkComputedValues)){let s=this.cachedComputedVersions.get(r);r.value();let n=r.version;if(s!=n){e=!0;break}}if(!e){this.flags&=~v.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(){E++,this.flags|=v.RUNNING;let t=y.push(this),e=this.cb.call(this.context,pc),r=y.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=tt(r),o=n.length;s<o;s++){let l=n[s];l instanceof le&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(v.RUNNING|v.STALE|v.POSSIBLY_STALE),E--,e}dispose(){return this.deactivate(),this.cb=this.context=this.options=null,this}},Qs=class extends At{resolve(t){return this.deactivate(),this.resolved=t}then(...t){var e=this;return this.resolved!==void 0?Promise.resolve(this.resolved).then(...t):(this[Ds]||(this[Ds]=new Promise(function(r){return e.resolve=function(s){return e.deactivate(),e.resolved=s,r(s)}})),this[Ds].then(...t))}run(){E++,this.flags|=v.RUNNING;let t=y.push(this),e=this.cb.call(this.context),r=y.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=tt(r),o=n.length;s<o;s++){let l=n[s];l instanceof le&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(v.RUNNING|v.STALE|v.POSSIBLY_STALE),E--,e!=!1&&e!=null&&e!=null&&this.resolve(e),e}},Yr=class{constructor(t,e){this.context=e,this.cb=t}run(t=this.context,e=[]){y.push(this);try{let r=this.cb.apply(t,e);return y.pop(this),r}catch(r){throw y.pop(this),r}}};function gc(i,t={}){let e=new At(i,globalThis,t);return e.call(),e}function yc(i,t={}){let e=new Qs(i,globalThis,t);return e.call(),e}function bc(i){return i[Ue]}function _c(i){return new Yr(i,globalThis).run()}function vc(i){return i&&i[$]&&i[$].invalidated(0),i}function xc(i){return i&&i[$]&&i[$].reportObserved(),i}function Sc(i,t,e){let r=en(t);return(i[r]=new Xs(t,e.get)).lazyDescriptor}function wc(i,t,e){let r=en(t),s=Wr(t),n=this[0]||{},o=i[r]=new Ks(t,n);return e?(Object.defineProperty(i,s,Object.assign({},e)),o.lazyDescriptor):(Object.defineProperty(i,t,o.lazyDescriptor),null)}function Tc(i,t,e){let r=en(t);return i.constructor[t],(i[r]=new Ws(t,Wr(t))).lazyDescriptor}function Lc(i,t,e){let r=dc(i),s=this[0]||{};return s.flags=v.AUTORUN,fc(),r[t]=s,e}function Nc(i,t,e){if(e.value){let r=new Yr(e.value,null);e.value=function(){return r.run(this,arguments)}}return e}function Cc(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var dh=Symbol.for("#__init__");var Xr=Symbol.for("#watchers");function Oc(i,t,e,r,s,n){return i&&i.$accessor instanceof Function?i=i.$accessor(t,e,r,s,n):n[s]=i,i&&!i.$init&&(i.$init=i.$set||function(){return!0}),i}function Mc(i,t,e=[]){return t.prototype?new t(...e):t.apply(i,e)}var Qr=class{constructor(t=null){this[dh](t)}[dh](t=null){var e;this.local=t&&(e=t.local)!==void 0?e:!1,this.session=t&&(e=t.session)!==void 0?e:!1,this.weak=t&&(e=t.weak)!==void 0?e:!1}watch(t){return(this[Xr]||(this[Xr]=[])).push(t)}$get(t,e){return t[e]}$set(t,e,r,s){if(this[Xr]){let n=this.$get(e,r,s);if(n!=t){e[r]=t;for(let o=0,l=Cc(this[Xr]),h=l.length;o<h;o++){let c=l[o].call(e,t,n,this)}}}else e[r]=t}$accessor(t,e,r,s,n){return n[s]=this}};function Pc(){return new Qr}var on=function(){return!0},Mt=class{constructor(t,e=""){this.store=t||{},this.cache={raw:{},rich:{}},this.ns=e,this.local=t==globalThis.sessionStorage,this.children=new Map}serialize(t,e){return JSON.stringify(t)}deserialize(t,e){return JSON.parse(t)}getItem(t){let e=String(this.ns)+":"+t;if(this.store instanceof Mt)return this.store.getItem(e);if(this.local&&this.cache.rich[e]!=null)return this.cache.rich[e];let r=this.store.getItem(e);if(r!=null)return this.cache.raw[e]==r?this.cache.rich[e]:(this.cache.raw[e]=r,this.cache.rich[e]=this.deserialize(r,e))}setItem(t,e){var r,s;let n=String(this.ns)+":"+t;if(this.store instanceof Mt)return this.store.setItem(n,e);let o=this.cache.rich[n],l=typeof e;if(this.local&&(this.cache.rich[n]=e),o!==e||l=="object"){let h=this.store.getItem(n);if(e==null)return this.store.removeItem(n),r=this.cache.rich[n],delete this.cache.rich[n],s=this.cache.raw[n],delete this.cache.raw[n],O();{let a=this.serialize(e,n);if(this.cache.rich[n]=e,this.cache.raw[n]=a,h!=a)return this.store.setItem(n,a),O()}}}get(t,e,r){return this.getItem(e)}set(t,e,r,s){return this.setItem(e,r),!0}apply(t,e,[r]){let s=this.children.get(r);return s||this.children.set(r,s=new Proxy(on,new Mt(this,r))),s}deleteProperty(t,e){var r;let s=this.ns+e;return r=this.cache[s],delete this.cache[s],this.store.removeItem(s)}},kc=new Proxy(on,new Mt(globalThis.localStorage)),Ec=new Proxy(on,new Mt(globalThis.sessionStorage));0&&(module.exports={Accessor,CUSTOM_TYPES,Comment,Component,CustomEvent,Document,DocumentFragment,Easer,Element,ElementRoute,ElementRouteTo,Emitter,Event,EventHandler,Fragment,HTMLButtonElement,HTMLElement,HTMLHtmlElement,HTMLInputElement,HTMLLinkElement,HTMLOptionElement,HTMLScriptElement,HTMLSelectElement,HTMLStyleElement,HTMLTextAreaElement,ImbaElement,IntersectionEventDefaults,KeyboardEvent,LazyProxy,Location,MouseEvent,Node,PointerEvent,RenderContext,Router,SVGElement,SVGSVGElement,Scheduler,ShadowRoot,StyleDeclaration,Text,UIEvent,Window,accessor,autorun,awaits,clearInterval,clearTimeout,colors,commit,createAtom,createComment,createComponent,createDynamic,createElement,createFragment,createIndexedList,createKeyedList,createLiveFragment,createRenderContext,createSVGElement,createSlot,createTextNode,customElements,defineTag,descriptor,document,emit,env,events,getDeepPropertyDescriptor,getRenderContext,getSuperTagType,getTagType,get_document,hooks,hotkeys,hydrate,listen,locals,mount,observable,once,parseTime,proxy,render,renderContext,renderer,reportChanged,reportObserved,router,run,scheduler,serve,session,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,αprop,αref});