@webjsdev/core 0.7.44 → 0.7.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- var gs=Object.defineProperty;var G=(e,t)=>()=>(e&&(t=e(e=0)),t);var br=(e,t)=>{for(var n in t)gs(e,n,{get:t[n],enumerable:!0})};function jr(){return typeof HTMLElement<"u"&&typeof HTMLSlotElement<"u"}function Qs(){if(Tr||(Q=jr(),!Q))return;Ie=HTMLSlotElement.prototype.assignedNodes,yn=HTMLSlotElement.prototype.assignedElements,lt=Object.getOwnPropertyDescriptor(Element.prototype,"assignedSlot"),HTMLSlotElement.prototype.assignedNodes=function(n){return this.hasAttribute(E)&&!gn(this)?En(this,n):Ie?Ie.call(this,n):[]},HTMLSlotElement.prototype.assignedElements=function(n){return this.hasAttribute(E)&&!gn(this)?En(this,n).filter(r=>r.nodeType===1):yn?yn.call(this,n):[]},Object.defineProperty(Element.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let n=lt&&lt.get?lt.get.call(this):null;return n||Nr(this)}});let e=Object.getOwnPropertyDescriptor(Text.prototype,"assignedSlot");Object.defineProperty(Text.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let n=e&&e.get?e.get.call(this):null;return n||Nr(this)}}),bn=HTMLSlotElement.prototype.assign,HTMLSlotElement.prototype.assign=function(...n){if(this.hasAttribute(E)&&!gn(this)){let r=Zs(this);if(r){let o=W(r);o.manualAssign||(o.manualAssign=new Map);let s=n.filter(Boolean);for(let[i,a]of o.manualAssign){if(i===this)continue;let c=a.filter(l=>{let u=l.deref();return u!==void 0&&s.indexOf(u)===-1});c.length!==a.length&&(c.length?o.manualAssign.set(i,c):o.manualAssign.delete(i))}if(s.length?o.manualAssign.set(this,s.map(i=>new WeakRef(i))):o.manualAssign.delete(this),o.applying&&o.pendingRecordNodes)for(let i of s)o.pendingRecordNodes.add(i);else o.pendingRecordNodes=new Set(s);ge(o),z(r)}return}return bn?bn.apply(this,n):void 0},Tr=!0}function kn(e,t){let n=e.manualAssign;if(!n||!n.size)return null;for(let[r,o]of n){let s=!1,i=o.filter(a=>{let c=a.deref();return c===void 0?!1:(c===t&&(s=!0),!0)});if(i.length!==o.length&&(i.length?n.set(r,i):n.delete(r)),s){let a=e.host;return a&&(r===a||a.contains(r))?r:null}}return null}function Zs(e){for(let t=e.parentElement;t;t=t.parentElement)if(t[S])return V(t,e)?t:null;return null}function gn(e){let t=e;for(let n=0;n<128;n++){let r=t.parentNode;if(!r||r===t)return!1;if(r.nodeType===11&&r.host)return!0;t=r}return!1}function En(e,t){if(e.getAttribute(L)!==F)return[];let n=Array.from(e.childNodes);return!t||!t.flatten?n:vn(n,new Set,0)}function vn(e,t,n){if(n>=Xs)return e.slice();let r=[];for(let o of e)if(o.nodeType===1&&o.tagName==="SLOT"){let s=o;if(t.has(s))continue;if(t.add(s),s.hasAttribute(E)){let i=En(s,{flatten:!1});if(i.length>0)for(let a of vn(i,t,n+1))r.push(a);else for(let a of vn(Array.from(s.childNodes),t,n+1))r.push(a)}else if(Ie){let i=Ie.call(s,{flatten:!0});for(let a of i)r.push(a)}else r.push(o)}else r.push(o);return r}function Nr(e){let t=e.parentElement;return t&&t.tagName==="SLOT"&&t.hasAttribute(E)&&t.getAttribute(L)===F?t:null}function W(e){let t=e,n=t[S];return n||(n={host:e,authored:[],assignedByName:new Map,lastSnapshot:new WeakMap},t[S]=n),n}function xn(e){return!!e[S]}function Rr(e){let t=W(e);for(;e.firstChild;){let n=e.firstChild;t.authored.push(n),g.add(n),e.removeChild(n)}ge(t)}function ge(e){let t=e.assignedByName;t.clear();for(let n of e.authored)ei(t,oe(e,n),n)}function oe(e,t){let n=kn(e,t);if(n)return D(n.getAttribute("name"));if(e.adoptedKey){let r=e.adoptedKey.get(t);if(r!==void 0)return r}return Lr(t)}function Or(e){let t=W(e);t.adopted=!0;let n=new Set,r=e.querySelectorAll(`slot[${E}]`);for(let o of r){let s=o;if(!V(e,s)||s.getAttribute(L)!==F||mt(t,e,s))continue;let i=D(s.getAttribute("name"));if(!n.has(i)){n.add(i);let a=Array.from(s.childNodes);for(let c of a)t.authored.push(c),Lr(c)!==i&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(c,i));t.lastSnapshot.set(s,a.slice())}}for(let o of e.querySelectorAll("wj-slot-park"))if(V(e,o)){for(let s of Array.from(o.childNodes))g.add(s),t.authored.push(s);o.remove()}ge(t)}function D(e){return e==null||e===""||e==="default"?null:e}function Lr(e){return e.nodeType!==1?null:D(e.getAttribute("slot"))}function ei(e,t,n){let r=e.get(t);r||(r=[],e.set(t,r)),r.push(n)}function ae(e,t,n){let r=W(e),o=D(t),s=Array.isArray(n)?n.filter(Boolean):n?[n]:[],i=r.authored.findIndex(c=>oe(r,c)===o),a=r.authored.filter(c=>oe(r,c)===o);r.authored=r.authored.filter(c=>oe(r,c)!==o),(i===-1||i>r.authored.length)&&(i=r.authored.length);for(let c of s)c.nodeType===1&&!kn(r,c)&&(o==null?c.removeAttribute("slot"):c.setAttribute("slot",o)),g.add(c);if(r.authored.splice(i,0,...s),r.applying&&r.pendingRecordNodes){for(let c of a)r.pendingRecordNodes.add(c);for(let c of s)r.pendingRecordNodes.add(c)}else r.pendingRecordNodes=new Set([...a,...s]);if(r.adoptedKey){for(let c of a)r.adoptedKey.delete(c);for(let c of s)r.adoptedKey.delete(c)}ge(r),z(e)}function ti(){X||!Q||(X=Node.prototype.appendChild,Mr=Node.prototype.insertBefore,be=Node.prototype.removeChild,Cn=Node.prototype.replaceChild,Pr=Element.prototype.append,Ir=Element.prototype.prepend,Dr=Element.prototype.replaceChildren,ut=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),Tn=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"))}function pt(e,t){let n=e[k];e[k]=!0;try{return t()}finally{e[k]=n,n||jn(e)}}function Fr(e){if(!Q)return;let t=e,n=W(e);n.backstop||(n.backstop=new MutationObserver(r=>ht(e,n,r)),n.backstop.observe(e,{childList:!0,subtree:!1}),n.flipSensor=new MutationObserver(r=>Br(e,r)),n.flipSensor.observe(e,{attributes:!0,attributeFilter:["slot","name"],subtree:!0}))}function ht(e,t,n){let r=e,o=r[ie],s=r[Symbol.for("webjs.instance")],i=!1,a=new Set;for(let c of n){for(let l of c.addedNodes)if(a.add(l),l!==o&&!(s&&Hr(s,l))){if(t.authored.indexOf(l)!==-1){i=!0;continue}g.add(l),t.authored.push(l),i=!0}for(let l of c.removedNodes){let u=t.authored.indexOf(l);if(u===-1||e.contains(l))continue;g.has(l)&&l.parentNode==null&&!a.has(l)||(t.authored.splice(u,1),i=!0)}}i&&z(e)}function jn(e){let t=e,n=t[S];if(!(n&&n.backstop))return;let r=n.backstop.takeRecords();(!(Symbol.for("webjs.instance")in t)||t[Symbol.for("webjs.instance")])&&ht(e,n,r)}function Br(e,t){let n=e[S];if(!n)return;let r=!1;for(let o of t){if(o.type!=="attributes")continue;let s=o.target;o.attributeName==="name"?s.tagName==="SLOT"&&s.hasAttribute(E)&&V(e,s)&&(r=!0):o.attributeName==="slot"&&(n.adoptedKey&&n.adoptedKey.delete(s),n.authored.indexOf(s)!==-1&&(r=!0))}r&&z(e)}function Ur(e){let t=e[S];t&&(t.backstop&&(ht(e,t,t.backstop.takeRecords()),t.backstop.disconnect(),t.backstop=void 0),t.flipSensor&&(Br(e,t.flipSensor.takeRecords()),t.flipSensor.disconnect(),t.flipSensor=void 0))}function $r(e){if(!Q)return;let t=e,n=t[S];if(!n)return;let r=t[Symbol.for("webjs.instance")],o=Symbol.for("webjs.instance")in t,s=!o&&n.adopted===!0,i=!1;for(let a of Array.from(e.childNodes))if(a!==t[ie]){if(n.authored.indexOf(a)!==-1){i=!0;continue}o&&(!r||Hr(r,a))||!o&&s||(g.add(a),n.authored.push(a),i=!0)}i&&z(e)}function Hr(e,t){if(!e||!e.startNode||!e.endNode)return!1;if(t===e.startNode||t===e.endNode)return!0;for(let n=e.startNode.nextSibling;n&&n!==e.endNode;n=n.nextSibling)if(n===t)return!0;return!1}function ni(e){let t=e,n=t[ie];return(!n||!n.isConnected)&&(n||(n=e.ownerDocument.createElement("wj-slot-park"),n.setAttribute("hidden",""),n.style.display="none",t[ie]=n),pt(e,()=>X.call(e,n))),n}function se(e){return e instanceof Node||!!(e&&typeof e=="object"&&e.ownerDocument&&e.ownerDocument.defaultView&&e instanceof e.ownerDocument.defaultView.Node)}function _n(e,t,n){if(n&&!se(t))return[e.ownerDocument.createTextNode(`${t}`)];if(!se(t))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");if(t&&t.nodeType===11){let r=Array.from(t.childNodes);ft(e,r);for(let o of r)be.call(t,o);return r}return ft(e,[t]),[t]}function ft(e,t){ye(e,t);for(let n of t){if(!se(n))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");let r=n.nodeType;if(r!==1&&r!==3&&r!==4&&r!==7&&r!==8&&r!==11)throw new DOMException("Failed to execute insertion on the host: the node type may not be inserted here.","HierarchyRequestError")}}function ye(e,t){for(let n of t)if(n===e||n.nodeType===1&&n.contains(e))throw new DOMException("Failed to execute insertion on the host: the new child contains the parent.","HierarchyRequestError")}function wn(e,t,n){let r=e.authored;for(let s of t){let i=r.indexOf(s);i!==-1&&r.splice(i,1)}let o=n==null?r.length:r.indexOf(n);o===-1&&(o=r.length),r.splice(o,0,...t)}function qr(e,t){let n=e[S];return n?mt(n,e,t):!1}function mt(e,t,n){for(let r=n;r&&r!==t;r=r.parentNode)if(e.authored.indexOf(r)!==-1)return!0;return!1}function Sn(e,t){if(g.has(t))return!0;let n=t.parentNode;if(n==null)return!1;if(n===e||n===e[ie])return!0;let r=e[S];return n.nodeType===1&&n.tagName==="SLOT"&&n.hasAttribute(E)&&(r&&r.lastSnapshot.has(n)||e.contains(n)&&V(e,n))}function An(e,t){let n=[];for(let s of t)se(s)?s.nodeType===11?n.push({frag:s}):n.push({node:s}):n.push({text:`${s}`});for(let s of n)s.frag?ye(e,Array.from(s.frag.childNodes)):s.node&&ft(e,[s.node]);let r=e.ownerDocument.createDocumentFragment();for(let s of n)if(s.text!==void 0)X.call(r,e.ownerDocument.createTextNode(s.text));else if(s.frag){let i=Array.from(s.frag.childNodes);ft(e,i);for(let a of i)X.call(r,a)}else s.node&&(ye(e,[s.node]),X.call(r,s.node));let o=Array.from(r.childNodes);ye(e,o);for(let s of o)be.call(r,s);return o}function q(e,t,n){if(t.applying&&t.pendingRecordNodes)for(let r of n||[])t.pendingRecordNodes.add(r);else t.pendingRecordNodes=new Set(n||[]);if(t.adoptedKey&&n)for(let r of n)t.adoptedKey.delete(r);ge(t),z(e)}function Vr(e){if(!Q)return;let t=e;if(t[kr])return;ti(),t[kr]=!0;let n=W(e);t.appendChild=function(r){if(t[k])return X.call(this,r);let o=_n(e,r,!1);for(let s of o)g.add(s);return wn(n,o,null),q(e,n,o),r},t.insertBefore=function(r,o){if(t[k])return Mr.call(this,r,o);if(!se(r))throw new TypeError("Failed to execute insertBefore on the host: parameter 1 is not of type Node.");if(o!=null&&!se(o))throw new TypeError("Failed to execute insertBefore on the host: parameter 2 is not of type Node.");if(ye(e,r.nodeType===11?Array.from(r.childNodes):[r]),o!=null&&(n.authored.indexOf(o)===-1||!Sn(e,o)))throw new DOMException("insertBefore: reference node is not an assigned child of this host","NotFoundError");if(r===o)return r;let s=_n(e,r,!1);for(let i of s)g.add(i);return wn(n,s,o||null),q(e,n,s),r},t.removeChild=function(r){if(t[k])return be.call(this,r);let o=n.authored.indexOf(r);if(o===-1)return be.call(this,r);if(!Sn(e,r))throw new DOMException("removeChild: the node is not an assigned child of this host","NotFoundError");return n.authored.splice(o,1),q(e,n,[r]),r},t.replaceChild=function(r,o){if(t[k])return Cn.call(this,r,o);if(n.authored.indexOf(o)===-1)return Cn.call(this,r,o);if(!se(r))throw new TypeError("Failed to execute replaceChild on the host: parameter 1 is not of type Node.");if(ye(e,r.nodeType===11?Array.from(r.childNodes):[r]),!Sn(e,o))throw new DOMException("replaceChild: the node to be replaced is not an assigned child of this host","NotFoundError");if(r===o)return o;let i=_n(e,r,!1);for(let c of i)g.add(c);for(let c of i){if(c===o)continue;let l=n.authored.indexOf(c);l!==-1&&n.authored.splice(l,1)}let a=n.authored.indexOf(o);return n.authored.splice(a,1,...i),q(e,n,[...i,o]),o},t.append=function(...r){if(t[k])return Pr.apply(this,r);let o=An(e,r);for(let s of o)g.add(s);wn(n,o,null),q(e,n,o)},t.prepend=function(...r){if(t[k])return Ir.apply(this,r);let o=An(e,r);for(let s of o)g.add(s);for(let s of o){let i=n.authored.indexOf(s);i!==-1&&n.authored.splice(i,1)}n.authored.unshift(...o),q(e,n,o)},t.replaceChildren=function(...r){if(t[k])return Dr.apply(this,r);let o=An(e,r);for(let i of o)g.add(i);let s=n.authored;n.authored=o.slice(),q(e,n,[...s,...o])},Object.defineProperty(t,"innerHTML",{configurable:!0,get(){return ut.get.call(this)},set(r){if(t[k]){ut.set.call(this,r);return}let o=e.ownerDocument.createElement("div");ut.set.call(o,r===null?"":`${r}`);let s=Array.from(o.childNodes);for(let a of s)g.add(a);let i=n.authored;n.authored=s,q(e,n,[...i,...s])}}),Object.defineProperty(t,"textContent",{configurable:!0,get(){return Tn.get.call(this)},set(r){if(t[k]){Tn.set.call(this,r);return}let o=r==null||r===""?[]:[e.ownerDocument.createTextNode(`${r}`)];for(let i of o)g.add(i);let s=n.authored;n.authored=o,q(e,n,[...s,...o])}})}function z(e){if(!Q)return;let t=e[S];if(t){if(t.applying){t.reapply=!0;return}t.applying=!0;try{do{t.reapply=!1;let n=t.pendingRecordNodes||ri;t.pendingRecordNodes=void 0,oi(e,t,n),si(e,t),ge(t);let r=[],o=new Set;for(let u of e.querySelectorAll(`slot[${E}]`))if(V(e,u)&&!mt(t,e,u)){if(!u.hasAttribute(L)&&!(De in u)){o.add(D(u.getAttribute("name")));continue}r.push(u)}let s=new Map;for(let u of r){let f=D(u.getAttribute("name")),d=s.get(f);d||(d=[],s.set(f,d)),d.push(u)}let i=[];for(let[u,f]of s){let d=t.assignedByName.get(u)||[];for(let h=0;h<f.length;h++){let m=f[h],w=d.filter(p=>{let j=kn(t,p);return j?j===m:h===0}),y=w.filter(p=>p===e||p.nodeType===1&&p.contains(e));if(y.length){for(let p of y)g.delete(p);w=w.filter(p=>y.indexOf(p)===-1)}w.length>0?ai(t,m,w)&&i.push(m):ci(t,m)&&i.push(m)}}for(let u of i)ui(t,u);let a=new Set(s.keys());for(let u of o)a.add(u);let c=new Set;for(let u of t.authored)a.has(oe(t,u))||c.add(u);let l=e[ie];if(l)for(let u of Array.from(l.childNodes))c.has(u)||be.call(l,u);if(c.size){let u=ni(e);for(let f of c)f.parentNode!==u&&(g.delete(f),pt(e,()=>X.call(u,f)))}if(t.backstop){let u=t.backstop.takeRecords();u.length&&ht(e,t,u)}}while(t.reapply)}finally{t.applying=!1}}}function oi(e,t,n){for(let r of e.querySelectorAll(`slot[${E}][${L}="${F}"]`)){if(!V(e,r)||mt(t,e,r))continue;let o=r,s=t.lastSnapshot.get(o);if(!s)continue;let i=Array.from(o.childNodes);if(Nn(i,s))continue;let a=t.authored,c=D(o.getAttribute("name")),l=i.filter(m=>!n.has(m));for(let m of l)a.indexOf(m)===-1&&oe(t,m)!==c&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(m,c));for(let m of a){if(l.indexOf(m)!==-1||oe(t,m)!==c)continue;let w=a.indexOf(m),y=0;for(let p=0;p<l.length;p++){let j=a.indexOf(l[p]);j!==-1&&j<w&&(y=p+1)}l.splice(y,0,m)}let u=new Set(l);for(let m of s)u.add(m);let f=-1,d=0;for(let m of a){if(u.has(m)){f===-1&&(f=d);continue}d+=1}let h=a.filter(m=>!u.has(m));(f===-1||f>h.length)&&(f=h.length),h.splice(f,0,...l),t.authored=h}}function si(e,t){let n=e[ie];t.authored=t.authored.filter(r=>{if(g.has(r))return!0;let o=r.parentNode;return o==null?!1:!!(o===e||o===n||o.nodeType===1&&o.tagName==="SLOT"&&o.hasAttribute(E)&&(t.lastSnapshot.has(o)||e.contains(o)&&V(e,o)))})}function Wr(e){if(!Q)return!1;for(let t of e.querySelectorAll(`slot[${E}][${L}]`))if(V(e,t))return!0;return!1}function V(e,t){let n=t[dt];if(n)return n===e;let r=typeof t.getAttribute=="function"?t.getAttribute(Js):null;if(r){let o=ii(t,r);if(o)return o===e}for(let o=t.parentElement;o&&o!==e;o=o.parentElement)if(o.tagName.includes("-"))return!1;return!0}function ii(e,t){let n=t.toLowerCase();for(let r=e.parentElement;r;r=r.parentElement)if(r.tagName.toLowerCase()===n)return r;return null}function ai(e,t,n){for(let l of n)g.delete(l);let r=t.getAttribute(L)!==F,o=e.lastSnapshot.get(t)||[],s=r||!Nn(o,n);if(!r&&Nn(Array.from(t.childNodes),n))return e.lastSnapshot.set(t,n.slice()),s;let i=t[De];if(r&&i)for(;t.firstChild;)i.appendChild(t.firstChild);let a=new Set(n);for(let l of Array.from(t.childNodes))a.has(l)||t.removeChild(l);let c=t.firstChild;for(let l of n){if(l===c){c=c.nextSibling;continue}t.insertBefore(l,c)}return t.setAttribute(L,F),e.lastSnapshot.set(t,n.slice()),s}function ci(e,t){let n=t.getAttribute(L)===F;if(t.setAttribute(L,Gs),!n)return xr(t),!1;for(e.lastSnapshot.delete(t);t.firstChild;)t.removeChild(t.firstChild);return xr(t),!0}function xr(e){let t=e[De];!t||t.childNodes.length===0||e.appendChild(t)}function zr(e,t){if(!xn(e))return;let n=W(e),r=D(t.getAttribute("name")),o=n.assignedByName.get(r);if(o)for(let s of o)s.parentNode===t&&(g.add(s),t.removeChild(s));n.lastSnapshot.delete(t)}function li(e){e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1}))}function ui(e,t){e.pendingSlotChanges||(e.pendingSlotChanges=new Set),e.pendingSlotChanges.add(t),!e.slotChangeScheduled&&(e.slotChangeScheduled=!0,queueMicrotask(()=>{e.slotChangeScheduled=!1;let n=e.pendingSlotChanges||new Set;e.pendingSlotChanges=new Set;for(let r of n)li(r)}))}function Nn(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Q,S,E,L,F,Gs,De,dt,Js,Xs,Ie,yn,lt,bn,Tr,k,kr,ie,g,X,Mr,be,Cn,Pr,Ir,Dr,ut,Tn,ri,yt=G(()=>{Q=jr(),S=Symbol("webjs.slot.state"),E="data-webjs-light",L="data-projection",F="actual",Gs="fallback",De=Symbol("webjs.slot.fallbackFrag"),dt=Symbol("webjs.slot.templateOwner"),Js="data-wj-slot-owner",Xs=64,Ie=null,yn=null,lt=null,bn=null,Tr=!1;Qs();k=Symbol("webjs.slot.rendering"),kr=Symbol("webjs.slot.intercepted"),ie=Symbol("webjs.slot.park"),g=new WeakSet,X=null,Mr=null,be=null,Cn=null,Pr=null,Ir=null,Dr=null,ut=null,Tn=null;ri=new Set});function ao(e,t,n){Fi.has(t)?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}async function Pn(e){return JSON.stringify(await co(e))}function le(e){return lo(JSON.parse(e))}async function co(e){let t=Bi();return await Ui(e,t),ce(e,t)}function lo(e){return ee(e,Vi())}function Bi(){return{refCount:new Map,idOf:new Map,emitted:new Set,nextId:0,blobBytes:new Map,fdEntries:new Map}}async function Ui(e,t){let n=[e];for(;n.length;){let r=n.pop();if(!zi(r))continue;let o=t.refCount.get(r)||0;if(t.refCount.set(r,o+1),!(o>0)){if(typeof Blob<"u"&&r instanceof Blob){let s=new Uint8Array(await r.arrayBuffer());t.blobBytes.set(r,s);continue}if(typeof FormData<"u"&&r instanceof FormData){let s=t.fdEntries.get(r)||[...r.entries()];t.fdEntries.set(r,s);for(let[,i]of s)typeof i!="string"&&n.push(i);continue}if(Array.isArray(r))for(let s=0;s<r.length;s++)n.push(r[s]);else if(r instanceof Map)for(let[s,i]of r)n.push(s),n.push(i);else if(r instanceof Set)for(let s of r)n.push(s);else if(Ki(r))for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&n.push(r[s])}}for(let[r,o]of t.refCount)o>1&&t.idOf.set(r,t.nextId++)}function ce(e,t){if(e===null)return null;if(e===void 0)return{[_]:"undef"};let n=typeof e;if(n==="string"||n==="boolean")return e;if(n==="number")return Number.isNaN(e)?{[_]:"NaN"}:e===1/0?{[_]:"Inf"}:e===-1/0?{[_]:"-Inf"}:Object.is(e,-0)?{[_]:"-0"}:e;if(n==="bigint")return{[_]:"BigInt",v:e.toString()};if(n==="symbol"){let s=Symbol.keyFor(e);if(s===void 0)throw new TypeError("Cannot serialize a local Symbol; only Symbol.for() registered symbols are supported.");return{[_]:"Sym",v:s}}if(n==="function")throw new TypeError("Cannot serialize a function.");let r=t.idOf.get(e);if(r!==void 0&&t.emitted.has(r))return{[_]:"Ref",v:r};r!==void 0&&t.emitted.add(r);let o;if(e instanceof Date)o={[_]:"Date",v:Number.isNaN(e.getTime())?null:e.toISOString()};else if(e instanceof Error)o={[_]:"Error",v:{name:e.name,message:e.message,stack:e.stack||null}};else if(typeof Blob<"u"&&e instanceof Blob){let s=t.blobBytes.get(e);typeof File<"u"&&e instanceof File?o={[_]:"File",v:$e(s),n:e.name,t:e.type||"",m:e.lastModified}:o={[_]:"Blob",v:$e(s),t:e.type||""}}else if(typeof FormData<"u"&&e instanceof FormData){let s=t.fdEntries.get(e)||[...e.entries()],i=[];for(let[a,c]of s)i.push([a,ce(c,t)]);o={[_]:"FD",v:i}}else if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)o=$i(e);else if(e instanceof Map){let s=[];for(let[i,a]of e)s.push([ce(i,t),ce(a,t)]);o={[_]:"Map",v:s}}else if(e instanceof Set){let s=[];for(let i of e)s.push(ce(i,t));o={[_]:"Set",v:s}}else if(Array.isArray(e))o=e.map(s=>ce(s,t));else{o={};for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=Yi(s)?"_"+s:s;ao(o,i,ce(e[s],t))}}if(r!==void 0){if(Array.isArray(o))return{[_]:"Arr",_id:r,v:o};o._id=r}return o}function $i(e){if(e instanceof ArrayBuffer)return{[_]:"buf",v:$e(new Uint8Array(e))};if(e instanceof DataView)return{[_]:"dv",v:$e(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))};let t=e.constructor.name,n=Hi[t];if(!n)throw new TypeError(`Unsupported typed array: ${t}`);let r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return{[_]:n,v:$e(r)}}function Vi(){return{refs:new Map}}function ee(e,t){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){let s=[];for(let i=0;i<e.length;i++)s.push(ee(e[i],t));return s}let n=e[_];if(typeof n=="string")return Wi(e,n,t);let r={},o=e._id;typeof o=="number"&&t.refs.set(o,r);for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||s==="_id")continue;let i=Gi(s)?s.slice(1):s;ao(r,i,ee(e[s],t))}return r}function Wi(e,t,n){let r=e._id,o=s=>(typeof r=="number"&&n.refs.set(r,s),s);switch(t){case"undef":return;case"NaN":return NaN;case"Inf":return 1/0;case"-Inf":return-1/0;case"-0":return-0;case"BigInt":return o(BigInt(e.v));case"Sym":return o(Symbol.for(e.v));case"Date":return o(e.v==null?new Date(NaN):new Date(e.v));case"Error":{let s=new Error(e.v.message);return s.name=e.v.name,e.v.stack&&(s.stack=e.v.stack),typeof r=="number"&&n.refs.set(r,s),s}case"Map":{let s=new Map;typeof r=="number"&&n.refs.set(r,s);for(let[i,a]of e.v)s.set(ee(i,n),ee(a,n));return s}case"Set":{let s=new Set;typeof r=="number"&&n.refs.set(r,s);for(let i of e.v)s.add(ee(i,n));return s}case"Arr":{let s=[];typeof r=="number"&&n.refs.set(r,s);for(let i of e.v)s.push(ee(i,n));return s}case"Ref":{let s=n.refs.get(e.v);if(s===void 0)throw new TypeError(`Dangling reference: id=${e.v}`);return s}case"Blob":{if(typeof Blob>"u")throw new TypeError("Blob is not available in this environment.");let s=Ue(e.v);return o(new Blob([s],{type:e.t||""}))}case"File":{if(typeof File>"u")throw new TypeError("File is not available in this environment.");let s=Ue(e.v);return o(new File([s],e.n,{type:e.t||"",lastModified:e.m}))}case"FD":{if(typeof FormData>"u")throw new TypeError("FormData is not available in this environment.");let s=new FormData;o(s);for(let[i,a]of e.v){let c=ee(a,n);s.append(i,c)}return s}default:{if(t==="buf"){let i=Ue(e.v);return o(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength))}if(t==="dv"){let i=Ue(e.v);return o(new DataView(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)))}let s=qi[t];if(s){let i=Ue(e.v),a=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);return o(new s(a))}throw new TypeError(`Unknown serialization tag: ${t}`)}}}function zi(e){return e!==null&&typeof e=="object"}function Ki(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Yi(e){return/^_+\$wj$/.test(e)||/^_+id$/.test(e)}function Gi(e){return/^__+\$wj$/.test(e)||/^__+id$/.test(e)}function $e(e){if(uo)return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64");let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ue(e){if(uo){let r=Buffer.from(e,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}var _,Fi,Hi,qi,uo,He=G(()=>{_="_$wj",Fi=new Set(["__proto__","constructor","prototype"]);Hi={Int8Array:"i8",Uint8Array:"u8",Uint8ClampedArray:"u8c",Int16Array:"i16",Uint16Array:"u16",Int32Array:"i32",Uint32Array:"u32",Float32Array:"f32",Float64Array:"f64",BigInt64Array:"bi64",BigUint64Array:"bu64"},qi={i8:Int8Array,u8:Uint8Array,u8c:Uint8ClampedArray,i16:Int16Array,u16:Uint16Array,i32:Int32Array,u32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:typeof BigInt64Array<"u"?BigInt64Array:null,bu64:typeof BigUint64Array<"u"?BigUint64Array:null};uo=typeof Buffer<"u"&&typeof Buffer.from=="function"});var Eo={};br(Eo,{observeLazy:()=>ma,observeViewportOnce:()=>ga});function Ao(e){let t=Fn.get(e);return t||(t=import(e).finally(()=>Fn.delete(e)),Fn.set(e,t),t)}function ma(e){for(let[t,n]of Object.entries(e))ue.set(t.toLowerCase(),n);if(typeof IntersectionObserver>"u"){for(let t of ue.values())Ao(t);ue.clear();return}Ve||(Ve=new IntersectionObserver(ya,{rootMargin:"200px"})),So(),typeof MutationObserver<"u"&&new MutationObserver(()=>So()).observe(document.body,{childList:!0,subtree:!0})}function So(){if(!(!Ve||!ue.size))for(let e of ue.keys())for(let t of document.querySelectorAll(e))Ve.observe(t)}function ya(e){for(let t of e){if(!t.isIntersecting)continue;let n=t.target.tagName.toLowerCase(),r=ue.get(n);r&&(Ao(r),ue.delete(n),Ve?.unobserve(t.target))}}function ba(e){for(let t of e){if(!t.isIntersecting)continue;let n=Nt.get(t.target);Nt.delete(t.target),qe?.unobserve(t.target),n&&n()}}function ga(e,t){return typeof IntersectionObserver>"u"?(t(),()=>{}):(qe||(qe=new IntersectionObserver(ba,{rootMargin:"200px"})),Nt.set(e,t),qe.observe(e),()=>{Nt.delete(e),qe?.unobserve(e)})}var ue,Ve,Fn,qe,Nt,vo=G(()=>{ue=new Map,Ve=null,Fn=new Map;qe=null,Nt=new WeakMap});var Bn,Un=G(()=>{Bn=typeof HTMLElement<"u"?class extends HTMLElement{constructor(){super(),this._webjsLoadedSrc=null,this._webjsLazyTeardown=null}static get observedAttributes(){return["src"]}connectedCallback(){this._webjsScheduleLoad()}disconnectedCallback(){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null)}attributeChangedCallback(t,n,r){t==="src"&&this.isConnected&&this._webjsScheduleLoad()}_webjsScheduleLoad(){let t=this.getAttribute("src");if(!t){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),this._webjsLoadedSrc=null;return}let n=t;try{n=new URL(t,location.href).href}catch{}if(n===this._webjsLoadedSrc)return;this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),(this.getAttribute("loading")||"eager").toLowerCase()==="lazy"?(this._webjsLoadedSrc=n,Promise.resolve().then(()=>(vo(),Eo)).then(({observeViewportOnce:o})=>{this._webjsLoadedSrc!==n||!this.isConnected||(this._webjsLazyTeardown=o(this,()=>{this._webjsLazyTeardown=null,this._webjsLoad(n)}))})):(this._webjsLoadedSrc=n,this._webjsLoad(n))}_webjsLoad(t){Promise.resolve().then(()=>(kt(),Co)).then(({loadFrame:n})=>{this._webjsLoadedSrc!==t||!this.isConnected||n(this,t)})}}:null;typeof customElements<"u"&&Bn&&!customElements.get("webjs-frame")&&customElements.define("webjs-frame",Bn)});function wa(e,t,n){switch(e){case"append":n&&t.append(n);break;case"prepend":n&&t.prepend(n);break;case"before":n&&t.before(n);break;case"after":n&&t.after(n);break;case"replace":n&&t.replaceWith(n);break;case"update":n&&t.replaceChildren(n);break;case"remove":t.remove();break;default:break}}function Hn(e,t){let n=t||(typeof document<"u"?document:null);if(!n)return;let r=null;if(typeof e=="string"){let s=n.createElement("template");s.innerHTML=e,r=s.content}else if(e&&e.nodeType)r=e;else return;let o=r.querySelectorAll?Array.from(r.querySelectorAll("webjs-stream")):[];if(o.length)for(let s of o)n.body.append(s);else n.body.append(r)}var _a,$n,xt=G(()=>{_a=new Set(["append","prepend","before","after","replace","update"]);$n=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this._webjsApplied||(this._webjsApplied=!0,this._webjsApply())}_webjsApply(){let t=(this.getAttribute("action")||"").toLowerCase(),n=this.ownerDocument||document,r=[],o=this.getAttribute("target");if(o){let i=n.getElementById(o);i&&(r=[i])}else{let i=this.getAttribute("targets");if(i)try{r=Array.from(n.querySelectorAll(i))}catch{r=[]}}let s=_a.has(t)?this.querySelector("template"):null;try{for(let i of r){let a=s?s.content.cloneNode(!0):null;wa(t,i,a)}}finally{this.remove()}}}:null;typeof customElements<"u"&&$n&&!customElements.get("webjs-stream")&&customElements.define("webjs-stream",$n)});var To,No=G(()=>{To=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this.style.display||(this.style.display="contents")}}:null;typeof customElements<"u"&&To&&!customElements.get("webjs-suspense")&&customElements.define("webjs-suspense",To)});function jt(e){let t=e||(typeof document<"u"?document:null);if(!(!t||typeof t.querySelectorAll!="function")){for(let n of t.querySelectorAll('script[type="application/json"]#__webjs-seeds, script[type="application/json"][data-webjs-seeds]'))xo(n.textContent,n);for(let n of t.querySelectorAll("[data-webjs-seed]"))xo(n.getAttribute("data-webjs-seed"),n,()=>n.removeAttribute("data-webjs-seed"))}}function xo(e,t,n){if(e)try{let r=le(e);if(r&&typeof r=="object")for(let o in r)We.has(o)||We.set(o,r[o])}catch{}n?n():t.remove?.()}function Sa(e,t,n){ko||(ko=!0,jt());let r=`${e}/${t}/${n}`;if(We.has(r)){let o=We.get(r);return We.delete(r),o}return jo}var We,jo,ko,qn=G(()=>{He();We=new Map,jo=Symbol("webjs.seed.miss"),ko=!1});var Co={};br(Co,{_FRAME_TOP:()=>Vo,_LIVE_ATTRS:()=>Xn,_activeFrameId:()=>qo,_addNewHeadElements:()=>Zn,_applyStreamedResolve:()=>ds,_applySwap:()=>lr,_blurOutgoingFocus:()=>Mt,_buildHaveHeader:()=>ir,_buildSubmitFormData:()=>$o,_bumpNavToken:()=>tc,_clearFormBusy:()=>os,_clearFrameBusy:()=>ns,_collectBoundaries:()=>xe,_currentPageUrl:()=>nc,_diffElementInPlace:()=>$t,_eligibleAnchorHref:()=>It,_findAnchorInPath:()=>Ho,_getSubmitAction:()=>Uo,_getSubmitMethod:()=>Bo,_isNonHtmlPath:()=>ic,_keyOf:()=>ke,_markFormBusy:()=>rs,_markFrameBusy:()=>ts,_mergeHead:()=>ls,_navToken:()=>ec,_onPopState:()=>nr,_onSubmit:()=>rr,_parseHTML:()=>er,_planBoundarySwap:()=>zo,_prefetch:()=>je,_prefetchCache:()=>v,_prefetchHasHoverPointer:()=>Jo,_prefetchInflightSize:()=>Qa,_prefetchMode:()=>Dt,_prefetchPeek:()=>Xa,_prefetchSaysSaveData:()=>ar,_prefetchSuppressed:()=>Xo,_prefetchTake:()=>Qo,_reactivateScripts:()=>Je,_readStreamedShell:()=>us,_reconcileChildren:()=>Yt,_regraftPermanentElements:()=>is,_regraftPermanentInSlice:()=>Kt,_resetParseProbe:()=>Ea,_resetPrefetch:()=>Za,_resetWarnOnce:()=>oc,_resolveTargetFrameId:()=>or,_restoreOptimistic:()=>ze,_runWithTransition:()=>Ot,_setCurrentPageUrl:()=>rc,_shouldFullLoadDuringParse:()=>sc,_snapshotCache:()=>x,_streamBoundariesProgressively:()=>ps,_takeResolveUnit:()=>fs,_viewTransitionsEnabled:()=>ss,collectBoundaries:()=>xe,disableClientRouter:()=>Po,enableClientRouter:()=>tr,loadFrame:()=>Ta,navigate:()=>Io,planBoundarySwap:()=>zo,revalidate:()=>Do});function er(e){if(!/^\s*(?:<!doctype|<html)/i.test(e)&&typeof document<"u"&&document.implementation)try{let n=document.implementation.createHTMLDocument();if(typeof n.body.setHTMLUnsafe=="function")n.body.setHTMLUnsafe(e);else{let r=n.createElement("template");r.innerHTML=e,n.body.appendChild(r.content)}return n}catch{}return typeof Document<"u"&&typeof Document.parseHTMLUnsafe=="function"&&Aa()?Document.parseHTMLUnsafe(e):va(e)}function Aa(){if(Ee!==null)return Ee;try{Ee=Document.parseHTMLUnsafe("<!doctype html><body><!--c--><i></i>")?.body?.firstChild?.nodeType===8}catch{Ee=!1}return Ee}function Ea(){Ee=null}function va(e){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(e,"text/html")}function Ca(){Vn||typeof MutationObserver>"u"||typeof customElements>"u"||(Vn=new MutationObserver(e=>{for(let t of e)for(let n of t.addedNodes){if(n.nodeType!==1)continue;let r=n;r.tagName?.includes("-")&&customElements.upgrade(r);for(let o of r.querySelectorAll("*"))o.tagName?.includes("-")&&customElements.upgrade(o)}}),Vn.observe(document.body,{childList:!0,subtree:!0}))}function tr(){ne||typeof document>"u"||(ne=!0,document.addEventListener("click",Fo,!1),document.addEventListener("submit",rr,!1),window.addEventListener("popstate",nr),document.addEventListener("pointerover",Ne,!0),document.addEventListener("focusin",Ne,!0),document.addEventListener("touchstart",Ne,{capture:!0,passive:!0}),document.addEventListener("pointerout",Zo,!0),document.addEventListener("webjs:navigate",Jn),Ca(),Jn(),typeof history<"u"&&"scrollRestoration"in history&&(Rt=history.scrollRestoration,history.scrollRestoration="manual"),typeof location<"u"&&(H=location.href))}function Po(){ne&&(ne=!1,document.removeEventListener("click",Fo,!1),document.removeEventListener("submit",rr,!1),window.removeEventListener("popstate",nr),document.removeEventListener("pointerover",Ne,!0),document.removeEventListener("focusin",Ne,!0),document.removeEventListener("touchstart",Ne,{capture:!0}),document.removeEventListener("pointerout",Zo,!0),document.removeEventListener("webjs:navigate",Jn),zt(),cr(),te&&(te.disconnect(),te=null),typeof history<"u"&&Rt!==null&&(history.scrollRestoration=Rt,Rt=null),H=null)}async function Io(e,t){let n=new URL(e,location.href);if(n.origin!==location.origin){location.href=e;return}await sr(n.href,t?.replace??!1,null)}async function Ta(e,t){if(typeof location>"u")return{ok:!1,status:null,aborted:!1};let n=e&&e.id;if(!n)return{ok:!1,status:null,aborted:!1};let r=new URL(t,location.href);if(r.origin!==location.origin)return{ok:!1,status:null,aborted:!1};M&&M.abort(),M=new AbortController;let o=M.signal,s=++C;return Ft(r.href,n,!1,null,"GET",null,o,s)}function Do(e){if(!e){x.clear(),v.clear();return}let t=new URL(e,location.href),n=t.pathname+t.search;x.delete(n),v.delete(n)}function Fo(e){if(!ne||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=Ho(e);if(!t||t.hasAttribute("download")||t.hasAttribute("data-no-router")||t.target&&t.target!=="_self")return;let n=t.href;if(!n)return;let r=new URL(n);if(r.origin!==location.origin||r.pathname===location.pathname&&r.search===location.search&&r.hash||Vt.test(r.pathname))return;e.preventDefault();let o=or(t);sr(n,!1,o)}function nr(e){sr(location.href,!0,null)}function rr(e){if(!ne||e.defaultPrevented)return;let t=e.target;if(!t||t.nodeType!==1||t.tagName!=="FORM"||t.hasAttribute("data-no-router"))return;let n=e.submitter??null;if(n&&n.hasAttribute("data-no-router"))return;let r=n&&n.getAttribute("formtarget")||t.getAttribute("target")||"";if(r&&r!=="_self")return;let o=Bo(t,n);if(o==="dialog")return;let s=Uo(t,n),i;try{i=new URL(s,location.href)}catch{return}if(i.origin!==location.origin||Vt.test(i.pathname))return;let a=$o(t,n);e.preventDefault();let c=or(n||t);ja(i.href,o,a,c,t)}function Bo(e,t){return(t&&t.getAttribute("formmethod")||e.getAttribute("method")||"get").toLowerCase()}function Uo(e,t){return t&&t.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||e.action||location.href}function $o(e,t){try{return new FormData(e,t||void 0)}catch{let n=new FormData(e);return t&&t.getAttribute("name")&&n.append(t.getAttribute("name"),t.getAttribute("value")||""),n}}function Ho(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return null}function qo(e){let t=e;for(;t;){let n=t.closest("webjs-frame");if(n&&n.id)return n.id;let r=t.getRootNode();if(r&&r.host)t=r.host;else break}return null}function or(e){if(!e)return null;let t=e.closest&&e.closest("[data-webjs-frame]"),n=t?t.dataset?t.dataset.webjsFrame:t.getAttribute("data-webjs-frame"):null;if(n!=null&&n!==""){if(n===Vo)return null;let r=typeof document<"u"?document.getElementById(n):null;return r&&r.tagName&&r.tagName.toLowerCase()==="webjs-frame"?n:(Wt(`webjs:frame-unresolved:${n}`,`[webjs] data-webjs-frame="${n}" did not match a live <webjs-frame id="${n}">; performing a normal navigation instead.`),null)}return qo(e)}function Wt(e,t){zn.has(e)||(zn.add(e),typeof console<"u"&&console.warn&&console.warn(t))}function Wo(e,t){return!e&&!t&&typeof document<"u"&&document.readyState==="loading"}function Kn(e,t){typeof process<"u"&&process.env||Wt(`fallback:${e}`,`[webjs] client router fell back to a full page load (${e}) navigating to ${t}. This is correct (no DOM corruption), just not a soft nav.`)}function Na(e){typeof process<"u"&&process.env||Wt(`stream-drop:${e}`,`[webjs] dropped a streamed Suspense resolve for "${e}": no #${e} boundary in the DOM. Benign if this navigation was superseded or degraded. A stuck skeleton here means the shell swap did not place the boundary.`)}function Oo(){if(typeof process<"u"&&process.env||Yn||typeof document>"u"||typeof getComputedStyle!="function")return;let e=document.documentElement;if(!e)return;Yn=!0;let t;try{t=getComputedStyle(e).scrollBehavior}catch{return}t==="smooth"&&Wt("scroll-behavior-smooth-html","[webjs] Detected `scroll-behavior: smooth` on <html>. The client router scrolls to the top instantly on navigation (like a native page load), so route transitions are not affected by it. It still applies to in-page #anchor links. Pairing it with a sticky `backdrop-filter` header can also flash on iOS during navigation.")}function Pt(e){if(typeof document>"u")return;let t=document.documentElement;if(!(!t||!t.hasAttribute("data-webjs-nav-progress")))try{e?t.setAttribute("data-navigating",""):t.removeAttribute("data-navigating")}catch{}}function xe(e){let t=new Map,n=[],r=!1;function o(s){if(!r){if(s.nodeType===8){let i=s.data.trim();if(i.startsWith("wj:children:")){let a=i.slice(12),c=a.lastIndexOf(":");if(c<=0||c===a.length-1){r=!0;return}let l=a.slice(0,c),u=a.slice(c+1);if(t.has(l)||n.some(f=>f.segment===l)){r=!0;return}n.push({segment:l,routeKey:u,start:s});return}if(i.startsWith("/wj:children")){let a=i.slice(12).replace(/^:/,""),c=n.pop();if(!c||c.segment!==a){r=!0;return}if(c.start.parentNode!==s.parentNode){r=!0;return}{let l=c.start.parentNode.tagName;if(l==="TABLE"||l==="TBODY"||l==="THEAD"||l==="TFOOT"||l==="TR"){r=!0;return}}t.set(c.segment,{routeKey:c.routeKey,start:c.start,end:s});return}return}if(s.hasChildNodes&&s.hasChildNodes())for(let i=s.firstChild;i&&!r;i=i.nextSibling)o(i)}}return o(e),r||n.length>0?null:t}function zo(e,t){let n=[...e.keys()].filter(i=>t.has(i)).sort((i,a)=>i.length-a.length);if(n.length===0)return null;for(let i of n)if(e.get(i).routeKey!==t.get(i).routeKey){let a=null;for(let c of n){if(c===i)break;i.startsWith(c==="/"?c:c+"/")&&(a=c)}return a?{mode:"replace",segment:a,live:e.get(a),incoming:t.get(a)}:null}let r=n[n.length-1],o=i=>{let a=null;for(let c of i.keys())(a===null||c.length>a.length)&&(a=c);return a};return{mode:o(e)===r&&o(t)===r?"morph":"replace",segment:r,live:e.get(r),incoming:t.get(r)}}function Ko(e){let t=pe(e);document.dispatchEvent(new CustomEvent("webjs:before-cache",{detail:{url:e}})),x.has(t)&&x.delete(t);let n={html:document.documentElement.outerHTML,scrollX:typeof window<"u"&&window.scrollX||0,scrollY:typeof window<"u"&&window.scrollY||0};for(x.set(t,n);x.size>ka;){let r=x.keys().next().value;x.delete(r)}}function xa(e){let t=pe(e),n=x.get(t);return n==null?null:(x.delete(t),x.set(t,n),typeof n=="string"?{html:n,scrollX:0,scrollY:0}:n)}function pe(e){let t=new URL(e,location.href);return t.pathname+t.search}async function sr(e,t,n){if(Wo(t,n)&&typeof location<"u"){Kn("readyState-loading",e),location.href=e;return}M&&M.abort(),M=new AbortController;let r=M.signal,o=++C;H&&Ko(H);let s=setTimeout(()=>{Pt(!0),s=null},150),i=null;t||(i=as());try{if(t){let a=xa(e);if(a){let c=er(a.html);if(c){lr(c,n,!0,null),typeof window<"u"&&window.scrollTo({left:a.scrollX,top:a.scrollY,behavior:"instant"}),Ft(e,n,!1,i,"GET",null,r,o,!0).catch(()=>{});return}}typeof window<"u"&&window.scrollTo({left:0,top:0,behavior:"instant"})}await Ft(e,n,!t,i,"GET",null,r,o)}finally{s&&clearTimeout(s),o===C&&(Pt(!1),typeof location<"u"&&(H=location.href))}}async function ja(e,t,n,r,o){M&&M.abort(),M=new AbortController;let s=M.signal,i=++C,a=t==="get"||t==="head",c=new URL(e,location.href);if(a){c.search="";for(let[h,m]of n)c.searchParams.append(h,typeof m=="string"?m:m.name)}H&&Ko(H);let l=setTimeout(()=>{Pt(!0),l=null},150),u=as(),f=o?rs(o,i,c.href):null,d=!1;try{let h=await Ft(c.href,r,!0,u,a?"GET":t.toUpperCase(),a?null:n,s,i);d=!!(h&&h.ok),!a&&i===C&&(x.clear(),v.clear())}finally{f&&os(f,i,c.href,d),l&&clearTimeout(l),i===C&&(Pt(!1),typeof location<"u"&&(H=location.href))}}function ir(){let e=xe(document.body);return e?[...e.entries()].map(([t,n])=>`${t}:${n.routeKey}`).join(","):""}function ar(){try{let e=typeof navigator<"u"?navigator.connection:null;if(e&&(e.saveData===!0||typeof e.effectiveType=="string"&&/2g$/.test(e.effectiveType))||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-data: reduce)").matches)return!0}catch{}return!1}function Jo(){try{if(typeof matchMedia=="function")return matchMedia("(hover: hover) and (pointer: fine)").matches}catch{}return!0}function Pa(e){let t=e.getAttribute("rel");return t?t.toLowerCase().split(/\s+/).filter(Boolean):[]}function It(e){if(!e||!(e instanceof HTMLAnchorElement)||e.hasAttribute("download")||e.hasAttribute("data-no-router")||e.target&&e.target!=="_self")return null;let t=e.href;if(!t)return null;let n;try{n=new URL(t)}catch{return null}return n.origin!==location.origin||n.pathname===location.pathname&&n.search===location.search&&n.hash||Vt.test(n.pathname)?null:t}function Xo(e){if(e.hasAttribute("data-no-prefetch"))return!0;let t=Pa(e);return t.includes("external")||t.includes("no-prefetch")}function Dt(e){if(Xo(e))return"none";switch((e.getAttribute("data-prefetch")||"").toLowerCase().trim()){case"false":case"none":return"none";case"true":case"render":return"render";case"auto":case"viewport":return"viewport";case"intent":return"intent";default:return Jo()?"intent":"viewport"}}function je(e){if(!ne||typeof fetch!="function"||ar())return;let t=pe(e);if(fe.has(t)||Ke.has(t))return;let n=v.get(t);if(n&&Gn()-n.at<Yo)return;if(fe.size>=Go){for(Ke.add(t),Ce.push(e);Ce.length>Oa;){let s=Ce.shift();Ke.delete(pe(s))}return}let r=ir();if(!r&&typeof document<"u"&&document.readyState==="loading")return;fe.add(t);let o={"x-webjs-router":"1","x-webjs-prefetch":"1"};r&&(o["x-webjs-have"]=r),fetch(e,{method:"GET",headers:o,credentials:"same-origin"}).then(async s=>{let i=s.headers.get("content-type")||"";if(!/^text\/html\b/i.test(i)||s.status>=400)return;let a=s.headers.get("x-webjs-build"),c=s.headers.get("x-webjs-src"),l=typeof document<"u"?document.querySelector('script[type="importmap"]'):null,u=l?l.getAttribute("data-webjs-build"):null,f=l?l.getAttribute("data-webjs-src"):null;(a&&u&&a!==u||c&&f&&c!==f)&&(x.clear(),v.clear());let d=s.redirected&&s.url?s.url:e,h=await s.text();Da(t,{html:h,build:a,src:c,finalUrl:d,at:Gn()})}).catch(()=>{}).finally(()=>{fe.delete(t),Ia()})}function Ia(){for(;Ce.length&&fe.size<Go;){let e=Ce.shift();Ke.delete(pe(e)),je(e)}}function Da(e,t){for(v.has(e)&&v.delete(e),v.set(e,t);v.size>Ra;){let n=v.keys().next().value;v.delete(n)}typeof document<"u"&&document.dispatchEvent(new CustomEvent("webjs:prefetch",{detail:{url:t.finalUrl,key:e,from:"prefetch"}}))}function Qo(e){let t=pe(e),n=v.get(t);return!n||(v.delete(t),Gn()-n.at>=Yo)?null:n}function Gn(){try{if(typeof performance<"u"&&typeof performance.now=="function")return performance.now()}catch{}return 0}function Ne(e){if(!ne)return;let t=es(e.target);if(!t)return;let n=Dt(t);if(n==="none"||n==="render")return;let r=It(t);if(r){if(e.type==="touchstart"){je(r);return}n==="intent"&&(Ye===t&&Te||(zt(),Ye=t,Te=setTimeout(()=>{Te=null,Ye=null,je(r)},La)))}}function Zo(e){let t=es(e.target);t&&t===Ye&&zt()}function zt(){Te&&(clearTimeout(Te),Te=null),Ye=null}function cr(){for(let e of Ge)clearTimeout(e);Ge.clear(),ve=new WeakMap}function es(e){let t=e;for(;t;){if(t instanceof HTMLAnchorElement)return t;let n=t.nodeType===1?t:null;if(n){let o=n.closest&&n.closest("a");if(o instanceof HTMLAnchorElement)return o}let r=t.getRootNode?t.getRootNode():null;t=r&&r.host?r.host:null}return null}function Jn(){if(typeof document>"u"||ar())return;let e=typeof IntersectionObserver<"u";e&&(te?(te.disconnect(),cr()):te=new IntersectionObserver(t=>{for(let n of t){let r=n.target;if(n.isIntersecting){if(ve.has(r))continue;let o=setTimeout(()=>{Ge.delete(o),ve.delete(r),te.unobserve(r);let s=It(r);s&&Dt(r)==="viewport"&&je(s)},Ma);ve.set(r,o),Ge.add(o)}else{let o=ve.get(r);o&&(clearTimeout(o),Ge.delete(o),ve.delete(r))}}},{threshold:.5}));for(let t of document.querySelectorAll("a[href]")){let n=Dt(t);if(n==="render"){let r=It(t);r&&je(r)}else n==="viewport"&&e&&te.observe(t)}}function Fa(e){if(typeof document>"u"||!document.body)return!1;let t=xe(document.body);if(!t)return!1;let n,r=-1;for(let[c,l]of t)c.length>r&&(r=c.length,n=l);if(!n)return!1;let o=n.start.parentNode;if(!o||n.start.parentNode!==n.end.parentNode)return!1;let s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("data-webjs-nav-error","");let i=e?`This page could not be loaded. (status ${e})`:"This page could not be loaded.";s.textContent=i;let a=document.createRange();return a.setStartAfter(n.start),a.setEndBefore(n.end),a.deleteContents(),o.insertBefore(s,n.end),!0}function Wn(e,t,n){let r=new CustomEvent("webjs:navigation-error",{bubbles:!0,cancelable:!0,detail:{url:e,status:t??null,error:n||null}});if(typeof document<"u")try{document.dispatchEvent(r)}catch{}r.defaultPrevented||Fa(t)||typeof location<"u"&&(location.href=e)}async function Ft(e,t,n,r,o,s,i,a,c){o=o||"GET";let l=typeof a=="number"?a:C,u,f=null,d=null,h=null,m=null,w=!1,y=e,p=t?ts(t,l):null;try{try{let b=o==="GET"&&!s&&!t?Qo(e):null;if(b)u=b.html,d=b.build,h=b.src,y=b.finalUrl,m=200,w=!0;else{let P={"x-webjs-router":"1"},Oe=ir();Oe&&(P["x-webjs-have"]=Oe),t&&(P["x-webjs-frame"]=t),s!=null&&o!=="GET"&&o!=="HEAD"&&(P.accept=Ro+", text/html");let re={method:o,headers:P,credentials:"same-origin"};i&&(re.signal=i),s!=null&&o!=="GET"&&o!=="HEAD"&&(re.body=s);let T=await fetch(e,re);m=T.status,w=T.ok;let N=T.headers.get("content-type")||"",ys=/^text\/html\b/i.test(N);if(N.toLowerCase().indexOf(Ro)===0){let bs=await T.text();return l===C&&(ze(r),Hn(bs)),{ok:w,status:m,aborted:!1}}if(T.redirected&&T.url&&(y=T.url),T.status===204||T.status===205)return l===C&&n&&history.pushState(null,"",y),{ok:w,status:m,aborted:!1};if(!ys)return l===C&&(ze(r),Wn(e,T.status,null)),{ok:!1,status:m,aborted:!1};d=T.headers.get("x-webjs-build"),h=T.headers.get("x-webjs-src");let Xt=await us(T);u=Xt.shell,Xt.streaming&&(f=Xt)}}catch(b){return b&&b.name==="AbortError"?{ok:!1,status:null,aborted:!0}:l!==C?{ok:!1,status:null,aborted:!0}:(ze(r),Wn(e,null,b instanceof Error?b:new Error(String(b))),{ok:!1,status:null,aborted:!1})}if(l!==C){if(f&&f.reader)try{f.reader.cancel()}catch{}return{ok:!1,status:m,aborted:!0}}let j=er(u);if(!j)return ze(r),Wn(e,null,new Error("navigation response did not parse as HTML")),{ok:!1,status:m,aborted:!1};if(lr(j,t,!!c,y,d,h)==="discard"){if(f&&f.reader)try{f.reader.cancel()}catch{}return{ok:w,status:m,aborted:!1}}if(n&&history.pushState(null,"",y),n){let b=new URL(y);if(b.hash){let P=document.getElementById(b.hash.slice(1));P?P.scrollIntoView():(Oo(),window.scrollTo({left:0,top:0,behavior:"instant"}))}else Oo(),window.scrollTo({left:0,top:0,behavior:"instant"})}return f&&(f.reader||f.rest)&&Lt.then(()=>ps(f.reader,f.dec,f.rest,()=>l===C)),document.dispatchEvent(new CustomEvent("webjs:navigate",{detail:{url:y,frameId:t,from:"navigate"}})),{ok:w,status:m,aborted:!1}}finally{p&&ns(p,l)}}function ts(e,t){if(typeof document>"u")return null;let n=null;try{n=document.querySelector(`webjs-frame#${CSS.escape(e)}`)}catch{n=document.getElementById(e)}if(!n)return null;let r=Bt.has(n);return Bt.set(n,t),n.setAttribute("aria-busy","true"),r||n.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:e,busy:!0}})),n}function ns(e,t){if(Bt.get(e)!==t)return;Bt.delete(e),e.setAttribute("aria-busy","false");let n=e.id||null;e.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:n,busy:!1}}))}function rs(e,t,n){let r=Ut.has(e);return Ut.set(e,t),e.setAttribute("aria-busy","true"),r||e.dispatchEvent(new CustomEvent("webjs:submit-start",{bubbles:!0,detail:{form:e,url:n}})),e}function os(e,t,n,r){if(Ut.get(e)!==t)return;Ut.delete(e),e.setAttribute("aria-busy","false");let o=new CustomEvent("webjs:submit-end",{bubbles:!0,detail:{form:e,url:n,ok:!!r}});e.isConnected?e.dispatchEvent(o):typeof document<"u"?document.dispatchEvent(o):e.dispatchEvent(o)}function Lo(e){if(!e||!e.head)return"";let t=e.head.querySelectorAll('[data-webjs-track="reload"]');if(!t.length)return"";let n="";for(let r of t)n+=K(r);return n}function ss(){if(typeof document>"u")return!1;let e=document.querySelector('meta[name="view-transition"]');return e?(e.getAttribute("content")||"").trim().toLowerCase()==="same-origin":!1}function Ot(e,t){let n=typeof document<"u"?document.startViewTransition:void 0;if(ss()&&typeof n=="function"){let r=n.call(document,e);return r&&r.finished&&typeof r.finished.then=="function"?r.finished.then(()=>{t&&t()}).catch(()=>{}):t&&t(),r&&r.updateCallbackDone&&typeof r.updateCallbackDone.then=="function"?r.updateCallbackDone.catch(()=>{}):Promise.resolve()}return e(),t&&t(),Promise.resolve()}function is(e,t){if(!e||!t||typeof e.querySelectorAll!="function")return;let n=e.querySelectorAll("[data-webjs-permanent][id]");for(let r of n){let o=r.id;if(!o)continue;let s=null;try{s=t.querySelector(`#${CSS.escape(o)}`)}catch{s=null}if(!s||!r.hasAttribute||!r.hasAttribute("data-webjs-permanent"))continue;let i=s.parentNode;i&&s!==r&&i.replaceChild(r,s)}}function Kt(e,t){let n=[];for(let r of e){if(r.nodeType!==1)continue;let o=r;if(o.hasAttribute&&o.hasAttribute("data-webjs-permanent")&&o.id&&n.push(o),typeof o.querySelectorAll=="function")for(let s of o.querySelectorAll("[data-webjs-permanent][id]"))n.push(s)}if(n.length)for(let r of n){let o=r.id;if(!o)continue;let s=Ba(t,o);if(!s||s===r)continue;let i=s.parentNode;if(i)i.replaceChild(r,s);else{let a=t.indexOf(s);a!==-1&&(t[a]=r)}}}function Ba(e,t){for(let n of e){if(n.nodeType!==1)continue;let r=n;if(r.id===t)return r;if(typeof r.querySelector=="function"){let o=null;try{o=r.querySelector(`#${CSS.escape(t)}`)}catch{o=null}if(o)return o}}return null}function Ua(e){if(!(!e||!e.start))for(let t=e.start.nextSibling;t&&t!==e.end;t=t.nextSibling)t.nodeType===1&&de(t)}function lr(e,t,n,r,o,s){try{jt(e)}catch{}try{for(let f of e.querySelectorAll("[data-wj-host]"))f.setAttribute("data-wj-serialized","")}catch{}try{typeof sessionStorage<"u"&&(!r||t||n)&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}if(r&&!t&&!n){let f=document.querySelector('script[type="importmap"]'),d=f?f.getAttribute("data-webjs-build"):null,h=!1;if(o&&d&&(h=o!==d),!h&&e.head&&e.head.children.length>0){let m=Lo(document),w=Lo(e);m!==w&&(h=!0)}if(h&&typeof location<"u"){x.clear(),v.clear();try{let m="webjs:importmap-reload";if(sessionStorage&&sessionStorage.getItem(m))sessionStorage.removeItem(m);else{sessionStorage&&sessionStorage.setItem(m,"1"),location.href=r;return}}catch{location.href=r;return}}else if(!h){let m=f?f.getAttribute("data-webjs-src"):null;s&&m&&s!==m&&(x.clear(),v.clear(),f&&f.setAttribute("data-webjs-src",s));try{typeof sessionStorage<"u"&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}}}if(t){let f=document.querySelector(`webjs-frame#${CSS.escape(t)}`),d=e.querySelector(`webjs-frame#${CSS.escape(t)}`);if(f&&d){Zn(e.head),Lt=Ot(()=>{Ya(f,d),Je(f),de(f),Mo(e.body),Mt()},()=>de(f));return}let h=new CustomEvent("webjs:frame-missing",{bubbles:!0,cancelable:!0,detail:{frameId:t,url:r||(typeof location<"u"?location.href:null),document:e}});(f||document).dispatchEvent(h),h.defaultPrevented||console.warn(`[webjs] frame "${t}" was not in the navigation response, leaving it unchanged. Handle "webjs:frame-missing" (preventDefault) to override.`);return}let i=xe(document.body),a=xe(e.body),c=i&&a?zo(i,a):null;if(c){let{mode:f,live:d,incoming:h}=c;Zn(e.head),Lt=Ot(()=>{f==="replace"?$a(d,h):Ha(d,h,e),za(d.start,h.start),Mo(e.body),Mt()},()=>Ua(d));return}if(r&&!n&&typeof location<"u"){Kn(i?a?"no-shared-boundary":"incoming-boundaries-malformed":"live-boundaries-malformed",r),location.href=r;return}if(r&&n)return Kn("revalidation-discarded",r),"discard";ls(e.head),is(document.body,e.body);let l=[...e.body.childNodes];Lt=Ot(()=>{document.body.replaceChildren(...l),Je(document.body),de(document.body),Mt()},()=>de(document.body))}function Mt(){let e=document.activeElement;!e||e===document.body||e===document.documentElement||typeof e.blur=="function"&&e.blur()}function $a(e,t){let n=e.start.parentNode;if(!n)return;let r=[];for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)r.push(s);let o=[];for(let s=t.start.nextSibling;s&&s!==t.end;s=s.nextSibling)o.push(document.importNode(s,!0));Kt(r,o);for(let s of r)s.parentNode===n&&n.removeChild(s);for(let s of o)n.insertBefore(s,e.end);for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)s.nodeType===1&&(Je(s),de(s))}function Ha(e,t,n){if(!e||!t)return;let r=e.start.parentNode;if(!r)return;let o=[];for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)o.push(i);let s=[];for(let i=t.start.nextSibling;i&&i!==t.end;i=i.nextSibling)s.push(document.importNode(i,!0));Kt(o,s),qa(r,e.start,e.end,o,s);for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)i.nodeType===1&&(Je(i),de(i))}function qa(e,t,n,r,o){let s=new Map;for(let c of r){if(c.nodeType!==1)continue;let l=ke(c);l&&s.set(l,c)}let i=n,a=[];for(let c of o){if(c.nodeType===1){let l=ke(c);if(l&&s.has(l)){let u=s.get(l);$t(u,c),a.push(u),s.delete(l);continue}}a.push(c)}for(let c of r)if(c.parentNode===e){if(c.nodeType===1&&a.includes(c))continue;e.removeChild(c)}for(let c of a)e.insertBefore(c,i)}function $t(e,t){if(e===t)return;if(e.tagName!==t.tagName){e.replaceWith(t);return}let n=new Set;for(let r of t.attributes)n.add(r.name),!Xn.has(r.name)&&r.name!=="data-wj-serialized"&&e.getAttribute(r.name)!==r.value&&e.setAttribute(r.name,r.value);for(let r of[...e.attributes])Xn.has(r.name)||n.has(r.name)||e.removeAttribute(r.name);if(Va(e)){Ka(e,t);return}Yt(e,t)}function Va(e){let t=e;return t[Symbol.for("webjs.instance")]!=null||t[S]!=null}function Wa(e,t){for(let n=e.parentElement;n&&n!==t;n=n.parentElement)if(n.tagName.includes("-"))return!1;return!0}function Ht(e){let t=new Map,n=`slot[${E}][${L}="${F}"]`;for(let r of e.querySelectorAll(n)){let o=r;if(!Wa(o,e)||qr(e,o))continue;let s=!1;for(let a=o.parentElement;a&&a!==e;a=a.parentElement)if(a.tagName==="SLOT"&&a.hasAttribute(E)&&a.getAttribute(L)===F){s=!0;break}if(s)continue;let i=D(o.getAttribute("name"));t.has(i)||t.set(i,o)}return t}function za(e,t){let n=e.parentNode;if(!n||n.nodeType!==1)return;let r=n;if(r.tagName!=="SLOT"||!r.hasAttribute(E))return;let o=null;for(let f=r.parentElement;f;f=f.parentElement){if(f[S]){o=f;break}if(f.tagName.includes("-"))return}if(!o)return;let s=D(r.getAttribute("name"));ae(o,s,[...r.childNodes]);let i=t.parentNode;if(!i||i.nodeType!==1)return;let a=i;if(a.tagName!=="SLOT")return;let c=null;for(let f=a.parentElement;f;f=f.parentElement)if(f.tagName.includes("-")){c=f;break}if(!c||c.tagName!==o.tagName)return;let l=Ht(o),u=Ht(c);for(let f of new Set([...l.keys(),...u.keys()])){if(f===s)continue;let d=u.get(f);d?ae(o,f,[...d.childNodes].map(h=>document.importNode(h,!0))):l.get(f)&&ae(o,f,null)}}function Ka(e,t){if(!e[S])return;let n=Ht(e),r=Ht(t);if(n.size===0&&r.size===0)return;let o=new Set([...n.keys(),...r.keys()]);for(let s of o){let i=n.get(s),a=r.get(s);i&&a?(Yt(i,a),ae(e,s,[...i.childNodes])):a?ae(e,s,[...a.childNodes].map(c=>document.importNode(c,!0))):ae(e,s,null)}}function Yt(e,t){let n=[...e.childNodes],r=[...t.childNodes].map(a=>document.importNode(a,!0));Kt(n,r);let o=new Map;for(let a of n){if(a.nodeType!==1)continue;let c=ke(a);c&&o.set(c,a)}let s=[];for(let a=0;a<r.length;a++){let c=r[a];if(c.nodeType===1){let l=ke(c);if(l&&o.has(l)){let f=o.get(l);$t(f,c),s.push(f),o.delete(l);continue}let u=n[a];if(u&&u.nodeType===1&&!ke(u)&&u.tagName===c.tagName){$t(u,c),s.push(u);continue}}else if(c.nodeType===3){let l=n[a];if(l&&l.nodeType===3){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),s.push(l);continue}}else if(c.nodeType===8){let l=n[a];if(l&&l.nodeType===8){l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),s.push(l);continue}}s.push(c)}let i=new Set(s);for(let a of n)!i.has(a)&&a.parentNode===e&&e.removeChild(a);for(let a=0;a<s.length;a++){let c=s[a];(c.parentNode!==e||e.childNodes[a]!==c)&&e.insertBefore(c,e.childNodes[a]||null)}}function ke(e){let t=e.getAttribute("data-key");return t?`${e.tagName}:k:${t}`:e.id?`${e.tagName}:i:${e.id}`:null}function as(){let e=xe(document.body);if(!e||e.size===0)return null;let t=[...e.keys()].sort((a,c)=>c.length-a.length),n=null,r=null;for(let a of t){let c=document.getElementById(`wj-loading:${a}`);if(c instanceof HTMLTemplateElement){n=a,r=c;break}}if(n===null||r===null)return null;let o=e.get(n),s=[];for(let a=o.start.nextSibling;a&&a!==o.end;a=a.nextSibling)s.push(a);let i=document.createRange();return i.setStartAfter(o.start),i.setEndBefore(o.end),i.deleteContents(),o.start.parentNode.insertBefore(r.content.cloneNode(!0),o.end),{slot:o,oldChildren:s,token:C}}function ze(e){if(!e||e.token!==C)return;let{slot:t,oldChildren:n}=e;if(t.start.parentNode!==t.end.parentNode)return;let r=document.createRange();r.setStartAfter(t.start),r.setEndBefore(t.end),r.deleteContents();for(let o of n)t.start.parentNode.insertBefore(o,t.end)}function Ya(e,t){Yt(e,t)}function cs(){if(typeof document>"u")return"";let e=document.querySelector('meta[name="csp-nonce"]');return e&&e.getAttribute("content")||""}function ur(e){let t=document.createElement("script");for(let r of e.attributes)r.name!=="nonce"&&t.setAttribute(r.name,r.value);let n=cs();return n&&t.setAttribute("nonce",n),t.textContent=e.textContent,t}function fr(e){if(!e.hasAttribute("nonce"))return e.cloneNode(!0);let t=e.cloneNode(!0),n=cs();return n?t.setAttribute("nonce",n):t.removeAttribute("nonce"),t}function K(e){if(!e.hasAttribute("nonce"))return e.outerHTML;let t=e.cloneNode(!0);return t.removeAttribute("nonce"),t.outerHTML}function qt(e){let t=e.getAttribute("name");if(t)return"name="+t;let n=e.getAttribute("property");if(n)return"property="+n;let r=e.getAttribute("http-equiv");return r?"http-equiv="+r:e.hasAttribute("charset")?"charset":null}function Ga(e){if(!e.querySelector("meta"))return;let t=o=>{let s=new Map;for(let i of o.querySelectorAll("meta")){let a=qt(i);if(!a||a===Qn)continue;let c=s.get(a);c?c.push(i):s.set(a,[i])}return s},n=t(e),r=t(document.head);for(let[o,s]of n){let i=r.get(o)||[],a=s.map(K).join(`
2
- `),c=i.map(K).join(`
3
- `);if(a!==c){if(s.length===1&&i.length===1){let l=i[0];for(let u of[...l.attributes])l.removeAttribute(u.name);for(let u of s[0].attributes)l.setAttribute(u.name,u.value);continue}for(let l of i)l.remove();for(let l of s)document.head.appendChild(fr(l))}}for(let[o,s]of r)if(!n.has(o))for(let i of s)i.remove()}function Zn(e){let t=e.querySelector("title");t&&(document.title=t.textContent||"");let n=new Set;for(let r of document.head.children)n.add(K(r));for(let r of e.children)r.tagName==="SCRIPT"&&r.getAttribute("type")==="importmap"||r.tagName!=="BASE"&&r.tagName!=="TITLE"&&(r.tagName==="META"&&qt(r)||n.has(K(r))||(r.tagName==="SCRIPT"?document.head.appendChild(ur(r)):document.head.appendChild(fr(r))));Ga(e)}function Ja(e){return e.tagName==="STYLE"?!0:e.tagName==="LINK"&&(e.getAttribute("rel")||"").toLowerCase().split(/\s+/).includes("stylesheet")}function ls(e){let t=document.head,n=e.querySelector("title");n&&(document.title=n.textContent||"");let r=new Set;for(let s of t.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&r.add(K(s));let o=new Set;for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&o.add(K(s));for(let s of[...t.children])s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&(Ja(s)||s.tagName==="META"&&qt(s)===Qn||o.has(K(s))||s.remove());for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&(s.tagName==="META"&&qt(s)===Qn||r.has(K(s))||(s.tagName==="SCRIPT"?t.appendChild(ur(s)):t.appendChild(fr(s))))}function de(e){typeof customElements>"u"||dr(e)}function dr(e){let t=e instanceof Element?[e,...e.querySelectorAll("*")]:[...e.querySelectorAll("*")];for(let n of t)n.tagName&&n.tagName.includes("-")&&(customElements.upgrade(n),n.shadowRoot&&dr(n.shadowRoot))}function Mo(e){for(let t of e.querySelectorAll("template[data-webjs-resolve]")){let n=t.cloneNode(!0);document.body.appendChild(n);let r=n.getAttribute("data-webjs-resolve"),o=window.__webjsResolve;r&&typeof o=="function"&&o(r)}}async function us(e){if(!e.body||typeof e.body.getReader!="function")return{shell:await e.text(),streaming:!1};let t=e.body.getReader(),n=new TextDecoder,r="",o="<template data-webjs-resolve",s="<!--wj-stream-shell-->",i=/<\/html\s*>/i;for(;;){let{value:a,done:c}=await t.read();a&&(r+=n.decode(a,{stream:!0})),c&&(r+=n.decode());let l=r.indexOf(s);if(l!==-1)return{shell:r.slice(0,l),streaming:!0,reader:c?null:t,dec:n,rest:r.slice(l+s.length)};let u=r.indexOf(o);if(u!==-1)return{shell:r.slice(0,u),streaming:!0,reader:c?null:t,dec:n,rest:r.slice(u)};if(c)return{shell:r,streaming:!1};let f=i.exec(r);if(f){let d=f.index+f[0].length;return{shell:r.slice(0,d),streaming:!0,reader:t,dec:n,rest:r.slice(d)}}}}function fs(e){let t=/<template\s+data-webjs-resolve="([^"]+)"\s*>/i.exec(e);if(!t)return null;let n=t[1],r=t.index+t[0].length,o=/<(\/?)template\b[^>]*>/gi;o.lastIndex=r;let s=1,i;for(;i=o.exec(e);)if(i[1]==="/"){if(s--,s===0)return{id:n,content:e.slice(r,i.index),rest:e.slice(i.index+i[0].length)}}else s++;return null}function ds(e,t){let n=document.getElementById(e);if(!n){Na(e);return}let r=document.createElement("template");r.innerHTML=t;let o=[...r.content.childNodes];n.replaceWith(r.content);for(let s of o)s.nodeType===1&&dr(s)}async function ps(e,t,n,r){let o=n,s=()=>{let i;for(;i=fs(o);){if(!r())return!1;ds(i.id,i.content),o=i.rest}return!0};if(!e){s();return}try{for(;;){if(!s()){try{await e.cancel()}catch{}return}let{value:i,done:a}=await e.read();if(i&&(o+=t.decode(i,{stream:!0})),a){o+=t.decode(),s();return}}}catch{}}function Je(e){for(let t of e.querySelectorAll("script"))t.replaceWith(ur(t))}function Xa(e){return v.get(pe(e))||null}function Qa(){return fe.size}function Za(){v.clear(),fe.clear(),Ce.length=0,Ke.clear(),zt(),cr()}function ec(){return C}function tc(){return++C}function nc(){return H}function rc(e){H=e}function oc(){zn.clear(),Yn=!1}function sc(e,t){return Wo(e,t)}function ic(e){return Vt.test(e)}var Ro,Ee,ne,M,C,Vn,H,Rt,Vt,Vo,zn,Yn,ka,x,Ra,Yo,Go,Oa,La,Ma,v,fe,Ce,Ke,Te,Ye,te,ve,Ge,Bt,Ut,Lt,Xn,Qn,kt=G(()=>{Un();xt();xt();No();qn();yt();Ro="text/vnd.webjs-stream.html";Ee=null;ne=!1,M=null,C=0,Vn=null;H=null,Rt=null;Vt=/\.(?:pdf|zip|tar|gz|7z|rar|dmg|exe|msi|deb|rpm|apk|ipa|xlsx?|docx?|pptx?|csv|odt|ods|odp|rtf|epub|mobi|xml|json|rss|atom|txt|md|wasm|mp3|mp4|mov|avi|webm|ogg|flac|wav|m4a|m4v|mkv|png|jpe?g|gif|webp|avif|bmp|ico|svg|tiff?|heic)$/i;Vo="_top";zn=new Set;Yn=!1;ka=16,x=new Map;Ra=8,Yo=3e4,Go=3,Oa=24,La=100,Ma=250,v=new Map,fe=new Set,Ce=[],Ke=new Set,Te=null,Ye=null,te=null,ve=new WeakMap,Ge=new Set;Bt=new WeakMap;Ut=new WeakMap;Lt=Promise.resolve();Xn=new Set(["value","checked","selected","indeterminate","disabled","open","popover"]);Qn="name=csp-nonce";(typeof window>"u"||window.__WEBJS_CLIENT_ROUTER__!==!1)&&tr()});function _s(e,...t){return{_$webjs:"template",strings:e,values:t}}function O(e){return!!e&&typeof e=="object"&&e._$webjs==="template"}var A="wjm-";function ws(e,...t){let n=e[0];for(let r=1;r<e.length;r++)n+=String(t[r-1]??"")+e[r];return{_$webjsCss:!0,text:n}}function Qt(e){return!!e&&typeof e=="object"&&e._$webjsCss===!0}function Zt(e,t){if(!(!t||!t.length))if("adoptedStyleSheets"in e&&typeof CSSStyleSheet<"u"){let n=t.map(r=>{let o=new CSSStyleSheet;return o.replaceSync(r.text),o});e.adoptedStyleSheets=n}else{let n=e,r=document.createElement("style");r.textContent=t.map(o=>o.text).join(`
4
- `),n.appendChild(r)}}function Ss(e){return!e||!e.length?"":`<style>${e.map(t=>t.text).join(`
5
- `)}</style>`}var en=Object.freeze({"@":"event",".":"prop","?":"bool"});function gr(e){return Object.prototype.hasOwnProperty.call(en,e)}function As(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Es(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}var _r=Symbol.for("webjs.repeat");function wr(e,t,n){return{[_r]:!0,items:[...e],keyFn:t,templateFn:n}}function Xe(e){return!!e&&typeof e=="object"&&e[_r]===!0}function vs(e){return{_$webjs:"unsafe-html",value:String(e??"")}}function tn(e){return!!e&&typeof e=="object"&&e._$webjs==="unsafe-html"}function Cs(e){return{_$webjs:"live",value:e}}function nn(e){return!!e&&typeof e=="object"&&e._$webjs==="live"}function Ts(e,t){return{_$webjs:"keyed",key:e,value:t}}function Qe(e){return!!e&&typeof e=="object"&&e._$webjs==="keyed"}function Ns(e,t){return{_$webjs:"guard",deps:e,fn:t}}function Ze(e){return!!e&&typeof e=="object"&&e._$webjs==="guard"}function ks(e){return{_$webjs:"template-content",template:e}}function rn(e){return!!e&&typeof e=="object"&&e._$webjs==="template-content"}function xs(e){return{_$webjs:"ref",target:e}}function et(e){return!!e&&typeof e=="object"&&e._$webjs==="ref"}function js(){return{value:void 0}}function Rs(e){return{_$webjs:"cache",value:e}}function tt(e){return!!e&&typeof e=="object"&&e._$webjs==="cache"}function Os(...e){return{_$webjs:"until",args:e}}function nt(e){return!!e&&typeof e=="object"&&e._$webjs==="until"}function Ls(e,t){return{_$webjs:"async-append",iterable:e,mapper:t}}function on(e){return!!e&&typeof e=="object"&&e._$webjs==="async-append"}function Ms(e,t){return{_$webjs:"async-replace",iterable:e,mapper:t}}function sn(e){return!!e&&typeof e=="object"&&e._$webjs==="async-replace"}function Ps(e){return{_$webjs:"watch",signal:e}}function rt(e){return!!e&&typeof e=="object"&&e._$webjs==="watch"}var I=null,J=!1,me=0,he=null,an=0,Sr=(e,t)=>Object.is(e,t),st=()=>{},Ar=()=>!1;function Er(e,t){e.liveConsumers||(e.liveConsumers=new Set);let n=e.liveConsumers.size===0;if(e.liveConsumers.add(t),n){if(e.producers&&e.producers.length>0)for(let r of e.producers)Er(r,e);if(e.watched)try{e.watched.call(e.wrapper)}catch(r){console.error(r)}}}function Le(e,t){if(e.liveConsumers&&(e.liveConsumers.delete(t),e.liveConsumers.size===0)){if(e.producers&&e.producers.length>0)for(let n of e.producers)Le(n,e);if(e.unwatched)try{e.unwatched.call(e.wrapper)}catch(n){console.error(n)}}}function pn(e){if(J)throw new Error("Signal read during notification phase");if(I===null)return;let t=I,n=t.nextProducerIndex++;n<t.producers.length&&t.producers[n]!==e&&un(t)&&Le(t.producers[n],t),t.producers[n]!==e&&(t.producers[n]=e,un(t)&&Er(e,t)),t.producerLastReadVersions[n]=e.version}function un(e){return e.consumerIsAlwaysLive||e.liveConsumers&&e.liveConsumers.size>0}function vr(e){if(!e.liveConsumers||e.liveConsumers.size===0)return;let t=J;J=!0;try{for(let n of e.liveConsumers)n.dirty||Is(n)}finally{J=t}}function Is(e){e.dirty=!0,vr(e),e.consumerMarkedDirty.call(e.wrapper||e)}function it(e){if(!(!e.dirty&&e.lastCleanEpoch===me)){if(!e.producerMustRecompute()&&!Ds(e)){e.dirty=!1,e.lastCleanEpoch=me;return}e.producerRecomputeValue(),e.dirty=!1,e.lastCleanEpoch=me}}function Ds(e){for(let t=0;t<e.producers.length;t++){let n=e.producers[t],r=e.producerLastReadVersions[t];if(r!==n.version||(it(n),r!==n.version))return!0}return!1}function fn(e){e&&(e.nextProducerIndex=0);let t=I;return I=e,t}function dn(e,t){if(I=t,!!e){if(un(e))for(let n=e.nextProducerIndex;n<e.producers.length;n++)Le(e.producers[n],e);for(;e.producers.length>e.nextProducerIndex;)e.producers.pop(),e.producerLastReadVersions.pop()}}var at=class{constructor(t,n){this.__value=t,this.version=0,this.lastCleanEpoch=me,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.liveConsumers=void 0,this.consumerAllowSignalWrites=!0,this.consumerIsAlwaysLive=!1,this.producerMustRecompute=Ar,this.producerRecomputeValue=st,this.consumerMarkedDirty=st,this.wrapper=this,this.__isSignal=!0,this.__equal=n?.equals||Sr,this.watched=n?.[hn],this.unwatched=n?.[mn]}get(){return pn(this),this.__value}peek(){return this.__value}set(t){if(J)throw new Error("Signal write during notification phase");this.__equal.call(this,this.__value,t)||(this.__value=t,this.version++,me++,he!==null?Cr(this):vr(this))}};function Cr(e){let t=J;J=!0;try{if(!e.liveConsumers)return;for(let n of e.liveConsumers)n.dirty||(n.dirty=!0,n.__isWatcher?he.add(n):Cr(n))}finally{J=t}}var cn=Symbol("unset"),ln=Symbol("computing"),ot=Symbol("errored"),Me=class{constructor(t,n){this.__fn=t,this.__value=cn,this.__error=null,this.version=0,this.lastCleanEpoch=-1,this.dirty=!0,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!1,this.wrapper=this,this.__isSignal=!0,this.__isComputed=!0,this.__equal=n?.equals||Sr,this.watched=n?.[hn],this.unwatched=n?.[mn];let r=this;this.producerMustRecompute=function(){return r.__value===cn||r.__value===ln},this.producerRecomputeValue=function(){if(r.__value===ln)throw new Error("Detected cycle in computations.");let o=r.__value;r.__value=ln;let s=fn(r),i,a=!1;try{i=r.__fn.call(r.wrapper)}catch(l){i=ot,r.__error=l,a=!0}finally{dn(r,s)}if(!a&&(o!==cn&&o!==ot)&&r.__equal.call(r.wrapper,o,i)){r.__value=o;return}r.__value=i,r.version++},this.consumerMarkedDirty=st}get(){if(it(this),pn(this),this.__value===ot)throw this.__error;return this.__value}peek(){if(it(this),this.__value===ot)throw this.__error;return this.__value}},ct=class{constructor(t){this.__notify=t,this.version=0,this.lastCleanEpoch=me,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!0,this.producerMustRecompute=Ar,this.producerRecomputeValue=st,this.wrapper=this,this.__isWatcher=!0;let n=this;this.consumerMarkedDirty=function(){n.__fire()}}__fire(){this.__notify&&this.__notify.call(this)}watch(...t){if(t.length===0){this.dirty=!1;return}let n=fn(this);try{for(let r of t)pn(r),r.__isComputed&&it(r)}finally{dn(this,n)}this.dirty=!1}unwatch(...t){for(let n=this.producers.length-1;n>=0;n--)t.includes(this.producers[n])&&(Le(this.producers[n],this),this.producers.splice(n,1),this.producerLastReadVersions.splice(n,1),this.nextProducerIndex=Math.min(this.nextProducerIndex,this.producers.length))}getPending(){return this.producers.filter(t=>t.__isComputed&&t.dirty)}observe(t){let n=fn(this),r;try{r=t()}finally{dn(this,n)}return this.dirty=!1,r}dispose(){for(let t of this.producers)Le(t,this);this.producers=[],this.producerLastReadVersions=[],this.__notify=null}},hn=Symbol("watched"),mn=Symbol("unwatched");function Fs(e){let t=I;I=null;try{return e()}finally{I=t}}function Bs(e){return e.producers.slice()}function Us(e){return e.liveConsumers?[...e.liveConsumers]:[]}function $s(e){return!!e.liveConsumers&&e.liveConsumers.size>0}function Hs(e){return e.producers.length>0}function qs(){return I&&I.__isComputed?I:null}function Vs(e){an++,he===null&&(he=new Set);try{e()}finally{if(an--,an===0){let t=he;he=null;for(let n of t)n.__fire()}}}var Pe={State:at,Computed:Me,subtle:{Watcher:ct,untrack:Fs,introspectSources:Bs,introspectSinks:Us,hasSinks:$s,hasSources:Hs,currentComputed:qs,watched:hn,unwatched:mn}};function Ws(e,t){return new at(e,t)}function zs(e,t){return new Me(e,t)}function Ks(e){return!!(e&&typeof e=="object"&&e.__isSignal===!0)}function Ys(e){let t=!1,n=!1,r=new Me(e),o=new ct(()=>{t||n||(t=!0,queueMicrotask(()=>{if(t=!1,!n){try{r.get()}catch(s){console.error(s)}o.watch()}}))});o.watch(r);try{r.get()}catch(s){console.error(s)}return()=>{n||(n=!0,o.dispose())}}yt();function Gr(e,t){let n=e&&e[S]?e:null;return n?pt(n,t):t()}var Kr=new WeakMap,bt=Symbol.for("webjs.instance");function Se(e,t){let n=t,r=n[k];n[k]=!0;try{let o=n[bt];if(O(e)){let s=e;if(o&&o.strings===s.strings){_e(o,s.values);return}o&&Yr(o,t);let i=t.firstChild;i&&i.nodeType===8&&i.data==="webjs-hydrate"&&i.remove(),n[bt]=null;let a=pi(s,t);n[bt]=a;return}if(o&&Yr(o,t),n[bt]=null,t.replaceChildren(),e==null||e===!1||e===!0)return;if(Array.isArray(e)){for(let s of e){let i=document.createTextNode(String(s??""));t.appendChild(i)}return}t.appendChild(document.createTextNode(String(e)))}finally{n[k]=r,r||jn(n)}}function _t(e){let{strings:t}=e,n=Kr.get(t);if(n)return n;let r=[],o="",s="text",i="",a=0,c="",l=0,u=null,f="",d="";for(let m=0;m<t.length;m++){let w=t[m];for(let y=0;y<w.length;y++){let p=w[y];switch(s){case"text":o+=p,p==="<"&&(s="tag-open");break;case"tag-open":o+=p,p==="!"?s="bang-1":p==="/"?(s="tag-name",f=""):/[a-zA-Z]/.test(p)?(s="tag-name",f=p.toLowerCase()):s="text";break;case"bang-1":o+=p,s=p==="-"?"bang-dash":"tag-name";break;case"bang-dash":o+=p,p==="-"?(s="comment",l=0):s="tag-name";break;case"comment":o+=p,p==="-"?l+=1:(p===">"&&l>=2&&(s="text"),l=0);break;case"tag-name":o+=p,p===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(d="")):/\s/.test(p)?s="in-tag":f+=p.toLowerCase();break;case"in-tag":o+=p,p===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(d="")):!/\s/.test(p)&&p!=="/"&&(s="attr-name",i=p,a=o.length-1);break;case"rawtext":o+=p,d=(d+p.toLowerCase()).slice(-9),(d.endsWith("<\/script>")||d.endsWith("</style>"))&&(s="text",d="",f="");break;case"attr-name":p==="="?(s="after-eq",o+=p):/\s/.test(p)?(s="in-tag",i="",o+=p):p===">"?(s="text",i="",o+=p):(i+=p,o+=p);break;case"after-eq":p==='"'||p==="'"?(s="attr-quoted",c=p,o+=p):/\s/.test(p)?(s="in-tag",i="",o+=p):p===">"?(s="text",i="",o+=p):(s="attr-unquoted",o+=p);break;case"attr-unquoted":/\s/.test(p)?(s="in-tag",i="",o+=p):(p===">"&&(s="text",i=""),o+=p);break;case"attr-quoted":o+=p,p===c&&(s="in-tag",i="");break;case"skip-attr":if(p===c){if(u){let j=u.firstPartIdx,R=[];for(let N=j;N<r.length;N++)(r[N].kind==="noop"||r[N].kind==="attr-mixed")&&R.push(N);let b=[],P=t[R[0]],Oe=P.lastIndexOf(c);b.push(Oe>=0?P.slice(Oe+1):P);for(let N=1;N<R.length;N++)b.push(t[R[N]]);let re=t[R[R.length-1]+1],T=re.indexOf(c);b.push(T>=0?re.slice(0,T):re),r[j]={kind:"attr-mixed",path:[],name:u.name,statics:b,group:R};for(let N=1;N<R.length;N++)r[R[N]]={kind:"noop",path:[],mixedAnchor:j};u=null}s="in-tag",i=""}break}}if(m<t.length-1){let y=r.length;if(s==="comment"){l=0,r.push({kind:"noop",path:[]});continue}if(s==="rawtext"){d="",r.push({kind:"noop",path:[]});continue}if(s==="text")o+=`<!--${A}${y}-->`,r.push({kind:"child",path:[]});else if(s==="in-tag"){let p=`data-${A}${y}`;o+=`${p}=""`,r.push({kind:"element",path:[]})}else if(s==="after-eq"){let p=i[0],j=i.slice(1);if(gr(p)){o=o.slice(0,a);let R=en[p],b=`data-${A}${y}`;o+=`${b}=""`,r.push({kind:R,path:[],name:j})}else{o=o.slice(0,a);let R=`data-${A}${y}`;o+=`${R}=""`,r.push({kind:"attr",path:[],name:i})}s="in-tag",i=""}else if(s==="attr-quoted"||s==="attr-unquoted"){o=o.slice(0,a);let p=`data-${A}${y}`;o+=`${p}=""`,u={name:i,firstPartIdx:y},r.push({kind:"noop",path:[]}),s="skip-attr"}else s==="skip-attr"&&r.push({kind:"noop",path:[]})}}let h=document.createElement("template");return h.innerHTML=o,fi(h.content,r),di(h.content,r),n={templateEl:h,parts:r},Kr.set(t,n),n}function fi(e,t){let n=e.querySelectorAll("slot");for(let r of n){r.setAttribute(E,"");let o=t.length;r.setAttribute(`data-${A}${o}`,""),t.push({kind:"slot",path:[]})}}function di(e,t){let n=[];function r(o){for(let s=0;s<o.childNodes.length;s++){let i=o.childNodes[s];if(n.push(s),i.nodeType===8){let a=i.data;if(a.startsWith(A)){let c=Number(a.slice(A.length));t[c]&&t[c].kind==="child"&&(t[c].path=n.slice())}}else if(i.nodeType===1){let a=i,c=[];for(let l of a.attributes)if(l.name.startsWith(`data-${A}`)){let u=Number(l.name.slice(`data-${A}`.length));t[u]&&t[u].kind!=="child"&&(t[u].path=n.slice()),c.push(l.name)}for(let l of c)a.removeAttribute(l);r(i)}n.pop()}}r(e)}function pi(e,t){let{templateEl:n,parts:r}=_t(e),o=n.content.cloneNode(!0),s=document.createComment(`${A}s`),i=document.createComment(`${A}e`),a=r.map(u=>wt(u,o)),c=[];for(let u=0;u<e.values.length;u++)U(a[u],e.values[u],void 0,e.values),c.push(e.values[u]);t.replaceChildren(s,...o.childNodes,i);let l=t.nodeType===1&&t[S]?t:null;for(let u of a)u.kind==="slot"&&(l&&u.slotEl&&(u.slotEl[dt]=l),U(u,void 0,void 0,[]));return{strings:e.strings,bound:a,lastValues:c,startNode:s,endNode:i}}function wt(e,t){if(e.kind==="noop")return{kind:"noop",mixedAnchor:e.mixedAnchor};let n=t;for(let o of e.path)n=n.childNodes[o];if(e.kind==="child")return{kind:"child",marker:n};let r=n;if(e.kind==="event"){let o={kind:"event",el:r,name:e.name||"",handler:null,dispatcher(s){o.handler?.(s)}};return r.addEventListener(o.name,o.dispatcher),o}if(e.kind==="attr")return{kind:"attr",el:r,name:e.name||""};if(e.kind==="attr-mixed")return{kind:"attr-mixed",el:r,name:e.name||"",statics:e.statics||[],group:e.group||[]};if(e.kind==="prop")return{kind:"prop",el:r,name:e.name||""};if(e.kind==="bool")return{kind:"bool",el:r,name:e.name||""};if(e.kind==="element")return{kind:"element",el:r};if(e.kind==="slot")return{kind:"slot",slotEl:r,applied:!1};throw new Error(`unknown part kind ${e.kind}`)}function _e(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(Object.is(r,e.lastValues[n]))continue;let o=e.bound[n],s=o.mixedAnchor;o.kind==="noop"&&s!=null?U(e.bound[s],t[s],e.lastValues[s],t):U(o,r,e.lastValues[n],t),e.lastValues[n]=r}}function Yr(e,t){for(let n of e.bound){if(n.kind==="event"&&n.el.removeEventListener(n.name,n.dispatcher),n.kind==="element"){let r=n.lastTarget;if(r){if(typeof r=="function")try{r(void 0)}catch{}else typeof r=="object"&&(r.value=void 0);n.lastTarget=void 0,n.__lastEl=void 0}}if(n.kind==="slot"){let r=Fe(n.slotEl);r&&zr(r,n.slotEl)}}t.replaceChildren()}function U(e,t,n,r){if(nn(t)){let o=t.value;if(e.kind==="prop"&&e.el[e.name]===o||e.kind==="attr"&&e.el.getAttribute(e.name)===String(o)||e.kind==="bool"&&e.el.hasAttribute(e.name)===!!o)return;t=o}switch(e.kind){case"child":yi(e,t);break;case"attr":{t==null||t===!1?e.el.removeAttribute(e.name):e.el.setAttribute(e.name,String(t));break}case"prop":e.el[e.name]=t;break;case"bool":t?e.el.setAttribute(e.name,""):e.el.removeAttribute(e.name);break;case"event":e.handler=typeof t=="function"?t:null;break;case"element":mi(e,t);break;case"attr-mixed":{let o=e,s=o.statics[0];for(let i=0;i<o.group.length;i++)s+=String((r?r[o.group[i]]:t)??""),s+=o.statics[i+1]||"";e.el.setAttribute(e.name,s);break}case"slot":{if(e.applied)break;let o=e.slotEl,s=()=>{let a=Fe(o);if(!a){e.applied=!0;return}if(!a.contains(o)){a.isConnected?queueMicrotask(s):e.applied=!0;return}if(e.applied=!0,hi(o))return;let c=document.createDocumentFragment();for(;o.firstChild;)c.appendChild(o.firstChild);o[De]=c,queueMicrotask(()=>z(a))},i=Fe(o);i&&i.contains(o)?s():queueMicrotask(s);break}case"noop":break}}function Fe(e){let t=e[dt];if(t&&t.isConnected)return t;let n=e.parentElement;for(;n;){if(n[S])return n;n=n.parentElement}return null}function hi(e){let t=e;for(let n=0;n<128;n++){let r=t.parentNode;if(!r||r===t)return!1;if(r.nodeType===11&&r.host)return!0;t=r}return!1}function mi(e,t){let n=e,r=et(t)?t.target:void 0,o=n.__refTarget,s=r!==o;if(s&&o)if(typeof o=="function")try{o(void 0)}catch{}else typeof o=="object"&&(o.value=void 0);if(s||n.__refElement!==e.el){if(n.__refTarget=r,r)if(typeof r=="function"){if(!s&&n.__refElement!==void 0)try{r(void 0)}catch{}try{r(e.el)}catch{}}else typeof r=="object"&&(r.value=e.el);n.__refElement=e.el,e.lastTarget=r}}function yi(e,t){return Ti(e,t),B(e,t)}function B(e,t){return Gr(e.marker&&e.marker.parentNode,()=>bi(e,t))}function bi(e,t){let n=e.marker;if(tn(t)){Z(e);let o=String(t.value??""),s=document.createElement("template");s.innerHTML=o;let i=[...s.content.childNodes],a=document.createDocumentFragment();for(let c of i)a.appendChild(c);n.parentNode?.insertBefore(a,n),e.child=i;return}if(Qe(t)){let o=t,s=e.__keyedKey;s!==void 0&&!Object.is(s,o.key)&&Z(e),e.__keyedKey=o.key,B(e,o.value);return}if(Ze(t)){let o=t,s=e.__guardDeps,i=o.deps;if(s!==void 0&&(Array.isArray(s)&&Array.isArray(i)?Ci(s,i):Object.is(s,i)))return;e.__guardDeps=Array.isArray(i)?i.slice():i,B(e,o.fn());return}if(rn(t)){Z(e);let o=t.template;if(o&&o.content){let s=o.content.cloneNode(!0),i=[...s.childNodes];n.parentNode?.insertBefore(s,n),e.child=i}return}if(et(t))return;if(tt(t))return Ni(e,t.value);if(nt(t))return ki(e,t.args);if(rt(t))return xi(e,t.signal);if(on(t))return ji(e,t);if(sn(t))return Ri(e,t);if(Xe(t)){if(e.child&&e.child.kind==="repeat"){wi(e,t);return}Z(e);let o={kind:"repeat",map:new Map};e.child=o,_i(n,o,t);return}if(Array.isArray(t)){if(e.child&&e.child.kind==="array"){Ei(e,t);return}Z(e);let o={kind:"array",items:[]};e.child=o,Ai(n,o,t);return}if(e.child){let o=e.child;if(o.kind==="repeat")Jr(o),e.child=void 0;else if(o.kind==="array")Qr(o),e.child=void 0;else if(o.kind==="async-stream")no(o),e.child=void 0;else if("strings"in e.child){let s=e.child;if(O(t)&&s.strings===t.strings){_e(s,t.values);return}we(s.startNode,s.endNode),e.child=void 0}else{for(let s of e.child)s.parentNode&&s.parentNode.removeChild(s);e.child=void 0}}if(t==null||t===!1||t===!0)return;if(O(t)){let o=t,{templateEl:s,parts:i}=_t(o),a=s.content.cloneNode(!0),c=document.createComment(`${A}s`),l=document.createComment(`${A}e`),u=i.map(h=>wt(h,a)),f=[];for(let h=0;h<o.values.length;h++)U(u[h],o.values[h],void 0,o.values),f.push(o.values[h]);let d=[c,...a.childNodes,l];n.parentNode?.insertBefore(gi(d),n);for(let h of u)h.kind==="slot"&&U(h,void 0,void 0,[]);e.child={strings:o.strings,bound:u,lastValues:f,startNode:c,endNode:l};return}let r=document.createTextNode(String(t));n.parentNode?.insertBefore(r,n),e.child=[r]}function gi(e){let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);return t}function we(e,t){if(!e.parentNode)return;let n=e;for(;n&&n!==t;){let r=n.nextSibling;n.parentNode?.removeChild(n),n=r}t.parentNode===e.parentNode&&t.parentNode?.removeChild(t)}function On(e){let{templateEl:t,parts:n}=_t(e),r=t.content.cloneNode(!0),o=document.createComment(`${A}s`),s=document.createComment(`${A}e`),i=n.map(l=>wt(l,r)),a=[];for(let l=0;l<e.values.length;l++)U(i[l],e.values[l],void 0,e.values),a.push(e.values[l]);for(let l of i)l.kind==="slot"&&U(l,void 0,void 0,[]);let c=document.createDocumentFragment();for(c.appendChild(o);r.firstChild;)c.appendChild(r.firstChild);return c.appendChild(s),{inst:{strings:e.strings,bound:i,lastValues:a,startNode:o,endNode:s},frag:c}}function Be(e){for(let t of e.bound)if(t.kind==="event"&&t.el.removeEventListener(t.name,t.dispatcher),t.kind==="element"){let n=t.lastTarget;if(n){if(typeof n=="function")try{n(void 0)}catch{}else typeof n=="object"&&(n.value=void 0);t.lastTarget=void 0,t.__lastEl=void 0}}}function _i(e,t,n){let{items:r,keyFn:o,templateFn:s}=n,i=e.parentNode;if(!i)return;let a=document.createDocumentFragment();for(let c=0;c<r.length;c++){let l=o(r[c],c),u=s(r[c],c);if(!O(u))continue;let{inst:f,frag:d}=On(u);t.map.set(l,f),a.appendChild(d)}i.insertBefore(a,e)}function wi(e,t){let n=e.marker,r=n.parentNode;if(!r)return;let o=e.child,{items:s,keyFn:i,templateFn:a}=t,c=new Map;for(let l=0;l<s.length;l++){let u=i(s[l],l),f=a(s[l],l);if(!O(f))continue;let d=o.map.get(u);if(d&&d.strings===f.strings)_e(d,f.values),Rn(d.startNode,d.endNode,r,n),c.set(u,d),o.map.delete(u);else{d&&(Be(d),we(d.startNode,d.endNode),o.map.delete(u));let{inst:h,frag:m}=On(f);r.insertBefore(m,n),c.set(u,h)}}for(let l of o.map.values())Be(l),we(l.startNode,l.endNode);o.map=c}function Jr(e){for(let t of e.map.values())Be(t),we(t.startNode,t.endNode);e.map.clear()}function Si(e){return e.type==="tpl"?e.inst.startNode:e.type==="text"?e.node:null}function gt(e){e.type==="tpl"?(Be(e.inst),we(e.inst.startNode,e.inst.endNode)):e.type==="text"&&e.node.parentNode?.removeChild(e.node)}function Xr(e){if(O(e)){let{inst:t,frag:n}=On(e);return{item:{type:"tpl",inst:t},frag:n}}if(e!=null&&e!==!1&&e!==!0){let t=document.createTextNode(String(e));return{item:{type:"text",node:t},frag:t}}return{item:{type:"empty"},frag:null}}function Ai(e,t,n){let r=e.parentNode;if(!r)return;let o=document.createDocumentFragment(),s=[];for(let i of n){let{item:a,frag:c}=Xr(i);c&&o.appendChild(c),s.push(a)}r.insertBefore(o,e),t.items=s}function Ei(e,t){let n=e.marker,r=n.parentNode;if(!r)return;let o=e.child,s=o.items,i=[];for(let a=0;a<t.length;a++){let c=t[a],l=s[a];if(O(c)){let d=c;if(l&&l.type==="tpl"&&l.inst.strings===d.strings){_e(l.inst,d.values),i.push(l);continue}}else if(c!=null&&c!==!1&&c!==!0){if(l&&l.type==="text"){let d=String(c);l.node.data!==d&&(l.node.data=d),i.push(l);continue}}else{l&&gt(l),i.push({type:"empty"});continue}let{item:u,frag:f}=Xr(c);f&&r.insertBefore(f,vi(s,a,n)),l&&gt(l),i.push(u)}for(let a=t.length;a<s.length;a++)gt(s[a]);o.items=i}function vi(e,t,n){for(let r=t;r<e.length;r++){let o=Si(e[r]);if(o&&o.parentNode)return o}return n}function Qr(e){for(let t of e.items)gt(t);e.items=[]}function Rn(e,t,n,r){if(t.nextSibling===r&&e.parentNode===n)return;let o=document.createDocumentFragment(),s=e;for(;s;){let i=s.nextSibling;if(o.appendChild(s),s===t)break;s=i}n.insertBefore(o,r)}function Ci(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Z(e){let t=e;if(t.__untilState&&(t.__untilState.aborted=!0,t.__untilState=void 0),t.__watchSub&&Zr(t),!e.child)return;let n=e.child;if(n.kind==="repeat")Jr(n);else if(n.kind==="array")Qr(n);else if(n.kind==="async-stream")no(n);else if("strings"in n){let r=e.child;Be(r),we(r.startNode,r.endNode)}else for(let r of e.child)r.parentNode&&r.parentNode.removeChild(r);e.child=void 0}function Ti(e,t){let n=e;n.__untilState&&!nt(t)&&(n.__untilState.aborted=!0,n.__untilState=void 0),n.__guardDeps!==void 0&&!Ze(t)&&(n.__guardDeps=void 0),n.__cacheMap&&!tt(t)&&(n.__cacheMap=void 0),n.__keyedKey!==void 0&&!Qe(t)&&(n.__keyedKey=void 0),n.__watchSub&&!rt(t)&&Zr(n)}function Ni(e,t){let n=e.marker,r=e,o=r.__cacheMap;o||(o=new Map,r.__cacheMap=o);let s=e.child;if(s&&"strings"in s){let a=s;if(O(t)&&a.strings===t.strings){_e(a,t.values);return}let c=document.createDocumentFragment();Rn(a.startNode,a.endNode,c,null),o.set(a.strings,{inst:a,holder:c}),e.child=void 0}if(O(t)){let a=t,c=o.get(a.strings);if(c){o.delete(a.strings),e.child&&Z(e),Rn(c.inst.startNode,c.inst.endNode,n.parentNode,n),_e(c.inst,a.values),e.child=c.inst;let l=new Set;for(let u=c.inst.startNode.nextSibling;u&&u!==c.inst.endNode;u=u.nextSibling){if(u.nodeType!==1)continue;let f=u;if(f.matches("slot[data-webjs-light]")){let d=Fe(f);d&&l.add(d)}for(let d of f.querySelectorAll("slot[data-webjs-light]")){let h=Fe(d);h&&l.add(h)}}for(let u of l)z(u);return}}B(e,t)}function ki(e,t){let n=e,r=n.__untilState,o=n.__untilArgs,s=(d,h)=>!!(Object.is(d,h)||O(d)&&O(h)&&d.strings===h.strings),a=o&&o.length===t.length&&o.every((d,h)=>s(d,t[h]))&&r?r.highestResolved:1/0;r&&(r.aborted=!0),n.__untilArgs=t.slice();let c={aborted:!1,highestResolved:a};n.__untilState=c;let l=-1,u;for(let d=0;d<t.length;d++){let h=t[d];if(!h||typeof h.then!="function"){l=d,u=h;break}}l!==-1&&l<=c.highestResolved?(B(e,u),c.highestResolved=l):l===-1&&!n.__untilEverRendered&&B(e,""),n.__untilEverRendered=!0;let f=Math.min(l===-1?t.length:l,c.highestResolved);for(let d=0;d<f;d++){let h=t[d];!h||typeof h.then!="function"||Promise.resolve(h).then(m=>{c.aborted||d>=c.highestResolved||(c.highestResolved=d,B(e,m))},()=>{})}}function xi(e,t){let n=e;if(n.__watchSig===t&&n.__watchSub){let s;n.__watchSub.observe(()=>{s=t.get()}),B(e,s);return}n.__watchSub&&(n.__watchSub.dispose(),n.__watchSub=void 0),n.__watchSig=t;let r=new Pe.subtle.Watcher(()=>{queueMicrotask(()=>{if(n.__watchSub!==r)return;let s;r.observe(()=>{s=t.get()}),B(e,s)})});n.__watchSub=r;let o;r.observe(()=>{o=t.get()}),B(e,o)}function Zr(e){e.__watchSub&&(e.__watchSub.dispose(),e.__watchSub=void 0,e.__watchSig=void 0)}function ji(e,t){let n=e.child;if(n&&n.kind==="async-stream"&&n.mode==="append"&&n.iterable===t.iterable)return;Z(e);let r=t.iterable[Symbol.asyncIterator](),o={kind:"async-stream",mode:"append",aborted:!1,iterable:t.iterable,iterator:r,nodes:[]};e.child=o,eo(o,e,t)}function Ri(e,t){let n=e.child;if(n&&n.kind==="async-stream"&&n.mode==="replace"&&n.iterable===t.iterable)return;Z(e);let r=t.iterable[Symbol.asyncIterator](),o={kind:"async-stream",mode:"replace",aborted:!1,iterable:t.iterable,iterator:r,nodes:[]};e.child=o,eo(o,e,t)}async function eo(e,t,n){let r=t.marker,o=0;try{for(;!e.aborted;){let s=await e.iterator.next();if(e.aborted||s.done)break;let i=n.mapper?n.mapper(s.value,o):s.value,a=to(i);Gr(r.parentNode,()=>{if(e.mode==="replace"){for(let l of e.nodes)l.parentNode&&l.parentNode.removeChild(l);e.nodes=[]}let c=document.createDocumentFragment();for(let l of a)c.appendChild(l);r.parentNode?.insertBefore(c,r),e.nodes.push(...a)}),o++}}catch(s){typeof console<"u"&&console.error("[webjs] asyncStream error:",s)}}function to(e){if(e==null||e===!1||e===!0)return[];if(O(e)){let t=e,{templateEl:n,parts:r}=_t(t),o=n.content.cloneNode(!0),s=r.map(i=>wt(i,o));for(let i=0;i<t.values.length;i++)U(s[i],t.values[i],void 0,t.values);for(let i of s)i.kind==="slot"&&U(i,void 0,void 0,[]);return[...o.childNodes]}if(Array.isArray(e)){let t=[];for(let n of e)t.push(...to(n));return t}return[document.createTextNode(String(e))]}function no(e){e.aborted=!0;for(let t of e.nodes)t.parentNode&&t.parentNode.removeChild(t);e.nodes=[];try{e.iterator.return?.()?.catch?.(()=>{})}catch{}}var ro=null;function St(e){ro=e||null}function Oi(){return ro||void 0}var oo=Symbol.for("webjs:registry"),so=Symbol.for("webjs:classToTag"),At=globalThis,$=At[oo]||(At[oo]=new Map),io=At[so]||(At[so]=new WeakMap),Et=typeof window<"u"&&typeof customElements<"u";function Ln(e,t){if(!e||typeof e!="string"||!e.includes("-"))throw new Error(`customElements.define: tag "${e}" must contain a hyphen (HTML spec)`);let n=t.lazy===!0,r=$.get(e);r?(r.cls=t,r.lazy=n):$.set(e,{cls:t,moduleUrl:null,lazy:n,tag:e}),io.set(t,e)}if(Et){let e=customElements.define.bind(customElements);customElements.define=function(t,n,r){customElements.get(t)||e(t,n,r),Ln(t,n)}}if(!Et){let e=globalThis;e.customElements||(e.customElements={define(t,n){Ln(t,n)},get(t){return $.get(t)?.cls},upgrade(){},whenDefined(t){let n=$.get(t);return Promise.resolve(n?.cls)}})}function Mn(e,t){Et?customElements.define(e,t):Ln(e,t)}function Li(e,t){if(Et)return;let n=$.get(e);if(n){n.moduleUrl=t;return}$.set(e,{cls:null,moduleUrl:t,lazy:!1,tag:e})}function Mi(e){return $.get(e)?.cls}function Pi(e){return $.get(e)?.moduleUrl||null}function Ii(e){return $.get(e)?.lazy===!0}function vt(e){return io.get(e)}function Di(){return[...$.keys()]}He();yt();var ho=typeof window<"u"&&typeof HTMLElement<"u";function Ji(e,t){return e!==t}function Xi(){return{states:new Set,shadowRoot:null,form:null,labels:[],role:"",willValidate:!0,validity:{},validationMessage:"",setFormValue(){},setValidity(){},checkValidity(){return!0},reportValidity(){return!0}}}var Ct=class{constructor(){this.__ssrAttrs=new Map,this.__internals=null}get attributes(){return[...this.__ssrAttrs].map(([t,n])=>({name:t,value:n}))}getAttribute(t){let n=this.__ssrAttrs.get(String(t).toLowerCase());return n===void 0?null:n}setAttribute(t,n){this.__ssrAttrs.set(String(t).toLowerCase(),String(n))}removeAttribute(t){this.__ssrAttrs.delete(String(t).toLowerCase())}hasAttribute(t){return this.__ssrAttrs.has(String(t).toLowerCase())}toggleAttribute(t,n){let r=String(t).toLowerCase(),o=this.__ssrAttrs.has(r);return(n===void 0?!o:n)?(this.__ssrAttrs.set(r,""),!0):(this.__ssrAttrs.delete(r),!1)}getAttributeNames(){return[...this.__ssrAttrs.keys()]}closest(t){let n=String(t).trim().toLowerCase();if(!/^[a-z][a-z0-9-]*$/.test(n))return null;if(this.__ssrTag===n)return this;let r=this.__ssrAncestors;if(!Array.isArray(r))return null;for(let o=r.length-1;o>=0;o--)if(r[o]&&r[o].__ssrTag===n)return r[o];return null}get dataset(){if(this.__dataset)return this.__dataset;let t=this,n=r=>"data-"+String(r).replace(/[A-Z]/g,o=>"-"+o.toLowerCase());return this.__dataset=new Proxy({},{get(r,o){if(typeof o!="string")return;let s=t.getAttribute(n(o));return s===null?void 0:s},set(r,o,s){return typeof o=="string"&&t.setAttribute(n(o),s),!0},has(r,o){return typeof o=="string"&&t.hasAttribute(n(o))},deleteProperty(r,o){return typeof o=="string"&&t.removeAttribute(n(o)),!0},ownKeys(){return t.getAttributeNames().filter(r=>r.startsWith("data-")).map(r=>r.slice(5).replace(/-([a-z])/g,(o,s)=>s.toUpperCase()))},getOwnPropertyDescriptor(r,o){if(typeof o=="string"&&t.hasAttribute(n(o)))return{enumerable:!0,configurable:!0,value:t.getAttribute(n(o))}}}),this.__dataset}get className(){return this.getAttribute("class")??""}set className(t){this.setAttribute("class",t)}get hidden(){return this.hasAttribute("hidden")}set hidden(t){this.toggleAttribute("hidden",!!t)}get id(){return this.getAttribute("id")??""}set id(t){this.setAttribute("id",t)}get title(){return this.getAttribute("title")??""}set title(t){this.setAttribute("title",t)}get slot(){return this.getAttribute("slot")??""}set slot(t){this.setAttribute("slot",t)}get role(){return this.getAttribute("role")}set role(t){t==null?this.removeAttribute("role"):this.setAttribute("role",t)}get tabIndex(){let t=this.getAttribute("tabindex");return t===null?-1:Number.parseInt(t,10)||0}set tabIndex(t){this.setAttribute("tabindex",String(t))}addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return this.__internals=Xi(),this.__internals}},Qi=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];for(let e of Qi){let t="aria-"+e.slice(4).toLowerCase();Object.defineProperty(Ct.prototype,e,{configurable:!0,get(){return this.getAttribute(t)},set(n){n==null?this.removeAttribute(t):this.setAttribute(t,String(n))}})}var Zi=ho?HTMLElement:Ct,mo=Symbol("webjs.factoryProps"),fo=new WeakSet,Ae=class e extends Zi{static shadow=!1;static hydrate=void 0;static properties={};static styles=null;static register(t){Mn(t,this)}static get observedAttributes(){let t=this.properties||{};return Object.keys(t).filter(n=>!(typeof t[n]=="object"&&t[n].state)).map(n=>typeof t[n]=="object"&&t[n].attribute||In(n))}constructor(){super(),this._renderRoot=null,this._scheduled=!1,this._connected=!1,this.__controllers=new Set,this.__firstRendered=!1,this._changedProperties=new Map,this._updateResolve=null,this._updatePromise=Promise.resolve(!0),this._isUpdating=!1,this._assertFactoryProperties(),this._initializeProperties()}_assertFactoryProperties(){let t=this.constructor;if(fo.has(t))return;let n=t;for(;n&&n!==e;){if(Object.hasOwn(n,"properties")&&!Object.hasOwn(n,mo)){let r=n.name||"a component";throw new Error(`${r}: \`static properties\` is no longer supported. Declare reactive properties via the factory instead: \`class ${r} extends WebComponent({ count: Number })\`. Use the \`prop()\` helper for options (\`prop(Number, { reflect: true })\`) and set defaults in the constructor after \`super()\`. See https://webjs.dev/docs/components.`)}n=Object.getPrototypeOf(n)}fo.add(t)}_initializeProperties(){let n=this.constructor.properties;if(!(!n||typeof n!="object")){this.__propValues={};for(let[r,o]of Object.entries(n)){let s=typeof o=="object"?o:{type:o},i=this[r];Object.defineProperty(this,r,{configurable:!0,enumerable:!0,get:()=>this.__propValues[r],set:a=>{let c=this.__propValues[r];(s.hasChanged||Ji)(a,c)&&(this.__propValues[r]=a,s.reflect&&!s.state&&this._connected&&this._reflectAttribute(r,a,s),this.requestUpdate(r,c))}}),i!==void 0?this.__propValues[r]=i:s.default!==void 0&&(this.__propValues[r]=typeof s.default=="function"?s.default():s.default)}}}_reflectAttribute(t,n,r){let o=r.attribute||In(t);if(!this.__reflectingAttribute){this.__reflectingAttribute=!0;try{if(r.converter&&r.converter.toAttribute){let s=r.converter.toAttribute(n,r.type);s==null?this.removeAttribute(o):this.setAttribute(o,s)}else r.type===Boolean?n?this.setAttribute(o,""):this.removeAttribute(o):n==null?this.removeAttribute(o):r.type===Object||r.type===Array?this.setAttribute(o,JSON.stringify(n)):this.setAttribute(o,String(n))}finally{this.__reflectingAttribute=!1}}}connectedCallback(){if(!ho)return;if(this.__webjsPropsHydrated||(this.__webjsPropsHydrated=!0,this._hydratePropAttrs()),this.constructor.hydrate==="visible"&&typeof IntersectionObserver<"u"&&!this.__hydrationActivated){this.__hydrationActivated=!1,this.__hydrationObserver=new IntersectionObserver(n=>{for(let r of n)if(r.isIntersecting){this.__hydrationObserver.unobserve(this),this.__hydrationObserver.disconnect(),this.__hydrationObserver=null,this.__hydrationActivated=!0,this._activate();return}},{rootMargin:"200px"}),this.__hydrationObserver.observe(this);return}this._activate()}_hydratePropAttrs(){let t=[],n=this.attributes;for(let r=0;r<n.length;r++){let o=n[r].name;o.startsWith("data-webjs-prop-")&&t.push(o)}for(let r of t){let o=this.getAttribute(r);if(this.removeAttribute(r),o==null)continue;let s=po(r.slice(16));try{this[s]=le(o)}catch(i){console.warn(`[webjs] failed to decode ${r} on <${this.tagName.toLowerCase()}>: ${i&&i.message}`)}}}_activate(){this._connected=!0,this._reflectDeclaredAttributes();let t=this.constructor;if(t.shadow!==!0&&!this.hasAttribute("data-wj-host")&&this.setAttribute("data-wj-host",""),t.shadow===!0){let n=!!this.shadowRoot;this.shadowRoot||this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot;let r=t.styles,o=Array.isArray(r)?r:Qt(r)?[r]:[];if(o.length){if(n){let s=this.shadowRoot.querySelector("style");s&&s.remove()}Zt(this._renderRoot,o)}}else this._renderRoot=this,t.styles&&console.warn(`[webjs] <${vt(t)||this.tagName?.toLowerCase()}> has static shadow = false AND static styles. static styles only works with shadow DOM (adoptedStyleSheets). For light DOM, use global CSS or <style> in render().`),xn(this)?$r(this):this.__isHydrating()||this.hasAttribute("data-wj-serialized")||Wr(this)?(this.removeAttribute("data-wj-serialized"),W(this),Or(this)):Rr(this),Vr(this),Fr(this);for(let n of this.__controllers)n.hostConnected&&n.hostConnected();this._updateResolve===null&&(this._updatePromise=new Promise(n=>{this._updateResolve=n})),this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(n){console.error("[webjs] lifecycle hook threw during initial render:",n)}})}__isHydrating(){let t=this.firstChild,n=t!=null&&t.nodeType===8&&t.data==="webjs-hydrate";return n&&(this.__hydratedAtActivate=!0),n}disconnectedCallback(){this._connected=!1,this.__hydrationObserver&&(this.__hydrationObserver.disconnect(),this.__hydrationObserver=null),Ur(this),this.__signalWatcher&&(this.__signalWatcher.dispose(),this.__signalWatcher=void 0);for(let t of this.__controllers)t.hostDisconnected&&t.hostDisconnected()}attributeChangedCallback(t,n,r){if(this.__reflectingAttribute)return;let s=this.constructor.properties||{},i,a;for(let[u,f]of Object.entries(s))if(((typeof f=="object"?f:{type:f}).attribute||In(u))===t){i=u,a=f;break}if(a===void 0&&(i=po(t),a=s[i]||s[t]),a===void 0)return;let c=typeof a=="object"?a:{type:a},l;if(c.converter&&c.converter.fromAttribute)l=c.converter.fromAttribute(r,c.type);else if(c.type===Number)l=r==null?null:Number(r);else if(c.type===Boolean)l=r!=null&&r!=="false";else if(c.type===Object||c.type===Array)try{l=r==null?null:JSON.parse(r)}catch{l=r}else l=r;this[i]!==l&&(this[i]=l,this._connected&&this.requestUpdate())}requestUpdate(t,n){t!==void 0&&!this._changedProperties.has(t)&&this._changedProperties.set(t,n),this._scheduleUpdate()}_scheduleUpdate(){this._updateResolve===null&&(this._updatePromise=new Promise(t=>{this._updateResolve=t})),!this._isUpdating&&(this._scheduled||!this._connected||(this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(t){console.error("[webjs] lifecycle hook threw during update cycle:",t)}})))}_performRender(){if(!this._renderRoot)return;let t=this._changedProperties;this._isUpdating=!0;let n=!1,r=null;try{if(this.shouldUpdate(t)){this.willUpdate(t);for(let o of this.__controllers)o.hostUpdate&&o.hostUpdate();this.__renderToken=(this.__renderToken||0)+1,this.__renderAbort&&this.__renderAbort.abort(),this.__renderAbort=typeof AbortController<"u"?new AbortController:null,St(this.__renderAbort?this.__renderAbort.signal:null);try{let o=this.update(t);o&&typeof o.then=="function"&&(r=o)}catch(o){this._handleRenderError(o)}finally{St(null)}if(!r){for(let o of this.__controllers)o.hostUpdated&&o.hostUpdated();n=!0}}}catch(o){console.error("[webjs] lifecycle hook threw during update phase:",o)}finally{this._isUpdating=!1,(n||r)&&(this._changedProperties=new Map)}if(r){let o=this.__renderToken;this.__pendingAsyncCommits=(this.__pendingAsyncCommits||0)+1,r.then(()=>{if(this.__pendingAsyncCommits--,o===this.__renderToken){for(let s of this.__controllers)s.hostUpdated&&s.hostUpdated();this._postCommit(t)}});return}n?this._postCommit(t):this.__pendingAsyncCommits||this._resolveUpdate()}_resolveUpdate(){if(this._updateResolve){let t=this._changedProperties.size===0;this._updateResolve(t),this._updateResolve=null}}performServerUpdate(){let t=this._changedProperties;this._isUpdating=!0;try{this.willUpdate(t);for(let n of this.__controllers)n.hostUpdate&&n.hostUpdate();this._reflectDeclaredAttributes()}finally{this._isUpdating=!1}}_reflectDeclaredAttributes(){let t=this.constructor.properties||{};for(let n of Object.keys(t)){let r=t[n];!r||!r.reflect||r.state||this._reflectAttribute(n,this[n],r)}}shouldUpdate(t){return!0}willUpdate(t){}update(t){this.__signalWatcher||(this.__signalWatcher=new Pe.subtle.Watcher(()=>{this._connected&&this.requestUpdate()}));let n;if(this.__signalWatcher.observe(()=>{n=this.render()}),n&&typeof n.then=="function")return this._commitAsync(n);Se(n,this._renderRoot)}_commitAsync(t){let n=this.__renderToken;if(this.__firstRendered&&this._overridesRenderFallback())try{let r=this.renderFallback();r!==void 0&&Se(r,this._renderRoot)}catch(r){console.error("[webjs] renderFallback() threw:",r)}return Promise.resolve(t).then(r=>{n===this.__renderToken&&Se(r,this._renderRoot)},r=>{n===this.__renderToken&&this._handleRenderError(r instanceof Error?r:new Error(String(r)))})}_overridesRenderFallback(){return this.renderFallback!==Tt.prototype.renderFallback}_handleRenderError(t){console.error(`[webjs] render error in <${vt(this.constructor)||this.tagName?.toLowerCase()}>:`,t);try{let n=this.renderError(t);n!==void 0&&Se(n,this._renderRoot)}catch(n){console.error("[webjs] renderError() also threw:",n)}}_postCommit(t){try{this.__firstRendered||(this.__firstRendered=!0,this.firstUpdated(t)),this.updated(t)}catch(n){console.error("[webjs] lifecycle hook threw during post-commit phase:",n)}finally{this._resolveUpdate()}}updated(t){}firstUpdated(t){}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}addController(t){this.__controllers.add(t),this._connected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}render(){return""}renderError(t){}renderFallback(){}};function In(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function po(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Tt(e){return new.target?Reflect.construct(Ae,arguments,new.target):class extends Ae{static properties=e;static[mo]=!0}}Object.setPrototypeOf(Tt,Ae);Tt.prototype=Ae.prototype;function ea(e,t={}){return e&&typeof e=="object"&&!("call"in e)&&(t=e,e=void 0),{...e?{type:e}:{},...t}}var yo=Symbol.for("webjs.notFound"),bo=Symbol.for("webjs.redirect"),go=Symbol.for("webjs.forbidden"),_o=Symbol.for("webjs.unauthorized");function ta(){let e=new Error("webjs: notFound()");throw e.__webjs=yo,e}function na(){let e=new Error("webjs: forbidden()");throw e.__webjs=go,e}function ra(){let e=new Error("webjs: unauthorized()");throw e.__webjs=_o,e}function oa(e,t){let n=typeof t=="object"&&t!==null?t.status:t,r=new Error(`webjs: redirect(${e})`);throw r.__webjs=bo,r.url=e,r.status=typeof n=="number"?n:void 0,r}function sa(e){return!!e&&e.__webjs===yo}function ia(e){return!!e&&e.__webjs===bo}function aa(e){return!!e&&e.__webjs===go}function ca(e){return!!e&&e.__webjs===_o}var wo=null;function la(){if(!wo)return"";try{return wo()||""}catch{return""}}var il=Symbol.for("webjs.suspense");function ua(e){return{_$webjsSuspense:!0,fallback:e.fallback,children:e.children}}function fa(e){return!!e&&typeof e=="object"&&e._$webjsSuspense===!0}function da(e,t={}){let n=t.reconnect!==!1,r=0,o=!1,s=null,i=[];function a(){o||(s=new WebSocket(pa(e),t.protocols),s.onopen=c=>{for(r=0;i.length&&s&&s.readyState===WebSocket.OPEN;)s.send(i.shift());t.onOpen?.(c)},s.onmessage=c=>{let l=c.data;if(typeof l=="string")try{l=JSON.parse(l)}catch{}t.onMessage?.(l,c)},s.onerror=c=>{t.onError?.(c)},s.onclose=c=>{if(t.onClose?.(c),!o&&n){let l=Math.min(1e3*2**r++,3e4);setTimeout(a,l)}})}return a(),{send(c){let l=typeof c=="string"||c instanceof ArrayBuffer||ArrayBuffer.isView(c)?c:JSON.stringify(c);s&&s.readyState===WebSocket.OPEN?s.send(l):i.push(l)},close(c,l){o=!0;try{s?.close(c,l)}catch{}},get socket(){return s},get readyState(){return s?.readyState??3}}}function pa(e){if(/^wss?:\/\//i.test(e))return e;let t=typeof location<"u"&&location.protocol==="https:"?"wss:":"ws:",n=typeof location<"u"?location.host:"";return`${t}//${n}${e.startsWith("/")?e:"/"+e}`}He();var Dn="application/vnd.webjs+json";async function ha(e,t={}){let n=new Headers(t.headers||{});n.has("accept")||n.set("accept",Dn);let r=t.body;r!=null&&typeof r=="object"&&!(r instanceof FormData)&&!(r instanceof Blob)&&!(r instanceof ArrayBuffer)&&!(r instanceof URLSearchParams)&&!(typeof ReadableStream<"u"&&r instanceof ReadableStream)&&!ArrayBuffer.isView(r)&&(r=await Pn(r),n.has("content-type")||n.set("content-type",Dn));let o=await fetch(e,{...t,headers:n,body:r}),s=o.headers.get("content-type")||"",i=await o.text(),a=s.includes(Dn)?i?le(i):null:s.includes("application/json")?i?JSON.parse(i):null:i;if(!o.ok){let c=a&&a.error||`richFetch ${e} -> ${o.status}`,l=new Error(c);throw l.status=o.status,l.body=a,l}return a}He();kt();kt();Un();xt();var pr=class{constructor(t,n){this.host=t,this.options=n,this.updates=[],this._nextId=0}get value(){let t=this.options.source();if(!this.options.update)return this.updates.length>0?this.updates[this.updates.length-1].payload:t;for(let n of this.updates)t=this.options.update(t,n.payload);return t}add(t,n){let r=`opt-${++this._nextId}`;this.updates.push({id:r,payload:t}),this.host?.requestUpdate?.();let o=()=>{let s=this.updates.findIndex(i=>i.id===r);s!==-1&&(this.updates.splice(s,1),this.host?.requestUpdate?.())};return n&&typeof n.then=="function"&&(typeof n.finally=="function"?n.finally(()=>o()).catch(()=>{}):n.then(()=>o(),()=>o())),o}};async function ac(e,t,n){let r=e.get();e.set(t);let o;try{o=await n()}catch(s){throw e.set(r),s}return o&&o.success===!1&&e.set(r),o}function cc(e,t,n){return e&&typeof e.get=="function"&&typeof e.set=="function"?ac(e,t,n):new pr(e,t)}qn();var Gt=0,hs=new Map,Re=new Map,lc=1e3;function uc(e){if(!(!Array.isArray(e)||!e.length)){Gt+=1;for(let t of e)t&&hs.set(t,Gt)}}function fc(){return Gt}function dc(e,t,n){if(!(!Array.isArray(t)||!t.length)&&(Re.delete(e),Re.set(e,{tags:t.slice(),since:typeof n=="number"?n:Gt}),Re.size>lc)){let r=Re.keys().next().value;r!==void 0&&Re.delete(r)}}function pc(e){let t=Re.get(e);if(!t)return!1;for(let n of t.tags)if((hs.get(n)||0)>t.since)return!0;return!1}function hc(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}var mc="application/vnd.webjs+stream",yc=1,bc=2,gc=3,ms=new Uint8Array(0);function _c(e,t){let n=t||ms,r=n.length,o=new Uint8Array(5+r);return o[0]=e&255,o[1]=r>>>24&255,o[2]=r>>>16&255,o[3]=r>>>8&255,o[4]=r&255,r&&o.set(n,5),o}function wc(){let e=ms;return{push(t){if(t&&t.length){let r=new Uint8Array(e.length+t.length);r.set(e,0),r.set(t,e.length),e=r}let n=[];for(;e.length>=5;){let r=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0;if(e.length<5+o)break;let s=e.slice(5,5+o);n.push({type:r,payload:s}),e=e.slice(5+o)}return n}}}var Sc=Symbol.for("webjs.context");function Ac(e){return{__context__:Sc,name:e}}var Jt=class extends Event{constructor(t,n,r=!1){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=n,this.subscribe=r}},hr=class{constructor(t,{context:n,initialValue:r}){this._host=t,this._context=n,this._value=r,this._subscriptions=new Set,this._onRequest=o=>{let s=o;if(s.context===this._context)if(o.stopPropagation(),s.subscribe){let i={callback:s.callback},a=()=>{this._subscriptions.delete(i)};this._subscriptions.add(i),s.callback(this._value,a)}else s.callback(this._value)},typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}setValue(t){if(!Object.is(this._value,t)){this._value=t;for(let n of this._subscriptions){let r=()=>{this._subscriptions.delete(n)};n.callback(t,r)}}}hostConnected(){this._host.addEventListener("context-request",this._onRequest)}hostDisconnected(){this._host.removeEventListener("context-request",this._onRequest),this._subscriptions.clear()}},mr=class{constructor(t,{context:n,subscribe:r=!0}){this._host=t,this._context=n,this._subscribe=r,this._value=void 0,this._unsubscribe=void 0,typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}hostConnected(){this._dispatchRequest()}hostDisconnected(){this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=void 0)}_dispatchRequest(){let t=new Jt(this._context,(n,r)=>{let o=this._value;this._value=n,r&&(this._unsubscribe=r),!Object.is(o,n)&&typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()},this._subscribe);this._host.dispatchEvent(t)}};function Ec(){return typeof window<"u"}var Y={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},yr=class{constructor(t,{task:n,args:r,autoRun:o=!0}){this._host=t,this._taskFn=n,this._argsFn=r||(()=>[]),this._autoRun=o,this._status=Y.INITIAL,this._value=void 0,this._error=void 0,this._abortController=null,this._prevArgs=null,typeof t.addController=="function"&&t.addController(this)}get status(){return this._status}get value(){return this._value}get error(){return this._error}async run(){this.abort();let t=new AbortController;this._abortController=t;let n=this._argsFn();this._prevArgs=n,this._status=Y.PENDING,this._error=void 0,this._requestHostUpdate();try{let r=await this._taskFn(...n,{signal:t.signal});if(t.signal.aborted)return;this._value=r,this._status=Y.COMPLETE,this._error=void 0}catch(r){if(t.signal.aborted)return;this._error=r,this._status=Y.ERROR,this._value=void 0}finally{this._abortController===t&&(this._abortController=null)}this._requestHostUpdate()}abort(){this._abortController&&(this._abortController.abort(),this._abortController=null)}render(t={}){switch(this._status){case Y.INITIAL:return t.initial?.();case Y.PENDING:return t.pending?.();case Y.COMPLETE:return t.complete?.(this._value);case Y.ERROR:return t.error?.(this._error);default:return}}hostUpdate(){if(!this._autoRun||!Ec())return;let t=this._argsFn();this._argsEqual(this._prevArgs,t)||this.run()}hostUpdated(){}hostConnected(){}hostDisconnected(){this.abort()}_requestHostUpdate(){typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()}_argsEqual(t,n){if(t===null||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}};export{mr as ContextConsumer,hr as ContextProvider,Jt as ContextRequestEvent,yc as FRAME_CHUNK,bc as FRAME_END,gc as FRAME_ERROR,A as MARKER,jo as SEED_MISS,mc as STREAM_CONTENT_TYPE,Pe as Signal,ua as Suspense,yr as Task,Y as TaskStatus,Tt as WebComponent,Bn as WebjsFrame,$n as WebjsStream,Oi as activeActionSignal,Zt as adoptStyles,Di as allTags,Ls as asyncAppend,Ms as asyncReplace,Vs as batch,Rs as cache,zs as computed,da as connectWS,pc as consumeStale,Ac as createContext,wc as createFrameDecoder,js as createRef,la as cspNonce,ws as css,lo as deserialize,Po as disableClientRouter,Ys as effect,tr as enableClientRouter,_c as encodeFrame,Es as escapeAttr,As as escapeText,fc as fetchMark,na as forbidden,Ns as guard,_s as html,on as isAsyncAppend,sn as isAsyncReplace,Qt as isCSS,tt as isCache,aa as isForbidden,Ze as isGuard,Qe as isKeyed,Ii as isLazy,nn as isLive,sa as isNotFound,ia as isRedirect,et as isRef,Xe as isRepeat,Ks as isSignal,fa as isSuspense,O as isTemplate,rn as isTemplateContent,ca as isUnauthorized,tn as isUnsafeHTML,nt as isUntil,rt as isWatch,Ts as keyed,Cs as live,Mi as lookup,Pi as lookupModuleUrl,uc as markStale,Io as navigate,ta as notFound,cc as optimistic,le as parse,hc as parseTagHeader,Li as primeModuleUrl,ea as prop,oa as redirect,xs as ref,Mn as register,dc as registerKeyTags,Se as render,Hn as renderStream,wr as repeat,Do as revalidate,ha as richFetch,jt as scanSeeds,co as serialize,St as setActiveActionSignal,Ws as signal,Pn as stringify,Ss as stylesToString,vt as tagOf,Sa as takeSeed,ks as templateContent,ra as unauthorized,vs as unsafeHTML,Os as until,Ps as watch};
1
+ var Es=Object.defineProperty;var G=(e,t)=>()=>(e&&(t=e(e=0)),t);var wr=(e,t)=>{for(var n in t)Es(e,n,{get:t[n],enumerable:!0})};function Mr(){return typeof HTMLElement<"u"&&typeof HTMLSlotElement<"u"}function ii(){if(jr||(Q=Mr(),!Q))return;Be=HTMLSlotElement.prototype.assignedNodes,wn=HTMLSlotElement.prototype.assignedElements,pt=Object.getOwnPropertyDescriptor(Element.prototype,"assignedSlot"),HTMLSlotElement.prototype.assignedNodes=function(n){return this.hasAttribute(v)&&!An(this)?Tn(this,n):Be?Be.call(this,n):[]},HTMLSlotElement.prototype.assignedElements=function(n){return this.hasAttribute(v)&&!An(this)?Tn(this,n).filter(r=>r.nodeType===1):wn?wn.call(this,n):[]},Object.defineProperty(Element.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let n=pt&&pt.get?pt.get.call(this):null;return n||Rr(this)}});let e=Object.getOwnPropertyDescriptor(Text.prototype,"assignedSlot");Object.defineProperty(Text.prototype,"assignedSlot",{configurable:!0,enumerable:!0,get:function(){let n=e&&e.get?e.get.call(this):null;return n||Rr(this)}}),Sn=HTMLSlotElement.prototype.assign,HTMLSlotElement.prototype.assign=function(...n){if(this.hasAttribute(v)&&!An(this)){let r=ai(this);if(r){let o=W(r);o.manualAssign||(o.manualAssign=new Map);let s=n.filter(Boolean);for(let[i,c]of o.manualAssign){if(i===this)continue;let a=c.filter(l=>{let u=l.deref();return u!==void 0&&s.indexOf(u)===-1});a.length!==c.length&&(a.length?o.manualAssign.set(i,a):o.manualAssign.delete(i))}if(s.length?o.manualAssign.set(this,s.map(i=>new WeakRef(i))):o.manualAssign.delete(this),o.applying&&o.pendingRecordNodes)for(let i of s)o.pendingRecordNodes.add(i);else o.pendingRecordNodes=new Set(s);_e(o),z(r)}return}return Sn?Sn.apply(this,n):void 0},jr=!0}function On(e,t){let n=e.manualAssign;if(!n||!n.size)return null;for(let[r,o]of n){let s=!1,i=o.filter(c=>{let a=c.deref();return a===void 0?!1:(a===t&&(s=!0),!0)});if(i.length!==o.length&&(i.length?n.set(r,i):n.delete(r)),s){let c=e.host;return c&&(r===c||c.contains(r))?r:null}}return null}function ai(e){for(let t=e.parentElement;t;t=t.parentElement)if(t[A])return V(t,e)?t:null;return null}function An(e){let t=e;for(let n=0;n<128;n++){let r=t.parentNode;if(!r||r===t)return!1;if(r.nodeType===11&&r.host)return!0;t=r}return!1}function Tn(e,t){if(e.getAttribute(L)!==D)return[];let n=Array.from(e.childNodes);return!t||!t.flatten?n:kn(n,new Set,0)}function kn(e,t,n){if(n>=si)return e.slice();let r=[];for(let o of e)if(o.nodeType===1&&o.tagName==="SLOT"){let s=o;if(t.has(s))continue;if(t.add(s),s.hasAttribute(v)){let i=Tn(s,{flatten:!1});if(i.length>0)for(let c of kn(i,t,n+1))r.push(c);else for(let c of kn(Array.from(s.childNodes),t,n+1))r.push(c)}else if(Be){let i=Be.call(s,{flatten:!0});for(let c of i)r.push(c)}else r.push(o)}else r.push(o);return r}function Rr(e){let t=e.parentElement;return t&&t.tagName==="SLOT"&&t.hasAttribute(v)&&t.getAttribute(L)===D?t:null}function W(e){let t=e,n=t[A];return n||(n={host:e,authored:[],assignedByName:new Map,lastSnapshot:new WeakMap},t[A]=n),n}function Ln(e){return!!e[A]}function Pr(e){let t=W(e);for(;e.firstChild;){let n=e.firstChild;t.authored.push(n),g.add(n),e.removeChild(n)}_e(t)}function _e(e){let t=e.assignedByName;t.clear();for(let n of e.authored)ci(t,se(e,n),n)}function se(e,t){let n=On(e,t);if(n)return F(n.getAttribute("name"));if(e.adoptedKey){let r=e.adoptedKey.get(t);if(r!==void 0)return r}return Fr(t)}function Ir(e){let t=W(e);t.adopted=!0;let n=new Set,r=e.querySelectorAll(`slot[${v}]`);for(let o of r){let s=o;if(!V(e,s)||s.getAttribute(L)!==D||_t(t,e,s))continue;let i=F(s.getAttribute("name"));if(!n.has(i)){n.add(i);let c=Array.from(s.childNodes);for(let a of c)t.authored.push(a),Fr(a)!==i&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(a,i));t.lastSnapshot.set(s,c.slice())}}for(let o of e.querySelectorAll("wj-slot-park"))if(V(e,o)){for(let s of Array.from(o.childNodes))g.add(s),t.authored.push(s);o.remove()}_e(t)}function F(e){return e==null||e===""||e==="default"?null:e}function Fr(e){return e.nodeType!==1?null:F(e.getAttribute("slot"))}function ci(e,t,n){let r=e.get(t);r||(r=[],e.set(t,r)),r.push(n)}function ce(e,t,n){let r=W(e),o=F(t),s=Array.isArray(n)?n.filter(Boolean):n?[n]:[],i=r.authored.findIndex(a=>se(r,a)===o),c=r.authored.filter(a=>se(r,a)===o);r.authored=r.authored.filter(a=>se(r,a)!==o),(i===-1||i>r.authored.length)&&(i=r.authored.length);for(let a of s)a.nodeType===1&&!On(r,a)&&(o==null?a.removeAttribute("slot"):a.setAttribute("slot",o)),g.add(a);if(r.authored.splice(i,0,...s),r.applying&&r.pendingRecordNodes){for(let a of c)r.pendingRecordNodes.add(a);for(let a of s)r.pendingRecordNodes.add(a)}else r.pendingRecordNodes=new Set([...c,...s]);if(r.adoptedKey){for(let a of c)r.adoptedKey.delete(a);for(let a of s)r.adoptedKey.delete(a)}_e(r),z(e)}function li(){X||!Q||(X=Node.prototype.appendChild,Dr=Node.prototype.insertBefore,ge=Node.prototype.removeChild,xn=Node.prototype.replaceChild,Br=Element.prototype.append,Ur=Element.prototype.prepend,$r=Element.prototype.replaceChildren,ht=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),jn=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"))}function bt(e,t){let n=e[k];e[k]=!0;try{return t()}finally{e[k]=n,n||Mn(e)}}function Hr(e){if(!Q)return;let t=e,n=W(e);n.backstop||(n.backstop=new MutationObserver(r=>gt(e,n,r)),n.backstop.observe(e,{childList:!0,subtree:!1}),n.flipSensor=new MutationObserver(r=>qr(e,r)),n.flipSensor.observe(e,{attributes:!0,attributeFilter:["slot","name"],subtree:!0}))}function gt(e,t,n){let r=e,o=r[ae],s=r[Symbol.for("webjs.instance")],i=!1,c=new Set;for(let a of n){for(let l of a.addedNodes)if(c.add(l),l!==o&&!(s&&zr(s,l))){if(t.authored.indexOf(l)!==-1){i=!0;continue}g.add(l),t.authored.push(l),i=!0}for(let l of a.removedNodes){let u=t.authored.indexOf(l);if(u===-1||e.contains(l))continue;g.has(l)&&l.parentNode==null&&!c.has(l)||(t.authored.splice(u,1),i=!0)}}i&&z(e)}function Mn(e){let t=e,n=t[A];if(!(n&&n.backstop))return;let r=n.backstop.takeRecords();(!(Symbol.for("webjs.instance")in t)||t[Symbol.for("webjs.instance")])&&gt(e,n,r)}function qr(e,t){let n=e[A];if(!n)return;let r=!1;for(let o of t){if(o.type!=="attributes")continue;let s=o.target;o.attributeName==="name"?s.tagName==="SLOT"&&s.hasAttribute(v)&&V(e,s)&&(r=!0):o.attributeName==="slot"&&(n.adoptedKey&&n.adoptedKey.delete(s),n.authored.indexOf(s)!==-1&&(r=!0))}r&&z(e)}function Vr(e){let t=e[A];t&&(t.backstop&&(gt(e,t,t.backstop.takeRecords()),t.backstop.disconnect(),t.backstop=void 0),t.flipSensor&&(qr(e,t.flipSensor.takeRecords()),t.flipSensor.disconnect(),t.flipSensor=void 0))}function Wr(e){if(!Q)return;let t=e,n=t[A];if(!n)return;let r=t[Symbol.for("webjs.instance")],o=Symbol.for("webjs.instance")in t,s=!o&&n.adopted===!0,i=!1;for(let c of Array.from(e.childNodes))if(c!==t[ae]){if(n.authored.indexOf(c)!==-1){i=!0;continue}o&&(!r||zr(r,c))||!o&&s||(g.add(c),n.authored.push(c),i=!0)}i&&z(e)}function zr(e,t){if(!e||!e.startNode||!e.endNode)return!1;if(t===e.startNode||t===e.endNode)return!0;for(let n=e.startNode.nextSibling;n&&n!==e.endNode;n=n.nextSibling)if(n===t)return!0;return!1}function ui(e){let t=e,n=t[ae];return(!n||!n.isConnected)&&(n||(n=e.ownerDocument.createElement("wj-slot-park"),n.setAttribute("hidden",""),n.style.display="none",t[ae]=n),bt(e,()=>X.call(e,n))),n}function ie(e){return e instanceof Node||!!(e&&typeof e=="object"&&e.ownerDocument&&e.ownerDocument.defaultView&&e instanceof e.ownerDocument.defaultView.Node)}function En(e,t,n){if(n&&!ie(t))return[e.ownerDocument.createTextNode(`${t}`)];if(!ie(t))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");if(t&&t.nodeType===11){let r=Array.from(t.childNodes);mt(e,r);for(let o of r)ge.call(t,o);return r}return mt(e,[t]),[t]}function mt(e,t){be(e,t);for(let n of t){if(!ie(n))throw new TypeError("Failed to execute insertion on the host: parameter is not of type Node.");let r=n.nodeType;if(r!==1&&r!==3&&r!==4&&r!==7&&r!==8&&r!==11)throw new DOMException("Failed to execute insertion on the host: the node type may not be inserted here.","HierarchyRequestError")}}function be(e,t){for(let n of t)if(n===e||n.nodeType===1&&n.contains(e))throw new DOMException("Failed to execute insertion on the host: the new child contains the parent.","HierarchyRequestError")}function vn(e,t,n){let r=e.authored;for(let s of t){let i=r.indexOf(s);i!==-1&&r.splice(i,1)}let o=n==null?r.length:r.indexOf(n);o===-1&&(o=r.length),r.splice(o,0,...t)}function Kr(e,t){let n=e[A];return n?_t(n,e,t):!1}function _t(e,t,n){for(let r=n;r&&r!==t;r=r.parentNode)if(e.authored.indexOf(r)!==-1)return!0;return!1}function Cn(e,t){if(g.has(t))return!0;let n=t.parentNode;if(n==null)return!1;if(n===e||n===e[ae])return!0;let r=e[A];return n.nodeType===1&&n.tagName==="SLOT"&&n.hasAttribute(v)&&(r&&r.lastSnapshot.has(n)||e.contains(n)&&V(e,n))}function Nn(e,t){let n=[];for(let s of t)ie(s)?s.nodeType===11?n.push({frag:s}):n.push({node:s}):n.push({text:`${s}`});for(let s of n)s.frag?be(e,Array.from(s.frag.childNodes)):s.node&&mt(e,[s.node]);let r=e.ownerDocument.createDocumentFragment();for(let s of n)if(s.text!==void 0)X.call(r,e.ownerDocument.createTextNode(s.text));else if(s.frag){let i=Array.from(s.frag.childNodes);mt(e,i);for(let c of i)X.call(r,c)}else s.node&&(be(e,[s.node]),X.call(r,s.node));let o=Array.from(r.childNodes);be(e,o);for(let s of o)ge.call(r,s);return o}function q(e,t,n){if(t.applying&&t.pendingRecordNodes)for(let r of n||[])t.pendingRecordNodes.add(r);else t.pendingRecordNodes=new Set(n||[]);if(t.adoptedKey&&n)for(let r of n)t.adoptedKey.delete(r);_e(t),z(e)}function Yr(e){if(!Q)return;let t=e;if(t[Or])return;li(),t[Or]=!0;let n=W(e);t.appendChild=function(r){if(t[k])return X.call(this,r);let o=En(e,r,!1);for(let s of o)g.add(s);return vn(n,o,null),q(e,n,o),r},t.insertBefore=function(r,o){if(t[k])return Dr.call(this,r,o);if(!ie(r))throw new TypeError("Failed to execute insertBefore on the host: parameter 1 is not of type Node.");if(o!=null&&!ie(o))throw new TypeError("Failed to execute insertBefore on the host: parameter 2 is not of type Node.");if(be(e,r.nodeType===11?Array.from(r.childNodes):[r]),o!=null&&(n.authored.indexOf(o)===-1||!Cn(e,o)))throw new DOMException("insertBefore: reference node is not an assigned child of this host","NotFoundError");if(r===o)return r;let s=En(e,r,!1);for(let i of s)g.add(i);return vn(n,s,o||null),q(e,n,s),r},t.removeChild=function(r){if(t[k])return ge.call(this,r);let o=n.authored.indexOf(r);if(o===-1)return ge.call(this,r);if(!Cn(e,r))throw new DOMException("removeChild: the node is not an assigned child of this host","NotFoundError");return n.authored.splice(o,1),q(e,n,[r]),r},t.replaceChild=function(r,o){if(t[k])return xn.call(this,r,o);if(n.authored.indexOf(o)===-1)return xn.call(this,r,o);if(!ie(r))throw new TypeError("Failed to execute replaceChild on the host: parameter 1 is not of type Node.");if(be(e,r.nodeType===11?Array.from(r.childNodes):[r]),!Cn(e,o))throw new DOMException("replaceChild: the node to be replaced is not an assigned child of this host","NotFoundError");if(r===o)return o;let i=En(e,r,!1);for(let a of i)g.add(a);for(let a of i){if(a===o)continue;let l=n.authored.indexOf(a);l!==-1&&n.authored.splice(l,1)}let c=n.authored.indexOf(o);return n.authored.splice(c,1,...i),q(e,n,[...i,o]),o},t.append=function(...r){if(t[k])return Br.apply(this,r);let o=Nn(e,r);for(let s of o)g.add(s);vn(n,o,null),q(e,n,o)},t.prepend=function(...r){if(t[k])return Ur.apply(this,r);let o=Nn(e,r);for(let s of o)g.add(s);for(let s of o){let i=n.authored.indexOf(s);i!==-1&&n.authored.splice(i,1)}n.authored.unshift(...o),q(e,n,o)},t.replaceChildren=function(...r){if(t[k])return $r.apply(this,r);let o=Nn(e,r);for(let i of o)g.add(i);let s=n.authored;n.authored=o.slice(),q(e,n,[...s,...o])},Object.defineProperty(t,"innerHTML",{configurable:!0,get(){return ht.get.call(this)},set(r){if(t[k]){ht.set.call(this,r);return}let o=e.ownerDocument.createElement("div");ht.set.call(o,r===null?"":`${r}`);let s=Array.from(o.childNodes);for(let c of s)g.add(c);let i=n.authored;n.authored=s,q(e,n,[...i,...s])}}),Object.defineProperty(t,"textContent",{configurable:!0,get(){return jn.get.call(this)},set(r){if(t[k]){jn.set.call(this,r);return}let o=r==null||r===""?[]:[e.ownerDocument.createTextNode(`${r}`)];for(let i of o)g.add(i);let s=n.authored;n.authored=o,q(e,n,[...s,...o])}})}function z(e){if(!Q)return;let t=e[A];if(t){if(t.applying){t.reapply=!0;return}t.applying=!0;try{do{t.reapply=!1;let n=t.pendingRecordNodes||fi;t.pendingRecordNodes=void 0,di(e,t,n),pi(e,t),_e(t);let r=[],o=new Set;for(let u of e.querySelectorAll(`slot[${v}]`))if(V(e,u)&&!_t(t,e,u)){if(!u.hasAttribute(L)&&!(Ue in u)){o.add(F(u.getAttribute("name")));continue}r.push(u)}let s=new Map;for(let u of r){let f=F(u.getAttribute("name")),d=s.get(f);d||(d=[],s.set(f,d)),d.push(u)}let i=[];for(let[u,f]of s){let d=t.assignedByName.get(u)||[];for(let h=0;h<f.length;h++){let m=f[h],S=d.filter(p=>{let j=On(t,p);return j?j===m:h===0}),y=S.filter(p=>p===e||p.nodeType===1&&p.contains(e));if(y.length){for(let p of y)g.delete(p);S=S.filter(p=>y.indexOf(p)===-1)}S.length>0?mi(t,m,S)&&i.push(m):yi(t,m)&&i.push(m)}}for(let u of i)gi(t,u);let c=new Set(s.keys());for(let u of o)c.add(u);let a=new Set;for(let u of t.authored)c.has(se(t,u))||a.add(u);let l=e[ae];if(l)for(let u of Array.from(l.childNodes))a.has(u)||ge.call(l,u);if(a.size){let u=ui(e);for(let f of a)f.parentNode!==u&&(g.delete(f),bt(e,()=>X.call(u,f)))}if(t.backstop){let u=t.backstop.takeRecords();u.length&&gt(e,t,u)}}while(t.reapply)}finally{t.applying=!1}}}function di(e,t,n){for(let r of e.querySelectorAll(`slot[${v}][${L}="${D}"]`)){if(!V(e,r)||_t(t,e,r))continue;let o=r,s=t.lastSnapshot.get(o);if(!s)continue;let i=Array.from(o.childNodes);if(Rn(i,s))continue;let c=t.authored,a=F(o.getAttribute("name")),l=i.filter(m=>!n.has(m));for(let m of l)c.indexOf(m)===-1&&se(t,m)!==a&&(t.adoptedKey||(t.adoptedKey=new WeakMap),t.adoptedKey.set(m,a));for(let m of c){if(l.indexOf(m)!==-1||se(t,m)!==a)continue;let S=c.indexOf(m),y=0;for(let p=0;p<l.length;p++){let j=c.indexOf(l[p]);j!==-1&&j<S&&(y=p+1)}l.splice(y,0,m)}let u=new Set(l);for(let m of s)u.add(m);let f=-1,d=0;for(let m of c){if(u.has(m)){f===-1&&(f=d);continue}d+=1}let h=c.filter(m=>!u.has(m));(f===-1||f>h.length)&&(f=h.length),h.splice(f,0,...l),t.authored=h}}function pi(e,t){let n=e[ae];t.authored=t.authored.filter(r=>{if(g.has(r))return!0;let o=r.parentNode;return o==null?!1:!!(o===e||o===n||o.nodeType===1&&o.tagName==="SLOT"&&o.hasAttribute(v)&&(t.lastSnapshot.has(o)||e.contains(o)&&V(e,o)))})}function Gr(e){if(!Q)return!1;for(let t of e.querySelectorAll(`slot[${v}][${L}]`))if(V(e,t))return!0;return!1}function V(e,t){let n=t[yt];if(n)return n===e;let r=typeof t.getAttribute=="function"?t.getAttribute(oi):null;if(r){let o=hi(t,r);if(o)return o===e}for(let o=t.parentElement;o&&o!==e;o=o.parentElement)if(o.tagName.includes("-"))return!1;return!0}function hi(e,t){let n=t.toLowerCase();for(let r=e.parentElement;r;r=r.parentElement)if(r.tagName.toLowerCase()===n)return r;return null}function mi(e,t,n){for(let l of n)g.delete(l);let r=t.getAttribute(L)!==D,o=e.lastSnapshot.get(t)||[],s=r||!Rn(o,n);if(!r&&Rn(Array.from(t.childNodes),n))return e.lastSnapshot.set(t,n.slice()),s;let i=t[Ue];if(r&&i)for(;t.firstChild;)i.appendChild(t.firstChild);let c=new Set(n);for(let l of Array.from(t.childNodes))c.has(l)||t.removeChild(l);let a=t.firstChild;for(let l of n){if(l===a){a=a.nextSibling;continue}t.insertBefore(l,a)}return t.setAttribute(L,D),e.lastSnapshot.set(t,n.slice()),s}function yi(e,t){let n=t.getAttribute(L)===D;if(t.setAttribute(L,ri),!n)return Lr(t),!1;for(e.lastSnapshot.delete(t);t.firstChild;)t.removeChild(t.firstChild);return Lr(t),!0}function Lr(e){let t=e[Ue];!t||t.childNodes.length===0||e.appendChild(t)}function Jr(e,t){if(!Ln(e))return;let n=W(e),r=F(t.getAttribute("name")),o=n.assignedByName.get(r);if(o)for(let s of o)s.parentNode===t&&(g.add(s),t.removeChild(s));n.lastSnapshot.delete(t)}function bi(e){e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1}))}function gi(e,t){e.pendingSlotChanges||(e.pendingSlotChanges=new Set),e.pendingSlotChanges.add(t),!e.slotChangeScheduled&&(e.slotChangeScheduled=!0,queueMicrotask(()=>{e.slotChangeScheduled=!1;let n=e.pendingSlotChanges||new Set;e.pendingSlotChanges=new Set;for(let r of n)bi(r)}))}function Rn(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Q,A,v,L,D,ri,Ue,yt,oi,si,Be,wn,pt,Sn,jr,k,Or,ae,g,X,Dr,ge,xn,Br,Ur,$r,ht,jn,fi,wt=G(()=>{Q=Mr(),A=Symbol("webjs.slot.state"),v="data-webjs-light",L="data-projection",D="actual",ri="fallback",Ue=Symbol("webjs.slot.fallbackFrag"),yt=Symbol("webjs.slot.templateOwner"),oi="data-wj-slot-owner",si=64,Be=null,wn=null,pt=null,Sn=null,jr=!1;ii();k=Symbol("webjs.slot.rendering"),Or=Symbol("webjs.slot.intercepted"),ae=Symbol("webjs.slot.park"),g=new WeakSet,X=null,Dr=null,ge=null,xn=null,Br=null,Ur=null,$r=null,ht=null,jn=null;fi=new Set});function fo(e,t,n){zi.has(t)?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}async function Bn(e){return JSON.stringify(await po(e))}function ue(e){return ho(JSON.parse(e))}async function po(e){let t=Ki();return await Yi(e,t),le(e,t)}function ho(e){return ee(e,Qi())}function Ki(){return{refCount:new Map,idOf:new Map,emitted:new Set,nextId:0,blobBytes:new Map,fdEntries:new Map}}async function Yi(e,t){let n=[e];for(;n.length;){let r=n.pop();if(!ea(r))continue;let o=t.refCount.get(r)||0;if(t.refCount.set(r,o+1),!(o>0)){if(typeof Blob<"u"&&r instanceof Blob){let s=new Uint8Array(await r.arrayBuffer());t.blobBytes.set(r,s);continue}if(typeof FormData<"u"&&r instanceof FormData){let s=t.fdEntries.get(r)||[...r.entries()];t.fdEntries.set(r,s);for(let[,i]of s)typeof i!="string"&&n.push(i);continue}if(Array.isArray(r))for(let s=0;s<r.length;s++)n.push(r[s]);else if(r instanceof Map)for(let[s,i]of r)n.push(s),n.push(i);else if(r instanceof Set)for(let s of r)n.push(s);else if(ta(r))for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&n.push(r[s])}}for(let[r,o]of t.refCount)o>1&&t.idOf.set(r,t.nextId++)}function le(e,t){if(e===null)return null;if(e===void 0)return{[_]:"undef"};let n=typeof e;if(n==="string"||n==="boolean")return e;if(n==="number")return Number.isNaN(e)?{[_]:"NaN"}:e===1/0?{[_]:"Inf"}:e===-1/0?{[_]:"-Inf"}:Object.is(e,-0)?{[_]:"-0"}:e;if(n==="bigint")return{[_]:"BigInt",v:e.toString()};if(n==="symbol"){let s=Symbol.keyFor(e);if(s===void 0)throw new TypeError("Cannot serialize a local Symbol; only Symbol.for() registered symbols are supported.");return{[_]:"Sym",v:s}}if(n==="function")throw new TypeError("Cannot serialize a function.");let r=t.idOf.get(e);if(r!==void 0&&t.emitted.has(r))return{[_]:"Ref",v:r};r!==void 0&&t.emitted.add(r);let o;if(e instanceof Date)o={[_]:"Date",v:Number.isNaN(e.getTime())?null:e.toISOString()};else if(e instanceof Error)o={[_]:"Error",v:{name:e.name,message:e.message,stack:e.stack||null}};else if(typeof Blob<"u"&&e instanceof Blob){let s=t.blobBytes.get(e);typeof File<"u"&&e instanceof File?o={[_]:"File",v:Ve(s),n:e.name,t:e.type||"",m:e.lastModified}:o={[_]:"Blob",v:Ve(s),t:e.type||""}}else if(typeof FormData<"u"&&e instanceof FormData){let s=t.fdEntries.get(e)||[...e.entries()],i=[];for(let[c,a]of s)i.push([c,le(a,t)]);o={[_]:"FD",v:i}}else if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)o=Gi(e);else if(e instanceof Map){let s=[];for(let[i,c]of e)s.push([le(i,t),le(c,t)]);o={[_]:"Map",v:s}}else if(e instanceof Set){let s=[];for(let i of e)s.push(le(i,t));o={[_]:"Set",v:s}}else if(Array.isArray(e))o=e.map(s=>le(s,t));else{o={};for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=na(s)?"_"+s:s;fo(o,i,le(e[s],t))}}if(r!==void 0){if(Array.isArray(o))return{[_]:"Arr",_id:r,v:o};o._id=r}return o}function Gi(e){if(e instanceof ArrayBuffer)return{[_]:"buf",v:Ve(new Uint8Array(e))};if(e instanceof DataView)return{[_]:"dv",v:Ve(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))};let t=e.constructor.name,n=Ji[t];if(!n)throw new TypeError(`Unsupported typed array: ${t}`);let r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return{[_]:n,v:Ve(r)}}function Qi(){return{refs:new Map}}function ee(e,t){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){let s=[];for(let i=0;i<e.length;i++)s.push(ee(e[i],t));return s}let n=e[_];if(typeof n=="string")return Zi(e,n,t);let r={},o=e._id;typeof o=="number"&&t.refs.set(o,r);for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||s==="_id")continue;let i=ra(s)?s.slice(1):s;fo(r,i,ee(e[s],t))}return r}function Zi(e,t,n){let r=e._id,o=s=>(typeof r=="number"&&n.refs.set(r,s),s);switch(t){case"undef":return;case"NaN":return NaN;case"Inf":return 1/0;case"-Inf":return-1/0;case"-0":return-0;case"BigInt":return o(BigInt(e.v));case"Sym":return o(Symbol.for(e.v));case"Date":return o(e.v==null?new Date(NaN):new Date(e.v));case"Error":{let s=new Error(e.v.message);return s.name=e.v.name,e.v.stack&&(s.stack=e.v.stack),typeof r=="number"&&n.refs.set(r,s),s}case"Map":{let s=new Map;typeof r=="number"&&n.refs.set(r,s);for(let[i,c]of e.v)s.set(ee(i,n),ee(c,n));return s}case"Set":{let s=new Set;typeof r=="number"&&n.refs.set(r,s);for(let i of e.v)s.add(ee(i,n));return s}case"Arr":{let s=[];typeof r=="number"&&n.refs.set(r,s);for(let i of e.v)s.push(ee(i,n));return s}case"Ref":{let s=n.refs.get(e.v);if(s===void 0)throw new TypeError(`Dangling reference: id=${e.v}`);return s}case"Blob":{if(typeof Blob>"u")throw new TypeError("Blob is not available in this environment.");let s=qe(e.v);return o(new Blob([s],{type:e.t||""}))}case"File":{if(typeof File>"u")throw new TypeError("File is not available in this environment.");let s=qe(e.v);return o(new File([s],e.n,{type:e.t||"",lastModified:e.m}))}case"FD":{if(typeof FormData>"u")throw new TypeError("FormData is not available in this environment.");let s=new FormData;o(s);for(let[i,c]of e.v){let a=ee(c,n);s.append(i,a)}return s}default:{if(t==="buf"){let i=qe(e.v);return o(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength))}if(t==="dv"){let i=qe(e.v);return o(new DataView(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)))}let s=Xi[t];if(s){let i=qe(e.v),c=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);return o(new s(c))}throw new TypeError(`Unknown serialization tag: ${t}`)}}}function ea(e){return e!==null&&typeof e=="object"}function ta(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function na(e){return/^_+\$wj$/.test(e)||/^_+id$/.test(e)}function ra(e){return/^__+\$wj$/.test(e)||/^__+id$/.test(e)}function Ve(e){if(mo)return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64");let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function qe(e){if(mo){let r=Buffer.from(e,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}var _,zi,Ji,Xi,mo,We=G(()=>{_="_$wj",zi=new Set(["__proto__","constructor","prototype"]);Ji={Int8Array:"i8",Uint8Array:"u8",Uint8ClampedArray:"u8c",Int16Array:"i16",Uint16Array:"u16",Int32Array:"i32",Uint32Array:"u32",Float32Array:"f32",Float64Array:"f64",BigInt64Array:"bi64",BigUint64Array:"bu64"},Xi={i8:Int8Array,u8:Uint8Array,u8c:Uint8ClampedArray,i16:Int16Array,u16:Uint16Array,i32:Int32Array,u32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:typeof BigInt64Array<"u"?BigInt64Array:null,bu64:typeof BigUint64Array<"u"?BigUint64Array:null};mo=typeof Buffer<"u"&&typeof Buffer.from=="function"});var ko={};wr(ko,{observeLazy:()=>Ca,observeViewportOnce:()=>ka});function To(e){let t=Hn.get(e);return t||(t=import(e).finally(()=>Hn.delete(e)),Hn.set(e,t),t)}function Ca(e){for(let[t,n]of Object.entries(e))fe.set(t.toLowerCase(),n);if(typeof IntersectionObserver>"u"){for(let t of fe.values())To(t);fe.clear();return}Ke||(Ke=new IntersectionObserver(Na,{rootMargin:"200px"})),No(),typeof MutationObserver<"u"&&new MutationObserver(()=>No()).observe(document.body,{childList:!0,subtree:!0})}function No(){if(!(!Ke||!fe.size))for(let e of fe.keys())for(let t of document.querySelectorAll(e))Ke.observe(t)}function Na(e){for(let t of e){if(!t.isIntersecting)continue;let n=t.target.tagName.toLowerCase(),r=fe.get(n);r&&(To(r),fe.delete(n),Ke?.unobserve(t.target))}}function Ta(e){for(let t of e){if(!t.isIntersecting)continue;let n=Rt.get(t.target);Rt.delete(t.target),ze?.unobserve(t.target),n&&n()}}function ka(e,t){return typeof IntersectionObserver>"u"?(t(),()=>{}):(ze||(ze=new IntersectionObserver(Ta,{rootMargin:"200px"})),Rt.set(e,t),ze.observe(e),()=>{Rt.delete(e),ze?.unobserve(e)})}var fe,Ke,Hn,ze,Rt,xo=G(()=>{fe=new Map,Ke=null,Hn=new Map;ze=null,Rt=new WeakMap});var qn,Vn=G(()=>{qn=typeof HTMLElement<"u"?class extends HTMLElement{constructor(){super(),this._webjsLoadedSrc=null,this._webjsLazyTeardown=null}static get observedAttributes(){return["src"]}connectedCallback(){this._webjsScheduleLoad()}disconnectedCallback(){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null)}attributeChangedCallback(t,n,r){t==="src"&&this.isConnected&&this._webjsScheduleLoad()}_webjsScheduleLoad(){let t=this.getAttribute("src");if(!t){this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),this._webjsLoadedSrc=null;return}let n=t;try{n=new URL(t,location.href).href}catch{}if(n===this._webjsLoadedSrc)return;this._webjsLazyTeardown&&(this._webjsLazyTeardown(),this._webjsLazyTeardown=null),(this.getAttribute("loading")||"eager").toLowerCase()==="lazy"?(this._webjsLoadedSrc=n,Promise.resolve().then(()=>(xo(),ko)).then(({observeViewportOnce:o})=>{this._webjsLoadedSrc!==n||!this.isConnected||(this._webjsLazyTeardown=o(this,()=>{this._webjsLazyTeardown=null,this._webjsLoad(n)}))})):(this._webjsLoadedSrc=n,this._webjsLoad(n))}_webjsLoad(t){Promise.resolve().then(()=>(Ot(),jo)).then(({loadFrame:n})=>{this._webjsLoadedSrc!==t||!this.isConnected||n(this,t)})}}:null;typeof customElements<"u"&&qn&&!customElements.get("webjs-frame")&&customElements.define("webjs-frame",qn)});function ja(e,t,n){switch(e){case"append":n&&t.append(n);break;case"prepend":n&&t.prepend(n);break;case"before":n&&t.before(n);break;case"after":n&&t.after(n);break;case"replace":n&&t.replaceWith(n);break;case"update":n&&t.replaceChildren(n);break;case"remove":t.remove();break;default:break}}function zn(e,t){let n=t||(typeof document<"u"?document:null);if(!n)return;let r=null;if(typeof e=="string"){let s=n.createElement("template");s.innerHTML=e,r=s.content}else if(e&&e.nodeType)r=e;else return;let o=r.querySelectorAll?Array.from(r.querySelectorAll("webjs-stream")):[];if(o.length)for(let s of o)n.body.append(s);else n.body.append(r)}var xa,Wn,Lt=G(()=>{xa=new Set(["append","prepend","before","after","replace","update"]);Wn=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this._webjsApplied||(this._webjsApplied=!0,this._webjsApply())}_webjsApply(){let t=(this.getAttribute("action")||"").toLowerCase(),n=this.ownerDocument||document,r=[],o=this.getAttribute("target");if(o){let i=n.getElementById(o);i&&(r=[i])}else{let i=this.getAttribute("targets");if(i)try{r=Array.from(n.querySelectorAll(i))}catch{r=[]}}let s=xa.has(t)?this.querySelector("template"):null;try{for(let i of r){let c=s?s.content.cloneNode(!0):null;ja(t,i,c)}}finally{this.remove()}}}:null;typeof customElements<"u"&&Wn&&!customElements.get("webjs-stream")&&customElements.define("webjs-stream",Wn)});var Ro,Oo=G(()=>{Ro=typeof HTMLElement<"u"?class extends HTMLElement{connectedCallback(){this.style.display||(this.style.display="contents")}}:null;typeof customElements<"u"&&Ro&&!customElements.get("webjs-suspense")&&customElements.define("webjs-suspense",Ro)});function Mt(e){let t=e||(typeof document<"u"?document:null);if(!(!t||typeof t.querySelectorAll!="function")){for(let n of t.querySelectorAll('script[type="application/json"]#__webjs-seeds, script[type="application/json"][data-webjs-seeds]'))Mo(n.textContent,n);for(let n of t.querySelectorAll("[data-webjs-seed]"))Mo(n.getAttribute("data-webjs-seed"),n,()=>n.removeAttribute("data-webjs-seed"))}}function Mo(e,t,n){if(e)try{let r=ue(e);if(r&&typeof r=="object")for(let o in r)Ye.has(o)||Ye.set(o,r[o])}catch{}n?n():t.remove?.()}function Ra(e,t,n){Lo||(Lo=!0,Mt());let r=`${e}/${t}/${n}`;if(Ye.has(r)){let o=Ye.get(r);return Ye.delete(r),o}return Po}var Ye,Po,Lo,Kn=G(()=>{We();Ye=new Map,Po=Symbol("webjs.seed.miss"),Lo=!1});var jo={};wr(jo,{_FRAME_TOP:()=>Go,_LIVE_ATTRS:()=>er,_activeFrameId:()=>Yo,_addNewHeadElements:()=>nr,_applyOptimisticLoading:()=>dr,_applyStreamedResolve:()=>bs,_applySwap:()=>fr,_blurOutgoingFocus:()=>Dt,_buildHaveHeader:()=>et,_buildSubmitFormData:()=>zo,_bumpNavToken:()=>fc,_clearFormBusy:()=>us,_clearFrameBusy:()=>cs,_collectBoundaries:()=>je,_currentPageUrl:()=>dc,_diffElementInPlace:()=>Wt,_eligibleAnchorHref:()=>Ut,_findAnchorInPath:()=>Ko,_getSubmitAction:()=>Wo,_getSubmitMethod:()=>Vo,_isNonHtmlPath:()=>yc,_keyOf:()=>xe,_markFormBusy:()=>ls,_markFrameBusy:()=>as,_mergeHead:()=>hs,_navToken:()=>uc,_onPopState:()=>sr,_onSubmit:()=>ir,_parseHTML:()=>rr,_planBoundarySwap:()=>Xo,_prefetch:()=>Re,_prefetchAnchor:()=>rs,_prefetchCache:()=>w,_prefetchHasHoverPointer:()=>ts,_prefetchInflightSize:()=>cc,_prefetchMode:()=>$t,_prefetchPeek:()=>ac,_prefetchSaysSaveData:()=>lr,_prefetchSuppressed:()=>ns,_prefetchTake:()=>os,_reactivateScripts:()=>Ze,_readStreamedShell:()=>ms,_reconcileChildren:()=>Qt,_regraftPermanentElements:()=>ds,_regraftPermanentInSlice:()=>Xt,_resetParseProbe:()=>La,_resetPrefetch:()=>lc,_resetWarnOnce:()=>hc,_resolveTargetFrameId:()=>ar,_restoreOptimistic:()=>Ge,_runWithTransition:()=>It,_setCurrentPageUrl:()=>pc,_shouldFullLoadDuringParse:()=>mc,_snapshotCache:()=>x,_streamBoundariesProgressively:()=>gs,_takeResolveUnit:()=>ys,_viewTransitionsEnabled:()=>fs,collectBoundaries:()=>je,disableClientRouter:()=>Uo,enableClientRouter:()=>or,loadFrame:()=>Ia,navigate:()=>$o,planBoundarySwap:()=>Xo,revalidate:()=>Ho});function rr(e){if(!/^\s*(?:<!doctype|<html)/i.test(e)&&typeof document<"u"&&document.implementation)try{let n=document.implementation.createHTMLDocument();if(typeof n.body.setHTMLUnsafe=="function")n.body.setHTMLUnsafe(e);else{let r=n.createElement("template");r.innerHTML=e,n.body.appendChild(r.content)}return n}catch{}return typeof Document<"u"&&typeof Document.parseHTMLUnsafe=="function"&&Oa()?Document.parseHTMLUnsafe(e):Ma(e)}function Oa(){if(ve!==null)return ve;try{ve=Document.parseHTMLUnsafe("<!doctype html><body><!--c--><i></i>")?.body?.firstChild?.nodeType===8}catch{ve=!1}return ve}function La(){ve=null}function Ma(e){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(e,"text/html")}function Pa(){Yn||typeof MutationObserver>"u"||typeof customElements>"u"||(Yn=new MutationObserver(e=>{for(let t of e)for(let n of t.addedNodes){if(n.nodeType!==1)continue;let r=n;r.tagName?.includes("-")&&customElements.upgrade(r);for(let o of r.querySelectorAll("*"))o.tagName?.includes("-")&&customElements.upgrade(o)}}),Yn.observe(document.body,{childList:!0,subtree:!0}))}function or(){re||typeof document>"u"||(re=!0,document.addEventListener("click",qo,!1),document.addEventListener("submit",ir,!1),window.addEventListener("popstate",sr),document.addEventListener("pointerover",ke,!0),document.addEventListener("focusin",ke,!0),document.addEventListener("touchstart",ke,{capture:!0,passive:!0}),document.addEventListener("pointerout",ss,!0),document.addEventListener("webjs:navigate",Zn),Pa(),Zn(),typeof history<"u"&&"scrollRestoration"in history&&(Pt=history.scrollRestoration,history.scrollRestoration="manual"),typeof location<"u"&&(H=location.href))}function Uo(){re&&(re=!1,document.removeEventListener("click",qo,!1),document.removeEventListener("submit",ir,!1),window.removeEventListener("popstate",sr),document.removeEventListener("pointerover",ke,!0),document.removeEventListener("focusin",ke,!0),document.removeEventListener("touchstart",ke,{capture:!0}),document.removeEventListener("pointerout",ss,!0),document.removeEventListener("webjs:navigate",Zn),Jt(),ur(),te&&(te.disconnect(),te=null),typeof history<"u"&&Pt!==null&&(history.scrollRestoration=Pt,Pt=null),H=null)}async function $o(e,t){let n=new URL(e,location.href);if(n.origin!==location.origin){location.href=e;return}await cr(n.href,t?.replace??!1,null)}async function Ia(e,t){if(typeof location>"u")return{ok:!1,status:null,aborted:!1};let n=e&&e.id;if(!n)return{ok:!1,status:null,aborted:!1};let r=new URL(t,location.href);if(r.origin!==location.origin)return{ok:!1,status:null,aborted:!1};M&&M.abort(),M=new AbortController;let o=M.signal,s=++C;return Ht(r.href,n,!1,null,"GET",null,o,s)}function Ho(e){if(!e){x.clear(),w.clear();return}let t=new URL(e,location.href),n=t.pathname+t.search;x.delete(n),w.delete(n)}function qo(e){if(!re||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=Ko(e);if(!t||t.hasAttribute("download")||t.hasAttribute("data-no-router")||t.target&&t.target!=="_self")return;let n=t.href;if(!n)return;let r=new URL(n);if(r.origin!==location.origin||r.pathname===location.pathname&&r.search===location.search&&r.hash||Yt.test(r.pathname))return;e.preventDefault();let o=ar(t);cr(n,!1,o)}function sr(e){cr(location.href,!0,null)}function ir(e){if(!re||e.defaultPrevented)return;let t=e.target;if(!t||t.nodeType!==1||t.tagName!=="FORM"||t.hasAttribute("data-no-router"))return;let n=e.submitter??null;if(n&&n.hasAttribute("data-no-router"))return;let r=n&&n.getAttribute("formtarget")||t.getAttribute("target")||"";if(r&&r!=="_self")return;let o=Vo(t,n);if(o==="dialog")return;let s=Wo(t,n),i;try{i=new URL(s,location.href)}catch{return}if(i.origin!==location.origin||Yt.test(i.pathname))return;let c=zo(t,n);e.preventDefault();let a=ar(n||t);Ua(i.href,o,c,a,t)}function Vo(e,t){return(t&&t.getAttribute("formmethod")||e.getAttribute("method")||"get").toLowerCase()}function Wo(e,t){return t&&t.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||e.action||location.href}function zo(e,t){try{return new FormData(e,t||void 0)}catch{let n=new FormData(e);return t&&t.getAttribute("name")&&n.append(t.getAttribute("name"),t.getAttribute("value")||""),n}}function Ko(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return null}function Yo(e){let t=e;for(;t;){let n=t.closest("webjs-frame");if(n&&n.id)return n.id;let r=t.getRootNode();if(r&&r.host)t=r.host;else break}return null}function ar(e){if(!e)return null;let t=e.closest&&e.closest("[data-webjs-frame]"),n=t?t.dataset?t.dataset.webjsFrame:t.getAttribute("data-webjs-frame"):null;if(n!=null&&n!==""){if(n===Go)return null;let r=typeof document<"u"?document.getElementById(n):null;return r&&r.tagName&&r.tagName.toLowerCase()==="webjs-frame"?n:(Gt(`webjs:frame-unresolved:${n}`,`[webjs] data-webjs-frame="${n}" did not match a live <webjs-frame id="${n}">; performing a normal navigation instead.`),null)}return Yo(e)}function Gt(e,t){Jn.has(e)||(Jn.add(e),typeof console<"u"&&console.warn&&console.warn(t))}function Jo(e,t){return!e&&!t&&typeof document<"u"&&document.readyState==="loading"}function de(e,t,n=!0){if(typeof document<"u"&&typeof CustomEvent<"u")try{document.dispatchEvent(new CustomEvent("webjs:navigation-fallback",{detail:{cause:e,href:t,willReload:n}}))}catch{}typeof process<"u"&&process.env||Gt(`fallback:${e}`,n?`[webjs] client router fell back to a full page load (${e}) navigating to ${t}. This is correct (no DOM corruption), just not a soft nav.`:`[webjs] client router degraded a soft navigation (${e}) for ${t}, without a full page load.`)}function Fa(e){typeof process<"u"&&process.env||Gt(`stream-drop:${e}`,`[webjs] dropped a streamed Suspense resolve for "${e}": no #${e} boundary in the DOM. Benign if this navigation was superseded or degraded. A stuck skeleton here means the shell swap did not place the boundary.`)}function Fo(){if(typeof process<"u"&&process.env||Xn||typeof document>"u"||typeof getComputedStyle!="function")return;let e=document.documentElement;if(!e)return;Xn=!0;let t;try{t=getComputedStyle(e).scrollBehavior}catch{return}t==="smooth"&&Gt("scroll-behavior-smooth-html","[webjs] Detected `scroll-behavior: smooth` on <html>. The client router scrolls to the top instantly on navigation (like a native page load), so route transitions are not affected by it. It still applies to in-page #anchor links. Pairing it with a sticky `backdrop-filter` header can also flash on iOS during navigation.")}function Bt(e){if(typeof document>"u")return;let t=document.documentElement;if(!(!t||!t.hasAttribute("data-webjs-nav-progress")))try{e?t.setAttribute("data-navigating",""):t.removeAttribute("data-navigating")}catch{}}function je(e){let t=new Map,n=[],r=!1;function o(s){if(!r){if(s.nodeType===8){let i=s.data.trim();if(i.startsWith("wj:children:")){let c=i.slice(12),a=c.lastIndexOf(":");if(a<=0||a===c.length-1){r=!0;return}let l=c.slice(0,a),u=c.slice(a+1);if(t.has(l)||n.some(f=>f.segment===l)){r=!0;return}n.push({segment:l,routeKey:u,start:s});return}if(i.startsWith("/wj:children")){let c=i.slice(12).replace(/^:/,""),a=n.pop();if(!a||a.segment!==c){r=!0;return}if(a.start.parentNode!==s.parentNode){r=!0;return}{let l=a.start.parentNode.tagName;if(l==="TABLE"||l==="TBODY"||l==="THEAD"||l==="TFOOT"||l==="TR"){r=!0;return}}t.set(a.segment,{routeKey:a.routeKey,start:a.start,end:s});return}return}if(s.hasChildNodes&&s.hasChildNodes())for(let i=s.firstChild;i&&!r;i=i.nextSibling)o(i)}}return o(e),r||n.length>0?null:t}function Xo(e,t){let n=[...e.keys()].filter(i=>t.has(i)).sort((i,c)=>i.length-c.length);if(n.length===0)return null;for(let i of n)if(e.get(i).routeKey!==t.get(i).routeKey){let c=null;for(let a of n){if(a===i)break;i.startsWith(a==="/"?a:a+"/")&&(c=a)}return c?{mode:"replace",segment:c,live:e.get(c),incoming:t.get(c)}:null}let r=n[n.length-1],o=i=>{let c=null;for(let a of i.keys())(c===null||a.length>c.length)&&(c=a);return c};return{mode:o(e)===r&&o(t)===r?"morph":"replace",segment:r,live:e.get(r),incoming:t.get(r)}}function Qo(e){let t=ne(e);document.dispatchEvent(new CustomEvent("webjs:before-cache",{detail:{url:e}})),x.has(t)&&x.delete(t);let n={html:document.documentElement.outerHTML,scrollX:typeof window<"u"&&window.scrollX||0,scrollY:typeof window<"u"&&window.scrollY||0};for(x.set(t,n);x.size>Da;){let r=x.keys().next().value;x.delete(r)}}function Ba(e){let t=ne(e),n=x.get(t);return n==null?null:(x.delete(t),x.set(t,n),typeof n=="string"?{html:n,scrollX:0,scrollY:0}:n)}function ne(e){let t=new URL(e,location.href);return t.pathname+t.search}async function cr(e,t,n){if(Jo(t,n)&&typeof location<"u"){de("readyState-loading",e),location.href=e;return}M&&M.abort(),M=new AbortController;let r=M.signal,o=++C;H&&Qo(H);let s=setTimeout(()=>{Bt(!0),s=null},150),i=null;t||(i=dr());try{if(t){let c=Ba(e);if(c){let a=rr(c.html);if(a){fr(a,n,!0,null),typeof window<"u"&&window.scrollTo({left:c.scrollX,top:c.scrollY,behavior:"instant"}),Ht(e,n,!1,i,"GET",null,r,o,!0).catch(()=>{});return}}typeof window<"u"&&window.scrollTo({left:0,top:0,behavior:"instant"})}await Ht(e,n,!t,i,"GET",null,r,o)}finally{s&&clearTimeout(s),o===C&&(Bt(!1),typeof location<"u"&&(H=location.href))}}async function Ua(e,t,n,r,o){M&&M.abort(),M=new AbortController;let s=M.signal,i=++C,c=t==="get"||t==="head",a=new URL(e,location.href);if(c){a.search="";for(let[h,m]of n)a.searchParams.append(h,typeof m=="string"?m:m.name)}H&&Qo(H);let l=setTimeout(()=>{Bt(!0),l=null},150),u=dr(),f=o?ls(o,i,a.href):null,d=!1;try{let h=await Ht(a.href,r,!0,u,c?"GET":t.toUpperCase(),c?null:n,s,i);d=!!(h&&h.ok),!c&&i===C&&(x.clear(),w.clear())}finally{f&&us(f,i,a.href,d),l&&clearTimeout(l),i===C&&(Bt(!1),typeof location<"u"&&(H=location.href))}}function et(){let e=je(document.body);return e?[...e.entries()].map(([t,n])=>`${t}:${n.routeKey}`).join(","):""}function lr(){try{let e=typeof navigator<"u"?navigator.connection:null;if(e&&(e.saveData===!0||typeof e.effectiveType=="string"&&/2g$/.test(e.effectiveType))||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-data: reduce)").matches)return!0}catch{}return!1}function ts(){try{if(typeof matchMedia=="function")return matchMedia("(hover: hover) and (pointer: fine)").matches}catch{}return!0}function Wa(e){let t=e.getAttribute("rel");return t?t.toLowerCase().split(/\s+/).filter(Boolean):[]}function Ut(e){if(!e||!(e instanceof HTMLAnchorElement)||e.hasAttribute("download")||e.hasAttribute("data-no-router")||e.target&&e.target!=="_self")return null;let t=e.href;if(!t)return null;let n;try{n=new URL(t)}catch{return null}return n.origin!==location.origin||n.pathname===location.pathname&&n.search===location.search&&n.hash||Yt.test(n.pathname)?null:t}function ns(e){if(e.hasAttribute("data-no-prefetch"))return!0;let t=Wa(e);return t.includes("external")||t.includes("no-prefetch")}function $t(e){if(ns(e))return"none";switch((e.getAttribute("data-prefetch")||"").toLowerCase().trim()){case"false":case"none":return"none";case"true":case"render":return"render";case"auto":case"viewport":return"viewport";case"intent":return"intent";default:return ts()?"intent":"viewport"}}function Re(e){if(!re||typeof fetch!="function"||lr())return;let t=ne(e);if(typeof location<"u"&&t===ne(location.href)||pe.has(t)||Je.has(t))return;let n=w.get(t);if(n&&Qn()-n.at<Zo)return;if(pe.size>=es){for(Je.add(t),Ne.push(e);Ne.length>Ha;){let s=Ne.shift();Je.delete(ne(s))}return}let r=et();if(!r&&typeof document<"u"&&document.readyState==="loading")return;pe.add(t);let o={"x-webjs-router":"1","x-webjs-prefetch":"1"};r&&(o["x-webjs-have"]=r),fetch(e,{method:"GET",headers:o,credentials:"same-origin",cache:"no-cache"}).then(async s=>{let i=s.headers.get("content-type")||"";if(!/^text\/html\b/i.test(i)||s.status>=400)return;let c=s.headers.get("x-webjs-build"),a=s.headers.get("x-webjs-src"),l=typeof document<"u"?document.querySelector('script[type="importmap"]'):null,u=l?l.getAttribute("data-webjs-build"):null,f=l?l.getAttribute("data-webjs-src"):null;(c&&u&&c!==u||a&&f&&a!==f)&&(x.clear(),w.clear());let d=s.redirected&&s.url?s.url:e,h=await s.text();Ka(t,{html:h,build:c,src:a,finalUrl:d,at:Qn()})}).catch(()=>{}).finally(()=>{pe.delete(t),za()})}function za(){for(;Ne.length&&pe.size<es;){let e=Ne.shift();Je.delete(ne(e)),Re(e)}}function Ka(e,t){for(w.has(e)&&w.delete(e),w.set(e,t);w.size>$a;){let n=w.keys().next().value;w.delete(n)}typeof document<"u"&&document.dispatchEvent(new CustomEvent("webjs:prefetch",{detail:{url:t.finalUrl,key:e,from:"prefetch"}}))}function rs(e){let t=/<!--wj:children:([^>]*?)-->/.exec(e||"");return t?t[1]:null}function os(e,t){let n=ne(e),r=w.get(n);if(!r)return null;if(Qn()-r.at>=Zo)return w.delete(n),null;let o=rs(r.html);return o&&!new Set(String(t??(et()||"")).split(",").filter(Boolean)).has(o)?(w.delete(n),null):(w.delete(n),r)}function Qn(){try{if(typeof performance<"u"&&typeof performance.now=="function")return performance.now()}catch{}return 0}function ke(e){if(!re)return;let t=is(e.target);if(!t)return;let n=$t(t);if(n==="none"||n==="render")return;let r=Ut(t);if(r){if(e.type==="touchstart"){Re(r);return}n==="intent"&&(Xe===t&&Te||(Jt(),Xe=t,Te=setTimeout(()=>{Te=null,Xe=null,Re(r)},qa)))}}function ss(e){let t=is(e.target);t&&t===Xe&&Jt()}function Jt(){Te&&(clearTimeout(Te),Te=null),Xe=null}function ur(){for(let e of Qe)clearTimeout(e);Qe.clear(),Ce=new WeakMap}function is(e){let t=e;for(;t;){if(t instanceof HTMLAnchorElement)return t;let n=t.nodeType===1?t:null;if(n){let o=n.closest&&n.closest("a");if(o instanceof HTMLAnchorElement)return o}let r=t.getRootNode?t.getRootNode():null;t=r&&r.host?r.host:null}return null}function Zn(){if(typeof document>"u"||lr())return;let e=typeof IntersectionObserver<"u";e&&(te?(te.disconnect(),ur()):te=new IntersectionObserver(t=>{for(let n of t){let r=n.target;if(n.isIntersecting){if(Ce.has(r))continue;let o=setTimeout(()=>{Qe.delete(o),Ce.delete(r),te.unobserve(r);let s=Ut(r);s&&$t(r)==="viewport"&&Re(s)},Va);Ce.set(r,o),Qe.add(o)}else{let o=Ce.get(r);o&&(clearTimeout(o),Qe.delete(o),Ce.delete(r))}}},{threshold:.5}));for(let t of document.querySelectorAll("a[href]")){let n=$t(t);if(n==="render"){let r=Ut(t);r&&Re(r)}else n==="viewport"&&e&&te.observe(t)}}function Ya(e){if(typeof document>"u"||!document.body)return!1;let t=je(document.body);if(!t)return!1;let n,r=-1;for(let[a,l]of t)a.length>r&&(r=a.length,n=l);if(!n)return!1;let o=n.start.parentNode;if(!o||n.start.parentNode!==n.end.parentNode)return!1;let s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("data-webjs-nav-error","");let i=e?`This page could not be loaded. (status ${e})`:"This page could not be loaded.";s.textContent=i;let c=document.createRange();return c.setStartAfter(n.start),c.setEndBefore(n.end),c.deleteContents(),o.insertBefore(s,n.end),!0}function Gn(e,t,n){let r=new CustomEvent("webjs:navigation-error",{bubbles:!0,cancelable:!0,detail:{url:e,status:t??null,error:n||null}});if(typeof document<"u")try{document.dispatchEvent(r)}catch{}r.defaultPrevented||Ya(t)||typeof location<"u"&&(de("navigation-error-unrecoverable",e),location.href=e)}async function Ht(e,t,n,r,o,s,i,c,a){o=o||"GET";let l=typeof c=="number"?c:C,u,f=null,d=null,h=null,m=null,S=!1,y=e,p=t?as(t,l):null;try{try{let b=o==="GET"&&!s&&!t?os(e,r?r.haveKeys:void 0):null;if(b)u=b.html,d=b.build,h=b.src,y=b.finalUrl,m=200,S=!0;else{let P={"x-webjs-router":"1"},Le=et();Le&&(P["x-webjs-have"]=Le),t&&(P["x-webjs-frame"]=t),s!=null&&o!=="GET"&&o!=="HEAD"&&(P.accept=Io+", text/html");let oe={method:o,headers:P,credentials:"same-origin",cache:"no-cache"};i&&(oe.signal=i),s!=null&&o!=="GET"&&o!=="HEAD"&&(oe.body=s);let N=await fetch(e,oe);m=N.status,S=N.ok;let T=N.headers.get("content-type")||"",Ss=/^text\/html\b/i.test(T);if(T.toLowerCase().indexOf(Io)===0){let As=await N.text();return l===C&&(Ge(r),zn(As)),{ok:S,status:m,aborted:!1}}if(N.redirected&&N.url&&(y=N.url),N.status===204||N.status===205)return l===C&&n&&history.pushState(null,"",y),{ok:S,status:m,aborted:!1};if(!Ss)return l===C&&(Ge(r),Gn(e,N.status,null)),{ok:!1,status:m,aborted:!1};d=N.headers.get("x-webjs-build"),h=N.headers.get("x-webjs-src");let tn=await ms(N);u=tn.shell,tn.streaming&&(f=tn)}}catch(b){return b&&b.name==="AbortError"?{ok:!1,status:null,aborted:!0}:l!==C?{ok:!1,status:null,aborted:!0}:(Ge(r),Gn(e,null,b instanceof Error?b:new Error(String(b))),{ok:!1,status:null,aborted:!1})}if(l!==C){if(f&&f.reader)try{f.reader.cancel()}catch{}return{ok:!1,status:m,aborted:!0}}let j=rr(u);if(!j)return Ge(r),Gn(e,null,new Error("navigation response did not parse as HTML")),{ok:!1,status:m,aborted:!1};if(fr(j,t,!!a,y,d,h)==="discard"){if(f&&f.reader)try{f.reader.cancel()}catch{}return{ok:S,status:m,aborted:!1}}if(n&&history.pushState(null,"",y),n){let b=new URL(y);if(b.hash){let P=document.getElementById(b.hash.slice(1));P?P.scrollIntoView():(Fo(),window.scrollTo({left:0,top:0,behavior:"instant"}))}else Fo(),window.scrollTo({left:0,top:0,behavior:"instant"})}return f&&(f.reader||f.rest)&&Ft.then(()=>gs(f.reader,f.dec,f.rest,()=>l===C)),document.dispatchEvent(new CustomEvent("webjs:navigate",{detail:{url:y,frameId:t,from:"navigate"}})),{ok:S,status:m,aborted:!1}}finally{p&&cs(p,l)}}function as(e,t){if(typeof document>"u")return null;let n=null;try{n=document.querySelector(`webjs-frame#${CSS.escape(e)}`)}catch{n=document.getElementById(e)}if(!n)return null;let r=qt.has(n);return qt.set(n,t),n.setAttribute("aria-busy","true"),r||n.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:e,busy:!0}})),n}function cs(e,t){if(qt.get(e)!==t)return;qt.delete(e),e.setAttribute("aria-busy","false");let n=e.id||null;e.dispatchEvent(new CustomEvent("webjs:frame-busy",{bubbles:!0,detail:{frameId:n,busy:!1}}))}function ls(e,t,n){let r=Vt.has(e);return Vt.set(e,t),e.setAttribute("aria-busy","true"),r||e.dispatchEvent(new CustomEvent("webjs:submit-start",{bubbles:!0,detail:{form:e,url:n}})),e}function us(e,t,n,r){if(Vt.get(e)!==t)return;Vt.delete(e),e.setAttribute("aria-busy","false");let o=new CustomEvent("webjs:submit-end",{bubbles:!0,detail:{form:e,url:n,ok:!!r}});e.isConnected?e.dispatchEvent(o):typeof document<"u"?document.dispatchEvent(o):e.dispatchEvent(o)}function Do(e){if(!e||!e.head)return"";let t=e.head.querySelectorAll('[data-webjs-track="reload"]');if(!t.length)return"";let n="";for(let r of t)n+=K(r);return n}function fs(){if(typeof document>"u")return!1;let e=document.querySelector('meta[name="view-transition"]');return e?(e.getAttribute("content")||"").trim().toLowerCase()==="same-origin":!1}function It(e,t){let n=typeof document<"u"?document.startViewTransition:void 0;if(fs()&&typeof n=="function"){let r=n.call(document,e);return r&&r.finished&&typeof r.finished.then=="function"?r.finished.then(()=>{t&&t()}).catch(()=>{}):t&&t(),r&&r.updateCallbackDone&&typeof r.updateCallbackDone.then=="function"?r.updateCallbackDone.catch(()=>{}):Promise.resolve()}return e(),t&&t(),Promise.resolve()}function ds(e,t){if(!e||!t||typeof e.querySelectorAll!="function")return;let n=e.querySelectorAll("[data-webjs-permanent][id]");for(let r of n){let o=r.id;if(!o)continue;let s=null;try{s=t.querySelector(`#${CSS.escape(o)}`)}catch{s=null}if(!s||!r.hasAttribute||!r.hasAttribute("data-webjs-permanent"))continue;let i=s.parentNode;i&&s!==r&&i.replaceChild(r,s)}}function Xt(e,t){let n=[];for(let r of e){if(r.nodeType!==1)continue;let o=r;if(o.hasAttribute&&o.hasAttribute("data-webjs-permanent")&&o.id&&n.push(o),typeof o.querySelectorAll=="function")for(let s of o.querySelectorAll("[data-webjs-permanent][id]"))n.push(s)}if(n.length)for(let r of n){let o=r.id;if(!o)continue;let s=Ga(t,o);if(!s||s===r)continue;let i=s.parentNode;if(i)i.replaceChild(r,s);else{let c=t.indexOf(s);c!==-1&&(t[c]=r)}}}function Ga(e,t){for(let n of e){if(n.nodeType!==1)continue;let r=n;if(r.id===t)return r;if(typeof r.querySelector=="function"){let o=null;try{o=r.querySelector(`#${CSS.escape(t)}`)}catch{o=null}if(o)return o}}return null}function Ja(e){if(!(!e||!e.start))for(let t=e.start.nextSibling;t&&t!==e.end;t=t.nextSibling)t.nodeType===1&&he(t)}function fr(e,t,n,r,o,s){try{Mt(e)}catch{}try{for(let f of e.querySelectorAll("[data-wj-host]"))f.setAttribute("data-wj-serialized","")}catch{}try{typeof sessionStorage<"u"&&(!r||t||n)&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}if(r&&!t&&!n){let f=document.querySelector('script[type="importmap"]'),d=f?f.getAttribute("data-webjs-build"):null,h=!1;if(o&&d&&(h=o!==d),!h&&e.head&&e.head.children.length>0){let m=Do(document),S=Do(e);m!==S&&(h=!0)}if(h&&typeof location<"u"){x.clear(),w.clear();try{let m="webjs:importmap-reload";if(sessionStorage&&sessionStorage.getItem(m))sessionStorage.removeItem(m),de("deploy-mismatch-reload-suppressed",r,!1);else{sessionStorage&&sessionStorage.setItem(m,"1"),de("deploy-mismatch",r),location.href=r;return}}catch{de("deploy-mismatch",r),location.href=r;return}}else if(!h){let m=f?f.getAttribute("data-webjs-src"):null;s&&m&&s!==m&&(x.clear(),w.clear(),f&&f.setAttribute("data-webjs-src",s));try{typeof sessionStorage<"u"&&sessionStorage.removeItem("webjs:importmap-reload")}catch{}}}if(t){let f=document.querySelector(`webjs-frame#${CSS.escape(t)}`),d=e.querySelector(`webjs-frame#${CSS.escape(t)}`);if(f&&d){nr(e.head),Ft=It(()=>{oc(f,d),Ze(f),he(f),Bo(e.body),Dt()},()=>he(f));return}let h=new CustomEvent("webjs:frame-missing",{bubbles:!0,cancelable:!0,detail:{frameId:t,url:r||(typeof location<"u"?location.href:null),document:e}});(f||document).dispatchEvent(h),h.defaultPrevented||console.warn(`[webjs] frame "${t}" was not in the navigation response, leaving it unchanged. Handle "webjs:frame-missing" (preventDefault) to override.`);return}let i=je(document.body),c=je(e.body),a=i&&c?Xo(i,c):null;if(a){let{mode:f,live:d,incoming:h}=a;nr(e.head),Ft=It(()=>{f==="replace"?Xa(d,h):Qa(d,h,e),nc(d.start,h.start),Bo(e.body),Dt()},()=>Ja(d));return}if(r&&!n&&typeof location<"u"){de(i?c?"no-shared-boundary":"incoming-boundaries-malformed":"live-boundaries-malformed",r),location.href=r;return}if(r&&n)return de("revalidation-discarded",r,!1),"discard";hs(e.head),ds(document.body,e.body);let l=[...e.body.childNodes];Ft=It(()=>{document.body.replaceChildren(...l),Ze(document.body),he(document.body),Dt()},()=>he(document.body))}function Dt(){let e=document.activeElement;!e||e===document.body||e===document.documentElement||typeof e.blur=="function"&&e.blur()}function Xa(e,t){let n=e.start.parentNode;if(!n)return;let r=[];for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)r.push(s);let o=[];for(let s=t.start.nextSibling;s&&s!==t.end;s=s.nextSibling)o.push(document.importNode(s,!0));Xt(r,o);for(let s of r)s.parentNode===n&&n.removeChild(s);for(let s of o)n.insertBefore(s,e.end);for(let s=e.start.nextSibling;s&&s!==e.end;s=s.nextSibling)s.nodeType===1&&(Ze(s),he(s))}function Qa(e,t,n){if(!e||!t)return;let r=e.start.parentNode;if(!r)return;let o=[];for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)o.push(i);let s=[];for(let i=t.start.nextSibling;i&&i!==t.end;i=i.nextSibling)s.push(document.importNode(i,!0));Xt(o,s),Za(r,e.start,e.end,o,s);for(let i=e.start.nextSibling;i&&i!==e.end;i=i.nextSibling)i.nodeType===1&&(Ze(i),he(i))}function Za(e,t,n,r,o){let s=new Map;for(let a of r){if(a.nodeType!==1)continue;let l=xe(a);l&&s.set(l,a)}let i=n,c=[];for(let a of o){if(a.nodeType===1){let l=xe(a);if(l&&s.has(l)){let u=s.get(l);Wt(u,a),c.push(u),s.delete(l);continue}}c.push(a)}for(let a of r)if(a.parentNode===e){if(a.nodeType===1&&c.includes(a))continue;e.removeChild(a)}for(let a of c)e.insertBefore(a,i)}function Wt(e,t){if(e===t)return;if(e.tagName!==t.tagName){e.replaceWith(t);return}let n=new Set;for(let r of t.attributes)n.add(r.name),!er.has(r.name)&&r.name!=="data-wj-serialized"&&e.getAttribute(r.name)!==r.value&&e.setAttribute(r.name,r.value);for(let r of[...e.attributes])er.has(r.name)||n.has(r.name)||e.removeAttribute(r.name);if(ec(e)){rc(e,t);return}Qt(e,t)}function ec(e){let t=e;return t[Symbol.for("webjs.instance")]!=null||t[A]!=null}function tc(e,t){for(let n=e.parentElement;n&&n!==t;n=n.parentElement)if(n.tagName.includes("-"))return!1;return!0}function zt(e){let t=new Map,n=`slot[${v}][${L}="${D}"]`;for(let r of e.querySelectorAll(n)){let o=r;if(!tc(o,e)||Kr(e,o))continue;let s=!1;for(let c=o.parentElement;c&&c!==e;c=c.parentElement)if(c.tagName==="SLOT"&&c.hasAttribute(v)&&c.getAttribute(L)===D){s=!0;break}if(s)continue;let i=F(o.getAttribute("name"));t.has(i)||t.set(i,o)}return t}function nc(e,t){let n=e.parentNode;if(!n||n.nodeType!==1)return;let r=n;if(r.tagName!=="SLOT"||!r.hasAttribute(v))return;let o=null;for(let f=r.parentElement;f;f=f.parentElement){if(f[A]){o=f;break}if(f.tagName.includes("-"))return}if(!o)return;let s=F(r.getAttribute("name"));ce(o,s,[...r.childNodes]);let i=t.parentNode;if(!i||i.nodeType!==1)return;let c=i;if(c.tagName!=="SLOT")return;let a=null;for(let f=c.parentElement;f;f=f.parentElement)if(f.tagName.includes("-")){a=f;break}if(!a||a.tagName!==o.tagName)return;let l=zt(o),u=zt(a);for(let f of new Set([...l.keys(),...u.keys()])){if(f===s)continue;let d=u.get(f);d?ce(o,f,[...d.childNodes].map(h=>document.importNode(h,!0))):l.get(f)&&ce(o,f,null)}}function rc(e,t){if(!e[A])return;let n=zt(e),r=zt(t);if(n.size===0&&r.size===0)return;let o=new Set([...n.keys(),...r.keys()]);for(let s of o){let i=n.get(s),c=r.get(s);i&&c?(Qt(i,c),ce(e,s,[...i.childNodes])):c?ce(e,s,[...c.childNodes].map(a=>document.importNode(a,!0))):ce(e,s,null)}}function Qt(e,t){let n=[...e.childNodes],r=[...t.childNodes].map(c=>document.importNode(c,!0));Xt(n,r);let o=new Map;for(let c of n){if(c.nodeType!==1)continue;let a=xe(c);a&&o.set(a,c)}let s=[];for(let c=0;c<r.length;c++){let a=r[c];if(a.nodeType===1){let l=xe(a);if(l&&o.has(l)){let f=o.get(l);Wt(f,a),s.push(f),o.delete(l);continue}let u=n[c];if(u&&u.nodeType===1&&!xe(u)&&u.tagName===a.tagName){Wt(u,a),s.push(u);continue}}else if(a.nodeType===3){let l=n[c];if(l&&l.nodeType===3){l.nodeValue!==a.nodeValue&&(l.nodeValue=a.nodeValue),s.push(l);continue}}else if(a.nodeType===8){let l=n[c];if(l&&l.nodeType===8){l.nodeValue!==a.nodeValue&&(l.nodeValue=a.nodeValue),s.push(l);continue}}s.push(a)}let i=new Set(s);for(let c of n)!i.has(c)&&c.parentNode===e&&e.removeChild(c);for(let c=0;c<s.length;c++){let a=s[c];(a.parentNode!==e||e.childNodes[c]!==a)&&e.insertBefore(a,e.childNodes[c]||null)}}function xe(e){let t=e.getAttribute("data-key");return t?`${e.tagName}:k:${t}`:e.id?`${e.tagName}:i:${e.id}`:null}function dr(){let e=je(document.body);if(!e||e.size===0)return null;let t=[...e.keys()].sort((a,l)=>l.length-a.length),n=null,r=null;for(let a of t){let l=document.getElementById(`wj-loading:${a}`);if(l instanceof HTMLTemplateElement){n=a,r=l;break}}if(n===null||r===null)return null;let o=e.get(n),s=et(),i=[];for(let a=o.start.nextSibling;a&&a!==o.end;a=a.nextSibling)i.push(a);let c=document.createRange();return c.setStartAfter(o.start),c.setEndBefore(o.end),c.deleteContents(),o.start.parentNode.insertBefore(r.content.cloneNode(!0),o.end),{slot:o,oldChildren:i,token:C,haveKeys:s}}function Ge(e){if(!e||e.token!==C)return;let{slot:t,oldChildren:n}=e;if(t.start.parentNode!==t.end.parentNode)return;let r=document.createRange();r.setStartAfter(t.start),r.setEndBefore(t.end),r.deleteContents();for(let o of n)t.start.parentNode.insertBefore(o,t.end)}function oc(e,t){Qt(e,t)}function ps(){if(typeof document>"u")return"";let e=document.querySelector('meta[name="csp-nonce"]');return e&&e.getAttribute("content")||""}function pr(e){let t=document.createElement("script");for(let r of e.attributes)r.name!=="nonce"&&t.setAttribute(r.name,r.value);let n=ps();return n&&t.setAttribute("nonce",n),t.textContent=e.textContent,t}function hr(e){if(!e.hasAttribute("nonce"))return e.cloneNode(!0);let t=e.cloneNode(!0),n=ps();return n?t.setAttribute("nonce",n):t.removeAttribute("nonce"),t}function K(e){if(!e.hasAttribute("nonce"))return e.outerHTML;let t=e.cloneNode(!0);return t.removeAttribute("nonce"),t.outerHTML}function Kt(e){let t=e.getAttribute("name");if(t)return"name="+t;let n=e.getAttribute("property");if(n)return"property="+n;let r=e.getAttribute("http-equiv");return r?"http-equiv="+r:e.hasAttribute("charset")?"charset":null}function sc(e){if(!e.querySelector("meta"))return;let t=o=>{let s=new Map;for(let i of o.querySelectorAll("meta")){let c=Kt(i);if(!c||c===tr)continue;let a=s.get(c);a?a.push(i):s.set(c,[i])}return s},n=t(e),r=t(document.head);for(let[o,s]of n){let i=r.get(o)||[],c=s.map(K).join(`
2
+ `),a=i.map(K).join(`
3
+ `);if(c!==a){if(s.length===1&&i.length===1){let l=i[0];for(let u of[...l.attributes])l.removeAttribute(u.name);for(let u of s[0].attributes)l.setAttribute(u.name,u.value);continue}for(let l of i)l.remove();for(let l of s)document.head.appendChild(hr(l))}}for(let[o,s]of r)if(!n.has(o))for(let i of s)i.remove()}function nr(e){let t=e.querySelector("title");t&&(document.title=t.textContent||"");let n=new Set;for(let r of document.head.children)n.add(K(r));for(let r of e.children)r.tagName==="SCRIPT"&&r.getAttribute("type")==="importmap"||r.tagName!=="BASE"&&r.tagName!=="TITLE"&&(r.tagName==="META"&&Kt(r)||n.has(K(r))||(r.tagName==="SCRIPT"?document.head.appendChild(pr(r)):document.head.appendChild(hr(r))));sc(e)}function ic(e){return e.tagName==="STYLE"?!0:e.tagName==="LINK"&&(e.getAttribute("rel")||"").toLowerCase().split(/\s+/).includes("stylesheet")}function hs(e){let t=document.head,n=e.querySelector("title");n&&(document.title=n.textContent||"");let r=new Set;for(let s of t.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&r.add(K(s));let o=new Set;for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&o.add(K(s));for(let s of[...t.children])s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&(ic(s)||s.tagName==="META"&&Kt(s)===tr||o.has(K(s))||s.remove());for(let s of e.children)s.tagName==="SCRIPT"&&s.getAttribute("type")==="importmap"||s.tagName!=="BASE"&&s.tagName!=="TITLE"&&(s.tagName==="META"&&Kt(s)===tr||r.has(K(s))||(s.tagName==="SCRIPT"?t.appendChild(pr(s)):t.appendChild(hr(s))))}function he(e){typeof customElements>"u"||mr(e)}function mr(e){let t=e instanceof Element?[e,...e.querySelectorAll("*")]:[...e.querySelectorAll("*")];for(let n of t)n.tagName&&n.tagName.includes("-")&&(customElements.upgrade(n),n.shadowRoot&&mr(n.shadowRoot))}function Bo(e){for(let t of e.querySelectorAll("template[data-webjs-resolve]")){let n=t.cloneNode(!0);document.body.appendChild(n);let r=n.getAttribute("data-webjs-resolve"),o=window.__webjsResolve;r&&typeof o=="function"&&o(r)}}async function ms(e){if(!e.body||typeof e.body.getReader!="function")return{shell:await e.text(),streaming:!1};let t=e.body.getReader(),n=new TextDecoder,r="",o="<template data-webjs-resolve",s="<!--wj-stream-shell-->",i=/<\/html\s*>/i;for(;;){let{value:c,done:a}=await t.read();c&&(r+=n.decode(c,{stream:!0})),a&&(r+=n.decode());let l=r.indexOf(s);if(l!==-1)return{shell:r.slice(0,l),streaming:!0,reader:a?null:t,dec:n,rest:r.slice(l+s.length)};let u=r.indexOf(o);if(u!==-1)return{shell:r.slice(0,u),streaming:!0,reader:a?null:t,dec:n,rest:r.slice(u)};if(a)return{shell:r,streaming:!1};let f=i.exec(r);if(f){let d=f.index+f[0].length;return{shell:r.slice(0,d),streaming:!0,reader:t,dec:n,rest:r.slice(d)}}}}function ys(e){let t=/<template\s+data-webjs-resolve="([^"]+)"\s*>/i.exec(e);if(!t)return null;let n=t[1],r=t.index+t[0].length,o=/<(\/?)template\b[^>]*>/gi;o.lastIndex=r;let s=1,i;for(;i=o.exec(e);)if(i[1]==="/"){if(s--,s===0)return{id:n,content:e.slice(r,i.index),rest:e.slice(i.index+i[0].length)}}else s++;return null}function bs(e,t){let n=document.getElementById(e);if(!n){Fa(e);return}let r=document.createElement("template");r.innerHTML=t;let o=[...r.content.childNodes];n.replaceWith(r.content);for(let s of o)s.nodeType===1&&mr(s)}async function gs(e,t,n,r){let o=n,s=()=>{let i;for(;i=ys(o);){if(!r())return!1;bs(i.id,i.content),o=i.rest}return!0};if(!e){s();return}try{for(;;){if(!s()){try{await e.cancel()}catch{}return}let{value:i,done:c}=await e.read();if(i&&(o+=t.decode(i,{stream:!0})),c){o+=t.decode(),s();return}}}catch{}}function Ze(e){for(let t of e.querySelectorAll("script"))t.replaceWith(pr(t))}function ac(e){return w.get(ne(e))||null}function cc(){return pe.size}function lc(){w.clear(),pe.clear(),Ne.length=0,Je.clear(),Jt(),ur()}function uc(){return C}function fc(){return++C}function dc(){return H}function pc(e){H=e}function hc(){Jn.clear(),Xn=!1}function mc(e,t){return Jo(e,t)}function yc(e){return Yt.test(e)}var Io,ve,re,M,C,Yn,H,Pt,Yt,Go,Jn,Xn,Da,x,$a,Zo,es,Ha,qa,Va,w,pe,Ne,Je,Te,Xe,te,Ce,Qe,qt,Vt,Ft,er,tr,Ot=G(()=>{Vn();Lt();Lt();Oo();Kn();wt();Io="text/vnd.webjs-stream.html";ve=null;re=!1,M=null,C=0,Yn=null;H=null,Pt=null;Yt=/\.(?:pdf|zip|tar|gz|7z|rar|dmg|exe|msi|deb|rpm|apk|ipa|xlsx?|docx?|pptx?|csv|odt|ods|odp|rtf|epub|mobi|xml|json|rss|atom|txt|md|wasm|mp3|mp4|mov|avi|webm|ogg|flac|wav|m4a|m4v|mkv|png|jpe?g|gif|webp|avif|bmp|ico|svg|tiff?|heic)$/i;Go="_top";Jn=new Set;Xn=!1;Da=16,x=new Map;$a=8,Zo=3e4,es=3,Ha=24,qa=100,Va=250,w=new Map,pe=new Set,Ne=[],Je=new Set,Te=null,Xe=null,te=null,Ce=new WeakMap,Qe=new Set;qt=new WeakMap;Vt=new WeakMap;Ft=Promise.resolve();er=new Set(["value","checked","selected","indeterminate","disabled","open","popover"]);tr="name=csp-nonce";(typeof window>"u"||window.__WEBJS_CLIENT_ROUTER__!==!1)&&or()});function vs(e,...t){return{_$webjs:"template",strings:e,values:t}}function O(e){return!!e&&typeof e=="object"&&e._$webjs==="template"}var E="wjm-";function Cs(e,...t){let n=e[0];for(let r=1;r<e.length;r++)n+=String(t[r-1]??"")+e[r];return{_$webjsCss:!0,text:n}}function nn(e){return!!e&&typeof e=="object"&&e._$webjsCss===!0}function rn(e,t){if(!(!t||!t.length))if("adoptedStyleSheets"in e&&typeof CSSStyleSheet<"u"){let n=t.map(r=>{let o=new CSSStyleSheet;return o.replaceSync(r.text),o});e.adoptedStyleSheets=n}else{let n=e,r=document.createElement("style");r.textContent=t.map(o=>o.text).join(`
4
+ `),n.appendChild(r)}}function Ns(e){return!e||!e.length?"":`<style>${e.map(t=>t.text).join(`
5
+ `)}</style>`}var on=Object.freeze({"@":"event",".":"prop","?":"bool"});function Me(e){return Object.prototype.hasOwnProperty.call(on,e)}function Ts(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ks(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}function Pe(e,t,n){if(Ar(e)&&js(t))throw new Error(Rs(t,n))}function Sr(e,t,n){xs(t,n)&&Pe(e,t,n)}function xs(e,t){let n=String(e).toLowerCase();Me(n[0])&&(n=n.slice(1));let r=String(t||"").toLowerCase();return n==="action"?r==="form":n==="formaction"?r==="button"||r==="input":!1}function Ar(e,t){if(typeof e=="function")return!0;if(!Array.isArray(e))return!1;let n=t||new Set;return n.has(e)?!1:(n.add(e),e.some(r=>Ar(r,n)))}function js(e){let t=String(e).toLowerCase();return Me(t[0])&&(t=t.slice(1)),t==="action"||t==="formaction"}function Rs(e,t){return`[webjs] a function was interpolated into ${String(e).toLowerCase()}= on <${t||"form"}>. Stringifying a function into HTML would leak its source (a 'use server' action's body included) to every visitor, so this is refused. Pass a URL string instead.`}var Er=Symbol.for("webjs.repeat");function vr(e,t,n){return{[Er]:!0,items:[...e],keyFn:t,templateFn:n}}function tt(e){return!!e&&typeof e=="object"&&e[Er]===!0}function Os(e){return{_$webjs:"unsafe-html",value:String(e??"")}}function sn(e){return!!e&&typeof e=="object"&&e._$webjs==="unsafe-html"}function Ls(e){return{_$webjs:"live",value:e}}function an(e){return!!e&&typeof e=="object"&&e._$webjs==="live"}function Ms(e,t){return{_$webjs:"keyed",key:e,value:t}}function nt(e){return!!e&&typeof e=="object"&&e._$webjs==="keyed"}function Ps(e,t){return{_$webjs:"guard",deps:e,fn:t}}function rt(e){return!!e&&typeof e=="object"&&e._$webjs==="guard"}function Is(e){return{_$webjs:"template-content",template:e}}function cn(e){return!!e&&typeof e=="object"&&e._$webjs==="template-content"}function Fs(e){return{_$webjs:"ref",target:e}}function ot(e){return!!e&&typeof e=="object"&&e._$webjs==="ref"}function Ds(){return{value:void 0}}function Bs(e){return{_$webjs:"cache",value:e}}function st(e){return!!e&&typeof e=="object"&&e._$webjs==="cache"}function Us(...e){return{_$webjs:"until",args:e}}function it(e){return!!e&&typeof e=="object"&&e._$webjs==="until"}function $s(e,t){return{_$webjs:"async-append",iterable:e,mapper:t}}function ln(e){return!!e&&typeof e=="object"&&e._$webjs==="async-append"}function Hs(e,t){return{_$webjs:"async-replace",iterable:e,mapper:t}}function un(e){return!!e&&typeof e=="object"&&e._$webjs==="async-replace"}function qs(e){return{_$webjs:"watch",signal:e}}function at(e){return!!e&&typeof e=="object"&&e._$webjs==="watch"}var I=null,J=!1,ye=0,me=null,fn=0,Cr=(e,t)=>Object.is(e,t),lt=()=>{},Nr=()=>!1;function Tr(e,t){e.liveConsumers||(e.liveConsumers=new Set);let n=e.liveConsumers.size===0;if(e.liveConsumers.add(t),n){if(e.producers&&e.producers.length>0)for(let r of e.producers)Tr(r,e);if(e.watched)try{e.watched.call(e.wrapper)}catch(r){console.error(r)}}}function Ie(e,t){if(e.liveConsumers&&(e.liveConsumers.delete(t),e.liveConsumers.size===0)){if(e.producers&&e.producers.length>0)for(let n of e.producers)Ie(n,e);if(e.unwatched)try{e.unwatched.call(e.wrapper)}catch(n){console.error(n)}}}function bn(e){if(J)throw new Error("Signal read during notification phase");if(I===null)return;let t=I,n=t.nextProducerIndex++;n<t.producers.length&&t.producers[n]!==e&&hn(t)&&Ie(t.producers[n],t),t.producers[n]!==e&&(t.producers[n]=e,hn(t)&&Tr(e,t)),t.producerLastReadVersions[n]=e.version}function hn(e){return e.consumerIsAlwaysLive||e.liveConsumers&&e.liveConsumers.size>0}function kr(e){if(!e.liveConsumers||e.liveConsumers.size===0)return;let t=J;J=!0;try{for(let n of e.liveConsumers)n.dirty||Vs(n)}finally{J=t}}function Vs(e){e.dirty=!0,kr(e),e.consumerMarkedDirty.call(e.wrapper||e)}function ut(e){if(!(!e.dirty&&e.lastCleanEpoch===ye)){if(!e.producerMustRecompute()&&!Ws(e)){e.dirty=!1,e.lastCleanEpoch=ye;return}e.producerRecomputeValue(),e.dirty=!1,e.lastCleanEpoch=ye}}function Ws(e){for(let t=0;t<e.producers.length;t++){let n=e.producers[t],r=e.producerLastReadVersions[t];if(r!==n.version||(ut(n),r!==n.version))return!0}return!1}function mn(e){e&&(e.nextProducerIndex=0);let t=I;return I=e,t}function yn(e,t){if(I=t,!!e){if(hn(e))for(let n=e.nextProducerIndex;n<e.producers.length;n++)Ie(e.producers[n],e);for(;e.producers.length>e.nextProducerIndex;)e.producers.pop(),e.producerLastReadVersions.pop()}}var ft=class{constructor(t,n){this.__value=t,this.version=0,this.lastCleanEpoch=ye,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.liveConsumers=void 0,this.consumerAllowSignalWrites=!0,this.consumerIsAlwaysLive=!1,this.producerMustRecompute=Nr,this.producerRecomputeValue=lt,this.consumerMarkedDirty=lt,this.wrapper=this,this.__isSignal=!0,this.__equal=n?.equals||Cr,this.watched=n?.[gn],this.unwatched=n?.[_n]}get(){return bn(this),this.__value}peek(){return this.__value}set(t){if(J)throw new Error("Signal write during notification phase");this.__equal.call(this,this.__value,t)||(this.__value=t,this.version++,ye++,me!==null?xr(this):kr(this))}};function xr(e){let t=J;J=!0;try{if(!e.liveConsumers)return;for(let n of e.liveConsumers)n.dirty||(n.dirty=!0,n.__isWatcher?me.add(n):xr(n))}finally{J=t}}var dn=Symbol("unset"),pn=Symbol("computing"),ct=Symbol("errored"),Fe=class{constructor(t,n){this.__fn=t,this.__value=dn,this.__error=null,this.version=0,this.lastCleanEpoch=-1,this.dirty=!0,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!1,this.wrapper=this,this.__isSignal=!0,this.__isComputed=!0,this.__equal=n?.equals||Cr,this.watched=n?.[gn],this.unwatched=n?.[_n];let r=this;this.producerMustRecompute=function(){return r.__value===dn||r.__value===pn},this.producerRecomputeValue=function(){if(r.__value===pn)throw new Error("Detected cycle in computations.");let o=r.__value;r.__value=pn;let s=mn(r),i,c=!1;try{i=r.__fn.call(r.wrapper)}catch(l){i=ct,r.__error=l,c=!0}finally{yn(r,s)}if(!c&&(o!==dn&&o!==ct)&&r.__equal.call(r.wrapper,o,i)){r.__value=o;return}r.__value=i,r.version++},this.consumerMarkedDirty=lt}get(){if(ut(this),bn(this),this.__value===ct)throw this.__error;return this.__value}peek(){if(ut(this),this.__value===ct)throw this.__error;return this.__value}},dt=class{constructor(t){this.__notify=t,this.version=0,this.lastCleanEpoch=ye,this.dirty=!1,this.producers=[],this.producerLastReadVersions=[],this.nextProducerIndex=0,this.liveConsumers=void 0,this.consumerAllowSignalWrites=!1,this.consumerIsAlwaysLive=!0,this.producerMustRecompute=Nr,this.producerRecomputeValue=lt,this.wrapper=this,this.__isWatcher=!0;let n=this;this.consumerMarkedDirty=function(){n.__fire()}}__fire(){this.__notify&&this.__notify.call(this)}watch(...t){if(t.length===0){this.dirty=!1;return}let n=mn(this);try{for(let r of t)bn(r),r.__isComputed&&ut(r)}finally{yn(this,n)}this.dirty=!1}unwatch(...t){for(let n=this.producers.length-1;n>=0;n--)t.includes(this.producers[n])&&(Ie(this.producers[n],this),this.producers.splice(n,1),this.producerLastReadVersions.splice(n,1),this.nextProducerIndex=Math.min(this.nextProducerIndex,this.producers.length))}getPending(){return this.producers.filter(t=>t.__isComputed&&t.dirty)}observe(t){let n=mn(this),r;try{r=t()}finally{yn(this,n)}return this.dirty=!1,r}dispose(){for(let t of this.producers)Ie(t,this);this.producers=[],this.producerLastReadVersions=[],this.__notify=null}},gn=Symbol("watched"),_n=Symbol("unwatched");function zs(e){let t=I;I=null;try{return e()}finally{I=t}}function Ks(e){return e.producers.slice()}function Ys(e){return e.liveConsumers?[...e.liveConsumers]:[]}function Gs(e){return!!e.liveConsumers&&e.liveConsumers.size>0}function Js(e){return e.producers.length>0}function Xs(){return I&&I.__isComputed?I:null}function Qs(e){fn++,me===null&&(me=new Set);try{e()}finally{if(fn--,fn===0){let t=me;me=null;for(let n of t)n.__fire()}}}var De={State:ft,Computed:Fe,subtle:{Watcher:dt,untrack:zs,introspectSources:Ks,introspectSinks:Ys,hasSinks:Gs,hasSources:Js,currentComputed:Xs,watched:gn,unwatched:_n}};function Zs(e,t){return new ft(e,t)}function ei(e,t){return new Fe(e,t)}function ti(e){return!!(e&&typeof e=="object"&&e.__isSignal===!0)}function ni(e){let t=!1,n=!1,r=new Fe(e),o=new dt(()=>{t||n||(t=!0,queueMicrotask(()=>{if(t=!1,!n){try{r.get()}catch(s){console.error(s)}o.watch()}}))});o.watch(r);try{r.get()}catch(s){console.error(s)}return()=>{n||(n=!0,o.dispose())}}wt();function Zr(e,t){let n=e&&e[A]?e:null;return n?bt(n,t):t()}var Xr=new WeakMap,St=Symbol.for("webjs.instance");function Ae(e,t){let n=t,r=n[k];n[k]=!0;try{let o=n[St];if(O(e)){let s=e;if(o&&o.strings===s.strings){we(o,s.values);return}o&&Qr(o,t);let i=t.firstChild;i&&i.nodeType===8&&i.data==="webjs-hydrate"&&i.remove(),n[St]=null;let c=Si(s,t);n[St]=c;return}if(o&&Qr(o,t),n[St]=null,t.replaceChildren(),e==null||e===!1||e===!0)return;if(Array.isArray(e)){for(let s of e){let i=document.createTextNode(String(s??""));t.appendChild(i)}return}t.appendChild(document.createTextNode(String(e)))}finally{n[k]=r,r||Mn(n)}}function Et(e){let{strings:t}=e,n=Xr.get(t);if(n)return n;let r=[],o="",s="text",i="",c=0,a="",l=0,u=null,f="",d="";for(let m=0;m<t.length;m++){let S=t[m];for(let y=0;y<S.length;y++){let p=S[y];switch(s){case"text":o+=p,p==="<"&&(s="tag-open");break;case"tag-open":o+=p,p==="!"?s="bang-1":p==="/"?(s="tag-name",f=""):/[a-zA-Z]/.test(p)?(s="tag-name",f=p.toLowerCase()):s="text";break;case"bang-1":o+=p,s=p==="-"?"bang-dash":"tag-name";break;case"bang-dash":o+=p,p==="-"?(s="comment",l=0):s="tag-name";break;case"comment":o+=p,p==="-"?l+=1:(p===">"&&l>=2&&(s="text"),l=0);break;case"tag-name":o+=p,p===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(d="")):/\s/.test(p)?s="in-tag":f+=p.toLowerCase();break;case"in-tag":o+=p,p===">"?(s=f==="script"||f==="style"?"rawtext":"text",s==="rawtext"&&(d="")):!/\s/.test(p)&&p!=="/"&&(s="attr-name",i=p,c=o.length-1);break;case"rawtext":o+=p,d=(d+p.toLowerCase()).slice(-9),(d.endsWith("<\/script>")||d.endsWith("</style>"))&&(s="text",d="",f="");break;case"attr-name":p==="="?(s="after-eq",o+=p):/\s/.test(p)?(s="in-tag",i="",o+=p):p===">"?(s="text",i="",o+=p):(i+=p,o+=p);break;case"after-eq":p==='"'||p==="'"?(s="attr-quoted",a=p,o+=p):/\s/.test(p)?(s="in-tag",i="",o+=p):p===">"?(s="text",i="",o+=p):(s="attr-unquoted",o+=p);break;case"attr-unquoted":/\s/.test(p)?(s="in-tag",i="",o+=p):(p===">"&&(s="text",i=""),o+=p);break;case"attr-quoted":o+=p,p===a&&(s="in-tag",i="");break;case"skip-attr":if(p===a){if(u){let j=u.firstPartIdx,R=[];for(let T=j;T<r.length;T++)(r[T].kind==="noop"||r[T].kind==="attr-mixed")&&R.push(T);let b=[],P=t[R[0]],Le=P.lastIndexOf(a);b.push(Le>=0?P.slice(Le+1):P);for(let T=1;T<R.length;T++)b.push(t[R[T]]);let oe=t[R[R.length-1]+1],N=oe.indexOf(a);b.push(N>=0?oe.slice(0,N):oe),r[j]={kind:"attr-mixed",path:[],name:u.name,statics:b,group:R};for(let T=1;T<R.length;T++)r[R[T]]={kind:"noop",path:[],mixedAnchor:j};u=null}s="in-tag",i=""}break}}if(m<t.length-1){let y=r.length;if(s==="comment"){l=0,r.push({kind:"noop",path:[]});continue}if(s==="rawtext"){d="",r.push({kind:"noop",path:[]});continue}if(s==="text")o+=`<!--${E}${y}-->`,r.push({kind:"child",path:[]});else if(s==="in-tag"){let p=`data-${E}${y}`;o+=`${p}=""`,r.push({kind:"element",path:[]})}else if(s==="after-eq"){let p=i[0],j=i.slice(1);if(Me(p)){o=o.slice(0,c);let R=on[p],b=`data-${E}${y}`;o+=`${b}=""`,r.push({kind:R,path:[],name:j})}else{o=o.slice(0,c);let R=`data-${E}${y}`;o+=`${R}=""`,r.push({kind:"attr",path:[],name:i})}s="in-tag",i=""}else if(s==="attr-quoted"||s==="attr-unquoted"){o=o.slice(0,c);let p=`data-${E}${y}`;o+=`${p}=""`,u={name:i,firstPartIdx:y},r.push({kind:"noop",path:[]}),s="skip-attr"}else s==="skip-attr"&&r.push({kind:"noop",path:[]})}}let h=document.createElement("template");return h.innerHTML=o,_i(h.content,r),wi(h.content,r),n={templateEl:h,parts:r},Xr.set(t,n),n}function _i(e,t){let n=e.querySelectorAll("slot");for(let r of n){r.setAttribute(v,"");let o=t.length;r.setAttribute(`data-${E}${o}`,""),t.push({kind:"slot",path:[]})}}function wi(e,t){let n=[];function r(o){for(let s=0;s<o.childNodes.length;s++){let i=o.childNodes[s];if(n.push(s),i.nodeType===8){let c=i.data;if(c.startsWith(E)){let a=Number(c.slice(E.length));t[a]&&t[a].kind==="child"&&(t[a].path=n.slice())}}else if(i.nodeType===1){let c=i,a=[];for(let l of c.attributes)if(l.name.startsWith(`data-${E}`)){let u=Number(l.name.slice(`data-${E}`.length));t[u]&&t[u].kind!=="child"&&(t[u].path=n.slice()),a.push(l.name)}for(let l of a)c.removeAttribute(l);r(i)}n.pop()}}r(e)}function Si(e,t){let{templateEl:n,parts:r}=Et(e),o=n.content.cloneNode(!0),s=document.createComment(`${E}s`),i=document.createComment(`${E}e`),c=r.map(u=>vt(u,o)),a=[];for(let u=0;u<e.values.length;u++)U(c[u],e.values[u],void 0,e.values),a.push(e.values[u]);t.replaceChildren(s,...o.childNodes,i);let l=t.nodeType===1&&t[A]?t:null;for(let u of c)u.kind==="slot"&&(l&&u.slotEl&&(u.slotEl[yt]=l),U(u,void 0,void 0,[]));return{strings:e.strings,bound:c,lastValues:a,startNode:s,endNode:i}}function vt(e,t){if(e.kind==="noop")return{kind:"noop",mixedAnchor:e.mixedAnchor};let n=t;for(let o of e.path)n=n.childNodes[o];if(e.kind==="child")return{kind:"child",marker:n};let r=n;if(e.kind==="event"){let o={kind:"event",el:r,name:e.name||"",handler:null,dispatcher(s){o.handler?.(s)}};return r.addEventListener(o.name,o.dispatcher),o}if(e.kind==="attr")return{kind:"attr",el:r,name:e.name||""};if(e.kind==="attr-mixed")return{kind:"attr-mixed",el:r,name:e.name||"",statics:e.statics||[],group:e.group||[]};if(e.kind==="prop")return{kind:"prop",el:r,name:e.name||""};if(e.kind==="bool")return{kind:"bool",el:r,name:e.name||""};if(e.kind==="element")return{kind:"element",el:r};if(e.kind==="slot")return{kind:"slot",slotEl:r,applied:!1};throw new Error(`unknown part kind ${e.kind}`)}function we(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(Object.is(r,e.lastValues[n]))continue;let o=e.bound[n],s=o.mixedAnchor;o.kind==="noop"&&s!=null?U(e.bound[s],t[s],e.lastValues[s],t):U(o,r,e.lastValues[n],t),e.lastValues[n]=r}}function Qr(e,t){for(let n of e.bound){if(n.kind==="event"&&n.el.removeEventListener(n.name,n.dispatcher),n.kind==="element"){let r=n.lastTarget;if(r){if(typeof r=="function")try{r(void 0)}catch{}else typeof r=="object"&&(r.value=void 0);n.lastTarget=void 0,n.__lastEl=void 0}}if(n.kind==="slot"){let r=$e(n.slotEl);r&&Jr(r,n.slotEl)}}t.replaceChildren()}function U(e,t,n,r){if(an(t)){let o=t.value;if(e.kind==="prop"&&e.el[e.name]===o||e.kind==="attr"&&e.el.getAttribute(e.name)===String(o)||e.kind==="bool"&&e.el.hasAttribute(e.name)===!!o)return;t=o}switch(e.kind){case"child":vi(e,t);break;case"attr":{t==null||t===!1?e.el.removeAttribute(e.name):(Pe(t,e.name,e.el.localName),e.el.setAttribute(e.name,String(t)));break}case"prop":Sr(t,e.name,e.el.localName),e.el[e.name]=t;break;case"bool":Pe(t,e.name,e.el.localName),t?e.el.setAttribute(e.name,""):e.el.removeAttribute(e.name);break;case"event":e.handler=typeof t=="function"?t:null;break;case"element":Ei(e,t);break;case"attr-mixed":{let o=e,s=o.statics[0];for(let i=0;i<o.group.length;i++){let c=r?r[o.group[i]]:t;Pe(c,e.name,e.el.localName),s+=String(c??""),s+=o.statics[i+1]||""}e.el.setAttribute(e.name,s);break}case"slot":{if(e.applied)break;let o=e.slotEl,s=()=>{let c=$e(o);if(!c){e.applied=!0;return}if(!c.contains(o)){c.isConnected?queueMicrotask(s):e.applied=!0;return}if(e.applied=!0,Ai(o))return;let a=document.createDocumentFragment();for(;o.firstChild;)a.appendChild(o.firstChild);o[Ue]=a,queueMicrotask(()=>z(c))},i=$e(o);i&&i.contains(o)?s():queueMicrotask(s);break}case"noop":break}}function $e(e){let t=e[yt];if(t&&t.isConnected)return t;let n=e.parentElement;for(;n;){if(n[A])return n;n=n.parentElement}return null}function Ai(e){let t=e;for(let n=0;n<128;n++){let r=t.parentNode;if(!r||r===t)return!1;if(r.nodeType===11&&r.host)return!0;t=r}return!1}function Ei(e,t){let n=e,r=ot(t)?t.target:void 0,o=n.__refTarget,s=r!==o;if(s&&o)if(typeof o=="function")try{o(void 0)}catch{}else typeof o=="object"&&(o.value=void 0);if(s||n.__refElement!==e.el){if(n.__refTarget=r,r)if(typeof r=="function"){if(!s&&n.__refElement!==void 0)try{r(void 0)}catch{}try{r(e.el)}catch{}}else typeof r=="object"&&(r.value=e.el);n.__refElement=e.el,e.lastTarget=r}}function vi(e,t){return Mi(e,t),B(e,t)}function B(e,t){return Zr(e.marker&&e.marker.parentNode,()=>Ci(e,t))}function Ci(e,t){let n=e.marker;if(sn(t)){Z(e);let o=String(t.value??""),s=document.createElement("template");s.innerHTML=o;let i=[...s.content.childNodes],c=document.createDocumentFragment();for(let a of i)c.appendChild(a);n.parentNode?.insertBefore(c,n),e.child=i;return}if(nt(t)){let o=t,s=e.__keyedKey;s!==void 0&&!Object.is(s,o.key)&&Z(e),e.__keyedKey=o.key,B(e,o.value);return}if(rt(t)){let o=t,s=e.__guardDeps,i=o.deps;if(s!==void 0&&(Array.isArray(s)&&Array.isArray(i)?Li(s,i):Object.is(s,i)))return;e.__guardDeps=Array.isArray(i)?i.slice():i,B(e,o.fn());return}if(cn(t)){Z(e);let o=t.template;if(o&&o.content){let s=o.content.cloneNode(!0),i=[...s.childNodes];n.parentNode?.insertBefore(s,n),e.child=i}return}if(ot(t))return;if(st(t))return Pi(e,t.value);if(it(t))return Ii(e,t.args);if(at(t))return Fi(e,t.signal);if(ln(t))return Di(e,t);if(un(t))return Bi(e,t);if(tt(t)){if(e.child&&e.child.kind==="repeat"){ki(e,t);return}Z(e);let o={kind:"repeat",map:new Map};e.child=o,Ti(n,o,t);return}if(Array.isArray(t)){if(e.child&&e.child.kind==="array"){Ri(e,t);return}Z(e);let o={kind:"array",items:[]};e.child=o,ji(n,o,t);return}if(e.child){let o=e.child;if(o.kind==="repeat")eo(o),e.child=void 0;else if(o.kind==="array")no(o),e.child=void 0;else if(o.kind==="async-stream")io(o),e.child=void 0;else if("strings"in e.child){let s=e.child;if(O(t)&&s.strings===t.strings){we(s,t.values);return}Se(s.startNode,s.endNode),e.child=void 0}else{for(let s of e.child)s.parentNode&&s.parentNode.removeChild(s);e.child=void 0}}if(t==null||t===!1||t===!0)return;if(O(t)){let o=t,{templateEl:s,parts:i}=Et(o),c=s.content.cloneNode(!0),a=document.createComment(`${E}s`),l=document.createComment(`${E}e`),u=i.map(h=>vt(h,c)),f=[];for(let h=0;h<o.values.length;h++)U(u[h],o.values[h],void 0,o.values),f.push(o.values[h]);let d=[a,...c.childNodes,l];n.parentNode?.insertBefore(Ni(d),n);for(let h of u)h.kind==="slot"&&U(h,void 0,void 0,[]);e.child={strings:o.strings,bound:u,lastValues:f,startNode:a,endNode:l};return}let r=document.createTextNode(String(t));n.parentNode?.insertBefore(r,n),e.child=[r]}function Ni(e){let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);return t}function Se(e,t){if(!e.parentNode)return;let n=e;for(;n&&n!==t;){let r=n.nextSibling;n.parentNode?.removeChild(n),n=r}t.parentNode===e.parentNode&&t.parentNode?.removeChild(t)}function In(e){let{templateEl:t,parts:n}=Et(e),r=t.content.cloneNode(!0),o=document.createComment(`${E}s`),s=document.createComment(`${E}e`),i=n.map(l=>vt(l,r)),c=[];for(let l=0;l<e.values.length;l++)U(i[l],e.values[l],void 0,e.values),c.push(e.values[l]);for(let l of i)l.kind==="slot"&&U(l,void 0,void 0,[]);let a=document.createDocumentFragment();for(a.appendChild(o);r.firstChild;)a.appendChild(r.firstChild);return a.appendChild(s),{inst:{strings:e.strings,bound:i,lastValues:c,startNode:o,endNode:s},frag:a}}function He(e){for(let t of e.bound)if(t.kind==="event"&&t.el.removeEventListener(t.name,t.dispatcher),t.kind==="element"){let n=t.lastTarget;if(n){if(typeof n=="function")try{n(void 0)}catch{}else typeof n=="object"&&(n.value=void 0);t.lastTarget=void 0,t.__lastEl=void 0}}}function Ti(e,t,n){let{items:r,keyFn:o,templateFn:s}=n,i=e.parentNode;if(!i)return;let c=document.createDocumentFragment();for(let a=0;a<r.length;a++){let l=o(r[a],a),u=s(r[a],a);if(!O(u))continue;let{inst:f,frag:d}=In(u);t.map.set(l,f),c.appendChild(d)}i.insertBefore(c,e)}function ki(e,t){let n=e.marker,r=n.parentNode;if(!r)return;let o=e.child,{items:s,keyFn:i,templateFn:c}=t,a=new Map;for(let l=0;l<s.length;l++){let u=i(s[l],l),f=c(s[l],l);if(!O(f))continue;let d=o.map.get(u);if(d&&d.strings===f.strings)we(d,f.values),Pn(d.startNode,d.endNode,r,n),a.set(u,d),o.map.delete(u);else{d&&(He(d),Se(d.startNode,d.endNode),o.map.delete(u));let{inst:h,frag:m}=In(f);r.insertBefore(m,n),a.set(u,h)}}for(let l of o.map.values())He(l),Se(l.startNode,l.endNode);o.map=a}function eo(e){for(let t of e.map.values())He(t),Se(t.startNode,t.endNode);e.map.clear()}function xi(e){return e.type==="tpl"?e.inst.startNode:e.type==="text"?e.node:null}function At(e){e.type==="tpl"?(He(e.inst),Se(e.inst.startNode,e.inst.endNode)):e.type==="text"&&e.node.parentNode?.removeChild(e.node)}function to(e){if(O(e)){let{inst:t,frag:n}=In(e);return{item:{type:"tpl",inst:t},frag:n}}if(e!=null&&e!==!1&&e!==!0){let t=document.createTextNode(String(e));return{item:{type:"text",node:t},frag:t}}return{item:{type:"empty"},frag:null}}function ji(e,t,n){let r=e.parentNode;if(!r)return;let o=document.createDocumentFragment(),s=[];for(let i of n){let{item:c,frag:a}=to(i);a&&o.appendChild(a),s.push(c)}r.insertBefore(o,e),t.items=s}function Ri(e,t){let n=e.marker,r=n.parentNode;if(!r)return;let o=e.child,s=o.items,i=[];for(let c=0;c<t.length;c++){let a=t[c],l=s[c];if(O(a)){let d=a;if(l&&l.type==="tpl"&&l.inst.strings===d.strings){we(l.inst,d.values),i.push(l);continue}}else if(a!=null&&a!==!1&&a!==!0){if(l&&l.type==="text"){let d=String(a);l.node.data!==d&&(l.node.data=d),i.push(l);continue}}else{l&&At(l),i.push({type:"empty"});continue}let{item:u,frag:f}=to(a);f&&r.insertBefore(f,Oi(s,c,n)),l&&At(l),i.push(u)}for(let c=t.length;c<s.length;c++)At(s[c]);o.items=i}function Oi(e,t,n){for(let r=t;r<e.length;r++){let o=xi(e[r]);if(o&&o.parentNode)return o}return n}function no(e){for(let t of e.items)At(t);e.items=[]}function Pn(e,t,n,r){if(t.nextSibling===r&&e.parentNode===n)return;let o=document.createDocumentFragment(),s=e;for(;s;){let i=s.nextSibling;if(o.appendChild(s),s===t)break;s=i}n.insertBefore(o,r)}function Li(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Z(e){let t=e;if(t.__untilState&&(t.__untilState.aborted=!0,t.__untilState=void 0),t.__watchSub&&ro(t),!e.child)return;let n=e.child;if(n.kind==="repeat")eo(n);else if(n.kind==="array")no(n);else if(n.kind==="async-stream")io(n);else if("strings"in n){let r=e.child;He(r),Se(r.startNode,r.endNode)}else for(let r of e.child)r.parentNode&&r.parentNode.removeChild(r);e.child=void 0}function Mi(e,t){let n=e;n.__untilState&&!it(t)&&(n.__untilState.aborted=!0,n.__untilState=void 0),n.__guardDeps!==void 0&&!rt(t)&&(n.__guardDeps=void 0),n.__cacheMap&&!st(t)&&(n.__cacheMap=void 0),n.__keyedKey!==void 0&&!nt(t)&&(n.__keyedKey=void 0),n.__watchSub&&!at(t)&&ro(n)}function Pi(e,t){let n=e.marker,r=e,o=r.__cacheMap;o||(o=new Map,r.__cacheMap=o);let s=e.child;if(s&&"strings"in s){let c=s;if(O(t)&&c.strings===t.strings){we(c,t.values);return}let a=document.createDocumentFragment();Pn(c.startNode,c.endNode,a,null),o.set(c.strings,{inst:c,holder:a}),e.child=void 0}if(O(t)){let c=t,a=o.get(c.strings);if(a){o.delete(c.strings),e.child&&Z(e),Pn(a.inst.startNode,a.inst.endNode,n.parentNode,n),we(a.inst,c.values),e.child=a.inst;let l=new Set;for(let u=a.inst.startNode.nextSibling;u&&u!==a.inst.endNode;u=u.nextSibling){if(u.nodeType!==1)continue;let f=u;if(f.matches("slot[data-webjs-light]")){let d=$e(f);d&&l.add(d)}for(let d of f.querySelectorAll("slot[data-webjs-light]")){let h=$e(d);h&&l.add(h)}}for(let u of l)z(u);return}}B(e,t)}function Ii(e,t){let n=e,r=n.__untilState,o=n.__untilArgs,s=(d,h)=>!!(Object.is(d,h)||O(d)&&O(h)&&d.strings===h.strings),c=o&&o.length===t.length&&o.every((d,h)=>s(d,t[h]))&&r?r.highestResolved:1/0;r&&(r.aborted=!0),n.__untilArgs=t.slice();let a={aborted:!1,highestResolved:c};n.__untilState=a;let l=-1,u;for(let d=0;d<t.length;d++){let h=t[d];if(!h||typeof h.then!="function"){l=d,u=h;break}}l!==-1&&l<=a.highestResolved?(B(e,u),a.highestResolved=l):l===-1&&!n.__untilEverRendered&&B(e,""),n.__untilEverRendered=!0;let f=Math.min(l===-1?t.length:l,a.highestResolved);for(let d=0;d<f;d++){let h=t[d];!h||typeof h.then!="function"||Promise.resolve(h).then(m=>{a.aborted||d>=a.highestResolved||(a.highestResolved=d,B(e,m))},()=>{})}}function Fi(e,t){let n=e;if(n.__watchSig===t&&n.__watchSub){let s;n.__watchSub.observe(()=>{s=t.get()}),B(e,s);return}n.__watchSub&&(n.__watchSub.dispose(),n.__watchSub=void 0),n.__watchSig=t;let r=new De.subtle.Watcher(()=>{queueMicrotask(()=>{if(n.__watchSub!==r)return;let s;r.observe(()=>{s=t.get()}),B(e,s)})});n.__watchSub=r;let o;r.observe(()=>{o=t.get()}),B(e,o)}function ro(e){e.__watchSub&&(e.__watchSub.dispose(),e.__watchSub=void 0,e.__watchSig=void 0)}function Di(e,t){let n=e.child;if(n&&n.kind==="async-stream"&&n.mode==="append"&&n.iterable===t.iterable)return;Z(e);let r=t.iterable[Symbol.asyncIterator](),o={kind:"async-stream",mode:"append",aborted:!1,iterable:t.iterable,iterator:r,nodes:[]};e.child=o,oo(o,e,t)}function Bi(e,t){let n=e.child;if(n&&n.kind==="async-stream"&&n.mode==="replace"&&n.iterable===t.iterable)return;Z(e);let r=t.iterable[Symbol.asyncIterator](),o={kind:"async-stream",mode:"replace",aborted:!1,iterable:t.iterable,iterator:r,nodes:[]};e.child=o,oo(o,e,t)}async function oo(e,t,n){let r=t.marker,o=0;try{for(;!e.aborted;){let s=await e.iterator.next();if(e.aborted||s.done)break;let i=n.mapper?n.mapper(s.value,o):s.value,c=so(i);Zr(r.parentNode,()=>{if(e.mode==="replace"){for(let l of e.nodes)l.parentNode&&l.parentNode.removeChild(l);e.nodes=[]}let a=document.createDocumentFragment();for(let l of c)a.appendChild(l);r.parentNode?.insertBefore(a,r),e.nodes.push(...c)}),o++}}catch(s){typeof console<"u"&&console.error("[webjs] asyncStream error:",s)}}function so(e){if(e==null||e===!1||e===!0)return[];if(O(e)){let t=e,{templateEl:n,parts:r}=Et(t),o=n.content.cloneNode(!0),s=r.map(i=>vt(i,o));for(let i=0;i<t.values.length;i++)U(s[i],t.values[i],void 0,t.values);for(let i of s)i.kind==="slot"&&U(i,void 0,void 0,[]);return[...o.childNodes]}if(Array.isArray(e)){let t=[];for(let n of e)t.push(...so(n));return t}return[document.createTextNode(String(e))]}function io(e){e.aborted=!0;for(let t of e.nodes)t.parentNode&&t.parentNode.removeChild(t);e.nodes=[];try{e.iterator.return?.()?.catch?.(()=>{})}catch{}}var ao=null;function Ct(e){ao=e||null}function Ui(){return ao||void 0}var co=Symbol.for("webjs:registry"),lo=Symbol.for("webjs:classToTag"),Nt=globalThis,$=Nt[co]||(Nt[co]=new Map),uo=Nt[lo]||(Nt[lo]=new WeakMap),Tt=typeof window<"u"&&typeof customElements<"u";function Fn(e,t){if(!e||typeof e!="string"||!e.includes("-"))throw new Error(`customElements.define: tag "${e}" must contain a hyphen (HTML spec)`);let n=t.lazy===!0,r=$.get(e);r?(r.cls=t,r.lazy=n):$.set(e,{cls:t,moduleUrl:null,lazy:n,tag:e}),uo.set(t,e)}if(Tt){let e=customElements.define.bind(customElements);customElements.define=function(t,n,r){customElements.get(t)||e(t,n,r),Fn(t,n)}}if(!Tt){let e=globalThis;e.customElements||(e.customElements={define(t,n){Fn(t,n)},get(t){return $.get(t)?.cls},upgrade(){},whenDefined(t){let n=$.get(t);return Promise.resolve(n?.cls)}})}function Dn(e,t){Tt?customElements.define(e,t):Fn(e,t)}function $i(e,t){if(Tt)return;let n=$.get(e);if(n){n.moduleUrl=t;return}$.set(e,{cls:null,moduleUrl:t,lazy:!1,tag:e})}function Hi(e){return $.get(e)?.cls}function qi(e){return $.get(e)?.moduleUrl||null}function Vi(e){return $.get(e)?.lazy===!0}function kt(e){return uo.get(e)}function Wi(){return[...$.keys()]}We();wt();var go=typeof window<"u"&&typeof HTMLElement<"u";function oa(e,t){return e!==t}function sa(e){try{return String(e)}catch{return Object.prototype.toString.call(e)}}function ia(){return{states:new Set,shadowRoot:null,form:null,labels:[],role:"",willValidate:!0,validity:{},validationMessage:"",setFormValue(){},setValidity(){},checkValidity(){return!0},reportValidity(){return!0}}}var xt=class{constructor(){this.__ssrAttrs=new Map,this.__internals=null}get attributes(){return[...this.__ssrAttrs].map(([t,n])=>({name:t,value:n}))}getAttribute(t){let n=this.__ssrAttrs.get(String(t).toLowerCase());return n===void 0?null:n}setAttribute(t,n){this.__ssrAttrs.set(String(t).toLowerCase(),String(n))}removeAttribute(t){this.__ssrAttrs.delete(String(t).toLowerCase())}hasAttribute(t){return this.__ssrAttrs.has(String(t).toLowerCase())}toggleAttribute(t,n){let r=String(t).toLowerCase(),o=this.__ssrAttrs.has(r);return(n===void 0?!o:n)?(this.__ssrAttrs.set(r,""),!0):(this.__ssrAttrs.delete(r),!1)}getAttributeNames(){return[...this.__ssrAttrs.keys()]}closest(t){let n=String(t).trim().toLowerCase();if(!/^[a-z][a-z0-9-]*$/.test(n))return null;if(this.__ssrTag===n)return this;let r=this.__ssrAncestors;if(!Array.isArray(r))return null;for(let o=r.length-1;o>=0;o--)if(r[o]&&r[o].__ssrTag===n)return r[o];return null}get dataset(){if(this.__dataset)return this.__dataset;let t=this,n=r=>"data-"+String(r).replace(/[A-Z]/g,o=>"-"+o.toLowerCase());return this.__dataset=new Proxy({},{get(r,o){if(typeof o!="string")return;let s=t.getAttribute(n(o));return s===null?void 0:s},set(r,o,s){return typeof o=="string"&&t.setAttribute(n(o),s),!0},has(r,o){return typeof o=="string"&&t.hasAttribute(n(o))},deleteProperty(r,o){return typeof o=="string"&&t.removeAttribute(n(o)),!0},ownKeys(){return t.getAttributeNames().filter(r=>r.startsWith("data-")).map(r=>r.slice(5).replace(/-([a-z])/g,(o,s)=>s.toUpperCase()))},getOwnPropertyDescriptor(r,o){if(typeof o=="string"&&t.hasAttribute(n(o)))return{enumerable:!0,configurable:!0,value:t.getAttribute(n(o))}}}),this.__dataset}get className(){return this.getAttribute("class")??""}set className(t){this.setAttribute("class",t)}get hidden(){return this.hasAttribute("hidden")}set hidden(t){this.toggleAttribute("hidden",!!t)}get id(){return this.getAttribute("id")??""}set id(t){this.setAttribute("id",t)}get title(){return this.getAttribute("title")??""}set title(t){this.setAttribute("title",t)}get slot(){return this.getAttribute("slot")??""}set slot(t){this.setAttribute("slot",t)}get role(){return this.getAttribute("role")}set role(t){t==null?this.removeAttribute("role"):this.setAttribute("role",t)}get tabIndex(){let t=this.getAttribute("tabindex");return t===null?-1:Number.parseInt(t,10)||0}set tabIndex(t){this.setAttribute("tabindex",String(t))}addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return this.__internals=ia(),this.__internals}},aa=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];for(let e of aa){let t="aria-"+e.slice(4).toLowerCase();Object.defineProperty(xt.prototype,e,{configurable:!0,get(){return this.getAttribute(t)},set(n){n==null?this.removeAttribute(t):this.setAttribute(t,String(n))}})}var ca=go?HTMLElement:xt,_o=Symbol("webjs.factoryProps"),yo=new WeakSet,Ee=class e extends ca{static shadow=!1;static hydrate=void 0;static properties={};static styles=null;static register(t){Dn(t,this)}static get observedAttributes(){let t=this.properties||{};return Object.keys(t).filter(n=>!(typeof t[n]=="object"&&t[n].state)).map(n=>typeof t[n]=="object"&&t[n].attribute||Un(n))}constructor(){super(),this._renderRoot=null,this._scheduled=!1,this._connected=!1,this.__controllers=new Set,this.__firstRendered=!1,this._changedProperties=new Map,this._updateResolve=null,this._updatePromise=Promise.resolve(!0),this._isUpdating=!1,this._assertFactoryProperties(),this._initializeProperties()}_assertFactoryProperties(){let t=this.constructor;if(yo.has(t))return;let n=t;for(;n&&n!==e;){if(Object.hasOwn(n,"properties")&&!Object.hasOwn(n,_o)){let r=n.name||"a component";throw new Error(`${r}: \`static properties\` is no longer supported. Declare reactive properties via the factory instead: \`class ${r} extends WebComponent({ count: Number })\`. Use the \`prop()\` helper for options (\`prop(Number, { reflect: true })\`) and set defaults in the constructor after \`super()\`. See https://webjs.dev/docs/components.`)}n=Object.getPrototypeOf(n)}yo.add(t)}_initializeProperties(){let n=this.constructor.properties;if(!(!n||typeof n!="object")){this.__propValues={};for(let[r,o]of Object.entries(n)){let s=typeof o=="object"?o:{type:o},i=this[r];Object.defineProperty(this,r,{configurable:!0,enumerable:!0,get:()=>this.__propValues[r],set:c=>{let a=this.__propValues[r];(s.hasChanged||oa)(c,a)&&(this.__propValues[r]=c,s.reflect&&!s.state&&this._connected&&this._reflectAttribute(r,c,s),this.requestUpdate(r,a))}}),i!==void 0?this.__propValues[r]=i:s.default!==void 0&&(this.__propValues[r]=typeof s.default=="function"?s.default():s.default)}}}_reflectAttribute(t,n,r){let o=r.attribute||Un(t);if(!this.__reflectingAttribute){this.__reflectingAttribute=!0;try{if(r.converter&&r.converter.toAttribute){let s=r.converter.toAttribute(n,r.type);s==null?this.removeAttribute(o):this.setAttribute(o,s)}else r.type===Boolean?n?this.setAttribute(o,""):this.removeAttribute(o):n==null?this.removeAttribute(o):r.type===Object||r.type===Array?this.setAttribute(o,JSON.stringify(n)):this.setAttribute(o,String(n))}finally{this.__reflectingAttribute=!1}}}connectedCallback(){if(!go)return;if(this.__webjsPropsHydrated||(this.__webjsPropsHydrated=!0,this._hydratePropAttrs()),this.constructor.hydrate==="visible"&&typeof IntersectionObserver<"u"&&!this.__hydrationActivated){this.__hydrationActivated=!1,this.__hydrationObserver=new IntersectionObserver(n=>{for(let r of n)if(r.isIntersecting){this.__hydrationObserver.unobserve(this),this.__hydrationObserver.disconnect(),this.__hydrationObserver=null,this.__hydrationActivated=!0,this._activate();return}},{rootMargin:"200px"}),this.__hydrationObserver.observe(this);return}this._activate()}_hydratePropAttrs(){let t=[],n=this.attributes;for(let r=0;r<n.length;r++){let o=n[r].name;o.startsWith("data-webjs-prop-")&&t.push(o)}for(let r of t){let o=this.getAttribute(r);if(this.removeAttribute(r),o==null)continue;let s=bo(r.slice(16));try{this[s]=ue(o)}catch(i){console.warn(`[webjs] failed to decode ${r} on <${this.tagName.toLowerCase()}>: ${i&&i.message}`)}}}_activate(){this._connected=!0,this._reflectDeclaredAttributes();let t=this.constructor;if(t.shadow!==!0&&!this.hasAttribute("data-wj-host")&&this.setAttribute("data-wj-host",""),t.shadow===!0){let n=!!this.shadowRoot;this.shadowRoot||this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot;let r=t.styles,o=Array.isArray(r)?r:nn(r)?[r]:[];if(o.length){if(n){let s=this.shadowRoot.querySelector("style");s&&s.remove()}rn(this._renderRoot,o)}}else this._renderRoot=this,t.styles&&console.warn(`[webjs] <${kt(t)||this.tagName?.toLowerCase()}> has static shadow = false AND static styles. static styles only works with shadow DOM (adoptedStyleSheets). For light DOM, use global CSS or <style> in render().`),Ln(this)?Wr(this):this.__isHydrating()||this.hasAttribute("data-wj-serialized")||Gr(this)?(this.removeAttribute("data-wj-serialized"),W(this),Ir(this)):Pr(this),Yr(this),Hr(this);for(let n of this.__controllers)n.hostConnected&&n.hostConnected();this._updateResolve===null&&(this._updatePromise=new Promise(n=>{this._updateResolve=n})),this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(n){console.error("[webjs] lifecycle hook threw during initial render:",n)}})}__isHydrating(){let t=this.firstChild,n=t!=null&&t.nodeType===8&&t.data==="webjs-hydrate";return n&&(this.__hydratedAtActivate=!0),n}disconnectedCallback(){this._connected=!1,this.__hydrationObserver&&(this.__hydrationObserver.disconnect(),this.__hydrationObserver=null),Vr(this),this.__signalWatcher&&(this.__signalWatcher.dispose(),this.__signalWatcher=void 0);for(let t of this.__controllers)t.hostDisconnected&&t.hostDisconnected()}attributeChangedCallback(t,n,r){if(this.__reflectingAttribute)return;let s=this.constructor.properties||{},i,c;for(let[u,f]of Object.entries(s))if(((typeof f=="object"?f:{type:f}).attribute||Un(u))===t){i=u,c=f;break}if(c===void 0&&(i=bo(t),c=s[i]||s[t]),c===void 0)return;let a=typeof c=="object"?c:{type:c},l;if(a.converter&&a.converter.fromAttribute)l=a.converter.fromAttribute(r,a.type);else if(a.type===Number)l=r==null?null:Number(r);else if(a.type===Boolean)l=r!=null&&r!=="false";else if(a.type===Object||a.type===Array)try{l=r==null?null:JSON.parse(r)}catch{l=r}else l=r;this[i]!==l&&(this[i]=l,this._connected&&this.requestUpdate())}requestUpdate(t,n){t!==void 0&&!this._changedProperties.has(t)&&this._changedProperties.set(t,n),this._scheduleUpdate()}_scheduleUpdate(){this._updateResolve===null&&(this._updatePromise=new Promise(t=>{this._updateResolve=t})),!this._isUpdating&&(this._scheduled||!this._connected||(this._scheduled=!0,queueMicrotask(()=>{this._scheduled=!1;try{this._performRender()}catch(t){console.error("[webjs] lifecycle hook threw during update cycle:",t)}})))}_performRender(){if(!this._renderRoot)return;let t=this._changedProperties;this._isUpdating=!0;let n=!1,r=null;try{if(this.shouldUpdate(t)){this.willUpdate(t);for(let o of this.__controllers)o.hostUpdate&&o.hostUpdate();this.__renderToken=(this.__renderToken||0)+1,this.__renderAbort&&this.__renderAbort.abort(),this.__renderAbort=typeof AbortController<"u"?new AbortController:null,Ct(this.__renderAbort?this.__renderAbort.signal:null);try{let o=this.update(t);o&&typeof o.then=="function"&&(r=o)}catch(o){this._handleRenderError(o)}finally{Ct(null)}if(!r){for(let o of this.__controllers)o.hostUpdated&&o.hostUpdated();n=!0}}}catch(o){console.error("[webjs] lifecycle hook threw during update phase:",o)}finally{this._isUpdating=!1,(n||r)&&(this._changedProperties=new Map)}if(r){let o=this.__renderToken;this.__pendingAsyncCommits=(this.__pendingAsyncCommits||0)+1;let s=()=>{if(this.__pendingAsyncCommits--,o===this.__renderToken){for(let i of this.__controllers)i.hostUpdated&&i.hostUpdated();this._postCommit(t)}};r.then(s,i=>{try{o===this.__renderToken&&this._handleRenderError(i instanceof Error?i:new Error(sa(i)))}finally{s()}});return}n?this._postCommit(t):this.__pendingAsyncCommits||this._resolveUpdate()}_resolveUpdate(){if(this._updateResolve){let t=this._changedProperties.size===0;this._updateResolve(t),this._updateResolve=null}}performServerUpdate(){let t=this._changedProperties;this._isUpdating=!0;try{this.willUpdate(t);for(let n of this.__controllers)n.hostUpdate&&n.hostUpdate();this._reflectDeclaredAttributes()}finally{this._isUpdating=!1}}_reflectDeclaredAttributes(){let t=this.constructor.properties||{};for(let n of Object.keys(t)){let r=t[n];!r||!r.reflect||r.state||this._reflectAttribute(n,this[n],r)}}shouldUpdate(t){return!0}willUpdate(t){}update(t){this.__signalWatcher||(this.__signalWatcher=new De.subtle.Watcher(()=>{this._connected&&this.requestUpdate()}));let n;if(this.__signalWatcher.observe(()=>{n=this.render()}),n&&typeof n.then=="function")return this._commitAsync(n);Ae(n,this._renderRoot)}_commitAsync(t){let n=this.__renderToken;if(this.__firstRendered&&this._overridesRenderFallback())try{let r=this.renderFallback();r!==void 0&&Ae(r,this._renderRoot)}catch(r){console.error("[webjs] renderFallback() threw:",r)}return Promise.resolve(t).then(r=>{if(n===this.__renderToken)try{Ae(r,this._renderRoot)}catch(o){this._handleRenderError(o instanceof Error?o:new Error(String(o)))}},r=>{n===this.__renderToken&&this._handleRenderError(r instanceof Error?r:new Error(String(r)))})}_overridesRenderFallback(){return this.renderFallback!==jt.prototype.renderFallback}_handleRenderError(t){console.error(`[webjs] render error in <${kt(this.constructor)||this.tagName?.toLowerCase()}>:`,t);try{let n=this.renderError(t);n!==void 0&&Ae(n,this._renderRoot)}catch(n){console.error("[webjs] renderError() also threw:",n)}}_postCommit(t){try{this.__firstRendered||(this.__firstRendered=!0,this.firstUpdated(t)),this.updated(t)}catch(n){console.error("[webjs] lifecycle hook threw during post-commit phase:",n)}finally{this._resolveUpdate()}}updated(t){}firstUpdated(t){}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}addController(t){this.__controllers.add(t),this._connected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}render(){return""}renderError(t){}renderFallback(){}};function Un(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function bo(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function jt(e){return new.target?Reflect.construct(Ee,arguments,new.target):class extends Ee{static properties=e;static[_o]=!0}}Object.setPrototypeOf(jt,Ee);jt.prototype=Ee.prototype;function la(e,t={}){return e&&typeof e=="object"&&!("call"in e)&&(t=e,e=void 0),{...e?{type:e}:{},...t}}var wo=Symbol.for("webjs.notFound"),So=Symbol.for("webjs.redirect"),Ao=Symbol.for("webjs.forbidden"),Eo=Symbol.for("webjs.unauthorized");function ua(){let e=new Error("webjs: notFound()");throw e.__webjs=wo,e}function fa(){let e=new Error("webjs: forbidden()");throw e.__webjs=Ao,e}function da(){let e=new Error("webjs: unauthorized()");throw e.__webjs=Eo,e}function pa(e,t){let n=typeof t=="object"&&t!==null?t.status:t,r=new Error(`webjs: redirect(${e})`);throw r.__webjs=So,r.url=e,r.status=typeof n=="number"?n:void 0,r}function ha(e){return!!e&&e.__webjs===wo}function ma(e){return!!e&&e.__webjs===So}function ya(e){return!!e&&e.__webjs===Ao}function ba(e){return!!e&&e.__webjs===Eo}var vo=null;function ga(){if(!vo)return"";try{return vo()||""}catch{return""}}var Co=null;function _a(e){if(typeof e!="string"||!e||!Co)return e;try{return Co(e)||e}catch{return e}}var wl=Symbol.for("webjs.suspense");function wa(e){return{_$webjsSuspense:!0,fallback:e.fallback,children:e.children}}function Sa(e){return!!e&&typeof e=="object"&&e._$webjsSuspense===!0}function Aa(e,t={}){let n=t.reconnect!==!1,r=0,o=!1,s=null,i=[];function c(){o||(s=new WebSocket(Ea(e),t.protocols),s.onopen=a=>{for(r=0;i.length&&s&&s.readyState===WebSocket.OPEN;)s.send(i.shift());t.onOpen?.(a)},s.onmessage=a=>{let l=a.data;if(typeof l=="string")try{l=JSON.parse(l)}catch{}t.onMessage?.(l,a)},s.onerror=a=>{t.onError?.(a)},s.onclose=a=>{if(t.onClose?.(a),!o&&n){let l=Math.min(1e3*2**r++,3e4);setTimeout(c,l)}})}return c(),{send(a){let l=typeof a=="string"||a instanceof ArrayBuffer||ArrayBuffer.isView(a)?a:JSON.stringify(a);s&&s.readyState===WebSocket.OPEN?s.send(l):i.push(l)},close(a,l){o=!0;try{s?.close(a,l)}catch{}},get socket(){return s},get readyState(){return s?.readyState??3}}}function Ea(e){if(/^wss?:\/\//i.test(e))return e;let t=typeof location<"u"&&location.protocol==="https:"?"wss:":"ws:",n=typeof location<"u"?location.host:"";return`${t}//${n}${e.startsWith("/")?e:"/"+e}`}We();var $n="application/vnd.webjs+json";async function va(e,t={}){let n=new Headers(t.headers||{});n.has("accept")||n.set("accept",$n);let r=t.body;r!=null&&typeof r=="object"&&!(r instanceof FormData)&&!(r instanceof Blob)&&!(r instanceof ArrayBuffer)&&!(r instanceof URLSearchParams)&&!(typeof ReadableStream<"u"&&r instanceof ReadableStream)&&!ArrayBuffer.isView(r)&&(r=await Bn(r),n.has("content-type")||n.set("content-type",$n));let o=await fetch(e,{...t,headers:n,body:r}),s=o.headers.get("content-type")||"",i=await o.text(),c=s.includes($n)?i?ue(i):null:s.includes("application/json")?i?JSON.parse(i):null:i;if(!o.ok){let a=c&&c.error||`richFetch ${e} -> ${o.status}`,l=new Error(a);throw l.status=o.status,l.body=c,l}return c}We();Ot();Ot();Vn();Lt();var yr=class{constructor(t,n){this.host=t,this.options=n,this.updates=[],this._nextId=0}get value(){let t=this.options.source();if(!this.options.update)return this.updates.length>0?this.updates[this.updates.length-1].payload:t;for(let n of this.updates)t=this.options.update(t,n.payload);return t}add(t,n){let r=`opt-${++this._nextId}`;this.updates.push({id:r,payload:t}),this.host?.requestUpdate?.();let o=()=>{let s=this.updates.findIndex(i=>i.id===r);s!==-1&&(this.updates.splice(s,1),this.host?.requestUpdate?.())};return n&&typeof n.then=="function"&&(typeof n.finally=="function"?n.finally(()=>o()).catch(()=>{}):n.then(()=>o(),()=>o())),o}};async function bc(e,t,n){let r=e.get();e.set(t);let o;try{o=await n()}catch(s){throw e.set(r),s}return o&&o.success===!1&&e.set(r),o}function gc(e,t,n){return e&&typeof e.get=="function"&&typeof e.set=="function"?bc(e,t,n):new yr(e,t)}Kn();var Zt=0,_s=new Map,Oe=new Map,_c=1e3;function wc(e){if(!(!Array.isArray(e)||!e.length)){Zt+=1;for(let t of e)t&&_s.set(t,Zt)}}function Sc(){return Zt}function Ac(e,t,n){if(!(!Array.isArray(t)||!t.length)&&(Oe.delete(e),Oe.set(e,{tags:t.slice(),since:typeof n=="number"?n:Zt}),Oe.size>_c)){let r=Oe.keys().next().value;r!==void 0&&Oe.delete(r)}}function Ec(e){let t=Oe.get(e);if(!t)return!1;for(let n of t.tags)if((_s.get(n)||0)>t.since)return!0;return!1}function vc(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}var Cc="application/vnd.webjs+stream",Nc=1,Tc=2,kc=3,ws=new Uint8Array(0);function xc(e,t){let n=t||ws,r=n.length,o=new Uint8Array(5+r);return o[0]=e&255,o[1]=r>>>24&255,o[2]=r>>>16&255,o[3]=r>>>8&255,o[4]=r&255,r&&o.set(n,5),o}function jc(){let e=ws;return{push(t){if(t&&t.length){let r=new Uint8Array(e.length+t.length);r.set(e,0),r.set(t,e.length),e=r}let n=[];for(;e.length>=5;){let r=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0;if(e.length<5+o)break;let s=e.slice(5,5+o);n.push({type:r,payload:s}),e=e.slice(5+o)}return n}}}var Rc=Symbol.for("webjs.context");function Oc(e){return{__context__:Rc,name:e}}var en=class extends Event{constructor(t,n,r=!1){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=n,this.subscribe=r}},br=class{constructor(t,{context:n,initialValue:r}){this._host=t,this._context=n,this._value=r,this._subscriptions=new Set,this._onRequest=o=>{let s=o;if(s.context===this._context)if(o.stopPropagation(),s.subscribe){let i={callback:s.callback},c=()=>{this._subscriptions.delete(i)};this._subscriptions.add(i),s.callback(this._value,c)}else s.callback(this._value)},typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}setValue(t){if(!Object.is(this._value,t)){this._value=t;for(let n of this._subscriptions){let r=()=>{this._subscriptions.delete(n)};n.callback(t,r)}}}hostConnected(){this._host.addEventListener("context-request",this._onRequest)}hostDisconnected(){this._host.removeEventListener("context-request",this._onRequest),this._subscriptions.clear()}},gr=class{constructor(t,{context:n,subscribe:r=!0}){this._host=t,this._context=n,this._subscribe=r,this._value=void 0,this._unsubscribe=void 0,typeof t.addController=="function"&&t.addController(this)}get value(){return this._value}hostConnected(){this._dispatchRequest()}hostDisconnected(){this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=void 0)}_dispatchRequest(){let t=new en(this._context,(n,r)=>{let o=this._value;this._value=n,r&&(this._unsubscribe=r),!Object.is(o,n)&&typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()},this._subscribe);this._host.dispatchEvent(t)}};function Lc(){return typeof window<"u"}var Y={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},_r=class{constructor(t,{task:n,args:r,autoRun:o=!0}){this._host=t,this._taskFn=n,this._argsFn=r||(()=>[]),this._autoRun=o,this._status=Y.INITIAL,this._value=void 0,this._error=void 0,this._abortController=null,this._prevArgs=null,typeof t.addController=="function"&&t.addController(this)}get status(){return this._status}get value(){return this._value}get error(){return this._error}async run(){this.abort();let t=new AbortController;this._abortController=t;let n=this._argsFn();this._prevArgs=n,this._status=Y.PENDING,this._error=void 0,this._requestHostUpdate();try{let r=await this._taskFn(...n,{signal:t.signal});if(t.signal.aborted)return;this._value=r,this._status=Y.COMPLETE,this._error=void 0}catch(r){if(t.signal.aborted)return;this._error=r,this._status=Y.ERROR,this._value=void 0}finally{this._abortController===t&&(this._abortController=null)}this._requestHostUpdate()}abort(){this._abortController&&(this._abortController.abort(),this._abortController=null)}render(t={}){switch(this._status){case Y.INITIAL:return t.initial?.();case Y.PENDING:return t.pending?.();case Y.COMPLETE:return t.complete?.(this._value);case Y.ERROR:return t.error?.(this._error);default:return}}hostUpdate(){if(!this._autoRun||!Lc())return;let t=this._argsFn();this._argsEqual(this._prevArgs,t)||this.run()}hostUpdated(){}hostConnected(){}hostDisconnected(){this.abort()}_requestHostUpdate(){typeof this._host.requestUpdate=="function"&&this._host.requestUpdate()}_argsEqual(t,n){if(t===null||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}};export{gr as ContextConsumer,br as ContextProvider,en as ContextRequestEvent,Nc as FRAME_CHUNK,Tc as FRAME_END,kc as FRAME_ERROR,E as MARKER,Po as SEED_MISS,Cc as STREAM_CONTENT_TYPE,De as Signal,wa as Suspense,_r as Task,Y as TaskStatus,jt as WebComponent,qn as WebjsFrame,Wn as WebjsStream,Ui as activeActionSignal,rn as adoptStyles,Wi as allTags,_a as asset,$s as asyncAppend,Hs as asyncReplace,Qs as batch,Bs as cache,ei as computed,Aa as connectWS,Ec as consumeStale,Oc as createContext,jc as createFrameDecoder,Ds as createRef,ga as cspNonce,Cs as css,ho as deserialize,Uo as disableClientRouter,ni as effect,or as enableClientRouter,xc as encodeFrame,ks as escapeAttr,Ts as escapeText,Sc as fetchMark,fa as forbidden,Ps as guard,vs as html,ln as isAsyncAppend,un as isAsyncReplace,nn as isCSS,st as isCache,ya as isForbidden,rt as isGuard,nt as isKeyed,Vi as isLazy,an as isLive,ha as isNotFound,ma as isRedirect,ot as isRef,tt as isRepeat,ti as isSignal,Sa as isSuspense,O as isTemplate,cn as isTemplateContent,ba as isUnauthorized,sn as isUnsafeHTML,it as isUntil,at as isWatch,Ms as keyed,Ls as live,Hi as lookup,qi as lookupModuleUrl,wc as markStale,$o as navigate,ua as notFound,gc as optimistic,ue as parse,vc as parseTagHeader,$i as primeModuleUrl,la as prop,pa as redirect,Fs as ref,Dn as register,Ac as registerKeyTags,Ae as render,zn as renderStream,vr as repeat,Ho as revalidate,va as richFetch,Mt as scanSeeds,po as serialize,Ct as setActiveActionSignal,Zs as signal,Bn as stringify,Ns as stylesToString,kt as tagOf,Ra as takeSeed,Is as templateContent,da as unauthorized,Os as unsafeHTML,Us as until,qs as watch};
6
6
  //# sourceMappingURL=webjs-core-browser.js.map