purplemux-improved 0.5.13 → 0.5.14

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 (59) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +11 -11
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +8 -8
  6. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05dwgd0._.js +1 -1
  7. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pg7_fw._.js +1 -1
  8. package/.next/standalone/.next/server/chunks/ssr/_0a3w-rg._.js +1 -1
  9. package/.next/standalone/.next/server/chunks/ssr/_0bnw_6t._.js +1 -1
  10. package/.next/standalone/.next/server/chunks/ssr/_0rqsi1~._.js +1 -1
  11. package/.next/standalone/.next/server/middleware-build-manifest.js +11 -11
  12. package/.next/standalone/.next/server/pages/de/404.html +1 -1
  13. package/.next/standalone/.next/server/pages/de/500.html +1 -1
  14. package/.next/standalone/.next/server/pages/en/404.html +1 -1
  15. package/.next/standalone/.next/server/pages/en/500.html +1 -1
  16. package/.next/standalone/.next/server/pages/es/404.html +1 -1
  17. package/.next/standalone/.next/server/pages/es/500.html +1 -1
  18. package/.next/standalone/.next/server/pages/fr/404.html +1 -1
  19. package/.next/standalone/.next/server/pages/fr/500.html +1 -1
  20. package/.next/standalone/.next/server/pages/index/build-manifest.json +2 -2
  21. package/.next/standalone/.next/server/pages/index/client-build-manifest.json +1 -1
  22. package/.next/standalone/.next/server/pages/ja/404.html +1 -1
  23. package/.next/standalone/.next/server/pages/ja/500.html +1 -1
  24. package/.next/standalone/.next/server/pages/ko/404.html +1 -1
  25. package/.next/standalone/.next/server/pages/ko/500.html +1 -1
  26. package/.next/standalone/.next/server/pages/pt-BR/404.html +1 -1
  27. package/.next/standalone/.next/server/pages/pt-BR/500.html +1 -1
  28. package/.next/standalone/.next/server/pages/reports/build-manifest.json +2 -2
  29. package/.next/standalone/.next/server/pages/reports/client-build-manifest.json +1 -1
  30. package/.next/standalone/.next/server/pages/ru/404.html +1 -1
  31. package/.next/standalone/.next/server/pages/ru/500.html +1 -1
  32. package/.next/standalone/.next/server/pages/stats/build-manifest.json +2 -2
  33. package/.next/standalone/.next/server/pages/stats/client-build-manifest.json +1 -1
  34. package/.next/standalone/.next/server/pages/tr/404.html +1 -1
  35. package/.next/standalone/.next/server/pages/tr/500.html +1 -1
  36. package/.next/standalone/.next/server/pages/webview/build-manifest.json +2 -2
  37. package/.next/standalone/.next/server/pages/webview/client-build-manifest.json +1 -1
  38. package/.next/standalone/.next/server/pages/zh-CN/404.html +1 -1
  39. package/.next/standalone/.next/server/pages/zh-CN/500.html +1 -1
  40. package/.next/standalone/.next/server/pages/zh-TW/404.html +1 -1
  41. package/.next/standalone/.next/server/pages/zh-TW/500.html +1 -1
  42. package/.next/standalone/.next/static/chunks/{04-vr2~bhe3gk.js → 00s0pa3j1blgg.js} +2 -2
  43. package/.next/standalone/.next/static/chunks/{076b08p6gqmyb.js → 02r2~4j3_11kd.js} +2 -2
  44. package/.next/standalone/.next/static/chunks/{071fxwl82dusg.js → 0qwajtji233bo.js} +1 -1
  45. package/.next/standalone/.next/static/chunks/{17~ejwmffd00t.js → 10nlk7z_yurx6.js} +2 -2
  46. package/.next/standalone/.next/static/chunks/{16rs.mjtytb3l.js → 14igb960be482.js} +1 -1
  47. package/.next/standalone/.next/static/chunks/{180lem0m4ri1v.js → 1615fxpy2w0o_.js} +1 -1
  48. package/.next/standalone/.next/static/chunks/{0i8skr_nole58.js → 16acr3k6tmymq.js} +2 -2
  49. package/.next/standalone/.next/static/chunks/{turbopack-174jxp06a7x5h.js → turbopack-0k37uf-ofwxiq.js} +1 -1
  50. package/.next/standalone/.next/static/chunks/{turbopack-0xw9814ea_y1n.js → turbopack-0n5gdjgbrvtzw.js} +1 -1
  51. package/.next/standalone/.next/static/chunks/{turbopack-0.emi_o0dsjxa.js → turbopack-0o1kr67anb.ye.js} +1 -1
  52. package/.next/standalone/.next/static/chunks/{turbopack-0ve1z-8gcwn9~.js → turbopack-0wm6c5z0ow~h5.js} +1 -1
  53. package/.next/standalone/.next/static/{XH8X_54L0fDdER84NbvuC → iDS4b0tZtLI4dC1iTnGHy}/_buildManifest.js +4 -4
  54. package/.next/standalone/package.json +1 -1
  55. package/.next/standalone/server.js +1 -1
  56. package/dist/server.js +3 -2
  57. package/package.json +1 -1
  58. /package/.next/standalone/.next/static/{XH8X_54L0fDdER84NbvuC → iDS4b0tZtLI4dC1iTnGHy}/_clientMiddlewareManifest.js +0 -0
  59. /package/.next/standalone/.next/static/{XH8X_54L0fDdER84NbvuC → iDS4b0tZtLI4dC1iTnGHy}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[269887,a=>{"use strict";let b=(0,a.i(305162).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);a.s(["Sparkles",0,b],269887)},412573,a=>{"use strict";var b=a.i(127669);let c=a=>{let b=window.visualViewport;return b?.addEventListener("resize",a),b?.addEventListener("scroll",a),()=>{b?.removeEventListener("resize",a),b?.removeEventListener("scroll",a)}},d=()=>{let a=window.visualViewport;return a&&1===a.scale?`${a.height}:${Math.max(0,a.offsetTop)}`:""},e=()=>"";a.s(["default",0,a=>{let f=(0,b.useSyncExternalStore)(c,d,e);if(!a||!f)return;let[g,h]=f.split(":").map(Number);return{position:"fixed",left:0,right:0,top:h,height:g}}])},463621,965848,97731,247129,783585,a=>{"use strict";var b=a.i(127669),c=a.i(276986),d=a.i(510414),e=a.i(892209);let f=a=>fetch(a).then(a=>{if(!a.ok)throw Error("fetch failed");return a.json()}),g={builtins:[],custom:[],order:[]},h=(a,b)=>{if(0===b.length)return a;let c=new Map(a.map(a=>[a.id,a])),d=[];for(let a of b){let b=c.get(a);b&&(d.push(b),c.delete(a))}for(let a of c.values())d.push(a);return d};a.s(["default",0,()=>{let{data:a,isLoading:i,mutate:j}=(0,c.default)("/api/sidebar-items",f,{revalidateOnFocus:!1}),k=a??g,l=(0,b.useMemo)(()=>h([...k.builtins,...k.custom].filter(a=>a.enabled),k.order),[k]),m=(0,b.useMemo)(()=>h([...k.builtins,...k.custom],k.order),[k]),n=(0,b.useCallback)(async(a,b,c)=>{let d=a.filter(a=>!a.enabled).map(a=>a.id);if(!(await fetch("/api/sidebar-items",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({custom:b,disabledBuiltinIds:d,order:c})})).ok)throw Error("save failed")},[]),o=(0,b.useCallback)(async(a,b)=>{let c=c=>({...c,builtins:c.builtins.map(c=>c.id===a?{...c,enabled:b}:c)});await j(async a=>{let b=c(a??g);return await n(b.builtins,b.custom,b.order),b},{optimisticData:a=>c(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),p=(0,b.useCallback)(async a=>{let b=b=>({...b,custom:a});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),q=(0,b.useCallback)(async a=>{let b=b=>({...b,order:a});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),r=(0,b.useCallback)(async a=>{let b=b=>({...b,custom:b.custom.filter(b=>b.id!==a),order:b.order.filter(b=>b!==a)});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),s=(0,b.useCallback)(async()=>{let a=a=>({builtins:a.builtins.map(a=>({...a,enabled:!0})),custom:[],order:[]});await j(async b=>{let c=a(b??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:b=>a(b??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]);return{items:l,allOrderedItems:m,builtinItems:k.builtins,customItems:k.custom,order:k.order,isLoading:i,toggleBuiltin:o,saveCustom:p,saveOrder:q,deleteItem:r,resetAll:s}}],463621);var i=a.i(305162);let j=(0,i.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);a.s(["Link",0,j],965848);let k=(0,i.default)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]);a.s(["Bookmark",0,k],97731);let l=(0,i.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);a.s(["Star",0,l],247129);let m=(0,i.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);a.s(["Home",0,m],783585)},237892,a=>{"use strict";let b=(0,a.i(305162).default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);a.s(["BarChart3",0,b],237892)},357285,975712,786955,948968,240631,963846,495959,185069,430266,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);a.s(["PieChart",0,c],357285);let d=(0,b.default)("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);a.s(["LineChart",0,d],975712);let e=(0,b.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["Code",0,e],786955);let f=(0,b.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);a.s(["Database",0,f],948968);let g=(0,b.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);a.s(["Server",0,g],240631);let h=(0,b.default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);a.s(["Cloud",0,h],963846);let i=(0,b.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);a.s(["Key",0,i],495959);let j=(0,b.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);a.s(["User",0,j],185069);let k=(0,b.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);a.s(["Mail",0,k],430266)},513626,a=>{"use strict";let b=(0,a.i(305162).default)("bell",[["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"}]]);a.s(["Bell",0,b],513626)},508160,933268,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,c],508160);let d=(0,b.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);a.s(["Camera",0,d],933268)},848127,a=>{"use strict";let b=(0,a.i(305162).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);a.s(["default",0,b])},242755,540006,513350,453690,946287,81867,83083,142871,336520,514571,a=>{"use strict";var b=a.i(848127);a.s(["Image",()=>b.default],242755);var c=a.i(305162);let d=(0,c.default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);a.s(["Film",0,d],540006);let e=(0,c.default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);a.s(["Music",0,e],513350);let f=(0,c.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);a.s(["Headphones",0,f],453690);let g=(0,c.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);a.s(["Mic",0,g],946287);let h=(0,c.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["File",0,h],81867);let i=(0,c.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);a.s(["Upload",0,i],83083);let j=(0,c.default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);a.s(["GitFork",0,j],142871);let k=(0,c.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);a.s(["Bug",0,k],336520);let l=(0,c.default)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);a.s(["Sliders",0,l],514571)},134916,a=>{"use strict";let b=(0,a.i(305162).default)("palette",[["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"}]]);a.s(["Palette",0,b],134916)},29976,190746,923754,65774,587842,886238,814242,971986,380724,701993,198281,24204,544538,505716,447372,9910,497480,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("brush",[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]]);a.s(["Brush",0,c],29976);let d=(0,b.default)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);a.s(["Map",0,d],190746);let e=(0,b.default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);a.s(["MapPin",0,e],923754);let f=(0,b.default)("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);a.s(["Navigation",0,f],65774);let g=(0,b.default)("compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]);a.s(["Compass",0,g],587842);let h=(0,b.default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);a.s(["Wifi",0,h],886238);let i=(0,b.default)("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);a.s(["Tablet",0,i],814242);let j=(0,b.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);a.s(["Laptop",0,j],971986);let k=(0,b.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);a.s(["HardDrive",0,k],380724);let l=(0,b.default)("circuit-board",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);a.s(["CircuitBoard",0,l],701993);let m=(0,b.default)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Radio",0,m],198281);let n=(0,b.default)("bluetooth",[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17",key:"1q5490"}]]);a.s(["Bluetooth",0,n],24204);let o=(0,b.default)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);a.s(["Heart",0,o],544538);let p=(0,b.default)("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]);a.s(["ThumbsUp",0,p],505716);let q=(0,b.default)("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);a.s(["Smile",0,q],447372);let r=(0,b.default)("coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);a.s(["Coffee",0,r],9910);let s=(0,b.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);a.s(["Rocket",0,s],497480)},232662,743394,450348,253967,881890,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);a.s(["Award",0,c],232662);let d=(0,b.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Target",0,d],743394);let e=(0,b.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]);a.s(["Flag",0,e],450348);let f=(0,b.default)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);a.s(["Crosshair",0,f],253967);let g=(0,b.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);a.s(["Layers",0,g],881890)},89098,a=>{"use strict";let b=(0,a.i(305162).default)("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);a.s(["Layout",0,b],89098)},145901,a=>{"use strict";var b=a.i(127669),c=a.i(561049),d=a.i(965848),e=a.i(987441),f=a.i(97731),g=a.i(247129),h=a.i(783585),i=a.i(857239),j=a.i(237892),k=a.i(357285),l=a.i(975712),m=a.i(105485),n=a.i(359590),o=a.i(882508),p=a.i(786955),q=a.i(948968),r=a.i(240631),s=a.i(963846),t=a.i(358367),u=a.i(765038),v=a.i(495959),w=a.i(185069),x=a.i(801511),y=a.i(430266),z=a.i(200943),A=a.i(513626),B=a.i(508160),C=a.i(392004),D=a.i(979462),E=a.i(964348),F=a.i(933268),G=a.i(242755),H=a.i(540006),I=a.i(513350),J=a.i(453690),K=a.i(946287),L=a.i(840320),M=a.i(81867),N=a.i(816871),O=a.i(248319),P=a.i(83083),Q=a.i(440931),R=a.i(504686),S=a.i(248442),T=a.i(142871),U=a.i(336520),V=a.i(215928),W=a.i(921138),X=a.i(514571),Y=a.i(134916),Z=a.i(29976),$=a.i(190746),_=a.i(923754),aa=a.i(65774),ab=a.i(587842),ac=a.i(886238),ad=a.i(641901),ae=a.i(999762),af=a.i(814242),ag=a.i(971986),ah=a.i(294794),ai=a.i(380724),aj=a.i(172919),ak=a.i(701993),al=a.i(198281),am=a.i(24204),an=a.i(544538),ao=a.i(505716),ap=a.i(447372),aq=a.i(9910),ar=a.i(497480),as=a.i(260680),at=a.i(113649),au=a.i(146349),av=a.i(269887),aw=a.i(232662),ax=a.i(782427),ay=a.i(743394),az=a.i(450348),aA=a.i(253967),aB=a.i(881890),aC=a.i(89098),aD=a.i(305162);let aE=(0,aD.default)("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),aF=(0,aD.default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),aG=(0,aD.default)("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),aH=(0,aD.default)("kanban",[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]]);var aI=a.i(916328);let aJ=(0,aD.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),aK=(0,aD.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),aL=(0,aD.default)("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),aM=(0,aD.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),aN={Globe:c.Globe,Link:d.Link,ExternalLink:e.ExternalLink,Bookmark:f.Bookmark,Star:g.Star,Home:h.Home,FileText:i.FileText,BarChart3:j.BarChart3,PieChart:k.PieChart,LineChart:l.LineChart,Activity:m.Activity,Zap:n.Zap,Terminal:o.Terminal,Code:p.Code,Database:q.Database,Server:r.Server,Cloud:s.Cloud,Shield:t.Shield,Lock:u.Lock,Key:v.Key,User:w.User,Users:x.Users,Mail:y.Mail,MessageSquare:z.MessageSquare,Bell:A.Bell,Calendar:B.Calendar,Clock:C.Clock,Search:D.Search,Eye:E.Eye,Camera:F.Camera,Image:G.Image,Film:H.Film,Music:I.Music,Headphones:J.Headphones,Mic:K.Mic,Folder:L.Folder,File:M.File,Archive:N.Archive,Download:O.Download,Upload:P.Upload,GitBranch:Q.GitBranch,GitCommit:R.GitCommit,GitPullRequest:S.GitPullRequest,GitFork:T.GitFork,Bug:U.Bug,Wrench:V.Wrench,Settings:W.Settings,Sliders:X.Sliders,Palette:Y.Palette,Brush:Z.Brush,Map:$.Map,MapPin:_.MapPin,Navigation:aa.Navigation,Compass:ab.Compass,Wifi:ac.Wifi,Monitor:ad.Monitor,Smartphone:ae.Smartphone,Tablet:af.Tablet,Laptop:ag.Laptop,Cpu:ah.Cpu,HardDrive:ai.HardDrive,MemoryStick:aj.MemoryStick,CircuitBoard:ak.CircuitBoard,Radio:al.Radio,Bluetooth:am.Bluetooth,Heart:an.Heart,ThumbsUp:ao.ThumbsUp,Smile:ap.Smile,Coffee:aq.Coffee,Rocket:ar.Rocket,Flame:as.Flame,Sun:at.Sun,Moon:au.Moon,Sparkles:av.Sparkles,Award:aw.Award,Trophy:ax.Trophy,Target:ay.Target,Flag:az.Flag,Crosshair:aA.Crosshair,Layers:aB.Layers,Layout:aC.Layout,Grid:aE,List:aF,Table:aG,Kanban:aH,Bot:aI.Bot,Brain:aJ,Lightbulb:aK,GraduationCap:aL,BookOpen:aM};a.s(["default",0,({name:a,className:c,style:d})=>{let e=aN[a];return e?(0,b.createElement)(e,{className:c,style:d}):null},"getIcon",0,a=>aN[a]],145901)},548401,a=>{"use strict";var b=a.i(508171),c=a.i(127669),d=a.i(113952),e=a.i(510414),f=a.i(396465),g=a.i(112779),h=a.i(678240),i=a.i(330836);a.s(["default",0,()=>{let a=(0,d.useTranslations)("settings.typography"),j=(0,h.default)(a=>a.regionTypography),k=(0,h.default)(a=>a.setRegionTypography),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),p=l??j,q=(0,i.isValidRegionTypography)(p),r=!(0,i.regionTypographyEqual)(p,j),s=(a,b,c)=>{let d={...p[a],[b]:c};void 0===c&&delete d[b];let e={...p,[a]:d};0===Object.keys(d).length&&delete e[a],m(e)},t=async()=>{o(!0);try{await k(p),m(null),e.toast.success(a("applied"))}catch(b){e.toast.error(a("failed"),{description:b instanceof Error?b.message:void 0})}finally{o(!1)}};return(0,b.jsxs)("fieldset",{disabled:n,className:"space-y-4 border-b pb-4",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("fontHelp")}),i.TYPOGRAPHY_REGIONS.map(c=>{let d=p[c]??{},e=(0,i.isValidRegionTypography)({[c]:d})?d:{};return(0,b.jsxs)("div",{className:"space-y-3 rounded-md border p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a(`regions.${c}`)}),(0,b.jsx)(f.Button,{type:"button",variant:"ghost",size:"sm",disabled:!p[c],onClick:()=>{let a={...p};delete a[c],m(a)},children:a("reset")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,b.jsxs)("label",{className:"space-y-1 text-xs sm:col-span-2",children:[(0,b.jsx)("span",{children:a("fontFamily")}),(0,b.jsx)(g.Input,{value:d.fontFamily??"",maxLength:200,placeholder:a("fontPlaceholder"),onChange:a=>s(c,"fontFamily",a.target.value||void 0)})]}),(0,b.jsxs)("label",{className:"space-y-1 text-xs",children:[(0,b.jsx)("span",{children:a("fontSize")}),(0,b.jsx)(g.Input,{type:"number",min:i.MIN_REGION_FONT_SIZE,max:i.MAX_REGION_FONT_SIZE,step:"1",value:d.fontSize??"",placeholder:a("default"),onChange:a=>s(c,"fontSize",""===a.target.value?void 0:Number(a.target.value))})]}),(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("label",{htmlFor:`typography-color-${c}`,children:a("color")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[d.color&&!(0,i.isValidTypographyColor)(d.color)?(0,b.jsx)("span",{role:"img","aria-label":a("invalid"),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded border border-destructive text-destructive",children:"!"}):(0,b.jsx)("input",{type:"color",className:"h-9 w-9 shrink-0 cursor-pointer rounded border bg-transparent","aria-label":`${a(`regions.${c}`)} ${a("color")}`,title:d.color??a("default"),value:d.color??"#808080",onChange:a=>s(c,"color",a.target.value)}),(0,b.jsx)(g.Input,{id:`typography-color-${c}`,value:d.color??"",maxLength:7,placeholder:a("default"),"aria-invalid":!!d.color&&!(0,i.isValidTypographyColor)(d.color),onChange:a=>s(c,"color",a.target.value||void 0)})]})]})]}),(0,b.jsx)("div",{className:"overflow-auto rounded bg-muted/30 p-2",style:{fontFamily:e.fontFamily?(0,i.regionFontFamily)(e.fontFamily):void 0,fontSize:e.fontSize,color:e.color},children:a("preview")})]},c)}),!q&&(0,b.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:a("invalid")}),(0,b.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,b.jsx)(f.Button,{type:"button",variant:"outline",size:"sm",disabled:0===Object.keys(p).length,onClick:()=>m({}),children:a("resetAll")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(f.Button,{type:"button",variant:"outline",size:"sm",disabled:!r,onClick:()=>m(null),children:a("cancel")}),(0,b.jsx)(f.Button,{type:"button",size:"sm",disabled:!r||!q,onClick:t,children:a(n?"saving":"apply")})]})]})]})}])},133085,(a,b,c)=>{b.exports={name:"purplemux-improved",version:"0.5.13",description:"Manage multiple Claude Code sessions from your browser",license:"MIT",author:"subicura",repository:{type:"git",url:"https://github.com/stirp/purplemux-improved.git"},homepage:"https://github.com/stirp/purplemux-improved",bugs:{url:"https://github.com/stirp/purplemux-improved/issues"},keywords:["claude","terminal","multiplexer","tmux","claude-code"],engines:{node:">=24.0.0"},packageManager:"pnpm@12.11.2",browserslist:["chrome 111","edge 111","firefox 111","safari 15.4","ios_saf 15.4"],main:"dist-electron/main.js",bin:{"purplemux-improved":"./bin/purplemux.js",pmuxi:"./bin/cli.js"},files:["bin/","dist/",".next/standalone/","src/config/tmux.conf"],scripts:{dev:"tsx watch server.ts",build:"next build && node scripts/post-build.js && tsup","build:landing":"eleventy","dev:landing":"eleventy --serve","build:server":"tsup","build:electron:main":"tsup --config electron/tsup.config.ts","build:electron":"next build && node scripts/post-build.js --electron && tsup && pnpm build:electron:main","dev:electron":"ELECTRON_DEV_URL=http://localhost:8022 electron .","pack:electron":"pnpm build:electron && electron-builder --mac","pack:electron:linux":"pnpm build:electron && electron-builder --linux AppImage","pack:electron:dev":"pnpm build:electron && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac -c.mac.identity=null -c.mac.notarize=false",start:"NODE_ENV=production tsx server.ts",lint:"eslint",test:"vitest run && pnpm test:cli","test:cli":"node --test tests/cli/*.test.cjs","test:watch":"vitest",ralph:"node ralph-loop.js",prepublishOnly:"rm -rf .next dist dist-electron && pnpm build",postinstall:"chmod +x node_modules/.pnpm/node-pty@*/node_modules/node-pty/prebuilds/*/spawn-helper 2>/dev/null; exit 0"},dependencies:{"@base-ui/react":"^1.3.0","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@git-diff-view/core":"^0.1.3","@git-diff-view/file":"^0.1.3","@git-diff-view/react":"^0.1.3","@hookform/resolvers":"^5.9.1","@tailwindcss/typography":"^0.5.19","@xterm/addon-clipboard":"^0.2.0","@xterm/addon-fit":"^0.11.0","@xterm/addon-unicode11":"^0.9.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0",acorn:"^8.18.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",cmdk:"^1.1.1",dayjs:"^1.11.20",diff:"^9.0.0",jose:"^6.2.2",koffi:"2.15.2","lucide-react":"^1.7.0",motion:"^12.38.0",nanoid:"^5.1.7",next:"16.2.6","next-intl":"^4.11.0","next-themes":"^0.4.6","node-pty":"1.2.0-beta.12",pino:"^10.3.1","pino-pretty":"^13.1.3","pino-roll":"^4.0.0",react:"19.2.5","react-dom":"19.2.5","react-hook-form":"^7.90.0","react-hotkeys-hook":"^5.2.4","react-icons":"^5.6.0","react-markdown":"^10.1.0","react-resizable-panels":"^4.10.0",recharts:"^3.8.0","rehype-highlight":"^7.0.2","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","smol-toml":"^1.6.1",sonner:"^2.0.7",swr:"^2.4.1","tailwind-merge":"^3.5.0","tw-animate-css":"^1.4.0","update-notifier":"^7.3.1","use-stick-to-bottom":"^1.1.3",vaul:"^1.1.2","web-push":"^3.6.7",ws:"^8.20.0",zod:"^4.3.6",zustand:"^5.0.12"},devDependencies:{"@11ty/eleventy":"^3.1.5","@electron/rebuild":"^4.0.3","@tailwindcss/postcss":"^4","@types/node":"^24.12.0","@types/react":"^19","@types/react-dom":"^19","@types/web-push":"^3.6.4","@types/ws":"^8.18.1",chalk:"^5.6.2",electron:"^41.1.1","electron-builder":"^26.8.1","electron-updater":"^6.8.3",eslint:"^9","eslint-config-next":"16.2.5",jsdom:"^26.1.0",shadcn:"^4.1.2",tailwindcss:"^4",tsup:"^8.5.1",tsx:"^4.21.0",typescript:"^5.9.3",vitest:"^4.1.4"}}},559269,a=>{"use strict";var b=a.i(508171),c=a.i(248319),d=a.i(33720),d=d,e=a.i(313355),f=a.i(127669),g=a.i(113952),h=a.i(396465),i=a.i(893759),j=a.i(276986);let k=async(a,b)=>{let c;if(c?.isElectron){if(!c.getAppUpdate||!c.appUpdateAction)throw Error("This desktop version does not expose update controls. Use the application menu.");return a?c.appUpdateAction(a,b):c.getAppUpdate()}let d=await fetch("/api/app-update",{method:a?"POST":"GET",cache:"no-store",...a?{headers:{"Content-Type":"application/json","x-purplemux-update":"1"},body:JSON.stringify({action:a,version:b})}:{}});if(!d.ok){let a=await d.json().catch(()=>null);throw Error(a?.error||`Update service: HTTP ${d.status}`)}return d.json()};var l=a.i(391262);a.s(["default",0,({compact:a=!1})=>{let m=(0,g.useTranslations)("settings.appUpdate"),{state:n,error:o,requesting:p,run:q,desktop:r,reconnectTimedOut:s}=(()=>{let{data:a,error:b,mutate:c}=(0,j.default)("app-update:server",()=>k(),{refreshInterval:a=>a&&["checking","downloading","restarting"].includes(a.phase)?2e3:3e4,dedupingInterval:1e3,shouldRetryOnError:!0,errorRetryInterval:3e3}),[d,e]=(0,f.useState)(!1),[g,h]=(0,f.useState)(null),[i,l]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(a?.phase!=="restarting")return;let b=setTimeout(()=>l(!0),15e4);return()=>clearTimeout(b)},[a?.phase]);let m=(0,f.useRef)(null);(0,f.useEffect)(()=>{a&&(m.current&&m.current!==a.currentVersion&&window.location.reload(),m.current=a.currentVersion)},[a]);let n=async(a,b)=>{e(!0),h(null),l(!1);try{await c(await k(a,b),{revalidate:!1})}catch(a){h(a instanceof Error?a.message:String(a))}finally{e(!1)}};return{state:a,error:g||(b instanceof Error?b.message:null),requesting:d,run:n,desktop:!1,reconnectTimedOut:a?.phase==="restarting"&&i}})(),[t,u]=(0,f.useState)(null),v=!!n?.latestVersion&&(0,l.isNewerVersion)(n.latestVersion,n.currentVersion),w=v&&n?.skippedVersion===n?.latestVersion,x=p||!!n?.installing||["checking","downloading","restarting"].includes(n?.phase||""),y=n?.installing||["downloading","ready","blocked","restarting"].includes(n?.phase||"");return(!a||!w||y||n?.error||o)&&(!a||v||n?.error||["downloading","blocked","restarting"].includes(n?.phase||""))?(0,b.jsxs)("section",{"aria-label":m("title"),className:a?"shrink-0 border-b bg-muted px-3 py-2":"space-y-3",children:[(0,b.jsxs)("div",{className:a?"flex flex-wrap items-center justify-between gap-3":"flex flex-col items-stretch justify-between gap-3 sm:flex-row sm:items-center",children:[(0,b.jsxs)("div",{className:a?"min-w-0 flex-1 basis-48 space-y-1":"min-w-0 flex-1 space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a&&v?m("available",{version:n.latestVersion}):m("title")}),!a&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:m(r?"desktopDescription":"serverDescription")}),n&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",role:"status",children:[m("current",{version:n.currentVersion})," · ",m("idle"!==n.phase||n.checkedAt?n.phase:"notChecked",{version:n.latestVersion||""}),!a&&v&&"available"!==n.phase&&` \xb7 ${m("available",{version:n.latestVersion})}`,null!==n.progress&&"downloading"===n.phase&&` ${Math.round(n.progress)}%`]}),!a&&w&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m("skipped",{version:n.latestVersion})})]}),(0,b.jsxs)("div",{className:"flex max-w-full shrink-0 flex-wrap gap-2",children:[!a&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",disabled:x,onClick:()=>void q("check"),children:[x?(0,b.jsx)(d.default,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(e.RefreshCw,{className:"h-4 w-4"}),m("check")]}),v&&(0,b.jsxs)(h.Button,{size:"sm",disabled:x||!n?.supported,onClick:()=>void q("install"),children:[x?(0,b.jsx)(d.default,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(c.Download,{className:"h-4 w-4"}),m("install")]}),v&&(0,b.jsx)(h.Button,{variant:"destructive",size:"sm",disabled:x||!n?.supported,onClick:()=>u(n.latestVersion),children:m("forceInstall")}),v&&!w&&(0,b.jsx)(h.Button,{variant:"outline",size:"sm",disabled:x,onClick:()=>void q("skip",n.latestVersion),children:m("skip")})]})]}),n?.phase==="restarting"&&(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:m(r?"desktopReconnecting":"reconnecting")}),s&&(0,b.jsxs)("div",{role:"alert",className:"mt-2 space-y-2",children:[(0,b.jsx)("p",{className:"text-xs text-destructive",children:m("reconnectFailed")}),(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>window.location.reload(),children:m("reload")})]}),(n?.error||o)&&n?.phase!=="restarting"&&(0,b.jsx)("p",{role:"alert",className:"mt-2 break-words text-xs text-destructive",children:o||(n?.phase==="blocked"?m("busyHint"):n?.error)}),n&&!n.supported&&(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:m(r?"desktopUnsupported":"serverUnsupported")}),(0,b.jsx)(i.AlertDialog,{open:null!==t,onOpenChange:a=>{a||u(null)},children:(0,b.jsxs)(i.AlertDialogContent,{children:[(0,b.jsxs)(i.AlertDialogHeader,{children:[(0,b.jsx)(i.AlertDialogTitle,{children:m("forceInstall")}),(0,b.jsx)(i.AlertDialogDescription,{children:m("forceConfirm",{version:t||""})})]}),(0,b.jsxs)(i.AlertDialogFooter,{children:[(0,b.jsx)(i.AlertDialogCancel,{children:m("cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",disabled:x||!n?.supported||t!==n?.latestVersion,onClick:()=>{t&&(q("force-install",t),u(null))},children:m("forceInstall")})]})]})})]}):null}],559269)},999116,a=>{"use strict";let b=(0,a.i(305162).default)("dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);a.s(["Dices",0,b],999116)},990794,a=>{"use strict";var b=a.i(848127);a.s(["ImageIcon",()=>b.default])},958860,a=>{"use strict";let b=(0,a.i(305162).default)("monitor-smartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);a.s(["MonitorSmartphone",0,b],958860)},721234,253052,850329,130438,624629,a=>{"use strict";var b,c=a.i(508171);a.i(235882);var d=a.i(869686),e=a.i(654449),f=a.i(799856);a.i(896472);let g=(0,e.cva)("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",vertical:"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"}},defaultVariants:{orientation:"horizontal"}});a.s(["ButtonGroup",0,function({className:a,orientation:b,...d}){return(0,c.jsx)("div",{role:"group","data-slot":"button-group","data-orientation":b,className:(0,f.cn)(g({orientation:b}),a),...d})}],721234);var h=a.i(127669),i=a.i(397625);let j=(0,e.cva)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});a.s(["Field",0,function({className:a,orientation:b="vertical",...d}){return(0,c.jsx)("div",{role:"group","data-slot":"field","data-orientation":b,className:(0,f.cn)(j({orientation:b}),a),...d})},"FieldDescription",0,function({className:a,...b}){return(0,c.jsx)("p",{"data-slot":"field-description",className:(0,f.cn)("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),...b})},"FieldLabel",0,function({className:a,...b}){return(0,c.jsx)(i.Label,{"data-slot":"field-label",className:(0,f.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",a),...b})}],253052),a.s([],708221),a.i(708221);var k=a.i(73781),l=a.i(286255),m=a.i(611599),n=a.i(510607),o=a.i(478116),p=a.i(338046),q=a.i(663584),r=a.i(963985),s=a.i(392422);let t=((b={}).checked="data-checked",b.unchecked="data-unchecked",b.disabled="data-disabled",b.readonly="data-readonly",b.required="data-required",b.valid="data-valid",b.invalid="data-invalid",b.touched="data-touched",b.dirty="data-dirty",b.filled="data-filled",b.focused="data-focused",b),u={checked:a=>a?{[t.checked]:""}:{[t.unchecked]:""},...r.transitionStatusMapping,...s.fieldValidityMapping};var v=a.i(594812),w=a.i(324486),x=a.i(791031),y=a.i(122585),z=a.i(847017),A=a.i(444414),B=a.i(308490),C=a.i(210109),D=a.i(208318);let E=h.createContext(void 0);var F=a.i(801191),G=a.i(179256);let H=h.createContext(void 0),I=h.forwardRef(function(a,b){let{render:e,className:f,disabled:g=!1,readOnly:i=!1,required:j=!1,"aria-labelledby":r,value:s,inputRef:t,nativeButton:G=!1,id:I,style:J,...K}=a,L=h.useContext(E),{disabled:M,readOnly:N,required:O,form:P,checkedValue:Q,touched:R=!1,validation:S,name:T}=L??{},U=L?.setCheckedValue??o.NOOP,V=L?.setTouched??o.NOOP,W=L?.registerControlRef??o.NOOP,X=L?.registerInputRef??o.NOOP,{setDirty:Y,validityData:Z,setTouched:$,setFilled:_,state:aa,disabled:ab}=(0,z.useFieldRootContext)(),ac=(0,A.useFieldItemContext)(),{labelId:ad,getDescriptionProps:ae}=(0,B.useLabelableContext)(),af=ab||ac.disabled||M||g,ag=N||i,ah=O||j,ai=L?Q===s:""===s,aj=h.useMemo(()=>(0,F.serializeValue)(s),[s]),ak=h.useRef(null),al=h.useRef(null),am=(0,m.useStableCallback)(a=>{a&&W(a,af)}),an=(0,k.useMergedRefs)(t,al,X);(0,l.useIsoLayoutEffect)(()=>{al.current?.checked&&_(!0)},[_]),(0,l.useIsoLayoutEffect)(()=>{if(al.current){if(af&&ai)return void X(null);ak.current&&W(ak.current,af),X(al.current)}},[ai,af,W,X]);let ao=(0,v.useBaseUiId)(),ap=(0,D.useLabelableId)({id:I,implicit:!1,controlRef:ak}),aq=G?void 0:ap,ar={role:"radio","aria-checked":ai,"aria-required":ah||void 0,"aria-readonly":ag||void 0,"aria-labelledby":(0,C.useAriaLabelledBy)(r,ad,al,!G,aq),[x.ACTIVE_COMPOSITE_ITEM]:ai?"":void 0,id:G?ap:ao,onKeyDown(a){"Enter"===a.key&&a.preventDefault()},onClick(a){a.defaultPrevented||af||ag||(a.preventDefault(),al.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey})))},onFocus(a){a.defaultPrevented||af||ag||!R||(al.current?.click(),V(!1))}},{getButtonProps:as,buttonRef:at}=(0,w.useButton)({disabled:af,native:G}),au={type:"radio",ref:an,form:P,id:aq,name:T,tabIndex:-1,style:T?n.visuallyHiddenInput:n.visuallyHidden,"aria-hidden":!0,...void 0!==s?{value:aj}:o.EMPTY_OBJECT,disabled:af,checked:ai,required:ah,readOnly:ag,onChange(a){if(a.nativeEvent.defaultPrevented||af||ag||void 0===s)return;let b=(0,p.createChangeEventDetails)(q.REASONS.none,a.nativeEvent);b.isCanceled||($(!0),Y(s!==Z.initialValue),_(!0),U(s,b))},onFocus(){ak.current?.focus()}},av=h.useMemo(()=>({...aa,required:ah,disabled:af,readOnly:ag,checked:ai}),[aa,af,ag,ai,ah]),aw=void 0!==L,ax=[b,ak,at,am],ay=[ar,ae,S?.getValidationProps??o.EMPTY_OBJECT,K,as],az=(0,d.useRenderElement)("span",a,{enabled:!aw,state:av,ref:ax,props:ay,stateAttributesMapping:u});return(0,c.jsxs)(H.Provider,{value:av,children:[aw?(0,c.jsx)(y.CompositeItem,{tag:"span",render:e,className:f,style:J,state:av,refs:ax,props:ay,stateAttributesMapping:u}):az,(0,c.jsx)("input",{...au,suppressHydrationWarning:!0})]})});var J=a.i(479960),K=a.i(56498);let L=h.forwardRef(function(a,b){let{render:c,className:e,style:f,keepMounted:g=!1,...i}=a,j=function(){let a=h.useContext(H);if(void 0===a)throw Error((0,G.default)(52));return a}(),k=j.checked,{mounted:l,transitionStatus:m,setMounted:n}=(0,K.useTransitionStatus)(k),o={...j,transitionStatus:m},p=h.useRef(null),q=(0,d.useRenderElement)("span",a,{ref:[b,p],state:o,props:i,stateAttributesMapping:u});return((0,J.useOpenChangeComplete)({open:k,ref:p,onComplete(){k||n(!1)}}),g||l)?q:null});a.s(["Indicator",0,L,"Root",0,I],82808);var M=a.i(82808),M=M,N=a.i(861056),O=a.i(395835),P=a.i(223833),Q=a.i(565262),R=a.i(568102),S=a.i(226460),T=a.i(510405),U=a.i(795839);let V=[P.SHIFT],W=h.forwardRef(function(a,b){let{render:d,className:e,disabled:f,readOnly:g,required:i,onValueChange:j,value:k,defaultValue:l,form:n,name:o,inputRef:p,id:q,style:r,...t}=a,{setTouched:u,setFocused:w,shouldValidateOnChange:x,validationMode:y,name:A,disabled:C,state:D,validation:F,setDirty:G,setFilled:H,validityData:I}=(0,z.useFieldRootContext)(),{labelId:J}=(0,B.useLabelableContext)(),{clearErrors:K}=(0,T.useFormContext)(),L=(0,S.useFieldsetRootContext)(!0),M=C||f,P=A??o,W=(0,v.useBaseUiId)(q),[X,Y]=(0,N.useControlled)({controlled:k,default:l,name:"RadioGroup",state:"value"}),Z=(0,m.useStableCallback)(j),$=(0,m.useStableCallback)((a,b)=>{Z(a,b),b.isCanceled||Y(a)}),_=h.useRef(null),aa=h.useRef(null),ab=h.useRef(null);function ac(a){let b;return p&&("function"==typeof p?b=p(a):p.current=a),aa.current=a,F.inputRef.current=a,b}let ad=(0,m.useStableCallback)((a,b=!1)=>{if(a){if(b){_.current===a&&(_.current=null);return}null==_.current&&(_.current=a)}}),ae=(0,m.useStableCallback)(a=>{if(!a||a.disabled)return;ab.current||(ab.current=a);let b=aa.current;if(a.checked||null==b||b.disabled)return ac(a)}),af=(0,m.useStableCallback)(()=>X??null);(0,R.useRegisterFieldControl)(_,{id:W,value:X,getValue:af}),(0,U.useValueChanged)(X,()=>{K(P),G(X!==I.initialValue),H(null!=X),x()?F.commit(X):F.commit(X,!0);let a=ab.current;null==X&&a&&!a.disabled&&ac(a)});let[ag,ah]=h.useState(!1),ai=t["aria-labelledby"]??J??L?.legendId,aj={...D,disabled:M??!1,required:i??!1,readOnly:g??!1},ak=h.useMemo(()=>({...D,checkedValue:X,disabled:M,form:n,validation:F,name:P,onValueChange:Z,readOnly:g,registerControlRef:ad,registerInputRef:ae,required:i,setCheckedValue:$,setTouched:ah,touched:ag}),[X,M,n,F,D,P,Z,g,ad,ae,i,$,ah,ag]);return(0,c.jsx)(E.Provider,{value:ak,children:(0,c.jsx)(Q.CompositeRoot,{render:d,className:e,style:r,state:aj,props:[{role:"radiogroup","aria-required":i||void 0,"aria-disabled":M||void 0,"aria-readonly":g||void 0,"aria-labelledby":ai,onFocus(){w(!0)},onBlur(a){(0,O.contains)(a.currentTarget,a.relatedTarget)||(u(!0),w(!1),"onBlur"===y&&F.commit(X))},onKeyDownCapture(a){a.key.startsWith("Arrow")&&(u(!0),ah(!0),w(!0))}},F.getValidationProps,t],refs:[b],stateAttributesMapping:s.fieldValidityMapping,enableHomeAndEndKeys:!1,modifierKeys:V})})});a.s(["RadioGroup",0,function({className:a,...b}){return(0,c.jsx)(W,{"data-slot":"radio-group",className:(0,f.cn)("grid w-full gap-2",a),...b})},"RadioGroupItem",0,function({className:a,...b}){return(0,c.jsx)(M.Root,{"data-slot":"radio-group-item",className:(0,f.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",a),...b,children:(0,c.jsx)(M.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,c.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}],850329),a.s(["TOAST_POSITIONS",0,["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]],130438);var X=a.i(113952),Y=a.i(986013),Z=a.i(273529),$=a.i(452751),_=a.i(764042),aa=a.i(840815),ab=a.i(721381),ac=a.i(753221),ad=a.i(273120),ae=a.i(386058),af=a.i(396465),ag=a.i(112779),ah=a.i(366736),ai=a.i(330281),aj=a.i(893759),ak=a.i(545375),al=a.i(658269);let am=({prompt:a,onToggle:b})=>{let{attributes:d,listeners:e,setNodeRef:f,setActivatorNodeRef:g,transform:h,transition:i,isDragging:j}=(0,$.useSortable)({id:a.id}),k={transform:_.CSS.Translate.toString(h),transition:i,zIndex:j?1:void 0,position:j?"relative":void 0};return(0,c.jsxs)("div",{ref:f,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:k,children:[(0,c.jsx)("div",{ref:g,...d,...e,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,c.jsx)(aa.GripVertical,{className:"h-4 w-4"})}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,c.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.prompt})]}),(0,c.jsx)("div",{className:"flex shrink-0 items-center",children:(0,c.jsx)(ah.Switch,{checked:a.enabled,onCheckedChange:c=>b(a.id,c)})})]})},an=({prompt:a,onEdit:b,onDelete:d,onToggle:e})=>{let{attributes:f,listeners:g,setNodeRef:h,setActivatorNodeRef:i,transform:j,transition:k,isDragging:l}=(0,$.useSortable)({id:a.id}),m={transform:_.CSS.Translate.toString(j),transition:k,zIndex:l?1:void 0,position:l?"relative":void 0};return(0,c.jsxs)("div",{ref:h,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:m,children:[(0,c.jsx)("div",{ref:i,...f,...g,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,c.jsx)(aa.GripVertical,{className:"h-4 w-4"})}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,c.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.prompt})]}),(0,c.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,c.jsx)(af.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>b(a),children:(0,c.jsx)(ab.Pencil,{className:"h-3.5 w-3.5"})}),(0,c.jsx)(af.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>d(a.id),children:(0,c.jsx)(ae.Trash2,{className:"h-3.5 w-3.5"})}),(0,c.jsx)(ah.Switch,{checked:a.enabled,onCheckedChange:b=>e(a.id,b)})]})]})};a.s(["default",0,()=>{let a=(0,X.useTranslations)("settings.quickPrompts"),{allOrderedPrompts:b,customPrompts:d,toggleBuiltin:e,saveCustom:f,saveOrder:g,deletePrompt:i,resetAll:j}=(0,ak.default)(),[k,l]=(0,h.useState)(null),[m,n]=(0,h.useState)(!1),[o,p]=(0,h.useState)(null),q=(0,Z.useSensors)((0,Z.useSensor)(Z.PointerSensor,{activationConstraint:{distance:5}})),r=(0,h.useCallback)((a,b)=>{a.startsWith("builtin-")?e(a,b):f(d.map(c=>c.id===a?{...c,enabled:b}:c))},[d,e,f]),s=(0,h.useCallback)(a=>{p(a)},[]),t=(0,h.useCallback)(()=>{o&&(i(o),p(null))},[o,i]),u=(0,h.useCallback)(a=>{l({mode:"edit",id:a.id,name:a.name,prompt:a.prompt})},[]),v=(0,h.useCallback)(()=>{l({mode:"add",name:"",prompt:""})},[]),w=(0,h.useCallback)(()=>{k&&k.name.trim()&&k.prompt.trim()&&("edit"===k.mode&&k.id?f(d.map(a=>a.id===k.id?{...a,name:k.name.trim(),prompt:k.prompt}:a)):f([...d,{id:`custom-${(0,Y.nanoid)(8)}`,name:k.name.trim(),prompt:k.prompt,enabled:!0}]),l(null))},[k,d,f]),x=(0,h.useCallback)(()=>{j(),n(!1)},[j]),y=(0,h.useCallback)(a=>{let{active:c,over:d}=a;if(!d||c.id===d.id)return;let e=b.findIndex(a=>a.id===c.id),f=b.findIndex(a=>a.id===d.id);-1===e||-1===f||g((0,$.arrayMove)(b,e,f).map(a=>a.id))},[b,g]),z=!!k&&k.name.trim().length>0&&k.prompt.trim().length>0;return(0,c.jsxs)("div",{className:"space-y-6",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,c.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("itemsSection")}),b.length>0&&(0,c.jsx)(Z.DndContext,{sensors:q,collisionDetection:Z.closestCenter,modifiers:[al.restrictToVerticalAxis],onDragEnd:y,children:(0,c.jsx)($.SortableContext,{items:b.map(a=>a.id),strategy:$.verticalListSortingStrategy,children:(0,c.jsx)("div",{className:"overflow-hidden rounded-lg border",children:b.map(a=>a.id.startsWith("builtin-")?(0,c.jsx)(am,{prompt:a,onToggle:r},a.id):(0,c.jsx)(an,{prompt:a,onEdit:u,onDelete:s,onToggle:r},a.id))})})}),k&&(0,c.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a("add"===k.mode?"addPrompt":"editPrompt")}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("label",{className:"text-xs text-muted-foreground",children:a("nameLabel")}),(0,c.jsx)(ag.Input,{value:k.name,onChange:a=>l({...k,name:a.target.value}),placeholder:a("namePlaceholder"),autoFocus:!0})]}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("label",{className:"text-xs text-muted-foreground",children:a("promptLabel")}),(0,c.jsx)(ai.Textarea,{value:k.prompt,onChange:a=>l({...k,prompt:a.target.value}),placeholder:a("promptPlaceholder"),rows:3})]}),(0,c.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,c.jsx)(af.Button,{variant:"outline",size:"sm",onClick:()=>l(null),children:a("cancel")}),(0,c.jsx)(af.Button,{size:"sm",onClick:w,disabled:!z,children:a("save")})]})]}),!k&&(0,c.jsxs)(af.Button,{variant:"outline",size:"sm",onClick:v,children:[(0,c.jsx)(ac.Plus,{className:"mr-1 h-3.5 w-3.5"}),a("addButton")]})]}),(0,c.jsxs)(af.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>n(!0),children:[(0,c.jsx)(ad.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),a("resetToDefault")]}),(0,c.jsx)(aj.AlertDialog,{open:!!o,onOpenChange:a=>!a&&p(null),children:(0,c.jsxs)(aj.AlertDialogContent,{children:[(0,c.jsxs)(aj.AlertDialogHeader,{children:[(0,c.jsx)(aj.AlertDialogTitle,{children:a("deleteTitle")}),(0,c.jsx)(aj.AlertDialogDescription,{children:a("deleteDescription")})]}),(0,c.jsxs)(aj.AlertDialogFooter,{children:[(0,c.jsx)(aj.AlertDialogCancel,{children:a("deleteCancel")}),(0,c.jsx)(aj.AlertDialogAction,{onClick:t,children:a("deleteConfirm")})]})]})}),(0,c.jsx)(aj.AlertDialog,{open:m,onOpenChange:n,children:(0,c.jsxs)(aj.AlertDialogContent,{children:[(0,c.jsxs)(aj.AlertDialogHeader,{children:[(0,c.jsx)(aj.AlertDialogTitle,{children:a("resetTitle")}),(0,c.jsx)(aj.AlertDialogDescription,{children:a("resetDescription")})]}),(0,c.jsxs)(aj.AlertDialogFooter,{children:[(0,c.jsx)(aj.AlertDialogCancel,{children:a("resetCancel")}),(0,c.jsx)(aj.AlertDialogAction,{onClick:x,children:a("resetConfirm")})]})]})})]})}],624629)},380028,a=>{"use strict";var b=a.i(508171),c=a.i(548401),d=a.i(127669),e=a.i(113952),f=a.i(510414),g=a.i(740398),h=a.i(133085),i=a.i(721043),j=a.i(96968),k=a.i(412573),l=a.i(559269),m=a.i(513626),n=a.i(916328),o=a.i(997594),p=a.i(648779),q=a.i(999116),r=a.i(676233),s=a.i(561049),t=a.i(990794),u=a.i(284788),v=a.i(89098),w=a.i(765038),x=a.i(641901),y=a.i(958860),z=a.i(146349),A=a.i(342584),B=a.i(134916),C=a.i(273120),D=a.i(921138),E=a.i(113649),F=a.i(882508),G=a.i(386058),H=a.i(215928),I=a.i(146014),J=a.i(359590),K=a.i(396465),L=a.i(721234),M=a.i(112779),N=a.i(366736),O=a.i(253052),P=a.i(397625),Q=a.i(850329),R=a.i(148608),S=a.i(109254),T=a.i(893759),U=a.i(688272),V=a.i(799856),W=a.i(480824),X=a.i(678240),Y=a.i(873594),Z=a.i(130438),$=a.i(912251),_=a.i(409679),aa=a.i(365092),ab=a.i(895159),ac=a.i(624629),ad=a.i(986013),ae=a.i(273529),af=a.i(452751),ag=a.i(764042),ah=a.i(840815),ai=a.i(721381),aj=a.i(753221),ak=a.i(463621),al=a.i(158799),am=a.i(145901);let an=["Globe","Link","ExternalLink","Bookmark","Star","Home","FileText","BarChart3","PieChart","LineChart","Activity","Zap","Terminal","Code","Database","Server","Cloud","Shield","Lock","Key","User","Users","Mail","MessageSquare","Bell","Calendar","Clock","Search","Eye","Camera","Image","Film","Music","Headphones","Mic","Folder","File","Archive","Download","Upload","GitBranch","GitCommit","GitPullRequest","GitFork","Bug","Wrench","Settings","Sliders","Palette","Brush","Map","MapPin","Navigation","Compass","Wifi","Monitor","Smartphone","Tablet","Laptop","Cpu","HardDrive","MemoryStick","CircuitBoard","Radio","Bluetooth","Heart","ThumbsUp","Smile","Coffee","Rocket","Flame","Sun","Moon","Sparkles","Award","Trophy","Target","Flag","Crosshair","Layers","Layout","Grid","List","Table","Kanban","Bot","Brain","Lightbulb","GraduationCap","BookOpen"],ao=({value:a,onChange:c,readonly:f,size:g=16})=>{let h=(0,e.useTranslations)("settings.sidebarItems"),[i,j]=(0,d.useState)(!1),[k,l]=(0,d.useState)(""),m=(0,d.useMemo)(()=>{if(!k.trim())return an;let a=k.toLowerCase();return an.filter(b=>b.toLowerCase().includes(a))},[k]);return f?(0,b.jsx)(am.default,{name:a,className:"shrink-0 text-muted-foreground",style:{width:g,height:g}}):(0,b.jsxs)(al.Popover,{open:i,onOpenChange:j,children:[(0,b.jsxs)(al.PopoverTrigger,{className:"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-xs transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)(am.default,{name:a,className:"h-4 w-4"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a})]}),(0,b.jsxs)(al.PopoverContent,{className:"w-72 p-2",align:"start",children:[(0,b.jsx)(M.Input,{placeholder:h("iconSearch"),value:k,onChange:a=>l(a.target.value),className:"mb-2 h-8 text-xs",autoFocus:!0}),(0,b.jsx)("div",{className:"grid max-h-48 grid-cols-8 gap-0.5 overflow-y-auto p-1",children:m.map(d=>(0,am.getIcon)(d)?(0,b.jsx)("button",{type:"button",className:(0,V.cn)("flex h-8 w-8 items-center justify-center rounded transition-colors hover:bg-accent",a===d&&"bg-accent ring-1 ring-primary"),onClick:()=>{c?.(d),j(!1),l("")},title:d,children:(0,b.jsx)(am.default,{name:d,className:"h-4 w-4"})},d):null)}),0===m.length&&(0,b.jsx)("p",{className:"py-4 text-center text-xs text-muted-foreground",children:h("iconNotFound")})]})]})};var ap=a.i(658269);let aq=({item:a,onEdit:c,onDelete:d,onToggle:e})=>{let{attributes:f,listeners:g,setNodeRef:h,setActivatorNodeRef:i,transform:j,transition:k,isDragging:l}=(0,af.useSortable)({id:a.id}),m={transform:ag.CSS.Translate.toString(j),transition:k,zIndex:l?1:void 0,position:l?"relative":void 0};return(0,b.jsxs)("div",{ref:h,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:m,children:[(0,b.jsx)("div",{ref:i,...f,...g,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,b.jsx)(ah.GripVertical,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(ao,{value:a.icon,readonly:!0,size:14}),(0,b.jsx)("p",{className:"text-sm font-medium",children:a.name})]}),(0,b.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.url})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,b.jsx)(K.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>c(a),children:(0,b.jsx)(ai.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(K.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>d(a.id),children:(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(N.Switch,{checked:a.enabled,onCheckedChange:b=>e(a.id,b)})]})]})},ar=({item:a,onToggle:c})=>{let{attributes:d,listeners:e,setNodeRef:f,setActivatorNodeRef:g,transform:h,transition:i,isDragging:j}=(0,af.useSortable)({id:a.id}),k={transform:ag.CSS.Translate.toString(h),transition:i,zIndex:j?1:void 0,position:j?"relative":void 0};return(0,b.jsxs)("div",{ref:f,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:k,children:[(0,b.jsx)("div",{ref:g,...d,...e,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,b.jsx)(ah.GripVertical,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(ao,{value:a.icon,readonly:!0,size:14}),(0,b.jsx)("p",{className:"text-sm font-medium",children:a.name})]}),(0,b.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.url})]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center",children:(0,b.jsx)(N.Switch,{checked:a.enabled,onCheckedChange:b=>c(a.id,b)})})]})},as=()=>{let a=(0,e.useTranslations)("settings.sidebarItems"),{allOrderedItems:c,customItems:f,toggleBuiltin:g,saveCustom:h,saveOrder:i,deleteItem:j,resetAll:k}=(0,ak.default)(),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(null),r=(0,ae.useSensors)((0,ae.useSensor)(ae.PointerSensor,{activationConstraint:{distance:5}})),s=(0,d.useCallback)((a,b)=>{a.startsWith("builtin-")?g(a,b):h(f.map(c=>c.id===a?{...c,enabled:b}:c))},[f,g,h]),t=(0,d.useCallback)(a=>{q(a)},[]),u=(0,d.useCallback)(()=>{p&&(j(p),q(null))},[p,j]),v=(0,d.useCallback)(a=>{m({mode:"edit",id:a.id,name:a.name,icon:a.icon,url:a.url})},[]),w=(0,d.useCallback)(()=>{m({mode:"add",name:"",icon:"Globe",url:""})},[]),x=(0,d.useCallback)(()=>{l&&l.name.trim()&&l.url.trim()&&("edit"===l.mode&&l.id?h(f.map(a=>a.id===l.id?{...a,name:l.name.trim(),icon:l.icon,url:l.url.trim()}:a)):h([...f,{id:`custom-${(0,ad.nanoid)(8)}`,name:l.name.trim(),icon:l.icon,url:l.url.trim(),enabled:!0}]),m(null))},[l,f,h]),y=(0,d.useCallback)(()=>{k(),o(!1)},[k]),z=(0,d.useCallback)(a=>{let{active:b,over:d}=a;if(!d||b.id===d.id)return;let e=c.findIndex(a=>a.id===b.id),f=c.findIndex(a=>a.id===d.id);-1===e||-1===f||i((0,af.arrayMove)(c,e,f).map(a=>a.id))},[c,i]),A=!!l&&l.name.trim().length>0&&l.url.trim().length>0;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("itemsSection")}),c.length>0&&(0,b.jsx)(ae.DndContext,{sensors:r,collisionDetection:ae.closestCenter,modifiers:[ap.restrictToVerticalAxis],onDragEnd:z,children:(0,b.jsx)(af.SortableContext,{items:c.map(a=>a.id),strategy:af.verticalListSortingStrategy,children:(0,b.jsx)("div",{className:"overflow-hidden rounded-lg border",children:c.map(a=>a.id.startsWith("builtin-")?(0,b.jsx)(ar,{item:a,onToggle:s},a.id):(0,b.jsx)(aq,{item:a,onEdit:v,onDelete:t,onToggle:s},a.id))})})}),l&&(0,b.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(ao,{value:l.icon,onChange:a=>m({...l,icon:a})}),(0,b.jsx)(M.Input,{value:l.name,onChange:a=>m({...l,name:a.target.value}),placeholder:a("namePlaceholder"),autoFocus:!0})]}),(0,b.jsx)(M.Input,{value:l.url,onChange:a=>m({...l,url:a.target.value}),placeholder:a("urlPlaceholder")}),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(K.Button,{variant:"outline",size:"sm",onClick:()=>m(null),children:a("cancel")}),(0,b.jsx)(K.Button,{size:"sm",onClick:x,disabled:!A,children:a("save")})]})]}),!l&&(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",onClick:w,children:[(0,b.jsx)(aj.Plus,{className:"mr-1 h-3.5 w-3.5"}),a("addButton")]})]}),(0,b.jsxs)(K.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>o(!0),children:[(0,b.jsx)(C.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),a("resetToDefault")]}),(0,b.jsx)(T.AlertDialog,{open:!!p,onOpenChange:a=>!a&&q(null),children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("deleteTitle")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("deleteDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:a("deleteCancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:u,children:a("deleteConfirm")})]})]})}),(0,b.jsx)(T.AlertDialog,{open:n,onOpenChange:o,children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("resetTitle")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("resetDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:a("resetCancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:y,children:a("resetConfirm")})]})]})})]})};var at=a.i(473446),au=a.i(520562),av=a.i(987441),aw=a.i(790048),ax=a.i(313355),ay=a.i(317118),az=a.i(581228),aA=a.i(466180);let aB=({text:a})=>{let[c,e]=(0,d.useState)(!1),f=async()=>{await (0,aA.copyToClipboard)(a)&&(e(!0),setTimeout(()=>e(!1),1500))};return(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:f,children:c?(0,b.jsx)(at.Check,{className:"h-3 w-3 text-positive"}):(0,b.jsx)(au.Copy,{className:"h-3 w-3"})})},aC=()=>{let a=(0,e.useTranslations)("settings.tailscale");return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,b.jsx)(ay.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("notInstalled")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("notInstalledDescription")})]})]}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentMac")}),(0,b.jsx)("p",{children:"brew install tailscale"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentMacAppStore")}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentLinux")}),(0,b.jsx)("p",{children:"curl -fsSL https://tailscale.com/install.sh | sh"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentAfterInstall")}),(0,b.jsx)("p",{children:"tailscale up"})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("installGuide",{link:a=>(0,b.jsxs)("a",{href:"https://tailscale.com/download",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline hover:text-foreground",children:[a,(0,b.jsx)(av.ExternalLink,{className:"h-3 w-3"})]})})})]})},aD=()=>{let a=(0,e.useTranslations)("settings.tailscale"),[c,g]=(0,d.useState)(null),[h,j]=(0,d.useState)(!0),[k,l]=(0,d.useState)(null),m=(0,d.useCallback)(async()=>{try{let a=await fetch("/api/tailscale/status");if(!a.ok)throw Error();let b=await a.json();g(b)}catch{g(null)}finally{j(!1)}},[]);(0,d.useEffect)(()=>{m()},[m]);let n=async b=>{l(`remove-${b}`);try{let c=await fetch("/api/tailscale/serve",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({httpsPort:b})});if(!c.ok){let b=await c.json();throw Error(b.error||a("removeFailed"))}f.toast.success(a("removedToast",{httpsPort:b})),await m()}catch(b){f.toast.error(b instanceof Error?b.message:a("removeFailed"))}finally{l(null)}};if(h)return(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(az.default,{className:"h-4 w-4 text-muted-foreground"})});if(!c||!c.installed)return(0,b.jsx)(aC,{});if(!c.running)return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,b.jsx)(ay.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("notRunning")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("notRunningDescription")})]})]}),(0,b.jsx)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:(0,b.jsx)("p",{children:"tailscale up"})})]});let o=c.serveEntries,p=c.serverPort,q=8022!==p;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("deviceInfo")}),(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{j(!0),m()},children:(0,b.jsx)(ax.RefreshCw,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"rounded-md border p-3 text-sm",children:(0,b.jsxs)("div",{className:"grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-1.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:a("host")}),(0,b.jsx)("span",{className:"font-mono text-xs",children:c.hostname}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"DNS"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-mono text-xs",children:c.dnsName}),c.dnsName&&(0,b.jsx)(aB,{text:c.dnsName})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"IP"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-mono text-xs",children:c.tailscaleIp}),c.tailscaleIp&&(0,b.jsx)(aB,{text:c.tailscaleIp})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:a("version")}),(0,b.jsx)("span",{className:"font-mono text-xs",children:c.version})]})})]}),q&&(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-accent-color/30 bg-accent-color/5 p-4",children:[(0,b.jsx)(aw.Info,{className:"mt-0.5 h-5 w-5 shrink-0 text-accent-color"}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("nonDefaultPortTitle",{port:p})}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("nonDefaultPortDescription",{defaultPort:8022,currentPort:p,restartAction:i.default?a("appRestart"):a("serverRestart")})}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentFixedPort",{port:8022})}),(0,b.jsxs)("p",{children:["PORT=",8022," purplemux"]}),(0,b.jsx)("p",{className:"mt-1.5 text-muted-foreground/60",children:a("commentOrTerminate",{port:8022})})]})]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("serveStatus")}),0===o.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("noActiveServe")}):(0,b.jsx)("div",{className:"rounded-md border",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b text-muted-foreground",children:[(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("httpsPort")}),(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("proxyTarget")}),(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("url")}),(0,b.jsx)("th",{className:"w-10 px-3 py-2"})]})}),(0,b.jsx)("tbody",{children:o.map(a=>{let d="443"===a.httpsPort?`https://${c.dnsName}`:`https://${c.dnsName}:${a.httpsPort}`;return(0,b.jsxs)("tr",{className:"border-b last:border-b-0",children:[(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:a.httpsPort}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:a.proxy}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs underline hover:text-foreground",children:d}),(0,b.jsx)(aB,{text:d})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",disabled:null!==k,onClick:()=>n(a.httpsPort),children:k===`remove-${a.httpsPort}`?(0,b.jsx)(az.default,{className:"h-3 w-3"}):(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})})})]},a.httpsPort)})})]})})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("setupGuide")}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentStep1Install")}),(0,b.jsx)("p",{children:"brew install tailscale"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentStep2Activate")}),(0,b.jsx)("p",{children:"tailscale up"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentStep3Add")}),(0,b.jsxs)("p",{children:["tailscale serve --bg --https=443 http://localhost:",p]})]})]})]})};var aE=a.i(394284);function aF(){let a=(0,e.useTranslations)("settings.branchName"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.branchNameProvider),h=(0,X.default)(a=>a.branchNamePrompt),i=(0,X.default)(a=>a.setBranchNameSettings),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),n=j??{provider:g,prompt:h},o=(0,aE.isValidBranchNamePrompt)(n.prompt),p=async()=>{m(!0);try{await i(n.provider,n.prompt),k(null),f.toast.success(c("saved"))}catch(a){f.toast.error(c("error"),{description:a instanceof Error?a.message:String(a)})}finally{m(!1)}};return(0,b.jsxs)("fieldset",{disabled:l,className:"space-y-3",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[a("agent"),(0,b.jsxs)("select",{className:"rounded-md border bg-background p-2",value:n.provider,"aria-describedby":"branch-name-provider-help",onChange:a=>k({...n,provider:a.target.value}),children:[(0,b.jsx)("option",{value:"claude",children:"Claude Code"}),(0,b.jsx)("option",{value:"codex",disabled:!0,children:"Codex CLI"})]})]}),(0,b.jsx)("p",{id:"branch-name-provider-help",className:"rounded-md border bg-muted/50 p-3 text-sm text-muted-foreground",children:a("codexUnavailable")}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[a("prompt"),(0,b.jsx)("textarea",{className:"min-h-48 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:n.prompt,maxLength:1e4,spellCheck:!1,"aria-invalid":!o,"aria-describedby":"branch-name-variables",onChange:a=>k({...n,prompt:a.target.value})})]}),(0,b.jsx)("p",{id:"branch-name-variables",className:"text-xs text-muted-foreground",children:a("variables")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:aE.BRANCH_NAME_VARIABLES.map(a=>(0,b.jsx)(K.Button,{type:"button",size:"sm",variant:"outline",onClick:()=>k({...n,prompt:`${n.prompt}{{${a}}}`}),children:`{{${a}}}`},a))}),!o&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:a("invalid")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(K.Button,{type:"button",onClick:()=>void p(),disabled:l||"codex"===n.provider||!o||n.provider===g&&n.prompt===h,children:l?c("loading"):c("save")}),(0,b.jsx)(K.Button,{type:"button",variant:"outline",onClick:()=>k({...n,prompt:aE.DEFAULT_BRANCH_NAME_PROMPT}),children:a("reset")})]})]})}var aG=a.i(520687);function aH({promptKey:a}){let c=(0,e.useTranslations)("settings.gitGenerationPrompts"),g=(0,e.useTranslations)("common"),h=(0,X.default)(b=>b[a]),i=(0,X.default)(a=>a.setGitGenerationPrompt),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),n=j??h,o=(0,aG.isValidGitGenerationPrompt)(a,n),p=aG.GIT_GENERATION_PROMPTS[a],q=async()=>{if(!l&&o){m(!0);try{await i(a,n),k(null),f.toast.success(g("saved"))}catch(a){f.toast.error(g("error"),{description:a instanceof Error?a.message:String(a)})}finally{m(!1)}}};return(0,b.jsxs)("fieldset",{disabled:l,className:"space-y-3",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:c(`${a}.title`)}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:c(`${a}.description`)}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[c("prompt"),(0,b.jsx)("textarea",{className:"min-h-40 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:n,maxLength:1e4,spellCheck:!1,"aria-invalid":!o,"aria-describedby":`${a}-variables`,onChange:a=>k(a.target.value)})]}),(0,b.jsx)("p",{id:`${a}-variables`,className:"text-xs text-muted-foreground",children:c("variables")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:p.variables.map(a=>(0,b.jsx)(K.Button,{type:"button",size:"sm",variant:"outline",disabled:n.length+a.length+4>1e4,onClick:()=>k(`${n}{{${a}}}`),children:`{{${a}}}`},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:c("evidenceHint")}),!o&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:c("invalid")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(K.Button,{type:"button",onClick:()=>void q(),disabled:l||!o||n===h,children:l?g("loading"):g("save")}),(0,b.jsx)(K.Button,{type:"button",variant:"outline",onClick:()=>k(p.defaultPrompt),children:c("reset")})]})]})}var aI=a.i(190955);let aJ=({provider:a})=>{let c=`${a}-environment`,g=(0,e.useTranslations)("settings.claude"),h=(0,e.useTranslations)("common"),i=(0,X.default)(b=>b[`${a}Environment`]),j=(0,X.default)(b=>"codex"===a?b.setCodexEnvironment:b.setClaudeEnvironment),[k,l]=(0,d.useState)(null),[m,n]=(0,d.useState)(!1),[o,p]=(0,d.useState)(!1),q=(0,aI.formatAgentEnvironment)(i),r=k??q,s=async()=>{let a;try{a=(0,aI.parseAgentEnvironment)(r)}catch{p(!0);return}n(!0);try{await j(a),l(null),f.toast.success(h("saved"))}catch(a){f.toast.error(h("error"),{description:a instanceof Error?a.message:String(a)})}finally{n(!1)}};return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(P.Label,{htmlFor:c,children:g("environmentTitle",{agent:"codex"===a?"Codex":"Claude"})}),(0,b.jsx)("p",{id:`${c}-description`,className:"text-sm text-muted-foreground",children:g("environmentDescription",{agent:"codex"===a?"Codex":"Claude"})}),(0,b.jsx)("textarea",{id:c,"aria-describedby":`${c}-description${o?` ${c}-error`:""}`,"aria-invalid":o,className:"min-h-32 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:r,onChange:a=>{l(a.target.value),p(!1)},placeholder:"HTTP_PROXY=http://127.0.0.1:7890\nHTTPS_PROXY=http://127.0.0.1:7890\nNO_PROXY=localhost,127.0.0.1",spellCheck:!1,autoCapitalize:"off",autoCorrect:"off",disabled:m}),o&&(0,b.jsx)("p",{id:`${c}-error`,role:"alert",className:"text-sm text-destructive",children:g("environmentInvalid")}),(0,b.jsx)(K.Button,{onClick:s,disabled:m||r===q,children:m?h("loading"):h("save")})]})};var aK=a.i(360056);function aL(){let a=(0,e.useTranslations)("settings.browserStorage"),c=(0,e.useTranslations)("common"),[f,g]=(0,d.useState)(!1),[h,i]=(0,d.useState)(!1),[j,k]=(0,d.useState)(!1),l=async()=>{if(!h){i(!0),k(!1);try{await (0,aK.clearBrowserStorage)(),(0,aK.reloadWithFreshPage)()}catch{k(!0),i(!1)}}};return(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsx)(K.Button,{variant:"outline",className:"shrink-0",onClick:()=>{k(!1),g(!0)},children:a("action")}),(0,b.jsx)(T.AlertDialog,{open:f,onOpenChange:a=>{h||g(a)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("title")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("confirm")})]}),j&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-ui-red",children:a("failed")}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(K.Button,{variant:"outline",disabled:h,onClick:()=>g(!1),children:c("cancel")}),j&&(0,b.jsx)(K.Button,{variant:"outline",onClick:aK.reloadWithFreshPage,children:a("reload")}),(0,b.jsx)(K.Button,{variant:"destructive",disabled:h,onClick:()=>void l(),children:a(h?"clearing":"action")})]})]})})]})}var aM=a.i(276986),aN=a.i(398544),aO=a.i(770708),aP=a.i(199847),aQ=a.i(941251);let aR="x-purplemux-process-action",aS="/api/system/idle-tabs",aT=async(a,b)=>{let c=await fetch(aS,{method:a,headers:{"Content-Type":"application/json",[aR]:"1"},...void 0===b?{}:{body:JSON.stringify(b)}}),d=await c.json();if(!c.ok)throw Error(d.error??"Idle tab operation failed");return d},aU=({policy:a,onSave:c})=>{let d=(0,e.useTranslations)("settings.idleTabs"),{register:g,handleSubmit:h,control:i,setValue:j,formState:{errors:k,isSubmitting:l,isDirty:m}}=(0,aO.useForm)({resolver:(0,aP.zodResolver)(aQ.idleTabPolicySchema),defaultValues:a}),n=(0,aO.useWatch)({control:i,name:"enabled"}),o=h(async a=>{try{await aT("PATCH",a),await c(),f.toast.success(d("saved"))}catch(a){f.toast.error(a instanceof Error?a.message:d("failed"))}});return(0,b.jsxs)("form",{onSubmit:o,className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("label",{htmlFor:"idle-tabs-enabled",className:"text-sm",children:d("automatic")}),(0,b.jsx)(N.Switch,{id:"idle-tabs-enabled",checked:n,disabled:l,onCheckedChange:a=>j("enabled",a,{shouldDirty:!0})})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{htmlFor:"idle-tabs-minutes",className:"text-xs",children:d("timeout")}),(0,b.jsx)(M.Input,{id:"idle-tabs-minutes",type:"number",min:15,max:10080,step:1,className:"w-36",disabled:l,...g("idleMinutes",{valueAsNumber:!0})})]}),(0,b.jsx)(K.Button,{type:"submit",size:"sm",variant:"outline",disabled:l||!m,children:d("save")})]}),k.idleMinutes&&(0,b.jsx)("p",{role:"alert",className:"text-xs text-negative",children:d("range")})]})},aV=()=>{let a=(0,e.useTranslations)("settings.idleTabs"),c=(0,e.useTranslations)("common"),{data:g,error:h,isValidating:i,mutate:j}=(0,aM.default)(aS,()=>aT("GET"),{refreshInterval:6e4}),[k,l]=(0,d.useState)(null),[m,n]=(0,d.useState)(!1),[o,p]=(0,d.useState)(null),q=async()=>{if(k&&!m){n(!0);try{let a=await aT("POST",{...k,confirmed:!0});p(a),l(null),await j()}catch(b){f.toast.error(b instanceof Error?b.message:a("failed"))}finally{n(!1)}}};return(0,b.jsxs)("section",{className:"space-y-3 rounded-md border p-3","aria-busy":m,children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("description")}),g&&(0,b.jsx)(aU,{policy:g.policy,onSave:j},`${g.policy.enabled}-${g.policy.idleMinutes}`),h&&(0,b.jsxs)("p",{role:"alert",className:"break-words text-sm text-negative",children:[a("failed"),": ",h.message]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:i||m,onClick:()=>void j(),children:a("refresh")}),(0,b.jsx)(K.Button,{size:"sm",disabled:m||!!h||!g?.candidates.length,onClick:()=>{g&&l({policy:{...g.policy},targets:g.candidates.slice(0,100).map(({workspaceId:a,paneId:b,tabId:c,sessionId:d,lastActivityAt:e})=>({workspaceId:a,paneId:b,tabId:c,sessionId:d,lastActivityAt:e}))})},children:a("reclaim")})]}),g&&!h&&!g.candidates.length&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("empty")}),g?.candidates.map(c=>(0,b.jsxs)("div",{className:"space-y-1 border-t pt-2 text-xs",children:[(0,b.jsxs)("p",{className:"break-words",children:[c.workspaceName," · ",c.tabName," · ",c.providerId]}),(0,b.jsx)("p",{className:"break-all text-muted-foreground",children:c.cwd}),(0,b.jsx)("p",{className:"text-muted-foreground",children:a("idleFor",{minutes:Math.floor((Date.now()-c.lastActivityAt)/6e4)})})]},c.tabId)),o&&(0,b.jsxs)("div",{role:"status",className:"space-y-1 text-xs",children:[(0,b.jsx)("p",{children:a("result",{reclaimed:o.reclaimed.length,skipped:o.skipped.length})}),o.skipped.map((a,c)=>(0,b.jsxs)("p",{className:"break-all",children:[a.target.tabId,": ",a.reason]},c))]}),(0,b.jsx)(T.AlertDialog,{open:!!k,onOpenChange:a=>{a||m||l(null)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("confirmTitle",{count:k?.targets.length??0})}),(0,b.jsx)(T.AlertDialogDescription,{children:a("confirmDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{disabled:m,children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{disabled:m,onClick:a=>{a.preventDefault(),q()},children:c("confirm")})]})]})})]})},aW="/api/system/agent-processes",aX=async()=>{let a=await fetch(aW),b=await a.json();if(!a.ok)throw Error(b.error??"Unable to load processes");return b},aY=()=>{let a=(0,e.useTranslations)("settings.processes"),c=(0,e.useTranslations)("common"),{data:g,error:h,isLoading:i,isValidating:j,mutate:k}=(0,aM.default)(aW,aX,{refreshInterval:1e4}),[l,m]=(0,d.useState)(""),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(null),r=async a=>{let b=$.default.getState();await b.fetchWorkspaces(),b.switchWorkspace(a),b.setSettingsDialogOpen(!1)},s=async()=>{if(p&&!n){o(!0);try{let b=await fetch(aW,{method:"POST",headers:{"Content-Type":"application/json",[aR]:"1"},body:JSON.stringify({...p,confirmed:!0})}),c=await b.json();if(!b.ok)throw Error(c.error??a("failed"));f.toast.success(a("stop"===p.action?"stopped":"started")),q(null),await k(),c.workspaceId&&await r(c.workspaceId)}catch(b){f.toast.error(b instanceof Error?b.message:a("failed")),await k()}finally{o(!1)}}},t=l.trim().toLocaleLowerCase(),u=(g?.processes??[]).filter(a=>`${a.providerId} ${a.pid} ${a.cwd??""} ${a.workspaceName??""}`.toLocaleLowerCase().includes(t));return(0,b.jsxs)("div",{className:"space-y-4","aria-busy":n,children:[(0,b.jsx)(aV,{}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(M.Input,{value:l,onChange:a=>m(a.target.value),placeholder:a("search"),"aria-label":a("search")}),(0,b.jsx)(K.Button,{variant:"outline",size:"icon",disabled:j||n,onClick:()=>void k(),"aria-label":a("refresh"),children:(0,b.jsx)(ax.RefreshCw,{className:j?"h-4 w-4 animate-spin":"h-4 w-4"})})]}),h&&(0,b.jsxs)("p",{role:"alert",className:"break-words text-sm text-negative",children:[a("failed"),": ",h.message]}),i&&(0,b.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:a("loading")}),!i&&!h&&!u.length&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("empty")}),g?.transfers.map(c=>(0,b.jsxs)("div",{className:"space-y-2 rounded-md border p-3",children:[(0,b.jsxs)("p",{className:"text-sm font-medium",children:[a("unfinished")," · ",c.providerId," · PID ",c.pid]}),(0,b.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:[c.workspaceName," · ",c.cwd]}),(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.sessionId}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(K.Button,{size:"sm",disabled:n||!!h,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"adopt"}),children:a("retry")}),(0,b.jsx)(K.Button,{size:"sm",variant:"outline",disabled:n,onClick:()=>void r(c.workspaceId),children:a("open")})]})]},`${c.pid}-${c.startedAt}`)),u.map(c=>(0,b.jsxs)("div",{className:"space-y-2 border-b py-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",children:[(0,b.jsx)("span",{className:"font-medium",children:"claude"===c.providerId?"Claude Code":"Codex"}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:["PID ",c.pid]}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a(c.managed?"managed":"external")})]}),(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.cwd??a("unknownDirectory")}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,aN.default)(c.startedAt).format("YYYY-MM-DD HH:mm:ss"),c.workspaceName&&` \xb7 ${c.workspaceName}`]}),c.session&&(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.session.sessionId}),!c.managed&&!c.session&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("unavailable")}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[c.workspaceId?(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:n,onClick:()=>void r(c.workspaceId),children:a("open")}):(0,b.jsx)(K.Button,{size:"sm",disabled:n||!!h||!c.cwd||!c.session,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"adopt"}),children:a("adopt")}),(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:n||!!h,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"stop"}),children:a("stop")})]})]},`${c.pid}-${c.startedAt}`)),(0,b.jsx)(T.AlertDialog,{open:null!==p,onOpenChange:a=>{a||n||q(null)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsxs)(T.AlertDialogTitle,{children:[a(p?.action==="adopt"?"adopt":"stop")," · PID ",p?.pid]}),(0,b.jsx)(T.AlertDialogDescription,{children:a(p?.action==="adopt"?"adoptConfirm":"stopConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{disabled:n,children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{disabled:n,onClick:a=>{a.preventDefault(),s()},children:n?a("working"):c("confirm")})]})]})})]})},aZ=()=>{let a=(0,e.useTranslations)("settings.linuxStartup"),c,g=c?.platform==="linux"&&!!c.canManageDesktopAutostart&&!!c.getDesktopAutostartStatus&&!!c.setDesktopAutostartEnabled,[h,i]=(0,d.useState)(!1),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(0),r=(0,d.useCallback)(()=>q(a=>a+1),[]);(0,d.useEffect)(()=>{if(!g||l)return;let a=!1;return(void 0).canManageDesktopAutostart().then(async b=>{if(!a){if(i(b),!b){k(null),o(!1);return}try{let b=await (void 0).getDesktopAutostartStatus();a||(k(b),o(!1))}catch{a||o(!0)}}}).catch(()=>{a||(i(!1),k(null),o(!1))}),window.addEventListener("focus",r),()=>{a=!0,window.removeEventListener("focus",r)}},[g,l,r,p]);let s=async b=>{if(h&&!l){m(!0);try{k(await (void 0).setDesktopAutostartEnabled(b)),o(!1),f.toast.success(a(b?"enabled":"disabled"))}catch{f.toast.error(a("saveFailed"))}finally{m(!1)}}};return g&&h?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"linux-desktop-startup",children:a("title")}),(0,b.jsx)("p",{id:"linux-startup-description",className:"text-sm text-muted-foreground",children:j?.supported===!1?a(j.reason||"packagedOnly"):a("description")})]}),(0,b.jsx)(N.Switch,{id:"linux-desktop-startup","aria-describedby":"linux-startup-description",checked:j?.enabled??!1,onCheckedChange:s,disabled:l||n||!j||!j.supported&&!j.enabled})]}),n&&(0,b.jsxs)("div",{role:"alert",className:"flex flex-wrap items-center gap-2 text-sm text-destructive",children:[a("loadFailed"),(0,b.jsx)(K.Button,{variant:"outline",size:"sm",onClick:r,children:a("retry")})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("serverHint")})]}):null},a$=[{id:"general",labelKey:"general",icon:(0,b.jsx)(D.Settings,{className:"h-4 w-4"})},{id:"appearance",labelKey:"appearance",icon:(0,b.jsx)(B.Palette,{className:"h-4 w-4"})},{id:"terminal",labelKey:"terminal",icon:(0,b.jsx)(F.Terminal,{className:"h-4 w-4"})},{id:"claude",labelKey:"agent",icon:(0,b.jsx)(n.Bot,{className:"h-4 w-4"})},{id:"processes",labelKey:"processes",icon:(0,b.jsx)(x.Monitor,{className:"h-4 w-4"})},{id:"notification",labelKey:"notification",icon:(0,b.jsx)(m.Bell,{className:"h-4 w-4"})},{id:"editor",labelKey:"editor",icon:(0,b.jsx)(r.FolderCode,{className:"h-4 w-4"})},{id:"auth",labelKey:"auth",icon:(0,b.jsx)(w.Lock,{className:"h-4 w-4"})},{id:"tailscale",labelKey:"tailscale",icon:(0,b.jsx)(s.Globe,{className:"h-4 w-4"})},{id:"quick-prompts",labelKey:"quickPrompts",icon:(0,b.jsx)(J.Zap,{className:"h-4 w-4"})},{id:"sidebar-items",labelKey:"sidebarItems",icon:(0,b.jsx)(v.Layout,{className:"h-4 w-4"})},{id:"system",labelKey:"system",icon:(0,b.jsx)(H.Wrench,{className:"h-4 w-4"})}],a_=[{id:"en",label:"English"},{id:"ko",label:"한국어"},{id:"ja",label:"日本語"},{id:"zh-CN",label:"中文(简体)"},{id:"zh-TW",label:"中文(繁體)"},{id:"es",label:"Español"},{id:"fr",label:"Français"},{id:"de",label:"Deutsch"},{id:"pt-BR",label:"Português (BR)"},{id:"ru",label:"Русский"},{id:"tr",label:"Türkçe"}],a0=[{id:"normal",labelKey:"fontSizeNormal"},{id:"large",labelKey:"fontSizeLarge"},{id:"x-large",labelKey:"fontSizeXLarge"}],a1=[{id:"tight",labelKey:"lineSpacingTight"},{id:"normal",labelKey:"lineSpacingNormal"},{id:"relaxed",labelKey:"lineSpacingRelaxed"},{id:"custom",labelKey:"lineSpacingCustom"}],a2=()=>{let a=(0,e.useTranslations)("settings.general"),c=(0,e.useTranslations)("common"),{theme:f,setTheme:i}=(0,g.useTheme)(),j=(0,X.default)(a=>a.locale),k=(0,X.default)(a=>a.setLocale),l=(0,X.default)(a=>a.fontSize),m=(0,X.default)(a=>a.setFontSize),n=(0,X.default)(a=>a.lineHeight),o=(0,X.default)(a=>a.setLineHeight),q=(0,X.default)(a=>a.lineHeightCustom),r=(0,X.default)(a=>a.setLineHeightCustom),s=(0,$.default)(a=>a.setSettingsDialogOpen),[t,v]=(0,d.useState)(null),w=t??String(q),y=(0,$.default)(a=>a.setCheatSheetOpen),A=a=>{i(a),fetch("/api/config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({appTheme:a})}).catch(()=>{}),window.electronAPI&&window.electronAPI.setNativeTheme(a)};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("language")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("languageDescription")})]}),(0,b.jsxs)(U.Select,{items:a_.map(a=>({label:a.label,value:a.id})),value:j,onValueChange:a=>a&&k(a),children:[(0,b.jsx)(U.SelectTrigger,{className:"min-w-[200px]",children:(0,b.jsx)(U.SelectValue,{})}),(0,b.jsx)(U.SelectContent,{children:a_.map(a=>(0,b.jsx)(U.SelectItem,{value:a.id,children:a.label},a.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("theme")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("themeDescription")})]}),(0,b.jsxs)(L.ButtonGroup,{children:[(0,b.jsxs)(K.Button,{variant:"light"===f?"default":"outline",size:"sm",onClick:()=>A("light"),children:[(0,b.jsx)(E.Sun,{className:"h-4 w-4"}),c("light")]}),(0,b.jsxs)(K.Button,{variant:"dark"===f?"default":"outline",size:"sm",onClick:()=>A("dark"),children:[(0,b.jsx)(z.Moon,{className:"h-4 w-4"}),c("dark")]}),(0,b.jsxs)(K.Button,{variant:"system"===f?"default":"outline",size:"sm",onClick:()=>A("system"),children:[(0,b.jsx)(x.Monitor,{className:"h-4 w-4"}),c("system")]})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("fontSize")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("fontSizeDescription")})]}),(0,b.jsx)(L.ButtonGroup,{children:a0.map(c=>(0,b.jsx)(K.Button,{variant:l===c.id?"default":"outline",size:"sm",onClick:()=>m(c.id),children:a(c.labelKey)},c.id))})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("lineSpacing")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("lineSpacingDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:["custom"===n&&(0,b.jsx)(M.Input,{type:"number",min:Y.LINE_HEIGHT_CUSTOM_MIN,max:Y.LINE_HEIGHT_CUSTOM_MAX,step:Y.LINE_HEIGHT_CUSTOM_STEP,value:w,onChange:a=>v(a.target.value),onBlur:()=>{let a=Number(t);if(v(null),!Number.isFinite(a))return;let b=(0,Y.clampCustomLineHeight)(Math.round(100*a)/100);b!==q&&r(b)},onKeyDown:a=>{"Enter"===a.key&&a.target.blur()},className:"h-8 w-20 text-sm","aria-label":a("lineSpacingCustom")}),(0,b.jsx)(L.ButtonGroup,{children:a1.map(c=>(0,b.jsx)(K.Button,{variant:n===c.id?"default":"outline",size:"sm",onClick:()=>o(c.id),children:a(c.labelKey)},c.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("keyboardShortcuts")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("keyboardShortcutsDescription")})]}),(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",onClick:()=>{s(!1),y(!0)},children:[(0,b.jsx)(u.Keyboard,{className:"h-4 w-4"}),a("openShortcuts"),(0,b.jsx)(p.ChevronRight,{className:"h-3.5 w-3.5"})]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("a",{href:"https://github.com/stirp/purplemux-improved/releases",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground/50 hover:text-muted-foreground hover:underline w-fit",children:[h.default.version,"(","b76dafd",")"]})]})},a3=[{label:"Surface",vars:["--background","--card","--popover","--muted","--secondary","--accent","--sidebar"]},{label:"Text",vars:["--foreground","--card-foreground","--popover-foreground","--muted-foreground","--secondary-foreground","--accent-foreground","--sidebar-foreground"]},{label:"Interactive",vars:["--primary","--primary-foreground","--destructive"]},{label:"Border",vars:["--border","--input","--ring"]},{label:"Palette",vars:["--ui-blue","--ui-teal","--ui-coral","--ui-amber","--ui-purple","--ui-pink","--ui-green","--ui-gray","--ui-red"]},{label:"Semantic",vars:["--positive","--negative","--accent-color","--brand","--focus-indicator","--claude-active"]}],a4=()=>{let a=(0,e.useTranslations)("settings.appearance"),g=(0,e.useTranslations)("common"),h=(0,X.default)(a=>a.customCSS),i=(0,X.default)(a=>a.setCustomCSS),[j,k]=(0,d.useState)(h),[l,m]=(0,d.useState)(!1);(0,d.useEffect)(()=>{k(h)},[h]);let n=j!==h;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(c.default,{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("customCSS")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("customCSSDescription")})]}),(0,b.jsx)("textarea",{className:"h-56 w-full resize-y rounded-md border border-input bg-muted/30 p-3 font-mono text-xs leading-relaxed text-foreground placeholder:text-muted-foreground/40 focus:border-ring focus:outline-none",placeholder:a("placeholder"),value:j,onChange:a=>k(a.target.value),spellCheck:!1}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)(T.AlertDialog,{children:[(0,b.jsx)(T.AlertDialogTrigger,{render:(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:!h,children:a("reset")})}),(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("reset")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("resetConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:g("cancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:()=>{k(""),i("")},children:a("reset")})]})]})]}),(0,b.jsx)(K.Button,{size:"sm",disabled:!n,onClick:()=>{i(j),f.toast.success(a("applied"))},children:a("apply")})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>m(!l),children:[(0,b.jsx)(o.ChevronDown,{className:(0,V.cn)("h-3.5 w-3.5 transition-transform",l&&"rotate-180")}),a("availableVariables")]}),l&&(0,b.jsx)("div",{className:"mt-2 space-y-3",children:a3.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"mb-1 text-[11px] font-medium text-muted-foreground",children:a.label}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:a.vars.map(a=>(0,b.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px]",children:a},a))})]},a.label))})]})]})},a5=({list:a,selectedId:c,onSelect:d})=>(0,b.jsx)("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-3",children:a.map(a=>{let e;return(0,b.jsxs)("button",{type:"button",onClick:()=>d(a.id),className:(0,V.cn)("flex flex-col gap-2 rounded-lg border p-3 text-left transition-colors",c===a.id?"border-primary bg-accent":"border-border hover:border-muted-foreground/50"),children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.name}),(0,b.jsx)("div",{className:"flex h-5 items-center gap-1 rounded px-2",style:{backgroundColor:a.colors.background},children:[(e=a.colors).red,e.green,e.yellow,e.blue,e.magenta,e.cyan,e.white].map((a,c)=>(0,b.jsx)("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:a}},c))})]},a.id)})}),a6=["auto","always","never"],a7=()=>{let a=(0,e.useTranslations)("settings.terminal"),c=(0,e.useTranslations)("common"),{mode:d,themeIds:f,setTerminalTheme:g,themes:h}=(0,W.default)(),i=(0,X.default)(a=>a.terminalKeyBar),j=(0,X.default)(a=>a.setTerminalKeyBar),k=h.filter(a=>"dark"===a.variant),l=h.filter(a=>"light"===a.variant);return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("theme")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("themeDescription")})]}),(0,b.jsxs)(R.Tabs,{defaultValue:d,children:[(0,b.jsxs)(R.TabsList,{children:[(0,b.jsx)(R.TabsTrigger,{value:"dark",children:c("dark")}),(0,b.jsx)(R.TabsTrigger,{value:"light",children:c("light")})]}),(0,b.jsx)(R.TabsContent,{value:"dark",className:"mt-3",children:(0,b.jsx)(a5,{list:k,selectedId:f.dark,onSelect:a=>g("dark",a)})}),(0,b.jsx)(R.TabsContent,{value:"light",className:"mt-3",children:(0,b.jsx)(a5,{list:l,selectedId:f.light,onSelect:a=>g("light",a)})})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 border-t pt-6 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("keyBar")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("keyBarDescription")})]}),(0,b.jsx)(L.ButtonGroup,{children:a6.map(c=>(0,b.jsx)(K.Button,{variant:i===c?"default":"outline",size:"sm",onClick:()=>j(c),children:a(`keyBarOptions.${c}`)},c))})]})]})},a8=()=>{let a=(0,e.useTranslations)("settings.editor"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.editorUrl),h=(0,X.default)(a=>a.editorPreset),i=(0,X.default)(a=>a.setEditorUrl),j=(0,X.default)(a=>a.setEditorPreset),[k,l]=(0,d.useState)(g),[m,n]=(0,d.useState)(h),o="vscode-remote"===m,p="code-server"===m||"custom"===m||o,q=m!==h||p&&k.trim()!==g,r=(0,aa.buildEditorUrl)(m,k,"/Users/me/project"),s=()=>{let b=p?k.trim():"";if(o&&!(0,aa.isValidSshHost)(b))return void f.toast.error(a("errorSshHost"));if("code-server"===m&&b)try{let c=new URL(b);if("http:"!==c.protocol&&"https:"!==c.protocol)return void f.toast.error(a("errorHttpRequired"))}catch{f.toast.error(a("errorHttpRequired"));return}"custom"!==m||!b||b.includes("{folder}")||b.includes("{folderEncoded}")?(l(b),i(b),j(m),f.toast.success(c("saved"))):f.toast.error(a("errorCustomTemplate"))};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("preset")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("presetDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:m,onValueChange:a=>n(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:aa.EDITOR_PRESETS.map(c=>(0,b.jsxs)(P.Label,{htmlFor:`editor-preset-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",m===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`editor-preset-${c}`,value:c}),(0,b.jsx)(ab.EditorIcon,{preset:c,className:"h-5 w-5 shrink-0"}),a(`presets.${c}`)]},c))})]}),p&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:o?a("sshHost"):"custom"===m?a("customTemplate"):a("url")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o?a("sshHostDescription"):"custom"===m?a("customTemplateDescription"):a("urlDescription")}),(0,b.jsx)(M.Input,{placeholder:o?"my-server":"custom"===m?"myeditor://open?path={folderEncoded}":"https://example.com:8080",value:k,onChange:a=>l(a.target.value),onKeyDown:a=>{"Enter"===a.key&&s()}}),"code-server"===m&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("urlHelp",{link:a=>(0,b.jsx)("a",{href:"https://github.com/coder/code-server",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:a}),code:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"?folder="})})}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:"# Install on macOS"}),(0,b.jsx)("p",{children:"brew install code-server"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# Run"}),(0,b.jsx)("p",{children:"code-server --port 8080"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# External access via Tailscale (optional)"}),(0,b.jsx)("p",{children:"tailscale serve --bg --https=8443 http://localhost:8080"})]})]}),"custom"===m&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("customHelp",{folder:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folder}"}),folderEncoded:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folderEncoded}"})})})]}),!p&&"off"!==m&&(0,b.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:a("localIdeHint")}),"off"===m&&(0,b.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:a("offHint")}),r&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("preview")}),(0,b.jsx)("code",{className:"block break-all rounded-md bg-muted p-2 font-mono text-xs",children:r})]}),(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsx)(K.Button,{disabled:!q,onClick:s,children:c("save")})})]})},a9=()=>{let a=(0,e.useTranslations)("settings.claude"),c=(0,X.default)(a=>a.dangerouslySkipPermissions),d=(0,X.default)(a=>a.setDangerouslySkipPermissions),f=(0,X.default)(a=>a.claudeShowTerminal),g=(0,X.default)(a=>a.setClaudeShowTerminal),h=(0,X.default)(a=>a.gitAskProvider),i=(0,X.default)(a=>a.setGitAskProvider),j=(0,X.default)(a=>a.noteSummaryProvider),k=(0,X.default)(a=>a.setNoteSummaryProvider);return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(aJ,{provider:"claude"}),(0,b.jsx)(aJ,{provider:"codex"}),(0,b.jsx)(aF,{}),(0,b.jsx)(aH,{promptKey:"commitMessagePrompt"}),(0,b.jsx)(aH,{promptKey:"reviewDescriptionPrompt"}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"skip-permissions",className:"text-sm font-medium",children:a("skipPermissions")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("skipPermissionsDescription")}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 text-xs text-muted-foreground",children:[(0,b.jsxs)("span",{children:["Claude: ",(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--dangerously-skip-permissions"})]}),(0,b.jsxs)("span",{children:["Codex: ",(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--yolo"})]})]})]}),(0,b.jsx)(N.Switch,{id:"skip-permissions",checked:c,onCheckedChange:d})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"show-terminal",className:"text-sm font-medium",children:a("showTerminal")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("showTerminalDescription")})]}),(0,b.jsx)(N.Switch,{id:"show-terminal",checked:f,onCheckedChange:g})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("gitAskProvider")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("gitAskProviderDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:h,onValueChange:a=>i(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(c=>(0,b.jsxs)(P.Label,{htmlFor:`git-ask-provider-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",h===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`git-ask-provider-${c}`,value:c}),a(`gitAskProviderOptions.${c}`)]},c))})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("noteSummaryProvider")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("noteSummaryProviderDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:j,onValueChange:a=>k(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(c=>(0,b.jsxs)(P.Label,{htmlFor:`note-summary-provider-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",j===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`note-summary-provider-${c}`,value:c}),a(`noteSummaryProviderOptions.${c}`)]},c))})]})]})},ba=({value:a,onChange:c,ariaLabel:d})=>{let f=(0,e.useTranslations)("settings.notification"),g=Z.TOAST_POSITIONS.map(a=>({label:f(`positions.${a}`),value:a}));return(0,b.jsxs)(U.Select,{items:g,value:a,onValueChange:a=>a&&c(a),children:[(0,b.jsx)(U.SelectTrigger,{"aria-label":d,className:"min-w-[160px]",children:(0,b.jsx)(U.SelectValue,{})}),(0,b.jsx)(U.SelectContent,{children:g.map(a=>(0,b.jsx)(U.SelectItem,{value:a.value,children:a.label},a.value))})]})},bb=()=>{let a=(0,e.useTranslations)("settings.notification"),c=(0,X.default)(a=>a.notificationsEnabled),g=(0,X.default)(a=>a.setNotificationsEnabled),h=(0,X.default)(a=>a.toastOnCompleteEnabled),i=(0,X.default)(a=>a.setToastOnCompleteEnabled),j=(0,X.default)(a=>a.toastDuration),k=(0,X.default)(a=>a.setToastDuration),l=(0,X.default)(a=>a.toastPositionDesktop),m=(0,X.default)(a=>a.setToastPositionDesktop),n=(0,X.default)(a=>a.toastPositionMobile),o=(0,X.default)(a=>a.setToastPositionMobile),[p,q]=(0,d.useState)(null),r=p??String(Math.round(j/1e3)),[s,t]=(0,d.useState)([]),[u,v]=(0,d.useState)(null),w=(0,d.useCallback)(async()=>{try{let a=await fetch("/api/push/subscribe"),b=await a.json();return Array.isArray(b.devices)?b.devices:[]}catch{return[]}},[]);(0,d.useEffect)(()=>{w().then(t),(0,_.getEndpoint)().then(v)},[w]);let x=async b=>{try{await fetch("/api/push/subscribe",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:b})}),f.toast.success(a("deviceRemoved")),t(await w())}catch{f.toast.error(a("deviceRemoveFailed"))}};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"notifications-enabled",className:"text-sm font-medium",children:a("enable")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("enableDescription")})]}),(0,b.jsx)(N.Switch,{id:"notifications-enabled",checked:c,onCheckedChange:g,disabled:!1})]}),!1,!1]}),s.length>0&&(0,b.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("devicesSection")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("devicesSectionDescription")})]}),(0,b.jsx)("div",{className:"space-y-2",children:s.map(c=>{let d=!!u&&c.endpoint===u;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border px-3 py-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(y.MonitorSmartphone,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"truncate text-sm",children:(a=>{try{let b=new URL(a).host;if(b.includes("apple"))return"Apple";if(b.includes("fcm")||b.includes("google"))return"Chrome / Android";if(b.includes("mozilla"))return"Firefox";if(b.includes("windows")||b.includes("wns"))return"Windows";return b}catch{return"Unknown"}})(c.endpoint)}),d&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:a("deviceThis")})]}),(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>x(c.endpoint),"aria-label":a("deviceRemove"),children:(0,b.jsx)(G.Trash2,{className:"h-4 w-4"})})]},c.endpoint)})})]}),(0,b.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastSection")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastSectionDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"toast-enabled",className:"text-sm font-medium",children:a("toastEnable")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastEnableDescription")})]}),(0,b.jsx)(N.Switch,{id:"toast-enabled",checked:h,onCheckedChange:i})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastDuration")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastDurationDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(M.Input,{type:"number",min:1,max:60,step:1,value:r,onChange:a=>q(a.target.value),onBlur:()=>{let a=Number(p);if(q(null),!Number.isFinite(a))return;let b=1e3*Math.min(60,Math.max(1,Math.round(a)));b!==j&&k(b)},onKeyDown:a=>{"Enter"===a.key&&a.target.blur()},disabled:!h,className:"h-8 w-20 text-sm"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:a("toastDurationUnit")})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastPositionDesktop")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastPositionDesktopDescription")})]}),(0,b.jsx)(ba,{value:l,onChange:m,ariaLabel:a("toastPositionDesktop")})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastPositionMobile")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastPositionMobileDescription")})]}),(0,b.jsx)(ba,{value:n,onChange:o,ariaLabel:a("toastPositionMobile")})]})]})]})},bc=()=>{let a=(0,e.useTranslations)("settings.auth"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.hasAuthPassword),h=(0,X.default)(a=>a.changePassword),[j,k]=(0,d.useState)(""),[l,m]=(0,d.useState)(!1),n=l&&j.trim().length>=4,o=a=>{k(a),m(!0)};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)(O.Field,{children:[(0,b.jsx)(O.FieldLabel,{htmlFor:"auth-password",children:a("changePassword")}),(0,b.jsx)(O.FieldDescription,{children:a("changePasswordDescription")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(M.Input,{id:"auth-password",placeholder:g?a("newPasswordPlaceholder"):a("passwordPlaceholder"),value:j,onChange:a=>o(a.target.value)}),(0,b.jsx)(K.Button,{variant:"outline",size:"icon",className:"shrink-0",onClick:()=>{let a;return o((a=new Uint8Array(8),crypto.getRandomValues(a),Array.from(a,a=>a.toString(16).padStart(2,"0")).join("").slice(0,8)))},children:(0,b.jsx)(q.Dices,{className:"h-4 w-4"})})]})]}),(0,b.jsx)(O.FieldDescription,{children:a("resetHint",{action:i.default?a("restartApp"):a("restartServer")})}),(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsx)(K.Button,{disabled:!n,onClick:()=>{h(j.trim()),k(""),m(!1),f.toast.success(a("savedRestart",{action:i.default?a("restartAppAction"):a("restartServerAction")}))},children:c("save")})})]})},bd=()=>{let a=(0,e.useTranslations)("settings.system"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.systemResourcesEnabled),h=(0,X.default)(a=>a.setSystemResourcesEnabled),j=(0,X.default)(a=>a.networkAccess),k=(0,X.default)(a=>a.setNetworkAccess),m=(0,X.default)(a=>a.hostEnvLocked),n=(0,X.default)(a=>a.bindHostIsLocal),[o,p]=(0,d.useState)(!1),[q,r]=(0,d.useState)(null),[s,u]=(0,d.useState)(!1),v,w=i.default&&v?.platform==="darwin",x=i.default&&w&&"function"==typeof v?.getServerLaunchAgentStatus&&"function"==typeof v?.setServerLaunchAgentEnabled;(0,d.useEffect)(()=>{let a;if(!x)return;if("function"!=typeof a?.getServerLaunchAgentStatus)return;let b=!1;return a.getServerLaunchAgentStatus().then(a=>{b||r(a)}).catch(()=>{b||r({supported:!1,enabled:!1,loaded:!1,stale:!1,path:""})}),()=>{b=!0}},[x]);let y=async b=>{let d;if(x){if("function"==typeof d?.setServerLaunchAgentEnabled){u(!0);try{let c=await d.setServerLaunchAgentEnabled(b);r(c),f.toast.success(b?a("startupEnabled"):a("startupDisabled"))}catch(a){f.toast.error(a instanceof Error?a.message:c("error"))}finally{u(!1)}}}},z=async()=>{p(!0);try{let b=await fetch("/api/uploads/cleanup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"all"})});if(!b.ok)throw Error(`HTTP ${b.status}`);let c=await b.json();c.deleted>0?f.toast.success(a("attachedImagesCleaned",{count:c.deleted})):f.toast.info(a("attachedImagesNothing"))}catch{f.toast.error(c("error"))}finally{p(!1)}},[B,D]=(0,d.useState)(j);(0,d.useEffect)(()=>{D(j)},[j]);let E=B!==j,F=n&&"localhost"!==B;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)(l.default,{}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsx)(A.Network,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}),(0,b.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("networkAccess")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:m?a("networkAccessLocked"):a("networkAccessDescription")})]})]}),(0,b.jsx)(Q.RadioGroup,{value:B,onValueChange:a=>D(a),disabled:m,className:"gap-2",children:["localhost","tailscale","all"].map(c=>(0,b.jsxs)("label",{htmlFor:`network-access-${c}`,className:"flex cursor-pointer items-start gap-3 rounded-md border bg-background px-3 py-2.5 aria-disabled:cursor-not-allowed aria-disabled:opacity-60","aria-disabled":m||void 0,children:[(0,b.jsx)(Q.RadioGroupItem,{value:c,id:`network-access-${c}`,className:"mt-0.5"}),(0,b.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a(`networkAccessOptions.${c}.label`)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a(`networkAccessOptions.${c}.description`)})]})]},c))}),!m&&(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:F?a("restartRequired"):""}),(0,b.jsx)(K.Button,{size:"sm",onClick:()=>{k(B),f.toast.success(F?a("restartRequired"):c("saved"))},disabled:!E,children:c("save")})]})]}),(0,b.jsx)(aZ,{}),w&&(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"server-startup",className:"text-sm font-medium",children:a("startServerAtLogin")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:q?.supported===!1?a("startServerAtLoginUnsupported"):a("startServerAtLoginDescription")})]}),(0,b.jsx)(N.Switch,{id:"server-startup",checked:!!(q?.enabled||q?.stale),onCheckedChange:y,disabled:!x||s||!q?.supported&&!q?.stale})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"system-resources",className:"text-sm font-medium",children:a("showResources")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("showResourcesDescription")})]}),(0,b.jsx)(N.Switch,{id:"system-resources",checked:g,onCheckedChange:h})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsx)(t.ImageIcon,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("attachedImages")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("attachedImagesDescription")})]})]}),(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",className:"gap-1.5 shrink-0",onClick:z,disabled:o,children:[(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"}),a("cleanAttachedImages")]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("tmuxReset")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("tmuxResetDescription",{action:i.default?a("restartApp"):a("restartServer")})})]}),(0,b.jsxs)(T.AlertDialog,{children:[(0,b.jsx)(T.AlertDialogTrigger,{render:(0,b.jsxs)(K.Button,{variant:"destructive",size:"sm",className:"gap-1.5 shrink-0",children:[(0,b.jsx)(C.RotateCcw,{className:"h-3.5 w-3.5"}),c("reset")]})}),(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("tmuxReset")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("tmuxResetConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{className:"bg-ui-red hover:bg-ui-red/80",onClick:()=>{window.location.href="/reset"},children:c("reset")})]})]})]})]})]})};a.s(["default",0,({open:a,onOpenChange:c})=>{let f=(0,j.default)(),g=(0,k.default)(a&&f),h=(0,e.useTranslations)("settings"),l=(0,e.useTranslations)("common"),[m,n]=(0,d.useState)("general"),o=a$.find(a=>a.id===m);return(0,b.jsx)(S.Dialog,{open:a,onOpenChange:c,children:(0,b.jsx)(S.DialogContent,{className:"inset-0 top-0 left-0 flex h-dvh w-full max-w-none translate-x-0 translate-y-0 flex-col gap-0 overflow-hidden rounded-none p-0 sm:max-w-none md:inset-auto md:top-1/2 md:left-1/2 md:h-[min(520px,calc(100dvh-2rem))] md:w-[calc(100%-2rem)] md:max-w-3xl md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-xl",style:g,showCloseButton:!1,children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 w-full flex-col overflow-hidden pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)] md:flex-row md:p-0",children:[(0,b.jsxs)("div",{className:"flex shrink-0 flex-col border-b bg-muted/30 px-3 pt-3 pb-0 md:p-3 md:w-48 md:border-b-0 md:border-r",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-center justify-between px-2 md:mb-4",children:[(0,b.jsx)(S.DialogTitle,{className:"text-base font-semibold",children:h("title")}),(0,b.jsxs)(K.Button,{variant:"ghost",size:"icon",onClick:()=>c(!1),className:"h-11 w-11 shrink-0 opacity-70 hover:opacity-100 md:h-6 md:w-6",children:[(0,b.jsx)(I.X,{className:"h-[18px] w-[18px]"}),(0,b.jsx)("span",{className:"sr-only",children:l("close")})]})]}),(0,b.jsx)("nav",{className:"flex min-h-0 gap-1 overflow-x-auto px-1 pb-2 md:flex-col md:overflow-y-auto md:px-0 md:pb-0",children:a$.filter(a=>!a.electronOnly||i.default).map(a=>(0,b.jsxs)(K.Button,{variant:"ghost",onClick:()=>n(a.id),className:(0,V.cn)("min-h-11 shrink-0 justify-start gap-2 whitespace-nowrap px-3 py-2 text-sm font-medium md:min-h-0 md:gap-3",m===a.id?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[a.icon,h(`tabs.${a.labelKey}`)]},a.id))})]}),(0,b.jsxs)("div",{className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto p-4 md:p-6",children:[(0,b.jsx)("h2",{className:"mb-6 text-lg font-semibold",children:o?h(`tabs.${o.labelKey}`):""}),"general"===m&&(0,b.jsx)(a2,{}),"appearance"===m&&(0,b.jsx)(a4,{}),"terminal"===m&&(0,b.jsx)(a7,{}),"notification"===m&&(0,b.jsx)(bb,{}),"editor"===m&&(0,b.jsx)(a8,{}),"claude"===m&&(0,b.jsx)(a9,{}),"processes"===m&&(0,b.jsx)(aY,{}),"auth"===m&&(0,b.jsx)(bc,{}),"tailscale"===m&&(0,b.jsx)(aD,{}),"quick-prompts"===m&&(0,b.jsx)(ac.default,{}),"sidebar-items"===m&&(0,b.jsx)(as,{}),"system"===m&&(0,b.jsx)(bd,{})]})]})})})}],380028)}];
1
+ module.exports=[269887,a=>{"use strict";let b=(0,a.i(305162).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);a.s(["Sparkles",0,b],269887)},412573,a=>{"use strict";var b=a.i(127669);let c=a=>{let b=window.visualViewport;return b?.addEventListener("resize",a),b?.addEventListener("scroll",a),()=>{b?.removeEventListener("resize",a),b?.removeEventListener("scroll",a)}},d=()=>{let a=window.visualViewport;return a&&1===a.scale?`${a.height}:${Math.max(0,a.offsetTop)}`:""},e=()=>"";a.s(["default",0,a=>{let f=(0,b.useSyncExternalStore)(c,d,e);if(!a||!f)return;let[g,h]=f.split(":").map(Number);return{position:"fixed",left:0,right:0,top:h,height:g}}])},463621,965848,97731,247129,783585,a=>{"use strict";var b=a.i(127669),c=a.i(276986),d=a.i(510414),e=a.i(892209);let f=a=>fetch(a).then(a=>{if(!a.ok)throw Error("fetch failed");return a.json()}),g={builtins:[],custom:[],order:[]},h=(a,b)=>{if(0===b.length)return a;let c=new Map(a.map(a=>[a.id,a])),d=[];for(let a of b){let b=c.get(a);b&&(d.push(b),c.delete(a))}for(let a of c.values())d.push(a);return d};a.s(["default",0,()=>{let{data:a,isLoading:i,mutate:j}=(0,c.default)("/api/sidebar-items",f,{revalidateOnFocus:!1}),k=a??g,l=(0,b.useMemo)(()=>h([...k.builtins,...k.custom].filter(a=>a.enabled),k.order),[k]),m=(0,b.useMemo)(()=>h([...k.builtins,...k.custom],k.order),[k]),n=(0,b.useCallback)(async(a,b,c)=>{let d=a.filter(a=>!a.enabled).map(a=>a.id);if(!(await fetch("/api/sidebar-items",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({custom:b,disabledBuiltinIds:d,order:c})})).ok)throw Error("save failed")},[]),o=(0,b.useCallback)(async(a,b)=>{let c=c=>({...c,builtins:c.builtins.map(c=>c.id===a?{...c,enabled:b}:c)});await j(async a=>{let b=c(a??g);return await n(b.builtins,b.custom,b.order),b},{optimisticData:a=>c(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),p=(0,b.useCallback)(async a=>{let b=b=>({...b,custom:a});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),q=(0,b.useCallback)(async a=>{let b=b=>({...b,order:a});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),r=(0,b.useCallback)(async a=>{let b=b=>({...b,custom:b.custom.filter(b=>b.id!==a),order:b.order.filter(b=>b!==a)});await j(async a=>{let c=b(a??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:a=>b(a??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]),s=(0,b.useCallback)(async()=>{let a=a=>({builtins:a.builtins.map(a=>({...a,enabled:!0})),custom:[],order:[]});await j(async b=>{let c=a(b??g);return await n(c.builtins,c.custom,c.order),c},{optimisticData:b=>a(b??g),rollbackOnError:!0,revalidate:!1}).catch(()=>d.toast.error((0,e.t)("settings","saveFailed")))},[j,n]);return{items:l,allOrderedItems:m,builtinItems:k.builtins,customItems:k.custom,order:k.order,isLoading:i,toggleBuiltin:o,saveCustom:p,saveOrder:q,deleteItem:r,resetAll:s}}],463621);var i=a.i(305162);let j=(0,i.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);a.s(["Link",0,j],965848);let k=(0,i.default)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]);a.s(["Bookmark",0,k],97731);let l=(0,i.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);a.s(["Star",0,l],247129);let m=(0,i.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);a.s(["Home",0,m],783585)},237892,a=>{"use strict";let b=(0,a.i(305162).default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);a.s(["BarChart3",0,b],237892)},357285,975712,786955,948968,240631,963846,495959,185069,430266,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);a.s(["PieChart",0,c],357285);let d=(0,b.default)("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);a.s(["LineChart",0,d],975712);let e=(0,b.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["Code",0,e],786955);let f=(0,b.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);a.s(["Database",0,f],948968);let g=(0,b.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);a.s(["Server",0,g],240631);let h=(0,b.default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);a.s(["Cloud",0,h],963846);let i=(0,b.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);a.s(["Key",0,i],495959);let j=(0,b.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);a.s(["User",0,j],185069);let k=(0,b.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);a.s(["Mail",0,k],430266)},513626,a=>{"use strict";let b=(0,a.i(305162).default)("bell",[["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"}]]);a.s(["Bell",0,b],513626)},508160,933268,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,c],508160);let d=(0,b.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);a.s(["Camera",0,d],933268)},848127,a=>{"use strict";let b=(0,a.i(305162).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);a.s(["default",0,b])},242755,540006,513350,453690,946287,81867,83083,142871,336520,514571,a=>{"use strict";var b=a.i(848127);a.s(["Image",()=>b.default],242755);var c=a.i(305162);let d=(0,c.default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);a.s(["Film",0,d],540006);let e=(0,c.default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);a.s(["Music",0,e],513350);let f=(0,c.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);a.s(["Headphones",0,f],453690);let g=(0,c.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);a.s(["Mic",0,g],946287);let h=(0,c.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["File",0,h],81867);let i=(0,c.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);a.s(["Upload",0,i],83083);let j=(0,c.default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);a.s(["GitFork",0,j],142871);let k=(0,c.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);a.s(["Bug",0,k],336520);let l=(0,c.default)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);a.s(["Sliders",0,l],514571)},134916,a=>{"use strict";let b=(0,a.i(305162).default)("palette",[["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"}]]);a.s(["Palette",0,b],134916)},29976,190746,923754,65774,587842,886238,814242,971986,380724,701993,198281,24204,544538,505716,447372,9910,497480,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("brush",[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]]);a.s(["Brush",0,c],29976);let d=(0,b.default)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);a.s(["Map",0,d],190746);let e=(0,b.default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);a.s(["MapPin",0,e],923754);let f=(0,b.default)("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);a.s(["Navigation",0,f],65774);let g=(0,b.default)("compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]);a.s(["Compass",0,g],587842);let h=(0,b.default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);a.s(["Wifi",0,h],886238);let i=(0,b.default)("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);a.s(["Tablet",0,i],814242);let j=(0,b.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);a.s(["Laptop",0,j],971986);let k=(0,b.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);a.s(["HardDrive",0,k],380724);let l=(0,b.default)("circuit-board",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);a.s(["CircuitBoard",0,l],701993);let m=(0,b.default)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Radio",0,m],198281);let n=(0,b.default)("bluetooth",[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17",key:"1q5490"}]]);a.s(["Bluetooth",0,n],24204);let o=(0,b.default)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);a.s(["Heart",0,o],544538);let p=(0,b.default)("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]);a.s(["ThumbsUp",0,p],505716);let q=(0,b.default)("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);a.s(["Smile",0,q],447372);let r=(0,b.default)("coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);a.s(["Coffee",0,r],9910);let s=(0,b.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);a.s(["Rocket",0,s],497480)},232662,743394,450348,253967,881890,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);a.s(["Award",0,c],232662);let d=(0,b.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Target",0,d],743394);let e=(0,b.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]);a.s(["Flag",0,e],450348);let f=(0,b.default)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);a.s(["Crosshair",0,f],253967);let g=(0,b.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);a.s(["Layers",0,g],881890)},89098,a=>{"use strict";let b=(0,a.i(305162).default)("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);a.s(["Layout",0,b],89098)},145901,a=>{"use strict";var b=a.i(127669),c=a.i(561049),d=a.i(965848),e=a.i(987441),f=a.i(97731),g=a.i(247129),h=a.i(783585),i=a.i(857239),j=a.i(237892),k=a.i(357285),l=a.i(975712),m=a.i(105485),n=a.i(359590),o=a.i(882508),p=a.i(786955),q=a.i(948968),r=a.i(240631),s=a.i(963846),t=a.i(358367),u=a.i(765038),v=a.i(495959),w=a.i(185069),x=a.i(801511),y=a.i(430266),z=a.i(200943),A=a.i(513626),B=a.i(508160),C=a.i(392004),D=a.i(979462),E=a.i(964348),F=a.i(933268),G=a.i(242755),H=a.i(540006),I=a.i(513350),J=a.i(453690),K=a.i(946287),L=a.i(840320),M=a.i(81867),N=a.i(816871),O=a.i(248319),P=a.i(83083),Q=a.i(440931),R=a.i(504686),S=a.i(248442),T=a.i(142871),U=a.i(336520),V=a.i(215928),W=a.i(921138),X=a.i(514571),Y=a.i(134916),Z=a.i(29976),$=a.i(190746),_=a.i(923754),aa=a.i(65774),ab=a.i(587842),ac=a.i(886238),ad=a.i(641901),ae=a.i(999762),af=a.i(814242),ag=a.i(971986),ah=a.i(294794),ai=a.i(380724),aj=a.i(172919),ak=a.i(701993),al=a.i(198281),am=a.i(24204),an=a.i(544538),ao=a.i(505716),ap=a.i(447372),aq=a.i(9910),ar=a.i(497480),as=a.i(260680),at=a.i(113649),au=a.i(146349),av=a.i(269887),aw=a.i(232662),ax=a.i(782427),ay=a.i(743394),az=a.i(450348),aA=a.i(253967),aB=a.i(881890),aC=a.i(89098),aD=a.i(305162);let aE=(0,aD.default)("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),aF=(0,aD.default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),aG=(0,aD.default)("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),aH=(0,aD.default)("kanban",[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]]);var aI=a.i(916328);let aJ=(0,aD.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),aK=(0,aD.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),aL=(0,aD.default)("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),aM=(0,aD.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),aN={Globe:c.Globe,Link:d.Link,ExternalLink:e.ExternalLink,Bookmark:f.Bookmark,Star:g.Star,Home:h.Home,FileText:i.FileText,BarChart3:j.BarChart3,PieChart:k.PieChart,LineChart:l.LineChart,Activity:m.Activity,Zap:n.Zap,Terminal:o.Terminal,Code:p.Code,Database:q.Database,Server:r.Server,Cloud:s.Cloud,Shield:t.Shield,Lock:u.Lock,Key:v.Key,User:w.User,Users:x.Users,Mail:y.Mail,MessageSquare:z.MessageSquare,Bell:A.Bell,Calendar:B.Calendar,Clock:C.Clock,Search:D.Search,Eye:E.Eye,Camera:F.Camera,Image:G.Image,Film:H.Film,Music:I.Music,Headphones:J.Headphones,Mic:K.Mic,Folder:L.Folder,File:M.File,Archive:N.Archive,Download:O.Download,Upload:P.Upload,GitBranch:Q.GitBranch,GitCommit:R.GitCommit,GitPullRequest:S.GitPullRequest,GitFork:T.GitFork,Bug:U.Bug,Wrench:V.Wrench,Settings:W.Settings,Sliders:X.Sliders,Palette:Y.Palette,Brush:Z.Brush,Map:$.Map,MapPin:_.MapPin,Navigation:aa.Navigation,Compass:ab.Compass,Wifi:ac.Wifi,Monitor:ad.Monitor,Smartphone:ae.Smartphone,Tablet:af.Tablet,Laptop:ag.Laptop,Cpu:ah.Cpu,HardDrive:ai.HardDrive,MemoryStick:aj.MemoryStick,CircuitBoard:ak.CircuitBoard,Radio:al.Radio,Bluetooth:am.Bluetooth,Heart:an.Heart,ThumbsUp:ao.ThumbsUp,Smile:ap.Smile,Coffee:aq.Coffee,Rocket:ar.Rocket,Flame:as.Flame,Sun:at.Sun,Moon:au.Moon,Sparkles:av.Sparkles,Award:aw.Award,Trophy:ax.Trophy,Target:ay.Target,Flag:az.Flag,Crosshair:aA.Crosshair,Layers:aB.Layers,Layout:aC.Layout,Grid:aE,List:aF,Table:aG,Kanban:aH,Bot:aI.Bot,Brain:aJ,Lightbulb:aK,GraduationCap:aL,BookOpen:aM};a.s(["default",0,({name:a,className:c,style:d})=>{let e=aN[a];return e?(0,b.createElement)(e,{className:c,style:d}):null},"getIcon",0,a=>aN[a]],145901)},548401,a=>{"use strict";var b=a.i(508171),c=a.i(127669),d=a.i(113952),e=a.i(510414),f=a.i(396465),g=a.i(112779),h=a.i(678240),i=a.i(330836);a.s(["default",0,()=>{let a=(0,d.useTranslations)("settings.typography"),j=(0,h.default)(a=>a.regionTypography),k=(0,h.default)(a=>a.setRegionTypography),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),p=l??j,q=(0,i.isValidRegionTypography)(p),r=!(0,i.regionTypographyEqual)(p,j),s=(a,b,c)=>{let d={...p[a],[b]:c};void 0===c&&delete d[b];let e={...p,[a]:d};0===Object.keys(d).length&&delete e[a],m(e)},t=async()=>{o(!0);try{await k(p),m(null),e.toast.success(a("applied"))}catch(b){e.toast.error(a("failed"),{description:b instanceof Error?b.message:void 0})}finally{o(!1)}};return(0,b.jsxs)("fieldset",{disabled:n,className:"space-y-4 border-b pb-4",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("fontHelp")}),i.TYPOGRAPHY_REGIONS.map(c=>{let d=p[c]??{},e=(0,i.isValidRegionTypography)({[c]:d})?d:{};return(0,b.jsxs)("div",{className:"space-y-3 rounded-md border p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a(`regions.${c}`)}),(0,b.jsx)(f.Button,{type:"button",variant:"ghost",size:"sm",disabled:!p[c],onClick:()=>{let a={...p};delete a[c],m(a)},children:a("reset")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,b.jsxs)("label",{className:"space-y-1 text-xs sm:col-span-2",children:[(0,b.jsx)("span",{children:a("fontFamily")}),(0,b.jsx)(g.Input,{value:d.fontFamily??"",maxLength:200,placeholder:a("fontPlaceholder"),onChange:a=>s(c,"fontFamily",a.target.value||void 0)})]}),(0,b.jsxs)("label",{className:"space-y-1 text-xs",children:[(0,b.jsx)("span",{children:a("fontSize")}),(0,b.jsx)(g.Input,{type:"number",min:i.MIN_REGION_FONT_SIZE,max:i.MAX_REGION_FONT_SIZE,step:"1",value:d.fontSize??"",placeholder:a("default"),onChange:a=>s(c,"fontSize",""===a.target.value?void 0:Number(a.target.value))})]}),(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("label",{htmlFor:`typography-color-${c}`,children:a("color")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[d.color&&!(0,i.isValidTypographyColor)(d.color)?(0,b.jsx)("span",{role:"img","aria-label":a("invalid"),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded border border-destructive text-destructive",children:"!"}):(0,b.jsx)("input",{type:"color",className:"h-9 w-9 shrink-0 cursor-pointer rounded border bg-transparent","aria-label":`${a(`regions.${c}`)} ${a("color")}`,title:d.color??a("default"),value:d.color??"#808080",onChange:a=>s(c,"color",a.target.value)}),(0,b.jsx)(g.Input,{id:`typography-color-${c}`,value:d.color??"",maxLength:7,placeholder:a("default"),"aria-invalid":!!d.color&&!(0,i.isValidTypographyColor)(d.color),onChange:a=>s(c,"color",a.target.value||void 0)})]})]})]}),(0,b.jsx)("div",{className:"overflow-auto rounded bg-muted/30 p-2",style:{fontFamily:e.fontFamily?(0,i.regionFontFamily)(e.fontFamily):void 0,fontSize:e.fontSize,color:e.color},children:a("preview")})]},c)}),!q&&(0,b.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:a("invalid")}),(0,b.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,b.jsx)(f.Button,{type:"button",variant:"outline",size:"sm",disabled:0===Object.keys(p).length,onClick:()=>m({}),children:a("resetAll")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(f.Button,{type:"button",variant:"outline",size:"sm",disabled:!r,onClick:()=>m(null),children:a("cancel")}),(0,b.jsx)(f.Button,{type:"button",size:"sm",disabled:!r||!q,onClick:t,children:a(n?"saving":"apply")})]})]})]})}])},133085,(a,b,c)=>{b.exports={name:"purplemux-improved",version:"0.5.14",description:"Manage multiple Claude Code sessions from your browser",license:"MIT",author:"subicura",repository:{type:"git",url:"https://github.com/stirp/purplemux-improved.git"},homepage:"https://github.com/stirp/purplemux-improved",bugs:{url:"https://github.com/stirp/purplemux-improved/issues"},keywords:["claude","terminal","multiplexer","tmux","claude-code"],engines:{node:">=24.0.0"},packageManager:"pnpm@12.11.2",browserslist:["chrome 111","edge 111","firefox 111","safari 15.4","ios_saf 15.4"],main:"dist-electron/main.js",bin:{"purplemux-improved":"./bin/purplemux.js",pmuxi:"./bin/cli.js"},files:["bin/","dist/",".next/standalone/","src/config/tmux.conf"],scripts:{dev:"tsx watch server.ts",build:"next build && node scripts/post-build.js && tsup","build:landing":"eleventy","dev:landing":"eleventy --serve","build:server":"tsup","build:electron:main":"tsup --config electron/tsup.config.ts","build:electron":"next build && node scripts/post-build.js --electron && tsup && pnpm build:electron:main","dev:electron":"ELECTRON_DEV_URL=http://localhost:8022 electron .","pack:electron":"pnpm build:electron && electron-builder --mac","pack:electron:linux":"pnpm build:electron && electron-builder --linux AppImage","pack:electron:dev":"pnpm build:electron && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac -c.mac.identity=null -c.mac.notarize=false",start:"NODE_ENV=production tsx server.ts",lint:"eslint",test:"vitest run && pnpm test:cli","test:cli":"node --test tests/cli/*.test.cjs","test:watch":"vitest",ralph:"node ralph-loop.js",prepublishOnly:"rm -rf .next dist dist-electron && pnpm build",postinstall:"chmod +x node_modules/.pnpm/node-pty@*/node_modules/node-pty/prebuilds/*/spawn-helper 2>/dev/null; exit 0"},dependencies:{"@base-ui/react":"^1.3.0","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@git-diff-view/core":"^0.1.3","@git-diff-view/file":"^0.1.3","@git-diff-view/react":"^0.1.3","@hookform/resolvers":"^5.9.1","@tailwindcss/typography":"^0.5.19","@xterm/addon-clipboard":"^0.2.0","@xterm/addon-fit":"^0.11.0","@xterm/addon-unicode11":"^0.9.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0",acorn:"^8.18.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",cmdk:"^1.1.1",dayjs:"^1.11.20",diff:"^9.0.0",jose:"^6.2.2",koffi:"2.15.2","lucide-react":"^1.7.0",motion:"^12.38.0",nanoid:"^5.1.7",next:"16.2.6","next-intl":"^4.11.0","next-themes":"^0.4.6","node-pty":"1.2.0-beta.12",pino:"^10.3.1","pino-pretty":"^13.1.3","pino-roll":"^4.0.0",react:"19.2.5","react-dom":"19.2.5","react-hook-form":"^7.90.0","react-hotkeys-hook":"^5.2.4","react-icons":"^5.6.0","react-markdown":"^10.1.0","react-resizable-panels":"^4.10.0",recharts:"^3.8.0","rehype-highlight":"^7.0.2","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","smol-toml":"^1.6.1",sonner:"^2.0.7",swr:"^2.4.1","tailwind-merge":"^3.5.0","tw-animate-css":"^1.4.0","update-notifier":"^7.3.1","use-stick-to-bottom":"^1.1.3",vaul:"^1.1.2","web-push":"^3.6.7",ws:"^8.20.0",zod:"^4.3.6",zustand:"^5.0.12"},devDependencies:{"@11ty/eleventy":"^3.1.5","@electron/rebuild":"^4.0.3","@tailwindcss/postcss":"^4","@types/node":"^24.12.0","@types/react":"^19","@types/react-dom":"^19","@types/web-push":"^3.6.4","@types/ws":"^8.18.1",chalk:"^5.6.2",electron:"^41.1.1","electron-builder":"^26.8.1","electron-updater":"^6.8.3",eslint:"^9","eslint-config-next":"16.2.5",jsdom:"^26.1.0",shadcn:"^4.1.2",tailwindcss:"^4",tsup:"^8.5.1",tsx:"^4.21.0",typescript:"^5.9.3",vitest:"^4.1.4"}}},559269,a=>{"use strict";var b=a.i(508171),c=a.i(248319),d=a.i(33720),d=d,e=a.i(313355),f=a.i(127669),g=a.i(113952),h=a.i(396465),i=a.i(893759),j=a.i(276986);let k=async(a,b)=>{let c;if(c?.isElectron){if(!c.getAppUpdate||!c.appUpdateAction)throw Error("This desktop version does not expose update controls. Use the application menu.");return a?c.appUpdateAction(a,b):c.getAppUpdate()}let d=await fetch("/api/app-update",{method:a?"POST":"GET",cache:"no-store",...a?{headers:{"Content-Type":"application/json","x-purplemux-update":"1"},body:JSON.stringify({action:a,version:b})}:{}});if(!d.ok){let a=await d.json().catch(()=>null);throw Error(a?.error||`Update service: HTTP ${d.status}`)}return d.json()};var l=a.i(391262);a.s(["default",0,({compact:a=!1})=>{let m=(0,g.useTranslations)("settings.appUpdate"),{state:n,error:o,requesting:p,run:q,desktop:r,reconnectTimedOut:s}=(()=>{let{data:a,error:b,mutate:c}=(0,j.default)("app-update:server",()=>k(),{refreshInterval:a=>a&&["checking","downloading","restarting"].includes(a.phase)?2e3:3e4,dedupingInterval:1e3,shouldRetryOnError:!0,errorRetryInterval:3e3}),[d,e]=(0,f.useState)(!1),[g,h]=(0,f.useState)(null),[i,l]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(a?.phase!=="restarting")return;let b=setTimeout(()=>l(!0),15e4);return()=>clearTimeout(b)},[a?.phase]);let m=(0,f.useRef)(null);(0,f.useEffect)(()=>{a&&(m.current&&m.current!==a.currentVersion&&window.location.reload(),m.current=a.currentVersion)},[a]);let n=async(a,b)=>{e(!0),h(null),l(!1);try{await c(await k(a,b),{revalidate:!1})}catch(a){h(a instanceof Error?a.message:String(a))}finally{e(!1)}};return{state:a,error:g||(b instanceof Error?b.message:null),requesting:d,run:n,desktop:!1,reconnectTimedOut:a?.phase==="restarting"&&i}})(),[t,u]=(0,f.useState)(null),v=!!n?.latestVersion&&(0,l.isNewerVersion)(n.latestVersion,n.currentVersion),w=v&&n?.skippedVersion===n?.latestVersion,x=p||!!n?.installing||["checking","downloading","restarting"].includes(n?.phase||""),y=n?.installing||["downloading","ready","blocked","restarting"].includes(n?.phase||"");return(!a||!w||y||n?.error||o)&&(!a||v||n?.error||["downloading","blocked","restarting"].includes(n?.phase||""))?(0,b.jsxs)("section",{"aria-label":m("title"),className:a?"shrink-0 border-b bg-muted px-3 py-2":"space-y-3",children:[(0,b.jsxs)("div",{className:a?"flex flex-wrap items-center justify-between gap-3":"flex flex-col items-stretch justify-between gap-3 sm:flex-row sm:items-center",children:[(0,b.jsxs)("div",{className:a?"min-w-0 flex-1 basis-48 space-y-1":"min-w-0 flex-1 space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a&&v?m("available",{version:n.latestVersion}):m("title")}),!a&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:m(r?"desktopDescription":"serverDescription")}),n&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",role:"status",children:[m("current",{version:n.currentVersion})," · ",m("idle"!==n.phase||n.checkedAt?n.phase:"notChecked",{version:n.latestVersion||""}),!a&&v&&"available"!==n.phase&&` \xb7 ${m("available",{version:n.latestVersion})}`,null!==n.progress&&"downloading"===n.phase&&` ${Math.round(n.progress)}%`]}),!a&&w&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m("skipped",{version:n.latestVersion})})]}),(0,b.jsxs)("div",{className:"flex max-w-full shrink-0 flex-wrap gap-2",children:[!a&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",disabled:x,onClick:()=>void q("check"),children:[x?(0,b.jsx)(d.default,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(e.RefreshCw,{className:"h-4 w-4"}),m("check")]}),v&&(0,b.jsxs)(h.Button,{size:"sm",disabled:x||!n?.supported,onClick:()=>void q("install"),children:[x?(0,b.jsx)(d.default,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(c.Download,{className:"h-4 w-4"}),m("install")]}),v&&(0,b.jsx)(h.Button,{variant:"destructive",size:"sm",disabled:x||!n?.supported,onClick:()=>u(n.latestVersion),children:m("forceInstall")}),v&&!w&&(0,b.jsx)(h.Button,{variant:"outline",size:"sm",disabled:x,onClick:()=>void q("skip",n.latestVersion),children:m("skip")})]})]}),n?.phase==="restarting"&&(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:m(r?"desktopReconnecting":"reconnecting")}),s&&(0,b.jsxs)("div",{role:"alert",className:"mt-2 space-y-2",children:[(0,b.jsx)("p",{className:"text-xs text-destructive",children:m("reconnectFailed")}),(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>window.location.reload(),children:m("reload")})]}),(n?.error||o)&&n?.phase!=="restarting"&&(0,b.jsx)("p",{role:"alert",className:"mt-2 break-words text-xs text-destructive",children:o||(n?.phase==="blocked"?m("busyHint"):n?.error)}),n&&!n.supported&&(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:m(r?"desktopUnsupported":"serverUnsupported")}),(0,b.jsx)(i.AlertDialog,{open:null!==t,onOpenChange:a=>{a||u(null)},children:(0,b.jsxs)(i.AlertDialogContent,{children:[(0,b.jsxs)(i.AlertDialogHeader,{children:[(0,b.jsx)(i.AlertDialogTitle,{children:m("forceInstall")}),(0,b.jsx)(i.AlertDialogDescription,{children:m("forceConfirm",{version:t||""})})]}),(0,b.jsxs)(i.AlertDialogFooter,{children:[(0,b.jsx)(i.AlertDialogCancel,{children:m("cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",disabled:x||!n?.supported||t!==n?.latestVersion,onClick:()=>{t&&(q("force-install",t),u(null))},children:m("forceInstall")})]})]})})]}):null}],559269)},999116,a=>{"use strict";let b=(0,a.i(305162).default)("dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);a.s(["Dices",0,b],999116)},990794,a=>{"use strict";var b=a.i(848127);a.s(["ImageIcon",()=>b.default])},958860,a=>{"use strict";let b=(0,a.i(305162).default)("monitor-smartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);a.s(["MonitorSmartphone",0,b],958860)},721234,253052,850329,130438,624629,a=>{"use strict";var b,c=a.i(508171);a.i(235882);var d=a.i(869686),e=a.i(654449),f=a.i(799856);a.i(896472);let g=(0,e.cva)("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",vertical:"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"}},defaultVariants:{orientation:"horizontal"}});a.s(["ButtonGroup",0,function({className:a,orientation:b,...d}){return(0,c.jsx)("div",{role:"group","data-slot":"button-group","data-orientation":b,className:(0,f.cn)(g({orientation:b}),a),...d})}],721234);var h=a.i(127669),i=a.i(397625);let j=(0,e.cva)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});a.s(["Field",0,function({className:a,orientation:b="vertical",...d}){return(0,c.jsx)("div",{role:"group","data-slot":"field","data-orientation":b,className:(0,f.cn)(j({orientation:b}),a),...d})},"FieldDescription",0,function({className:a,...b}){return(0,c.jsx)("p",{"data-slot":"field-description",className:(0,f.cn)("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),...b})},"FieldLabel",0,function({className:a,...b}){return(0,c.jsx)(i.Label,{"data-slot":"field-label",className:(0,f.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",a),...b})}],253052),a.s([],708221),a.i(708221);var k=a.i(73781),l=a.i(286255),m=a.i(611599),n=a.i(510607),o=a.i(478116),p=a.i(338046),q=a.i(663584),r=a.i(963985),s=a.i(392422);let t=((b={}).checked="data-checked",b.unchecked="data-unchecked",b.disabled="data-disabled",b.readonly="data-readonly",b.required="data-required",b.valid="data-valid",b.invalid="data-invalid",b.touched="data-touched",b.dirty="data-dirty",b.filled="data-filled",b.focused="data-focused",b),u={checked:a=>a?{[t.checked]:""}:{[t.unchecked]:""},...r.transitionStatusMapping,...s.fieldValidityMapping};var v=a.i(594812),w=a.i(324486),x=a.i(791031),y=a.i(122585),z=a.i(847017),A=a.i(444414),B=a.i(308490),C=a.i(210109),D=a.i(208318);let E=h.createContext(void 0);var F=a.i(801191),G=a.i(179256);let H=h.createContext(void 0),I=h.forwardRef(function(a,b){let{render:e,className:f,disabled:g=!1,readOnly:i=!1,required:j=!1,"aria-labelledby":r,value:s,inputRef:t,nativeButton:G=!1,id:I,style:J,...K}=a,L=h.useContext(E),{disabled:M,readOnly:N,required:O,form:P,checkedValue:Q,touched:R=!1,validation:S,name:T}=L??{},U=L?.setCheckedValue??o.NOOP,V=L?.setTouched??o.NOOP,W=L?.registerControlRef??o.NOOP,X=L?.registerInputRef??o.NOOP,{setDirty:Y,validityData:Z,setTouched:$,setFilled:_,state:aa,disabled:ab}=(0,z.useFieldRootContext)(),ac=(0,A.useFieldItemContext)(),{labelId:ad,getDescriptionProps:ae}=(0,B.useLabelableContext)(),af=ab||ac.disabled||M||g,ag=N||i,ah=O||j,ai=L?Q===s:""===s,aj=h.useMemo(()=>(0,F.serializeValue)(s),[s]),ak=h.useRef(null),al=h.useRef(null),am=(0,m.useStableCallback)(a=>{a&&W(a,af)}),an=(0,k.useMergedRefs)(t,al,X);(0,l.useIsoLayoutEffect)(()=>{al.current?.checked&&_(!0)},[_]),(0,l.useIsoLayoutEffect)(()=>{if(al.current){if(af&&ai)return void X(null);ak.current&&W(ak.current,af),X(al.current)}},[ai,af,W,X]);let ao=(0,v.useBaseUiId)(),ap=(0,D.useLabelableId)({id:I,implicit:!1,controlRef:ak}),aq=G?void 0:ap,ar={role:"radio","aria-checked":ai,"aria-required":ah||void 0,"aria-readonly":ag||void 0,"aria-labelledby":(0,C.useAriaLabelledBy)(r,ad,al,!G,aq),[x.ACTIVE_COMPOSITE_ITEM]:ai?"":void 0,id:G?ap:ao,onKeyDown(a){"Enter"===a.key&&a.preventDefault()},onClick(a){a.defaultPrevented||af||ag||(a.preventDefault(),al.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey})))},onFocus(a){a.defaultPrevented||af||ag||!R||(al.current?.click(),V(!1))}},{getButtonProps:as,buttonRef:at}=(0,w.useButton)({disabled:af,native:G}),au={type:"radio",ref:an,form:P,id:aq,name:T,tabIndex:-1,style:T?n.visuallyHiddenInput:n.visuallyHidden,"aria-hidden":!0,...void 0!==s?{value:aj}:o.EMPTY_OBJECT,disabled:af,checked:ai,required:ah,readOnly:ag,onChange(a){if(a.nativeEvent.defaultPrevented||af||ag||void 0===s)return;let b=(0,p.createChangeEventDetails)(q.REASONS.none,a.nativeEvent);b.isCanceled||($(!0),Y(s!==Z.initialValue),_(!0),U(s,b))},onFocus(){ak.current?.focus()}},av=h.useMemo(()=>({...aa,required:ah,disabled:af,readOnly:ag,checked:ai}),[aa,af,ag,ai,ah]),aw=void 0!==L,ax=[b,ak,at,am],ay=[ar,ae,S?.getValidationProps??o.EMPTY_OBJECT,K,as],az=(0,d.useRenderElement)("span",a,{enabled:!aw,state:av,ref:ax,props:ay,stateAttributesMapping:u});return(0,c.jsxs)(H.Provider,{value:av,children:[aw?(0,c.jsx)(y.CompositeItem,{tag:"span",render:e,className:f,style:J,state:av,refs:ax,props:ay,stateAttributesMapping:u}):az,(0,c.jsx)("input",{...au,suppressHydrationWarning:!0})]})});var J=a.i(479960),K=a.i(56498);let L=h.forwardRef(function(a,b){let{render:c,className:e,style:f,keepMounted:g=!1,...i}=a,j=function(){let a=h.useContext(H);if(void 0===a)throw Error((0,G.default)(52));return a}(),k=j.checked,{mounted:l,transitionStatus:m,setMounted:n}=(0,K.useTransitionStatus)(k),o={...j,transitionStatus:m},p=h.useRef(null),q=(0,d.useRenderElement)("span",a,{ref:[b,p],state:o,props:i,stateAttributesMapping:u});return((0,J.useOpenChangeComplete)({open:k,ref:p,onComplete(){k||n(!1)}}),g||l)?q:null});a.s(["Indicator",0,L,"Root",0,I],82808);var M=a.i(82808),M=M,N=a.i(861056),O=a.i(395835),P=a.i(223833),Q=a.i(565262),R=a.i(568102),S=a.i(226460),T=a.i(510405),U=a.i(795839);let V=[P.SHIFT],W=h.forwardRef(function(a,b){let{render:d,className:e,disabled:f,readOnly:g,required:i,onValueChange:j,value:k,defaultValue:l,form:n,name:o,inputRef:p,id:q,style:r,...t}=a,{setTouched:u,setFocused:w,shouldValidateOnChange:x,validationMode:y,name:A,disabled:C,state:D,validation:F,setDirty:G,setFilled:H,validityData:I}=(0,z.useFieldRootContext)(),{labelId:J}=(0,B.useLabelableContext)(),{clearErrors:K}=(0,T.useFormContext)(),L=(0,S.useFieldsetRootContext)(!0),M=C||f,P=A??o,W=(0,v.useBaseUiId)(q),[X,Y]=(0,N.useControlled)({controlled:k,default:l,name:"RadioGroup",state:"value"}),Z=(0,m.useStableCallback)(j),$=(0,m.useStableCallback)((a,b)=>{Z(a,b),b.isCanceled||Y(a)}),_=h.useRef(null),aa=h.useRef(null),ab=h.useRef(null);function ac(a){let b;return p&&("function"==typeof p?b=p(a):p.current=a),aa.current=a,F.inputRef.current=a,b}let ad=(0,m.useStableCallback)((a,b=!1)=>{if(a){if(b){_.current===a&&(_.current=null);return}null==_.current&&(_.current=a)}}),ae=(0,m.useStableCallback)(a=>{if(!a||a.disabled)return;ab.current||(ab.current=a);let b=aa.current;if(a.checked||null==b||b.disabled)return ac(a)}),af=(0,m.useStableCallback)(()=>X??null);(0,R.useRegisterFieldControl)(_,{id:W,value:X,getValue:af}),(0,U.useValueChanged)(X,()=>{K(P),G(X!==I.initialValue),H(null!=X),x()?F.commit(X):F.commit(X,!0);let a=ab.current;null==X&&a&&!a.disabled&&ac(a)});let[ag,ah]=h.useState(!1),ai=t["aria-labelledby"]??J??L?.legendId,aj={...D,disabled:M??!1,required:i??!1,readOnly:g??!1},ak=h.useMemo(()=>({...D,checkedValue:X,disabled:M,form:n,validation:F,name:P,onValueChange:Z,readOnly:g,registerControlRef:ad,registerInputRef:ae,required:i,setCheckedValue:$,setTouched:ah,touched:ag}),[X,M,n,F,D,P,Z,g,ad,ae,i,$,ah,ag]);return(0,c.jsx)(E.Provider,{value:ak,children:(0,c.jsx)(Q.CompositeRoot,{render:d,className:e,style:r,state:aj,props:[{role:"radiogroup","aria-required":i||void 0,"aria-disabled":M||void 0,"aria-readonly":g||void 0,"aria-labelledby":ai,onFocus(){w(!0)},onBlur(a){(0,O.contains)(a.currentTarget,a.relatedTarget)||(u(!0),w(!1),"onBlur"===y&&F.commit(X))},onKeyDownCapture(a){a.key.startsWith("Arrow")&&(u(!0),ah(!0),w(!0))}},F.getValidationProps,t],refs:[b],stateAttributesMapping:s.fieldValidityMapping,enableHomeAndEndKeys:!1,modifierKeys:V})})});a.s(["RadioGroup",0,function({className:a,...b}){return(0,c.jsx)(W,{"data-slot":"radio-group",className:(0,f.cn)("grid w-full gap-2",a),...b})},"RadioGroupItem",0,function({className:a,...b}){return(0,c.jsx)(M.Root,{"data-slot":"radio-group-item",className:(0,f.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",a),...b,children:(0,c.jsx)(M.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,c.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}],850329),a.s(["TOAST_POSITIONS",0,["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]],130438);var X=a.i(113952),Y=a.i(986013),Z=a.i(273529),$=a.i(452751),_=a.i(764042),aa=a.i(840815),ab=a.i(721381),ac=a.i(753221),ad=a.i(273120),ae=a.i(386058),af=a.i(396465),ag=a.i(112779),ah=a.i(366736),ai=a.i(330281),aj=a.i(893759),ak=a.i(545375),al=a.i(658269);let am=({prompt:a,onToggle:b})=>{let{attributes:d,listeners:e,setNodeRef:f,setActivatorNodeRef:g,transform:h,transition:i,isDragging:j}=(0,$.useSortable)({id:a.id}),k={transform:_.CSS.Translate.toString(h),transition:i,zIndex:j?1:void 0,position:j?"relative":void 0};return(0,c.jsxs)("div",{ref:f,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:k,children:[(0,c.jsx)("div",{ref:g,...d,...e,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,c.jsx)(aa.GripVertical,{className:"h-4 w-4"})}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,c.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.prompt})]}),(0,c.jsx)("div",{className:"flex shrink-0 items-center",children:(0,c.jsx)(ah.Switch,{checked:a.enabled,onCheckedChange:c=>b(a.id,c)})})]})},an=({prompt:a,onEdit:b,onDelete:d,onToggle:e})=>{let{attributes:f,listeners:g,setNodeRef:h,setActivatorNodeRef:i,transform:j,transition:k,isDragging:l}=(0,$.useSortable)({id:a.id}),m={transform:_.CSS.Translate.toString(j),transition:k,zIndex:l?1:void 0,position:l?"relative":void 0};return(0,c.jsxs)("div",{ref:h,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:m,children:[(0,c.jsx)("div",{ref:i,...f,...g,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,c.jsx)(aa.GripVertical,{className:"h-4 w-4"})}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,c.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.prompt})]}),(0,c.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,c.jsx)(af.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>b(a),children:(0,c.jsx)(ab.Pencil,{className:"h-3.5 w-3.5"})}),(0,c.jsx)(af.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>d(a.id),children:(0,c.jsx)(ae.Trash2,{className:"h-3.5 w-3.5"})}),(0,c.jsx)(ah.Switch,{checked:a.enabled,onCheckedChange:b=>e(a.id,b)})]})]})};a.s(["default",0,()=>{let a=(0,X.useTranslations)("settings.quickPrompts"),{allOrderedPrompts:b,customPrompts:d,toggleBuiltin:e,saveCustom:f,saveOrder:g,deletePrompt:i,resetAll:j}=(0,ak.default)(),[k,l]=(0,h.useState)(null),[m,n]=(0,h.useState)(!1),[o,p]=(0,h.useState)(null),q=(0,Z.useSensors)((0,Z.useSensor)(Z.PointerSensor,{activationConstraint:{distance:5}})),r=(0,h.useCallback)((a,b)=>{a.startsWith("builtin-")?e(a,b):f(d.map(c=>c.id===a?{...c,enabled:b}:c))},[d,e,f]),s=(0,h.useCallback)(a=>{p(a)},[]),t=(0,h.useCallback)(()=>{o&&(i(o),p(null))},[o,i]),u=(0,h.useCallback)(a=>{l({mode:"edit",id:a.id,name:a.name,prompt:a.prompt})},[]),v=(0,h.useCallback)(()=>{l({mode:"add",name:"",prompt:""})},[]),w=(0,h.useCallback)(()=>{k&&k.name.trim()&&k.prompt.trim()&&("edit"===k.mode&&k.id?f(d.map(a=>a.id===k.id?{...a,name:k.name.trim(),prompt:k.prompt}:a)):f([...d,{id:`custom-${(0,Y.nanoid)(8)}`,name:k.name.trim(),prompt:k.prompt,enabled:!0}]),l(null))},[k,d,f]),x=(0,h.useCallback)(()=>{j(),n(!1)},[j]),y=(0,h.useCallback)(a=>{let{active:c,over:d}=a;if(!d||c.id===d.id)return;let e=b.findIndex(a=>a.id===c.id),f=b.findIndex(a=>a.id===d.id);-1===e||-1===f||g((0,$.arrayMove)(b,e,f).map(a=>a.id))},[b,g]),z=!!k&&k.name.trim().length>0&&k.prompt.trim().length>0;return(0,c.jsxs)("div",{className:"space-y-6",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,c.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("itemsSection")}),b.length>0&&(0,c.jsx)(Z.DndContext,{sensors:q,collisionDetection:Z.closestCenter,modifiers:[al.restrictToVerticalAxis],onDragEnd:y,children:(0,c.jsx)($.SortableContext,{items:b.map(a=>a.id),strategy:$.verticalListSortingStrategy,children:(0,c.jsx)("div",{className:"overflow-hidden rounded-lg border",children:b.map(a=>a.id.startsWith("builtin-")?(0,c.jsx)(am,{prompt:a,onToggle:r},a.id):(0,c.jsx)(an,{prompt:a,onEdit:u,onDelete:s,onToggle:r},a.id))})})}),k&&(0,c.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,c.jsx)("p",{className:"text-sm font-medium",children:a("add"===k.mode?"addPrompt":"editPrompt")}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("label",{className:"text-xs text-muted-foreground",children:a("nameLabel")}),(0,c.jsx)(ag.Input,{value:k.name,onChange:a=>l({...k,name:a.target.value}),placeholder:a("namePlaceholder"),autoFocus:!0})]}),(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("label",{className:"text-xs text-muted-foreground",children:a("promptLabel")}),(0,c.jsx)(ai.Textarea,{value:k.prompt,onChange:a=>l({...k,prompt:a.target.value}),placeholder:a("promptPlaceholder"),rows:3})]}),(0,c.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,c.jsx)(af.Button,{variant:"outline",size:"sm",onClick:()=>l(null),children:a("cancel")}),(0,c.jsx)(af.Button,{size:"sm",onClick:w,disabled:!z,children:a("save")})]})]}),!k&&(0,c.jsxs)(af.Button,{variant:"outline",size:"sm",onClick:v,children:[(0,c.jsx)(ac.Plus,{className:"mr-1 h-3.5 w-3.5"}),a("addButton")]})]}),(0,c.jsxs)(af.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>n(!0),children:[(0,c.jsx)(ad.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),a("resetToDefault")]}),(0,c.jsx)(aj.AlertDialog,{open:!!o,onOpenChange:a=>!a&&p(null),children:(0,c.jsxs)(aj.AlertDialogContent,{children:[(0,c.jsxs)(aj.AlertDialogHeader,{children:[(0,c.jsx)(aj.AlertDialogTitle,{children:a("deleteTitle")}),(0,c.jsx)(aj.AlertDialogDescription,{children:a("deleteDescription")})]}),(0,c.jsxs)(aj.AlertDialogFooter,{children:[(0,c.jsx)(aj.AlertDialogCancel,{children:a("deleteCancel")}),(0,c.jsx)(aj.AlertDialogAction,{onClick:t,children:a("deleteConfirm")})]})]})}),(0,c.jsx)(aj.AlertDialog,{open:m,onOpenChange:n,children:(0,c.jsxs)(aj.AlertDialogContent,{children:[(0,c.jsxs)(aj.AlertDialogHeader,{children:[(0,c.jsx)(aj.AlertDialogTitle,{children:a("resetTitle")}),(0,c.jsx)(aj.AlertDialogDescription,{children:a("resetDescription")})]}),(0,c.jsxs)(aj.AlertDialogFooter,{children:[(0,c.jsx)(aj.AlertDialogCancel,{children:a("resetCancel")}),(0,c.jsx)(aj.AlertDialogAction,{onClick:x,children:a("resetConfirm")})]})]})})]})}],624629)},380028,a=>{"use strict";var b=a.i(508171),c=a.i(548401),d=a.i(127669),e=a.i(113952),f=a.i(510414),g=a.i(740398),h=a.i(133085),i=a.i(721043),j=a.i(96968),k=a.i(412573),l=a.i(559269),m=a.i(513626),n=a.i(916328),o=a.i(997594),p=a.i(648779),q=a.i(999116),r=a.i(676233),s=a.i(561049),t=a.i(990794),u=a.i(284788),v=a.i(89098),w=a.i(765038),x=a.i(641901),y=a.i(958860),z=a.i(146349),A=a.i(342584),B=a.i(134916),C=a.i(273120),D=a.i(921138),E=a.i(113649),F=a.i(882508),G=a.i(386058),H=a.i(215928),I=a.i(146014),J=a.i(359590),K=a.i(396465),L=a.i(721234),M=a.i(112779),N=a.i(366736),O=a.i(253052),P=a.i(397625),Q=a.i(850329),R=a.i(148608),S=a.i(109254),T=a.i(893759),U=a.i(688272),V=a.i(799856),W=a.i(480824),X=a.i(678240),Y=a.i(873594),Z=a.i(130438),$=a.i(912251),_=a.i(409679),aa=a.i(365092),ab=a.i(895159),ac=a.i(624629),ad=a.i(986013),ae=a.i(273529),af=a.i(452751),ag=a.i(764042),ah=a.i(840815),ai=a.i(721381),aj=a.i(753221),ak=a.i(463621),al=a.i(158799),am=a.i(145901);let an=["Globe","Link","ExternalLink","Bookmark","Star","Home","FileText","BarChart3","PieChart","LineChart","Activity","Zap","Terminal","Code","Database","Server","Cloud","Shield","Lock","Key","User","Users","Mail","MessageSquare","Bell","Calendar","Clock","Search","Eye","Camera","Image","Film","Music","Headphones","Mic","Folder","File","Archive","Download","Upload","GitBranch","GitCommit","GitPullRequest","GitFork","Bug","Wrench","Settings","Sliders","Palette","Brush","Map","MapPin","Navigation","Compass","Wifi","Monitor","Smartphone","Tablet","Laptop","Cpu","HardDrive","MemoryStick","CircuitBoard","Radio","Bluetooth","Heart","ThumbsUp","Smile","Coffee","Rocket","Flame","Sun","Moon","Sparkles","Award","Trophy","Target","Flag","Crosshair","Layers","Layout","Grid","List","Table","Kanban","Bot","Brain","Lightbulb","GraduationCap","BookOpen"],ao=({value:a,onChange:c,readonly:f,size:g=16})=>{let h=(0,e.useTranslations)("settings.sidebarItems"),[i,j]=(0,d.useState)(!1),[k,l]=(0,d.useState)(""),m=(0,d.useMemo)(()=>{if(!k.trim())return an;let a=k.toLowerCase();return an.filter(b=>b.toLowerCase().includes(a))},[k]);return f?(0,b.jsx)(am.default,{name:a,className:"shrink-0 text-muted-foreground",style:{width:g,height:g}}):(0,b.jsxs)(al.Popover,{open:i,onOpenChange:j,children:[(0,b.jsxs)(al.PopoverTrigger,{className:"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-xs transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,b.jsx)(am.default,{name:a,className:"h-4 w-4"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a})]}),(0,b.jsxs)(al.PopoverContent,{className:"w-72 p-2",align:"start",children:[(0,b.jsx)(M.Input,{placeholder:h("iconSearch"),value:k,onChange:a=>l(a.target.value),className:"mb-2 h-8 text-xs",autoFocus:!0}),(0,b.jsx)("div",{className:"grid max-h-48 grid-cols-8 gap-0.5 overflow-y-auto p-1",children:m.map(d=>(0,am.getIcon)(d)?(0,b.jsx)("button",{type:"button",className:(0,V.cn)("flex h-8 w-8 items-center justify-center rounded transition-colors hover:bg-accent",a===d&&"bg-accent ring-1 ring-primary"),onClick:()=>{c?.(d),j(!1),l("")},title:d,children:(0,b.jsx)(am.default,{name:d,className:"h-4 w-4"})},d):null)}),0===m.length&&(0,b.jsx)("p",{className:"py-4 text-center text-xs text-muted-foreground",children:h("iconNotFound")})]})]})};var ap=a.i(658269);let aq=({item:a,onEdit:c,onDelete:d,onToggle:e})=>{let{attributes:f,listeners:g,setNodeRef:h,setActivatorNodeRef:i,transform:j,transition:k,isDragging:l}=(0,af.useSortable)({id:a.id}),m={transform:ag.CSS.Translate.toString(j),transition:k,zIndex:l?1:void 0,position:l?"relative":void 0};return(0,b.jsxs)("div",{ref:h,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:m,children:[(0,b.jsx)("div",{ref:i,...f,...g,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,b.jsx)(ah.GripVertical,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(ao,{value:a.icon,readonly:!0,size:14}),(0,b.jsx)("p",{className:"text-sm font-medium",children:a.name})]}),(0,b.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.url})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,b.jsx)(K.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>c(a),children:(0,b.jsx)(ai.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(K.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>d(a.id),children:(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(N.Switch,{checked:a.enabled,onCheckedChange:b=>e(a.id,b)})]})]})},ar=({item:a,onToggle:c})=>{let{attributes:d,listeners:e,setNodeRef:f,setActivatorNodeRef:g,transform:h,transition:i,isDragging:j}=(0,af.useSortable)({id:a.id}),k={transform:ag.CSS.Translate.toString(h),transition:i,zIndex:j?1:void 0,position:j?"relative":void 0};return(0,b.jsxs)("div",{ref:f,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:k,children:[(0,b.jsx)("div",{ref:g,...d,...e,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,b.jsx)(ah.GripVertical,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(ao,{value:a.icon,readonly:!0,size:14}),(0,b.jsx)("p",{className:"text-sm font-medium",children:a.name})]}),(0,b.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:a.url})]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center",children:(0,b.jsx)(N.Switch,{checked:a.enabled,onCheckedChange:b=>c(a.id,b)})})]})},as=()=>{let a=(0,e.useTranslations)("settings.sidebarItems"),{allOrderedItems:c,customItems:f,toggleBuiltin:g,saveCustom:h,saveOrder:i,deleteItem:j,resetAll:k}=(0,ak.default)(),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(null),r=(0,ae.useSensors)((0,ae.useSensor)(ae.PointerSensor,{activationConstraint:{distance:5}})),s=(0,d.useCallback)((a,b)=>{a.startsWith("builtin-")?g(a,b):h(f.map(c=>c.id===a?{...c,enabled:b}:c))},[f,g,h]),t=(0,d.useCallback)(a=>{q(a)},[]),u=(0,d.useCallback)(()=>{p&&(j(p),q(null))},[p,j]),v=(0,d.useCallback)(a=>{m({mode:"edit",id:a.id,name:a.name,icon:a.icon,url:a.url})},[]),w=(0,d.useCallback)(()=>{m({mode:"add",name:"",icon:"Globe",url:""})},[]),x=(0,d.useCallback)(()=>{l&&l.name.trim()&&l.url.trim()&&("edit"===l.mode&&l.id?h(f.map(a=>a.id===l.id?{...a,name:l.name.trim(),icon:l.icon,url:l.url.trim()}:a)):h([...f,{id:`custom-${(0,ad.nanoid)(8)}`,name:l.name.trim(),icon:l.icon,url:l.url.trim(),enabled:!0}]),m(null))},[l,f,h]),y=(0,d.useCallback)(()=>{k(),o(!1)},[k]),z=(0,d.useCallback)(a=>{let{active:b,over:d}=a;if(!d||b.id===d.id)return;let e=c.findIndex(a=>a.id===b.id),f=c.findIndex(a=>a.id===d.id);-1===e||-1===f||i((0,af.arrayMove)(c,e,f).map(a=>a.id))},[c,i]),A=!!l&&l.name.trim().length>0&&l.url.trim().length>0;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("itemsSection")}),c.length>0&&(0,b.jsx)(ae.DndContext,{sensors:r,collisionDetection:ae.closestCenter,modifiers:[ap.restrictToVerticalAxis],onDragEnd:z,children:(0,b.jsx)(af.SortableContext,{items:c.map(a=>a.id),strategy:af.verticalListSortingStrategy,children:(0,b.jsx)("div",{className:"overflow-hidden rounded-lg border",children:c.map(a=>a.id.startsWith("builtin-")?(0,b.jsx)(ar,{item:a,onToggle:s},a.id):(0,b.jsx)(aq,{item:a,onEdit:v,onDelete:t,onToggle:s},a.id))})})}),l&&(0,b.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(ao,{value:l.icon,onChange:a=>m({...l,icon:a})}),(0,b.jsx)(M.Input,{value:l.name,onChange:a=>m({...l,name:a.target.value}),placeholder:a("namePlaceholder"),autoFocus:!0})]}),(0,b.jsx)(M.Input,{value:l.url,onChange:a=>m({...l,url:a.target.value}),placeholder:a("urlPlaceholder")}),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(K.Button,{variant:"outline",size:"sm",onClick:()=>m(null),children:a("cancel")}),(0,b.jsx)(K.Button,{size:"sm",onClick:x,disabled:!A,children:a("save")})]})]}),!l&&(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",onClick:w,children:[(0,b.jsx)(aj.Plus,{className:"mr-1 h-3.5 w-3.5"}),a("addButton")]})]}),(0,b.jsxs)(K.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>o(!0),children:[(0,b.jsx)(C.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),a("resetToDefault")]}),(0,b.jsx)(T.AlertDialog,{open:!!p,onOpenChange:a=>!a&&q(null),children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("deleteTitle")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("deleteDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:a("deleteCancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:u,children:a("deleteConfirm")})]})]})}),(0,b.jsx)(T.AlertDialog,{open:n,onOpenChange:o,children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("resetTitle")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("resetDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:a("resetCancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:y,children:a("resetConfirm")})]})]})})]})};var at=a.i(473446),au=a.i(520562),av=a.i(987441),aw=a.i(790048),ax=a.i(313355),ay=a.i(317118),az=a.i(581228),aA=a.i(466180);let aB=({text:a})=>{let[c,e]=(0,d.useState)(!1),f=async()=>{await (0,aA.copyToClipboard)(a)&&(e(!0),setTimeout(()=>e(!1),1500))};return(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:f,children:c?(0,b.jsx)(at.Check,{className:"h-3 w-3 text-positive"}):(0,b.jsx)(au.Copy,{className:"h-3 w-3"})})},aC=()=>{let a=(0,e.useTranslations)("settings.tailscale");return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,b.jsx)(ay.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("notInstalled")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("notInstalledDescription")})]})]}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentMac")}),(0,b.jsx)("p",{children:"brew install tailscale"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentMacAppStore")}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentLinux")}),(0,b.jsx)("p",{children:"curl -fsSL https://tailscale.com/install.sh | sh"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentAfterInstall")}),(0,b.jsx)("p",{children:"tailscale up"})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("installGuide",{link:a=>(0,b.jsxs)("a",{href:"https://tailscale.com/download",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline hover:text-foreground",children:[a,(0,b.jsx)(av.ExternalLink,{className:"h-3 w-3"})]})})})]})},aD=()=>{let a=(0,e.useTranslations)("settings.tailscale"),[c,g]=(0,d.useState)(null),[h,j]=(0,d.useState)(!0),[k,l]=(0,d.useState)(null),m=(0,d.useCallback)(async()=>{try{let a=await fetch("/api/tailscale/status");if(!a.ok)throw Error();let b=await a.json();g(b)}catch{g(null)}finally{j(!1)}},[]);(0,d.useEffect)(()=>{m()},[m]);let n=async b=>{l(`remove-${b}`);try{let c=await fetch("/api/tailscale/serve",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({httpsPort:b})});if(!c.ok){let b=await c.json();throw Error(b.error||a("removeFailed"))}f.toast.success(a("removedToast",{httpsPort:b})),await m()}catch(b){f.toast.error(b instanceof Error?b.message:a("removeFailed"))}finally{l(null)}};if(h)return(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(az.default,{className:"h-4 w-4 text-muted-foreground"})});if(!c||!c.installed)return(0,b.jsx)(aC,{});if(!c.running)return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,b.jsx)(ay.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("notRunning")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("notRunningDescription")})]})]}),(0,b.jsx)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:(0,b.jsx)("p",{children:"tailscale up"})})]});let o=c.serveEntries,p=c.serverPort,q=8022!==p;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("deviceInfo")}),(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{j(!0),m()},children:(0,b.jsx)(ax.RefreshCw,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"rounded-md border p-3 text-sm",children:(0,b.jsxs)("div",{className:"grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-1.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:a("host")}),(0,b.jsx)("span",{className:"font-mono text-xs",children:c.hostname}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"DNS"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-mono text-xs",children:c.dnsName}),c.dnsName&&(0,b.jsx)(aB,{text:c.dnsName})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"IP"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-mono text-xs",children:c.tailscaleIp}),c.tailscaleIp&&(0,b.jsx)(aB,{text:c.tailscaleIp})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:a("version")}),(0,b.jsx)("span",{className:"font-mono text-xs",children:c.version})]})})]}),q&&(0,b.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-accent-color/30 bg-accent-color/5 p-4",children:[(0,b.jsx)(aw.Info,{className:"mt-0.5 h-5 w-5 shrink-0 text-accent-color"}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("nonDefaultPortTitle",{port:p})}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("nonDefaultPortDescription",{defaultPort:8022,currentPort:p,restartAction:i.default?a("appRestart"):a("serverRestart")})}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentFixedPort",{port:8022})}),(0,b.jsxs)("p",{children:["PORT=",8022," purplemux"]}),(0,b.jsx)("p",{className:"mt-1.5 text-muted-foreground/60",children:a("commentOrTerminate",{port:8022})})]})]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("serveStatus")}),0===o.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("noActiveServe")}):(0,b.jsx)("div",{className:"rounded-md border",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b text-muted-foreground",children:[(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("httpsPort")}),(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("proxyTarget")}),(0,b.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:a("url")}),(0,b.jsx)("th",{className:"w-10 px-3 py-2"})]})}),(0,b.jsx)("tbody",{children:o.map(a=>{let d="443"===a.httpsPort?`https://${c.dnsName}`:`https://${c.dnsName}:${a.httpsPort}`;return(0,b.jsxs)("tr",{className:"border-b last:border-b-0",children:[(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:a.httpsPort}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:a.proxy}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs underline hover:text-foreground",children:d}),(0,b.jsx)(aB,{text:d})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",disabled:null!==k,onClick:()=>n(a.httpsPort),children:k===`remove-${a.httpsPort}`?(0,b.jsx)(az.default,{className:"h-3 w-3"}):(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})})})]},a.httpsPort)})})]})})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("setupGuide")}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:a("commentStep1Install")}),(0,b.jsx)("p",{children:"brew install tailscale"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentStep2Activate")}),(0,b.jsx)("p",{children:"tailscale up"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:a("commentStep3Add")}),(0,b.jsxs)("p",{children:["tailscale serve --bg --https=443 http://localhost:",p]})]})]})]})};var aE=a.i(394284);function aF(){let a=(0,e.useTranslations)("settings.branchName"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.branchNameProvider),h=(0,X.default)(a=>a.branchNamePrompt),i=(0,X.default)(a=>a.setBranchNameSettings),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),n=j??{provider:g,prompt:h},o=(0,aE.isValidBranchNamePrompt)(n.prompt),p=async()=>{m(!0);try{await i(n.provider,n.prompt),k(null),f.toast.success(c("saved"))}catch(a){f.toast.error(c("error"),{description:a instanceof Error?a.message:String(a)})}finally{m(!1)}};return(0,b.jsxs)("fieldset",{disabled:l,className:"space-y-3",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[a("agent"),(0,b.jsxs)("select",{className:"rounded-md border bg-background p-2",value:n.provider,"aria-describedby":"branch-name-provider-help",onChange:a=>k({...n,provider:a.target.value}),children:[(0,b.jsx)("option",{value:"claude",children:"Claude Code"}),(0,b.jsx)("option",{value:"codex",disabled:!0,children:"Codex CLI"})]})]}),(0,b.jsx)("p",{id:"branch-name-provider-help",className:"rounded-md border bg-muted/50 p-3 text-sm text-muted-foreground",children:a("codexUnavailable")}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[a("prompt"),(0,b.jsx)("textarea",{className:"min-h-48 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:n.prompt,maxLength:1e4,spellCheck:!1,"aria-invalid":!o,"aria-describedby":"branch-name-variables",onChange:a=>k({...n,prompt:a.target.value})})]}),(0,b.jsx)("p",{id:"branch-name-variables",className:"text-xs text-muted-foreground",children:a("variables")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:aE.BRANCH_NAME_VARIABLES.map(a=>(0,b.jsx)(K.Button,{type:"button",size:"sm",variant:"outline",onClick:()=>k({...n,prompt:`${n.prompt}{{${a}}}`}),children:`{{${a}}}`},a))}),!o&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:a("invalid")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(K.Button,{type:"button",onClick:()=>void p(),disabled:l||"codex"===n.provider||!o||n.provider===g&&n.prompt===h,children:l?c("loading"):c("save")}),(0,b.jsx)(K.Button,{type:"button",variant:"outline",onClick:()=>k({...n,prompt:aE.DEFAULT_BRANCH_NAME_PROMPT}),children:a("reset")})]})]})}var aG=a.i(520687);function aH({promptKey:a}){let c=(0,e.useTranslations)("settings.gitGenerationPrompts"),g=(0,e.useTranslations)("common"),h=(0,X.default)(b=>b[a]),i=(0,X.default)(a=>a.setGitGenerationPrompt),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),n=j??h,o=(0,aG.isValidGitGenerationPrompt)(a,n),p=aG.GIT_GENERATION_PROMPTS[a],q=async()=>{if(!l&&o){m(!0);try{await i(a,n),k(null),f.toast.success(g("saved"))}catch(a){f.toast.error(g("error"),{description:a instanceof Error?a.message:String(a)})}finally{m(!1)}}};return(0,b.jsxs)("fieldset",{disabled:l,className:"space-y-3",children:[(0,b.jsx)("legend",{className:"text-sm font-medium",children:c(`${a}.title`)}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:c(`${a}.description`)}),(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[c("prompt"),(0,b.jsx)("textarea",{className:"min-h-40 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:n,maxLength:1e4,spellCheck:!1,"aria-invalid":!o,"aria-describedby":`${a}-variables`,onChange:a=>k(a.target.value)})]}),(0,b.jsx)("p",{id:`${a}-variables`,className:"text-xs text-muted-foreground",children:c("variables")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:p.variables.map(a=>(0,b.jsx)(K.Button,{type:"button",size:"sm",variant:"outline",disabled:n.length+a.length+4>1e4,onClick:()=>k(`${n}{{${a}}}`),children:`{{${a}}}`},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:c("evidenceHint")}),!o&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:c("invalid")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(K.Button,{type:"button",onClick:()=>void q(),disabled:l||!o||n===h,children:l?g("loading"):g("save")}),(0,b.jsx)(K.Button,{type:"button",variant:"outline",onClick:()=>k(p.defaultPrompt),children:c("reset")})]})]})}var aI=a.i(190955);let aJ=({provider:a})=>{let c=`${a}-environment`,g=(0,e.useTranslations)("settings.claude"),h=(0,e.useTranslations)("common"),i=(0,X.default)(b=>b[`${a}Environment`]),j=(0,X.default)(b=>"codex"===a?b.setCodexEnvironment:b.setClaudeEnvironment),[k,l]=(0,d.useState)(null),[m,n]=(0,d.useState)(!1),[o,p]=(0,d.useState)(!1),q=(0,aI.formatAgentEnvironment)(i),r=k??q,s=async()=>{let a;try{a=(0,aI.parseAgentEnvironment)(r)}catch{p(!0);return}n(!0);try{await j(a),l(null),f.toast.success(h("saved"))}catch(a){f.toast.error(h("error"),{description:a instanceof Error?a.message:String(a)})}finally{n(!1)}};return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(P.Label,{htmlFor:c,children:g("environmentTitle",{agent:"codex"===a?"Codex":"Claude"})}),(0,b.jsx)("p",{id:`${c}-description`,className:"text-sm text-muted-foreground",children:g("environmentDescription",{agent:"codex"===a?"Codex":"Claude"})}),(0,b.jsx)("textarea",{id:c,"aria-describedby":`${c}-description${o?` ${c}-error`:""}`,"aria-invalid":o,className:"min-h-32 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:r,onChange:a=>{l(a.target.value),p(!1)},placeholder:"HTTP_PROXY=http://127.0.0.1:7890\nHTTPS_PROXY=http://127.0.0.1:7890\nNO_PROXY=localhost,127.0.0.1",spellCheck:!1,autoCapitalize:"off",autoCorrect:"off",disabled:m}),o&&(0,b.jsx)("p",{id:`${c}-error`,role:"alert",className:"text-sm text-destructive",children:g("environmentInvalid")}),(0,b.jsx)(K.Button,{onClick:s,disabled:m||r===q,children:m?h("loading"):h("save")})]})};var aK=a.i(360056);function aL(){let a=(0,e.useTranslations)("settings.browserStorage"),c=(0,e.useTranslations)("common"),[f,g]=(0,d.useState)(!1),[h,i]=(0,d.useState)(!1),[j,k]=(0,d.useState)(!1),l=async()=>{if(!h){i(!0),k(!1);try{await (0,aK.clearBrowserStorage)(),(0,aK.reloadWithFreshPage)()}catch{k(!0),i(!1)}}};return(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")})]}),(0,b.jsx)(K.Button,{variant:"outline",className:"shrink-0",onClick:()=>{k(!1),g(!0)},children:a("action")}),(0,b.jsx)(T.AlertDialog,{open:f,onOpenChange:a=>{h||g(a)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("title")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("confirm")})]}),j&&(0,b.jsx)("p",{role:"alert",className:"text-sm text-ui-red",children:a("failed")}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(K.Button,{variant:"outline",disabled:h,onClick:()=>g(!1),children:c("cancel")}),j&&(0,b.jsx)(K.Button,{variant:"outline",onClick:aK.reloadWithFreshPage,children:a("reload")}),(0,b.jsx)(K.Button,{variant:"destructive",disabled:h,onClick:()=>void l(),children:a(h?"clearing":"action")})]})]})})]})}var aM=a.i(276986),aN=a.i(398544),aO=a.i(770708),aP=a.i(199847),aQ=a.i(941251);let aR="x-purplemux-process-action",aS="/api/system/idle-tabs",aT=async(a,b)=>{let c=await fetch(aS,{method:a,headers:{"Content-Type":"application/json",[aR]:"1"},...void 0===b?{}:{body:JSON.stringify(b)}}),d=await c.json();if(!c.ok)throw Error(d.error??"Idle tab operation failed");return d},aU=({policy:a,onSave:c})=>{let d=(0,e.useTranslations)("settings.idleTabs"),{register:g,handleSubmit:h,control:i,setValue:j,formState:{errors:k,isSubmitting:l,isDirty:m}}=(0,aO.useForm)({resolver:(0,aP.zodResolver)(aQ.idleTabPolicySchema),defaultValues:a}),n=(0,aO.useWatch)({control:i,name:"enabled"}),o=h(async a=>{try{await aT("PATCH",a),await c(),f.toast.success(d("saved"))}catch(a){f.toast.error(a instanceof Error?a.message:d("failed"))}});return(0,b.jsxs)("form",{onSubmit:o,className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("label",{htmlFor:"idle-tabs-enabled",className:"text-sm",children:d("automatic")}),(0,b.jsx)(N.Switch,{id:"idle-tabs-enabled",checked:n,disabled:l,onCheckedChange:a=>j("enabled",a,{shouldDirty:!0})})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{htmlFor:"idle-tabs-minutes",className:"text-xs",children:d("timeout")}),(0,b.jsx)(M.Input,{id:"idle-tabs-minutes",type:"number",min:15,max:10080,step:1,className:"w-36",disabled:l,...g("idleMinutes",{valueAsNumber:!0})})]}),(0,b.jsx)(K.Button,{type:"submit",size:"sm",variant:"outline",disabled:l||!m,children:d("save")})]}),k.idleMinutes&&(0,b.jsx)("p",{role:"alert",className:"text-xs text-negative",children:d("range")})]})},aV=()=>{let a=(0,e.useTranslations)("settings.idleTabs"),c=(0,e.useTranslations)("common"),{data:g,error:h,isValidating:i,mutate:j}=(0,aM.default)(aS,()=>aT("GET"),{refreshInterval:6e4}),[k,l]=(0,d.useState)(null),[m,n]=(0,d.useState)(!1),[o,p]=(0,d.useState)(null),q=async()=>{if(k&&!m){n(!0);try{let a=await aT("POST",{...k,confirmed:!0});p(a),l(null),await j()}catch(b){f.toast.error(b instanceof Error?b.message:a("failed"))}finally{n(!1)}}};return(0,b.jsxs)("section",{className:"space-y-3 rounded-md border p-3","aria-busy":m,children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:a("title")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("description")}),g&&(0,b.jsx)(aU,{policy:g.policy,onSave:j},`${g.policy.enabled}-${g.policy.idleMinutes}`),h&&(0,b.jsxs)("p",{role:"alert",className:"break-words text-sm text-negative",children:[a("failed"),": ",h.message]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:i||m,onClick:()=>void j(),children:a("refresh")}),(0,b.jsx)(K.Button,{size:"sm",disabled:m||!!h||!g?.candidates.length,onClick:()=>{g&&l({policy:{...g.policy},targets:g.candidates.slice(0,100).map(({workspaceId:a,paneId:b,tabId:c,sessionId:d,lastActivityAt:e})=>({workspaceId:a,paneId:b,tabId:c,sessionId:d,lastActivityAt:e}))})},children:a("reclaim")})]}),g&&!h&&!g.candidates.length&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("empty")}),g?.candidates.map(c=>(0,b.jsxs)("div",{className:"space-y-1 border-t pt-2 text-xs",children:[(0,b.jsxs)("p",{className:"break-words",children:[c.workspaceName," · ",c.tabName," · ",c.providerId]}),(0,b.jsx)("p",{className:"break-all text-muted-foreground",children:c.cwd}),(0,b.jsx)("p",{className:"text-muted-foreground",children:a("idleFor",{minutes:Math.floor((Date.now()-c.lastActivityAt)/6e4)})})]},c.tabId)),o&&(0,b.jsxs)("div",{role:"status",className:"space-y-1 text-xs",children:[(0,b.jsx)("p",{children:a("result",{reclaimed:o.reclaimed.length,skipped:o.skipped.length})}),o.skipped.map((a,c)=>(0,b.jsxs)("p",{className:"break-all",children:[a.target.tabId,": ",a.reason]},c))]}),(0,b.jsx)(T.AlertDialog,{open:!!k,onOpenChange:a=>{a||m||l(null)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("confirmTitle",{count:k?.targets.length??0})}),(0,b.jsx)(T.AlertDialogDescription,{children:a("confirmDescription")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{disabled:m,children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{disabled:m,onClick:a=>{a.preventDefault(),q()},children:c("confirm")})]})]})})]})},aW="/api/system/agent-processes",aX=async()=>{let a=await fetch(aW),b=await a.json();if(!a.ok)throw Error(b.error??"Unable to load processes");return b},aY=()=>{let a=(0,e.useTranslations)("settings.processes"),c=(0,e.useTranslations)("common"),{data:g,error:h,isLoading:i,isValidating:j,mutate:k}=(0,aM.default)(aW,aX,{refreshInterval:1e4}),[l,m]=(0,d.useState)(""),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(null),r=async a=>{let b=$.default.getState();await b.fetchWorkspaces(),b.switchWorkspace(a),b.setSettingsDialogOpen(!1)},s=async()=>{if(p&&!n){o(!0);try{let b=await fetch(aW,{method:"POST",headers:{"Content-Type":"application/json",[aR]:"1"},body:JSON.stringify({...p,confirmed:!0})}),c=await b.json();if(!b.ok)throw Error(c.error??a("failed"));f.toast.success(a("stop"===p.action?"stopped":"started")),q(null),await k(),c.workspaceId&&await r(c.workspaceId)}catch(b){f.toast.error(b instanceof Error?b.message:a("failed")),await k()}finally{o(!1)}}},t=l.trim().toLocaleLowerCase(),u=(g?.processes??[]).filter(a=>`${a.providerId} ${a.pid} ${a.cwd??""} ${a.workspaceName??""}`.toLocaleLowerCase().includes(t));return(0,b.jsxs)("div",{className:"space-y-4","aria-busy":n,children:[(0,b.jsx)(aV,{}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("description")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(M.Input,{value:l,onChange:a=>m(a.target.value),placeholder:a("search"),"aria-label":a("search")}),(0,b.jsx)(K.Button,{variant:"outline",size:"icon",disabled:j||n,onClick:()=>void k(),"aria-label":a("refresh"),children:(0,b.jsx)(ax.RefreshCw,{className:j?"h-4 w-4 animate-spin":"h-4 w-4"})})]}),h&&(0,b.jsxs)("p",{role:"alert",className:"break-words text-sm text-negative",children:[a("failed"),": ",h.message]}),i&&(0,b.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:a("loading")}),!i&&!h&&!u.length&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("empty")}),g?.transfers.map(c=>(0,b.jsxs)("div",{className:"space-y-2 rounded-md border p-3",children:[(0,b.jsxs)("p",{className:"text-sm font-medium",children:[a("unfinished")," · ",c.providerId," · PID ",c.pid]}),(0,b.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:[c.workspaceName," · ",c.cwd]}),(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.sessionId}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(K.Button,{size:"sm",disabled:n||!!h,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"adopt"}),children:a("retry")}),(0,b.jsx)(K.Button,{size:"sm",variant:"outline",disabled:n,onClick:()=>void r(c.workspaceId),children:a("open")})]})]},`${c.pid}-${c.startedAt}`)),u.map(c=>(0,b.jsxs)("div",{className:"space-y-2 border-b py-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",children:[(0,b.jsx)("span",{className:"font-medium",children:"claude"===c.providerId?"Claude Code":"Codex"}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:["PID ",c.pid]}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a(c.managed?"managed":"external")})]}),(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.cwd??a("unknownDirectory")}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,aN.default)(c.startedAt).format("YYYY-MM-DD HH:mm:ss"),c.workspaceName&&` \xb7 ${c.workspaceName}`]}),c.session&&(0,b.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:c.session.sessionId}),!c.managed&&!c.session&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a("unavailable")}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[c.workspaceId?(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:n,onClick:()=>void r(c.workspaceId),children:a("open")}):(0,b.jsx)(K.Button,{size:"sm",disabled:n||!!h||!c.cwd||!c.session,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"adopt"}),children:a("adopt")}),(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:n||!!h,onClick:()=>q({pid:c.pid,startedAt:c.startedAt,action:"stop"}),children:a("stop")})]})]},`${c.pid}-${c.startedAt}`)),(0,b.jsx)(T.AlertDialog,{open:null!==p,onOpenChange:a=>{a||n||q(null)},children:(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsxs)(T.AlertDialogTitle,{children:[a(p?.action==="adopt"?"adopt":"stop")," · PID ",p?.pid]}),(0,b.jsx)(T.AlertDialogDescription,{children:a(p?.action==="adopt"?"adoptConfirm":"stopConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{disabled:n,children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{disabled:n,onClick:a=>{a.preventDefault(),s()},children:n?a("working"):c("confirm")})]})]})})]})},aZ=()=>{let a=(0,e.useTranslations)("settings.linuxStartup"),c,g=c?.platform==="linux"&&!!c.canManageDesktopAutostart&&!!c.getDesktopAutostartStatus&&!!c.setDesktopAutostartEnabled,[h,i]=(0,d.useState)(!1),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(!1),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(0),r=(0,d.useCallback)(()=>q(a=>a+1),[]);(0,d.useEffect)(()=>{if(!g||l)return;let a=!1;return(void 0).canManageDesktopAutostart().then(async b=>{if(!a){if(i(b),!b){k(null),o(!1);return}try{let b=await (void 0).getDesktopAutostartStatus();a||(k(b),o(!1))}catch{a||o(!0)}}}).catch(()=>{a||(i(!1),k(null),o(!1))}),window.addEventListener("focus",r),()=>{a=!0,window.removeEventListener("focus",r)}},[g,l,r,p]);let s=async b=>{if(h&&!l){m(!0);try{k(await (void 0).setDesktopAutostartEnabled(b)),o(!1),f.toast.success(a(b?"enabled":"disabled"))}catch{f.toast.error(a("saveFailed"))}finally{m(!1)}}};return g&&h?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"linux-desktop-startup",children:a("title")}),(0,b.jsx)("p",{id:"linux-startup-description",className:"text-sm text-muted-foreground",children:j?.supported===!1?a(j.reason||"packagedOnly"):a("description")})]}),(0,b.jsx)(N.Switch,{id:"linux-desktop-startup","aria-describedby":"linux-startup-description",checked:j?.enabled??!1,onCheckedChange:s,disabled:l||n||!j||!j.supported&&!j.enabled})]}),n&&(0,b.jsxs)("div",{role:"alert",className:"flex flex-wrap items-center gap-2 text-sm text-destructive",children:[a("loadFailed"),(0,b.jsx)(K.Button,{variant:"outline",size:"sm",onClick:r,children:a("retry")})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("serverHint")})]}):null},a$=[{id:"general",labelKey:"general",icon:(0,b.jsx)(D.Settings,{className:"h-4 w-4"})},{id:"appearance",labelKey:"appearance",icon:(0,b.jsx)(B.Palette,{className:"h-4 w-4"})},{id:"terminal",labelKey:"terminal",icon:(0,b.jsx)(F.Terminal,{className:"h-4 w-4"})},{id:"claude",labelKey:"agent",icon:(0,b.jsx)(n.Bot,{className:"h-4 w-4"})},{id:"processes",labelKey:"processes",icon:(0,b.jsx)(x.Monitor,{className:"h-4 w-4"})},{id:"notification",labelKey:"notification",icon:(0,b.jsx)(m.Bell,{className:"h-4 w-4"})},{id:"editor",labelKey:"editor",icon:(0,b.jsx)(r.FolderCode,{className:"h-4 w-4"})},{id:"auth",labelKey:"auth",icon:(0,b.jsx)(w.Lock,{className:"h-4 w-4"})},{id:"tailscale",labelKey:"tailscale",icon:(0,b.jsx)(s.Globe,{className:"h-4 w-4"})},{id:"quick-prompts",labelKey:"quickPrompts",icon:(0,b.jsx)(J.Zap,{className:"h-4 w-4"})},{id:"sidebar-items",labelKey:"sidebarItems",icon:(0,b.jsx)(v.Layout,{className:"h-4 w-4"})},{id:"system",labelKey:"system",icon:(0,b.jsx)(H.Wrench,{className:"h-4 w-4"})}],a_=[{id:"en",label:"English"},{id:"ko",label:"한국어"},{id:"ja",label:"日本語"},{id:"zh-CN",label:"中文(简体)"},{id:"zh-TW",label:"中文(繁體)"},{id:"es",label:"Español"},{id:"fr",label:"Français"},{id:"de",label:"Deutsch"},{id:"pt-BR",label:"Português (BR)"},{id:"ru",label:"Русский"},{id:"tr",label:"Türkçe"}],a0=[{id:"normal",labelKey:"fontSizeNormal"},{id:"large",labelKey:"fontSizeLarge"},{id:"x-large",labelKey:"fontSizeXLarge"}],a1=[{id:"tight",labelKey:"lineSpacingTight"},{id:"normal",labelKey:"lineSpacingNormal"},{id:"relaxed",labelKey:"lineSpacingRelaxed"},{id:"custom",labelKey:"lineSpacingCustom"}],a2=()=>{let a=(0,e.useTranslations)("settings.general"),c=(0,e.useTranslations)("common"),{theme:f,setTheme:i}=(0,g.useTheme)(),j=(0,X.default)(a=>a.locale),k=(0,X.default)(a=>a.setLocale),l=(0,X.default)(a=>a.fontSize),m=(0,X.default)(a=>a.setFontSize),n=(0,X.default)(a=>a.lineHeight),o=(0,X.default)(a=>a.setLineHeight),q=(0,X.default)(a=>a.lineHeightCustom),r=(0,X.default)(a=>a.setLineHeightCustom),s=(0,$.default)(a=>a.setSettingsDialogOpen),[t,v]=(0,d.useState)(null),w=t??String(q),y=(0,$.default)(a=>a.setCheatSheetOpen),A=a=>{i(a),fetch("/api/config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({appTheme:a})}).catch(()=>{}),window.electronAPI&&window.electronAPI.setNativeTheme(a)};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("language")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("languageDescription")})]}),(0,b.jsxs)(U.Select,{items:a_.map(a=>({label:a.label,value:a.id})),value:j,onValueChange:a=>a&&k(a),children:[(0,b.jsx)(U.SelectTrigger,{className:"min-w-[200px]",children:(0,b.jsx)(U.SelectValue,{})}),(0,b.jsx)(U.SelectContent,{children:a_.map(a=>(0,b.jsx)(U.SelectItem,{value:a.id,children:a.label},a.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("theme")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("themeDescription")})]}),(0,b.jsxs)(L.ButtonGroup,{children:[(0,b.jsxs)(K.Button,{variant:"light"===f?"default":"outline",size:"sm",onClick:()=>A("light"),children:[(0,b.jsx)(E.Sun,{className:"h-4 w-4"}),c("light")]}),(0,b.jsxs)(K.Button,{variant:"dark"===f?"default":"outline",size:"sm",onClick:()=>A("dark"),children:[(0,b.jsx)(z.Moon,{className:"h-4 w-4"}),c("dark")]}),(0,b.jsxs)(K.Button,{variant:"system"===f?"default":"outline",size:"sm",onClick:()=>A("system"),children:[(0,b.jsx)(x.Monitor,{className:"h-4 w-4"}),c("system")]})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("fontSize")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("fontSizeDescription")})]}),(0,b.jsx)(L.ButtonGroup,{children:a0.map(c=>(0,b.jsx)(K.Button,{variant:l===c.id?"default":"outline",size:"sm",onClick:()=>m(c.id),children:a(c.labelKey)},c.id))})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("lineSpacing")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("lineSpacingDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:["custom"===n&&(0,b.jsx)(M.Input,{type:"number",min:Y.LINE_HEIGHT_CUSTOM_MIN,max:Y.LINE_HEIGHT_CUSTOM_MAX,step:Y.LINE_HEIGHT_CUSTOM_STEP,value:w,onChange:a=>v(a.target.value),onBlur:()=>{let a=Number(t);if(v(null),!Number.isFinite(a))return;let b=(0,Y.clampCustomLineHeight)(Math.round(100*a)/100);b!==q&&r(b)},onKeyDown:a=>{"Enter"===a.key&&a.target.blur()},className:"h-8 w-20 text-sm","aria-label":a("lineSpacingCustom")}),(0,b.jsx)(L.ButtonGroup,{children:a1.map(c=>(0,b.jsx)(K.Button,{variant:n===c.id?"default":"outline",size:"sm",onClick:()=>o(c.id),children:a(c.labelKey)},c.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("keyboardShortcuts")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("keyboardShortcutsDescription")})]}),(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",onClick:()=>{s(!1),y(!0)},children:[(0,b.jsx)(u.Keyboard,{className:"h-4 w-4"}),a("openShortcuts"),(0,b.jsx)(p.ChevronRight,{className:"h-3.5 w-3.5"})]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("a",{href:"https://github.com/stirp/purplemux-improved/releases",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground/50 hover:text-muted-foreground hover:underline w-fit",children:[h.default.version,"(","8893f42",")"]})]})},a3=[{label:"Surface",vars:["--background","--card","--popover","--muted","--secondary","--accent","--sidebar"]},{label:"Text",vars:["--foreground","--card-foreground","--popover-foreground","--muted-foreground","--secondary-foreground","--accent-foreground","--sidebar-foreground"]},{label:"Interactive",vars:["--primary","--primary-foreground","--destructive"]},{label:"Border",vars:["--border","--input","--ring"]},{label:"Palette",vars:["--ui-blue","--ui-teal","--ui-coral","--ui-amber","--ui-purple","--ui-pink","--ui-green","--ui-gray","--ui-red"]},{label:"Semantic",vars:["--positive","--negative","--accent-color","--brand","--focus-indicator","--claude-active"]}],a4=()=>{let a=(0,e.useTranslations)("settings.appearance"),g=(0,e.useTranslations)("common"),h=(0,X.default)(a=>a.customCSS),i=(0,X.default)(a=>a.setCustomCSS),[j,k]=(0,d.useState)(h),[l,m]=(0,d.useState)(!1);(0,d.useEffect)(()=>{k(h)},[h]);let n=j!==h;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(c.default,{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("customCSS")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("customCSSDescription")})]}),(0,b.jsx)("textarea",{className:"h-56 w-full resize-y rounded-md border border-input bg-muted/30 p-3 font-mono text-xs leading-relaxed text-foreground placeholder:text-muted-foreground/40 focus:border-ring focus:outline-none",placeholder:a("placeholder"),value:j,onChange:a=>k(a.target.value),spellCheck:!1}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)(T.AlertDialog,{children:[(0,b.jsx)(T.AlertDialogTrigger,{render:(0,b.jsx)(K.Button,{variant:"outline",size:"sm",disabled:!h,children:a("reset")})}),(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("reset")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("resetConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:g("cancel")}),(0,b.jsx)(T.AlertDialogAction,{onClick:()=>{k(""),i("")},children:a("reset")})]})]})]}),(0,b.jsx)(K.Button,{size:"sm",disabled:!n,onClick:()=>{i(j),f.toast.success(a("applied"))},children:a("apply")})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>m(!l),children:[(0,b.jsx)(o.ChevronDown,{className:(0,V.cn)("h-3.5 w-3.5 transition-transform",l&&"rotate-180")}),a("availableVariables")]}),l&&(0,b.jsx)("div",{className:"mt-2 space-y-3",children:a3.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"mb-1 text-[11px] font-medium text-muted-foreground",children:a.label}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:a.vars.map(a=>(0,b.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px]",children:a},a))})]},a.label))})]})]})},a5=({list:a,selectedId:c,onSelect:d})=>(0,b.jsx)("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-3",children:a.map(a=>{let e;return(0,b.jsxs)("button",{type:"button",onClick:()=>d(a.id),className:(0,V.cn)("flex flex-col gap-2 rounded-lg border p-3 text-left transition-colors",c===a.id?"border-primary bg-accent":"border-border hover:border-muted-foreground/50"),children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.name}),(0,b.jsx)("div",{className:"flex h-5 items-center gap-1 rounded px-2",style:{backgroundColor:a.colors.background},children:[(e=a.colors).red,e.green,e.yellow,e.blue,e.magenta,e.cyan,e.white].map((a,c)=>(0,b.jsx)("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:a}},c))})]},a.id)})}),a6=["auto","always","never"],a7=()=>{let a=(0,e.useTranslations)("settings.terminal"),c=(0,e.useTranslations)("common"),{mode:d,themeIds:f,setTerminalTheme:g,themes:h}=(0,W.default)(),i=(0,X.default)(a=>a.terminalKeyBar),j=(0,X.default)(a=>a.setTerminalKeyBar),k=h.filter(a=>"dark"===a.variant),l=h.filter(a=>"light"===a.variant);return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("theme")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("themeDescription")})]}),(0,b.jsxs)(R.Tabs,{defaultValue:d,children:[(0,b.jsxs)(R.TabsList,{children:[(0,b.jsx)(R.TabsTrigger,{value:"dark",children:c("dark")}),(0,b.jsx)(R.TabsTrigger,{value:"light",children:c("light")})]}),(0,b.jsx)(R.TabsContent,{value:"dark",className:"mt-3",children:(0,b.jsx)(a5,{list:k,selectedId:f.dark,onSelect:a=>g("dark",a)})}),(0,b.jsx)(R.TabsContent,{value:"light",className:"mt-3",children:(0,b.jsx)(a5,{list:l,selectedId:f.light,onSelect:a=>g("light",a)})})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 border-t pt-6 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("keyBar")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("keyBarDescription")})]}),(0,b.jsx)(L.ButtonGroup,{children:a6.map(c=>(0,b.jsx)(K.Button,{variant:i===c?"default":"outline",size:"sm",onClick:()=>j(c),children:a(`keyBarOptions.${c}`)},c))})]})]})},a8=()=>{let a=(0,e.useTranslations)("settings.editor"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.editorUrl),h=(0,X.default)(a=>a.editorPreset),i=(0,X.default)(a=>a.setEditorUrl),j=(0,X.default)(a=>a.setEditorPreset),[k,l]=(0,d.useState)(g),[m,n]=(0,d.useState)(h),o="vscode-remote"===m,p="code-server"===m||"custom"===m||o,q=m!==h||p&&k.trim()!==g,r=(0,aa.buildEditorUrl)(m,k,"/Users/me/project"),s=()=>{let b=p?k.trim():"";if(o&&!(0,aa.isValidSshHost)(b))return void f.toast.error(a("errorSshHost"));if("code-server"===m&&b)try{let c=new URL(b);if("http:"!==c.protocol&&"https:"!==c.protocol)return void f.toast.error(a("errorHttpRequired"))}catch{f.toast.error(a("errorHttpRequired"));return}"custom"!==m||!b||b.includes("{folder}")||b.includes("{folderEncoded}")?(l(b),i(b),j(m),f.toast.success(c("saved"))):f.toast.error(a("errorCustomTemplate"))};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("preset")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("presetDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:m,onValueChange:a=>n(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:aa.EDITOR_PRESETS.map(c=>(0,b.jsxs)(P.Label,{htmlFor:`editor-preset-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",m===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`editor-preset-${c}`,value:c}),(0,b.jsx)(ab.EditorIcon,{preset:c,className:"h-5 w-5 shrink-0"}),a(`presets.${c}`)]},c))})]}),p&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:o?a("sshHost"):"custom"===m?a("customTemplate"):a("url")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o?a("sshHostDescription"):"custom"===m?a("customTemplateDescription"):a("urlDescription")}),(0,b.jsx)(M.Input,{placeholder:o?"my-server":"custom"===m?"myeditor://open?path={folderEncoded}":"https://example.com:8080",value:k,onChange:a=>l(a.target.value),onKeyDown:a=>{"Enter"===a.key&&s()}}),"code-server"===m&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("urlHelp",{link:a=>(0,b.jsx)("a",{href:"https://github.com/coder/code-server",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:a}),code:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"?folder="})})}),(0,b.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground/60",children:"# Install on macOS"}),(0,b.jsx)("p",{children:"brew install code-server"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# Run"}),(0,b.jsx)("p",{children:"code-server --port 8080"}),(0,b.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# External access via Tailscale (optional)"}),(0,b.jsx)("p",{children:"tailscale serve --bg --https=8443 http://localhost:8080"})]})]}),"custom"===m&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a.rich("customHelp",{folder:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folder}"}),folderEncoded:()=>(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folderEncoded}"})})})]}),!p&&"off"!==m&&(0,b.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:a("localIdeHint")}),"off"===m&&(0,b.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:a("offHint")}),r&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:a("preview")}),(0,b.jsx)("code",{className:"block break-all rounded-md bg-muted p-2 font-mono text-xs",children:r})]}),(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsx)(K.Button,{disabled:!q,onClick:s,children:c("save")})})]})},a9=()=>{let a=(0,e.useTranslations)("settings.claude"),c=(0,X.default)(a=>a.dangerouslySkipPermissions),d=(0,X.default)(a=>a.setDangerouslySkipPermissions),f=(0,X.default)(a=>a.claudeShowTerminal),g=(0,X.default)(a=>a.setClaudeShowTerminal),h=(0,X.default)(a=>a.gitAskProvider),i=(0,X.default)(a=>a.setGitAskProvider),j=(0,X.default)(a=>a.noteSummaryProvider),k=(0,X.default)(a=>a.setNoteSummaryProvider);return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(aJ,{provider:"claude"}),(0,b.jsx)(aJ,{provider:"codex"}),(0,b.jsx)(aF,{}),(0,b.jsx)(aH,{promptKey:"commitMessagePrompt"}),(0,b.jsx)(aH,{promptKey:"reviewDescriptionPrompt"}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"skip-permissions",className:"text-sm font-medium",children:a("skipPermissions")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("skipPermissionsDescription")}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 text-xs text-muted-foreground",children:[(0,b.jsxs)("span",{children:["Claude: ",(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--dangerously-skip-permissions"})]}),(0,b.jsxs)("span",{children:["Codex: ",(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--yolo"})]})]})]}),(0,b.jsx)(N.Switch,{id:"skip-permissions",checked:c,onCheckedChange:d})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"show-terminal",className:"text-sm font-medium",children:a("showTerminal")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("showTerminalDescription")})]}),(0,b.jsx)(N.Switch,{id:"show-terminal",checked:f,onCheckedChange:g})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("gitAskProvider")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("gitAskProviderDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:h,onValueChange:a=>i(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(c=>(0,b.jsxs)(P.Label,{htmlFor:`git-ask-provider-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",h===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`git-ask-provider-${c}`,value:c}),a(`gitAskProviderOptions.${c}`)]},c))})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("noteSummaryProvider")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("noteSummaryProviderDescription")})]}),(0,b.jsx)(Q.RadioGroup,{value:j,onValueChange:a=>k(a),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(c=>(0,b.jsxs)(P.Label,{htmlFor:`note-summary-provider-${c}`,className:(0,V.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",j===c&&"border-foreground/30 bg-accent"),children:[(0,b.jsx)(Q.RadioGroupItem,{id:`note-summary-provider-${c}`,value:c}),a(`noteSummaryProviderOptions.${c}`)]},c))})]})]})},ba=({value:a,onChange:c,ariaLabel:d})=>{let f=(0,e.useTranslations)("settings.notification"),g=Z.TOAST_POSITIONS.map(a=>({label:f(`positions.${a}`),value:a}));return(0,b.jsxs)(U.Select,{items:g,value:a,onValueChange:a=>a&&c(a),children:[(0,b.jsx)(U.SelectTrigger,{"aria-label":d,className:"min-w-[160px]",children:(0,b.jsx)(U.SelectValue,{})}),(0,b.jsx)(U.SelectContent,{children:g.map(a=>(0,b.jsx)(U.SelectItem,{value:a.value,children:a.label},a.value))})]})},bb=()=>{let a=(0,e.useTranslations)("settings.notification"),c=(0,X.default)(a=>a.notificationsEnabled),g=(0,X.default)(a=>a.setNotificationsEnabled),h=(0,X.default)(a=>a.toastOnCompleteEnabled),i=(0,X.default)(a=>a.setToastOnCompleteEnabled),j=(0,X.default)(a=>a.toastDuration),k=(0,X.default)(a=>a.setToastDuration),l=(0,X.default)(a=>a.toastPositionDesktop),m=(0,X.default)(a=>a.setToastPositionDesktop),n=(0,X.default)(a=>a.toastPositionMobile),o=(0,X.default)(a=>a.setToastPositionMobile),[p,q]=(0,d.useState)(null),r=p??String(Math.round(j/1e3)),[s,t]=(0,d.useState)([]),[u,v]=(0,d.useState)(null),w=(0,d.useCallback)(async()=>{try{let a=await fetch("/api/push/subscribe"),b=await a.json();return Array.isArray(b.devices)?b.devices:[]}catch{return[]}},[]);(0,d.useEffect)(()=>{w().then(t),(0,_.getEndpoint)().then(v)},[w]);let x=async b=>{try{await fetch("/api/push/subscribe",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:b})}),f.toast.success(a("deviceRemoved")),t(await w())}catch{f.toast.error(a("deviceRemoveFailed"))}};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"notifications-enabled",className:"text-sm font-medium",children:a("enable")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("enableDescription")})]}),(0,b.jsx)(N.Switch,{id:"notifications-enabled",checked:c,onCheckedChange:g,disabled:!1})]}),!1,!1]}),s.length>0&&(0,b.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("devicesSection")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("devicesSectionDescription")})]}),(0,b.jsx)("div",{className:"space-y-2",children:s.map(c=>{let d=!!u&&c.endpoint===u;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border px-3 py-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(y.MonitorSmartphone,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"truncate text-sm",children:(a=>{try{let b=new URL(a).host;if(b.includes("apple"))return"Apple";if(b.includes("fcm")||b.includes("google"))return"Chrome / Android";if(b.includes("mozilla"))return"Firefox";if(b.includes("windows")||b.includes("wns"))return"Windows";return b}catch{return"Unknown"}})(c.endpoint)}),d&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:a("deviceThis")})]}),(0,b.jsx)(K.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>x(c.endpoint),"aria-label":a("deviceRemove"),children:(0,b.jsx)(G.Trash2,{className:"h-4 w-4"})})]},c.endpoint)})})]}),(0,b.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastSection")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastSectionDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"toast-enabled",className:"text-sm font-medium",children:a("toastEnable")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastEnableDescription")})]}),(0,b.jsx)(N.Switch,{id:"toast-enabled",checked:h,onCheckedChange:i})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastDuration")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastDurationDescription")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(M.Input,{type:"number",min:1,max:60,step:1,value:r,onChange:a=>q(a.target.value),onBlur:()=>{let a=Number(p);if(q(null),!Number.isFinite(a))return;let b=1e3*Math.min(60,Math.max(1,Math.round(a)));b!==j&&k(b)},onKeyDown:a=>{"Enter"===a.key&&a.target.blur()},disabled:!h,className:"h-8 w-20 text-sm"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:a("toastDurationUnit")})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastPositionDesktop")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastPositionDesktopDescription")})]}),(0,b.jsx)(ba,{value:l,onChange:m,ariaLabel:a("toastPositionDesktop")})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("toastPositionMobile")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("toastPositionMobileDescription")})]}),(0,b.jsx)(ba,{value:n,onChange:o,ariaLabel:a("toastPositionMobile")})]})]})]})},bc=()=>{let a=(0,e.useTranslations)("settings.auth"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.hasAuthPassword),h=(0,X.default)(a=>a.changePassword),[j,k]=(0,d.useState)(""),[l,m]=(0,d.useState)(!1),n=l&&j.trim().length>=4,o=a=>{k(a),m(!0)};return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)(O.Field,{children:[(0,b.jsx)(O.FieldLabel,{htmlFor:"auth-password",children:a("changePassword")}),(0,b.jsx)(O.FieldDescription,{children:a("changePasswordDescription")}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(M.Input,{id:"auth-password",placeholder:g?a("newPasswordPlaceholder"):a("passwordPlaceholder"),value:j,onChange:a=>o(a.target.value)}),(0,b.jsx)(K.Button,{variant:"outline",size:"icon",className:"shrink-0",onClick:()=>{let a;return o((a=new Uint8Array(8),crypto.getRandomValues(a),Array.from(a,a=>a.toString(16).padStart(2,"0")).join("").slice(0,8)))},children:(0,b.jsx)(q.Dices,{className:"h-4 w-4"})})]})]}),(0,b.jsx)(O.FieldDescription,{children:a("resetHint",{action:i.default?a("restartApp"):a("restartServer")})}),(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsx)(K.Button,{disabled:!n,onClick:()=>{h(j.trim()),k(""),m(!1),f.toast.success(a("savedRestart",{action:i.default?a("restartAppAction"):a("restartServerAction")}))},children:c("save")})})]})},bd=()=>{let a=(0,e.useTranslations)("settings.system"),c=(0,e.useTranslations)("common"),g=(0,X.default)(a=>a.systemResourcesEnabled),h=(0,X.default)(a=>a.setSystemResourcesEnabled),j=(0,X.default)(a=>a.networkAccess),k=(0,X.default)(a=>a.setNetworkAccess),m=(0,X.default)(a=>a.hostEnvLocked),n=(0,X.default)(a=>a.bindHostIsLocal),[o,p]=(0,d.useState)(!1),[q,r]=(0,d.useState)(null),[s,u]=(0,d.useState)(!1),v,w=i.default&&v?.platform==="darwin",x=i.default&&w&&"function"==typeof v?.getServerLaunchAgentStatus&&"function"==typeof v?.setServerLaunchAgentEnabled;(0,d.useEffect)(()=>{let a;if(!x)return;if("function"!=typeof a?.getServerLaunchAgentStatus)return;let b=!1;return a.getServerLaunchAgentStatus().then(a=>{b||r(a)}).catch(()=>{b||r({supported:!1,enabled:!1,loaded:!1,stale:!1,path:""})}),()=>{b=!0}},[x]);let y=async b=>{let d;if(x){if("function"==typeof d?.setServerLaunchAgentEnabled){u(!0);try{let c=await d.setServerLaunchAgentEnabled(b);r(c),f.toast.success(b?a("startupEnabled"):a("startupDisabled"))}catch(a){f.toast.error(a instanceof Error?a.message:c("error"))}finally{u(!1)}}}},z=async()=>{p(!0);try{let b=await fetch("/api/uploads/cleanup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"all"})});if(!b.ok)throw Error(`HTTP ${b.status}`);let c=await b.json();c.deleted>0?f.toast.success(a("attachedImagesCleaned",{count:c.deleted})):f.toast.info(a("attachedImagesNothing"))}catch{f.toast.error(c("error"))}finally{p(!1)}},[B,D]=(0,d.useState)(j);(0,d.useEffect)(()=>{D(j)},[j]);let E=B!==j,F=n&&"localhost"!==B;return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)(l.default,{}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsx)(A.Network,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}),(0,b.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("networkAccess")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:m?a("networkAccessLocked"):a("networkAccessDescription")})]})]}),(0,b.jsx)(Q.RadioGroup,{value:B,onValueChange:a=>D(a),disabled:m,className:"gap-2",children:["localhost","tailscale","all"].map(c=>(0,b.jsxs)("label",{htmlFor:`network-access-${c}`,className:"flex cursor-pointer items-start gap-3 rounded-md border bg-background px-3 py-2.5 aria-disabled:cursor-not-allowed aria-disabled:opacity-60","aria-disabled":m||void 0,children:[(0,b.jsx)(Q.RadioGroupItem,{value:c,id:`network-access-${c}`,className:"mt-0.5"}),(0,b.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a(`networkAccessOptions.${c}.label`)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a(`networkAccessOptions.${c}.description`)})]})]},c))}),!m&&(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:F?a("restartRequired"):""}),(0,b.jsx)(K.Button,{size:"sm",onClick:()=>{k(B),f.toast.success(F?a("restartRequired"):c("saved"))},disabled:!E,children:c("save")})]})]}),(0,b.jsx)(aZ,{}),w&&(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"server-startup",className:"text-sm font-medium",children:a("startServerAtLogin")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:q?.supported===!1?a("startServerAtLoginUnsupported"):a("startServerAtLoginDescription")})]}),(0,b.jsx)(N.Switch,{id:"server-startup",checked:!!(q?.enabled||q?.stale),onCheckedChange:y,disabled:!x||s||!q?.supported&&!q?.stale})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)(P.Label,{htmlFor:"system-resources",className:"text-sm font-medium",children:a("showResources")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("showResourcesDescription")})]}),(0,b.jsx)(N.Switch,{id:"system-resources",checked:g,onCheckedChange:h})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsx)(t.ImageIcon,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("attachedImages")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("attachedImagesDescription")})]})]}),(0,b.jsxs)(K.Button,{variant:"outline",size:"sm",className:"gap-1.5 shrink-0",onClick:z,disabled:o,children:[(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"}),a("cleanAttachedImages")]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:a("tmuxReset")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("tmuxResetDescription",{action:i.default?a("restartApp"):a("restartServer")})})]}),(0,b.jsxs)(T.AlertDialog,{children:[(0,b.jsx)(T.AlertDialogTrigger,{render:(0,b.jsxs)(K.Button,{variant:"destructive",size:"sm",className:"gap-1.5 shrink-0",children:[(0,b.jsx)(C.RotateCcw,{className:"h-3.5 w-3.5"}),c("reset")]})}),(0,b.jsxs)(T.AlertDialogContent,{children:[(0,b.jsxs)(T.AlertDialogHeader,{children:[(0,b.jsx)(T.AlertDialogTitle,{children:a("tmuxReset")}),(0,b.jsx)(T.AlertDialogDescription,{children:a("tmuxResetConfirm")})]}),(0,b.jsxs)(T.AlertDialogFooter,{children:[(0,b.jsx)(T.AlertDialogCancel,{children:c("cancel")}),(0,b.jsx)(T.AlertDialogAction,{className:"bg-ui-red hover:bg-ui-red/80",onClick:()=>{window.location.href="/reset"},children:c("reset")})]})]})]})]})]})};a.s(["default",0,({open:a,onOpenChange:c})=>{let f=(0,j.default)(),g=(0,k.default)(a&&f),h=(0,e.useTranslations)("settings"),l=(0,e.useTranslations)("common"),[m,n]=(0,d.useState)("general"),o=a$.find(a=>a.id===m);return(0,b.jsx)(S.Dialog,{open:a,onOpenChange:c,children:(0,b.jsx)(S.DialogContent,{className:"inset-0 top-0 left-0 flex h-dvh w-full max-w-none translate-x-0 translate-y-0 flex-col gap-0 overflow-hidden rounded-none p-0 sm:max-w-none md:inset-auto md:top-1/2 md:left-1/2 md:h-[min(520px,calc(100dvh-2rem))] md:w-[calc(100%-2rem)] md:max-w-3xl md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-xl",style:g,showCloseButton:!1,children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 w-full flex-col overflow-hidden pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)] md:flex-row md:p-0",children:[(0,b.jsxs)("div",{className:"flex shrink-0 flex-col border-b bg-muted/30 px-3 pt-3 pb-0 md:p-3 md:w-48 md:border-b-0 md:border-r",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-center justify-between px-2 md:mb-4",children:[(0,b.jsx)(S.DialogTitle,{className:"text-base font-semibold",children:h("title")}),(0,b.jsxs)(K.Button,{variant:"ghost",size:"icon",onClick:()=>c(!1),className:"h-11 w-11 shrink-0 opacity-70 hover:opacity-100 md:h-6 md:w-6",children:[(0,b.jsx)(I.X,{className:"h-[18px] w-[18px]"}),(0,b.jsx)("span",{className:"sr-only",children:l("close")})]})]}),(0,b.jsx)("nav",{className:"flex min-h-0 gap-1 overflow-x-auto px-1 pb-2 md:flex-col md:overflow-y-auto md:px-0 md:pb-0",children:a$.filter(a=>!a.electronOnly||i.default).map(a=>(0,b.jsxs)(K.Button,{variant:"ghost",onClick:()=>n(a.id),className:(0,V.cn)("min-h-11 shrink-0 justify-start gap-2 whitespace-nowrap px-3 py-2 text-sm font-medium md:min-h-0 md:gap-3",m===a.id?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[a.icon,h(`tabs.${a.labelKey}`)]},a.id))})]}),(0,b.jsxs)("div",{className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto p-4 md:p-6",children:[(0,b.jsx)("h2",{className:"mb-6 text-lg font-semibold",children:o?h(`tabs.${o.labelKey}`):""}),"general"===m&&(0,b.jsx)(a2,{}),"appearance"===m&&(0,b.jsx)(a4,{}),"terminal"===m&&(0,b.jsx)(a7,{}),"notification"===m&&(0,b.jsx)(bb,{}),"editor"===m&&(0,b.jsx)(a8,{}),"claude"===m&&(0,b.jsx)(a9,{}),"processes"===m&&(0,b.jsx)(aY,{}),"auth"===m&&(0,b.jsx)(bc,{}),"tailscale"===m&&(0,b.jsx)(aD,{}),"quick-prompts"===m&&(0,b.jsx)(ac.default,{}),"sidebar-items"===m&&(0,b.jsx)(as,{}),"system"===m&&(0,b.jsx)(bd,{})]})]})})})}],380028)}];
2
2
 
3
3
  //# sourceMappingURL=_0a3w-rg._.js.map