diff --git a/suites-experimental/chat-stream/.gitignore b/suites-experimental/chat-stream/.gitignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/suites-experimental/chat-stream/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/suites-experimental/chat-stream/README.md b/suites-experimental/chat-stream/README.md new file mode 100644 index 000000000..fd89af0b1 --- /dev/null +++ b/suites-experimental/chat-stream/README.md @@ -0,0 +1,143 @@ +# ChatStream + +An LLM chat client: a sidebar of conversations, a message list, and a +composer, with assistant replies streamed in a few tokens at a time and +rendered as Markdown. It is written in Octane (`octane/App.tsrx`, +ChatStream-Octane). The corpus, Markdown parser, network stub and stylesheet +are in `shared/`. + +It is an original app and ships no third-party assets. It is adapted from the +`chat-stream` benchmark in the Octane repository, with Markdown replies, code +highlighting and scroll pinning added. + +## What are we testing + +- Streaming: chunks append to the reply's text, and rendering re-parses the + reply's Markdown. Unchanged blocks keep their identity across parses (the + memoized-Markdown pattern streaming chat UIs use), so `memo` skips all but + the blocks that grew. +- Generated UI. Every streamed reply, and about a third of the others, + contains a ` ```ui ` block: an indented tree of rows, columns, cards, + titles, text, captions, badges, buttons and dividers, the way chat + replies lay out options. Typically a row of option cards, each with a + header row, a details section hidden until its Details button opens it, + and a row of buttons. The block is parsed as it streams, so cards appear + piece by piece, and unchanged subtrees keep their identity across + parses. +- Context reads in memoized components, of the kinds the reply renderer of + a large chat service's web app reads (from its production bundle, + November 2026): + - Layout flow. The reply and every container of a ` ```ui ` block + provide their children a new flow value every time they render: the + direction, whether children are spaced automatically, whether + controls are disabled, the nodes hidden below, and each visible + child's previous sibling. Every block component and every node reads + it and computes its spacing with that renderer's rules for the reply, + a column and a row. So every block component and every node of a + growing ` ```ui ` block re-renders on every chunk, while `memo` skips + the content of all but the blocks that grew. A reply's buttons are + disabled through the flow while it streams, and opening a card's + details changes which sibling the nodes after them are spaced from. + - List layout. A list provides its items' layout (the marker kind), + a new value on every render. Its items read it and the reply's + flow, in which they have no previous sibling and so no spacing. + - The colour scheme, which paragraphs, headings and bold and italic + runs resolve their text colour against, and code reads for its + highlighting. + - Streamed words. Text inside a text component of a reply that is + streaming renders one memoized span per word. Each word reads four + animation contexts (whether the reply is eligible, whether animation + is enabled, the animation mode, and a delay scheduler) and starts + its fade-in from a layout effect with the delay the scheduler gives + it, the way that renderer staggers words. Replies that are complete + when they mount render their text as is. +- Code blocks highlighted into one span per token, the way chat UIs' regex + highlighters produce them. +- Scroll pinning with CSS scroll anchoring: an anchor element after the + messages (the list's only `overflow-anchor: auto` candidate) keeps the + newest text in view as replies grow and conversations switch. The browser + adjusts the scroll position during its own layout, so no script reads + layout after a commit. +- Mounting and unmounting whole conversations, up to 70 messages. +- A controlled composer updated on every keystroke, built the way the + reference chat app's is (measured on its live site, November 2026): + - It owns the draft, so a keystroke re-renders only the composer, not + the app and its transcript. + - The textarea sizes itself to its content in CSS (`field-sizing: + content`, one row of 24 px up to eight), so no script reads layout + while typing. The send button shows once the draft has text. + - ResizeObservers do the rest: once the text wraps, the composer + expands (the textarea over a row of actions), its frame animates to + the content's height, and the composer's height is published to the + app as `--composer-height`, which the transcript, overlaid by the + composer, pads its end by. + - The draft is saved to `localStorage` 250 ms after the last change and + at least once a second while it changes, and restored on load. + - Its state is one signal scope (`octane/composer-state.tsrx`), as the + reference's composer controller is: the draft, focus, the streaming + state and what the ResizeObservers measure, and, derived from them, + the layout, the presentation controls, the submit inputs, whether + the draft can be submitted and what the actions show, under the + reference's names. The textarea's value is bound to the draft + signal, and each of the composer's parts (`octane/Composer.tsrx`) + reads the signals it shows as it renders, so a keystroke re-renders + the parts whose state it changes. Since a component reads signals, + Octane tracks the signal reads of every component's render, in the + transcript too, as on the reference. + +## How are we testing + +All content comes from one fixed seed in `shared/corpus.js`. There is no network, +storage, `Math.random` or `Date.now`, so every run renders the same +conversations and streams the same replies. + +`shared/network.js` stands in for a streaming fetch. Each `window.deliverChunk()` +call hands the open reply its next four tokens, so chunk arrival is +deterministic and needs no timers. It also keeps the stream's virtual clock, +80 ms per chunk, which the word scheduler reads in place of `performance.now()`. + +Each streamed word's fade-in would end with its `animationend` event, after +the step. Instead, once a reply is complete the steps end them all through +`window.finishWordAnimations()`, so that work is measured in the step that +started it and none of it lands in a later step. For the same reason, a step +that types ends by settling the composer's pending draft save and height +transition through `window.flushComposer()`. The suite's `prepare` empties the +composer and the draft an earlier iteration saved +(`window.resetComposer()`), so every iteration starts from the same state. + +The app commits the way the Octane fixture of the chat-stream benchmark in the +Octane repository does. Its event handlers only set state, and the steps commit +it through `window.__benchFlush` after every interaction, as that benchmark's +`run.mjs` does. Each chunk renders with `flushSync`, since a chunk arrives +outside any event. So each send, chunk, conversation click and keystroke is on +screen before the step's next interaction. A step stops delivering chunks once +the reply loses its `streaming` class (see `chatStreamTests` in +`suites-experimental/suites.mjs`). No step yields to the event loop before it +ends, so every browser paints once per step. + +- `StreamReplies`: sends two prompts in turn in the first conversation, + streaming each reply to completion before sending the next. +- `SwitchConversations`: clicks every conversation in the sidebar, then returns + to the first. +- `StreamIntoLongConversation`: streams one reply at the end of the + 70-message conversation. +- `ExpandCards`: opens the details of every card in the 70-message + conversation, one at a time. +- `TypePrompt`: focuses the composer and types a 163-character prompt into + it one character at a time, each with the events a keyboard produces + (keydown, keypress, beforeinput, the edit, input, keyup), laying out each + keystroke, as each gets its own frame when a person types. The prompt wraps, so the composer expands; its + ResizeObservers report that once, when the step's frame is rendered. + +The composer uses `onInput`, which fires for every input event, including the +ones the benchmark dispatches after setting the value from script. + +## Developer Documentation + +The app is built with Vite. It can be previewed during development with +`npm run dev`. To update the files run in the harness, run `npm run build`, +which regenerates the committed `dist/octane` directory and its +`resources.txt`. + +The built workload can be loaded within the harness at e.g. +`http://localhost:8080/?developerMode&suites=ChatStream-Octane`. diff --git a/suites-experimental/chat-stream/dist/octane/assets/index-Bc9c2QKQ.css b/suites-experimental/chat-stream/dist/octane/assets/index-Bc9c2QKQ.css new file mode 100644 index 000000000..33b5cea00 --- /dev/null +++ b/suites-experimental/chat-stream/dist/octane/assets/index-Bc9c2QKQ.css @@ -0,0 +1 @@ +*{box-sizing:border-box}html,body{height:100%;margin:0}body{color:#1d2125;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.55}#root{height:100vh}button{font:inherit;color:inherit;cursor:pointer}.app{grid-template-columns:260px 1fr;height:100vh;display:grid;overflow:hidden}.sidebar{background-color:#f5f6f8;border-right:1px solid #e4e7eb;flex-direction:column;min-height:0;padding:12px 8px;display:flex}.sidebar-heading{letter-spacing:.04em;text-transform:uppercase;color:#6b7380;margin:4px 10px 8px;font-size:12px;font-weight:600}.conversation-list{flex-direction:column;gap:2px;display:flex;overflow-y:auto}.conversation-item{text-align:left;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;border-radius:6px;width:100%;padding:7px 10px;display:block;overflow:hidden}.conversation-item:hover{background-color:#e9ebef}.conversation-item.active{background-color:#e1e5eb;font-weight:600}.chat{flex-direction:column;min-width:0;min-height:0;display:flex;position:relative}.chat-header{border-bottom:1px solid #eef0f3;align-items:center;height:52px;padding:0 24px;display:flex}.chat-header h1{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:16px;font-weight:600;overflow:hidden}.chat-header .message-count{color:#6b7380;margin-left:auto;font-size:13px}.messages{flex:1;min-height:0;overflow-y:auto}.messages-inner{max-width:760px;padding:16px 24px calc(var(--composer-height,110px) + 16px);overflow-anchor:none;margin:0 auto}.scroll-anchor{overflow-anchor:auto;height:1px}.message{gap:14px;padding:14px 0;display:flex}.avatar{color:#fff;border-radius:50%;flex:none;justify-content:center;align-items:center;width:30px;height:30px;font-size:11px;font-weight:700;display:inline-flex}.message.user .avatar{background-color:#5b6b7f}.message.assistant .avatar{background-color:#c2662d}.message-body{flex:1;min-width:0}.message-author{margin-bottom:2px;font-weight:600}.user-text{white-space:pre-wrap;margin:0}.message.streaming .markdown>:last-child:after{vertical-align:text-bottom;content:"";background-color:currentColor;width:8px;height:1em;margin-left:2px;display:inline-block}.thinking{color:#6b7380}.message-actions{gap:4px;margin-top:6px;display:flex}.message-actions button{color:#6b7380;background:0 0;border:1px solid #0000;border-radius:4px;padding:2px 8px;font-size:12px}.message-actions button:hover{border-color:#dfe3e8}.markdown p,.markdown ul,.markdown ol,.markdown li,.markdown h3{margin:0}.markdown p,.markdown h3,.markdown strong,.markdown em{color:var(--text-color,inherit)}.markdown ul,.markdown ol{padding-left:24px}.markdown .native-bullet{list-style-type:disc}.markdown .native-number{list-style-type:decimal}.markdown h3{font-size:16px}.markdown .gap-0{margin-top:0}.markdown .gap-2{margin-top:2px}.markdown .gap-4{margin-top:4px}.markdown .gap-6{margin-top:6px}.markdown .gap-8{margin-top:8px}.markdown .gap-12{margin-top:12px}.markdown .gap-16{margin-top:16px}.markdown .gap-24{margin-top:24px}.markdown .inline-0{margin-left:0}.markdown .inline-2{margin-left:2px}.markdown .inline-6{margin-left:6px}.markdown .inline-8{margin-left:8px}.markdown .inline-12{margin-left:12px}.ui-col,.ui-details,.ui-card{flex-direction:column;align-items:stretch;min-width:0;display:flex}.ui-row{flex-direction:row;align-items:flex-start;min-width:0;display:flex}.ui-row.fixed-gap{flex-wrap:wrap;gap:6px}.ui-row>.ui-card{flex:1 1 0}.ui-card{border:1px solid #e1e5eb;border-radius:10px;padding:12px 14px}.ui-card.scheme-light{background-color:#fbfcfd}.ui-card.scheme-dark{background-color:#23272e}.ui-title,.ui-text,.ui-caption{color:var(--text-color,inherit)}.ui-title{font-weight:600}.ui-caption{font-size:13px}.ui-badge{white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:12px}.ui-badge.scheme-light{color:#6b4a1f;background-color:#f6eadb}.ui-badge.scheme-dark{color:#f6eadb;background-color:#4a3a26}.ui-button{border:1px solid #0000;border-radius:6px;padding:4px 10px;font-size:13px}.ui-button.primary{color:#fff;background-color:#c2662d;font-weight:600}.ui-button.ghost{color:inherit;background:0 0;border-color:#d8dde3}.ui-button:disabled{cursor:default;opacity:.5}.ui-divider{border:0;border-top:1px solid #e1e5eb;width:100%;margin-bottom:0}@keyframes word-fade-in{0%{opacity:0}to{opacity:1}}.word{animation:word-fade-in var(--word-duration) ease-out var(--word-delay) both}.inline-code{border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em}.inline-code.scheme-light{background-color:#f0f2f5}.inline-code.scheme-dark{background-color:#2a2f37}.code-block{background-color:#1f2329;border-radius:8px;margin:0;overflow:hidden}.code-header{color:#aeb6c2;background-color:#2a2f37;justify-content:space-between;align-items:center;padding:4px 12px;font-size:12px;display:flex}.code-header button{color:inherit;background:0 0;border:0;padding:2px 6px;font-size:12px}.code-block pre{color:#e6e9ee;margin:0;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.5;overflow-x:auto}.code-block .line{white-space:pre;min-height:1.5em;display:block}.scheme-light .tok-keyword{color:#c792ea}.scheme-light .tok-function{color:#82aaff}.scheme-light .tok-string{color:#c3e88d}.scheme-light .tok-number{color:#f78c6c}.scheme-light .tok-comment{color:#7f8794;font-style:italic}.scheme-light .tok-punctuation{color:#89ddff}.composer{background:linear-gradient(#fff0,#fff 12px);padding:12px 24px 20px;position:absolute;bottom:0;left:0;right:0}.composer-box{background-color:#fff;border:1px solid #d8dde3;border-radius:24px;max-width:712px;margin:0 auto;padding:8px 8px 8px 14px;box-shadow:0 1px 3px #0000000f}.composer-box[data-expanded]{border-radius:16px}.composer-frame{height:var(--frame-height,auto);transition:height .15s ease-out;overflow:hidden}.composer-content{align-items:flex-end;gap:8px;display:flex}.composer-box[data-expanded] .composer-content{flex-direction:column;align-items:stretch}.composer-actions{justify-content:flex-end;display:flex}.prompt{min-height:24px;max-height:192px;font:inherit;field-sizing:content;resize:none;border:0;outline:none;flex:1;padding:0;line-height:24px;overflow-y:auto}.composer-box:not([data-has-text]) .send{display:none}.send{color:#fff;background-color:#c2662d;border:0;border-radius:8px;padding:6px 14px;font-weight:600}.send:disabled{cursor:default;opacity:.4}.composer-hint{color:#8a929e;text-align:center;max-width:712px;margin:6px auto 0;font-size:12px} diff --git a/suites-experimental/chat-stream/dist/octane/assets/index-Bv9zuDbY.js b/suites-experimental/chat-stream/dist/octane/assets/index-Bv9zuDbY.js new file mode 100644 index 000000000..c66fea174 --- /dev/null +++ b/suites-experimental/chat-stream/dist/octane/assets/index-Bv9zuDbY.js @@ -0,0 +1,17 @@ +function e(e){return`Minified Octane error #${e}; visit https://octanejs.dev/errors/${e} for the full message or use a development build for full errors and additional helpful warnings.`}var t=`data-octane-input`,n=new WeakMap;function r(e,t,r){let i=n.get(e),a=i?.get(t)??0,o=r?2:1;return(a&o)!==0&&((a&~o)===0?i.delete(t):i.set(t,a&~o),!0)}function i(e){n.delete(e)}var a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakSet;function u(e){return typeof e==`object`&&!!e&&`documentOwner`in e}function d(e){return u(e)?e.instanceOwner:e}function f(e,t,n){return JSON.stringify([e,t,n])}function p(e,t){a.set(d(e),t),u(e)&&a.set(e.documentOwner,t)}function m(e){let t=e.getAttribute(`data-octane-signal-control`);if(t===null)return null;try{let e=JSON.parse(t);if(!Array.isArray(e)||e.length!==3||e[0]!==1||typeof e[1]!=`string`||!Array.isArray(e[2]))return null;let n=[];for(let t of e[2]){if(!Array.isArray(t)||t.length!==3||typeof t[0]!=`string`||typeof t[1]!=`string`||t[2]!==`value`&&t[2]!==`checked`)return null;n.push(t)}return{ownerKey:e[1],bindings:n}}catch{return null}}function h(e,t){return t===`checked`?e.checked:e.localName===`select`&&e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value}function g(e,t){let n=m(e);if(n!==null){let r=o.get(e.ownerDocument);r===void 0&&o.set(e.ownerDocument,r=new Map);for(let[i,a,o]of n.bindings){let s=f(n.ownerKey,i,a),c=r.get(s);(l.has(e.ownerDocument)||c===void 0||t>=c.revision)&&r.set(s,{revision:t,value:h(e,o)})}}let r=s.get(e);if(r!==void 0)for(let[t,n]of r)n(h(e,t))}function _(e,t,n){let r=s.get(e);return r===void 0&&s.set(e,r=new Map),r.set(t,n),()=>{r.get(t)===n&&(r.delete(t),r.size===0&&s.delete(e))}}function v(e){return ee(),c.get(e)??0}function y(e){c.delete(e)}function b(e){ee(),l.add(e)}function x(e,t){l.has(e.ownerDocument)||(c.set(e,t),g(e,t))}function ee(){if(typeof globalThis>`u`)return;let e=globalThis;e.__octanePublishSignalControl=x;let t=e.__octaneEarlySignalControls;if(t!==void 0){t.p=x;let e=t.q.splice(0);for(let[t,n]of e)x(t,n)}}var S=new WeakSet;function C([e,t,n,r,i,a,,,o],s){return!o&&e.target===t&&t.isConnected&&n.isConnected&&t.ownerDocument===s&&n.ownerDocument===s&&t.closest(`[data-octane-hydrate-independent]`)===n&&n.getAttribute(`data-octane-hydrate-id`)===r&&n.getAttribute(`data-octane-hydrate-when`)===i&&n.getAttribute(`data-octane-hydrate-interaction-events`)===a}function w(e){return e!==null&&e.nodeType===1}var T=new WeakMap;function E(e){if(!w(e))return null;let t=e.localName;return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?e:null}function te(e){let t=T.get(e);if(t===void 0){let n=v(e);t={editRevision:n,selectionRevision:0,revision:n,composing:!1},T.set(e,t)}return t}function ne(e){let t=E(e.target);if(t===null)return;let n=te(t);switch(e.type){case`input`:n.editRevision++,n.revision++,g(t,n.revision);break;case`compositionstart`:n.composing=!0,n.revision++;break;case`compositionupdate`:n.revision++;break;case`compositionend`:n.composing=!1,n.revision++;break;case`focusin`:case`focusout`:n.revision++}}function re(e){let t=e.currentTarget,n=E(t.activeElement);if(n===null)return;let r=te(n);r.selectionRevision++,r.revision++}function ie(e){if(E(e)===null)return null;let t=T.get(e),n=t===void 0?v(e):0,r=e,i,a,o,s=null,c=null,l=null;if(e.localName===`select`){let e=r;i=e.value,e.multiple&&(o=Array.from(e.selectedOptions,e=>e.value))}else if(e.isContentEditable)i=e.textContent??``;else{i=r.value,e.localName===`input`&&(a=r.checked);try{s=r.selectionStart,c=r.selectionEnd,l=r.selectionDirection}catch{}}return{editRevision:t?.editRevision??n,selectionRevision:t?.selectionRevision??0,revision:t?.revision??n,value:i,...a===void 0?{}:{checked:a},...o===void 0?{}:{selectedValues:o},selectionStart:s,selectionEnd:c,selectionDirection:l,focused:e.ownerDocument.activeElement===e,composing:t?.composing??!1}}function ae(e,t){if(e.localName!==`textarea`||typeof t!=`string`||T.get(e)?.composing===!0)return!1;let n=e,r=n.defaultValue.replace(/\r\n?/g,` +`);return t.replace(/\r\n?/g,` +`)===r&&n.value!==r}function oe(e,t){se(e.ownerDocument);let n=te(e);return n.revision===t&&(n.editRevision=0,n.selectionRevision=0,y(e),!0)}function se(e){let t=e??(typeof document>`u`?void 0:document);if(t===void 0||S.has(t))return;S.add(t);let n=t.__octaneEarlyHydrationIntents,r=typeof n?.stop==`function`?t.defaultView??t:t,i=r===t?ne:e=>{e.target?.ownerDocument===t&&ne(e)};for(let e of[`input`,`compositionstart`,`compositionupdate`,`compositionend`,`focusin`,`focusout`])r.addEventListener(e,i,!0);t.addEventListener(`selectionchange`,re,!0),b(t);for(let e of n?.q??[]){let[n]=e,r=E(n.target);r!==null&&C(e,t)&&(n.type===`input`&&v(r)>0||ne(n))}}function ce(e){if(typeof e==`string`)return e;if(typeof e!=`object`)return typeof e==`number`&&e?``+e:``;if(e===null)return``;let t=``;if(Array.isArray(e))for(let n=0;n32&&t<127&&t!==74&&t!==106?e:le.test(e)?ue:e}function pe(e,t){return e=e===void 0?void 0:e.toLowerCase(),e!==void 0&&e.includes(`-`)&&!de.has(e)?!1:(t=t.toLowerCase(),t===`src`||t===`href`||t===`action`||t===`formaction`||t===`xlink:href`||t===`xlinkhref`||t===`data`&&e===`object`)}function me(e,t,n){return pe(e,t)?fe(n):n}var he=`https://octanejs.dev/errors/`,ge=/[\uD800-\uDFFF]/gu;function _e(e){return encodeURIComponent(String(e).replace(ge,`�`))}function ve(e,t){let n=he+e;for(let e=0;etypeof e!=`string`))return Ee();let r=[];for(let i of n.sort()){let n=Object.getOwnPropertyDescriptor(e,i);if(!n.enumerable||!(`value`in n))return Ee();r.push([i,De(n.value,t)])}return[`object`,r]}finally{t.delete(e)}}function Oe(e,t=new Set){if(e==null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:Ee();if(typeof e!=`object`||t.has(e))return Ee();let n=Object.getPrototypeOf(e);if(!Array.isArray(e)&&n!==Object.prototype&&n!==null)return Ee();t.add(e);try{let n=Reflect.ownKeys(e);if(Array.isArray(e)){if(n.length!==e.length+1)return Ee();let r=[];for(let n=0;ntypeof e!=`string`))return Ee();let r={};for(let i of n.sort()){let n=Object.getOwnPropertyDescriptor(e,i);if(!n.enumerable||!(`value`in n))return Ee();Object.defineProperty(r,i,{value:Oe(n.value,t),enumerable:!0})}return Object.freeze(r)}finally{t.delete(e)}}function ke(e){if(!Array.isArray(e))return Ee();let[t,n]=e;switch(t){case`undefined`:return e.length===1?void 0:Ee();case`null`:return e.length===1?null:Ee();case`boolean`:return e.length!==2||typeof n!=`boolean`?Ee():n;case`number`:return e.length===2?n===`-0`?-0:typeof n!=`number`||!Number.isFinite(n)||Object.is(n,-0)?Ee():n:Ee();case`string`:return e.length!==2||typeof n!=`string`?Ee():n;case`array`:return e.length!==2||!Array.isArray(n)?Ee():Object.freeze(n.map(e=>ke(e)));case`object`:{if(e.length!==2||!Array.isArray(n))return Ee();let t={},r;for(let e of n){if(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`||r!==void 0&&e[0]<=r)return Ee();r=e[0],Object.defineProperty(t,e[0],{value:ke(e[1]),enumerable:!0})}return Object.freeze(t)}default:return Ee()}}var Ae=new Set;for(let e of`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.boxFlex.boxFlexGroup.boxOrdinalGroup.columnCount.columns.flex.flexGrow.flexPositive.flexShrink.flexNegative.flexOrder.gridArea.gridRow.gridRowEnd.gridRowSpan.gridRowStart.gridColumn.gridColumnEnd.gridColumnSpan.gridColumnStart.fontWeight.lineClamp.lineHeight.opacity.order.orphans.scale.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth`.split(`.`)){let t=e.toLowerCase();Ae.add(t),Ae.add(`webkit`+t),Ae.add(`ms`+t),Ae.add(`moz`+t),Ae.add(`o`+t)}var je=new Map;function Me(e){let t=je.get(e);if(t!==void 0)return t;let n=Ae.has(e.replaceAll(`-`,``).toLowerCase());return je.set(e,n),n}function Ne(e,t){return typeof t==`number`&&t!==0&&e.charCodeAt(0)!==45&&!Me(e)?t+`px`:typeof t==`string`?t.trim():``+t}function Pe(e){if(e===`cssFloat`)return`float`;if(e.charCodeAt(0)===45)return e;let t=!1;for(let n=0;n=65&&r<=90){t=!0;break}}if(!t)return e;let n=``;for(let t=0;t=65&&r<=90?`-`+String.fromCharCode(r+32):e[t]}return n.charCodeAt(0)===109&&n.charCodeAt(1)===115&&n.charCodeAt(2)===45&&(n=`-`+n),n}var Fe=null,Ie,Le={active:!1},Re=!1;function ze(){return Fe??Ie?.()??null}function Be(){return Fe}function Ve(t){if(typeof t!=`function`)throw TypeError(e(190));let n=Ie;return Ie=t,()=>{Ie===t&&(Ie=n)}}function He(t,n){if(typeof n!=`function`)throw TypeError(e(191));return Re=!0,Ue(t,n)}function Ue(e,t){let n=Fe;Fe=e,Le.active=!0;try{return t()}finally{Fe=n}}function We(e){let t=Fe;return Fe=e,Re=!0,Le.active=!0,t}function Ge(e){Fe=e}var Ke=Symbol(`octane.signalDependent`),qe=Symbol(`octane.transitionConsumer`);function Je(e,t){let n=e[qe];return n!==void 0&&(t[qe]=n),t}var Ye=0;function Xe(e){let t=Ye;return Ye=e,t}var Ze=null,Qe=!1,$e=Symbol(`octane.nativeDomValue`);function et(e){return typeof e==`object`&&e&&$e in e?e[$e]():e}function tt(e){if(e=et(e),typeof e!=`object`||!e)return e;let t=Object.create(null);for(let n in e)t[n]=et(e[n]);return t}var nt,rt=null,it=!1;function at(){it=!0}var ot=Symbol(`octane.nativeAdoptionMiss`);function st(e){return e?.[ot]===!0}var ct;function lt(e,t,n){return new ct(e,t,n)}function ut(){return rt}function dt(e){let t=rt;return rt=e,t}var ft=null,pt=null;function mt(e){pt=e}function ht(){let e=pt;return e?.startBatch(),e}function gt(e){e?.endBatch()}function _t(e){let t=ht();try{return e()}finally{gt(t)}}var vt=!1;function yt(e,t){Ze?.(e,t)}function bt(){return Ze}function xt(e){let t=Ze;return Ze=e,t}function St(){let e=Qe;return Qe=!0,e}function Ct(e){Qe=e}function wt(){return Qe}var Tt=globalThis[Symbol.for(`octane.contextEpoch`)]??={value:0};function Et(){Tt.value++}var Dt=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),Ot=new Set([`allowfullscreen`,`async`,`autoplay`,`controls`,`credentialless`,`default`,`defer`,`disabled`,`disablepictureinpicture`,`disableremoteplayback`,`formnovalidate`,`hidden`,`inert`,`itemscope`,`loop`,`nomodule`,`novalidate`,`open`,`playsinline`,`readonly`,`required`,`reversed`,`scoped`,`seamless`]),kt=new Set([`size`,`cols`,`rows`,`span`]),At=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),jt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`],[`xlinkActuate`,`xlink:actuate`],[`xlinkArcrole`,`xlink:arcrole`],[`xlinkHref`,`xlink:href`],[`xlinkRole`,`xlink:role`],[`xlinkShow`,`xlink:show`],[`xlinkTitle`,`xlink:title`],[`xlinkType`,`xlink:type`],[`xmlBase`,`xml:base`],[`xmlLang`,`xml:lang`],[`xmlSpace`,`xml:space`],[`tabIndex`,`tabindex`]]);function Mt(e){switch(e.length){case 10:return e.toLowerCase()===`spellcheck`;case 9:return e.toLowerCase()===`draggable`;case 15:return e.toLowerCase()===`contenteditable`}return!1}var Nt=Dt,Pt=Ot,Ft=kt,It=/^[^\s"'>\/=\u0000-\u001F]+$/,Lt=At,Rt=jt,zt=Mt,Bt=Ne,Vt=`Abort AnimationEnd AnimationIteration AnimationStart AuxClick BeforeInput BeforeToggle Blur Cancel CanPlay CanPlayThrough Change Click Close CompositionEnd CompositionStart CompositionUpdate ContextMenu Copy Cut DoubleClick Drag DragEnd DragEnter DragExit DragLeave DragOver DragStart Drop DurationChange Emptied Encrypted Ended Error Focus GotPointerCapture Input Invalid KeyDown KeyPress KeyUp Load LoadedData LoadedMetadata LoadStart LostPointerCapture MouseDown MouseEnter MouseLeave MouseMove MouseOut MouseOver MouseUp Paste Pause Play Playing PointerCancel PointerDown PointerEnter PointerLeave PointerMove PointerOut PointerOver PointerUp Progress RateChange Reset Resize Scroll ScrollEnd Seeked Seeking Select Stalled Submit Suspend TimeUpdate Toggle TouchCancel TouchEnd TouchMove TouchStart TransitionCancel TransitionEnd TransitionRun TransitionStart VolumeChange Waiting Wheel`,Ht;function Ut(e){if(Ht===void 0){Ht=new Set;for(let e of Vt.split(` `))Ht.add(`on`+e),Ht.add(`on`+e+`Capture`)}return Ht.has(e)}var Wt=`abort.beforetoggle.cancel.canplay.canplaythrough.close.durationchange.emptied.encrypted.ended.error.load.loadeddata.loadedmetadata.loadstart.pause.play.playing.progress.ratechange.resize.seeked.seeking.stalled.suspend.timeupdate.toggle.volumechange.waiting`.split(`.`),Gt=new Set([`focus`,`blur`,`invalid`,`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`,...Wt]),Kt=new Set([`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`]),qt=new Set(`auxclick.beforeblur.beforeinput.blur.cancel.change.click.close.compositionend.compositionstart.compositionupdate.contextmenu.copy.cut.dblclick.dragend.dragstart.drop.focus.focusin.focusout.fullscreenchange.gotpointercapture.hashchange.input.invalid.keydown.keypress.keyup.lostpointercapture.mousedown.mouseup.paste.pause.play.pointercancel.pointerdown.pointerup.popstate.ratechange.reset.resize.seeked.select.selectionchange.selectstart.submit.textInput.touchcancel.touchend.touchstart.volumechange`.split(`.`)),Jt=[`input`,`change`,`click`],Yt=new Set(Jt);function Xt(e){return(Gt.has(e)?4:0)|(Kt.has(e)?8:0)|(qt.has(e)?16:0)|(Yt.has(e)?32:0)|(e===`click`||e===`dblclick`||e===`mousedown`||e===`mousemove`||e===`mouseup`?64:0)|(e===`mouseenter`?128:0)|(e===`invalid`||Wt.includes(e)?256:0)}var Zt=Object.prototype.hasOwnProperty;function Qt(e){let t=globalThis.scheduler;if(typeof t?.postTask==`function`)t.postTask(e);else if(typeof MessageChannel==`function`){let t=new MessageChannel;t.port1.onmessage=()=>{t.port1.close(),e()},t.port2.postMessage(null)}else setTimeout(e,0)}function $t(e){if(typeof e!=`object`||!e)return null;let t=typeof Symbol==`function`&&e[Symbol.iterator]||e[`@@iterator`];return typeof t==`function`?t:null}function en(e,t){if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`bigint`)return``+e;let n;if(Array.isArray(e))n=e;else{let r=$t(e);if(r===null)return t(e);n={[Symbol.iterator]:()=>r.call(e)}}let r=``;for(let e of n)r+=en(e,t);return r}function tn(e,t){return t(e)?`an element`:typeof e==`object`?`an object`:`a `+typeof e}var nn=Symbol.for(`octane.flags.component`);function rn(e,t){return typeof e==`function`&&Zt.call(e,nn)&&(e[nn]&t)===t}var an=`[b;`,on=`;b;`,sn=`[f0`+on;``+on,sn.length,an.length;var cn=Symbol.for(`octane.element`),ln=Symbol.for(`octane.portal`),un=Symbol.for(`octane.context`),dn=Symbol.for(`octane.childrenBlock`),fn=Symbol.for(`react.context`);function pn(e,t,n,r,i){let a=xn(e);if(a!==null&&t.isConnected===!0&&e.ownerDocument===t.ownerDocument&&!(i&&Sn(t,r))){a.call(e,t,n);return}if(!Sn(t,r)||!yn(t,e)||n!==null&&!yn(n,e)){e.insertBefore(t,n);return}if(t===n||bn(t)===n)return;let o=n===null||!!(_n(t).compareDocumentPosition.call(t,n)&4),s=[];for(let e=o?bn(t):n;e!==null&&e!==(o?n:t);e=bn(e))s.push(e);let c=a??e.insertBefore,l=t;for(let n=0;n{t!==null&&e(t,n,a);for(let e=i;e=0&&u(n.contextToken,!0),n.contextToken=-1,t&&i!==null?{reads:i,mixed:n.mixed}:null},replay(e){if(e!=null)for(let[t,n]of e.reads)c(t,n)}}}function En(e){if(e==null)return!0;if(e.mixed)return!1;for(let[t,n]of e.reads)if(t.getVersion()!==n)return!1;return!0}var Dn=Symbol();function On(){}function kn(t){let n=new WeakMap,r=new WeakMap,i=[],a=0,o=0,s=null,c=null,l=null,u=null;function d(e){let t=l?.get(e);if(t===void 0)return;l.delete(e);let n=u?.get(t.owner);n?.delete(e),n?.size===0&&u.delete(t.owner)}function f(e){if(!e.active)return;e.active=!1;let t=e.consumer;t.pending.delete(e);for(let n of e.reads.keys()){let e=t.subscriptions.get(n);e!==void 0&&--e.leases===0&&(e.dispose(),t.subscriptions.delete(n))}e.reads.clear()}function p(e){if(!e.disposed){e.disposed=!0,e.committed!==null&&f(e.committed),e.committed=null;for(let t of e.pending)f(t);e.pending.clear();for(let t of e.subscriptions.values())t.dispose();e.subscriptions.clear(),n.delete(e.scope)}}function m(e,r){let i=n.get(e);if(i===void 0){i={scope:e,block:r,disposed:!1,notify:()=>{!i.disposed&&!i.block.disposed&&t.schedule(i.block)},subscriptions:new Map,committed:null,pending:new Set},n.set(e,i);let a=i,o=a.notify;o[Dn]=a,o[qe]=r,t.cleanup(e,()=>p(a))}return i}function h(e,t){let n=e.candidates??=new Map,r=n.get(t);if(r===void 0){let i=m(t,e.block);r={consumer:i,reads:new Map,mixed:!1,active:!0},i.pending.add(r),n.set(t,r)}return r}let g=Tn((e,t,n)=>{let r=i[a-1];if(r===void 0||r.block===null)return;let o=h(r,e),s=o.reads.get(t);if(s!==void 0){s!==n&&(o.mixed=!0);return}o.reads.set(t,n);let c=o.consumer,l=c.subscriptions.get(t);if(l===void 0){let e={leases:1,dispose:On};c.subscriptions.set(t,e),e.dispose=t.subscribe(c.notify)}else l.leases++});function _(e,t){let n=t.consumer,r=e.get(n);r!==void 0&&r!==t&&f(r),e.set(n,t)}function v(e){let t=r.get(e);return t===void 0&&r.set(e,t=new Map),t}function y(e){if(e!=null){for(let t of e.values())if(t.active&&!t.consumer.disposed&&!En(t))return!1}return!0}function b(e){if(e!=null){for(let t of e.values()){let e=t.consumer;if(!t.active||e.disposed)continue;let n=e.committed;e.pending.delete(t),e.committed=t,n!==null&&f(n)}e.clear()}}return{inspectScope:void 0,stampPublication(e,t){let n={owner:e,generation:e.generation};(c??=new WeakMap).set(e,n);let r=s??=new WeakMap;for(let e of t)for(let t of e)r.set(t,n)},hasPublication(e){return c?.has(e)===!0},stampQueuedPublication(e,t){let n=c?.get(e);n!==void 0&&s.set(t,n)},publicationCurrent(e){let t=s?.get(e);return t===void 0||!t.owner.disposed&&t.owner.generation===t.generation},deferRef(e,t,n){let r=s?.get(e);if(r===void 0||r.owner.disposed)return;d(t);let i=r.owner;(l??=new WeakMap).set(t,{owner:i,entry:e,ref:n});let a=u??=new WeakMap,o=a.get(i);o===void 0&&a.set(i,o=new Map),o.set(t,e)},unpublishedRef(e,t){let n=l?.get(e);return n!==void 0&&n.ref===t},forgetUnpublishedRef:d,deferredRefEntries(e){return u?.get(e)},clearDeferredRefs(e){c?.delete(e);let t=u?.get(e);if(t!==void 0)for(let e of t.keys())d(e)},pruneDeferredRefs(e){let n=u?.get(e);if(n!==void 0)for(let[e,r]of n)t.refDisposed(r)&&d(e)},replayDeferredRefs:t.replayRefs,beginRender(e){let r=Xe(++o),s=i[a++]??={block:null,collectorToken:-1,candidates:null,invocationData:null,invocation:0,capture:null,outerInvocation:0};s.block=e,s.collectorToken=-1,s.candidates=null,s.invocationData=null,s.invocation=o,s.outerInvocation=r,s.collectorToken=g.beginRender(e),s.capture=t.capture(),n.has(e)&&h(s,e)},endRender(n,r,o){let s=a-1;for(;s>=0&&i[s].block!==n;)s--;if(s<0)return;let c=i[s];try{for(let e=a-1;e>s;e--){let t=i[e].candidates;if(t!==null)for(let e of t.values())f(e)}if(c.candidates!==null){if(r){let n=t.capture();if(n===null)throw Error(e(167));let r=v(n);for(let e of c.candidates.values())_(r,e)}else for(let e of c.candidates.values())o&&e.active&&t.suspended(n,e),f(e)}}finally{for(g.endRender(c.collectorToken),Xe(c.outerInvocation);a>s;){let e=i[--a];e.block=null,e.candidates=null,e.invocationData=null,e.capture=null}}},invocation(e){let t=i[a-1];return t!==void 0&&t.block===e?t:void 0},enclosingInvocation(e){for(let t=a-1;t>=0;t--){let n=i[t];if(n.invocation<=e)return n.invocation===e&&n.block!==null?n:void 0}},beginScope(r,o){if(g.isDetached())return g.beginScope(r);if(t.capture()===null)throw Error(e(168));(a===0||i[a-1].block!==o)&&this.beginRender(o);let s=i[a-1];return r!==o&&n.has(r)&&h(s,r),g.beginScope(r)},endScope(e){g.endScope(e)},pauseLifecycle(){return g.suspend(!0)},resumeLifecycle(e){g.resume(e,!0)},beginWitness:g.beginWitness,finishWitness:g.finishWitness,replay:g.replay,validateCapture(e){return y(r.get(e))},acceptCapture(e){let t=r.get(e),n=t!==void 0&&t.size>0;return r.delete(e),b(t),n},spliceCapture(t,n){let i=r.get(t);if(i===void 0)return;if(n===null)throw Error(e(169));r.delete(t);let a=v(n);for(let e of i.values())_(a,e)},discardCapture(e){let t=r.get(e);if(t!==void 0){r.delete(e);for(let e of t.values())f(e);t.clear()}}}}function An(e){let t=new Map,n=0;return{inspect:void 0,get generation(){return n},track(n){let r=n.mixed;for(let[i,a]of n.reads)t.has(i)||t.set(i,i.subscribe(e)),i.getVersion()!==a&&(r=!0);r&&e()},clear(){n++;for(let e of t.values())e();t.clear()}}}var O;function jn(e){O=e}var Mn,Nn,Pn;function Fn(e){Pn??=e}function In(e){Nn=e?Mn:void 0}var Ln=0;function Rn(e){Ln++;try{return e()}finally{Ln--}}var zn=class extends TypeError{},Bn={defer:!1,resource:void 0,derived:void 0},Vn=null;function Hn(e){let t=Vn?.get(e);if(t!==void 0)return t.depth++,t;let n=ht();if(n===null)return null;let r={hooks:n,depth:1,closed:!1};return(Vn??=new WeakMap).set(e,r),r}function Un(e,t){if(t.closed)return;t.closed=!0,Vn?.get(e)===t&&Vn.delete(e);let n=t.hooks;t.hooks=null,gt(n)}function Wn(e,t,n,r){if(t===null||t.closed||--t.depth!==0)return;if(!n){Un(e,t);return}let i=()=>{if(!(t.depth!==0||t.closed))try{Un(e,t)}catch(e){r(e)}};e.isTrusted?setTimeout(i,0):queueMicrotask(i)}var Gn=new WeakMap,Kn=!1,k=!1,qn;function Jn(t){let n=t.nodeType===9?t:t.ownerDocument;if(n===null)throw TypeError(e(123));let r=Gn.get(n);return r===void 0&&(r=Object.freeze({scopeKey:`octane:document`}),Gn.set(n,r)),p(r,n),r}function Yn(t=1){if(t!==1)throw TypeError(e(74));k=!0,Le.active=!0,Kn||(Kn=!0,qn={enter:We,restore:Ge},Ve(()=>typeof document>`u`?null:Jn(document)))}var Xn=Symbol.for(`octane.signal-handle`),Zn=Symbol.for(`octane.signal-binding-read`),Qn=Symbol.for(`octane.signal-binding-subscribe`),$n=Symbol.for(`octane.signal-binding-identity`),er=Symbol.for(`octane.signal-binding-retired`),tr=new Map;function nr(e){let t=tr.get(e);if(t!==void 0)return t;let n=Pe(e);return tr.set(e,n),n}var rr=!1;function ir(){rr=!0}var ar=!1;function or(){ar=!0}var sr=N,cr=N,lr=Ri,ur=null,dr=null,A=null,fr=null,pr=0,mr=0,hr=0,gr=0,_r=0,vr=!1,yr=[];function br(e){yr.push(A,fr,pr,mr,gr,_r),e.log===null&&(e.log=[],e.bags=new Map,e.bagWindow=++hr),A=e.log,fr=e.bags,pr=0,mr=e.bagWindow,gr=1,_r=0}function xr(){let e=yr;e.length!==0&&(_r=e.pop(),gr=e.pop(),mr=e.pop(),pr=e.pop(),fr=e.pop(),A=e.pop())}function Sr(e){let t=vr;return vr=e,t}var Cr=N,wr=()=>null,Tr=N,Er=N,Dr=N,Or=N,kr=!1;function Ar(){kr=!0,ar=!0,wr=Os,Tr=ks,Er=es,Dr=Ms,Or=ms}var j=null,jr=e=>e,M=null,Mr=N,Nr=N,Pr=null;function Fr(e){Pr=e}var Ir=null,Lr=null,Rr=N,zr=()=>!1,Br=N,Vr=!1;function Hr(e=1,t=!1){if(e!==1)throw TypeError(D(74));Vr=!0,Le.active=!0,Ir=Hd,Lr=Pd,t||Yn(e)}function Ur(){return j||(ir(),ur??={queue:Yc,adopt:To,upgrade:Co},j=kn({capture:()=>U,cleanup:Hs,schedule:ta,suspended:Mi,replayRefs:(e,t)=>ji(e,t),refDisposed:e=>Ki(e.block)}),j)}function Wr(e,t,n){sr===N&&(ar=!0,sr=Ko,cr=_h,lr=qg),Kr?.(e.block,n);let r=H,i={ref:t,el:n,block:e.block,op:r===null?Ka:r.ops.length};if((U===null?oo:U.refs).push(i),U===null&&j){let t=e.block.idState.renderOwner;t!==void 0&&j.stampQueuedPublication(t,i)}}var Gr=0,Kr=null,qr=null;function N(){}function Jr(e,t){Mr===N&&(ar=!0,Mr=my),e.push(t),H!==null&&Ya(()=>{let n=e.lastIndexOf(t);n!==-1&&e.splice(n,1)})}function Yr(e){let t=Xv(e);return t===void 0&&(M??={begin:Lv,delivery:Iv,enqueue:by,finish:Mv,restore:vy},t={v:Nv,c:-1,sv:null,sawV:!1,sawC:!1,sawDC:!1,dvv:Nv,composing:!1,compositionEndTask:void 0,queued:!1,formSeen:!1,formMultiple:!1,formChildren:!1},e.$$ctrl=t,Y_(Jt)),t}var Xr=null,Zr=new WeakMap;function Qr(e){let t=e;for(;t!==null;){let e=t.rare?.trySlot;if(e!==void 0&&!e.propagateSuspense)return e;t=t.parentBlock}}var $r=function e(t,n,r=[]){let i=t.children;if(i!==null){let t=r.length;for(let a of i){if(r.push(`scope`,a.key),a.scope===n||e(a.scope,n,r)!==null)return r;r.length=t}}let a=n.block;for(let e=0;eni(e,t,n,!0));else if(e.children!==null)for(let r of e.children)ni(r.scope,t,n)}function ri(e){let t=e.retrySignalOwners;if(t!==void 0){e.retrySignalOwners=void 0;for(let e of t.owners)ea(e)}}var ii=function e(t,n,r){t instanceof Vl&&(t=t.ownerBlock);for(let e=0;e{let t=new Set(e),n=[];for(let[e,r]of l.children)t.has(e)||(l.children.delete(e),ai(r,o,n));for(let e of n)ea(e)};if(typeof r!=`function`){u(r);return}if(n===0){u([]);return}let d=new Map,f=!1;return(e,t)=>{f||(d.set(e,t),d.size===n&&(f=!0,u(d.values())))}}function fi(e,t){if(e===null)return`null`;let n=typeof e;return n===`string`||n===`number`||n===`bigint`||n===`boolean`?n.charCodeAt(0).toString(36)+`:`+String(e):n===`undefined`?`u:`:{value:e,position:t}}function pi(e,t,n,r,i,a){if(typeof e==`string`)return e;let o=t+JSON.stringify([n??`legacy`,r,i]),s=a.signalState??={prefix:a.prefix,next:0},c=s.opaqueKeys??=new Map,l=c.get(o);l===void 0&&(l={objects:new WeakMap,symbols:new Map,used:new Set,next:0},c.set(o,l));let u=e.value,d=typeof u==`symbol`?l.symbols.get(u):l.objects.get(u);if(d===void 0){if(d=e.position,d===void 0||l.used.has(d)){for(;l.used.has(l.next);)l.next++;d=l.next++}l.used.add(d),typeof u==`symbol`?l.symbols.set(u,d):l.objects.set(u,d)}return`o:`+d.toString(36)}function mi(e){return JSON.stringify([e.signalState?.prefix??e.prefix,`root`])}function hi(e){if(!k)return;let t=e.signalInstanceResolved;if(t!==void 0)return t;let n=e.signalInstanceParent;if(n===null)return;let r=_i(n,e.signalInstanceSite,e.signalInstanceValue,e.signalInstanceHasKey);return e.signalInstanceResolved=r,r}function gi(e,t){if(typeof t==`string`){e.signalInstanceResolved=t;return}let n=t.parentScope,r=t.invocationSite===`r:`;e.signalInstanceParent=r?n.signalInstanceParent:n,e.signalInstanceSite=r?n.signalInstanceSite:t.invocationSite,e.signalInstanceValue=r?n.signalInstanceValue:t.key,e.signalInstanceHasKey=r?n.signalInstanceHasKey:t.hasKey,e.signalInstanceResolved=r?n.signalInstanceResolved:void 0}function _i(e,t,n,r){let i=hi(e),a=[],o=new Set,s=e;for(;i===void 0&&s!==null;){let e=s.block;o.has(e)||(o.add(e),e.forSlot&&a.push(fi(e.key,e.itemIndex)),i=hi(e)),s=s.parent,i===void 0&&s!==null&&(i=hi(s))}let c=e.block;for(;i===void 0&&c!==null;)o.has(c)||(o.add(c),c.forSlot&&a.push(fi(c.key,c.itemIndex))),i=hi(c),c=c.parentBlock;i??=mi(e.block.idState),a.reverse();let l=e.block.idState,u=a;for(let e of a)if(typeof e!=`string`){u=[];for(let e of a)u.push(pi(e,i,t,u,!1,l));break}return i+JSON.stringify([t??`legacy`,u,r?pi(fi(n),i,t,u,!0,l):``])}function vi(e,t,n){if(Vr||k){let r=e.block;r.signalInstanceParent=e.signalInstanceParent=t,r.signalInstanceSite=e.signalInstanceSite=n}}function yi(e){if(!k||e===null)return;let t=e.block.idState.renderOwner,n=t?.signalOwner;if(n===void 0&&k&&(n=Jn(e.block.parentNode),t!==void 0&&(t.signalOwner=n)),n===void 0)return;let r=e.signalOwner;if((r===void 0||r===!1)&&!e.block.forSlot&&e.signalInstanceParent===null&&e.signalInstanceResolved===void 0){let t=e.parent??e.block.parentBlock;for(;t!==null&&!(t instanceof Vl||t.signalInstanceParent!==null||t.signalInstanceResolved!==void 0);){if(t.block.forSlot?.signalSite!==void 0)return e.signalOwner=!1,yi(t);t=t.parent??t.block.parentBlock}}let i=r===null;if(!r||r.documentOwner!==n){let a=e.block.idState;r=void 0;let o=Qr(e.block),s=o?.retrySignalOwners??t?.retrySignalOwners,c=o?.retrySignalOwners===void 0?t?.current:o.tryBlock,l=null;if(s!==void 0&&!i&&!e.block.disposed&&c!=null){let t=ei(e,c),n=t===null?void 0:ti(s,t,!1);n?.owner!==void 0&&(r=n.owner,n.owner=void 0,s.owners.delete(r)),t!==null&&!e.mounted&&(l={scope:e,cache:s,path:t})}if(r===void 0||r.documentOwner!==n){let t=hi(e),i=e.block.forSlot?.signalSite,o={scopeKey:n.scopeKey,documentOwner:n,instanceOwner:e,instanceKey:t??(i===void 0?mi(a):_i(e,i,void 0,!1))},s=e.parent??e.block.parentBlock;t!==void 0&&s!==null&&hi(s)!==t&&(s=e.signalInstanceSite===`t:`?e.signalInstanceParent:null),s instanceof Vl&&(s=s.signalInstanceParent?.children?.find(e=>e.scope.block===s)?.scope??null);let c=e.body,l=(c?.$$kind===un?e.props?.children:c)?.[ep];l?.documentOwner===n?o.enclosingOwner=l:s!==null&&(o.enclosingOwner=yi(s)),o.instanceOwner=o,r=Object.freeze(o)}e.signalOwner=r,l!==null&&(ci=l),i&&ea(r)}return p(r,e.block.parentNode.ownerDocument),r}function bi(e,t){let n=yi(e);return n===void 0||ze()===n?t():He(n,t)}function xi(e){e.block!==null&&z(e.block,!1),e.block=null}function Si(e,t){let n=Vr?bi(t.parent,()=>tt(e.value)):tt(e.value),r=t.parent.block;Ci([t.slots,e.el,n],ig(r,e.el)?r:null)}function Ci(e,t){if(t!==null){H.ops.push(ed,[Ci,[e,null],t]);return}let n=e[0],r=n.__kind===`nativeStyleBinding`?`style`:0;kf(e[1],e[2],n[r]),L(n,r,n[r]),n[r]=e[2]}function wi(e,t,n,r,i){let a=e.slots[t];(a===void 0||a.block===null)&&Ti(r,i)?Ei(e,t,a,n,r):Di(e,t,n,Si,{el:n,value:r})}function Ti(e,t){if(t!==1)return typeof e!=`object`||!e;for(let t in e){let n=e[t];if(n!==null&&(typeof n==`object`||typeof n==`function`))return!1}return!0}function Ei(e,t,n,r,i,a=kf){n===void 0?(n={__kind:`nativeStyleBinding`,__flags:1,__teardown:xi,block:null,el:r,style:void 0},e.slots.length===0&&e.slots.push(void 0),e.slots[t]=n,Yl(e,n)):n.el!==r&&(A&&(A.push(3,n,`el`,n.el),A.push(3,n,`style`,n.style)),n.el=r,n.style=void 0),a===kf?Ci([n,r,i],ig(e.block,r)?e.block:null):(a(r,i,n.style),A&&A.push(3,n,`style`,n.style),n.style=i)}function Di(e,t,n,r,i){let a=e.slots[t];if(a===void 0){let o=Al(`control-flow`,e.block,n,null,null,r,i);o.parent=e,a={__kind:`nativeStyleBinding`,__flags:1,__teardown:xi,block:o,el:null,style:void 0},e.slots.length===0&&e.slots.push(void 0),e.slots[t]=a,Yl(e,a)}else if(a.block===null){let t=Al(`control-flow`,e.block,n,null,null,r,i);t.parent=e,a.el===n&&(t.slots[0]=a.style),L(a,`block`,a.block),a.block=t}else{let e=a.block;e.parentNode!==n&&(L(e,`parentNode`,e.parentNode),L(e.slots,0,e.slots[0]),e.parentNode=n,e.slots[0]=void 0),L(e,`props`,e.props),e.props=i}P(a.block)}function Oi(t=1){if(t!==1)throw Error(e(58));Ur()}function ki(e){let t=V;return t===null?-1:j.beginScope(e,t)}function Ai(e,t,n=!1){if(!j)return!1;let r=j,i=r.acceptCapture(e);if(t===void 0)return!1;let a=n&&r.replayDeferredRefs(e,t);return(i||a||r.hasPublication(t))&&r.stampPublication(t,[e.effects[0],e.effects[1],e.effects[2],e.events,e.refs]),!1}function ji(e,t){let n=j,r=n.deferredRefEntries(t);if(r===void 0||t.current===null||t.disposed)return!1;let i=new Set(e.refs.map(e=>e.el)),a=[];vh(t.current,a);for(let t of a){let n=r.get(t.el);n===void 0||i.has(t.el)||Ki(t.scope.block)||(e.refs.push({ref:n.ref===so?so:t.ref,el:t.el,block:t.scope.block,op:0}),i.add(t.el))}for(let[e,t]of r)Ki(t.block)&&n.forgetUnpublishedRef(e);return!0}function Mi(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n.rare?.suspenseHandler){let e=Xr??=new WeakMap,r=e.get(n);if(r===void 0){let t=n;r=An(()=>{t.disposed||ta(t)}),e.set(t,r);let i=r;Hs(t,()=>{i.clear(),e.delete(t)})}r.track(t);return}let n=e.idState.renderOwner;if(n===void 0||n.disposed)return;let r=n.nativeRetry;if(r===void 0){let e=An(()=>{let t=e.generation;queueMicrotask(()=>{n.disposed||n.nativeRetry!==e||e.generation!==t||n.wakeable===null||(n.wakeable=null,n.generation++,n.retry())})});n.nativeRetry=r=e}r.track(t)}var Ni=null,Pi=null,Fi=0;function Ii(e){let t=Pi??=new Map;t.has(e)||t.set(e,{value:e.value,base:e.base,last:e.last})}function P(t){let n=null,r;if(k){let e=yi(t);if(e!==void 0&&ze()!==e&&(qn===void 0||(r=qn.enter(e))===void 0)){He(e,()=>P(t));return}n=li(t)}let i=Ni,a=Pi;i===null&&Fi++,Ni=t,Pi=null;try{let r=0;for(;Du(t);){if(t.rare?.updateError)throw t.rare.updateError=!1,bo(t);if(++r>25)throw Error(e(9))}n!==null&&ui(n,!1),k&&t.rare?.trySlot?.tryBlock===t&&t.rare.trySlot.retrySignalOwners!==void 0&&ri(t.rare.trySlot);let o=Pi;if(o!==null&&i!==null&&ys(i,t)){a??=new Map;for(let[e,t]of o)a.has(e)||a.set(e,t)}}catch(e){let r=Pi;if(r!==null){for(let[e,t]of r)Ml(e,t);jl(r),t.crossRenderUpdate||(t.pending=!1)}throw n!==null&&gc(e)&&ui(n,!0),k&&t.idState.renderOwner?.signalOwner!==void 0&&!t.mounted&&t.forSlot!==null&&t.forSlot.items.get(t.key)!==t&&lu(t,e),e}finally{Ni=i,Pi=a,r!==void 0&&qn.restore(r)}}var Li=N;function Ri(e,t){return t()}var zi=[];function Bi(e,t){let n=oo,r=e,i=t;for(let a of n.slice(e,t)){for(;i=0&&j.resumeLifecycle(t),la--}function ta(e){Pl(e,e);try{So(e,I,!1,vt&&!I&&!Ic()&&nv===0&&Qi===0)}finally{}}var na=[],ra=new WeakMap,ia=0,aa=-1,oa=0,sa=null,ca=0,la=0;function ua(e,t=null){la++;let n=j?j.pauseLifecycle():-1;try{k?bi(t,e):e()}finally{n>=0&&j.resumeLifecycle(n),la--}}function da(e,t=-1,n=null){let r=aa;aa=t,ia++;try{ua(e,n)}finally{ia--,aa=r}}var F=[],fa=0,pa=!1,ma=!1,I=!1,ha=[],ga=0,_a=0,va=[],ya=[],ba=!1,xa=0,Sa=0;function Ca(){return xa>0||Sa>0&&Lc()}var wa=null;function Ta(e){wa===null?wa=e:wa.push(...e),!I&&V===null?Ea():pa||(pa=!0,queueMicrotask(No))}function Ea(){let e=wa;e!==null&&(wa=null,Mn.promote(e))}var Da=null,Oa=null,ka=!1,Aa=0,ja=null,Ma=null,Na=null,Pa=null;function Fa(e,t){if(e.disposed||e.generation!==t)return!1;if(I||V!==null)return(Pa??=[]).push(e,t),wo(),!0;xa++;try{e.retry()}finally{xa--}return!0}function Ia(e,t,n){if(I||V!==null)(Na??=[]).push(e,t,n),wo();else{xa++;try{t&&zc(e)&&(Ba!==null&&Va(),Uc(e)),n&&Xc(e,void 0)}finally{xa--}}}function La(e){let t=ja?.get(e);if(t!==void 0&&t.suspends){t.suspends=!1;for(let e of t.batches)--e.suspended===0&&((Na??=[]).push(e,!0,!1),wo());t.request!==-1&&((Pa??=[]).push(e.parentBlock.idState.renderOwner,t.request),wo())}}var Ra=0,za=null,Ba=null;function Va(){let e=Ba;Ba=null;for(let t=e.length-4;t>=0;t-=4){let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=!0;for(let e=0;o&&e=0;e-=4)t[e]===6?t[e+1]():t[e]===4?to(t[e+1]):t[e]===9&&(t[e+1].$$signalOwner=t[e+2]);t.length=0}if(e.hostEventReveals!==void 0)for(let t of e.hostEventReveals)t.releasedHold&&t.state.stagedCapture===t.capture&&(t.state.transitionHeld=!1);yg(e,0,0)}else e.ops.length=0;let n=e.created;if(n!==null)for(let e=n.length-1;e>=0;e--)n[e].disposed||to(n[e]);_p(e.capture)}finally{rr&&Sr(n),vu(t)}}function io(){try{let e=qa;e.length!==0&&(qa=[]);for(let t of e){if(t.rendering!==0){qa.push(t);continue}let e=t.owner;try{if(t.holders,t.aborted||e.disposed){e.transaction===t&&(e.transaction=null);continue}if(j&&!j.validateCapture(t.capture)){ro(t),e.transaction===t&&(e.transaction=null),e.disposed||(e.wakeable=null,e.generation++,e.retry());continue}e.transaction===t&&(e.transaction=null),t.rootRequest&&ja?.has(e)!==!0&&(e.wakeable=null,e.generation++),e.wakeable===null&&(e.retryKey=null,e.nativeRetry?.clear(),k&&e.retrySignalOwners!==void 0&&ri(e));let n=Ai(t.capture,e,!0);t.cells!==null&&Xs(t.cells),t.batches!==null&&(ja===null||ja.size===0)&&(za=Ba=null);let r=e.generation,i=t.ops,a=oo.length;if(i.length!==0){let t=Wa,n=Ga;Wa=e,Ga=r;try{for(let t=0;ta&&Bi(a,o)}finally{t.ops.length===0&&e.transaction!==t&&(e.spareOps=t.ops)}}}finally{}}function ao(e){Aa+=e,Aa<0&&(Aa=0)}var oo=[];function so(e){e._reapply(),Xi(e._currentRef,e)}var co=new Set;function lo(){if(co.size!==0)for(let e of co)e._reapply()}var uo=0,fo=null,po=50,mo=0,ho=0,go=!1,_o=-1;function vo(){ho++}var yo=class extends Error{};function bo(e){return new yo(D(1))}function xo(e,t){let n=Ol(e);n.updateChain!==ho&&(n.updateChain=ho,n.updateCount=0),++n.updateCount>po&&(n.updateCount===51&&oa<=1&&aa!==2&&kr&&(ds[2].length>0||js.length>0)?_o=ho:(_o=-1,n.updateError=!0))}function So(e,t,n,r){if(e.disposed)return;let i=V===e;V===null||i&&B===e||Ra!==0||la!==0||(e.crossRenderUpdate=!0);let a=(xa>0||Sa>0)&&Ca()||i&&e.currentRenderMode===`transition`?`transition`:`urgent`,o=ka||i&&e.currentRenderDeferred;e.pending?(!r&&ha.length!==0&&ur.upgrade(e,a,n),a===`urgent`&&(e.pendingMode=`urgent`,e.pendingDeferred=!1)):(aa===2&&(!ma||I)||(t||ps()?(go=!0,xo(e,t)):V===null&&(mo++,++ho,e.rare!==null&&(e.rare.updateCount=0,e.rare.updateError=!1))),e.pending=!0,e.pendingMode=a,e.pendingDeferred=o,(r||a===`transition`)&&ur&&ur.queue(e,n)||(F.push(e),ma||pa||(pa=!0,queueMicrotask(No))))}function Co(e,t,n){if(ma)return;if(t===`transition`&&!I&&V===null&&!ba){let t=ha.indexOf(e)!==-1;if(n){if(!t||F.indexOf(e)!==-1)return;F.push(e),pa||(pa=!0,queueMicrotask(No))}else!t&&e.pendingMode===`transition`&&(ha.push(e),wo());return}if(t!==`urgent`&&!n)return;let r=ha.indexOf(e);r!==-1&&(ha.splice(r,1),F.push(e),pa||(pa=!0,queueMicrotask(No)),ha.length===0&&To())}function wo(){if(ga!==0)return;let e=ga=++_a;Qt(()=>{if(ga===e){ba=!0;try{(Ma||Na||Pa)&&Ua(),To(!0),No()}finally{ba=!1}}})}function To(e){ga=0;for(let e=0;e=(t?po:25))throw t?bo():Error(D(9));n.set(o,e+1),o.crossRenderUpdate=!1,P(o)}catch(e){su(o,e)}a!==fa&&(a=fa,r=0,i=0)}}}finally{if(a===fa){for(;r1&&Ao(F,t);for(let n=0;n(o?po:25))throw o?bo():Error(D(9))}else r.drainStamp=t,r.drainRenders=1;{let e=r.idState.renderOwner;if(e!==void 0&&e.current===r&&e.request!==null){let t=e.request;e.request=null;let n=r.pendingMode??`urgent`;r.pendingMode=null,t(n)}else s(r)}}catch(t){try{su(r,t)}catch(t){let n=r.idState.renderOwner?.transaction;n!=null&&(ro(n),n.holders=null);let i=t;zr(r,i)||(e===null?e={err:i,all:[i]}:(e.all.push(i),e.err=typeof AggregateError==`function`?AggregateError(e.all,D(13)):e.all[0]));let a=r;for(;a.parentBlock!==null;)a=a.parentBlock;a.kind===`root`&&!a.disposed&&(l=a)}}finally{vu(c),l===null||l.disposed||z(l)}}return F.length=0,fa++,io(),e}function No(){if(pa=!1,I)(F.length>0||qa.length>0)&&!pa&&(pa=!0,queueMicrotask(No));else if(vs()||Hi.length!==0||oo.length!==0||co.size!==0||Bc.length!==0)try{Bo()}catch(e){if(uo===0)throw e;(fo??=[]).push(e)}}var Po=null,Fo=null;function Io(e){if(e===null&&Po===null)return Mo();let t=Po,n=Fo;Po=e,Fo=null;try{return Mo()}finally{try{Gg()}finally{Fo=n,Po=t}}}function Lo(e,t){let n=null;if(Array.isArray(t)){for(let r=0;r0||qa.length>0)&&t<50;t++){Vo();let t=F.length===0?null:Ug(),n=Io(t);t!==null&&Wg(t),n!==null&&e===null&&(e=n),Xo()}return e}function zo(e){try{M&&M.restore()}finally{throw e}}function Bo(){try{I=!0;let e=Bc.length>0;try{F.length>0&&Vo();let e=F.length===0?null:Ug(),t=Io(e);if(e!==null&&Wg(e),Xo(),(F.length>0||qa.length>0)&&(t=Ro(t)),t!==null)throw t.err}finally{I=!1,(e||Bc.length>0)&&ha.length===0&&Hc()}}catch(e){zo(e)}M&&M.restore()}function Vo(){kr&&(ds[2].length>0||js.length>0)&&gs()}function Ho(e){if(I)return pt?_t(e):e();let t=ma;ma=!0;let n;try{try{n=pt?_t(e):e(),ur&&ur.adopt(!0),I=!0;let t=aa;aa=-1;let r=null;try{F.length>0&&Vo();let e=F.length===0?null:Ug();r=Io(e),e!==null&&Wg(e),Xo(),(F.length>0||qa.length>0)&&(r=Ro(r))}finally{I=!1,(Bc.length!==0||Vc!==null)&&Hc(),aa=t}if((F.length>0||qa.length>0)&&!pa&&(pa=!0,queueMicrotask(No)),r!==null)throw r.err}finally{ma=t}}catch(e){zo(e)}return M&&M.restore(),n}var Uo=new Map;function Wo(e){let t=Uo;for(let n=0;ne[t]===i.ref);if(t!==-1&&t1){let t=e[0].block?.parentBlock??null;for(let n=1;n0||js.length>0)&&!fs&&Or(),oa===0&&(go?go=!1:_o===ho?vo():ho++);return}let e=j?j.pauseLifecycle():-1,t=xa,n=Da;xa=0,Da=null,oa++;try{Cr();let e=As();Mr();let t=wr();Yo(),lo(),t!==null&&Tr(t),e!==null&&Br(e),$i(),kr&&(ds[2].length>0||js.length>0)&&!fs&&Or(),oa===1&&(go?go=!1:_o===ho?vo():ho++)}finally{xa=t,Da=n,e>=0&&j.resumeLifecycle(e),Zo()}}function Zo(){if(--oa!==0||sa===null)return;let e=sa;sa=null;for(let{block:t,error:n,handler:r}of e)Qo(t,n,r)}function Qo(e,t,n){if(oa>0){(sa??=[]).push({block:e,error:t,handler:n});return}let r=n===void 0?ou(e):n;if(r!==null){Rr(e,t,r(t));return}let i=e;for(;i!==null&&i.parentBlock!==null;)i=i.parentBlock;i!==null&&i.kind===`root`&&!i.disposed&&(z(i),Li()),zr(e,t)||console.error(t)}function $o(e){if(e.fn===null)return;let t,n=e.scope.hooks?.get(e.slot);if(n!==void 0&&n.revision===e.revision&&Ds(e,n)){n.connectedFn=e.fn,n.connectedArgs=e.args,n.disconnected=!1;try{let n=aa;aa=e.phase,ia++;try{t=k?bi(e.scope,()=>e.fn.apply(null,e.args)):e.fn.apply(null,e.args)}finally{ia--,aa=n}}catch(t){if(t instanceof yo)throw t;Qo(e.scope.block,t);return}typeof t==`function`&&(n.cleanup=t)}}function es(){if(_o===ho){if(F.length!==0)return;vo()}oa++;try{Dr();let e=ds[2];if(e.length===0)return;let t=e.splice(0);t.sort(xs);for(let e=0;e{if(i.disposed)return;let n=a;if(n.queue===null&&!(i.pending&&typeof e==`function`)){let r;try{r=typeof e==`function`?e(n.value):e}catch{Qs(n,i,Rc(i),e,`state`,t);return}let a=Da===null&&(nv>0||ma)?null:Rc(i);if(Object.is(r,n.value))return;if(a===null){if(Jo&&ca>0){let e=qo??=new Map,t=n;if(!e.has(t)){let r={block:i,previous:n.value};e.set(t,r)}n.value=r;return}V===i&&Ii(n),n.value=r,i.disposed,So(i),ja!==null&&ja.size!==0&&$s(i);return}Qs(n,i,a,e,`state`,t)}else Qs(n,i,Rc(i),e,`state`,t)},getter:void 0},Vs(r).set(t,a)}return a}var ns=!1;function rs(e,t,n){let r=V;if(r===null)return!1;let i=null;for(let e=0;e{is=0}))}var os=0,ss=0;function cs(e,t){let n=B_.get(e);B_.set(e,{count:(n?.count||0)+t,since:++ss,previous:n}),n!==void 0&&setTimeout(()=>{let t=B_.get(e);t!==void 0&&(t.previous=void 0)},0)}function ls(e,t,n,r,i,a,o,s,c){let l,u=!1,d=-1,f=0,p=e=>{let n=!1;ra.set(e,()=>{if(!(n||t!==e)){n=!0;try{l.unmount()}finally{n=!1}}})},m={current:t,signalOwner:s,retry:N,request:null,generation:0,wakeable:null,retryKey:null,transaction:null,disposed:!1,spareOps:[]};i.renderOwner=m;let h=(o,s,c,d,f=!1)=>{if(u)return;if(Et(),t&&!t.disposed&&n===o&&Object.is(r,c)){let e=t;m.request=t=>{m.transaction.rootRequest=!0;let n=e.props;n!==s&&L(e,`props`,n),e.props=s,e.pendingMode=t,P(e)},So(t);return}if(d===void 0&&t!==null&&!t.disposed&&Ca()){m.request=e=>h(o,s,c,e),So(t);return}if(!I&&V===null&&d===void 0&&!Ca()&&u)return;let g=_u(m);m.transaction.rootRequest=!0;let _=t,v=n,y=r,b=e.nodeType!==9&&_!==null&&_.mounted&&!_.disposed&&!eo(m.transaction,_),x=b?X(e):null,ee=b?e.lastChild:null;A&&Ya(()=>{t=_,n=v,r=y,m.current=_,_!==null&&p(_)});try{t&&(ra.delete(t),b||z(t),t=null,n=null,r=null);let u=null,h=null,v=null;b?(u=document.createComment(`root`),h=document.createComment(`/root`),v=$h(null,e,null).$$next,v.frag.append(u,h)):m.hydrationFallback===void 0?(v=$h(null,e,null).$$next,v.out.push(()=>Wu(e),null,null)):v=m.hydrationFallback(!1),t=Al(`root`,null,v===null?e:v.frag,u,h,o,s,void 0,a),v!==null&&(v.owner=t,rg(v.frag,t)),t.idState=i,m.current=t,no(t),p(t),n=o,r=c;let y=d===void 0&&Ca();if(y||d===void 0&&Sa>0&&Qi>0){if(t.pending=!0,t.pendingMode=y?`transition`:`urgent`,ur&&t.pendingMode===`transition`&&ur.queue(t))return;F.push(t),!ma&&!pa&&(pa=!0,queueMicrotask(No));return}let S=t;S.pendingMode=d??null,S.pendingDeferred=f;try{P(S),F.length>0&&ko(S)}catch(e){let n=!1;try{su(S,e)}catch(r){n=!0,e=r;let i=m.transaction;i!==null&&ro(i),!rr&&b&&!_.disposed&&z(_),t!==null&&!t.disposed&&z(t)}if(vu(g),g=null,!n){m.wakeable===null&&l.unmount();return}if(m.hydrationFallback?.(!0),!zr(S,e))throw e;return}b&&(Za(_),gg(_,x,ee)),!ma&&!pa&&(pa=!0,queueMicrotask(No))}finally{vu(g),H===null&&(I||io())}};return l={render(e,i){if(u)throw Error(D(29));if(!I&&V===null&&!ps()&&!Ca()&&u)return;if(ps()||V!==null){if(d!==mo&&(d=mo,f=0),++f>po){t!==null&&!t.disposed&&(Ol(t).updateError=!0,So(t));return}}else mo++,ho++,d=mo,f=0;let a,o=null;qf(e)?(arguments.length,o=e.key??null,typeof e.type==`function`?(a=e.type,i=e.props):(a=Vu,i=e)):typeof e==`function`?a=e:(a=Vu,i=typeof e==`symbol`?null:e),(ja?.has(m)!==!0||t===null||t.disposed||n!==a||!Object.is(r,o))&&(m.generation++,m.wakeable=null),t!==null&&!t.disposed&&n===a&&Object.is(r,o)&&Wa===m&&(Ga=m.generation),m.nativeRetry?.clear(),k&&m.retrySignalOwners!==void 0&&ri(m),m.retryKey=null,m.request=null,m.transaction?.aborted===!0&&(m.transaction=null),m.retry=e=>h(a,i,o,e?`transition`:void 0,e),h(a,i,o)},unmount(){if(arguments.length,!u&&(I||V!==null||ps()||la!==0||!u)){!I&&V===null&&!ps()&&la===0&&(mo++,ho++),u=!0,m.disposed=!0,m.nativeRetry?.clear(),k&&m.retrySignalOwners!==void 0&&ri(m),m.retry=N,m.generation++,m.wakeable=null,m.request=null,m.transaction!==null&&ro(m.transaction);try{t&&(ra.delete(t),P_(X(e),null),lr(null,()=>z(t,!1)),Li(),m.preservePresentation||Wu(e),Dr(),t=null,n=null,r=null)}finally{i.signalState?.opaqueKeys?.clear(),j&&j.clearDeferredRefs(m),m.current=null,m.retry=N,m.adopt=void 0,m.initialDocumentSignals=void 0,m.retryKey=null,m.transaction=null,tv(e,!0),Ku(e,o)}}}},t!==null&&(p(t),m.adopt=e=>{t!==null&&ra.delete(t),t=e,m.current=e,p(e)}),l}var us=0,ds=[[],[],[]],fs=!1;function ps(){return ia>0||ca>0||us>0}function ms(){fs=!0,Bs(hs)}function hs(){fs=!1,Er()}function gs(){fs=!1,Is(),Er()}function _s(){return ha.length>0||va.length>0||vs()}function vs(){return F.length>0||qa.length>0||xu.length>0||Su.length>0||ds[0].length>0||ds[1].length>0||ds[2].length>0||js.length>0||zi.length>0||Gv()}function ys(e,t){for(let n=t.parentBlock;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function bs(e,t,n,r){if(e!==n&&e!==null&&n!==null){let i=e.parentBlock,a=n.parentBlock;if(i===n)return-1;if(a===e)return 1;if(i===a)return t-r;for(let t=a;t!==null;t=t.parentBlock)if(t===e)return 1;for(let e=i;e!==null;e=e.parentBlock)if(e===n)return-1}return t-r}function xs(e,t){return e.scope===t.scope?e.order-t.order||e.seq-t.seq:bs(e.scope.block,e.seq,t.scope.block,t.seq)}function Ss(e,t){return bs(e.block,0,t.block,0)}function Cs(e){for(let t=1;t0&&e[r-1].block===n.block&&ws(e[r-1],n)>0;)e[r]=e[r-1],r--;e[r]=n}}function ws(e,t){let n=Ts(e),r=_n(n).compareDocumentPosition.call(n,Ts(t));return r&16||(r&10)==2?1:r===0?0:-1}function Ts(e){return e.el._startMarker??e.el}function Es(e){let t=e.scope.hooks?.get(e.slot);if(t===void 0||t.revision!==e.revision||!Ds(e,t))return;let n=e.fn===null,r=t.cleanup;if(n&&(t.connectedFn=null,t.connectedArgs=void 0,t.disconnected=!1),r){t.cleanup=void 0;try{da(r,e.phase,e.scope)}catch(t){if(t instanceof yo)throw t;Qo(e.scope.block,t)}}}function Ds(e,t){return!j||j.publicationCurrent(e)?!0:(H!==null&&Ag(t),t.deps=void 0,t.active=t.connectedFn!==null,!e.scope.block.idState.renderOwner?.disposed&&!Ki(e.scope.block)&&ta(e.scope.block),!1)}function Os(){let e=ds[0],t=ds[1];if(e.length===0&&t.length===0)return null;let n=e.length===0?t.splice(0):t.length===0?e.splice(0):e.splice(0).concat(t.splice(0));n.sort(xs);let r=n.length,i=0;for(;i`u`)Rs=e=>setTimeout(()=>Ls(e),0);else{let e=new MessageChannel;e.port1.onmessage=e=>Ls(e?.data),Rs=t=>e.port2.postMessage(t)}}return Rs}function Bs(e){if(Ns.push(e),Ns.length!==1)return;let t=zs(),n=++Fs,r=typeof document<`u`&&document.visibilityState===`hidden`,i=typeof requestAnimationFrame==`function`;Ps=setTimeout(()=>Ls(n),r||!i?0:250),!r&&i&&requestAnimationFrame(()=>{t(n)})}function Vs(e){return e.hooks??=new Map}function Hs(e,t){(e.cleanups??=[]).push(t)}var Us=0;function Ws(e){let t=Us;return Us+=e,t}function Gs(e){throw Error(D(15,e))}var Ks=[];function qs(e,t,n){return n===null?typeof t==`function`?t(e):t:n(e,t)}function Js(e,t){let n=H;V.currentRenderMode;let r=e.base,i=e.queue,a=n!==null&&e.stamp===n.createdStamp?e.at:-1;if(a!==-1){let e=n.cells,t=e[a+3];if(i=t??e[a+4].next,i===null)return e[a+1];r=e[t===null?a+1:a+2]}let o=r,s=null,c=i;for(let e=c;e!==null;e=e.next)c=e,e.batch===null?(r=qs(r,e.action,t),s===null&&(o=r)):s??=e;if(n===null)Ys(e,r,o,s,c);else if(a!==-1){let e=n.cells;e[a+1]=r,e[a+2]=o,e[a+3]=s,e[a+4]=c}else{let t=n.cells??=[];e.stamp=n.createdStamp,e.at=t.length,t.push(e,r,o,s,c)}return r}function Ys(e,t,n,r,i){e.value=t,e.base=n;let a=r??i.next;e.queue=a,a===null&&(e.last=null)}function Xs(e){for(let t=0;tvoid setTimeout(t,0):()=>{(yc??=new WeakSet).add(e),t()};e.then(n,n)}function xc(e){e.status===void 0&&(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))}function Sc(e,t){for(let n=1;nCc&&(Cc=mu),n}function Oc(e,t){`available`in e&&(e.source=t,e.value=void 0,t.warmRecord=e)}function kc(e){if(ns){if(e.hooks!==null)for(let t of e.hooks.values()){let e=t,n=e?.warmRecord;n!==void 0&&n.source===e&&(n.source=void 0,n.value=e.value,n.available=!0,e.nativeWitness!==void 0&&(n.nativeWitness=e.nativeWitness),e.warmRecord=void 0)}gh(e,kc)}}function Ac(e,t){for(let n=t;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function jc(e,t,n){let r=mu<=Cc?V:null;for(;r!==null;){let i=r.rare,a=i?.warmCache;if(a!==void 0&&i.warmCacheEpisode===mu){let r=Mc(a,e,t,n);if(r!==wc)return r}r=r.parentBlock}let i=V?.idState.renderOwner?.retryKey,a=i==null?void 0:Tc?.get(i);if(a!==void 0){let r=Mc(a,e,t,n);if(r!==wc)return r}let o=za;if(o!==null&&V?.currentRenderMode===`transition`){let r=V.idState.renderOwner;for(let i=0;i0&&aa!==2||ca>0}function Lc(){return!ma&&nv===0&&Qi===0&&Gr===0&&!Ic()}function Rc(e){return V===e?null:Da===null?Oa!==null&&Lc()?Oa:null:Da}function zc(e){return e=Jc(e),e.flushed&&e.waiting===0&&e.suspended===0}var Bc=[],Vc=null;function Hc(){Bc.length=0,Vc=null}function Uc(e){if(e.blocks.length!==0){for(let t of e.blocks)t.disposed||(So(t),ur&&ur.upgrade(t,`transition`));Bc.push(e)}}function Wc(e){let t=e.finishListeners;if(t!==null){e.finishListeners=null;for(let e of t)try{e()}catch(e){console.error(e)}}}function Gc(e){if(!e.workComplete||e.pendingActions!==0||(e.pendingHolds??0)!==0||e.merged!==null&&!Jc(e).finished)return;if(e.finished=!0,Wc(e),e.hooksPending){e.hooksPending=!1;let t=e.hook;--t.pendingBatches===0&&t.publish(!1);let n=e.hooks;if(n!==null)for(let e=0;ee.set(ap,a))}Vs(n).set(ap,i)}il(r,void 0,n,void 0)};return tl(t,e)}function tl(e,t){return $c=_l,e.$$kind=un,e.defaultValue=t,e.$$version=0,e.$$providerVersion=0,wn(e),e}function nl(e,t,n){let r=e.block,i=r.endMarker,a=$h(t,n,i);return L(r,`parentNode`,n),r.parentNode=a,r.endMarker=null,rg(a,e),i}var rl=null;function il(e,t,n,r){let i=rl;rl=n;try{return e(t,n,r)}finally{rl=i}}function al(e){let t=e.slots[0];e===e.block&&e.block.outputHandler!==null&&(t?.__kind===`childSlot`||t?.__kind===`componentSlotSlot`||t?.__kind===`ifBlockSlot`||t?.__kind===`switchBlockSlot`||t?.__kind===`activityBlockSlot`)&&Ll(t,!0);let n=e.compilerMemo;if(n!==null&&(ol(n),n.overflow!==null))for(let e of n.overflow.values())ol(e)}function ol(e){e.auto!==void 0&&(A&&!vr&&A.push(3,e,`auto`,e.auto),e.auto=void 0)}function sl(e,t){throw typeof e==`object`&&e&&e.$$typeof===fn?Error(D(18,t)):Error(D(12,t))}function R(e){return e&&e.$$kind===un?_l(e):sl(e,`useContext`)}var cl=Symbol(`octane.ctx.default`),ll=Symbol.for(`octane.host-context-request`);function ul(e){try{return typeof e==`object`&&!!e&&e.$$kind===ll}catch{return!1}}function dl(e){let t=e.block;e===t&&t.memoInChain||(t.memoInChain=!0,gh(e,dl))}function fl(e,t){for(;e!==null&&e.context!==t;)e=e.next;return e}function pl(e,t){if(e===null||!e.memoInChain)return;Qc??={clean:xp,restamp:Ep,directChanged:bp,refresh:kp,restampSlot:Op,skippedRows:xh};let n=fl(e.$$ctxDirect,t),r=n?.read;n===null?e.$$ctxDirect={context:t,read:t.$$version,next:e.$$ctxDirect}:n.read=t.$$version;for(let n=e;n!==null;n=n.parentBlock)(n.body?.__memo===!0||n.$$implicitBail===!0)&&(n.$$ctxReads??=new Map).set(t,t.$$version);return r}function ml(e,t,n,r,i){if(e===null||t===null||!t.memoInChain||typeof i==`number`||n.$$providerVersion!==n.$$version)return;let a=e.$$ctxCache,o=a===n?e.$$ctxCacheOwner:a!==null&&e.$$ctxCacheOwner===null?a.get(n):void 0;if(o==null||o===cl)return;let s=fl(t.$$ctxDirect,n);if(i!==void 0){if(i.owner!==o||!Object.is(i.value,r))return;i.version=n.$$version,s.read=i}else s.read={version:n.$$version,owner:o,value:r}}function hl(e,t,n){if(e===null)return;let r=e.$$ctxCache;if(r===null){e.$$ctxCache=t,e.$$ctxCacheOwner=n;return}let i=e.$$ctxCacheOwner;if(i!==null){let a=new Map;a.set(r,i),a.set(t,n),e.$$ctxCache=a,e.$$ctxCacheOwner=null}else r.set(t,n)}function gl(e,t,n){if(e!==null){let t=e.$$ctxCache,r=t===n?e.$$ctxCacheOwner:t!==null&&e.$$ctxCacheOwner===null?t.get(n):void 0;if(r!=null)return r===cl?n.defaultValue:r.$$ctxValues.get(n)}let r=e;for(;r!==null;){let t=r.$$ctxValues;if(t!==null&&t.has(n))return hl(e,n,r),t.get(n);r=r.parent}let i=t?.parentBlock??null;for(;i!==null;){let t=i.$$ctxValues;if(t!==null&&t.has(n))return hl(e,n,i),t.get(n);i=i.parentBlock}return hl(e,n,cl),n.defaultValue}function _l(e){let t=pl(V,e),n=gl(B,V,e);return ml(B,V,e,n,t),n}var vl=null;function yl(e,t){if(e.delete(t))for(let e=X(t);e!==null;e=X(t))t.removeChild(e)}function bl(e){return e.nodeType===1&&e.localName===`style`&&e.hasAttribute(`data-octane`)}function xl(e){return e!==null&&e.nodeType===8&&e.data===` `}var Sl=N,Cl=N,wl=N,Tl=0;function El(){return(Tl++).toString(36)}var Dl=class{constructor(e,t,n,r,i,a,o,s,c){this.body=a,this.props=o,this.extra=s,this.outputHandler=c,this.memoInChain=a?.__memo===!0||t!==null&&t.memoInChain===!0,this.parentNode=n,this.parentBlock=t,this.idState=t?.idState??{prefix:``,next:0},this.startMarker=r,this.endMarker=i,this.exclusiveMarkers=!1,this.itemIndex=0,this.pending=!1,this.disposed=!1,this.mounted=!1,this.renderStatus=0,this.pendingMode=null,this.currentRenderMode=null,this.pendingDeferred=!1,this.currentRenderDeferred=!1,this.inactive=!1,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxDirect=null,this.$$ctxDepsEpoch=-1,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.$$implicitBail=!1,this.drainStamp=0,this.drainRenders=0,this.crossRenderUpdate=!1,this.deoptNode=null,this.deoptRefs=!1,this.slots=[void 0],this.compilerMemo=null,this.forSlot=null,this.prevSibling=null,this.nextSibling=null,this.key=null,this.parent=null,this.block=this,this.kind=e,this.createdStamp=0,this.__warmEpisode=void 0,this.__thenableDone=void 0,this.rare=null,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0,this.signalTokenEscaped=!1,this.signalOwner=void 0}};function Ol(e){return e.rare??={tryHandler:void 0,suspenseHandler:void 0,trySlot:void 0,activitySlot:void 0,thenables:void 0,thenableIdx:0,batchThenables:void 0,warmCache:void 0,warmCacheEpisode:void 0,updateChain:-1,updateCount:0,updateError:!1,eventRender:0,eventCommitted:0,vt:null}}var kl=class{constructor(e,t){this.block=t,this.parent=e,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.mounted=!1,this.slots=[void 0],this.compilerMemo=null,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0,this.signalTokenEscaped=!1,this.signalOwner=void 0}};function Al(e,t,n,r,i,a,o,s,c=null){let l=new Dl(e,t,n,r,i,a,o,s,c);if(t!==null&&l.idState.renderOwner===H?.owner&&(no(l),n.nodeType===11)){let e=n.$$next;e!==void 0&&e.members.push(l,n)}return l}function jl(e){let t=H?.cells;if(t==null)return;let n=0;for(let r=0;ru.splice(e,0,t)),u.splice(e,1))}e.slots[0]=void 0;return}if(r===`childSlot`){if(t.portal&&=(Cl(t.portal),null),t.forSlot){for(let e=t.forSlot.head;e!==null;e=e.nextSibling)z(e,!0);t.forSlot.emptyBlock&&z(t.forSlot.emptyBlock,!0),t.forSlot=null}vp(t),t.borrowed||(t.start?.remove(),a?.remove())}else r===`componentSlotSlot`?t.block&&z(t.block,!0):tu(t,!0),!t.inherited&&!t.borrowed&&(t.start?.remove?.(),a?.remove?.());let s=e._slots;if(s!==null){let e=s.indexOf(t);e!==-1&&s.splice(e,1)}e.slots[0]=void 0}var Vl=class e{constructor(t,n,r){this.parentNode=t,this.endMarker=n,this.parentBlock=r,this.ownerBlock=r instanceof e?r.ownerBlock:r,this.memoInChain=r.memoInChain,this.$$ctxValues=null,this.idState=r.idState,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0,this.startMarker=void 0,this.rare=null}},Hl=0,Ul=null,Wl=null,Gl=null;function Kl(e){Ul===null?zr(Wl,e)||console.error(e):(Gl??=[]).push(e)}function ql(){let e=Gl,t=Ul,n=Wl;if(Gl=null,Ul=null,Wl=null,e!==null&&t!==null)for(let r=0;r{tu(t,!0);let r=e.slots.indexOf(t);if(r!==-1&&(e.slots[r]=void 0),n===null)e._slots=null;else{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}),n===null?e._slots=[t]:n.push(t)}function Xl(e,t=!0){let n=e.effectSlots;if(kr&&n!==null)for(let t=0;t{$l(e,t)})}function Zl(e,t){let n=e.cleanups;if(n!==null)for(let t=n.length-1;t>=0;t--)try{ua(n[t],e)}catch(e){Kl(e)}if(k||Vr||Re){let n=e.signalOwner;if(n){if(cu?.owners.has(n))return;e.signalOwner=t?null:void 0,ea(n)}else t&&(n===!1||n===void 0&&e.signalTokenEscaped)&&Ql(e)}}function Ql(e){let t=e.signalOwner;t===!1||t===void 0&&e.signalTokenEscaped?e.signalOwner=null:t&&(e.signalOwner=null,ea(t))}function $l(e,t,n=!0){Zl(e,n),eu(e,t)}function eu(e,t){let n=e.children,r=e._slots,i=0;if(r!==null)for(let e=0,a=r.length;e{c||(c=!0,queueMicrotask(()=>{n.disposed||n.generation!==s||n.wakeable!==t||(n.wakeable=null,n.retry())}))};return bc(t,l),i!==null&&i!==t&&bc(i,l),!0}var xu=[],Su=[],Cu=0,U=null,wu=xu,Tu=Su;function Eu(e,t){ya.length===0&&Cu++,ya.push(e,t),!e.falling&&e.hooksPending&&e.pendingActions===0&&(e.pendingHolds??0)===0&&(e.falling=!0,Zc(e.hook),e.hooks?.forEach(Zc))}function Du(e){e.renderStatus===1&&(e.renderStatus=2),U!==null&&U.rootTransaction!==!0&&Fl(U,e),A&&(gr!==1||e.createdStamp!==hu||e.parentBlock?.createdStamp!==hu)&&A.push(5,e,null,null);let t=B,n=V,r=uu,i=du,a=mu,o=na.length,s=wu,c=Tu,l=U?.events??s,u=U?.eventActions??c,d=l.length,f=u.length;B=e,V=e,uu=kr&&e.effectSlots!==null?fu++:0,du=0;let p=n!==null&&(e.parentBlock===n||Ac(n,e));if(e.pendingDeferred,p)mu===0&&(mu=pu++);else{let t=n===null&&Mu?e.__warmEpisode:void 0;mu=typeof t==`number`?t:pu++}e.__warmEpisode=mu,wu=l,Tu=u;let m=Mu&&e.pending&&!0;m&&(Mu=!1),e.pending=!1,e.crossRenderUpdate=!1;let h=e.rare;if(h!==null){h.eventRender!==0&&h.eventRender++,h.thenableIdx=0;let t=h.thenables;t===void 0||Mu&&e.__thenableDone!==!0||(t.length!==0&&(t.length=0),h.batchThenables=void 0)}if(e.__thenableDone=!1,e.$$ctxReads!==null&&e.$$ctxReads.clear(),e.$$ctxDirect!==null){let t=e.slots[0];Qc&&t?.__kind===`hydrateBlockSlot`&&t.parentBlock===e&&!t.independent&&!t.hydrated&&(t.contextChanged=e.$$ctxDepsEpoch!==Tt.value&&Qc.directChanged(e)),e.$$ctxDirect=null}e.$$ctxDepsEpoch=Tt.value,e.currentRenderMode=e.pendingMode??n?.currentRenderMode??`urgent`,e.currentRenderDeferred=e.pendingMode===null?n?.currentRenderDeferred??!1:e.pendingDeferred,e.pendingMode=null,e.pendingDeferred=!1;let g,_=!1,v=!1;try{j&&j.beginRender(e),Xr?.get(e)?.clear();let t=e.body(e.props,e,e.extra);if(e.pending&&!e.crossRenderUpdate)return v=!0,!0;e.outputHandler!==null&&(t!==void 0||e.slots[0]?.returnedOutput===!0)&&e.outputHandler(e,t??null),kr&&e.effectSlots!==null&&Au(e),e.mounted||=!0,e.renderStatus===2&&(e.renderStatus=0),e.rare!==null&&(e.rare.eventCommitted=e.rare.eventRender),_=!0,e.__thenableDone=!0}catch(e){if(rr&&typeof e==`object`&&e)try{typeof e.then==`function`&&(e=new hc(e))}catch{}throw g=e,e}finally{if(!_){if(v&&(e.renderStatus=1),e.renderStatus!==1){let t=null,n=rr?gc(g):!1;if(n||!ul(g)){for(let r=e;r!==null;r=r.parentBlock)if(n?r.rare?.suspenseHandler:r.rare?.tryHandler&&r.rare.trySlot?.catchBody!==null){t=r;break}}Pl(e,t)}l.length=d,u.length=f}wu=s,Tu=c,na.length!==o&&(na.length=o),mu=a,uu=r,du=i,B=t,V=n,m&&(Mu=!0);try{j&&j.endRender(e,_,gc(g))}finally{}}}function Ou(e,t,n,r,i,a,o){if(V?.pending&&!V.crossRenderUpdate)return;if(e===rl){fp(null,e,t,n,r,r,i,i,o,void 0,2,void 0,void 0,a);return}if(e.slots[t]===void 0&&H!==null&&e.block.createdStamp!==H.createdStamp){let s=dm(e.block,n,o);if(s!==null){try{Ou(e,t,s.parentNode,r,i,a,s)}finally{fm(e,s,o)}return}}let s=e.slots[t],c;s===void 0?(s=new kl(e,e.block),s.block=new Vl(n,o??null,e.block),n.nodeType===11&&rg(n,s),vi(s,e,a),e.slots[t]=s,(e.children??=[]).push({key:t,scope:s,at:e._slots===null?0:e._slots.length})):!s.mounted&&s.slots[0]===void 0&&H!==null&&ig(e.block,n)&&(c=nl(s,e.block,n));let l=B,u=na.length,d=du;du=0,kr&&s.effectSlots!==null&&ku(),B=s;let f=j?ki(s):-1,p=null;try{if(k){let e=yi(s);p=li(s),e===void 0||ze()===e?r(i,s,void 0):He(e,()=>r(i,s,void 0))}else r(i,s,void 0);p!==null&&ui(p,!1),kr&&s.effectSlots!==null&&Au(s),s.mounted||(s.mounted=!0)}catch(e){throw p!==null&&gc(e)&&ui(p,!0),e}finally{f>=0&&j.endScope(f),na.length!==u&&(na.length=u),du=d,B=l,c!==void 0&&(s.block.endMarker=c)}}function ku(){return uu===0&&(uu=fu++),uu}function Au(e){let t=e.effectSlots;if(t!==null&&uu!==0&&du!==t.length)for(let n=0;n{i.hooks?.delete(e),t===null?i.effectSlots=null:t.length=n})}du++;let t={deps:n,cleanup:void 0,renderVersion:o,revision:0,active:!0,order:i.effectSlots===null?0:i.effectSlots.length,effect:!0,phase:r,slot:e,connectedFn:null,connectedArgs:void 0,disconnected:!1};Vs(i).set(e,t),i.effectSlots===null?(Tr===N&&Ar(),i.effectSlots=[t]):i.effectSlots.push(t),c=t}let l={scope:i,slot:e,fn:t,order:c.order,revision:c.revision,args:n,phase:r,seq:Cu++};(U===null?ds[r]:U.effects[r]).push(l)}var Mu=!1;function Nu(e,t,n){let r=B,i=V;B=null,V=null;let a=j?j.pauseLifecycle():-1;try{let r=!Vr&&!k&&!Re?void 0:n instanceof kl||n instanceof Dl?yi(n):n;r===void 0||ze()===r?Sv(e,t):Ue(r,()=>Sv(e,t))}catch(e){wv(e)}finally{a>=0&&j.resumeLifecycle(a),B=r,V=i}}function Pu(e,t,n){if(t===null)return;let r=B,i=V;B=null,V=null;let a=j?j.pauseLifecycle():-1;try{Wn(e,t,n,wv)}catch(e){wv(e)}finally{a>=0&&j.resumeLifecycle(a),B=r,V=i}}function Fu(e,t,n,r){let i=cu;if(rr&&r!==void 0&&gc(n)){let n=t.idState.renderOwner,r=Qr(t),i=r?.tryBlock??n?.current,a=r??n;if(a!==void 0&&i!=null){ni(e,i,a,!0);for(let t of H?.created??[])!t.disposed&&ys(e,t)&&ni(t,i,a);a.retrySignalOwners!==void 0&&(cu=a.retrySignalOwners)}}let a=Hi.length,o=U?.detaches?.length??0;try{z(e,!1)}finally{cu=i,Hi.length=a,U?.detaches!==void 0&&(U.detaches.length=o)}}function Iu(e,t,n,r){let i=B;B=e;try{k||e.block.idState.renderOwner?.signalOwner!==void 0?bi(e,()=>t(n,r,e)):t(n,r,e)}finally{B=i}}function Lu(e,t,n){let r=B;B=e;try{t(void 0,e,n)}finally{B=r}e.mounted=!0}function Ru(e,t,n,r,i,a,o,s,c){let l=e.block,u=l.currentRenderMode??`urgent`,d=l.currentRenderDeferred,f=B,p=V,m=null,h=null;A&&jg(t),H!==null&&t.env!==s&&L(t,`env`,t.env),t.env=s,(o||0)&4&&s!==void 0&&(H!==null&&t.cachedDeps!==s&&L(t,`cachedDeps`,t.cachedDeps),t.cachedDeps=s),c&&(t.mappedNative!==!0&&L(t,`mappedNative`,t.mappedNative),t.mappedNative=!0);let g=H===null?null:Sg(t,l,H.ops.length),_=g===null?null:Tg(g,t.end),v=_===null?t.end:Cg??wg();try{for(let e=0;e=0&&j.endScope(i),B=r}}var Bu=null,Vu=(e=>e===void 0?null:e);function Hu(e){if(typeof e!=`object`||!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(D(63))}function Uu(e){let t=e.parentNode;if(t.$$next!==void 0)return;L(e,`parentNode`,t);let n=$h(e,t,null).$$next;n.out.push(()=>Wu(t),null,null),e.parentNode=n.frag,rg(n.frag,e)}function Wu(e){if(e.nodeType!==9)e.textContent=``;else for(let t=X(e);t!==null;){let n=Z(t);t.nodeType!==10&&e.removeChild(t),t=n}}function Gu(e){return null}function Ku(e,t){t!==null&&t===void 0&&Bu.delete(e)}function qu(e){if(!qf(e))return e}function Ju(e,t,n){if(Hu(e),t?.bindingLeases!==void 0||t?.controlLeases!==void 0)throw Error(D(76));t=qu(t);let r=Gu(e);ev(e,!0);let i=(t?.identifierPrefix??``)+`r`+El()+`-`;return ls(e,null,null,null,{prefix:i,next:0,signalState:{prefix:t?.signalInstancePrefix??i,next:0}},n,r,t?.signalOwner??(k?Jn(e):void 0),t)}function Yu(e){return Ju(e,void 0,null)}function Xu(e){return(typeof e==`object`||typeof e==`function`)&&e!==null&&e[Xn]===!0}function Zu(e){return Xu(e)&&e.kind===`signal`&&typeof e.set==`function`}function Qu(e){return e!==null&&(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}function $u(e){return!1}function ed([e,t,n]){try{e(...t)}catch(e){Qo(n,e)}}var td=!1;function nd(e,t,n,r){if(t!==void 0&&(A&&(r===!0||gr!==1||B?.block.createdStamp!==hu)&&(A.push(3,e,t,e[t]),Y()),e[t]=n),Vr||k||Re){let n=Fe===null?null:Be();if(Vr||k||n!==null||td){let r=n??(k||B?.block.idState.renderOwner?.signalOwner!==void 0?B===null?ze():B.signalOwner||B:B);if(r!==null){(r instanceof kl||r instanceof Dl)&&!r.signalTokenEscaped&&(r.signalTokenEscaped=!0),td=!0;let n=H;if(t===void 0&&n!==null&&!n.aborted&&!vr)F_(e,r,n);else{let t=e.$$signalOwner;t!==r&&(A&&A.push(9,e,t,null),e.$$signalOwner=r)}}}}}function rd(e){let t=H;return t.aborted||vr||e!==null&&(!A||gr===1)&&e.createdStamp===hu?null:t}var id=Symbol(`octane.direct-signal-binding`);function ad(e,t){return t[qe]=e.scope.block,t}function od(e){return e[Zn]()}function sd(e){if(!e.disposed){e.disposed=!0;try{e.unsubscribe?.()}finally{e.controlWriterCleanup?.(),e.input!==void 0&&e.target.removeEventListener(`input`,e.input)}}}function cd(e,t){return e.policy.kind===`checked`?t.checked??!1:t.selectedValues??t.value}function ld(e,n){let r=e.getAttribute(t);if(r===null)e.setAttribute(t,n);else if(r!==n)throw Error(D(67,n))}function ud(e,t){e.disposed||e.policy.writeBinding(e,t)}function dd(e,t){A&&Ag(e);let n=e.policy,r=fd(e.scope,n);r===null?n.writeBinding(e,t):r.ops.push(ed,[ud,[e,t],e.scope.block]),e.value=t}function fd(e,t){return H===null||t.kind===`text`||t.kind===`textOnlyChild`?null:rd(e.block)}function pd(e,t,n,r,i,a,o){let s=fd(e,t);return s===null?t.write(n,r,t.kind,i,a,o):(s.ops.push(ed,[t.write,[n,r,t.kind,i,a,o],e.block]),r)}function md(e,t){e.text===void 0?e.text=e.policy.kind===`textOnlyChild`?h_(e.target,t):g_(e.target,t):Yd(e.text,t)}function hd(e,t){vd(e.target,t,`attribute`,void 0,e.name,e.attributeKind)}function gd(e,t){let n=e.target;n.localName===`select`?cy(n,t):$v(n,t)}function _d(e,t,n,r){return r instanceof Text?(Yd(r,t),r):n===`textOnlyChild`?h_(e,t):g_(e,t)}function vd(e,t,n,r,i,a){let o=e;return a===`class`?o.namespaceURI===`http://www.w3.org/1999/xhtml`?W(o,t,!0):Df(o,t):a(o,i,t),t}function yd(e,t,n,r,i,a){let o=e;return o.localName===`select`?cy(o,t):$v(o,t),t}var bd={kind:`text`,writeBinding:md,write:_d},xd={kind:`textOnlyChild`,writeBinding:md,write:_d},Sd={kind:`attribute`,writeBinding:hd,write:vd},Cd={kind:`value`,writeBinding:gd,write:yd,control:{validateNew(e,t,n){},snapshot(e,t){let n=ie(e);return n!==null&&ld(e,t),n},restored:(e,t)=>ae(e,t),activate(e,t){Td(e),e.pendingControl||oe(e.target,t)},adopt:Ed}};function wd(e){if(!(e.disposed||e.pendingControl||e.handle===null||e.scope.block.disposed)){if(H!==null)So(e.scope.block);else try{bi(e.scope,()=>{let t=od(e.handle);Object.is(e.value,t)||dd(e,t)})}catch{So(e.scope.block)}}}function Td(e){if(!Zu(e.handle))return;let t=e.target;ld(t,e.site);let n=e.handle,r=()=>{if(e.disposed||e.pendingControl)return;let r=ie(t);r!==null&&Rn(()=>bi(e.scope,()=>n.set(cd(e,r))))};e.input=r,t.addEventListener(`input`,r),e.controlWriterCleanup=_(t,e.policy.kind===`checked`?`checked`:`value`,t=>Rn(()=>bi(e.scope,()=>{!e.disposed&&!e.pendingControl&&Zu(e.handle)&&e.handle.set(t)})))}function Ed(e,t=0){Nl(()=>{e.disposed||e.scope.block.disposed||!e.pendingControl||Rn(()=>bi(e.scope,()=>{let n=e.target,r=ie(n);Zu(e.handle)&&(r.editRevision>t||n.localName===`textarea`&&Object.is(od(e.handle),e.value))&&e.handle.set(cd(e,r)),e.disposed||e.scope.block.disposed||(oe(n,r.revision)?(e.pendingControl=!1,dd(e,od(e.handle))):Ed(e,t))}))})}function Dd(e,t){e.disposed||(e.handle!==null&&(e.unsubscribe=e.handle[Qn](ad(e,()=>wd(e)))),t!==void 0&&e.policy.control.activate(e,t))}function Od(e,t,n,r,i,a,o,s){i.control?.validateNew(e,t,i.kind);let c=Xu(n)?n:null,l={[id]:!0,scope:e,policy:i,target:t,site:r,name:a,attributeKind:o,handle:c,value:e,disposed:!1};s!==void 0&&(l.text=s);let u=i.control?.snapshot(t,r)??null,d=c===null?n:od(c);return l.pendingControl=!1,l.pendingControl&&(l.value=d),l.pendingControl||dd(l,d),Dd(l,u?.revision),l.pendingControl&&i.control.adopt(l),Hs(e,()=>sd(l)),l}function kd(e,t,n,r,i,a,o,s){let c=a.kind,l=typeof t==`object`&&t&&t[id]===!0?t:null,u=Xu(r)?r:null;if(u!==null&&(!k||ze()!==e.signalOwner)&&(k||Hr(),ze()!==yi(e)))return bi(e,()=>kd(e,t,n,r,i,a,o,s));if(u===null&&l===null)return c===`attribute`&&t===r?t:(A&&Y(),pd(e,a,(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n,r,t,o,s));if(l!==null&&!l.disposed&&l.target===n&&l.policy===a&&l.site===i&&l.name===o&&l.attributeKind===s&&l.handle===u){if(l.pendingControl)return a.control.adopt(l),l;let e=od(u);return Object.is(l.value,e)||dd(l,e),l}if(A&&Y(),u===null){let i=pd(e,a,c===`text`||c===`textOnlyChild`?l?.text??l?.target??n:n,r,c===`text`||c===`textOnlyChild`?l?.text:l?.value??t,o,s);if(l!==null){let e=e=>{e||sd(l)};U===null?e(!1):(U.renderCleanups??=[]).push(e)}return i}let d=Od(e,(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n,r,i,a,o,s,c===`text`||c===`textOnlyChild`?l?.text??(t instanceof Text?t:void 0):void 0);if(l!==null){let e=e=>sd(e?d:l);U===null?e(!1):(U.renderCleanups??=[]).push(e)}return d}function Ad(e,t,n,r,i,a=!1,o,s=void 0,c){if(t instanceof Text&&!Xu(r))return arguments.length>6&&o===r||Yd(t,r),t;if(t===void 0&&c!==void 0&&(t=v_(n,``,c)),t===void 0&&a&&s===1){let e=X(n);e instanceof Text&&(t=e)}return kd(e,t,t?.target??(t instanceof Text?t:n),r,i,a?xd:bd)}function jd(e,t,n,r,i,a,o){return t===i&&i!==void 0&&(i===null||typeof i!=`object`&&typeof i!=`function`)?t:kd(e,t,n,i,a,Sd,r,o)}function Md(e,t,n,r,i){return kd(e,t,n,r,i,Cd)}function Nd(e,t,n,r,i,a,o=i){let s=r===o&&(r!==void 0||!0);if(Xu(r)){let e=i,t=e?.[id]===!0&&e.handle===r&&!e.disposed;if(t&&e.pendingControl)e.policy.control.adopt(e),s=!0;else{let n=Fd(a,r);s=t&&Object.is(e.value,n)}}return q(a,t,n,s?e:r,e)}function Pd(e,t){try{if(typeof t!=`object`||!t||typeof t.then!=`function`)return!1}catch{return!1}return So(e.next[e.$&255].block),!0}function Fd(e,t){return(!k||ze()!==e.signalOwner)&&(k||Hr(),ze()!==yi(e))?bi(e,()=>od(t)):od(t)}var Id=Symbol(`octane.signal-host-prop-sources`),Ld=Symbol(`octane.direct-signal-child`),Rd=0;function zd(e){e.disposed||(e.disposed=!0,e.unsubscribe?.())}function Bd(e){if(!(e.disposed||e.scope.block.disposed)){if(H!==null)So(e.scope.block);else try{bi(e.scope,()=>{let t=od(e.handle);if(Object.is(e.value,t))return;let n=e.scope.slots[e.slotKey],r=typeof t,i=t==null||r!==`object`&&r!==`function`?pp(t):null;n===void 0&&e.text!=null&&i!==null&&i!==``?(Kd(e.text,i),e.value=t):n===e.state&&n?.block===null&&n.forSlot===null&&n.hostNode===null&&n.portal===null&&i!==null&&i!==``&&n.text!==null?(Kd(n.text,i),e.value=t):So(e.scope.block)})}catch{So(e.scope.block)}}}function Vd(e,t,n,r,i,a,o,s,c,l,u,d){let f=u&&n!=null&&typeof n!=`object`;if(f&&n===a&&!uf(i,a))return a;let p=typeof n==`object`&&n&&n[Ld]===!0?n:null,m=p?.text??(n instanceof Text?n:f?X(i):null);if(!Xu(a)){let h=typeof a,g=r!==0&&!u&&d===void 0&&a!==null&&h!==`object`&&h!==`function`&&!(V?.pending&&!V.crossRenderUpdate);if(g&&p===null){let e=t.slots[r],o=e?.text;if(o!=null&&e.block===null&&e.forSlot===null&&e.hostNode===null&&e.portal===null&&e.implicitSignal===void 0&&!uf(i,a))return n!==a&&Yd(o,a===!0?``:a),a}let _=e(t,r,i,a,o,s,c,l,u,d,m);if(p!==null){A&&Y();let e=e=>{e||zd(p)};U===null?e(!1):(U.renderCleanups??=[]).push(e)}return g||_!==null&&h!==`object`&&h!==`function`&&t.slots[r]===void 0&&(f||n===null&&!t.mounted||X(i)===_)?a:_}if(p!==null&&!p.disposed&&p.handle===a){let n=od(a);A&&Ag(p);let f=e(t,r,i,n,o,s,c,l,u,d,m);return u&&(p.text=f),p.value=n,p.state=t.slots[r],p}let h=od(a),g=e(t,r,i,h,o,s,c,l,u,d,m);A&&Y();let _={[Ld]:!0,scope:t,slotKey:r,handle:a,text:g,state:t.slots[r],value:h,disposed:!1};if(_.unsubscribe=a[Qn](ad(_,()=>Bd(_))),Hs(t,()=>zd(_)),p!==null){let e=e=>zd(e?_:p);U===null?e(!1):(U.renderCleanups??=[]).push(e)}return _}function Hd(e,t,n,r,i,a,o,s,c,l){if(Rd!==0)return!1;let u=t.slots[n]?.implicitSignal,d=Xu(i);if(!d&&u===void 0)return!1;d&&!k&&Yn(1),Rd++;let f;try{f=bi(t,()=>Vd(e,t,u,n,r,i,a,o,s,c,void 0,l))}finally{Rd--}let p=t.slots[n];return p!==void 0&&(p.implicitSignal=f),!0}var Ud=(()=>{let e=globalThis.trustedTypes;try{return e?e.createPolicy(`octane`,{createHTML:String}):null}catch{return null}})();function Wd(e,t){let n=globalThis.trustedTypes;return e!==null&&n&&(n.isHTML(e)||n.isScriptURL(e)||n.isScript(e))&&t===String(e)?e:t}function Gd(e,t){iu!==null&&iu(e,t)||e.nodeValue!==t&&(A&&Y(),e.nodeValue=t)}function Kd(e,t,n){let r=e??n.firstChild;A&&Y();let i=m_(t);iu!==null&&iu(r,i)||(r.nodeValue=i)}function qd(e,t,n){let r=H===null?null:rd(e);if(r===null){Gd(t,n);return}let i=r.texts;if(i===null||!i.has(t)){if(iu===null&&t.nodeValue===n)return;(r.texts??=new Set).add(t)}r.ops.push(Jd,[t,n])}function Jd(e){Gd(e[0],e[1])}function Yd(e,t){let n=H===null?null:rd(V);if(n===null)return Kd(e,t);A&&Y(),n.ops.push(Xd,[e,t])}function Xd(e){Kd(e[0],e[1])}function Zd(e,t){let n=t==null?``:String(t),r=typeof t==`object`?Wd(t,n):n,i=H===null?null:rd(V);if(i!==null){i.ops.push(ef,[e,r]);return}let a=X(e);(a===null||a!==e.lastChild||a.nodeType!==3||a.nodeValue!==n)&&(H!==null&&Y(),e.textContent=r)}function Qd(e,t){let n=t==null?``:String(t),r=typeof t==`object`?Wd(t,n):n,i=e;if(e.localName===`script`){Zd(e,r);return}if(i[tf]===n)return;L(e,tf,i[tf]),i[tf]=n;let a=H===null?null:rd(V);a===null?e.innerHTML=r:(Y(),a.ops.push($d,[e,r]))}function $d(e){e[0].innerHTML=e[1]}function ef(e){Zd(e[0],e[1])}var tf=Symbol(`octane.dangerHTMLValue`),nf=`__oct_dangerHTML`,rf=!1,af=`__oct_dangerChild`,of=`__oct_dangerSpreadChild`;function sf(){return Error(D(5))}function cf(e){if(e!=null&&(typeof e!=`object`||!(`__html`in e)))throw Error(D(6))}function lf(e,t){cf(t),L(e,nf,e[nf]);let n=e[nf]===!0;if(t==null){if(e[nf]=!1,n){Qd(e,null);let t=e;t[tf]!==void 0&&(L(e,tf,t[tf]),t[tf]=void 0)}}else{if(t!=null&&Nt.has(e.localName))throw Error(D(7,e.localName));if(t!=null&&(e.__oct_dangerChild===!0||e.__oct_dangerSpreadChild!=null))throw sf();e[nf]=!0,rf=!0,Qd(e,t.__html)}}function uf(e,t){if(!rf||e.nodeType!==1||e.__oct_dangerHTML!==!0)return!1;if(t!=null)throw sf();return!0}var df=`http://www.w3.org/1999/xlink`,ff=`http://www.w3.org/XML/1998/namespace`,pf=`http://www.w3.org/2000/xmlns/`,mf=`http://www.w3.org/2000/svg`,hf=`http://www.w3.org/1998/Math/MathML`;function gf(e){return e.namespaceURI===`http://www.w3.org/1999/xhtml`&&e.localName.indexOf(`-`)!==-1}function _f(e,t){return e===`svg`?mf:e===`math`?hf:t===void 0&&Lt.has(e)?mf:t}var vf=function e(t){if(t.nodeType!==1){let n=t.$$next;return n===void 0?void 0:e(n.parent)}let n=t;if(n.namespaceURI===`http://www.w3.org/2000/svg`)return n.localName===`foreignObject`?void 0:mf;if(n.namespaceURI===`http://www.w3.org/1998/Math/MathML`)return hf};function yf(e){if(e===`xmlns`)return pf;let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(0,t);return n===`xlink`?df:n===`xml`?ff:n===`xmlns`?pf:null}function bf(e,t,n){if(typeof n!=`function`&&e.$$ceListeners?.[t]===void 0)return!1;let r=t.endsWith(`Capture`),i=r?t.slice(2,-7):t.slice(2),a=e.$$ceListeners??={},o=a[t];return o!==void 0&&o!==n&&e.removeEventListener(i,o,r),typeof n==`function`?(o!==n&&e.addEventListener(i,n,r),a[t]=n,e.removeAttribute(t),!0):(delete a[t],!1)}function xf(e,t,n){if(t===`innerText`||t===`textContent`)return;if(t===`dangerouslySetInnerHTML`){lf(e,n);return}if(t===`suppressContentEditableWarning`||t===`suppressNativeChangeWarning`||t===`__octaneNativeChangeDiagnostic`)return;switch(t.length){case 5:if(t===`value`){let t=e.localName;if(t===`input`||t===`textarea`)return $v(e,n);if(t===`select`)return cy(e,n)}else if(t===`muted`&&!gf(e)){e.muted=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 7:if(t===`checked`&&e.localName===`input`)return sy(e,n);break;case 8:if((t===`multiple`||t===`selected`)&&!gf(e)){e[t]=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 9:if(t===`autoFocus`&&!gf(e))return Kv(e,n);break;case 12:if(t===`defaultValue`){let t=e.localName;if(t===`input`||t===`textarea`||t===`select`)return uy(e,n)}break;case 14:if(t===`defaultChecked`&&e.localName===`input`)return py(e,n)}if(t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&gf(e)&&bf(e,t,n))return;if(!gf(e)){let e=Rt.get(t);e!==void 0&&(t=e)}let r=Ef(e,t,n);r!==null&&(r=me(e.localName,t,r));let i=yf(t);if(A&&Y(),r===null){if(i){let n=t.indexOf(`:`);e.removeAttributeNS(i,n>=0?t.slice(n+1):t)}else e.removeAttribute(t);return}if(!It.test(t))return;let a=typeof n==`object`?Wd(n,r):r;i?e.setAttributeNS(i,t,a):e.setAttribute(t,a)}function Sf(e,t,n){let r=typeof n,i=n==null||r===`boolean`||r===`function`||r===`symbol`?null:String(n);A&&Y(),i===null?e.removeAttribute(t):e.setAttribute(t,r===`object`?Wd(n,i):i)}function Cf(e,t,n){let r=typeof n,i;i=n==null||r===`function`||r===`symbol`?null:typeof n==`string`?n:String(n),A&&Y(),i===null?e.removeAttribute(t):e.setAttribute(t,i)}function wf(e,t,n){let r=typeof n,i=!n||r===`function`||r===`symbol`?null:``;A&&Y(),i===null?e.removeAttribute(t):e.setAttribute(t,i)}function Tf(e,t,n){let r=n==null||typeof n==`function`||typeof n==`symbol`?null:String(n);A&&Y(),r===null?e.removeAttribute(t):e.setAttribute(t,r)}function Ef(e,t,n){if(t.charCodeAt(0)===97&&t.startsWith(`aria-`))return n==null||typeof n==`function`||typeof n==`symbol`?null:String(n);let r=typeof n;if(r===`boolean`&&zt(t)||r===`boolean`&&t.startsWith(`data-`))return n?`true`:`false`;if(r===`function`||r===`symbol`)return null;if(!gf(e)){let e=t.toLowerCase();if(Pt.has(e)||r===`boolean`&&(e===`download`||e===`capture`))return n?``:null;if(r===`boolean`||Ft.has(e)&&!(Number(n)>=1)||(e===`rowspan`||e===`start`)&&Number.isNaN(Number(n))||t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110)return null}if(n==null||n===!1)return null;let i;return i=n===!0?``:String(n),i===``&&(t===`src`||t===`href`&&e.nodeName!==`A`&&e.nodeName!==`AREA`||t===`data`&&e.nodeName===`OBJECT`)?null:i}function W(e,t,n){let r=typeof t==`string`?t:ce(t);A&&(n===!0||gr!==1||B?.block.createdStamp!==hu)&&Y(),t==null||t===!1?e.removeAttribute(`class`):e.className=r}function Df(e,t){let n=t==null||t===!1?null:ce(t);A&&Y(),n===null?e.removeAttribute(`class`):e.setAttribute(`class`,n)}var Of=`!important`;function kf(e,t,n){let r=e.style;au!==null&&au(e,t,n)||(A&&Y(),jf(e,r,t,n))}function Af(e,t,n,r,i,a=B){let o=n==null||typeof n==`boolean`;if(o&&i===a||au!==null&&au(e,n,i,t))return;A&&Y();let s=e.style;o?s.removeProperty(nr(t)):Mf(e,s,t,n)}function jf(e,t,n,r){if(n==null||n===!1||n===``){if(r&&typeof r==`object`)for(let e in r)t.removeProperty(nr(e));else typeof r==`string`&&(t.cssText=``)}else if(typeof n==`string`)r!==n&&(t.cssText=n);else if(r&&typeof r==`object`){for(let e in r)e in n||t.removeProperty(nr(e));for(let i in n){let a=n[i];a!==r[i]&&(a==null||typeof a==`boolean`?t.removeProperty(nr(i)):Mf(e,t,i,a))}}else{typeof r==`string`&&(t.cssText=``);for(let r in n){let i=n[r];i!=null&&typeof i!=`boolean`&&Mf(e,t,r,i)}}}function Mf(e,t,n,r){let i=nr(n),a;a=Bt(n,r);let o=a.trimEnd();o.endsWith(Of)?t.setProperty(i,o.slice(0,o.length-10).trimEnd(),`important`):t.setProperty(i,a)}function Nf(e,t,n){if(t===`class`||t===`className`)A&&Y(),e.removeAttribute(`class`);else if(t===`style`)kf(e,null,n);else if(t===`dangerouslySetInnerHTML`)lf(e,null);else if(t===`suppressHydrationWarning`)e.__oct_suppress=!1;else if(t!==`suppressNativeChangeWarning`&&t!==`__octaneNativeChangeDiagnostic`){let n=Pf(e,t);if(n!==null){C_(e,n,null);return}let r=O_(t,e);r?nd(e,r.key,null,!0):xf(e,t,null)}}function Pf(e,t){return t===`action`&&e.localName===`form`?`action`:(t===`formAction`||t===`formaction`)&&(e.localName===`button`||e.localName===`input`)?`formaction`:null}function Ff(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)}var If=3,Lf=null,Rf=new WeakMap;function zf(e){if(e==null||e===!1)return null;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return ce(e);if(typeof e==`object`&&e||typeof e==`function`)return Rf.get(e)}function Bf(e,t,n){let r=zf(n),i=t==null||t===!1?null:ce(t);(typeof t==`object`&&t||typeof t==`function`)&&Rf.set(t,i),A&&Y(),(H!==null&&rd(V)!==null||r===void 0||r!==i||e.getAttribute(`class`)!==i)&&(i===null?e.removeAttribute(`class`):e.setAttribute(`class`,i))}function Vf(e,t,n,r,i){let a=!!(i&4),o=a&&n===void 0&&e.localName===`input`;if(t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),`suppressHydrationWarning`)&&(e.__oct_suppress=t.suppressHydrationWarning===!0),n){for(let r in n)if(r!==`key`&&r!==`children`&&(a||Ff(n,r))&&!((i&If)!==0&&Lf(e,r,i))){if(r===`ref`){let r=t?t.ref:void 0;n.ref!=null&&n.ref!==r&&Ui(n.ref,e)}else t!=null&&(a?r in t:Ff(t,r))||Nf(e,r,n[r])}}if(t==null)o&&Sm(e);else{for(let s in t){if(s===`key`||s===`children`||!a&&!Ff(t,s)||(i&If)!==0&&Lf(e,s,i))continue;let c=t[s],l=n?n[s]:void 0;if(o&&(s===`defaultChecked`||s===`checked`&&c!=null)&&(o=!1),s===`ref`){if(c===l)continue;if(a){if(c==null)continue;ym(r)}r?Wr(r,c,e):Xi(c,e);continue}if(s===`suppressHydrationWarning`||s===`suppressNativeChangeWarning`||s===`__octaneNativeChangeDiagnostic`)continue;if(s===`class`||s===`className`){if(c===l)continue;a?Df(e,c):Bf(e,c,l);continue}if(s===`style`){kf(e,c,l);continue}if(s===`dangerouslySetInnerHTML`){a&&c===l||lf(e,c);continue}let u=Pf(e,s);if(u!==null){if(c===l)continue;Hf(e,u,c,l);continue}if(c===l&&!yy(e,s))continue;let d=O_(s,e);if(d){if(c===l)continue;d.capture?W_.has(d.type)||Q_([d.type]):L_.has(d.type)||Y_([d.type]),nd(e,d.key,c,!0)}else(n===void 0||s!==`autoFocus`||gf(e))&&xf(e,s,c)}o&&Sm(e)}}var Hf=C_,Uf=null,Wf=Symbol(`octane.scopedChildren`);function Gf(e){return e==null||typeof e!=`object`&&typeof e!=`function`?!1:e.key!==void 0}var Kf=Symbol(`octane.scopedValue`);function qf(e){return e!=null&&e.$$kind===cn}function Jf(e){let t;try{t=String(e)}catch{return`object with keys {`+Object.keys(e).join(`, `)+`}`}return t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t}function Yf(e){let t=Jf(e);return Error(D(3,t))}function Xf(e){let t=e===null?`null`:e===void 0?`undefined`:typeof e==`object`?Jf(e):JSON.stringify(e);return Error(D(24,t))}function Zf(e,t,n){e.$$ctxValues===null&&(e.$$ctxValues=new Map);let r=e.$$ctxValues,i=r.has(t),a=i?r.get(t):void 0;i&&Object.is(a,n)||(H!==null&&Ya(()=>{i?r.set(t,a):r.delete(t)}),i&&(t.$$providerVersion=t.$$providerVersion===t.$$version?t.$$version+1:-1,t.$$version++,Et()),r.set(t,n))}var Qf=Symbol.for(`octane.childrenBody`),$f=Symbol.for(`octane.childrenCaptures`),ep=Symbol();function tp(e,t){let n=e[Qf],r=t[Qf];return n===void 0||r===void 0||n===r}function np(e){return e.$$singleRoot=!0,e}function rp(e,t,n){return typeof e==`function`&&(e[dn]=!0,t!==void 0&&(e[Qf]=t),n!==void 0&&(e[$f]=n),Fe!==null&&(e[ep]=Be())),e}function ip(e){return typeof e==`function`&&e[dn]===!0}var ap=Symbol(`octane.childrenDialect`);function op(e,t,...n){return sc(B,e,n,t)}var sp=Symbol.for(`octane.lazyBodyCheck`);function cp(e,t){Object.defineProperty(e,sp,{get(){return this===e?t:void 0}})}var lp=Symbol(`NO_KEY`);function G(e,t,n,r,i,a,o,s,c,l,u){let d=Uf,f=d!==null&&r===d.type;if(!f&&typeof r!=`function`&&typeof r!=`string`)throw Xf(r);let p=f?d.body:typeof r==`string`?oh:r;f&&(s=!1,c=!1,!u&&l===void 0&&Gf(i)&&(l=i.key,u=!0)),fp(Rl,e,t,n,p,r,i,typeof r==`string`?{$$kind:cn,type:r,props:i,key:null,ref:i!=null&&i.ref!==void 0?i.ref:null,children:i==null?null:i.children}:i,o,l,s,c,u,typeof r==`string`?`r:`:a)}function up(e,t,n,r,i,a,o,s,c,l,u){if(typeof r!=`function`)throw Xf(r);fp(Rl,e,t,n,r,r,i,i,o,l,s,c,u,a)}function dp(e,t,n,r,i,a,o,s,c,l,u){if(typeof r!=`function`)throw Xf(r);fp(null,e,t,n,r,r,i,i,o,l,s,c,u,a)}function fp(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(V?.pending&&!V.crossRenderUpdate)return;if(n===0&&t!==Il){let e=t.slots[0];if(e?.returnedOutput===!0){if(e.__kind===`componentSlotSlot`)Ll(e,!1);else{let e=t.block;if(e.outputHandler(e,null,!0),e.disposed)return}}}let m=t.block;if(t.slots[n]===void 0&&H!==null&&m.createdStamp!==H.createdStamp){let d=dm(m,r,c);if(d!==null){try{fp(e,t,n,d.parentNode,i,a,o,s,d,l,u,!1,f,p)}finally{fm(t,d,c)}return}}let h=t.slots[n];if(h===void 0){let e=null,i=null,o=!1;if(d===!0&&rn(a,1)&&(d=!1),d===!0&&m!==null){let t=m.startMarker,n=m.endMarker;t!=null&&n!=null&&t!==n&&t.nodeType===8&&n.nodeType===8?(e=t,i=n,o=!0):t===null&&n===null&&(o=!0)}o||(u===!0||u===2&&a.$$singleRoot===!0?(e=null,i=null):(e=document.createComment(`comp`),i=document.createComment(`/comp`),r.insertBefore(e,c??null),r.insertBefore(i,c??null))),h={__kind:`componentSlotSlot`,start:e,end:i,anchor:c??null,singleRoot:e===null&&!o,inherited:o,block:null,currentComp:null,prevKey:lp,keyed:f===!0||l!==void 0,next:null},t.slots[n]=h,Yl(t,h)}let g=l===void 0?lp:``+l,_=g!==h.prevKey,v=a!==h.currentComp||_,y=H!==null&&h.block!==null&&v,b=y&&ig(m,r);if(y&&Xa(h),f!==!0&&l===void 0||h.keyed||(y||L(h,`keyed`,h.keyed),h.keyed=!0),_&&(h.currentComp=null),!y&&!Object.is(h.prevKey,g)&&L(h,`prevKey`,h.prevKey),h.prevKey=g,v){let o=Vr||k?{parentScope:t,invocationSite:p,key:l,hasKey:l!=null}:void 0,c=h.block===null||!h.block.mounted||m.idState.renderOwner?.signalOwner===void 0?void 0:{parent:t,slot:n,kind:h.__kind,branch:void 0,component:a,key:g};if(b){hp(h,m,r,i,a,s,e,o,c);return}if(h.block){if(h.inherited){if(z(h.block),m.disposed)return;if(h.start===null)for(;X(r);)r.removeChild(X(r))}else if(h.singleRoot){if(z(h.block),m.disposed)return}else{let e=Z(h.end);if(z(h.block),m.disposed)return;let t=document.createComment(`comp`),n=document.createComment(`/comp`);r.insertBefore(t,e),r.insertBefore(n,e),h.start=t,h.end=n}}if(h.currentComp=a,h.singleRoot){let t=h.anchor?h.anchor.previousSibling:r.lastChild,n=Al(`dynamic`,m,r,null,h.anchor,i,s,void 0,e);o!==void 0&&gi(n,o),h.block=n;try{P(n)}finally{let e=h.anchor?h.anchor.previousSibling:r.lastChild;e!==null&&e!==t&&(n.startMarker=e,n.endMarker=e)}}else{let t=Al(`dynamic`,m,r,h.start,h.end,i,s,void 0,e);o!==void 0&&gi(t,o),h.inherited&&(t.exclusiveMarkers=!0),h.block=t,P(t)}}else if(h.block){if(Pr&&Pr(h.block,a,o))return;h.block.props!==s&&L(h.block,`props`,h.block.props),h.block.props=s,P(h.block)}}function pp(e){return e==null||e===!1||e===!0?``:String(e)}function mp(e,t,n,r,i,a,o,s,c){let l=document.createComment(n),u=document.createComment(`/`+n);e.append(l,u);let d=Al(`dynamic`,t,e,l,u,r,i,void 0,a);s!==void 0&&gi(d,s),c!==void 0&&Zr.set(d,c),o&&(d.$$implicitBail=!0,d.memoInChain=!0);try{P(d)}catch(n){throw Fu(d,t,n,c),pm(e,l.previousSibling,null),n}return d}function hp(e,t,n,r,i,a,o,s,c){let l=e.block,u=eo(H,l),d=e.inherited,f=l.startMarker,p=l.endMarker,m=null,h=null,g;u?g=e.next.before:d?(m=e.start===null?X(n):Z(e.start),m===e.end?m=null:h=e.end===null?n.lastChild:e.end.previousSibling,g=e.end):(m=e.start??f,h=e.end??p,m===null?(g=e.anchor,h=null):g=Z(h));let _=mp(Qh(e,t,n,g),t,`comp`,r,a,o,!1,s,c);if(u?z(l):ag(e,l,m,h),t.disposed)return;e.start=_.startMarker,e.end=_.endMarker,e.singleRoot=!1,e.inherited=!1,e.block=_,e.currentComp=i;let v=e.next;!u&&!d&&m!==null&&(v.follows=!0,om(t,f,p)&&(v.bound=[t,f,p,null,null])),v.bound!==null&&(v.bound[3]=e.start,v.bound[4]=e.end)}function gp(e,t=!1){j&&(U!==null||!t)&&j.spliceCapture(e,U);let n=e.renderedBlocks;if(e.renderedBlocks=null,e.renderRoot=null,n!==null&&U!==null)for(let e of n)Fl(U,e);if(ar){for(let t=0;t<3;t++){let n=e.effects[t],r=U===null?ds[t]:U.effects[t];for(let e=0;eyh(s,null),n,i);e.block=null,e.forSlot=null,e.text=null,e.hostNode=null,e.currentComp=null,e.ownerHost!==null&&(e.start=null,e.end=null);return}}let n=e.block!==null;if(e.block!==null&&(z(e.block,!1),e.block=null),e.ownerHost!==null){let t=e.ownerHost,r=X(t);for(;r!==null;){let e=Z(r);n||yh(r,null),t.removeChild(r),r=e}e.start=null,e.end=null}else if(e.start!==null){let t=e.start.parentNode;if(t!==null){let r=Z(e.start);for(;r!==null&&r!==e.end;){let e=Z(r);n||yh(r,null),t.removeChild(r),r=e}}}else e.text===null?e.hostNode!==null&&e.hostNode.parentNode!==null&&(yh(e.hostNode,null),e.hostNode.parentNode.removeChild(e.hostNode)):e.text.remove();e.text=null,e.currentComp=null,e.hostNode=null}function yp(e){let t=e.$$ctxReads;if(t===null)return!1;for(let[e,n]of t)if(e.$$version!==n)return!0;return!1}function bp(e){let t=e.$$ctxDirect;if(t===null)return!1;for(let e=t;e!==null;e=e.next){let{context:t,read:n}=e,r=typeof n==`number`?n:n.version;if(t.$$version!==r){if(typeof n==`number`||t.$$providerVersion!==t.$$version||!Object.is(n.owner.$$ctxValues?.get(t),n.value))return!0;n.version=t.$$version}}return!1}function xp(e){if(e.$$ctxDepsEpoch!==Tt.value){if(bp(e))return!1;yp(e)?Sp(e):e.$$ctxDepsEpoch=Tt.value}return!0}function Sp(e){gh(e,Cp,!1)}function Cp(e){e.block===e?kp(e):gh(e,Cp,!1)}function wp(e,t,n){if(t.__memo!==!0||!e.mounted||e.renderStatus!==0)return!1;let r=t.__compare;if(!(r?t[sp]===void 0?r(e.props,n):r(e.props,n,e):Np(e.props,n)))return!1;if(Qc){if(!Qc.clean(e))return!1;Qc.restamp(e)}return!0}function Tp(e){if(e.$$implicitBail!==!0||!e.mounted||e.renderStatus!==0)return!1;let t=e.body[sp];if(t!==void 0&&!t(e))return!1;if(Qc){if(!Qc.clean(e))return!1;Qc.restamp(e)}return!0}function Ep(e){let t=e.$$ctxReads,n=e.$$ctxDirect,r=t!==null&&t.size>0,i=n!==null;if(r||i)for(let a=e.parentBlock;a!==null;a=a.parentBlock){if(a.body?.__memo!==!0&&a.$$implicitBail!==!0)continue;let e=a.$$ctxReads??=new Map;if(r)for(let[n,r]of t){let t=e.get(n);if(t!==r){let i=n.$$version;(t===void 0||t===i)&&(e.set(n,r),r!==i&&(a.$$ctxDepsEpoch=-1))}}if(i)for(let t=n;t!==null;t=t.next){let{context:n,read:r}=t,i=typeof r==`number`?r:r.version,o=e.get(n);if(o!==i){let t=n.$$version;(o===void 0||o===t)&&(e.set(n,i),i!==t&&(a.$$ctxDepsEpoch=-1))}}}}function Dp(e){if(e.block===e){let t=e;if(t.body?.__memo===!0||t.$$implicitBail===!0){Ep(t);return}t.$$ctxDirect!==null&&Ep(t)}gh(e,Dp)}function Op(e){if(e.__kind===`forBlockSlot`){for(let t=e.head;t!==null;t=t.nextSibling)Dp(t);e.emptyBlock!==null&&Dp(e.emptyBlock)}else if(e.block!==void 0&&e.block!==null)Dp(e.block);else if(e.__kind===`childSlot`){if(e.forSlot!==null){let t=e.forSlot;for(let e=t.head;e!==null;e=e.nextSibling)Dp(e);t.emptyBlock!==null&&Dp(t.emptyBlock)}else e.portal?.block!==void 0&&e.portal.block!==null&&Dp(e.portal.block)}}function kp(e){let t=e.$$ctxDepsEpoch===Tt.value;!t&&bp(e)?P(e):e.body?.__memo===!0||e.$$implicitBail===!0?t||(yp(e)?Sp(e):e.$$ctxDepsEpoch=Tt.value):(t||(e.$$ctxDepsEpoch=Tt.value),Sp(e))}function Ap(e,t){e.renderStatus===0?Qc&&t&&Qc.refresh(e):P(e)}function jp(e,t,n,r=!1){let i=Tt.value;if(n===void 0)return i;let a=r&&e.block.memoInChain,o=V!==null&&V.renderStatus!==0;if(n===i&&!a&&!o)return i;let s=e.slots[t];if(s==null)return i;if(o){let e=n!==i,t=s.__kind===`forBlockSlot`?s:s.__kind===`childSlot`?s.forSlot:null;if(t!==null){for(let n=t.head;n!==null;n=n.nextSibling)Ap(n,e);t.emptyBlock!==null&&Ap(t.emptyBlock,e)}else{let t=s.block??(s.__kind===`childSlot`?s.portal?.block:null);t!=null&&Ap(t,e)}return Qc&&a&&Qc.restampSlot(s),i}if(Qc&&n!==i){let e=Qc.refresh;if(s.__kind===`forBlockSlot`){for(let t of s.items.values())e(t);s.emptyBlock&&e(s.emptyBlock)}else if(s.block)e(s.block);else if(s.__kind===`childSlot`&&s.forSlot)for(let t of s.forSlot.items.values())e(t);else s.__kind===`childSlot`&&s.portal?.block&&e(s.portal.block)}return Qc&&a&&Qc.restampSlot(s),i}var Mp=Object.prototype;function Np(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t);if(n!==Mp&&n!==null||r!==Mp&&r!==null)return Pp(e,t);let i=0;for(let n in e){let r=e[n];if(!Object.is(r,t[n])||(r===void 0||typeof r==`object`||typeof r==`function`)&&!Zt.call(t,n))return!1;i++}for(let e in t)i--;return i===0}function Pp(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;rr(i)&&(t?t(e,n):Np(e,n))})),n}function zp(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n.kind===`portal`&&n.parentNode===t)return!0;return!1}function Bp(e,t,n,r,i,a,o,s,c,l,u){return c?Kp(e,t,n,r,u):(l===void 0?Hp(e,t,n,r,i,a,o,s):Vp(e,t,n,r,l,i,a),null)}function Vp(e,t,n,r,i,a,o){Hp(e,t,n,r,a,o,void 0,!1,!0,void 0,void 0,void 0,void 0,void 0,i)}function Hp(e,t,n,r,i,a,o,s,c=!0,l,u,d,f,p,m){if(V?.pending&&!V.crossRenderUpdate)return;if(t===0&&e!==Il){let t=e.slots[0];if(t?.returnedOutput===!0){if(t.__kind===`childSlot`)Ll(t,!1);else{let t=e.block;if(t.outputHandler(t,null,!0),t.disposed)return}}}if(e.slots[t]===void 0&&o===void 0&&H!==null&&e.block.createdStamp!==H.createdStamp){let a=dm(e.block,n,i);if(a!==null){try{Hp(e,t,a.parentNode,r,a,!1,void 0,s,c,l,u,d,f,p,m)}finally{fm(e,a,i)}return}}if(Ir){if(Ir(Bp,e,t,n,r,i,a,o,s,m))return}else if(it&&Hd(Bp,e,t,n,r,i,a,o,s,m))return;if(r!=null&&c&&n.nodeType===1&&Nt.has(n.localName)&&!zp(e.block,n))throw Error(D(26,n.localName));if(uf(n,r))return;let h=e.block;for(;r!==null&&(typeof r==`object`||typeof r==`function`);)if($c&&r.$$kind===un)r=$c(r);else if(typeof r.then==`function`){if(rr)r=_c(r);else throw r}else break;let g=typeof r==`function`?r:null,_=Lm(r);_!==null&&(r=_);let v=l===void 0?Im(r,!1,c,void 0):{items:r,keys:null},y=e.slots[t],b=!1;if(y!==void 0&&H!==null){let e=v===null?g:null,t=v!==null&&y.forSlot!==null,n=y.block!==null&&e!==null&&(e===y.currentComp||typeof r==`function`&&y.currentIsBodyFn&&tp(y.currentComp,e)),i=r==null||typeof r!=`object`&&typeof r!=`function`,a=i?pp(r):null,o=i&&y.block===null&&y.forSlot===null&&y.hostNode===null&&y.portal===null&&y.text===null==(a===``);t||n||o||(mh(y),b=!0)}let x=!1,ee=!1;if(y===void 0){let r=H;r!==null&&!r.aborted&&!vr&&e.mounted&&!eo(r,h)&&Y();let c,l,u=e===Il&&t===0&&i===h.endMarker&&zl(h);u?(c=h.startMarker,l=h.endMarker,x=!1):m===void 0?a&&i!=null?(c=null,l=i):o===void 0?(c=null,l=document.createComment(``),n.insertBefore(l,i??null)):(c=null,l=null):(c=document.createComment(m),l=a&&i!=null?i:document.createComment(`]`),l.data=`]`,n.insertBefore(c,i??null),l!==i&&n.insertBefore(l,i??null)),y={__kind:`childSlot`,start:c,end:l,ownerHost:o??null,borrowed:u,compactable:s===!0,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null,next:null,implicitSignal:void 0},e.slots[t]=y,Yl(e,y),b=o!==void 0&&H!==null&&!0}x&&(ee=null.claimRange(e,t,y.start,y.end,r,l===void 0&&p!==!0?v:null)),s===!0&&(y.compactable=!0);let S;if(v!==null){if(ee){let e=y;null.suspend(()=>hh(e,h,n,v,null,!1,S));return}hh(y,h,n,v,null,!1,S,l,u,d,f,p);return}y.forSlot!==null&&(H===null?ph(y):vp(y));let C=null,w={},T=!1,E;if(typeof r==`function`&&(C=r,T=!0),C!==null){if(T&&y.block!==null&&y.currentIsBodyFn&&tp(y.currentComp,C)){let e=ip(C),t=y.block.$$implicitBail;if(e&&!t&&(y.block.$$implicitBail=!0,y.block.memoInChain||dl(y.block)),t&&e&&C===y.currentComp&&Tp(y.block))return;y.block.body!==C&&L(y.block,`body`,y.block.body),y.currentComp!==C&&L(y,`currentComp`,y.currentComp),y.block.body=C,P(y.block),y.currentComp=C;return}if(y.block!==null&&C===y.currentComp){if(Pr&&Pr(y.block,C,w)||w===y.block.props&&Tp(y.block))return;y.block.props!==w&&L(y.block,`props`,y.block.props),y.block.props=w,P(y.block);return}let r;(Vr||k)&&(T&&!ip(C)&&(E=`t:`),r={parentScope:e,invocationSite:E,key:void 0,hasKey:!1});let i=y.block===null&&y.hostNode===null&&y.text===null||h.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:y.__kind,branch:void 0,component:T?void 0:C,key:void 0};if(b&&ig(h,n)){let t=y.ownerHost!==null||y.borrowed&&y.start===null,a=e===h&&h.forSlot!==null&&!h.exclusiveMarkers&&y.borrowed&&(om(h,y.start,y.end)||h.endMarker===y.end),o=!T||ip(C),s=mp(Qh(y,h,n,t?null:a?Z(y.end):y.end),h,``,C,w,Rl,o,r,i),c=!t&&y.end===null;vp(y);let l=y.next;if((c||a)&&(l.follows=!0),a){let e=y.start,t=y.end;y.start=s.startMarker,y.end=s.endMarker,s.exclusiveMarkers=!0,l.out.push(null,e,e,null,t,t),l.bound=[h,e,t,y.start,y.end]}else y.start===null&&y.ownerHost===null&&!y.borrowed&&(y.start=s.startMarker);y.block=s,y.currentComp=C,y.currentIsBodyFn=T;return}if(vp(y),h.disposed)return;y.currentComp=C,y.currentIsBodyFn=T,y.start===null&&y.ownerHost===null&&!y.borrowed&&(y.start=document.createComment(``),n.insertBefore(y.start,y.end));let a=Al(`dynamic`,h,n,y.start,y.end,C,w,void 0,Rl);r!==void 0&&gi(a,r),y.borrowed&&(a.exclusiveMarkers=!0),(!T||ip(C))&&(a.$$implicitBail=!0,a.memoInChain=!0),y.block=a,x?null.renderClaimed(a,e,t):P(a);return}if(typeof r==`object`&&r)throw Yf(r);(y.block!==null||y.hostNode!==null)&&vp(y);let te=pp(r);x&&null.settleTextRange(e,t,y,te),te===``?y.text!==null&&(H===null?(y.text.remove(),y.text=null):vp(y)):y.text===null?Up(y,h,n,te):qd(h,y.text,te)}function Up(e,t,n,r){let i=document.createTextNode(r);e.text=i,H===null||!ig(t,n)?n.insertBefore(i,e.end):Qh(e,t,n,e.ownerHost!==null||e.borrowed&&e.start===null?null:e.end).appendChild(i)}function Wp(e,t,n){n.parentNode===t&&H!==null&&ig(e,t)?gg(()=>n.remove(),null,null):n.remove()}function Gp(e,t,n){H!==null&&ig(t,n)?gg(()=>yl(e,n),null,null):yl(e,n)}function Kp(e,t,n,r,i){if(n.nodeType===1&&Nt.has(n.localName)&&!zp(e.block,n)&&r!=null)throw Error(D(26,n.localName));if(uf(n,r))return null;let a=typeof r,o=e.slots[t];if(o!==void 0||a!==`object`&&a!==`function`||n.nodeType!==1||n.localName!==`textarea`||n.namespaceURI!==`http://www.w3.org/1999/xhtml`||Xu(r)||(r=en(r,__),a=`string`),H!==null&&o===void 0&&e.mounted&&(Y(),L(e.slots,t,e.slots[t])),o===void 0&&(r===null||a!==`object`&&a!==`function`)){let t=r==null||r===!1||r===!0?``:a===`string`?r:String(r);if(t===``)return i===null?(vl!==null&&Gp(vl,e.block,n),null):(Wp(e.block,n,i),null);if(i!==null)return qd(e.block,i,t),i;{vl!==null&&Gp(vl,e.block,n);let r=document.createTextNode(t),i=H;return(i!==null&&(e.block.createdStamp!==i.createdStamp||i.retainedCreated!==null)&&ig(e.block,n)?$h(e.block,n,null):n).appendChild(r),r}}o===void 0&&i!==null&&Wp(e.block,n,i),Hp(e,t,n,r,null,!1,n);let s=e.slots[t];return s.block===null&&s.forSlot===null&&s.hostNode===null?s.text:null}function qp(e,t,n,r){let i=0,a=e._slots;if(a!==null)for(let e=0;e1?void 0:null;for(let c=0;cyh(r,null),r,r)),n.deoptNode=null),t.slots[0]===void 0&&i!==null&&a!==null&&i!==a&&i.nodeType===8&&a.nodeType===8){let e={__kind:`childSlot`,start:i,end:a,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null,next:null,implicitSignal:void 0};t.slots[0]=e,Yl(t,e)}Hp(t,0,n.parentNode,e,a,void 0,void 0,void 0,!1);return}t.slots[0]!==void 0&&t.slots[0]!==null&&t.slots[0].__kind===`childSlot`&&Hp(t,0,n.parentNode,null,a);let o=a,s=n.deoptNode,c=Rm(s,e,n);if(c!==s){L(n,`deoptNode`,n.deoptNode);let e=n.parentNode,t=s===null?null:s.parentNode,r=null;if(t!==null&&t!==e&&t.$$next!==void 0){let e=s;c===null?t.removeChild(e):t.replaceChild(c,e),gg(()=>yh(e,null),null,null);let n=t.$$next.bound;n!==null&&(n[3]=n[4]=c)}else{let i=t===e,a=ig(n,e);if(c!==null){let t=i?s:o;if(a){let i=$h(n,e,t);i.appendChild(c),r=i.$$next}else e.insertBefore(c,t)}if(i){let t=s;H===null?(yh(t,null),e.removeChild(t)):gg(()=>yh(t,null),t,t)}}r!==null&&i===s?r.bound=[n,s,s,c,c]:s!==null&&i===s&&(L(n,`startMarker`,n.startMarker),L(n,`endMarker`,n.endMarker),n.startMarker=c,n.endMarker=c)}n.deoptNode=c}function eh(e,t){let n=t.slots[0],r=t.block;n?.__kind===`componentSlotSlot`&&(Ym(r),Bl(r,n),r.deoptNode=null),$m(e,t)}var th=function e(t){if(typeof t==`function`)return!0;if(typeof t!=`object`||!t)return!1;if(typeof t.then==`function`)return!0;if(Array.isArray(t)){for(let n=0;nfh(e),X(n),n.lastChild)),e.incoming=dh(t,Qh(e,t,n,null),r)):(z(e.block,!1),n.textContent=``,e.block=dh(t,n,r))}function dh(e,t,n){return Al(`dynamic`,e,t,null,null,n,{},void 0,Rl)}function fh(e){z(e.block,!1),e.block=e.incoming,e.incoming=null}function ph(e){let t=e.forSlot;Rh(t,t.items),t.head=null,t.tail=null,t.size=0,e.forSlot=null}function mh(e){H===null||H.aborted||vr||(Y(),Ag(e))}function hh(e,t,n,r,i,a,o,s,c,l,u,d){if(r.items.length===0&&i===null&&e.ownerHost!==null){e.forSlot!==null&&H===null&&ph(e),vp(e);return}if(e.forSlot===null){if(i===null&&!a&&vp(e),e.end!==null&&e.end.parentNode===null&&(e.end=null,e.start=null),e.end===null&&(e.end=document.createComment(``),a||(i===null?ig(t,n)?Qh(e,t,n,null).appendChild(e.end):n.insertBefore(e.end,null):lg(n,e.end,null))),e.start===null){e.start=document.createComment(``);let r=e.end;if(!a){if(i!==null)lg(n,e.start,r);else{let n=e.end.parentNode;ig(t,n)?Qh(e,t,n,e.end).appendChild(e.start):n.insertBefore(e.start,r)}}}e.forSlot={__kind:`forBlockSlot`,start:e.start,end:e.end,items:new Map,inOrder:!0,head:null,tail:null,size:0,cachedDeps:null,ctxEpoch:0,emptyBlock:null,env:void 0,adopt:null,plainDeopt:null,mappedNative:void 0,selectionItems:void 0,signalSite:void 0,next:null}}let{items:f,keys:p}=r,m=c||p,h=!!c;e.forSlot.mappedNative;let g=s||(d===!0?eh:$m);s!==void 0&&(e.forSlot.mappedNative=!0),e.forSlot.plainDeopt=null;let _=l||0,v=s!==void 0&&!!(_&16),y=!!(_&1),b=!1;s!==void 0&&(e.forSlot.env=u,_&4&&u!==void 0&&(e.forSlot.cachedDeps!==null&&Eh(e.forSlot.cachedDeps,u)?y=!0:b=!0,e.forSlot.cachedDeps=u));let x=null,ee=e.forSlot;if(ee.size===0){let r=ee.adopt;try{if(r!==null&&f.length!==0){x=new Map;for(let e=0;eyh(r,null),r,r))}e.forSlot.adopt=null}}function gh(e,t,n=!0){let r=e.children,i=e._slots,a=0;if(i!==null)for(let e=0,o=i.length;ecr(e,t,n,r,i,a),r)}function vh(e,t,n=null){cr(e,t,!1,!1,null,n)}function yh(e,t,n=!0,r,i=null,a=null){if(!vm)return;let o=wm(e)?.props?.ref??a?.get(e)?.connected;o!=null&&(t===null?Ui(o,e):(t.push({ref:o,el:e,scope:r}),n&&!qi(i,e,o)&&Xi(o,null,e)));let s=e===r?.deoptNode&&ah(r)?null:X(e);for(;s!==null;){let e=s.$$portalEnd;e==null?(yh(s,t,n,r,i,a),s=Z(s)):s=qm(s,e)}}function bh(e,t,n,r,i,a,o,s,c,l,u,d){if(V?.pending&&!V.crossRenderUpdate)return;let f=Array.isArray(r)?r:Array.from(r),p=e.block,m=e.slots[t];if(m===void 0&&H!==null&&p.createdStamp!==H.createdStamp){let r=dm(p,n,l);if(r!==null){try{bh(e,t,r.parentNode,f,i,a,o,s,c,r,!1,d)}finally{fm(e,r,l)}return}}if(m===void 0){let r,i;r=document.createComment(`for`),u===!0&&l?.nodeType===8?(i=l,i.data=`/for`,n.insertBefore(r,i)):(i=document.createComment(`/for`),n.insertBefore(r,l??null),n.insertBefore(i,l??null)),m={__kind:`forBlockSlot`,start:r,end:i,items:new Map,inOrder:!0,head:null,tail:null,size:0,cachedDeps:null,ctxEpoch:0,emptyBlock:null,env:void 0,adopt:null,plainDeopt:null,mappedNative:void 0,selectionItems:void 0,signalSite:d,next:null},e.slots[t]=m,Yl(e,m)}H!==null&&m.env!==s&&L(m,`env`,m.env),m.env=s;let h=H===null?0:H.ops.length;if(f.length===0&&c){if(m.size>0&&Lh(p,m,f,i,a,!1,!1),m.emptyBlock)m.emptyBlock.body!==c&&L(m.emptyBlock,`body`,m.emptyBlock.body),m.emptyBlock.extra!==m.env&&L(m.emptyBlock,`extra`,m.emptyBlock.extra),m.emptyBlock.body=c,m.emptyBlock.extra=m.env,P(m.emptyBlock);else{A&&jg(m);let e=Sg(m,p,h),t=null,r=null;e!==null&&(t=document.createDocumentFragment(),t.$$next=e,e.members??=[],e.out.push($a,t,m.end),r=lm(t,`/for`));let i=Al(`control-flow`,p,t??n,t===null?m.start:null,r??m.end,c,void 0,m.env);i.exclusiveMarkers=!0,yu(i),m.emptyBlock=i,P(i),r!==null&&(um(i,t,r,m.end),i.startMarker=m.start,i.endMarker=m.end)}return}if(m.emptyBlock){let e=m.emptyBlock;A&&jg(m);let t=Sg(m,p,h);if(t===null)z(e);else if(!eo(t.tx,e))xg(e,!0,t.out);else{let t=e.parentNode;z(e,!1),t.nodeType===11&&pm(t,null,null)}m.emptyBlock=null}let g=o||0,_=!!(g&1),v=!1;if(g&4&&s!==void 0){let e=!!(g&32);e&&A&&H===null?(m.cachedDeps=null,_=!1):(m.cachedDeps!==null&&Eh(m.cachedDeps,s)?_=!0:v=!e,H!==null&&m.cachedDeps!==s&&L(m,`cachedDeps`,m.cachedDeps),m.cachedDeps=s)}let y=!!(g&16)||!!(g&128)&&2;m.size===0?Ph(p,m,f,i,a,!!(g&2),y):(Lh(p,m,f,i,a,_,!!(g&2),v,!!(g&8),y),_&&Qc&&Qc.skippedRows(m,p))}function xh(e,t){let n=Tt.value,r=e.ctxEpoch!==n;if(r||t.memoInChain){for(let i=e.head;i!==null;i=i.nextSibling)(i._slots!==null||i.children!==null)&&(r&&i.$$ctxDepsEpoch!==n&&kp(i),t.memoInChain&&Dp(i));e.ctxEpoch=n}}var Sh=16;function Ch(e,t,n){return e==null||e.size!==0||e.emptyBlock!==null||e.adopt!==null||!((n||0)&2)||!Array.isArray(t)||t.length=0?(b=g[t].node,u.set(d,-t-1)):ee=_??=$h(e,m,null)}let S=zh(e,ee,x,l,c,d,i,t,a,o,b,!1,h);b!==null&&S.startMarker!==b&&(v??=[]).push(S,b),p.set(d,S),S.prevSibling=y,S.nextSibling=null,y?y.nextSibling=S:t.head=S,y=S}t.tail=y,t.size=d}catch(e){for(;y!==null;){let t=y;y=t.prevSibling,p.delete(t.key);let n=c?t.startMarker:null,r=c?t.endMarker:null,i=c&&!(rr&&gc(e))&&!ul(e)&&!$u(e);rr&&gc(e)&&kc(t),k&&t.idState.renderOwner?.signalOwner!==void 0?lu(t,e):z(t,!H?.retainedCreated?.has(t)),n!==null&&r!==null&&Fh(m,n,r,i)}throw t.head=null,t.tail=null,t.size=0,e}return v}function Fh(e,t,n,r){let i=fg(t),a=dg(n)?fg(n):Z(n);mg(t),mg(n),r&&hg(Ih,[e,i,a])}function Ih([e,t,n]){for(let r=t;r!==null&&r!==n;){let t=Z(r);r.parentNode===e&&!bl(r)&&r.remove(),r=t}}function Lh(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=!1){let d=t.items,f=t.size,p=n.length,m=t.end.parentNode,h=H===null?0:H.ops.length,g,_=!!A,v=null;if(f===0){Ph(e,t,n,r,i,o,l,u);return}let y=e.idState.renderOwner?.signalOwner===void 0?void 0:di(e,t,p,r);if(p===0){g=Sg(t,e,h),A&&g!==null&&(fr.get(t)??-1)0&&S>=x;){let e=n[S],o=Nh(r,e,S,u);if(ee.key!==o)break;y!==void 0&&y(S,o);let l=ee;a&&l.props===e&&l.body===i&&l.itemIndex===S||(A&&_&&l.itemIndex!==S&&(v=jg(t,!0),_=!1),a&&c&&l.props===e&&l.body===i?l.itemIndex=S:Mh(l,e,S,i,a,s,c,t.env)),ee=l.prevSibling,S--,C--}let w,T;if(C===0?(T=b,w=T?T.prevSibling:t.tail):(w=b.prevSibling,T=ee.nextSibling),C===0){A&&_&&(v=jg(t,!0));let a=Mg(v);a!==null&&w!==null&&!a.has(w)&&a.set(w,w.nextSibling),T!==null&&(t.inOrder=!1);let s=T?T.startMarker:t.end;g=Sg(t,e,h);let c=w;for(let a=x;a<=S;a++){let f=n[a],p=Nh(r,f,a,u);y!==void 0&&y(a,p);let h=zh(e,m,s,f,a,p,i,t,o,l,null,!0,g);d.set(p,h),h.prevSibling=c,h.nextSibling=T,c?c.nextSibling=h:t.head=h,c=h,T?T.prevSibling=h:t.tail=h,t.size++}return}if(x>S){A&&_&&(v=jg(t,!0));let n=Mg(v);n!==null&&(v.inOrder||(v.prior??=[...d.values()]),w!==null&&!n.has(w)&&n.set(w,w.nextSibling)),g=Sg(t,e,h);let r=b,i=0;for(;r!==T;){let e=r.nextSibling;g===null?z(r):xg(r,!1,g.out),d.delete(r.key),r=e,i++}w?w.nextSibling=T:t.head=T,T?T.prevSibling=w:t.tail=w,t.size-=i;return}let E=S-x+1,te=[],ne=new Map,re=C===E?b:null,ie=!1;for(let e=0;e=E?(Ah=null,oe=ae):oe=new Int32Array(E);try{for(let e=0;e0?d.get(te[n-1]):null)}for(let t of e)t!==null&&!r.has(t)&&r.set(t,t.nextSibling)}let i=T?T.startMarker:t.end;g===void 0&&(g=Sg(t,e,h));for(let e=n-1;e>=0;e--){let t=Oh[e],n=d.get(te[t]),r=t+10?d.get(te[n-1]):w,a=n+1=0;i--){let a=d.get(te[i]);if(n<0||i!==e[n]){let e=r?r.startMarker:ee;g===null?Hh(a,e):g.out.push(Hh,a,e)}else n--;a.nextSibling=r,r?r.prevSibling=a:t.tail=a,r=a}r.prevSibling=w,w?w.nextSibling=r:t.head=r;return}if(r){let e=Wh(oe,E),n=e.length-1,r=T;for(let i=E-1;i>=0;i--){if(oe[i]===-1)continue;let a=d.get(te[i]);if(n<0||i!==e[n]){let e=r?r.startMarker:ee;g===null?Hh(a,e):g.out.push(Hh,a,e)}else n--;a.nextSibling=r,r?r.prevSibling=a:t.tail=a,r=a}r.prevSibling=w,w?w.nextSibling=r:t.head=r}let S=w,C=0;for(let r=0;rru(r,i,a,o),null,null)),t.clear()}function zh(e,t,n,r,i,a,o,s,c,l,u=null,d=!1,f=null){if(f!==null&&!(c===!0&&l)&&(t=Dg(f,n),n=null),c===!0){if(u!==null){let n=Al(`control-flow`,e,t,u,u,o,r,s.env);return n.forSlot=s,n.key=a,n.itemIndex=i,n.deoptNode=u,yu(n),P(n),n}let d=f!==null&&c===!0&&l!==!1,p=Al(`control-flow`,e,t,null,d?Cg??wg():n,o,r,s.env);p.forSlot=s,p.key=a,p.itemIndex=i;try{P(p)}catch(e){throw Bh(p,e,d?null:t,n),e}if(d){let e=f.out,t=e.length;return t!==0&&e[t-3]===Eg&&e[t-1]===n?e[t-2].push(p):e.push(Eg,[p],n),p}let m=n===null?t.lastChild:n.previousSibling;return p.startMarker=m,p.endMarker=m,p}let p=document.createComment(`it`),m=document.createComment(`/it`);u===null&&(t.insertBefore(p,n),t.insertBefore(m,n));let h=Al(`control-flow`,e,t,p,m,o,r,s.env);h.forSlot=s,h.key=a,h.itemIndex=i,u!==null&&(h.deoptNode=u,yu(h));try{P(h)}catch(e){throw Bh(h,e,null,null),e}return h}function Bh(e,t,n,r){let i=e.slots[0];if(n!==null&&i!=null&&i.__kind===void 0){let t=Vh(n,r);e.startMarker=t,e.endMarker=t}rr&&gc(t)&&kc(e),z(e,!H?.retainedCreated?.has(e))}function Vh(e,t){return t===null?e.lastChild:t.previousSibling}function Hh(e,t){let n=e.startMarker,r=n.parentNode,i=e.endMarker,a=Po;a!==null&&Lo(r,a);let o=a===null&&r.isConnected===!0?r.moveBefore:void 0,s=typeof o==`function`?o:null;if(n===i){a===null?s===null?r.insertBefore(n,t):s.call(r,n,t):Uh(r,n,t,a);return}let c=[];for(let e=n;e!==null&&(c.push(e),e!==i);e=Z(e));for(let e=0;e>1;e[r[n]]0?r[a-1]:-1,r[a]=i)}let i=r.length,a=r[i-1];for(;i-->0;)r[i]=a,a=n[a];return r}var Gh=!1,Kh=256,qh=512,Jh=[[],[],[],[],[],[],[],[]];function q(e,t,n,r,i,a,o,s){let c=e.slots[0],l=r!==i;if(t===null){let n=c.$;if(!l&&n<=255)return null;let r=n&255;if(n>255)t=Yh(c);else{if(t=c.next,typeof t==`function`){let e=t;for(t=c.next=Jh.pop()??[];t.length=0;e--)t[e]=c;c.$=n|=Kh}let i=H;(n&qh)===0&&i!==null&&(A&&gr!==1||e.block.createdStamp!==hu)&&(t[r]=e,t[r+1]=i.ops.length,c.$=n|qh,i.ops.push(Xh,c))}if(t[n]=l?r:c,a!==void 0){let e=a.args;e!==M_&&(t[n+1]=l?o:c),(e===2||e===-2)&&(t[n+2]=l?s:c)}return t}function Yh(e){let t=e.next;return A&&(e.$&qh)!==0&&t[(e.$&255)+1]<_r&&Ag(t),t}function J(e,t){let n=t.next,r=t.$&=255;n[r]=e,n[r+2](t,n,A?!0:nv!==0&&_v.length!==0)}function Xh(e,t){let n=e.next;n[(e.$&=255)+2](e,n,t)}function Zh(e){let t=H,n=e.next;return n===null||n.tx!==t?(n=e.next={tx:t,out:[],frag:null,root:null,parent:null,before:null,members:null,owner:null,follows:!1,bound:null},t.ops.push(og,e),A&&gr>1&&fr.set(n,A.length)):A&&gr>1&&(fr.get(n)??-1)n){let e=0;for(let t of i)e++>=n&&i.delete(t)}}function bg(e){let t=H;return t!==null&&!t.aborted&&!vr&&e.idState.renderOwner===t.owner&&!eo(t,e)}function xg(e,t,n){let r=e.block;Za(r);let i=r.startMarker,a=r.endMarker,o=null,s=null;if(i!==null&&a!==null&&i.parentNode!==null)t?Z(i)!==a&&(o=Z(i),s=a.previousSibling):(o=i,s=a);else if(r.kind===`root`){let e=r.parentNode;o=X(e),o!==null&&o.nodeType===10&&(o=Z(o)),s=e.lastChild}let c=Kg,l=c===null?e:()=>{let t=Kg;Kg=c;try{vg(e)}finally{Kg=t}};n===void 0?gg(l,o,s):n.push(l,o,s)}function Sg(e,t,n){let r=H;if(r===null)return null;if(e.next!==null&&e.next.tx===r)return Zh(e);let i=e.end.parentNode??pg(e.end);if(e.adopt!==null||!ig(t,i))return null;let a=e.next={tx:r,out:[],frag:null,root:null,parent:i,before:null,members:null,owner:t instanceof Vl?t.ownerBlock:t,follows:!1,bound:null},o=r.ops;return n>=o.length?o.push(og,e):o.splice(n,0,og,e),A&&gr>1&&fr.set(a,A.length),a}var Cg=null;function wg(){return Cg=document.createComment(``)}function Tg(e,t){let n=e.out,r=n.length;if(r!==0&&n[r-3]===Eg&&n[r-1]===t)return n[r-2];let i=[];return n.push(Eg,i,t),i}function Eg(e,t,n){let r=e;for(let e=0;e=pr||(t.set(e,A.length),A.push(2,e,{...e},Array.isArray(e)?e.length:null))}function jg(e,t){if(!A)return null;let n=fr,r=n.get(e)??-1,i=r>=0&&A[r]===6?A[r+2]:null;if(t&&r>=pr)return i;if(i!==null&&Ng(e,i),r>=pr)return null;if(n.set(e,A.length),H!==null&&(H.hydrating,e.adopt!==null)){Ya(()=>{n.delete(e)});for(let t=e.head;t!==null;t=t.nextSibling)A.push(3,t,`itemIndex`,t.itemIndex);return null}let a={empty:e.emptyBlock,chain:null,mapOrder:null,head:e.head,links:null,inOrder:e.inOrder,prior:null};return t||Ng(e,a),A.push(6,()=>{Ng(e,a),Fg(e,a,a.chain),n.delete(e)},a,null),t?a:null}function Mg(e){return e!==null&&e.chain===null?e.links??=new Map:null}function Ng(e,t){if(t===null||t.chain!==null)return;let n=t.links;if(t.links=null,n===null){let n=[];for(let t=e.head;t!==null;t=t.nextSibling)n.push(t);t.chain=n;let r=[...e.items.values()],i=r.length===n.length?null:r;for(let e=0;i===null&&e=0&&Ng(e,A[n]===6?A[n+2]:null);let r=e.items;t.set(e,A.length);let i={head:e.head,tail:e.tail,size:e.size,empty:e.emptyBlock,entries:r};Ya(()=>{Fg(e,i,null),t.delete(e)}),e.items=new Map,e.inOrder=!0}function Fg(e,t,n){let r=n===null?t.entries:null,i=n===null?null:new Set(n);for(let t=e.head;t!==null;t=t.nextSibling)r===null&&i.has(t)||z(t,!1);if(e.end.parentNode!==null){if(e.head=n===null?t.head:n[0]??null,e.tail=n===null?t.tail:n[n.length-1]??null,e.size=n===null?t.size:n.length,r!==null)e.items=r,e.inOrder=!1;else{let r=n;e.items.clear();for(let e=0;e=e;r-=4){let e=n[r+1],i=n[r+2],a=n[r+3];switch(n[r]){case 3:e[i]=a;break;case 8:e.extra=a,e.props=i;break;case 4:to(e);break;case 10:yg(e,i,a);break;case 5:!e.disposed&&(e===t||ys(t,e))&&Pl(e,t);break;case 6:e();break;case 9:e.$$signalOwner=i;break;default:for(let t of Reflect.ownKeys(e))!Object.prototype.hasOwnProperty.call(i,t)&&Object.prototype.propertyIsEnumerable.call(e,t)&&delete e[t];for(let t of Reflect.ownKeys(i))(typeof t!=`symbol`||!Reflect.set(e,t,i[t])&&!Object.is(e[t],i[t]))&&(e[t]=i[t]);a!==null&&(e.length=a),fr.delete(e)}}n.length=e}finally{Gh=r}}function Lg(e){try{let t=e.activeElement;if(t===e.body&&(t=t?.shadowRoot?.activeElement??null,t===null))return null;for(;t!==null;){if(t.localName===`iframe`){let e;try{let n=t.contentWindow;if(n===null||typeof n.location.href!=`string`)break;e=n.document}catch{break}if(e===null)break;let n=e.activeElement;if(n===null)break;t=n;continue}let e=t.shadowRoot?.activeElement;if(e==null)break;t=e}return t}catch{return null}}function Rg(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch(e.type){case`text`:case`search`:case`tel`:case`url`:case`password`:return!0}return!1}function zg(e,t,n,r,i){let a=e,o=null,s=0,c=-1,l=-1,u=0,d=0;selection:for(;;){for(;;){if(a===t&&(n===0||a.nodeType===3)&&(c=s+n),a===r&&(i===0||a.nodeType===3)&&(l=s+i),c!==-1&&l!==-1)break selection;a.nodeType===3&&(s+=a.nodeValue.length);let e=X(a);if(e===null)break;o=a,a=e}for(;;){if(a===e||(o===t&&++u===n&&(c=s),o===r&&++d===i&&(l=s),c!==-1&&l!==-1))break selection;let f=Z(a);if(f!==null){a=f;break}a=o,o=a.parentNode}}return c===-1||l===-1?null:{focused:e,start:c,end:l,contentEditable:!0}}function Bg(e){let t=Lg(e);if(t===null||t===t.ownerDocument.body)return null;if(Rg(t)){let e=t;return{focused:t,start:e.selectionStart??0,end:e.selectionEnd??0,contentEditable:!1}}if(t.contentEditable===`true`||t.getAttribute(`contenteditable`)===`true`){let e=t.ownerDocument.getSelection();if(e!==null&&e.anchorNode!==null&&e.focusNode!==null&&t.contains(e.anchorNode)&&t.contains(e.focusNode)){let n=e.anchorNode,r=e.focusNode;if(n===r&&n.nodeType===3){if(n===X(t))return{focused:t,start:e.anchorOffset,end:e.focusOffset,contentEditable:!0};if(n.nodeValue.length<256){let r=t.ownerDocument.createRange();r.selectNodeContents(t),r.setEnd(n,e.anchorOffset);let i=r.toString().length;return{focused:t,start:i,end:i+e.focusOffset-e.anchorOffset,contentEditable:!0}}}let i=zg(t,n,e.anchorOffset,r,e.focusOffset);if(i!==null)return i}}return{focused:t,start:-1,end:-1,contentEditable:!1}}function Vg(e,t){let n=e.ownerDocument.createTreeWalker(e,4),r=n.nextNode(),i=null;for(;r!==null;){let e=r.textContent?.length??0;if(t<=e)return[r,t];t-=e,i=r,r=n.nextNode()}return i===null?[e,0]:[i,i.textContent?.length??0]}function Hg(e){if(e===null)return;let{focused:t}=e,n=t.ownerDocument;if(Lg(n)===t||!t.isConnected)return;if(e.start!==-1){if(e.contentEditable){let r=n.getSelection();if(r!==null){let[i,a]=Vg(t,e.start),[o,s]=Vg(t,e.end),c=n.createRange();c.setStart(i,a),c.collapse(!0),r.removeAllRanges(),r.addRange(c),r.extend(o,s)}}else{let n=t;n.setSelectionRange(e.start,Math.min(e.end,n.value.length))}}let r=[],i=t.parentElement;for(;i!==null;)r.push({element:i,left:i.scrollLeft,top:i.scrollTop}),i=i.parentElement;t.focus();for(let e=0;e`u`)return;Zg=!0;let e=Node.prototype;Jg=Object.getOwnPropertyDescriptor(e,`firstChild`)?.get,Yg=Object.getOwnPropertyDescriptor(e,`nextSibling`)?.get;let t=Element.prototype;Object.isExtensible(t)&&(Xg(t,`$$portalParent`),Xg(t,`$$portalEnd`),Xg(t,`$$deoptKey`),Xg(t,`$$ctrl`),Xg(t,`__oct_suppress`),Xg(t,`__oct_frag`),Xg(t,`__oct_vfrag`),Xg(t,nf,!1),Xg(t,af,!1),Xg(t,of,!1),Xg(t,Cm,!1),Xg(t,dy,!1)),typeof CharacterData<`u`&&Object.isExtensible(CharacterData.prototype)&&(Xg(CharacterData.prototype,`$$portalEnd`),Xg(CharacterData.prototype,`$$deoptKey`),Xg(CharacterData.prototype,Cm,!1))}var $g=Symbol(`octane.lazy-template`);function e_(e){for(let t of e.querySelectorAll(`*`))if(t.localName.includes(`-`)||t.hasAttribute(`is`))return e.__oct_frag=!0,e;let t=document.createDocumentFragment(),n;for(;(n=X(e))!==null;)t.appendChild(n);return t.__oct_frag=!0,t}function t_(e,t,n){Qg();let r=document.createElement(`template`);if(t===0){if(r.innerHTML=Ud?Ud.createHTML(e):e,n){let e=r.content.ownerDocument.createElement(`octane-frag`);return e.appendChild(r.content),e_(e)}let t=X(r.content);return t.nodeType===1&&t.localName===`octane-frag`?e_(t):t}let i=t===1?`svg`:`math`,a=`<${i}>${e}`;r.innerHTML=Ud?Ud.createHTML(a):a;let o=X(r.content);return n?e_(o):X(o)}function Q(e,t=0,n=0){return{[$g]:{html:e,ns:t===1?1:t===2?2:t===3?3:0,frag:n,parsed:[null,null,null],root:0}}}function n_(e){let t;t=e.ns===3?0:e.ns;let n=e.parsed[t];return n===null&&(n=t_(e.html,t,e.frag),e.parsed[t]=n),n}function $(e,t,n){let r=e.nodeType===void 0?e[$g]:void 0;return r===void 0?e.cloneNode(!0):n_(r).cloneNode(!0)}function r_(e,t,n){let r=H,i=B?.block;if(r!==null&&i!==void 0&&i.createdStamp!==r.createdStamp&&i instanceof Dl&&i.parentNode===t&&ig(i,t)&&(t=$h(i,t,n),n=null),e.nodeType===11){t.insertBefore(e,n);return}let a;for(;(a=X(e))!==null;)t.insertBefore(a,n)}function i_(e,t,n){if(t!==null){let n=e.block,r=n.endMarker;if(r!==null&&r===Cg)for(let e=n;e!==null&&e.endMarker===r&&(e.endMarker=e.startMarker===void 0?null:e.startMarker=t,!e.forSlot);e=e.parentBlock);else{let e=n.parentNode,i=H;i!==null&&n.createdStamp!==i.createdStamp&&n instanceof Dl&&(n.startMarker===null||n.startMarker!==r)&&ig(n,e)?$h(n,e,r).appendChild(t):e.insertBefore(t,r)}}return e.slots[0]=n,n}function a_(e,t,n=0,r=null){return i_(e,t,{__journalWindow:0,$:n,next:r,[Og]:0})}function o_(e,t,n,r=0,i=null){return i_(e,t,{a:n,__journalWindow:0,$:r,next:i,[Og]:1})}function s_(e,t,n,r,i=0,a=null){return i_(e,t,{a:n,b:r,__journalWindow:0,$:i,next:a,[Og]:2})}function c_(e,t,n,r,i,a=0,o=null){return i_(e,t,{a:n,b:r,c:i,__journalWindow:0,$:a,next:o,[Og]:3})}function l_(e,t,n,r,i,a,o=0,s=null){return i_(e,t,{a:n,b:r,c:i,d:a,__journalWindow:0,$:o,next:s,[Og]:4})}function u_(e,t,n,r,i,a,o,s=0,c=null){return i_(e,t,{a:n,b:r,c:i,d:a,e:o,__journalWindow:0,$:s,next:c,[Og]:5})}function d_(e,t,n,r,i,a,o,s,c=0,l=null){return i_(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,__journalWindow:0,$:c,next:l,[Og]:6})}function f_(e,t,n,r,i,a,o,s,c,l=0,u=null){return i_(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,g:c,__journalWindow:0,$:l,next:u,[Og]:7})}function p_(e,t,n,r,i,a,o,s,c,l,u,d=0,f=null){return i_(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,g:c,h:l,i:u,__journalWindow:0,$:d,next:f,[Og]:9})}function m_(e){return e==null||e===!1?``:typeof e==`string`?e:String(e)}function h_(e,t,n=void 0){let r=typeof t==`string`?t:m_(t);if(n===1){let t=Jg===void 0?e.firstChild:Jg.call(e);if(t!==null&&t.nodeType===3)return t.nodeValue=r,t}let i=document.createTextNode(r);return e.appendChild(i),i}function g_(e,t){let n=typeof t==`string`?t:m_(t),r=document.createTextNode(n);return e.parentNode.replaceChild(r,e),r}function __(e){throw Error(D(336,tn(e,qf)))}function v_(e,t,n){let r=m_(t),i=e.parentNode,a=document.createComment(`]`);e.data=n,i.insertBefore(a,Z(e));let o=document.createTextNode(r);return i.insertBefore(o,a),o}function y_(e){return Jg===void 0?e.firstChild:Jg.call(e)}function b_(e,t=1){let n=e;for(let e=0;e2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&t>=65&&t<=90}var T_=`$ocapture:`;function E_(e){return e===`DoubleClick`?`dblclick`:e===`Focus`?`focusin`:e===`Blur`?`focusout`:e.toLowerCase()}var D_;function O_(e,t){if(!w_(e)||t!==void 0&&gf(t)&&!Ut(e))return null;let n=D_?.get(e);if(n!==void 0)return n;let r=e.slice(2),i=!1;r.length>7&&r.endsWith(`Capture`)&&e!==`onGotPointerCapture`&&e!==`onLostPointerCapture`&&(i=!0,r=r.slice(0,r.length-7));let a=E_(r),o={type:a,key:i?T_+a:`$o`+a,capture:i};return Ut(e)&&(D_??=new Map).set(e,o),o}var k_=Symbol(),A_=1;function j_(e){return typeof e==`object`&&!!e&&e[k_]===A_}var M_=[];function N_(e,t,n){let r=e;A&&A.push(3,e,t,r[t]),r[t]=n}function P_(e,t){for(;e!==null;e=Z(e))if(as(e),e===t)return}function F_(e,t,n){let r=e.$$ownerNext;if((r!==void 0&&r[2]===n?r[1]:e.$$signalOwner)===t)return;let i=[e,t,n];L(e,`$$ownerNext`,r),e.$$ownerNext=i,n.ops.push(I_,i)}function I_(e){let t=e[0];t.$$ownerNext===e&&(t.$$ownerNext=void 0,t.$$signalOwner=e[1])}var L_=new Map,R_=new Map,z_=Symbol(`octane.portalPathLength`),B_=new WeakMap,V_=Symbol(`octane.rootEpoch`);function H_(e,t){let n=B_.get(e);for(;n!==void 0&&n.since>t;)n=n.previous;return n!==void 0&&n.count>0}function U_(e,t){if(R_.size===1&&os===0){i(e),M&&M.begin(e,!0),e[V_]=ss;return}let n=e.composedPath();if(R_.size===1)return i(e),M&&M.begin(e,!0),e[V_]=ss,os!==0&&(Sl(n,ss),e[z_]=n.length),n;for(let r=n.length-1;r>=0;r--)if(R_.has(n[r])){n[r]===t?(i(e),M&&M.begin(e,!0),e[V_]=ss,os!==0&&(Sl(n,ss),e[z_]=n.length)):(M&&M.begin(e,!1),os!==0&&n.length>(e[z_]||0)&&(Sl(n,e[V_]??ss),e[z_]=n.length));break}return n}var W_=new Map,G_=null,K_={passive:!1},q_={capture:!0,passive:!1};function J_(e,t){return e===`touchstart`||e===`touchmove`?t?q_:K_:t}function Y_(e){let t=typeof Element<`u`&&Object.isExtensible(Element.prototype);for(let n=0;n=0;t--){let n=av[t];if(n.event===e)return n}}function cv(){let e=sv(this);e!==void 0&&(e.flags|=1);let t=e?.stop||this.stopPropagation;(t===cv?Event.prototype.stopPropagation:t).call(this)}function lv(){let e=sv(this);e!==void 0&&(e.flags|=2);let t=e?.immediate||this.stopImmediatePropagation;(t===lv?Event.prototype.stopImmediatePropagation:t).call(this)}var uv={configurable:!0,writable:!0,value:cv},dv={configurable:!0,writable:!0,value:lv};function fv(e,t,n,r){n?.configurable===!1?n.writable&&Object.defineProperty(e,t,{value:r.value}):Object.defineProperty(e,t,r)}function pv(e,t,n){let r=av[ov];return r===void 0&&(r={event:null,flags:0,stop:null,immediate:null,currentTarget:null},av.push(r)),ov++,r.event=e,r.flags=0,r.stop=e.stopPropagation,fv(e,`stopPropagation`,t,uv),n!==null&&(r.immediate=e.stopImmediatePropagation,fv(e,`stopImmediatePropagation`,n,dv)),r}function mv(e,t,n){let r=av[--ov];r.event=null,r.stop=null,r.immediate=null,r.currentTarget=null,t===void 0?delete e.stopPropagation:Object.defineProperty(e,"stopPropagation",t),n!==null&&(n===void 0?delete e.stopImmediatePropagation:Object.defineProperty(e,"stopImmediatePropagation",n))}var hv={configurable:!0,get(){return sv(this)?.currentTarget}},gv=[],_v=[],vv=null;function yv(e,t,n,r){let i=r?n.captureKey:n.bubbleKey,a=e[V_],o=!!(n.flags&64)||!r&&!!(n.flags&128),s=-1;if(is!==0)for(let e=gv.length-1;e>=t;e--){let t=gv[e].$$retiredEpoch;if(t>=is&&t<=a){s=e;break}}let c=!1;for(let e=t;e=0?bv(n[++d]):e.parentNode}if(m)return r.length=i,0;if(p)return r.length-i;if(f===null)return r.length=i,0;let h=n.indexOf(f);if(h=s||h===l&&u)return r.length=i,0;c=f,l=h,u=!0}}function Sv(e,t){if(typeof e==`function`)e(t);else if(j_(e)){let n=e.args;if(typeof n!=`number`)switch(n.length){case 0:e.fn();break;case 1:e.fn(n[0]);break;case 2:e.fn(n[0],n[1]);break;default:e.fn.apply(null,n)}else n===1?e.fn(e.a0):n===2?e.fn(e.a0,e.a1):n===-1?e.fn(t,e.a0):e.fn(t,e.a0,e.a1)}else Cv(`${t.type} event`,e,t)}function Cv(e,t,n){if(t)throw Error(D(46,e,typeof t));t(n)}function wv(e){if(typeof reportError==`function`)reportError(e);else if(typeof window<`u`&&typeof ErrorEvent==`function`){let t=new ErrorEvent(`error`,{error:e,message:String(e?.message??e),cancelable:!0});window.dispatchEvent(t),t.defaultPrevented||console.error(e)}else console.error(e)}function Tv(e,t){if(!e.bubbles||e.cancelBubble||!(t.flags&1)){e.bubbles&&t.flags&1&&M&&M.enqueue(e,t),M&&M.finish(t);return}if(!(t.flags&16))return;if(Rv.length===0){if(!(t.flags&32))return;let n=e.target?.localName;if(n!==`input`&&n!==`textarea`&&n!==`select`)return}let n=e[iv],r=I,i=e.target,a=M?M.delivery(e):void 0,o=()=>{e[iv]===n&&M&&M.enqueue(e,t,r,i,a)&&M.finish(t)};e.isTrusted?setTimeout(o,0):queueMicrotask(o)}function Ev(e){let t=L_.get(e.type)??W_.get(e.type);if(t===void 0)return;let n=!!(t.flags&4),i=n?U_(e,this):void 0,a=gv.length,o=e.target,s=kv,c=null,l,u,d=!1,f;try{if(!n&&xv(e,this)===0||(l=pt?Hn(e):null,nv++,e[iv]=(e[iv]||0)+1,M&&M.enqueue(e,t),e.type===`submit`&&o!=null&&o.nodeName===`FORM`&&(c=S_(o,e),kv=c),n&&t.flags&2&&(i??=e.composedPath(),Dv.call(this,e,i,t)))||!(t.flags&1)||o?.nodeType===1&&gf(o)&&t.flags&256||(n&&xv(e,this,i),!yv(e,a,t,!1)&&c===null))return;u=Object.getOwnPropertyDescriptor(e,`stopPropagation`),d=!0,f=pv(e,u,null);let s=!!(t.flags&8);for(let t=a;t=i;t--){let n=_v[t];if(n!=null&&!r(e,gv[t],!0)&&(Ov(e,gv[t],d),Nu(n,e,vv?.[t]),d.flags&1))break}}}finally{l=(d===void 0?a:d.flags!==0)||!c&&e.cancelBubble,gv.length=i,_v.length=i,vv!==null&&(vv.length=i),a&&(mv(e,o,s),x_(e)),pt&&Pu(e,u,e.bubbles&&!e.cancelBubble&&!!(n.flags&1)),nv--,G_(e,n)}return l}function Ov(e,t,n){n.currentTarget=t,Object.defineProperty(e,"currentTarget",hv)}var kv=null;function Av(e){let t=e.name;if(t===``)return[e];let n=e.form;if(n!==null){let e=n.elements.namedItem(t);return e===null?[]:`nodeType`in e?[e]:e}let r=e.getRootNode();return r===e?[e]:r.nodeType===9?r.getElementsByName(t):r.querySelectorAll(`input[type="radio"]`)}function jv(e){return typeof e==`string`?e:typeof e==`function`||typeof e==`symbol`?``:String(e)}function Mv(e){nv===0&&e.flags&16&&Rv.length>0&&(pt&&pt.present(),!I&&_s()&&(ur&&ur.adopt(!0),Ho(N)),vy()),e.name===`click`&&(zv=null)}var Nv=Symbol(`octane.uncontrolled`),Pv=Symbol(`octane.controlledDelivery`),Fv=0;function Iv(e){return e.type===`input`||e.type===`change`?e[Pv]:void 0}function Lv(e,t){if(e.type!==`input`&&e.type!==`change`)return;if(t){let t=++Fv;e[Pv]=I?-t:t}let n=L_.get(e.type)??W_.get(e.type);if(n===void 0||!(n.flags&2))return;let r=Iv(e),i=e.target;if(r===void 0||i===null||i.localName!==`input`&&i.localName!==`textarea`&&i.localName!==`select`)return;let a=i.$$restoreDelivery;(a===void 0||Math.abs(a)0||Uv.length>0||Wv.length>0}function Kv(e,t){if(e.$$afSeen===void 0&&(e.$$afSeen=!0,t)){switch(e.localName){case`button`:case`input`:case`select`:case`textarea`:break;default:return}Jr(Wv,e)}}function qv(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch(e.type){case`text`:case`search`:case`url`:case`tel`:case`password`:case`email`:case`number`:return!0}return!1}function Jv(e){let t=e.currentTarget,n=t.$$ctrl;n!==void 0&&(n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&(clearTimeout(n.compositionEndTask),n.compositionEndTask=null),n.composing=!0,t.addEventListener(`blur`,Yv))}function Yv(e){let t=e.currentTarget,n=t.$$ctrl;if(n===void 0)return;t.removeEventListener(`blur`,Yv),n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&clearTimeout(n.compositionEndTask),n.composing=!0;let r=()=>{n.compositionEndTask=null,n.composing=!1,hy(t)};n.compositionEndTask=e.type===`blur`?setTimeout(r,0):setTimeout(()=>{n.compositionEndTask=setTimeout(r,0)},0)}function Xv(e){return e.$$ctrl}function Zv(e){let t=Xv(e);return t===void 0&&(t=Yr(e)),t.compositionEndTask===void 0&&qv(e)&&(t.compositionEndTask=null,e.addEventListener(`compositionstart`,Jv),e.addEventListener(`compositionend`,Yv)),t}function Qv(e,t){return e.type===`number`?t===0&&e.value===``||e.value!=t:e.value!==jv(t)}function $v(e,t){let n=e,r=Zv(e),i=!r.sawV;if(A&&(Ag(r),Y()),r.sawV=!0,t==null){r.v=Nv;return}let a=jv(t);if(i)r.v=t,n.value!==a&&(n.value=a),n.defaultValue=a;else{let e=r.v;r.v=t,ey([n,t,a,!(r.composing&&Object.is(e,t))]);return}}function ey([e,t,n,r]){r&&Qv(e,t)&&(e.value=n),ty([e,n])}function ty([e,t]){if(e.defaultValue===t)return;let n=e.localName===`textarea`?X(e):null;n!==null&&n.nodeType===3&&Z(n)===null?n.data=t:e.defaultValue=t}function ny(e){e.localName===`input`?e.removeAttribute(`value`):e.defaultValue=``}function ry(e,t,n){e?hg(t,n):t(n)}function iy([e,t]){(e.defaultValue!==t||t===``&&e.localName===`input`&&!e.hasAttribute(`value`))&&(e.defaultValue=t)}function ay(e,t,n){let r=!n.sawC;if(n.sawC=!0,t==null){n.c=-1;return}let i=!!t;if(Bv??=gy,r){n.c=i,n.sawDC=!0,e.checked=i,e.defaultChecked!==i&&(e.defaultChecked=i);return}let a=i!==n.c;n.c=i,(a||!oy(e))&&e.checked!==i&&(e.checked=i)}function oy(e){let t=zv;return t===null?!1:e===t||e.type===`radio`&&t.type===`radio`&&e.name!==``&&e.name===t.name&&e.form===t.form&&(e.form!==null||e.getRootNode()===t.getRootNode())}function sy(e,t){let n=Zv(e);A&&(Ag(n),Y()),ay(e,t,n)}function cy(e,t){let n=e,r=Zv(e);if(A&&(Ag(r),Y()),r.sawV,r.sawV=!0,t==null){r.sv=null;return}if(Vv??=ly,n.multiple){if(!Array.isArray(t))return;let e=new Set;for(let n=0;n0){let e=Wv;Wv=[];for(let t=0;t0){let e=Uv;Uv=[];for(let t=0;t0){let e=Hv;Hv=[];for(let t=0;t0||qa.length>0,t=Rv;if(Rv=[],e)for(let e=0;e{a.$$checkableActivation===!0&&(a.$$checkableActivation=!1,a===zv&&(zv=null),hy(a))},0)),!0;if(a===zv&&(zv=null),e.type===`input`&&a.localName===`select`)return a.$$selectPick=!0,setTimeout(()=>{a.$$selectPick===!0&&(a.$$selectPick=!1,hy(a))},0),!0;if(e.type===`input`&&s&&a.$$checkableActivation===!0)return!0;e.type===`change`&&(s&&(a.$$checkableActivation=!1),a.localName===`select`&&(a.$$selectPick=!1));let c=Rv.indexOf(a);return c===-1?Rv.push(a,n):Rv[c+1]=n,!0}var xy=Symbol(),Sy=Symbol();function Cy(e,t,n=!1,r=!1){if(n&&e==null)return e===null?xy:Sy;if((typeof e!=`object`||!e)&&typeof e!=`function`)return e;if(n)try{let n=Object.getOwnPropertyDescriptor(e,t);return n?`value`in n?r?n.value:Ty(e,n.value):e:t in e?e:void 0}catch{return e}return Zt.call(e,t)?Ty(e,e[t]):t in e?e:void 0}var wy=/^(?:async\s*)?(?:\(|[\w$]+\s*=>)/;function Ty(e,t){if(typeof t!=`function`)return t;try{let n=Function.prototype.toString.call(t);return wy.test(n)&&(n[0]===`(`||t.name!==`async`)?t:e}catch{return e}}function Ey(e){return()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var Dy=Ey(20261104),Oy=e=>e[Dy()*e.length|0],ky=(e,t)=>e+(Dy()*(t-e+1)|0),Ay=`the a this each every that state render update component list stream token browser layout frame request response cache value event handler queue scheduler commit result effect boundary model reply message server client keeps reads writes returns sends receives renders updates batches schedules measures avoids reuses stores tracks applies resolves compares merges splits quickly safely only always usually first later again once directly with from into before after during between without across through small large stable expensive cheap separate shared current previous next and or but so because when while if then`.split(` `),jy=[`useState`,`fetch`,`requestAnimationFrame`,`AbortController`,`ReadableStream`,`TextDecoder`,`Map`,`WeakMap`,`Promise.all`,`structuredClone`,`key`,`props`,`onInput`,`aria-live`,`flex`,`grid`,`position: sticky`,`overflow-anchor`,`content-visibility`],My=[`How it works`,`Why this happens`,`A simpler approach`,`Putting it together`,`Things to watch for`,`Performance notes`,`Example`,`Next steps`,`Trade-offs`,`Testing it`],Ny=[`How do I stream a response from fetch and render it as it arrives?`,`Why does my list re-render every item when only the last one changes?`,`Can you explain how the event loop orders microtasks and tasks?`,`What is the best way to debounce a search input?`,`Show me how to cancel an in-flight request when the user navigates away.`,`How should I structure state for a chat application?`,`Why is my layout thrashing when I read offsetHeight in a loop?`,`What does content-visibility do and when should I use it?`,`How do I keep the scroll position pinned to the bottom while messages stream in?`,`Write a small tokenizer that splits text on whitespace but keeps the separators.`,`Compare a Map and a plain object for a cache keyed by id.`,`How can I make syntax highlighting cheaper for long code blocks?`,`Summarize the trade-offs between virtualizing a list and rendering it all.`,`What is a good way to memoize parsed Markdown per message?`,`Explain structural sharing in immutable updates.`,`How do I test a component that renders streamed text?`],Py=[`const response = await fetch(url, { signal: controller.signal });`,`const reader = response.body.getReader();`,`const decoder = new TextDecoder();`,`let buffer = '';`,`while (true) {`,` const { done, value } = await reader.read();`,` if (done) break;`,` buffer += decoder.decode(value, { stream: true });`,` onChunk(buffer);`,`}`,`export function tokenize(text) {`,` return text.match(/\\s*\\S+/g) ?? [];`,`}`,`const cache = new Map();`,`function getParsed(id, source) {`,` const hit = cache.get(id);`,` if (hit && hit.source === source) return hit.blocks;`,` const blocks = parse(source);`,` cache.set(id, { source, blocks });`,` return blocks;`,`}`,`// Keep the newest message in view while it grows.`,`list.scrollTop = list.scrollHeight - list.clientHeight;`,`const timeout = setTimeout(() => controller.abort(), 30000);`,`const items = messages.filter((m) => m.role === 'assistant');`,`return { ...state, messages: [...state.messages, reply] };`],Fy=[[`javascript`,Py],[`javascript`,Py],[`python`,[`import asyncio`,`from dataclasses import dataclass`,`@dataclass`,`class Message:`,` role: str`,` text: str`,`async def stream_reply(client, prompt):`,` async for chunk in client.stream(prompt):`,` yield chunk.delta`,`def tokenize(text):`,` # Split on whitespace but keep the separators.`,` return re.findall(r'\\s*\\S+', text)`,`cache = {}`,`if key in cache:`,` return cache[key]`,`result = await asyncio.gather(*tasks)`,`for index, item in enumerate(items):`,` print(f'{index}: {item}')`]],[`css`,[`.messages {`,` display: flex;`,` flex-direction: column;`,` overflow-y: auto;`,` overflow-anchor: none;`,`}`,`.message {`,` content-visibility: auto;`,` contain-intrinsic-size: auto 120px;`,` padding: 12px 16px;`,` border-radius: 8px;`,`}`,`pre code {`,` font-family: ui-monospace, monospace;`,` white-space: pre;`,`}`]]];function Iy(){let e=Dy();return e<.06?`\`${Oy(jy)}\``:e<.1?`**${Oy(Ay)} ${Oy(Ay)}**`:e<.12?`*${Oy(Ay)}*`:Oy(Ay)}function Ly(){let e=ky(7,18),t=[];for(let n=0;ne.toUpperCase())}.`}function Ky(){let e=["```ui"];if(Dy()<.5){e.push(`row gap`);let t=ky(2,4);for(let n=0;n{let i=[];for(let e=0;eqy(!0)),$y=0;function eb(){return Zy.map(e=>({...e,messages:e.messages.slice()}))}function tb(e){return Xy(`user`,e)}function nb(){let e=Qy[$y++%Qy.length];return{message:Xy(`assistant`,``),text:e}}var rb=[],ib=/^(#{1,3}) (.*)$/,ab=/^(?:[-*]|\d+\.) /,ob=/^\d+\. /;function sb(e,t=rb){let n=e.split(` +`),r=[],i=(e,n,i)=>{let a=r.length,o=t[a];o!==void 0&&o.type===e&&o.raw===n?r.push(o):r.push({id:a,type:e,raw:n,...i(o?.type===e?o:void 0)})},a=0;for(;a({root:db(t?.root,ub(e))}));continue}i(`code`,n.slice(t,a).join(` +`),()=>({lang:r,lines:n.slice(t+1,o).map((e,t)=>({id:t,tokens:hb(e)}))}));continue}if(e.trim()===``){a++;continue}let t=ib.exec(e);if(t!==null){i(`heading`,e,()=>({level:t[1].length,inlines:fb(t[2])})),a++;continue}if(ab.test(e)){let t=ob.test(e),r=a;for(;a({ordered:t,items:o.map((e,t)=>({id:t,inlines:fb(e.slice(e.indexOf(` `)+1))}))}));continue}let r=a;for(;a({inlines:fb(o.join(` `))}))}return r}var cb=new Set([`row`,`col`,`card`,`details`,`title`,`text`,`caption`,`badge`,`button`,`divider`]),lb=new Set([`title`,`text`,`caption`]);function ub(e){let t={id:0,type:`col`,props:{},text:``,children:[]},n=[{indent:-1,node:t}];for(let t of e){let e=/^( *)(\S+)(?: (.*))?$/.exec(t);if(e===null||!cb.has(e[2]))continue;let r=e[1].length,i=e[2],a=e[3]??``;for(;n[n.length-1].indent>=r;)n.pop();let o=n[n.length-1].node,s={id:o.children.length,type:i,props:{},text:``,children:[]};if(i===`button`){let e=a.indexOf(` `);s.props.variant=e<0?a:a.slice(0,e),s.text=e<0?``:a.slice(e+1)}else i===`row`||i===`col`?a===`gap`&&(s.props.gap=!0):s.text=a;lb.has(i)&&(s.inline={id:0,kind:`text`,text:s.text}),o.children.push(s),n.push({indent:r,node:s})}return t}function db(e,t){if(e===void 0||e.type!==t.type||e.text!==t.text||e.props.variant!==t.props.variant||e.props.gap!==t.props.gap)return t;let n=t.children.map((t,n)=>db(e.children[n],t));return n.length===e.children.length&&n.every((t,n)=>t===e.children[n])?e:{...t,inline:e.inline??t.inline,children:n}}function fb(e){let t=[],n=0,r=(e,n)=>t.push({id:t.length,kind:e,text:n}),i=(t,i,a,o)=>{let s=e.indexOf(o,i+a);return s<=i+a?i+1:(i>n&&r(`text`,e.slice(n,i)),r(t,e.slice(i+a,s)),n=s+o.length,n)},a=0;for(;a{let r=t[t.length-1];e===`plain`&&r!==void 0&&r.kind===`plain`?r.text+=n:t.push({id:t.length,kind:e,text:n})};mb.lastIndex=0;let r;for(;mb.lastIndex{bb===n&&(bb=null)}}window.deliverChunk=()=>{let e=bb;if(e===null)return;vb+=_b;let t=Math.min(e.tokens.length,e.position+gb),n=``;for(let r=e.position;rVb(e))}canonical(e){return jb(e)}},kb=class{constructor(e,t){this.slot=e,this.shadow=t}slot;shadow;committed=NaN;presented=NaN;getVersion(){let e=this.slot;return e.dead?e.node.revision===this.committed?this.presented:NaN:ex.host.visible(e.batch)===!1?NaN:this.shadow.revision}subscribe(e){return O.attachObserver(this.slot.dead?this.slot.node:this.shadow,e,!0)}retired(){return this.slot.node.owner.retired}settle(e){e&&(this.committed=this.slot.node.revision,this.presented=this.shadow.revision)}};function Ab(e){let t=e.pending;return t!==void 0&&t.shadow===e}function jb(e){let t=e.pending;return t!==void 0&&t.shadow===e?t.node:e}function Mb(e){let t=ex.host;return Cb!=null&&t.root(Cb)===t.root(e.batch)?!0:t.visible(e.batch)??!1}function Nb(e,t){let n=ex.host;return n.root(e)===n.root(t)}function Pb(){return Ln===Tb&&Cb!=null&&Eb!==void 0&&Nb(Cb,Eb)}function Fb(e,t){let n=new Ob(e,t);return e.pending=n,wb++===0&&In(!0),ex.host.hold(t,n),n}function Ib(t){let n=t.node,r=n.owner,i=r.nodes.get(n.key)===n,a=i?void 0:O.declarationViewFork(n);if(!i&&a===void 0||r.readBarrier||r.frames?.size)throw new zn(e(135));let o=new O.ScopedNode(r,n.key,n.kind);o.pending=t,o.state=n.state,o.last=n.last,o.lastState=n.lastState,o.hasLast=n.hasLast,t.shadow=o;try{if(a!==void 0)t.producer=a(o,t);else{let i=r.resources?.get(n),a=i===void 0?r.derivedBindings?.get(n):void 0;if(i!==void 0)t.producer=Bn.resource.call(i,o);else if(a!==void 0){let n=a.forkCandidate??Bn.derived;if(!n)throw new zn(e(136));t.producer=n.call(a,o,t)}else o.compute=n.compute}}catch(e){throw Kb(t,!1),e}return o}function Lb(e,t){let n=ex.host,r=new Set([e]),i=[e],a=e=>{if(r.has(e))return;r.add(e);let a=e.pending;if(a===void 0)Fb(e,t);else if(Nb(a.batch,t)||n.entangle(a.batch,t),a.shadow===e){O.invalidateNode(e);return}i.push(e)};for(;i.length!==0;){let e=i.pop();for(let r=e.subs;r!==void 0;r=r.nextSub){let e=r.sub;if(e instanceof O.ScopedNode){a(e);continue}let i=e.notify;if(i===void 0)continue;let o=i[Ke];o!==void 0&&a(o);let s=i[qe];s!==void 0&&n.consume(t,s)}}}function Rb(e,t,n){return Db(e,()=>O.untrack(()=>O.pure(()=>t(n))))}function zb(e,t,n){let r=e.pending,i=O.strictValue(O.refreshNode(r?.shadow??e),e.key),a=typeof t==`function`?Rb(n,t,i):t;O.signalBatch(()=>{if(r===void 0){if(Object.is(i,a))return;r=Fb(e,n),Ib(r),Lb(e,n)}else Nb(r.batch,n)||ex.host.entangle(r.batch,n);O.publishNode(r.shadow,O.readyState(a))})}function Bb(e,t){let n=e.pending,r=n.shadow,i=typeof t==`function`?Rb(n.batch,t,O.strictValue(O.refreshNode(r),e.key)):t;O.publishNode(r,O.readyState(i))}function Vb(e){if(Cb===null||Ln!==0&&!Pb()||O.historical())return e;let t=e.pending;if(t===void 0&&(e.kind===`signal`||(O.refreshNode(e),t=e.pending,t===void 0))||t.shadow===e)return e;let n=Mb(t);if(!n)return e;Cb!==void 0&&!Nb(Cb,t.batch)&&ex.host.entangle(Cb,t.batch);let r=t.shadow??Ib(t);return Cb===void 0&&n===`action`&&(t.actionRead=!0),r}function Hb(e){let t=Cb,n=e.pending;return Cb=n!==void 0&&n.shadow===e?n.batch:O.isDeclarationView(e)?t:null,t}function Ub(e,t){if(Cb=e,!Ab(t))for(let e=t.deps;e!==void 0;e=e.nextDep){let n=e.dep,r=n.pending;if(r===void 0||r.shadow===n)continue;let i=t.pending;i===void 0?Fb(t,r.batch):Nb(i.batch,r.batch)||ex.host.entangle(i.batch,r.batch)}}function Wb(e){if(Cb===null||Ln!==0&&!Pb())return!1;let t=e.pending;return t!==void 0&&t.shadow!==e&&!!Mb(t)}function Gb(e){let{node:t,shadow:n}=e;for(let e=n.subs;e!==void 0;){let n=e.nextSub,r=e.sub;if(O.graph.unlink(e,r),r instanceof O.ScopedNode)Ab(r)?r.pending.promoting||O.invalidateNode(r):O.link(t,r);else{let e=r;e.node=t,O.link(t,e)}e=n}}function Kb(e,t){if(e.dead)return;e.dead=!0;let{node:n,shadow:r}=e;if(n.pending===e&&(n.pending=void 0),--wb===0&&In(!1),r===void 0)return;for(O.removeQueued(r);r.deps;)O.graph.unlink(r.deps,r);r.subs!==void 0&&Gb(e);for(let e of[r.nativeSource,r.nativeLatestSource,r.nativeSnapshotSource])e?.settle(t);O.releaseRetention(r),r.wakeup&&(r.wakeup.node=void 0),r.compute=void 0;let i=e.producer;e.producer=void 0,i!==void 0&&Rn(()=>i.dispose())}function qb(e){Kb(e,!1)}function Jb(e){let{node:t,shadow:n}=e;if(n===void 0||t.owner.retired)return;let r=n.state;if(r===void 0)return;if(t.kind===`signal`)return{slot:e,state:r,receipt:void 0};if(n.flags&48||r.snapshot.status===`idle`)return;if(r.snapshot.status===`pending`){let t=n.wakeup;if(t?t.promise!==r.waiting||t.settled:e.producer===void 0)return}if(e.producer===void 0)return{slot:e,state:r,receipt:void 0};let i=e.producer.prepare();return i.status===`ready`&&i.receipt.validate()?{slot:e,state:r,receipt:i.receipt}:void 0}function Yb(e){if(e.actionRead)return!0;for(let t=e.shadow.subs;t!==void 0;t=t.nextSub){let e=t.sub,n=e instanceof O.ScopedNode?e:e.notify?.[Ke];if(n===void 0||!Ab(n))return!0}return!1}function Xb(e,t){if(Ln===0){O.refreshNode(t);return}let n=Tb,r=Eb;Tb=Ln,Eb=e.batch;try{O.refreshNode(t)}finally{Tb=n,Eb=r}}function Zb(e,t){let n=new Set;for(let{slot:t}of e)Yb(t)&&n.add(t.shadow);for(let e of n){for(let r=e.deps;r!==void 0;r=r.nextDep){let e=r.dep;t.has(e)&&n.add(e)}let r=e.pending.producer;if(r?.dependencies)for(let e of r.dependencies())t.has(e)&&n.add(e)}return n}function Qb(e){O.signalBatch(()=>{let t=e;for(let e of t){let t=e.shadow;!e.dead&&!e.node.owner.retired&&t&&t.flags&48&&Yb(e)&&Xb(e,t)}Rn(()=>$b(t)),O.presentQueued()})}function $b(e){let t=[],n=[];for(let r of e){if(r.dead)continue;let e=Jb(r);e===void 0?n.push(r):t.push(e)}for(let e=!1;!e;){e=!0;let r=new Set(t.map(e=>e.slot.shadow)),i;t=t.filter(a=>{if(a.state.snapshot.status===`pending`&&!(i??=Zb(t,r)).has(a.slot.shadow))return n.push(a.slot),e=!1,!1;for(let t=a.slot.shadow.deps;t!==void 0;t=t.nextDep){let i=t.dep;if(Ab(i)&&!r.has(i))return n.push(a.slot),e=!1,!1}return!0})}for(let{slot:e}of t)e.promoting=!0;for(let e of n){let t=e.shadow?.subs!==void 0;Kb(e,!1),t&&!e.node.owner.retired&&O.invalidateNode(e.node)}for(let{slot:e}of t)e.node.flags|=16;let r=[],i=[];for(let{slot:e,state:n,receipt:a}of t){let{node:t,shadow:o}=e;if(a!==void 0&&i.push(a.publish()),t.kind!==`signal`){for(;t.deps;)O.graph.unlink(t.deps,t);for(let e=o.deps;e!==void 0;e=e.nextDep)O.link(jb(e.dep),t)}let{last:s,lastState:c,hasLast:l}=o,u=t.state?.snapshot!==n.snapshot||!O.sameState(t.state,n),d=t.hasLast!==l||!Object.is(t.last,s)||(c?!O.sameState(t.lastState,c):t.lastState!==void 0);u&&O.commitState(t,n);let f=o.wakeup;f&&f.promise===n.waiting&&(o.wakeup=void 0,t.wakeup=f,f.node=t),t.lastState?.owners!==c?.owners&&O.releaseRetainedOwners(t),t.last=s,t.lastState=c,t.hasLast=l,n.snapshot.status!==`ready`&&O.retainOwners(t),!u&&d&&t.revision++,(u||d)&&r.push(t)}let a=Bn.defer;Bn.defer=!0;try{for(let e of r)e.subs&&(O.graph.propagate(e.subs,!1),O.graph.shallowPropagate(e.subs))}finally{Bn.defer=a}for(let{slot:e}of t)e.node.flags=3;try{for(let{receipt:e}of t)e?.accept?.()}finally{for(let{slot:e}of t)Kb(e,!0);for(let e of i)e()}}var ex={host:void 0,batch:()=>Ln===0?ex.host.batch():null,write:zb,rebase:Bb,resolve:Vb,enter:Hb,leave:Ub,hides:Wb,source:e=>new kb(e.pending,e),drop:qb,promote:Qb};function tx(){return ex}function nx(){Fn(tx())}var rx,ix,ax=0,ox=0,sx=0,cx=0,lx=!1,ux,dx,fx=new Set,px=new WeakSet,mx={},hx=new WeakMap,gx=new WeakMap;function _x(e){if(e instanceof Jx){if(e.revision++,e.wakeup?.resolve(),e.wakeup=void 0,ux&&Ux(e),e.owner.trace(`invalidate`,e),e.invalidateAttempt){if(Bn.defer){let t=e.invalidateAttempt;fx.add(()=>{e.invalidateAttempt===t&&t()})}else e.invalidateAttempt();fx.add(e)}else e.kind===`async`&&fx.add(e)}else fx.add(e)}function vx(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function yx(e,t=e.sub){let{dep:n,prevDep:r,nextDep:i,nextSub:a,prevSub:o}=e;return i===void 0?t.depsTail=r:i.prevDep=r,r===void 0?t.deps=i:r.nextDep=i,a===void 0?n.subsTail=o:a.prevSub=o,o===void 0?n.subs=a:o.nextSub=a,i}function bx(e,t){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&Cx(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:(i.flags=a|32,t&&(i.flags|=8)),a&2&&_x(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function xx(e,t){let n,r=0,i=!1;top:do{let a=e.dep,o=a.flags;if(t.flags&16)i=!0;else if((o&17)==17){let e=a.subs;dS(a)&&(e.nextSub!==void 0&&Sx(e),i=!0)}else if((o&33)==33){n={value:e,prev:n},e=a.deps,t=a,++r;continue}if(!i){let t=e.nextDep;if(t!==void 0){e=t;continue}}for(;r--;){if(e=n.value,n=n.prev,i){let n=t.subs;if(dS(t)){n.nextSub!==void 0&&Sx(n),t=e.sub;continue}i=!1}else t.flags&=-33;t=e.sub;let r=e.nextDep;if(r!==void 0){e=r;continue top}}return i&&!!t.flags}while(1)}function Sx(e){do{let t=e.sub,n=t.flags;(n&48)==32&&(t.flags=n|16,(n&6)==2&&_x(t))}while((e=e.nextSub)!==void 0)}function Cx(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}function wx(){if(sx||wt())throw new xe}function Tx(e){let t=dx;return dx=e,t}function Ex(e){sx++;try{return e()}finally{sx--}}function Dx(e){let t=rx,n=xt(null);rx=void 0;try{return e()}finally{rx=t,xt(n)}}function Ox(){cx++}function kx(){--cx===0&&jx()}function Ax(e){Ox();try{return e()}finally{kx()}}function jx(){if(lx)return;lx=!0;let e,t=!1;try{for(let n of fx){fx.delete(n);try{typeof n==`function`?Dx(n):n instanceof Jx?n.owner.retired||lS(n):CS(n)}catch(n){t||(e=n),t=!0}}}finally{lx=!1}if(t)throw e}function Mx(){let e,t=!1;for(let n of fx)if(n instanceof xS&&n.native){fx.delete(n);try{CS(n)}catch(n){t||(e=n),t=!0}}if(t)throw e}function Nx(){lx&&cx===0&&Mx()}function Px(e,t=mx){let n=t.refreshing??!1,r=t.connection??`none`,i=t.complete??!0,a=t.requestKey;return{snapshot:a===void 0?{status:`ready`,value:e,refreshing:n,connection:r,complete:i}:{status:`ready`,value:e,refreshing:n,connection:r,complete:i,requestKey:a}}}function Fx(e,t=`none`,n){return{snapshot:{status:`error`,error:e,refreshing:!1,connection:t,complete:!1,...n===void 0?{}:{requestKey:n}}}}function Ix(e,t=`none`,n,r){return{snapshot:{status:`pending`,refreshing:!1,connection:t,complete:!1,...n===void 0?{}:{requestKey:n}},waiting:e,...r?{resolveWaiting:r}:{}}}function Lx(e,t){if(e.owners===t.owners)return!0;if((e.owners?.size??0)!==(t.owners?.size??0))return!1;if(e.owners){for(let n of e.owners)if(!t.owners?.has(n))return!1}return!0}function Rx(e,t){if(!e)return!1;let n=e.snapshot,r=t.snapshot;return n.status!==r.status||n.refreshing!==r.refreshing||n.connection!==r.connection||n.complete!==r.complete||n.requestKey!==r.requestKey?!1:n.status===`ready`&&r.status===`ready`?Object.is(n.value,r.value)&&Lx(e,t):n.status===`error`&&r.status===`error`?Object.is(n.error,r.error)&&Lx(e,t):e.waiting===t.waiting&&Lx(e,t)}function zx(e,t){return t?.size?{...e,owners:t}:e}function Bx(e,t){let n=rx;if(n&&(e.owner!==n.owner&&(ix??=new Set).add(e.owner),t.owners))for(let e of t.owners)e!==n.owner&&(ix??=new Set).add(e)}function Vx(e){let t=hx.get(e);if(t){hx.delete(e);for(let n of t){let t=gx.get(n);t?.delete(e),t?.size||gx.delete(n)}}}function Hx(e){e.lastState?.owners&&Vx(e),e.lastState=void 0,e.last=void 0,e.hasLast=!1}function Ux(e){e.storedState?.resolveWaiting?.(),e.valueOnly=!1,e.storedState=ux,e.flags|=16,Hx(e)}function Wx(e){let t=e.lastState?.owners;if(t&&hx.get(e)!==t){Vx(e),hx.set(e,t);for(let n of t){let t=gx.get(n);t||gx.set(n,t=new Set),t.add(e)}}}function Gx(e){let t=gx.get(e);if(t){for(let e of t){let t=e.state?.owners,n;if(t)for(let e of t)e.retired||(n??=new Set).add(e);pS(e,zx(ux,n)),e.subs&&(bx(e.subs,ox!==0),Sx(e.subs))}gx.delete(e)}}function Kx(){let e,t={promise:new Promise(t=>{e=t}),settled:!1,resolve(){t.node=void 0,t.settled||(t.settled=!0,e())}};return t}function qx(e,t){if(px.add(t),e.thrown!==t)return;let n=e.node;n===void 0?e.resolve():Ax(()=>hS(n))}var Jx=class{constructor(e,t,n){this.owner=e,this.key=t,this.kind=n,this.flags=19}owner;key;kind;static hasNativeBrand(e){return#e in e}get[Xn](){return!0}deps;depsTail;subs;subsTail;flags;revision=0;valueOnly=!1;storedState=void 0;storedLastState=void 0;compute;invalidateAttempt;last=void 0;hasLast=!1;evaluating=!1;wakeup;nativeSource;nativeLatestSource;#e;retryRequest=void 0;pending=void 0;get state(){return this.valueOnly&&this.storedState===void 0&&this.buildState(),this.storedState}set state(e){this.valueOnly&&this.storeStates(),this.storedState=e}get lastState(){return this.valueOnly?this.state:this.storedLastState}set lastState(e){this.valueOnly&&this.storeStates(),this.storedLastState=e}buildState(){this.storedState=this.storedLastState=Px(this.last)}storeStates(){this.storedState===void 0&&this.buildState(),this.valueOnly=!1}retry(t){if(be(this.owner),this.retryRequest===void 0)throw TypeError(e(163));this.retryRequest(t)}nativeReadSource(e){return e===`value`?this.nativeSource??=Yx(this,e):e===`latest`?this.nativeLatestSource??=Yx(this,e):this.#e??=Yx(this,e)}get nativeSnapshotSource(){return this.#e}get(){return eS(this)}[Zn](){return sS(this)}[Qn](e,t){return be(this.owner),SS(this,t===void 0?e:Je(e,()=>this.owner.retired?t():e()),!0)}[er](){return this.owner.retired}[$n](){return{scope:`instance`,nodeKey:this.key}}[$e](){return this.get()}set(t){if(be(this.owner),wx(),this.kind!==`signal`)throw TypeError(e(164));let n=Mn;Ox();try{uS(this);let e=this.valueOnly?this.last:aS(this.state,this.key),r=typeof t==`function`?Dx(()=>Ex(()=>t(e))):t;Object.is(e,r)||(iS(this,r),this.owner.trace(`write`,this)),this.pending!==void 0&&n.rebase(this,t)}finally{kx()}}latest(e){let t=Zx(this,`latest`);if(t.snapshot.status===`ready`)return t.snapshot.value;if(t.snapshot.status===`error`&&(t.snapshot.error instanceof ye||t.snapshot.error instanceof we||st(t.snapshot.error)))throw t.snapshot.error;return e}snapshot(){return Object.freeze(Zx(this,`snapshot`).snapshot)}subscribe(t){if(be(this.owner),wx(),typeof t!=`function`)throw TypeError(e(165));let n=Dx(()=>lS(this));return SS(this,t,!1,n)}};function Yx(e,t){let n=e.pending;return n!==void 0&&n.shadow===e?Mn.source(e,t):new Xx(e,t,TS?.get(e))}var Xx=class{constructor(e,t,n){this.node=e,this.read=t,this.view=n}node;read;view;canonicalSource(){let e=this.view;return e?.promoted?e.canonical.nativeReadSource(this.read):void 0}getVersion(){let e=this.view;if(e!==void 0){let t=this.canonicalSource();if(t)return t.getVersion()===e.canonicalRevision?e.viewRevision:NaN;if(e.retired)return NaN}let t=this.node;return Nn&&Nn.hides(t)?NaN:t.revision}subscribe(e){let t=this.canonicalSource();return t?t.subscribe(e):(be(this.node.owner),SS(this.node,e,!0))}serialize(e){let t=this.canonicalSource();if(t)return e===this.view.viewRevision?t.serialize?.(this.view.canonicalRevision):void 0;let n=this.node;return n.revision===e?nt(n,this.read):void 0}retired(){return this.node.owner.retired}};function Zx(e,t=`value`){be(e.owner);let n=dx?.(e,t);if(n)return n;if(!dx&&e.owner.seedable){let n=ut()?.(e.owner);if(n)return n.run(()=>Zx(e,t))}return Nn&&(e=Nn.resolve(e)),uS(e),Qx(e,t)}function Qx(e,t){let n=e.state,r=t===`latest`&&n.snapshot.status!==`ready`?e.lastState??n:n;if($x(e,t),r.owners)for(let e of r.owners)be(e);return rx&&Bx(e,r),r}function $x(e,t){rx&&vx(e,rx,ax),bt()&&yt(e.nativeReadSource(t),e.revision)}function eS(e){return Nn||dx||e.owner.seedable&&ut()?aS(Zx(e),e.key):(uS(e),e.valueOnly?($x(e,`value`),rx&&e.owner!==rx.owner&&(ix??=new Set).add(e.owner),e.last):aS(Qx(e,`value`),e.key))}function tS(e,t){e.valueOnly=!0,e.last=t,e.hasLast=!0}function nS(e,t){e.last=t,e.storedState=e.storedLastState=void 0,e.revision++}function rS(e){e.valueOnly=!0,e.storedState=e.storedLastState=void 0}function iS(e,t){e.valueOnly?(nS(e,t),e.subs&&(bx(e.subs,ox!==0),Sx(e.subs))):(mS(e,Px(t)),rS(e))}function aS(e,t=`idle`){let n=e.snapshot;if(n.status===`ready`)return n.value;throw n.status===`error`?n.error:n.status===`idle`?new Ce(t):e.waiting}var oS=!1;function sS(e){let t=ut();if((dx||t)&&e instanceof Jx&&e.owner.seedable&&(dx||t?.(e.owner))){let t=oS;oS=!0;try{return e.get()}finally{oS=t}}let n=xt(null);try{return e.get()}finally{xt(n)}}function cS(e,t,n){if(e.owner.retired||Nn&&Nn.hides(e))return;let r=lS(e);t===`latest`&&r.snapshot.status!==`ready`&&(r=e.lastState??r);let i=r.snapshot;if(!(t===`snapshot`?!Rx(n,r):i.status!==`ready`||!Object.is(i.value,n.snapshot.value)))return{live:e.nativeReadSource(t),version:e.revision}}function lS(e){return uS(e),e.state}function uS(e){if(be(e.owner),e.evaluating)throw new Se(e.key);let t=e.kind===`derived`;t&&sx++;try{let t=0;for(;;){let n=e.flags;if(n&16||n&32&&(!e.deps||xx(e.deps,e))){if(++t>100)throw new Se(e.key);if(dS(e)&&e.subs&&Sx(e.subs),e.flags&48)continue}else e.flags&=-33;e.flags&=-9;break}}finally{t&&sx--}}function dS(e){if(!e.compute)return e.flags=3,!0;if(dx||ut())return fS(e);let t=Nn,n=t?t.enter(e):void 0,r=rx,i=ix,a=xt(null);e.depsTail=void 0,e.flags=7,e.evaluating=!0,rx=e,ix=void 0,ax++,ox++;let o,s;try{o=e.compute(e)}catch(t){if(Qu(t)){let n=!e.wakeup||e.wakeup.settled?e.wakeup=Kx():e.wakeup;if(n.node=e,n.thrown!==t&&(n.thrown=t,!px.has(t))){let e=()=>qx(n,t);Promise.resolve(t).then(e,e)}o=Ix(n.promise)}else o=Fx(t)}finally{ox--,s=ix,ix=i,rx=r,xt(a),e.evaluating=!1,e.flags&=-5;let o=e.depsTail,c=o?o.nextDep:e.deps;for(;c;)c=yx(c,e);t&&t.leave(n,e)}let c=o===_S&&!s?.size;if(o===_S){let t=vS;if(vS=void 0,c&&(e.valueOnly||e.storedState===void 0)){if(e.valueOnly){if(Object.is(e.last,t))return!1}else e.storedLastState?.owners&&Vx(e),e.valueOnly=!0,e.hasLast=!0;return nS(e,t),!0}o=Px(t)}return o=zx(o,s),o.snapshot.status!==`ready`&&e.state?.snapshot.status===`error`&&e.state.snapshot.error instanceof ye&&(o=zx(Fx(e.state.snapshot.error),o.owners)),!Rx(e.state,o)&&(pS(e,o),c&&rS(e),!0)}function fS(e){let t=Tx(void 0),n=dt(null);try{return dS(e)}finally{dt(n),Tx(t)}}function pS(e,t){let n=e.state;e.state=t,e.revision++,t.snapshot.status===`ready`?(n?.snapshot.status!==`ready`&&e.lastState?.owners&&Vx(e),e.last=t.snapshot.value,e.lastState=t,e.hasLast=!0):t.snapshot.status===`error`&&(t.snapshot.error instanceof ye||t.snapshot.error instanceof we||st(t.snapshot.error))?Hx(e):e.lastState?.owners&&Wx(e),t.snapshot.status!==`pending`&&n?.resolveWaiting?.(),e.wakeup&&t.waiting!==e.wakeup.promise&&(e.wakeup.resolve(),e.wakeup=void 0)}function mS(e,t){e.kind===`async`&&e.state?.owners&&(t=zx(t,e.state.owners)),Rx(e.state,t)||(pS(e,t),e.subs&&(bx(e.subs,ox!==0),Sx(e.subs)))}function hS(e){e.flags|=16,e.revision++,e.wakeup?.resolve(),e.wakeup=void 0,e.subs&&bx(e.subs,ox!==0)}function gS(t,n){let r=Ex(n);if(Qu(r))throw TypeError(e(166));return yS(t,r)}var _S={},vS;function yS(e,t){for(let n=e.deps;n&&e.depsTail;n=n.nextDep){let r=n.dep,i=r.valueOnly?void 0:r.state?.snapshot;if(i&&(i.refreshing||!i.complete||i.connection!==`none`))return bS(e,t);if(n===e.depsTail)break}return vS=t,_S}function bS(e,t,n,r){let i=!1,a=!0,o=`none`;n&&(i=n.refreshing,a=n.complete,o=n.connection);for(let t=e.deps;t&&e.depsTail;t=t.nextDep){let n=t.dep,r=n.valueOnly?void 0:n.state?.snapshot;if(r&&(i||=r.refreshing,a&&=r.complete,r.connection===`open`?o=`open`:o!==`open`&&r.connection===`connecting`?o=`connecting`:o===`none`&&r.connection===`closed`&&(o=`closed`)),t===e.depsTail)break}if(r)for(let e of r){let t=e.valueOnly?void 0:e.state?.snapshot;t&&(i||=t.refreshing,a&&=t.complete,t.connection===`open`?o=`open`:o!==`open`&&t.connection===`connecting`?o=`connecting`:o===`none`&&t.connection===`closed`&&(o=`closed`))}return Px(t,{refreshing:i,complete:a,connection:o})}var xS=class{constructor(e,t,n,r){this.node=e,this.notify=t,this.native=n,this.previous=r}node;notify;native;previous;deps;depsTail;flags=2};function SS(e,t,n,r){let i=new xS(e,t,n,r);return e.owner.observers.add(i),vx(e,i,++ax),()=>wS(i)}function CS(e){let t=e.node;if(t&&e.flags){if(e.flags=2,!e.native){let n=Dx(()=>lS(t));if(Rx(e.previous,n))return;e.previous=n}e.notify&&Dx(e.notify)}}function wS(e,t){let n=e.node;if(n){for(fx.delete(e),t||n.owner.observers.delete(e);e.deps;)yx(e.deps,e);e.flags=0,e.node=void 0,e.notify=void 0,e.previous=void 0}}var TS;function ES(e){return!1}function DS(e){}function OS(e,t){let n=ux;ux=Fx(new ye(e.scopeKey));try{for(let t of e.observers)t.native&&t.notify&&fx.add(t.notify),wS(t,!0);e.observers.clear(),Gx(e);for(let e of t){for(e.pending!==void 0&&Mn.drop(e.pending),fx.delete(e),e.wakeup?.resolve(),e.wakeup=void 0,e.revision++,Ux(e),e.compute=void 0,e.invalidateAttempt=void 0,e.retryRequest=void 0,e.subs&&(bx(e.subs,ox!==0),Sx(e.subs));e.deps;)yx(e.deps,e);for(;e.subs;)yx(e.subs);e.flags=0}}finally{ux=n}}jn({ScopedNode:Jx,graph:{unlink:yx,propagate:bx,shallowPropagate:Sx},historical:()=>dx!==void 0,assertAlive:be,link:(e,t)=>{vx(e,t,++ax)},removeQueued:e=>{fx.delete(e)},strictValue:aS,refreshNode:lS,pure:Ex,untrack:Dx,signalBatch:Ax,presentQueued:Mx,publishNode:mS,invalidateNode:hS,readyState:Px,commitState:pS,sameState:Rx,releaseRetainedOwners:Vx,retainOwners:Wx,releaseRetention:Hx,attachObserver:SS,declarationViewFork:DS,isDeclarationView:ES}),nx();var kS;mt({startBatch:Ox,endBatch:kx,present:Nx}),at();function AS(e,t){if(typeof e!=`string`||!e.trim())throw TypeError(D(125,t))}function jS(e,t=`value`){return`${t}:${e}`}function MS(e){return Px(e.value,{complete:e.entry.complete,refreshing:e.entry.refreshing,connection:e.entry.connection,requestKey:e.entry.request?JSON.stringify([e.entry.request.queryKey,e.entry.request.argument]):void 0})}function NS(e,t){if(t=Oe(t),!t||t.version!==1||t.scopeKey!==e||!Array.isArray(t.entries))throw new we(D(126,e));let n=new Map;for(let e of t.entries){let t=e?.read??`value`;if(!e||typeof e.key!=`string`||!e.key.trim()||![`signal`,`derived`,`async`].includes(e.kind)||typeof e.complete!=`boolean`||![`value`,`latest`,`snapshot`].includes(t)||e.available!==void 0&&(t!==`latest`||typeof e.available!=`boolean`)||e.refreshing!==void 0&&typeof e.refreshing!=`boolean`||e.connection!==void 0&&![`none`,`connecting`,`open`,`closed`].includes(e.connection)||n.has(jS(e.key,t)))throw new we(D(127));let r=ke(e.value);if(e.available===!1&&(r!==void 0||e.complete||e.request!==void 0))throw new we(D(128));let i;if(e.kind===`async`&&e.available!==!1){if(!e.request||typeof e.request.queryKey!=`string`||!e.request.queryKey.trim()||![`promise`,`stream`].includes(e.request.kind))throw new we(D(129));ke(e.request.argument),i={queryKey:e.request.queryKey,kind:e.request.kind,argument:e.request.argument}}else if(e.request!==void 0)throw new we(D(130));n.set(jS(e.key,t),{value:r,entry:{key:e.key,kind:e.kind,value:e.value,complete:e.complete,...t===`value`?{}:{read:t},...e.available===!1?{available:!1}:{},...e.refreshing===void 0?{}:{refreshing:e.refreshing},...e.connection===void 0?{}:{connection:e.connection},...i?{request:i}:{}}})}return n}var PS=class{constructor(e,t,n,r){this.key=e,this.seedable=t,AS(e,`scopeKey`),this.traceLimit=r,this.seedEntries=n}key;seedable;nodes=new Map;observers=new Set;requests=void 0;queryDefinitions=void 0;resources=void 0;streams=void 0;derivedBindings=void 0;frames=void 0;unkeyedState=!1;seedEntries;traceLimit;events=void 0;sequence=0;lifetime=0;disposed=!1;readBarrier;get scopeKey(){return this.key}get epoch(){return this.lifetime}get retired(){return this.disposed}signal$(e,t){let n=FS(this,e,`signal`),r=IS(this,e)??LS(this,e);return tS(n,r?r.value:t),zS(this,e),n}beginAdoption(e){if(be(this),!this.seedable)throw new we(D(142));return new VS({owner:this,entries:NS(this.scopeKey,e),references:0})}trace(e,t){this.traceLimit!==0&&WS(this,e,t)}dispose(){this.disposed||(wx(),Ax(()=>{if(this.disposed=!0,this.lifetime++,this.resources){for(let e of this.resources.values())e.dispose();this.resources.clear()}if(this.streams?.clear(),this.derivedBindings){for(let e of this.derivedBindings.values())e.dispose();this.derivedBindings.clear()}if(this.requests?.clear(),this.queryDefinitions?.clear(),this.frames)for(let e of this.frames)e.release();OS(this,this.nodes.values()),this.nodes.clear(),this.seedEntries?.clear(),this.trace(`retire`)}))}};function FS(e,t,n,r=!1){if(be(e),e.seedable&&!r&&wx(),AS(t,`Signal key`),e.nodes.has(t))throw TypeError(D(132,t));let i=e.seedEntries;if(i)for(let e of[`value`,`latest`,`snapshot`]){let r=i.get(jS(t,e));if(r&&r.entry.kind!==n)throw new we(D(133,t))}let a=new Jx(e,t,n);return e.nodes.set(t,a),a}function IS(e,t){let n=e.seedEntries;return n&&(n.get(jS(t))??n.get(jS(t,`snapshot`)))}function LS(e,t){let n=e.seedEntries;if(!n)return;let r=n.get(jS(t,`latest`))??IS(e,t);return r?.entry.available===!1?void 0:r}function RS(e,t){let n=LS(e,t.key);n&&(t.lastState=MS(n),t.last=n.value,t.hasLast=!0)}function zS(e,t){let n=e.seedEntries;if(n)for(let e of[`value`,`latest`,`snapshot`])n.delete(jS(t,e))}function BS(e,t,n){return e.get(jS(t,n))??(n===`value`?void 0:e.get(jS(t)))}var VS=class e{constructor(e){this.data=e,e.references++,(e.owner.frames??=new Set).add(this),e.owner.trace(`frame`)}data;ended=!1;sources=new Map;get scopeKey(){return this.data.owner.scopeKey}get released(){return this.ended}assertActive(){if(be(this.data.owner),this.ended)throw new we(D(143))}run(e){this.assertActive();let t=kS;kS=new Map(t),kS.set(this.data.owner,this);let n=Tx(HS),r=St();try{return e()}finally{Ct(r),Tx(n),kS=t}}retain(){return this.assertActive(),new e(this.data)}read(e,t){this.assertActive();let n=BS(this.data.entries,e.key,t);if(n===void 0&&ut())return;if(e.kind===`async`&&t!==`latest`&&n?.entry.kind===`async`&&n.entry.available!==!1&&!this.data.owner.resources?.get(e)?.acceptsSeed(n.entry)){if(ut())return;throw new we(D(145,e.key))}let r=oS,i=(r?`~`:``)+jS(e.key,t),a=this.sources.get(i);if(a)a.node!==e&&(a.node=null);else{let n=new Set;a={node:e,read:t,binding:r,subscribers:n,getVersion:()=>+!!this.ended,subscribe:e=>(this.assertActive(),n.add(e),()=>n.delete(e)),retired:()=>e.owner.retired,inspect:void 0},this.sources.set(i,a)}if(yt(a,0),!n||n.entry.kind!==e.kind)throw ut()?lt(this.scopeKey,e.key,t):new we(D(144,e.key));return n.entry.available===!1?{snapshot:{status:`pending`,refreshing:!1,connection:`none`,complete:!1}}:MS(n)}release(){if(this.ended)return;this.ended=!0;let{owner:e,entries:t}=this.data;e.frames?.delete(this);let n=ft;for(let e of this.sources.values()){let r=[...e.subscribers];e.subscribers.clear();let{node:i,read:a}=e,o=n&&i?BS(t,i.key,a):void 0,s=i&&o?.entry.kind===i.kind&&o.entry.available!==!1?{historical:e,binding:e.binding,successor:()=>cS(i,a,MS(o))}:void 0;for(let e of r)s&&n?.(e,s)||Dx(e)}this.sources.clear(),--this.data.references===0&&t.clear()}};function HS(e,t){let n=e.owner;if(!n.seedable)return;let r=kS?.get(n);if(!r){let r=ut()?.(n);if(r)return r.run(()=>Zx(e,t));throw ut()?lt(n.scopeKey,e.key,t):new we(D(146,n.scopeKey))}return r.read(e,t)}function US(e){if(be(e),!e.seedable)throw new Te(D(140));return Dx(()=>{let t=[];for(let n of e.nodes.values()){lS(n);let r=Sb(e,n)??Sb(e,n,`latest`);r&&t.push(r)}return{version:1,scopeKey:e.scopeKey,entries:t}})}var WS=null;function GS(e,t,n){let r={sequence:++e.sequence,type:t,...n?{key:n.key,revision:n.revision}:{}},i=e.events??=[];i.length===e.traceLimit?i[(r.sequence-1)%e.traceLimit]=r:i.push(r)}function KS(e){let t=e.events??[],n=e.traceLimit&&t.length===e.traceLimit?e.sequence%e.traceLimit:0;return{scopeKey:e.scopeKey,epoch:e.epoch,retired:e.retired,activeRequests:e.requests?[...e.requests.values()].filter(e=>e.active).length:0,adoptionLeases:e.frames?.size??0,nodes:[...e.nodes.values()].map(e=>{let t=[],n=0;for(let n=e.deps;n;n=n.nextDep)n.dep instanceof Jx&&t.push({scopeKey:n.dep.owner.scopeKey,key:n.dep.key});for(let t=e.subs;t;t=t.nextSub)n++;return{key:e.key,kind:e.kind,status:e.state?.snapshot.status??`unevaluated`,revision:e.revision,subscribers:n,retained:e.hasLast,refreshing:e.state?.snapshot.refreshing??!1,connection:e.state?.snapshot.connection??`none`,complete:e.state?.snapshot.complete??!1,dependencies:t}}),trace:t.map((e,r)=>({...n?t[(n+r)%t.length]:e}))}}function qS(e,t){if(be(e),!(t instanceof Jx)||t.owner!==e)throw TypeError(D(138));return t}var JS=!1;function YS(){if(JS)return;JS=!0;let e=PS.prototype;e.derived$=function(e,t){if(typeof t!=`function`)throw TypeError(D(122));let n=FS(this,e,`derived`);return n.compute=e=>gS(e,t),RS(this,n),zS(this,e),n},e.get=function(e){let t=qS(this,e);return aS(Zx(t),t.key)},e.set=function(e,t){qS(this,e).set(t)},e.isPending=function(e){be(this);try{return e(),!1}catch(e){if(Qu(e))return!0;throw e}},e.batch=function(e){return be(this),Ax(e)},e.action=function(e){if(typeof e!=`function`)throw TypeError(D(139));let t=this;return function(...n){return t.batch(()=>e.apply(this,n))}},e.serialize=function(){return US(this)},e.inspect=function(){return KS(this)}}function XS(e){if(!e||typeof e!=`object`)throw TypeError(D(147));YS();let t=e.scopeKey;AS(t,`scopeKey`);let n=e.debug?e.debug.traceLimit??256:0;if(!Number.isInteger(n)||n<0||n>1e4)throw RangeError(D(131));return n!==0&&(WS=GS),new PS(t,!0,e.seed?NS(t,e.seed):void 0,n)}var ZS=`chat-stream/composerDraft/v1`;function QS(){try{return localStorage.getItem(ZS)??``}catch{return``}}var $S=XS({scopeKey:`composer`}),eC=$S.signal$(`draft`,QS()),tC=$S.signal$(`text-editor-focused`,!1),nC=$S.signal$(`streaming`,!1),rC=$S.signal$(`measurement-expanded`,!1),iC=$S.signal$(`frame-height`,null),aC=$S.derived$(`has-draft-text`,()=>eC.get().trim().length>0),oC=$S.derived$(`layout`,()=>{let e=aC.get(),t=e&&(rC.get()||eC.get().includes(` +`));return{hasText:e,expanded:t,singleRow:!t,focused:tC.get(),busy:nC.get()}}),sC=$S.derived$(`presentation-controls`,()=>{let e=oC.get();return{placeholder:e.busy?`Wait for the reply to finish`:`Ask anything`,hint:e.expanded?`Shift+Enter for a new line`:`Enter to send, Shift+Enter for a new line`}}),cC=$S.derived$(`submit-inputs`,()=>({hasText:aC.get(),busy:nC.get()})),lC=$S.derived$(`can-submit`,()=>{let e=cC.get();return e.hasText&&!e.busy}),uC=$S.derived$(`action-visibility`,()=>({showSend:oC.get().hasText,sendDisabled:!lC.get()})),dC=new class{pending=null;debounce;maxWait;schedule(e){this.pending=e,clearTimeout(this.debounce),this.debounce=setTimeout(()=>this.flush(),250),this.maxWait??=setTimeout(()=>this.flush(),1e3)}flush(){if(clearTimeout(this.debounce),clearTimeout(this.maxWait),this.debounce=this.maxWait=void 0,this.pending!==null){try{this.pending===``?localStorage.removeItem(ZS):localStorage.setItem(ZS,this.pending)}catch{}this.pending=null}}};eC.subscribe(()=>{let e=eC.get();dC.schedule(e),e===``&&rC.set(!1)}),window.addEventListener(`pagehide`,()=>dC.flush()),Oi(1),Hr(1),X_([`focusin`,`focusout`,`keydown`,`submit`],[16,16,16,16]);var fC=Q(`