skill-creator 2.4.1 → 2.5.0
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/dist/daemon.js +4 -0
- package/dist/daemon.js.map +2 -2
- package/dist/package.json +1 -1
- package/dist/webui/_app/immutable/assets/{0.DSuWfqBb.css → 0.DLmCZ2fP.css} +1 -1
- package/dist/webui/_app/immutable/chunks/{Cbsk109T.js → B8aGNSaH.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BehT3C1z.js → BDMeqoYB.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{DzSJuxmI.js → BTMBuftG.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BGher0CO.js → Ba9GVGQ5.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{DXjm_vE5.js → BchFBl6r.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{KM5hQu2t.js → BhCD2hsN.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{C1gdd-Qo.js → C_mgfJl-.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BwEHBMTF.js → ClW_LCBS.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CjZfvtzv.js → Cy5ABld-.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{QmXxFt1D.js → CzkhJhvt.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CHfZ3gHY.js → DBNjJ5Iw.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{ryZsHFfK.js → DF_TIB7n.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{aUJoMDp6.js → DH8yd93-.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BLdcUAZa.js → DTzqg7c9.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{rTO-doKC.js → DVv6BdWV.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{DP_8P0mo.js → DYbgoqwH.js} +1 -1
- package/dist/webui/_app/immutable/chunks/DjZ7hdjX.js +1 -0
- package/dist/webui/_app/immutable/chunks/{CIyEiZkz.js → DvWG9eQi.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{ChB3s6Q9.js → DzfSSVEB.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{yX3qp0yo.js → GHFnehdP.js} +1 -1
- package/dist/webui/_app/immutable/chunks/eFUKcYMv.js +1 -0
- package/dist/webui/_app/immutable/chunks/{BBqlAyUm.js → pd7EK5wP.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CbVFrj5k.js → xAjQV7BZ.js} +1 -1
- package/dist/webui/_app/immutable/entry/{app.BbDTsu6I.js → app.DlQ53I3_.js} +2 -2
- package/dist/webui/_app/immutable/entry/start.CNmXm9ox.js +1 -0
- package/dist/webui/_app/immutable/nodes/{0.QaOeKSa7.js → 0.BXeEkneG.js} +3 -3
- package/dist/webui/_app/immutable/nodes/{1.D-EmaRZH.js → 1.DzYWdh98.js} +1 -1
- package/dist/webui/_app/immutable/nodes/{2.CGLbUjuZ.js → 2.Dl1DQV0d.js} +1 -1
- package/dist/webui/_app/version.json +1 -1
- package/dist/webui/index.html +18 -18
- package/package.json +5 -5
- package/dist/webui/_app/immutable/chunks/CAmktO2F.js +0 -1
- package/dist/webui/_app/immutable/chunks/CZQgUTNL.js +0 -1
- package/dist/webui/_app/immutable/entry/start.DlPtwiRy.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as e,At as t,B as n,Ct as r,D as i,Dt as a,F as o,G as s,H as c,N as l,O as u,R as d,St as f,U as p,W as m,X as h,a as g,c as _,ct as v,f as y,ft as b,gt as x,jt as S,kt as C,lt as w,m as T,mt as E,nt as D,o as O,ot as k,rt as A,s as j,st as M,x as ee,z as N}from"./CmCJ0SKP.js";import{t as P}from"./CAmktO2F.js";import"./xihTtKlq.js";import"./CZQgUTNL.js";import{t as F}from"./BkEnd9_Z.js";import{a as I,c as te,l as ne,n as re,o as ie,r as ae,t as oe,u as se}from"./aUJoMDp6.js";import{t as ce}from"./BT2vrlul.js";import"./Cbsk109T.js";import{a as L,i as le,n as ue,s as de}from"./DzSJuxmI.js";import{n as R}from"./1aUphu7Y.js";import{C as fe,G as z,I as pe,K as B,L as V,N as H,P as U,T as me,Z as W,q as G,z as K}from"./DC5f4JBB.js";import"./DZ_Kltd5.js";import{t as q}from"./DdHvRi0A.js";import{i as he,n as J,t as ge}from"./DnPeA-9c.js";import{t as Y}from"./M-b0y9AQ.js";import{t as _e}from"./CpRvgjpe.js";import{t as ve}from"./BIfnT_mK.js";import{C as ye,_ as be,a as xe,b as Se,f as Ce}from"./CIyEiZkz.js";import{t as we}from"./Bs27XW8_.js";import{n as Te,t as Ee}from"./Bynub5xW.js";import{t as X}from"./Bl0jjuyR.js";import{t as De}from"./CI1OXbBG.js";var Z=pe({component:`checkbox`,parts:[`root`,`group`,`group-label`,`input`]}),Q=new B(`Checkbox.Group`),$=new B(`Checkbox.Root`),Oe=class e{static create(t,n=null){return $.set(new e(t,n))}opts;group;#e=x(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return h(this.#e)}set trueName(e){b(this.#e,e)}#t=x(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return h(this.#t)}set trueRequired(e){b(this.#t,e)}#n=x(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return h(this.#n)}set trueDisabled(e){b(this.#n,e)}#r=x(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return h(this.#r)}set trueReadonly(e){b(this.#r,e)}attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=K(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),z.pre([()=>a(this.group?.opts.value.current),()=>this.opts.value.current],([e,t])=>{e&&t&&(this.opts.checked.current=e.includes(t))}),z.pre(()=>this.opts.checked.current,e=>{this.group&&(e?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===`Enter`){e.preventDefault(),this.opts.type.current===`submit`&&e.currentTarget.closest(`form`)?.requestSubmit();return}e.key===` `&&(e.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current===`submit`){this.#i();return}e.preventDefault(),this.#i()}}#a=x(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return h(this.#a)}set snippetProps(e){b(this.#a,e)}#o=x(()=>({id:this.opts.id.current,role:`checkbox`,type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":V(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":U(this.trueRequired),"aria-readonly":U(this.trueReadonly),"data-disabled":H(this.trueDisabled),"data-readonly":H(this.trueReadonly),"data-state":Ae(this.opts.checked.current,this.opts.indeterminate.current),[Z.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#o)}set props(e){b(this.#o,e)}},ke=class e{static create(){return new e($.get())}root;#e=x(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return h(this.#e)}set trueChecked(e){b(this.#e,e)}#t=x(()=>!!this.root.trueName);get shouldRender(){return h(this.#t)}set shouldRender(e){b(this.#t,e)}constructor(e){this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(e){me(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#n=x(()=>({type:`checkbox`,checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,form:this.root.opts.form.current,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return h(this.#n)}set props(e){b(this.#n,e)}};function Ae(e,t){return t?`indeterminate`:e?`checked`:`unchecked`}function je(e,t){r(t,!1);let n=ke.create();_();var i=N(),a=M(i),o=e=>{q(e,j(()=>n.props))};l(a,e=>{n.shouldRender&&e(o)}),d(e,i),f()}var Me=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`ref`,`onCheckedChange`,`children`,`disabled`,`required`,`name`,`form`,`value`,`id`,`indeterminate`,`onIndeterminateChange`,`child`,`type`,`readonly`]),Ne=n(`<button><!></button>`),Pe=n(`<!> <!>`,1);function Fe(e,n){let i=c();r(n,!0);let a=g(n,`checked`,15,!1),o=g(n,`ref`,15,null),s=g(n,`disabled`,3,!1),p=g(n,`required`,3,!1),m=g(n,`name`,3,void 0),_=g(n,`form`,3,void 0),v=g(n,`value`,3,`on`),b=g(n,`id`,19,()=>fe(i)),C=g(n,`indeterminate`,15,!1),T=g(n,`type`,3,`button`),E=O(n,Me),D=Q.getOr(null);D&&v()&&(D.opts.value.current.includes(v())?a(!0):a(!1)),z.pre(()=>v(),()=>{D&&v()&&(D.opts.value.current.includes(v())?a(!0):a(!1))});let A=Oe.create({checked:W(()=>a(),e=>{a(e),n.onCheckedChange?.(e)}),disabled:W(()=>s()??!1),required:W(()=>p()),name:W(()=>m()),form:W(()=>_()),value:W(()=>v()),id:W(()=>b()),ref:W(()=>o(),e=>o(e)),indeterminate:W(()=>C(),e=>{C(e),n.onIndeterminateChange?.(e)}),type:W(()=>T()),readonly:W(()=>!!n.readonly)},D),j=x(()=>G({...E},A.props));var ee=Pe(),P=M(ee),F=e=>{var t=N(),r=M(t);{let e=x(()=>({props:h(j),...A.snippetProps}));u(r,()=>n.child,()=>h(e))}d(e,t)},I=e=>{var r=Ne();y(r,()=>({...h(j)}));var i=k(r);u(i,()=>n.children??S,()=>A.snippetProps),t(r),d(e,r)};l(P,e=>{n.child?e(F):e(I,-1)}),je(w(P,2),{}),d(e,ee),f()}var Ie=new Set([`$$slots`,`$$events`,`$$legacy`]);function Le(e,t){let n=O(t,Ie),r=[[`path`,{d:`M5 12h14`}]];F(e,j({name:`minus`},()=>n,{get iconNode(){return r}}))}var Re=new Set([`$$slots`,`$$events`,`$$legacy`]);function ze(e,t){let n=O(t,Re),r=[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`}]];F(e,j({name:`heart-pulse`},()=>n,{get iconNode(){return r}}))}var Be=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ve(e,t){let n=O(t,Be),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`}]];F(e,j({name:`compass`},()=>n,{get iconNode(){return r}}))}var He=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`checked`,`indeterminate`,`class`]),Ue=n(`<div data-slot="checkbox-indicator" class="[&>svg]:size-3.5 grid place-content-center text-current transition-none"><!></div>`);function We(e,n){r(n,!0);let a=g(n,`ref`,15,null),o=g(n,`checked`,15,!1),s=g(n,`indeterminate`,15,!1),c=O(n,He);var u=N(),p=M(u);{let e=(e,n)=>{let r=()=>(n?.()).checked,i=()=>(n?.()).indeterminate;var a=Ue(),o=k(a),s=e=>{Y(e,{})},c=e=>{Le(e,{})};l(o,e=>{r()?e(s):i()&&e(c,1)}),t(a),d(e,a)},r=x(()=>he(`border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-2 aria-invalid:ring-2 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50`,n.class));i(p,()=>Fe,(t,n)=>{n(t,j({"data-slot":`checkbox`,get class(){return h(r)}},()=>c,{get ref(){return a()},set ref(e){a(e)},get checked(){return o()},set checked(e){o(e)},get indeterminate(){return s()},set indeterminate(e){s(e)},children:e,$$slots:{default:!0}}))})}d(e,u),f()}var Ge=n(`<label class="flex cursor-pointer items-center gap-2 text-xs text-muted-foreground"><!> Back up the existing directory first (<code>~/.agents/skills-backup/…</code>)</label>`),Ke=n(`<div class="mb-4 flex items-start gap-2.5 rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm" role="alert"><!> <div class="min-w-0 flex-1 space-y-2.5"><p class="leading-relaxed"><span class="font-medium">Self skill conflict.</span> <code class="rounded bg-muted px-1 py-0.5 text-xs"> </code> </p> <!> <div class="flex flex-wrap items-center gap-2"><!> <!></div></div></div>`);function qe(e,n){r(n,!0);let i=x(()=>ne.status?.state===`conflict`?ne.status.conflict:null),a=E(!0),s=E(!1),c=E(!1),u=x(()=>h(i)?h(i).kind===`user-directory`?`a directory you maintain`:h(i).kind===`foreign-link`?`a link to ${h(i).targetPath??`an external location`}`:`a foreign entry`:``);async function m(){if(!h(i)||h(s))return;b(s,!0);let e=await te(h(a)&&h(i).backupAvailable);b(s,!1),e.ok?R(e.backupPath?`Self skill installed; previous version backed up to ${e.backupPath}`:`Self skill installed.`):R(`Self skill install failed: ${e.reason}`)}async function g(){if(!h(i)||h(c))return;b(c,!0);let e=await ie();b(c,!1),R(e.ok?`Kept your version; we will remind you again only if the entry changes.`:`Keep failed: ${e.reason}`)}var _=N(),y=M(_),S=e=>{var n=Ke(),r=k(n);we(r,{class:`mt-0.5 h-4 w-4 shrink-0 text-amber-500`,"aria-hidden":`true`});var f=w(r,2),_=k(f),y=w(k(_),2),S=v(y,!0),T=w(y);t(_);var E=w(_,2),O=e=>{var n=Ge();We(k(n),{id:`self-skill-backup`,get checked(){return h(a)},set checked(e){b(a,e,!0)}}),C(3),t(n),d(e,n)};l(E,e=>{h(i).backupAvailable&&e(O)});var A=w(E,2),j=k(A);{let e=x(()=>h(s)||h(c));J(j,{size:`sm`,onclick:()=>void m(),get disabled(){return h(e)},children:(e,t)=>{C();var n=p();D(()=>o(n,h(s)?`Installing…`:`Install product version`)),d(e,n)},$$slots:{default:!0}})}var M=w(j,2);{let e=x(()=>h(s)||h(c));J(M,{size:`sm`,variant:`ghost`,onclick:()=>void g(),get disabled(){return h(e)},children:(e,t)=>{C();var n=p();D(()=>o(n,h(c)?`Keeping…`:`Keep my version`)),d(e,n)},$$slots:{default:!0}})}t(A),t(f),t(n),D(()=>{o(S,h(i).entryPath),o(T,` is ${h(u)??``}, not linked to this Skill Creator install.`)}),d(e,n)};l(y,e=>{h(i)&&e(S)}),d(e,_),f()}var Je=n(`<!> Import`,1),Ye=n(`<button class="flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-muted/50"><!> <span class="min-w-0 flex-1 truncate text-xs"> </span> <span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground"> </span> <span class="shrink-0 text-xs text-muted-foreground"> </span></button>`),Xe=n(`<section aria-label="Recent agent sessions" class="space-y-1.5"><h2 class="text-xs font-medium uppercase tracking-wide text-muted-foreground">Continue</h2> <div class="divide-y divide-border rounded-lg border border-border"></div></section>`),Ze=n(`<div class="flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/10 p-4" role="alert"><!> <div class="min-w-0 flex-1"><p class="text-sm font-medium text-destructive">Couldn't load workspaces</p> <p class="mt-1 break-words text-xs text-destructive/90"> </p></div> <!></div>`),Qe=n(`<div class="space-y-3" aria-label="Loading workspaces"><div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div> <div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div></div>`),$e=n(`<!> Import workspace`,1),et=n(`<div class="rounded-lg border border-dashed border-border p-8 text-center"><!> <p class="mt-3 text-sm font-medium">No skill locations yet</p> <p class="mt-1 text-xs text-muted-foreground">Import a directory to manage its skills, or browse the global agent locations.</p> <!></div>`),tt=n(`<p class="flex items-center gap-2 text-xs text-muted-foreground" role="status"><!> Updating…</p>`),nt=n(`<span class="text-xs text-muted-foreground">Not found on disk</span>`),rt=n(`<span class="block truncate font-mono text-xs text-muted-foreground"> </span>`),it=n(`<li><button class="flex min-h-11 w-full items-center justify-between gap-2 rounded-md bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-muted/70 disabled:pointer-events-none disabled:opacity-50"><span class="min-w-0"><span class="block truncate text-xs font-medium"> </span> <!></span> <!></button></li>`),at=n(`<section class="rounded-lg border border-border"><div class="flex items-center gap-2.5 border-b border-border px-4 py-3"><!> <div class="min-w-0 flex-1"><div class="flex items-center gap-2"><h2 class="truncate text-sm font-medium"> </h2> <!></div> <p class="mt-0.5 text-xs text-muted-foreground"> </p></div> <!></div> <ul class="grid grid-cols-1 gap-2 p-3 sm:grid-cols-2"></ul></section>`),ot=n(`<!> Missing`,1),st=n(`<!> <!>`,1),ct=n(`<li><button class="flex min-h-9 items-center gap-1.5 rounded-full border border-border/60 px-2.5 py-1 text-xs transition-colors hover:bg-muted/50 disabled:pointer-events-none disabled:opacity-50"> <span class="tabular-nums text-muted-foreground"> </span></button></li>`),lt=n(`<ul class="flex flex-wrap gap-1.5 border-t border-border/60 px-4 py-2.5"></ul>`),ut=n(`<li><div class="flex items-center gap-2.5 px-4 py-3"><button class="flex min-h-11 min-w-0 flex-1 items-center gap-2.5 text-left"><!> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-sm font-medium"> </span> <!></span> <span class="mt-0.5 block truncate font-mono text-xs text-muted-foreground"> </span></span> <!></button> <!></div> <!></li>`),dt=n(`<section><h2 class="mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">Imported workspaces</h2> <ul class="space-y-2"></ul></section>`),ft=n(`<!> <!> <!>`,1),pt=n(`<div class="flex h-full flex-col overflow-y-auto p-5"><header class="flex shrink-0 items-start justify-between gap-3 border-b border-border pb-4"><div><h1 class="text-lg font-semibold">Workspaces</h1> <p class="mt-0.5 text-xs text-muted-foreground">Your skill library, agent sessions, and quick ways to put both to work.</p></div> <div class="flex shrink-0 items-center gap-1.5"><!> <!></div></header> <!> <div class="mx-auto mt-5 w-full max-w-5xl space-y-6"><section aria-label="Quick actions" class="grid grid-cols-1 gap-2 min-[560px]:grid-cols-2"><button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Create a skill</span> <span class="block text-xs text-muted-foreground">Describe the task; the agent drafts the SKILL.md with best practices.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Health check my library</span> <span class="block text-xs text-muted-foreground">Duplicates, vague descriptions, stale skills — with proposed fixes.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Explore skill sources</span> <span class="block text-xs text-muted-foreground">Discover curated Git sources and analyze candidate skills.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Browse the library</span> <span class="block text-xs text-muted-foreground"> </span></span></button></section> <!> <div id="library-index" class="space-y-6"><!></div></div></div> <!>`,1);function mt(n,i){r(i,!0);function a(e){return`/wiki/${e===`~`?`%7E`:e}`}let c=x(()=>L.workspaces.filter(e=>e.kind===`global`)),u=x(()=>L.workspaces.filter(e=>e.kind===`directory`)),m=x(()=>L.workspaces.length>0),g=x(()=>L.loading&&h(m)),_=E(null),y=E(!1),S=E(!1);A(()=>{ue()}),A(()=>{!xe.loaded&&!xe.loading&&Ce()});let O=x(()=>{let e=0,t=0;for(let n of L.workspaces)for(let r of n.providers)t+=1,e+=r.skillCount??0;return{skills:e,providers:t,imported:L.workspaces.filter(e=>e.kind===`directory`).length}}),j=x(()=>xe.sessions.slice(0,3));function F(e){be(e),Se(!0)}function te(e){let t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t))return``;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function ne(e){b(_,e,!0),b(y,!0)}A(()=>{h(y)||b(_,null)});async function ie(){await ue()}function fe(e,t){return`/workspaces/${e.id===`~`?`%7E`:e.id}/${t.id}`}async function z(){let e=h(_);if(e){b(S,!0);try{await le(e.id)&&(b(y,!1),R(`Removed ${e.label}. Files remain on disk.`))}catch(e){R(e instanceof Error?e.message:String(e))}finally{b(S,!1)}}}var pe=pt(),B=M(pe),V=k(B),H=w(k(V),2),U=k(H);J(U,{variant:`ghost`,size:`icon`,class:`h-9 w-9`,title:`Refresh workspaces`,"aria-label":`Refresh workspaces`,get disabled(){return L.loading},onclick:()=>void ie(),children:(e,t)=>{var n=N(),r=M(n),i=e=>{ge(e,{class:`h-4 w-4 animate-spin`})},a=e=>{ve(e,{class:`h-4 w-4`})};l(r,e=>{L.loading?e(i):e(a,-1)}),d(e,n)},$$slots:{default:!0}});var me=w(U,2);J(me,{size:`sm`,onclick:()=>I(),children:(e,t)=>{var n=Je(),r=M(n);ae(r,{class:`h-4 w-4`}),C(),d(e,n)},$$slots:{default:!0}}),t(H),t(V);var W=w(V,2);qe(W,{});var G=w(W,2),K=k(G),q=k(K),he=k(q);oe(he,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(q);var Y=w(q,2);ze(k(Y),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(Y);var Z=w(Y,2);Ve(k(Z),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(Z);var Q=w(Z,2),$=k(Q);se($,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`});var Oe=w($,2),ke=w(k(Oe),2),Ae=v(ke);t(Oe),t(Q),t(K);var je=w(K,2),Me=n=>{var r=Xe(),i=w(k(r),2);e(i,21,()=>h(j),e=>e.sessionId,(e,n)=>{var r=Ye(),i=k(r);re(i,{class:`h-3.5 w-3.5 shrink-0 text-muted-foreground`});var a=w(i,2),c=v(a,!0),l=w(a,2),u=v(l,!0),f=w(l,2),p=v(f,!0);t(r),D(e=>{o(c,h(n).title||`Untitled session`),o(u,h(n).mode),o(p,e)},[()=>te(h(n).createdAt)]),s(`click`,r,()=>F(h(n).sessionId)),d(e,r)}),t(i),t(r),d(n,r)};l(je,e=>{h(j).length>0&&e(Me)});var Ne=w(je,2),Pe=k(Ne),Fe=e=>{var n=Ze(),r=k(n);we(r,{class:`mt-0.5 h-4 w-4 shrink-0 text-destructive`});var i=w(r,2),a=w(k(i),2),s=v(a,!0);t(i);var c=w(i,2);J(c,{variant:`outline`,size:`sm`,onclick:()=>void ie(),children:(e,t)=>{C();var n=p(`Retry`);d(e,n)},$$slots:{default:!0}}),t(n),D(()=>o(s,L.error)),d(e,n)},Ie=e=>{var t=Qe();d(e,t)},Le=e=>{var n=et(),r=k(n);De(r,{class:`mx-auto h-8 w-8 text-muted-foreground`});var i=w(r,6);J(i,{class:`mt-4`,size:`sm`,onclick:()=>I(),children:(e,t)=>{var n=$e(),r=M(n);ae(r,{class:`h-4 w-4`}),C(),d(e,n)},$$slots:{default:!0}}),t(n),d(e,n)},Re=n=>{var r=ft(),i=M(r),f=e=>{var n=tt(),r=k(n);ge(r,{class:`h-3.5 w-3.5 animate-spin`}),C(),t(n),d(e,n)};l(i,e=>{h(g)&&e(f)});var m=w(i,2);e(m,17,()=>h(c),e=>e.id,(n,r)=>{let i=x(()=>h(r).available?h(r):null);var c=at(),u=k(c),f=k(u);_e(f,{class:`h-4 w-4 shrink-0 text-primary`});var m=w(f,2),g=k(m),_=k(g),y=v(_,!0),b=w(_,2);X(b,{variant:`secondary`,class:`text-xs`,children:(e,t)=>{C();var n=p(`~ global`);d(e,n)},$$slots:{default:!0}}),t(g);var S=w(g,2),E=v(S);t(m);var O=w(m,2);J(O,{variant:`ghost`,size:`icon`,class:`h-9 w-9 shrink-0`,title:`Open the global wiki`,"aria-label":`Open the global wiki`,onclick:()=>void P(a(h(r).id)),children:(e,t)=>{ce(e,{class:`h-4 w-4`})},$$slots:{default:!0}}),t(u);var A=w(u,2);e(A,21,()=>h(r).providers,e=>e.id,(e,n)=>{var a=it(),c=k(a),u=k(c),f=k(u),m=v(f,!0),g=w(f,2),_=e=>{var t=nt();d(e,t)},y=e=>{var t=rt(),r=v(t,!0);D(()=>o(r,h(n).path)),d(e,t)};l(g,e=>{h(n).available?h(n).path&&e(y,1):e(_)}),t(u);var b=w(u,2);X(b,{variant:`secondary`,class:`shrink-0 tabular-nums`,children:(e,t)=>{C();var r=p();D(()=>o(r,h(n).skillCount)),d(e,r)},$$slots:{default:!0}}),t(c),t(a),D(()=>{c.disabled=!h(i)||!h(n).available,T(c,`title`,h(n).path??h(n).label),o(m,h(n).label)}),s(`click`,c,()=>h(i)&&void P(fe(h(r),h(n)))),d(e,a)}),t(A),t(c),D(()=>{o(y,h(r).label),o(E,`${h(r).skillCount??``} skill${h(r).skillCount===1?``:`s`} across ${h(r).providers.length??``}
|
|
1
|
+
import{A as e,At as t,B as n,Ct as r,D as i,Dt as a,F as o,G as s,H as c,N as l,O as u,R as d,St as f,U as p,W as m,X as h,a as g,c as _,ct as v,f as y,ft as b,gt as x,jt as S,kt as C,lt as w,m as T,mt as E,nt as D,o as O,ot as k,rt as A,s as j,st as M,x as ee,z as N}from"./CmCJ0SKP.js";import{t as P}from"./DjZ7hdjX.js";import"./xihTtKlq.js";import"./eFUKcYMv.js";import{t as F}from"./BkEnd9_Z.js";import{a as I,c as te,l as ne,n as re,o as ie,r as ae,t as oe,u as se}from"./DH8yd93-.js";import{t as ce}from"./BT2vrlul.js";import"./B8aGNSaH.js";import{a as L,i as le,n as ue,s as de}from"./BTMBuftG.js";import{n as R}from"./1aUphu7Y.js";import{C as fe,G as z,I as pe,K as B,L as V,N as H,P as U,T as me,Z as W,q as G,z as K}from"./DC5f4JBB.js";import"./DZ_Kltd5.js";import{t as q}from"./DdHvRi0A.js";import{i as he,n as J,t as ge}from"./DnPeA-9c.js";import{t as Y}from"./M-b0y9AQ.js";import{t as _e}from"./CpRvgjpe.js";import{t as ve}from"./BIfnT_mK.js";import{C as ye,_ as be,a as xe,b as Se,f as Ce}from"./DvWG9eQi.js";import{t as we}from"./Bs27XW8_.js";import{n as Te,t as Ee}from"./Bynub5xW.js";import{t as X}from"./Bl0jjuyR.js";import{t as De}from"./CI1OXbBG.js";var Z=pe({component:`checkbox`,parts:[`root`,`group`,`group-label`,`input`]}),Q=new B(`Checkbox.Group`),$=new B(`Checkbox.Root`),Oe=class e{static create(t,n=null){return $.set(new e(t,n))}opts;group;#e=x(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return h(this.#e)}set trueName(e){b(this.#e,e)}#t=x(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return h(this.#t)}set trueRequired(e){b(this.#t,e)}#n=x(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return h(this.#n)}set trueDisabled(e){b(this.#n,e)}#r=x(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return h(this.#r)}set trueReadonly(e){b(this.#r,e)}attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=K(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),z.pre([()=>a(this.group?.opts.value.current),()=>this.opts.value.current],([e,t])=>{e&&t&&(this.opts.checked.current=e.includes(t))}),z.pre(()=>this.opts.checked.current,e=>{this.group&&(e?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===`Enter`){e.preventDefault(),this.opts.type.current===`submit`&&e.currentTarget.closest(`form`)?.requestSubmit();return}e.key===` `&&(e.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current===`submit`){this.#i();return}e.preventDefault(),this.#i()}}#a=x(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return h(this.#a)}set snippetProps(e){b(this.#a,e)}#o=x(()=>({id:this.opts.id.current,role:`checkbox`,type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":V(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":U(this.trueRequired),"aria-readonly":U(this.trueReadonly),"data-disabled":H(this.trueDisabled),"data-readonly":H(this.trueReadonly),"data-state":Ae(this.opts.checked.current,this.opts.indeterminate.current),[Z.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#o)}set props(e){b(this.#o,e)}},ke=class e{static create(){return new e($.get())}root;#e=x(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return h(this.#e)}set trueChecked(e){b(this.#e,e)}#t=x(()=>!!this.root.trueName);get shouldRender(){return h(this.#t)}set shouldRender(e){b(this.#t,e)}constructor(e){this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(e){me(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#n=x(()=>({type:`checkbox`,checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,form:this.root.opts.form.current,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return h(this.#n)}set props(e){b(this.#n,e)}};function Ae(e,t){return t?`indeterminate`:e?`checked`:`unchecked`}function je(e,t){r(t,!1);let n=ke.create();_();var i=N(),a=M(i),o=e=>{q(e,j(()=>n.props))};l(a,e=>{n.shouldRender&&e(o)}),d(e,i),f()}var Me=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`ref`,`onCheckedChange`,`children`,`disabled`,`required`,`name`,`form`,`value`,`id`,`indeterminate`,`onIndeterminateChange`,`child`,`type`,`readonly`]),Ne=n(`<button><!></button>`),Pe=n(`<!> <!>`,1);function Fe(e,n){let i=c();r(n,!0);let a=g(n,`checked`,15,!1),o=g(n,`ref`,15,null),s=g(n,`disabled`,3,!1),p=g(n,`required`,3,!1),m=g(n,`name`,3,void 0),_=g(n,`form`,3,void 0),v=g(n,`value`,3,`on`),b=g(n,`id`,19,()=>fe(i)),C=g(n,`indeterminate`,15,!1),T=g(n,`type`,3,`button`),E=O(n,Me),D=Q.getOr(null);D&&v()&&(D.opts.value.current.includes(v())?a(!0):a(!1)),z.pre(()=>v(),()=>{D&&v()&&(D.opts.value.current.includes(v())?a(!0):a(!1))});let A=Oe.create({checked:W(()=>a(),e=>{a(e),n.onCheckedChange?.(e)}),disabled:W(()=>s()??!1),required:W(()=>p()),name:W(()=>m()),form:W(()=>_()),value:W(()=>v()),id:W(()=>b()),ref:W(()=>o(),e=>o(e)),indeterminate:W(()=>C(),e=>{C(e),n.onIndeterminateChange?.(e)}),type:W(()=>T()),readonly:W(()=>!!n.readonly)},D),j=x(()=>G({...E},A.props));var ee=Pe(),P=M(ee),F=e=>{var t=N(),r=M(t);{let e=x(()=>({props:h(j),...A.snippetProps}));u(r,()=>n.child,()=>h(e))}d(e,t)},I=e=>{var r=Ne();y(r,()=>({...h(j)}));var i=k(r);u(i,()=>n.children??S,()=>A.snippetProps),t(r),d(e,r)};l(P,e=>{n.child?e(F):e(I,-1)}),je(w(P,2),{}),d(e,ee),f()}var Ie=new Set([`$$slots`,`$$events`,`$$legacy`]);function Le(e,t){let n=O(t,Ie),r=[[`path`,{d:`M5 12h14`}]];F(e,j({name:`minus`},()=>n,{get iconNode(){return r}}))}var Re=new Set([`$$slots`,`$$events`,`$$legacy`]);function ze(e,t){let n=O(t,Re),r=[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`}]];F(e,j({name:`heart-pulse`},()=>n,{get iconNode(){return r}}))}var Be=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ve(e,t){let n=O(t,Be),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`}]];F(e,j({name:`compass`},()=>n,{get iconNode(){return r}}))}var He=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`checked`,`indeterminate`,`class`]),Ue=n(`<div data-slot="checkbox-indicator" class="[&>svg]:size-3.5 grid place-content-center text-current transition-none"><!></div>`);function We(e,n){r(n,!0);let a=g(n,`ref`,15,null),o=g(n,`checked`,15,!1),s=g(n,`indeterminate`,15,!1),c=O(n,He);var u=N(),p=M(u);{let e=(e,n)=>{let r=()=>(n?.()).checked,i=()=>(n?.()).indeterminate;var a=Ue(),o=k(a),s=e=>{Y(e,{})},c=e=>{Le(e,{})};l(o,e=>{r()?e(s):i()&&e(c,1)}),t(a),d(e,a)},r=x(()=>he(`border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-2 aria-invalid:ring-2 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50`,n.class));i(p,()=>Fe,(t,n)=>{n(t,j({"data-slot":`checkbox`,get class(){return h(r)}},()=>c,{get ref(){return a()},set ref(e){a(e)},get checked(){return o()},set checked(e){o(e)},get indeterminate(){return s()},set indeterminate(e){s(e)},children:e,$$slots:{default:!0}}))})}d(e,u),f()}var Ge=n(`<label class="flex cursor-pointer items-center gap-2 text-xs text-muted-foreground"><!> Back up the existing directory first (<code>~/.agents/skills-backup/…</code>)</label>`),Ke=n(`<div class="mb-4 flex items-start gap-2.5 rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm" role="alert"><!> <div class="min-w-0 flex-1 space-y-2.5"><p class="leading-relaxed"><span class="font-medium">Self skill conflict.</span> <code class="rounded bg-muted px-1 py-0.5 text-xs"> </code> </p> <!> <div class="flex flex-wrap items-center gap-2"><!> <!></div></div></div>`);function qe(e,n){r(n,!0);let i=x(()=>ne.status?.state===`conflict`?ne.status.conflict:null),a=E(!0),s=E(!1),c=E(!1),u=x(()=>h(i)?h(i).kind===`user-directory`?`a directory you maintain`:h(i).kind===`foreign-link`?`a link to ${h(i).targetPath??`an external location`}`:`a foreign entry`:``);async function m(){if(!h(i)||h(s))return;b(s,!0);let e=await te(h(a)&&h(i).backupAvailable);b(s,!1),e.ok?R(e.backupPath?`Self skill installed; previous version backed up to ${e.backupPath}`:`Self skill installed.`):R(`Self skill install failed: ${e.reason}`)}async function g(){if(!h(i)||h(c))return;b(c,!0);let e=await ie();b(c,!1),R(e.ok?`Kept your version; we will remind you again only if the entry changes.`:`Keep failed: ${e.reason}`)}var _=N(),y=M(_),S=e=>{var n=Ke(),r=k(n);we(r,{class:`mt-0.5 h-4 w-4 shrink-0 text-amber-500`,"aria-hidden":`true`});var f=w(r,2),_=k(f),y=w(k(_),2),S=v(y,!0),T=w(y);t(_);var E=w(_,2),O=e=>{var n=Ge();We(k(n),{id:`self-skill-backup`,get checked(){return h(a)},set checked(e){b(a,e,!0)}}),C(3),t(n),d(e,n)};l(E,e=>{h(i).backupAvailable&&e(O)});var A=w(E,2),j=k(A);{let e=x(()=>h(s)||h(c));J(j,{size:`sm`,onclick:()=>void m(),get disabled(){return h(e)},children:(e,t)=>{C();var n=p();D(()=>o(n,h(s)?`Installing…`:`Install product version`)),d(e,n)},$$slots:{default:!0}})}var M=w(j,2);{let e=x(()=>h(s)||h(c));J(M,{size:`sm`,variant:`ghost`,onclick:()=>void g(),get disabled(){return h(e)},children:(e,t)=>{C();var n=p();D(()=>o(n,h(c)?`Keeping…`:`Keep my version`)),d(e,n)},$$slots:{default:!0}})}t(A),t(f),t(n),D(()=>{o(S,h(i).entryPath),o(T,` is ${h(u)??``}, not linked to this Skill Creator install.`)}),d(e,n)};l(y,e=>{h(i)&&e(S)}),d(e,_),f()}var Je=n(`<!> Import`,1),Ye=n(`<button class="flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-muted/50"><!> <span class="min-w-0 flex-1 truncate text-xs"> </span> <span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground"> </span> <span class="shrink-0 text-xs text-muted-foreground"> </span></button>`),Xe=n(`<section aria-label="Recent agent sessions" class="space-y-1.5"><h2 class="text-xs font-medium uppercase tracking-wide text-muted-foreground">Continue</h2> <div class="divide-y divide-border rounded-lg border border-border"></div></section>`),Ze=n(`<div class="flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/10 p-4" role="alert"><!> <div class="min-w-0 flex-1"><p class="text-sm font-medium text-destructive">Couldn't load workspaces</p> <p class="mt-1 break-words text-xs text-destructive/90"> </p></div> <!></div>`),Qe=n(`<div class="space-y-3" aria-label="Loading workspaces"><div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div> <div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div></div>`),$e=n(`<!> Import workspace`,1),et=n(`<div class="rounded-lg border border-dashed border-border p-8 text-center"><!> <p class="mt-3 text-sm font-medium">No skill locations yet</p> <p class="mt-1 text-xs text-muted-foreground">Import a directory to manage its skills, or browse the global agent locations.</p> <!></div>`),tt=n(`<p class="flex items-center gap-2 text-xs text-muted-foreground" role="status"><!> Updating…</p>`),nt=n(`<span class="text-xs text-muted-foreground">Not found on disk</span>`),rt=n(`<span class="block truncate font-mono text-xs text-muted-foreground"> </span>`),it=n(`<li><button class="flex min-h-11 w-full items-center justify-between gap-2 rounded-md bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-muted/70 disabled:pointer-events-none disabled:opacity-50"><span class="min-w-0"><span class="block truncate text-xs font-medium"> </span> <!></span> <!></button></li>`),at=n(`<section class="rounded-lg border border-border"><div class="flex items-center gap-2.5 border-b border-border px-4 py-3"><!> <div class="min-w-0 flex-1"><div class="flex items-center gap-2"><h2 class="truncate text-sm font-medium"> </h2> <!></div> <p class="mt-0.5 text-xs text-muted-foreground"> </p></div> <!></div> <ul class="grid grid-cols-1 gap-2 p-3 sm:grid-cols-2"></ul></section>`),ot=n(`<!> Missing`,1),st=n(`<!> <!>`,1),ct=n(`<li><button class="flex min-h-9 items-center gap-1.5 rounded-full border border-border/60 px-2.5 py-1 text-xs transition-colors hover:bg-muted/50 disabled:pointer-events-none disabled:opacity-50"> <span class="tabular-nums text-muted-foreground"> </span></button></li>`),lt=n(`<ul class="flex flex-wrap gap-1.5 border-t border-border/60 px-4 py-2.5"></ul>`),ut=n(`<li><div class="flex items-center gap-2.5 px-4 py-3"><button class="flex min-h-11 min-w-0 flex-1 items-center gap-2.5 text-left"><!> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-sm font-medium"> </span> <!></span> <span class="mt-0.5 block truncate font-mono text-xs text-muted-foreground"> </span></span> <!></button> <!></div> <!></li>`),dt=n(`<section><h2 class="mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">Imported workspaces</h2> <ul class="space-y-2"></ul></section>`),ft=n(`<!> <!> <!>`,1),pt=n(`<div class="flex h-full flex-col overflow-y-auto p-5"><header class="flex shrink-0 items-start justify-between gap-3 border-b border-border pb-4"><div><h1 class="text-lg font-semibold">Workspaces</h1> <p class="mt-0.5 text-xs text-muted-foreground">Your skill library, agent sessions, and quick ways to put both to work.</p></div> <div class="flex shrink-0 items-center gap-1.5"><!> <!></div></header> <!> <div class="mx-auto mt-5 w-full max-w-5xl space-y-6"><section aria-label="Quick actions" class="grid grid-cols-1 gap-2 min-[560px]:grid-cols-2"><button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Create a skill</span> <span class="block text-xs text-muted-foreground">Describe the task; the agent drafts the SKILL.md with best practices.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Health check my library</span> <span class="block text-xs text-muted-foreground">Duplicates, vague descriptions, stale skills — with proposed fixes.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Explore skill sources</span> <span class="block text-xs text-muted-foreground">Discover curated Git sources and analyze candidate skills.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Browse the library</span> <span class="block text-xs text-muted-foreground"> </span></span></button></section> <!> <div id="library-index" class="space-y-6"><!></div></div></div> <!>`,1);function mt(n,i){r(i,!0);function a(e){return`/wiki/${e===`~`?`%7E`:e}`}let c=x(()=>L.workspaces.filter(e=>e.kind===`global`)),u=x(()=>L.workspaces.filter(e=>e.kind===`directory`)),m=x(()=>L.workspaces.length>0),g=x(()=>L.loading&&h(m)),_=E(null),y=E(!1),S=E(!1);A(()=>{ue()}),A(()=>{!xe.loaded&&!xe.loading&&Ce()});let O=x(()=>{let e=0,t=0;for(let n of L.workspaces)for(let r of n.providers)t+=1,e+=r.skillCount??0;return{skills:e,providers:t,imported:L.workspaces.filter(e=>e.kind===`directory`).length}}),j=x(()=>xe.sessions.slice(0,3));function F(e){be(e),Se(!0)}function te(e){let t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t))return``;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function ne(e){b(_,e,!0),b(y,!0)}A(()=>{h(y)||b(_,null)});async function ie(){await ue()}function fe(e,t){return`/workspaces/${e.id===`~`?`%7E`:e.id}/${t.id}`}async function z(){let e=h(_);if(e){b(S,!0);try{await le(e.id)&&(b(y,!1),R(`Removed ${e.label}. Files remain on disk.`))}catch(e){R(e instanceof Error?e.message:String(e))}finally{b(S,!1)}}}var pe=pt(),B=M(pe),V=k(B),H=w(k(V),2),U=k(H);J(U,{variant:`ghost`,size:`icon`,class:`h-9 w-9`,title:`Refresh workspaces`,"aria-label":`Refresh workspaces`,get disabled(){return L.loading},onclick:()=>void ie(),children:(e,t)=>{var n=N(),r=M(n),i=e=>{ge(e,{class:`h-4 w-4 animate-spin`})},a=e=>{ve(e,{class:`h-4 w-4`})};l(r,e=>{L.loading?e(i):e(a,-1)}),d(e,n)},$$slots:{default:!0}});var me=w(U,2);J(me,{size:`sm`,onclick:()=>I(),children:(e,t)=>{var n=Je(),r=M(n);ae(r,{class:`h-4 w-4`}),C(),d(e,n)},$$slots:{default:!0}}),t(H),t(V);var W=w(V,2);qe(W,{});var G=w(W,2),K=k(G),q=k(K),he=k(q);oe(he,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(q);var Y=w(q,2);ze(k(Y),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(Y);var Z=w(Y,2);Ve(k(Z),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),C(2),t(Z);var Q=w(Z,2),$=k(Q);se($,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`});var Oe=w($,2),ke=w(k(Oe),2),Ae=v(ke);t(Oe),t(Q),t(K);var je=w(K,2),Me=n=>{var r=Xe(),i=w(k(r),2);e(i,21,()=>h(j),e=>e.sessionId,(e,n)=>{var r=Ye(),i=k(r);re(i,{class:`h-3.5 w-3.5 shrink-0 text-muted-foreground`});var a=w(i,2),c=v(a,!0),l=w(a,2),u=v(l,!0),f=w(l,2),p=v(f,!0);t(r),D(e=>{o(c,h(n).title||`Untitled session`),o(u,h(n).mode),o(p,e)},[()=>te(h(n).createdAt)]),s(`click`,r,()=>F(h(n).sessionId)),d(e,r)}),t(i),t(r),d(n,r)};l(je,e=>{h(j).length>0&&e(Me)});var Ne=w(je,2),Pe=k(Ne),Fe=e=>{var n=Ze(),r=k(n);we(r,{class:`mt-0.5 h-4 w-4 shrink-0 text-destructive`});var i=w(r,2),a=w(k(i),2),s=v(a,!0);t(i);var c=w(i,2);J(c,{variant:`outline`,size:`sm`,onclick:()=>void ie(),children:(e,t)=>{C();var n=p(`Retry`);d(e,n)},$$slots:{default:!0}}),t(n),D(()=>o(s,L.error)),d(e,n)},Ie=e=>{var t=Qe();d(e,t)},Le=e=>{var n=et(),r=k(n);De(r,{class:`mx-auto h-8 w-8 text-muted-foreground`});var i=w(r,6);J(i,{class:`mt-4`,size:`sm`,onclick:()=>I(),children:(e,t)=>{var n=$e(),r=M(n);ae(r,{class:`h-4 w-4`}),C(),d(e,n)},$$slots:{default:!0}}),t(n),d(e,n)},Re=n=>{var r=ft(),i=M(r),f=e=>{var n=tt(),r=k(n);ge(r,{class:`h-3.5 w-3.5 animate-spin`}),C(),t(n),d(e,n)};l(i,e=>{h(g)&&e(f)});var m=w(i,2);e(m,17,()=>h(c),e=>e.id,(n,r)=>{let i=x(()=>h(r).available?h(r):null);var c=at(),u=k(c),f=k(u);_e(f,{class:`h-4 w-4 shrink-0 text-primary`});var m=w(f,2),g=k(m),_=k(g),y=v(_,!0),b=w(_,2);X(b,{variant:`secondary`,class:`text-xs`,children:(e,t)=>{C();var n=p(`~ global`);d(e,n)},$$slots:{default:!0}}),t(g);var S=w(g,2),E=v(S);t(m);var O=w(m,2);J(O,{variant:`ghost`,size:`icon`,class:`h-9 w-9 shrink-0`,title:`Open the global wiki`,"aria-label":`Open the global wiki`,onclick:()=>void P(a(h(r).id)),children:(e,t)=>{ce(e,{class:`h-4 w-4`})},$$slots:{default:!0}}),t(u);var A=w(u,2);e(A,21,()=>h(r).providers,e=>e.id,(e,n)=>{var a=it(),c=k(a),u=k(c),f=k(u),m=v(f,!0),g=w(f,2),_=e=>{var t=nt();d(e,t)},y=e=>{var t=rt(),r=v(t,!0);D(()=>o(r,h(n).path)),d(e,t)};l(g,e=>{h(n).available?h(n).path&&e(y,1):e(_)}),t(u);var b=w(u,2);X(b,{variant:`secondary`,class:`shrink-0 tabular-nums`,children:(e,t)=>{C();var r=p();D(()=>o(r,h(n).skillCount)),d(e,r)},$$slots:{default:!0}}),t(c),t(a),D(()=>{c.disabled=!h(i)||!h(n).available,T(c,`title`,h(n).path??h(n).label),o(m,h(n).label)}),s(`click`,c,()=>h(i)&&void P(fe(h(r),h(n)))),d(e,a)}),t(A),t(c),D(()=>{o(y,h(r).label),o(E,`${h(r).skillCount??``} skill${h(r).skillCount===1?``:`s`} across ${h(r).providers.length??``}
|
|
2
2
|
agent location${h(r).providers.length===1?``:`s`}`)}),d(n,c)});var _=w(m,2),y=n=>{var r=dt(),i=w(k(r),2);e(i,21,()=>h(u),e=>e.id,(n,r)=>{let i=x(()=>h(r).kind===`directory`?h(r):null);var c=ut(),u=k(c),f=k(u),m=k(f);{let e=x(()=>h(r).available?`text-primary`:`text-destructive`);De(m,{get class(){return`h-4 w-4 shrink-0 ${h(e)??``}`}})}var g=w(m,2),_=k(g),y=k(_),b=v(y,!0),S=w(y,2),E=e=>{X(e,{variant:`destructive`,class:`text-xs`,children:(e,t)=>{var n=ot(),r=M(n);we(r,{class:`h-3 w-3`}),C(),d(e,n)},$$slots:{default:!0}})};l(S,e=>{h(r).available||e(E)}),t(_);var O=w(_,2),A=v(O,!0);t(g);var j=w(g,2);X(j,{variant:`secondary`,class:`shrink-0 tabular-nums`,children:(e,t)=>{C();var n=p();D(()=>o(n,h(r).skillCount)),d(e,n)},$$slots:{default:!0}}),t(f);var N=w(f,2),F=e=>{var t=st(),n=M(t);{let e=x(()=>`Open the wiki for ${h(r).label}`),t=x(()=>`Open the wiki for ${h(r).label}`),i=x(()=>!h(r).available);J(n,{variant:`ghost`,size:`icon`,class:`h-11 w-11 shrink-0 text-muted-foreground hover:text-foreground`,get title(){return h(e)},get"aria-label"(){return h(t)},get disabled(){return h(i)},onclick:()=>h(r).available&&void P(a(h(r).id)),children:(e,t)=>{ce(e,{class:`h-4 w-4`})},$$slots:{default:!0}})}var o=w(n,2);{let e=x(()=>`Remove ${h(r).label} registration`),t=x(()=>`Remove ${h(r).label}`);J(o,{variant:`ghost`,size:`icon`,class:`h-11 w-11 shrink-0 text-muted-foreground hover:text-destructive`,get title(){return h(e)},get"aria-label"(){return h(t)},onclick:()=>ne(h(i)),children:(e,t)=>{Ee(e,{class:`h-4 w-4`})},$$slots:{default:!0}})}d(e,t)};l(N,e=>{h(i)&&e(F)}),t(u);var I=w(u,2),te=n=>{var i=lt();e(i,21,()=>h(r).providers,e=>e.id,(e,n)=>{var i=ct(),a=k(i),c=k(a),l=w(c),u=v(l,!0);t(a),t(i),D(()=>{a.disabled=!h(r).available||!h(n).available,o(c,`${h(n).label??``} `),o(u,h(n).skillCount)}),s(`click`,a,()=>h(r).available&&void P(fe(h(r),h(n)))),d(e,i)}),t(i),D(()=>T(i,`aria-label`,`Providers in ${h(r).label??``}`)),d(n,i)};l(I,e=>{h(r).providers.length>0&&e(te)}),t(c),D(()=>{ee(c,1,`rounded-lg border border-border transition-colors ${h(r).available?`hover:border-foreground/20`:`border-destructive/40`}`),f.disabled=!h(r).available,o(b,h(r).label),o(A,h(r).path)}),s(`click`,f,()=>h(r).available&&void P(de(h(r)))),d(n,c)}),t(i),t(r),d(n,r)};l(_,e=>{h(u).length>0&&e(y)}),d(n,r)};l(Pe,e=>{L.error?e(Fe):L.loading&&!h(m)?e(Ie,1):h(m)?e(Re,-1):e(Le,2)}),t(Ne),t(G),t(B);var Be=w(B,2);{let e=x(()=>h(_)?`Remove ${h(_).label} from Skill Creator? Its files stay on disk; only the registration is deleted.`:``);Te(Be,{title:`Remove workspace registration`,get description(){return h(e)},confirmLabel:`Remove`,get busy(){return h(S)},onConfirm:()=>void z(),get open(){return h(y)},set open(e){b(y,e,!0)}})}D(()=>o(Ae,`${h(O).skills??``} skills across ${h(O).providers??``} agent locations.`)),s(`click`,q,()=>ye(`create`,`I want to create a new skill. It should help me `)),s(`click`,Y,()=>ye(`manage`,`Audit my skill library: find duplicates, vague descriptions, and stale skills, then propose concrete fixes.`)),s(`click`,Z,()=>void P(`/repository`)),s(`click`,Q,()=>document.getElementById(`library-index`)?.scrollIntoView({behavior:`smooth`})),d(n,pe),f()}m([`click`]);export{mt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,At as n,B as r,Ct as i,F as a,G as o,N as s,R as c,S as l,St as u,U as d,V as f,W as p,X as m,ct as h,ft as g,gt as _,j as v,kt as y,lt as b,m as x,mt as S,nt as C,o as w,ot as T,rt as E,s as D,st as O,ut as k,x as ee,z as A}from"./CmCJ0SKP.js";import"./xihTtKlq.js";import{t as j}from"./BkEnd9_Z.js";import{a as M,o as te,s as ne}from"./
|
|
1
|
+
import{$ as e,A as t,At as n,B as r,Ct as i,F as a,G as o,N as s,R as c,S as l,St as u,U as d,V as f,W as p,X as m,ct as h,ft as g,gt as _,j as v,kt as y,lt as b,m as x,mt as S,nt as C,o as w,ot as T,rt as E,s as D,st as O,ut as k,x as ee,z as A}from"./CmCJ0SKP.js";import"./xihTtKlq.js";import{t as j}from"./BkEnd9_Z.js";import{a as M,o as te,s as ne}from"./DF_TIB7n.js";import{a as N,b as re,s as P,t as F,v as ie,x as ae}from"./pd7EK5wP.js";import{i as I,t as oe,u as L}from"./B8aGNSaH.js";import{n as R}from"./1aUphu7Y.js";import{n as z,t as B}from"./DnPeA-9c.js";import{t as V}from"./UeEccMjN.js";import{t as se}from"./BIfnT_mK.js";import{g as ce}from"./DvWG9eQi.js";import{t as le}from"./Bs27XW8_.js";import{t as ue}from"./CeR4do8T.js";import{t as H}from"./Bl0jjuyR.js";import{t as de}from"./D8Der6oM.js";var U=F(N),W=F(N),G=F(N),K=F(N);async function fe(e){let t=U.issue();try{let n=await P().skillIntelligence.analyze({selections:e});return t.isCurrent()?{report:n.report,failures:n.failures,error:null}:{report:null,failures:[],error:null}}catch(e){return t.isCurrent()?{report:null,failures:[],error:e instanceof Error?e.message:String(e)}:{report:null,failures:[],error:null}}}async function pe(){let e=W.issue();try{let t=await P().skillIntelligence.list({});return e.isCurrent()?{proposals:t.proposals,error:null}:{proposals:null,error:null}}catch(t){return e.isCurrent()?{proposals:null,error:t instanceof Error?t.message:String(t)}:{proposals:null,error:null}}}async function me(e){let t=G.issue();try{return await P().skillIntelligence.reject({proposalId:e}),t.isCurrent()?{rejected:!0,error:null}:{rejected:!1,error:null}}catch(e){return t.isCurrent()?{rejected:!1,error:e instanceof Error?e.message:String(e)}:{rejected:!1,error:null}}}async function he(e){let t=K.issue();try{let n=await P().skillIntelligence.approve({proposalId:e});return t.isCurrent()?{result:n,error:null}:{result:null,error:null}}catch(e){return t.isCurrent()?{result:null,error:e instanceof Error?e.message:String(e)}:{result:null,error:null}}}var ge={edit:{id:`finding-propose-edit-v1`,version:1,render:({skillName:e,findingId:t,observedRevision:n})=>`请针对引用的技能($${e} 芯片)执行 intelligence_propose_edit 工具调用:finding ${t}(观察于 revision ${n})。依据 finding 证据起草编辑提案(frontmatter 与正文的具体修改逐条列出);先调用工具,再向我复述提案要点。`},disable:{id:`finding-propose-disable-v1`,version:1,render:({skillName:e,findingId:t,observedRevision:n})=>`请针对引用的技能($${e} 芯片)执行 intelligence_propose_disable 工具调用:finding ${t}(观察于 revision ${n})。起草禁用提案并说明恢复路径;先调用工具,再向我复述提案要点。`},split:{id:`finding-propose-split-v1`,version:1,render:({skillName:e,findingId:t,observedRevision:n})=>`请针对引用的技能($${e} 芯片)执行 intelligence_propose_split 工具调用:finding ${t}(观察于 revision ${n})。按 finding 指出的职责混同起草拆分提案(目标边界逐条列出);先调用工具,再向我复述提案要点。`},merge:{id:`finding-propose-merge-v1`,version:1,render:({skillName:e,findingId:t,observedRevision:n})=>`请针对引用的技能($${e} 芯片)执行 intelligence_propose_merge 工具调用:finding ${t}(观察于 revision ${n})。按 finding 指出的重复职责起草合并提案(保留主体与吸收项逐条列出);先调用工具,再向我复述提案要点。`}},q=new Set([`$$slots`,`$$events`,`$$legacy`]);function _e(e,t){let n=w(t,q),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`}]];j(e,D({name:`git-merge`},()=>n,{get iconNode(){return r}}))}var J=new Set([`$$slots`,`$$events`,`$$legacy`]);function ve(e,t){let n=w(t,J),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];j(e,D({name:`info`},()=>n,{get iconNode(){return r}}))}var Y=new Set([`$$slots`,`$$events`,`$$legacy`]);function ye(e,t){let n=w(t,Y),r=[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`}],[`path`,{d:`M12 2v4`}],[`path`,{d:`m2 2 20 20`}]];j(e,D({name:`power-off`},()=>n,{get iconNode(){return r}}))}var X=new Set([`$$slots`,`$$events`,`$$legacy`]);function be(e,t){let n=w(t,X),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];j(e,D({name:`scissors`},()=>n,{get iconNode(){return r}}))}var xe=r(`<!> Analyzing…`,1),Se=r(`<!> `,1),Ce=r(`<div class="flex items-center gap-2 py-6 text-xs text-muted-foreground"><!> Loading skills…</div>`),we=r(`<div class="flex flex-col items-start gap-2 py-6 text-xs text-destructive"><p class="break-words"> </p> <!></div>`),Te=r(`<div class="flex flex-col items-center gap-2 py-16 text-center text-muted-foreground"><!> <p class="text-sm font-medium text-foreground">No report yet</p> <p class="max-w-xs text-xs">Run a read-only analysis to surface duplicates, conflicts, shared resources, and
|
|
2
2
|
structural findings with evidence.</p></div>`),Ee=r(`<li class="text-muted-foreground"> </li>`),De=r(`<section class="mb-4 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs" aria-label="Analysis failures"><p class="font-medium text-destructive">Some skills could not be analyzed:</p> <ul class="mt-1 space-y-0.5"></ul></section>`),Oe=f(`<line></line>`),ke=f(`<g class="cursor-pointer" role="button" tabindex="0"><title> </title><circle r="16" fill="var(--background, white)" stroke="var(--border, gray)"></circle><text text-anchor="middle" font-size="9" fill="var(--foreground, black)"> </text></g>`),Ae=r(`<section class="mb-4" aria-label="Skill relations graph"><h2 class="mb-2 text-xs font-medium text-muted-foreground">Relations</h2> <div class="overflow-x-auto rounded-md border border-border bg-muted/20"><svg role="img" aria-label="Skill relation graph" class="mx-auto block"><!><!></svg></div> <p class="mt-1 text-[10px] text-muted-foreground">Solid red = conflict · solid blue = overlap · dashed gray = shared resource. Click a
|
|
3
3
|
node to open its detail.</p></section>`),je=r(`<p class="py-6 text-xs text-muted-foreground">No findings at this severity.</p>`),Me=r(`<li class="text-[11px] leading-4"><span class="font-medium text-muted-foreground"> </span> <code class="break-words rounded bg-muted/60 px-1 py-0.5 text-[10px]"> </code></li>`),Ne=r(`<button type="button" class="text-[11px] text-primary underline-offset-2 hover:underline"> </button>`),Pe=r(`<!> Ask agent: edit`,1),Fe=r(`<!> Ask agent: split`,1),Ie=r(`<!> Ask agent: merge`,1),Le=r(`<!> Ask agent: disable`,1),Re=r(`<li class="rounded-md border border-border"><div class="flex flex-wrap items-center gap-2 border-b border-border/60 px-3 py-2"><!> <span class="min-w-0 flex-1 text-xs"> </span> <!></div> <div class="space-y-1.5 px-3 py-2"><ul class="space-y-1"></ul> <div class="flex flex-wrap items-center gap-1.5 pt-1"><!> <span class="flex-1"></span> <!> <!> <!> <!></div></div></li>`),ze=r(`<ul class="space-y-2"></ul>`),Be=r(`<!> Refresh`,1),Ve=r(`<p class="py-4 text-xs text-muted-foreground">No pending proposals. Propose a fix from any finding above; nothing is applied until you
|
|
4
4
|
approve it here.</p>`),He=r(`<!> Reject`,1),Ue=r(`<!> Approve`,1),We=r(`<p> </p>`),Ge=r(`<p class="mt-1 text-destructive">This proposal is stale. Re-analyze, then create a fresh proposal.</p>`),Ke=r(`<div class="border-b border-border/60 px-3 py-2 text-[11px]"><!> <!></div>`),qe=r(`<li class="flex flex-wrap items-baseline gap-1"><button type="button" class="text-primary underline-offset-2 hover:underline"> </button> <code class="break-all text-[10px] text-muted-foreground"> </code></li>`),Je=r(`<p class="leading-4 text-muted-foreground"> </p>`),Ye=r(`<p class="text-muted-foreground">Loading current document…</p>`),Xe=r(`<div class="grid gap-2 md:grid-cols-2"><div class="rounded border border-border bg-muted/20 p-2"><p class="mb-1 font-medium">Before</p> <!></div> <div class="rounded border border-border bg-muted/20 p-2"><p class="mb-1 font-medium">After (proposal)</p> <p class="leading-4 text-muted-foreground"> </p></div></div> <details><summary class="cursor-pointer text-muted-foreground">Preview body</summary> <pre class="mt-1 max-h-48 overflow-auto rounded bg-muted/40 p-2 text-[10px] whitespace-pre-wrap"> </pre></details>`,1),Ze=r(`<p class="rounded border border-border bg-muted/20 p-2 leading-4"> </p>`),Qe=r(`<li><span class="font-medium"> </span> <span class="text-muted-foreground"> </span></li>`),$e=r(`<ul class="space-y-1"></ul>`),et=r(`<p><span class="font-medium"> </span> <span class="text-muted-foreground"> </span></p> <p class="text-muted-foreground"> </p>`,1),tt=r(`<div class="space-y-2 px-3 py-2 text-[11px]"><p class="text-muted-foreground"> </p> <p class="text-muted-foreground"> </p> <ul class="space-y-1"></ul> <!></div>`),nt=r(`<li class="rounded-md border border-border"><div class="flex flex-wrap items-center gap-2 border-b border-border/60 px-3 py-2"><!> <button type="button" class="min-w-0 flex-1 truncate text-left text-xs font-medium"> </button> <!> <!></div> <!> <!></li>`),rt=r(`<section class="mb-4 flex flex-wrap items-center gap-2 text-xs" aria-label="Report summary"><!> <!> <!> <!> <!> <span class="flex-1"></span> <div class="flex items-center gap-1" role="group" aria-label="Severity filter"></div></section> <!> <!> <section aria-label="Findings"><h2 class="mb-2 text-xs font-medium text-muted-foreground">Findings</h2> <!></section> <section class="mt-6" aria-label="Proposal review"><div class="mb-2 flex items-center gap-2"><h2 class="text-xs font-medium text-muted-foreground">Proposals</h2> <!> <span class="flex-1"></span> <!></div> <!></section>`,1),it=r(`<div class="flex h-full min-h-0 flex-col overflow-y-auto"><header class="shrink-0 border-b border-border px-5 py-4"><div class="flex flex-wrap items-center gap-3"><!> <div class="min-w-0 flex-1"><h1 class="truncate text-base font-semibold">Skill Intelligence</h1> <p class="mt-0.5 text-xs text-muted-foreground"> </p></div> <!></div></header> <div class="min-h-0 flex-1 px-5 py-4"><!></div></div>`);function at(r,f){i(f,!0);let p=M(),w=te(),D=_(()=>p?.()?.wsId),j=_(()=>p?.()?.providerId),P=_(()=>w?.()??{}),U=_(()=>m(P).severity??`all`),W=_(()=>{if(!m(D)||!m(j))return null;let e=ae.safeParse(m(D)),t=re.safeParse(m(j));return!e.success||!t.success?null:{workspaceId:e.data,providerId:t.data}}),G=S(null),K=S(k([])),q=S(!1),J=S(null);F(N),E(()=>{m(W)&&I(m(W))});async function Y(){let t=m(W);if(!t||m(q))return;let n=e(()=>L.skills);if(n.length===0){R(`No skills discovered in this provider.`);return}g(q,!0),g(J,null);try{let e=await fe(n.map(e=>({...t,skillId:e.id})));if(!e.report&&!e.error)return;if(g(G,e.report,!0),g(K,e.failures,!0),g(J,e.error,!0),e.report){let t=X(e.report.findings);R(`Analyzed ${e.report.snapshots.length} skills · ${t.error} errors · ${t.warning} warnings.`)}}finally{g(q,!1)}}function X(e){return{error:e.filter(e=>e.severity===`error`).length,warning:e.filter(e=>e.severity===`warning`).length,info:e.filter(e=>e.severity===`info`).length}}let at=_(()=>m(G)?m(U)===`all`?m(G).findings:m(G).findings.filter(e=>e.severity===m(U)):[]);function ot(e){m(D)&&m(j)&&ne(`workspaces.intelligence`,{wsId:m(D),providerId:m(j)},{severity:e===`all`?void 0:e},`REPLACE`)}let st=_(()=>{let e=new Map;for(let t of m(G)?.snapshots??[])e.set(t.skillId,t.name);return t=>e.get(t)??t});function ct(e){m(D)&&m(j)&&ne(`workspaces.provider`,{wsId:m(D),providerId:m(j)},{skill:e,view:`detail`})}let lt=S(k([])),ut=S(!1),Z=S(null),Q=S(null),dt=S(null),ft=S(k({})),pt=S(null);E(()=>{mt()});async function mt(){g(ut,!0);try{let e=await pe();e.proposals&&g(lt,e.proposals,!0)}finally{g(ut,!1)}}async function ht(e){if(g(pt,m(pt)===e.id?null:e.id,!0),m(pt)===e.id&&e.payload.kind===`edit`)for(let t of e.payload.edits){let e=ie.safeParse(t.selection.skillId);if(e.success)try{let n=await oe(t.selection,e.data);g(ft,{...m(ft),[t.selection.skillId]:n},!0)}catch{}}}async function gt(e){if(!m(Z)){g(Z,e.id,!0);try{let{result:t,error:n}=await he(e.id);if(n){R(n);return}if(!t)return;g(dt,{proposalId:e.id,result:t},!0),t.conflicts>0?R(`${t.conflicts} conflict(s): skill changed after the proposal. Re-analyze.`,{label:`Re-analyze`,run:()=>void Y()}):t.failed>0?R(`Applied with ${t.failed} failure(s).`):R(`Applied ${t.applied} change(s).`),await mt(),await _t()}finally{g(Z,null)}}}async function _t(){let e=m(W);e&&await I(e)}async function vt(e){if(!m(Q)){g(Q,e.id,!0);try{let{error:t}=await me(e.id);t&&R(t),await mt()}finally{g(Q,null)}}}function yt(e,t){let n=m(W);if(!n)return;let r=ie.safeParse(t.skillIds[0]);if(!r.success)return;let i=m(G)?.snapshots.find(e=>e.skillId===r.data);if(!i)return;let a=ge[e];ce({action:e,text:a.render({skillName:i.name,findingId:t.id,observedRevision:i.revision}),skill:{...n,skillId:r.data},skillName:i.name,findingId:t.id,observedRevision:i.revision,templateId:a.id,templateVersion:a.version})}let $=_(()=>{let e=m(G)?.snapshots??[];if(e.length<2)return null;let t=Math.min(1600,Math.max(560,e.length*72)),n=e.length>14?420:360,r=t/2-70,i=n/2-70,a={x:t/2,y:n/2},o=e.map((t,n)=>{let o=n/e.length*Math.PI*2-Math.PI/2;return{skillId:t.skillId,name:t.name,label:t.name.length>14?`${t.name.slice(0,13)}…`:t.name,labelDy:n%2==0?32:-26,x:a.x+r*Math.cos(o),y:a.y+i*Math.sin(o)}}),s=new Map(o.map((e,t)=>[e.skillId,t]));return{width:t,height:n,nodes:o,edges:(m(G)?.edges??[]).map(e=>{let t=s.get(e.skillIds[0]),n=s.get(e.skillIds[1]);return t===void 0||n===void 0?null:{kind:e.kind,from:o[t],to:o[n]}}).filter(e=>e!==null)}}),bt={error:`destructive`,warning:`secondary`,info:`outline`};var xt=it(),St=T(xt),Ct=T(St),wt=T(Ct);V(wt,{class:`h-5 w-5 text-primary`});var Tt=b(wt,2),Et=b(T(Tt),2),Dt=h(Et);n(Tt);var Ot=b(Tt,2);z(Ot,{size:`sm`,class:`h-8 gap-1.5`,get disabled(){return m(q)},onclick:()=>void Y(),children:(e,t)=>{var n=A(),r=O(n),i=e=>{var t=xe(),n=O(t);B(n,{class:`h-3.5 w-3.5 animate-spin`}),y(),c(e,t)},o=e=>{var t=Se(),n=O(t);de(n,{class:`h-3.5 w-3.5`});var r=b(n);C(()=>a(r,` Analyze ${(L.skills.length||``)??``}`)),c(e,t)};s(r,e=>{m(q)?e(i):e(o,-1)}),c(e,n)},$$slots:{default:!0}}),n(Ct),n(St);var kt=b(St,2),At=T(kt),jt=e=>{var t=Ce(),r=T(t);B(r,{class:`h-3.5 w-3.5 animate-spin`}),y(),n(t),c(e,t)},Mt=e=>{var t=we(),r=T(t),i=h(r,!0),o=b(r,2),l=e=>{z(e,{variant:`outline`,size:`sm`,class:`h-7 text-xs`,onclick:()=>void I(m(W)),children:(e,t)=>{y();var n=d(`Retry`);c(e,n)},$$slots:{default:!0}})};s(o,e=>{m(W)&&e(l)}),n(t),C(()=>a(i,L.error)),c(e,t)},Nt=e=>{var t=we(),r=T(t),i=h(r,!0),o=b(r,2);z(o,{variant:`outline`,size:`sm`,class:`h-7 text-xs`,onclick:()=>void Y(),children:(e,t)=>{y();var n=d(`Retry analysis`);c(e,n)},$$slots:{default:!0}}),n(t),C(()=>a(i,m(J))),c(e,t)},Pt=e=>{var t=Te(),r=T(t);ue(r,{class:`h-8 w-8 opacity-50`}),y(4),n(t),c(e,t)},Ft=e=>{var r=rt(),i=O(r),u=T(i);H(u,{variant:`outline`,children:(e,t)=>{y();var n=d();C(()=>a(n,`${m(G).snapshots.length??``} skills`)),c(e,n)},$$slots:{default:!0}});var f=b(u,2);H(f,{variant:`destructive`,children:(e,t)=>{y();var n=d();C(e=>a(n,`${e??``} errors`),[()=>X(m(G).findings).error]),c(e,n)},$$slots:{default:!0}});var p=b(f,2);H(p,{variant:`secondary`,children:(e,t)=>{y();var n=d();C(e=>a(n,`${e??``} warnings`),[()=>X(m(G).findings).warning]),c(e,n)},$$slots:{default:!0}});var g=b(p,2);H(g,{variant:`outline`,children:(e,t)=>{y();var n=d();C(e=>a(n,`${e??``} info`),[()=>X(m(G).findings).info]),c(e,n)},$$slots:{default:!0}});var S=b(g,2),w=e=>{H(e,{variant:`destructive`,children:(e,t)=>{y();var n=d();C(()=>a(n,`${m(K).length??``} failed to analyze`)),c(e,n)},$$slots:{default:!0}})};s(S,e=>{m(K).length>0&&e(w)});var E=b(S,4);t(E,20,()=>[`all`,`error`,`warning`,`info`],e=>e,(e,t)=>{{let n=_(()=>m(U)===t?`default`:`outline`);z(e,{get variant(){return m(n)},size:`sm`,class:`h-7 px-2 text-xs capitalize`,onclick:()=>ot(t),children:(e,n)=>{y();var r=d();C(()=>a(r,t)),c(e,r)},$$slots:{default:!0}})}}),n(E),n(i);var D=b(i,2),k=e=>{var r=De(),i=b(T(r),2);t(i,21,()=>m(K),e=>e.message,(e,t)=>{var n=Ee(),r=h(n);C(()=>a(r,`${m(t).code??``}: ${m(t).message??``}`)),c(e,n)}),n(i),n(r),c(e,r)};s(D,e=>{m(K).length>0&&e(k)});var A=b(D,2),j=e=>{var r=Ae(),i=b(T(r),2),s=T(i),l=T(s);t(l,17,()=>m($).edges,v,(e,t)=>{var n=Oe();C(()=>{x(n,`x1`,m(t).from.x),x(n,`y1`,m(t).from.y),x(n,`x2`,m(t).to.x),x(n,`y2`,m(t).to.y),x(n,`stroke`,m(t).kind===`conflict`?`var(--destructive, crimson)`:m(t).kind===`overlap`?`var(--primary, steelblue)`:`var(--muted-foreground, gray)`),x(n,`stroke-width`,m(t).kind===`conflict`?2:1.2),x(n,`stroke-dasharray`,m(t).kind===`shared-resource`?`4 3`:void 0)}),c(e,n)});var u=b(l);t(u,17,()=>m($).nodes,e=>e.skillId,(e,t)=>{var r=ke(),i=T(r),s=h(i,!0),l=b(i),u=b(l),d=h(u,!0);n(r),C(()=>{x(r,`aria-label`,`Open ${m(t).name??``} detail`),a(s,m(t).name),x(l,`cx`,m(t).x),x(l,`cy`,m(t).y),x(u,`x`,m(t).x),x(u,`y`,m(t).y+m(t).labelDy),a(d,m(t).label)}),o(`click`,r,()=>ct(m(t).skillId)),o(`keydown`,r,e=>e.key===`Enter`&&ct(m(t).skillId)),c(e,r)}),n(s),n(i),y(2),n(r),C(()=>{x(s,`width`,m($).width),x(s,`height`,m($).height)}),c(e,r)};s(A,e=>{m($)&&e(j)});var M=b(A,2),te=b(T(M),2),ne=e=>{var t=je();c(e,t)},N=e=>{var r=ze();t(r,21,()=>m(at),e=>e.id,(e,r)=>{var i=Re(),l=T(i),u=T(l),f=e=>{le(e,{class:`h-4 w-4 shrink-0 text-destructive`})},p=e=>{ue(e,{class:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400`})},g=e=>{ve(e,{class:`h-4 w-4 shrink-0 text-muted-foreground`})};s(u,e=>{m(r).severity===`error`?e(f):m(r).severity===`warning`?e(p,1):e(g,-1)});var _=b(u,2),v=h(_,!0),x=b(_,2);H(x,{get variant(){return bt[m(r).severity]},class:`text-[10px]`,children:(e,t)=>{y();var n=d();C(()=>a(n,m(r).kind)),c(e,n)},$$slots:{default:!0}}),n(l);var S=b(l,2),w=T(S);t(w,21,()=>m(r).evidence,e=>e.label+e.snippet,(e,t)=>{var r=Me(),i=T(r),o=h(i),s=b(i,2),l=h(s,!0);n(r),C(()=>{a(o,`${m(t).label??``}:`),a(l,m(t).snippet)}),c(e,r)}),n(w);var E=b(w,2),D=T(E);t(D,16,()=>m(r).skillIds,e=>e,(e,t)=>{var n=Ne(),r=h(n,!0);C(e=>a(r,e),[()=>m(st)(t)]),o(`click`,n,()=>ct(t)),c(e,n)});var k=b(D,4),ee=e=>{z(e,{variant:`outline`,size:`sm`,class:`h-7 gap-1 px-2 text-[11px]`,disabled:!1,onclick:()=>yt(`edit`,m(r)),children:(e,t)=>{var n=Pe(),r=O(n);V(r,{class:`h-3 w-3`}),y(),c(e,n)},$$slots:{default:!0}})};s(k,e=>{m(r).skillIds.length===1&&m(r).kind!==`duplicate-name`&&e(ee)});var A=b(k,2);z(A,{variant:`outline`,size:`sm`,class:`h-7 gap-1 px-2 text-[11px]`,disabled:!1,onclick:()=>yt(`split`,m(r)),children:(e,t)=>{var n=Fe(),r=O(n);V(r,{class:`h-3 w-3`}),y(),c(e,n)},$$slots:{default:!0}});var j=b(A,2);z(j,{variant:`outline`,size:`sm`,class:`h-7 gap-1 px-2 text-[11px]`,disabled:!1,onclick:()=>yt(`merge`,m(r)),children:(e,t)=>{var n=Ie(),r=O(n);V(r,{class:`h-3 w-3`}),y(),c(e,n)},$$slots:{default:!0}});var M=b(j,2);z(M,{variant:`outline`,size:`sm`,class:`h-7 gap-1 px-2 text-[11px]`,disabled:!1,onclick:()=>yt(`disable`,m(r)),children:(e,t)=>{var n=Le();ye(O(n),{class:`h-3 w-3`}),y(),c(e,n)},$$slots:{default:!0}}),n(E),n(S),n(i),C(()=>a(v,m(r).message)),c(e,i)}),n(r),c(e,r)};s(te,e=>{m(at).length===0?e(ne):e(N,-1)}),n(M);var re=b(M,2),P=T(re),F=b(T(P),2),ie=e=>{B(e,{class:`h-3 w-3 animate-spin text-muted-foreground`})};s(F,e=>{m(ut)&&e(ie)});var ae=b(F,4);z(ae,{variant:`ghost`,size:`sm`,class:`h-7 gap-1 px-2 text-xs`,onclick:()=>void mt(),children:(e,t)=>{var n=Be(),r=O(n);se(r,{class:`h-3 w-3`}),y(),c(e,n)},$$slots:{default:!0}}),n(P);var I=b(P,2),oe=e=>{var t=Ve();c(e,t)},L=e=>{var r=ze();t(r,21,()=>m(lt),e=>e.id,(e,r)=>{let i=_(()=>m(dt)?.proposalId===m(r).id?m(dt).result:null);var u=nt(),d=T(u),f=T(d),p=e=>{V(e,{class:`h-4 w-4 shrink-0 text-primary`})},g=e=>{ye(e,{class:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400`})},v=e=>{be(e,{class:`h-4 w-4 shrink-0 text-primary`})},x=e=>{_e(e,{class:`h-4 w-4 shrink-0 text-primary`})};s(f,e=>{m(r).payload.kind===`edit`?e(p):m(r).payload.kind===`disable`?e(g,1):m(r).payload.kind===`split`?e(v,2):e(x,-1)});var S=b(f,2),w=h(S),E=b(S,2);{let e=_(()=>m(Q)===m(r).id);z(E,{variant:`outline`,size:`sm`,class:`h-7 px-2 text-[11px]`,get disabled(){return m(e)},onclick:()=>void vt(m(r)),children:(e,t)=>{var n=He(),i=O(n),a=e=>{B(e,{class:`h-3 w-3 animate-spin`})};s(i,e=>{m(Q)===m(r).id&&e(a)}),y(),c(e,n)},$$slots:{default:!0}})}var D=b(E,2);{let e=_(()=>m(Z)===m(r).id||m(i)!==null&&m(i).conflicts>0);z(D,{size:`sm`,class:`h-7 px-2 text-[11px]`,get disabled(){return m(e)},onclick:()=>void gt(m(r)),children:(e,t)=>{var n=Ue(),i=O(n),a=e=>{B(e,{class:`h-3 w-3 animate-spin`})};s(i,e=>{m(Z)===m(r).id&&e(a)}),y(),c(e,n)},$$slots:{default:!0}})}n(d);var k=b(d,2),A=e=>{var r=Ke(),o=T(r);t(o,17,()=>m(i).results,e=>e.skillId,(e,t)=>{var n=We(),r=h(n);C(e=>{ee(n,1,l(m(t).status===`applied`?`text-emerald-600 dark:text-emerald-400`:m(t).status===`conflict`?`text-destructive`:`text-muted-foreground`)),a(r,`${e??``} — ${m(t).status??``}${m(t).error?`: ${m(t).error}`:``}`)},[()=>m(st)(m(t).skillId)]),c(e,n)});var u=b(o,2),d=e=>{var t=Ge();c(e,t)};s(u,e=>{m(i).conflicts>0&&e(d)}),n(r),c(e,r)};s(k,e=>{m(i)&&e(A)});var j=b(k,2),M=e=>{var i=tt(),l=T(i),u=h(l,!0),d=b(l,2),f=h(d),p=b(d,2);t(p,21,()=>m(r).observedRevisions,e=>e.skillId,(e,t)=>{var r=qe(),i=T(r),s=h(i,!0),l=b(i,2),u=h(l);n(r),C((e,t)=>{a(s,e),a(u,`${t??``}…`)},[()=>m(st)(m(t).skillId),()=>m(t).revision.slice(0,19)]),o(`click`,i,()=>ct(m(t).skillId)),c(e,r)}),n(p);var g=b(p,2),v=e=>{let t=_(()=>m(r).payload.edits[0]),i=_(()=>m(ft)[m(t).selection.skillId]);var o=Xe(),l=O(o),u=T(l),d=b(T(u),2),f=e=>{var t=Je(),n=h(t,!0);C(()=>a(n,m(i).description)),c(e,t)},p=e=>{var t=Ye();c(e,t)};s(d,e=>{m(i)?e(f):e(p,-1)}),n(u);var g=b(u,2),v=b(T(g),2),y=h(v,!0);n(g),n(l);var x=b(l,2),S=b(T(x),2),w=h(S,!0);n(x),C(()=>{a(y,m(t).frontmatter.description),a(w,m(t).body)}),c(e,o)},y=e=>{var t=Ze(),n=h(t);C(()=>a(n,`Reason: ${m(r).payload.reason??``}`)),c(e,t)},x=e=>{var i=$e();t(i,21,()=>m(r).payload.targets,e=>e.directoryName,(e,t)=>{var r=Qe(),i=T(r),o=h(i,!0),s=b(i,2),l=h(s);n(r),C(()=>{a(o,m(t).directoryName),a(l,`— ${m(t).frontmatter.description??``}`)}),c(e,r)}),n(i),c(e,i)},S=e=>{var t=et(),i=O(t),o=T(i),s=h(o,!0),l=b(o,2),u=h(l);n(i);var d=b(i,2),f=h(d);C(()=>{a(s,m(r).payload.target.directoryName),a(u,`— ${m(r).payload.target.frontmatter.description??``}`),a(f,`Merges ${m(r).payload.sources.length??``} sources; approving removes them revision-safely.`)}),c(e,t)};s(g,e=>{m(r).payload.kind===`edit`?e(v):m(r).payload.kind===`disable`?e(y,1):m(r).payload.kind===`split`?e(x,2):m(r).payload.kind===`merge`&&e(S,3)}),n(i),C(e=>{a(u,m(r).rationale),a(f,`Created ${e??``} · affects
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./DjZ7hdjX.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ut as e}from"./CmCJ0SKP.js";import{n as t}from"./CAmktO2F.js";import"./CZQgUTNL.js";function n(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function r(e,t=`|`){return e.map(e=>ae(e)).join(t)}function i(e,t){return typeof t==`bigint`?t.toString():t}function a(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function o(e){return e==null}function s(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function c(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function l(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function u(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function d(e){return JSON.stringify(e)}function f(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var p=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ee=a(()=>{if(x.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function te(e){if(m(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return m(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ne(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var re=new Set([`string`,`number`,`symbol`]);function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function g(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ae(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function oe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var se={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return h(e,u(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&l(e,r,n.shape[r])}return l(this,`shape`,e),e},checks:[]}))}function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return h(e,u(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return l(this,`shape`,r),r},checks:[]}))}function ue(e,t){if(!te(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return l(this,`shape`,n),n}}))}function de(e,t){if(!te(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return l(this,`shape`,n),n}}))}function fe(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return l(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function pe(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return h(t,u(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return l(this,`shape`,i),i},checks:[]}))}function me(e,t,n){return h(t,u(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return l(this,`shape`,i),i}}))}function he(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function _(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function ve(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function v(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(a?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}var ye=/[\uD800-\uDBFF]/;function be(e){let t=e.length;if(!ye.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function xe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Se(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ce(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function we(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):De(e,n,r.value)}}function Te(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ee(e,t,n){return Te(e,t,n,!1)}function De(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Te(this,t,n.bind(this))},set(e){Te(this,t,e)}})}function Oe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ke,Ae=!1,je={configurable:!0,get(){Ae=!0}};function y(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&ke!==e._zod){ke=void 0;return}ke=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,je);let e=Ae;Ae=!1;try{let r=n(this);return Ae?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ae||=e,r}catch(n){throw delete this[t],Ae||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Me(e,t,n,r){let i=Oe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ne=`~constantCatch`;function Pe(e){let t=()=>e;return t[Ne]=!0,t}var Fe,Ie={value:void 0,enumerable:!1},Le=`captureStackTrace`in Error?Error:null;function Re(e){let t=Le;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Le=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ie.value=new a(r);try{Object.defineProperty(n,"_zod",Ie)}finally{Ie.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),we(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Re(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ze=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Be=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Fe=globalThis).__zod_globalConfig??(Fe.__zod_globalConfig={});var x=globalThis.__zod_globalConfig;function S(e){return e&&Object.assign(x,e),x}function Ve(){let e=this._zod;return e.message??=JSON.stringify(e.def,i,2),e.message}function He(e){this._zod.message=e}var Ue={get:Ve,set:He,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Ge={value:void 0,enumerable:!1},Ke=new WeakSet([Object.prototype,Error.prototype]),qe=(e,t)=>{e.name=`$ZodError`,We.value=e._zod,Object.defineProperty(e,"_zod",We),Ge.value=t,Object.defineProperty(e,"issues",Ge),We.value=void 0,Ge.value=void 0,Object.defineProperty(e,"message",Ue);let n=Object.getPrototypeOf(e);Ke.has(n)||(Ke.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Je=b(`$ZodError`,qe),Ye=b(`$ZodError`,qe,void 0,{Parent:Error});function Xe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ze(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function $e(e,t){return{callee:t?.callee??e,Err:t?.Err}}var et=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ze;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>v(e,o,S())));throw p(n,a?.callee??t),n}return s.value};return t},tt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>v(e,o,S())));throw p(n,a?.callee??t),n}return s.value};return t},nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ze;return a.issues.length?{success:!1,error:new(e??Je)(a.issues.map(e=>v(e,i,S())))}:{success:!0,data:a.value}},rt=nt(Ye),it=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>v(e,i,S())))}:{success:!0,data:a.value}},at=it(Ye),ot=e=>{let t=et(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$e(n,a))};return n},st=e=>{let t=et(e),n=(e,r,i,a)=>t(e,r,i,$e(n,a));return n},ct=e=>{let t=tt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$e(n,a))};return n},lt=e=>{let t=tt(e),n=async(e,r,i,a)=>await t(e,r,i,$e(n,a));return n},ut=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nt(e)(t,n,i)},dt=e=>(t,n,r)=>nt(e)(t,n,r),ft=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return it(e)(t,n,i)},pt=e=>async(t,n,r)=>it(e)(t,n,r),mt=/^[cC][0-9a-z]{6,}$/,ht=/^[0-9a-z]+$/,gt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,_t=/^[0-9a-vA-V]{20}$/,vt=/^[A-Za-z0-9]{27}$/,yt=/^[a-zA-Z0-9_-]{21}$/;function bt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var xt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,St=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ct=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Et(){return new RegExp(Tt,`u`)}var Dt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ot=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,kt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,At=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mt=/^[A-Za-z0-9_-]*$/,Nt=/^https?$/,Pt=/^\+[1-9]\d{6,14}$/,Ft=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function It(e){return RegExp(`^${e}$`)}var Lt=It(Ft);function Rt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zt(e){return RegExp(`^${Rt(e)}$`)}function Bt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Rt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Rt({precision:e.precision})}`:n;return RegExp(`^${Ft}T(?:${r})$`)}var Vt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Ht=/^-?\d+$/,Ut=/^-?\d+(?:\.\d+)?$/,Wt=/^(?:true|false)$/i,Gt=/^null$/i,Kt=/^[^A-Z]*$/,qt=/^[^a-z]*$/,C=b(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Jt=e=>{let t=e.value;return!o(t)&&t.length!==void 0},Yt={number:`number`,bigint:`bigint`,object:`date`},Xt=b(`$ZodCheckLessThan`,(e,t)=>{C.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Yt[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zt=b(`$ZodCheckGreaterThan`,(e,t)=>{C.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Yt[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qt=b(`$ZodCheckMultipleOf`,(e,t)=>{C.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):c(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$t=b(`$ZodCheckNumberFormat`,(e,t)=>{C.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=se[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Ht)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),en=b(`$ZodCheckMaxLength`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?be(r):i)<=t.maximum)return;let a=xe(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tn=b(`$ZodCheckMinLength`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?be(r):i)>=t.minimum)return;let a=xe(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nn=b(`$ZodCheckLengthEquals`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?be(r):i;if(a===t.length)return;let o=xe(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),rn=b(`$ZodCheckStringFormat`,(e,t)=>{var n,r;C.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),an=b(`$ZodCheckRegex`,(e,t)=>{rn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),on=b(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Kt,rn.init(e,t)}),sn=b(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=qt,rn.init(e,t)}),cn=b(`$ZodCheckIncludes`,(e,t)=>{C.init(e,t);let n=ie(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ln=b(`$ZodCheckStartsWith`,(e,t)=>{C.init(e,t);let n=RegExp(`^${ie(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),un=b(`$ZodCheckEndsWith`,(e,t)=>{C.init(e,t);let n=RegExp(`.*${ie(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),dn=b(`$ZodCheckOverwrite`,(e,t)=>{C.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
1
|
+
import{ut as e}from"./CmCJ0SKP.js";import{n as t}from"./DjZ7hdjX.js";import"./eFUKcYMv.js";function n(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function r(e,t=`|`){return e.map(e=>ae(e)).join(t)}function i(e,t){return typeof t==`bigint`?t.toString():t}function a(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function o(e){return e==null}function s(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function c(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function l(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function u(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function d(e){return JSON.stringify(e)}function f(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var p=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ee=a(()=>{if(x.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function te(e){if(m(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return m(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ne(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var re=new Set([`string`,`number`,`symbol`]);function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function g(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ae(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function oe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var se={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return h(e,u(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&l(e,r,n.shape[r])}return l(this,`shape`,e),e},checks:[]}))}function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return h(e,u(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return l(this,`shape`,r),r},checks:[]}))}function ue(e,t){if(!te(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return l(this,`shape`,n),n}}))}function de(e,t){if(!te(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return l(this,`shape`,n),n}}))}function fe(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return h(e,u(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return l(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function pe(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return h(t,u(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return l(this,`shape`,i),i},checks:[]}))}function me(e,t,n){return h(t,u(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return l(this,`shape`,i),i}}))}function he(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function _(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function ve(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function v(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(a?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}var ye=/[\uD800-\uDBFF]/;function be(e){let t=e.length;if(!ye.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function xe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Se(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ce(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function we(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):De(e,n,r.value)}}function Te(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ee(e,t,n){return Te(e,t,n,!1)}function De(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Te(this,t,n.bind(this))},set(e){Te(this,t,e)}})}function Oe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ke,Ae=!1,je={configurable:!0,get(){Ae=!0}};function y(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&ke!==e._zod){ke=void 0;return}ke=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,je);let e=Ae;Ae=!1;try{let r=n(this);return Ae?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ae||=e,r}catch(n){throw delete this[t],Ae||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Me(e,t,n,r){let i=Oe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ne=`~constantCatch`;function Pe(e){let t=()=>e;return t[Ne]=!0,t}var Fe,Ie={value:void 0,enumerable:!1},Le=`captureStackTrace`in Error?Error:null;function Re(e){let t=Le;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Le=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ie.value=new a(r);try{Object.defineProperty(n,"_zod",Ie)}finally{Ie.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),we(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Re(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ze=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Be=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Fe=globalThis).__zod_globalConfig??(Fe.__zod_globalConfig={});var x=globalThis.__zod_globalConfig;function S(e){return e&&Object.assign(x,e),x}function Ve(){let e=this._zod;return e.message??=JSON.stringify(e.def,i,2),e.message}function He(e){this._zod.message=e}var Ue={get:Ve,set:He,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Ge={value:void 0,enumerable:!1},Ke=new WeakSet([Object.prototype,Error.prototype]),qe=(e,t)=>{e.name=`$ZodError`,We.value=e._zod,Object.defineProperty(e,"_zod",We),Ge.value=t,Object.defineProperty(e,"issues",Ge),We.value=void 0,Ge.value=void 0,Object.defineProperty(e,"message",Ue);let n=Object.getPrototypeOf(e);Ke.has(n)||(Ke.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Je=b(`$ZodError`,qe),Ye=b(`$ZodError`,qe,void 0,{Parent:Error});function Xe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ze(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function $e(e,t){return{callee:t?.callee??e,Err:t?.Err}}var et=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ze;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>v(e,o,S())));throw p(n,a?.callee??t),n}return s.value};return t},tt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>v(e,o,S())));throw p(n,a?.callee??t),n}return s.value};return t},nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ze;return a.issues.length?{success:!1,error:new(e??Je)(a.issues.map(e=>v(e,i,S())))}:{success:!0,data:a.value}},rt=nt(Ye),it=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>v(e,i,S())))}:{success:!0,data:a.value}},at=it(Ye),ot=e=>{let t=et(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$e(n,a))};return n},st=e=>{let t=et(e),n=(e,r,i,a)=>t(e,r,i,$e(n,a));return n},ct=e=>{let t=tt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$e(n,a))};return n},lt=e=>{let t=tt(e),n=async(e,r,i,a)=>await t(e,r,i,$e(n,a));return n},ut=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nt(e)(t,n,i)},dt=e=>(t,n,r)=>nt(e)(t,n,r),ft=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return it(e)(t,n,i)},pt=e=>async(t,n,r)=>it(e)(t,n,r),mt=/^[cC][0-9a-z]{6,}$/,ht=/^[0-9a-z]+$/,gt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,_t=/^[0-9a-vA-V]{20}$/,vt=/^[A-Za-z0-9]{27}$/,yt=/^[a-zA-Z0-9_-]{21}$/;function bt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var xt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,St=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ct=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Et(){return new RegExp(Tt,`u`)}var Dt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ot=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,kt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,At=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mt=/^[A-Za-z0-9_-]*$/,Nt=/^https?$/,Pt=/^\+[1-9]\d{6,14}$/,Ft=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function It(e){return RegExp(`^${e}$`)}var Lt=It(Ft);function Rt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zt(e){return RegExp(`^${Rt(e)}$`)}function Bt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Rt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Rt({precision:e.precision})}`:n;return RegExp(`^${Ft}T(?:${r})$`)}var Vt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Ht=/^-?\d+$/,Ut=/^-?\d+(?:\.\d+)?$/,Wt=/^(?:true|false)$/i,Gt=/^null$/i,Kt=/^[^A-Z]*$/,qt=/^[^a-z]*$/,C=b(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Jt=e=>{let t=e.value;return!o(t)&&t.length!==void 0},Yt={number:`number`,bigint:`bigint`,object:`date`},Xt=b(`$ZodCheckLessThan`,(e,t)=>{C.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Yt[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zt=b(`$ZodCheckGreaterThan`,(e,t)=>{C.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Yt[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qt=b(`$ZodCheckMultipleOf`,(e,t)=>{C.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):c(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$t=b(`$ZodCheckNumberFormat`,(e,t)=>{C.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=se[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Ht)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),en=b(`$ZodCheckMaxLength`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?be(r):i)<=t.maximum)return;let a=xe(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tn=b(`$ZodCheckMinLength`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?be(r):i)>=t.minimum)return;let a=xe(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nn=b(`$ZodCheckLengthEquals`,(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=Jt),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?be(r):i;if(a===t.length)return;let o=xe(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),rn=b(`$ZodCheckStringFormat`,(e,t)=>{var n,r;C.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),an=b(`$ZodCheckRegex`,(e,t)=>{rn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),on=b(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Kt,rn.init(e,t)}),sn=b(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=qt,rn.init(e,t)}),cn=b(`$ZodCheckIncludes`,(e,t)=>{C.init(e,t);let n=ie(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ln=b(`$ZodCheckStartsWith`,(e,t)=>{C.init(e,t);let n=RegExp(`^${ie(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),un=b(`$ZodCheckEndsWith`,(e,t)=>{C.init(e,t);let n=RegExp(`.*${ie(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),dn=b(`$ZodCheckOverwrite`,(e,t)=>{C.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
2
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
3
3
|
`)}\n};`)(...Object.values(this.closed))}},pn={major:4,minor:5,patch:4},w=b(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=he(t),a;for(let o of n){if(o._zod.def.when){if(ge(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ze;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ve(t.issues,n,e),i||=he(t,n))});else{if(t.issues.length===n)continue;ve(t.issues,n,e),i||=he(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(he(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ze;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ze;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ee(this,`~standard`,hn(this))},set"~standard"(e){Te(this,`~standard`,e)}}),mn=e=>e.success?{value:e.data}:{issues:e.error?.issues};function hn(e){return{validate:t=>{try{return mn(rt(e,t))}catch{return at(e,t).then(mn)}},vendor:`zod`,version:1}}var gn=b(`$ZodString`,(e,t)=>{w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),T=b(`$ZodStringFormat`,(e,t)=>{rn.init(e,t),gn.init(e,t)}),_n=b(`$ZodGUID`,(e,t)=>{t.pattern??=St,T.init(e,t)}),vn=b(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ct(e)}else t.pattern??=Ct();T.init(e,t)}),yn=b(`$ZodEmail`,(e,t)=>{t.pattern??=wt,T.init(e,t)});function bn(e,t){if(!t.normalize&&t.protocol?.source===Nt.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var xn=/[\t\n\r]/g;function Sn(e){return e.replace(xn,``)}function Cn(e,t){return t.lastIndex=0,t.test(e.hostname)}function wn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Tn=b(`$ZodURL`,(e,t)=>{T.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=bn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Cn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!wn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Sn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),En=b(`$ZodEmoji`,(e,t)=>{t.pattern??=Et(),T.init(e,t)}),Dn=b(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?yt:bt(t.length),T.init(e,t)}),On=b(`$ZodCUID`,(e,t)=>{t.pattern??=mt,T.init(e,t)}),kn=b(`$ZodCUID2`,(e,t)=>{t.pattern??=ht,T.init(e,t)}),An=b(`$ZodULID`,(e,t)=>{t.pattern??=gt,T.init(e,t)}),jn=b(`$ZodXID`,(e,t)=>{t.pattern??=_t,T.init(e,t)}),Mn=b(`$ZodKSUID`,(e,t)=>{t.pattern??=vt,T.init(e,t)}),Nn=b(`$ZodISODateTime`,(e,t)=>{t.pattern??=Bt(t),T.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Pn=b(`$ZodISODate`,(e,t)=>{t.pattern??=Lt,T.init(e,t)}),Fn=b(`$ZodISOTime`,(e,t)=>{t.pattern??=zt(t),T.init(e,t)}),In=b(`$ZodISODuration`,(e,t)=>{t.pattern??=xt,T.init(e,t)}),Ln=b(`$ZodIPv4`,(e,t)=>{t.pattern??=Dt,T.init(e,t),e._zod.bag.format=`ipv4`}),Rn=/^[0-9a-fA-F:.]+$/;function zn(e){if(!Rn.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var Bn=b(`$ZodIPv6`,(e,t)=>{t.pattern??=Ot,T.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{zn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Vn=b(`$ZodCIDRv4`,(e,t)=>{t.pattern??=kt,T.init(e,t)});function Hn(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:zn(n)}var Un=b(`$ZodCIDRv6`,(e,t)=>{t.pattern??=At,T.init(e,t),e._zod.check=n=>{Hn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Wn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Gn=b(`$ZodBase64`,(e,t)=>{t.pattern??=jt,T.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Wn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Kn(e){if(!Mt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var qn=b(`$ZodBase64URL`,(e,t)=>{t.pattern??=Mt,T.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Kn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Jn=b(`$ZodE164`,(e,t)=>{t.pattern??=Pt,T.init(e,t)});function Yn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Xn=b(`$ZodJWT`,(e,t)=>{T.init(e,t),e._zod.check=n=>{Yn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Zn=b(`$ZodNumber`,(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ut,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Qn=b(`$ZodNumberFormat`,(e,t)=>{$t.init(e,t),Zn.init(e,t)}),$n=b(`$ZodBoolean`,(e,t)=>{w.init(e,t),e._zod.pattern=Wt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),er=b(`$ZodNull`,(e,t)=>{w.init(e,t),e._zod.pattern=Gt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),tr=b(`$ZodUnknown`,(e,t)=>{w.init(e,t),e._zod.parse=e=>e}),nr=b(`$ZodNever`,(e,t)=>{w.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function rr(e,t,n){e.issues.length&&t.issues.push(..._(n,e.issues)),t.value[n]=e.value}var ir=b(`$ZodArray`,(e,t)=>{w.init(e,t);let n=x.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;e<a.length;e++){let n=a[e],s=t.element._zod.run({value:n,issues:[]},i);s instanceof Promise?o.push(s.then(t=>rr(t,r,e))):rr(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function ar(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(..._(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var or=[];function sr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:or,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=oe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function cr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ar(e,n,i,t,u,d))):ar(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var lr=new WeakMap,ur=b(`$ZodObject`,(e,t)=>{if(w.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;lr.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),lr.set(t,n),n}})}let n=a(()=>sr(t));y(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||l(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=m,i=t.catchall,o,s=x.memoizer;s?.attach(e),e._zod.parse=(t,a)=>{o??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=s?s.alloc(e,t,{},a):{};let l=[],u=o.shape;for(let e of o.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,o=n._zod.run({value:c[e],issues:[]},a);o instanceof Promise?l.push(o.then(n=>ar(n,t,e,c,r,i))):ar(o,t,e,c,r,i)}return i?cr(l,c,t,a,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),dr=b(`$ZodObjectJIT`,(e,t)=>{ur.init(e,t);let n=e._zod.parse,r=a(()=>sr(t)),i=x.memoizer,o=t=>{let n=r.value,a=n.symbolKeys,o=new fn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
4
|
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,At as t,B as n,Ct as r,F as i,G as a,N as o,R as s,St as c,U as l,W as u,X as d,ct as f,ft as p,gt as m,kt as h,l as g,lt as _,m as v,mt as y,nt as b,ot as x,rt as S,st as C,ut as w,z as T}from"./CmCJ0SKP.js";import{t as E}from"./
|
|
1
|
+
import{A as e,At as t,B as n,Ct as r,F as i,G as a,N as o,R as s,St as c,U as l,W as u,X as d,ct as f,ft as p,gt as m,kt as h,l as g,lt as _,m as v,mt as y,nt as b,ot as x,rt as S,st as C,ut as w,z as T}from"./CmCJ0SKP.js";import{t as E}from"./DjZ7hdjX.js";import"./xihTtKlq.js";import"./eFUKcYMv.js";import{a as D}from"./DF_TIB7n.js";import{A as O,E as k,_ as A,a as j,k as M,s as N,t as P,x as ee}from"./pd7EK5wP.js";import{t as te}from"./BT2vrlul.js";import"./B8aGNSaH.js";import{a as ne}from"./BTMBuftG.js";import{n as F}from"./1aUphu7Y.js";import{n as I,t as L}from"./DnPeA-9c.js";import{t as re}from"./BEPs9Z9s.js";import{t as ie}from"./DOjT7y5f.js";import{t as ae}from"./M-b0y9AQ.js";import{n as R,t as oe}from"./Cy5ABld-.js";import{t as se}from"./UeEccMjN.js";import{t as ce}from"./BIfnT_mK.js";import{t as z}from"./HopcQwhZ.js";import{t as B}from"./Bs27XW8_.js";import{a as le,c as V,i as ue,n as de,t as fe}from"./DBNjJ5Iw.js";import{t as H}from"./Bl0jjuyR.js";import{t as pe}from"./DKQHhdJ1.js";var U=P(j),W=P(j),G=P(j),K=P(j),me=1500;function q(e){return e===`completed`||e===`failed`||e===`cancelled`}var J=w({source:null,runId:null,state:null,reason:null,counters:null,proposalRefs:[],starting:!1,cancelling:!1,errorCode:null,error:null,pollError:null}),Y=w({open:!1,loading:!1,error:null,proposals:[]}),X=null;function Z(){X!==null&&(clearTimeout(X),X=null)}function he(){Z(),X=setTimeout(()=>{Q()},me)}function ge(e){if(e instanceof A)switch(e.code){case`DISTILL_ACTIVE_RUN`:return{code:e.code,message:`A distillation is already running for this workspace. Wait for it to finish or cancel it first.`};case`DISTILL_LIMIT`:return{code:e.code,message:`The proposal store is at capacity, so every proposal was refused. Decide or clear older proposals, then retry.`};case`DISTILL_IO`:return{code:e.code,message:`A distill registry IO error occurred: ${e.message}`};case`INVALID_OPERATION`:return{code:e.code,message:`Only an imported workspace can be distilled to the global wiki.`};case`NOT_FOUND`:return{code:e.code,message:`The workspace is no longer registered. Re-import it and retry.`};default:return{code:String(e.code),message:e.message}}return{code:`UNAVAILABLE`,message:e instanceof Error?e.message:String(e)}}async function _e(e){if(J.starting||J.runId!==null&&!ve())return{outcome:`rejected`,code:`INVALID_OPERATION`,message:`A distillation run is already in progress.`};let t=U.issue();J.starting=!0,J.error=null,J.errorCode=null,J.pollError=null,J.source=e,J.runId=null,J.state=null,J.reason=null,J.counters=null,J.proposalRefs=[],Y.open=!1,Y.proposals=[],Y.error=null,Z();try{let{runId:n}=await N().wiki.distill.start({source:e});return t.isCurrent()?(J.runId=n,Q(),{outcome:`started`,runId:n}):null}catch(e){if(!t.isCurrent())return null;let n=ge(e);return J.errorCode=n.code,J.error=n.message,{outcome:`rejected`,...n}}finally{t.isLatest()&&(J.starting=!1)}}function ve(){return J.state!==null&&q(J.state)}async function Q(){let e=J.runId;if(e===null)return;let t=W.issue();try{let n=await N().wiki.distill.status({runId:e});if(!t.isCurrent()||J.runId!==e)return;if(J.state=n.state,J.reason=n.reason,J.counters=n.counters,J.proposalRefs=[...n.proposalRefs],J.pollError=null,q(n.state)){Z(),Y.open&&$();return}n.state===`awaiting-approval`&&Y.open&&$(),he()}catch(e){if(!t.isCurrent())return;J.pollError=e instanceof Error?e.message:String(e),Z()}}async function ye(){let e=J.runId;if(e===null||J.cancelling)return!1;let t=G.issue();J.cancelling=!0;try{let n=await N().wiki.distill.cancel({runId:e});return!t.isCurrent()||J.runId!==e?!1:(J.state=n.state,J.error=null,J.errorCode=null,q(n.state)?(Z(),Y.open&&$()):Q(),!0)}catch(e){if(!t.isCurrent())return!1;let n=ge(e);return J.errorCode=n.code,J.error=n.message,!1}finally{t.isLatest()&&(J.cancelling=!1)}}var be=M({runId:O(),ordinal:k().int().nonnegative()});async function $(){let e=J.runId;if(e===null)return;let t=K.issue();Y.loading=!0;try{let n=await N().agent.proposals.list({});if(!t.isCurrent()||J.runId!==e)return;let r=[];for(let t of n.proposals){if(t.capability!==`wiki.distill_apply`)continue;let n=be.safeParse(t.payload);n.success&&n.data.runId===e&&r.push({view:t,ordinal:n.data.ordinal})}r.sort((e,t)=>e.ordinal-t.ordinal),Y.proposals=r,Y.error=null}catch(e){if(!t.isCurrent())return;Y.error=e instanceof Error?e.message:String(e)}finally{t.isLatest()&&(Y.loading=!1)}}function xe(e){Y.open=e,e&&J.runId!==null&&$()}function Se(){U.invalidate(),W.invalidate(),G.invalidate(),K.invalidate(),Z(),J.source=null,J.runId=null,J.state=null,J.reason=null,J.counters=null,J.proposalRefs=[],J.starting=!1,J.cancelling=!1,J.errorCode=null,J.error=null,J.pollError=null,Y.open=!1,Y.loading=!1,Y.error=null,Y.proposals=[]}var Ce=n(`<!> Distill to global`,1),we=n(`<!> Add fragment`,1),Te=n(`<!> <span class="min-w-0 flex-1 text-sm font-medium">Distilling fragments to the global wiki…</span>`,1),Ee=n(`<!> <span class="min-w-0 flex-1 text-sm font-medium text-destructive">Couldn't start the distillation</span>`,1),De=n(`<!> <span class="min-w-0 flex-1 text-sm font-medium">Distillation failed</span>`,1),Oe=n(`<!> <span class="min-w-0 flex-1 text-sm font-medium">Distillation completed</span>`,1),ke=n(`<span class="min-w-0 flex-1 text-sm font-medium">Distillation cancelled</span>`),Ae=n(`<!> <span class="min-w-0 flex-1 text-sm font-medium">Distilling to the global wiki…</span>`,1),je=n(`<p>Collecting this workspace's fragments and asking the model for generalizations — this
|
|
2
2
|
can take up to two minutes.</p>`),Me=n(`<p class="break-words text-destructive/90"> </p>`),Ne=n(`<p> </p>`),Pe=n(`<p>Cancelled — no proposal was applied.</p>`),Fe=n(`<p class="font-mono"> </p>`),Ie=n(`<p class="break-words text-destructive/90" role="alert"> </p>`),Le=n(`<!> Cancel run`,1),Re=n(`<p class="flex items-center gap-2 text-xs text-muted-foreground" role="status"><!> Loading proposals…</p>`),ze=n(`<p class="break-words text-xs text-destructive" role="alert"> </p>`),Be=n(`<p class="text-xs text-muted-foreground">No proposals found for this run.</p>`),Ve=n(`<div class="mt-3 space-y-2 border-t border-border/60 pt-3"><!> <!></div>`),He=n(`<section aria-label="Distill to global" class="rounded-lg border border-border bg-background p-4"><div class="flex flex-wrap items-center gap-2"><!> <!></div> <div class="mt-1 min-w-0 space-y-1 text-xs text-muted-foreground"><!> <!> <!></div> <div class="mt-3 flex flex-wrap justify-end gap-2"><!> <!> <!></div> <!></section>`),Ue=n(`<!> Add to wiki`,1),We=n(`<section aria-label="Add a fragment" class="rounded-lg border border-border bg-background p-4"><div class="flex items-center justify-between gap-2"><h2 class="text-sm font-medium">New fragment</h2> <!></div> <div class="mt-3 space-y-3"><label class="block space-y-1.5"><span class="text-xs font-medium text-muted-foreground">Title</span> <!></label> <label class="block space-y-1.5"><span class="text-xs font-medium text-muted-foreground">Note</span> <!></label> <div class="flex justify-end gap-2"><!> <!></div></div></section>`),Ge=n(`<div class="flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/10 p-4" role="alert"><!> <div class="min-w-0 flex-1"><p class="text-sm font-medium text-destructive">Couldn't load the wiki</p> <p class="mt-1 break-words text-xs text-destructive/90"> </p></div> <!></div>`),Ke=n(`<div class="space-y-3" aria-label="Loading wiki"><div class="h-16 animate-pulse rounded-lg border border-border bg-muted/50"></div> <div class="h-16 animate-pulse rounded-lg border border-border bg-muted/50"></div></div>`),qe=n(`<!> Add the first fragment`,1),Je=n(`<div class="rounded-lg border border-dashed border-border p-8 text-center"><!> <p class="mt-3 text-sm font-medium">No fragments yet</p> <p class="mt-1 text-xs text-muted-foreground">Capture recurring insights here; they become the input for skill evolution.</p> <!></div>`),Ye=n(`<p class="flex items-center gap-2 text-xs text-muted-foreground" role="status"><!> Loading…</p>`),Xe=n(`<p class="text-xs text-destructive" role="alert"> </p>`),Ze=n(`<pre class="max-h-72 overflow-y-auto whitespace-pre-wrap break-words rounded-md bg-muted/40 p-3 text-xs leading-relaxed"> </pre>`),Qe=n(`<div class="border-t border-border/60 px-3 py-2.5"><!></div>`),$e=n(`<li><button class="flex min-h-11 w-full items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-muted/50"><span class="min-w-0 flex-1"><span class="block truncate text-sm font-medium"> </span> <span class="block truncate font-mono text-xs text-muted-foreground"> </span></span> <!> <span class="shrink-0 text-xs text-muted-foreground"> </span></button> <!></li>`),et=n(`<li class="px-3 py-6 text-center text-xs text-muted-foreground"> </li>`),tt=n(`<!> <ul class="divide-y divide-border rounded-lg border border-border"></ul>`,1),nt=n(`<div class="flex h-full flex-col overflow-y-auto p-5"><header class="flex shrink-0 items-start justify-between gap-3 border-b border-border pb-4 max-[720px]:flex-col max-[720px]:gap-2.5"><div class="min-w-0 max-[720px]:w-full"><div class="flex items-center gap-2"><!> <h1 tabindex="-1" class="min-w-0 flex-1 truncate text-lg font-semibold outline-none"> </h1></div> <p class="mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground"><!> <span class="min-w-0 max-[720px]:truncate"> </span></p></div> <div class="flex shrink-0 items-center gap-1.5 max-[720px]:w-full"><!> <!> <!></div></header> <div class="mx-auto mt-5 w-full max-w-3xl space-y-4"><!> <!> <!></div></div>`);function rt(n,u){r(u,!0);let O=D(),k=m(()=>O?.()?.wsId),A=m(()=>ee.parse(d(k)??`~`)),j=m(()=>ne.workspaces.find(e=>e.id===d(A))?.label??(d(A)===`~`?`Global`:d(A))),M=y(``),N=y(!1),P=y(``),U=y(``),W=y(!1),G=y(w({})),K=y(null),me=m(()=>{let e=d(M).trim().toLowerCase();return e===``?V.patterns:V.patterns.filter(t=>t.title.toLowerCase().includes(e)||t.name.toLowerCase().includes(e))});S(()=>{de(d(A))}),S(()=>()=>{le(),Se()}),S(()=>{d(K)?.focus()});async function X(){await de(d(A))}function Z(){p(N,!0),p(P,``),p(U,``)}async function he(){let e=d(P).trim(),t=d(U);if(!(e===``||d(W))){p(W,!0);try{let n=await fe(d(A),{title:e,body:t});if(n===null)return;n.deduplicated?F(`Already captured as “${n.item.title}”.`):F(`Added “${n.item.title}” to the wiki.`),p(N,!1),p(P,``),p(U,``)}catch(e){F(e instanceof Error?e.message:String(e))}finally{p(W,!1)}}}async function ge(e){if(d(G)[e.name]?.read){delete d(G)[e.name],p(G,{...d(G)},!0);return}p(G,{...d(G),[e.name]:{loading:!0,error:null,read:null}},!0);try{let t=await ue(d(A),e.name);p(G,{...d(G),[e.name]:{loading:!1,error:null,read:t}},!0)}catch(t){p(G,{...d(G),[e.name]:{loading:!1,error:t instanceof Error?t.message:String(t),read:null}},!0)}}let ve={collecting:`collecting`,"kernel-running":`running model`,"awaiting-approval":`awaiting approval`,completed:`completed`,failed:`failed`,cancelled:`cancelled`},Q={"no-valid-proposals":`The model produced no valid proposals, so nothing was generalized.`,capacity:`The proposal store was at capacity; every proposal was refused.`,io:`A disk error interrupted the run.`,timeout:`The model run timed out.`,"kernel-unavailable":`The agent kernel is unavailable right now.`,restarted:`The daemon restarted and the run was cancelled.`,"cancelled-by-shutdown":`The daemon stopped and the run was cancelled.`},be=[`applied`,`idempotent`,`stale`,`patch-failed`,`model-invalid`,`rejected`,`expired`,`not-proposed`,`io-failed`],$=m(()=>J.starting||J.runId!==null&&J.state!==null&&!q(J.state)),rt=m(()=>J.starting||J.runId!==null||J.error!==null),it=m(()=>J.proposalRefs.filter(e=>e.status===`pending`||e.status===`applying`).length),at=m(()=>{let e=J.counters;if(e===null)return``;let t=[];for(let n of be){let r=e[n];r>0&&t.push(`${n} ${r}`)}return t.join(` · `)});async function ot(){await _e(d(A))}var st=nt(),ct=x(st),lt=x(ct),ut=x(lt),dt=x(ut);I(dt,{variant:`ghost`,size:`icon`,class:`h-8 w-8 shrink-0 max-[720px]:h-11 max-[720px]:w-11`,title:`Back to wiki scopes`,"aria-label":`Back to wiki scopes`,onclick:()=>void E(`/wiki`),children:(e,t)=>{pe(e,{class:`h-4 w-4`})},$$slots:{default:!0}});var ft=_(dt,2),pt=f(ft);g(ft,e=>p(K,e),()=>d(K)),t(ut);var mt=_(ut,2),ht=x(mt),gt=e=>{H(e,{variant:`secondary`,class:`shrink-0`,children:(e,t)=>{h();var n=l(`~ global`);s(e,n)},$$slots:{default:!0}})},_t=e=>{H(e,{variant:`secondary`,class:`shrink-0`,children:(e,t)=>{h();var n=l(`workspace`);s(e,n)},$$slots:{default:!0}})};o(ht,e=>{d(A)===`~`?e(gt):e(_t,-1)});var vt=_(ht,2),yt=f(vt);t(mt),t(lt);var bt=_(lt,2),xt=x(bt);I(xt,{variant:`ghost`,size:`icon`,class:`h-9 w-9 max-[720px]:h-11 max-[720px]:w-11`,title:`Refresh wiki`,"aria-label":`Refresh wiki`,get disabled(){return V.loading},onclick:()=>void X(),children:(e,t)=>{var n=T(),r=C(n),i=e=>{L(e,{class:`h-4 w-4 animate-spin`})},a=e=>{ce(e,{class:`h-4 w-4`})};o(r,e=>{V.loading?e(i):e(a,-1)}),s(e,n)},$$slots:{default:!0}});var St=_(xt,2),Ct=e=>{I(e,{size:`sm`,variant:`outline`,class:`max-[720px]:h-11`,title:`Distill this workspace's fragments into the global wiki`,get disabled(){return d($)},onclick:()=>void ot(),children:(e,t)=>{var n=Ce(),r=C(n);se(r,{class:`h-4 w-4`}),h(),s(e,n)},$$slots:{default:!0}})};o(St,e=>{d(A)!==`~`&&e(Ct)});var wt=_(St,2);I(wt,{size:`sm`,class:`max-[720px]:h-11`,onclick:Z,children:(e,t)=>{var n=we(),r=C(n);z(r,{class:`h-4 w-4`}),h(),s(e,n)},$$slots:{default:!0}}),t(bt),t(ct);var Tt=_(ct,2),Et=x(Tt),Dt=n=>{var r=He(),a=x(r),c=x(a),u=e=>{var t=Te(),n=C(t);L(n,{class:`h-4 w-4 shrink-0 animate-spin text-muted-foreground`}),h(2),s(e,t)},p=e=>{var t=Ee(),n=C(t);B(n,{class:`h-4 w-4 shrink-0 text-destructive`}),h(2),s(e,t)},g=e=>{var t=De(),n=C(t);B(n,{class:`h-4 w-4 shrink-0 text-destructive`}),h(2),s(e,t)},v=e=>{var t=Oe(),n=C(t);ae(n,{class:`h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400`}),h(2),s(e,t)},y=e=>{var t=ke();s(e,t)},S=e=>{var t=Ae(),n=C(t);L(n,{class:`h-4 w-4 shrink-0 animate-spin text-muted-foreground`}),h(2),s(e,t)};o(c,e=>{J.starting?e(u):J.runId===null&&J.error!==null?e(p,1):J.state===`failed`?e(g,2):J.state===`completed`?e(v,3):J.state===`cancelled`?e(y,4):J.state!==null&&e(S,5)});var w=_(c,2),E=e=>{{let t=m(()=>J.state===`failed`?`destructive`:J.state===`awaiting-approval`?`default`:J.state===`completed`||J.state===`cancelled`?`outline`:`secondary`);H(e,{class:`shrink-0`,get variant(){return d(t)},children:(e,t)=>{h();var n=l();b(()=>i(n,ve[J.state])),s(e,n)},$$slots:{default:!0}})}};o(w,e=>{J.state!==null&&e(E)}),t(a);var D=_(a,2),O=x(D),k=e=>{var t=je();s(e,t)},A=e=>{var t=Me(),n=f(t,!0);b(()=>i(n,J.error)),s(e,t)},j=e=>{var t=Ne(),n=f(t);b(()=>i(n,`${J.proposalRefs.length??``}
|
|
3
3
|
${J.proposalRefs.length===1?`proposal`:`proposals`}
|
|
4
4
|
ready for review (${d(it)??``} pending). Nothing is written to the global wiki
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{At as e,B as t,Ct as n,D as r,F as i,N as a,Q as o,R as s,St as c,U as l,X as u,a as d,ft as f,gt as p,i as m,it as h,l as g,lt as _,mt as v,nt as y,ot as b,r as x,rt as S,st as C,z as w}from"../chunks/CmCJ0SKP.js";import{t as T}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";var E={},D=t(`<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>`),O=t(`<!> <!>`,1);function k(t,m){n(m,!0);let T=d(m,`components`,23,()=>[]),E=d(m,`data_0`,3,null),k=d(m,`data_1`,3,null);h(()=>m.stores.page.set(m.page)),S(()=>{m.stores,m.page,m.constructors,T(),m.form,E(),k(),m.stores.page.notify()});let A=v(!1),j=v(!1),M=v(null);x(()=>{let e=m.stores.page.subscribe(()=>{u(A)&&(f(j,!0),o().then(()=>{f(M,document.title||`untitled page`,!0)}))});return f(A,!0),e});let N=p(()=>m.constructors[1]);var P=O(),F=C(P),I=e=>{let t=p(()=>m.constructors[0]);var n=w(),i=C(n);r(i,()=>u(t),(e,t)=>{g(t(e,{get data(){return E()},get form(){return m.form},get params(){return m.page.params},children:(e,t)=>{var n=w(),i=C(n);r(i,()=>u(N),(e,t)=>{g(t(e,{get data(){return k()},get form(){return m.form},get params(){return m.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),s(e,n)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),s(e,n)},L=e=>{let t=p(()=>m.constructors[0]);var n=w(),i=C(n);r(i,()=>u(t),(e,t)=>{g(t(e,{get data(){return E()},get form(){return m.form},get params(){return m.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),s(e,n)};a(F,e=>{m.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=t=>{var n=D(),r=b(n),o=e=>{var t=l();y(()=>i(t,u(M))),s(e,t)};a(r,e=>{u(j)&&e(o)}),e(n),s(t,n)};a(R,e=>{u(A)&&e(z)}),s(t,P),c()}var A=m(k),j=[()=>T(()=>import(`../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BXeEkneG.js","../chunks/CmCJ0SKP.js","../chunks/DjZ7hdjX.js","../chunks/HclGiUj8.js","../chunks/xihTtKlq.js","../chunks/BDMeqoYB.js","../chunks/eFUKcYMv.js","../chunks/BkEnd9_Z.js","../chunks/DH8yd93-.js","../chunks/pd7EK5wP.js","../chunks/DF_TIB7n.js","../assets/shell.U4CQV8re.css","../chunks/BT2vrlul.js","../chunks/CzkhJhvt.js","../chunks/B8aGNSaH.js","../chunks/BTMBuftG.js","../chunks/1aUphu7Y.js","../chunks/DC5f4JBB.js","../chunks/DnPeA-9c.js","../chunks/BEPs9Z9s.js","../chunks/a0LlqeqU.js","../chunks/DZ_Kltd5.js","../chunks/DOjT7y5f.js","../chunks/DApmS1g_.js","../chunks/M-b0y9AQ.js","../chunks/Cy5ABld-.js","../chunks/F_BrNiaz.js","../chunks/CpRvgjpe.js","../chunks/UeEccMjN.js","../chunks/BIfnT_mK.js","../chunks/DvWG9eQi.js","../chunks/HopcQwhZ.js","../chunks/ChvFFUWR.js","../chunks/C67g-p2T.js","../assets/0.DLmCZ2fP.css","../nodes/1.DzYWdh98.js","../nodes/2.Dl1DQV0d.js","../nodes/3.DCVfhckZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{At as e,B as t,Ct as n,D as r,F as i,N as a,Q as o,R as s,St as c,U as l,X as u,a as d,ft as f,gt as p,i as m,it as h,l as g,lt as _,mt as v,nt as y,ot as b,r as x,rt as S,st as C,z as w}from"../chunks/CmCJ0SKP.js";import{t as T}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";var E={},D=t(`<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>`),O=t(`<!> <!>`,1);function k(t,m){n(m,!0);let T=d(m,`components`,23,()=>[]),E=d(m,`data_0`,3,null),k=d(m,`data_1`,3,null);h(()=>m.stores.page.set(m.page)),S(()=>{m.stores,m.page,m.constructors,T(),m.form,E(),k(),m.stores.page.notify()});let A=v(!1),j=v(!1),M=v(null);x(()=>{let e=m.stores.page.subscribe(()=>{u(A)&&(f(j,!0),o().then(()=>{f(M,document.title||`untitled page`,!0)}))});return f(A,!0),e});let N=p(()=>m.constructors[1]);var P=O(),F=C(P),I=e=>{let t=p(()=>m.constructors[0]);var n=w(),i=C(n);r(i,()=>u(t),(e,t)=>{g(t(e,{get data(){return E()},get form(){return m.form},get params(){return m.page.params},children:(e,t)=>{var n=w(),i=C(n);r(i,()=>u(N),(e,t)=>{g(t(e,{get data(){return k()},get form(){return m.form},get params(){return m.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),s(e,n)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),s(e,n)},L=e=>{let t=p(()=>m.constructors[0]);var n=w(),i=C(n);r(i,()=>u(t),(e,t)=>{g(t(e,{get data(){return E()},get form(){return m.form},get params(){return m.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),s(e,n)};a(F,e=>{m.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=t=>{var n=D(),r=b(n),o=e=>{var t=l();y(()=>i(t,u(M))),s(e,t)};a(r,e=>{u(j)&&e(o)}),e(n),s(t,n)};a(R,e=>{u(A)&&e(z)}),s(t,P),c()}var A=m(k),j=[()=>T(()=>import(`../nodes/0.BXeEkneG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url),()=>T(()=>import(`../nodes/1.DzYWdh98.js`),__vite__mapDeps([35,1,4,5,2]),import.meta.url),()=>T(()=>import(`../nodes/2.Dl1DQV0d.js`),__vite__mapDeps([36,1,2,4,6,21]),import.meta.url),()=>T(()=>import(`../nodes/3.DCVfhckZ.js`),__vite__mapDeps([37,1,4,21]),import.meta.url)],M=[],N={"/":[2],"/[...catch]":[3]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"../chunks/DjZ7hdjX.js";export{e as load_css,t as start};
|