kaizenai 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/client/assets/{FeatureOverviewPage-BirqNTQI.js → FeatureOverviewPage-CFYLJ3BM.js} +1 -1
  2. package/dist/client/assets/FeatureOverviewPage-CFYLJ3BM.js.br +0 -0
  3. package/dist/client/assets/FeatureOverviewPage-CFYLJ3BM.js.gz +0 -0
  4. package/dist/client/assets/{LocalProjectsPage-CUrz_W-H.js → LocalProjectsPage-rVcfQqeI.js} +1 -1
  5. package/dist/client/assets/LocalProjectsPage-rVcfQqeI.js.br +0 -0
  6. package/dist/client/assets/LocalProjectsPage-rVcfQqeI.js.gz +0 -0
  7. package/dist/client/assets/SettingsPage-DQ7vlMU3.js +51 -0
  8. package/dist/client/assets/SettingsPage-DQ7vlMU3.js.br +0 -0
  9. package/dist/client/assets/SettingsPage-DQ7vlMU3.js.gz +0 -0
  10. package/dist/client/assets/{eye-DDtWGlwo.js → eye-BoB-RrDz.js} +1 -1
  11. package/dist/client/assets/eye-BoB-RrDz.js.br +0 -0
  12. package/dist/client/assets/eye-BoB-RrDz.js.gz +0 -0
  13. package/dist/client/assets/{index-BAzvPbMu.js → index-C6T6qDr6.js} +3 -3
  14. package/dist/client/assets/index-C6T6qDr6.js.br +0 -0
  15. package/dist/client/assets/index-C6T6qDr6.js.gz +0 -0
  16. package/dist/client/index.html +1 -1
  17. package/dist/server/build-target.json +1 -1
  18. package/dist/server/cli-supervisor.js +1 -1
  19. package/dist/server/cli.js +14 -7
  20. package/package.json +1 -1
  21. package/dist/client/assets/FeatureOverviewPage-BirqNTQI.js.br +0 -0
  22. package/dist/client/assets/FeatureOverviewPage-BirqNTQI.js.gz +0 -0
  23. package/dist/client/assets/LocalProjectsPage-CUrz_W-H.js.br +0 -0
  24. package/dist/client/assets/LocalProjectsPage-CUrz_W-H.js.gz +0 -0
  25. package/dist/client/assets/SettingsPage-CyQ5qYJC.js +0 -51
  26. package/dist/client/assets/SettingsPage-CyQ5qYJC.js.br +0 -0
  27. package/dist/client/assets/SettingsPage-CyQ5qYJC.js.gz +0 -0
  28. package/dist/client/assets/eye-DDtWGlwo.js.br +0 -0
  29. package/dist/client/assets/eye-DDtWGlwo.js.gz +0 -0
  30. package/dist/client/assets/index-BAzvPbMu.js.br +0 -0
  31. package/dist/client/assets/index-BAzvPbMu.js.gz +0 -0
@@ -1,4 +1,4 @@
1
- import{c as Te,a as Ve,u as De,b as qe,d as Be,e as He,f as $e,r as c,g as Ge,h as Ke,i as Z,j as Qe,k as l,B as Pe,E as Je,l as We,m as Xe,n as Ye,S as Ze,M as et,T as tt,C as lt,o as st,P as Ae,R as nt,p as Ie,q as it}from"./index-BAzvPbMu.js";import{E as Me}from"./eye-DDtWGlwo.js";/**
1
+ import{c as Te,a as Ve,u as De,b as qe,d as Be,e as He,f as $e,r as c,g as Ge,h as Ke,i as Z,j as Qe,k as l,B as Pe,E as Je,l as We,m as Xe,n as Ye,S as Ze,M as et,T as tt,C as lt,o as st,P as Ae,R as nt,p as Ie,q as it}from"./index-C6T6qDr6.js";import{E as Me}from"./eye-BoB-RrDz.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as U,a as $,i as O,k as t,r as b,D as fe,s as je,t as pe,v as ge,w as be,x as Ne,I as se,B as A,S as ve,L as T,y as we,z as de,F as Pe,A as ye,G as S,H as D,J as Ce,K as ke,m as V,g as F,N as Se,O as Le,h as ne,Q as Ee,U as re,V as $e,W as Ie,X as He,Y as Oe,Z as Ae,_ as Re,b as Te,e as Fe,$ as _e,a0 as De}from"./index-BAzvPbMu.js";/**
1
+ import{c as U,a as $,i as O,k as t,r as b,D as fe,s as je,t as pe,v as ge,w as be,x as Ne,I as se,B as A,S as ve,L as T,y as we,z as de,F as Pe,A as ye,G as S,H as D,J as Ce,K as ke,m as V,g as F,N as Se,O as Le,h as ne,Q as Ee,U as re,V as $e,W as Ie,X as He,Y as Oe,Z as Ae,_ as Re,b as Te,e as Fe,$ as _e,a0 as De}from"./index-C6T6qDr6.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,51 @@
1
+ import{c as _e,a as Ne,i as ve,a1 as fa,k as n,d as ha,a2 as ga,a3 as ft,a4 as bt,I as be,a5 as L,a6 as $,a7 as F,a8 as z,a9 as Es,aa as yr,B as Y,Y as _r,ab as N,ac as Ye,ad as kr,K as wr,ae as Ze,af as jr,T as On,ag as Nr,ah as xs,ai as vs,u as Cr,aj as Er,ak as Tr,b as Rr,e as Ar,$ as Sr,a0 as Ir,r as y,al as Pr,N as Or,am as Ce,an as Ee,ao as Te,O as le,ap as Re,aq as Mn,ar as Mr,as as Dr,at as cs,au as Lr,av as G,g as ge,h as pe,G as Dn,aw as pa,L as ue,ax as Ln,m as xe,ay as $n,E as $r,X as zr,V as Br,W as Ur,az as us,aA as ms,aB as fs,aC as Vr,aD as hs,aE as zn,aF as Bn,aG as Zr,aH as Un,aI as Vn,aJ as Fr,aK as Dt,aL as Lt,aM as Kr,aN as ht,aO as bs,aP as Ae,aQ as qr,aR as Zn,aS as Fn,aT as Hr,aU as Wr,aV as Gr,aW as Yr,aX as Kn,aY as Qr}from"./index-C6T6qDr6.js";import{E as qn}from"./eye-BoB-RrDz.js";/**
2
+ * @license lucide-react v0.562.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Jr=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Xr=_e("bell",Jr);/**
7
+ * @license lucide-react v0.562.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ei=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],xa=_e("cloud-download",ei);/**
12
+ * @license lucide-react v0.562.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const ti=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],si=_e("command",ti);/**
17
+ * @license lucide-react v0.562.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const ni=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Hn=_e("eye-off",ni);/**
22
+ * @license lucide-react v0.562.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const ai=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ri=_e("info",ai);/**
27
+ * @license lucide-react v0.562.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const ii=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],li=_e("message-square-quote",ii);/**
32
+ * @license lucide-react v0.562.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const oi=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],di=_e("palette",oi);/**
37
+ * @license lucide-react v0.562.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const ci=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],va=_e("rotate-ccw",ci);/**
42
+ * @license lucide-react v0.562.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const ui=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],mi=_e("settings-2",ui);/**
47
+ * @license lucide-react v0.562.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const fi=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],hi=_e("shield",fi),gi="https://kaizenai.codes";function pi(t){return gi}function xi(t){return pi()}function vi(t,e){return`${((t==null?void 0:t.trim())||xi()).replace(/\/+$/,"")}/dashboard`}function Se(t){const e=Ne.c(18);let s,a,r,l,d,o;e[0]!==t?({children:s,className:a,icon:r,type:d,variant:o,...l}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l,e[5]=d,e[6]=o):(s=e[1],a=e[2],r=e[3],l=e[4],d=e[5],o=e[6]);const c=d===void 0?"button":d,f=o===void 0?"outline":o;let v;e[7]!==a||e[8]!==f?(v=ve(fa({variant:f,size:"sm"}),"h-auto gap-1.5 px-3 py-1.5",a),e[7]=a,e[8]=f,e[9]=v):v=e[9];let k;e[10]!==s?(k=s?n.jsx("span",{children:s}):null,e[10]=s,e[11]=k):k=e[11];let P;return e[12]!==r||e[13]!==l||e[14]!==v||e[15]!==k||e[16]!==c?(P=n.jsxs("button",{type:c,className:v,...l,children:[r,k]}),e[12]=r,e[13]=l,e[14]=v,e[15]=k,e[16]=c,e[17]=P):P=e[17],P}var S;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function s(r){throw new Error}t.assertNever=s,t.arrayToEnum=r=>{const l={};for(const d of r)l[d]=d;return l},t.getValidEnumValues=r=>{const l=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),d={};for(const o of l)d[o]=r[o];return t.objectValues(d)},t.objectValues=r=>t.objectKeys(r).map(function(l){return r[l]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const l=[];for(const d in r)Object.prototype.hasOwnProperty.call(r,d)&&l.push(d);return l},t.find=(r,l)=>{for(const d of r)if(l(d))return d},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,l=" | "){return r.map(d=>typeof d=="string"?`'${d}'`:d).join(l)}t.joinValues=a,t.jsonStringifyReplacer=(r,l)=>typeof l=="bigint"?l.toString():l})(S||(S={}));var Wn;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(Wn||(Wn={}));const x=S.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ie=t=>{switch(typeof t){case"undefined":return x.undefined;case"string":return x.string;case"number":return Number.isNaN(t)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(t)?x.array:t===null?x.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?x.promise:typeof Map<"u"&&t instanceof Map?x.map:typeof Set<"u"&&t instanceof Set?x.set:typeof Date<"u"&&t instanceof Date?x.date:x.object;default:return x.unknown}},m=S.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class je extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(l){return l.message},a={_errors:[]},r=l=>{for(const d of l.issues)if(d.code==="invalid_union")d.unionErrors.map(r);else if(d.code==="invalid_return_type")r(d.returnTypeError);else if(d.code==="invalid_arguments")r(d.argumentsError);else if(d.path.length===0)a._errors.push(s(d));else{let o=a,c=0;for(;c<d.path.length;){const f=d.path[c];c===d.path.length-1?(o[f]=o[f]||{_errors:[]},o[f]._errors.push(s(d))):o[f]=o[f]||{_errors:[]},o=o[f],c++}}};return r(this),a}static assert(e){if(!(e instanceof je))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,S.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s={},a=[];for(const r of this.issues)if(r.path.length>0){const l=r.path[0];s[l]=s[l]||[],s[l].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:s}}get formErrors(){return this.flatten()}}je.create=t=>new je(t);const ys=(t,e)=>{let s;switch(t.code){case m.invalid_type:t.received===x.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case m.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,S.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:s=`Unrecognized key(s) in object: ${S.joinValues(t.keys,", ")}`;break;case m.invalid_union:s="Invalid input";break;case m.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${S.joinValues(t.options)}`;break;case m.invalid_enum_value:s=`Invalid enum value. Expected ${S.joinValues(t.options)}, received '${t.received}'`;break;case m.invalid_arguments:s="Invalid function arguments";break;case m.invalid_return_type:s="Invalid function return type";break;case m.invalid_date:s="Invalid date";break;case m.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:S.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case m.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case m.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case m.custom:s="Invalid input";break;case m.invalid_intersection_types:s="Intersection results could not be merged";break;case m.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case m.not_finite:s="Number must be finite";break;default:s=e.defaultError,S.assertNever(t)}return{message:s}};let bi=ys;function yi(){return bi}const _i=t=>{const{data:e,path:s,errorMaps:a,issueData:r}=t,l=[...s,...r.path||[]],d={...r,path:l};if(r.message!==void 0)return{...r,path:l,message:r.message};let o="";const c=a.filter(f=>!!f).slice().reverse();for(const f of c)o=f(d,{data:e,defaultError:o}).message;return{...r,path:l,message:o}};function h(t,e){const s=yi(),a=_i({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===ys?void 0:ys].filter(r=>!!r)});t.common.issues.push(a)}class oe{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,s){const a=[];for(const r of s){if(r.status==="aborted")return w;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,s){const a=[];for(const r of s){const l=await r.key,d=await r.value;a.push({key:l,value:d})}return oe.mergeObjectSync(e,a)}static mergeObjectSync(e,s){const a={};for(const r of s){const{key:l,value:d}=r;if(l.status==="aborted"||d.status==="aborted")return w;l.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof d.value<"u"||r.alwaysSet)&&(a[l.value]=d.value)}return{status:e.value,value:a}}}const w=Object.freeze({status:"aborted"}),xt=t=>({status:"dirty",value:t}),me=t=>({status:"valid",value:t}),Gn=t=>t.status==="aborted",Yn=t=>t.status==="dirty",Je=t=>t.status==="valid",zt=t=>typeof Promise<"u"&&t instanceof Promise;var b;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(b||(b={}));class Me{constructor(e,s,a,r){this._cachedPath=[],this.parent=e,this.data=s,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qn=(t,e)=>{if(Je(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new je(t.common.issues);return this._error=s,this._error}}};function E(t){if(!t)return{};const{errorMap:e,invalid_type_error:s,required_error:a,description:r}=t;if(e&&(s||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(d,o)=>{const{message:c}=t;return d.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??a??o.defaultError}:d.code!=="invalid_type"?{message:o.defaultError}:{message:c??s??o.defaultError}},description:r}}class A{get description(){return this._def.description}_getType(e){return Ie(e.data)}_getOrReturnCtx(e,s){return s||{common:e.parent.common,data:e.data,parsedType:Ie(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new oe,ctx:{common:e.parent.common,data:e.data,parsedType:Ie(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const s=this._parse(e);if(zt(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(e){const s=this._parse(e);return Promise.resolve(s)}parse(e,s){const a=this.safeParse(e,s);if(a.success)return a.data;throw a.error}safeParse(e,s){const a={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ie(e)},r=this._parseSync({data:e,path:a.path,parent:a});return Qn(a,r)}"~validate"(e){var a,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ie(e)};if(!this["~standard"].async)try{const l=this._parseSync({data:e,path:[],parent:s});return Je(l)?{value:l.value}:{issues:s.common.issues}}catch(l){(r=(a=l==null?void 0:l.message)==null?void 0:a.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(l=>Je(l)?{value:l.value}:{issues:s.common.issues})}async parseAsync(e,s){const a=await this.safeParseAsync(e,s);if(a.success)return a.data;throw a.error}async safeParseAsync(e,s){const a={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ie(e)},r=this._parse({data:e,path:a.path,parent:a}),l=await(zt(r)?r:Promise.resolve(r));return Qn(a,l)}refine(e,s){const a=r=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(r):s;return this._refinement((r,l)=>{const d=e(r),o=()=>l.addIssue({code:m.custom,...a(r)});return typeof Promise<"u"&&d instanceof Promise?d.then(c=>c?!0:(o(),!1)):d?!0:(o(),!1)})}refinement(e,s){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof s=="function"?s(a,r):s),!1))}_refinement(e){return new et({schema:this,typeName:j.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return Oe.create(this,this._def)}nullable(){return tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ye.create(this)}promise(){return Zt.create(this,this._def)}or(e){return Ut.create([this,e],this._def)}and(e){return Vt.create(this,e,this._def)}transform(e){return new et({...E(this._def),schema:this,typeName:j.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const s=typeof e=="function"?e:()=>e;return new ws({...E(this._def),innerType:this,defaultValue:s,typeName:j.ZodDefault})}brand(){return new Fi({typeName:j.ZodBranded,type:this,...E(this._def)})}catch(e){const s=typeof e=="function"?e:()=>e;return new js({...E(this._def),innerType:this,catchValue:s,typeName:j.ZodCatch})}describe(e){const s=this.constructor;return new s({...this._def,description:e})}pipe(e){return Ts.create(this,e)}readonly(){return Ns.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ki=/^c[^\s-]{8,}$/i,wi=/^[0-9a-z]+$/,ji=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ni=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ci=/^[a-z0-9_-]{21}$/i,Ei=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ti=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ri=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ai="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gs;const Si=/^(?:(?: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])$/,Ii=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Pi=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Oi=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Mi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Di=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ba="((\\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])))",Li=new RegExp(`^${ba}$`);function ya(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${s}`}function $i(t){return new RegExp(`^${ya(t)}$`)}function zi(t){let e=`${ba}T${ya(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${s.join("|")})`,new RegExp(`^${e}$`)}function Bi(t,e){return!!((e==="v4"||!e)&&Si.test(t)||(e==="v6"||!e)&&Pi.test(t))}function Ui(t,e){if(!Ei.test(t))return!1;try{const[s]=t.split(".");if(!s)return!1;const a=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function Vi(t,e){return!!((e==="v4"||!e)&&Ii.test(t)||(e==="v6"||!e)&&Oi.test(t))}class Pe extends A{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const l=this._getOrReturnCtx(e);return h(l,{code:m.invalid_type,expected:x.string,received:l.parsedType}),w}const a=new oe;let r;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:m.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")e.data.length>l.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:m.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const d=e.data.length>l.value,o=e.data.length<l.value;(d||o)&&(r=this._getOrReturnCtx(e,r),d?h(r,{code:m.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):o&&h(r,{code:m.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")Ri.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"email",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")gs||(gs=new RegExp(Ai,"u")),gs.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"emoji",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")Ni.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"uuid",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")Ci.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"nanoid",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")ki.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")wi.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid2",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")ji.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"ulid",code:m.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),h(r,{validation:"url",code:m.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"regex",code:m.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?zi(l).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?Li.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?$i(l).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:m.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?Ti.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"duration",code:m.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?Bi(e.data,l.version)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"ip",code:m.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?Ui(e.data,l.alg)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"jwt",code:m.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?Vi(e.data,l.version)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cidr",code:m.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?Mi.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64",code:m.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?Di.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64url",code:m.invalid_string,message:l.message}),a.dirty()):S.assertNever(l);return{status:a.value,value:e.data}}_regex(e,s,a){return this.refinement(r=>e.test(r),{validation:s,code:m.invalid_string,...b.errToObj(a)})}_addCheck(e){return new Pe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...b.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...b.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...b.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...b.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...b.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...b.errToObj(e)})}regex(e,s){return this._addCheck({kind:"regex",regex:e,...b.errToObj(s)})}includes(e,s){return this._addCheck({kind:"includes",value:e,position:s==null?void 0:s.position,...b.errToObj(s==null?void 0:s.message)})}startsWith(e,s){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(s)})}endsWith(e,s){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(s)})}min(e,s){return this._addCheck({kind:"min",value:e,...b.errToObj(s)})}max(e,s){return this._addCheck({kind:"max",value:e,...b.errToObj(s)})}length(e,s){return this._addCheck({kind:"length",value:e,...b.errToObj(s)})}nonempty(e){return this.min(1,b.errToObj(e))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxLength(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}Pe.create=t=>new Pe({checks:[],typeName:j.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...E(t)});function Zi(t,e){const s=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=s>a?s:a,l=Number.parseInt(t.toFixed(r).replace(".","")),d=Number.parseInt(e.toFixed(r).replace(".",""));return l%d/10**r}class yt extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.number){const l=this._getOrReturnCtx(e);return h(l,{code:m.invalid_type,expected:x.number,received:l.parsedType}),w}let a;const r=new oe;for(const l of this._def.checks)l.kind==="int"?S.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:m.invalid_type,expected:"integer",received:"float",message:l.message}),r.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="multipleOf"?Zi(e.data,l.value)!==0&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:m.not_finite,message:l.message}),r.dirty()):S.assertNever(l);return{status:r.value,value:e.data}}gte(e,s){return this.setLimit("min",e,!0,b.toString(s))}gt(e,s){return this.setLimit("min",e,!1,b.toString(s))}lte(e,s){return this.setLimit("max",e,!0,b.toString(s))}lt(e,s){return this.setLimit("max",e,!1,b.toString(s))}setLimit(e,s,a,r){return new yt({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:a,message:b.toString(r)}]})}_addCheck(e){return new yt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(s)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&S.isInteger(e.value))}get isFinite(){let e=null,s=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(s===null||a.value>s)&&(s=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(s)&&Number.isFinite(e)}}yt.create=t=>new yt({checks:[],typeName:j.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...E(t)});class _t extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==x.bigint)return this._getInvalidInput(e);let a;const r=new oe;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),h(a,{code:m.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):S.assertNever(l);return{status:r.value,value:e.data}}_getInvalidInput(e){const s=this._getOrReturnCtx(e);return h(s,{code:m.invalid_type,expected:x.bigint,received:s.parsedType}),w}gte(e,s){return this.setLimit("min",e,!0,b.toString(s))}gt(e,s){return this.setLimit("min",e,!1,b.toString(s))}lte(e,s){return this.setLimit("max",e,!0,b.toString(s))}lt(e,s){return this.setLimit("max",e,!1,b.toString(s))}setLimit(e,s,a,r){return new _t({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:a,message:b.toString(r)}]})}_addCheck(e){return new _t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(s)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}_t.create=t=>new _t({checks:[],typeName:j.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...E(t)});class _s extends A{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.boolean,received:a.parsedType}),w}return me(e.data)}}_s.create=t=>new _s({typeName:j.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...E(t)});class Bt extends A{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const l=this._getOrReturnCtx(e);return h(l,{code:m.invalid_type,expected:x.date,received:l.parsedType}),w}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return h(l,{code:m.invalid_date}),w}const a=new oe;let r;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:m.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:m.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):S.assertNever(l);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Bt({...this._def,checks:[...this._def.checks,e]})}min(e,s){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(s)})}max(e,s){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(s)})}get minDate(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e!=null?new Date(e):null}}Bt.create=t=>new Bt({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:j.ZodDate,...E(t)});class Jn extends A{_parse(e){if(this._getType(e)!==x.symbol){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.symbol,received:a.parsedType}),w}return me(e.data)}}Jn.create=t=>new Jn({typeName:j.ZodSymbol,...E(t)});class Xn extends A{_parse(e){if(this._getType(e)!==x.undefined){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.undefined,received:a.parsedType}),w}return me(e.data)}}Xn.create=t=>new Xn({typeName:j.ZodUndefined,...E(t)});class ea extends A{_parse(e){if(this._getType(e)!==x.null){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.null,received:a.parsedType}),w}return me(e.data)}}ea.create=t=>new ea({typeName:j.ZodNull,...E(t)});class ta extends A{constructor(){super(...arguments),this._any=!0}_parse(e){return me(e.data)}}ta.create=t=>new ta({typeName:j.ZodAny,...E(t)});class sa extends A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return me(e.data)}}sa.create=t=>new sa({typeName:j.ZodUnknown,...E(t)});class De extends A{_parse(e){const s=this._getOrReturnCtx(e);return h(s,{code:m.invalid_type,expected:x.never,received:s.parsedType}),w}}De.create=t=>new De({typeName:j.ZodNever,...E(t)});class na extends A{_parse(e){if(this._getType(e)!==x.undefined){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.void,received:a.parsedType}),w}return me(e.data)}}na.create=t=>new na({typeName:j.ZodVoid,...E(t)});class ye extends A{_parse(e){const{ctx:s,status:a}=this._processInputParams(e),r=this._def;if(s.parsedType!==x.array)return h(s,{code:m.invalid_type,expected:x.array,received:s.parsedType}),w;if(r.exactLength!==null){const d=s.data.length>r.exactLength.value,o=s.data.length<r.exactLength.value;(d||o)&&(h(s,{code:d?m.too_big:m.too_small,minimum:o?r.exactLength.value:void 0,maximum:d?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&s.data.length<r.minLength.value&&(h(s,{code:m.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&s.data.length>r.maxLength.value&&(h(s,{code:m.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),s.common.async)return Promise.all([...s.data].map((d,o)=>r.type._parseAsync(new Me(s,d,s.path,o)))).then(d=>oe.mergeArray(a,d));const l=[...s.data].map((d,o)=>r.type._parseSync(new Me(s,d,s.path,o)));return oe.mergeArray(a,l)}get element(){return this._def.type}min(e,s){return new ye({...this._def,minLength:{value:e,message:b.toString(s)}})}max(e,s){return new ye({...this._def,maxLength:{value:e,message:b.toString(s)}})}length(e,s){return new ye({...this._def,exactLength:{value:e,message:b.toString(s)}})}nonempty(e){return this.min(1,e)}}ye.create=(t,e)=>new ye({type:t,minLength:null,maxLength:null,exactLength:null,typeName:j.ZodArray,...E(e)});function Qe(t){if(t instanceof H){const e={};for(const s in t.shape){const a=t.shape[s];e[s]=Oe.create(Qe(a))}return new H({...t._def,shape:()=>e})}else return t instanceof ye?new ye({...t._def,type:Qe(t.element)}):t instanceof Oe?Oe.create(Qe(t.unwrap())):t instanceof tt?tt.create(Qe(t.unwrap())):t instanceof Ke?Ke.create(t.items.map(e=>Qe(e))):t}class H extends A{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),s=S.objectKeys(e);return this._cached={shape:e,keys:s},this._cached}_parse(e){if(this._getType(e)!==x.object){const f=this._getOrReturnCtx(e);return h(f,{code:m.invalid_type,expected:x.object,received:f.parsedType}),w}const{status:a,ctx:r}=this._processInputParams(e),{shape:l,keys:d}=this._getCached(),o=[];if(!(this._def.catchall instanceof De&&this._def.unknownKeys==="strip"))for(const f in r.data)d.includes(f)||o.push(f);const c=[];for(const f of d){const v=l[f],k=r.data[f];c.push({key:{status:"valid",value:f},value:v._parse(new Me(r,k,r.path,f)),alwaysSet:f in r.data})}if(this._def.catchall instanceof De){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of o)c.push({key:{status:"valid",value:v},value:{status:"valid",value:r.data[v]}});else if(f==="strict")o.length>0&&(h(r,{code:m.unrecognized_keys,keys:o}),a.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of o){const k=r.data[v];c.push({key:{status:"valid",value:v},value:f._parse(new Me(r,k,r.path,v)),alwaysSet:v in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of c){const k=await v.key,P=await v.value;f.push({key:k,value:P,alwaysSet:v.alwaysSet})}return f}).then(f=>oe.mergeObjectSync(a,f)):oe.mergeObjectSync(a,c)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new H({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(s,a)=>{var l,d;const r=((d=(l=this._def).errorMap)==null?void 0:d.call(l,s,a).message)??a.defaultError;return s.code==="unrecognized_keys"?{message:b.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new H({...this._def,unknownKeys:"strip"})}passthrough(){return new H({...this._def,unknownKeys:"passthrough"})}extend(e){return new H({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new H({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:j.ZodObject})}setKey(e,s){return this.augment({[e]:s})}catchall(e){return new H({...this._def,catchall:e})}pick(e){const s={};for(const a of S.objectKeys(e))e[a]&&this.shape[a]&&(s[a]=this.shape[a]);return new H({...this._def,shape:()=>s})}omit(e){const s={};for(const a of S.objectKeys(this.shape))e[a]||(s[a]=this.shape[a]);return new H({...this._def,shape:()=>s})}deepPartial(){return Qe(this)}partial(e){const s={};for(const a of S.objectKeys(this.shape)){const r=this.shape[a];e&&!e[a]?s[a]=r:s[a]=r.optional()}return new H({...this._def,shape:()=>s})}required(e){const s={};for(const a of S.objectKeys(this.shape))if(e&&!e[a])s[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof Oe;)l=l._def.innerType;s[a]=l}return new H({...this._def,shape:()=>s})}keyof(){return _a(S.objectKeys(this.shape))}}H.create=(t,e)=>new H({shape:()=>t,unknownKeys:"strip",catchall:De.create(),typeName:j.ZodObject,...E(e)});H.strictCreate=(t,e)=>new H({shape:()=>t,unknownKeys:"strict",catchall:De.create(),typeName:j.ZodObject,...E(e)});H.lazycreate=(t,e)=>new H({shape:t,unknownKeys:"strip",catchall:De.create(),typeName:j.ZodObject,...E(e)});class Ut extends A{_parse(e){const{ctx:s}=this._processInputParams(e),a=this._def.options;function r(l){for(const o of l)if(o.result.status==="valid")return o.result;for(const o of l)if(o.result.status==="dirty")return s.common.issues.push(...o.ctx.common.issues),o.result;const d=l.map(o=>new je(o.ctx.common.issues));return h(s,{code:m.invalid_union,unionErrors:d}),w}if(s.common.async)return Promise.all(a.map(async l=>{const d={...s,common:{...s.common,issues:[]},parent:null};return{result:await l._parseAsync({data:s.data,path:s.path,parent:d}),ctx:d}})).then(r);{let l;const d=[];for(const c of a){const f={...s,common:{...s.common,issues:[]},parent:null},v=c._parseSync({data:s.data,path:s.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!l&&(l={result:v,ctx:f}),f.common.issues.length&&d.push(f.common.issues)}if(l)return s.common.issues.push(...l.ctx.common.issues),l.result;const o=d.map(c=>new je(c));return h(s,{code:m.invalid_union,unionErrors:o}),w}}get options(){return this._def.options}}Ut.create=(t,e)=>new Ut({options:t,typeName:j.ZodUnion,...E(e)});function ks(t,e){const s=Ie(t),a=Ie(e);if(t===e)return{valid:!0,data:t};if(s===x.object&&a===x.object){const r=S.objectKeys(e),l=S.objectKeys(t).filter(o=>r.indexOf(o)!==-1),d={...t,...e};for(const o of l){const c=ks(t[o],e[o]);if(!c.valid)return{valid:!1};d[o]=c.data}return{valid:!0,data:d}}else if(s===x.array&&a===x.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let l=0;l<t.length;l++){const d=t[l],o=e[l],c=ks(d,o);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return s===x.date&&a===x.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Vt extends A{_parse(e){const{status:s,ctx:a}=this._processInputParams(e),r=(l,d)=>{if(Gn(l)||Gn(d))return w;const o=ks(l.value,d.value);return o.valid?((Yn(l)||Yn(d))&&s.dirty(),{status:s.value,value:o.data}):(h(a,{code:m.invalid_intersection_types}),w)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,d])=>r(l,d)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Vt.create=(t,e,s)=>new Vt({left:t,right:e,typeName:j.ZodIntersection,...E(s)});class Ke extends A{_parse(e){const{status:s,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.array)return h(a,{code:m.invalid_type,expected:x.array,received:a.parsedType}),w;if(a.data.length<this._def.items.length)return h(a,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),w;!this._def.rest&&a.data.length>this._def.items.length&&(h(a,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const l=[...a.data].map((d,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Me(a,d,a.path,o)):null}).filter(d=>!!d);return a.common.async?Promise.all(l).then(d=>oe.mergeArray(s,d)):oe.mergeArray(s,l)}get items(){return this._def.items}rest(e){return new Ke({...this._def,rest:e})}}Ke.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ke({items:t,typeName:j.ZodTuple,rest:null,...E(e)})};class aa extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:s,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.map)return h(a,{code:m.invalid_type,expected:x.map,received:a.parsedType}),w;const r=this._def.keyType,l=this._def.valueType,d=[...a.data.entries()].map(([o,c],f)=>({key:r._parse(new Me(a,o,a.path,[f,"key"])),value:l._parse(new Me(a,c,a.path,[f,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of d){const f=await c.key,v=await c.value;if(f.status==="aborted"||v.status==="aborted")return w;(f.status==="dirty"||v.status==="dirty")&&s.dirty(),o.set(f.value,v.value)}return{status:s.value,value:o}})}else{const o=new Map;for(const c of d){const f=c.key,v=c.value;if(f.status==="aborted"||v.status==="aborted")return w;(f.status==="dirty"||v.status==="dirty")&&s.dirty(),o.set(f.value,v.value)}return{status:s.value,value:o}}}}aa.create=(t,e,s)=>new aa({valueType:e,keyType:t,typeName:j.ZodMap,...E(s)});class kt extends A{_parse(e){const{status:s,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.set)return h(a,{code:m.invalid_type,expected:x.set,received:a.parsedType}),w;const r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(h(a,{code:m.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),s.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(h(a,{code:m.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),s.dirty());const l=this._def.valueType;function d(c){const f=new Set;for(const v of c){if(v.status==="aborted")return w;v.status==="dirty"&&s.dirty(),f.add(v.value)}return{status:s.value,value:f}}const o=[...a.data.values()].map((c,f)=>l._parse(new Me(a,c,a.path,f)));return a.common.async?Promise.all(o).then(c=>d(c)):d(o)}min(e,s){return new kt({...this._def,minSize:{value:e,message:b.toString(s)}})}max(e,s){return new kt({...this._def,maxSize:{value:e,message:b.toString(s)}})}size(e,s){return this.min(e,s).max(e,s)}nonempty(e){return this.min(1,e)}}kt.create=(t,e)=>new kt({valueType:t,minSize:null,maxSize:null,typeName:j.ZodSet,...E(e)});class ra extends A{get schema(){return this._def.getter()}_parse(e){const{ctx:s}=this._processInputParams(e);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}ra.create=(t,e)=>new ra({getter:t,typeName:j.ZodLazy,...E(e)});class ia extends A{_parse(e){if(e.data!==this._def.value){const s=this._getOrReturnCtx(e);return h(s,{received:s.data,code:m.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:e.data}}get value(){return this._def.value}}ia.create=(t,e)=>new ia({value:t,typeName:j.ZodLiteral,...E(e)});function _a(t,e){return new Xe({values:t,typeName:j.ZodEnum,...E(e)})}class Xe extends A{_parse(e){if(typeof e.data!="string"){const s=this._getOrReturnCtx(e),a=this._def.values;return h(s,{expected:S.joinValues(a),received:s.parsedType,code:m.invalid_type}),w}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const s=this._getOrReturnCtx(e),a=this._def.values;return h(s,{received:s.data,code:m.invalid_enum_value,options:a}),w}return me(e.data)}get options(){return this._def.values}get enum(){const e={};for(const s of this._def.values)e[s]=s;return e}get Values(){const e={};for(const s of this._def.values)e[s]=s;return e}get Enum(){const e={};for(const s of this._def.values)e[s]=s;return e}extract(e,s=this._def){return Xe.create(e,{...this._def,...s})}exclude(e,s=this._def){return Xe.create(this.options.filter(a=>!e.includes(a)),{...this._def,...s})}}Xe.create=_a;class la extends A{_parse(e){const s=S.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==x.string&&a.parsedType!==x.number){const r=S.objectValues(s);return h(a,{expected:S.joinValues(r),received:a.parsedType,code:m.invalid_type}),w}if(this._cache||(this._cache=new Set(S.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=S.objectValues(s);return h(a,{received:a.data,code:m.invalid_enum_value,options:r}),w}return me(e.data)}get enum(){return this._def.values}}la.create=(t,e)=>new la({values:t,typeName:j.ZodNativeEnum,...E(e)});class Zt extends A{unwrap(){return this._def.type}_parse(e){const{ctx:s}=this._processInputParams(e);if(s.parsedType!==x.promise&&s.common.async===!1)return h(s,{code:m.invalid_type,expected:x.promise,received:s.parsedType}),w;const a=s.parsedType===x.promise?s.data:Promise.resolve(s.data);return me(a.then(r=>this._def.type.parseAsync(r,{path:s.path,errorMap:s.common.contextualErrorMap})))}}Zt.create=(t,e)=>new Zt({type:t,typeName:j.ZodPromise,...E(e)});class et extends A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===j.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:s,ctx:a}=this._processInputParams(e),r=this._def.effect||null,l={addIssue:d=>{h(a,d),d.fatal?s.abort():s.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),r.type==="preprocess"){const d=r.transform(a.data,l);if(a.common.async)return Promise.resolve(d).then(async o=>{if(s.value==="aborted")return w;const c=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return c.status==="aborted"?w:c.status==="dirty"||s.value==="dirty"?xt(c.value):c});{if(s.value==="aborted")return w;const o=this._def.schema._parseSync({data:d,path:a.path,parent:a});return o.status==="aborted"?w:o.status==="dirty"||s.value==="dirty"?xt(o.value):o}}if(r.type==="refinement"){const d=o=>{const c=r.refinement(o,l);if(a.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?w:(o.status==="dirty"&&s.dirty(),d(o.value),{status:s.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?w:(o.status==="dirty"&&s.dirty(),d(o.value).then(()=>({status:s.value,value:o.value}))))}if(r.type==="transform")if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Je(d))return w;const o=r.transform(d.value,l);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>Je(d)?Promise.resolve(r.transform(d.value,l)).then(o=>({status:s.value,value:o})):w);S.assertNever(r)}}et.create=(t,e,s)=>new et({schema:t,typeName:j.ZodEffects,effect:e,...E(s)});et.createWithPreprocess=(t,e,s)=>new et({schema:e,effect:{type:"preprocess",transform:t},typeName:j.ZodEffects,...E(s)});class Oe extends A{_parse(e){return this._getType(e)===x.undefined?me(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Oe.create=(t,e)=>new Oe({innerType:t,typeName:j.ZodOptional,...E(e)});class tt extends A{_parse(e){return this._getType(e)===x.null?me(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}tt.create=(t,e)=>new tt({innerType:t,typeName:j.ZodNullable,...E(e)});class ws extends A{_parse(e){const{ctx:s}=this._processInputParams(e);let a=s.data;return s.parsedType===x.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}ws.create=(t,e)=>new ws({innerType:t,typeName:j.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...E(e)});class js extends A{_parse(e){const{ctx:s}=this._processInputParams(e),a={...s,common:{...s.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return zt(r)?r.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new je(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new je(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}js.create=(t,e)=>new js({innerType:t,typeName:j.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...E(e)});class oa extends A{_parse(e){if(this._getType(e)!==x.nan){const a=this._getOrReturnCtx(e);return h(a,{code:m.invalid_type,expected:x.nan,received:a.parsedType}),w}return{status:"valid",value:e.data}}}oa.create=t=>new oa({typeName:j.ZodNaN,...E(t)});class Fi extends A{_parse(e){const{ctx:s}=this._processInputParams(e),a=s.data;return this._def.type._parse({data:a,path:s.path,parent:s})}unwrap(){return this._def.type}}class Ts extends A{_parse(e){const{status:s,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?w:l.status==="dirty"?(s.dirty(),xt(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?w:r.status==="dirty"?(s.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,s){return new Ts({in:e,out:s,typeName:j.ZodPipeline})}}class Ns extends A{_parse(e){const s=this._def.innerType._parse(e),a=r=>(Je(r)&&(r.value=Object.freeze(r.value)),r);return zt(s)?s.then(r=>a(r)):a(s)}unwrap(){return this._def.innerType}}Ns.create=(t,e)=>new Ns({innerType:t,typeName:j.ZodReadonly,...E(e)});var j;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(j||(j={}));const Fe=Pe.create,ka=_s.create;De.create;const wa=ye.create,Rs=H.create;Ut.create;Vt.create;Ke.create;const Ki=Xe.create;Zt.create;Oe.create;tt.create;const qi=/^\d{4}-\d{2}-\d{2}$/,Hi=Rs({title:Fe().min(1),items:wa(Fe().min(1)).min(1)}),Wi=Rs({version:Fe().min(1),publishedAt:Fe().regex(qi,"Expected YYYY-MM-DD"),title:Fe().min(1),sections:wa(Hi).min(1),prerelease:ka().optional()});Rs({changeType:Ki(["feature","improvement","fix","internal","docs"]),title:Fe().min(1),summary:Fe().min(1),public:ka()});const Gi=[{version:"0.8.1",publishedAt:"2026-04-08",title:"Relay access sync and billing webhook guard",sections:[{title:"Improvements",items:["Relay access sync: Kaizen now re-checks relay authorization with the server instead of relying on stale local entitlement state, so paid relay access recovers more predictably after account changes.","Billing webhook guard: Polar customer mappings that point at a missing local user now fail cleanly with an explicit validation error instead of crashing on a database foreign-key write."]}]},{version:"0.8.0",publishedAt:"2026-04-08",title:"Project diffs, queued messages, and commit workflow",sections:[{title:"New Features",items:["Project diff sidebar and commit workflow: Kaizen can now inspect project diffs in the sidebar, tune diff viewing preferences, generate commit messages, and turn selected changes into commits from the chat workflow.","Queued outbound messages: The CLI chat flow can now queue follow-up prompts while a turn is still running, with composer controls to preview, edit, remove, and drain queued messages safely."]},{title:"Improvements",items:["Paid relay and pricing updates: Paid users now get relay access by default, pricing copy is clearer, and the dashboard shows subscription state with better post-checkout feedback.","Diff review polish and follow-up fixes: The shipped diff flow includes follow-up fixes for sidebar sizing, disclosure handling, server git behavior, and related regression coverage.","Safer queued-message handling: Attachment staging cleanup, queue drain ordering, duplicate action guards, and attachment-only queue previews are hardened for more predictable chat behavior."]}]},{version:"0.7.2",publishedAt:"2026-04-07",title:"Standalone CLI packaging fix",sections:[{title:"Improvements",items:["Standalone CLI package no longer ships workspace dependencies: Kaizen installs and self-updates no longer fail in production because the published CLI package no longer depends on monorepo workspace packages."]}]},{version:"0.7.1",publishedAt:"2026-04-07",title:"Production-safe remote auth builds",sections:[{title:"Improvements",items:["Remote auth build targets stay production-safe: Development builds can still override the remote auth URL without leaking non-production URLs or env overrides into the shipped production bundle."]}]},{version:"0.7.0",publishedAt:"2026-04-07",title:"Accounts, relay access, and faster chat workflows",sections:[{title:"New Features",items:["Kaizen Connect accounts: Sign the local Kaizen app into your web account and keep account state synced across devices.","Remote relay access and controls: Hosted relay support now includes admin approvals, machine management, an account settings flow, idle shutdown, wake-on-demand, and a dedicated Kaizen Connect landing flow.","Billing and account management: The web app now includes pricing, Polar-backed billing, account dashboards, subscription state, and expanded device management.","Expanded sign-in security: The web app now supports Google and GitHub OAuth, plus TOTP setup for password-based accounts.","Faster handoff and prompting tools: Kaizen now includes saved plan handoff quick chats, reusable quick prompts, and managed custom theme backgrounds.","Native slash commands: The chat composer now supports slash command autocomplete along with built-in PR and workflow commands.","More provider and file support: Kaizen now supports OpenRouter via openCode ACP along with Markdown and PDF chat attachments.","Feature access and privacy controls: Account-gated features now stay visible with locked states, and streamer mode can hide account details, device metadata, and relay URLs.","Broader chat recovery tools: Kaizen can recover more provider-backed chats, including stronger Cursor chat recovery and import support."]},{title:"Improvements",items:["Fix various bugs across chat recovery, waiting prompts, relay/account sync, and dashboard flows.","Fix various performance issues across chat startup, transcript rendering, sidebar updates, websocket sync, local persistence, and asset delivery.","Polish loading states, shared branding, and overall UI consistency across the CLI app and web app."]}]},{version:"0.6.1",publishedAt:"2026-03-30",title:"Background notifications and SEO updates",sections:[{title:"Improvements",items:["Background chat notifications: Kaizen can now alert you with browser notifications, sound, and vibration when background chats need input or finish responding.","SEO enhancements: Updated site metadata, robots.txt rules, and sitemap priorities to improve search engine discoverability."]},{title:"Under the Hood",items:["Added a root `tailscale:reset` script to reset local Tailscale serve configuration during setup and support workflows."]}]},{version:"0.6.0",publishedAt:"2026-03-29",title:"Remote handoff setup and QR launches",sections:[{title:"New Features",items:["Add remote handoff flow for Kaizen: Kaizen can now guide remote Tailscale setup and generate handoff links and QR codes for opening sessions on another device."]}]},{version:"0.5.0",publishedAt:"2026-03-29",title:"Bundled release history and stronger session recovery",sections:[{title:"New Features",items:["Bundled release history and stronger session recovery: Kaizen now ships in-app and web release notes while recovering chat usage and session state more reliably after reloads."]}]},{version:"0.4.0",publishedAt:"2026-03-29",title:"Branding refresh and packaged runtime updates",sections:[{title:"Highlights",items:["Refreshed the Kaizen branding and theme system across the product surface.","Published the built Kaizen runtime and added the web start command needed for the packaged flow.","Renamed the `keizen` app paths to `kaizen`, fixed review follow-ups, and aligned web builds on Node 20."]}]},{version:"0.3.0",publishedAt:"2026-03-29",title:"Feature overview workflow and release workflow baseline",sections:[{title:"Highlights",items:["Added the feature overview workflow and plan attachment support for structured project work.","Added the pull-request skill and the first pass of the npm publish and release workflow guidance."]}]},{version:"0.2.2",publishedAt:"2026-03-28",title:"UI and restart regression fixes",sections:[{title:"Highlights",items:["Fixed Kaizen UI regressions and restart issues that were blocking a stable local runtime."]}]}];function da(t){return new Date(`${t}T00:00:00.000Z`).getTime()}function Yi(t,e="en-US"){return new Intl.DateTimeFormat(e,{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(new Date(`${t}T00:00:00.000Z`))}function Qi(t){return[...t].sort((e,s)=>{const a=da(s.publishedAt)-da(e.publishedAt);return a!==0?a:s.version.localeCompare(e.version,void 0,{numeric:!0,sensitivity:"base"})})}const Ji=Object.freeze(Qi(Gi.map(t=>Wi.parse(t))));function Xi(t){const e=Ne.c(5),{entries:s}=t;if(s.length===0){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-card/30 px-6 py-10 text-sm text-muted-foreground",children:"No release notes have been published yet."}),e[0]=l):l=e[0],l}let a;e[1]!==s?(a=s.map(el),e[1]=s,e[2]=a):a=e[2];let r;return e[3]!==a?(r=n.jsx("div",{className:"space-y-4",children:a}),e[3]=a,e[4]=r):r=e[4],r}function el(t){return n.jsxs("article",{className:"rounded-2xl border border-border bg-card/60 p-5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("h3",{className:"text-base font-semibold text-foreground",children:t.title}),n.jsxs("span",{className:"rounded-full border border-border bg-muted/60 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:["v",t.version]}),t.prerelease?n.jsx("span",{className:"rounded-full border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-600 dark:text-amber-300",children:"Prerelease"}):null]}),n.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:["Published ",Yi(t.publishedAt)]}),n.jsx("div",{className:"mt-4 space-y-4 text-sm text-foreground",children:t.sections.map(tl)})]},`${t.version}-${t.publishedAt}`)}function tl(t){return n.jsxs("section",{className:"space-y-2",children:[n.jsx("h4",{className:"text-sm font-semibold text-foreground",children:t.title}),n.jsx("ul",{className:"list-disc space-y-2 pl-5 text-muted-foreground",children:t.items.map(sl)})]},t.title)}function sl(t){return n.jsx("li",{children:t},t)}const nl=Es.filter(t=>t.systemActive);function al(){const t=Ne.c(27),{remoteAuth:e}=ha();let s;t[0]!==e?(s=ga(e),t[0]=e,t[1]=s):s=t[1];const r=s.features.handoff.enabled,l=ft(ul),d=ft(cl),o=ft(dl),c=ft(ol),f=ft(ll);let v;t[2]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("div",{className:"max-w-2xl",children:"Hand Off entries are reusable handoff shortcuts for plan mode. The selected provider starts a fresh chat in the same feature and receives the approved plan as its first message."}),t[2]=v):v=t[2];let k;t[3]!==r?(k=r?null:n.jsx(Ye,{level:"account"}),t[3]=r,t[4]=k):k=t[4];const P=!r;let D;t[5]!==d?(D=()=>d(kr()),t[5]=d,t[6]=D):D=t[6];let K;t[7]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(wr,{className:"mr-1.5 h-4 w-4"}),t[7]=K):K=t[7];let B;t[8]!==P||t[9]!==D?(B=n.jsxs(Y,{type:"button",size:"sm",variant:"outline",className:"rounded-full",disabled:P,onClick:D,children:[K,"Add Hand Off"]}),t[8]=P,t[9]=D,t[10]=B):B=t[10];const U=!r;let O;t[11]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(va,{className:"mr-1.5 h-4 w-4"}),t[11]=O):O=t[11];let V;t[12]!==f||t[13]!==U?(V=n.jsxs(Y,{type:"button",size:"sm",variant:"outline",className:"rounded-full",disabled:U,onClick:f,children:[O,"Reset Defaults"]}),t[12]=f,t[13]=U,t[14]=V):V=t[14];let X;t[15]!==k||t[16]!==B||t[17]!==V?(X=n.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl border border-border bg-card/30 px-4 py-4 text-sm text-muted-foreground sm:flex-row sm:items-center sm:justify-between",children:[v,n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[k,B,V]})]}),t[15]=k,t[16]=B,t[17]=V,t[18]=X):X=t[18];let ne;t[19]!==l||t[20]!==r||t[21]!==c||t[22]!==o?(ne=l.length===0?n.jsx("div",{className:"py-8 text-sm text-muted-foreground",children:"No Hand Off entries configured."}):l.map((M,he)=>{const I=bt(M.provider),p=I.models.some(ee=>ee.id===M.model)?M.model:I.defaultModel;return n.jsxs("div",{className:`grid gap-4 py-5 md:grid-cols-[minmax(0,1.1fr)_160px_200px_minmax(0,1.2fr)_auto] ${he===0?"":"border-t border-border"}`,children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"Label"}),n.jsx(be,{value:M.label,disabled:!r,onChange:ee=>o(M.id,{label:ee.target.value}),placeholder:"Claude Opus"})]}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"Provider"}),n.jsxs(L,{value:M.provider,disabled:!r,onValueChange:ee=>{const W=ee,wt=bt(W);o(M.id,{provider:W,model:wt.defaultModel,modelOptions:wt.defaultModelOptions})},children:[n.jsx($,{children:n.jsx(F,{})}),n.jsx(z,{children:nl.map(il)})]})]}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"Model"}),n.jsxs(L,{value:p,disabled:!r,onValueChange:ee=>o(M.id,{model:ee}),children:[n.jsx($,{children:n.jsx(F,{})}),n.jsx(z,{children:I.models.map(rl)})]})]}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"Base Prompt"}),n.jsx(be,{value:M.basePrompt,disabled:!r,onChange:ee=>o(M.id,{basePrompt:ee.target.value}),placeholder:yr})]}),n.jsx("div",{className:"flex items-end",children:n.jsx(Y,{type:"button",size:"icon",variant:"outline",className:"rounded-full","aria-label":`Remove ${M.label}`,title:`Remove ${M.label}`,disabled:!r,onClick:()=>c(M.id),children:n.jsx(_r,{className:"h-4 w-4"})})})]},M.id)}),t[19]=l,t[20]=r,t[21]=c,t[22]=o,t[23]=ne):ne=t[23];let ae;return t[24]!==X||t[25]!==ne?(ae=n.jsxs("div",{className:"border-b border-border",children:[X,ne]}),t[24]=X,t[25]=ne,t[26]=ae):ae=t[26],ae}function rl(t){return n.jsx(N,{value:t.id,children:t.label},t.id)}function il(t){return n.jsx(N,{value:t.id,children:t.label},t.id)}function ll(t){return t.resetToDefaults}function ol(t){return t.removeEntry}function dl(t){return t.updateEntry}function cl(t){return t.addEntry}function ul(t){return t.entries}const ml=Es.filter(t=>t.systemActive);function fl(){const t=Ne.c(32),e=Ze(_l),s=Ze(yl),a=Ze(bl),r=Ze(vl),l=Ze(xl),d=Ze(pl),o=Ze(gl);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"max-w-2xl",children:"Slash commands can run Kaizen-local actions or send saved prompt templates. Pull request commands only appear when the current chat provider is enabled below."}),t[0]=c):c=t[0];let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(va,{className:"mr-1.5 h-4 w-4"}),t[1]=f):f=t[1];let v;t[2]!==o?(v=n.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl border border-border bg-card/30 px-4 py-4 text-sm text-muted-foreground sm:flex-row sm:items-center sm:justify-between",children:[c,n.jsxs(Y,{type:"button",size:"sm",variant:"outline",className:"rounded-full",onClick:o,children:[f,"Reset Defaults"]})]}),t[2]=o,t[3]=v):v=t[3];let k;t[4]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"Pull Request Providers"}),t[4]=k):k=t[4];let P;t[5]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsxs("div",{className:"mb-3 text-sm text-muted-foreground",children:["Show PR slash commands only when one of these providers is active in the composer. Default:"," ",jr.map(hl).join(", "),"."]}),t[5]=P):P=t[5];let D;t[6]!==a||t[7]!==d?(D=ml.map(de=>{const p=a.includes(de.id);return n.jsx(Y,{type:"button","aria-pressed":p,variant:p?"default":"outline",className:ve("rounded-full",!p&&"text-muted-foreground"),onClick:()=>d(de.id),children:de.label},de.id)}),t[6]=a,t[7]=d,t[8]=D):D=t[8];let K;t[9]!==D?(K=n.jsxs("div",{children:[k,P,n.jsx("div",{className:"flex flex-wrap gap-2",children:D})]}),t[9]=D,t[10]=K):K=t[10];let B,U;t[11]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"`/pr` Base Prompt"}),U=n.jsx("div",{className:"mb-3 text-sm text-muted-foreground",children:"Sent when you run `/pr` with no extra text. If you add text after the command, Kaizen appends it as extra instructions."}),t[11]=B,t[12]=U):(B=t[11],U=t[12]);let O;t[13]!==r?(O=de=>r(de.target.value),t[13]=r,t[14]=O):O=t[14];let V;t[15]!==e||t[16]!==O?(V=n.jsxs("div",{className:"border-t border-border pt-5",children:[B,U,n.jsx(On,{value:e,onChange:O,rows:5,className:"min-h-28"})]}),t[15]=e,t[16]=O,t[17]=V):V=t[17];let X,ne;t[18]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:"`/pr-update` Base Prompt"}),ne=n.jsx("div",{className:"mb-3 text-sm text-muted-foreground",children:"Sent when you run `/pr-update` with no extra text. Extra text is appended as additional instructions."}),t[18]=X,t[19]=ne):(X=t[18],ne=t[19]);let ae;t[20]!==l?(ae=de=>l(de.target.value),t[20]=l,t[21]=ae):ae=t[21];let M;t[22]!==s||t[23]!==ae?(M=n.jsxs("div",{className:"border-t border-border pt-5",children:[X,ne,n.jsx(On,{value:s,onChange:ae,rows:5,className:"min-h-28"})]}),t[22]=s,t[23]=ae,t[24]=M):M=t[24];let he;t[25]!==V||t[26]!==M||t[27]!==K?(he=n.jsxs("div",{className:"grid gap-5 py-5",children:[K,V,M]}),t[25]=V,t[26]=M,t[27]=K,t[28]=he):he=t[28];let I;return t[29]!==he||t[30]!==v?(I=n.jsxs("div",{className:"border-b border-border",children:[v,he]}),t[29]=he,t[30]=v,t[31]=I):I=t[31],I}function hl(t){return bt(t).label}function gl(t){return t.resetToDefaults}function pl(t){return t.togglePullRequestProvider}function xl(t){return t.setPullRequestUpdatePrompt}function vl(t){return t.setPullRequestPrompt}function bl(t){return t.pullRequestProviders}function yl(t){return t.pullRequestUpdatePrompt}function _l(t){return t.pullRequestPrompt}function kl(t){var e;return n.jsx("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm text-foreground",children:((e=t.remoteAuthSnapshot)==null?void 0:e.baseUrl)??""})}const vt=[{id:"account",label:"Account",icon:hi,subtitle:"Sign in, review account access, and unlock Kaizen features."},{id:"general",label:"General",icon:mi,subtitle:"Manage appearance, editor behavior, and embedded terminal defaults."},{id:"changelog",label:"Release Notes",icon:xa,subtitle:"Review shipped changes included in the npm release history."},{id:"quick-chats",label:"Hand Off",icon:Nr,subtitle:"Configure handoff shortcuts for plan mode."},{id:"slash-commands",label:"/ commands",icon:xs,subtitle:"Configure Kaizen slash command prompts and which providers expose them."},{id:"providers",label:"Providers",icon:li,subtitle:"Manage the default chat provider and saved model defaults for Claude, Codex, Gemini, Cursor, and OpenRouter."},{id:"keybindings",label:"Keybindings",icon:si,subtitle:"Edit global app shortcuts stored in the active keybindings file."}],ps=30*6e4,ca=15e3;function ua(t){return t&&vt.some(e=>e.id===t)?t:null}const wl=[{value:"cursor",label:"Cursor"},{value:"vscode",label:"VS Code"},{value:"windsurf",label:"Windsurf"},{value:"custom",label:"Custom"}],Kt=Object.keys(bs);function jl(t){return`Edit global app shortcuts stored in ${t}.`}function $t(t){return Object.fromEntries(Kt.map(e=>[e,vs(t[e])]))}function Ft(t,e){return Kt.every(s=>(t[s]??"")===(e[s]??""))}function Nl(t,e,s){const a={...t};for(const r of Kt)(t[r]??"")===(e[r]??"")&&(a[r]=s[r]??"");return a}function Cl(t,e,s){return e&&Ft(s,e)?{changed:!1,nextCurrent:t,nextLoaded:e,nextSaved:e}:{changed:!0,nextCurrent:!e||Ft(t,e)?s:t,nextLoaded:s,nextSaved:s}}function El(t){const e=(t==null?void 0:t.status)==="checking",s=(t==null?void 0:t.status)==="updating"||(t==null?void 0:t.status)==="restart_pending";return t!=null&&t.updateAvailable?{disabled:s,kind:"update",label:"Update",variant:"default"}:{disabled:e||s,kind:"check",label:"Check for updates",spinning:e,variant:"outline"}}function gt(t,e,s){const a=bt(s,t),r=(e==null?void 0:e.settings[s])??G[s];return a.systemActive?r.active?"Active.":"Inactive.":Gr(s,e==null?void 0:e.settings,t)??"Inactive."}function Tl(t){return t&&typeof t=="object"&&"idx"in t&&typeof t.idx=="number"&&t.idx>0?"back":"home"}function ma({themePreference:t,nextBackgroundImage:e,backgroundOpacity:s}){const a=typeof e=="string"&&e.trim()!=="";return t!=="custom"||!a||s!==1?{}:{backgroundOpacity:.85,backgroundBlur:6}}function T(t){const e=Ne.c(19),{title:s,description:a,children:r,badge:l,bordered:d,alignStart:o}=t,c=d===void 0?!0:d,f=o===void 0?!1:o,v=c?"border-t border-border":void 0,k=`flex flex-col sm:flex-row sm:justify-between gap-3 sm:gap-8 py-5 ${f?"sm:items-start":"sm:items-center"}`;let P;e[0]!==s?(P=n.jsx("span",{children:s}),e[0]=s,e[1]=P):P=e[1];let D;e[2]!==l||e[3]!==P?(D=n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[P,l]}),e[2]=l,e[3]=P,e[4]=D):D=e[4];let K;e[5]!==a?(K=n.jsx("div",{className:"mt-1 text-[13px] text-muted-foreground",children:a}),e[5]=a,e[6]=K):K=e[6];let B;e[7]!==D||e[8]!==K?(B=n.jsxs("div",{className:"min-w-0 max-w-xl",children:[D,K]}),e[7]=D,e[8]=K,e[9]=B):B=e[9];let U;e[10]!==r?(U=n.jsx("div",{className:"flex w-full items-center sm:w-auto sm:shrink-0",children:r}),e[10]=r,e[11]=U):U=e[11];let O;e[12]!==k||e[13]!==B||e[14]!==U?(O=n.jsxs("div",{className:k,children:[B,U]}),e[12]=k,e[13]=B,e[14]=U,e[15]=O):O=e[15];let V;return e[16]!==O||e[17]!==v?(V=n.jsx("div",{className:v,children:O}),e[16]=O,e[17]=v,e[18]=V):V=e[18],V}function Cs(t){if(!t)return"—";const e=Date.parse(t);return Number.isNaN(e)?t:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(e)}function pt(t){return(t/1024).toFixed(3).replace(/(\.\d*?[1-9])0+$/u,"$1").replace(/\.0+$/u,"")}function Rl(t){const e=Ne.c(3),{url:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=pa("/api/qrcode"),e[0]=a):a=e[0];const r=`${a}?value=${encodeURIComponent(s)}`;let l;return e[1]!==r?(l=n.jsx("div",{className:"rounded-2xl border border-border bg-background/80 p-3",children:n.jsx("img",{src:r,alt:"QR code for relay access",className:"h-44 w-44 rounded-lg bg-white p-2"})}),e[1]=r,e[2]=l):l=e[2],l}function Al(t){switch(t){case"signed_in":return"Connected to Kaizen";case"signed_out":return"Not connected";case"pending_sign_in":return"Finish signing in…";case"error":return"Connection error";default:return t}}function Sl(t){const e=Ne.c(10),{access:s}=t,a=s.signedIn?"OpenRouter, Provider Usage, and Hand Off are unlocked.":"Sign in to unlock OpenRouter, Provider Usage, and Hand Off.";let r;e[0]!==a?(r={label:"Account features",body:a},e[0]=a,e[1]=r):r=e[1];const l=s.paid?"Remote relay, browser notifications, install flows, and sync surfaces are unlocked.":"Upgrade to unlock remote relay, browser notifications, install flows, and sync surfaces.";let d;e[2]!==l?(d={label:"Paid features",body:l},e[2]=l,e[3]=d):d=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={label:"Account destination",body:`Locked features send you back to ${Qr}.`},e[4]=o):o=e[4];let c;e[5]!==r||e[6]!==d?(c=[r,d,o],e[5]=r,e[6]=d,e[7]=c):c=e[7];const f=c;let v;return e[8]!==f?(v=n.jsx("dl",{className:"w-full min-w-0 space-y-3.5 text-left sm:max-w-[420px]",children:f.map(Il)}),e[8]=f,e[9]=v):v=e[9],v}function Il(t){return n.jsxs("div",{children:[n.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:t.label}),n.jsx("dd",{className:"mt-1 text-sm leading-snug text-foreground",children:t.body})]},t.label)}function Pl(t){const e=Ne.c(9),{access:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Account access"}),e[0]=a):a=e[0];const r=s.signedIn?"Unlocked":"Locked";let l;e[1]!==r?(l=n.jsxs("div",{children:[a,n.jsx("dd",{className:"mt-1 tabular-nums text-sm text-foreground",children:r})]}),e[1]=r,e[2]=l):l=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Paid access"}),e[3]=d):d=e[3];const o=s.paid?"Unlocked":"Locked";let c;e[4]!==o?(c=n.jsxs("div",{children:[d,n.jsx("dd",{className:"mt-1 tabular-nums text-sm text-foreground",children:o})]}),e[4]=o,e[5]=c):c=e[5];let f;return e[6]!==l||e[7]!==c?(f=n.jsxs("dl",{className:"mt-4 grid gap-3 sm:grid-cols-2 sm:gap-x-6",children:[l,c]}),e[6]=l,e[7]=c,e[8]=f):f=e[8],f}function Ol(t){const e=Ne.c(20),{snapshot:s,redactMachineId:a}=t,r=a===void 0?!1:a;if(!s)return null;let l;if(e[0]!==r||e[1]!==s.connectedAt||e[2]!==s.lastHeartbeatAt||e[3]!==s.machineDisplayName||e[4]!==s.machineId){if(l=[],s.machineDisplayName&&!r){let o;e[6]!==s.machineDisplayName?(o={label:"Machine",value:s.machineDisplayName},e[6]=s.machineDisplayName,e[7]=o):o=e[7],l.push(o)}else if(s.machineId&&!r){let o;e[8]!==s.machineId?(o={label:"Machine ID",value:s.machineId},e[8]=s.machineId,e[9]=o):o=e[9],l.push(o)}if(s.connectedAt){let o;e[10]!==s.connectedAt?(o=Cs(s.connectedAt),e[10]=s.connectedAt,e[11]=o):o=e[11];let c;e[12]!==o?(c={label:"Connected",value:o},e[12]=o,e[13]=c):c=e[13],l.push(c)}if(s.lastHeartbeatAt){let o;e[14]!==s.lastHeartbeatAt?(o=Cs(s.lastHeartbeatAt),e[14]=s.lastHeartbeatAt,e[15]=o):o=e[15];let c;e[16]!==o?(c={label:"Last heartbeat",value:o},e[16]=o,e[17]=c):c=e[17],l.push(c)}e[0]=r,e[1]=s.connectedAt,e[2]=s.lastHeartbeatAt,e[3]=s.machineDisplayName,e[4]=s.machineId,e[5]=l}else l=e[5];if(l.length===0)return null;let d;return e[18]!==l?(d=n.jsx("dl",{className:"mt-3 space-y-2 text-sm",children:l.map(Ml)}),e[18]=l,e[19]=d):d=e[19],d}function Ml(t){return n.jsxs("div",{className:"flex flex-col gap-0.5 sm:flex-row sm:justify-between sm:gap-4",children:[n.jsx("dt",{className:"text-muted-foreground",children:t.label}),n.jsx("dd",{className:"min-w-0 break-all text-right tabular-nums text-foreground sm:text-left",children:t.value})]},t.label)}function Bl(){var Sn,In,Pn;const t=Cr(),e=Er(),{sectionId:s}=Tr(),a=Rr(),r=ha(),l=Ar(),d=Sr(),o=Ir(),c=y.useMemo(()=>({...a,...r,...l,...d,...o}),[d,a,r,l,o]),{theme:f,setTheme:v}=Pr(),k=ua(s)??"general",P=c.connectionStatus==="connecting",D=((Sn=c.localProjects)==null?void 0:Sn.machine.displayName)??"Unavailable",K=((In=c.localProjects)==null?void 0:In.projects.length)??0,B=Or.split("/")[1]??"unknown",U=Ce(i=>i.scrollbackLines),O=Ce(i=>i.minColumnWidth),V=Ce(i=>i.editorPreset),X=Ce(i=>i.editorCommandTemplate),ne=Ce(i=>i.setScrollbackLines),ae=Ce(i=>i.setMinColumnWidth),M=Ce(i=>i.setEditorPreset),he=Ce(i=>i.setEditorCommandTemplate),I=c.generalSettings,de=c.keybindings,p=c.providerSettings,ee=Ee(i=>i.defaultProvider),W=Ee(i=>i.providerDefaults),wt=Ee(i=>i.showProviderIconsInSideTray),qt=Ee(i=>i.setDefaultProvider),st=Ee(i=>i.setProviderDefaultModel),nt=Ee(i=>i.setProviderDefaultModelOptions),at=Ee(i=>i.setProviderDefaultPlanMode),ja=Ee(i=>i.setShowProviderIconsInSideTray),As=Te(i=>i.folderGroupsEnabled),Na=Te(i=>i.showFeatureOverviewInSidebar),Ca=Te(i=>i.kanbanStatusesEnabled),Ea=Te(i=>i.commitProjectMetadataDirectory),Ta=Te(i=>i.setFolderGroupsEnabled),Ra=Te(i=>i.setShowFeatureOverviewInSidebar),Aa=Te(i=>i.setKanbanStatusesEnabled),Sa=Te(i=>i.setCommitProjectMetadataDirectory),Ss=le(i=>i.themeId),Is=le(i=>i.customAppearance),qe=le(i=>i.backgroundImage),Le=le(i=>i.backgroundOpacity),rt=le(i=>i.backgroundBlur),Ps=le(i=>i.showProjectIconsInSidebar),Ia=le(i=>i.availableThemes),Pa=le(i=>i.setThemeId),Oa=le(i=>i.setCustomAppearance),Ht=le(i=>i.setBackgroundImage),Wt=le(i=>i.setBackgroundOpacity),Gt=le(i=>i.setBackgroundBlur),Ma=le(i=>i.setShowProjectIconsInSidebar),Da=Re(i=>i.browserNotificationsEnabled),Os=Re(i=>i.soundEnabled),Ms=Re(i=>i.vibrationEnabled),Ds=Re(i=>i.lastPermissionState),jt=Re(i=>i.setBrowserNotificationsEnabled),La=Re(i=>i.setSoundEnabled),$a=Re(i=>i.setVibrationEnabled),Ls=Re(i=>i.setLastPermissionState),$e=y.useMemo(()=>Mn(de),[de]),$s=$e.filePathDisplay||Mr(),za=(I==null?void 0:I.filePathDisplay)||Dr(),Nt=y.useMemo(()=>$t($e.bindings),[$e.bindings]),[zs,Yt]=y.useState(String(U)),[Bs,it]=y.useState(pt((I==null?void 0:I.settings.sendChunkSizeBytes)??cs.sendChunkSizeBytes)),[Us,Qt]=y.useState(String(O)),[Jt,Vs]=y.useState(X),[ze,Ct]=y.useState(qe??""),[Zs,Xt]=y.useState(String(Le)),[Fs,es]=y.useState(String(rt)),[Be,lt]=y.useState(()=>$t($e.bindings)),[ts,Ks]=y.useState(()=>$t($e.bindings)),[qs,Et]=y.useState(null),[Tt,Hs]=y.useState(!1),[Ws,ot]=y.useState(null),[Gs,Ys]=y.useState(!1),ss=y.useRef(Nt),Qs=y.useRef(Nt),[Js,ns]=y.useState(null),[Ll,Ba]=y.useState(""),[dt,ce]=y.useState(null),[ct,Rt]=y.useState(null),[Xs,At]=y.useState(null),[en,as]=y.useState(!1),[Ua,tn]=y.useState(!1),[ut,sn]=y.useState(!1),nn=y.useRef(null),[He,an]=y.useState(null),[St,It]=y.useState(null),se=y.useMemo(()=>Es.map(i=>{var g;return((g=c.providerCatalog)==null?void 0:g.find(R=>R.id===i.id))??i}),[c.providerCatalog]),Va=y.useMemo(()=>new Map(se.map(i=>[i.id,i])),[se]),Pt=y.useMemo(()=>Lr(se,(p==null?void 0:p.settings)??G),[se,p==null?void 0:p.settings]),J=i=>Va.get(i)??bt(i),Za=ee==="last_used"||Pt.some(i=>i.id===ee)?ee:"last_used",[rn,Fa]=y.useState([]),C=c.updateSnapshot,ln=ge.settingsUpdate("check"),on=ge.settingsUpdate("install"),Ka=ge.settingsRemoteAuth("save"),rs=ge.settingsRemoteAuth("sign_in"),We=ge.settingsRemoteAuth("refresh"),dn=ge.settingsRemoteAuth("sign_out"),cn=ge.settingsRemoteAuth("streamer_mode"),un=ge.settingsTheme("refresh"),mn=ge.settingsTheme("open_editor"),fn=ge.settingsTheme("open_folder"),hn=pe(ln),gn=pe(on);pe(Ka);const pn=pe(rs),qa=pe(We),Ha=pe(dn),xn=pe(cn),ke=dt!==null||xn,Wa=pe(un),Ga=pe(mn),Ya=pe(fn),u=c.remoteAuth,Z=ga(u),is=Hr({browserNotificationsEnabled:Da,signedIn:Z.signedIn}),re=c.themeSettings,ls=Zn(Ds),Qa=qr(),Ja=Vr(ls),vn=ls!=="unsupported",bn=y.useRef(e.pathname),Xa=typeof navigator<"u"&&typeof navigator.vibrate=="function",Ue=El({...C,status:gn?"updating":hn?"checking":C==null?void 0:C.status}),er=hn||(C==null?void 0:C.status)==="checking"?"Checking for updates…":gn||(C==null?void 0:C.status)==="updating"?"Installing update…":(C==null?void 0:C.status)==="restart_pending"?`Restarting ${Dn}…`:(C==null?void 0:C.status)==="available"?`Update available${C.latestVersion?`: ${C.latestVersion}`:""}`:(C==null?void 0:C.status)==="up_to_date"?"Up to date":(C==null?void 0:C.status)==="error"?"Update check failed":"Not checked yet";y.useEffect(()=>{fetch(pa("/api/backgrounds")).then(i=>i.json()).then(i=>Fa(i)).catch(i=>console.error("Failed to load system backgrounds",i))},[]),y.useEffect(()=>{bn.current=e.pathname},[e.pathname]),y.useEffect(()=>{Yt(String(U))},[U]),y.useEffect(()=>{it(pt((I==null?void 0:I.settings.sendChunkSizeBytes)??cs.sendChunkSizeBytes))},[I==null?void 0:I.settings.sendChunkSizeBytes]),y.useEffect(()=>{Qt(String(O))},[O]),y.useEffect(()=>{Vs(X)},[X]),y.useEffect(()=>{Ct(qe??"")},[qe]),y.useEffect(()=>{Xt(String(Le))},[Le]),y.useEffect(()=>{es(String(rt))},[rt]),y.useEffect(()=>{const i=Nt,g=ss.current,R=Cl(Be,g,i);R.changed&&(ss.current=R.nextLoaded,Ks(R.nextSaved),lt(R.nextCurrent))},[Be,Nt]),y.useEffect(()=>{Qs.current=Be},[Be]),y.useEffect(()=>{s&&(ua(s)||t("/settings/general",{replace:!0}))},[t,s]);function yn(){const i=Number(zs);if(!Number.isFinite(i)){Yt(String(U));return}ne(i)}function _n(){const i=Number(Us);if(!Number.isFinite(i)){Qt(String(O));return}ae(i)}async function tr(){const i=(I==null?void 0:I.settings.sendChunkSizeBytes)??cs.sendChunkSizeBytes,g=Number(Bs);if(!Number.isFinite(g)){ot("Chat chunk size must be a number."),it(pt(i));return}const R=Math.round(g*1024);if(R<Lt||R>Dt){ot(`Chat chunk size must stay between ${Lt/1024} KB and ${Dt/1024} KB.`);return}if(R===i){ot(null),it(pt(i));return}try{Ys(!0),ot(null);const Q=await c.socket.command({type:"settings.writeGeneralSettings",settings:{sendChunkSizeBytes:R}});it(pt(Q.settings.sendChunkSizeBytes))}catch(Q){ot(Q instanceof Error?Q.message:"Unable to save general settings.")}finally{Ys(!1)}}function kn(){const i=ze.trim()===""?null:ze.trim(),g=ma({themePreference:f,nextBackgroundImage:i,backgroundOpacity:Le});Ht(i),g.backgroundOpacity!==void 0&&Wt(g.backgroundOpacity),g.backgroundBlur!==void 0&&Gt(g.backgroundBlur),we({backgroundImage:i,...g})}function wn(){const i=Number(Zs);if(!Number.isFinite(i)||i<0||i>1){Xt(String(Le));return}Wt(i),we({backgroundOpacity:i})}function jn(){const i=Number(Fs);if(!Number.isFinite(i)||i<0){es(String(rt));return}Gt(i),we({backgroundBlur:i})}function Ot(i,g){i.key==="Enter"&&(g(),i.currentTarget.blur())}function Nn(i,g){i.key==="Enter"&&(g(),i.currentTarget.blur())}function Cn(){he(Jt)}async function sr(i=Qs.current){try{Hs(!0),Et(null);const g={...i},R=await c.socket.command({type:"settings.writeKeybindings",bindings:Dl(g)}),Q=$t(Mn(R).bindings);ss.current=Q,Ks(Q),lt(fe=>Nl(fe,g,Q))}catch(g){Et(g instanceof Error?g.message:"Unable to save keybindings.")}finally{Hs(!1)}}async function we(i){try{await c.socket.command({type:"settings.writeThemeSettings",settings:{themePreference:(i==null?void 0:i.themePreference)??f,themeId:(i==null?void 0:i.themeId)??Ss,customAppearance:(i==null?void 0:i.customAppearance)??Is,backgroundImage:(i==null?void 0:i.backgroundImage)!==void 0?i.backgroundImage:qe,backgroundOpacity:(i==null?void 0:i.backgroundOpacity)??Le,backgroundBlur:(i==null?void 0:i.backgroundBlur)??rt,showProjectIconsInSidebar:(i==null?void 0:i.showProjectIconsInSidebar)??Ps}})}catch(g){console.error("Failed to save theme settings:",g)}}async function os(i,g){an(i);try{await xe(i==="refresh"?un:i==="open_editor"?mn:fn,g,{statusLabel:i==="refresh"?"Refreshing themes...":i==="open_editor"?"Opening theme files...":"Opening theme folder..."})}finally{an(R=>R===i?null:R)}}async function En(){if(Z.features.browserNotifications.enabled){It("requesting");try{const i=await Fn();Ls(i),jt(i==="granted")}finally{It(i=>i==="requesting"?null:i)}}}async function nr(){if(Z.features.browserNotifications.enabled){It("testing");try{let i=Zn(Ds);is&&i==="default"&&vn&&(i=await Fn(),Ls(i),i!=="granted"&&jt(!1)),await Wr({event:{chatId:c.activeChatId??"settings-test",chatTitle:"Test notification",kind:"needs_input",projectTitle:"Settings"},onBrowserNotificationClick:()=>{t("/settings/general",{replace:bn.current.startsWith("/settings")})},preferences:{browserNotificationsEnabled:is&&i==="granted",soundEnabled:Os,vibrationEnabled:Ms}})}finally{It(i=>i==="testing"?null:i)}}}async function mt(i){const g=(p==null?void 0:p.settings)??G,R=i.openrouter.active&&!g.openrouter.active&&!Z.features.openrouter.enabled,Q=Z.features.openrouter.enabled?i:{...i,openrouter:{...i.openrouter,active:!1}};R&&ns(Yr("OpenRouter","account"));try{R||ns(null),await c.socket.command({type:"settings.writeProviderSettings",settings:Q})}catch(fe){ns(fe instanceof Error?fe.message:"Unable to save provider settings.")}}function ar(i){Et(null),lt(g=>({...g,[i]:vs(Kn[i])}))}function rr(){Et(null),lt(ts)}async function ir(i){Rt(i?"enable":"disable");try{At(null),await c.socket.command({type:"remoteRelay.setEnabled",enabled:i})}catch(g){At(g instanceof Error?g.message:String(g))}finally{Rt(g=>g===(i?"enable":"disable")?null:g)}}async function lr(){Rt("reconnect");try{At(null),await c.socket.command({type:"remoteRelay.setEnabled",enabled:!0})}catch(i){At(i instanceof Error?i.message:String(i))}finally{Rt(i=>i==="reconnect"?null:i)}}const or=Jt.replaceAll("{path}","/Users/jake/Projects/kaizen/src/client/app/App.tsx").replaceAll("{line}","12").replaceAll("{column}","1"),Tn=vt.find(i=>i.id===k)??vt[0],dr=k==="keybindings"?jl($s):Tn.subtitle,cr=Z.features.openrouter.enabled?Pt:[...Pt,...Pt.some(i=>i.id==="openrouter")?[]:[J("openrouter")]];y.useEffect(()=>{ee==="openrouter"&&(Z.features.openrouter.enabled||qt("last_used"))},[Z.features.openrouter.enabled,ee,qt]);const _=c.remoteRelay,ie=(u==null?void 0:u.status)==="signed_in",ur=((Pn=u==null?void 0:u.entitlements)==null?void 0:Pn["remote.relay"])===!0,mr=(_==null?void 0:_.status)==="unauthorized",ds=ie&&ur&&!mr,Ge=(_==null?void 0:_.relayEnabled)??!0,fr=(_==null?void 0:_.status)==="idle_disconnected"&&Ge,hr=!Z.features.openrouter.enabled,gr=!Z.features.remoteRelay.enabled,te=!ie||(u==null?void 0:u.streamerModeEnabled)!==!1,Mt=ie&&(u==null?void 0:u.streamerModeEnabled)!==!1,pr=y.useMemo(()=>(u==null?void 0:u.status)==="signed_in"?te?`Kaizen checks account state and relay availability every ${ca/1e3} seconds, and falls back to a full auth reload every ${ps/6e4} minutes.`:`Account connected as ${u.userId??"your account"}. Kaizen checks account state and relay availability every ${ca/1e3} seconds, and falls back to a full auth reload every ${ps/6e4} minutes. The current access token is valid until ${Cs(u.accessTokenExpiresAt)}.`:(u==null?void 0:u.status)==="pending_sign_in"?"Complete account sign-in in the browser tab that opened. If nothing opened, use the continue link below.":u!=null&&u.error?u.error:"Link this app to your Kaizen account to unlock account-only features.",[u==null?void 0:u.status,u==null?void 0:u.userId,u==null?void 0:u.accessTokenExpiresAt,u==null?void 0:u.error,te]),xr=y.useMemo(()=>ie?ds?Ge?(_==null?void 0:_.status)==="idle_disconnected"?"Hosted relay disconnected after 30 minutes without browser-driven activity. It will reconnect automatically when a wake request arrives.":_!=null&&_.publicUrl&&!te?`Remote access is published at ${_.publicUrl}.`:"Relay state for this machine.":"Hosted relay is manually disabled on this machine. Wake requests are ignored until you turn it back on here.":"Hosted relay access is controlled by your Kaizen account state and refreshed from the web app automatically.":"Sign in from the account page to unlock remote access.",[ie,ds,Ge,_==null?void 0:_.status,_==null?void 0:_.publicUrl,te]);y.useEffect(()=>{te&&(as(!1),tn(!1),sn(!1))},[te,u==null?void 0:u.status,c.lastRemoteAuthUrl,_==null?void 0:_.publicUrl]);const Rn=!P,vr=k==="keybindings"?n.jsxs(n.Fragment,{children:[n.jsx(Se,{"data-testid":"keybindings-cancel-button",onClick:rr,disabled:Tt||Ft(Be,ts),children:"Cancel"}),n.jsx(Se,{"data-testid":"keybindings-save-button",variant:"default",onClick:()=>{sr()},disabled:Tt||Ft(Be,ts),icon:Tt?n.jsx(ue,{className:"h-4 w-4 animate-spin"}):void 0,children:Tt?"Saving...":"Save"}),n.jsxs(Se,{onClick:()=>{c.handleOpenExternalPath("open_editor",$s)},icon:n.jsx(xs,{className:"h-4 w-4"}),children:["Open in ",c.editorLabel]})]}):k==="general"?n.jsx(Se,{variant:Ue.variant,onClick:()=>{if(Ue.kind==="update"){xe(on,()=>c.handleInstallUpdate(),{statusLabel:"Installing update..."});return}xe(ln,()=>c.handleCheckForUpdates({force:!0}),{statusLabel:"Checking for updates..."})},disabled:Ue.disabled,icon:Ue.kind==="check"?n.jsx(Ln,{className:ve("size-3.5",Ue.spinning&&"animate-spin")}):Ue.kind==="update"?n.jsx(xa,{className:ve("size-3.5")}):void 0,children:Ue.label}):null;function An(){if(Tl(window.history.state)==="back"){t(-1);return}t("/",{replace:!0})}return y.useEffect(()=>{Ba((u==null?void 0:u.baseUrl)??"")},[u==null?void 0:u.baseUrl]),y.useEffect(()=>{const i=c.handleReloadRemoteAuth,g=k==="account"&&nn.current!=="account";nn.current=k,g&&(ke||(u==null?void 0:u.status)!=="signed_in"&&(u==null?void 0:u.status)!=="error"||(ce("refresh"),xe(We,i,{statusLabel:"Refreshing account state..."}).finally(()=>{ce(R=>R==="refresh"?null:R)})))},[We,ke,u==null?void 0:u.status,k,c.handleReloadRemoteAuth]),y.useEffect(()=>{const i=c.handleReloadRemoteAuth;if(k!=="account"||(u==null?void 0:u.status)!=="signed_in"&&(u==null?void 0:u.status)!=="error")return;const g=()=>{ke||(ce("refresh"),xe(We,i,{statusLabel:"Refreshing account state..."}).finally(()=>{ce(fe=>fe==="refresh"?null:fe)}))},R=()=>{document.visibilityState==="visible"&&g()};window.addEventListener("focus",g),document.addEventListener("visibilitychange",R);const Q=window.setInterval(g,ps);return()=>{window.removeEventListener("focus",g),document.removeEventListener("visibilitychange",R),window.clearInterval(Q)}},[We,ke,u==null?void 0:u.status,k,c.handleReloadRemoteAuth]),n.jsxs("div",{className:"relative flex h-full flex-1 min-w-0 bg-background",children:[n.jsxs("div",{className:"flex min-w-0 flex-1",children:[n.jsx("aside",{className:`hidden w-[200px] shrink-0 md:block ${Rn?"pb-[89px]":""}`,children:n.jsxs("div",{className:"flex flex-col gap-1 px-4 py-6",children:[n.jsx("div",{className:"px-3 pb-5 text-[22px] font-extrabold tracking-[-0.5px] text-foreground",children:"Settings"}),vt.map(i=>n.jsx("button",{type:"button",onClick:()=>t(`/settings/${i.id}`,{replace:!0}),className:`cursor-pointer rounded-lg px-3 py-2 text-sm ${i.id===k?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx(i.icon,{className:"h-4 w-4 shrink-0"}),n.jsx("span",{children:i.label})]})},i.label))]})}),n.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto",children:[n.jsx("div",{className:"md:hidden sticky top-0 z-10 bg-background border-b border-border px-4 py-2 backdrop-blur-md",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto scrollbar-hide",children:vt.map(i=>n.jsxs("button",{type:"button",onClick:()=>t(`/settings/${i.id}`,{replace:!0}),className:`flex shrink-0 items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm transition-colors ${i.id===k?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:[n.jsx(i.icon,{className:"h-3.5 w-3.5 shrink-0"}),n.jsx("span",{children:i.label})]},i.id))}),n.jsx("button",{type:"button","aria-label":"Close settings",onClick:An,className:"ml-1 flex shrink-0 items-center justify-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:n.jsx($n,{className:"h-4 w-4"})})]})}),n.jsxs("div",{className:"w-full px-6 pt-8 md:pt-16 pb-32",children:[P?n.jsx("div",{className:"flex min-h-[240px] items-center justify-center rounded-2xl border border-border bg-card/40 px-4 py-6 text-sm text-muted-foreground",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ue,{className:"h-4 w-4 animate-spin"}),n.jsx("span",{children:"Loading machine settings…"})]})}):n.jsxs("div",{className:"mx-auto max-w-4xl",children:[n.jsxs("div",{className:"pb-6",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4 min-h-[34px]",children:[n.jsx("div",{className:"text-lg font-semibold tracking-[-0.2px] text-foreground",children:Tn.label}),n.jsxs("div",{className:"flex items-center gap-2",children:[vr,n.jsx(Se,{"aria-label":"Close settings",title:"Close settings",onClick:An,icon:n.jsx($n,{className:"h-4 w-4"}),className:"hidden md:flex"})]})]}),n.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:dr})]}),k==="account"?n.jsxs("div",{className:"border-b border-border",children:[n.jsx(T,{title:"Web dashboard",description:"Opens your Kaizen account dashboard in a new browser tab.",alignStart:!0,bordered:!1,children:n.jsxs("a",{href:vi(u==null?void 0:u.baseUrl),target:"_blank",rel:"noopener noreferrer",className:ve(fa({variant:"outline"}),"inline-flex gap-2 no-underline"),children:[n.jsx($r,{className:"h-4 w-4 shrink-0"}),"Open Dashboard"]})}),n.jsx(T,{title:"Streamer mode",description:ie?"Stores on your Kaizen account. When on (default), email, token timing, relay links, and sign-in URLs stay hidden — synced with the web dashboard.":"Sign in to sync privacy mode from your Kaizen account. Until then, sensitive fields stay hidden locally.",alignStart:!0,bordered:!1,children:n.jsxs(Y,{type:"button",variant:Mt?"default":"outline","aria-pressed":Mt,className:"min-w-[72px]",disabled:!ie||ke,onClick:()=>{xe(cn,()=>c.handleSetStreamerMode(!Mt),{statusLabel:"Updating privacy setting..."})},children:[xn?n.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,Mt?"On":"Off"]})}),n.jsx(T,{title:"Email",description:ie?te?"Hidden while streamer mode is on. Use the eye to reveal on this device.":"Address for your Kaizen account.":"Sign in to link an account and show your email here.",alignStart:!0,children:n.jsxs("div",{className:"flex min-w-0 max-w-full items-center gap-2 sm:max-w-[360px]",children:[n.jsx("div",{className:"min-w-0 flex-1 text-sm text-foreground",children:ie?te&&!ut?n.jsx("span",{className:"text-muted-foreground",children:"—"}):u!=null&&u.email?n.jsx("span",{className:"break-all",children:u.email}):n.jsx("span",{className:"text-muted-foreground",children:"Not synced yet"}):n.jsx("span",{className:"text-muted-foreground",children:"—"})}),ie&&te?n.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"h-9 w-9 shrink-0 p-0","aria-pressed":ut,"aria-label":ut?"Hide email":"Show email",title:ut?"Hide email":"Show email",onClick:()=>sn(i=>!i),children:ut?n.jsx(Hn,{className:"h-4 w-4"}):n.jsx(qn,{className:"h-4 w-4"})}):null]})}),n.jsx(T,{title:"Kaizen account",badge:ie?null:n.jsx(Ye,{level:"account"}),description:pr,bordered:!1,alignStart:!0,children:n.jsxs("div",{className:"w-full min-w-0 space-y-3 sm:max-w-[360px]",children:[kl({remoteAuthSnapshot:u}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[(u==null?void 0:u.status)==="signed_out"||(u==null?void 0:u.status)==="error"?n.jsxs(n.Fragment,{children:[n.jsxs(Y,{type:"button",variant:"outline",disabled:ke,onClick:()=>{ce("sign_in"),xe(rs,()=>c.handleStartRemoteAuthSignIn("sign_up"),{statusLabel:"Starting sign-up..."}).finally(()=>ce(null))},children:[dt==="sign_in"||pn?n.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Sign up"]}),n.jsxs(Y,{type:"button",disabled:ke,onClick:()=>{ce("sign_in"),xe(rs,()=>c.handleStartRemoteAuthSignIn("sign_in"),{statusLabel:"Starting sign-in..."}).finally(()=>ce(null))},children:[dt==="sign_in"||pn?n.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Sign in"]})]}):null,(u==null?void 0:u.status)!=="signed_out"?n.jsxs(Y,{type:"button",variant:"outline",disabled:ke,onClick:()=>{ce("refresh"),xe(We,()=>c.handleReloadRemoteAuth(),{statusLabel:"Refreshing account state..."}).finally(()=>ce(null))},children:[dt==="refresh"||qa?n.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Refresh"]}):null,(u==null?void 0:u.status)!=="signed_out"?n.jsxs(Y,{type:"button",variant:"outline",disabled:ke,onClick:()=>{ce("sign_out"),xe(dn,()=>c.handleSignOutRemoteAuth(),{statusLabel:"Signing out..."}).finally(()=>ce(null))},children:[dt==="sign_out"||Ha?n.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,(u==null?void 0:u.status)==="pending_sign_in"?"Cancel sign-in":"Sign out"]}):null]}),(u==null?void 0:u.status)==="pending_sign_in"&&c.lastRemoteAuthUrl?n.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:[n.jsx("div",{className:"font-medium text-foreground",children:"Continue sign-in"}),te&&!Ua?n.jsx(Y,{type:"button",variant:"outline",className:"mt-2",onClick:()=>tn(!0),children:"Show sign-in link"}):n.jsx("a",{href:c.lastRemoteAuthUrl,target:"_self",rel:"noreferrer",className:"mt-1 block break-all text-primary underline underline-offset-2",children:c.lastRemoteAuthUrl})]}):null]})}),ie?n.jsxs(n.Fragment,{children:[n.jsx(T,{title:"Unlocked Features",description:"Current account state and what it unlocks in this app.",alignStart:!0,children:n.jsxs("div",{className:"w-full min-w-0 space-y-3 sm:max-w-[420px]",children:[n.jsx(Sl,{access:Z}),n.jsx(Pl,{access:Z})]})}),n.jsx(T,{title:"Saved sign-in data",description:te?"Sign-in credentials are cached on this machine so you do not have to log in every launch.":`Sign-in is cached on this machine at ${(u==null?void 0:u.filePathDisplay)??"~/.kaizen/remote-auth.json"} so you do not have to log in every launch.`,alignStart:!0,children:n.jsx("div",{className:"text-sm text-foreground",children:Al((u==null?void 0:u.status)??"signed_out")})})]}):null,n.jsx(T,{title:"Remote relay",badge:gr?n.jsx(Ye,{level:"paid"}):null,description:xr,alignStart:!0,children:n.jsx("div",{className:"w-full min-w-0 space-y-3 sm:max-w-[420px]",children:Z.features.remoteRelay.enabled?ds?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[n.jsxs("div",{className:"text-sm text-foreground",children:["Status:"," ",(_==null?void 0:_.status)??"disabled"]}),n.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[_!=null&&_.publicUrl&&te?en?n.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>as(!1),children:[n.jsx(Hn,{className:"h-4 w-4 shrink-0"}),"Hide"]}):n.jsxs(zr,{children:[n.jsx(Br,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>as(!0),children:[n.jsx(qn,{className:"h-4 w-4 shrink-0"}),"View"]})}),n.jsx(Ur,{side:"bottom",className:"max-w-xs text-left",children:"Relay URL and QR are hidden while streamer mode is on."})]}):null,n.jsx(Y,{type:"button",variant:Ge?"outline":"default",disabled:ct!==null,onClick:()=>{ir(!Ge)},children:ct==="enable"?"Enabling…":ct==="disable"?"Disabling…":Ge?"Disable relay":"Enable relay"})]})]}),(_==null?void 0:_.status)==="manually_disabled"?n.jsx("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"Relay is manually disabled. Kaizen will not keep a tunnel open, will not poll for wake requests, and will ignore wake requests until you re-enable it here."}):null,(_==null?void 0:_.status)==="idle_disconnected"?n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"Relay is idle-disconnected. The tunnel is down, but Kaizen is polling for wake requests every 15 seconds."}),n.jsx(Y,{type:"button",variant:"outline",disabled:ct!==null||!fr,onClick:()=>{lr()},children:ct==="reconnect"?"Reconnecting…":"Reconnect now"})]}):null,_!=null&&_.publicUrl&&(!te||en)?n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:"Scan this from a phone to open the relay URL quickly."}),n.jsx(Rl,{url:_.publicUrl}),n.jsx("div",{className:"break-all rounded-lg border border-border bg-muted/30 px-3 py-2 font-mono text-xs text-foreground",children:_.publicUrl})]}):null,Xs||_!=null&&_.error?n.jsx("div",{className:"text-sm text-red-500",children:Xs??(_==null?void 0:_.error)}):null,n.jsx(Ol,{snapshot:_,redactMachineId:te})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"text-sm text-foreground",children:"Status: unauthorized"}),n.jsx("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"Remote access is not enabled for this account. Refresh account state or ask an admin to review your relay access if you expected it to work."})]}):n.jsx("div",{className:"text-sm text-muted-foreground",children:ie?"Remote relay access is controlled by your Kaizen account state on the web app.":"Sign in from the account page to unlock remote relay."})})})]}):k==="general"?n.jsx(n.Fragment,{children:n.jsxs("div",{className:"border-b border-border",children:[n.jsx(T,{title:"Application Update",description:n.jsxs(n.Fragment,{children:[n.jsxs("span",{children:[er,"."]}),C!=null&&C.lastCheckedAt?n.jsxs("span",{children:[" ","Last checked"," ",new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(C.lastCheckedAt),"."]}):null,C!=null&&C.error?n.jsxs("span",{children:[" ",C.error]}):null]}),bordered:!1,children:n.jsxs("div",{className:"text-right text-sm text-foreground",children:[n.jsxs("div",{children:["Current:"," ",(C==null?void 0:C.currentVersion)??B]}),n.jsxs("div",{className:"text-xs text-muted-foreground",children:["Latest: ",(C==null?void 0:C.latestVersion)??"Unknown"]})]})}),n.jsx(T,{title:"Theme",description:"Choose between light, dark, system, or custom appearance",children:n.jsxs(L,{value:f,onValueChange:i=>{v(i),we({themePreference:i})},children:[n.jsx($,{className:"w-[150px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"light",children:"Light"}),n.jsx(N,{value:"dark",children:"Dark"}),n.jsx(N,{value:"system",children:"System"}),n.jsx(N,{value:"custom",children:"Custom"})]})]})}),f==="custom"?n.jsxs("div",{className:"mb-2 ml-6 space-y-0 border-l border-border/60 pl-4",children:[n.jsx(T,{title:"Appearance",description:"Choose light, dark, or system mode for your custom theme",bordered:!1,children:n.jsxs(L,{value:Is,onValueChange:i=>{Oa(i),we({customAppearance:i})},children:[n.jsx($,{className:"w-[150px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"light",children:"Light"}),n.jsx(N,{value:"dark",children:"Dark"}),n.jsx(N,{value:"system",children:"System"})]})]})}),n.jsx(T,{title:"Color Theme",description:`Choose a color palette for the interface. Custom JSON themes live in ${(re==null?void 0:re.themesDirectoryDisplay)??"~/.kaizen/themes"}. Read ${(re==null?void 0:re.themesReadmeFileDisplay)??"~/.kaizen/themes/THEME_README.md"} for authoring guidance.`,alignStart:!0,bordered:!1,children:n.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2 sm:max-w-[320px]",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{value:Ss,onValueChange:i=>{Pa(i),we({themeId:i})},children:[n.jsx($,{className:"min-w-[180px]",children:n.jsx(F,{})}),n.jsx(z,{children:n.jsx(us,{children:Ia.map(i=>n.jsx(N,{value:i.id,children:i.label},i.id))})})]}),n.jsx(Se,{variant:"outline","aria-label":"Refresh themes",title:"Refresh themes",className:"px-2.5",disabled:He!==null,onClick:()=>{os("refresh",()=>c.handleRefreshThemeSettings())},icon:He==="refresh"||Wa?n.jsx(ue,{className:"size-3.5 animate-spin"}):n.jsx(Ln,{className:"size-3.5"})})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs(Se,{disabled:He!==null,onClick:()=>{os("open_editor",()=>c.handleOpenCustomThemes())},icon:He==="open_editor"||Ga?n.jsx(ue,{className:"size-3.5 animate-spin"}):n.jsx(di,{className:"size-3.5"}),children:["Open in ",c.editorLabel]}),n.jsx(Se,{variant:"outline",disabled:He!==null,onClick:()=>{os("open_folder",()=>c.handleOpenExternalPath("open_finder",(re==null?void 0:re.themesDirectoryDisplay)??"~/.kaizen/themes"))},icon:He==="open_folder"||Ya?n.jsx(ue,{className:"size-3.5 animate-spin"}):n.jsx(xs,{className:"size-3.5"}),children:"Open folder"})]}),re!=null&&re.customThemeWarnings.length?n.jsx("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/5 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:re.customThemeWarnings.join(" ")}):null]})}),n.jsx(T,{title:"Background Image",description:"Choose a background or enter a custom URL",alignStart:!0,bordered:!1,children:(()=>{const i=rn.find(q=>q.url===ze),g=!ze,R=!!ze&&!i,Q=g?"__none__":R?"__custom__":ze,fe=g?"None":R?"Custom URL":(i==null?void 0:i.name)??"Unknown";return n.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2 sm:max-w-[320px]",children:[n.jsxs(L,{value:Q,onValueChange:q=>{if(q==="__none__")Ct(""),Ht(null),we({backgroundImage:null});else{const Ve=ma({themePreference:f,nextBackgroundImage:q,backgroundOpacity:Le});Ct(q),Ht(q),Ve.backgroundOpacity!==void 0&&Wt(Ve.backgroundOpacity),Ve.backgroundBlur!==void 0&&Gt(Ve.backgroundBlur),we({backgroundImage:q,...Ve})}},children:[n.jsx($,{className:"w-full",children:n.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[g?null:n.jsx("img",{src:ms(qe??null)??void 0,alt:"",className:"h-5 w-9 shrink-0 rounded object-cover"}),n.jsx("span",{className:"truncate",children:fe})]})}),n.jsxs(z,{children:[n.jsx(fs,{value:"__none__",children:"None"}),rn.map(q=>n.jsx(fs,{value:q.url,thumbnail:ms(q.url)??q.url,thumbnailAlt:q.name,children:q.name},q.id)),R?n.jsx(fs,{value:"__custom__",thumbnail:ms(qe??null)??void 0,thumbnailAlt:"Custom",children:"Custom URL"}):null]})]}),n.jsx(be,{type:"text",placeholder:"Or enter a custom URL...",value:ze,onChange:q=>Ct(q.target.value),onBlur:kn,onKeyDown:q=>Nn(q,kn),className:"w-full"})]})})()}),n.jsx(T,{title:"Background Opacity",description:"Opacity of the interface layered over the background (0 to 1)",bordered:!1,children:n.jsx("div",{className:"flex min-w-0 flex-col items-end gap-2",children:n.jsx(be,{type:"number",min:0,max:1,step:.05,value:Zs,onChange:i=>Xt(i.target.value),onBlur:wn,onKeyDown:i=>Ot(i,wn),className:"hide-number-steppers w-28 text-right font-mono"})})}),n.jsx(T,{title:"Background Blur",description:"Blur applied to the background image (in pixels)",bordered:!1,children:n.jsx("div",{className:"flex min-w-0 flex-col items-end gap-2",children:n.jsx(be,{type:"number",min:0,max:50,step:1,value:Fs,onChange:i=>es(i.target.value),onBlur:jn,onKeyDown:i=>Ot(i,jn),className:"hide-number-steppers w-28 text-right font-mono"})})})]}):null,Qa?n.jsxs(n.Fragment,{children:[n.jsx(T,{title:"Browser Notifications",badge:Z.features.browserNotifications.enabled?null:n.jsx(Ye,{level:"paid"}),description:"Show desktop or PWA notifications when a background chat needs input or completes.",children:n.jsxs(L,{value:is?"enabled":"disabled",onValueChange:i=>{if(i==="enabled"){if(!Z.features.browserNotifications.enabled)return;ls==="granted"?jt(!0):En();return}jt(!1)},disabled:!Z.features.browserNotifications.enabled,children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),Z.features.browserNotifications.enabled?n.jsxs("div",{className:"mb-2 ml-6 space-y-0 border-l border-border/60 pl-4",children:[n.jsx(T,{title:"Permission",description:"Permission is only requested when you explicitly enable notifications from here.",bordered:!1,alignStart:!0,children:n.jsxs("div",{className:"flex w-full flex-col items-end gap-2 text-right sm:w-auto",children:[n.jsxs("div",{className:"flex items-center justify-end gap-2 text-sm text-foreground",children:[n.jsx(Xr,{className:"size-4 text-muted-foreground"}),n.jsx("span",{children:Ja})]}),n.jsx("div",{className:"flex w-full flex-wrap justify-end gap-2 sm:w-auto",children:n.jsxs(Y,{type:"button",variant:"outline",disabled:!vn||St!==null,onClick:()=>{En()},children:[St==="requesting"?n.jsx(ue,{className:"mr-2 size-4 animate-spin"}):null,"Enable notifications"]})})]})}),n.jsx(T,{title:"Notification Sound",description:"Play a local alert cue for background chat notifications.",bordered:!1,children:n.jsxs(L,{value:Os?"enabled":"disabled",onValueChange:i=>{La(i==="enabled")},children:[n.jsx($,{className:"ml-auto w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),Xa?n.jsx(T,{title:"Vibration",description:"Use device vibration when supported by the browser.",bordered:!1,children:n.jsxs(L,{value:Ms?"enabled":"disabled",onValueChange:i=>{$a(i==="enabled")},children:[n.jsx($,{className:"ml-auto w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}):null,n.jsx(T,{title:"Test Notification",description:"Send a local test notification using your current notification settings.",bordered:!1,children:n.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:n.jsxs(Y,{type:"button",variant:"outline",disabled:St!==null,onClick:()=>{nr()},children:[St==="testing"?n.jsx(ue,{className:"mr-2 size-4 animate-spin"}):null,"Test notification"]})})})]}):null]}):null,n.jsx(T,{title:"Project Icons",description:"Show detected project icons in the sidebar and open-project list.",children:n.jsxs(L,{value:Ps?"enabled":"disabled",onValueChange:i=>{const g=i==="enabled";Ma(g),we({showProjectIconsInSidebar:g})},children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),n.jsx(T,{title:"Folder Groups",description:"Show or hide feature folder grouping in the sidebar. Turning this off keeps the existing feature state, but flattens chats into a direct list and hides the new-folder button.",children:n.jsxs(L,{value:As?"enabled":"disabled",onValueChange:i=>Ta(i==="enabled"),children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),As?n.jsxs("div",{className:"mb-2 ml-6 space-y-0 border-l border-border/60 pl-4",children:[n.jsx(T,{title:"Feature Overview",description:"Generate and show an `overview.md` file for feature folders. Turning this off stops creating new overview files and hides existing overview rows from the sidebar.",bordered:!1,children:n.jsxs(L,{value:Na?"enabled":"disabled",onValueChange:i=>Ra(i==="enabled"),children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),n.jsx(T,{title:"Kanban Status",description:"Show or hide feature status controls like Idea, Todo, Progress, Testing, and Done.",bordered:!1,children:n.jsxs(L,{value:Ca?"enabled":"disabled",onValueChange:i=>Aa(i==="enabled"),children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),n.jsx(T,{title:`${hs} In Git`,description:`Control whether ${Dn} keeps the project ${hs} directory tracked in git or adds it to .gitignore for currently loaded projects and future opens. This is best suited to solo developers working across multiple machines. For team repos, we recommend ignoring \`${hs}\`.`,bordered:!1,children:n.jsxs(L,{value:Ea?"commit":"ignore",onValueChange:i=>{const g=i==="commit";Sa(g),c.handleSetCommitProjectMetadataDirectory(g)},children:[n.jsx($,{className:"w-[120px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"commit",children:"Commit"}),n.jsx(N,{value:"ignore",children:"Ignore"})]})]})})]}):null,n.jsx(T,{title:"Provider Icons In Side Tray",description:"Show provider badges next to chats in the left sidebar side tray.",children:n.jsxs(L,{value:wt?"enabled":"disabled",onValueChange:i=>ja(i==="enabled"),children:[n.jsx($,{className:"w-[100px]",children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"disabled",children:"Off"}),n.jsx(N,{value:"enabled",children:"On"})]})]})}),n.jsx(T,{title:"Default Editor",description:"Used by the navbar code button and local file links in chat",alignStart:!0,children:n.jsxs(L,{value:V,onValueChange:i=>M(i),children:[n.jsx($,{className:"min-w-[180px]",children:n.jsx(F,{})}),n.jsx(z,{children:n.jsx(us,{children:wl.map(i=>n.jsx(N,{value:i.value,children:i.label},i.value))})})]})}),V==="custom"?n.jsx("div",{className:"border-t border-border",children:n.jsxs("div",{className:"flex justify-between gap-8 py-5 pl-6",children:[n.jsxs("div",{className:"min-w-0 max-w-xl",children:[n.jsx("div",{className:"text-sm font-medium text-foreground",children:"Command Template"}),n.jsxs("div",{className:"mt-1 text-[13px] text-muted-foreground",children:["Include ","{path}"," and optionally ","{line}"," and"," ","{column}"," in your command."]})]}),n.jsxs("div",{className:"flex min-w-0 max-w-[420px] flex-1 flex-col items-stretch gap-2",children:[n.jsx(be,{type:"text",value:Jt,onChange:i=>Vs(i.target.value),onBlur:Cn,onKeyDown:i=>Nn(i,Cn),className:"font-mono"}),n.jsxs("div",{className:"text-xs text-muted-foreground",children:["Preview:"," ",n.jsx("span",{className:"font-mono",children:or})]})]})]})}):null,n.jsx(T,{title:"Terminal Scrollback",description:"Lines retained for embedded terminal history",children:n.jsxs("div",{className:"flex w-full min-w-0 flex-col items-stretch gap-2 md:w-auto md:items-end",children:[n.jsx(be,{type:"number",min:Bn,max:zn,step:100,value:zs,onChange:i=>Yt(i.target.value),onBlur:yn,onKeyDown:i=>Ot(i,yn),className:"hide-number-steppers w-full text-left font-mono md:w-28 md:text-right"}),n.jsxs("div",{className:"text-left text-xs text-muted-foreground md:text-right",children:[Bn,"-",zn," ","lines",U===Zr?" (default)":""]})]})}),n.jsx(T,{title:"Terminal Min Column Width",description:"Minimum width for each terminal pane",children:n.jsxs("div",{className:"flex w-full min-w-0 flex-col items-stretch gap-2 md:w-auto md:items-end",children:[n.jsx(be,{type:"number",min:Vn,max:Un,step:10,value:Us,onChange:i=>Qt(i.target.value),onBlur:_n,onKeyDown:i=>Ot(i,_n),className:"hide-number-steppers w-full text-left font-mono md:w-28 md:text-right"}),n.jsxs("div",{className:"text-left text-xs text-muted-foreground md:text-right",children:[Vn,"-",Un," px",O===Fr?" (default)":""]})]})}),n.jsx(T,{title:"Chat Chunk Size",description:n.jsxs("div",{className:"space-y-1",children:[n.jsx("div",{children:"Max transcript payload sent per chat snapshot and load-more request. Smaller chunks reduce network payload size but increase the number of fetches."}),n.jsxs("div",{children:["Stored in ",za,". Range"," ",Lt/1024,"-",Dt/1024," KB. Default"," ",Kr/1024," KB."]}),I!=null&&I.warning?n.jsx("div",{className:"text-amber-700 dark:text-amber-300",children:I.warning}):null,Ws?n.jsx("div",{className:"text-red-500",children:Ws}):null]}),children:n.jsxs("div",{className:"flex w-full min-w-0 flex-col items-stretch gap-2 md:w-auto md:items-end",children:[n.jsx(be,{type:"number",min:Lt/1024,max:Dt/1024,step:16,value:Bs,onChange:i=>it(i.target.value),onBlur:()=>{tr()},onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),i.currentTarget.blur())},disabled:Gs,className:"hide-number-steppers w-full text-left font-mono md:w-28 md:text-right"}),n.jsx("div",{className:"text-left text-xs text-muted-foreground md:text-right",children:Gs?"Saving...":"Kilobytes per chunk"})]})})]})}):k==="changelog"?n.jsx(Xi,{entries:Ji}):k==="quick-chats"?n.jsx(al,{}):k==="slash-commands"?n.jsx(fl,{}):k==="providers"?n.jsxs("div",{className:"border-b border-border",children:[n.jsx(T,{title:"Default Provider",badge:hr?n.jsx(Ye,{level:"account"}):null,description:"The default harness used for new chats before a provider is locked by an existing session.",bordered:!1,children:n.jsxs(L,{value:Za,onValueChange:i=>qt(i),children:[n.jsx($,{className:"min-w-[180px]",children:n.jsx(F,{})}),n.jsx(z,{children:n.jsxs(us,{children:[n.jsx(N,{value:"last_used",children:"Last Used"}),cr.map(i=>n.jsx(N,{value:i.id,disabled:i.id==="openrouter"&&!Z.features.openrouter.enabled,children:i.label},i.id))]})})]})}),Js?n.jsx("div",{className:"border-t border-border px-0 py-3 text-sm text-destructive",children:Js}):null,n.jsx(T,{title:"Claude Code Defaults",description:`Saved defaults when using Claude Code. ${gt(se,p,"claude")}`,alignStart:!0,children:n.jsxs("div",{className:ve("max-w-[420px]",!J("claude").systemActive&&"opacity-50"),children:[n.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:n.jsxs(L,{value:((p==null?void 0:p.settings.claude)??G.claude).active?"active":"inactive",onValueChange:i=>{mt({...(p==null?void 0:p.settings)??G,claude:{...(p==null?void 0:p.settings.claude)??G.claude,active:i==="active"}})},children:[n.jsx($,{className:"min-w-[140px]",disabled:!J("claude").systemActive,children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"active",children:"Active"}),n.jsx(N,{value:"inactive",children:"Inactive"})]})]})}),n.jsx(ht,{availableProviders:se,selectedProvider:"claude",disabled:!J("claude").systemActive,showProviderPicker:!1,providerLocked:!0,model:W.claude.model,modelOptions:W.claude.modelOptions,onModelChange:(i,g)=>{st("claude",g)},onClaudeReasoningEffortChange:i=>{nt("claude",{reasoningEffort:i})},onClaudeContextWindowChange:i=>{nt("claude",{contextWindow:i})},onCodexReasoningEffortChange:()=>{},onGeminiThinkingModeChange:()=>{},onCodexFastModeChange:()=>{},planMode:W.claude.planMode,onPlanModeChange:i=>at("claude",i),includePlanMode:!0,className:"justify-start flex-wrap"})]})}),n.jsx(T,{title:"Codex Defaults",description:`Saved defaults when using Codex. ${gt(se,p,"codex")}`,alignStart:!0,children:n.jsxs("div",{className:ve("max-w-[420px]",!J("codex").systemActive&&"opacity-50"),children:[n.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:n.jsxs(L,{value:((p==null?void 0:p.settings.codex)??G.codex).active?"active":"inactive",onValueChange:i=>{mt({...(p==null?void 0:p.settings)??G,codex:{...(p==null?void 0:p.settings.codex)??G.codex,active:i==="active"}})},children:[n.jsx($,{className:"min-w-[140px]",disabled:!J("codex").systemActive,children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"active",children:"Active"}),n.jsx(N,{value:"inactive",children:"Inactive"})]})]})}),n.jsx(ht,{availableProviders:se,selectedProvider:"codex",disabled:!J("codex").systemActive,showProviderPicker:!1,providerLocked:!0,model:W.codex.model,modelOptions:W.codex.modelOptions,onModelChange:(i,g)=>{st("codex",g)},onClaudeReasoningEffortChange:()=>{},onClaudeContextWindowChange:()=>{},onCodexReasoningEffortChange:i=>{nt("codex",{reasoningEffort:i})},onGeminiThinkingModeChange:()=>{},onCodexFastModeChange:i=>{nt("codex",{fastMode:i})},planMode:W.codex.planMode,onPlanModeChange:i=>at("codex",i),includePlanMode:!0,className:"justify-start flex-wrap"})]})}),n.jsx(T,{title:"Gemini Defaults",description:`Saved defaults when using Gemini. ${gt(se,p,"gemini")}`,alignStart:!0,children:n.jsxs("div",{className:ve("max-w-[420px]",!J("gemini").systemActive&&"opacity-50"),children:[n.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:n.jsxs(L,{value:((p==null?void 0:p.settings.gemini)??G.gemini).active?"active":"inactive",onValueChange:i=>{mt({...(p==null?void 0:p.settings)??G,gemini:{...(p==null?void 0:p.settings.gemini)??G.gemini,active:i==="active"}})},children:[n.jsx($,{className:"min-w-[140px]",disabled:!J("gemini").systemActive,children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"active",children:"Active"}),n.jsx(N,{value:"inactive",children:"Inactive"})]})]})}),n.jsx(ht,{availableProviders:se,selectedProvider:"gemini",disabled:!J("gemini").systemActive,showProviderPicker:!1,providerLocked:!0,model:W.gemini.model,modelOptions:W.gemini.modelOptions,onModelChange:(i,g)=>{st("gemini",g)},onClaudeReasoningEffortChange:()=>{},onClaudeContextWindowChange:()=>{},onCodexReasoningEffortChange:()=>{},onGeminiThinkingModeChange:i=>{nt("gemini",{thinkingMode:i})},onCodexFastModeChange:()=>{},planMode:W.gemini.planMode,onPlanModeChange:i=>at("gemini",i),includePlanMode:!0,className:"justify-start flex-wrap"})]})}),n.jsx(T,{title:"Cursor Defaults",description:`Saved defaults when using Cursor. ${gt(se,p,"cursor")}`,alignStart:!0,children:n.jsxs("div",{className:ve("max-w-[420px]",!J("cursor").systemActive&&"opacity-50"),children:[n.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:n.jsxs(L,{value:((p==null?void 0:p.settings.cursor)??G.cursor).active?"active":"inactive",onValueChange:i=>{mt({...(p==null?void 0:p.settings)??G,cursor:{...(p==null?void 0:p.settings.cursor)??G.cursor,active:i==="active"}})},children:[n.jsx($,{className:"min-w-[140px]",disabled:!J("cursor").systemActive,children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"active",children:"Active"}),n.jsx(N,{value:"inactive",children:"Inactive"})]})]})}),n.jsx(ht,{availableProviders:se,selectedProvider:"cursor",disabled:!J("cursor").systemActive,showProviderPicker:!1,providerLocked:!0,model:W.cursor.model,modelOptions:W.cursor.modelOptions,onModelChange:(i,g)=>{st("cursor",g)},onClaudeReasoningEffortChange:()=>{},onClaudeContextWindowChange:()=>{},onCodexReasoningEffortChange:()=>{},onGeminiThinkingModeChange:()=>{},onCodexFastModeChange:()=>{},planMode:W.cursor.planMode,onPlanModeChange:i=>at("cursor",i),includePlanMode:!0,className:"justify-start flex-wrap"})]})}),n.jsx(T,{title:"OpenRouter Defaults",badge:Z.features.openrouter.enabled?null:n.jsx(Ye,{level:"account"}),description:`Saved defaults when using OpenRouter via openCode. ${gt(se,p,"openrouter")}`,alignStart:!0,children:n.jsxs("div",{className:ve("max-w-[420px]",!J("openrouter").systemActive&&"opacity-50"),children:[n.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:n.jsxs(L,{value:((p==null?void 0:p.settings.openrouter)??G.openrouter).active?"active":"inactive",onValueChange:i=>{mt({...(p==null?void 0:p.settings)??G,openrouter:{...(p==null?void 0:p.settings.openrouter)??G.openrouter,active:i==="active"}})},children:[n.jsx($,{className:"min-w-[140px]",disabled:!J("openrouter").systemActive||!Z.features.openrouter.enabled,children:n.jsx(F,{})}),n.jsxs(z,{children:[n.jsx(N,{value:"active",children:"Active"}),n.jsx(N,{value:"inactive",children:"Inactive"})]})]})}),n.jsx(ht,{availableProviders:se,selectedProvider:"openrouter",disabled:!J("openrouter").systemActive||!Z.features.openrouter.enabled,showProviderPicker:!1,providerLocked:!0,model:W.openrouter.model,modelOptions:W.openrouter.modelOptions,onModelChange:(i,g)=>{st("openrouter",g)},onClaudeReasoningEffortChange:()=>{},onClaudeContextWindowChange:()=>{},onCodexReasoningEffortChange:()=>{},onGeminiThinkingModeChange:()=>{},onCodexFastModeChange:()=>{},planMode:W.openrouter.planMode,onPlanModeChange:i=>at("openrouter",i),includePlanMode:!0,className:"justify-start flex-wrap"})]})})]}):k==="keybindings"?n.jsxs("div",{className:"border-b border-border",children:[qs?n.jsx("div",{className:"mb-4 rounded-2xl border border-destructive/20 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:qs}):null,$e.warning?n.jsx("div",{className:"mb-4 rounded-2xl border border-border bg-card/30 px-4 py-3 text-sm text-muted-foreground",children:$e.warning}):null,Kt.map((i,g)=>{const R=vs(Kn[i]),Q=Be[i]??"",fe=Q!==R;return n.jsx(T,{title:bs[i],description:n.jsxs(n.Fragment,{children:[n.jsx("span",{children:"Comma-separated shortcuts."}),fe?n.jsxs(n.Fragment,{children:[n.jsx("span",{children:" "}),n.jsxs("button",{type:"button",onClick:()=>{ar(i)},className:"inline rounded text-foreground hover:text-foreground/80",children:["Restore: ",R]})]}):null]}),bordered:g!==0,children:n.jsx("div",{className:"flex min-w-0 max-w-[420px] flex-1 flex-col items-stretch gap-2",children:n.jsx(be,{type:"text",value:Q,"aria-label":bs[i],onChange:q=>{const Ve=q.target.value;lt(br=>({...br,[i]:Ve}))},className:"font-mono"})})},i)})]}):null]}),c.commandError?n.jsxs("div",{className:"mx-auto mt-4 flex max-w-4xl items-start gap-3 rounded-2xl border border-destructive/20 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:[n.jsx(ri,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),n.jsx("span",{children:c.commandError})]}):null]})]})]}),Rn?n.jsx("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:n.jsx("div",{className:"px-6 py-[14.25px]",children:n.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-xs text-muted-foreground lg:grid-cols-4 lg:gap-3",children:[n.jsx("div",{className:"min-w-0",children:n.jsxs("div",{className:"flex items-baseline gap-1.5 lg:block",children:[n.jsx("div",{className:"uppercase tracking-wide text-[11px] text-muted-foreground/80 lg:mb-1",children:"Machine"}),n.jsx("div",{className:"truncate text-foreground/80",children:te?"Hidden":D})]})}),n.jsx("div",{className:"min-w-0",children:n.jsxs("div",{className:"flex items-baseline gap-1.5 lg:block",children:[n.jsx("div",{className:"uppercase tracking-wide text-[11px] text-muted-foreground/80 lg:mb-1",children:"Connection"}),n.jsx("div",{className:"truncate text-foreground/80",children:c.connectionStatus})]})}),n.jsx("div",{className:"min-w-0",children:n.jsxs("div",{className:"flex items-baseline gap-1.5 lg:block",children:[n.jsx("div",{className:"uppercase tracking-wide text-[11px] text-muted-foreground/80 lg:mb-1",children:"Projects"}),n.jsx("div",{className:"truncate text-foreground/80",children:K})]})}),n.jsx("div",{className:"min-w-0",children:n.jsxs("div",{className:"flex items-baseline gap-1.5 lg:block",children:[n.jsx("div",{className:"uppercase tracking-wide text-[11px] text-muted-foreground/80 lg:mb-1",children:"Version"}),n.jsx("div",{className:"truncate text-foreground/80",children:B})]})})]})})}):null]})}function Dl(t){return{submitChatMessage:Ae(t.submitChatMessage??""),toggleQuickPrompts:Ae(t.toggleQuickPrompts??""),toggleProjectsSidebar:Ae(t.toggleProjectsSidebar??""),toggleEmbeddedTerminal:Ae(t.toggleEmbeddedTerminal??""),toggleRightSidebar:Ae(t.toggleRightSidebar??""),openInFinder:Ae(t.openInFinder??""),openInEditor:Ae(t.openInEditor??""),addSplitTerminal:Ae(t.addSplitTerminal??"")}}export{Bl as SettingsPage,Dl as buildKeybindingPayload,$t as createKeybindingDrafts,pt as formatChunkSizeKilobytes,ma as getBackgroundSelectionAdjustments,El as getGeneralHeaderAction,jl as getKeybindingsSubtitle,Tl as getSettingsCloseTarget,Ft as keybindingDraftsEqual,Nl as mergeSavedKeybindingDrafts,Cl as reconcileLoadedKeybindingDrafts,ua as resolveSettingsSectionId};
@@ -1,4 +1,4 @@
1
- import{c}from"./index-BAzvPbMu.js";/**
1
+ import{c}from"./index-C6T6qDr6.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.