@spikonado/sprocket 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  **Goal**: To make the world's best platform for developing hardware and software.
4
4
 
5
- Sprocket is a lightweight agent that can <ins>create hardware designs</ins> and write code.
5
+ Here's what makes Sprocket special:
6
6
 
7
- Sprocket retrieves <ins>best-in-class context from the web</ins> for everything it does. It is therefore incredibly reliable.
8
- In terms of hardware design, Sprocket can make beautiful schematics in React, create your BOM, and create detailed assembly instructions.
9
-
10
- And <ins>here's the best part</ins>: Sprocket can (on its own) <ins>buy anything from any website</ins> when you tell it to do so. From hardware parts to SaaS subscriptions.
7
+ - The only AI agent that can work on both <ins>hardware</ins> and <ins>software</ins>.
8
+ - Retrieves best-in-class <ins>context from the web</ins> for everything it does, so it stays <ins>incredibly reliable</ins>.
9
+ - <ins>Buys anything from any website</ins> when you ask, from hardware parts to SaaS subscriptions.
10
+ - Makes <ins>beautifully detailed schematics</ins>, creates your <ins>BOM</ins>, and writes <ins>assembly instructions</ins>.
11
11
 
12
12
  [Sprocket Demo](https://www.youtube.com/watch?v=E8KWO3Vh9YU)
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spikonado/sprocket",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Agentic platform for streamlining hardware and software development",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -29,10 +29,10 @@
29
29
  "access": "public"
30
30
  },
31
31
  "optionalDependencies": {
32
- "@spikonado/sprocket-linux-x64-gnu": "0.3.0",
33
- "@spikonado/sprocket-linux-arm64-gnu": "0.3.0",
34
- "@spikonado/sprocket-darwin-x64": "0.3.0",
35
- "@spikonado/sprocket-darwin-arm64": "0.3.0",
36
- "@spikonado/sprocket-win32-x64-msvc": "0.3.0"
32
+ "@spikonado/sprocket-linux-x64-gnu": "0.3.1",
33
+ "@spikonado/sprocket-linux-arm64-gnu": "0.3.1",
34
+ "@spikonado/sprocket-darwin-x64": "0.3.1",
35
+ "@spikonado/sprocket-darwin-arm64": "0.3.1",
36
+ "@spikonado/sprocket-win32-x64-msvc": "0.3.1"
37
37
  }
38
38
  }
@@ -0,0 +1 @@
1
+ import"./xs22-Wnd.js";
@@ -1 +1 @@
1
- import{F as e,I as t,L as n,Q as r,X as i,it as a,n as o,t as s}from"./G9InG5jW.js";import"./tDzg1Ybi.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_zorgdt?.base??``,he=globalThis.__sveltekit_zorgdt?.assets??x??``,ge=``;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return x+ge+de(e[0],e[1])}var ve=`1785722675963`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Se=location.origin;function Ce(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...w,"":w.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||D(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Se&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Oe(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function ke(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var Ae={v:h};function je(){let{set:e,subscribe:t}=a(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),Ae.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function D(e,t,n){return e.origin!==Se||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function O(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var k,A,Le,Re=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),ze=`a:`;Re?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},A={current:null},Le={current:!1}):(k=new class{#e=r({});get data(){return e(this.#e)}set data(e){i(this.#e,e)}#t=r(null);get form(){return e(this.#t)}set form(e){i(this.#t,e)}#n=r(null);get error(){return e(this.#n)}set error(e){i(this.#n,e)}#r=r({});get params(){return e(this.#r)}set params(e){i(this.#r,e)}#i=r({id:null});get route(){return e(this.#i)}set route(e){i(this.#i,e)}#a=r({});get state(){return e(this.#a)}set state(e){i(this.#a,e)}#o=r(-1);get status(){return e(this.#o)}set status(e){i(this.#o,e)}#s=r(new URL(ze));get url(){return e(this.#s)}set url(e){i(this.#s,e)}},A=new class{#e=r(null);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Le=new class{#e=r(!1);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ae.v=()=>Le.current=!0);function Be(e){Object.assign(k,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=s,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:ke({}),page:ke({}),navigating:a(null),updated:je()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,Qe={},$e={},z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,G=!1,K=!1,ot=!1,st=!1,ct,q,J,Y,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_zorgdt.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_zorgdt.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),q=history.state?.[S],J=history.state?.[C],q||(q=J=Date.now(),history.replaceState({...history.state,[S]:q,[C]:J},``));let r=M[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Z({type:`enter`,url:Ce(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function pt(){z.length=0,st=!1}function mt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ht(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function gt(){Ke(q),me(be,M),mt(J),me(ye,N)}async function _t(e,t,r,i){let a,o;t.invalidateAll&&H(),await Z({type:`goto`,url:Ce(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:i,accept:()=>{if(t.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(O(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(O(e,n))}t.invalidate&&t.invalidate.forEach(Rt)}}),t.invalidateAll&&n().then(n).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(O(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(O(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==V?.id){H();let t={};lt.add(t),V={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function yt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Be(e.props.page),ct=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:M[q]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}ht(J),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?ne(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return lt.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Nt(W.url):!1,p=W.route?i.id!==W.route.id:!1,m=Et(W.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await P.updated.check())return await Je(),await F(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ft(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await R.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function X(e,t){if(e&&!D(e,x,R.hash)){let n=await jt(e);if(!n)return;let r=Mt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Nt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Mt(e){return f(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Nt(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Pt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||tt.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await X(r,!1),_=e===`enter`?Wt(W,g,r,e):Pt({url:r,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let te=q,v=J;f(),G=!0,it&&_.navigation.type!==`enter`&&P.navigating.set(A.current=_.navigation);let y=g&&await Ot(g);if(!y){if(D(r,x,R.hash))return await F(r,s);y=await Ft(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,Y!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:e,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await P.updated.check())return await Je(),await F(r,s);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:q+=e,[C]:J+=e,[xe]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(q,J)}let ne=g&&V?.id===g.id?V.fork:null;V?.fork&&!ne?H():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let n=_.navigation.to;W={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(j=null,ct.$set(y.props),j&&Object.assign(y.props.page,j),Be(y.props.page),b=t?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:re}=document;if(await b,await n(),await n(),Y!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&j&&Object.assign(y.props.page,j);let ie=null;if(at){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=r.hash&&document.getElementById(qt(r)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Ut(r,!ie),at=!0,G=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),e===`popstate`&&ht(J),P.navigating.set(A.current=null)}async function Ft(e,t,n,r,i){return e.origin===Se&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await F(e,i)}var Q={element:void 0,href:void 0};function It(){let e,t;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}L.addEventListener(`mousedown`,n),L.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,L),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,x,R.hash);if(o||s)return;let c=Oe(r),l=a&&Nt(W.url)===Nt(a);if(!(c.reload||l))if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await X(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}function a(){r.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,x,R.hash);if(n||i)continue;let a=Oe(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&yt(t))}}U.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Lt(e,t={}){return e=new URL(Ce(e)),e.origin===Se?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Rt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!G){let e=Wt(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||It(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=De(n,x,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Oe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Pt({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,Ke(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(D(r,x,!1))return;let i=e.target,a=Oe(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht)if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Y={},n===q)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ot||s)){i!==k.state&&(k.state=i),e(a),M[q]=T(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),R.hash&&location.reload())}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[S]:++q,[C]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){W.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),St({loader:R.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await F(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{k as a,_e as c,A as i,ft as n,Le as o,P as r,Me as s,Lt as t};
1
+ import{F as e,I as t,L as n,Q as r,X as i,it as a,n as o,t as s}from"./G9InG5jW.js";import"./tDzg1Ybi.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_gnljix?.base??``,he=globalThis.__sveltekit_gnljix?.assets??x??``,ge=``;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return x+ge+de(e[0],e[1])}var ve=`1785773633705`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Se=location.origin;function Ce(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...w,"":w.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||D(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Se&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Oe(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function ke(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var Ae={v:h};function je(){let{set:e,subscribe:t}=a(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),Ae.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function D(e,t,n){return e.origin!==Se||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function O(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var k,A,Le,Re=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),ze=`a:`;Re?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},A={current:null},Le={current:!1}):(k=new class{#e=r({});get data(){return e(this.#e)}set data(e){i(this.#e,e)}#t=r(null);get form(){return e(this.#t)}set form(e){i(this.#t,e)}#n=r(null);get error(){return e(this.#n)}set error(e){i(this.#n,e)}#r=r({});get params(){return e(this.#r)}set params(e){i(this.#r,e)}#i=r({id:null});get route(){return e(this.#i)}set route(e){i(this.#i,e)}#a=r({});get state(){return e(this.#a)}set state(e){i(this.#a,e)}#o=r(-1);get status(){return e(this.#o)}set status(e){i(this.#o,e)}#s=r(new URL(ze));get url(){return e(this.#s)}set url(e){i(this.#s,e)}},A=new class{#e=r(null);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Le=new class{#e=r(!1);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ae.v=()=>Le.current=!0);function Be(e){Object.assign(k,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=s,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:ke({}),page:ke({}),navigating:a(null),updated:je()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,Qe={},$e={},z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,G=!1,K=!1,ot=!1,st=!1,ct,q,J,Y,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_gnljix.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_gnljix.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),q=history.state?.[S],J=history.state?.[C],q||(q=J=Date.now(),history.replaceState({...history.state,[S]:q,[C]:J},``));let r=M[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Z({type:`enter`,url:Ce(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function pt(){z.length=0,st=!1}function mt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ht(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function gt(){Ke(q),me(be,M),mt(J),me(ye,N)}async function _t(e,t,r,i){let a,o;t.invalidateAll&&H(),await Z({type:`goto`,url:Ce(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:i,accept:()=>{if(t.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(O(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(O(e,n))}t.invalidate&&t.invalidate.forEach(Rt)}}),t.invalidateAll&&n().then(n).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(O(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(O(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==V?.id){H();let t={};lt.add(t),V={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function yt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Be(e.props.page),ct=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:M[q]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}ht(J),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?ne(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return lt.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Nt(W.url):!1,p=W.route?i.id!==W.route.id:!1,m=Et(W.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await P.updated.check())return await Je(),await F(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ft(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await R.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function X(e,t){if(e&&!D(e,x,R.hash)){let n=await jt(e);if(!n)return;let r=Mt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Nt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Mt(e){return f(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Nt(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Pt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||tt.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await X(r,!1),_=e===`enter`?Wt(W,g,r,e):Pt({url:r,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let te=q,v=J;f(),G=!0,it&&_.navigation.type!==`enter`&&P.navigating.set(A.current=_.navigation);let y=g&&await Ot(g);if(!y){if(D(r,x,R.hash))return await F(r,s);y=await Ft(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,Y!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:e,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await P.updated.check())return await Je(),await F(r,s);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:q+=e,[C]:J+=e,[xe]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(q,J)}let ne=g&&V?.id===g.id?V.fork:null;V?.fork&&!ne?H():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let n=_.navigation.to;W={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(j=null,ct.$set(y.props),j&&Object.assign(y.props.page,j),Be(y.props.page),b=t?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:re}=document;if(await b,await n(),await n(),Y!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&j&&Object.assign(y.props.page,j);let ie=null;if(at){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=r.hash&&document.getElementById(qt(r)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Ut(r,!ie),at=!0,G=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),e===`popstate`&&ht(J),P.navigating.set(A.current=null)}async function Ft(e,t,n,r,i){return e.origin===Se&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await F(e,i)}var Q={element:void 0,href:void 0};function It(){let e,t;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}L.addEventListener(`mousedown`,n),L.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,L),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,x,R.hash);if(o||s)return;let c=Oe(r),l=a&&Nt(W.url)===Nt(a);if(!(c.reload||l))if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await X(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}function a(){r.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,x,R.hash);if(n||i)continue;let a=Oe(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&yt(t))}}U.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Lt(e,t={}){return e=new URL(Ce(e)),e.origin===Se?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Rt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!G){let e=Wt(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||It(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=De(n,x,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Oe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Pt({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,Ke(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(D(r,x,!1))return;let i=e.target,a=Oe(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht)if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Y={},n===q)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ot||s)){i!==k.state&&(k.state=i),e(a),M[q]=T(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),R.hash&&location.reload())}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[S]:++q,[C]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){W.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),St({loader:R.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await F(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{k as a,_e as c,A as i,ft as n,Le as o,P as r,Me as s,Lt as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.a2pYxQ7W.js","../chunks/G9InG5jW.js","../chunks/xihTtKlq.js","../chunks/4-desXp-.js","../chunks/tDzg1Ybi.js","../chunks/DWXDZqdt.js","../assets/0.7UApui6t.css","../nodes/1.CD0kv9VK.js","../chunks/TM55IMxf.js","../nodes/2.C0PHn8ew.js","../chunks/eYQozHfV.js","../chunks/B2QV2lSm.js","../nodes/3.CAvzqEhp.js","../chunks/HKC4aqdx.js","../nodes/4.B7hFH7Yi.js"])))=>i.map(i=>d[i]);
2
- import{$ as e,D as t,E as n,F as r,G as i,H as a,K as o,L as s,O as c,Q as l,T as u,U as d,V as f,X as p,i as m,j as h,k as g,n as _,ot as v,pt as y,q as b,r as x,s as S,st as C,y as w}from"../chunks/G9InG5jW.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=g(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=g(`<!> <!>`,1);function M(g,x){C(x,!0);let T=m(x,`components`,23,()=>[]),E=m(x,`data_0`,3,null),D=m(x,`data_1`,3,null);d(()=>x.stores.page.set(x.page)),a(()=>{x.stores,x.page,x.constructors,T(),x.form,E(),D(),x.stores.page.notify()});let O=l(!1),k=l(!1),M=l(null);_(()=>{let e=x.stores.page.subscribe(()=>{r(O)&&(p(k,!0),s().then(()=>{p(M,document.title||`untitled page`,!0)}))});return p(O,!0),e});let N=e(()=>x.constructors[1]);var P=j(),F=o(P),I=n=>{let i=e(()=>x.constructors[0]);var a=c(),s=o(a);w(s,()=>r(i),(e,n)=>{S(n(e,{get data(){return E()},get form(){return x.form},get params(){return x.page.params},children:(e,n)=>{var i=c(),a=o(i);w(a,()=>r(N),(e,t)=>{S(t(e,{get data(){return D()},get form(){return x.form},get params(){return x.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),t(e,i)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,a)},L=n=>{let i=e(()=>x.constructors[0]);var a=c(),s=o(a);w(s,()=>r(i),(e,t)=>{S(t(e,{get data(){return E()},get form(){return x.form},get params(){return x.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,a)};u(F,e=>{x.constructors[1]?e(I):e(L,-1)});var R=b(F,2),z=e=>{var a=A(),o=i(a),s=e=>{var i=h();f(()=>n(i,r(M))),t(e,i)};u(o,e=>{r(k)&&e(s)}),y(a),t(e,a)};u(R,e=>{r(O)&&e(z)}),t(g,P),v()}var N=x(M),P=[()=>O(()=>import(`../nodes/0.a2pYxQ7W.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>O(()=>import(`../nodes/1.CD0kv9VK.js`),__vite__mapDeps([7,1,8,4,2]),import.meta.url),()=>O(()=>import(`../nodes/2.C0PHn8ew.js`),__vite__mapDeps([9,1,8,4,2,3,5,10,11]),import.meta.url),()=>O(()=>import(`../nodes/3.CAvzqEhp.js`),__vite__mapDeps([12,1,8,4,2,3,10,13]),import.meta.url),()=>O(()=>import(`../nodes/4.B7hFH7Yi.js`),__vite__mapDeps([14,1,8,4,2,10,11,13]),import.meta.url)],F=[],I={"/":[2],"/callback":[3],"/pair":[4]},L={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},R=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.decode])),z=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.encode])),B=!1,V=(e,t)=>R[e](t),H=()=>O(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{V as decode,R as decoders,I as dictionary,z as encoders,H as get_error_template,B as hash,L as hooks,k as matchers,P as nodes,N as root,F as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.a2pYxQ7W.js","../chunks/G9InG5jW.js","../chunks/xihTtKlq.js","../chunks/4-desXp-.js","../chunks/tDzg1Ybi.js","../chunks/DWXDZqdt.js","../assets/0.7UApui6t.css","../nodes/1.Bcc3twrr.js","../chunks/xs22-Wnd.js","../nodes/2.dBLbMK7u.js","../chunks/eYQozHfV.js","../chunks/B2QV2lSm.js","../nodes/3.DAi7yBqf.js","../chunks/BZ468YC5.js","../nodes/4.BumxIo63.js"])))=>i.map(i=>d[i]);
2
+ import{$ as e,D as t,E as n,F as r,G as i,H as a,K as o,L as s,O as c,Q as l,T as u,U as d,V as f,X as p,i as m,j as h,k as g,n as _,ot as v,pt as y,q as b,r as x,s as S,st as C,y as w}from"../chunks/G9InG5jW.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=g(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=g(`<!> <!>`,1);function M(g,x){C(x,!0);let T=m(x,`components`,23,()=>[]),E=m(x,`data_0`,3,null),D=m(x,`data_1`,3,null);d(()=>x.stores.page.set(x.page)),a(()=>{x.stores,x.page,x.constructors,T(),x.form,E(),D(),x.stores.page.notify()});let O=l(!1),k=l(!1),M=l(null);_(()=>{let e=x.stores.page.subscribe(()=>{r(O)&&(p(k,!0),s().then(()=>{p(M,document.title||`untitled page`,!0)}))});return p(O,!0),e});let N=e(()=>x.constructors[1]);var P=j(),F=o(P),I=n=>{let i=e(()=>x.constructors[0]);var a=c(),s=o(a);w(s,()=>r(i),(e,n)=>{S(n(e,{get data(){return E()},get form(){return x.form},get params(){return x.page.params},children:(e,n)=>{var i=c(),a=o(i);w(a,()=>r(N),(e,t)=>{S(t(e,{get data(){return D()},get form(){return x.form},get params(){return x.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),t(e,i)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,a)},L=n=>{let i=e(()=>x.constructors[0]);var a=c(),s=o(a);w(s,()=>r(i),(e,t)=>{S(t(e,{get data(){return E()},get form(){return x.form},get params(){return x.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),t(n,a)};u(F,e=>{x.constructors[1]?e(I):e(L,-1)});var R=b(F,2),z=e=>{var a=A(),o=i(a),s=e=>{var i=h();f(()=>n(i,r(M))),t(e,i)};u(o,e=>{r(k)&&e(s)}),y(a),t(e,a)};u(R,e=>{r(O)&&e(z)}),t(g,P),v()}var N=x(M),P=[()=>O(()=>import(`../nodes/0.a2pYxQ7W.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>O(()=>import(`../nodes/1.Bcc3twrr.js`),__vite__mapDeps([7,1,8,4,2]),import.meta.url),()=>O(()=>import(`../nodes/2.dBLbMK7u.js`),__vite__mapDeps([9,1,8,4,2,3,5,10,11]),import.meta.url),()=>O(()=>import(`../nodes/3.DAi7yBqf.js`),__vite__mapDeps([12,1,8,4,2,3,10,13]),import.meta.url),()=>O(()=>import(`../nodes/4.BumxIo63.js`),__vite__mapDeps([14,1,8,4,2,10,11,13]),import.meta.url)],F=[],I={"/":[2],"/callback":[3],"/pair":[4]},L={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},R=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.decode])),z=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.encode])),B=!1,V=(e,t)=>R[e](t),H=()=>O(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{V as decode,R as decoders,I as dictionary,z as encoders,H as get_error_template,B as hash,L as hooks,k as matchers,P as nodes,N as root,F as server_loads};
@@ -0,0 +1 @@
1
+ import{n as e,s as t}from"../chunks/xs22-Wnd.js";export{t as load_css,e as start};
@@ -1 +1 @@
1
- import{D as e,E as t,G as n,K as r,V as i,k as a,ot as o,pt as s,q as c,st as l}from"../chunks/G9InG5jW.js";import{a as u,r as d}from"../chunks/TM55IMxf.js";import"../chunks/xihTtKlq.js";var f={get data(){return u.data},get error(){return u.error},get form(){return u.form},get params(){return u.params},get route(){return u.route},get state(){return u.state},get status(){return u.status},get url(){return u.url}};d.updated.check;var p=f,m=a(`<h1> </h1> <p> </p>`,1);function h(a,u){l(u,!0);var d=m(),f=r(d),h=n(f,!0);s(f);var g=c(f,2),_=n(g,!0);s(g),i(()=>{t(h,p.status),t(_,p.error?.message)}),e(a,d),o()}export{h as component};
1
+ import{D as e,E as t,G as n,K as r,V as i,k as a,ot as o,pt as s,q as c,st as l}from"../chunks/G9InG5jW.js";import{a as u,r as d}from"../chunks/xs22-Wnd.js";import"../chunks/xihTtKlq.js";var f={get data(){return u.data},get error(){return u.error},get form(){return u.form},get params(){return u.params},get route(){return u.route},get state(){return u.state},get status(){return u.status},get url(){return u.url}};d.updated.check;var p=f,m=a(`<h1> </h1> <p> </p>`,1);function h(a,u){l(u,!0);var d=m(),f=r(d),h=n(f,!0);s(f);var g=c(f,2),_=n(g,!0);s(g),i(()=>{t(h,p.status),t(_,p.error?.message)}),e(a,d),o()}export{h as component};
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a as E,at as D,b as O,c as k,d as A,et as j,f as M,ft as N,h as P,ht as ee,i as F,j as te,k as I,l as ne,m as L,mt as re,n as ie,nt as ae,o as R,ot as z,p as B,pt as V,q as H,s as oe,st as U,tt as se,u as ce,v as le,w as ue,x as de,y as fe,z as W}from"../chunks/G9InG5jW.js";import{c as pe}from"../chunks/TM55IMxf.js";import"../chunks/xihTtKlq.js";import{a as me,d as he,f as ge,i as _e,l as ve,n as ye,p as G,r as be,s as xe,t as Se,u as Ce}from"../chunks/4-desXp-.js";import{a as we,i as Te,o as Ee,r as De,s as Oe}from"../chunks/DWXDZqdt.js";import{a as K,i as ke,n as Ae,r as je,t as Me}from"../chunks/eYQozHfV.js";import{a as Ne,n as Pe,o as Fe}from"../chunks/B2QV2lSm.js";var Ie=Object.defineProperty,q=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>q(e,typeof t==`symbol`?t:t+``,n),Le=`https://docs.convex.dev/error#undefined-validator`;function Re(e,t){let n=t===void 0?``:` for field "${t}"`;throw Error(`A validator is undefined${n} in ${e}. This is often caused by circular imports. See ${Le} for details.`)}var ze=class{constructor({isOptional:e}){J(this,`type`),J(this,`fieldPaths`),J(this,`isOptional`),J(this,`isConvexValidator`),this.isOptional=e,this.isConvexValidator=!0}},Be=class e extends ze{constructor({isOptional:e,tableName:t}){if(super({isOptional:e}),J(this,`tableName`),J(this,`kind`,`id`),typeof t!=`string`)throw Error(`v.id(tableName) requires a string`);this.tableName=t}get json(){return{type:`id`,tableName:this.tableName}}asOptional(){return new e({isOptional:`optional`,tableName:this.tableName})}},Ve=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`float64`)}get json(){return{type:`number`}}asOptional(){return new e({isOptional:`optional`})}},He=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`int64`)}get json(){return{type:`bigint`}}asOptional(){return new e({isOptional:`optional`})}},Ue=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`commitTs`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Y=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`boolean`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},X=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`bytes`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},We=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`string`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Ge=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`null`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Ke=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`any`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},qe=class e extends ze{constructor({isOptional:e,fields:t}){super({isOptional:e}),J(this,`fields`),J(this,`kind`,`object`),globalThis.Object.entries(t).forEach(([e,t])=>{if(t===void 0&&Re(`v.object()`,e),!t.isConvexValidator)throw Error(`v.object() entries must be validators`)}),this.fields=t}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([e,t])=>[e,{fieldType:t.json,optional:t.isOptional===`optional`}]))}}asOptional(){return new e({isOptional:`optional`,fields:this.fields})}omit(...t){let n={...this.fields};for(let e of t)delete n[e];return new e({isOptional:this.isOptional,fields:n})}pick(...t){let n={};for(let e of t)n[e]=this.fields[e];return new e({isOptional:this.isOptional,fields:n})}partial(){let t={};for(let[e,n]of globalThis.Object.entries(this.fields))t[e]=n.asOptional();return new e({isOptional:this.isOptional,fields:t})}extend(t){return new e({isOptional:this.isOptional,fields:{...this.fields,...t}})}},Je=class e extends ze{constructor({isOptional:e,value:t}){if(super({isOptional:e}),J(this,`value`),J(this,`kind`,`literal`),typeof t!=`string`&&typeof t!=`boolean`&&typeof t!=`number`&&typeof t!=`bigint`)throw Error(`v.literal(value) must be a string, number, or boolean`);this.value=t}get json(){return{type:this.kind,value:Oe(this.value)}}asOptional(){return new e({isOptional:`optional`,value:this.value})}},Ye=class e extends ze{constructor({isOptional:e,element:t}){super({isOptional:e}),J(this,`element`),J(this,`kind`,`array`),t===void 0&&Re(`v.array()`),this.element=t}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new e({isOptional:`optional`,element:this.element})}},Xe=class e extends ze{constructor({isOptional:e,key:t,value:n}){if(super({isOptional:e}),J(this,`key`),J(this,`value`),J(this,`kind`,`record`),t===void 0&&Re(`v.record()`,`key`),n===void 0&&Re(`v.record()`,`value`),t.isOptional===`optional`)throw Error(`Record validator cannot have optional keys`);if(n.isOptional===`optional`)throw Error(`Record validator cannot have optional values`);if(!t.isConvexValidator||!n.isConvexValidator)throw Error(`Key and value of v.record() but be validators`);this.key=t,this.value=n}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new e({isOptional:`optional`,key:this.key,value:this.value})}},Ze=class e extends ze{constructor({isOptional:e,members:t}){super({isOptional:e}),J(this,`members`),J(this,`kind`,`union`),t.forEach((e,t)=>{if(e===void 0&&Re(`v.union()`,`member at index ${t}`),!e.isConvexValidator)throw Error(`All members of v.union() must be validators`)}),this.members=t}get json(){return{type:this.kind,value:this.members.map(e=>e.json)}}asOptional(){return new e({isOptional:`optional`,members:this.members})}},Z={id:e=>new Be({isOptional:`required`,tableName:e}),null:()=>new Ge({isOptional:`required`}),number:()=>new Ve({isOptional:`required`}),float64:()=>new Ve({isOptional:`required`}),bigint:()=>new He({isOptional:`required`}),int64:()=>new He({isOptional:`required`}),commitTs:()=>new Ue({isOptional:`required`}),boolean:()=>new Y({isOptional:`required`}),string:()=>new We({isOptional:`required`}),bytes:()=>new X({isOptional:`required`}),literal:e=>new Je({isOptional:`required`,value:e}),array:e=>new Ye({isOptional:`required`,element:e}),object:e=>new qe({isOptional:`required`,fields:e}),record:(e,t)=>new Xe({isOptional:`required`,key:e,value:t}),union:(...e)=>new Ze({isOptional:`required`,members:e}),any:()=>new Ke({isOptional:`required`}),optional:e=>e.asOptional(),nullable:e=>Z.union(e,Z.null())},Qe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},$e=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},et=Symbol(`lucide-context`),tt=()=>D(et),nt=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),rt=t(`<svg><!><!></svg>`);function Q(t,n){U(n,!0);let a=tt()??{},c=F(n,`color`,19,()=>a.color??`currentColor`),l=F(n,`size`,19,()=>a.size??24),d=F(n,`strokeWidth`,19,()=>a.strokeWidth??2),f=F(n,`absoluteStrokeWidth`,19,()=>a.absoluteStrokeWidth??!1),p=F(n,`iconNode`,19,()=>[]),h=E(n,nt),g=e(()=>f()?Number(d())*24/Number(l()):d());var _=rt();ne(_,e=>({...Qe,...e,...h,width:l(),height:l(),stroke:c(),"stroke-width":o(g),class:[`lucide-icon lucide`,a.class,n.name&&`lucide-${n.name}`,n.class]}),[()=>!n.children&&!$e(h)&&{"aria-hidden":`true`}]);var y=s(_);v(y,17,p,r,(t,n)=>{var r=e(()=>ee(o(n),2));let a=()=>o(r)[0],s=()=>o(r)[1];var c=m(),l=u(c);le(l,a,!0,(e,t)=>{ne(e,()=>({...s()}))}),i(t,c)});var b=H(y);O(b,()=>n.children??re),V(_),i(t,_),z()}var it=new Set([`$$slots`,`$$events`,`$$legacy`]);function at(e,t){let n=E(t,it),r=[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}],[`path`,{d:`M10 12h4`}]];Q(e,R({name:`archive`},()=>n,{get iconNode(){return r}}))}var ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function st(e,t){let n=E(t,ot),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Q(e,R({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var ct=new Set([`$$slots`,`$$events`,`$$legacy`]);function lt(e,t){let n=E(t,ct),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Q(e,R({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var ut=new Set([`$$slots`,`$$events`,`$$legacy`]);function dt(e,t){let n=E(t,ut),r=[[`path`,{d:`M12 5v16`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`}]];Q(e,R({name:`book-open`},()=>n,{get iconNode(){return r}}))}var ft=new Set([`$$slots`,`$$events`,`$$legacy`]);function pt(e,t){let n=E(t,ft),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Q(e,R({name:`brain`},()=>n,{get iconNode(){return r}}))}var mt=new Set([`$$slots`,`$$events`,`$$legacy`]);function ht(e,t){let n=E(t,mt),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V3`}],[`path`,{d:`M19 21V9`}]];Q(e,R({name:`chart-no-axes-column`},()=>n,{get iconNode(){return r}}))}var gt=new Set([`$$slots`,`$$events`,`$$legacy`]);function _t(e,t){let n=E(t,gt),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Q(e,R({name:`check`},()=>n,{get iconNode(){return r}}))}var vt=new Set([`$$slots`,`$$events`,`$$legacy`]);function yt(e,t){let n=E(t,vt),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Q(e,R({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var bt=new Set([`$$slots`,`$$events`,`$$legacy`]);function xt(e,t){let n=E(t,bt),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Q(e,R({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=E(t,St),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}],[`path`,{d:`M12 18V6`}]];Q(e,R({name:`circle-dollar-sign`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tt(e,t){let n=E(t,wt),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Q(e,R({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Et=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dt(e,t){let n=E(t,Et),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Q(e,R({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function kt(e,t){let n=E(t,Ot),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Q(e,R({name:`copy`},()=>n,{get iconNode(){return r}}))}var At=new Set([`$$slots`,`$$events`,`$$legacy`]);function jt(e,t){let n=E(t,At),r=[[`path`,{d:`M14 9 9 4 4 9`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`}]];Q(e,R({name:`corner-left-up`},()=>n,{get iconNode(){return r}}))}var Mt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nt(e,t){let n=E(t,Mt),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]];Q(e,R({name:`credit-card`},()=>n,{get iconNode(){return r}}))}var Pt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ft(e,t){let n=E(t,Pt),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Q(e,R({name:`download`},()=>n,{get iconNode(){return r}}))}var It=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lt(e,t){let n=E(t,It),r=[[`path`,{d:`m15 15 6 6`}],[`path`,{d:`m15 9 6-6`}],[`path`,{d:`M21 16v5h-5`}],[`path`,{d:`M21 8V3h-5`}],[`path`,{d:`M3 16v5h5`}],[`path`,{d:`m3 21 6-6`}],[`path`,{d:`M3 8V3h5`}],[`path`,{d:`M9 9 3 3`}]];Q(e,R({name:`expand`},()=>n,{get iconNode(){return r}}))}var Rt=new Set([`$$slots`,`$$events`,`$$legacy`]);function zt(e,t){let n=E(t,Rt),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Q(e,R({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Bt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vt(e,t){let n=E(t,Bt),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Q(e,R({name:`eye`},()=>n,{get iconNode(){return r}}))}var Ht=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ut(e,t){let n=E(t,Ht),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 12.5 8 15l2 2.5`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`}]];Q(e,R({name:`file-code`},()=>n,{get iconNode(){return r}}))}var Wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gt(e,t){let n=E(t,Wt),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]];Q(e,R({name:`file-diff`},()=>n,{get iconNode(){return r}}))}var Kt=new Set([`$$slots`,`$$events`,`$$legacy`]);function qt(e,t){let n=E(t,Kt),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Q(e,R({name:`file-text`},()=>n,{get iconNode(){return r}}))}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yt(e,t){let n=E(t,Jt),r=[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]];Q(e,R({name:`folder-open`},()=>n,{get iconNode(){return r}}))}var Xt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zt(e,t){let n=E(t,Xt),r=[[`path`,{d:`M12 10v6`}],[`path`,{d:`M9 13h6`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]];Q(e,R({name:`folder-plus`},()=>n,{get iconNode(){return r}}))}var Qt=new Set([`$$slots`,`$$events`,`$$legacy`]);function $t(e,t){let n=E(t,Qt),r=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]];Q(e,R({name:`folder`},()=>n,{get iconNode(){return r}}))}var en=new Set([`$$slots`,`$$events`,`$$legacy`]);function tn(e,t){let n=E(t,en),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`rect`,{width:`10`,height:`8`,x:`7`,y:`8`,rx:`1`}]];Q(e,R({name:`fullscreen`},()=>n,{get iconNode(){return r}}))}var nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function rn(e,t){let n=E(t,nn),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]];Q(e,R({name:`globe`},()=>n,{get iconNode(){return r}}))}var an=new Set([`$$slots`,`$$events`,`$$legacy`]);function on(e,t){let n=E(t,an),r=[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]];Q(e,R({name:`hourglass`},()=>n,{get iconNode(){return r}}))}var sn=new Set([`$$slots`,`$$events`,`$$legacy`]);function cn(e,t){let n=E(t,sn),r=[[`path`,{d:`M16 5h6`}],[`path`,{d:`M19 2v6`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}]];Q(e,R({name:`image-plus`},()=>n,{get iconNode(){return r}}))}var ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function un(e,t){let n=E(t,ln),r=[[`path`,{d:`M13 5h8`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`m3 17 2 2 4-4`}],[`path`,{d:`m3 7 2 2 4-4`}]];Q(e,R({name:`list-checks`},()=>n,{get iconNode(){return r}}))}var dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function fn(e,t){let n=E(t,dn),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];Q(e,R({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var pn=new Set([`$$slots`,`$$events`,`$$legacy`]);function mn(e,t){let n=E(t,pn),r=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]];Q(e,R({name:`lock`},()=>n,{get iconNode(){return r}}))}var hn=new Set([`$$slots`,`$$events`,`$$legacy`]);function gn(e,t){let n=E(t,hn),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];Q(e,R({name:`log-out`},()=>n,{get iconNode(){return r}}))}var _n=new Set([`$$slots`,`$$events`,`$$legacy`]);function vn(e,t){let n=E(t,_n),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Q(e,R({name:`moon`},()=>n,{get iconNode(){return r}}))}var yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function bn(e,t){let n=E(t,yn),r=[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`}],[`path`,{d:`M2 6h4`}],[`path`,{d:`M2 10h4`}],[`path`,{d:`M2 14h4`}],[`path`,{d:`M2 18h4`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`}]];Q(e,R({name:`notebook-pen`},()=>n,{get iconNode(){return r}}))}var xn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sn(e,t){let n=E(t,xn),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Q(e,R({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`]);function wn(e,t){let n=E(t,Cn),r=[[`path`,{d:`M15 12h-5`}],[`path`,{d:`M15 8h-5`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`}]];Q(e,R({name:`scroll-text`},()=>n,{get iconNode(){return r}}))}var Tn=new Set([`$$slots`,`$$events`,`$$legacy`]);function En(e,t){let n=E(t,Tn),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Q(e,R({name:`search`},()=>n,{get iconNode(){return r}}))}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function On(e,t){let n=E(t,Dn),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Q(e,R({name:`settings`},()=>n,{get iconNode(){return r}}))}var kn=new Set([`$$slots`,`$$events`,`$$legacy`]);function An(e,t){let n=E(t,kn),r=[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`}]];Q(e,R({name:`shrink`},()=>n,{get iconNode(){return r}}))}var jn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mn(e,t){let n=E(t,jn),r=[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]];Q(e,R({name:`square-pen`},()=>n,{get iconNode(){return r}}))}var Nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pn(e,t){let n=E(t,Nn),r=[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]];Q(e,R({name:`square-terminal`},()=>n,{get iconNode(){return r}}))}var Fn=new Set([`$$slots`,`$$events`,`$$legacy`]);function In(e,t){let n=E(t,Fn),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]];Q(e,R({name:`square`},()=>n,{get iconNode(){return r}}))}var Ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rn(e,t){let n=E(t,Ln),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Q(e,R({name:`sun`},()=>n,{get iconNode(){return r}}))}var zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bn(e,t){let n=E(t,zn),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Q(e,R({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Vn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hn(e,t){let n=E(t,Vn),r=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]];Q(e,R({name:`user-round`},()=>n,{get iconNode(){return r}}))}var Un=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wn(e,t){let n=E(t,Un),r=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]];Q(e,R({name:`wallet`},()=>n,{get iconNode(){return r}}))}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kn(e,t){let n=E(t,Gn),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Q(e,R({name:`wrench`},()=>n,{get iconNode(){return r}}))}var qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jn(e,t){let n=E(t,qn),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Q(e,R({name:`x`},()=>n,{get iconNode(){return r}}))}var Yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xn(e,t){let n=E(t,Yn),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Q(e,R({name:`zap`},()=>n,{get iconNode(){return r}}))}var Zn=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Qn=[`difference`,`intersection`,`symmetricDifference`,`union`],$n=!1,er=class e extends Set{#e=new Map;#t=g(0);#n=g(0);#r=W||-1;constructor(e){if(super(),e){for(var t of e)super.add(t);this.#n.v=super.size}$n||this.#a()}#i(e){return W===this.#r?g(e):w(e)}#a(){$n=!0;var t=e.prototype,n=Set.prototype;for(let e of Zn)t[e]=function(...t){return o(this.#t),n[e].apply(this,t)};for(let r of Qn)t[r]=function(...t){o(this.#t);var i=n[r].apply(this,t);return new e(i)}}has(e){var t=super.has(e),n=this.#e,r=n.get(e);if(r===void 0){if(!t)return o(this.#t),!1;r=this.#i(!0),n.set(e,r)}return o(r),t}add(e){return super.has(e)||(super.add(e),S(this.#n,super.size),C(this.#t)),this}delete(e){var t=super.delete(e),n=this.#e,r=n.get(e);return r!==void 0&&(n.delete(e),S(r,!1)),t&&(S(this.#n,super.size),C(this.#t)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var t of e.values())S(t,!1);e.clear(),S(this.#n,0),C(this.#t)}}keys(){return this.values()}values(){return o(this.#t),super.values()}entries(){return o(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return o(this.#n)}},tr=class extends Map{#e=new Map;#t=g(0);#n=g(0);#r=W||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return W===this.#r?g(e):w(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return o(this.#t),!1;return o(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{o(this.#t);return}return o(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),S(this.#n,super.size),C(o);else if(i!==t){C(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&C(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),S(n,-1)),r&&(S(this.#n,super.size),C(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;S(this.#n,0);for(var t of e.values())S(t,-1);C(this.#t),e.clear()}}#a(){o(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)o(n)}keys(){return o(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return o(this.#n),super.size}},nr=2e4,rr=I(`<a><!></a>`),ir=I(`<button><!></button>`);function ar(t,n){U(n,!0);let r=F(n,`type`,3,`button`),a=F(n,`variant`,3,`default`),c=F(n,`className`,3,``),l=F(n,`disabled`,3,!1),d=e(()=>a()===`outline`?`border-border bg-surface/80 text-foreground hover:bg-hover-fill`:`bg-primary text-primary-foreground hover:opacity-90`),f=e(()=>K(`focus-visible:ring-ring/50 inline-flex h-10 items-center justify-center gap-2 rounded-full border border-transparent px-5 py-2 text-sm font-medium transition-opacity focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,o(d),c()));var h=m(),g=u(h),_=e=>{var t=rr(),r=s(t);O(r,()=>n.children??re),V(t),b(()=>{A(t,`href`,n.href),L(t,1,P(o(f)))}),p(`click`,t,function(...e){n.onclick?.apply(this,e)}),i(e,t)},v=e=>{var t=ir(),a=s(t);O(a,()=>n.children??re),V(t),b(()=>{A(t,`type`,r()),t.disabled=l(),L(t,1,P(o(f)))}),p(`click`,t,function(...e){n.onclick?.apply(this,e)}),i(e,t)};y(g,e=>{n.href&&!l()?e(_):e(v,-1)}),i(t,h),z()}f([`click`]);var or=I(`<!> <!>`,1),sr=I(`<p class="text-destructive text-center text-sm" role="alert"> </p>`),cr=I(`<div class="text-muted-foreground flex items-center justify-center gap-2 text-sm" aria-live="polite" aria-busy="true"><!> <span> </span></div>`),lr=I(`<div><!></div>`);function ur(t,n){U(n,!0);let r=F(n,`overlayOpen`,3,!1),c=e(()=>n.authState.isAuthenticated&&(n.authState.isLoading||!n.authState.connectionFailed)),l=e(()=>!n.authState.isAuthenticated&&n.authState.isLoading),d=e(()=>n.authState.isConfigured?o(c)?`Confirming your session`:n.authState.connectionFailed?`Couldn’t connect your account`:o(l)?`Preparing sign-in`:`Sign in to continue`:`Sign-in unavailable`),f=e(()=>n.authState.isConfigured?o(c)?`Verifying your secure connection before opening your projects.`:n.authState.connectionFailed?`You’re signed in, but the secure connection could not be confirmed. Retry or sign out and sign in again.`:o(l)?`Getting account sign-in ready. This usually takes a moment.`:`Sign in to sync your coding threads, streaming responses, and projects.`:`Account sign-in is not configured on this deployment, so account actions are disabled.`),p=e(()=>n.authState.isAuthenticated?`Almost there`:`One moment`),h=e(()=>!!(n.authState.isConfigured&&n.authState.error&&!r()));var g=lr(),_=s(g);Me(_,{get title(){return o(d)},get description(){return o(f)},actions:e=>{var t=m(),r=u(t),a=e=>{var t=or(),r=u(t),a=e=>{ar(e,{get onclick(){return n.onRetry},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Retry`);i(e,n)},$$slots:{default:!0}})};y(r,e=>{n.authState.connectionFailed&&e(a)}),ar(H(r,2),{variant:`outline`,get onclick(){return n.onSignOut},children:(e,t)=>{N();var n=te(`Sign Out`);i(e,n)},$$slots:{default:!0}}),i(e,t)},o=e=>{var t=or(),r=u(t);ar(r,{get onclick(){return n.onSignIn},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Sign In`);i(e,n)},$$slots:{default:!0}}),ar(H(r,2),{variant:`outline`,get onclick(){return n.onSignUp},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Create Account`);i(e,n)},$$slots:{default:!0}}),i(e,t)};y(r,e=>{n.authState.isAuthenticated?e(a):n.authState.isConfigured&&e(o,1)}),i(e,t)},children:(e,t)=>{var r=or(),c=u(r),l=e=>{var t=sr(),r=s(t,!0);V(t),b(()=>a(r,n.authState.error)),i(e,t)};y(c,e=>{o(h)&&e(l)});var d=H(c,2),f=e=>{var t=cr(),n=s(t);fn(n,{class:`size-3.5 animate-spin`,"aria-hidden":`true`});var r=H(n,2),c=s(r,!0);V(r),V(t),b(()=>a(c,o(p))),i(e,t)};y(d,e=>{n.authState.isLoading&&e(f)}),i(e,r)},$$slots:{actions:!0,default:!0}}),V(g),b(()=>{g.inert=r(),A(g,`aria-hidden`,r()?!0:void 0)}),i(t,g),z()}var dr=I(`<div class="text-muted-foreground mb-4 flex justify-center" aria-hidden="true"><!></div>`),fr=I(`<p class="text-muted-foreground mt-6 max-h-24 overflow-y-auto font-mono text-[11px] leading-5 break-all select-all"> </p>`),pr=I(`<p class="text-destructive mt-4 text-sm" role="alert"> </p>`),mr=I(`<p class="mt-4 text-sm text-amber-700" role="alert"> </p>`),hr=I(`<!> Open browser`,1),gr=I(`<!> Copied`,1),_r=I(`<!> Copy link`,1),vr=I(`<!> <!>`,1),yr=I(`<span class="text-muted-foreground border-border inline-flex h-10 items-center justify-center gap-2 rounded-full border px-4 text-sm">Preparing link…</span>`),br=I(`<div class="app-entry-shell fixed inset-0 z-50 flex items-center justify-center px-6" role="presentation"><div class="border-border/70 bg-surface relative z-10 w-full max-w-md rounded-2xl border p-8 text-center shadow-[0_18px_50px_-28px_oklch(0.2_0.02_260/0.45)] outline-none" role="dialog" aria-modal="true" aria-labelledby="browser-signin-title" aria-describedby="browser-signin-desc" tabindex="-1"><!> <h2 id="browser-signin-title" class="font-brand text-foreground text-[1.35rem] font-semibold tracking-tight"> </h2> <p id="browser-signin-desc" class="text-muted-foreground mt-3 text-sm leading-[1.55]"> </p> <!> <!> <!> <div class="mt-6 flex flex-wrap items-center justify-center gap-3"><!></div> <div class="mt-6"><button type="button" class="text-muted-foreground hover:text-foreground decoration-foreground/30 hover:decoration-foreground text-[13px] underline underline-offset-4 transition-colors">Cancel</button></div></div></div>`);function xr(t,n){U(n,!0);let r=F(n,`error`,3,null),l=g(!1),f=g(null),h=g(null),_=null;c(()=>{if(!n.open){S(l,!1),S(f,null);return}let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=!1;d().then(()=>{t||o(h)?.focus()});function r(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),n.onCancel();return}if(e.key!==`Tab`||!o(h))return;let t=Array.from(o(h).querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`)&&e.offsetParent!==null);if(t.length===0){e.preventDefault(),o(h).focus();return}let r=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&(a===o(h)||a===r||!o(h).contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===o(h)||a===i||!o(h).contains(a))&&(e.preventDefault(),r.focus())}return window.addEventListener(`keydown`,r,!0),()=>{t=!0,window.removeEventListener(`keydown`,r,!0),_!==null&&(window.clearTimeout(_),_=null),e?.isConnected&&e.focus()}});async function v(){if(n.signInUrl)try{await navigator.clipboard.writeText(n.signInUrl),S(l,!0),S(f,null),_!==null&&window.clearTimeout(_),_=window.setTimeout(()=>{S(l,!1),_=null},2e3)}catch{S(l,!1),S(f,`Could not copy the sign-in link. Select it above and copy manually.`)}}function x(){if(!n.signInUrl)return;let e=window.open(n.signInUrl,`_blank`);if(e){try{e.opener=null}catch{}n.onClearOpenError?.()}}let C=e(()=>n.signInUrl?r()?{title:`Open the sign-in link`,description:`Your browser didn’t open automatically. Continue with the options below.`}:{title:`Finish signing in`,description:`We opened your browser to complete sign-in. Waiting for you to finish there.`}:{title:`Preparing sign-in`,description:`Preparing a secure sign-in link. This usually takes a moment.`});var w=m(),T=u(w),E=e=>{var t=br(),c=s(t),d=s(c),g=e=>{var t=dr();fn(s(t),{class:`size-5 animate-spin`}),V(t),i(e,t)};y(d,e=>{n.signInUrl||e(g)});var _=H(d,2),w=s(_,!0);V(_);var T=H(_,2),E=s(T,!0);V(T);var D=H(T,2),O=e=>{var t=fr(),r=s(t,!0);V(t),b(()=>{A(t,`title`,n.signInUrl),a(r,n.signInUrl)}),i(e,t)};y(D,e=>{n.signInUrl&&e(O)});var k=H(D,2),j=e=>{var t=pr(),n=s(t,!0);V(t),b(()=>a(n,r())),i(e,t)};y(k,e=>{r()&&e(j)});var M=H(k,2),P=e=>{var t=mr(),n=s(t,!0);V(t),b(()=>a(n,o(f))),i(e,t)};y(M,e=>{o(f)&&e(P)});var ee=H(M,2),F=s(ee),te=e=>{var t=vr(),n=u(t);ar(n,{onclick:x,children:(e,t)=>{var n=hr();zt(u(n),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,n)},$$slots:{default:!0}}),ar(H(n,2),{variant:`outline`,onclick:()=>void v(),children:(e,t)=>{var n=m(),r=u(n),a=e=>{var t=gr();_t(u(t),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,t)},s=e=>{var t=_r();kt(u(t),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,t)};y(r,e=>{o(l)?e(a):e(s,-1)}),i(e,n)},$$slots:{default:!0}}),i(e,t)},I=e=>{var t=yr();i(e,t)};y(F,e=>{n.signInUrl?e(te):e(I,-1)}),V(ee);var ne=H(ee,2),L=s(ne);V(ne),V(c),oe(c,e=>S(h,e),()=>o(h)),V(t),b(()=>{a(w,o(C).title),a(E,o(C).description)}),p(`click`,t,e=>{e.target===e.currentTarget&&n.onCancel()}),p(`click`,L,function(...e){n.onCancel?.apply(this,e)}),i(e,t)};y(T,e=>{n.open&&e(E)}),i(t,w),z()}f([`click`]);function Sr(){let e=g(null),t=g(!1),n=null;function r(){n&&=(clearTimeout(n),null)}function i(i,a,o=!1){let s=i.currentTarget;if(!(s instanceof HTMLElement))return;let c=s.getBoundingClientRect();r(),S(t,o,!0),S(e,{top:c.top-8,left:c.left+c.width/2,label:a},!0),o&&(n=setTimeout(()=>{S(t,!1),n=null,S(e,null)},2500))}function a(n=!1){o(t)&&!n||(r(),S(t,!1),S(e,null))}return c(()=>r),{get lockTooltip(){return o(e)},showLockTooltip:i,hideLockTooltip:a}}function Cr(e){function t(t){let n=t.target;n instanceof Node&&(e.getRoot()?.contains(n)||e.onOutside())}function n(t){t.key===`Escape`&&e.onEscape()}return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,n)}}var wr=I(`<div class="text-tooltip-foreground bg-tooltip ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`);function Tr(e,t){U(t,!0);var n=m(),r=u(n),o=e=>{var n=wr(),r=s(n,!0);V(n),b(()=>{B(n,`top: ${t.tooltip.top}px; left: ${t.tooltip.left}px;`),a(r,t.tooltip.label)}),i(e,n)};y(r,e=>{t.tooltip&&e(o)}),i(e,n),z()}var Er=I(`<label class="text-muted-foreground flex h-10 items-center gap-2 border-b border-[var(--hairline)] px-2"><!> <span class="sr-only"> </span> <input class="text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"/></label>`),Dr=I(`<p class="text-muted-foreground px-3 pt-1 pb-2 text-[11px] font-medium"> </p>`),Or=I(`<span><!></span>`),kr=I(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),Ar=I(`<button type="button"><!> <span> </span> <!></button>`),jr=I(`<p class="text-muted-foreground px-3 py-5 text-center text-sm">No matches found</p>`),Mr=I(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[19rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <div><!> <!></div></div>`),Nr=I(`<div><button type="button" aria-haspopup="dialog"><!> <span class="truncate"> </span> <!></button> <!></div> <!>`,1);function Pr(t,n){U(n,!0);let r=F(n,`value`,15,``),l=F(n,`disabled`,3,!1),d=F(n,`className`,3,``),f=F(n,`triggerClassName`,3,``),_=F(n,`searchable`,3,!1),x=g(!1),C=g(``),w=g(null),T=g(null),E=g(null),D=Sr(),j=e(()=>{let e=n.options.find(e=>e.id===r());return e&&!e.locked?e:n.options.find(e=>!e.locked)??e??n.options[0]??null}),M=e(()=>_()&&o(C).trim()?n.options.filter(e=>e.label.toLocaleLowerCase().includes(o(C).trim().toLocaleLowerCase())):n.options),N=e(()=>o(M).filter(e=>!e.locked));function ee(){l()||(S(x,!o(x)),o(x)&&_()?queueMicrotask(()=>o(E)?.focus()):S(C,``))}function te(e,t){let i=n.options.find(t=>t.id===e);if(i){if(i.locked){t&&i.lockTooltip&&D.showLockTooltip(t,i.lockTooltip,!0);return}e!==r()&&(r(e),n.onValueChange?.(e)),S(x,!1),S(C,``),D.hideLockTooltip(!0),o(T)?.focus()}}function I(e){e.key===`Enter`&&o(N).length!==0&&(e.preventDefault(),te(o(N)[0].id))}c(()=>{if(!o(x)){S(C,``),D.hideLockTooltip();return}return Cr({getRoot:()=>o(w),onOutside:()=>{S(x,!1)},onEscape:()=>{S(x,!1),o(T)?.focus()}})}),c(()=>{l()&&S(x,!1)});var ne=Nr(),re=u(ne),ie=s(re),ae=s(ie),R=e=>{var t=m(),r=u(t);O(r,()=>n.optionIcon,()=>o(j)),i(e,t)};y(ae,e=>{n.optionIcon&&o(j)&&e(R)});var B=H(ae,2),se=s(B,!0);V(B);var le=H(B,2);{let t=e(()=>K(`text-muted-foreground size-3 shrink-0 transition-transform`,o(x)&&`rotate-180`));yt(le,{get class(){return o(t)}})}V(ie),oe(ie,e=>S(T,e),()=>o(T));var ue=H(ie,2),de=t=>{var c=Mr(),l=s(c),u=e=>{var t=Er(),r=s(t);En(r,{class:`size-4 shrink-0`});var c=H(r,2),l=s(c);V(c);var u=H(c,2);ce(u),oe(u,e=>S(E,e),()=>o(E)),V(t),b((e,t)=>{a(l,`Search ${e??``}`),A(u,`placeholder`,t)},[()=>n.menuTitle.toLocaleLowerCase(),()=>`Search ${n.menuTitle.toLocaleLowerCase()}…`]),p(`keydown`,u,I),k(u,()=>o(C),e=>S(C,e)),i(e,t)},d=e=>{var t=Dr(),r=s(t,!0);V(t),b(()=>a(r,n.menuTitle)),i(e,t)};y(l,e=>{_()?e(u):e(d,-1)});var f=H(l,2),m=s(f);v(m,17,()=>o(M),e=>e.id,(t,c)=>{let l=e(()=>!!o(c).locked);var u=Ar(),d=s(u),f=e=>{var t=Or(),r=s(t);O(r,()=>n.optionIcon,()=>o(c)),V(t),b(e=>L(t,1,e),[()=>P(K(`flex size-7 shrink-0 items-center justify-center`,(o(l),`text-muted-foreground`)))]),i(e,t)};y(d,e=>{n.optionIcon&&e(f)});var m=H(d,2),g=s(m,!0);V(m);var _=H(m,2),v=e=>{var t=kr();mn(s(t),{class:`size-3.5`}),V(t),i(e,t)},x=t=>{{let n=e(()=>K(`text-accent-strong size-4 shrink-0 transition-opacity`,o(c).id===r()?`opacity-100`:`opacity-0`));_t(t,{get class(){return o(n)}})}};y(_,e=>{o(l)?e(v):e(x,-1)}),V(u),b((e,t)=>{L(u,1,e),A(u,`aria-pressed`,!o(l)&&o(c).id===r()),A(u,`aria-disabled`,o(l)),A(u,`aria-label`,o(l)&&o(c).lockTooltip?`${o(c).label}. ${o(c).lockTooltip}`:void 0),L(m,1,t),a(g,o(c).label)},[()=>P(K(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none focus-visible:ring-2`,o(l)?`cursor-not-allowed opacity-45`:`hover:bg-hover-fill`,!o(l)&&o(c).id===r()&&`bg-hover-fill`)),()=>P(K(`min-w-0 flex-1 truncate text-sm font-medium`,o(l)?`text-muted-foreground`:`text-foreground`))]),h(`mouseenter`,u,e=>{o(l)&&o(c).lockTooltip&&D.showLockTooltip(e,o(c).lockTooltip)}),h(`mouseleave`,u,()=>D.hideLockTooltip()),h(`focus`,u,e=>{o(l)&&o(c).lockTooltip&&D.showLockTooltip(e,o(c).lockTooltip)}),h(`blur`,u,()=>D.hideLockTooltip()),p(`click`,u,e=>{te(o(c).id,e)}),i(t,u)});var g=H(m,2),x=e=>{var t=jr();i(e,t)};y(g,e=>{o(M).length===0&&e(x)}),V(f),V(c),b(e=>{A(c,`aria-label`,n.menuTitle),L(f,1,e)},[()=>P(K(`space-y-0.5`,_()&&`pt-1.5`))]),i(t,c)};y(ue,e=>{o(x)&&e(de)}),V(re),oe(re,e=>S(w,e),()=>o(w)),Tr(H(re,2),{get tooltip(){return D.lockTooltip}}),b((e,t)=>{L(re,1,e),L(ie,1,t),A(ie,`aria-expanded`,o(x)),A(ie,`aria-label`,n.ariaLabel),ie.disabled=l(),a(se,o(j)?.triggerLabel??o(j)?.label??r())},[()=>P(K(`relative`,d())),()=>P(K(`focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-8 shrink-0 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-sm font-medium transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50`,!n.optionIcon&&`gap-1`,f()))]),p(`click`,ie,ee),i(t,ne),z()}f([`click`,`keydown`]);var Fr=t(`<title> </title>`),Ir=t(`<svg viewBox="146.694 227.042 267.198 264.812" xmlns="http://www.w3.org/2000/svg" role="img" fill="none"><!><path d="M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z" fill="currentColor"></path></svg>`);function Lr(e,t){U(t,!0);let n=F(t,`className`,3,``),r=F(t,`title`,3,`OpenAI`);var o=Ir(),c=s(o),l=e=>{var t=Fr(),n=s(t,!0);V(t),b(()=>a(n,r())),i(e,t)};y(c,e=>{r()&&e(l)}),N(),V(o),b(e=>{L(o,0,e),A(o,`aria-hidden`,!r()||void 0)},[()=>P(K(`size-4`,n()))]),i(e,o),z()}var Rr=t(`<svg viewBox="0 0 24 24" role="img" aria-label="Anthropic" fill="currentColor"><path d="M17.304 3.541h-3.672l6.696 16.918H24Zm-10.608 0L0 20.459h3.744l1.37-3.553h7.005l1.369 3.553h3.744L10.536 3.541Zm-.371 10.223 2.291-5.945 2.292 5.945Z"></path></svg>`),zr=t(`<svg viewBox="0 0 24 24" role="img" aria-label="xAI" fill="currentColor"><path d="M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z"></path></svg>`),Br=t(`<svg viewBox="0 0 24 24" role="img" aria-label="Moonshot" fill="currentColor" fill-rule="evenodd"><path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path></svg>`),Vr=t(`<svg viewBox="0 0 24 24" role="img" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="9"></circle><path d="M12 8v4l2.5 1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);function Hr(t,n){U(n,!0);let r=F(n,`className`,3,``);var a=m(),s=u(a),c=t=>{{let n=e(()=>K(`size-4 text-foreground`,r()));Lr(t,{get className(){return o(n)}})}},l=e=>{var t=Rr();b(e=>L(t,0,e),[()=>P(K(`size-4 text-[#D97757]`,r()))]),i(e,t)},d=e=>{var t=zr();b(e=>L(t,0,e),[()=>P(K(`text-foreground size-4`,r()))]),i(e,t)},f=e=>{var t=Br();b(e=>L(t,0,e),[()=>P(K(`text-foreground size-4`,r()))]),i(e,t)},p=e=>{var t=Vr();b(e=>{L(t,0,e),A(t,`aria-label`,n.provider||`Unknown provider`)},[()=>P(K(`text-muted-foreground size-4`,r()))]),i(e,t)};y(s,e=>{n.provider===`openai`?e(c):n.provider===`anthropic`?e(l,1):n.provider===`xai`?e(d,2):n.provider===`fireworks`?e(f,3):e(p,-1)}),i(t,a),z()}var Ur=[`none`,`low`,`medium`,`high`,`xhigh`,`max`],Wr=[`standard`,`fast`],Gr=[`gpt-5.6-sol`,`gpt-5.6-terra`,`gpt-5.6-luna`,`claude-opus-5`,`claude-fable-5`,`grok-4.5`,`kimi-k3`],Kr=[{id:`gpt-5.6-sol`,label:`GPT-5.6 Sol`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:.005,cacheRead:5e-4,cacheWrite:.00625,output:.03,fastMultiplier:2}},{id:`gpt-5.6-terra`,label:`GPT-5.6 Terra`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:.002,cacheRead:2e-4,cacheWrite:.0025,output:.012,fastMultiplier:2}},{id:`gpt-5.6-luna`,label:`GPT-5.6 Luna`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:2e-4,cacheRead:2e-5,cacheWrite:25e-5,output:.0012,fastMultiplier:2}},{id:`claude-opus-5`,label:`Claude Opus 5`,provider:`anthropic`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`medium`,`high`,`xhigh`,`max`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.005,cacheRead:5e-4,cacheWrite:.00625,output:.025,fastMultiplier:2}},{id:`claude-fable-5`,label:`Claude Fable 5`,provider:`anthropic`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`medium`,`high`,`xhigh`,`max`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.01,cacheRead:.001,cacheWrite:.0125,output:.05,fastMultiplier:1}},{id:`grok-4.5`,label:`Grok 4.5`,provider:`xai`,contextWindowTokens:5e5,autoCompactTokenLimit:4e5,reasoningEfforts:[`low`,`medium`,`high`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.002,cacheRead:5e-4,cacheWrite:.002,output:.006,fastMultiplier:2}},{id:`kimi-k3`,label:`Kimi K3`,provider:`fireworks`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`high`,`max`],defaultReasoningEffort:`max`,serviceTiers:Wr,usageWeights:{input:.003,cacheRead:3e-4,cacheWrite:.003,output:.015,fastMultiplier:1.5}}],qr=`gpt-5.6-sol`,Jr=Xr(qr).defaultReasoningEffort,Yr=`standard`;function Xr(e){let t=Kr.find(t=>t.id===e);if(!t)throw Error(`Unsupported model: ${e}`);return t}function Zr(e){return e}function Qr(e,t){return e.models.find(e=>e.id===t)}function $r(e,t,n){return(e.tierAllowedModels[t]??[]).includes(n)}function ei(e,t,n){return $r(e,t,n)?n:e.tierAllowedModels[t]?.[0]??e.defaultModelId}function ti(e,t,n){return(e.tierAllowedServiceTiers[t]??[]).includes(n)}function ni(e,t,n){return n.serviceTiers.filter(n=>ti(e,t,n))}function ri(e,t,n){return n.serviceTiers.map(n=>{let r={id:n,label:ci(n)};return ti(e,t,n)?r:{...r,locked:!0,lockTooltip:e.serviceTierLockUpgradeMessage}})}function ii(e,t){let n=[],r=[];for(let i of e.models){let a={id:i.id,label:i.label,provider:i.provider};$r(e,t,i.id)?n.push(a):r.push({...a,locked:!0,lockTooltip:e.modelLockUpgradeMessage})}return[...n,...r]}var ai={none:`None`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra High`,max:`Max`},oi={standard:`Standard`,fast:`Fast`};function si(e){return ai[e]??e}function ci(e){return oi[e]??e}var li=I(`<span class="text-muted-foreground ml-auto text-xs">Default</span>`),ui=I(`<button type="button" class="focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2"><!> <span> </span> <!></button>`),di=I(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),fi=I(`<button type="button"><!> <!> <span> </span> <!></button>`),pi=I(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[15rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog" aria-label="Reasoning and service tier"><p class="text-muted-foreground px-3 pt-1 pb-1.5 text-[11px] font-medium">Reasoning</p> <div class="space-y-0.5"></div> <div class="mx-2 my-2 h-px bg-[var(--hairline)]"></div> <p class="text-muted-foreground px-3 pb-1.5 text-[11px] font-medium">Service tier</p> <div class="space-y-0.5"></div></div>`),mi=I(`<div><button type="button" class="focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-9 shrink-0 items-center gap-1 rounded-lg px-2 text-[15px] transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50" aria-haspopup="dialog" aria-label="Select reasoning effort and service tier"><span> </span> <!></button> <!></div> <!>`,1);function hi(t,n){U(n,!0);let r=F(n,`reasoningEffort`,31,()=>l(Jr)),d=F(n,`serviceTier`,31,()=>l(Yr)),f=F(n,`disabled`,3,!1),m=F(n,`className`,3,``),_=e(()=>n.serviceTierOptions?n.serviceTierOptions:n.model.serviceTiers.map(e=>({id:e,label:ci(e)}))),x=e(()=>o(_).filter(e=>!e.locked).map(e=>e.id)),C=g(!1),w=g(null),T=g(null),E=Sr();function D(e){r(e)}function O(e,t){let n=o(_).find(t=>t.id===e);if(n){if(n.locked){t&&n.lockTooltip&&E.showLockTooltip(t,n.lockTooltip,!0);return}d(e)}}c(()=>{n.model.reasoningEfforts.includes(r())||r(n.model.defaultReasoningEffort),o(x).includes(d())||d(o(x)[0]??`standard`)}),c(()=>{if(!o(C)){E.hideLockTooltip();return}return Cr({getRoot:()=>o(w),onOutside:()=>{S(C,!1)},onEscape:()=>{S(C,!1),o(T)?.focus()}})}),c(()=>{f()&&S(C,!1)});var k=mi(),j=u(k),M=s(j),N=s(M),ee=s(N);V(N);var te=H(N,2);{let t=e(()=>K(`text-muted-foreground size-3 shrink-0 transition-transform`,o(C)&&`rotate-180`));yt(te,{get class(){return o(t)}})}V(M),oe(M,e=>S(T,e),()=>o(T));var I=H(M,2),ne=t=>{var c=pi(),l=H(s(c),2);v(l,20,()=>n.model.reasoningEfforts,e=>e,(t,c)=>{var l=ui(),u=s(l);{let t=e(()=>K(`size-4 shrink-0 transition-opacity`,c===r()?`opacity-100`:`opacity-0`));_t(u,{get class(){return o(t)}})}var d=H(u,2),f=s(d,!0);V(d);var m=H(d,2),h=e=>{var t=li();i(e,t)};y(m,e=>{c===n.model.defaultReasoningEffort&&e(h)}),V(l),b(e=>{A(l,`aria-pressed`,c===r()),a(f,e)},[()=>si(c)]),p(`click`,l,()=>D(c)),i(t,l)}),V(l);var u=H(l,6);v(u,21,()=>o(_),e=>e.id,(t,n)=>{let r=e(()=>!!o(n).locked);var c=fi(),l=s(c),u=e=>{var t=di();mn(s(t),{class:`size-3.5`}),V(t),i(e,t)},f=t=>{{let r=e(()=>K(`size-4 shrink-0 transition-opacity`,o(n).id===d()?`opacity-100`:`opacity-0`));_t(t,{get class(){return o(r)}})}};y(l,e=>{o(r)?e(u):e(f,-1)});var m=H(l,2),g=e=>{Xn(e,{class:`size-3.5 shrink-0 text-amber-400`})};y(m,e=>{o(n).id===`fast`&&e(g)});var _=H(m,2),v=s(_,!0);V(_);var S=H(_,2),C=e=>{var t=li();i(e,t)};y(S,e=>{!o(r)&&o(n).id===o(x)[0]&&e(C)}),V(c),b((e,t)=>{L(c,1,e),A(c,`aria-pressed`,!o(r)&&o(n).id===d()),A(c,`aria-disabled`,o(r)),A(c,`aria-label`,o(r)&&o(n).lockTooltip?`${o(n).label}. ${o(n).lockTooltip}`:void 0),L(_,1,t),a(v,o(n).label)},[()=>P(K(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2`,o(r)?`cursor-not-allowed opacity-45`:`text-foreground hover:bg-hover-fill`)),()=>P(K(o(r)&&`text-muted-foreground`))]),h(`mouseenter`,c,e=>{o(r)&&o(n).lockTooltip&&E.showLockTooltip(e,o(n).lockTooltip)}),h(`mouseleave`,c,()=>E.hideLockTooltip()),h(`focus`,c,e=>{o(r)&&o(n).lockTooltip&&E.showLockTooltip(e,o(n).lockTooltip)}),h(`blur`,c,()=>E.hideLockTooltip()),p(`click`,c,e=>O(o(n).id,e)),i(t,c)}),V(u),V(c),i(t,c)};y(I,e=>{o(C)&&e(ne)}),V(j),oe(j,e=>S(w,e),()=>o(w)),Tr(H(j,2),{get tooltip(){return E.lockTooltip}}),b((e,t,n)=>{L(j,1,e),A(M,`aria-expanded`,o(C)),M.disabled=f(),a(ee,`${t??``} · ${n??``}`)},[()=>P(K(`relative`,m())),()=>si(r()),()=>ci(d())]),p(`click`,M,()=>{S(C,!o(C))}),i(t,k),z()}f([`click`]);function gi(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}var _i=/(^|\s)\$([a-z0-9-]*)$/i;function vi(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(_i);return!n||n.index===void 0?null:{query:n[2].toLowerCase(),tokenStart:n.index+n[1].length}}function yi(e,t){return vi(e,t)?.query??null}function bi(e,t){let n=t.toLowerCase(),r=[],i=[];for(let t of e){let e=t.name.toLowerCase();e.startsWith(n)?r.push(t):n.length>0&&e.includes(n)&&i.push(t)}return r.sort((e,t)=>e.name.localeCompare(t.name)),i.sort((e,t)=>e.name.localeCompare(t.name)),[...r,...i]}function xi(e,t,n){let r=vi(e,t);if(!r)return null;let i=t;for(;i<e.length&&/[a-z0-9-]/i.test(e[i]??``);)i+=1;e[i]===` `&&(i+=1);let a=`$${n} `;return{text:`${e.slice(0,r.tokenStart)}${a}${e.slice(i)}`,caret:r.tokenStart+a.length}}var Si=`agent_decide`;function Ci(e){return!!e.selectedOptionId?.trim()||!!e.text.trim()}function wi(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var Ti=Z.union(Z.string(),Z.number(),Z.boolean(),Z.null()),Ei=8;function Di(e){return e===0?Ti:Z.union(Ti,Z.array(Di(e-1)),Z.record(Z.string(),Di(e-1)))}var Oi=Di(Ei),ki=[`free`,`pro`,`admin`],Ai={free:`Free`,pro:`Pro`,admin:`Admin`},ji={modelUsage:{weekly:5e3,monthly:15e3},webTools:{weekly:500,monthly:1500}};ji.modelUsage.weekly*5,ji.modelUsage.monthly*5,ji.webTools.weekly*5,ji.webTools.monthly*5;function Mi(e){return e.map(e=>Z.literal(e))}Z.union(...Mi(Ur)),Z.union(...Mi(Wr)),Z.union(...Mi(Gr)),Z.union(...Mi(ki)),Z.union(Z.literal(`active`),Z.literal(`on_hold`),Z.literal(`cancelled`),Z.literal(`expired`),Z.literal(`failed`));var Ni=Z.object({path:Z.string(),directory:Z.string(),contents:Z.string(),truncated:Z.boolean()}),Pi=Z.object({patch:Z.string()}),Fi=Z.object({cmd:Z.string(),workdir:Z.optional(Z.string()),shell:Z.optional(Z.string()),timeoutMs:Z.optional(Z.number()),yieldTimeMs:Z.optional(Z.number()),maxOutputChars:Z.optional(Z.number())}),Ii=Z.object({url:Z.string()}),Li=Z.object({query:Z.string(),numResults:Z.optional(Z.number())}),Ri=Z.object({sessionId:Z.string(),chars:Z.optional(Z.string()),terminate:Z.optional(Z.boolean()),yieldTimeMs:Z.optional(Z.number())}),zi=Z.union(Z.literal(`markdown`),Z.literal(`html`),Z.literal(`react`)),Bi=Z.object({title:Z.string(),contentType:zi,content:Z.string()}),Vi=Z.object({artifactId:Z.string(),content:Z.string()}),Hi=Z.object({name:Z.string()}),Ui=Z.object({instruction:Z.optional(Z.string()),action:Z.optional(Z.object({selector:Z.string(),description:Z.string(),method:Z.optional(Z.string()),arguments:Z.optional(Z.array(Z.string()))})),startUrl:Z.optional(Z.string())}),Wi=Z.union(...Mi([`one_time`,`weekly`,`monthly`,`yearly`])),Gi=Z.union(Z.literal(`listed`),Z.literal(`any`)),Ki=Z.union(...Mi([`pending`,`active`,`paused`,`consumed`,`cancelled`,`expired`]));Z.union(Z.literal(`awaiting_result`),Z.literal(`completed`),Z.literal(`declined`),Z.literal(`failed`));var qi=Z.union(Z.literal(`approved`),Z.literal(`declined`)),Ji=Z.object({userEmail:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),merchantUrl:Z.optional(Z.string()),countryCode:Z.optional(Z.string()),amountCap:Z.string(),currency:Z.string(),frequency:Wi,scope:Gi,description:Z.string(),maxCharges:Z.optional(Z.number()),validUntil:Z.optional(Z.string())}),Yi=Z.object({mandateId:Z.string()}),Xi=Z.object({mandateId:Z.string(),amount:Z.string(),currency:Z.string(),description:Z.string(),reference:Z.optional(Z.string())}),Zi=Z.object({chargeId:Z.string(),outcome:qi,amountPaid:Z.optional(Z.string())}),Qi=Z.object({id:Z.string(),label:Z.string()}),$i=Z.object({question:Z.string(),options:Z.array(Qi),yieldTimeMs:Z.optional(Z.number()),timeoutMs:Z.optional(Z.number())}),ea=Z.object({questionId:Z.id(`agentQuestions`),yieldTimeMs:Z.optional(Z.number())});Z.union(Z.object({}),Pi,$i,ea,Fi,Hi,Ii,Li,Ri,Bi,Vi,Ui,Ji,Yi,Xi,Zi);var ta=Z.object({changes:Z.array(Z.object({path:Z.string(),operation:Z.union(Z.literal(`created`),Z.literal(`updated`),Z.literal(`deleted`),Z.literal(`renamed`),Z.literal(`copied`))}))}),na=Z.object({command:Z.string(),cwd:Z.string(),sessionId:Z.optional(Z.string()),exitCode:Z.optional(Z.number()),success:Z.boolean(),running:Z.boolean(),timedOut:Z.boolean(),stdout:Z.string(),stderr:Z.string(),output:Z.string(),truncated:Z.boolean(),error:Z.optional(Z.string())}),ra=Z.object({url:Z.string(),markdown:Z.string(),truncated:Z.boolean()}),ia=Z.object({results:Z.array(Z.object({title:Z.optional(Z.string()),url:Z.string(),publishedDate:Z.optional(Z.string()),author:Z.optional(Z.string()),text:Z.optional(Z.string())}))}),aa=Z.object({mandateId:Z.id(`mandates`),approvalUrl:Z.string(),expiresAt:Z.string()}),oa=Z.object({mandateId:Z.id(`mandates`),pravaMandateId:Z.optional(Z.string()),status:Ki,description:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),amountCap:Z.string(),remaining:Z.optional(Z.string()),currency:Z.string(),frequency:Wi,scope:Gi,approvalUrl:Z.optional(Z.string()),validUntil:Z.optional(Z.string()),renewsAt:Z.optional(Z.string())}),sa=Z.object({mandates:Z.array(Z.object({mandateId:Z.optional(Z.id(`mandates`)),pravaMandateId:Z.string(),status:Z.string(),description:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),approvedAmount:Z.string(),remaining:Z.optional(Z.string()),currency:Z.string(),validUntil:Z.optional(Z.string()),renewsAt:Z.optional(Z.string())}))}),ca=Z.object({chargeId:Z.id(`mandateCharges`),transactionId:Z.string(),token:Z.optional(Z.string()),dynamicCvv:Z.optional(Z.string()),expiryMonth:Z.optional(Z.string()),expiryYear:Z.optional(Z.string())}),la=Z.object({reported:Z.boolean(),alreadyReported:Z.optional(Z.boolean()),inFlight:Z.optional(Z.boolean())}),ua=Z.object({text:Z.string(),truncated:Z.boolean()}),da=Z.object({selector:Z.string(),description:Z.string(),method:Z.optional(Z.string()),arguments:Z.optional(Z.array(Z.string()))}),fa=Z.object({actions:Z.array(da),text:Z.string(),truncated:Z.boolean()}),pa=Z.object({name:Z.string(),description:Z.string(),content:Z.string(),dir:Z.optional(Z.string()),truncated:Z.optional(Z.boolean())}),ma=Z.object({optionId:Z.optional(Z.string()),optionLabel:Z.optional(Z.string()),text:Z.optional(Z.string())}),ha=Z.object({questionId:Z.id(`agentQuestions`),question:Z.string(),options:Z.array(Qi),pending:Z.boolean(),timedOut:Z.boolean(),answer:Z.optional(ma)}),ga=Z.object({artifactId:Z.string(),version:Z.number(),title:Z.optional(Z.string()),contentType:Z.optional(zi)});Z.union(Z.string(),Z.array(Ni),ta,ha,na,pa,ra,ia,ga,ua,fa,aa,oa,sa,ca,la),Z.union(Z.literal(`disconnected`),Z.literal(`connected`)),Z.union(Z.literal(`queued`),Z.literal(`running`),Z.literal(`awaiting_executor`),Z.literal(`completed`),Z.literal(`failed`),Z.literal(`cancelled`));var _a=[`cancelled`,`completed`,`failed`];Z.union(...Mi(_a));function va(e){return _a.includes(e)}Z.union(Z.literal(`apply_patch`),Z.literal(`ask_question`),Z.literal(`await_question`),Z.literal(`browser_observe`),Z.literal(`browser_act`),Z.literal(`browser_extract`),Z.literal(`exec_command`),Z.literal(`get_workspace_instructions`),Z.literal(`mandate_setup`),Z.literal(`mandate_status`),Z.literal(`mandate_list`),Z.literal(`mandate_charge`),Z.literal(`mandate_report`),Z.literal(`read_skill`),Z.literal(`scrape_url`),Z.literal(`web_search`),Z.literal(`write_stdin`),Z.literal(`create_artifact`),Z.literal(`update_artifact`)),Z.union(Z.literal(`pending`),Z.literal(`answered`),Z.literal(`timedOut`),Z.literal(`cancelled`)),Z.union(Z.literal(`pending`),Z.literal(`claimed`),Z.literal(`completed`),Z.literal(`failed`),Z.literal(`cancelled`)),Z.union(Z.literal(`prompt`),Z.literal(`response`));var ya=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`],ba=`10 MiB`,xa=Z.object({type:Z.literal(`text`),id:Z.string(),text:Z.string(),turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),Sa=Z.object({type:Z.literal(`reasoning`),id:Z.string(),text:Z.string(),turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),Ca=Z.object({type:Z.literal(`tool-call`),partId:Z.optional(Z.string()),callId:Z.string(),name:Z.string(),input:Oi,turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),wa=Z.union(...Mi([`cancelled`,`failed`]));Z.object({error:Z.string(),status:wa});var Ta=Z.object({type:Z.literal(`tool-result`),callId:Z.string(),name:Z.optional(Z.string()),output:Oi});Z.union(xa,Sa,Ca,Ta);var Ea=Z.union(Z.literal(`system`),Z.literal(`user`),Z.literal(`assistant`)),Da=Z.union(Z.object({type:Z.literal(`text`),text:Z.string()}),Z.object({type:Z.literal(`image`),imageJson:Z.string()})),Oa=Z.union(Z.object({type:Z.literal(`text`),text:Z.string(),additionalParamsJson:Z.optional(Z.string())}),Z.object({type:Z.literal(`reasoning`),id:Z.optional(Z.string()),blocksJson:Z.string()}),Z.object({type:Z.literal(`toolCall`),id:Z.string(),callId:Z.optional(Z.string()),name:Z.string(),argumentsJson:Z.string(),signature:Z.optional(Z.string()),additionalParamsJson:Z.optional(Z.string())}),Z.object({type:Z.literal(`toolResult`),id:Z.string(),callId:Z.optional(Z.string()),items:Z.array(Da)}),Z.object({type:Z.literal(`image`),imageJson:Z.string()}),Z.object({type:Z.literal(`audio`),audioJson:Z.string()}),Z.object({type:Z.literal(`video`),videoJson:Z.string()}),Z.object({type:Z.literal(`document`),documentJson:Z.string()}));Z.object({role:Ea,assistantId:Z.optional(Z.string()),contents:Z.array(Oa)});function ka(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e===r[t])}var Aa=ya;function ja(e){return Aa.includes(e)}function Ma(e,t){return e>=4?`You can attach up to 4 images.`:ja(t.type)?t.size>10485760?`${t.name||`This image`} is larger than ${ba}.`:null:`${t.name||`This file`} is not a supported image. Use JPEG, PNG, GIF, or WebP.`}var Na=I(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]"><span class="inline-flex items-center gap-0.75"><span class="bg-foreground/28 size-1 animate-pulse rounded-full"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:200ms]"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:400ms]"></span></span> <span> </span></div>`),Pa=I(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]" role="status" aria-live="polite"><span class="bg-foreground/28 size-1.5 animate-pulse rounded-full"></span> <span> </span></div>`),Fa=I(`<li><button type="button"> </button></li>`),Ia=I(`<div class="mb-3" role="group" aria-label="Agent question"><p class="text-foreground text-[14px] leading-6 font-medium"> </p> <ul class="mt-2 flex flex-col gap-1.5" aria-label="Answer options"></ul></div>`),La=I(`<span class="absolute inset-0 flex items-center justify-center" role="status"><span class="border-border border-t-foreground/80 size-3.5 animate-spin rounded-full border-2"></span></span>`),Ra=I(`<span class="text-destructive absolute inset-x-0 bottom-0 bg-rose-950/80 px-1 py-0.5 text-center text-[9px] leading-3" role="alert">Failed</span>`),za=I(`<li><img/> <!> <button type="button" class="bg-foreground/70 text-background hover:bg-foreground/90 absolute top-1 right-1 flex size-4.5 cursor-pointer items-center justify-center rounded-full transition disabled:cursor-not-allowed disabled:opacity-40"><!></button></li>`),Ba=I(`<ul class="mb-3 flex flex-wrap items-center gap-2" aria-label="Attached images"></ul>`),Va=I(`<p class="text-muted-foreground px-3 py-2 text-sm">Loading skills…</p>`),Ha=I(`<div class="flex items-center justify-between gap-3 px-3 py-2"><p class="text-muted-foreground text-sm">Couldn’t load skills</p> <button type="button" class="text-muted-foreground hover:text-foreground text-sm underline-offset-2 hover:underline">Retry</button></div>`),Ua=I(`<p class="text-muted-foreground px-3 py-2 text-sm">No matching skills</p>`),Wa=I(`<button type="button" role="option"><span class="text-sm font-medium"> </span> <span class="text-muted-foreground line-clamp-2 text-[12px]"> </span></button>`),Ga=I(`<div class="border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl" id="composer-skills-listbox" aria-label="Available skills"><!></div>`),Ka=I(`<button type="button" class="flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100" aria-label="Stop generation" title="Stop"><!></button>`),qa=I(`<button type="button" class="bg-primary/90 text-primary-foreground hover:bg-primary flex h-10 w-10 items-center justify-center rounded-full transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:opacity-30 disabled:hover:scale-100"><!></button>`),Ja=I(`<div class="bg-tooltip text-tooltip-foreground ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`),Ya=I(`<footer class="shrink-0 px-6 py-4"><div class="mx-auto max-w-336"><!> <div><div><div class="relative flex min-h-33 flex-col px-4 pt-4 pb-2.5"><!> <!> <div class="relative min-h-0 flex-1"><!> <textarea rows="1" class="text-foreground placeholder:text-muted-foreground field-sizing-content max-h-40 min-h-17 w-full resize-none overflow-y-auto border-0 bg-transparent px-0 py-0 text-[14px] leading-6 outline-none" role="combobox" aria-autocomplete="list" aria-haspopup="listbox" autocomplete="off"></textarea></div> <div class="flex min-w-0 flex-nowrap items-center justify-between gap-3 overflow-visible px-0 pt-2.5 pb-0"><div class="-m-1 flex min-w-0 flex-1 items-center gap-1 overflow-visible p-1"><input type="file" class="hidden" multiple=""/> <button type="button" class="text-muted-foreground enabled:hover:text-foreground flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition enabled:cursor-pointer disabled:opacity-40"><!></button> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!></div> <div class="flex shrink-0 flex-nowrap items-center justify-end gap-2.5"><div class="group/context relative"><button type="button" class="focus-visible:ring-ring/60 relative flex size-8 cursor-help items-center justify-center rounded-full focus-visible:ring-2 focus-visible:outline-none" aria-describedby="context-window-details"><span class="bg-muted size-5.5 rounded-full"></span></button> <div id="context-window-details" class="border-border bg-popover invisible absolute right-0 bottom-full z-50 mb-3 w-76 translate-y-1 rounded-xl border p-4 opacity-0 shadow-(--composer-shadow) transition duration-150 group-focus-within/context:visible group-focus-within/context:translate-y-0 group-focus-within/context:opacity-100 group-hover/context:visible group-hover/context:translate-y-0 group-hover/context:opacity-100" role="tooltip"><div class="flex items-center justify-between gap-4 text-[13px]"><span class="text-foreground font-medium">Context window</span> <span class="text-muted-foreground"> </span></div> <div class="bg-hover-fill mt-3 h-1.5 overflow-hidden rounded-full"><div class="bg-accent h-full rounded-full transition-[width] duration-300"></div></div> <div class="text-muted-foreground mt-3 flex items-center justify-between text-[12px]"><span>Total processed</span> <span> </span></div> <p class="text-muted-foreground mt-4 text-[12px] leading-5"> </p></div></div> <!> <!></div></div></div></div></div></div></footer> <!>`,1);function Xa(t,n){U(n,!0);let r=F(n,`prompt`,15,``),d=F(n,`selectedModel`,31,()=>l(qr)),f=F(n,`selectedReasoningEffort`,31,()=>l(Jr)),_=F(n,`selectedServiceTier`,31,()=>l(Yr)),x=F(n,`pendingQuestion`,3,null),C=F(n,`selectedQuestionOptionId`,15,null),w=F(n,`projectSkills`,3,null),T=Te(),E=Ee(G.billing.getMySubscription,()=>T.isAuthenticated&&!T.isLoading?{}:`skip`),D=e(()=>E.data?.tier),O=e(()=>!!E.error),M=e(()=>n.modelCatalog?ii(n.modelCatalog,o(D)??`free`):[]),N=e(()=>n.modelCatalog?Qr(n.modelCatalog,d()):void 0),ee=e(()=>n.modelCatalog&&o(N)?ri(n.modelCatalog,o(D)??`free`,o(N)):void 0),te=e(()=>o(N)!==void 0&&(o(O)||o(D)!==void 0&&n.modelCatalog!==void 0&&$r(n.modelCatalog,o(D),d()))),I=g(null),ne=g(null),ie=g(null),ae=g(l([])),R=g(`idle`),se=g(!1),ce=g(0),le=g(0),ue=0,de,fe=l([]),W=e(()=>x()!=null),pe=e(()=>n.isRunning&&!o(W)||n.isSubmitting),me=e(()=>!!r().trim()||n.attachments.length>0),he=e(()=>Ci({selectedOptionId:C(),text:r()})),ge=e(()=>o(W)?o(he):o(me)),_e=e(()=>n.attachments.some(e=>e.status!==`ready`)),ve=e(()=>n.attachments.length<4&&!o(pe)&&!o(W)),ye=g(null);c(()=>{let e=x()?.questionId??null;e!==o(ye)&&(S(ye,e,!0),C(null),r().trim()&&r(``))});let be=`Attach images (up to 4)`,xe=typeof CSS<`u`&&CSS.supports(`field-sizing`,`content`),Se=e(()=>n.contextUsage.contextWindowTokens>0?Math.min(100,Math.round(n.contextUsage.inputTokens/n.contextUsage.contextWindowTokens*100)):0),Ce=e(()=>n.contextUsage.contextWindowTokens>0?Math.round(n.contextUsage.autoCompactTokenLimit/n.contextUsage.contextWindowTokens*100):0),we=e(()=>yi(r(),o(le))),De=e(()=>o(we)!==null&&!o(se)&&!o(W)),Oe=e(()=>o(we)===null?[]:bi(o(ae),o(we))),K=e(()=>o(De)&&o(Oe).length>0?`composer-skill-option-${o(ce)}`:void 0);function ke(){S(le,o(I)?.selectionStart??r().length,!0)}function Ae(){S(ae,[],!0),S(R,`idle`),S(se,!1),S(ce,0),ue+=1}async function je(e=!1){if(o(R)===`loading`||(o(R)===`ready`||o(R)===`error`)&&!e)return;if(!w()?.load){S(ae,[],!0),S(R,`ready`);return}let t=++ue;S(R,`loading`);try{let e=await w().load();if(t!==ue)return;S(ae,e,!0),S(R,`ready`)}catch{if(t!==ue)return;S(ae,[],!0),S(R,`error`)}}function Me(e){let t=xi(r(),o(le),e.name);t&&(r(t.text),S(le,t.caret,!0),S(se,!0),queueMicrotask(()=>{o(I)&&(o(I).focus(),o(I).setSelectionRange(t.caret,t.caret),q())}))}function Ne(e){let t=e.currentTarget,r=Array.from(t.files??[]);t.value=``,r.length>0&&n.onAttachFiles(r)}function Pe(e){let t=Array.from(e.clipboardData?.files??[]).filter(e=>e.type.startsWith(`image/`));t.length===0||n.isRunning||n.isSubmitting||o(W)||(e.preventDefault(),n.onAttachFiles(t))}function Fe(e){let t=e.currentTarget;if(!(t instanceof HTMLButtonElement)||t.disabled)return;let n=t.getBoundingClientRect();S(ie,{top:n.top-8,left:n.left+n.width/2},!0)}function Ie(){S(ie,null)}function q(){if(!o(I)||xe)return;let e=o(I);e.style.height=`68px`;let t=Math.min(Math.max(e.scrollHeight,68),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`}function J(e){if(o(De)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),o(Oe).length===0)return;let t=e.key===`ArrowDown`?1:-1;S(ce,(o(ce)+t+o(Oe).length)%o(Oe).length);return}if(e.key===`Escape`){e.preventDefault(),S(se,!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=o(Oe)[o(ce)];t&&Me(t);return}}!n.canSend||!o(W)&&!o(te)||n.isSubmitting||o(pe)||!o(ge)||!o(W)&&o(_e)||gi(e)&&(e.preventDefault(),n.onSubmit())}function Le(e){C(C()===e?null:e)}function Re(e){if(!n.modelCatalog)return;let t=Qr(n.modelCatalog,e);t&&f(t.defaultReasoningEffort)}function ze(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1).replace(/\.0$/,``)}m`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}c(()=>{n.modelCatalog&&(!d()||!Qr(n.modelCatalog,d()))&&(d(n.modelCatalog.defaultModelId),f(n.modelCatalog.defaultReasoningEffort),_(n.modelCatalog.defaultServiceTier))}),c(()=>{if(!n.modelCatalog||!o(D))return;let e=ei(n.modelCatalog,o(D),d());e!==d()&&(d(e),f(Qr(n.modelCatalog,e)?.defaultReasoningEffort??n.modelCatalog.defaultReasoningEffort));let t=Qr(n.modelCatalog,e);if(!t)return;let r=ni(n.modelCatalog,o(D),t);r.includes(_())||_(r[0]??n.modelCatalog.defaultServiceTier)}),c(()=>{r(),q()}),c(()=>{let e=w()?.workspacePath??null;if(de!==e&&(de=e,Ae()),o(we)===null){S(se,!1);return}o(se)||je()}),c(()=>{o(Oe),S(ce,0)}),c(()=>{!o(De)||o(Oe).length===0||fe[o(ce)]?.scrollIntoView({block:`nearest`})});var Be=Ya(),Ve=u(Be),He=s(Ve),Ue=s(He),Y=e=>{var t=Na(),r=H(s(t),2),o=s(r);V(r),V(t),b(()=>a(o,`Working for ${n.elapsedLabel??``}`)),i(e,t)},X=e=>{var t=Pa(),r=H(s(t),2),o=s(r,!0);V(r),V(t),b(()=>a(o,n.isStarting?`Starting agent…`:`Sending request…`)),i(e,t)};y(Ue,e=>{n.elapsedLabel?e(Y):n.isSubmitting&&e(X,1)});var We=H(Ue,2);L(We,1,P(`composer-shell mx-auto w-full max-w-[48rem] rounded-[28px] p-px transition-colors duration-200`));var Ge=s(We);L(Ge,1,P(`composer-inner rounded-[27px] border border-[var(--hairline)] transition-colors duration-200`));var Ke=s(Ge),qe=s(Ke),Je=t=>{var n=Ia(),r=s(n),c=s(r,!0);V(r);var l=H(r,2);v(l,21,()=>x().options,e=>e.id,(t,n)=>{let r=e(()=>o(n).id===Si),c=e(()=>C()===o(n).id);var l=Fa(),u=s(l),d=s(u,!0);V(u),V(l),b(()=>{L(u,1,`w-full rounded-lg border px-3 py-2 text-left text-[13px] leading-5 transition ${o(c)?`border-foreground/40 bg-hover-fill-strong text-foreground`:o(r)?`border-border/70 text-muted-foreground/80 hover:text-muted-foreground hover:bg-hover-fill`:`border-border text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),A(u,`aria-pressed`,o(c)),a(d,o(n).label)}),p(`click`,u,()=>{Le(o(n).id)}),i(t,l)}),V(l),V(n),b(()=>a(c,x().question)),i(t,n)};y(qe,e=>{x()&&e(Je)});var Ye=H(qe,2),Xe=e=>{var t=Ba();v(t,21,()=>n.attachments,e=>e.localId,(e,t)=>{var r=za(),a=s(r),c=H(a,2),l=e=>{var n=La();b(()=>A(n,`aria-label`,`Uploading ${o(t).name??``}`)),i(e,n)},u=e=>{var t=Ra();i(e,t)};y(c,e=>{o(t).status===`uploading`?e(l):o(t).status===`error`&&e(u,1)});var d=H(c,2);Jn(s(d),{class:`size-3`,"aria-hidden":`true`}),V(d),V(r),b(()=>{L(r,1,`group relative size-14 overflow-hidden rounded-xl border ${o(t).status===`error`?`border-rose-500/60`:`border-border`}`),A(r,`title`,o(t).error??o(t).name),A(a,`src`,o(t).previewUrl),A(a,`alt`,o(t).name),L(a,1,`size-full object-cover ${o(t).status===`uploading`?`opacity-50`:``}`),A(d,`aria-label`,`Remove ${o(t).name??``}`),d.disabled=o(pe)}),p(`click`,d,()=>n.onRemoveAttachment(o(t).localId)),i(e,r)}),V(t),i(e,t)};y(Ye,e=>{n.attachments.length>0&&!o(W)&&e(Xe)});var Ze=H(Ye,2),Z=s(Ze),Qe=e=>{var t=Ga(),n=s(t),r=e=>{var t=Va();i(e,t)},c=e=>{var t=Ha(),n=H(s(t),2);V(t),p(`click`,n,()=>{je(!0)}),i(e,t)},l=e=>{var t=Ua();i(e,t)},d=e=>{var t=m(),n=u(t);v(n,19,()=>o(Oe),e=>e.name,(e,t,n)=>{var r=Wa(),c=s(r),l=s(c);V(c);var u=H(c,2),d=s(u,!0);V(u),V(r),oe(r,(e,t)=>fe[t]=e,e=>fe?.[e],()=>[o(n)]),b(()=>{A(r,`id`,`composer-skill-option-${o(n)??``}`),L(r,1,`flex w-full flex-col gap-0.5 px-3 py-2 text-left transition ${o(ce)===o(n)?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),A(r,`aria-selected`,o(ce)===o(n)),a(l,`$${o(t).name??``}`),a(d,o(t).description)}),h(`pointerenter`,r,()=>{S(ce,o(n),!0)}),p(`click`,r,()=>{Me(o(t))}),i(e,r)}),i(e,t)};y(n,e=>{o(R)===`loading`?e(r):o(R)===`error`?e(c,1):o(Oe).length===0?e(l,2):e(d,-1)}),V(t),b(()=>A(t,`role`,o(R)===`ready`&&o(Oe).length>0?`listbox`:`status`)),i(e,t)};y(Z,e=>{o(De)&&e(Qe)});var $e=H(Z,2);j($e),oe($e,e=>S(I,e),()=>o(I)),V(Ze);var et=H(Ze,2),tt=s(et),nt=s(tt);oe(nt,e=>S(ne,e),()=>o(ne));var rt=H(nt,2);cn(s(rt),{class:`size-4`,"aria-hidden":`true`}),V(rt);var Q=H(rt,4);{let t=(e,t=re)=>{Hr(e,{get provider(){return t().provider},className:`size-4 shrink-0`})},r=e(()=>o(pe)||o(W)||n.modelCatalog===void 0);Pr(Q,{get options(){return o(M)},ariaLabel:`Select model`,menuTitle:`Model`,get disabled(){return o(r)},searchable:!0,onValueChange:Re,className:`z-20 shrink-0`,triggerClassName:`h-9 border-0 bg-transparent px-2 text-[15px] text-foreground shadow-none hover:bg-transparent focus-visible:ring-0`,get value(){return d()},set value(e){d(e)},optionIcon:t,$$slots:{optionIcon:!0}})}var it=H(Q,4),at=t=>{{let n=e(()=>o(pe)||o(W));hi(t,{get model(){return o(N)},get serviceTierOptions(){return o(ee)},get disabled(){return o(n)},className:`z-20 shrink-0`,get reasoningEffort(){return f()},set reasoningEffort(e){f(e)},get serviceTier(){return _()},set serviceTier(e){_(e)}})}};y(it,e=>{o(N)&&e(at)}),V(tt);var ot=H(tt,2),st=s(ot),ct=s(st),ut=H(ct,2),dt=s(ut),ft=H(s(dt),2),pt=s(ft);V(ft),V(dt);var mt=H(dt,2),ht=s(mt);V(mt);var gt=H(mt,2),_t=H(s(gt),2),vt=s(_t,!0);V(_t),V(gt);var yt=H(gt,2),bt=s(yt);V(yt),V(ut),V(st);var xt=H(st,2),St=e=>{var t=Ka();In(s(t),{class:`size-3.5 fill-current`}),V(t),p(`click`,t,function(...e){n.onCancel?.apply(this,e)}),i(e,t)};y(xt,e=>{n.isRunning&&e(St)});var Ct=H(xt,2),wt=e=>{var t=qa();lt(s(t),{class:`size-4`}),V(t),b(()=>{t.disabled=!n.canSend||!o(W)&&!o(te)||n.isSubmitting||!o(ge)||!o(W)&&o(_e),A(t,`aria-label`,o(W)?`Submit answer`:`Send message`)}),p(`click`,t,function(...e){n.onSubmit?.apply(this,e)}),i(e,t)};y(Ct,e=>{(o(W)||!n.isRunning)&&e(wt)}),V(ot),V(et),V(Ke),V(Ge),V(We),V(He),V(Ve);var Tt=H(Ve,2),Et=e=>{var t=Ja(),n=s(t,!0);V(t),b(()=>{B(t,`top: ${o(ie).top}px; left: ${o(ie).left}px;`),a(n,be)}),i(e,t)};y(Tt,e=>{o(ie)&&e(Et)}),b((e,t,n,r)=>{A($e,`placeholder`,o(W)?`Add detail, or type a custom answer`:`Ask anything, @tag files/directories, or use $ to show available skills`),$e.disabled=o(pe),A($e,`aria-expanded`,o(De)),A($e,`aria-controls`,o(De)?`composer-skills-listbox`:void 0),A($e,`aria-activedescendant`,o(K)),A(nt,`accept`,e),A(rt,`aria-label`,be),rt.disabled=!o(ve),A(ct,`aria-label`,`Context window ${o(Se)}% full`),B(ct,`background: conic-gradient(var(--accent) ${o(Se)*3.6}deg, var(--hover-fill-strong) 0deg);`),a(pt,`${o(Se)??``}% · ${t??``}/${n??``}`),B(ht,`width: ${o(Se)}%`),a(vt,r),a(bt,`Sprocket automatically compacts context at about ${o(Ce)??``}% so
1
+ import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a as E,at as D,b as O,c as k,d as A,et as j,f as M,ft as N,h as P,ht as ee,i as F,j as te,k as I,l as ne,m as L,mt as re,n as ie,nt as ae,o as R,ot as z,p as B,pt as V,q as H,s as oe,st as U,tt as se,u as ce,v as le,w as ue,x as de,y as fe,z as W}from"../chunks/G9InG5jW.js";import{c as pe}from"../chunks/xs22-Wnd.js";import"../chunks/xihTtKlq.js";import{a as me,d as he,f as ge,i as _e,l as ve,n as ye,p as G,r as be,s as xe,t as Se,u as Ce}from"../chunks/4-desXp-.js";import{a as we,i as Te,o as Ee,r as De,s as Oe}from"../chunks/DWXDZqdt.js";import{a as K,i as ke,n as Ae,r as je,t as Me}from"../chunks/eYQozHfV.js";import{a as Ne,n as Pe,o as Fe}from"../chunks/B2QV2lSm.js";var Ie=Object.defineProperty,q=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>q(e,typeof t==`symbol`?t:t+``,n),Le=`https://docs.convex.dev/error#undefined-validator`;function Re(e,t){let n=t===void 0?``:` for field "${t}"`;throw Error(`A validator is undefined${n} in ${e}. This is often caused by circular imports. See ${Le} for details.`)}var ze=class{constructor({isOptional:e}){J(this,`type`),J(this,`fieldPaths`),J(this,`isOptional`),J(this,`isConvexValidator`),this.isOptional=e,this.isConvexValidator=!0}},Be=class e extends ze{constructor({isOptional:e,tableName:t}){if(super({isOptional:e}),J(this,`tableName`),J(this,`kind`,`id`),typeof t!=`string`)throw Error(`v.id(tableName) requires a string`);this.tableName=t}get json(){return{type:`id`,tableName:this.tableName}}asOptional(){return new e({isOptional:`optional`,tableName:this.tableName})}},Ve=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`float64`)}get json(){return{type:`number`}}asOptional(){return new e({isOptional:`optional`})}},He=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`int64`)}get json(){return{type:`bigint`}}asOptional(){return new e({isOptional:`optional`})}},Ue=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`commitTs`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Y=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`boolean`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},X=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`bytes`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},We=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`string`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Ge=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`null`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},Ke=class e extends ze{constructor(){super(...arguments),J(this,`kind`,`any`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},qe=class e extends ze{constructor({isOptional:e,fields:t}){super({isOptional:e}),J(this,`fields`),J(this,`kind`,`object`),globalThis.Object.entries(t).forEach(([e,t])=>{if(t===void 0&&Re(`v.object()`,e),!t.isConvexValidator)throw Error(`v.object() entries must be validators`)}),this.fields=t}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([e,t])=>[e,{fieldType:t.json,optional:t.isOptional===`optional`}]))}}asOptional(){return new e({isOptional:`optional`,fields:this.fields})}omit(...t){let n={...this.fields};for(let e of t)delete n[e];return new e({isOptional:this.isOptional,fields:n})}pick(...t){let n={};for(let e of t)n[e]=this.fields[e];return new e({isOptional:this.isOptional,fields:n})}partial(){let t={};for(let[e,n]of globalThis.Object.entries(this.fields))t[e]=n.asOptional();return new e({isOptional:this.isOptional,fields:t})}extend(t){return new e({isOptional:this.isOptional,fields:{...this.fields,...t}})}},Je=class e extends ze{constructor({isOptional:e,value:t}){if(super({isOptional:e}),J(this,`value`),J(this,`kind`,`literal`),typeof t!=`string`&&typeof t!=`boolean`&&typeof t!=`number`&&typeof t!=`bigint`)throw Error(`v.literal(value) must be a string, number, or boolean`);this.value=t}get json(){return{type:this.kind,value:Oe(this.value)}}asOptional(){return new e({isOptional:`optional`,value:this.value})}},Ye=class e extends ze{constructor({isOptional:e,element:t}){super({isOptional:e}),J(this,`element`),J(this,`kind`,`array`),t===void 0&&Re(`v.array()`),this.element=t}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new e({isOptional:`optional`,element:this.element})}},Xe=class e extends ze{constructor({isOptional:e,key:t,value:n}){if(super({isOptional:e}),J(this,`key`),J(this,`value`),J(this,`kind`,`record`),t===void 0&&Re(`v.record()`,`key`),n===void 0&&Re(`v.record()`,`value`),t.isOptional===`optional`)throw Error(`Record validator cannot have optional keys`);if(n.isOptional===`optional`)throw Error(`Record validator cannot have optional values`);if(!t.isConvexValidator||!n.isConvexValidator)throw Error(`Key and value of v.record() but be validators`);this.key=t,this.value=n}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new e({isOptional:`optional`,key:this.key,value:this.value})}},Ze=class e extends ze{constructor({isOptional:e,members:t}){super({isOptional:e}),J(this,`members`),J(this,`kind`,`union`),t.forEach((e,t)=>{if(e===void 0&&Re(`v.union()`,`member at index ${t}`),!e.isConvexValidator)throw Error(`All members of v.union() must be validators`)}),this.members=t}get json(){return{type:this.kind,value:this.members.map(e=>e.json)}}asOptional(){return new e({isOptional:`optional`,members:this.members})}},Z={id:e=>new Be({isOptional:`required`,tableName:e}),null:()=>new Ge({isOptional:`required`}),number:()=>new Ve({isOptional:`required`}),float64:()=>new Ve({isOptional:`required`}),bigint:()=>new He({isOptional:`required`}),int64:()=>new He({isOptional:`required`}),commitTs:()=>new Ue({isOptional:`required`}),boolean:()=>new Y({isOptional:`required`}),string:()=>new We({isOptional:`required`}),bytes:()=>new X({isOptional:`required`}),literal:e=>new Je({isOptional:`required`,value:e}),array:e=>new Ye({isOptional:`required`,element:e}),object:e=>new qe({isOptional:`required`,fields:e}),record:(e,t)=>new Xe({isOptional:`required`,key:e,value:t}),union:(...e)=>new Ze({isOptional:`required`,members:e}),any:()=>new Ke({isOptional:`required`}),optional:e=>e.asOptional(),nullable:e=>Z.union(e,Z.null())},Qe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},$e=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},et=Symbol(`lucide-context`),tt=()=>D(et),nt=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),rt=t(`<svg><!><!></svg>`);function Q(t,n){U(n,!0);let a=tt()??{},c=F(n,`color`,19,()=>a.color??`currentColor`),l=F(n,`size`,19,()=>a.size??24),d=F(n,`strokeWidth`,19,()=>a.strokeWidth??2),f=F(n,`absoluteStrokeWidth`,19,()=>a.absoluteStrokeWidth??!1),p=F(n,`iconNode`,19,()=>[]),h=E(n,nt),g=e(()=>f()?Number(d())*24/Number(l()):d());var _=rt();ne(_,e=>({...Qe,...e,...h,width:l(),height:l(),stroke:c(),"stroke-width":o(g),class:[`lucide-icon lucide`,a.class,n.name&&`lucide-${n.name}`,n.class]}),[()=>!n.children&&!$e(h)&&{"aria-hidden":`true`}]);var y=s(_);v(y,17,p,r,(t,n)=>{var r=e(()=>ee(o(n),2));let a=()=>o(r)[0],s=()=>o(r)[1];var c=m(),l=u(c);le(l,a,!0,(e,t)=>{ne(e,()=>({...s()}))}),i(t,c)});var b=H(y);O(b,()=>n.children??re),V(_),i(t,_),z()}var it=new Set([`$$slots`,`$$events`,`$$legacy`]);function at(e,t){let n=E(t,it),r=[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}],[`path`,{d:`M10 12h4`}]];Q(e,R({name:`archive`},()=>n,{get iconNode(){return r}}))}var ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function st(e,t){let n=E(t,ot),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Q(e,R({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var ct=new Set([`$$slots`,`$$events`,`$$legacy`]);function lt(e,t){let n=E(t,ct),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Q(e,R({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var ut=new Set([`$$slots`,`$$events`,`$$legacy`]);function dt(e,t){let n=E(t,ut),r=[[`path`,{d:`M12 5v16`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`}]];Q(e,R({name:`book-open`},()=>n,{get iconNode(){return r}}))}var ft=new Set([`$$slots`,`$$events`,`$$legacy`]);function pt(e,t){let n=E(t,ft),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Q(e,R({name:`brain`},()=>n,{get iconNode(){return r}}))}var mt=new Set([`$$slots`,`$$events`,`$$legacy`]);function ht(e,t){let n=E(t,mt),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V3`}],[`path`,{d:`M19 21V9`}]];Q(e,R({name:`chart-no-axes-column`},()=>n,{get iconNode(){return r}}))}var gt=new Set([`$$slots`,`$$events`,`$$legacy`]);function _t(e,t){let n=E(t,gt),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Q(e,R({name:`check`},()=>n,{get iconNode(){return r}}))}var vt=new Set([`$$slots`,`$$events`,`$$legacy`]);function yt(e,t){let n=E(t,vt),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Q(e,R({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var bt=new Set([`$$slots`,`$$events`,`$$legacy`]);function xt(e,t){let n=E(t,bt),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Q(e,R({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=E(t,St),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}],[`path`,{d:`M12 18V6`}]];Q(e,R({name:`circle-dollar-sign`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tt(e,t){let n=E(t,wt),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Q(e,R({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Et=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dt(e,t){let n=E(t,Et),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Q(e,R({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function kt(e,t){let n=E(t,Ot),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Q(e,R({name:`copy`},()=>n,{get iconNode(){return r}}))}var At=new Set([`$$slots`,`$$events`,`$$legacy`]);function jt(e,t){let n=E(t,At),r=[[`path`,{d:`M14 9 9 4 4 9`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`}]];Q(e,R({name:`corner-left-up`},()=>n,{get iconNode(){return r}}))}var Mt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nt(e,t){let n=E(t,Mt),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]];Q(e,R({name:`credit-card`},()=>n,{get iconNode(){return r}}))}var Pt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ft(e,t){let n=E(t,Pt),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Q(e,R({name:`download`},()=>n,{get iconNode(){return r}}))}var It=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lt(e,t){let n=E(t,It),r=[[`path`,{d:`m15 15 6 6`}],[`path`,{d:`m15 9 6-6`}],[`path`,{d:`M21 16v5h-5`}],[`path`,{d:`M21 8V3h-5`}],[`path`,{d:`M3 16v5h5`}],[`path`,{d:`m3 21 6-6`}],[`path`,{d:`M3 8V3h5`}],[`path`,{d:`M9 9 3 3`}]];Q(e,R({name:`expand`},()=>n,{get iconNode(){return r}}))}var Rt=new Set([`$$slots`,`$$events`,`$$legacy`]);function zt(e,t){let n=E(t,Rt),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Q(e,R({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Bt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vt(e,t){let n=E(t,Bt),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Q(e,R({name:`eye`},()=>n,{get iconNode(){return r}}))}var Ht=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ut(e,t){let n=E(t,Ht),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 12.5 8 15l2 2.5`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`}]];Q(e,R({name:`file-code`},()=>n,{get iconNode(){return r}}))}var Wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gt(e,t){let n=E(t,Wt),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]];Q(e,R({name:`file-diff`},()=>n,{get iconNode(){return r}}))}var Kt=new Set([`$$slots`,`$$events`,`$$legacy`]);function qt(e,t){let n=E(t,Kt),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Q(e,R({name:`file-text`},()=>n,{get iconNode(){return r}}))}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yt(e,t){let n=E(t,Jt),r=[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]];Q(e,R({name:`folder-open`},()=>n,{get iconNode(){return r}}))}var Xt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zt(e,t){let n=E(t,Xt),r=[[`path`,{d:`M12 10v6`}],[`path`,{d:`M9 13h6`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]];Q(e,R({name:`folder-plus`},()=>n,{get iconNode(){return r}}))}var Qt=new Set([`$$slots`,`$$events`,`$$legacy`]);function $t(e,t){let n=E(t,Qt),r=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]];Q(e,R({name:`folder`},()=>n,{get iconNode(){return r}}))}var en=new Set([`$$slots`,`$$events`,`$$legacy`]);function tn(e,t){let n=E(t,en),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`rect`,{width:`10`,height:`8`,x:`7`,y:`8`,rx:`1`}]];Q(e,R({name:`fullscreen`},()=>n,{get iconNode(){return r}}))}var nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function rn(e,t){let n=E(t,nn),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]];Q(e,R({name:`globe`},()=>n,{get iconNode(){return r}}))}var an=new Set([`$$slots`,`$$events`,`$$legacy`]);function on(e,t){let n=E(t,an),r=[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]];Q(e,R({name:`hourglass`},()=>n,{get iconNode(){return r}}))}var sn=new Set([`$$slots`,`$$events`,`$$legacy`]);function cn(e,t){let n=E(t,sn),r=[[`path`,{d:`M16 5h6`}],[`path`,{d:`M19 2v6`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}]];Q(e,R({name:`image-plus`},()=>n,{get iconNode(){return r}}))}var ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function un(e,t){let n=E(t,ln),r=[[`path`,{d:`M13 5h8`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`m3 17 2 2 4-4`}],[`path`,{d:`m3 7 2 2 4-4`}]];Q(e,R({name:`list-checks`},()=>n,{get iconNode(){return r}}))}var dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function fn(e,t){let n=E(t,dn),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];Q(e,R({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var pn=new Set([`$$slots`,`$$events`,`$$legacy`]);function mn(e,t){let n=E(t,pn),r=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]];Q(e,R({name:`lock`},()=>n,{get iconNode(){return r}}))}var hn=new Set([`$$slots`,`$$events`,`$$legacy`]);function gn(e,t){let n=E(t,hn),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];Q(e,R({name:`log-out`},()=>n,{get iconNode(){return r}}))}var _n=new Set([`$$slots`,`$$events`,`$$legacy`]);function vn(e,t){let n=E(t,_n),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Q(e,R({name:`moon`},()=>n,{get iconNode(){return r}}))}var yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function bn(e,t){let n=E(t,yn),r=[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`}],[`path`,{d:`M2 6h4`}],[`path`,{d:`M2 10h4`}],[`path`,{d:`M2 14h4`}],[`path`,{d:`M2 18h4`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`}]];Q(e,R({name:`notebook-pen`},()=>n,{get iconNode(){return r}}))}var xn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sn(e,t){let n=E(t,xn),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Q(e,R({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`]);function wn(e,t){let n=E(t,Cn),r=[[`path`,{d:`M15 12h-5`}],[`path`,{d:`M15 8h-5`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`}]];Q(e,R({name:`scroll-text`},()=>n,{get iconNode(){return r}}))}var Tn=new Set([`$$slots`,`$$events`,`$$legacy`]);function En(e,t){let n=E(t,Tn),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Q(e,R({name:`search`},()=>n,{get iconNode(){return r}}))}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function On(e,t){let n=E(t,Dn),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Q(e,R({name:`settings`},()=>n,{get iconNode(){return r}}))}var kn=new Set([`$$slots`,`$$events`,`$$legacy`]);function An(e,t){let n=E(t,kn),r=[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`}]];Q(e,R({name:`shrink`},()=>n,{get iconNode(){return r}}))}var jn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mn(e,t){let n=E(t,jn),r=[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]];Q(e,R({name:`square-pen`},()=>n,{get iconNode(){return r}}))}var Nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pn(e,t){let n=E(t,Nn),r=[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]];Q(e,R({name:`square-terminal`},()=>n,{get iconNode(){return r}}))}var Fn=new Set([`$$slots`,`$$events`,`$$legacy`]);function In(e,t){let n=E(t,Fn),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]];Q(e,R({name:`square`},()=>n,{get iconNode(){return r}}))}var Ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rn(e,t){let n=E(t,Ln),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Q(e,R({name:`sun`},()=>n,{get iconNode(){return r}}))}var zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bn(e,t){let n=E(t,zn),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Q(e,R({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Vn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hn(e,t){let n=E(t,Vn),r=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]];Q(e,R({name:`user-round`},()=>n,{get iconNode(){return r}}))}var Un=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wn(e,t){let n=E(t,Un),r=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]];Q(e,R({name:`wallet`},()=>n,{get iconNode(){return r}}))}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kn(e,t){let n=E(t,Gn),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Q(e,R({name:`wrench`},()=>n,{get iconNode(){return r}}))}var qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jn(e,t){let n=E(t,qn),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Q(e,R({name:`x`},()=>n,{get iconNode(){return r}}))}var Yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xn(e,t){let n=E(t,Yn),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Q(e,R({name:`zap`},()=>n,{get iconNode(){return r}}))}var Zn=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Qn=[`difference`,`intersection`,`symmetricDifference`,`union`],$n=!1,er=class e extends Set{#e=new Map;#t=g(0);#n=g(0);#r=W||-1;constructor(e){if(super(),e){for(var t of e)super.add(t);this.#n.v=super.size}$n||this.#a()}#i(e){return W===this.#r?g(e):w(e)}#a(){$n=!0;var t=e.prototype,n=Set.prototype;for(let e of Zn)t[e]=function(...t){return o(this.#t),n[e].apply(this,t)};for(let r of Qn)t[r]=function(...t){o(this.#t);var i=n[r].apply(this,t);return new e(i)}}has(e){var t=super.has(e),n=this.#e,r=n.get(e);if(r===void 0){if(!t)return o(this.#t),!1;r=this.#i(!0),n.set(e,r)}return o(r),t}add(e){return super.has(e)||(super.add(e),S(this.#n,super.size),C(this.#t)),this}delete(e){var t=super.delete(e),n=this.#e,r=n.get(e);return r!==void 0&&(n.delete(e),S(r,!1)),t&&(S(this.#n,super.size),C(this.#t)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var t of e.values())S(t,!1);e.clear(),S(this.#n,0),C(this.#t)}}keys(){return this.values()}values(){return o(this.#t),super.values()}entries(){return o(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return o(this.#n)}},tr=class extends Map{#e=new Map;#t=g(0);#n=g(0);#r=W||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return W===this.#r?g(e):w(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return o(this.#t),!1;return o(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{o(this.#t);return}return o(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),S(this.#n,super.size),C(o);else if(i!==t){C(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&C(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),S(n,-1)),r&&(S(this.#n,super.size),C(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;S(this.#n,0);for(var t of e.values())S(t,-1);C(this.#t),e.clear()}}#a(){o(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)o(n)}keys(){return o(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return o(this.#n),super.size}},nr=2e4,rr=I(`<a><!></a>`),ir=I(`<button><!></button>`);function ar(t,n){U(n,!0);let r=F(n,`type`,3,`button`),a=F(n,`variant`,3,`default`),c=F(n,`className`,3,``),l=F(n,`disabled`,3,!1),d=e(()=>a()===`outline`?`border-border bg-surface/80 text-foreground hover:bg-hover-fill`:`bg-primary text-primary-foreground hover:opacity-90`),f=e(()=>K(`focus-visible:ring-ring/50 inline-flex h-10 items-center justify-center gap-2 rounded-full border border-transparent px-5 py-2 text-sm font-medium transition-opacity focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,o(d),c()));var h=m(),g=u(h),_=e=>{var t=rr(),r=s(t);O(r,()=>n.children??re),V(t),b(()=>{A(t,`href`,n.href),L(t,1,P(o(f)))}),p(`click`,t,function(...e){n.onclick?.apply(this,e)}),i(e,t)},v=e=>{var t=ir(),a=s(t);O(a,()=>n.children??re),V(t),b(()=>{A(t,`type`,r()),t.disabled=l(),L(t,1,P(o(f)))}),p(`click`,t,function(...e){n.onclick?.apply(this,e)}),i(e,t)};y(g,e=>{n.href&&!l()?e(_):e(v,-1)}),i(t,h),z()}f([`click`]);var or=I(`<!> <!>`,1),sr=I(`<p class="text-destructive text-center text-sm" role="alert"> </p>`),cr=I(`<div class="text-muted-foreground flex items-center justify-center gap-2 text-sm" aria-live="polite" aria-busy="true"><!> <span> </span></div>`),lr=I(`<div><!></div>`);function ur(t,n){U(n,!0);let r=F(n,`overlayOpen`,3,!1),c=e(()=>n.authState.isAuthenticated&&(n.authState.isLoading||!n.authState.connectionFailed)),l=e(()=>!n.authState.isAuthenticated&&n.authState.isLoading),d=e(()=>n.authState.isConfigured?o(c)?`Confirming your session`:n.authState.connectionFailed?`Couldn’t connect your account`:o(l)?`Preparing sign-in`:`Sign in to continue`:`Sign-in unavailable`),f=e(()=>n.authState.isConfigured?o(c)?`Verifying your secure connection before opening your projects.`:n.authState.connectionFailed?`You’re signed in, but the secure connection could not be confirmed. Retry or sign out and sign in again.`:o(l)?`Getting account sign-in ready. This usually takes a moment.`:`Sign in to sync your coding threads, streaming responses, and projects.`:`Account sign-in is not configured on this deployment, so account actions are disabled.`),p=e(()=>n.authState.isAuthenticated?`Almost there`:`One moment`),h=e(()=>!!(n.authState.isConfigured&&n.authState.error&&!r()));var g=lr(),_=s(g);Me(_,{get title(){return o(d)},get description(){return o(f)},actions:e=>{var t=m(),r=u(t),a=e=>{var t=or(),r=u(t),a=e=>{ar(e,{get onclick(){return n.onRetry},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Retry`);i(e,n)},$$slots:{default:!0}})};y(r,e=>{n.authState.connectionFailed&&e(a)}),ar(H(r,2),{variant:`outline`,get onclick(){return n.onSignOut},children:(e,t)=>{N();var n=te(`Sign Out`);i(e,n)},$$slots:{default:!0}}),i(e,t)},o=e=>{var t=or(),r=u(t);ar(r,{get onclick(){return n.onSignIn},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Sign In`);i(e,n)},$$slots:{default:!0}}),ar(H(r,2),{variant:`outline`,get onclick(){return n.onSignUp},get disabled(){return n.authState.isLoading},children:(e,t)=>{N();var n=te(`Create Account`);i(e,n)},$$slots:{default:!0}}),i(e,t)};y(r,e=>{n.authState.isAuthenticated?e(a):n.authState.isConfigured&&e(o,1)}),i(e,t)},children:(e,t)=>{var r=or(),c=u(r),l=e=>{var t=sr(),r=s(t,!0);V(t),b(()=>a(r,n.authState.error)),i(e,t)};y(c,e=>{o(h)&&e(l)});var d=H(c,2),f=e=>{var t=cr(),n=s(t);fn(n,{class:`size-3.5 animate-spin`,"aria-hidden":`true`});var r=H(n,2),c=s(r,!0);V(r),V(t),b(()=>a(c,o(p))),i(e,t)};y(d,e=>{n.authState.isLoading&&e(f)}),i(e,r)},$$slots:{actions:!0,default:!0}}),V(g),b(()=>{g.inert=r(),A(g,`aria-hidden`,r()?!0:void 0)}),i(t,g),z()}var dr=I(`<div class="text-muted-foreground mb-4 flex justify-center" aria-hidden="true"><!></div>`),fr=I(`<p class="text-muted-foreground mt-6 max-h-24 overflow-y-auto font-mono text-[11px] leading-5 break-all select-all"> </p>`),pr=I(`<p class="text-destructive mt-4 text-sm" role="alert"> </p>`),mr=I(`<p class="mt-4 text-sm text-amber-700" role="alert"> </p>`),hr=I(`<!> Open browser`,1),gr=I(`<!> Copied`,1),_r=I(`<!> Copy link`,1),vr=I(`<!> <!>`,1),yr=I(`<span class="text-muted-foreground border-border inline-flex h-10 items-center justify-center gap-2 rounded-full border px-4 text-sm">Preparing link…</span>`),br=I(`<div class="app-entry-shell fixed inset-0 z-50 flex items-center justify-center px-6" role="presentation"><div class="border-border/70 bg-surface relative z-10 w-full max-w-md rounded-2xl border p-8 text-center shadow-[0_18px_50px_-28px_oklch(0.2_0.02_260/0.45)] outline-none" role="dialog" aria-modal="true" aria-labelledby="browser-signin-title" aria-describedby="browser-signin-desc" tabindex="-1"><!> <h2 id="browser-signin-title" class="font-brand text-foreground text-[1.35rem] font-semibold tracking-tight"> </h2> <p id="browser-signin-desc" class="text-muted-foreground mt-3 text-sm leading-[1.55]"> </p> <!> <!> <!> <div class="mt-6 flex flex-wrap items-center justify-center gap-3"><!></div> <div class="mt-6"><button type="button" class="text-muted-foreground hover:text-foreground decoration-foreground/30 hover:decoration-foreground text-[13px] underline underline-offset-4 transition-colors">Cancel</button></div></div></div>`);function xr(t,n){U(n,!0);let r=F(n,`error`,3,null),l=g(!1),f=g(null),h=g(null),_=null;c(()=>{if(!n.open){S(l,!1),S(f,null);return}let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=!1;d().then(()=>{t||o(h)?.focus()});function r(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),n.onCancel();return}if(e.key!==`Tab`||!o(h))return;let t=Array.from(o(h).querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`)&&e.offsetParent!==null);if(t.length===0){e.preventDefault(),o(h).focus();return}let r=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&(a===o(h)||a===r||!o(h).contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===o(h)||a===i||!o(h).contains(a))&&(e.preventDefault(),r.focus())}return window.addEventListener(`keydown`,r,!0),()=>{t=!0,window.removeEventListener(`keydown`,r,!0),_!==null&&(window.clearTimeout(_),_=null),e?.isConnected&&e.focus()}});async function v(){if(n.signInUrl)try{await navigator.clipboard.writeText(n.signInUrl),S(l,!0),S(f,null),_!==null&&window.clearTimeout(_),_=window.setTimeout(()=>{S(l,!1),_=null},2e3)}catch{S(l,!1),S(f,`Could not copy the sign-in link. Select it above and copy manually.`)}}function x(){if(!n.signInUrl)return;let e=window.open(n.signInUrl,`_blank`);if(e){try{e.opener=null}catch{}n.onClearOpenError?.()}}let C=e(()=>n.signInUrl?r()?{title:`Open the sign-in link`,description:`Your browser didn’t open automatically. Continue with the options below.`}:{title:`Finish signing in`,description:`We opened your browser to complete sign-in. Waiting for you to finish there.`}:{title:`Preparing sign-in`,description:`Preparing a secure sign-in link. This usually takes a moment.`});var w=m(),T=u(w),E=e=>{var t=br(),c=s(t),d=s(c),g=e=>{var t=dr();fn(s(t),{class:`size-5 animate-spin`}),V(t),i(e,t)};y(d,e=>{n.signInUrl||e(g)});var _=H(d,2),w=s(_,!0);V(_);var T=H(_,2),E=s(T,!0);V(T);var D=H(T,2),O=e=>{var t=fr(),r=s(t,!0);V(t),b(()=>{A(t,`title`,n.signInUrl),a(r,n.signInUrl)}),i(e,t)};y(D,e=>{n.signInUrl&&e(O)});var k=H(D,2),j=e=>{var t=pr(),n=s(t,!0);V(t),b(()=>a(n,r())),i(e,t)};y(k,e=>{r()&&e(j)});var M=H(k,2),P=e=>{var t=mr(),n=s(t,!0);V(t),b(()=>a(n,o(f))),i(e,t)};y(M,e=>{o(f)&&e(P)});var ee=H(M,2),F=s(ee),te=e=>{var t=vr(),n=u(t);ar(n,{onclick:x,children:(e,t)=>{var n=hr();zt(u(n),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,n)},$$slots:{default:!0}}),ar(H(n,2),{variant:`outline`,onclick:()=>void v(),children:(e,t)=>{var n=m(),r=u(n),a=e=>{var t=gr();_t(u(t),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,t)},s=e=>{var t=_r();kt(u(t),{class:`size-4`,"aria-hidden":`true`}),N(),i(e,t)};y(r,e=>{o(l)?e(a):e(s,-1)}),i(e,n)},$$slots:{default:!0}}),i(e,t)},I=e=>{var t=yr();i(e,t)};y(F,e=>{n.signInUrl?e(te):e(I,-1)}),V(ee);var ne=H(ee,2),L=s(ne);V(ne),V(c),oe(c,e=>S(h,e),()=>o(h)),V(t),b(()=>{a(w,o(C).title),a(E,o(C).description)}),p(`click`,t,e=>{e.target===e.currentTarget&&n.onCancel()}),p(`click`,L,function(...e){n.onCancel?.apply(this,e)}),i(e,t)};y(T,e=>{n.open&&e(E)}),i(t,w),z()}f([`click`]);function Sr(){let e=g(null),t=g(!1),n=null;function r(){n&&=(clearTimeout(n),null)}function i(i,a,o=!1){let s=i.currentTarget;if(!(s instanceof HTMLElement))return;let c=s.getBoundingClientRect();r(),S(t,o,!0),S(e,{top:c.top-8,left:c.left+c.width/2,label:a},!0),o&&(n=setTimeout(()=>{S(t,!1),n=null,S(e,null)},2500))}function a(n=!1){o(t)&&!n||(r(),S(t,!1),S(e,null))}return c(()=>r),{get lockTooltip(){return o(e)},showLockTooltip:i,hideLockTooltip:a}}function Cr(e){function t(t){let n=t.target;n instanceof Node&&(e.getRoot()?.contains(n)||e.onOutside())}function n(t){t.key===`Escape`&&e.onEscape()}return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,n)}}var wr=I(`<div class="text-tooltip-foreground bg-tooltip ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`);function Tr(e,t){U(t,!0);var n=m(),r=u(n),o=e=>{var n=wr(),r=s(n,!0);V(n),b(()=>{B(n,`top: ${t.tooltip.top}px; left: ${t.tooltip.left}px;`),a(r,t.tooltip.label)}),i(e,n)};y(r,e=>{t.tooltip&&e(o)}),i(e,n),z()}var Er=I(`<label class="text-muted-foreground flex h-10 items-center gap-2 border-b border-[var(--hairline)] px-2"><!> <span class="sr-only"> </span> <input class="text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"/></label>`),Dr=I(`<p class="text-muted-foreground px-3 pt-1 pb-2 text-[11px] font-medium"> </p>`),Or=I(`<span><!></span>`),kr=I(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),Ar=I(`<button type="button"><!> <span> </span> <!></button>`),jr=I(`<p class="text-muted-foreground px-3 py-5 text-center text-sm">No matches found</p>`),Mr=I(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[19rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <div><!> <!></div></div>`),Nr=I(`<div><button type="button" aria-haspopup="dialog"><!> <span class="truncate"> </span> <!></button> <!></div> <!>`,1);function Pr(t,n){U(n,!0);let r=F(n,`value`,15,``),l=F(n,`disabled`,3,!1),d=F(n,`className`,3,``),f=F(n,`triggerClassName`,3,``),_=F(n,`searchable`,3,!1),x=g(!1),C=g(``),w=g(null),T=g(null),E=g(null),D=Sr(),j=e(()=>{let e=n.options.find(e=>e.id===r());return e&&!e.locked?e:n.options.find(e=>!e.locked)??e??n.options[0]??null}),M=e(()=>_()&&o(C).trim()?n.options.filter(e=>e.label.toLocaleLowerCase().includes(o(C).trim().toLocaleLowerCase())):n.options),N=e(()=>o(M).filter(e=>!e.locked));function ee(){l()||(S(x,!o(x)),o(x)&&_()?queueMicrotask(()=>o(E)?.focus()):S(C,``))}function te(e,t){let i=n.options.find(t=>t.id===e);if(i){if(i.locked){t&&i.lockTooltip&&D.showLockTooltip(t,i.lockTooltip,!0);return}e!==r()&&(r(e),n.onValueChange?.(e)),S(x,!1),S(C,``),D.hideLockTooltip(!0),o(T)?.focus()}}function I(e){e.key===`Enter`&&o(N).length!==0&&(e.preventDefault(),te(o(N)[0].id))}c(()=>{if(!o(x)){S(C,``),D.hideLockTooltip();return}return Cr({getRoot:()=>o(w),onOutside:()=>{S(x,!1)},onEscape:()=>{S(x,!1),o(T)?.focus()}})}),c(()=>{l()&&S(x,!1)});var ne=Nr(),re=u(ne),ie=s(re),ae=s(ie),R=e=>{var t=m(),r=u(t);O(r,()=>n.optionIcon,()=>o(j)),i(e,t)};y(ae,e=>{n.optionIcon&&o(j)&&e(R)});var B=H(ae,2),se=s(B,!0);V(B);var le=H(B,2);{let t=e(()=>K(`text-muted-foreground size-3 shrink-0 transition-transform`,o(x)&&`rotate-180`));yt(le,{get class(){return o(t)}})}V(ie),oe(ie,e=>S(T,e),()=>o(T));var ue=H(ie,2),de=t=>{var c=Mr(),l=s(c),u=e=>{var t=Er(),r=s(t);En(r,{class:`size-4 shrink-0`});var c=H(r,2),l=s(c);V(c);var u=H(c,2);ce(u),oe(u,e=>S(E,e),()=>o(E)),V(t),b((e,t)=>{a(l,`Search ${e??``}`),A(u,`placeholder`,t)},[()=>n.menuTitle.toLocaleLowerCase(),()=>`Search ${n.menuTitle.toLocaleLowerCase()}…`]),p(`keydown`,u,I),k(u,()=>o(C),e=>S(C,e)),i(e,t)},d=e=>{var t=Dr(),r=s(t,!0);V(t),b(()=>a(r,n.menuTitle)),i(e,t)};y(l,e=>{_()?e(u):e(d,-1)});var f=H(l,2),m=s(f);v(m,17,()=>o(M),e=>e.id,(t,c)=>{let l=e(()=>!!o(c).locked);var u=Ar(),d=s(u),f=e=>{var t=Or(),r=s(t);O(r,()=>n.optionIcon,()=>o(c)),V(t),b(e=>L(t,1,e),[()=>P(K(`flex size-7 shrink-0 items-center justify-center`,(o(l),`text-muted-foreground`)))]),i(e,t)};y(d,e=>{n.optionIcon&&e(f)});var m=H(d,2),g=s(m,!0);V(m);var _=H(m,2),v=e=>{var t=kr();mn(s(t),{class:`size-3.5`}),V(t),i(e,t)},x=t=>{{let n=e(()=>K(`text-accent-strong size-4 shrink-0 transition-opacity`,o(c).id===r()?`opacity-100`:`opacity-0`));_t(t,{get class(){return o(n)}})}};y(_,e=>{o(l)?e(v):e(x,-1)}),V(u),b((e,t)=>{L(u,1,e),A(u,`aria-pressed`,!o(l)&&o(c).id===r()),A(u,`aria-disabled`,o(l)),A(u,`aria-label`,o(l)&&o(c).lockTooltip?`${o(c).label}. ${o(c).lockTooltip}`:void 0),L(m,1,t),a(g,o(c).label)},[()=>P(K(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none focus-visible:ring-2`,o(l)?`cursor-not-allowed opacity-45`:`hover:bg-hover-fill`,!o(l)&&o(c).id===r()&&`bg-hover-fill`)),()=>P(K(`min-w-0 flex-1 truncate text-sm font-medium`,o(l)?`text-muted-foreground`:`text-foreground`))]),h(`mouseenter`,u,e=>{o(l)&&o(c).lockTooltip&&D.showLockTooltip(e,o(c).lockTooltip)}),h(`mouseleave`,u,()=>D.hideLockTooltip()),h(`focus`,u,e=>{o(l)&&o(c).lockTooltip&&D.showLockTooltip(e,o(c).lockTooltip)}),h(`blur`,u,()=>D.hideLockTooltip()),p(`click`,u,e=>{te(o(c).id,e)}),i(t,u)});var g=H(m,2),x=e=>{var t=jr();i(e,t)};y(g,e=>{o(M).length===0&&e(x)}),V(f),V(c),b(e=>{A(c,`aria-label`,n.menuTitle),L(f,1,e)},[()=>P(K(`space-y-0.5`,_()&&`pt-1.5`))]),i(t,c)};y(ue,e=>{o(x)&&e(de)}),V(re),oe(re,e=>S(w,e),()=>o(w)),Tr(H(re,2),{get tooltip(){return D.lockTooltip}}),b((e,t)=>{L(re,1,e),L(ie,1,t),A(ie,`aria-expanded`,o(x)),A(ie,`aria-label`,n.ariaLabel),ie.disabled=l(),a(se,o(j)?.triggerLabel??o(j)?.label??r())},[()=>P(K(`relative`,d())),()=>P(K(`focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-8 shrink-0 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-sm font-medium transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50`,!n.optionIcon&&`gap-1`,f()))]),p(`click`,ie,ee),i(t,ne),z()}f([`click`,`keydown`]);var Fr=t(`<title> </title>`),Ir=t(`<svg viewBox="146.694 227.042 267.198 264.812" xmlns="http://www.w3.org/2000/svg" role="img" fill="none"><!><path d="M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z" fill="currentColor"></path></svg>`);function Lr(e,t){U(t,!0);let n=F(t,`className`,3,``),r=F(t,`title`,3,`OpenAI`);var o=Ir(),c=s(o),l=e=>{var t=Fr(),n=s(t,!0);V(t),b(()=>a(n,r())),i(e,t)};y(c,e=>{r()&&e(l)}),N(),V(o),b(e=>{L(o,0,e),A(o,`aria-hidden`,!r()||void 0)},[()=>P(K(`size-4`,n()))]),i(e,o),z()}var Rr=t(`<svg viewBox="0 0 24 24" role="img" aria-label="Anthropic" fill="currentColor"><path d="M17.304 3.541h-3.672l6.696 16.918H24Zm-10.608 0L0 20.459h3.744l1.37-3.553h7.005l1.369 3.553h3.744L10.536 3.541Zm-.371 10.223 2.291-5.945 2.292 5.945Z"></path></svg>`),zr=t(`<svg viewBox="0 0 24 24" role="img" aria-label="xAI" fill="currentColor"><path d="M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z"></path></svg>`),Br=t(`<svg viewBox="0 0 24 24" role="img" aria-label="Moonshot" fill="currentColor" fill-rule="evenodd"><path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path></svg>`),Vr=t(`<svg viewBox="0 0 24 24" role="img" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="9"></circle><path d="M12 8v4l2.5 1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);function Hr(t,n){U(n,!0);let r=F(n,`className`,3,``);var a=m(),s=u(a),c=t=>{{let n=e(()=>K(`size-4 text-foreground`,r()));Lr(t,{get className(){return o(n)}})}},l=e=>{var t=Rr();b(e=>L(t,0,e),[()=>P(K(`size-4 text-[#D97757]`,r()))]),i(e,t)},d=e=>{var t=zr();b(e=>L(t,0,e),[()=>P(K(`text-foreground size-4`,r()))]),i(e,t)},f=e=>{var t=Br();b(e=>L(t,0,e),[()=>P(K(`text-foreground size-4`,r()))]),i(e,t)},p=e=>{var t=Vr();b(e=>{L(t,0,e),A(t,`aria-label`,n.provider||`Unknown provider`)},[()=>P(K(`text-muted-foreground size-4`,r()))]),i(e,t)};y(s,e=>{n.provider===`openai`?e(c):n.provider===`anthropic`?e(l,1):n.provider===`xai`?e(d,2):n.provider===`fireworks`?e(f,3):e(p,-1)}),i(t,a),z()}var Ur=[`none`,`low`,`medium`,`high`,`xhigh`,`max`],Wr=[`standard`,`fast`],Gr=[`gpt-5.6-sol`,`gpt-5.6-terra`,`gpt-5.6-luna`,`claude-opus-5`,`claude-fable-5`,`grok-4.5`,`kimi-k3`],Kr=[{id:`gpt-5.6-sol`,label:`GPT-5.6 Sol`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:.005,cacheRead:5e-4,cacheWrite:.00625,output:.03,fastMultiplier:2}},{id:`gpt-5.6-terra`,label:`GPT-5.6 Terra`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:.002,cacheRead:2e-4,cacheWrite:.0025,output:.012,fastMultiplier:2}},{id:`gpt-5.6-luna`,label:`GPT-5.6 Luna`,provider:`openai`,contextWindowTokens:258400,autoCompactTokenLimit:244800,reasoningEfforts:Ur,defaultReasoningEffort:`medium`,serviceTiers:Wr,usageWeights:{input:2e-4,cacheRead:2e-5,cacheWrite:25e-5,output:.0012,fastMultiplier:2}},{id:`claude-opus-5`,label:`Claude Opus 5`,provider:`anthropic`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`medium`,`high`,`xhigh`,`max`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.005,cacheRead:5e-4,cacheWrite:.00625,output:.025,fastMultiplier:2}},{id:`claude-fable-5`,label:`Claude Fable 5`,provider:`anthropic`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`medium`,`high`,`xhigh`,`max`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.01,cacheRead:.001,cacheWrite:.0125,output:.05,fastMultiplier:1}},{id:`grok-4.5`,label:`Grok 4.5`,provider:`xai`,contextWindowTokens:5e5,autoCompactTokenLimit:4e5,reasoningEfforts:[`low`,`medium`,`high`],defaultReasoningEffort:`high`,serviceTiers:Wr,usageWeights:{input:.002,cacheRead:5e-4,cacheWrite:.002,output:.006,fastMultiplier:2}},{id:`kimi-k3`,label:`Kimi K3`,provider:`fireworks`,contextWindowTokens:1e6,autoCompactTokenLimit:967e3,reasoningEfforts:[`low`,`high`,`max`],defaultReasoningEffort:`max`,serviceTiers:Wr,usageWeights:{input:.003,cacheRead:3e-4,cacheWrite:.003,output:.015,fastMultiplier:1.5}}],qr=`gpt-5.6-sol`,Jr=Xr(qr).defaultReasoningEffort,Yr=`standard`;function Xr(e){let t=Kr.find(t=>t.id===e);if(!t)throw Error(`Unsupported model: ${e}`);return t}function Zr(e){return e}function Qr(e,t){return e.models.find(e=>e.id===t)}function $r(e,t,n){return(e.tierAllowedModels[t]??[]).includes(n)}function ei(e,t,n){return $r(e,t,n)?n:e.tierAllowedModels[t]?.[0]??e.defaultModelId}function ti(e,t,n){return(e.tierAllowedServiceTiers[t]??[]).includes(n)}function ni(e,t,n){return n.serviceTiers.filter(n=>ti(e,t,n))}function ri(e,t,n){return n.serviceTiers.map(n=>{let r={id:n,label:ci(n)};return ti(e,t,n)?r:{...r,locked:!0,lockTooltip:e.serviceTierLockUpgradeMessage}})}function ii(e,t){let n=[],r=[];for(let i of e.models){let a={id:i.id,label:i.label,provider:i.provider};$r(e,t,i.id)?n.push(a):r.push({...a,locked:!0,lockTooltip:e.modelLockUpgradeMessage})}return[...n,...r]}var ai={none:`None`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra High`,max:`Max`},oi={standard:`Standard`,fast:`Fast`};function si(e){return ai[e]??e}function ci(e){return oi[e]??e}var li=I(`<span class="text-muted-foreground ml-auto text-xs">Default</span>`),ui=I(`<button type="button" class="focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2"><!> <span> </span> <!></button>`),di=I(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),fi=I(`<button type="button"><!> <!> <span> </span> <!></button>`),pi=I(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[15rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog" aria-label="Reasoning and service tier"><p class="text-muted-foreground px-3 pt-1 pb-1.5 text-[11px] font-medium">Reasoning</p> <div class="space-y-0.5"></div> <div class="mx-2 my-2 h-px bg-[var(--hairline)]"></div> <p class="text-muted-foreground px-3 pb-1.5 text-[11px] font-medium">Service tier</p> <div class="space-y-0.5"></div></div>`),mi=I(`<div><button type="button" class="focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-9 shrink-0 items-center gap-1 rounded-lg px-2 text-[15px] transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50" aria-haspopup="dialog" aria-label="Select reasoning effort and service tier"><span> </span> <!></button> <!></div> <!>`,1);function hi(t,n){U(n,!0);let r=F(n,`reasoningEffort`,31,()=>l(Jr)),d=F(n,`serviceTier`,31,()=>l(Yr)),f=F(n,`disabled`,3,!1),m=F(n,`className`,3,``),_=e(()=>n.serviceTierOptions?n.serviceTierOptions:n.model.serviceTiers.map(e=>({id:e,label:ci(e)}))),x=e(()=>o(_).filter(e=>!e.locked).map(e=>e.id)),C=g(!1),w=g(null),T=g(null),E=Sr();function D(e){r(e)}function O(e,t){let n=o(_).find(t=>t.id===e);if(n){if(n.locked){t&&n.lockTooltip&&E.showLockTooltip(t,n.lockTooltip,!0);return}d(e)}}c(()=>{n.model.reasoningEfforts.includes(r())||r(n.model.defaultReasoningEffort),o(x).includes(d())||d(o(x)[0]??`standard`)}),c(()=>{if(!o(C)){E.hideLockTooltip();return}return Cr({getRoot:()=>o(w),onOutside:()=>{S(C,!1)},onEscape:()=>{S(C,!1),o(T)?.focus()}})}),c(()=>{f()&&S(C,!1)});var k=mi(),j=u(k),M=s(j),N=s(M),ee=s(N);V(N);var te=H(N,2);{let t=e(()=>K(`text-muted-foreground size-3 shrink-0 transition-transform`,o(C)&&`rotate-180`));yt(te,{get class(){return o(t)}})}V(M),oe(M,e=>S(T,e),()=>o(T));var I=H(M,2),ne=t=>{var c=pi(),l=H(s(c),2);v(l,20,()=>n.model.reasoningEfforts,e=>e,(t,c)=>{var l=ui(),u=s(l);{let t=e(()=>K(`size-4 shrink-0 transition-opacity`,c===r()?`opacity-100`:`opacity-0`));_t(u,{get class(){return o(t)}})}var d=H(u,2),f=s(d,!0);V(d);var m=H(d,2),h=e=>{var t=li();i(e,t)};y(m,e=>{c===n.model.defaultReasoningEffort&&e(h)}),V(l),b(e=>{A(l,`aria-pressed`,c===r()),a(f,e)},[()=>si(c)]),p(`click`,l,()=>D(c)),i(t,l)}),V(l);var u=H(l,6);v(u,21,()=>o(_),e=>e.id,(t,n)=>{let r=e(()=>!!o(n).locked);var c=fi(),l=s(c),u=e=>{var t=di();mn(s(t),{class:`size-3.5`}),V(t),i(e,t)},f=t=>{{let r=e(()=>K(`size-4 shrink-0 transition-opacity`,o(n).id===d()?`opacity-100`:`opacity-0`));_t(t,{get class(){return o(r)}})}};y(l,e=>{o(r)?e(u):e(f,-1)});var m=H(l,2),g=e=>{Xn(e,{class:`size-3.5 shrink-0 text-amber-400`})};y(m,e=>{o(n).id===`fast`&&e(g)});var _=H(m,2),v=s(_,!0);V(_);var S=H(_,2),C=e=>{var t=li();i(e,t)};y(S,e=>{!o(r)&&o(n).id===o(x)[0]&&e(C)}),V(c),b((e,t)=>{L(c,1,e),A(c,`aria-pressed`,!o(r)&&o(n).id===d()),A(c,`aria-disabled`,o(r)),A(c,`aria-label`,o(r)&&o(n).lockTooltip?`${o(n).label}. ${o(n).lockTooltip}`:void 0),L(_,1,t),a(v,o(n).label)},[()=>P(K(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2`,o(r)?`cursor-not-allowed opacity-45`:`text-foreground hover:bg-hover-fill`)),()=>P(K(o(r)&&`text-muted-foreground`))]),h(`mouseenter`,c,e=>{o(r)&&o(n).lockTooltip&&E.showLockTooltip(e,o(n).lockTooltip)}),h(`mouseleave`,c,()=>E.hideLockTooltip()),h(`focus`,c,e=>{o(r)&&o(n).lockTooltip&&E.showLockTooltip(e,o(n).lockTooltip)}),h(`blur`,c,()=>E.hideLockTooltip()),p(`click`,c,e=>O(o(n).id,e)),i(t,c)}),V(u),V(c),i(t,c)};y(I,e=>{o(C)&&e(ne)}),V(j),oe(j,e=>S(w,e),()=>o(w)),Tr(H(j,2),{get tooltip(){return E.lockTooltip}}),b((e,t,n)=>{L(j,1,e),A(M,`aria-expanded`,o(C)),M.disabled=f(),a(ee,`${t??``} · ${n??``}`)},[()=>P(K(`relative`,m())),()=>si(r()),()=>ci(d())]),p(`click`,M,()=>{S(C,!o(C))}),i(t,k),z()}f([`click`]);function gi(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}var _i=/(^|\s)\$([a-z0-9-]*)$/i;function vi(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(_i);return!n||n.index===void 0?null:{query:n[2].toLowerCase(),tokenStart:n.index+n[1].length}}function yi(e,t){return vi(e,t)?.query??null}function bi(e,t){let n=t.toLowerCase(),r=[],i=[];for(let t of e){let e=t.name.toLowerCase();e.startsWith(n)?r.push(t):n.length>0&&e.includes(n)&&i.push(t)}return r.sort((e,t)=>e.name.localeCompare(t.name)),i.sort((e,t)=>e.name.localeCompare(t.name)),[...r,...i]}function xi(e,t,n){let r=vi(e,t);if(!r)return null;let i=t;for(;i<e.length&&/[a-z0-9-]/i.test(e[i]??``);)i+=1;e[i]===` `&&(i+=1);let a=`$${n} `;return{text:`${e.slice(0,r.tokenStart)}${a}${e.slice(i)}`,caret:r.tokenStart+a.length}}var Si=`agent_decide`;function Ci(e){return!!e.selectedOptionId?.trim()||!!e.text.trim()}function wi(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var Ti=Z.union(Z.string(),Z.number(),Z.boolean(),Z.null()),Ei=8;function Di(e){return e===0?Ti:Z.union(Ti,Z.array(Di(e-1)),Z.record(Z.string(),Di(e-1)))}var Oi=Di(Ei),ki=[`free`,`pro`,`admin`],Ai={free:`Free`,pro:`Pro`,admin:`Admin`},ji={modelUsage:{weekly:5e3,monthly:15e3},webTools:{weekly:500,monthly:1500}};ji.modelUsage.weekly*5,ji.modelUsage.monthly*5,ji.webTools.weekly*5,ji.webTools.monthly*5;function Mi(e){return e.map(e=>Z.literal(e))}Z.union(...Mi(Ur)),Z.union(...Mi(Wr)),Z.union(...Mi(Gr)),Z.union(...Mi(ki)),Z.union(Z.literal(`active`),Z.literal(`on_hold`),Z.literal(`cancelled`),Z.literal(`expired`),Z.literal(`failed`));var Ni=Z.object({path:Z.string(),directory:Z.string(),contents:Z.string(),truncated:Z.boolean()}),Pi=Z.object({patch:Z.string()}),Fi=Z.object({cmd:Z.string(),workdir:Z.optional(Z.string()),shell:Z.optional(Z.string()),timeoutMs:Z.optional(Z.number()),yieldTimeMs:Z.optional(Z.number()),maxOutputChars:Z.optional(Z.number())}),Ii=Z.object({url:Z.string()}),Li=Z.object({query:Z.string(),numResults:Z.optional(Z.number())}),Ri=Z.object({sessionId:Z.string(),chars:Z.optional(Z.string()),terminate:Z.optional(Z.boolean()),yieldTimeMs:Z.optional(Z.number())}),zi=Z.union(Z.literal(`markdown`),Z.literal(`html`),Z.literal(`react`)),Bi=Z.object({title:Z.string(),contentType:zi,content:Z.string()}),Vi=Z.object({artifactId:Z.string(),content:Z.string()}),Hi=Z.object({name:Z.string()}),Ui=Z.object({instruction:Z.optional(Z.string()),action:Z.optional(Z.object({selector:Z.string(),description:Z.string(),method:Z.optional(Z.string()),arguments:Z.optional(Z.array(Z.string()))})),startUrl:Z.optional(Z.string())}),Wi=Z.union(...Mi([`one_time`,`weekly`,`monthly`,`yearly`])),Gi=Z.union(Z.literal(`listed`),Z.literal(`any`)),Ki=Z.union(...Mi([`pending`,`active`,`paused`,`consumed`,`cancelled`,`expired`]));Z.union(Z.literal(`awaiting_result`),Z.literal(`completed`),Z.literal(`declined`),Z.literal(`failed`));var qi=Z.union(Z.literal(`approved`),Z.literal(`declined`)),Ji=Z.object({userEmail:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),merchantUrl:Z.optional(Z.string()),countryCode:Z.optional(Z.string()),amountCap:Z.string(),currency:Z.string(),frequency:Wi,scope:Gi,description:Z.string(),maxCharges:Z.optional(Z.number()),validUntil:Z.optional(Z.string())}),Yi=Z.object({mandateId:Z.string()}),Xi=Z.object({mandateId:Z.string(),amount:Z.string(),currency:Z.string(),description:Z.string(),reference:Z.optional(Z.string())}),Zi=Z.object({chargeId:Z.string(),outcome:qi,amountPaid:Z.optional(Z.string())}),Qi=Z.object({id:Z.string(),label:Z.string()}),$i=Z.object({question:Z.string(),options:Z.array(Qi),yieldTimeMs:Z.optional(Z.number()),timeoutMs:Z.optional(Z.number())}),ea=Z.object({questionId:Z.id(`agentQuestions`),yieldTimeMs:Z.optional(Z.number())});Z.union(Z.object({}),Pi,$i,ea,Fi,Hi,Ii,Li,Ri,Bi,Vi,Ui,Ji,Yi,Xi,Zi);var ta=Z.object({changes:Z.array(Z.object({path:Z.string(),operation:Z.union(Z.literal(`created`),Z.literal(`updated`),Z.literal(`deleted`),Z.literal(`renamed`),Z.literal(`copied`))}))}),na=Z.object({command:Z.string(),cwd:Z.string(),sessionId:Z.optional(Z.string()),exitCode:Z.optional(Z.number()),success:Z.boolean(),running:Z.boolean(),timedOut:Z.boolean(),stdout:Z.string(),stderr:Z.string(),output:Z.string(),truncated:Z.boolean(),error:Z.optional(Z.string())}),ra=Z.object({url:Z.string(),markdown:Z.string(),truncated:Z.boolean()}),ia=Z.object({results:Z.array(Z.object({title:Z.optional(Z.string()),url:Z.string(),publishedDate:Z.optional(Z.string()),author:Z.optional(Z.string()),text:Z.optional(Z.string())}))}),aa=Z.object({mandateId:Z.id(`mandates`),approvalUrl:Z.string(),expiresAt:Z.string()}),oa=Z.object({mandateId:Z.id(`mandates`),pravaMandateId:Z.optional(Z.string()),status:Ki,description:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),amountCap:Z.string(),remaining:Z.optional(Z.string()),currency:Z.string(),frequency:Wi,scope:Gi,approvalUrl:Z.optional(Z.string()),validUntil:Z.optional(Z.string()),renewsAt:Z.optional(Z.string())}),sa=Z.object({mandates:Z.array(Z.object({mandateId:Z.optional(Z.id(`mandates`)),pravaMandateId:Z.string(),status:Z.string(),description:Z.optional(Z.string()),merchantName:Z.optional(Z.string()),approvedAmount:Z.string(),remaining:Z.optional(Z.string()),currency:Z.string(),validUntil:Z.optional(Z.string()),renewsAt:Z.optional(Z.string())}))}),ca=Z.object({chargeId:Z.id(`mandateCharges`),transactionId:Z.string(),token:Z.optional(Z.string()),dynamicCvv:Z.optional(Z.string()),expiryMonth:Z.optional(Z.string()),expiryYear:Z.optional(Z.string())}),la=Z.object({reported:Z.boolean(),alreadyReported:Z.optional(Z.boolean()),inFlight:Z.optional(Z.boolean())}),ua=Z.object({text:Z.string(),truncated:Z.boolean()}),da=Z.object({selector:Z.string(),description:Z.string(),method:Z.optional(Z.string()),arguments:Z.optional(Z.array(Z.string()))}),fa=Z.object({actions:Z.array(da),text:Z.string(),truncated:Z.boolean()}),pa=Z.object({name:Z.string(),description:Z.string(),content:Z.string(),dir:Z.optional(Z.string()),truncated:Z.optional(Z.boolean())}),ma=Z.object({optionId:Z.optional(Z.string()),optionLabel:Z.optional(Z.string()),text:Z.optional(Z.string())}),ha=Z.object({questionId:Z.id(`agentQuestions`),question:Z.string(),options:Z.array(Qi),pending:Z.boolean(),timedOut:Z.boolean(),answer:Z.optional(ma)}),ga=Z.object({artifactId:Z.string(),version:Z.number(),title:Z.optional(Z.string()),contentType:Z.optional(zi)});Z.union(Z.string(),Z.array(Ni),ta,ha,na,pa,ra,ia,ga,ua,fa,aa,oa,sa,ca,la),Z.union(Z.literal(`disconnected`),Z.literal(`connected`)),Z.union(Z.literal(`queued`),Z.literal(`running`),Z.literal(`awaiting_executor`),Z.literal(`completed`),Z.literal(`failed`),Z.literal(`cancelled`));var _a=[`cancelled`,`completed`,`failed`];Z.union(...Mi(_a));function va(e){return _a.includes(e)}Z.union(Z.literal(`apply_patch`),Z.literal(`ask_question`),Z.literal(`await_question`),Z.literal(`browser_observe`),Z.literal(`browser_act`),Z.literal(`browser_extract`),Z.literal(`exec_command`),Z.literal(`get_workspace_instructions`),Z.literal(`mandate_setup`),Z.literal(`mandate_status`),Z.literal(`mandate_list`),Z.literal(`mandate_charge`),Z.literal(`mandate_report`),Z.literal(`read_skill`),Z.literal(`scrape_url`),Z.literal(`web_search`),Z.literal(`write_stdin`),Z.literal(`create_artifact`),Z.literal(`update_artifact`)),Z.union(Z.literal(`pending`),Z.literal(`answered`),Z.literal(`timedOut`),Z.literal(`cancelled`)),Z.union(Z.literal(`pending`),Z.literal(`claimed`),Z.literal(`completed`),Z.literal(`failed`),Z.literal(`cancelled`)),Z.union(Z.literal(`prompt`),Z.literal(`response`));var ya=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`],ba=`10 MiB`,xa=Z.object({type:Z.literal(`text`),id:Z.string(),text:Z.string(),turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),Sa=Z.object({type:Z.literal(`reasoning`),id:Z.string(),text:Z.string(),turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),Ca=Z.object({type:Z.literal(`tool-call`),partId:Z.optional(Z.string()),callId:Z.string(),name:Z.string(),input:Oi,turnId:Z.optional(Z.string()),providerMetadata:Z.optional(Oi)}),wa=Z.union(...Mi([`cancelled`,`failed`]));Z.object({error:Z.string(),status:wa});var Ta=Z.object({type:Z.literal(`tool-result`),callId:Z.string(),name:Z.optional(Z.string()),output:Oi});Z.union(xa,Sa,Ca,Ta);var Ea=Z.union(Z.literal(`system`),Z.literal(`user`),Z.literal(`assistant`)),Da=Z.union(Z.object({type:Z.literal(`text`),text:Z.string()}),Z.object({type:Z.literal(`image`),imageJson:Z.string()})),Oa=Z.union(Z.object({type:Z.literal(`text`),text:Z.string(),additionalParamsJson:Z.optional(Z.string())}),Z.object({type:Z.literal(`reasoning`),id:Z.optional(Z.string()),blocksJson:Z.string()}),Z.object({type:Z.literal(`toolCall`),id:Z.string(),callId:Z.optional(Z.string()),name:Z.string(),argumentsJson:Z.string(),signature:Z.optional(Z.string()),additionalParamsJson:Z.optional(Z.string())}),Z.object({type:Z.literal(`toolResult`),id:Z.string(),callId:Z.optional(Z.string()),items:Z.array(Da)}),Z.object({type:Z.literal(`image`),imageJson:Z.string()}),Z.object({type:Z.literal(`audio`),audioJson:Z.string()}),Z.object({type:Z.literal(`video`),videoJson:Z.string()}),Z.object({type:Z.literal(`document`),documentJson:Z.string()}));Z.object({role:Ea,assistantId:Z.optional(Z.string()),contents:Z.array(Oa)});function ka(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e===r[t])}var Aa=ya;function ja(e){return Aa.includes(e)}function Ma(e,t){return e>=4?`You can attach up to 4 images.`:ja(t.type)?t.size>10485760?`${t.name||`This image`} is larger than ${ba}.`:null:`${t.name||`This file`} is not a supported image. Use JPEG, PNG, GIF, or WebP.`}var Na=I(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]"><span class="inline-flex items-center gap-0.75"><span class="bg-foreground/28 size-1 animate-pulse rounded-full"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:200ms]"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:400ms]"></span></span> <span> </span></div>`),Pa=I(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]" role="status" aria-live="polite"><span class="bg-foreground/28 size-1.5 animate-pulse rounded-full"></span> <span> </span></div>`),Fa=I(`<li><button type="button"> </button></li>`),Ia=I(`<div class="mb-3" role="group" aria-label="Agent question"><p class="text-foreground text-[14px] leading-6 font-medium"> </p> <ul class="mt-2 flex flex-col gap-1.5" aria-label="Answer options"></ul></div>`),La=I(`<span class="absolute inset-0 flex items-center justify-center" role="status"><span class="border-border border-t-foreground/80 size-3.5 animate-spin rounded-full border-2"></span></span>`),Ra=I(`<span class="text-destructive absolute inset-x-0 bottom-0 bg-rose-950/80 px-1 py-0.5 text-center text-[9px] leading-3" role="alert">Failed</span>`),za=I(`<li><img/> <!> <button type="button" class="bg-foreground/70 text-background hover:bg-foreground/90 absolute top-1 right-1 flex size-4.5 cursor-pointer items-center justify-center rounded-full transition disabled:cursor-not-allowed disabled:opacity-40"><!></button></li>`),Ba=I(`<ul class="mb-3 flex flex-wrap items-center gap-2" aria-label="Attached images"></ul>`),Va=I(`<p class="text-muted-foreground px-3 py-2 text-sm">Loading skills…</p>`),Ha=I(`<div class="flex items-center justify-between gap-3 px-3 py-2"><p class="text-muted-foreground text-sm">Couldn’t load skills</p> <button type="button" class="text-muted-foreground hover:text-foreground text-sm underline-offset-2 hover:underline">Retry</button></div>`),Ua=I(`<p class="text-muted-foreground px-3 py-2 text-sm">No matching skills</p>`),Wa=I(`<button type="button" role="option"><span class="text-sm font-medium"> </span> <span class="text-muted-foreground line-clamp-2 text-[12px]"> </span></button>`),Ga=I(`<div class="border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl" id="composer-skills-listbox" aria-label="Available skills"><!></div>`),Ka=I(`<button type="button" class="flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100" aria-label="Stop generation" title="Stop"><!></button>`),qa=I(`<button type="button" class="bg-primary/90 text-primary-foreground hover:bg-primary flex h-10 w-10 items-center justify-center rounded-full transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:opacity-30 disabled:hover:scale-100"><!></button>`),Ja=I(`<div class="bg-tooltip text-tooltip-foreground ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`),Ya=I(`<footer class="shrink-0 px-6 py-4"><div class="mx-auto max-w-336"><!> <div><div><div class="relative flex min-h-33 flex-col px-4 pt-4 pb-2.5"><!> <!> <div class="relative min-h-0 flex-1"><!> <textarea rows="1" class="text-foreground placeholder:text-muted-foreground field-sizing-content max-h-40 min-h-17 w-full resize-none overflow-y-auto border-0 bg-transparent px-0 py-0 text-[14px] leading-6 outline-none" role="combobox" aria-autocomplete="list" aria-haspopup="listbox" autocomplete="off"></textarea></div> <div class="flex min-w-0 flex-nowrap items-center justify-between gap-3 overflow-visible px-0 pt-2.5 pb-0"><div class="-m-1 flex min-w-0 flex-1 items-center gap-1 overflow-visible p-1"><input type="file" class="hidden" multiple=""/> <button type="button" class="text-muted-foreground enabled:hover:text-foreground flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition enabled:cursor-pointer disabled:opacity-40"><!></button> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!></div> <div class="flex shrink-0 flex-nowrap items-center justify-end gap-2.5"><div class="group/context relative"><button type="button" class="focus-visible:ring-ring/60 relative flex size-8 cursor-help items-center justify-center rounded-full focus-visible:ring-2 focus-visible:outline-none" aria-describedby="context-window-details"><span class="bg-muted size-5.5 rounded-full"></span></button> <div id="context-window-details" class="border-border bg-popover invisible absolute right-0 bottom-full z-50 mb-3 w-76 translate-y-1 rounded-xl border p-4 opacity-0 shadow-(--composer-shadow) transition duration-150 group-focus-within/context:visible group-focus-within/context:translate-y-0 group-focus-within/context:opacity-100 group-hover/context:visible group-hover/context:translate-y-0 group-hover/context:opacity-100" role="tooltip"><div class="flex items-center justify-between gap-4 text-[13px]"><span class="text-foreground font-medium">Context window</span> <span class="text-muted-foreground"> </span></div> <div class="bg-hover-fill mt-3 h-1.5 overflow-hidden rounded-full"><div class="bg-accent h-full rounded-full transition-[width] duration-300"></div></div> <div class="text-muted-foreground mt-3 flex items-center justify-between text-[12px]"><span>Total processed</span> <span> </span></div> <p class="text-muted-foreground mt-4 text-[12px] leading-5"> </p></div></div> <!> <!></div></div></div></div></div></div></footer> <!>`,1);function Xa(t,n){U(n,!0);let r=F(n,`prompt`,15,``),d=F(n,`selectedModel`,31,()=>l(qr)),f=F(n,`selectedReasoningEffort`,31,()=>l(Jr)),_=F(n,`selectedServiceTier`,31,()=>l(Yr)),x=F(n,`pendingQuestion`,3,null),C=F(n,`selectedQuestionOptionId`,15,null),w=F(n,`projectSkills`,3,null),T=Te(),E=Ee(G.billing.getMySubscription,()=>T.isAuthenticated&&!T.isLoading?{}:`skip`),D=e(()=>E.data?.tier),O=e(()=>!!E.error),M=e(()=>n.modelCatalog?ii(n.modelCatalog,o(D)??`free`):[]),N=e(()=>n.modelCatalog?Qr(n.modelCatalog,d()):void 0),ee=e(()=>n.modelCatalog&&o(N)?ri(n.modelCatalog,o(D)??`free`,o(N)):void 0),te=e(()=>o(N)!==void 0&&(o(O)||o(D)!==void 0&&n.modelCatalog!==void 0&&$r(n.modelCatalog,o(D),d()))),I=g(null),ne=g(null),ie=g(null),ae=g(l([])),R=g(`idle`),se=g(!1),ce=g(0),le=g(0),ue=0,de,fe=l([]),W=e(()=>x()!=null),pe=e(()=>n.isRunning&&!o(W)||n.isSubmitting),me=e(()=>!!r().trim()||n.attachments.length>0),he=e(()=>Ci({selectedOptionId:C(),text:r()})),ge=e(()=>o(W)?o(he):o(me)),_e=e(()=>n.attachments.some(e=>e.status!==`ready`)),ve=e(()=>n.attachments.length<4&&!o(pe)&&!o(W)),ye=g(null);c(()=>{let e=x()?.questionId??null;e!==o(ye)&&(S(ye,e,!0),C(null),r().trim()&&r(``))});let be=`Attach images (up to 4)`,xe=typeof CSS<`u`&&CSS.supports(`field-sizing`,`content`),Se=e(()=>n.contextUsage.contextWindowTokens>0?Math.min(100,Math.round(n.contextUsage.inputTokens/n.contextUsage.contextWindowTokens*100)):0),Ce=e(()=>n.contextUsage.contextWindowTokens>0?Math.round(n.contextUsage.autoCompactTokenLimit/n.contextUsage.contextWindowTokens*100):0),we=e(()=>yi(r(),o(le))),De=e(()=>o(we)!==null&&!o(se)&&!o(W)),Oe=e(()=>o(we)===null?[]:bi(o(ae),o(we))),K=e(()=>o(De)&&o(Oe).length>0?`composer-skill-option-${o(ce)}`:void 0);function ke(){S(le,o(I)?.selectionStart??r().length,!0)}function Ae(){S(ae,[],!0),S(R,`idle`),S(se,!1),S(ce,0),ue+=1}async function je(e=!1){if(o(R)===`loading`||(o(R)===`ready`||o(R)===`error`)&&!e)return;if(!w()?.load){S(ae,[],!0),S(R,`ready`);return}let t=++ue;S(R,`loading`);try{let e=await w().load();if(t!==ue)return;S(ae,e,!0),S(R,`ready`)}catch{if(t!==ue)return;S(ae,[],!0),S(R,`error`)}}function Me(e){let t=xi(r(),o(le),e.name);t&&(r(t.text),S(le,t.caret,!0),S(se,!0),queueMicrotask(()=>{o(I)&&(o(I).focus(),o(I).setSelectionRange(t.caret,t.caret),q())}))}function Ne(e){let t=e.currentTarget,r=Array.from(t.files??[]);t.value=``,r.length>0&&n.onAttachFiles(r)}function Pe(e){let t=Array.from(e.clipboardData?.files??[]).filter(e=>e.type.startsWith(`image/`));t.length===0||n.isRunning||n.isSubmitting||o(W)||(e.preventDefault(),n.onAttachFiles(t))}function Fe(e){let t=e.currentTarget;if(!(t instanceof HTMLButtonElement)||t.disabled)return;let n=t.getBoundingClientRect();S(ie,{top:n.top-8,left:n.left+n.width/2},!0)}function Ie(){S(ie,null)}function q(){if(!o(I)||xe)return;let e=o(I);e.style.height=`68px`;let t=Math.min(Math.max(e.scrollHeight,68),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`}function J(e){if(o(De)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),o(Oe).length===0)return;let t=e.key===`ArrowDown`?1:-1;S(ce,(o(ce)+t+o(Oe).length)%o(Oe).length);return}if(e.key===`Escape`){e.preventDefault(),S(se,!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=o(Oe)[o(ce)];t&&Me(t);return}}!n.canSend||!o(W)&&!o(te)||n.isSubmitting||o(pe)||!o(ge)||!o(W)&&o(_e)||gi(e)&&(e.preventDefault(),n.onSubmit())}function Le(e){C(C()===e?null:e)}function Re(e){if(!n.modelCatalog)return;let t=Qr(n.modelCatalog,e);t&&f(t.defaultReasoningEffort)}function ze(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1).replace(/\.0$/,``)}m`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}c(()=>{n.modelCatalog&&(!d()||!Qr(n.modelCatalog,d()))&&(d(n.modelCatalog.defaultModelId),f(n.modelCatalog.defaultReasoningEffort),_(n.modelCatalog.defaultServiceTier))}),c(()=>{if(!n.modelCatalog||!o(D))return;let e=ei(n.modelCatalog,o(D),d());e!==d()&&(d(e),f(Qr(n.modelCatalog,e)?.defaultReasoningEffort??n.modelCatalog.defaultReasoningEffort));let t=Qr(n.modelCatalog,e);if(!t)return;let r=ni(n.modelCatalog,o(D),t);r.includes(_())||_(r[0]??n.modelCatalog.defaultServiceTier)}),c(()=>{r(),q()}),c(()=>{let e=w()?.workspacePath??null;if(de!==e&&(de=e,Ae()),o(we)===null){S(se,!1);return}o(se)||je()}),c(()=>{o(Oe),S(ce,0)}),c(()=>{!o(De)||o(Oe).length===0||fe[o(ce)]?.scrollIntoView({block:`nearest`})});var Be=Ya(),Ve=u(Be),He=s(Ve),Ue=s(He),Y=e=>{var t=Na(),r=H(s(t),2),o=s(r);V(r),V(t),b(()=>a(o,`Working for ${n.elapsedLabel??``}`)),i(e,t)},X=e=>{var t=Pa(),r=H(s(t),2),o=s(r,!0);V(r),V(t),b(()=>a(o,n.isStarting?`Starting agent…`:`Sending request…`)),i(e,t)};y(Ue,e=>{n.elapsedLabel?e(Y):n.isSubmitting&&e(X,1)});var We=H(Ue,2);L(We,1,P(`composer-shell mx-auto w-full max-w-[48rem] rounded-[28px] p-px transition-colors duration-200`));var Ge=s(We);L(Ge,1,P(`composer-inner rounded-[27px] border border-[var(--hairline)] transition-colors duration-200`));var Ke=s(Ge),qe=s(Ke),Je=t=>{var n=Ia(),r=s(n),c=s(r,!0);V(r);var l=H(r,2);v(l,21,()=>x().options,e=>e.id,(t,n)=>{let r=e(()=>o(n).id===Si),c=e(()=>C()===o(n).id);var l=Fa(),u=s(l),d=s(u,!0);V(u),V(l),b(()=>{L(u,1,`w-full rounded-lg border px-3 py-2 text-left text-[13px] leading-5 transition ${o(c)?`border-foreground/40 bg-hover-fill-strong text-foreground`:o(r)?`border-border/70 text-muted-foreground/80 hover:text-muted-foreground hover:bg-hover-fill`:`border-border text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),A(u,`aria-pressed`,o(c)),a(d,o(n).label)}),p(`click`,u,()=>{Le(o(n).id)}),i(t,l)}),V(l),V(n),b(()=>a(c,x().question)),i(t,n)};y(qe,e=>{x()&&e(Je)});var Ye=H(qe,2),Xe=e=>{var t=Ba();v(t,21,()=>n.attachments,e=>e.localId,(e,t)=>{var r=za(),a=s(r),c=H(a,2),l=e=>{var n=La();b(()=>A(n,`aria-label`,`Uploading ${o(t).name??``}`)),i(e,n)},u=e=>{var t=Ra();i(e,t)};y(c,e=>{o(t).status===`uploading`?e(l):o(t).status===`error`&&e(u,1)});var d=H(c,2);Jn(s(d),{class:`size-3`,"aria-hidden":`true`}),V(d),V(r),b(()=>{L(r,1,`group relative size-14 overflow-hidden rounded-xl border ${o(t).status===`error`?`border-rose-500/60`:`border-border`}`),A(r,`title`,o(t).error??o(t).name),A(a,`src`,o(t).previewUrl),A(a,`alt`,o(t).name),L(a,1,`size-full object-cover ${o(t).status===`uploading`?`opacity-50`:``}`),A(d,`aria-label`,`Remove ${o(t).name??``}`),d.disabled=o(pe)}),p(`click`,d,()=>n.onRemoveAttachment(o(t).localId)),i(e,r)}),V(t),i(e,t)};y(Ye,e=>{n.attachments.length>0&&!o(W)&&e(Xe)});var Ze=H(Ye,2),Z=s(Ze),Qe=e=>{var t=Ga(),n=s(t),r=e=>{var t=Va();i(e,t)},c=e=>{var t=Ha(),n=H(s(t),2);V(t),p(`click`,n,()=>{je(!0)}),i(e,t)},l=e=>{var t=Ua();i(e,t)},d=e=>{var t=m(),n=u(t);v(n,19,()=>o(Oe),e=>e.name,(e,t,n)=>{var r=Wa(),c=s(r),l=s(c);V(c);var u=H(c,2),d=s(u,!0);V(u),V(r),oe(r,(e,t)=>fe[t]=e,e=>fe?.[e],()=>[o(n)]),b(()=>{A(r,`id`,`composer-skill-option-${o(n)??``}`),L(r,1,`flex w-full flex-col gap-0.5 px-3 py-2 text-left transition ${o(ce)===o(n)?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),A(r,`aria-selected`,o(ce)===o(n)),a(l,`$${o(t).name??``}`),a(d,o(t).description)}),h(`pointerenter`,r,()=>{S(ce,o(n),!0)}),p(`click`,r,()=>{Me(o(t))}),i(e,r)}),i(e,t)};y(n,e=>{o(R)===`loading`?e(r):o(R)===`error`?e(c,1):o(Oe).length===0?e(l,2):e(d,-1)}),V(t),b(()=>A(t,`role`,o(R)===`ready`&&o(Oe).length>0?`listbox`:`status`)),i(e,t)};y(Z,e=>{o(De)&&e(Qe)});var $e=H(Z,2);j($e),oe($e,e=>S(I,e),()=>o(I)),V(Ze);var et=H(Ze,2),tt=s(et),nt=s(tt);oe(nt,e=>S(ne,e),()=>o(ne));var rt=H(nt,2);cn(s(rt),{class:`size-4`,"aria-hidden":`true`}),V(rt);var Q=H(rt,4);{let t=(e,t=re)=>{Hr(e,{get provider(){return t().provider},className:`size-4 shrink-0`})},r=e(()=>o(pe)||o(W)||n.modelCatalog===void 0);Pr(Q,{get options(){return o(M)},ariaLabel:`Select model`,menuTitle:`Model`,get disabled(){return o(r)},searchable:!0,onValueChange:Re,className:`z-20 shrink-0`,triggerClassName:`h-9 border-0 bg-transparent px-2 text-[15px] text-foreground shadow-none hover:bg-transparent focus-visible:ring-0`,get value(){return d()},set value(e){d(e)},optionIcon:t,$$slots:{optionIcon:!0}})}var it=H(Q,4),at=t=>{{let n=e(()=>o(pe)||o(W));hi(t,{get model(){return o(N)},get serviceTierOptions(){return o(ee)},get disabled(){return o(n)},className:`z-20 shrink-0`,get reasoningEffort(){return f()},set reasoningEffort(e){f(e)},get serviceTier(){return _()},set serviceTier(e){_(e)}})}};y(it,e=>{o(N)&&e(at)}),V(tt);var ot=H(tt,2),st=s(ot),ct=s(st),ut=H(ct,2),dt=s(ut),ft=H(s(dt),2),pt=s(ft);V(ft),V(dt);var mt=H(dt,2),ht=s(mt);V(mt);var gt=H(mt,2),_t=H(s(gt),2),vt=s(_t,!0);V(_t),V(gt);var yt=H(gt,2),bt=s(yt);V(yt),V(ut),V(st);var xt=H(st,2),St=e=>{var t=Ka();In(s(t),{class:`size-3.5 fill-current`}),V(t),p(`click`,t,function(...e){n.onCancel?.apply(this,e)}),i(e,t)};y(xt,e=>{n.isRunning&&e(St)});var Ct=H(xt,2),wt=e=>{var t=qa();lt(s(t),{class:`size-4`}),V(t),b(()=>{t.disabled=!n.canSend||!o(W)&&!o(te)||n.isSubmitting||!o(ge)||!o(W)&&o(_e),A(t,`aria-label`,o(W)?`Submit answer`:`Send message`)}),p(`click`,t,function(...e){n.onSubmit?.apply(this,e)}),i(e,t)};y(Ct,e=>{(o(W)||!n.isRunning)&&e(wt)}),V(ot),V(et),V(Ke),V(Ge),V(We),V(He),V(Ve);var Tt=H(Ve,2),Et=e=>{var t=Ja(),n=s(t,!0);V(t),b(()=>{B(t,`top: ${o(ie).top}px; left: ${o(ie).left}px;`),a(n,be)}),i(e,t)};y(Tt,e=>{o(ie)&&e(Et)}),b((e,t,n,r)=>{A($e,`placeholder`,o(W)?`Add detail, or type a custom answer`:`Ask anything, @tag files/directories, or use $ to show available skills`),$e.disabled=o(pe),A($e,`aria-expanded`,o(De)),A($e,`aria-controls`,o(De)?`composer-skills-listbox`:void 0),A($e,`aria-activedescendant`,o(K)),A(nt,`accept`,e),A(rt,`aria-label`,be),rt.disabled=!o(ve),A(ct,`aria-label`,`Context window ${o(Se)}% full`),B(ct,`background: conic-gradient(var(--accent) ${o(Se)*3.6}deg, var(--hover-fill-strong) 0deg);`),a(pt,`${o(Se)??``}% · ${t??``}/${n??``}`),B(ht,`width: ${o(Se)}%`),a(vt,r),a(bt,`Sprocket automatically compacts context at about ${o(Ce)??``}% so
2
2
  long-running work can continue.`)},[()=>Aa.join(`,`),()=>ze(n.contextUsage.inputTokens),()=>ze(n.contextUsage.contextWindowTokens),()=>ze(n.contextUsage.totalTokensProcessed)]),p(`keydown`,$e,J),h(`paste`,$e,Pe),h(`focus`,$e,ke),p(`input`,$e,()=>{ke(),q()}),p(`keyup`,$e,ke),p(`click`,$e,ke),h(`select`,$e,ke),k($e,r),p(`change`,nt,Ne),h(`mouseenter`,rt,Fe),h(`mouseleave`,rt,Ie),h(`focus`,rt,Fe),h(`blur`,rt,Ie),p(`click`,rt,()=>{Ie(),o(ne)?.click()}),p(`keydown`,ct,e=>{e.key===`Escape`&&e.currentTarget.blur()}),i(t,Be),z()}f([`click`,`keydown`,`input`,`keyup`,`change`]);var Za=I(`<p class="text-foreground text-[15px]"> </p>`),Qa=I(`<button type="button" class="text-muted-foreground hover:text-foreground block text-left text-sm transition"><span> </span></button>`),$a=I(`<div class="mt-3 space-y-1"><!> <!></div>`),eo=I(`<p class="text-muted-foreground mt-3 text-sm">You’re signed in to Sprocket.</p>`),to=I(`<p class="text-foreground mt-3 text-[15px]"> </p>`),no=I(`<p class="text-muted-foreground mt-3 text-sm">Couldn’t load your subscription right now.</p>`),ro=I(`<div class="bg-hover-fill mt-3.5 h-4 w-16 animate-pulse rounded" aria-hidden="true"></div>`),io=I(`<!> Sign Out`,1),ao=I(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Account</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-10"><div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Profile</p> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Spikonado Subscription Tier</p> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Session</p> <p class="text-muted-foreground mt-2 text-sm leading-6">Sign out of this device. You’ll need to authenticate again to open your projects.</p> <div class="mt-4"><!></div></div></div></div></section>`);function oo(t,n){U(n,!0);let r=g(!1),c=Te(),l=Ee(G.billing.getMySubscription,()=>c.isAuthenticated&&!c.isLoading?{}:`skip`),d=e(()=>[n.user?.firstName,n.user?.lastName].filter(Boolean).join(` `).trim()||null);var f=ao(),m=H(s(f),2),h=s(m),_=s(h),v=H(s(_),2),x=e=>{var t=$a(),c=s(t),l=e=>{var t=Za(),n=s(t,!0);V(t),b(()=>a(n,o(d))),i(e,t)};y(c,e=>{o(d)&&e(l)});var u=H(c,2),f=e=>{var t=Qa(),c=s(t),l=s(c,!0);V(c),V(t),b(()=>{A(t,`aria-pressed`,o(r)),A(t,`aria-label`,o(r)?`Hide email address`:`Show email address`),L(c,1,P(o(r)?void 0:`blur-[5px] select-none`)),a(l,n.user.email)}),p(`click`,t,()=>{S(r,!o(r))}),i(e,t)};y(u,e=>{n.user?.email&&e(f)}),V(t),i(e,t)},C=e=>{var t=eo();i(e,t)};y(v,e=>{o(d)||n.user?.email?e(x):e(C,-1)}),V(_);var w=H(_,2),T=H(s(w),2),E=e=>{var t=to(),n=s(t,!0);V(t),b(()=>a(n,Ai[l.data.tier])),i(e,t)},D=e=>{var t=no();i(e,t)},O=e=>{var t=ro();i(e,t)};y(T,e=>{l.data?e(E):l.error?e(D,1):e(O,-1)}),V(w);var k=H(w,2),j=H(s(k),4);ar(s(j),{variant:`outline`,get onclick(){return n.onSignOut},children:(e,t)=>{var n=io();gn(u(n),{class:`mr-2 size-4`,"aria-hidden":`true`}),N(),i(e,n)},$$slots:{default:!0}}),V(j),V(k),V(h),V(m),V(f),i(t,f),z()}f([`click`]);function so(e,t){return e.find(e=>e.repositoryKey===t)??null}function co(e,t){return t?e.find(e=>e._id===t)??null:null}function lo(e,t){return e.trim().length>0&&t.trim().length>0&&e!==t}function uo(e){return e.threadStatus!==`archived`}function fo(e){return{_id:e,userId:``,repositoryKey:`unknown`,displayName:`Unknown project`,executorStatus:`disconnected`,lastSeenAt:0,localAttachmentAvailability:`unlinked`}}function po(e,t){let n=ho(t);return{project:e,threads:n,latestThreadAt:n.reduce((e,t)=>Math.max(e,t.lastMessageAt),0),activeThreadCount:go(n)}}function mo(e,t){let n=new Map;for(let e of t.filter(uo)){let t=n.get(e.projectId);if(t){t.push(e);continue}n.set(e.projectId,[e])}let r=[];for(let t of e)r.push(po(t,n.get(t._id)??[])),n.delete(t._id);for(let[e,t]of n)r.push(po(fo(e),t));return r.sort((e,t)=>{let n=e.latestThreadAt||e.project.lastSeenAt,r=t.latestThreadAt||t.project.lastSeenAt;return r===n?e.project.displayName.localeCompare(t.project.displayName):r-n})}function ho(e){return[...e].sort((e,t)=>e.hasActiveRun===t.hasActiveRun?t.lastMessageAt-e.lastMessageAt:Number(t.hasActiveRun)-Number(e.hasActiveRun))}function go(e){return e.filter(e=>e.hasActiveRun).length}function _o(e,t){return t?e.find(e=>e.threadId===t)??null:null}function vo(e,t){return t&&(e?.threadId??e?._id)===t?e:null}function yo(e){let{pendingCreatedThreadId:t,threads:n}=e;return!t||n.some(e=>e.threadId===t)?null:t}function bo(e){return!e.threadId||e.threadId===e.pendingCreatedThreadId||e.hasLatestRunData}function xo(e,t){return!!(t&&e[t])}function So(e,t,n){return{...e,[t]:n}}function Co(e,t,n){let r=e[t];if(!r||n!==void 0&&r.launchId!==n)return e;let i={...e};return delete i[t],i}function wo(e,t,n){return!!(t&&(t!==e.previousRunId||n!==e.previousClaimExpiresAt))}function To(e,t,n,r){let i=e[t];return!i||!wo(i,n,r)?e:Co(e,t,i.launchId)}function Eo(e,t){let n=e;for(let e of t)n=To(n,e.threadId,e.latestRunId,e.latestRunClaimExpiresAt);return n}function Do(e,t,n,r,i,a){let o=e[t];return!o||o.launchId!==n||o.expiresAt>r?{pendingLaunches:e,shouldRecover:!1}:{pendingLaunches:Co(e,t,n),shouldRecover:!wo(o,i,a)}}function Oo(e){let{threads:t,currentThreadId:n,currentRepositoryKey:r,draftRepositoryKey:i,pendingCreatedThreadId:a=null}=e;return r&&i===r?null:n&&(t.some(e=>e.threadId===n)||a&&n===a)?n:t[0]?.threadId??null}var ko=I(`<p class="text-muted-foreground max-w-xl text-sm leading-6">No archived threads.</p>`),Ao=I(`<li class="group flex items-center gap-3 py-2"><div class="min-w-0 flex-1"><p class="text-foreground truncate text-[14px]"> </p> <p class="text-muted-foreground truncate text-[12px]"> </p></div> <button type="button" class="text-muted-foreground hover:text-muted-foreground shrink-0 px-1 text-[12px] opacity-0 transition group-hover:opacity-100 focus-visible:opacity-100">Restore</button></li>`),jo=I(`<ul class="max-w-xl space-y-1"></ul>`),Mo=I(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Archived Threads</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><p class="text-muted-foreground mb-6 max-w-xl text-sm leading-6">We may permanently delete archived threads from our database at any time.</p> <!></div></section>`);function No(t,n){U(n,!0);let r=e(()=>[...n.threads].filter(e=>!uo(e)).sort((e,t)=>t.lastMessageAt-e.lastMessageAt));var c=Mo(),l=H(s(c),2),u=H(s(l),2),d=e=>{var t=ko();i(e,t)},f=t=>{var c=jo();v(c,21,()=>o(r),e=>e.threadId,(t,r)=>{let c=e(()=>co(n.projects,o(r).projectId));var l=Ao(),u=s(l),d=s(u),f=s(d,!0);V(d);var m=H(d,2),h=s(m,!0);V(m),V(u);var g=H(u,2);V(l),b(()=>{a(f,o(r).title),a(h,o(c)?.displayName??`Unknown project`)}),p(`click`,g,()=>{n.onRestore(o(r).threadId)}),i(t,l)}),V(c),i(t,c)};y(u,e=>{o(r).length===0?e(d):e(f,-1)}),V(l),V(c),i(t,c),z()}f([`click`]);var Po=I(`<div class="max-w-md"><p class="text-foreground text-sm"> </p> <p class="text-muted-foreground mt-0.5 text-xs leading-5">Opens Prava in a new tab so you can confirm with your passkey.</p> <a target="_blank" rel="noopener noreferrer" class="border-border bg-surface/80 text-foreground hover:bg-hover-fill mt-3 inline-flex h-9 items-center rounded-full border px-4 text-xs font-medium transition">Approve mandate</a></div>`);function Fo(e,t){U(t,!0);var n=Po(),r=s(n),o=s(r);V(r);var c=H(r,4);V(n),b(()=>{a(o,`Approve spending${t.approval.label?` · ${t.approval.label}`:``}`),A(c,`href`,t.approval.approvalUrl)}),i(e,n),z()}var Io=I(`<p class="text-destructive mt-2 text-sm"> </p>`),Lo=I(`<p class="text-muted-foreground mt-2 text-sm" role="status">Saved.</p>`),Ro=I(`<p class="text-destructive text-sm"> </p>`),zo=I(`<div class="mt-4"><!></div>`),Bo=I(`<p class="text-destructive mt-3 text-sm"> </p>`),Vo=I(`<div class="space-y-2"><div class="bg-hover-fill h-3.5 w-40 rounded"></div> <div class="bg-hover-fill h-3 w-56 rounded"></div></div>`),Ho=I(`<div class="mt-4 animate-pulse space-y-4" aria-hidden="true"></div>`),Uo=I(`<p class="text-muted-foreground mt-3 text-sm leading-6">No mandates yet.</p>`),Wo=I(`<button type="button"> </button>`),Go=I(`<div class="mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1"></div>`),Ko=I(`<li class="py-2"><div class="flex items-baseline justify-between gap-3"><p class="text-foreground truncate text-[14px]"> </p> <p class="text-muted-foreground shrink-0 text-[12px] capitalize"> </p></div> <p class="text-muted-foreground mt-0.5 text-[12px]"> <!> <!> <!></p> <!></li>`),qo=I(`<ul class="mt-3 space-y-1"></ul>`),Jo=I(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Payments</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-10"><div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Payments email</p> <p class="text-muted-foreground mt-2 text-sm leading-6">Used when setting up spending mandates. Saved to your account preferences.</p> <form class="mt-4 flex flex-col gap-3 sm:flex-row sm:items-end"><label class="block min-w-0 flex-1 space-y-1.5"><span>Email</span> <input type="email" autocomplete="email" placeholder="you@example.com"/></label> <!></form> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Set up a spending mandate</p> <p class="text-muted-foreground mt-2 text-sm leading-6">Create a Prava mandate, then approve it in a new tab with your passkey.</p> <form class="mt-4 space-y-3"><div class="grid gap-3 sm:grid-cols-2"><label class="block space-y-1.5"><span>Merchant name</span> <input placeholder="Example Shop"/></label> <label class="block space-y-1.5"><span>Merchant URL</span> <input placeholder="https://example.com"/></label> <label class="block space-y-1.5"><span>Country code</span> <input placeholder="US"/></label> <label class="block space-y-1.5"><span>Amount cap</span> <input placeholder="120.00" required=""/></label> <label class="block space-y-1.5"><span>Currency</span> <input placeholder="USD" required=""/></label> <label class="block space-y-1.5"><span>Frequency</span> <select><option>One time</option><option>Weekly</option><option>Monthly</option><option>Yearly</option></select></label> <label class="block space-y-1.5 sm:col-span-2"><span>Scope</span> <select><option>Listed merchant</option><option>Any merchant</option></select></label> <label class="block space-y-1.5 sm:col-span-2"><span>Description</span> <input placeholder="Agent shopping budget" required=""/></label></div> <!> <!></form> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Your mandates</p> <!> <!></div></div></div></section>`);function Yo(t,n){U(n,!0);let r=Te(),u=Ee(G.uiPreferences.getMine,()=>r.isAuthenticated&&!r.isLoading?{}:`skip`),d=we(G.uiPreferences.setPaymentsEmail),f=De(G.payments.listMyMandates),m=De(G.payments.setupMyMandate),_=De(G.payments.setMyMandateLifecycle);function x(e,t){return e instanceof Error&&(e.message.match(/Uncaught Error: ([^(\n]+)/)?.[1]??e.message).trim()||t}let C=`border-border bg-hover-fill text-foreground placeholder:text-muted-foreground focus:border-ring h-9 w-full rounded-lg border px-3 text-[13px] outline-none`,w=`text-muted-foreground text-[12px]`,T=g(``),E=g(!1),D=g(!1),O=g(!1),A=g(null),j=g(``),ee=g(``),F=g(`US`),I=g(``),ne=g(`USD`),re=g(`monthly`),ie=g(`listed`),ae=g(``),R=g(!1),B=g(null),oe=g(null),se=g(l([])),le=g(!1),ue=g(null),de=g(null),fe=g(null),W={pause:{idle:`Pause`,busy:`Pausing…`},resume:{idle:`Resume`,busy:`Resuming…`},cancel:{idle:`Cancel`,busy:`Cancelling…`}};c(()=>{o(ie)===`any`&&o(re)!==`one_time`&&S(re,`one_time`)}),c(()=>{let e=u.data;e===void 0||o(E)||(S(T,e?.paymentsEmail??``,!0),S(E,!0))}),c(()=>{!r.isAuthenticated||r.isLoading||pe()}),c(()=>{if(!o(oe)||!r.isAuthenticated)return;let e=()=>{document.visibilityState&&document.visibilityState!==`visible`||pe()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}});async function pe(){S(le,!0),S(ue,null);try{let e=await f({});S(se,e.mandates,!0);let t=o(oe)?.mandateId;t&&o(se).some(e=>e.mandateId===t&&(e.status===`active`||e.status===`paused`))&&S(oe,null)}catch(e){S(ue,x(e,`Couldn’t load mandates.`),!0)}finally{S(le,!1)}}async function me(){S(D,!0),S(A,null),S(O,!1);try{await d({email:o(T).trim()}),S(O,!0)}catch(e){S(A,x(e,`Couldn’t save email.`),!0)}finally{S(D,!1)}}async function he(e){if(e.preventDefault(),!o(T).trim()){S(B,`Save your payments email above first — it’s required to set up a mandate.`);return}S(R,!0),S(B,null),S(oe,null);let t=o(ie)===`listed`;try{let e=await m({merchantName:t&&o(j).trim()||void 0,merchantUrl:t&&o(ee).trim()||void 0,countryCode:t&&o(F).trim()||void 0,amountCap:o(I).trim(),currency:o(ne).trim(),frequency:o(re),scope:o(ie),description:o(ae).trim(),userEmail:o(T).trim()});S(oe,{mandateId:e.mandateId,approvalUrl:e.approvalUrl,label:o(ae).trim()},!0),await pe()}catch(e){S(B,x(e,`Couldn’t set up mandate.`),!0)}finally{S(R,!1)}}async function ge(e,t){if(!(!e.mandateId||o(de)!==null)){S(de,e.pravaMandateId,!0),S(fe,t,!0),S(ue,null);try{await _({mandateId:e.mandateId,action:t}),await pe()}catch(e){S(ue,x(e,`Couldn’t ${t} mandate.`),!0)}finally{S(de,null),S(fe,null)}}}var _e=Jo(),ve=H(s(_e),2),ye=s(ve),be=s(ye),xe=H(s(be),4),Se=s(xe),Ce=s(Se);L(Ce,1,P(w));var Oe=H(Ce,2);ce(Oe),L(Oe,1,P(C)),V(Se);var K=H(Se,2);{let t=e(()=>o(D)||!o(T).trim());ar(K,{type:`submit`,variant:`outline`,get disabled(){return o(t)},children:(e,t)=>{N();var n=te();b(()=>a(n,o(D)?`Saving…`:`Save`)),i(e,n)},$$slots:{default:!0}})}V(xe);var ke=H(xe,2),Ae=e=>{var t=Io(),n=s(t,!0);V(t),b(()=>a(n,o(A))),i(e,t)},je=e=>{var t=Lo();i(e,t)};y(ke,e=>{o(A)?e(Ae):o(O)&&e(je,1)}),V(be);var Me=H(be,2),Ne=H(s(Me),4),Pe=s(Ne),Fe=s(Pe),Ie=s(Fe);L(Ie,1,P(w));var q=H(Ie,2);ce(q),L(q,1,P(C)),V(Fe);var J=H(Fe,2),Le=s(J);L(Le,1,P(w));var Re=H(Le,2);ce(Re),L(Re,1,P(C)),V(J);var ze=H(J,2),Be=s(ze);L(Be,1,P(w));var Ve=H(Be,2);ce(Ve),L(Ve,1,P(C)),V(ze);var He=H(ze,2),Ue=s(He);L(Ue,1,P(w));var Y=H(Ue,2);ce(Y),L(Y,1,P(C)),V(He);var X=H(He,2),We=s(X);L(We,1,P(w));var Ge=H(We,2);ce(Ge),L(Ge,1,P(C)),V(X);var Ke=H(X,2),qe=s(Ke);L(qe,1,P(w));var Je=H(qe,2);L(Je,1,P(C));var Ye=s(Je);Ye.value=Ye.__value=`one_time`;var Xe=H(Ye);Xe.value=Xe.__value=`weekly`;var Ze=H(Xe);Ze.value=Ze.__value=`monthly`;var Z=H(Ze);Z.value=Z.__value=`yearly`,V(Je),V(Ke);var Qe=H(Ke,2),$e=s(Qe);L($e,1,P(w));var et=H($e,2);L(et,1,P(C));var tt=s(et);tt.value=tt.__value=`listed`;var nt=H(tt);nt.value=nt.__value=`any`,V(et),V(Qe);var rt=H(Qe,2),Q=s(rt);L(Q,1,P(w));var it=H(Q,2);ce(it),L(it,1,P(C)),V(rt),V(Pe);var at=H(Pe,2),ot=e=>{var t=Ro(),n=s(t,!0);V(t),b(()=>a(n,o(B))),i(e,t)};y(at,e=>{o(B)&&e(ot)}),ar(H(at,2),{type:`submit`,variant:`outline`,get disabled(){return o(R)},children:(e,t)=>{N();var n=te();b(()=>a(n,o(R)?`Setting up…`:`Set up mandate`)),i(e,n)},$$slots:{default:!0}}),V(Ne);var st=H(Ne,2),ct=e=>{var t=zo();Fo(s(t),{get approval(){return o(oe)}}),V(t),i(e,t)};y(st,e=>{o(oe)&&e(ct)}),V(Me);var lt=H(Me,2),ut=H(s(lt),2),dt=e=>{var t=Bo(),n=s(t,!0);V(t),b(()=>a(n,o(ue))),i(e,t)};y(ut,e=>{o(ue)&&e(dt)});var ft=H(ut,2),pt=e=>{var t=Ho();v(t,20,()=>[0,1],e=>e,(e,t)=>{var n=Vo();i(e,n)}),V(t),i(e,t)},mt=e=>{var t=Uo();i(e,t)},ht=t=>{var n=qo();v(n,21,()=>o(se),e=>e.pravaMandateId,(t,n)=>{let r=e(()=>o(de)===o(n).pravaMandateId),c=e(()=>o(r)?o(fe):null),l=e(()=>!!o(n).mandateId&&o(n).status===`active`),u=e(()=>!!o(n).mandateId&&o(n).status===`paused`);var d=Ko(),f=s(d),m=s(f),h=s(m,!0);V(m);var g=H(m,2),_=s(g,!0);V(g),V(f);var x=H(f,2),S=s(x),C=H(S),w=e=>{var t=te();b(()=>a(t,`· ${o(n).remaining??``} remaining`)),i(e,t)};y(C,e=>{o(n).remaining!==void 0&&e(w)});var T=H(C,2),E=e=>{var t=te();b(()=>a(t,`· until ${o(n).validUntil??``}`)),i(e,t)};y(T,e=>{o(n).validUntil&&e(E)});var D=H(T,2),O=e=>{var t=te();b(()=>a(t,`· renews ${o(n).renewsAt??``}`)),i(e,t)};y(D,e=>{o(n).renewsAt&&e(O)}),V(x);var k=H(x,2),A=t=>{let r=e(()=>[o(l)?`pause`:`resume`,`cancel`]);var u=Go();v(u,20,()=>o(r),e=>e,(e,t)=>{var r=Wo();L(r,1,P(`text-muted-foreground hover:text-foreground text-[12px] transition disabled:pointer-events-none disabled:opacity-40`));var l=s(r,!0);V(r),b(()=>{r.disabled=o(de)!==null,a(l,o(c)===t?W[t].busy:W[t].idle)}),p(`click`,r,()=>void ge(o(n),t)),i(e,r)}),V(u),i(t,u)};y(k,e=>{(o(l)||o(u))&&e(A)}),V(d),b(e=>{a(h,e),a(_,o(n).status),a(S,`${o(n).approvedAmount??``}
3
3
  ${o(n).currency??``} `)},[()=>o(n).description?.trim()||o(n).merchantName?.trim()||`Spending mandate`]),i(t,d)}),V(n),i(t,n)};y(ft,e=>{o(le)&&o(se).length===0?e(pt):o(se).length===0?e(mt,1):e(ht,-1)}),V(lt),V(ye),V(ve),V(_e),b(()=>{Oe.disabled=o(D)||u.isLoading,q.disabled=o(R)||o(ie)===`any`,Re.disabled=o(R)||o(ie)===`any`,Ve.disabled=o(R)||o(ie)===`any`,Y.disabled=o(R),Ge.disabled=o(R),Je.disabled=o(R)||o(ie)===`any`,et.disabled=o(R),it.disabled=o(R)}),h(`submit`,xe,e=>{e.preventDefault(),me()}),p(`input`,Oe,()=>{S(O,!1),S(A,null)}),k(Oe,()=>o(T),e=>S(T,e)),h(`submit`,Ne,he),k(q,()=>o(j),e=>S(j,e)),k(Re,()=>o(ee),e=>S(ee,e)),k(Ve,()=>o(F),e=>S(F,e)),k(Y,()=>o(I),e=>S(I,e)),k(Ge,()=>o(ne),e=>S(ne,e)),M(Je,()=>o(re),e=>S(re,e)),M(et,()=>o(ie),e=>S(ie,e)),k(it,()=>o(ae),e=>S(ae,e)),i(t,_e),z()}f([`input`,`click`]);var Xo=I(`<button type="button" class="text-muted-foreground hover:text-foreground hover:bg-hover-fill inline-flex size-7 shrink-0 items-center justify-center rounded-md transition"><!></button>`);function Zo(e,t){U(t,!0);var n=Xo(),r=s(n),a=e=>{Rn(e,{class:`size-3.5`,"aria-hidden":`true`})},o=e=>{vn(e,{class:`size-3.5`,"aria-hidden":`true`})};y(r,e=>{t.theme===`dark`?e(a):e(o,-1)}),V(n),b(()=>{A(n,`aria-label`,t.theme===`dark`?`Switch to light mode`:`Switch to dark mode`),A(n,`title`,t.theme===`dark`?`Light mode`:`Dark mode`)}),p(`click`,n,()=>t.onThemeChange(t.theme===`dark`?`light`:`dark`)),i(e,n),z()}f([`click`]);var Qo=I(`<button type="button"><!> <span class="truncate"> </span></button>`),$o=I(`<aside class="app-sidebar-panel"><div class="flex h-full min-h-0 flex-col overflow-hidden"><div class="flex items-center justify-between gap-2 px-3.5 pt-3 pb-3"><button type="button" class="text-muted-foreground hover:text-foreground hover:bg-hover-fill inline-flex h-8 items-center gap-2 rounded-lg px-2 text-[13px] transition"><!> Back</button> <!></div> <nav class="hide-scrollbar min-h-0 flex-1 space-y-0.5 overflow-y-auto px-2.5 pb-4" aria-label="Settings"></nav></div></aside>`);function es(e,t){U(t,!0);let n=[{id:`account`,label:`Account`,icon:Hn},{id:`usage`,label:`Usage`,icon:ht},{id:`payments`,label:`Payments`,icon:Nt},{id:`archived`,label:`Archived Threads`,icon:at}];var r=$o(),c=s(r),l=s(c),u=s(l);st(s(u),{class:`size-3.5`,"aria-hidden":`true`}),N(),V(u),Zo(H(u,2),{get theme(){return t.theme},get onThemeChange(){return t.onThemeChange}}),V(l);var d=H(l,2);v(d,21,()=>n,e=>e.id,(e,n)=>{var r=Qo(),c=s(r);fe(c,()=>o(n).icon,(e,t)=>{t(e,{class:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`})});var l=H(c,2),u=s(l,!0);V(l),V(r),b(()=>{L(r,1,`flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-[13px] transition ${t.activePage===o(n).id?`bg-hover-fill-strong text-foreground`:`text-muted-foreground hover:bg-hover-fill hover:text-foreground`}`),A(r,`aria-current`,t.activePage===o(n).id?`page`:void 0),a(u,o(n).label)}),p(`click`,r,()=>{t.onNavigate(o(n).id)}),i(e,r)}),V(d),V(c),V(r),p(`click`,u,function(...e){t.onBack?.apply(this,e)}),i(e,r),z()}f([`click`]);var ts=[{id:`modelUsage`,label:`Model usage`,noun:`model usage`,description:`More expensive models use up more usage.`},{id:`webTools`,label:`Web tools`,noun:`web tools`,description:`Web search and URL scrape share this quota.`}],ns=[`weekly`,`monthly`],rs=I(`<p class="text-muted-foreground text-sm leading-6">Couldn’t load your usage right now. Try again in a moment.</p>`),is=I(`<div class="space-y-2"><div class="bg-hover-fill h-3.5 w-full rounded"></div> <div class="bg-hover-fill h-1.5 w-full rounded-full"></div></div>`),as=I(`<div class="space-y-5"><div class="bg-hover-fill h-3 w-28 rounded"></div> <!></div>`),os=I(`<div class="animate-pulse space-y-10" aria-hidden="true"><div class="bg-hover-fill h-4 w-24 rounded"></div> <!></div>`),ss=I(`<p class="text-muted-foreground mt-1 text-[12px]"> </p>`),cs=I(`<p> </p>`),ls=I(`<p class="text-muted-foreground mt-1.5 text-[12px]"> </p>`),us=I(`<div><div class="flex items-baseline justify-between gap-3"><p class="text-muted-foreground text-[13px]"> </p> <!></div> <p class="text-muted-foreground mt-0.5 text-[12px]"> </p> <div class="bg-hover-fill mt-2 h-1.5 overflow-hidden rounded-full" role="progressbar"><div></div></div> <!></div>`),ds=I(`<div><p class="text-muted-foreground text-[11px] tracking-[0.18em] uppercase"> </p> <!> <div class="mt-4 space-y-6"></div></div>`),fs=I(`<div><p class="text-muted-foreground text-[11px] tracking-[0.18em] uppercase">Subscription Tier</p> <p class="text-foreground mt-3 text-[15px]"> </p></div> <!>`,1),ps=I(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Usage</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-10"><!></div></div></section>`);function ms(t,n){U(n,!0);let r=Te(),d=Ee(G.usage.getMyUsage,()=>r.isAuthenticated&&!r.isLoading?{}:`skip`),f=g(l(Date.now()));c(()=>{let e=setInterval(()=>{S(f,Date.now(),!0)},6e4);return()=>{clearInterval(e)}});let p=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),m={weekly:`Weekly`,monthly:`Monthly`};function h(e){let t=Math.max(0,e-o(f)),n=Math.ceil(t/36e5);if(n>=24){let e=Math.floor(n/24),t=n%24;return t>0?`${e}d ${t}h`:`${e}d`}return t>=36e5?`${n}h`:`${Math.max(1,Math.ceil(t/6e4))}m`}function _(e,t){return e?`bg-rose-400/90`:t?`bg-amber-400/90`:`bg-foreground/25`}var x=ps(),C=H(s(x),2),w=s(C),T=s(w),E=e=>{var t=rs();i(e,t)},D=e=>{var t=os(),n=H(s(t),2);v(n,17,()=>ts,e=>e.id,(e,t)=>{var n=as(),r=H(s(n),2);v(r,16,()=>ns,e=>e,(e,t)=>{var n=is();i(e,n)}),V(n),i(e,n)}),V(t),i(e,t)},O=t=>{var n=fs(),r=u(n),c=H(s(r),2),l=s(c,!0);V(c),V(r);var f=H(r,2);v(f,17,()=>d.data.meters,e=>e.id,(t,n)=>{var r=ds(),c=s(r),l=s(c,!0);V(c);var u=H(c,2),d=e=>{var t=ss(),r=s(t,!0);V(t),b(()=>a(r,o(n).description)),i(e,t)};y(u,e=>{o(n).description&&e(d)});var f=H(u,2);v(f,21,()=>o(n).windows,e=>e.period,(t,r)=>{let c=e(()=>o(r).limit>0),l=e(()=>o(c)?Math.round(o(r).used/o(r).limit*100):0),u=e(()=>o(c)&&o(r).used>=o(r).limit),d=e(()=>o(c)&&o(r).used>=o(r).limit*.9);var f=us(),g=s(f),v=s(g),x=s(v,!0);V(v);var S=H(v,2),C=e=>{var t=cs(),n=s(t);V(t),b(()=>{L(t,1,`text-[12px] ${o(u)?`text-destructive`:o(d)?`text-amber-800 dark:text-amber-300`:`text-muted-foreground`}`),a(n,`${o(l)??``}% used`)}),i(e,t)};y(S,e=>{o(c)&&e(C)}),V(g);var w=H(g,2),T=s(w);V(w);var E=H(w,2);A(E,`aria-valuemin`,0);var D=s(E);V(E);var O=H(E,2),k=e=>{var t=ls(),n=s(t);V(t),b(e=>a(n,`Resets in ${e??``}`),[()=>h(o(r).resetsAt)]),i(e,t)};y(O,e=>{o(r).resetsAt!==null&&e(k)}),V(f),b((e,t,i,s,u)=>{a(x,m[o(r).period]),a(T,`${e??``} / ${t??``}`),A(E,`aria-label`,`${o(n).label} — ${m[o(r).period]}`),A(E,`aria-valuemax`,o(c)?o(r).limit:0),A(E,`aria-valuenow`,i),A(E,`aria-valuetext`,o(c)?`${o(l)}% used`:`0 / 0`),L(D,1,s),B(D,u)},[()=>p.format(o(c)?o(r).used:0),()=>p.format(o(c)?o(r).limit:0),()=>o(c)?Math.min(o(r).used,o(r).limit):0,()=>`h-full rounded-full transition-[width] duration-300 ${_(o(u),o(d))}`,()=>`width: ${o(c)?Math.min(100,Math.max(0,o(l))):0}%`]),i(t,f)}),V(f),V(r),b(()=>a(l,o(n).label)),i(t,r)}),b(()=>a(l,Ai[d.data.tier])),i(t,n)};y(T,e=>{d.error?e(E):d.isLoading||d.data===void 0?e(D,1):e(O,-1)}),V(w),V(C),V(x),i(t,x),z()}function hs(e){if(!(!wi(e)||typeof e.error!=`string`)&&(e.status===`cancelled`||e.status===`failed`))return{error:e.error,status:e.status}}function gs(e,t){let n=new Map,r=new Set,i=t.filter(t=>{if(!t.callId)return!0;let i=e.find(e=>e.callId===t.callId&&!r.has(e.callId));return i?(n.set(t.id,i.callId),r.add(i.callId),!1):!1}),a=t=>{let a=e.filter(e=>!r.has(e.callId)),o=new Map(i.filter(e=>!n.has(e.id)).map(e=>[e.id,a.filter(n=>t(n,e))]));for(let e of i){if(n.has(e.id))continue;let t=o.get(e.id)??[];if(t.length!==1)continue;let[a]=t;i.filter(e=>!n.has(e.id)&&(o.get(e.id)??[]).some(e=>e.callId===a.callId)).length===1&&(n.set(e.id,a.callId),r.add(a.callId))}};return a((e,t)=>e.name===t.kind&&_s(e.input,t.payload)),a((e,t)=>e.name===t.kind),n}function _s(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>_s(e,t[n]));if(e===null||t===null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.hasOwn(t,n)&&_s(e[n],t[n]))}function vs(e){return e.name||e.job?.kind||`tool`}function ys(e){let t=[];for(let n of e){if(n.type===`text`||n.type===`reasoning`){t.push(n);continue}let e=vs(n),r=t.at(-1);if(r?.type===`tool-group`&&r.toolKey===e){r.tools.push(n);continue}t.push({type:`tool-group`,toolKey:e,tools:[n]})}return t}function bs(e){return e.type===`reasoning`?e.id:e.tools[0]?.callId??e.toolKey}function xs(e){let t=[];for(let n of e){if(n.type===`text`){t.push(n);continue}let e=t.at(-1);if(e?.type===`work`){e.blocks.push(n);continue}t.push({type:`work`,key:bs(n),blocks:[n]})}return t}function Ss(e,t){for(let n of e)if(n.type===`tool-group`)for(let e of n.tools)e.job&&t(e.job)}function Cs(e){let t;return Ss(e,e=>{let n=e.claimedAt??e.enqueuedAt;t=t===void 0?n:Math.min(t,n)}),t}function ws(e){let t;return Ss(e,e=>{e.completedAt!==void 0&&(t=t===void 0?e.completedAt:Math.max(t,e.completedAt))}),t}function Ts(e){let t=[],n=[],r=0,i;for(let a of e){if(a.type!==`work`){t.push(void 0);continue}t.push(r),n.push(i);let e=ws(a.blocks);e!==void 0&&(i=i===void 0?e:Math.max(i,e)),r+=1}return{workIndexBySectionIndex:t,priorCompletedAtByWorkIndex:n}}function Es(e,t){let n=Cs(e.blocks),r=t.workSectionIndex===0?t.runStartedAt:n??t.priorWorkCompletedAtMs??t.runStartedAt;return t.inProgress?{startedAtMs:r}:{startedAtMs:r,completedAtMs:ws(e.blocks)??t.runCompletedAt??r}}function Ds(e){return e.output===void 0?!e.job||e.job.status===`pending`||e.job.status===`claimed`:!1}function Os(e,t){return t&&Ds(e)}function ks(e,t){return wi(e)&&typeof e[t]==`string`?e[t]:void 0}function As(e){return ks(e.output,`sessionId`)??ks(e.input,`sessionId`)??ks(e.job?.payload,`sessionId`)}function js(e){let t=new Map;for(let n of e){let e=As(n);if(!e)continue;let r=ks(n.output,`command`)??(vs(n)===`exec_command`?ks(n.input,`cmd`)??ks(n.job?.payload,`cmd`):void 0);r&&t.set(e,r)}return t}function Ms(e,t){let n=As(e);return ks(e.output,`command`)??(n?t.get(n):void 0)}function Ns(e,t){if(!t)return new Set;let n=new Map,r=new Set;for(let t of e){let e=As(t);e&&(vs(t)===`exec_command`&&r.add(e),wi(t.output)&&typeof t.output.running==`boolean`&&n.set(e,t.output.running))}return new Set([...r].filter(e=>n.get(e)===!0))}function Ps(e,t,n){let r=[],i=[];for(let a of e){if(a.type===`reasoning`){r.push(a);continue}let e=[];for(let r of a.tools){let a=vs(r),o=As(r),s=o!==void 0&&n.has(o),c=Os(r,t);if(a===`exec_command`&&s){i.push(r);continue}if(a===`write_stdin`){if(c){s||i.push(r);continue}e.push(r);continue}c?i.push(r):e.push(r)}e.length>0&&r.push({type:`tool-group`,toolKey:a.toolKey,tools:e})}return{settledBlocks:r,runningTools:i}}function Fs(e,t){return!t&&Ds(e)?`interrupted`:e.job?.status===`cancelled`||e.job?.status===`failed`?e.job.status:hs(e.output)?.status}function Is(e,t){if(!t&&Ds(e))return`The agent stopped before this tool call finished.`;let n=hs(e.output)?.error;return e.job?e.job.status===`cancelled`?e.job.error??n??`Executor job cancelled before completion.`:e.job.status===`failed`?e.job.error??n??`Executor job failed.`:void 0:n}function Ls(e,t){let n=new Map(e.filter(e=>e.type===`tool-result`).map(e=>[e.callId,e])),r=gs(e.filter(e=>e.type===`tool-call`),t.map(e=>({id:e._id,kind:e.kind,...e.callId?{callId:e.callId}:{},payload:e.payload}))),i=new Map;for(let e of t){let t=r.get(e._id);t&&i.set(t,e)}let a=[],o=new Set;for(let t of e){if(t.type===`tool-result`)continue;if(t.type===`text`||t.type===`reasoning`){t.text.trim().length>0&&a.push(t);continue}let e=n.get(t.callId),r=i.get(t.callId);r&&o.add(r._id),a.push({type:`tool`,callId:t.callId,name:t.name,input:t.input,...e?{output:e.output}:r?.result===void 0?{}:{output:r.result},...r?{job:r}:{}})}for(let e of t)o.has(e._id)||a.push({type:`tool`,callId:e.callId??`executor-job:${e._id}`,name:e.kind,input:e.payload,...e.result===void 0?{}:{output:e.result},job:e});return a}var Rs={apply_patch:Gt,ask_question:Tt,await_question:on,check_docs:dt,create_artifact:Ut,exec_command:Bn,get_workspace_instructions:wn,mandate_charge:Ct,mandate_list:un,mandate_report:Wn,mandate_setup:Nt,mandate_status:un,read_skill:bn,scrape_url:rn,update_artifact:qt,web_search:En,write_stdin:Pn};function zs(e){return Rs[e]??Kn}function Bs(e){return zs(e.job?.kind??e.name)}function Vs(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Hs(e){switch(e){case`apply_patch`:return`Changed Files`;case`ask_question`:return`Asked Questions`;case`await_question`:return`Waiting for Answers`;case`check_docs`:return`Checked Docs`;case`create_artifact`:return`Created Artifacts`;case`exec_command`:return`Ran Commands`;case`get_workspace_instructions`:return`Read Instructions`;case`mandate_charge`:return`Charged Card`;case`mandate_list`:return`Listed Mandates`;case`mandate_report`:return`Settled Charges`;case`mandate_setup`:return`Set Up Mandate`;case`mandate_status`:return`Checked Mandate`;case`read_skill`:return`Read Skill`;case`scrape_url`:return`Read Pages`;case`update_artifact`:return`Updated Artifacts`;case`web_search`:return`Searched Web`;case`write_stdin`:return`Monitored Commands`;default:return Vs(e)}}function Us(e){if(!wi(e))return``;let t=[];return typeof e.workdir==`string`&&e.workdir.trim().length>0&&e.workdir!==`.`&&t.push(`cwd ${e.workdir}`),t.length>0?` (${t.join(`, `)})`:``}function Ws(e,t){let n=wi(t)?t:void 0;switch(e){case`apply_patch`:return Zs(t)??`Patch`;case`ask_question`:return typeof n?.question==`string`?n.question:`Question`;case`await_question`:return`Waiting for answer`;case`check_docs`:return typeof n?.query==`string`?n.query:typeof n?.path==`string`?n.path:`Docs`;case`create_artifact`:return typeof n?.title==`string`?n.title:`Artifact`;case`exec_command`:return typeof n?.cmd==`string`?`${n.cmd}${Us(t)}`:`Command`;case`get_workspace_instructions`:return`Workspace instructions`;case`mandate_charge`:return qs(n);case`mandate_list`:return`Standing mandates`;case`mandate_report`:return n?.outcome===`approved`?`Charge approved`:`Charge declined`;case`mandate_setup`:return Ks(n);case`mandate_status`:return`Mandate status`;case`read_skill`:return typeof n?.name==`string`?`$${n.name}`:`Skill`;case`scrape_url`:return typeof n?.url==`string`?n.url:`Web page`;case`update_artifact`:return`Updated artifact`;case`web_search`:return typeof n?.query==`string`?n.query:`Web search`;case`write_stdin`:return typeof n?.sessionId==`string`?`Session ${n.sessionId}`:`Command session`;default:return Vs(e)}}function Gs(e){return(e.job?.kind??e.name)===`apply_patch`?`whitespace-pre-wrap [overflow-wrap:anywhere]`:`truncate`}function Ks(e){let t=typeof e?.merchantName==`string`?e.merchantName:`Any merchant`,n=typeof e?.amountCap==`string`?e.amountCap:void 0,r=typeof e?.currency==`string`?e.currency:``,i=typeof e?.frequency==`string`?e.frequency:``;return`${t}${n?` · ${n} ${r}`.trimEnd():``}${i&&i!==`one_time`?` ${i}`:``}`}function qs(e){let t=typeof e?.description==`string`?e.description:`Charge`,n=typeof e?.amount==`string`?e.amount:void 0,r=typeof e?.currency==`string`?e.currency:``;return n?`${t} · ${n} ${r}`.trimEnd():t}var Js=[`*** Add File: `,`*** Copy File: `,`*** Delete File: `,`*** Update File: `],Ys=[`*** Copy to: `,`*** Move to: `];function Xs(e){let t=e.lastIndexOf(` "b/`);if(t>=0)return e.slice(t+4).replace(/"$/,``);let n=e.lastIndexOf(` b/`);return n>=0?e.slice(n+3):null}function Zs(e){if(!wi(e)||typeof e.patch!=`string`)return null;let t=[];for(let n of e.patch.split(`
4
4
  `)){if(n.startsWith(`diff --git `)){let e=Xs(n);e!==null&&t.push(e);continue}let e=Js.find(e=>n.startsWith(e));if(e){t.push(n.slice(e.length).trim());continue}let r=Ys.find(e=>n.startsWith(e));r&&t.length>0&&(t[t.length-1]=n.slice(r.length).trim())}let n=[...new Set(t)];return n.length>0?n.join(`
@@ -1 +1 @@
1
- import{B as e,H as t,W as n,_ as r,nt as i,ot as a,st as o,tt as s}from"../chunks/G9InG5jW.js";import{c,t as l}from"../chunks/TM55IMxf.js";import"../chunks/xihTtKlq.js";import{n as u}from"../chunks/4-desXp-.js";import{t as d}from"../chunks/eYQozHfV.js";import"../chunks/HKC4aqdx.js";function f(f,p){o(p,!0);let m=()=>i(u,`$authState`,h),[h,g]=s();t(()=>{m().isReady&&l(c(`/`),{replaceState:!0})}),r(`1yczfzs`,t=>{e(()=>{n.title=`Signing In`})}),d(f,{title:`Completing sign-in`,description:`Sprocket is finishing authentication and will return to your projects automatically.`}),a(),g()}export{f as component};
1
+ import{B as e,H as t,W as n,_ as r,nt as i,ot as a,st as o,tt as s}from"../chunks/G9InG5jW.js";import{c,t as l}from"../chunks/xs22-Wnd.js";import"../chunks/xihTtKlq.js";import{n as u}from"../chunks/4-desXp-.js";import{t as d}from"../chunks/eYQozHfV.js";import"../chunks/BZ468YC5.js";function f(f,p){o(p,!0);let m=()=>i(u,`$authState`,h),[h,g]=s();t(()=>{m().isReady&&l(c(`/`),{replaceState:!0})}),r(`1yczfzs`,t=>{e(()=>{n.title=`Signing In`})}),d(f,{title:`Completing sign-in`,description:`Sprocket is finishing authentication and will return to your projects automatically.`}),a(),g()}export{f as component};
@@ -1 +1 @@
1
- import{B as e,D as t,E as n,F as r,G as i,P as a,Q as o,T as s,V as c,W as l,X as u,_ as d,c as f,k as p,n as m,ot as h,pt as g,q as _,st as v,u as y}from"../chunks/G9InG5jW.js";import{c as b,t as x}from"../chunks/TM55IMxf.js";import"../chunks/xihTtKlq.js";import{t as S}from"../chunks/eYQozHfV.js";import{a as C,c as w,i as T,n as E,r as D,s as O,t as k}from"../chunks/B2QV2lSm.js";import"../chunks/HKC4aqdx.js";var A=p(`<p class="text-destructive text-sm"> </p>`),j=p(`<form class="space-y-4"><label class="block space-y-2"><span class="text-muted-foreground text-sm">Pairing token</span> <input class="border-border bg-surface text-foreground placeholder:text-muted-foreground focus:border-ring w-full rounded-xl border px-4 py-3 text-sm outline-none" placeholder="Paste token" autocomplete="off"/></label> <!> <button class="bg-primary text-primary-foreground w-full rounded-full px-4 py-3 text-sm font-medium transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60" type="submit"> </button></form>`);function M(p,M){v(M,!0);let N=o(``),P=o(null),F=o(!1);m(()=>{I()});async function I(){let e=O();if(!e)return;let t=T();if(t){u(N,t,!0),await L();return}let n=await D(e);n?.pairingCredential&&(u(N,n.pairingCredential,!0),await L())}async function L(){let e=O();if(!e){u(P,`Unable to resolve the Sprocket server URL.`);return}if(!r(N).trim()){u(P,`Enter a pairing token to connect.`);return}u(F,!0),u(P,null);try{let t=C(),n=t?`/${w(t)}`:`/`;await k(e,r(N).trim()),E(),await x(b(n),{replaceState:!0})}catch(e){u(P,e instanceof Error?e.message:`Failed to pair with the Sprocket server.`,!0)}finally{u(F,!1)}}d(`aj1tv1`,t=>{e(()=>{l.title=`Pair with Sprocket`})}),S(p,{title:`Connect to Sprocket`,description:`Enter the pairing token from your running Sprocket server.`,children:(e,o)=>{var l=j(),d=i(l),p=_(i(d),2);y(p),g(d);var m=_(d,2),h=e=>{var a=A(),o=i(a,!0);g(a),c(()=>n(o,r(P))),t(e,a)};s(m,e=>{r(P)&&e(h)});var v=_(m,2),b=i(v,!0);g(v),g(l),c(()=>{v.disabled=r(F),n(b,r(F)?`Connecting…`:`Connect`)}),a(`submit`,l,e=>{e.preventDefault(),L()}),f(p,()=>r(N),e=>u(N,e)),t(e,l)},$$slots:{default:!0}}),h()}export{M as component};
1
+ import{B as e,D as t,E as n,F as r,G as i,P as a,Q as o,T as s,V as c,W as l,X as u,_ as d,c as f,k as p,n as m,ot as h,pt as g,q as _,st as v,u as y}from"../chunks/G9InG5jW.js";import{c as b,t as x}from"../chunks/xs22-Wnd.js";import"../chunks/xihTtKlq.js";import{t as S}from"../chunks/eYQozHfV.js";import{a as C,c as w,i as T,n as E,r as D,s as O,t as k}from"../chunks/B2QV2lSm.js";import"../chunks/BZ468YC5.js";var A=p(`<p class="text-destructive text-sm"> </p>`),j=p(`<form class="space-y-4"><label class="block space-y-2"><span class="text-muted-foreground text-sm">Pairing token</span> <input class="border-border bg-surface text-foreground placeholder:text-muted-foreground focus:border-ring w-full rounded-xl border px-4 py-3 text-sm outline-none" placeholder="Paste token" autocomplete="off"/></label> <!> <button class="bg-primary text-primary-foreground w-full rounded-full px-4 py-3 text-sm font-medium transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60" type="submit"> </button></form>`);function M(p,M){v(M,!0);let N=o(``),P=o(null),F=o(!1);m(()=>{I()});async function I(){let e=O();if(!e)return;let t=T();if(t){u(N,t,!0),await L();return}let n=await D(e);n?.pairingCredential&&(u(N,n.pairingCredential,!0),await L())}async function L(){let e=O();if(!e){u(P,`Unable to resolve the Sprocket server URL.`);return}if(!r(N).trim()){u(P,`Enter a pairing token to connect.`);return}u(F,!0),u(P,null);try{let t=C(),n=t?`/${w(t)}`:`/`;await k(e,r(N).trim()),E(),await x(b(n),{replaceState:!0})}catch(e){u(P,e instanceof Error?e.message:`Failed to pair with the Sprocket server.`,!0)}finally{u(F,!1)}}d(`aj1tv1`,t=>{e(()=>{l.title=`Pair with Sprocket`})}),S(p,{title:`Connect to Sprocket`,description:`Enter the pairing token from your running Sprocket server.`,children:(e,o)=>{var l=j(),d=i(l),p=_(i(d),2);y(p),g(d);var m=_(d,2),h=e=>{var a=A(),o=i(a,!0);g(a),c(()=>n(o,r(P))),t(e,a)};s(m,e=>{r(P)&&e(h)});var v=_(m,2),b=i(v,!0);g(v),g(l),c(()=>{v.disabled=r(F),n(b,r(F)?`Connecting…`:`Connect`)}),a(`submit`,l,e=>{e.preventDefault(),L()}),f(p,()=>r(N),e=>u(N,e)),t(e,l)},$$slots:{default:!0}}),h()}export{M as component};
@@ -1 +1 @@
1
- {"version":"1785722675963"}
1
+ {"version":"1785773633705"}
package/web/callback.html CHANGED
@@ -13,18 +13,18 @@
13
13
  document.documentElement.style.colorScheme = 'light';
14
14
  })();
15
15
  </script>
16
- <link href="./_app/immutable/entry/start.xZbwMrq1.js" rel="modulepreload">
17
- <link href="./_app/immutable/chunks/TM55IMxf.js" rel="modulepreload">
16
+ <link href="./_app/immutable/entry/start.CKqJgKm5.js" rel="modulepreload">
17
+ <link href="./_app/immutable/chunks/xs22-Wnd.js" rel="modulepreload">
18
18
  <link href="./_app/immutable/chunks/G9InG5jW.js" rel="modulepreload">
19
19
  <link href="./_app/immutable/chunks/tDzg1Ybi.js" rel="modulepreload">
20
- <link href="./_app/immutable/entry/app.Dv-_I6Yo.js" rel="modulepreload">
20
+ <link href="./_app/immutable/entry/app.Bp8dpCVh.js" rel="modulepreload">
21
21
  <link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
22
22
  <link href="./_app/immutable/nodes/0.a2pYxQ7W.js" rel="modulepreload">
23
23
  <link href="./_app/immutable/chunks/4-desXp-.js" rel="modulepreload">
24
24
  <link href="./_app/immutable/chunks/DWXDZqdt.js" rel="modulepreload">
25
- <link href="./_app/immutable/nodes/3.CAvzqEhp.js" rel="modulepreload">
25
+ <link href="./_app/immutable/nodes/3.DAi7yBqf.js" rel="modulepreload">
26
26
  <link href="./_app/immutable/chunks/eYQozHfV.js" rel="modulepreload">
27
- <link href="./_app/immutable/chunks/HKC4aqdx.js" rel="modulepreload">
27
+ <link href="./_app/immutable/chunks/BZ468YC5.js" rel="modulepreload">
28
28
 
29
29
  <link href="./_app/immutable/assets/0.7UApui6t.css" rel="stylesheet">
30
30
  </head>
@@ -32,15 +32,15 @@
32
32
  <div style="display: contents">
33
33
  <script>
34
34
  {
35
- __sveltekit_zorgdt = {
35
+ __sveltekit_gnljix = {
36
36
  base: new URL(".", location).pathname.slice(0, -1)
37
37
  };
38
38
 
39
39
  const element = document.currentScript.parentElement;
40
40
 
41
41
  Promise.all([
42
- import("./_app/immutable/entry/start.xZbwMrq1.js"),
43
- import("./_app/immutable/entry/app.Dv-_I6Yo.js")
42
+ import("./_app/immutable/entry/start.CKqJgKm5.js"),
43
+ import("./_app/immutable/entry/app.Bp8dpCVh.js")
44
44
  ]).then(([kit, app]) => {
45
45
  kit.start(app, element);
46
46
  });
package/web/index.html CHANGED
@@ -13,11 +13,11 @@
13
13
  document.documentElement.style.colorScheme = 'light';
14
14
  })();
15
15
  </script>
16
- <link href="/_app/immutable/entry/start.xZbwMrq1.js" rel="modulepreload">
17
- <link href="/_app/immutable/chunks/TM55IMxf.js" rel="modulepreload">
16
+ <link href="/_app/immutable/entry/start.CKqJgKm5.js" rel="modulepreload">
17
+ <link href="/_app/immutable/chunks/xs22-Wnd.js" rel="modulepreload">
18
18
  <link href="/_app/immutable/chunks/G9InG5jW.js" rel="modulepreload">
19
19
  <link href="/_app/immutable/chunks/tDzg1Ybi.js" rel="modulepreload">
20
- <link href="/_app/immutable/entry/app.Dv-_I6Yo.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/app.Bp8dpCVh.js" rel="modulepreload">
21
21
  <link href="/_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/nodes/0.a2pYxQ7W.js" rel="modulepreload">
23
23
  <link href="/_app/immutable/chunks/4-desXp-.js" rel="modulepreload">
@@ -29,15 +29,15 @@
29
29
  <div style="display: contents">
30
30
  <script>
31
31
  {
32
- __sveltekit_zorgdt = {
32
+ __sveltekit_gnljix = {
33
33
  base: ""
34
34
  };
35
35
 
36
36
  const element = document.currentScript.parentElement;
37
37
 
38
38
  Promise.all([
39
- import("/_app/immutable/entry/start.xZbwMrq1.js"),
40
- import("/_app/immutable/entry/app.Dv-_I6Yo.js")
39
+ import("/_app/immutable/entry/start.CKqJgKm5.js"),
40
+ import("/_app/immutable/entry/app.Bp8dpCVh.js")
41
41
  ]).then(([kit, app]) => {
42
42
  kit.start(app, element);
43
43
  });
package/web/pair.html CHANGED
@@ -13,19 +13,19 @@
13
13
  document.documentElement.style.colorScheme = 'light';
14
14
  })();
15
15
  </script>
16
- <link href="./_app/immutable/entry/start.xZbwMrq1.js" rel="modulepreload">
17
- <link href="./_app/immutable/chunks/TM55IMxf.js" rel="modulepreload">
16
+ <link href="./_app/immutable/entry/start.CKqJgKm5.js" rel="modulepreload">
17
+ <link href="./_app/immutable/chunks/xs22-Wnd.js" rel="modulepreload">
18
18
  <link href="./_app/immutable/chunks/G9InG5jW.js" rel="modulepreload">
19
19
  <link href="./_app/immutable/chunks/tDzg1Ybi.js" rel="modulepreload">
20
- <link href="./_app/immutable/entry/app.Dv-_I6Yo.js" rel="modulepreload">
20
+ <link href="./_app/immutable/entry/app.Bp8dpCVh.js" rel="modulepreload">
21
21
  <link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
22
22
  <link href="./_app/immutable/nodes/0.a2pYxQ7W.js" rel="modulepreload">
23
23
  <link href="./_app/immutable/chunks/4-desXp-.js" rel="modulepreload">
24
24
  <link href="./_app/immutable/chunks/DWXDZqdt.js" rel="modulepreload">
25
- <link href="./_app/immutable/nodes/4.B7hFH7Yi.js" rel="modulepreload">
25
+ <link href="./_app/immutable/nodes/4.BumxIo63.js" rel="modulepreload">
26
26
  <link href="./_app/immutable/chunks/eYQozHfV.js" rel="modulepreload">
27
27
  <link href="./_app/immutable/chunks/B2QV2lSm.js" rel="modulepreload">
28
- <link href="./_app/immutable/chunks/HKC4aqdx.js" rel="modulepreload">
28
+ <link href="./_app/immutable/chunks/BZ468YC5.js" rel="modulepreload">
29
29
 
30
30
  <link href="./_app/immutable/assets/0.7UApui6t.css" rel="stylesheet">
31
31
  </head>
@@ -33,15 +33,15 @@
33
33
  <div style="display: contents">
34
34
  <script>
35
35
  {
36
- __sveltekit_zorgdt = {
36
+ __sveltekit_gnljix = {
37
37
  base: new URL(".", location).pathname.slice(0, -1)
38
38
  };
39
39
 
40
40
  const element = document.currentScript.parentElement;
41
41
 
42
42
  Promise.all([
43
- import("./_app/immutable/entry/start.xZbwMrq1.js"),
44
- import("./_app/immutable/entry/app.Dv-_I6Yo.js")
43
+ import("./_app/immutable/entry/start.CKqJgKm5.js"),
44
+ import("./_app/immutable/entry/app.Bp8dpCVh.js")
45
45
  ]).then(([kit, app]) => {
46
46
  kit.start(app, element);
47
47
  });
@@ -1 +0,0 @@
1
- import"./TM55IMxf.js";
@@ -1 +0,0 @@
1
- import{n as e,s as t}from"../chunks/TM55IMxf.js";export{t as load_css,e as start};