imba
Version:
8 lines (7 loc) • 139 kB
JavaScript
var ee=Symbol.for("#__init__"),$o=Symbol.for("#__initor__"),xu=Symbol.for("#__inited__"),go=Symbol.for("#__hooks__"),Vd=Symbol.for("#__patch__"),wu=Symbol.for("#has"),_u=Symbol.for("#meta"),jr=Symbol.for("imba"),jd=Symbol.for("#__mixin__"),Eu=Symbol.for("#matcher"),Re=Symbol.for("#L"),qd=Symbol.for("#appendChild"),Hd=Symbol.for("#afterVisit"),Ud=Symbol.for("#beforeReconcile"),Bd=Symbol.for("#afterReconcile"),Wd=Symbol.for("##up"),Yd={SUPERCALLS:1<<3,CONSTRUCTOR:1<<4},Ae={IsExtension:1<<0,IsTag:1<<1,HasDescriptors:1<<2,HasSuperCalls:1<<3,HasConstructor:1<<4,HasFields:1<<5,HasMixins:1<<6,HasInitor:1<<7,HasDecorators:1<<8,IsObjectExtension:1<<9},Ft=new Map,Tu=globalThis[jr]||(globalThis[jr]={counter:0,classes:Ft});function Rt(i,t={}){var e;return Ft.has(i)||Ft.set(i,{symbol:Symbol(i.name),parent:(e=Object.getPrototypeOf(i.prototype))==null?void 0:e.constructor,for:i,uses:null,inits:null,id:Tu.counter++,...t}),Ft.get(i)}var yo=new WeakMap;function Gd(i,t){var e;return i===t||((e=t==null?void 0:t[Eu])==null?void 0:e.call(t,i))}function Xd(i,t){var e;return typeof t=="string"?typeof i===t:(e=t==null?void 0:t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function Qd(i,t){var e,r,s,n,o,l;return(l=(o=(s=(e=t==null?void 0:t[wu])==null?void 0:e.call(t,i))!=null?s:(r=t==null?void 0:t.includes)==null?void 0:r.call(t,i))!=null?o:(n=t==null?void 0:t.has)==null?void 0:n.call(t,i))!=null?l:!1}function Jd(i,t){return t!=null&&t.indexOf?t.indexOf(i):Array.prototype.indexOf.call(i,t)}function Zd(i,t,...e){return t&&t[Re]instanceof Function?i=t[Re](i,t,...e):globalThis[Re]instanceof Function&&(i=globalThis[Re](i,t,...e)),i}function tp(i){return yo.get(i)||yo.set(i,{}).get(i)}function bo(i){var t;return((t=i==null?void 0:i.toIterable)==null?void 0:t.call(i))||i}function ep(i,t,e,r){let s,n=arguments.length,o=i.length,l=n<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;for(;o>0;)(s=i[--o])&&(l=(n<3?s(l):n>3?s(t,e,l):s(t,e))||l);return n>3&&l&&Object.defineProperty(t,e,l),l}function Nu(i,t){if(!i||!t)return!1;if(i.get)return t.get===i.get;if(i.set)return t.set===i.set;if(i.value)return i.value===t.value}function vo(i,t,e,r={}){let s=i.constructor;!e&&t&&(e=Object.getOwnPropertyDescriptors(t),delete e.constructor,e[ee]&&(console.warn(`Cannot define plain fields when extending class ${s.name}`),delete e[ee]));let n=Rt(s);if(n&&n.augments){let o=new Map;for(let l of Object.keys(e)){let h=Object.getOwnPropertyDescriptor(i,l);for(let u of n.augments){let d=o.get(u);d||o.set(u,d={});let c=Object.getOwnPropertyDescriptor(u.prototype,l);c&&!Nu(h,c)?console.warn("wont extend",l,c,h):d[l]=e[l]}}for(let[l,h]of o)Object.keys(h).length&&vo(l.prototype,null,h)}return Object.defineProperties(i,e),i}function qr(i,t){let e=Rt(i),r=Rt(t);if(r.parent&&!(i.prototype instanceof r.parent))throw new Error(`Mixin ${t.name} has superclass not present in target class`);if(!r.augments){r.augments=new Set;let n=r.ref=Symbol(t.name),o=Object[Symbol.hasInstance];t.prototype[n]=!0,Object.defineProperty(t,Symbol.hasInstance,{value:function(l){return this===t?l&&!!l[n]:o.call(this,l)}})}if(i.prototype[r.ref])return i;if(r.uses)for(let n of r.uses)qr(i,n);r.augments.add(i),e.uses||(e.uses=[]),e.uses.push(t);let s=Object.getOwnPropertyDescriptors(t.prototype);return delete s.constructor,s[ee]&&(e.inits||(e.inits=[]),e.inits.push(t.prototype[ee]),delete s[ee]),Object.defineProperties(i.prototype,s),(t==null?void 0:t.mixed)instanceof Function&&t.mixed(i),i}function rp(i,t,...e){let r=t?class extends t{}:class{},s=Rt(r,{symbol:i});for(let n of e)qr(r,n);return r.prototype[i]=function(n,o,l){if(s.inits)for(let h of s.inits)h.call(this,n,!1,l)},r}var Y={cache:{},self:null,target:null,proxy:new Proxy({},{apply:(i,t,...e)=>Y.target[t].apply(Y.self,e),get:(i,t)=>Reflect.get(Y.target,t,Y.self),set:(i,t,e,r)=>Reflect.set(Y.target,t,e,Y.self)})};function ip(i,t){return Y.self=i,Y.target=Y.cache[t],Y.proxy}function a(i,t,e,r,s=null){var u;let n=Object.getPrototypeOf(i.prototype),o=r&Ae.HasMixins,l;if(o&&(Ft.set(i,Ft.get(n.constructor)),n=Object.getPrototypeOf(n)),s){let d=r&Ae.IsObjectExtension?s:s.prototype,c=Rt(i);if(c.uses){s===d&&console.warn("Cannot extend object with mixins");for(let b of c.uses)qr(s,b)}return r&Ae.HasSuperCalls&&(Y.cache[t]=Object.create(Object.getPrototypeOf(d),Object.getOwnPropertyDescriptors(d))),vo(d,i.prototype),s}let h=n==null?void 0:n.constructor;if(l=Rt(i,{symbol:t}),Object.defineProperty(i,_u,{value:l,enumerable:!1,configurable:!0}),e&&i.name!==e&&Object.defineProperty(i,"name",{value:e,configurable:!0}),l.flags=r,r&Ae.HasConstructor&&(i.prototype[$o]=t),l.uses)for(let d of l.uses)(u=d.mixes)==null||u.call(d,i);return(h==null?void 0:h.inherited)instanceof Function&&h.inherited(i),i}function sp(i,t){var e;i[$o]===t&&((e=i[xu])==null||e.call(i),i[go]&&i[go].inited(i))}var re=Symbol.for("#__listeners__"),Cu=/-./g,up=new Set,Ou=Symbol(),Ur=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}},Hr=Ur;(()=>{a(Ur,Ou,"LazyProxy",16)})();function xo(i,t={}){return new Proxy(t,new Hr(i))}function ie(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 ap(i){return i.indexOf("-")>=0?i.replace(Cu,function(t){return t.charAt(1).toUpperCase()}):i}function De(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:De(Reflect.getPrototypeOf(i),t,e)}var So=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 j(i,t,e,r){let s,n,o;return s=i[re]||(i[re]={}),n=s[t]||(s[t]={}),o=n.tail||(n.tail=n.next={}),o.listener=e,o.path=r,n.tail=o.next={},o}function M(i,t,e){let r=j(i,t,e);return r.times=1,r}function wt(i,t,e,r){if(!e)return;let s,n,o=i[re];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 q(i,t,e=null){let r;(r=i[re])&&(r[t]&&So(t,e,r[t]),r.all&&So(t,[t,e],r.all))}var Iu=Symbol(),Br=class{emit(t,...e){return q(this,t,e)}on(t,...e){return j(this,t,...e)}once(t,...e){return M(this,t,...e)}un(t,...e){return wt(this,t,...e)}},At=Br;(()=>{a(Br,Iu,"Emitter",0)})();function cp(i){return i}function Wr(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function Pu(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var wo=Symbol.for("#__init__"),_o=Symbol.for("#schedule"),Yr=Symbol.for("#frames"),ze=Symbol.for("#interval"),Dt=Symbol.for("#stage"),zt=Symbol.for("#scheduled"),Ke=Symbol.for("#version"),Lu=Symbol.for("#fps"),Eo=Symbol.for("#ticker"),ku=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var pp=1/60,Mu=Symbol(),Qr=class{constructor(t=null){this[wo](t)}[wo](t=null,e=!0,r=!0){var s;this.owner=t&&(s=t.owner)!==void 0?s:null,this.target=t&&(s=t.target)!==void 0?s:null,this.active=t&&(s=t.active)!==void 0?s:!1,this.value=t&&(s=t.value)!==void 0?s:void 0,this.skip=t&&(s=t.skip)!==void 0?s:0,this.last=t&&(s=t.last)!==void 0?s:0}tick(t,e){return this.last=this.owner[Yr],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[ze]=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[ze]&&(globalThis.clearInterval(this[ze]),this[ze]=null),this.active=!1,this}},Gr=Qr;(()=>{a(Qr,Mu,"Scheduled",16)})();var Fu=Symbol(),Jr=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Dt]=-1,this[Yr]=0,this[zt]=!1,this[Ke]=0,this.listeners={},this.intervals={},this.commit=function(){return t.add("commit"),t},this[Lu]=0,this.$promise=null,this.$resolve=null,this[Eo]=function(e){return t[zt]=!1,t.tick(e)}}touch(){return this[Ke]++}get version(){return this[Ke]}add(t,e=!1){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[zt]||this[_o](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Dt]==1}listen(t,e){let r=this.listeners[t],s=!r;return r||(r=this.listeners[t]=new Set),r.add(e),t=="raf"&&s&&this.add("raf"),this}unlisten(t,e){var r;let s=this.listeners[t];return s&&s.delete(e),t=="raf"&&s&&s.size==0&&(r=this.listeners.raf,delete this.listeners.raf),this}on(t,e){return this.listen(t,e)}un(t,e){return this.unlisten(t,e)}get promise(){var t=this;return this.$promise||(this.$promise=new Promise(function(e){return t.$resolve=e}))}tick(t){var e=this;let r=this.queue,s=this[Yr]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Dt]=1,this[Ke]++,r.length)for(let n=0,o=Pu(r),l=o.length;n<l;n++){let h=o[n];typeof h=="string"&&this.listeners[h]?this.listeners[h].forEach(function(u){if(Wr(u.tick,Function))return u.tick(e,h);if(Wr(u,Function))return u(e,h)}):Wr(h,Function)?h(this.dt,this):h.tick&&h.tick(this.dt,this)}return this[Dt]=this[zt]?0:-1,this.$promise&&(this.$resolve(this),this.$promise=this.$resolve=null),this.listeners.raf&&this.add("raf"),this}[_o](){return this[zt]||(this[zt]=!0,this[Dt]==-1&&(this[Dt]=0),ku(this[Eo])),this}schedule(t,e){var s,n;return e||(e=t[s=this.id]||(t[s]={value:!0})),(e[n=this.id]||(e[n]=new Gr({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}},Xr=Jr;(()=>{a(Jr,Fu,"Scheduler",16)})();var P=new Xr;function L(){return P.add("commit").promise}function Ru(i,t){return globalThis.setTimeout(function(){i(),L()},t)}function Au(i,t){return globalThis.setInterval(function(){i(),L()},t)}var Du=globalThis.clearInterval,zu=globalThis.clearTimeout,se=globalThis.imba||(globalThis.imba={});se.commit=L;se.setTimeout=Ru;se.setInterval=Au;se.clearInterval=Du;se.clearTimeout=zu;var To={on:function(i,t){return j(this,i,t)},inited:function(i){return q(this,"inited",[i])}};function yp(){return!0}function Co(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function bp(i,t,e){if(e.get){let r=e.get;e.get=function(){let s=r.call(this);return Object.defineProperty(this,t,{enumerable:!1,value:s}),s}}return e}function vp(i,t,e){var r,s;if(Co(e.value,Function)){let n=e.value;e.get=function(){if(this==i)return n;let o=n.bind(this);return Object.defineProperty(this,t,{enumerable:!1,value:o}),o},r=e.value,delete e.value,s=e.writable,delete e.writable}return e}var No=new WeakMap;function Sp(i,t,e){var v;let r=this[0]||{},s=e.value,n=Symbol(),o=new WeakMap,l=No.get(i),h=r.timeout||20*1e3,u=""+(((v=i.constructor)==null?void 0:v.name)||"")+"."+String(typeof t=="symbol"?t.description:t);if(l||No.set(i,l={}),l.key)throw new Error("@thenable "+u+" not allowed - @thenable "+l.key+" already defined");if(!Co(s,Function))throw new Error("@thenable "+u+" only supports functions");if(s.length>0)throw new Error("@thenable "+u+" methods cannot be called with arguments");let d=function(f){return console.trace("@thenable "+u+" took more than "+h+"ms - make sure method does not return self.",f)},c=function(f){let p=o.get(f);return p||o.set(f,p={}),p},b=function(f,p){let m=this,g=c(m);return(g.promise||(g.promise=new Promise(function(w,y){let S=r.timeout!==!1?setTimeout(d,r.timeout||2e4,m):null,T=function(E){return S&&clearTimeout(S),g.met=!0,g.error=E,console.trace("@thenable "+u+" threw error",E),y(E)};return m[t]().then(function(){return S&&clearTimeout(S),g.met=!0,w(m)},T)}))).then(f,p)};return Object.defineProperty(i,"then",{enumerable:!1,configurable:!0,get:function(){return c(this).met?null:b}}),e.value=function(f){var m;let p=c(this);return(m=p.wrapped)!=null||(p.wrapped=Promise.resolve(s.call(this,p))),p.wrapped},e.value.reset=function(f){let p=c(f);o.delete(f)},e.value.check=c,e}function wp(){return console.warn("imba.serve is not available on the client")}var Ku=Symbol(),ne,Tp=new(ne=class{},(()=>{a(ne,Ku,"Env",0)})(),ne);var Zr={};function Cp(i,t,e){if(t!=null){let r=Zr[i]||(Zr[i]=new WeakMap);return r.get(t)||r.set(t,(e.memoized=i)&&e).get(t)}return e}function Vu(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}var oe=Symbol.for("#idler"),le=Symbol.for("#resolve"),ju=Symbol(),ti=class extends Set{constructor(){super(),this[oe]=Promise.resolve(this)}emit(t,...e){return q(this,t,e)}on(t,...e){return j(this,t,...e)}once(t,...e){return M(this,t,...e)}un(t,...e){return wt(this,t,...e)}add(t){var e=this;if(Vu(t,Function)&&(t=t()),!this.has(t)){let r=this.size==0;super.add(t),r&&(this[oe]=this[le]=null,this.emit("busy",this)),this.emit("add",t,this);let s=function(){return e.delete(t)};t.then(s,s)}return t}delete(t){return super.delete(t)?(this.emit("delete",t,this),this.size==0&&(this[le]&&(this[le](!0),this[le]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[oe]||(this[oe]=new Promise(function(e){return t.size==0?e(!0):t[le]=e}))}get idleΦ(){return this.size==0}then(t,e){return this.idle.then(t,e)}},Ve=ti;(()=>{a(ti,ju,"Queue",24)})();function qu(i,t){if((t==null?void 0:t.debugΦ)==!1)return;let e=[],r=[];for(let s=0,n=bo(i),o=n.length;s<o;s++){let l=n[s];if(s%2!=0)continue;let h=i[s+1];l==""?(r.push("%o"),e.push(h)):(r.push("%c%s%c %o"),e.push("background-color:#4c73e8;color:white",l,"background-color:none;color:initial"),e.push(h))}return[r.join(" "),...e]}var je=Symbol.for("#L");function Mp(){return globalThis[je]||(globalThis[je]=globalThis[je]||qu),!0}var Oo=Symbol.for("#toStringDeopt"),Io=Symbol.for("#symbols"),Po=Symbol.for("#batches"),Lo=Symbol.for("#extras"),ei=Symbol.for("#stacks"),Hu=Symbol(),ri=class{constructor(t){this.dom=t,this.string=""}contains(t){return this.dom.classList.contains(t)}has(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[Io],s=this[Po],n=!0;if(!r)r=this[Io]=[t],s=this[Po]=[e||""],this.toString=this.valueOf=this[Oo];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[Lo]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Oo](){return this.string+(this[Lo]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[ei]||(this[ei]={})}},Kt=ri;(()=>{a(ri,Hu,"Flags",16)})();var ko=Symbol.for("#__init__"),ii=Symbol.for("#getRenderContext"),Uu=Symbol.for("#getDynamicContext"),F={context:null},Bu=Symbol(),ni=class{constructor(t=null){this[ko](t)}[ko](t=null,e=!0,r=!0){var s;this.stack=t&&(s=t.stack)!==void 0?s:[]}push(t){return this.stack.push(t)}pop(t){return this.stack.pop()}},si=ni;(()=>{a(ni,Bu,"Renderer",16)})();var he=new si,Wu=Symbol(),qe=class extends Map{constructor(t,e=null){super(),this._=t,this.sym=e}pop(){return F.context=null}[ii](t){let e=this.get(t);return e||this.set(t,e=new qe(this._,t)),F.context=e}[Uu](t,e){return this[ii](t)[ii](e)}run(t){return this.value=t,F.context==this&&(F.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}},ut=qe;(()=>{a(qe,Wu,"RenderContext",16)})();function He(i,t=Symbol(),e=i){return F.context=i[t]||(i[t]=new ut(e,t))}function zp(){let i=F.context,t=i||new ut(null);return globalThis.DEBUG_IMBA&&!i&&he.stack.length>0&&console.trace("detected unmemoized nodes in",he.stack.slice(0),"see https://imba.io",t),i&&(F.context=null),t}function ci(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function Yu(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var fe=Symbol.for("#parent"),Mo=Symbol.for("#closestNode"),Gu=Symbol.for("#parentNode"),Xu=Symbol.for("#context"),Zo=Symbol.for("##inited"),oi=Symbol.for("#getRenderContext"),Qu=Symbol.for("#getDynamicContext"),Fo=Symbol.for("#insertChild"),de=Symbol.for("#appendChild"),li=Symbol.for("#replaceChild"),Ro=Symbol.for("#removeChild"),nt=Symbol.for("#insertInto"),Ao=Symbol.for("#insertIntoDeopt"),ue=Symbol.for("#removeFrom"),Do=Symbol.for("#removeFromDeopt"),Vt=Symbol.for("#replaceWith"),zo=Symbol.for("#replaceWithDeopt"),hi=Symbol.for("#placeholderNode"),Ju=Symbol.for("#attachToParent"),Zu=Symbol.for("#detachFromParent"),Ko=Symbol.for("#placeChild"),ta=Symbol.for("#beforeReconcile"),ea=Symbol.for("#afterReconcile"),ra=Symbol.for("#afterVisit"),ia=Symbol.for("#visitContext"),tl=Symbol.for("#__init__"),el=Symbol.for("##parent"),Ue=Symbol.for("##up"),ui=Symbol.for("##context"),_t=Symbol.for("#domNode"),ae=Symbol.for("##placeholderNode"),Vo=Symbol.for("#forNode"),jo=Symbol.for("#domDeopt"),ce=Symbol.for("##visitContext"),rl=Symbol.for("#isRichElement"),qo=Symbol.for("#src"),jt=Symbol.for("#htmlNodeName"),sa=Symbol.for("#getSlot"),Ho=Symbol.for("#ImbaElement"),Uo=Symbol.for("#cssns"),na=Symbol.for("#cssid"),Ye=window.Event,Bp=window.UIEvent,Wp=window.FocusEvent,il=window.MouseEvent,sl=window.PointerEvent,nl=window.KeyboardEvent,D=window.CustomEvent,gi=window.Node,yi=window.Comment,ol=window.Text,N=window.Element,Yp=window.HTMLElement,Gp=window.HTMLHtmlElement,ll=window.HTMLSelectElement,hl=window.HTMLInputElement,ul=window.HTMLTextAreaElement,al=window.HTMLButtonElement,cl=window.HTMLOptionElement,Xp=window.HTMLScriptElement,Qp=window.SVGElement,Jp=window.DocumentFragment,Zp=window.ShadowRoot,fl=window.Document,tm=window.Window,em=window.customElements;var ai={};function dl(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==SVGElement?e[t]=r||null:dl(Reflect.getPrototypeOf(i),t,e)}var fi={},di={},pi={},oa={};function Ge(){return globalThis.document}function rm(){return globalThis.imba.uses_window=!0,!0}var la={get(i,t){let e=i,r;for(;e&&r==null;)(e=e[fe])&&(r=e[t]);return r},set(i,t,e){let r=i,s;for(;r&&s==null;){if(De(r,t,Element))return r[t]=e,!0;r=r[fe]}return!0}},ha=Symbol(),bi=class{get flags(){return this.documentElement.flags}emit(...t){return this.documentElement.emit(...t)}},Bo=bi;(()=>{a(bi,ha,"Document",1,Document)})();Node.prototype[tl]=function(){return this};var ua=Symbol(),vi=class{get[fe](){return this[el]||this.parentNode||this[Ue]}get[Mo](){return this}get[Gu](){var t;return(t=this[fe])==null?void 0:t[Mo]}get[Xu](){return this[ui]||(this[ui]=new Proxy(this,la))}[Zo](){return this}[oi](t){return He(this,t)}[Qu](t,e){return this[oi](t)[oi](e)}[Fo](t,e){return t[nt](this,e)}[de](t){return t[nt](this,null)}[li](t,e){let r=this[Fo](t,e);return this[Ro](e),r}[Ro](t){return t[ue](this)}[nt](t,e=null){return e?t.insertBefore(this,e):t.appendChild(this),this}[Ao](t,e){return e?t.insertBefore(this[_t]||this,e):t.appendChild(this[_t]||this),this}[ue](t){return t.removeChild(this)}[Do](t){return t.removeChild(this[_t]||this)}[Vt](t,e){return e[li](t,this)}[zo](t,e){return e[li](t,this[_t]||this)}get[hi](){let t;return this[ae]||(this[ae]=(t=globalThis.document.createComment("placeholder"),t[Vo]=this,t))}set[hi](t){let e=this[ae];this[ae]=t,t[Vo]=this,e&&e!=t&&e.parentNode&&e[Vt](t)}[Ju](){let t=this[_t],e=t&&t.parentNode;return t&&e&&t!=this&&(this[_t]=null,this[nt](e,t),t[ue](e)),this}[Zu](){this[jo]!=!0&&(this[jo]=!0,!0)&&(this[Vt]=this[zo],this[ue]=this[Do],this[nt]=this[Ao],this[Ue]||(this[Ue]=this[fe]));let t=this[hi];return this.parentNode&&t!=this&&(t[nt](this.parentNode,this),this[ue](this.parentNode)),this[_t]=t,this}[Ko](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&ci(r,Comment))return r;let n=globalThis.document.createComment("");return r?r[Vt](n,this):n[nt](this,null)}if(t===r)return t;if(s!=="object"){let n,o=t;return r?ci(r,Text)?(r.textContent=o,r):(n=globalThis.document.createTextNode(o),r[Vt](n,this),n):(this.appendChild(n=globalThis.document.createTextNode(o)),n)}else return t[nt]?r?r[Vt](t,this):t[nt](this,null):this[Ko](String(t),e,r)}},Wo=vi;(()=>{a(vi,ua,"Node",1,Node)})();var aa=Symbol(),Si=class{log(...t){return console.log(...t)}get hiddenΦ(){var e,r;let t=globalThis.getComputedStyle(this);return t.display=="none"||t.visibility=="hidden"?!0:this.offsetParent||this===globalThis.document.body?!1:(r=(e=this.parentElement)==null?void 0:e.hiddenΦ)!=null?r:!0}get detachedΦ(){return!globalThis.document.documentElement.contains(this)}get unobstructedΦ(){let t=this.getBoundingClientRect(),e=window.visualViewport,r=t.left+t.width*.5,s=t.top+t.height*.5;if(e.width>r&&r>0&&e.height>s&&s>0){let n=globalThis.document.elementFromPoint(r,s);return!!(n&&(n.contains(this)||this.contains(n)))}return!1}get focusΦ(){return globalThis.document.activeElement==this}get focinΦ(){return this.contains(globalThis.document.activeElement)}emit(t,e,r={}){var o,l,h;e!=null&&((o=r.detail)!=null||(r.detail=e)),(l=r.bubbles)!=null||(r.bubbles=!0),(h=r.cancelable)!=null||(r.cancelable=!0);let s=new CustomEvent(t,r);r.original&&(s.originalEvent=r.original);let n=this.dispatchEvent(s);return s}text$(t){return this.textContent=t,this}[ta](){return this}[ea](){return this}[ra](){this[ce]&&(this[ce]=null)}get[ia](){return this[ce]||(this[ce]={})}get flags(){return this.$flags||(this.$flags=new Kt(this),this.flag$==Element.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$,this.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=De(this,t,Element);!r||!r.set?this.setAttribute(t,e):this[t]=e}get richValue(){return this.value}set richValue(t){this.value=t}},Yo=Si;(()=>{a(Si,aa,"Element",1,Element)})();Element.prototype.setns$=Element.prototype.setAttributeNS;Element.prototype[rl]=!0;function im(i,t,e,r){let s=globalThis.document.createElement(i);return e&&(s.className=e),r!==null&&s.text$(r),t&&t[de]&&t[de](s),s}var ca=Symbol(),xi=class{set$(t,e){var n;let r=ai[n=this.nodeName]||(ai[n]={}),s=dl(this,t,r);!s||!s.set?this.setAttribute(t,e):this[t]=e}flag$(t){let e=this.flags$ns;this.setAttribute("class",e?e+(this.flags$ext=t):this.flags$ext=t)}flagSelf$(t){var e=this;return this.flag$=function(r){return e.flagSync$(e.flags$ext=r)},this.flagSelf$=function(r){return e.flagSync$(e.flags$own=r)},this.flagSelf$(t)}flagSync$(){return this.setAttribute("class",(this.flags$ns||"")+(this.flags$ext||"")+" "+(this.flags$own||"")+" "+(this.$flags||""))}},Go=xi;(()=>{a(xi,ca,"SVGElement",1,SVGElement)})();var fa=Symbol(),wi=class{set src(t){if(this[qo]!=t&&(this[qo]=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}}}},Xo=wi;(()=>{a(wi,fa,"SVGSVGElement",1,SVGSVGElement)})();function sm(i,t,e,r,s){let n=globalThis.document.createElementNS("http://www.w3.org/2000/svg",i);return e&&(n.className.baseVal=e),t&&t[de]&&t[de](n),r&&(n.textContent=r),n}function at(i){return globalThis.document.createComment(i)}function $i(i){return globalThis.document.createTextNode(i)}function nm(){return globalThis.document.createDocumentFragment()}var Be=globalThis.navigator,da=Be&&Be.vendor||"",Qo=Be&&Be.userAgent||"",pa=da.indexOf("Apple")>-1||Qo.indexOf("CriOS")>=0||Qo.indexOf("FxiOS")>=0,We=!pa,Jo=new Map,ma=Symbol(),_i=class extends HTMLElement{connectedCallback(){return We?this.parentNode.removeChild(this):this.parentNode.connectedCallback()}disconnectedCallback(){if(!We)return this.parentNode.disconnectedCallback()}},mi=_i;(()=>{a(_i,ma,"CustomHook",0)})();window.customElements.define("i-hook",mi);function ga(i,t){let e=Jo.get(t);if(!e){e={};let r=t.prototype,s=[r];for(;(r=r&&Object.getPrototypeOf(r))&&r.constructor!=i.constructor;)s.unshift(r);for(let n=0,o=Yu(s),l=o.length;n<l;n++){let h=o[n],u=Object.getOwnPropertyDescriptors(h);Object.assign(e,u)}Jo.set(t,e)}return e}function ya(i,t,e,r,s){let n;typeof i!="string"&&i&&i.nodeName&&(i=i.nodeName);let o=di[i]||i;if(fi[i]){let l=fi[i],h=l.prototype[jt];if(h&&We)n=globalThis.document.createElement(h,{is:o});else if(l.create$&&h){n=globalThis.document.createElement(h),n.setAttribute("is",o);let u=ga(n,l);Object.defineProperties(n,u),n.__slots={},n.appendChild(globalThis.document.createElement("i-hook"))}else l.create$?(n=l.create$(n),n.__slots={}):console.warn("could not create tag "+i)}else n=globalThis.document.createElement(di[i]||i);return n[el]=t,n[tl](),n[Zo](),r!==null&&n[sa]("__").text$(r),(e||n.flags$ns)&&n.flag$(e||""),n}function om(i,t,e,r){return i==null||i==null?at(""):ci(i,Node)||i[rl]?i:ya(i,t,e,r)}function $a(i,t){if(pi[i])return pi[i];if(window[t])return window[t];if(window[i])return window[i]}function lm(i,t,e){var n;let r=$a(i,t);if(r||console.warn("could not inherit from undefined tag type "+i),!(r==e||r.prototype instanceof e||r.prototype[jt])){let o=r.prototype[Ho];if(!o){let l=Symbol();o=(n=class extends r{constructor(){super(...arguments),this.__slots={},this.__F=0}},(()=>{a(n,l,"CustomBuiltInElement",16)})(),n),r.prototype[Ho]=o;let h=Object.getOwnPropertyDescriptors(e.prototype);Object.defineProperties(o.prototype,h),o.prototype[jt]=i}return o}return r}function hm(i,t,e={}){pi[i]=oa[i]=t,t.nodeName=i;let r=i,s=t.prototype;if(i.indexOf("-")==-1&&(r=""+i+"-tag",di[i]=r),e.cssns){let n=(s._ns_||s[Uo]||"")+" "+(e.cssns||"");s._ns_=n.trim()+" ",s[Uo]=e.cssns}if(e.cssid){let n=(s.flags$ns||"")+" "+e.cssid;s[na]=e.cssid,s.flags$ns=n.trim()+" "}return s[jt]&&!e.extends&&(e.extends=s[jt]),e.extends?(s[jt]=e.extends,fi[i]=t,We&&window.customElements.define(r,t,{extends:e.extends})):window.customElements.define(r,t),t}var ba=globalThis.imba||(globalThis.imba={});ba.document=globalThis.document;function pe(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function Ei(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var tr=Symbol.for("#parent"),pl=Symbol.for("#closestNode"),va=Symbol.for("#isRichElement"),Sa=Symbol.for("#afterVisit"),xa=Symbol.for("#getRenderContext"),ml=Symbol.for("#appendChild"),gl=Symbol.for("#removeChild"),yl=Symbol.for("#replaceChild"),ot=Symbol.for("#insertInto"),Xe=Symbol.for("#replaceWith"),$l=Symbol.for("#insertChild"),Qe=Symbol.for("#removeFrom"),bl=Symbol.for("#placeChild"),wa=Symbol.for("#registerFunctionalSlot"),_a=Symbol.for("#getFunctionalSlot"),vl=Symbol.for("#getSlot"),Ni=Symbol.for("##parent"),ct=Symbol.for("##up"),Ti=Symbol.for("##flags"),Ea=Symbol.for("#domFlags"),U=Symbol.for("#end"),Sl=Symbol.for("#textContent"),Je=Symbol.for("#textNode"),Ze=Symbol.for("#functionalSlots");function mm(){return!0}var Ta=Symbol(),Ci=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[tr](t){this[Ni]=t}get[tr](){return this[Ni]||this[ct]}get[pl](){return this[tr][pl]}get[va](){return!0}get flags(){return this[Ti]||(this[Ti]=new Kt(this))}flagSync$(){return this}[Sa](){return this}[xa](t){return He(this,t)}},ft=Ci;(()=>{a(Ci,Ta,"Fragment",16)})();var Na=0,Ca=Symbol(),Oi=class extends ft{constructor(t,e){super(...arguments),this[ct]=e,this.parentNode=null,this[Ea]=t,this.childNodes=[],this[U]=at("slot"+Na++),e&&e[ml](this)}get[tr](){return this[Ni]||this.parentNode||this[ct]}set textContent(t){this[Sl]=t}get textContent(){return this[Sl]}hasChildNodes(){for(let t=0,e=Ei(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(pe(s,ft)&&s.hasChildNodes())return!0;if(!pe(s,yi)){if(pe(s,gi))return!0}}return!1}text$(t){return this[Je]?this[Je].textContent=t:this[Je]=this[bl](t),this[Je]}appendChild(t){return this.parentNode&&t[ot](this.parentNode,this[U]),this.childNodes.push(t)}[ml](t){var e;return this.parentNode?t[ot](this.parentNode,this[U]):(e=t[ct])!=null||(t[ct]=this[ct]||this),this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[$l](t,e);let r=this.childNodes.indexOf(e);return r>=0&&this.childNodes.splice(r,0,t),t}[gl](t){this.parentNode&&this.parentNode[gl](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[yl](t,e){this.parentNode&&this.parentNode[yl](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[ot](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[U]&&(e=this[U][ot](t,e));for(let s=0,n=Ei(this.childNodes),o=n.length;s<o;s++)n[s][ot](t,e)}return this}[Xe](t,e){let r=t[ot](e,this[U]);return this[Qe](e),r}[$l](t,e){if(this.parentNode&&this.insertBefore(t,e||this[U]),e){let r=this.childNodes.indexOf(e);r>=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[Qe](t){for(let e=0,r=Ei(this.childNodes),s=r.length;e<s;e++)r[e][Qe](t);return this[U]&&this[U][Qe](t),this.parentNode=null,this}[bl](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&pe(r,yi))return r;let o=at("");if(r){let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,o),s&&r[Xe](o,s),o}return this.childNodes.push(o),s&&o[ot](s,this[U]),o}if(t===r)return t;if(n!=="object"){let o,l=t;if(r){if(pe(r,ol))return r.textContent=l,r;{o=$i(l);let h=this.childNodes.indexOf(r);return this.childNodes.splice(h,1,o),s&&r[Xe](o,s),o}}else return this.childNodes.push(o=$i(l)),s&&o[ot](s,this[U]),o}else if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,t),s&&r[Xe](t,s),t}else return this.childNodes.push(t),s&&t[ot](s,this[U]),t}},er=Oi;(()=>{a(Oi,Ca,"VirtualFragment",16)})();function gm(i,t){return new er(i,t)}function rr(i,t){let e=new er(i,null);return e[ct]=t,e}var Oa=Symbol(),Ii=class{[wa](t){let e=this[Ze]||(this[Ze]={});return e[t]||(e[t]=rr(0,this))}[_a](t,e){let r=this[Ze];return r&&r[t]||this[vl](t,e)}[vl](t,e){var r;return t=="__"&&!this.render||!this.__slots?this:(r=this.__slots)[t]||(r[t]=rr(0,this))}},xl=Ii;(()=>{a(Ii,Oa,"Node",1,gi)})();function Ia(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var Pa=Symbol.for("#afterVisit"),ir=Symbol.for("#insertInto"),wl=Symbol.for("#appendChild"),La=Symbol.for("#replaceWith"),Pi=Symbol.for("#removeFrom"),ka=Symbol.for("#domFlags"),Ma=Symbol.for("##parent"),dt=Symbol.for("#end"),Fa=Symbol.for("#removeChild"),Ra=Symbol.for("#insertChild"),Aa=Symbol(),ki=class extends ft{constructor(t,e){super(...arguments),this[ka]=t,this[Ma]=e,t&256||(this[dt]=at("list")),this.$=this.childNodes,this.length=0,e&&e[wl](this)}hasChildNodes(){return this.length!=0}[Pa](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[dt];if(e>t)for(;e>t;)r[Fa](s[--e]);else if(t>e)for(;t>e;)r[Ra](s[e++],n);this.length=t}[ir](t,e){this.parentNode=t,this[dt]&&this[dt][ir](t,e),e=this[dt];for(let r=0,s=Ia(this.childNodes),n=s.length;r<n;r++){let o=s[r];if(r==this.length)break;o[ir](t,e)}return this}[wl](t){}[La](t,e){let r=t[ir](e,this[dt]);return this[Pi](e),r}[Pi](t){let e=this.length;for(;e>0;)this.childNodes[--e][Pi](t);this[dt]&&t.removeChild(this[dt]),this.parentNode=null}},Li=ki;(()=>{a(ki,Aa,"IndexedTagFragment",16)})();function Sm(i,t){return new Li(i,t)}function _l(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var Mi=Symbol.for("#appendChild"),sr=Symbol.for("#insertChild"),Da=Symbol.for("#replaceWith"),nr=Symbol.for("#insertInto"),Fi=Symbol.for("#removeFrom"),za=Symbol.for("#afterVisit"),or=Symbol.for("#domFlags"),El=Symbol.for("##parent"),pt=Symbol.for("#end"),Tl=Symbol.for("#removeChild"),Ka=Symbol(),Ai=class extends ft{constructor(t,e){super(...arguments),this[or]=t,this[El]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new ut(this,Symbol()),t&256||(this[pt]=at("map")),e&&e[Mi](this)}[Mi](t){if(this.parentNode)return this.parentNode[sr](t,this[pt])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[or]&1)){this.array.push(t),this[Mi](t);return}let r=this.array[e];if(r!==t){this.dirty=!0;let s=this.array.indexOf(t),n=this.changes.get(t);s===-1?(this.array.splice(e,0,t),this.insertChild(t,e,s)):s===e+1?(r&&this.changes.set(r,-1),this.array.splice(e,1)):(s>=0&&this.array.splice(s,1),this.array.splice(e,0,t),this.moveChild(t,e,s)),n==-1&&this.changes.delete(t)}}insertChild(t,e,r){let s=this.parentNode;if(!!s)if(e>0){let n=this.array[e-1];s[sr](t,n.nextSibling)}else s[sr](t,this.childNodes[e+1]||this[pt])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[Fi](t.parentNode)}[sr](t,e){}[Da](t,e){let r=t[nr](e,this[pt]);return this[Fi](e),r}[nr](t,e){this[El]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=_l(this.array),o=n.length;s<o;s++)n[s][nr](t,e);this[pt]&&this[pt][nr](t,e)}return this}[Fi](t){for(let e=0,r=_l(this.array),s=r.length;e<s;e++){let n=r[e];t[Tl](n)}return this[pt]&&t[Tl](this[pt]),this.parentNode=null}[za](t){var e=this;if(!(this[or]&1)){this[or]|=1;return}if(this.dirty&&(this.changes.forEach(function(r,s){if(r==-1)return e.removeChild(s)}),this.changes.clear(),this.dirty=!1),this.array.length>t)for(;this.array.length>t;){let r=this.array.pop();this.removeChild(r)}}},Ri=Ai;(()=>{a(Ai,Ka,"KeyedTagFragment",16)})();function Nm(i,t){return new Ri(i,t)}function Nl(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}var hr=Symbol.for("#__init__"),Va=Symbol.for("##inited"),ja=Symbol.for("#afterVisit"),qa=Symbol.for("#beforeReconcile"),Ha=Symbol.for("#afterReconcile"),Cl=Symbol.for("#__hooks__"),Et=Symbol.for("#autorender"),lr=Symbol.for("##visitContext"),Ua=Symbol(),me,Ol=new(me=class{constructor(t=null){this[hr](t)}[hr](t=null,e=!0,r=!0){var s;this.items=t&&(s=t.items)!==void 0?s:[],this.current=t&&(s=t.current)!==void 0?s:null,this.lastQueued=t&&(s=t.lastQueued)!==void 0?s:null,this.tests=t&&(s=t.tests)!==void 0?s:0}flush(){let t=null;for(;t=this.items.shift();){if(!t.parentNode||t.hydratedΦ)continue;let e=this.current;this.current=t,t.__F|=1024,t.connectedCallback(),this.current=e}}queue(t){var e=this;let r=this.items.length,s=0,n=this.lastQueued;this.lastQueued=t;let o=Node.DOCUMENT_POSITION_PRECEDING,l=Node.DOCUMENT_POSITION_FOLLOWING;if(r){let h=this.items.indexOf(n),u=h,d=function(b,v){return e.tests++,b.compareDocumentPosition(v)};(h==-1||n.nodeName!=t.nodeName)&&(u=h=0);let c=this.items[u];for(;c&&d(c,t)&l;)c=this.items[++u];if(u!=h)c?this.items.splice(u,0,t):this.items.push(t);else{for(;c&&d(c,t)&o;)c=this.items[--u];u!=h&&(c?this.items.splice(u+1,0,t):this.items.unshift(t))}}else this.items.push(t),this.current||globalThis.queueMicrotask(this.flush.bind(this))}},(()=>{a(me,Ua,null,16)})(),me);function km(){return Ol.flush()}var Ba=Symbol(),Di=class extends HTMLElement{constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build()}setup$(){return this.__slots={},this.__F=0}[hr](){return this.__F|=3,this}[Va](){if(this[Cl])return this[Cl].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(t,e){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[Et]||(this[Et]={});e.value=t,this.mountedΦ&&P.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}get scheduler(){return P}schedule(){return P.on("commit",this),this.__F|=128,this}unschedule(){return P.un("commit",this),this.__F&=-129,this}async suspend(t=null){let e=this.flags.incr("@suspended");return this.__F|=4096,Nl(t,Function)&&(await t(),this.unsuspend()),this}unsuspend(){return this.flags.decr("@suspended")==0&&(this.__F&=-4097,this.commit()),this}[ja](){if(this.visit(),this[lr])return this[lr]=null}[qa](){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&&he.push(this),this[lr]&&(this[lr]=null),this}[Ha](){return globalThis.DEBUG_IMBA&&he.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){Ol.queue(this);return}if(t&48)return;this.__F|=16,e||this[hr](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),q(this,"mount",[this]);let s=this.mount();return s&&Nl(s.then,Function)&&s.then(P.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[Et]&&P.schedule(this,this[Et]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),q(this,"unmount",[this]),this.unmount(),this[Et])return P.unschedule(this,this[Et])}},Tt=Di;(()=>{a(Di,Ba,"Component",16)})();var Mm=Tt;function Wa(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}var Il=Symbol.for("#__init__"),Ya={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 Pl={prefix:1,suffix:1,content:1},Ki={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(Ki).join("|")+")(\\d+(?:\\.\\d+)?)$"),Xa=/^([xyz])$/,Qa=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,Ja=`*,::before,::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: currentColor;
}`,Za=Symbol(),Vi=class{constructor(t=null){this[Il](t)}[Il](t=null,e=!0,r=!0){var s;this.entries=t&&(s=t.entries)!==void 0?s:{}}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",Ja),r.node=globalThis.document.createElement("style"),r.node.setAttribute("data-id",t),r.node.textContent=r.css,globalThis.document.head.appendChild(r.node))}toString(){return Object.values(this.entries).map(function(t){return t.css}).join(`
`)}toValue(t,e,r,s=null){let n;Pl[r]&&(t=String(t));let o=typeof t;if(o=="number"){if(e||(Xa.test(r)?e="px":Qa.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return Ya[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(o=="string"){if(r&&Pl[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(Ga)){let h=Ki[n[1]][parseInt(n[2])],u="100%";if(typeof s=="number"?u=s+"%":typeof s=="string"&&(u=s),h)return"hsla("+h[0]+","+h[1]+"%,"+h[2]+"%,"+u+")"}}else if(t&&Wa(t.toStyleString,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]}},zi=Vi;(()=>{a(Vi,Za,"Styles",16)})();var tc=new zi,Dm=Object.keys(Ki);function zm(){return globalThis.imba.uses_styles=!0,!0}var ec=Symbol(),ji=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let o=tc.toValue(e,r,s,n);this.style.setProperty(t,o)}},Ll=ji;(()=>{a(ji,ec,"Element",1,N)})();function rc(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}var kl=Symbol.for("#insertInto"),Ml=Symbol.for("#removeFrom");function Wm(i,t={}){let e=F.context;F.context=t;let r=i(t);return F.context==t&&(F.context=e),r}function ic(i,t,e={}){let r=t||globalThis.document.body,s=i;if(rc(i,Function)){let n=i,o=e.tick||(e.tick=function(){let l=e.context||(e.context=new ut(r,null)),h=F.context;F.context=l;let u=i(l,e);return F.context==l&&(F.context=h),e.node!=u&&(e.node&&globalThis.imba.unmount(e.node),u?((e.node=u)[kl](r),u.tick==Tt.prototype.tick&&(u.tick=e.tick,u.scheduledΦ),M(u,"unmount",function(){if(e.node==u)return e.node=null,P.unlisten("commit",e.tick)})):(e.node=u,P.unlisten("commit",e.tick))),u});return P.listen("commit",o),o()}else s.__F|=64;return s[kl](r),s}function sc(i){return i&&i[Ml]&&i.parentNode&&i[Ml](i.parentNode),i}var Fl=globalThis.imba||(globalThis.imba={});Fl.mount=ic;Fl.unmount=sc;function Q(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function ge(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var ye=Symbol.for("##onchange"),be=Symbol.for("#afterVisit"),$e=Symbol.for("##oninput"),ur=Symbol.for("##onclick"),ve=Symbol.for("##bound"),mt=Symbol.for("##visitContext");function Jm(){return globalThis.imba.uses_dom_bind=!0,!0}var nc={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},qi=function(i){return Q(i,Array)||i&&Q(i.has,Function)},Hi=function(i,t){return i==t?!0:Q(i,Array)?i.indexOf(t)>=0:i&&Q(i.has,Function)?i.has(t):i&&Q(i.contains,Function)?i.contains(t):!1},Ui=function(i,t){if(Q(i,Array))return i.push(t);if(i&&Q(i.add,Function))return i.add(t)},Bi=function(i,t){if(Q(i,Array)){let e=i.indexOf(t);if(e>=0)return i.splice(e,1)}else if(i&&Q(i.delete,Function))return i.delete(t)};function oc(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 lc=Symbol(),Wi=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[ve]&&nc[this.nodeName]&&(this[ve]=!0,this[ye]&&this.addEventListener("change",this[ye]=this[ye].bind(this)),this[$e]&&this.addEventListener("input",this[$e]=this[$e].bind(this),{capture:!0}),this[ur]&&this.addEventListener("click",this[ur]=this[ur].bind(this),{capture:!0})),Object.defineProperty(this,t,Q(r,Array)?oc(r):r),r}},Rl=Wi;(()=>{a(Wi,lc,"Element",1,N)})();Object.defineProperty(N.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(i){return this.setRichValue(i)}});var hc=Symbol(),Yi=class{[ye](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=ge(r),l=o.length;n<l;n++){let h=o[n];s.indexOf(h)==-1&&Bi(e,h)}for(let n=0,o=ge(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 L(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=ge(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=ge(this.options),n=s.length;r<n;r++){let o=s[r],l=o.richValue,h=Hi(t,l);o.selected=h,h&&e.push(l)}this.$$value=e}else for(let e=0,r=ge(this.options),s=r.length;e<s;e++){let o=r[e].richValue;if(o==t){this.$$value=[o],this.selectedIndex=e;break}}}[be](){if(this.syncValue(),this[mt])return this[mt]=null}},Al=Yi;(()=>{a(Yi,hc,"HTMLSelectElement",1,ll)})();var uc=Symbol(),Gi=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}},Dl=Gi;(()=>{a(Gi,uc,"HTMLOptionElement",1,cl)})();var ac=Symbol(),Xi=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[$e](t){return this.data=this.value,L()}[be](){let t=this.data;if(t==null&&(t=""),this[ve]&&this.value!=t&&(this.value=t),this[mt])return this[mt]=null}},zl=Xi;(()=>{a(Xi,ac,"HTMLTextAreaElement",1,ul)})();var cc=Symbol(),Qi=class{[$e](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,L()}[ye](t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;qi(e)?s?Ui(e,r):Bi(e,r):this.data=s?r:!1}return L()}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}[be](){if(this[ve]){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=Hi(e,this.richValue)}else this.richValue=this.data}this[mt]&&(this[mt]=null)}},Kl=Qi;(()=>{a(Qi,cc,"HTMLInputElement",1,hl)})();var fc=Symbol(),Ji=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}[ur](t){let e=this.data,r=this.checked,s=this.richValue;return qi(e)?r?Bi(e,s):Ui(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[be](),L()}[be](){if(this[ve]){let t=this.data,e=this.$$value==null?!0:this.$$value;qi(t)?this.checked=Hi(t,e):this.checked=t==e}this[mt]&&(this[mt]=null)}},Vl=Ji;(()=>{a(Ji,fc,"HTMLButtonElement",1,al)})();function dc(i,t){var e;return typeof t=="string"?typeof i===t:(e=t[Symbol.hasInstance])==null?void 0:e.call(t,i)}function jl(i){let t;return i&&((t=i.toIterable)?t.call(i):i)}var pc=Symbol.for("#getSlot"),mc=Symbol.for("#container"),gc=Symbol.for("#afterVisit"),Se=Symbol.for("#__init__"),ar=Symbol.for("#listeners"),G=Symbol.for("#slot"),yc=Symbol.for("#parent"),H=Symbol.for("##container"),cr=Symbol.for("#domTarget"),ql=Symbol.for("#insertInto"),$c=Symbol.for("#removeFrom"),bc=Symbol.for("#teleport"),vc=Symbol.for("#self"),Sc=Symbol.for("#target"),xc=Symbol(),ts=class extends Tt{constructor(){super(...arguments),super[Se]||this[Se]()}[Se](t=null,e=!0,r=!0){e&&super[Se]&&super[Se](...arguments),this.to=t?t.to:void 0}build(){return this[ar]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[pc](t,e){return this[G]||(this[G]=rr(0,this[yc])),this[G]}get[mc](){if(!this[H]){let t=this.className;this[H]=this.doc.createElement("div"),this[H].className=t,this[H].style.cssText="display:contents !important;"}return this[H]}get domTarget(){return this[cr]||(this[cr]=dc(this.to,N)?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){retu