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.
8 lines
117 KiB
8 lines
117 KiB
var Kl=Object.create;var Ds=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Bl=Object.getOwnPropertyNames;var Hl=Object.getPrototypeOf,Yl=Object.prototype.hasOwnProperty;var Wl=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var Gl=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Bl(t))!Yl.call(i,s)&&s!==e&&Ds(i,s,{get:()=>t[s],enumerable:!(r=Ul(t,s))||r.enumerable});return i};var Xl=(i,t,e)=>(e=i!=null?Kl(Hl(i)):{},Gl(t||!i||!i.__esModule?Ds(e,"default",{value:i,enumerable:!0}):e,i));var nl=Wl((Hc,Qi)=>{"use strict";var Mt=typeof Reflect=="object"?Reflect:null,Xo=Mt&&typeof Mt.apply=="function"?Mt.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},nr;Mt&&typeof Mt.ownKeys=="function"?nr=Mt.ownKeys:Object.getOwnPropertySymbols?nr=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:nr=function(t){return Object.getOwnPropertyNames(t)};function ra(i){console&&console.warn&&console.warn(i)}var Jo=Number.isNaN||function(t){return t!==t};function x(){x.init.call(this)}Qi.exports=x;Qi.exports.once=oa;x.EventEmitter=x;x.prototype._events=void 0;x.prototype._eventsCount=0;x.prototype._maxListeners=void 0;var Qo=10;function or(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return Qo},set:function(i){if(typeof i!="number"||i<0||Jo(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Qo=i}});x.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};x.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Jo(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 Zo(i){return i._maxListeners===void 0?x.defaultMaxListeners:i._maxListeners}x.prototype.getMaxListeners=function(){return Zo(this)};x.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")Xo(h,this,e);else for(var u=h.length,c=sl(h,u),r=0;r<u;++r)Xo(c[r],this,e);return!0};function tl(i,t,e,r){var s,n,o;if(or(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=Zo(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,ra(l)}return i}x.prototype.addListener=function(t,e){return tl(this,t,e,!1)};x.prototype.on=x.prototype.addListener;x.prototype.prependListener=function(t,e){return tl(this,t,e,!0)};function ia(){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 el(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},s=ia.bind(r);return s.listener=e,r.wrapFn=s,s}x.prototype.once=function(t,e){return or(e),this.on(t,el(this,t,e)),this};x.prototype.prependOnceListener=function(t,e){return or(e),this.prependListener(t,el(this,t,e)),this};x.prototype.removeListener=function(t,e){var r,s,n,o,l;if(or(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():sa(r,n),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,l||e)}return this};x.prototype.off=x.prototype.removeListener;x.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 rl(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?na(s):sl(s,s.length)}x.prototype.listeners=function(t){return rl(this,t,!0)};x.prototype.rawListeners=function(t){return rl(this,t,!1)};x.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):il.call(i,t)};x.prototype.listenerCount=il;function il(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}x.prototype.eventNames=function(){return this._eventsCount>0?nr(this._events):[]};function sl(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function sa(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function na(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function oa(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 we=Symbol.for("#__listeners__"),Ql=/-./g,xr=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 As(i,t={}){return new Proxy(t,new xr(i))}function qt(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 Ca(i){return i.indexOf("-")>=0?i.replace(Ql,function(t){return t.charAt(1).toUpperCase()}):i}function Te(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:Te(Reflect.getPrototypeOf(i),t,e)}var Rs=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 A(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 D(i,t,e){let r=A(i,t,e);return r.times=1,r}function bt(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 $(i,t,e){let r;(r=i[we])&&(r[t]&&Rs(t,e,r[t]),r.all&&Rs(t,[t,e],r.all))}var jt=class{emit(t,...e){return $(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return D(this,t,...e)}un(t,...e){return bt(this,t,...e)}};function Jl(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var $s=Symbol.for("#__init__");var js=Symbol.for("#schedule"),wr=Symbol.for("#frames"),Ee=Symbol.for("#interval"),Tt=Symbol.for("#stage"),Et=Symbol.for("#scheduled"),Ne=Symbol.for("#version"),Zl=Symbol.for("#fps"),qs=Symbol.for("#ticker"),th=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var Pa=1/60,Tr=class{constructor(t=null){this[$s](t)}[$s](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[wr],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[Ee]=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[Ee]&&(globalThis.clearInterval(this[Ee]),this[Ee]=null),this.active=!1,this}},Er=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Tt]=-1,this[wr]=0,this[Et]=!1,this[Ne]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Zl]=0,t.$promise=null,t.$resolve=null,this[qs]=function(e){return t[Et]=!1,t.tick(e)}}touch(){return this[Ne]++}get version(){return this[Ne]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[Et]||this[js](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Tt]==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[wr]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Tt]=1,this[Ne]++,r.length)for(let n=0,o=Jl(r),l=o.length;n<l;n++){let h=o[n];typeof h=="string"&&this.listeners[h]?e.listeners[h].forEach(function(u){if(u.tick instanceof Function)return u.tick(e,h);if(u instanceof Function)return u(e,h)}):h instanceof Function?h(e.dt,e):h.tick&&h.tick(e.dt,e)}return this[Tt]=this[Et]?0:-1,e.$promise&&(e.$resolve(e),e.$promise=e.$resolve=null),e.listeners.raf&&e.add("raf"),e}[js](){return this[Et]||(this[Et]=!0,this[Tt]==-1&&(this[Tt]=0),th(this[qs])),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 Tr({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}},k=new Er;function C(){return k.add("commit").promise}function eh(i,t){return globalThis.setTimeout(function(){i(),C()},t)}function rh(i,t){return globalThis.setInterval(function(){i(),C()},t)}var ih=globalThis.clearInterval,sh=globalThis.clearTimeout,zt=globalThis.imba||(globalThis.imba={});zt.commit=C;zt.setTimeout=eh;zt.setInterval=rh;zt.clearInterval=ih;zt.clearTimeout=sh;var zs={on:function(i,t){return A(this,i,t)},inited:function(i){return $(this,"inited",[i])}};function Ia(){return!0}function Ma(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 Ra(){return console.warn("imba.serve is not available on the client")}var $a=new class{};var Vs=Symbol.for("#toStringDeopt");var Ks=Symbol.for("#symbols"),Us=Symbol.for("#batches"),Bs=Symbol.for("#extras"),Hs=Symbol.for("#stacks"),Nt=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[Ks],s=this[Us],n=!0;if(!r)r=this[Ks]=[t],s=this[Us]=[e||""],this.toString=this.valueOf=this[Vs];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[Bs]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Vs](){return this.string+(this[Bs]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[Hs]||(this[Hs]={})}};var Ce=Symbol.for("#__init__"),Ys=Symbol.for("#__initor__"),Ws=Symbol.for("#__inited__"),Nr=Symbol.for("#getRenderContext"),nh=Symbol.for("#getDynamicContext"),Gs=Symbol(),L={context:null},Cr=class{constructor(t=null){this[Ce](t)}[Ce](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()}},Vt=new Cr,Y=class extends Map{static[Ce](){return this.prototype[Ys]=Gs,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[Ys]===Gs&&this[Ws]&&this[Ws]()}pop(){return L.context=null}[Nr](t){let e=this.get(t);return e||this.set(t,e=new Y(this._,t)),L.context=e}[nh](t,e){return this[Nr](t)[Nr](e)}run(t){return this.value=t,L.context==this&&(L.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};Y[Ce]();function Xs(i,t=Symbol(),e=i){return L.context=i[t]||(i[t]=new Y(e,t))}function Va(){let i=L.context,t=i||new Y(null);return globalThis.DEBUG_IMBA&&!i&&Vt.stack.length>0&&console.warn("detected unmemoized nodes in",Vt.stack.slice(0),"see https://imba.io",t),i&&(L.context=null),t}function Ht(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function oh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Ut=Symbol.for("#parent"),Qs=Symbol.for("#closestNode"),lh=Symbol.for("#parentNode"),hh=Symbol.for("#context"),ke=Symbol.for("#__init__"),mn=Symbol.for("##inited"),Or=Symbol.for("#getRenderContext"),uh=Symbol.for("#getDynamicContext"),Js=Symbol.for("#insertChild"),Bt=Symbol.for("#appendChild"),Pr=Symbol.for("#replaceChild"),Zs=Symbol.for("#removeChild"),et=Symbol.for("#insertInto"),tn=Symbol.for("#insertIntoDeopt"),Kt=Symbol.for("#removeFrom"),en=Symbol.for("#removeFromDeopt"),Ct=Symbol.for("#replaceWith"),rn=Symbol.for("#replaceWithDeopt"),kr=Symbol.for("#placeholderNode"),ah=Symbol.for("#attachToParent"),fh=Symbol.for("#detachFromParent"),ch=Symbol.for("#placeChild"),dh=Symbol.for("#beforeReconcile"),ph=Symbol.for("#afterReconcile"),mh=Symbol.for("#afterVisit"),gh=Symbol.for("#visitContext"),sn=Symbol.for("#__initor__"),nn=Symbol.for("#__inited__"),gn=Symbol.for("##parent"),Lr=Symbol.for("##up"),on=Symbol.for("##context"),_t=Symbol.for("#domNode"),Oe=Symbol.for("##placeholderNode"),ln=Symbol.for("#domDeopt"),Pe=Symbol.for("##visitContext"),yn=Symbol.for("#isRichElement"),hn=Symbol.for("#src"),Ot=Symbol.for("#htmlNodeName"),yh=Symbol.for("#getSlot"),un=Symbol.for("#ImbaElement"),an=Symbol.for("#cssns"),bh=Symbol.for("#cssid"),fn=Symbol(),{Event:W,UIEvent:Wa,MouseEvent:bn,PointerEvent:_n,KeyboardEvent:vn,CustomEvent:P,Node:j,Comment:Fe,Text:zr,Element:_,HTMLElement:Vr,HTMLHtmlElement:Ga,HTMLSelectElement:Sn,HTMLInputElement:xn,HTMLTextAreaElement:wn,HTMLButtonElement:Tn,HTMLOptionElement:En,HTMLScriptElement:Xa,SVGElement:Nn,DocumentFragment:Qa,ShadowRoot:Ja,Document:Yt,Window:Za,customElements:tf}=globalThis.window,cn={};function Cn(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==Nn?e[t]=r||null:Cn(Reflect.getPrototypeOf(i),t,e)}var Ir={},Fr={},Mr={},_h={};function Me(){return globalThis.document}function ef(){return!0}var vh={get(i,t){let e=i,r;for(;e&&r==null;)(e=e[Ut])&&(r=e[t]);return r},set(i,t,e){let r=i,s;for(;r&&s==null;){if(Te(r,t,_))return r[t]=e,!0;r=r[Ut]}return!0}},Dr=class{get flags(){return this.documentElement.flags}};Ht(Yt.prototype,Dr.prototype);var Rr=class{get[Ut](){return this[gn]||this.parentNode||this[Lr]}get[Qs](){return this}get[lh](){return this[Ut][Qs]}get[hh](){return this[on]||(this[on]=new Proxy(this,vh))}[ke](){return this}[mn](){return this}[Or](t){return Xs(this,t)}[uh](t,e){return this[Or](t)[Or](e)}[Js](t,e){return t[et](this,e)}[Bt](t){return t[et](this,null)}[Pr](t,e){let r=this[Js](t,e);return this[Zs](e),r}[Zs](t){return t[Kt](this)}[et](t,e=null){return e?t.insertBefore(this,e):t.appendChild(this),this}[tn](t,e){return e?t.insertBefore(this[_t]||this,e):t.appendChild(this[_t]||this),this}[Kt](t){return t.removeChild(this)}[en](t){return t.removeChild(this[_t]||this)}[Ct](t,e){return e[Pr](t,this)}[rn](t,e){return e[Pr](t,this[_t]||this)}get[kr](){return this[Oe]||(this[Oe]=globalThis.document.createComment("placeholder"))}set[kr](t){let e=this[Oe];this[Oe]=t,e&&e!=t&&e.parentNode&&e[Ct](t)}[ah](){let t=this[_t],e=t&&t.parentNode;return t&&e&&t!=this&&(this[_t]=null,this[et](e,t),t[Kt](e)),this}[fh](){this[ln]!=!0&&(this[ln]=!0,!0)&&(this[Ct]=this[rn],this[Kt]=this[en],this[et]=this[tn],this[Lr]||(this[Lr]=this[Ut]));let t=this[kr];return this.parentNode&&t!=this&&(t[et](this.parentNode,this),this[Kt](this.parentNode)),this[_t]=t,this}[ch](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof Fe)return r;let n=globalThis.document.createComment("");return r?r[Ct](n,this):n[et](this,null)}if(t===r)return t;if(s!=="object"){let n,o=t;return e&128&&e&256,r?r instanceof zr?(r.textContent=o,r):(n=globalThis.document.createTextNode(o),r[Ct](n,this),n):(this.appendChild(n=globalThis.document.createTextNode(o)),n)}else{if(globalThis.DEBUG_IMBA&&!t[et])throw console.warn("Tried to insert",t,"into",this),new TypeError("Only DOM Nodes can be inserted into DOM");return r?r[Ct](t,this):t[et](this,null)}}};Ht(j.prototype,Rr.prototype);var Ar=class{log(...t){return console.log(...t)}emit(t,e,r={bubbles:!0,cancelable:!0}){e!=null&&(r.detail=e);let s=new P(t,r),n=this.dispatchEvent(s);return s}text$(t){return this.textContent=t,this}[dh](){return this}[ph](){return this}[mh](){this.render&&this.render(),this[Pe]&&(this[Pe]=null)}get[gh](){return this[Pe]||(this[Pe]={})}get flags(){return this.$flags||(this.$flags=new Nt(this),this.flag$==_.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=Te(this,t,_);!r||!r.set?this.setAttribute(t,e):this[t]=e}get richValue(){return this.value}set richValue(t){this.value=t}};Ht(_.prototype,Ar.prototype);_.prototype.setns$=_.prototype.setAttributeNS;_.prototype[yn]=!0;function rf(i,t,e,r){let s=globalThis.document.createElement(i);return e&&(s.className=e),r!==null&&s.text$(r),t&&t[Bt]&&t[Bt](s),s}var $r=class{set$(t,e){var r;let s=cn[r=this.nodeName]||(cn[r]={}),n=Cn(this,t,s);!n||!n.set?this.setAttribute(t,e):this[t]=e}flag$(t){let e=this.flags$ns;this.setAttribute("class",e?e+(this.flags$ext=t):this.flags$ext=t)}flagSelf$(t){var e=this;return e.flag$=function(r){return e.flagSync$(e.flags$ext=r)},e.flagSelf$=function(r){return e.flagSync$(e.flags$own=r)},e.flagSelf$(t)}flagSync$(){return this.setAttribute("class",(this.flags$ns||"")+(this.flags$ext||"")+" "+(this.flags$own||"")+" "+(this.$flags||""))}};Ht(Nn.prototype,$r.prototype);var jr=class{set src(t){if(this[hn]!=t&&(this[hn]=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}}}};Ht(SVGSVGElement.prototype,jr.prototype);function sf(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[Bt]&&t[Bt](n),r&&(n.textContent=r),n}function ot(i){return globalThis.document.createComment(i)}function Kr(i){return globalThis.document.createTextNode(i)}function nf(){return globalThis.document.createDocumentFragment()}var Le=globalThis.navigator,Sh=Le&&Le.vendor||"",dn=Le&&Le.userAgent||"",xh=Sh.indexOf("Apple")>-1||dn.indexOf("CriOS")>=0||dn.indexOf("FxiOS")>=0,Ie=!xh,pn=new Map,qr=class extends Vr{connectedCallback(){return Ie?this.parentNode.removeChild(this):this.parentNode.connectedCallback()}disconnectedCallback(){if(!Ie)return this.parentNode.disconnectedCallback()}};window.customElements.define("i-hook",qr);function wh(i,t){let e=pn.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=oh(s),l=o.length;n<l;n++){let h=o[n],u=Object.getOwnPropertyDescriptors(h);Object.assign(e,u)}pn.set(t,e)}return e}function Th(i,t,e,r,s){let n;typeof i!="string"&&i&&i.nodeName&&(i=i.nodeName);let o=Fr[i]||i;if(Ir[i]){let l=Ir[i],h=l.prototype[Ot];if(h&&Ie)n=globalThis.document.createElement(h,{is:i});else if(l.create$&&h){n=globalThis.document.createElement(h),n.setAttribute("is",o);let u=wh(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(Fr[i]||i);return n[gn]=t,n[ke](),n[mn](),r!==null&&n[yh]("__").text$(r),(e||n.flags$ns)&&n.flag$(e||""),n}function of(i,t,e,r){if(i==null||i==null)return ot("");if(i instanceof j)return i;if(i[yn])return i;if(typeof i=="string"||i&&i.prototype instanceof j)return Th(i,t,e,r)}function Eh(i,t){if(Mr[i])return Mr[i];if(window[t])return window[t];if(window[i])return window[i]}function hf(i,t,e){let r=Eh(i,t);if(!(r==e||r.prototype instanceof e||r.prototype[Ot])){let n=r.prototype[un];if(!n){n=class extends r{static[ke](){return this.prototype[sn]=fn,this}constructor(){super(...arguments),this.__slots={},this.__F=0,this[sn]===fn&&this[nn]&&this[nn]()}}[ke](),r.prototype[un]=n;let o=Object.getOwnPropertyDescriptors(e.prototype);Object.defineProperties(n.prototype,o),n.prototype[Ot]=i}return n}return r}function uf(i,t,e={}){Mr[i]=_h[i]=t,t.nodeName=i;let r=i,s=t.prototype;if(i.indexOf("-")==-1&&(r=""+i+"-tag",Fr[i]=r),e.cssns){let n=(s._ns_||s[an]||"")+" "+(e.cssns||"");s._ns_=n.trim()+" ",s[an]=e.cssns}if(e.cssid){let n=(s.flags$ns||"")+" "+e.cssid;s[bh]=e.cssid,s.flags$ns=n.trim()+" "}return s[Ot]&&!e.extends&&(e.extends=s[Ot]),e.extends?(s[Ot]=e.extends,Ir[i]=t,Ie&&window.customElements.define(r,t,{extends:e.extends})):window.customElements.define(r,t),t}var Nh=globalThis.imba||(globalThis.imba={});Nh.document=globalThis.document;function Ur(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Ch(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var $e=Symbol.for("#parent"),On=Symbol.for("#closestNode"),Oh=Symbol.for("#isRichElement"),Ph=Symbol.for("#afterVisit"),Pn=Symbol.for("#__initor__"),kn=Symbol.for("#__inited__"),Ln=Symbol.for("#appendChild"),In=Symbol.for("#removeChild"),Fn=Symbol.for("#replaceChild"),rt=Symbol.for("#insertInto"),De=Symbol.for("#replaceWith"),Mn=Symbol.for("#insertChild"),Re=Symbol.for("#removeFrom"),Dn=Symbol.for("#placeChild"),qn=Symbol.for("#__init__"),kh=Symbol.for("#registerFunctionalSlot"),Lh=Symbol.for("#getFunctionalSlot"),Rn=Symbol.for("#getSlot"),Hr=Symbol.for("##parent"),lt=Symbol.for("##up"),An=Symbol.for("##flags"),Ih=Symbol.for("#domFlags"),K=Symbol.for("#end"),$n=Symbol.for("#textContent"),Ae=Symbol.for("#textNode"),Br=Symbol.for("#functionalSlots"),jn=Symbol();function df(){return!0}var ht=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[$e](t){this[Hr]=t}get[$e](){return this[Hr]||this[lt]}get[On](){return this[$e][On]}get[Oh](){return!0}get flags(){return this[An]||(this[An]=new Nt(this))}flagSync$(){return this}[Ph](){return this}},Fh=0,Wt=class extends ht{static[qn](){return this.prototype[Pn]=jn,this}constructor(t,e){super(...arguments),this[lt]=e,this.parentNode=null,this[Ih]=t,this.childNodes=[],this[K]=ot("slot"+Fh++),e&&e[Ln](this),this[Pn]===jn&&this[kn]&&this[kn]()}get[$e](){return this[Hr]||this.parentNode||this[lt]}set textContent(t){this[$n]=t}get textContent(){return this[$n]}hasChildNodes(){for(let t=0,e=Ur(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(s instanceof ht&&s.hasChildNodes())return!0;if(!(s instanceof Fe)){if(s instanceof j)return!0}}return!1}text$(t){return this[Ae]?this[Ae].textContent=t:this[Ae]=this[Dn](t),this[Ae]}appendChild(t){return this.parentNode&&t[rt](this.parentNode,this[K]),this.childNodes.push(t)}[Ln](t){var e;return this.parentNode?t[rt](this.parentNode,this[K]):t[lt]==null?t[lt]=this[lt]||this:t[lt],this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[Mn](t,e);let r=this.childNodes.indexOf(e);return r>=0&&this.childNodes.splice(r,0,t),t}[In](t){this.parentNode&&this.parentNode[In](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[Fn](t,e){this.parentNode&&this.parentNode[Fn](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[rt](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[K]&&(e=this[K][rt](t,e));for(let s=0,n=Ur(this.childNodes),o=n.length;s<o;s++)n[s][rt](t,e)}return this}[De](t,e){let r=t[rt](e,this[K]);return this[Re](e),r}[Mn](t,e){if(this.parentNode&&this.insertBefore(t,e||this[K]),e){let r=this.childNodes.indexOf(e);r>=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[Re](t){for(let e=0,r=Ur(this.childNodes),s=r.length;e<s;e++)r[e][Re](t);return this[K]&&this[K][Re](t),this.parentNode=null,this}[Dn](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&r instanceof Fe)return r;let o=ot("");if(r){let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,o),s&&r[De](o,s),o}return this.childNodes.push(o),s&&o[rt](s,this[K]),o}if(t===r)return t;if(n!=="object"){let o,l=t;if(r){if(r instanceof zr)return r.textContent=l,r;{o=Kr(l);let h=this.childNodes.indexOf(r);return this.childNodes.splice(h,1,o),s&&r[De](o,s),o}}else return this.childNodes.push(o=Kr(l)),s&&o[rt](s,this[K]),o}else if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,t),s&&r[De](t,s),t}else return this.childNodes.push(t),s&&t[rt](s,this[K]),t}};Wt[qn]();function pf(i,t){return new Wt(i,t)}function je(i,t){let e=new Wt(i,null);return e[lt]=t,e}var Yr=class{[kh](t){let e=this[Br]||(this[Br]={});return e[t]||(e[t]=je(0,this))}[Lh](t,e){let r=this[Br];return r&&r[t]||this[Rn](t,e)}[Rn](t,e){var r;return t=="__"&&!this.render?this:(r=this.__slots)[t]||(r[t]=je(0,this))}};Ch(j.prototype,Yr.prototype);function Mh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Dh=Symbol.for("#afterVisit"),qe=Symbol.for("#insertInto"),zn=Symbol.for("#appendChild"),Rh=Symbol.for("#replaceWith"),Wr=Symbol.for("#removeFrom"),Vn=Symbol.for("#__initor__"),Kn=Symbol.for("#__inited__"),Bn=Symbol.for("#__init__"),Ah=Symbol.for("#domFlags"),$h=Symbol.for("##parent"),ut=Symbol.for("#end"),jh=Symbol.for("#removeChild"),qh=Symbol.for("#insertChild"),Un=Symbol(),ze=class extends ht{static[Bn](){return this.prototype[Vn]=Un,this}constructor(t,e){super(...arguments),this[Ah]=t,this[$h]=e,t&256||(this[ut]=ot("list")),this.$=this.childNodes,this.length=0,e&&e[zn](this),this[Vn]===Un&&this[Kn]&&this[Kn]()}hasChildNodes(){return this.length!=0}[Dh](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[ut];if(e>t)for(;e>t;)r[jh](s[--e]);else if(t>e)for(;t>e;)r[qh](s[e++],n);this.length=t}[qe](t,e){this.parentNode=t,this[ut]&&this[ut][qe](t,e),e=this[ut];for(let r=0,s=Mh(this.childNodes),n=s.length;r<n;r++){let o=s[r];if(r==this.length)break;o[qe](t,e)}return this}[zn](t){}[Rh](t,e){let r=t[qe](e,this[ut]);return this[Wr](e),r}[Wr](t){let e=this.length;for(;e>0;)this.childNodes[--e][Wr](t);this[ut]&&t.removeChild(this[ut]),this.parentNode=null}};ze[Bn]();function bf(i,t){return new ze(i,t)}function Hn(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Gr=Symbol.for("#appendChild"),Ve=Symbol.for("#insertChild"),zh=Symbol.for("#replaceWith"),Ke=Symbol.for("#insertInto"),Xr=Symbol.for("#removeFrom"),Vh=Symbol.for("#afterVisit"),Yn=Symbol.for("#__initor__"),Wn=Symbol.for("#__inited__"),Jn=Symbol.for("#__init__"),Ue=Symbol.for("#domFlags"),Gn=Symbol.for("##parent"),at=Symbol.for("#end"),Xn=Symbol.for("#removeChild"),Qn=Symbol(),Be=class extends ht{static[Jn](){return this.prototype[Yn]=Qn,this}constructor(t,e){super(...arguments),this[Ue]=t,this[Gn]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new Y(this,Symbol()),t&256||(this[at]=ot("map")),e&&e[Gr](this),this[Yn]===Qn&&this[Wn]&&this[Wn]()}[Gr](t){if(this.parentNode)return this.parentNode[Ve](t,this[at])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Ue]&1)){this.array.push(t),this[Gr](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[Ve](t,n.nextSibling)}else s[Ve](t,this.childNodes[e+1]||this[at])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[Xr](t.parentNode)}[Ve](t,e){}[zh](t,e){let r=t[Ke](e,this[at]);return this[Xr](e),r}[Ke](t,e){this[Gn]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=Hn(this.array),o=n.length;s<o;s++)n[s][Ke](t,e);this[at]&&this[at][Ke](t,e)}return this}[Xr](t){for(let e=0,r=Hn(this.array),s=r.length;e<s;e++){let n=r[e];t[Xn](n)}return this[at]&&t[Xn](this[at]),this.parentNode=null}[Vh](t){var e=this;if(!(this[Ue]&1)){this[Ue]|=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)}}};Be[Jn]();function wf(i,t){return new Be(i,t)}var kt=Symbol.for("#__init__"),Zn=Symbol.for("#__initor__"),to=Symbol.for("#__inited__"),Kh=Symbol.for("##inited"),Uh=Symbol.for("#afterVisit"),Bh=Symbol.for("#beforeReconcile"),Hh=Symbol.for("#afterReconcile"),eo=Symbol.for("#__hooks__"),Pt=Symbol.for("#autorender"),He=Symbol.for("##visitContext"),ro=Symbol(),io=new class{constructor(i=null){this[kt](i)}[kt](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=j.DOCUMENT_POSITION_PRECEDING,o=j.DOCUMENT_POSITION_FOLLOWING;if(e){let l=this.items.indexOf(s),h=l,u=function(a,p){return t.tests++,a.compareDocumentPosition(p)};(l==-1||s.nodeName!=i.nodeName)&&(h=l=0);let c=t.items[h];for(;c&&u(c,i)&o;)c=t.items[++h];if(h!=l)c?t.items.splice(h,0,i):t.items.push(i);else{for(;c&&u(c,i)&n;)c=t.items[--h];h!=l&&(c?t.items.splice(h+1,0,i):t.items.unshift(i))}}else t.items.push(i),t.current||globalThis.queueMicrotask(t.flush.bind(t))}};function kf(){return io.flush()}var Lt=class extends Vr{static[kt](){return this.prototype[Zn]=ro,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[Zn]===ro&&this[to]&&this[to]()}setup$(){return this.__slots={},this.__F=0}[kt](){return this.__F|=3,this}[Kh](){if(this[eo])return this[eo].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[Pt]||(this[Pt]={});e.value=t,this.mountedΦ&&k.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 k.on("commit",this),this.__F|=128,this}unschedule(){return k.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}[Uh](){if(this.visit(),this[He])return this[He]=null}[Bh](){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&&Vt.push(this),this[He]&&(this[He]=null),this}[Hh](){return globalThis.DEBUG_IMBA&&Vt.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){io.queue(this);return}if(t&48)return;this.__F|=16,e||this[kt](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),$(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(k.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[Pt]&&k.schedule(this,this[Pt]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),$(this,"unmount"),this.unmount(),this[Pt])return k.unschedule(this,this[Pt])}};Lt[kt]();var Lf=Lt;function Yh(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var so=Symbol.for("#__init__");var Wh={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 no={prefix:1,suffix:1,content:1},Zr={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]]},Gh=new RegExp("^("+Object.keys(Zr).join("|")+")(\\d+(?:\\.\\d+)?)$"),Xh=/^([xyz])$/,Qh=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,Jh=`*,::before,::after {
|
|
box-sizing: border-box;
|
|
border-width: 0;
|
|
border-style: solid;
|
|
border-color: currentColor;
|
|
}`,Qr=class{constructor(t=null){this[so](t)}[so](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",Jh),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;no[r]&&(t=String(t));let o=typeof t;if(o=="number"){if(e||(Xh.test(r)?e="px":Qh.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return Wh[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(o=="string"){if(r&&no[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(Gh)){let h=Zr[n[1]][parseInt(n[2])],u="100%";if(typeof s=="number"?u=s+"%":typeof s=="string"&&(u=s),h)return"hsla("+h[0]+","+h[1]+"%,"+h[2]+"%,"+u+")"}}else if(t&&t.toStyleString instanceof Function)return t.toStyleString();return t}parseDimension(t){if(typeof t=="string"){let[e,r,s]=t.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(r),s]}else if(typeof t=="number")return[t]}},Zh=new Qr,Df=Object.keys(Zr);function Rf(){return!0}var Jr=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let o=Zh.toValue(e,r,s,n);this.style.setProperty(t,o)}};Yh(_.prototype,Jr.prototype);var tu=Symbol.for("#insertInto"),oo=Symbol.for("#removeFrom");function qf(i,t={}){let e=L.context;L.context=t;let r=i(t);return L.context==t&&(L.context=e),r}function eu(i,t){let e=t||globalThis.document.body,r=i;if(i instanceof Function){let s=new Y(e,null),n=function(){let o=L.context;L.context=s;let l=i(s);return L.context==s&&(L.context=o),l};r=n(),k.listen("commit",n)}else r.__F|=64;return r[tu](e),r}function ru(i){return i&&i[oo]&&i[oo](i.parentNode),i}var lo=globalThis.imba||(globalThis.imba={});lo.mount=eu;lo.unmount=ru;function It(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Gt(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Xt=Symbol.for("##onchange"),Jt=Symbol.for("#afterVisit"),Qt=Symbol.for("##oninput"),Ye=Symbol.for("##onclick"),Zt=Symbol.for("##bound"),ft=Symbol.for("##visitContext");function Uf(){return!0}var iu={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},ti=function(i){return i instanceof Array||i&&i.has instanceof Function},li=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},hi=function(i,t){if(i instanceof Array)return i.push(t);if(i&&i.add instanceof Function)return i.add(t)},ui=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 su(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 ei=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Zt]&&iu[this.nodeName]&&(this[Zt]=!0,this[Xt]&&this.addEventListener("change",this[Xt]=this[Xt].bind(this)),this[Qt]&&this.addEventListener("input",this[Qt]=this[Qt].bind(this),{capture:!0}),this[Ye]&&this.addEventListener("click",this[Ye]=this[Ye].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?su(r):r),r}};It(_.prototype,ei.prototype);Object.defineProperty(_.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(i){return this.setRichValue(i)}});var ri=class{[Xt](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=Gt(r),l=o.length;n<l;n++){let h=o[n];s.indexOf(h)==-1&&ui(e,h)}for(let n=0,o=Gt(s),l=o.length;n<l;n++){let h=o[n];(!r||r.indexOf(h)==-1)&&hi(e,h)}}else this.data=s[0];return C(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=Gt(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=Gt(this.options),n=s.length;r<n;r++){let o=s[r],l=o.richValue,h=li(t,l);o.selected=h,h&&e.push(l)}this.$$value=e}else for(let e=0,r=Gt(this.options),s=r.length;e<s;e++){let o=r[e].richValue;if(o==t){this.$$value=[o],this.selectedIndex=e;break}}}[Jt](){if(this.syncValue(),this[ft])return this[ft]=null}};It(Sn.prototype,ri.prototype);var ii=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}};It(En.prototype,ii.prototype);var si=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Qt](t){return this.data=this.value,C()}[Jt](){let t=this.data;if(t==null&&(t=""),this[Zt]&&this.value!=t&&(this.value=t),this[ft])return this[ft]=null}};It(wn.prototype,si.prototype);var ni=class{[Qt](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,C()}[Xt](t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;ti(e)?s?hi(e,r):ui(e,r):this.data=s?r:!1}return C()}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}[Jt](){if(this[Zt]){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=li(e,this.richValue)}else this.richValue=this.data}this[ft]&&(this[ft]=null)}};It(xn.prototype,ni.prototype);var oi=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}[Ye](t){let e=this.data,r=this.checked,s=this.richValue;return ti(e)?r?ui(e,s):hi(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[Jt](),C()}[Jt](){if(this[Zt]){let t=this.data,e=this.$$value==null?!0:this.$$value;ti(t)?this.checked=li(t,e):this.checked=t==e}this[ft]&&(this[ft]=null)}};It(Tn.prototype,oi.prototype);function ho(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var nu=Symbol.for("#getSlot"),ou=Symbol.for("#container"),lu=Symbol.for("#afterVisit"),vt=Symbol.for("#__init__"),uo=Symbol.for("#__initor__"),ao=Symbol.for("#__inited__"),We=Symbol.for("#listeners"),X=Symbol.for("#slot"),hu=Symbol.for("#parent"),q=Symbol.for("##container"),ai=Symbol.for("#domTarget"),fo=Symbol.for("#insertInto"),uu=Symbol.for("#removeFrom"),au=Symbol.for("#teleport"),fu=Symbol.for("#self"),cu=Symbol.for("#target"),co=Symbol(),te=class extends Lt{static[vt](){return this.prototype[uo]=co,this}constructor(){super(...arguments),super[vt]||this[vt](),this[uo]===co&&this[ao]&&this[ao]()}[vt](t=null){super[vt]&&super[vt](...arguments),this.to=t?t.to:void 0}build(){return this[We]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[nu](t,e){return this[X]||(this[X]=je(0,this[hu])),this[X]}get[ou](){if(!this[q]){let t=this.className;this[q]=this.doc.createElement("div"),this[q].className=t,this[q].style.cssText="display:contents !important;"}return this[q]}get domTarget(){return this[ai]||(this[ai]=this.to instanceof _?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){return this[q]?this[q].style:super.style}get classList(){return this[q]?this[q].classList:super.classList}get className(){return this[q]?this[q].className:super.className}set className(t){this[q]?this[q].className=t:super.className=t}[lu](){if(this.mountedΦ&&this[X]&&!this[X].parentNode)return this[X][fo](this.target)}mount(){for(let e=0,r=ho(this[We]),s=r.length;e<s;e++){let[n,o,l]=r[e];this.eventTarget.addEventListener(n,o,l)}let t=this.domTarget;return this[X]&&this[X][fo](t),this}unmount(){for(let t=0,e=ho(this[We]),r=e.length;t<r;t++){let[s,n,o]=e[t];this.eventTarget.removeEventListener(s,n,o)}return this[X]&&this[X][uu](this.domTarget),this[ai]=null,this}addEventListener(t,e,r={}){var s;if(e[au]=this,e[fu]=this,this[We].push([t,e,r]),this.mountedΦ&&((s=this.eventTarget)==null?void 0:s.addEventListener))return this.eventTarget.addEventListener(t,e,r)}};te[vt]();var fi=class extends te{get domTarget(){return this.doc.body}get eventTarget(){return this.win}addEventListener(t,e,r={}){return e[cu]=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",te),globalThis.customElements.define("i-global",fi));function Gf(){return!0}function ct(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function du(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var st=Symbol.for("#__init__"),Ge=Symbol.for("#__initor__"),Xe=Symbol.for("#__inited__"),ci=Symbol.for("#insertInto"),di=Symbol.for("#removeFrom"),pu=Symbol.for("#all"),ee=Symbol.for("#phase"),it=Symbol.for("#nodes"),mu=Symbol.for("#sizes"),po=Symbol.for("#mode"),mo=Symbol.for("#enabled"),gu=Symbol.for("#easer"),go=Symbol.for("#anims"),pi=Symbol.for("#_easer_"),yo=Symbol(),bo=Symbol(),Qe=class extends jt{static[st](){return this.prototype[Ge]=yo,this}constructor(){super(...arguments),super[st]||this[st](),this[Ge]===yo&&this[Xe]&&this[Xe]()}[st](t=null){var e;super[st]&&super[st](...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=ct(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=ct(n),h=l.length;o<h;o++){let u=l[o];u.closest("._ease_")==t&&r.push(u)}return r[pu]=n,r}nodesWithSize(t,e="in"){let r=this.getSelectors("_off_sized","_"+e+"_sized");return r?t.filter(function(s){return s.matches(r)}):[]}};Qe[st]();var mi=new Qe,yu=globalThis.imba||(globalThis.imba={});yu.transitions=mi;var Je=class extends jt{static[st](){return this.prototype[Ge]=bo,this}constructor(t){super(),this.dom=t,this[ee]=null,this[it]=[],this[mu]=new Map,this[Ge]===bo&&this[Xe]&&this[Xe]()}log(...t){}get flags(){return this.dom.flags}flag(t){for(let e=0,r=ct(this[it]),s=r.length;e<s;e++)r[e].flags.add(t);return this}unflag(t){for(let e=0,r=ct(this[it]),s=r.length;e<s;e++)r[e].flags.remove(t);return this}commit(){return this.dom.offsetWidth}enable(t){return t&&(this[po]=t),this[mo]!=!0&&(this[mo]=!0,!0)?(this.dom[ci]=this[ci].bind(this),this.dom[di]=this[di].bind(this),this.flags.add("_ease_")):this}disable(){return this.flags.remove("_ease_"),!0}set phase(t){var r,s,n,o,l,h,u,c,a,p,v,f;let e=this[ee];this[ee]!=t&&(this[ee]=t,!0)&&(e&&this.unflag("@"+e),t&&this.flag("@"+t),t||(this.unflag("@out"),this.unflag("@in"),this.unflag("@off"),this[it]=null),t=="enter"&&e=="leave"&&((s=(r=this.dom)==null?void 0:r.transitionΞoutΞcancel)==null||s.call(r,this)),t=="leave"&&e=="enter"&&((o=(n=this.dom)==null?void 0:n.transitionΞinΞcancel)==null||o.call(n,this)),t=="enter"&&((h=(l=this.dom)==null?void 0:l.transitionΞin)==null||h.call(l,this)),t=="leave"&&((c=(u=this.dom)==null?void 0:u.transitionΞout)==null||c.call(u,this)),e=="leave"&&!t&&((p=(a=this.dom)==null?void 0:a.transitionΞoutΞend)==null||p.call(a,this)),e=="enter"&&!t&&((f=(v=this.dom)==null?void 0:v.transitionΞinΞend)==null||f.call(v,this)))}get phase(){return this[ee]}get leavingΦ(){return this.phase=="leave"}get enteringΦ(){return this.phase=="enter"}get idleΦ(){return this.phase==null}track(t){var e=this;let r={before:Me().getAnimations()};return this.commit(),t(),this.commit(),r.after=Me().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=ct(r.own),u=h.length;l<u;l++){let c=h[l];c[gu]=e,c.addEventListener("finish",o,{once:!0}),c.addEventListener("cancel",o,{once:!0})}}):r.finished=Promise.resolve(!0),r}getAnimatedNodes(){return mi.nodesForBase(this.dom)}getNodeSizes(t="in",e=this[it]){let r=mi.nodesWithSize(e,t),s=new Map;for(let n=0,o=ct(r),l=o.length;n<l;n++){let h=o[n],u=window.getComputedStyle(h);s.set(h,{width:u.width,height:u.height})}return s}applyNodeSizes(t){for(let[e,r]of ct(t))e.style.width=r.width,e.style.height=r.height;return t}clearNodeSizes(t){if(!!t){for(let[e,r]of ct(t))e.style.removeProperty("width"),e.style.removeProperty("height");return t}}[ci](t,e){var h,u;var r=this;let s;if(this.enteringΦ)return this.dom;let n=function(){if(s&&r.clearNodeSizes(s),r.enteringΦ)return r.phase=null};if(r.leavingΦ)return r.track(function(){return r.phase="enter",r.unflag("@off"),r.unflag("@out")}).finished.then(n,function(a){return r.log("error cancel leave",a)}),r.dom;let o=Me().contains(t);return e?t.insertBefore(r.dom,e):t.appendChild(r.dom),this[it]=r.getAnimatedNodes(),r.flag("_instant_"),r.unflag("@out"),r.commit(),s=this[it].sized=r.getNodeSizes("in"),(u=(h=r.dom)==null?void 0:h.transitionΞinΞinit)==null||u.call(h,r),r.flag("@off"),r.flag("@in"),r.flag("@enter"),r.commit(),r.unflag("_instant_"),(this[go]=r.track(function(){return r.phase="enter",r.applyNodeSizes(s),r.unflag("@off"),r.unflag("@in")})).finished.then(n,function(c){return r.clearNodeSizes(s),r.log("cancelled insert into",c)}),r.dom}[di](t){var e=this;if(this.leavingΦ)return;let r,s=function(){if(e.phase=="leave")return e.dom.emit("easeoutend",{}),t.removeChild(e.dom),e.phase=null};if(e.enteringΦ&&this[po]!="forward"){let o=e.track(function(){return e.flag("@off"),e.flag("@in"),e.unflag("@out"),e.phase="leave",e.clearNodeSizes(e[it].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[it]=e.getAnimatedNodes(),r=e.getNodeSizes("out"),e.applyNodeSizes(r),e.flag("@leave");let n=this[go]=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})}};Je[st]();var gi=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[pi]||(this[pi]=new Je(this))}set ease(t){var e,r;if(t==!1){(r=(e=this[pi])==null?void 0:e.disable)==null||r.call(e);return}this.ease.enable(t)}};du(_.prototype,gi.prototype);function Zf(){return!0}function bu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function _o(){return!0}var yi=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}};bu(vn.prototype,yi.prototype);function _u(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Ze(){return!0}var bi=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}};_u(bn.prototype,bi.prototype);function wi(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function vo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var vu=Symbol.for("#extendType"),Su=Symbol.for("#modifierState"),tr=Symbol.for("#sharedModifierState"),So=Symbol.for("#onceHandlerEnd");var xo=Symbol.for("#extendDescriptors"),z=Symbol.for("#context"),wo=Symbol.for("#self"),xu=Symbol.for("#target"),To=Symbol.for("#stopPropagation"),Eo=Symbol.for("#defaultPrevented"),wu=Symbol.for("#teleport");_o();Ze();var _i=class{[vu](t){var e,r,s;let n=t[xo]||(t[xo]=(r=Object.getOwnPropertyDescriptors(t.prototype),s=r.constructor,delete r.constructor,r));return Object.defineProperties(this,n)}};wi(P.prototype,_i.prototype);var vi=class{get[Su](){var t,e;return(t=this[z])[e=this[z].step]||(t[e]={})}get[tr](){var t,e;return(t=this[z].handler)[e=this[z].step]||(t[e]={})}[So](t){return D(this[z],"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,qt(t))})}αself(){return this.target==this[z].element}αcooldown(t=250){let e=this[tr];return e.active?!1:(e.active=!0,e.target=this[z].element,e.target.flags.incr("cooldown"),this[So](function(){return setTimeout(function(){return e.target.flags.decr("cooldown"),e.active=!1},qt(t))}),!0)}αthrottle(t=250){let e=this[tr];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[z].element),e.el.flags.incr("throttled"),D(this[z],"end",function(){let r=qt(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[tr],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)},qt(t))})}αflag(t,e){let{element:r,step:s,state:n,id:o,current:l}=this[z],h=e instanceof _?e:e?r.closest(e):r;if(!h)return!0;this[z].commit=!0,n[s]=o,h.flags.incr(t);let u=Date.now();return D(l,"end",function(){let c=Date.now()-u,a=Math.max(250-c,0);return setTimeout(function(){return h.flags.decr(t)},a)}),!0}αbusy(t){return this.αflag("busy",t)}αoutside(){let{handler:t}=this[z];if(t&&t[wo])return!t[wo].parentNode.contains(this.target)}};wi(W.prototype,vi.prototype);var cc={};function dc(){return!0}var Si=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 $(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return D(this,t,...e)}un(t,...e){return bt(this,t,...e)}get passiveΦ(){return this.params.passive}get captureΦ(){return this.params.capture}get silentΦ(){return this.params.silent}get globalΦ(){return this.params.global}async handleEvent(t){let e=this[xu]||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=W[this.type+"$handle"]||W[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,u=Object.keys(r),c=u.length,a,p;h<c;h++){if(a=u[h],p=r[a],o.step++,a[0]=="_")continue;a.indexOf("~")>0&&(a=a.split("~")[0]);let v=null,f=[t,o],d,m=null,g,b=!1,E=typeof a=="string";if(a[0]=="$"&&a[1]=="_"&&p[0]instanceof Function)a=p[0],a.passive||(o.commit=!0),f=[t,o].concat(p.slice(1)),m=e;else if(p instanceof Array){f=p.slice(),v=f;for(let y=0,S=vo(f),O=S.length;y<O;y++){let M=S[y];if(typeof M=="string"&&M[0]=="~"&&M[1]=="$"){let Se=M.slice(2).split("."),xe=o[Se.shift()]||t;for(let Sr=0,Ms=vo(Se),zl=Ms.length;Sr<zl;Sr++){let Vl=Ms[Sr];xe=xe?xe[Vl]:void 0}f[y]=xe}}}if(typeof a=="string"&&(g=a.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/))&&(v||(v=f=[]),f.unshift(g[2]),a=g[1]),a=="trap")t[To]=!0,t.stopImmediatePropagation(),t[Eo]=!0,t.preventDefault();else if(a=="stop")t[To]=!0,t.stopImmediatePropagation();else if(a=="prevent")t[Eo]=!0,t.preventDefault();else if(a=="commit")o.commit=!0;else if(a=="once")e.removeEventListener(t.type,this);else{if(a=="options"||a=="silence"||a=="silent")continue;if(a=="emit"){let y=f[0],S=f[1],O=new P(y,{bubbles:!0,detail:S});O.originalEvent=t;let vr=(this[wu]||e).dispatchEvent(O)}else if(typeof a=="string"){a[0]=="!"&&(b=!0,a=a.slice(1));let y="α"+a,S=t[y];S||(S=this.type&&W[this.type+"$"+a+"$mod"]),S||(S=t[a+"$mod"]||W[t.type+"$"+a]||W[a+"$mod"]),S instanceof Function?(a=S,m=o,f=v||[],t[y]&&(m=t,t[z]=o)):a[0]=="_"?(a=a.slice(1),m=this.closure):m=this.getHandlerForMethod(e,a)}}try{a instanceof Function?d=a.apply(m||e,f):m&&(d=m[a].apply(m,f)),d&&d.then instanceof Function&&d!=k.$promise&&(o.commit&&!n&&k.commit(),d=await d)}catch(y){s=y;break}if(b&&d===!0||!b&&d===!1)break;o.value=d}if($(o,"end",o),o.commit&&!n&&k.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,u=new P("error",{detail:h,bubbles:!0,cancelable:!0});u.error=s,u.originalEvent=t;let c=e.dispatchEvent(u);if(u.defaultPrevented)return}throw s}}}},xi=class{on$(t,e,r){let s="on$"+t,n;n=new Si(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){var n;return(n=t.options)!=null&&n.length&&(r.guard=function(...o){let l=this.event.error;return!!o.find(function(u){return l instanceof u})}),this.addEventListener("error",r,s),r}};wi(_.prototype,xi.prototype);var er=new class{get iosΦ(){let i=globalThis.navigator.platform||"";return!!(i.match(/iPhone|iPod|iPad/)||i=="MacIntel"&&globalThis.navigator.maxTouchPoints>2)}};function Ft(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 dt(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 rr(i,t=1){let e=1/t;return Math.round(i*e)/e}function Tu(i,t,e){return t>e?Math.max(e,Math.min(t,i)):Math.min(e,Math.max(t,i))}function Ti(i,t,e,r,s=.1){let[n,o]=dt(e),[l,h]=dt(r),[u,c]=dt(s);return o=="%"&&(n=(t-i)*(n/100)),h=="%"&&(l=(t-i)*(l/100)),c=="%"&&(u=(l-n)*(u/100)),function(a,p){let v=(a-i)/(t-i),f=n+(l-n)*v;return s&&(f=rr(f,u)),p&&(f=Tu(f,n,l)),f}}function Eu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}Ze();function vc(){return!0}var Ni=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}};Eu(_n.prototype,Ni.prototype);function Nu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var No=Symbol.for("#capture"),Q=Symbol.for("#step"),Cu=Symbol.for("#cancel"),Ci=Symbol.for("#reframe");var Co=Symbol.for("#mods"),Oi=Symbol.for("#dx"),Pi=Symbol.for("#dy"),pt=Symbol.for("#context"),ir=Symbol.for("#locked"),Lo=Symbol.for("#teardown"),Oo=Symbol.for("#x"),Po=Symbol.for("#y"),Ou=Symbol.for("#pinTarget");function Tc(){return!0}var ko=null,ki=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[Co]={}}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[Oi]==null?this.event.x-this.start.x:this[Oi]}get dy(){return this[Pi]==null?this.event.y-this.start.y:this[Pi]}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 $(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return D(this,t,...e)}un(t,...e){return bt(this,t,...e)}αflag(t,e){let{element:r}=this[pt],s=Date.now(),n=e instanceof _?e:e?r.closest(e):r;return this[Q].setup!=!0&&(this[Q].setup=!0,!0)&&(n.flags.incr(t),D(this,"end",function(){return n.flags.decr(t)})),!0}αlock(){return this[No](),!0}[No](){if(this[ir]!=!0&&(this[ir]=!0,!0))return this[pt].element.setPointerCapture(this.pointerId)}get[Q](){var t,e;return(t=this[Co])[e=this[pt].step]||(t[e]={})}[Cu](){return this[Lo]()}αmoved(t,e){let r=this[Q],{element:s,state:n,event:o}=this[pt];if(!r.setup){let a=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,a=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[p,v]=dt(a);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,v&&v!="px"&&console.warn("only px threshold allowed in @touch.moved")}if(r.active)return!0;if(r.cancelled)return!1;let l=r.threshold,h=this.x-r.x0,u=this.y-r.y0;r.x=Math.max(r.x,Math.abs(h)),r.y=Math.max(r.y,Math.abs(u)),r.left=Math.max(r.left,-h),r.right=Math.max(r.right,h),r.up=Math.max(r.up,-u),r.down=Math.max(r.down,u),r.dist=Math.max(r.dist,Math.sqrt(h*h+u*u));let c=r[r.dir];if(c>l&&c>=r.x&&c>=r.y){r.active=!0;let a=n.pinTarget;return s.flags.incr("@move"),a&&a.flags.incr("@move"),this.preventDefault(),D(this,"end",function(){return a&&a.flags.decr("@move"),s.flags.decr("@move")}),!0}else if(r.x>l||r.y>l)return r.cancelled=!0,!1;return!1}αhold(t=250){var e=this;let r=this[Q],s=this[pt].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),D(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[Q];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[pt].commit=!0,!0}αapply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[pt].commit=!0,!0}αcss(t="x",e="y"){let r=this[Q];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[pt].element,r.x=r.el[Oo]||0,r.y=r.el[Po]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[Oo]=r.x+(this.x-r.tx),n=r.el[Po]=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=rr(this.x,t),this.y=rr(this.y,e),!0}[Ci](...t){let e=this[Q];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,n=t[0],o=0,l="100%",h=0,u=typeof n;u=="number"||u=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(n)||n instanceof Array?n=null:u=="string"&&(n=="this"||n==""?n=r:n=="up"?n=r.parentNode:n=="op"?n=r.offsetParent:n=r.closest(n)||r.querySelector(n)),n==null&&(s++,t.unshift(n=r)),s==2?h=t[1]:s>2&&([o,l,h=0]=t.slice(1));let c=n.getBoundingClientRect();o instanceof Array||(o=[o,o]),l instanceof Array||(l=[l,l]),h instanceof Array||(h=[h,h]),e.rect=c,e.x=Ti(c.left,c.right,o[0],l[0],h[0]),e.y=Ti(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[Oi]=r-this.x0,this[Pi]=s-this.y0}return!0}αfit(...t){return this[Q].clamp=!0,this[Ci](...t)}αreframe(...t){return this[Ci](...t)}αpin(...t){let e=this[Q];if(e.setup!=!0&&(e.setup=!0,!0)){let r=Ft(t[0],this.target);r instanceof _||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[Ou]=r,r.flags.incr("_touch_"),D(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},Li=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),er.iosΦ&&globalThis.parent!=globalThis&&ko!=!0&&(ko=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};Nu(_.prototype,Li.prototype);if(globalThis.parent==globalThis&&er.iosΦ){let i=function(t){if(t.data=="setupTouchFix")return globalThis.addEventListener("touchmove",function(){return!1},{passive:!1}),globalThis.removeEventListener("message",i)};globalThis.addEventListener("message",i)}W.touch$handle=function(){let i=this.event,t=this.element,e=this.state.pointerId,r=this.modifiers,s=this.handler,n=er.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 ki(i,s,t);e=o.pointerId;let l=function(f){return f.preventDefault(),!1},h=null,u=Symbol(),c=function(f){let d=o.clientX,m=o.clientY,g=f.clientX,b=f.clientY;(o[ir]||o.defaultPrevented)&&(f.pointerId==o.pointerId||d==g&&m==b)&&(f.preventDefault(),f.stopPropagation()),c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null)},a=function(f){if(!(o.type=="touchmove"&&f.changedTouches[0].identifier!=e)&&(o.defaultPrevented||o[ir]))return f.preventDefault()},p=function(f){let d=f.type,m=o.phase;if(f.pointerId&&o.pointerId!=f.pointerId||f[u])return;f[u]=!0;let g=d=="pointerup"||d=="pointercancel";if(f.pressure==0&&f.pointerType=="mouse"&&d=="pointermove"&&o.originalEvent.pressure>0)return h(f);d=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=f.clientX,o.y=f.clientY),o.event=f,g&&(o.phase="ended");try{s.handleEvent(o)}catch{}if(m=="init"&&!g&&(o.phase="active"),g&&h)return h(f)},v=!1;return h=function(f){if(!v&&(v=!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&&a)return globalThis.removeEventListener("touchend",a),globalThis.removeEventListener("touchmove",a,{passive:!1}),a=null},100),!r.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[Lo]=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",a),globalThis.addEventListener("touchmove",a,{passive:!1})),r.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),p(i),!1};function Mo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Pu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var ku=Symbol.for("#context"),Lu=Symbol.for("#extendType");function Cc(){return!0}var Io=new(globalThis.WeakMap||Map),Ii={threshold:[0]},Iu={};W.intersect$handle=function(){let i=this.event.detail.observer;return this.modifiers._observer==i};var Fi=class extends P{α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[ku],n=Ft(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=Mo(e),l=o.length;n<l;n++){let h=o[n],u=s.get(h.target)||0,c=h.intersectionRatio,a={entry:h,ratio:c,from:u,delta:c-u,observer:r},p=new P(i,{bubbles:!1,detail:a});p[Lu](Fi),p.entry=h,p.isIntersecting=h.isIntersecting,p.delta=a.delta,p.ratio=a.ratio,s.set(h.target,c),h.target.dispatchEvent(p)}}}function Fo(i=Ii){let t=i.threshold.join("-")+i.rootMargin;!i.root&&Ii.root&&(i.root||(i.root=Ii.root));let e=i.root||Iu,r=Io.get(e);return r||Io.set(e,r={}),r[t]||(r[t]=new IntersectionObserver(Fu("intersect",t),i))}var Mi=class{on$intersect(t,e,r,s){let n;if(t.options){let o=[],l={threshold:o};for(let h=0,u=Mo(t.options),c=u.length;h<c;h++){let a=u[h];a instanceof _||a instanceof Yt?l.root=a:typeof a=="number"?o.push(a):typeof a=="string"?l.rootMargin=a:typeof a=="object"&&Object.assign(l,a)}if(o.length==1){let h=o[0];if(h>1)for(o[0]=0;o.length<h;)o.push(o.length/(h-1))}o.length==0&&o.push(0),n=Fo(l)}else n=Fo();return t._observer=n,n.observe(this),this.addEventListener("intersect",r,s),r}};Pu(_.prototype,Mi.prototype);function Mu(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Du(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Di=Symbol.for("#width"),Ri=Symbol.for("#height"),Ru=Symbol.for("#extendType");function Lc(){return!0}var sr=null,Ai=class extends P{αcss(t="1elw",e="1elh",r=""){let s=this.target;if(s.offsetParent){let n=dt(t),o=dt(e),l=Ft(r,s),h=n?"--u_"+n[1]:"--"+t,u=o?"--u_"+o[1]:"--"+e,c=n?this.width/n[0]:this.width,a=o?this.height/o[0]:this.height;l.style.setProperty(h,c),l.style.setProperty(u,a)}return!0}get width(){return this[Di]==null?this[Di]=this.entry.target.offsetWidth:this[Di]}get height(){return this[Ri]==null?this[Ri]=this.entry.target.offsetHeight:this[Ri]}};function Au(){return globalThis.ResizeObserver||sr||(console.warn(":resize not supported in this browser"),sr={observe:function(){return!0}}),sr||(sr=new ResizeObserver(function(i){for(let t=0,e=Mu(i),r=e.length;t<r;t++){let s=e[t],n=new P("resize",{bubbles:!1,detail:s});n.entry=s,n.rect=s.contentRect,n[Ru](Ai),s.target.dispatchEvent(n);let o=new P("resized",{bubbles:!0,detail:s});s.target.dispatchEvent(o)}}))}var $i=class{on$resize(t,e,r,s){return Au().observe(this),this.addEventListener("resize",r,s),r}};Du(_.prototype,$i.prototype);function $u(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Dc(){return!0}var ji,Do=Symbol();function ju(){if(!ji)return ji=function(i){if(i[Do])return;i[Do]=!0;let t=globalThis.document.activeElement;if(t&&t.matches("input,textarea")){let e=new P("selection",{detail:{start:t.selectionStart,end:t.selectionEnd}});return t.dispatchEvent(e)}},globalThis.document.addEventListener("selectionchange",ji)}var qi=class{on$selection(t,e,r,s){return ju(),this.addEventListener("selection",r,s),r}};$u(_.prototype,qi.prototype);var Ro=Symbol.for("#string"),Ao=Symbol.for("#html"),J={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:"⌫"}}};J.auto=J.win;(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)&&(J.auto=J.mac);var zi={};function $o(i,t="auto"){let e=""+i+":"+t;if(zi[e])return zi[e];let r=J[t]||J.win,s=i.split(" ").map(function(n){return n.split("+").sort(function(u,c){return r.order.indexOf(c)-r.order.indexOf(u)}).map(function(u){let c=r.labels[u]||u;return c=c[0].toUpperCase()+(c.slice(1)||"")})});return zi[e]=s}function jo(i,t){var e;let r=$o(i,t),s=J[t]||J.win;return r[Ro]||(r[Ro]=r.map(function(n){return n.join(s.sep)}).join(" "))}function qo(i,t){var e;let r=$o(i,t),s=J[t]||J.win;return r[Ao]||(r[Ao]=r.map(function(n){return"<kbd>"+n.map(function(o){return"<kbd>"+o+"</kbd>"}).join("")+"</kbd>"}).join(" "))}var mt={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},zo={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Vo={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},Ko={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},re;for(Z=1;Z<20;++Z)mt[111+Z]="f"+Z;var Z;for(Z=0;Z<=9;++Z)mt[Z+96]=Z.toString();function Vi(i,t,e){if(i.addEventListener){i.addEventListener(t,e,!1);return}i.attachEvent("on"+t,e)}function Ki(i,t,e){if(i.removeEventListener){i.removeEventListener(t,e,!1);return}i.detachEvent("on"+t,e)}function Uo(i){if(i.type=="keypress"){var t=String.fromCharCode(i.which);return i.shiftKey||(t=t.toLowerCase()),t}return mt[i.which]?mt[i.which]:zo[i.which]?zo[i.which]:String.fromCharCode(i.which).toLowerCase()}function qu(i,t){return i.sort().join(",")===t.sort().join(",")}function zu(i){var t=[];return i.shiftKey&&t.push("shift"),i.altKey&&t.push("alt"),i.ctrlKey&&t.push("ctrl"),i.metaKey&&t.push("meta"),t}function Vu(i){if(i.preventDefault){i.preventDefault();return}i.returnValue=!1}function Ku(i){if(i.stopPropagation){i.stopPropagation();return}i.cancelBubble=!0}function Ui(i){return i=="shift"||i=="ctrl"||i=="alt"||i=="meta"}function Uu(){if(!re){re={};for(var i in mt)i>95&&i<112||mt.hasOwnProperty(i)&&(re[mt[i]]=i)}return re}function Bu(i,t,e){return e||(e=Uu()[i]?"keydown":"keypress"),e=="keypress"&&t.length&&(e="keydown"),e}function Hu(i){return i==="+"?["+"]:(i=i.replace(/\+{2}/g,"+plus"),i.split("+"))}function Bo(i,t){var e,r,s,n=[];for(e=Hu(i),s=0;s<e.length;++s)r=e[s],Ko[r]&&(r=Ko[r]),t&&t!="keypress"&&Vo[r]&&(r=Vo[r],n.push("shift")),Ui(r)&&n.push(r);return t=Bu(r,n,t),{key:r,modifiers:n,action:t}}function Ho(i,t){return i===null||i===document?!1:i===t?!0:Ho(i.parentNode,t)}function I(i){var t=this;if(i=i||document,!(t instanceof I))return new I(i);t.target=i,t._callbacks={},t._directMap={};var e={},r,s=!1,n=!1,o=!1;function l(f){f=f||{};var d=!1,m;for(m in e){if(f[m]){d=!0;continue}e[m]=0}d||(o=!1)}function h(f,d,m,g,b,E){var y,S,O=[],M=m.type;if(!t._callbacks[f])return[];for(M=="keyup"&&Ui(f)&&(d=[f]),y=0;y<t._callbacks[f].length;++y)if(S=t._callbacks[f][y],!(!g&&S.seq&&e[S.seq]!=S.level)&&M==S.action&&(M=="keypress"&&!m.metaKey&&!m.ctrlKey||qu(d,S.modifiers))){var vr=!g&&S.combo==b,Se=g&&S.seq==g&&S.level==E;(vr||Se)&&t._callbacks[f].splice(y,1),O.push(S)}return O}function u(f,d,m,g){t.stopCallback(d,d.target||d.srcElement,m,g)||f(d,m)===!1&&(Vu(d),Ku(d))}t._handleKey=function(f,d,m){var g=h(f,d,m),b,E={},y=0,S=!1;for(b=0;b<g.length;++b)g[b].seq&&(y=Math.max(y,g[b].level));for(b=0;b<g.length;++b){if(g[b].seq){if(g[b].level!=y)continue;S=!0,E[g[b].seq]=1,u(g[b].callback,m,g[b].combo,g[b].seq);continue}S||u(g[b].callback,m,g[b].combo)}var O=m.type=="keypress"&&n;m.type==o&&!Ui(f)&&!O&&l(E),n=S&&m.type=="keydown"};function c(f){typeof f.which!="number"&&(f.which=f.keyCode);var d=Uo(f);if(!!d){if(f.type=="keyup"&&s===d){s=!1;return}t.handleKey(d,zu(f),f)}}function a(){clearTimeout(r),r=setTimeout(l,1e3)}function p(f,d,m,g){e[f]=0;function b(M){return function(){o=M,++e[f],a()}}function E(M){u(m,M,f),g!=="keyup"&&(s=Uo(M)),setTimeout(l,10)}for(var y=0;y<d.length;++y){var S=y+1===d.length,O=S?E:b(g||Bo(d[y+1]).action);v(d[y],O,g,f,y)}}function v(f,d,m,g,b){t._directMap[f+":"+m]=d,f=f.replace(/\s+/g," ");var E=f.split(" "),y;if(E.length>1){p(f,E,d,m);return}y=Bo(f,m),t._callbacks[y.key]=t._callbacks[y.key]||[],h(y.key,y.modifiers,{type:y.action},g,f,b),t._callbacks[y.key][g?"unshift":"push"]({callback:d,modifiers:y.modifiers,action:y.action,seq:g,level:b,combo:f})}t._bindMultiple=function(f,d,m){for(var g=0;g<f.length;++g)v(f[g],d,m)},t.enable=function(){Vi(i,"keypress",c),Vi(i,"keydown",c),Vi(i,"keyup",c)},t.disable=function(){Ki(i,"keypress",c),Ki(i,"keydown",c),Ki(i,"keyup",c)},t.enable()}I.prototype.bind=function(i,t,e){var r=this;return i=i instanceof Array?i:[i],r._bindMultiple.call(r,i,t,e),r};I.prototype.unbind=function(i,t){var e=this;return e.bind.call(e,i,function(){},t)};I.prototype.trigger=function(i,t){var e=this;return e._directMap[i+":"+t]&&e._directMap[i+":"+t]({},i),e};I.prototype.reset=function(){var i=this;return i._callbacks={},i._directMap={},i};I.prototype.stopCallback=function(i,t){var e=this;return(" "+t.className+" ").indexOf(" mousetrap ")>-1||Ho(t,e.target)?!1:t.tagName=="INPUT"||t.tagName=="SELECT"||t.tagName=="TEXTAREA"||t.isContentEditable};I.prototype.handleKey=function(){var i=this;return i._handleKey.apply(i,arguments)};I.addKeycodes=function(i){for(var t in i)i.hasOwnProperty(t)&&(mt[t]=i[t]);re=null};I.init=function(){var i=I(document);for(var t in i)t.charAt(0)!=="_"&&(I[t]=function(e){return function(){return i[e].apply(i,arguments)}}(t))};function se(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Yu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Bi=Symbol.for("#updateHotKeys"),Wu=Symbol.for("#inInput"),Hi=Symbol.for("#inEditable"),Gu=Symbol.for("#hotkeyTarget"),Wo=Symbol.for("#hotkeyCombos"),Xu=Symbol.for("#extendType"),ne=Symbol.for("#combos"),Yi=Symbol.for("#target"),ie=Symbol.for("#hotkeyHandlers"),Qu=Symbol.for("#defaultPrevented"),Ju=Symbol.for("#visit"),Yo=Symbol.for("#key"),Zu;try{Zu=(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)}catch{}function zc(){return!0}var Wi={esc:!0},Gi=class extends P{αfocus(t){let e=this.target,r=e.ownerDocument;return t&&(e=e.querySelector(t)||e.closest(t)||r.querySelector(t)),e==r.body?r.activeElement!=r.body&&r.activeElement.blur():e.focus(),!0}αlocal(){return!0}αrepeat(){return!0}},ta=function(i,t,e){return t.tagName=="INPUT"&&(e=="down"||e=="up")?!1:t.tagName=="INPUT"||t.tagName=="SELECT"||t.tagName=="TEXTAREA"?Wi[e]?(i[Wu]=!0,i[Hi]=!0,!1):!0:t.contentEditable&&(t.contentEditable=="true"||t.contentEditable=="plaintext-only")?Wi[e]?(i[Hi]=!0,!1):!0:!1},ea=new class{constructor(){this.combos={"*":{}},this.identifiers={},this.labels={},this.handler=this.handle.bind(this),this.mousetrap=null,this.hothandler=this.handle.bind(this)}addKeycodes(t){return I.addKeycodes(t)}trigger(t){var e,r;return(r=(e=this.mousetrap)==null?void 0:e.trigger)==null?void 0:r.call(e,t)}register(t,e={}){return this.mousetrap||(this.mousetrap=I(globalThis.document),this.mousetrap.stopCallback=ta),this.combos[t]||(this.combos[t]=!0,this.mousetrap.bind(t,this.handler)),(e.capture||e.force)&&(Wi[t]=!0),this}comboIdentifier(t){var e;return(e=this.identifiers)[t]||(e[t]=t.replace(/\+/g,"_").replace(/\ /g,"-").replace(/\*/g,"all").replace(/\|/g," "))}humanize(t,e="auto"){return jo(t,e)}htmlify(t,e="auto"){return qo(t,e)}matchCombo(t){return!0}handle(t,e){var c;let r=t.target&&t.target[Gu]||t.target||globalThis.document.body,s=Array.from(globalThis.document.querySelectorAll("[data-hotkey]")),n=r.ownerDocument,o=r;for(;o&&o!=n&&o.hotkeys!==!0;)o=o.parentNode;if(s=s.reverse().filter(function(a){let p=a[Wo];if(!(p&&(p[e]||p["*"])))return!1;let v=a;for(;v&&v!=n;){if(v.hotkeys===!1)return!1;v=v.parentNode}return!0}),!s.length)return;let l={combo:e,originalEvent:t,targets:s},h=new P("hotkey",{bubbles:!0,detail:l});h[Xu](Gi),h.originalEvent=t,h.hotkey=e,r.dispatchEvent(h);let u=[];for(let a=0,p=se(s),v=p.length;a<v;a++){let f=p[a];for(let d=0,m=se(f[ie]),g=m.length;d<g;d++){let b=m[d];if(b[ne][e]||b[ne]["*"]){if(b.params.local&&!b[Yi].contains(r))continue;if(!t[Hi]||b.captureΦ||b.params.force){let E=b[Yi];(o.contains(E)||E.contains(o)||b.globalΦ)&&u.push(b)}}}}for(let a=0,p=se(u),v=p.length;a<v;a++){let f=p[a];if((!t.repeat||f.params.repeat)&&f.handleEvent(h),(!f.passiveΦ||h[Qu])&&((c=t==null?void 0:t.preventDefault)==null||c.call(t)),!f.passiveΦ)break}return this}},Go=function(i,t){let e=t.element;e instanceof _&&(e.matches("input,textarea,select,option")?e.focus():e.click())};Go.passive=!0;var Xi=class{on$hotkey(t,e,r,s){var n=this;return this[ie]||(this[ie]=[]),this[ie].push(r),r[Yi]=this,t.$_||(t.$_=[Go]),t[Ju]=function(){return n[Bi]()},this[Bi](),r}[Bi](){let t={};for(let e=0,r=se(this[ie]),s=r.length;e<s;e++){let n=r[e],o=n.params,l=o.options[0];if(n[Yo]!=l&&(n[Yo]=l,!0)){n[ne]={};for(let h=0,u=se(l.split("|")),c=u.length;h<c;h++){let a=u[h];ea.register(a,o),n[ne][a]=!0}}Object.assign(t,n[ne])}return this[Wo]=t,this.dataset.hotkey=Object.keys(t).join(" "),this}};Yu(_.prototype,Xi.prototype);var kl=Xl(nl());var Ji=Symbol.for("#getQueryParam"),ol=Symbol.for("#setQueryParam");var ll=Symbol.for("#query");var U=class{static parse(t,e){return t instanceof U?t:new U(t,e)}constructor(t,e){this.router=e,this.parse(t)}parse(t){var r;let e;return t instanceof URL||(t=new URL(t,this.router.origin)),(e=(r=this.router)==null?void 0:r.aliases[t.pathname])&&(t.pathname=e),this.url=t,this}get activeΦ(){return this.router.location==this}reparse(){return this.parse(this.url)}get searchParams(){return this.url.searchParams}search(){let t=this.searchParams?this.searchParams.toString():"";return t?"?"+t:""}update(t){if(t instanceof Object)for(let e=0,r=Object.keys(t),s=r.length,n,o;e<s;e++)n=r[e],o=t[n],this.searchParams.set(n,o);else typeof t=="string"&&this.parse(t);return this}clone(){return new U(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[ll]||(this[ll]=new Proxy({},{get:this[Ji].bind(this),set:this[ol].bind(this)}))}toString(){return this.href}[Ji](t,e){return this.searchParams.get(e)}[ol](t,e,r){return this[Ji](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 Zi=function(){return!0},gt=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 gt)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 gt)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],C();{let u=this.serialize(e,n);if(this.cache.rich[n]=e,this.cache.raw[n]=u,h!=u)return this.store.setItem(n,u),C()}}}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(Zi,new gt(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)}},Gc=new Proxy(Zi,new gt(globalThis.localStorage)),hl=new Proxy(Zi,new gt(globalThis.sessionStorage));var oe=Symbol.for("#states"),ul=new WeakMap,le=class{static from(t,e){return e?new this(t,e):null}constructor(t,e,r=!1){ul.set(this,t),this.path=e.path,this.data=e.data||{},this.index=e.index,this.type=e.type,this.local=r}get history(){return ul.get(this)}get next(){return this.history.at(this.index+1)}get prev(){return this.history.at(this.index-1)}toJSON(){return{path:this.path,data:this.data,index:this.index,type:this.type}}save(){return this.history.cache[this.index]=this,this}toString(){return""+this.history.id+"|"+this.index}},lr=class{constructor(t){this.router=t,this.store=hl("router"),this[oe]=[],this.cache={},this.index=-1;let e=globalThis.history.state,r;if(typeof e=="string"){let s=e.split("|");this.id=parseInt(s[0]),this.index=parseInt(s[1]),this.cache=this.store(this.id)}else this.id=this.store.id=(this.store.id||0)+1,this.cache=this.store(this.id);this.index==-1&&this.replaceState({initial:!0},null,t.path)}get length(){return this.cache.length}get state(){return this.at(this.index)}get states(){let t=this.length,e=0;for(;e<t;)this.at(e++);return this[oe]}get currentStates(){return this.states.slice(0,this.length)}get next(){return this.state.next}get prev(){return this.state.prev}slice(t,e=this.length){let r=[];for(;t<e;)r.push(this.at(t++));return r}at(t){var e;if(!(t>=this.length))return(e=this[oe])[t]||(e[t]=le.from(this,this.cache[t]))}buildState(t,e,r=!0){let s={data:t,index:this.index+1,path:e||this.router.path,type:r?"push":"replace"};return new le(this,s,!0)}pushState(t,e,r,s=!0){return t instanceof le||(t=this.buildState(t,r,s)),this.index=t.index,this.cache[this.index]=t,this[oe][this.index]=t,this[oe].length=this.cache.length=Math.max(t.index+1,0),globalThis.history[s?"pushState":"replaceState"](String(t),e||null,t.path),this}replaceState(t,e,r){return this.pushState(t,e,r,!1)}};var he=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=U.parse(e),this.original=this.location.clone()),this.referrer=r}get apply(){return this.params.apply||[]}get revert(){return this.params.revert||[]}get state(){return this.params.state}get mode(){return this.params.mode}redirect(t){var e,r;return(r=(e=this.location)==null?void 0:e.update)==null||r.call(e,t),this}get path(){var t;return(t=this.location)==null?void 0:t.path}get url(){var t,e;return(e=(t=this.location)==null?void 0:t.toString)==null?void 0:e.call(t)}set path(t){this.location.path=t}abort(t=!1){return this.aborted=!0,t&&(this.forceAbort=t),this}match(t){return this.location?this.router.route(t).match(this.path):null}};function al(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var hr=Symbol.for("#routes"),ts=Symbol.for("#match"),la=Symbol.for("#symbol"),fl=Symbol.for("#matches"),es=new Map,rs={},cl={},ha=/.*/;function ua(i){if(!es.has(i)){let t=new Map;return es.set(i,t),t}return es.get(i)}function aa(i,t){let e=ua(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 is=class{};function fa(i){if(rs[i])return rs[i];let t=rs[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=cl[s]||(cl[s]=new URLSearchParams(s))}return t.path=i,t}var ur=class{constructor(t){this.router=t,this.fullPath="",this[hr]={},this[ts]=new is,this[ts].path=""}route(t){var e;return(e=this[hr])[t]||(e[t]=new ue(this.router,t,this))}match(){return this[ts]}resolve(t){return"/"}},ue=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[la]=Symbol(),this[fl]={},this[hr]={}}route(t){var e;return(e=this[hr])[t]||(e[t]=new ue(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=al(s.join("?").split("&")),l=o.length;n<l;n++){let h=o[n];if(!h)continue;let[u,c]=h.split("=");u[0]=="!"&&(this.dynamic=!0,u=u.slice(1),c=!1),c===""&&(c=!1),c&&c[0]==":"&&(this.dynamic=!0),this.query[u]=c||c!==!1}}if(t=t.replace(/\:(\w+|\*)(\.)?/g,function(s,n,o){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=ha,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 h,u;var e,r;let s=this.parent.match(t);if(!s)return null;let n=fa(t),o=n.url,l="";if(s.path&&n.path.indexOf(s.path)==0&&(l=s.path+"/",o=o.slice(l.length)),e=this.regex?o.match(this.regex):[""]){let c=l+e[0],a=[this.$path],p={};if(this.groups.length)for(let d=0,m=al(e),g=m.length,b;d<g;d++){let E=m[d];(b=this.groups[d-1])&&(p[b]=E,a.push(E))}if(this.query)for(let d=this.query,m=0,g=Object.keys(d),b=g.length,E,y;m<b;m++){E=g[m],y=d[E];let S=E,O=(u=(h=n.query)==null?void 0:h.get)==null?void 0:u.call(h,E);if(y===!1){if(O)return null;a.push("1");continue}if(y[0]==":"&&(S=y.slice(1),y=!0),y==!0&&O||y==O)p[S]=O,a.push(O);else return null}let v=a.join("*");p=(r=this[fl])[v]||(r[v]=p);let f=aa(s,p);return f.path=c,f}return null}resolve(t=this.router.path){if(this.raw[0]=="/"&&!this.dynamic)return this.raw.replace(/\$/g,"");let e=this.parent.match(t),r=this.parent.resolve(t),s;if(this.dynamic){let n=this.match(t);return n?n.path:null}return this.raw[0]=="?"?s=(r||"/")+this.raw:s=r+"/"+this.raw,s.replace(/\$/g,"").replace(/\/\/+/g,"/")}};var dl=Symbol.for("#__initor__"),pl=Symbol.for("#__inited__"),gl=Symbol.for("#__init__"),ar=Symbol.for("#idler"),ae=Symbol.for("#resolve"),ml=Symbol(),fe=class extends Set{static[gl](){return this.prototype[dl]=ml,this}constructor(){super(),this[ar]=Promise.resolve(this),this[dl]===ml&&this[pl]&&this[pl]()}emit(t,...e){return $(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return D(this,t,...e)}un(t,...e){return bt(this,t,...e)}add(t){var e=this;if(t instanceof Function&&(t=t()),!this.has(t)){t.then(function(){return e.delete(t)});let r=e.size==0;super.add(t),r&&(this[ar]=this[ae]=null,e.emit("busy",e))}return t}delete(t){return super.delete(t)?(this.size==0&&(this[ae]&&(this[ae](this),this[ae]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[ar]||(this[ar]=new Promise(function(e){return t[ae]=e}))}};fe[gl]();function fs(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var yl=Symbol.for("#__initor__"),bl=Symbol.for("#__inited__"),Pl=Symbol.for("#__init__"),ns=Symbol.for("#enter"),os=Symbol.for("#resolved"),cr=Symbol.for("#leave"),_l=Symbol.for("#afterVisitRouted"),vl=Symbol.for("#afterVisitRouteTo"),Sl=Symbol.for("#router"),Dt=Symbol.for("#doc"),nt=Symbol.for("#version"),ca=Symbol.for("#routes"),xl=Symbol.for("#origin"),ss=Symbol.for("#request"),ce=Symbol.for("#hash"),B=Symbol.for("#routeTo"),de=Symbol.for("#path"),tt=Symbol.for("#match"),pe=Symbol.for("#options"),da=Symbol.for("#cache"),wl=Symbol.for("#unmatched"),yt=Symbol.for("#active"),pa=Symbol.for("#resolvedPath"),ma=Symbol.for("#dataKey"),ga=Symbol.for("#activeKey"),me=Symbol.for("#urlKey"),Rt=Symbol.for("#dataMap"),fr=Symbol.for("#href"),R=Symbol.for("#route"),Tl=Symbol.for("#context"),El=Symbol.for("#afterVisit"),Nl=Symbol.for("#routeHandler"),ya=Symbol.for("#parentNode"),ba=Symbol.for("#visitContext"),Cl=Symbol.for("##visitContext"),_a=Symbol.for("#attachToParent"),va=Symbol.for("#detachFromParent"),Ol=Symbol();var ls=class{get router(){return this[Sl]||(this[Sl]=new dr(this))}};fs(Yt.prototype,ls.prototype);function cd(){return!0}var dd=As(function(){return globalThis.document.router}),dr=class extends kl.EventEmitter{static[Pl](){return this.prototype[yl]=Ol,this}constructor(t,e={}){super(),this[Dt]=t,this[nt]=0,this[ca]={},this.aliases={},this.redirects={},this.rules={},this.matchers={},this.options=e,this.busy=[],this.queue=new fe,this.root=new ur(this),this.location=new U(e.url||t.location.href,this),this.history=new lr(this),this.mode=e.mode||"history",this.queue.on("busy",function(){return globalThis.document.flags.incr("_routing_")}),this.queue.on("idle",function(){return globalThis.document.flags.decr("_routing_"),C()}),this.setup(),this[yl]===Ol&&this[bl]&&this[bl]()}get origin(){return this[xl]||(this[xl]=this[Dt].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[nt]++}option(t,e){return e==null?this.options[t]:(this.options[t]=e,this)}get realpath(){let t=this[Dt].location;return t.href.slice(t.origin.length)}get state(){return this.history.state}get states(){return this.history.currentStates}set state(t){this.state.data=t,this.state.save()}get ctx(){return this[ss]}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={}){var e=this;if(this.refreshing)return;this.refreshing=!0;let r=this.location,s=U.parse(t.location||this.realpath,this),n=t.mode,o=this[ss];if(!s.equals(r)||!o||t.state){let l=new he(this,s,r,t);this[ss]=l,this.emit("beforechange",l),l.aborted&&(!l.forceAbort&&globalThis.window.confirm("Are you sure you want to leave? You might have unsaved changes")?l.aborted=!1:n=="pop"?this.pushState(this.state,null,String(r)):n=="replace"&&this.replaceState(this.state,null,String(r))),l.aborted||(this.location=l.location,n=="push"?this.pushState(l.state,null,String(this.location)):n=="replace"?this.replaceState(l.state,null,String(this.location)):n=="pop"&&(this.history.index=t.index),this.emit("change",l),this.touch(),C())}return k.add(function(){let l=e[Dt].location.hash;if(l!=e[ce])return e.emit("hashchange",e[ce]=l)}),e.refreshing=!1,e}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 he(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[ce]=this[Dt].location.hash),C()}setup(){this.onclick=this.onclick.bind(this),this.onhashchange=this.onhashchange.bind(this);let t=globalThis.window;return this[ce]=this[Dt].location.hash,this.location=U.parse(this.realpath,this),t.onpopstate=this.onpopstate.bind(this),t.onbeforeunload=this.onbeforeunload.bind(this),t.addEventListener("hashchange",this.onhashchange),t.addEventListener("click",this.onclick,{capture:!0}),t.document.documentElement.emit("routerinit",this),this.refresh,this}onclick(t){if(t.metaKey||t.altKey)return;let e=null,r=null,s=t.target;for(;s&&(!e||!r);)!e&&s.nodeName=="A"&&(e=s),!r&&s[B]&&(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[B]&&e[B].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[B]?e[B].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[ce]}set hash(t){this.history.replaceState(this.state,null,"#"+this.serializeParams(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]})}};dr[Pl]();var pr=class{constructor(t,e,r,s={}){this.parent=r,this.node=t,this[de]=e,this[tt]=null,this[pe]=s,this[da]={},this[wl]={},this[yt]=null,this[pa]=null,this[ma]=Symbol(),this[ga]=Symbol(),this[me]=Symbol()}get router(){return this.node.ownerDocument.router}get route(){return(this.parent?this.parent.route:this.router).route(this[de])}get match(){return this[tt]}get params(){return this[tt]||this[wl]}get state(){let t=this[Rt]||(this[Rt]=new Map),e=this.params,r=this[Rt].get(e);return r||this[Rt].set(e,r={}),r}set state(t){(this[Rt]||(this[Rt]=new Map)).set(this.params,t)}set path(t){this[de]!=t&&(this[de]=t,!0)&&this.router.touch()}get path(){return this[de]}get isActive(){return!!this[yt]}get activeΦ(){return!!this[yt]}resolve(){let t=this.router[nt];if(!(this[nt]!=t&&(this[nt]=t,!0)))return;let e=this.route,r=this[pe],s=this.router.path,n=e.match(s),o=this[yt],l=this[tt],h=n!=l,u=n&&n[this[me]];return n&&(this[yt]=!0,this[tt]=n,n[this[me]]=s),n&&(h||u!=s||!o)&&this[os](n,l,u),!o&&n&&this[ns](),!n&&(o||o===null)&&(this[yt]=!1,this[cr]()),this[tt]}[ns](){var t,e;return this.node.flags.remove("not-routed"),this.node.flags.add("routed"),(e=(t=this.node)==null?void 0:t.routeDidEnter)==null?void 0:e.call(t,this)}[os](t,e,r=""){var s,n;return(n=(s=this.node)==null?void 0:s.routeDidResolve)==null?void 0:n.call(s,this,t,e,r)}[cr](){var t,e;return this.node.flags.add("not-routed"),this.node.flags.remove("routed"),(e=(t=this.node)==null?void 0:t.routeDidLeave)==null?void 0:e.call(t,this)}},hs=class extends pr{[ns](){return this}[os](){return this}[cr](){return this}resolve(){let t=this.router[nt];if(!(this[nt]!=t&&(this[nt]=t,!0)))return;let e=this[pe],r=this.route,s=this.router.path,n=this.route.resolve(s),o=this.route.match(s);o&&(this[tt]=o,this[tt][this[me]]=s),e.sticky&&this[tt]&&(n=this[tt][this[me]]),this[fr]!=n&&(this[fr]=n,!0)&&this.node.nodeName=="A"&&this.node.setAttribute("href",n),this.node.flags.toggle("active",!!o)}go(){return this.resolve(),this[pe]&&this[pe].replace?this.router.replace(this[fr]):this.router.go(this[fr])}},us=class{get router(){return this.ownerDocument.router}};fs(j.prototype,us.prototype);var as=class{set route(t){if(this[R]){this[R].path=t;return}let e=t[0]!="/"?this[Tl].route:null;this[R]=new pr(this,t,e,this.route__),this[El]=this[_l]}get route(){return this[R]}set routeΞto(t){var e=this;if(this[B]){this[B].path=t;return}let r=t[0]!="/"?this[Tl].route:null;this[R]=this[B]=new hs(this,t,r,this.routeTo__),this[El]=this[vl],e.onclick=function(s){if(!s.altKey&&!s.metaKey&&!s[Nl])return s.preventDefault(),s[Nl]=e[B],e[B].go()}}[_l](){if(this[R]){let t=this[ya],e=t&&t[ba];if(e&&e.matchedRoute&&e.matchedRoute!=this[R]){this[R][yt]!=!1&&(this[R][yt]=!1,!0)&&(this[R][cr](),this[R][nt]=-1);return}if(this[R].resolve(),this[R].activeΦ)e.matchedRoute=this[R];else return}if(this.visit&&this.visit(),this[Cl])return this[Cl]=null}[vl](){if(this[B]&&this[B].resolve(),this.visit)return this.visit()}routeDidEnter(t){return this[_a]()}routeDidLeave(t){return this[va]()}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()})}};fs(_.prototype,as.prototype);function G(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Ns(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var ve=Symbol.for("##reactive"),St=Symbol.for("##referenced"),ye=Symbol.for("##dereferenced"),mr=Symbol.for("#map"),Ll=Symbol.for("#__init__"),gr=Symbol.for("#child"),ge=Symbol.for("#reactions"),cs=Symbol.for("#promise"),T={TOUCHING:1<<1,STALE:1<<2,OBJECT:1<<3,RUNNING:1<<4,INVALIDATING:1<<5,POSSIBLY_STALE:1<<6,AUTORUN:1<<7},F=0,Il=!1;var Sa=0,Rl=1,Cs={META:new Map,VALUE:new Map,REF:new Map},V=Symbol.for("~"),Al=Symbol.for("~~"),Os=function(i,t){return t.has(i)||t.set(i,Symbol()),t.get(i)},br=function(i){return typeof i=="symbol"?Os(i,Cs.VALUE):Symbol.for(i)},Ps=function(i){return typeof i=="symbol"?Os(i,Cs.META):Symbol.for("#"+i+"__")},ks=function(i){return typeof i=="symbol"?Os(i,Cs.REF):Symbol.for("~"+i)},N=function(i,t){return F&&w.add(i[V]),t},H=function(i,t){return i[V].invalidated(0),t},At=function(i,t,e){let r=i[V];return r||(r=i[V]=new _e(T.OBJECT),Object.defineProperties(i,e)),t&&r.addSubscriber(t),i},Ls=function(i,t){let e=i[V];return e&&e.removeSubscriber(t),i},ds=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 Is(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 xa(){if(Il!=!0&&(Il=!0,!0))return zs.on("inited",function(i){let t=i[Al];if(t){let e=i instanceof j,r=i[V]||(i[V]={});for(let s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++){l=n[s],h=t[l];let u=r[l]=new wt(i[l],i,h);e||u.call()}e&&(A(i,"mount",function(){var s;s=[];for(let n=0,o=G(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof wt&&h.activate())}return s}),A(i,"unmount",function(){var s;s=[];for(let n=0,o=G(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof wt&&h.deactivate())}return s}))}})}function wa(i,t=Al){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 ds}get activeΦ(){return w==this}get rootΦ(){return this==xt}get snapshot(){let t=[],e=this[gr];for(;e&&e.target;)t.push({depth:e.depth,target:e.target,beacon:e.beacon}),e=e[gr];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 xt.reactions.add(t)}push(t){return w=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 G(e))n===1?s.addSubscriber(this.beacon):s.removeSubscriber(this.beacon)}return this.patcher.cleanup(),this.target=this.beacon=null,w=this.parent,w==xt&&xt.flush(),t}get child(){return this[gr]||(this[gr]=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 G(t))e.call()}},ps=class extends be{add(){return!0}},w=new ps(null,0),xt=w,Ta=function(){return w.tracking=!1},$l=function(i,t,e,r,s){let n=i[e],o=i[s];return o||(o=i[s]=new _e(0,r,n,t)),w.add(o,i),n},jl=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)}},_e=class{constructor(t,e,r,s){return this.id=Rl++,this.observer=null,this.observers=null,r&&r[St]&&r[St](this),this}changed(t,e,r){if(Sa++,r&&r[ye]&&r[ye](this,e),e&&e[St]&&e[St](this,r),this.observer&&this.observer.invalidated(t+1,this,e,r),this.observers)for(let s=0,n=G(this.observers),o=n.length;s<o;s++)n[s].invalidated(t+1,this,e,r);w==xt&&w.flush()}invalidated(t,e){if(this.observer&&this.observer.invalidated(t+1,this),this.observers)for(let r=0,s=G(this.observers),n=s.length;r<n;r++)s[r].invalidated(t+1,this);return t==0&&w==xt&&w.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 w.add(this)}};function xd(i){return new _e(null,null,null,i)}var ms=class extends Array{push(){return H(this,super.push(...arguments))}pop(){return H(this,super.pop(...arguments))}unshift(){return H(this,super.unshift(...arguments))}shift(){return H(this,super.shift(...arguments))}splice(){return H(this,super.splice(...arguments))}at(){return N(this,super.at(...arguments))}map(){return N(this,super.map(...arguments))}flatMap(){return N(this,super.flatMap(...arguments))}flat(){return N(this,super.flat(...arguments))}filter(){return N(this,super.filter(...arguments))}find(){return N(this,super.find(...arguments))}slice(){return N(this,super.slice(...arguments))}sort(){return N(this,super.sort(...arguments))}get len(){return N(this,this.length)}set len(t){this.length=t,H(this)}toIterable(){return F&&w.add(this[V]),this}[Symbol.iterator](){return N(this,super[Symbol.iterator](...arguments))}},Fl=Is(ms),gs=class{get len(){return this.length}set len(t){this.length=t}get[ve](){return At(this,null,Fl)}[St](t){return At(this,t,Fl)}[ye](t){return Ls(this,t)}};Ns(Array.prototype,gs.prototype);var ys=class extends Set{has(){return N(this,super.has(...arguments))}keys(){return N(this,super.keys(...arguments))}values(){return N(this,super.values(...arguments))}entries(){return N(this,super.entries(...arguments))}add(){return H(this,super.add(...arguments))}clear(){return H(this,super.clear(...arguments))}delete(){return H(this,super.delete(...arguments))}},Ml=Is(ys),bs=class{get[ve](){return At(this,null,Ml)}[St](t){return At(this,t,Ml)}[ye](t){return Ls(this,t)}};Ns(Set.prototype,bs.prototype);var _s=class extends Map{get(){return N(this,super.get(...arguments))}has(){return N(this,super.has(...arguments))}keys(){return N(this,super.keys(...arguments))}values(){return N(this,super.values(...arguments))}entries(){return N(this,super.entries(...arguments))}set(){return H(this,super.set(...arguments))}clear(){return H(this,super.clear(...arguments))}delete(){return H(this,super.delete(...arguments))}},Dl=Is(_s),vs=class{get[ve](){return At(this,null,Dl)}[St](t){return At(this,t,Dl)}[ye](t){return Ls(this,t)}};Ns(Map.prototype,vs.prototype);var Ss=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=br(t),o=ks(t),l=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return F?$l(this,t,n,r,o):this[n]},set:function(u){return F||!!this[o]?jl(this,t,n,u,r,o):this[n]=u}},h=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return F?(Object.defineProperty(this,t,l),this[t]):this[n]},set:function(u){return this[n]=u,this[o]=null,Object.defineProperty(this,t,l)}}}},xs=class{constructor(t=null){this[Ll](t)}[Ll](t=null){var e;this[mr]=t&&(e=t[mr])!==void 0?e:new Map}for(t){let e=this[mr].get(t);return e||this[mr].set(t,e=[]),e}get(t){let e=this.for(t);return e[V]||e[ve],F&&N(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 xs;let s=ks(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return F?$l(this,t,e,r,s):this[e]},set:function(l){let h=this[e];if(F||!!this[s]?jl(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)}},$t=class{constructor(t,e,r){this.observing=null,this.observers=null,this.flags=68,this.target=t,this.func=e,this.vkey=r,this.version=0}get beacon(){return this}addSubscriber(t){this.observer?(this.observers||(this.observers=[]),this.observers.push(t)):this.observer=t}removeSubscriber(t){if(this.observer==t)return this.observer=null;let e=this.observers,r=e.indexOf(this);r>=0&&e.splice(r,1)}invalidated(t,e){if(this.flags|=T.STALE|T.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=G(this.observers),n=s.length;r<n;r++)s[r].invalidated(t,this);return this}}value(){if(F&&w.add(this),(this.flags&T.POSSIBLY_STALE)==0)return this.target[this.vkey];F++,this.flags|=T.RUNNING,w.push(this);let t=this.func.call(this.target);w.pop(this);let e=this.target[this.vkey];return this.target[this.vkey]=t,this.flags&=~(T.STALE|T.POSSIBLY_STALE|T.RUNNING),t!==e&&this.version++,F--,t}},Ts=class{constructor(t,e){this.name=t;let r=ks(t),s=br(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 $t(this,e,s);return Object.defineProperty(this,t,n),l.value()}}}},wt=class{get beacon(){return this}constructor(t,e,r={}){this.cb=t,this.context=e,this.options=r,this.flags=0,this.id=Rl++,this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.observing=[],this.timeout=null}get runningΦ(){return this.flags&T.RUNNING}invalidated(t,e){return e instanceof $t?(this.flags|=T.POSSIBLY_STALE,this.checkComputedValues.add(e)):this.flags|=T.STALE,w.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=G(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(F&&console.warn("should not call reaction inside an autorunning context?",xt.snapshot),this.flags&T.POSSIBLY_STALE&&(this.flags&T.STALE)==0){let e=!1;for(let r of G(this.checkComputedValues)){let s=this.cachedComputedVersions.get(r);r.value();let n=r.version;if(s!=n){e=!0;break}}if(!e){this.flags&=~T.POSSIBLY_STALE,this.checkComputedValues.clear();return}}if(this.options.delay){clearTimeout(this.timeout);let e=this.options.delay;typeof e!="number"&&(e=1e3),t.timeout=setTimeout(function(){return t.run()},e);return}return t.run()}run(){F++,this.flags|=T.RUNNING;let t=w.push(this),e=this.cb.call(this.context,Ta),r=w.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=G(r),o=n.length;s<o;s++){let l=n[s];l instanceof $t&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(T.RUNNING|T.STALE|T.POSSIBLY_STALE),F--,this.options.silent||C(),e}dispose(){return this.deactivate(),this.cb=this.context=this.options=null,this}},Es=class extends wt{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[cs]||(this[cs]=new Promise(function(r){return e.resolve=function(s){return e.deactivate(),e.resolved=s,r(s)}})),this[cs].then(...t))}run(){F++,this.flags|=T.RUNNING;let t=w.push(this),e=this.cb.call(this.context),r=w.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=G(r),o=n.length;s<o;s++){let l=n[s];l instanceof $t&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(T.RUNNING|T.STALE|T.POSSIBLY_STALE),F--,e!=!1&&e!=null&&e!=null&&(this.resolve(e),this.options.silent||C()),e}},yr=class{constructor(t,e){this.context=e,this.cb=t}run(t=this.context,e=[]){w.push(this);try{let r=this.cb.apply(t,e);return w.pop(this),r}catch(r){throw w.pop(this),r}}};function wd(i,t={}){let e=new wt(i,globalThis,t);return e.call(),e}function Td(i,t={}){let e=new Es(i,globalThis,t);return e.call(),e}function Ed(i){return i[ve]}function Nd(i){return new yr(i,globalThis).run()}function Cd(i){return i&&i[V]&&i[V].invalidated(0),i}function Od(i){return i&&i[V]&&i[V].reportObserved(),i}function Pd(i,t,e){let r=Ps(t);return(i[r]=new Ts(t,e.get)).lazyDescriptor}function kd(i,t,e){let r=Ps(t),s=br(t),n=this[0]||{},o=i[r]=new Ss(t,n);return e?(Object.defineProperty(i,s,Object.assign({},e)),o.lazyDescriptor):(Object.defineProperty(i,t,o.lazyDescriptor),null)}function Ld(i,t,e){let r=Ps(t);return i.constructor[t],(i[r]=new ws(t,br(t))).lazyDescriptor}function Id(i,t,e){let r=wa(i),s=this[0]||{};return s.flags=T.AUTORUN,xa(),r[t]=s,e}function Fd(i,t,e){if(e.value){let r=new yr(e.value,null);e.value=function(){return r.run(this,arguments)}}return e}function Ea(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var ql=Symbol.for("#__init__");var _r=Symbol.for("#watchers");function Dd(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 Rd(i,t,e=[]){return t.prototype?new t(...e):t.apply(i,e)}var Fs=class{constructor(t=null){this[ql](t)}[ql](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[_r]||(this[_r]=[])).push(t)}$get(t,e){return t[e]}$set(t,e,r,s){if(this[_r]){let n=this.$get(e,r,s);if(n!=t){e[r]=t;for(let o=0,l=Ea(this[_r]),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 Ad(){return new Fs}export{Fs as Accessor,_h as CUSTOM_TYPES,Fe as Comment,Lt as Component,P as CustomEvent,Yt as Document,Qa as DocumentFragment,Je as Easer,_ as Element,pr as ElementRoute,hs as ElementRouteTo,jt as Emitter,W as Event,Si as EventHandler,ht as Fragment,Tn as HTMLButtonElement,Vr as HTMLElement,Ga as HTMLHtmlElement,xn as HTMLInputElement,En as HTMLOptionElement,Xa as HTMLScriptElement,Sn as HTMLSelectElement,wn as HTMLTextAreaElement,Lf as ImbaElement,Ii as IntersectionEventDefaults,vn as KeyboardEvent,xr as LazyProxy,bn as MouseEvent,j as Node,_n as PointerEvent,Y as RenderContext,dr as Router,Nn as SVGElement,Er as Scheduler,Ja as ShadowRoot,Mr as TYPES,zr as Text,Wa as UIEvent,Za as Window,Dd as accessor,wd as autorun,Td as awaits,ih as clearInterval,sh as clearTimeout,Df as colors,C as commit,xd as createAtom,ot as createComment,Th as createComponent,of as createDynamic,rf as createElement,nf as createFragment,bf as createIndexedList,wf as createKeyedList,pf as createLiveFragment,Xs as createRenderContext,sf as createSVGElement,je as createSlot,Kr as createTextNode,tf as customElements,uf as defineTag,Rd as descriptor,$ as emit,$a as env,cc as events,Te as getDeepPropertyDescriptor,Va as getRenderContext,hf as getSuperTagType,Eh as getTagType,Me as get_document,zs as hooks,ea as hotkeys,kf as hydrate,A as listen,Gc as locals,eu as mount,Ed as observable,D as once,qt as parseTime,As as proxy,qf as render,L as renderContext,Vt as renderer,Cd as reportChanged,Od as reportObserved,dd as router,Nd as run,k as scheduler,Ra as serve,hl as session,rh as setInterval,eh as setTimeout,Zh as styles,Ca as toCamelCase,mi as transitions,bt as unlisten,ru as unmount,Uf as use_dom_bind,Gf as use_dom_teleport,Zf as use_dom_transitions,dc as use_events,zc as use_events_hotkey,Cc as use_events_intersect,_o as use_events_keyboard,Ze as use_events_mouse,vc as use_events_pointer,Lc as use_events_resize,Dc as use_events_selection,Tc as use_events_touch,Ia as use_hooks,cd as use_router,df as use_slots,Rf as use_styles,ef as use_window,Fd as αaction,Id as αautorun,Pd as αcomputed,Ma as αlazy,kd as αobservable,Ad as αprop,Ld as αref};
|
|
|