tower-studio 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +47 -47
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +13 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/missions/page/server-reference-manifest.json +57 -57
- package/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +15 -15
- package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
- package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +25 -25
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/settings/page/server-reference-manifest.json +32 -32
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +15 -15
- package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +81 -81
- package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +70 -70
- package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +57 -57
- package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +53 -53
- package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +58 -58
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/page/server-reference-manifest.json +45 -45
- package/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__00~8_qz._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0bvqbq0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0rb-ear._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ze75mm._.js +1 -1
- package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
- package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
- package/.next/server/chunks/project_f_tower_src_lib_10p8sue._.js +1 -1
- package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
- package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0.yn90z._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__13b2wve._.js → [root-of-the-server]__00_.ri0._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_47k-j._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0aidehy._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hiekzn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0jpbiq_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0zaw-fl._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0ai4twk._.js → project_f_tower_006ysi2._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0e3m009._.js → project_f_tower_09re1~6._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0d9_kxc._.js +3 -0
- package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0uu8dha._.js → project_f_tower_0m76uwh._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0-wsdce._.js → project_f_tower_0vfw8sn._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0w01kgd._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0zqkh.-._.js → project_f_tower_13hdtgf._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_src_03-54or._.js → project_f_tower_src_13jw2_q._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +212 -212
- package/.next/static/chunks/09mbyvk8z.wx2.js +1 -0
- package/.next/static/chunks/{187llw593phxu.js → 0a93fdjk-37r7.js} +1 -1
- package/.next/static/chunks/{0cqsk~mfhg.i5.js → 0ejd72g7tekop.js} +1 -1
- package/.next/static/chunks/{0nyip_341~xyg.js → 0j3ixh~tlr2~~.js} +2 -2
- package/.next/static/chunks/0jm.d2tvttdcy.js +1 -0
- package/.next/static/chunks/{0x5iegao~6ge3.js → 0kjm.xm_~nzz0.js} +1 -1
- package/.next/static/chunks/0mf6fqi52ca~q.js +1 -0
- package/.next/static/chunks/0vhwphmq69i0d.js +1 -0
- package/.next/static/chunks/{083e56klgnjgy.js → 0x2z0sza~9erw.js} +1 -1
- package/.next/static/chunks/{0zz4ryeh6j~.x.js → 0x9x7bxnrbi1..js} +1 -1
- package/.next/static/chunks/{037e47w8xw0vw.js → 0~wu849la7jq2.js} +1 -1
- package/.next/static/chunks/{110k271zgqb6h.js → 1068kwso1r._u.js} +1 -1
- package/.next/static/chunks/{0x6gp.e04de4e.js → 14ul.txcdkz4n.js} +1 -1
- package/.next/static/chunks/{0i_v_7f3gdmz4.js → 163-h-672vjtc.js} +1 -1
- package/.next/static/chunks/17b4edxd7wg5~.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0-x7b4t._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0z9azne._.js +0 -3
- package/.next/server/chunks/ssr/project_f_tower_0.nfmle._.js +0 -3
- package/.next/static/chunks/0a8x8yl_kme06.js +0 -1
- package/.next/static/chunks/0j.~gle~mn8uy.js +0 -1
- package/.next/static/chunks/0rt2m4hy13qby.js +0 -1
- package/.next/static/chunks/125_gss3san00.js +0 -1
- package/.next/static/chunks/12wq.0xcxup1q.js +0 -1
- /package/.next/static/{Gxj1QMzOqxH1St959O3yh → EMk0oZpCVYuq8amkRB5za}/_buildManifest.js +0 -0
- /package/.next/static/{Gxj1QMzOqxH1St959O3yh → EMk0oZpCVYuq8amkRB5za}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{Gxj1QMzOqxH1St959O3yh → EMk0oZpCVYuq8amkRB5za}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[790201,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(410756),g=a.i(620235),h=a.i(845924),i=a.i(44585);function j({className:a,size:c="default",...d}){return(0,b.jsx)("div",{"data-slot":"card","data-size":c,className:(0,i.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...d})}function k({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,i.cn)("px-4 group-data-[size=sm]/card:px-3",a),...c})}var l=a.i(109434),m=a.i(858967),n=a.i(54709),o=a.i(236413),p=a.i(57726),q=a.i(891903),r=a.i(584335);function s({adapterType:a,adapterLabel:d,onResult:e}){let[g,h]=(0,c.useState)(!1),[t,u]=(0,c.useState)(null),{t:v}=(0,r.useI18n)();async function w(){if(!g){h(!0),u(null);try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();u(c),e?.(c)}catch{let a={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};u(a),e?.(a)}finally{h(!1)}}}return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,b.jsx)(o.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"font-semibold",children:v("settings.aiTools.cliVerification")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:v("settings.aiTools.cliVerificationDesc")})]})]}),(0,b.jsx)(j,{children:(0,b.jsxs)(k,{className:"p-6 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("div",{children:d&&(0,b.jsx)("p",{className:"font-medium",children:d})}),(0,b.jsx)(f.Button,{onClick:w,disabled:g,variant:"outline",children:g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),v("settings.aiTools.testing")]}):v("settings.aiTools.testConnection")})]}),t&&(0,b.jsxs)("div",{className:(0,i.cn)("rounded-lg border p-4 space-y-3",t.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[t.ok?(0,b.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,b.jsx)(q.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,b.jsx)("span",{className:(0,i.cn)("text-sm font-medium",t.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:v(t.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,b.jsx)("div",{className:"space-y-2",children:t.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[c.passed?(0,b.jsx)(m.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,b.jsx)(n.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,b.jsx)("span",{className:(0,i.cn)(c.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:c.message})]},`${a}-${c.name}`))})]})]})})]})}var t=a.i(879876);let u=(0,t.createServerReference)("40dd38e040cf8559ac131983482f47e49183b3ed40",t.callServer,void 0,t.findSourceMapURL,"completeOnboarding");var v=a.i(484802),w=a.i(302856);let x=(0,w.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"}]]);var y=a.i(61966),z=a.i(769726),A=a.i(506008),B=a.i(248763),C=a.i(470612);let D=(0,w.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),E=(0,w.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var F=a.i(263973),G=a.i(569210);function H({step:a}){let c=[x,o.Terminal,y.GitBranch][a-1]??x,d=["Profile","Connect","Configure"][a-1]??"";return(0,b.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,b.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,b.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,b.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,b.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,b.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,b.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,b.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,b.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,b.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,b.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,b.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,b.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,b.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,b.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,b.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,b.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,b.jsx)(c,{className:"h-7 w-7 text-amber-400"})})}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,b.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:d})})]})}let I={host:"",ownerMatch:"*",localPathTemplate:""};a.s(["default",0,function(){let a,i,j,k=(0,d.useRouter)(),{t:l,locale:n,setLocale:p}=(0,r.useI18n)(),{theme:q,setTheme:t}=(0,e.useTheme)(),[w,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(1),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(null),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)({...I}),[U,V]=(0,c.useState)(!0),[W,X]=(0,c.useState)(0),[Y,Z]=(0,c.useState)(!1),[$,_]=(0,c.useState)(!1);(0,c.useEffect)(()=>J(!0),[]);let aa=[{value:"light",label:(0,b.jsx)(B.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,b.jsx)(C.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,b.jsx)(D,{className:"h-4 w-4"})}];function ab(){L(a=>a+1)}function ac(){L(a=>Math.max(1,a-1))}async function ad(){_(!0);try{Q.length>0&&await (0,v.setConfigValue)("git.pathMappingRules",Q),await u(M.trim()),k.replace("/workspaces")}catch{_(!1)}}let ae=[{icon:x,label:l("onboarding.step1.title")},{icon:o.Terminal,label:l("onboarding.step2.title")},{icon:y.GitBranch,label:l("onboarding.step3.title")}];return(0,b.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,b.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,b.jsx)(H,{step:K})}),(0,b.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,b.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,b.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:ae.map((a,c)=>{let d=c+1,e=d===K,f=d<K,g=a.icon;return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[c>0&&(0,b.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${f?"bg-primary":"bg-border"}`}),(0,b.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${e?"bg-primary text-primary-foreground shadow-sm":f?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[f?(0,b.jsx)(m.Check,{className:"h-3 w-3 shrink-0"}):(0,b.jsx)(g,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{children:a.label})]})]},c)})})]}),(0,b.jsxs)("div",{children:[1===K&&(0,b.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step1.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step1.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:l("onboarding.step1.usernameLabel")}),(0,b.jsx)("input",{id:"onboarding-username",type:"text",value:M,onChange:a=>N(a.target.value),placeholder:l("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(E,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("label",{className:"text-sm font-medium",children:l("settings.language")})]}),(0,b.jsx)(h.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(a=>({value:a.value,label:a.label})),value:n,onChange:a=>p(a)})]}),(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(B.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("label",{className:"text-sm font-medium",children:l("settings.theme")})]}),w?(0,b.jsx)(h.SegmentedControl,{options:aa.map(a=>({value:a.value,label:a.label})),value:q??"system",onChange:a=>t(a)}):(0,b.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,b.jsx)("div",{className:"flex justify-end pt-3",children:(0,b.jsxs)(f.Button,{onClick:ab,disabled:0===M.trim().length,className:"px-5",children:[l("onboarding.step1.next"),(0,b.jsx)(A.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===K&&(0,b.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step2.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step2.desc")})]}),(0,b.jsx)(s,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:P}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,b.jsxs)(f.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ac,children:[(0,b.jsx)(z.ChevronLeft,{className:"h-4 w-4 mr-1"}),l("onboarding.back")]}),(0,b.jsxs)(f.Button,{onClick:ab,disabled:!O?.ok,className:"px-5",children:[l("onboarding.step1.next"),(0,b.jsx)(A.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===K&&(0,b.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step3.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step3.desc")})]}),Q.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:l("onboarding.step3.added").replace("{count}",String(Q.length))}),Q.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("p",{className:"text-sm font-medium truncate",children:[a.host,(0,b.jsx)("span",{className:"text-muted-foreground",children:"*"!==a.ownerMatch?` / ${a.ownerMatch}`:""})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:a.localPathTemplate})]}),(0,b.jsx)(f.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var b;return b=a.id,void R(a=>a.filter(a=>a.id!==b))},children:(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})})]},a.id))]}),U?(0,b.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.hostLabel")}),(0,b.jsx)(g.Input,{value:S.host,onChange:a=>T(b=>({...b,host:a.target.value})),placeholder:l("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.ownerLabel")}),(0,b.jsx)(g.Input,{value:S.ownerMatch,onChange:a=>T(b=>({...b,ownerMatch:a.target.value})),placeholder:l("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.pathLabel")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{value:S.localPathTemplate,onChange:a=>T(b=>({...b,localPathTemplate:a.target.value})),placeholder:l("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>{Z(a=>(a||X(2),!a))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Y?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:l(Y?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),S.localPathTemplate&&(a=S.localPathTemplate.trim().replace(/\/+$/,""),i=Y?`${a}/{path}`:a,j=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1 flex-wrap",children:j.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>X(c),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${W===c?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a.label},c))}),(0,b.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:j[W].url}),(0,b.jsxs)("p",{className:"font-mono text-xs",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-primary",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(i,j[W].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[Q.length>0&&(0,b.jsx)(f.Button,{variant:"ghost",onClick:()=>V(!1),children:l("settings.config.git.cancel")}),(0,b.jsxs)(f.Button,{onClick:function(){if(!S.host.trim()||!S.localPathTemplate.trim())return;let a=S.localPathTemplate.trim().replace(/\/+$/,""),b=Y?`${a}/{path}`:a,c={id:crypto.randomUUID(),host:S.host.trim(),ownerMatch:S.ownerMatch.trim()||"*",localPathTemplate:b,priority:Q.length};R(a=>[...a,c]),T({...I}),Z(!1),V(!1)},disabled:!S.host.trim()||!S.localPathTemplate.trim(),children:[(0,b.jsx)(m.Check,{className:"h-4 w-4 mr-1"}),l("settings.config.git.save")]})]})]}):(0,b.jsxs)(f.Button,{variant:"outline",onClick:()=>{T({...I}),V(!0)},children:[(0,b.jsx)(F.Plus,{className:"h-4 w-4 mr-1"}),l("settings.config.git.addRule")]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,b.jsxs)(f.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ac,children:[(0,b.jsx)(z.ChevronLeft,{className:"h-4 w-4 mr-1"}),l("onboarding.back")]}),(0,b.jsxs)(f.Button,{onClick:ad,disabled:$,className:"px-5",children:[l("onboarding.complete"),(0,b.jsx)(m.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,b.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:l("onboarding.stepIndicator").replace("{current}",String(K)).replace("{total}",String(3))})]})})]})}],790201)}];
|
|
1
|
+
module.exports=[790201,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(410756),g=a.i(620235),h=a.i(845924),i=a.i(44585);function j({className:a,size:c="default",...d}){return(0,b.jsx)("div",{"data-slot":"card","data-size":c,className:(0,i.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...d})}function k({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,i.cn)("px-4 group-data-[size=sm]/card:px-3",a),...c})}var l=a.i(109434),m=a.i(858967),n=a.i(54709),o=a.i(236413),p=a.i(57726),q=a.i(891903),r=a.i(584335);function s({adapterType:a,adapterLabel:d,onResult:e}){let[g,h]=(0,c.useState)(!1),[t,u]=(0,c.useState)(null),{t:v}=(0,r.useI18n)();async function w(){if(!g){h(!0),u(null);try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();u(c),e?.(c)}catch{let a={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};u(a),e?.(a)}finally{h(!1)}}}return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,b.jsx)(o.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"font-semibold",children:v("settings.aiTools.cliVerification")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:v("settings.aiTools.cliVerificationDesc")})]})]}),(0,b.jsx)(j,{children:(0,b.jsxs)(k,{className:"p-6 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("div",{children:d&&(0,b.jsx)("p",{className:"font-medium",children:d})}),(0,b.jsx)(f.Button,{onClick:w,disabled:g,variant:"outline",children:g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),v("settings.aiTools.testing")]}):v("settings.aiTools.testConnection")})]}),t&&(0,b.jsxs)("div",{className:(0,i.cn)("rounded-lg border p-4 space-y-3",t.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[t.ok?(0,b.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,b.jsx)(q.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,b.jsx)("span",{className:(0,i.cn)("text-sm font-medium",t.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:v(t.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,b.jsx)("div",{className:"space-y-2",children:t.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[c.passed?(0,b.jsx)(m.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,b.jsx)(n.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,b.jsx)("span",{className:(0,i.cn)(c.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:c.message})]},`${a}-${c.name}`))})]})]})})]})}var t=a.i(879876);let u=(0,t.createServerReference)("40c64a99851b9cf49554c71b8c97f91c24632d635b",t.callServer,void 0,t.findSourceMapURL,"completeOnboarding");var v=a.i(89402),w=a.i(302856);let x=(0,w.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"}]]);var y=a.i(61966),z=a.i(769726),A=a.i(506008),B=a.i(248763),C=a.i(470612);let D=(0,w.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),E=(0,w.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var F=a.i(263973),G=a.i(569210);function H({step:a}){let c=[x,o.Terminal,y.GitBranch][a-1]??x,d=["Profile","Connect","Configure"][a-1]??"";return(0,b.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,b.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,b.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,b.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,b.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,b.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,b.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,b.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,b.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,b.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,b.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,b.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,b.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,b.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,b.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,b.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,b.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,b.jsx)(c,{className:"h-7 w-7 text-amber-400"})})}),(0,b.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,b.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:d})})]})}let I={host:"",ownerMatch:"*",localPathTemplate:""};a.s(["default",0,function(){let a,i,j,k=(0,d.useRouter)(),{t:l,locale:n,setLocale:p}=(0,r.useI18n)(),{theme:q,setTheme:t}=(0,e.useTheme)(),[w,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(1),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(null),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)({...I}),[U,V]=(0,c.useState)(!0),[W,X]=(0,c.useState)(0),[Y,Z]=(0,c.useState)(!1),[$,_]=(0,c.useState)(!1);(0,c.useEffect)(()=>J(!0),[]);let aa=[{value:"light",label:(0,b.jsx)(B.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,b.jsx)(C.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,b.jsx)(D,{className:"h-4 w-4"})}];function ab(){L(a=>a+1)}function ac(){L(a=>Math.max(1,a-1))}async function ad(){_(!0);try{Q.length>0&&await (0,v.setConfigValue)("git.pathMappingRules",Q),await u(M.trim()),k.replace("/workspaces")}catch{_(!1)}}let ae=[{icon:x,label:l("onboarding.step1.title")},{icon:o.Terminal,label:l("onboarding.step2.title")},{icon:y.GitBranch,label:l("onboarding.step3.title")}];return(0,b.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,b.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,b.jsx)(H,{step:K})}),(0,b.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,b.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,b.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:ae.map((a,c)=>{let d=c+1,e=d===K,f=d<K,g=a.icon;return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[c>0&&(0,b.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${f?"bg-primary":"bg-border"}`}),(0,b.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${e?"bg-primary text-primary-foreground shadow-sm":f?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[f?(0,b.jsx)(m.Check,{className:"h-3 w-3 shrink-0"}):(0,b.jsx)(g,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{children:a.label})]})]},c)})})]}),(0,b.jsxs)("div",{children:[1===K&&(0,b.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step1.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step1.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:l("onboarding.step1.usernameLabel")}),(0,b.jsx)("input",{id:"onboarding-username",type:"text",value:M,onChange:a=>N(a.target.value),placeholder:l("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(E,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("label",{className:"text-sm font-medium",children:l("settings.language")})]}),(0,b.jsx)(h.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(a=>({value:a.value,label:a.label})),value:n,onChange:a=>p(a)})]}),(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(B.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("label",{className:"text-sm font-medium",children:l("settings.theme")})]}),w?(0,b.jsx)(h.SegmentedControl,{options:aa.map(a=>({value:a.value,label:a.label})),value:q??"system",onChange:a=>t(a)}):(0,b.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,b.jsx)("div",{className:"flex justify-end pt-3",children:(0,b.jsxs)(f.Button,{onClick:ab,disabled:0===M.trim().length,className:"px-5",children:[l("onboarding.step1.next"),(0,b.jsx)(A.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===K&&(0,b.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step2.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step2.desc")})]}),(0,b.jsx)(s,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:P}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,b.jsxs)(f.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ac,children:[(0,b.jsx)(z.ChevronLeft,{className:"h-4 w-4 mr-1"}),l("onboarding.back")]}),(0,b.jsxs)(f.Button,{onClick:ab,disabled:!O?.ok,className:"px-5",children:[l("onboarding.step1.next"),(0,b.jsx)(A.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===K&&(0,b.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l("onboarding.step3.title")}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l("onboarding.step3.desc")})]}),Q.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:l("onboarding.step3.added").replace("{count}",String(Q.length))}),Q.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("p",{className:"text-sm font-medium truncate",children:[a.host,(0,b.jsx)("span",{className:"text-muted-foreground",children:"*"!==a.ownerMatch?` / ${a.ownerMatch}`:""})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:a.localPathTemplate})]}),(0,b.jsx)(f.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var b;return b=a.id,void R(a=>a.filter(a=>a.id!==b))},children:(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"})})]},a.id))]}),U?(0,b.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.hostLabel")}),(0,b.jsx)(g.Input,{value:S.host,onChange:a=>T(b=>({...b,host:a.target.value})),placeholder:l("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.ownerLabel")}),(0,b.jsx)(g.Input,{value:S.ownerMatch,onChange:a=>T(b=>({...b,ownerMatch:a.target.value})),placeholder:l("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.pathLabel")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{value:S.localPathTemplate,onChange:a=>T(b=>({...b,localPathTemplate:a.target.value})),placeholder:l("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>{Z(a=>(a||X(2),!a))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Y?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:l(Y?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),S.localPathTemplate&&(a=S.localPathTemplate.trim().replace(/\/+$/,""),i=Y?`${a}/{path}`:a,j=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:l("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1 flex-wrap",children:j.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>X(c),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${W===c?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a.label},c))}),(0,b.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:j[W].url}),(0,b.jsxs)("p",{className:"font-mono text-xs",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-primary",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(i,j[W].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[Q.length>0&&(0,b.jsx)(f.Button,{variant:"ghost",onClick:()=>V(!1),children:l("settings.config.git.cancel")}),(0,b.jsxs)(f.Button,{onClick:function(){if(!S.host.trim()||!S.localPathTemplate.trim())return;let a=S.localPathTemplate.trim().replace(/\/+$/,""),b=Y?`${a}/{path}`:a,c={id:crypto.randomUUID(),host:S.host.trim(),ownerMatch:S.ownerMatch.trim()||"*",localPathTemplate:b,priority:Q.length};R(a=>[...a,c]),T({...I}),Z(!1),V(!1)},disabled:!S.host.trim()||!S.localPathTemplate.trim(),children:[(0,b.jsx)(m.Check,{className:"h-4 w-4 mr-1"}),l("settings.config.git.save")]})]})]}):(0,b.jsxs)(f.Button,{variant:"outline",onClick:()=>{T({...I}),V(!0)},children:[(0,b.jsx)(F.Plus,{className:"h-4 w-4 mr-1"}),l("settings.config.git.addRule")]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,b.jsxs)(f.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ac,children:[(0,b.jsx)(z.ChevronLeft,{className:"h-4 w-4 mr-1"}),l("onboarding.back")]}),(0,b.jsxs)(f.Button,{onClick:ad,disabled:$,className:"px-5",children:[l("onboarding.complete"),(0,b.jsx)(m.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,b.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:l("onboarding.stepIndicator").replace("{current}",String(K)).replace("{total}",String(3))})]})})]})}],790201)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[950004,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(584335),g=a.i(410756),h=a.i(620235),i=a.i(246962),j=a.i(889822),k=a.i(48300),l=a.i(775788),m=a.i(857122),n=a.i(44585),o=a.i(666775),p=a.i(302856);let q=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var r=a.i(161604);let s=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var t=a.i(684262),u=a.i(54709),v=a.i(263973);let w=(0,p.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"}]]);var x=a.i(569210);let y=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),z=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var A=a.i(109434),B=a.i(57726),C=a.i(891903),D=a.i(4909),E=a.i(484802),F=a.i(201834),G=a.i(879876);let H=(0,G.createServerReference)("0076c3307dad87c52e1c8d87ec7b6d68262ade69aa",G.callServer,void 0,G.findSourceMapURL,"getAvailableTerminalApps");var I=a.i(836794);let J=(0,G.createServerReference)("401052d4fb2fae29b3d3544636e4f0efdda8fa4573",G.callServer,void 0,G.findSourceMapURL,"createPrompt"),K=(0,G.createServerReference)("60ac1964aed6de42166f63152f3b24418bb4cb9a9c",G.callServer,void 0,G.findSourceMapURL,"updatePrompt"),L=(0,G.createServerReference)("40b87c29bd3646e2f3c1f29d0ac190c45348a8b4b3",G.callServer,void 0,G.findSourceMapURL,"deletePrompt"),M=(0,G.createServerReference)("60e43be9a9da22429ce1b252c80f1c801268f8602d",G.callServer,void 0,G.findSourceMapURL,"setDefaultPrompt");function N({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,n.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function O({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,n.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let P=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:o.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:q,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:r.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:s,accent:"amber"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:t.Bell,accent:"rose"}],Q={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},R="ai-manager:default-cli-adapter",S=[{type:"claude_local",label:"Claude Code",source:"builtin"}],T={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function U(){let a=(0,d.useRouter)(),{t:o}=(0,f.useI18n)(),{theme:p,setTheme:q}=(0,e.useTheme)(),{locale:r,setLocale:s}=(0,f.useI18n)(),[t,G]=(0,c.useState)("general"),U=(0,c.useRef)(null),[V,W]=(0,c.useState)({left:0,width:0}),[X,Y]=(0,c.useState)(!1),[Z,$]=(0,c.useState)("Terminal"),[_,aa]=(0,c.useState)([]),[ab,ac]=(0,c.useState)(180),[ad,ae]=(0,c.useState)("claude_local"),[af,ag]=(0,c.useState)(null),[ah,ai]=(0,c.useState)({}),[aj,ak]=(0,c.useState)([]),[al,am]=(0,c.useState)(!1),[an,ao]=(0,c.useState)(null),[ap,aq]=(0,c.useState)(null),[ar,as]=(0,c.useState)(""),[at,au]=(0,c.useState)(""),[av,aw]=(0,c.useState)(""),[ax,ay]=(0,c.useState)([]),[az,aA]=(0,c.useState)(null),[aB,aC]=(0,c.useState)({...T}),[aD,aE]=(0,c.useState)(!1),[aF,aG]=(0,c.useState)({...T}),[aH,aI]=(0,c.useState)(!1),[aJ,aK]=(0,c.useState)(0),[aL,aM]=(0,c.useState)(null),[aN,aO]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3}),[aP,aQ]=(0,c.useState)({timeoutSec:30}),[aR,aS]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[aT,aU]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[aV,aW]=(0,c.useState)(null),[aX,aY]=(0,c.useState)(!1),[aZ,a$]=(0,c.useState)(""),[a_,a0]=(0,c.useState)(!0);(0,c.useEffect)(()=>Y(!0),[]),(0,c.useEffect)(()=>{(0,D.getConfigValue)("terminal.app","Terminal").then($),(0,D.getConfigValue)("terminal.idleTimeoutSec",180).then(ac),H().then(aa)},[]),(0,c.useEffect)(()=>{let a=localStorage.getItem(R);a&&ae(a)},[]),(0,c.useEffect)(()=>{(0,I.getPrompts)().then(ak)},[]);let a1=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();aW(b)}}catch{}};async function a2(){await (0,E.setConfigValue)("terminal.app",Z)}async function a3(){let a=Math.max(180,ab);ac(a),await (0,E.setConfigValue)("terminal.idleTimeoutSec",a)}async function a4(a){if(!af){ag(a),ai(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();ai(b=>({...b,[a]:c}))}catch{ai(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ag(null)}}}(0,c.useEffect)(()=>{(0,D.getConfigValue)("git.pathMappingRules",[]).then(ay),(0,D.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{a$(a.join(", "))}),a1(),(0,F.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{aO({maxUploadMb:Math.round((a["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3}),aQ({timeoutSec:a["git.timeoutSec"]??30}),aS({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80}),aU({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{(0,D.getConfigValue)("notification.enabled",!0).then(a0)},[]);let a5=(0,c.useCallback)(()=>{ao(null),as(""),au(""),aw(""),am(!0)},[]),a6=(0,c.useCallback)(a=>{ao(a),as(a.name),au(a.description??""),aw(a.content),am(!0)},[]),a7=(0,c.useCallback)(async()=>{ar.trim()&&av.trim()&&(an?await K(an.id,{name:ar.trim(),description:at.trim()||void 0,content:av.trim()}):await J({name:ar.trim(),description:at.trim()||void 0,content:av.trim()}),am(!1),ak(await (0,I.getPrompts)()),a.refresh())},[ar,at,av,an,a]),a8=(0,c.useCallback)(async()=>{ap&&(await L(ap),aq(null),ak(await (0,I.getPrompts)()),a.refresh())},[ap,a]),a9=(0,c.useCallback)(async b=>{await M(b),ak(await (0,I.getPrompts)()),a.refresh()},[a]),ba=async()=>{await (0,E.setConfigValue)("system.maxUploadBytes",1024*aN.maxUploadMb*1024),await (0,E.setConfigValue)("system.maxConcurrentExecutions",aN.maxConcurrent)},bb=async()=>{await (0,E.setConfigValue)("git.timeoutSec",aP.timeoutSec)},bc=async()=>{await (0,E.setConfigValue)("search.resultLimit",aR.resultLimit),await (0,E.setConfigValue)("search.allModeCap",aR.allModeCap),await (0,E.setConfigValue)("search.debounceMs",aR.debounceMs),await (0,E.setConfigValue)("search.snippetLength",aR.snippetLength)},bd=async()=>{let a=Math.min(aT.minCols,aT.maxCols),b=Math.max(aT.minCols,aT.maxCols),c=Math.min(aT.minRows,aT.maxRows),d=Math.max(aT.minRows,aT.maxRows);aU({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,E.setConfigValue)("missions.grid.minCols",a),await (0,E.setConfigValue)("missions.grid.maxCols",b),await (0,E.setConfigValue)("missions.grid.minRows",c),await (0,E.setConfigValue)("missions.grid.maxRows",d)},be=async()=>{let a=aZ.split(",").map(a=>a.trim()).filter(Boolean);await (0,E.setConfigValue)("hooks.autoUploadTypes",a)},bf=async()=>{if(aV){aY(!0);try{let a=aV.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await a1()}finally{aY(!1)}}},bg=async()=>{if(!aF.host.trim()||!aF.localPathTemplate.trim())return;let a=aF.localPathTemplate.trim().replace(/\/+$/,""),b=aH?`${a}/{path}`:a,c=[...ax,{id:crypto.randomUUID(),host:aF.host.trim(),ownerMatch:aF.ownerMatch.trim()||"*",localPathTemplate:b,priority:aF.priority}];await (0,E.setConfigValue)("git.pathMappingRules",c),ay(c),aG({...T}),aI(!1),aE(!1)},bh=async a=>{if(!aB.host.trim()||!aB.localPathTemplate.trim())return;let b=ax.map(b=>b.id===a?{...b,host:aB.host.trim(),ownerMatch:aB.ownerMatch.trim()||"*",localPathTemplate:aB.localPathTemplate.trim(),priority:aB.priority}:b);await (0,E.setConfigValue)("git.pathMappingRules",b),ay(b),aA(null)},bi=async a=>{let b=ax.filter(b=>b.id!==a);await (0,E.setConfigValue)("git.pathMappingRules",b),ay(b),aM(null)};async function bj(){let a=!a_;a0(a),await (0,E.setConfigValue)("notification.enabled",a)}let bk=(0,c.useCallback)(()=>{a.back()},[a]);(0,c.useEffect)(()=>{let a=U.current;if(!a)return;let b=a.querySelector(`[data-section="${t}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();W({left:d.left-c.left,width:d.width})},[t]);let bl=P.find(a=>a.id===t),bm=bl?Q[bl.accent]:Q.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:o("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o("settings.configDesc")})]}),(0,b.jsxs)(g.Button,{variant:"outline",onClick:bk,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(u.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{ref:U,className:"relative flex gap-1 overflow-x-auto",children:[P.map(a=>{let c=a.icon,d=t===a.id,e=Q[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>G(a.id),className:(0,n.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,n.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:o(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,n.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",bm.indicator),style:{left:V.left,width:V.width}})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[bl&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,n.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",bm.bg,bm.text,bm.ring),children:(0,b.jsx)(bl.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:o(bl.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o(bl.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(t){case"general":let a;return a=[{value:"light",label:o("settings.themeLight")},{value:"dark",label:o("settings.themeDark")},{value:"system",label:o("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(O,{label:o("settings.theme"),description:o("settings.themeDesc"),children:X?(0,b.jsx)(N,{options:a,value:p??"system",onChange:a=>q(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(O,{label:o("settings.language"),description:o("settings.languageDesc"),children:(0,b.jsx)(N,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:r,onChange:a=>s(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsx)("div",{className:"flex items-center justify-between",children:(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.terminal.desc")})]})}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[_.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:_.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{$(a.value),(0,E.setConfigValue)("terminal.app",a.value)},className:(0,n.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",Z===a.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:a.name},a.value))}),(0,b.jsx)("input",{type:"text",value:Z,onChange:a=>$(a.target.value),onBlur:a2,placeholder:o("settings.terminal.placeholder"),className:"h-9 w-64 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/30"})]})]}),(0,b.jsx)(O,{label:o("settings.terminal.idleTimeout"),description:o("settings.terminal.idleTimeoutDesc"),children:(0,b.jsx)("input",{type:"number",value:ab,onChange:a=>ac(Number(a.target.value)),onBlur:a3,min:180,className:"h-9 w-28 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm text-right focus:outline-none focus:ring-2 focus:ring-blue-500/30"})})]});case"ai-tools":return(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:S.map(a=>{let c=ad===a.type,d=af===a.type,e=ah[a.type];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.label}),(0,b.jsx)(k.Badge,{variant:"outline",children:o("label.builtin")}),c&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]}),e&&(0,b.jsx)(k.Badge,{variant:e.ok?"secondary":"destructive",className:(0,n.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.CheckCircle2,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(C.XCircle,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.type})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>{var b;ae(b=a.type),localStorage.setItem(R,b)},children:[(0,b.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),o("settings.prompts.setDefault")]}),(0,b.jsx)(g.Button,{variant:"outline",size:"sm",onClick:()=>a4(a.type),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),o("settings.aiTools.testing")]}):o("settings.aiTools.testConnection")}),"external"===a.source&&(0,b.jsx)(g.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:o("common.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,n.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,n.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.type}-${c.name}`))})})]})},a.type)})});case"prompts":return X?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)(g.Button,{onClick:a5,variant:"default",children:[(0,b.jsx)(v.Plus,{className:"h-4 w-4 mr-2"}),o("settings.prompts.newPrompt")]})}),0===aj.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:o("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:o("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:aj.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.isDefault&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,b.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]})]}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a9(a.id),title:o("settings.prompts.setDefault"),children:(0,b.jsx)(w,{className:(0,n.cn)("h-4 w-4",a.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a6(a),title:o("settings.prompts.editPrompt"),children:(0,b.jsx)(y,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aq(a.id),className:"text-destructive",title:o("settings.prompts.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]},a.id))}),(0,b.jsx)(m.Dialog,{open:al,onOpenChange:am,children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:an?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")}),(0,b.jsx)(m.DialogDescription,{children:an?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-name",children:o("settings.prompts.promptName")}),(0,b.jsx)(h.Input,{id:"prompt-name",value:ar,onChange:a=>as(a.target.value),placeholder:o("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-description",children:o("settings.prompts.promptDescription")}),(0,b.jsx)(h.Input,{id:"prompt-description",value:at,onChange:a=>au(a.target.value),placeholder:o("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-content",children:o("settings.prompts.promptContent")}),(0,b.jsx)(i.Textarea,{id:"prompt-content",value:av,onChange:a=>aw(a.target.value),placeholder:o("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>am(!1),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{onClick:a7,disabled:!ar.trim()||!av.trim(),children:o("settings.prompts.save")})]})]})}),(0,b.jsx)(m.Dialog,{open:!!ap,onOpenChange:a=>!a&&aq(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aq(null),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:a8,children:o("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.git.desc")})]}),(0,b.jsxs)(g.Button,{onClick:()=>{aG({...T}),aE(!0)},children:[(0,b.jsx)(v.Plus,{className:"mr-2 h-4 w-4"}),o("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==ax.length||aD?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ax.map(a=>az===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aB.host,onChange:a=>aC(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aB.ownerMatch,onChange:a=>aC(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1 col-span-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.localPathTemplate")}),(0,b.jsx)(h.Input,{value:aB.localPathTemplate,onChange:a=>aC(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aB.priority,onChange:a=>aC(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aA(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{size:"sm",onClick:()=>bh(a.id),children:o("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(k.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[o("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{aA(a.id),aC({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:a.localPathTemplate,priority:a.priority})},title:o("settings.config.git.edit"),children:(0,b.jsx)(y,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aM(a.id),className:"text-destructive",title:o("settings.config.git.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o("settings.config.git.noRules")})}),aD&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aF.host,onChange:a=>aG(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aF.ownerMatch,onChange:a=>aG(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{value:aF.localPathTemplate,onChange:a=>aG(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>aI(a=>!a),className:(0,n.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",aH?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"{path}"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:aH?o("onboarding.step3.pathHintFull"):o("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aF.priority,onChange:a=>aG(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),aF.localPathTemplate&&(c=aF.localPathTemplate.trim().replace(/\/+$/,""),d=aH?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:o("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>aK(c),className:(0,n.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",aJ===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[aJ].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[aJ].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aE(!1),children:o("settings.config.git.cancel")}),(0,b.jsxs)(g.Button,{size:"sm",onClick:bg,disabled:!aF.host.trim()||!aF.localPathTemplate.trim(),children:[(0,b.jsx)(z,{className:"h-3.5 w-3.5 mr-1.5"}),o("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:1,max:500,value:aN.maxUploadMb,onChange:a=>aO(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aN.maxConcurrent,onChange:a=>aO(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:ba,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:5,max:300,value:aP.timeoutSec,onChange:a=>aQ(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(g.Button,{onClick:bb,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:5,max:100,value:aR.resultLimit,onChange:a=>aS(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:20,value:aR.allModeCap,onChange:a=>aS(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:50,max:1e3,value:aR.debounceMs,onChange:a=>aS(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:20,max:500,value:aR.snippetLength,onChange:a=>aS(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bc,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.minCols,onChange:a=>aU(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.maxCols,onChange:a=>aU(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.minRows,onChange:a=>aU(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.maxRows,onChange:a=>aU(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bd,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(h.Input,{value:aZ,onChange:a=>a$(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(g.Button,{onClick:be,className:"rounded-lg",children:o("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:aV?.installed?o("settings.config.hooks.installed"):o("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.installHint")})]}),(0,b.jsx)(g.Button,{variant:aV?.installed?"destructive":"default",onClick:bf,disabled:aX||!aV,className:"rounded-lg",children:aV?.installed?o("settings.config.hooks.uninstall"):o("settings.config.hooks.install")})]})]}),(0,b.jsx)(m.Dialog,{open:!!aL,onOpenChange:a=>!a&&aM(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.config.git.deleteConfirm")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aM(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:()=>aL&&bi(aL),children:o("settings.config.git.delete")})]})]})})]});case"notifications":return(0,b.jsx)("div",{className:"divide-y divide-border/50",children:(0,b.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.notifications.enableDesc")})]}),(0,b.jsx)(l.Switch,{checked:a_,onCheckedChange:bj})]})})}}()]})})]})}a.s(["default",0,function(){return(0,b.jsx)(U,{})}],950004)}];
|
|
1
|
+
module.exports=[950004,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(584335),g=a.i(410756),h=a.i(620235),i=a.i(246962),j=a.i(889822),k=a.i(48300),l=a.i(775788),m=a.i(857122),n=a.i(44585),o=a.i(666775),p=a.i(302856);let q=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var r=a.i(161604);let s=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var t=a.i(684262),u=a.i(54709),v=a.i(263973);let w=(0,p.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"}]]);var x=a.i(569210);let y=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),z=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var A=a.i(109434),B=a.i(57726),C=a.i(891903),D=a.i(876674),E=a.i(89402),F=a.i(574436),G=a.i(879876);let H=(0,G.createServerReference)("004f1a77e55d8bdf466af93a84f85dd6153e1efab6",G.callServer,void 0,G.findSourceMapURL,"getAvailableTerminalApps");var I=a.i(535606);let J=(0,G.createServerReference)("40bfb3cb79883e2768cea9b1a18d89a01e7b1f8d67",G.callServer,void 0,G.findSourceMapURL,"createPrompt"),K=(0,G.createServerReference)("6025a527a57d3023dac08fb0af1aa2c5520ddf6df5",G.callServer,void 0,G.findSourceMapURL,"updatePrompt"),L=(0,G.createServerReference)("406ebc5ada1c7d97d94766f447fdccc90b49179f6b",G.callServer,void 0,G.findSourceMapURL,"deletePrompt"),M=(0,G.createServerReference)("60535812c2ccdabf1dd33129c66bec4c80008c59d8",G.callServer,void 0,G.findSourceMapURL,"setDefaultPrompt");function N({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,n.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function O({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,n.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let P=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:o.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:q,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:r.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:s,accent:"amber"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:t.Bell,accent:"rose"}],Q={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},R="ai-manager:default-cli-adapter",S=[{type:"claude_local",label:"Claude Code",source:"builtin"}],T={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function U(){let a=(0,d.useRouter)(),{t:o}=(0,f.useI18n)(),{theme:p,setTheme:q}=(0,e.useTheme)(),{locale:r,setLocale:s}=(0,f.useI18n)(),[t,G]=(0,c.useState)("general"),U=(0,c.useRef)(null),[V,W]=(0,c.useState)({left:0,width:0}),[X,Y]=(0,c.useState)(!1),[Z,$]=(0,c.useState)("Terminal"),[_,aa]=(0,c.useState)([]),[ab,ac]=(0,c.useState)(180),[ad,ae]=(0,c.useState)("claude_local"),[af,ag]=(0,c.useState)(null),[ah,ai]=(0,c.useState)({}),[aj,ak]=(0,c.useState)([]),[al,am]=(0,c.useState)(!1),[an,ao]=(0,c.useState)(null),[ap,aq]=(0,c.useState)(null),[ar,as]=(0,c.useState)(""),[at,au]=(0,c.useState)(""),[av,aw]=(0,c.useState)(""),[ax,ay]=(0,c.useState)([]),[az,aA]=(0,c.useState)(null),[aB,aC]=(0,c.useState)({...T}),[aD,aE]=(0,c.useState)(!1),[aF,aG]=(0,c.useState)({...T}),[aH,aI]=(0,c.useState)(!1),[aJ,aK]=(0,c.useState)(0),[aL,aM]=(0,c.useState)(null),[aN,aO]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3}),[aP,aQ]=(0,c.useState)({timeoutSec:30}),[aR,aS]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[aT,aU]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[aV,aW]=(0,c.useState)(null),[aX,aY]=(0,c.useState)(!1),[aZ,a$]=(0,c.useState)(""),[a_,a0]=(0,c.useState)(!0);(0,c.useEffect)(()=>Y(!0),[]),(0,c.useEffect)(()=>{(0,D.getConfigValue)("terminal.app","Terminal").then($),(0,D.getConfigValue)("terminal.idleTimeoutSec",180).then(ac),H().then(aa)},[]),(0,c.useEffect)(()=>{let a=localStorage.getItem(R);a&&ae(a)},[]),(0,c.useEffect)(()=>{(0,I.getPrompts)().then(ak)},[]);let a1=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();aW(b)}}catch{}};async function a2(){await (0,E.setConfigValue)("terminal.app",Z)}async function a3(){let a=Math.max(180,ab);ac(a),await (0,E.setConfigValue)("terminal.idleTimeoutSec",a)}async function a4(a){if(!af){ag(a),ai(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();ai(b=>({...b,[a]:c}))}catch{ai(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ag(null)}}}(0,c.useEffect)(()=>{(0,D.getConfigValue)("git.pathMappingRules",[]).then(ay),(0,D.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{a$(a.join(", "))}),a1(),(0,F.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{aO({maxUploadMb:Math.round((a["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3}),aQ({timeoutSec:a["git.timeoutSec"]??30}),aS({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80}),aU({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{(0,D.getConfigValue)("notification.enabled",!0).then(a0)},[]);let a5=(0,c.useCallback)(()=>{ao(null),as(""),au(""),aw(""),am(!0)},[]),a6=(0,c.useCallback)(a=>{ao(a),as(a.name),au(a.description??""),aw(a.content),am(!0)},[]),a7=(0,c.useCallback)(async()=>{ar.trim()&&av.trim()&&(an?await K(an.id,{name:ar.trim(),description:at.trim()||void 0,content:av.trim()}):await J({name:ar.trim(),description:at.trim()||void 0,content:av.trim()}),am(!1),ak(await (0,I.getPrompts)()),a.refresh())},[ar,at,av,an,a]),a8=(0,c.useCallback)(async()=>{ap&&(await L(ap),aq(null),ak(await (0,I.getPrompts)()),a.refresh())},[ap,a]),a9=(0,c.useCallback)(async b=>{await M(b),ak(await (0,I.getPrompts)()),a.refresh()},[a]),ba=async()=>{await (0,E.setConfigValue)("system.maxUploadBytes",1024*aN.maxUploadMb*1024),await (0,E.setConfigValue)("system.maxConcurrentExecutions",aN.maxConcurrent)},bb=async()=>{await (0,E.setConfigValue)("git.timeoutSec",aP.timeoutSec)},bc=async()=>{await (0,E.setConfigValue)("search.resultLimit",aR.resultLimit),await (0,E.setConfigValue)("search.allModeCap",aR.allModeCap),await (0,E.setConfigValue)("search.debounceMs",aR.debounceMs),await (0,E.setConfigValue)("search.snippetLength",aR.snippetLength)},bd=async()=>{let a=Math.min(aT.minCols,aT.maxCols),b=Math.max(aT.minCols,aT.maxCols),c=Math.min(aT.minRows,aT.maxRows),d=Math.max(aT.minRows,aT.maxRows);aU({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,E.setConfigValue)("missions.grid.minCols",a),await (0,E.setConfigValue)("missions.grid.maxCols",b),await (0,E.setConfigValue)("missions.grid.minRows",c),await (0,E.setConfigValue)("missions.grid.maxRows",d)},be=async()=>{let a=aZ.split(",").map(a=>a.trim()).filter(Boolean);await (0,E.setConfigValue)("hooks.autoUploadTypes",a)},bf=async()=>{if(aV){aY(!0);try{let a=aV.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await a1()}finally{aY(!1)}}},bg=async()=>{if(!aF.host.trim()||!aF.localPathTemplate.trim())return;let a=aF.localPathTemplate.trim().replace(/\/+$/,""),b=aH?`${a}/{path}`:a,c=[...ax,{id:crypto.randomUUID(),host:aF.host.trim(),ownerMatch:aF.ownerMatch.trim()||"*",localPathTemplate:b,priority:aF.priority}];await (0,E.setConfigValue)("git.pathMappingRules",c),ay(c),aG({...T}),aI(!1),aE(!1)},bh=async a=>{if(!aB.host.trim()||!aB.localPathTemplate.trim())return;let b=ax.map(b=>b.id===a?{...b,host:aB.host.trim(),ownerMatch:aB.ownerMatch.trim()||"*",localPathTemplate:aB.localPathTemplate.trim(),priority:aB.priority}:b);await (0,E.setConfigValue)("git.pathMappingRules",b),ay(b),aA(null)},bi=async a=>{let b=ax.filter(b=>b.id!==a);await (0,E.setConfigValue)("git.pathMappingRules",b),ay(b),aM(null)};async function bj(){let a=!a_;a0(a),await (0,E.setConfigValue)("notification.enabled",a)}let bk=(0,c.useCallback)(()=>{a.back()},[a]);(0,c.useEffect)(()=>{let a=U.current;if(!a)return;let b=a.querySelector(`[data-section="${t}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();W({left:d.left-c.left,width:d.width})},[t]);let bl=P.find(a=>a.id===t),bm=bl?Q[bl.accent]:Q.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:o("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o("settings.configDesc")})]}),(0,b.jsxs)(g.Button,{variant:"outline",onClick:bk,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(u.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{ref:U,className:"relative flex gap-1 overflow-x-auto",children:[P.map(a=>{let c=a.icon,d=t===a.id,e=Q[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>G(a.id),className:(0,n.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,n.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:o(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,n.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",bm.indicator),style:{left:V.left,width:V.width}})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[bl&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,n.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",bm.bg,bm.text,bm.ring),children:(0,b.jsx)(bl.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:o(bl.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o(bl.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(t){case"general":let a;return a=[{value:"light",label:o("settings.themeLight")},{value:"dark",label:o("settings.themeDark")},{value:"system",label:o("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(O,{label:o("settings.theme"),description:o("settings.themeDesc"),children:X?(0,b.jsx)(N,{options:a,value:p??"system",onChange:a=>q(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(O,{label:o("settings.language"),description:o("settings.languageDesc"),children:(0,b.jsx)(N,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:r,onChange:a=>s(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsx)("div",{className:"flex items-center justify-between",children:(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.terminal.desc")})]})}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[_.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:_.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{$(a.value),(0,E.setConfigValue)("terminal.app",a.value)},className:(0,n.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",Z===a.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:a.name},a.value))}),(0,b.jsx)("input",{type:"text",value:Z,onChange:a=>$(a.target.value),onBlur:a2,placeholder:o("settings.terminal.placeholder"),className:"h-9 w-64 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/30"})]})]}),(0,b.jsx)(O,{label:o("settings.terminal.idleTimeout"),description:o("settings.terminal.idleTimeoutDesc"),children:(0,b.jsx)("input",{type:"number",value:ab,onChange:a=>ac(Number(a.target.value)),onBlur:a3,min:180,className:"h-9 w-28 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm text-right focus:outline-none focus:ring-2 focus:ring-blue-500/30"})})]});case"ai-tools":return(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:S.map(a=>{let c=ad===a.type,d=af===a.type,e=ah[a.type];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.label}),(0,b.jsx)(k.Badge,{variant:"outline",children:o("label.builtin")}),c&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]}),e&&(0,b.jsx)(k.Badge,{variant:e.ok?"secondary":"destructive",className:(0,n.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.CheckCircle2,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(C.XCircle,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.type})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>{var b;ae(b=a.type),localStorage.setItem(R,b)},children:[(0,b.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),o("settings.prompts.setDefault")]}),(0,b.jsx)(g.Button,{variant:"outline",size:"sm",onClick:()=>a4(a.type),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),o("settings.aiTools.testing")]}):o("settings.aiTools.testConnection")}),"external"===a.source&&(0,b.jsx)(g.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:o("common.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,n.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,n.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.type}-${c.name}`))})})]})},a.type)})});case"prompts":return X?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)(g.Button,{onClick:a5,variant:"default",children:[(0,b.jsx)(v.Plus,{className:"h-4 w-4 mr-2"}),o("settings.prompts.newPrompt")]})}),0===aj.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:o("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:o("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:aj.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.isDefault&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,b.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]})]}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a9(a.id),title:o("settings.prompts.setDefault"),children:(0,b.jsx)(w,{className:(0,n.cn)("h-4 w-4",a.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a6(a),title:o("settings.prompts.editPrompt"),children:(0,b.jsx)(y,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aq(a.id),className:"text-destructive",title:o("settings.prompts.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]},a.id))}),(0,b.jsx)(m.Dialog,{open:al,onOpenChange:am,children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:an?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")}),(0,b.jsx)(m.DialogDescription,{children:an?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-name",children:o("settings.prompts.promptName")}),(0,b.jsx)(h.Input,{id:"prompt-name",value:ar,onChange:a=>as(a.target.value),placeholder:o("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-description",children:o("settings.prompts.promptDescription")}),(0,b.jsx)(h.Input,{id:"prompt-description",value:at,onChange:a=>au(a.target.value),placeholder:o("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-content",children:o("settings.prompts.promptContent")}),(0,b.jsx)(i.Textarea,{id:"prompt-content",value:av,onChange:a=>aw(a.target.value),placeholder:o("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>am(!1),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{onClick:a7,disabled:!ar.trim()||!av.trim(),children:o("settings.prompts.save")})]})]})}),(0,b.jsx)(m.Dialog,{open:!!ap,onOpenChange:a=>!a&&aq(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aq(null),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:a8,children:o("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.git.desc")})]}),(0,b.jsxs)(g.Button,{onClick:()=>{aG({...T}),aE(!0)},children:[(0,b.jsx)(v.Plus,{className:"mr-2 h-4 w-4"}),o("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==ax.length||aD?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ax.map(a=>az===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aB.host,onChange:a=>aC(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aB.ownerMatch,onChange:a=>aC(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1 col-span-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.localPathTemplate")}),(0,b.jsx)(h.Input,{value:aB.localPathTemplate,onChange:a=>aC(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aB.priority,onChange:a=>aC(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aA(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{size:"sm",onClick:()=>bh(a.id),children:o("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(k.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[o("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{aA(a.id),aC({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:a.localPathTemplate,priority:a.priority})},title:o("settings.config.git.edit"),children:(0,b.jsx)(y,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aM(a.id),className:"text-destructive",title:o("settings.config.git.delete"),children:(0,b.jsx)(x.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o("settings.config.git.noRules")})}),aD&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aF.host,onChange:a=>aG(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aF.ownerMatch,onChange:a=>aG(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{value:aF.localPathTemplate,onChange:a=>aG(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>aI(a=>!a),className:(0,n.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",aH?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"{path}"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:aH?o("onboarding.step3.pathHintFull"):o("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aF.priority,onChange:a=>aG(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),aF.localPathTemplate&&(c=aF.localPathTemplate.trim().replace(/\/+$/,""),d=aH?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:o("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>aK(c),className:(0,n.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",aJ===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[aJ].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[aJ].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aE(!1),children:o("settings.config.git.cancel")}),(0,b.jsxs)(g.Button,{size:"sm",onClick:bg,disabled:!aF.host.trim()||!aF.localPathTemplate.trim(),children:[(0,b.jsx)(z,{className:"h-3.5 w-3.5 mr-1.5"}),o("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:1,max:500,value:aN.maxUploadMb,onChange:a=>aO(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aN.maxConcurrent,onChange:a=>aO(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:ba,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:5,max:300,value:aP.timeoutSec,onChange:a=>aQ(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(g.Button,{onClick:bb,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:5,max:100,value:aR.resultLimit,onChange:a=>aS(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:20,value:aR.allModeCap,onChange:a=>aS(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:50,max:1e3,value:aR.debounceMs,onChange:a=>aS(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:20,max:500,value:aR.snippetLength,onChange:a=>aS(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bc,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.minCols,onChange:a=>aU(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.maxCols,onChange:a=>aU(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.minRows,onChange:a=>aU(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aT.maxRows,onChange:a=>aU(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bd,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(h.Input,{value:aZ,onChange:a=>a$(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(g.Button,{onClick:be,className:"rounded-lg",children:o("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:aV?.installed?o("settings.config.hooks.installed"):o("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.installHint")})]}),(0,b.jsx)(g.Button,{variant:aV?.installed?"destructive":"default",onClick:bf,disabled:aX||!aV,className:"rounded-lg",children:aV?.installed?o("settings.config.hooks.uninstall"):o("settings.config.hooks.install")})]})]}),(0,b.jsx)(m.Dialog,{open:!!aL,onOpenChange:a=>!a&&aM(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.config.git.deleteConfirm")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aM(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:()=>aL&&bi(aL),children:o("settings.config.git.delete")})]})]})})]});case"notifications":return(0,b.jsx)("div",{className:"divide-y divide-border/50",children:(0,b.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.notifications.enableDesc")})]}),(0,b.jsx)(l.Switch,{checked:a_,onCheckedChange:bj})]})})}}()]})})]})}a.s(["default",0,function(){return(0,b.jsx)(U,{})}],950004)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=project_f_tower_src_app_settings_page_tsx_0oo06~d._.js.map
|