orcasynth 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/server.js +14 -5
- package/dist/integrations/projectFiles.js +16 -0
- package/dist/integrations/usage/claude.js +7 -7
- package/dist/integrations/usage/codex.js +5 -7
- package/dist/integrations/usage/index.js +2 -8
- package/dist/integrations/usage/walk.js +14 -0
- package/dist/overseer/stuckDetector.js +4 -10
- package/dist/shared/id.js +7 -0
- package/dist/shared/time.js +12 -0
- package/dist/store/cascade.js +24 -0
- package/dist/store/db.js +3 -0
- package/dist/store/projectStore.js +8 -6
- package/dist/store/schema.sql +1 -1
- package/dist/store/taskStore.js +2 -8
- package/package.json +1 -1
- package/web-dist/.next/BUILD_ID +1 -1
- package/web-dist/.next/build-manifest.json +3 -3
- package/web-dist/.next/server/app/_global-error.html +1 -1
- package/web-dist/.next/server/app/_global-error.rsc +1 -1
- package/web-dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web-dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web-dist/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web-dist/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web-dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web-dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/_not-found.html +1 -1
- package/web-dist/.next/server/app/_not-found.rsc +11 -11
- package/web-dist/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/web-dist/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/web-dist/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/web-dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/account/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/account/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/account.html +1 -1
- package/web-dist/.next/server/app/account.rsc +13 -13
- package/web-dist/.next/server/app/account.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/account.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/account.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/account.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/account.segments/account/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/account.segments/account.segment.rsc +3 -3
- package/web-dist/.next/server/app/dash/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/dash/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/dash.html +1 -1
- package/web-dist/.next/server/app/dash.rsc +13 -13
- package/web-dist/.next/server/app/dash.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/dash.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/dash.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/dash.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/dash.segments/dash/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/dash.segments/dash.segment.rsc +3 -3
- package/web-dist/.next/server/app/escalations/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/escalations/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/escalations.html +1 -1
- package/web-dist/.next/server/app/escalations.rsc +13 -13
- package/web-dist/.next/server/app/escalations.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/escalations.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/escalations.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/escalations.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/escalations.segments/escalations/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/escalations.segments/escalations.segment.rsc +3 -3
- package/web-dist/.next/server/app/index.html +1 -1
- package/web-dist/.next/server/app/index.rsc +13 -13
- package/web-dist/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/kanban/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/kanban/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/kanban.html +1 -1
- package/web-dist/.next/server/app/kanban.rsc +13 -13
- package/web-dist/.next/server/app/kanban.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/kanban.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/kanban.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/kanban.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/kanban.segments/kanban/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/kanban.segments/kanban.segment.rsc +3 -3
- package/web-dist/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/onboarding.html +1 -1
- package/web-dist/.next/server/app/onboarding.rsc +13 -13
- package/web-dist/.next/server/app/onboarding.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/onboarding.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/web-dist/.next/server/app/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/projects/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/projects.html +1 -1
- package/web-dist/.next/server/app/projects.rsc +13 -13
- package/web-dist/.next/server/app/projects.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/projects.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/projects.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/projects.segments/projects.segment.rsc +3 -3
- package/web-dist/.next/server/app/sessions/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/sessions.html +1 -1
- package/web-dist/.next/server/app/sessions.rsc +13 -13
- package/web-dist/.next/server/app/sessions.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/sessions.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/sessions.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/sessions.segments/sessions/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/sessions.segments/sessions.segment.rsc +3 -3
- package/web-dist/.next/server/app/settings/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/settings.html +1 -1
- package/web-dist/.next/server/app/settings.rsc +13 -13
- package/web-dist/.next/server/app/settings.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/settings.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/web-dist/.next/server/app/tasks/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/tasks.html +1 -1
- package/web-dist/.next/server/app/tasks.rsc +13 -13
- package/web-dist/.next/server/app/tasks.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/tasks.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/web-dist/.next/server/app/timeline/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/timeline/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/timeline.html +1 -1
- package/web-dist/.next/server/app/timeline.rsc +13 -13
- package/web-dist/.next/server/app/timeline.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/timeline.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/timeline.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/timeline.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/timeline.segments/timeline/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/timeline.segments/timeline.segment.rsc +3 -3
- package/web-dist/.next/server/app/users/page.js.nft.json +1 -1
- package/web-dist/.next/server/app/users/page_client-reference-manifest.js +1 -1
- package/web-dist/.next/server/app/users.html +1 -1
- package/web-dist/.next/server/app/users.rsc +13 -13
- package/web-dist/.next/server/app/users.segments/_full.segment.rsc +13 -13
- package/web-dist/.next/server/app/users.segments/_head.segment.rsc +4 -4
- package/web-dist/.next/server/app/users.segments/_index.segment.rsc +6 -6
- package/web-dist/.next/server/app/users.segments/_tree.segment.rsc +2 -2
- package/web-dist/.next/server/app/users.segments/users/__PAGE__.segment.rsc +4 -4
- package/web-dist/.next/server/app/users.segments/users.segment.rsc +3 -3
- package/web-dist/.next/server/chunks/[root-of-the-server]__0bvp8h1._.js +1 -1
- package/web-dist/.next/server/chunks/[root-of-the-server]__1dgbigm._.js +1 -1
- package/web-dist/.next/server/chunks/[root-of-the-server]__1wxxtv8._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/{[root-of-the-server]__1tooevx._.js → [root-of-the-server]__0i_7o4p._.js} +2 -2
- package/web-dist/.next/server/chunks/ssr/_015zf-4._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_04ezsju._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/_04o_q14._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_057a06r._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_085pshu._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_0tc9z5_._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_0tzourm._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_12jhzvy._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/_136wthy._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/_193-v_i._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/_1heytlk._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/_1mjzb9s._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_1xwktd-._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/_1zscr7t._.js +3 -0
- package/web-dist/.next/server/chunks/ssr/app_dash_page_tsx_12v0wx-._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/app_kanban_page_tsx_06_8oyf._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/app_projects_page_tsx_1w-8z74._.js +3 -3
- package/web-dist/.next/server/chunks/ssr/app_tasks_page_tsx_1p6mxbw._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/app_timeline_page_tsx_0thxir0._.js +1 -1
- package/web-dist/.next/server/chunks/ssr/components_shell_Shell_tsx_1e5c27h._.js +1 -1
- package/web-dist/.next/server/middleware-build-manifest.js +3 -3
- package/web-dist/.next/server/pages/404.html +1 -1
- package/web-dist/.next/server/pages/500.html +1 -1
- package/web-dist/.next/static/chunks/0l1t1fcd-_jj9.js +1 -0
- package/web-dist/.next/static/chunks/11xbsx12drypd.js +1 -0
- package/web-dist/.next/static/chunks/186xbnkxm5iu3.js +1 -0
- package/web-dist/.next/static/chunks/1c_1_ca4-vgc7.js +1 -0
- package/web-dist/.next/static/chunks/{3wo9m5v__3pi2.js → 1f5f3qgbcjv4u.js} +1 -1
- package/web-dist/.next/static/chunks/1t-dast4rat3s.css +2 -0
- package/web-dist/.next/static/chunks/1wsag7zex3h4_.js +1 -0
- package/web-dist/.next/static/chunks/24unfsl4do--1.js +1 -0
- package/web-dist/.next/static/chunks/2bfjq22q8xyfs.js +1 -0
- package/web-dist/.next/static/chunks/2kuzf7llj_291.js +1 -0
- package/web-dist/.next/static/chunks/2pbhzo7fu4xcs.js +11 -0
- package/web-dist/.next/static/chunks/30ztbacooyerd.js +1 -0
- package/web-dist/.next/static/chunks/34bew8owm40fg.js +1 -0
- package/web-dist/.next/static/chunks/3a7pgnw_6io2v.js +1 -0
- package/web-dist/.next/static/chunks/3k-swqzkcvlzm.js +1 -0
- package/web-dist/.next/static/chunks/{0xgdqczv5tvu5.js → 3saus_snl5ri7.js} +1 -1
- package/web-dist/.next/server/chunks/ssr/_09x5h4x._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/_0lctmoh._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/_0zho8fx._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/_1812xdn._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/_1m2qx8p._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/_1w24b42._.js +0 -3
- package/web-dist/.next/server/chunks/ssr/app_sessions_page_tsx_0r1_4_3._.js +0 -3
- package/web-dist/.next/static/chunks/05jfk0-07tiga.js +0 -11
- package/web-dist/.next/static/chunks/0x8sf96sz490-.css +0 -2
- package/web-dist/.next/static/chunks/201p8-_l1h8w8.js +0 -1
- package/web-dist/.next/static/chunks/218i8jnxp91u8.js +0 -1
- package/web-dist/.next/static/chunks/2_uoi0tzglv_7.js +0 -1
- package/web-dist/.next/static/chunks/2ki5va2_5l6d6.js +0 -1
- package/web-dist/.next/static/chunks/2sm_cc2r9sjzp.js +0 -1
- package/web-dist/.next/static/chunks/2xur1zqckjlq3.js +0 -1
- package/web-dist/.next/static/chunks/35babynx5l240.js +0 -1
- package/web-dist/.next/static/chunks/3i0jpc47nxz7y.js +0 -1
- package/web-dist/.next/static/chunks/3soklmhd2y9yp.js +0 -1
- package/web-dist/.next/static/chunks/3ssnuxdh0r51g.js +0 -1
- package/web-dist/.next/static/chunks/3ybvfq13cp-hb.js +0 -1
- package/web-dist/.next/static/chunks/3yqt3l54sr5si.js +0 -1
- /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_buildManifest.js +0 -0
- /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_clientMiddlewareManifest.js +0 -0
- /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[14548,a=>{"use strict";let b=(0,a.i(70106).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"}]]);a.s(["Save",0,b],14548)},71727,a=>{"use strict";let b=(0,a.i(70106).default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);a.s(["Radio",0,b],71727)},17545,a=>{"use strict";let b=(0,a.i(70106).default)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);a.s(["Layers",0,b],17545)},83549,a=>{"use strict";var b=a.i(87924);a.s(["Segmented",0,function({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{role:"radiogroup",className:"flex flex-wrap gap-1.5",children:a.map(a=>{let e=a.value===c,f=a.icon;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":e,"aria-label":a.label,onClick:()=>d(a.value),className:`inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-xs font-medium transition-colors ${e?"border-accent/50 bg-accent/15 text-accent":"border-border bg-elevated text-text-muted hover:border-border-strong hover:text-text"}`,style:{transitionDuration:"var(--motion-fast)"},children:[f?(0,b.jsx)(f,{size:13,"aria-hidden":!0}):null,a.label]},a.value)})})}])},92058,a=>{"use strict";var b=a.i(72131);a.s(["usePersistentState",0,function(a,c,d){let[e,f]=(0,b.useState)(c);return(0,b.useEffect)(()=>{try{let b=localStorage.getItem(a);if(null===b)return;("function"==typeof d?d(b):d.includes(b))&&f(b)}catch{}},[a]),[e,(0,b.useCallback)(b=>{f(b);try{localStorage.setItem(a,b)}catch{}},[a])]}])},66429,a=>{"use strict";a.s(["buildExec",0,function(a,b){let c=b.trim();return"codex"===a?`codex:${c}`:"opencode"===a?c.includes("/")?c:`opencode:${c}`:c.includes("/")?`claude:${c}`:c},"execModel",0,function(a){return a.startsWith("codex:")?a.slice(6):a.startsWith("opencode:")?a.slice(9):a.startsWith("claude:")?a.slice(7):a},"execProvider",0,function(a){return a.startsWith("codex:")?"codex":a.startsWith("opencode:")?"opencode":a.startsWith("claude:")?"claude-code":a.includes("/")?"opencode":"claude-code"}])},97222,a=>{"use strict";var b=a.i(87924);a.s(["ModuleHeader",0,function({title:a,count:c,icon:d,children:e}){return(0,b.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,b.jsx)(d,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,b.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:a}),void 0!==c?(0,b.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:c}):null]}),e?(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:e}):null]})}])},9173,a=>{"use strict";var b=a.i(87924),c=a.i(12466);a.i(28130);var d=a.i(29457);a.s(["EmptyState",0,function({title:a,description:c,icon:d,action:e}){return(0,b.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[d?(0,b.jsx)(d,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:a}),c&&(0,b.jsx)("p",{className:"text-xs text-text-muted",children:c})]}),e]})},"ErrorState",0,function({message:a,onRetry:e}){let{t:f}=(0,d.useTranslation)();return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-accent",children:a}),e&&(0,b.jsx)(c.Button,{onClick:e,children:f.common.retry})]})},"LoadingState",0,function({label:a,variant:c="list"}){let{t:e}=(0,d.useTranslation)();return a?(0,b.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:a}):"cards"===c?(0,b.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4,5].map(a=>(0,b.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,b.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,b.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,b.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},a))}):"kanban"===c?(0,b.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,b.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(a=>(0,b.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},a))]},a))}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":e.common.loading,children:[88,72,80,64].map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,b.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${a}%`}})]},c))})}])},70777,a=>{"use strict";var b=a.i(87924);a.s(["ModuleShell",0,function({moduleId:a,children:c}){return(0,b.jsx)("section",{"data-module":a,className:"module-root flex flex-col gap-4",children:c})}])},34048,a=>{"use strict";var b=a.i(87924);let c={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};a.s(["Badge",0,function({children:a,tone:d="default"}){return(0,b.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${c[d]}`,children:a})}])},88736,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112);a.i(28130);var e=a.i(29457);let f={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};a.s(["Modal",0,function({title:a,onClose:g,children:h,size:i="lg",icon:j,description:k}){let{t:l}=(0,e.useTranslation)(),[m,n]=(0,c.useState)(!1);return((0,c.useEffect)(()=>n(!0),[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&g()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[g]),m)?(0,d.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:g,children:(0,b.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${f[i]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[j?(0,b.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,b.jsx)(j,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:a}),k?(0,b.jsx)("p",{className:"truncate text-xs text-text-muted",children:k}):null]}),(0,b.jsx)("button",{type:"button","aria-label":l.common.close,onClick:g,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:h})]})}),document.body):null},"ModalBody",0,function({children:a,gap:c=5}){return(0,b.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===c?"gap-4":6===c?"gap-6":"gap-5"}`,children:a})},"ModalFooter",0,function({children:a}){return(0,b.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:a})}])},81560,a=>{"use strict";let b=(0,a.i(70106).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);a.s(["Trash2",0,b],81560)},99464,a=>{"use strict";let b=(0,a.i(70106).default)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",0,b],99464)},73570,a=>{"use strict";var b=a.i(83604);a.s(["AlertTriangle",()=>b.default])},53876,a=>{"use strict";var b=a.i(87924);a.s(["Field",0,function({label:a,htmlFor:c,children:d,hint:e}){return(0,b.jsxs)("label",{htmlFor:c,className:"flex flex-col gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:a}),d,e?(0,b.jsx)("span",{className:"text-xs text-text-muted",children:e}):null]})}])},68522,a=>{"use strict";let b=[{label:"GLM 5.2",exec:"ollama-cloud/glm-5.2"},{label:"GPT 5.5",exec:"codex:gpt-5.5"},{label:"Claude Sonnet 4.5",exec:"sonnet"},{label:"Claude Opus 4.8",exec:"opus"},{label:"DeepSeek V4 Pro",exec:"ollama-cloud/deepseek-v4-pro"},{label:"Kimi k2.7 Code",exec:"ollama/kimi-k2.7-code"},{label:"MiniMax M3",exec:"ollama-cloud/minimax-m3"},{label:"DeepSeek v4 Flash",exec:"ollama-cloud/deepseek-v4-flash"},{label:"MiniMax M2.7",exec:"ollama-cloud/minimax-m2.7"},{label:"GLM 5.1",exec:"ollama-cloud/glm-5.1"},{label:"QWEN 3.5",exec:"ollama-cloud/qwen3.5"}];a.s(["EXEC_PRESETS",0,b,"allModels",0,function(a=[],c=[]){let d=new Set(a.map(a=>a.exec)),e=new Set(c);return[...b.filter(a=>!d.has(a.exec)&&!e.has(a.exec)),...a]}])},56993,a=>{"use strict";var b=a.i(87924);a.s(["Select",0,function({className:a="",children:c,...d}){let e=a.trim();return(0,b.jsx)("select",{className:`h-9 w-full rounded-md border border-border bg-surface px-3 text-sm text-text transition-colors focus:border-accent focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed${e?` ${e}`:""}`,...d,children:c})}])},69922,a=>{"use strict";let b=(0,a.i(70106).default)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);a.s(["Link2",0,b],69922)},47084,a=>{"use strict";var b=a.i(87924);a.s(["Toggle",0,function({checked:a,onChange:c,label:d,disabled:e=!1}){return(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a,"aria-label":d,disabled:e,onClick:()=>!e&&c(!a),className:`inline-flex h-5 w-9 items-center border border-border px-0.5 transition-colors ${a?"bg-accent":"bg-elevated"} ${e?"opacity-40":"cursor-pointer"}`,style:{transitionDuration:"var(--motion-fast)"},children:(0,b.jsx)("span",{className:`block h-3.5 w-3.5 transition-transform ${a?"translate-x-4 bg-bg":"translate-x-0 bg-text-muted"}`,style:{transitionDuration:"var(--motion-base)",transitionTimingFunction:"var(--ease-spring)"}})})}])},57581,a=>{"use strict";var b=a.i(87924),c=a.i(73570),d=a.i(88736),e=a.i(12466);a.i(28130);var f=a.i(29457);a.s(["ConfirmDialog",0,function({open:a,title:g,description:h,confirmLabel:i,onConfirm:j,onClose:k}){let{t:l}=(0,f.useTranslation)();return a?(0,b.jsxs)(d.Modal,{title:g,onClose:k,size:"sm",icon:c.AlertTriangle,children:[(0,b.jsx)(d.ModalBody,{children:h?(0,b.jsx)("p",{className:"text-sm leading-relaxed text-text-muted",children:h}):null}),(0,b.jsxs)(d.ModalFooter,{children:[(0,b.jsx)(e.Button,{variant:"ghost",onClick:k,children:l.common.cancel}),(0,b.jsx)(e.Button,{variant:"danger",onClick:j,children:i??l.common.delete})]})]}):null}])},4720,a=>{"use strict";let b=(0,a.i(70106).default)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,b],4720)},37047,74803,a=>{"use strict";let b=(0,a.i(70106).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",0,b],37047);var c=a.i(87924);a.s(["SettingCard",0,function({title:a,description:b,icon:d,children:e}){return(0,c.jsxs)("div",{className:"card-interactive flex flex-col gap-3.5 rounded-lg border border-border bg-surface p-5",children:[(0,c.jsxs)("div",{className:"flex items-start gap-3",children:[d?(0,c.jsx)(d,{size:16,className:"mt-0.5 text-text-muted","aria-hidden":!0}):null,(0,c.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,c.jsx)("span",{className:"text-sm font-medium text-text",children:a}),b?(0,c.jsx)("span",{className:"font-mono text-xs text-text-muted",children:b}):null]})]}),(0,c.jsx)("div",{children:e})]})}],74803)},82434,a=>{"use strict";let b=(0,a.i(70106).default)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);a.s(["Bot",0,b],82434)},77156,a=>{"use strict";let b=(0,a.i(70106).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Eye",0,b],77156)},96883,62232,a=>{"use strict";var b=a.i(87924);let c=[{id:"claude-code",label:"Claude Code",color:"#d97757",binHint:"claude",argsHint:"--permission-mode acceptEdits",icon:"/providers/anthropic.png"},{id:"opencode",label:"OpenCode",color:"#7c8cff",binHint:"opencode",argsHint:"--pure",icon:"/providers/opencode.png"},{id:"codex",label:"Codex",color:"#ededed",binHint:"codex",argsHint:"--full-auto",icon:"/providers/openai.svg"}],d=a=>c.find(b=>b.id===a);a.s(["PROVIDERS",0,c,"ProviderLogo",0,function({meta:a,alt:c,size:d=36}){return(0,b.jsx)("span",{className:"inline-flex shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-elevated",style:{width:d,height:d},children:(0,b.jsx)("img",{src:a.icon,alt:c??a.label,width:.62*d,height:.62*d,style:{objectFit:"contain"}})})},"ProviderTag",0,function({id:a}){let c=d(a);return c?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-elevated/60 px-2 py-1 text-[11px] text-text-muted",children:[(0,b.jsx)("img",{src:c.icon,alt:"",width:13,height:13,style:{objectFit:"contain"},"aria-hidden":!0}),c.label]}):null},"providerMeta",0,d],96883);var e=a.i(72131),f=a.i(76645),g=a.i(18517);a.s(["useHermesForm",0,function(){let[a,b]=(0,e.useState)(""),[c,d]=(0,e.useState)(""),[h,i]=(0,e.useState)(""),j=(0,f.useHermesStatus)(a),k=(0,g.useHermesInstall)();return(0,e.useEffect)(()=>{d(window.location.origin)},[]),{home:a,setHome:b,url:c,setUrl:d,token:h,setToken:i,status:j,install:k}}],62232)}];
|
|
1
|
+
module.exports=[14548,a=>{"use strict";let b=(0,a.i(70106).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"}]]);a.s(["Save",0,b],14548)},71727,a=>{"use strict";let b=(0,a.i(70106).default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);a.s(["Radio",0,b],71727)},17545,a=>{"use strict";let b=(0,a.i(70106).default)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);a.s(["Layers",0,b],17545)},83549,a=>{"use strict";var b=a.i(87924);a.s(["Segmented",0,function({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{role:"radiogroup",className:"flex flex-wrap gap-1.5",children:a.map(a=>{let e=a.value===c,f=a.icon;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":e,"aria-label":a.label,onClick:()=>d(a.value),className:`inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-xs font-medium transition-colors ${e?"border-accent/50 bg-accent/15 text-accent":"border-border bg-elevated text-text-muted hover:border-border-strong hover:text-text"}`,style:{transitionDuration:"var(--motion-fast)"},children:[f?(0,b.jsx)(f,{size:13,"aria-hidden":!0}):null,a.label]},a.value)})})}])},92058,a=>{"use strict";var b=a.i(72131);a.s(["usePersistentState",0,function(a,c,d){let[e,f]=(0,b.useState)(c);return(0,b.useEffect)(()=>{try{let b=localStorage.getItem(a);if(null===b)return;("function"==typeof d?d(b):d.includes(b))&&f(b)}catch{}},[a]),[e,(0,b.useCallback)(b=>{f(b);try{localStorage.setItem(a,b)}catch{}},[a])]}])},66429,a=>{"use strict";let b=[["codex:","codex"],["opencode:","opencode"],["claude:","claude-code"]];a.s(["buildExec",0,function(a,b){let c=b.trim();return"codex"===a?`codex:${c}`:"opencode"===a?c.includes("/")?c:`opencode:${c}`:c.includes("/")?`claude:${c}`:c},"execModel",0,function(a){for(let[c]of b)if(a.startsWith(c))return a.slice(c.length);return a},"execProvider",0,function(a){for(let[c,d]of b)if(a.startsWith(c))return d;return a.includes("/")?"opencode":"claude-code"}])},97222,a=>{"use strict";var b=a.i(87924);a.s(["ModuleHeader",0,function({title:a,count:c,icon:d,children:e}){return(0,b.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,b.jsx)(d,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,b.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:a}),void 0!==c?(0,b.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:c}):null]}),e?(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:e}):null]})}])},9173,a=>{"use strict";var b=a.i(87924),c=a.i(12466);a.i(28130);var d=a.i(29457);a.s(["EmptyState",0,function({title:a,description:c,icon:d,action:e}){return(0,b.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[d?(0,b.jsx)(d,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:a}),c&&(0,b.jsx)("p",{className:"text-xs text-text-muted",children:c})]}),e]})},"ErrorState",0,function({message:a,onRetry:e}){let{t:f}=(0,d.useTranslation)();return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-accent",children:a}),e&&(0,b.jsx)(c.Button,{onClick:e,children:f.common.retry})]})},"LoadingState",0,function({label:a,variant:c="list"}){let{t:e}=(0,d.useTranslation)();return a?(0,b.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:a}):"cards"===c?(0,b.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4,5].map(a=>(0,b.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,b.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,b.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,b.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},a))}):"kanban"===c?(0,b.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,b.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(a=>(0,b.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},a))]},a))}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":e.common.loading,children:[88,72,80,64].map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,b.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${a}%`}})]},c))})}])},70777,a=>{"use strict";var b=a.i(87924);a.s(["ModuleShell",0,function({moduleId:a,children:c}){return(0,b.jsx)("section",{"data-module":a,className:"module-root flex flex-col gap-4",children:c})}])},34048,a=>{"use strict";var b=a.i(87924);let c={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};a.s(["Badge",0,function({children:a,tone:d="default"}){return(0,b.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${c[d]}`,children:a})}])},88736,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112);a.i(28130);var e=a.i(29457);let f={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};a.s(["Modal",0,function({title:a,onClose:g,children:h,size:i="lg",icon:j,description:k}){let{t:l}=(0,e.useTranslation)(),[m,n]=(0,c.useState)(!1);return((0,c.useEffect)(()=>n(!0),[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&g()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[g]),m)?(0,d.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:g,children:(0,b.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${f[i]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[j?(0,b.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,b.jsx)(j,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:a}),k?(0,b.jsx)("p",{className:"truncate text-xs text-text-muted",children:k}):null]}),(0,b.jsx)("button",{type:"button","aria-label":l.common.close,onClick:g,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:h})]})}),document.body):null},"ModalBody",0,function({children:a,gap:c=5}){return(0,b.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===c?"gap-4":6===c?"gap-6":"gap-5"}`,children:a})},"ModalFooter",0,function({children:a}){return(0,b.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:a})}])},81560,a=>{"use strict";let b=(0,a.i(70106).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);a.s(["Trash2",0,b],81560)},99464,a=>{"use strict";let b=(0,a.i(70106).default)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",0,b],99464)},73570,a=>{"use strict";var b=a.i(83604);a.s(["AlertTriangle",()=>b.default])},53876,a=>{"use strict";var b=a.i(87924);a.s(["Field",0,function({label:a,htmlFor:c,children:d,hint:e}){return(0,b.jsxs)("label",{htmlFor:c,className:"flex flex-col gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:a}),d,e?(0,b.jsx)("span",{className:"text-xs text-text-muted",children:e}):null]})}])},68522,a=>{"use strict";let b=[{label:"GLM 5.2",exec:"ollama-cloud/glm-5.2"},{label:"GPT 5.5",exec:"codex:gpt-5.5"},{label:"Claude Sonnet 4.5",exec:"sonnet"},{label:"Claude Opus 4.8",exec:"opus"},{label:"DeepSeek V4 Pro",exec:"ollama-cloud/deepseek-v4-pro"},{label:"Kimi k2.7 Code",exec:"ollama/kimi-k2.7-code"},{label:"MiniMax M3",exec:"ollama-cloud/minimax-m3"},{label:"DeepSeek v4 Flash",exec:"ollama-cloud/deepseek-v4-flash"},{label:"MiniMax M2.7",exec:"ollama-cloud/minimax-m2.7"},{label:"GLM 5.1",exec:"ollama-cloud/glm-5.1"},{label:"QWEN 3.5",exec:"ollama-cloud/qwen3.5"}];a.s(["EXEC_PRESETS",0,b,"allModels",0,function(a=[],c=[]){let d=new Set(a.map(a=>a.exec)),e=new Set(c);return[...b.filter(a=>!d.has(a.exec)&&!e.has(a.exec)),...a]}])},56993,a=>{"use strict";var b=a.i(87924);a.s(["Select",0,function({className:a="",children:c,...d}){let e=a.trim();return(0,b.jsx)("select",{className:`h-9 w-full rounded-md border border-border bg-surface px-3 text-sm text-text transition-colors focus:border-accent focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed${e?` ${e}`:""}`,...d,children:c})}])},69922,a=>{"use strict";let b=(0,a.i(70106).default)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);a.s(["Link2",0,b],69922)},47084,a=>{"use strict";var b=a.i(87924);a.s(["Toggle",0,function({checked:a,onChange:c,label:d,disabled:e=!1}){return(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a,"aria-label":d,disabled:e,onClick:()=>!e&&c(!a),className:`inline-flex h-5 w-9 items-center border border-border px-0.5 transition-colors ${a?"bg-accent":"bg-elevated"} ${e?"opacity-40":"cursor-pointer"}`,style:{transitionDuration:"var(--motion-fast)"},children:(0,b.jsx)("span",{className:`block h-3.5 w-3.5 transition-transform ${a?"translate-x-4 bg-bg":"translate-x-0 bg-text-muted"}`,style:{transitionDuration:"var(--motion-base)",transitionTimingFunction:"var(--ease-spring)"}})})}])},57581,a=>{"use strict";var b=a.i(87924),c=a.i(73570),d=a.i(88736),e=a.i(12466);a.i(28130);var f=a.i(29457);a.s(["ConfirmDialog",0,function({open:a,title:g,description:h,confirmLabel:i,onConfirm:j,onClose:k}){let{t:l}=(0,f.useTranslation)();return a?(0,b.jsxs)(d.Modal,{title:g,onClose:k,size:"sm",icon:c.AlertTriangle,children:[(0,b.jsx)(d.ModalBody,{children:h?(0,b.jsx)("p",{className:"text-sm leading-relaxed text-text-muted",children:h}):null}),(0,b.jsxs)(d.ModalFooter,{children:[(0,b.jsx)(e.Button,{variant:"ghost",onClick:k,children:l.common.cancel}),(0,b.jsx)(e.Button,{variant:"danger",onClick:j,children:i??l.common.delete})]})]}):null}])},4720,a=>{"use strict";let b=(0,a.i(70106).default)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,b],4720)},37047,74803,a=>{"use strict";let b=(0,a.i(70106).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",0,b],37047);var c=a.i(87924);a.s(["SettingCard",0,function({title:a,description:b,icon:d,children:e}){return(0,c.jsxs)("div",{className:"card-interactive flex flex-col gap-3.5 rounded-lg border border-border bg-surface p-5",children:[(0,c.jsxs)("div",{className:"flex items-start gap-3",children:[d?(0,c.jsx)(d,{size:16,className:"mt-0.5 text-text-muted","aria-hidden":!0}):null,(0,c.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,c.jsx)("span",{className:"text-sm font-medium text-text",children:a}),b?(0,c.jsx)("span",{className:"font-mono text-xs text-text-muted",children:b}):null]})]}),(0,c.jsx)("div",{children:e})]})}],74803)},82434,a=>{"use strict";let b=(0,a.i(70106).default)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);a.s(["Bot",0,b],82434)},77156,a=>{"use strict";let b=(0,a.i(70106).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Eye",0,b],77156)},96883,62232,a=>{"use strict";var b=a.i(87924);let c=[{id:"claude-code",label:"Claude Code",color:"#d97757",binHint:"claude",argsHint:"--permission-mode acceptEdits",icon:"/providers/anthropic.png"},{id:"opencode",label:"OpenCode",color:"#7c8cff",binHint:"opencode",argsHint:"--pure",icon:"/providers/opencode.png"},{id:"codex",label:"Codex",color:"#ededed",binHint:"codex",argsHint:"--full-auto",icon:"/providers/openai.svg"}],d=a=>c.find(b=>b.id===a);a.s(["PROVIDERS",0,c,"ProviderLogo",0,function({meta:a,alt:c,size:d=36}){return(0,b.jsx)("span",{className:"inline-flex shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-elevated",style:{width:d,height:d},children:(0,b.jsx)("img",{src:a.icon,alt:c??a.label,width:.62*d,height:.62*d,style:{objectFit:"contain"}})})},"ProviderTag",0,function({id:a}){let c=d(a);return c?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-elevated/60 px-2 py-1 text-[11px] text-text-muted",children:[(0,b.jsx)("img",{src:c.icon,alt:"",width:13,height:13,style:{objectFit:"contain"},"aria-hidden":!0}),c.label]}):null},"providerMeta",0,d],96883);var e=a.i(72131),f=a.i(76645),g=a.i(18517);a.s(["useHermesForm",0,function(){let[a,b]=(0,e.useState)(""),[c,d]=(0,e.useState)(""),[h,i]=(0,e.useState)(""),j=(0,f.useHermesStatus)(a),k=(0,g.useHermesInstall)();return(0,e.useEffect)(()=>{d(window.location.origin)},[]),{home:a,setHome:b,url:c,setUrl:d,token:h,setToken:i,status:j,install:k}}],62232)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_085pshu._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[4416,a=>{"use strict";let b=(0,a.i(70106).default)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);a.s(["ShieldCheck",0,b],4416)},53876,a=>{"use strict";var b=a.i(87924);a.s(["Field",0,function({label:a,htmlFor:c,children:d,hint:e}){return(0,b.jsxs)("label",{htmlFor:c,className:"flex flex-col gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:a}),d,e?(0,b.jsx)("span",{className:"text-xs text-text-muted",children:e}):null]})}])},68522,a=>{"use strict";let b=[{label:"GLM 5.2",exec:"ollama-cloud/glm-5.2"},{label:"GPT 5.5",exec:"codex:gpt-5.5"},{label:"Claude Sonnet 4.5",exec:"sonnet"},{label:"Claude Opus 4.8",exec:"opus"},{label:"DeepSeek V4 Pro",exec:"ollama-cloud/deepseek-v4-pro"},{label:"Kimi k2.7 Code",exec:"ollama/kimi-k2.7-code"},{label:"MiniMax M3",exec:"ollama-cloud/minimax-m3"},{label:"DeepSeek v4 Flash",exec:"ollama-cloud/deepseek-v4-flash"},{label:"MiniMax M2.7",exec:"ollama-cloud/minimax-m2.7"},{label:"GLM 5.1",exec:"ollama-cloud/glm-5.1"},{label:"QWEN 3.5",exec:"ollama-cloud/qwen3.5"}];a.s(["EXEC_PRESETS",0,b,"allModels",0,function(a=[],c=[]){let d=new Set(a.map(a=>a.exec)),e=new Set(c);return[...b.filter(a=>!d.has(a.exec)&&!e.has(a.exec)),...a]}])},97222,a=>{"use strict";var b=a.i(87924);a.s(["ModuleHeader",0,function({title:a,count:c,icon:d,children:e}){return(0,b.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,b.jsx)(d,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,b.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:a}),void 0!==c?(0,b.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:c}):null]}),e?(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:e}):null]})}])},70777,a=>{"use strict";var b=a.i(87924);a.s(["ModuleShell",0,function({moduleId:a,children:c}){return(0,b.jsx)("section",{"data-module":a,className:"module-root flex flex-col gap-4",children:c})}])},9173,a=>{"use strict";var b=a.i(87924),c=a.i(12466);a.i(28130);var d=a.i(29457);a.s(["EmptyState",0,function({title:a,description:c,icon:d,action:e}){return(0,b.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[d?(0,b.jsx)(d,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:a}),c&&(0,b.jsx)("p",{className:"text-xs text-text-muted",children:c})]}),e]})},"ErrorState",0,function({message:a,onRetry:e}){let{t:f}=(0,d.useTranslation)();return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-accent",children:a}),e&&(0,b.jsx)(c.Button,{onClick:e,children:f.common.retry})]})},"LoadingState",0,function({label:a,variant:c="list"}){let{t:e}=(0,d.useTranslation)();return a?(0,b.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:a}):"cards"===c?(0,b.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4,5].map(a=>(0,b.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,b.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,b.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,b.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},a))}):"kanban"===c?(0,b.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,b.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(a=>(0,b.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},a))]},a))}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":e.common.loading,children:[88,72,80,64].map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,b.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${a}%`}})]},c))})}])},34048,a=>{"use strict";var b=a.i(87924);let c={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};a.s(["Badge",0,function({children:a,tone:d="default"}){return(0,b.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${c[d]}`,children:a})}])},88736,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112);a.i(28130);var e=a.i(29457);let f={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};a.s(["Modal",0,function({title:a,onClose:g,children:h,size:i="lg",icon:j,description:k}){let{t:l}=(0,e.useTranslation)(),[m,n]=(0,c.useState)(!1);return((0,c.useEffect)(()=>n(!0),[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&g()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[g]),m)?(0,d.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:g,children:(0,b.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${f[i]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[j?(0,b.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,b.jsx)(j,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:a}),k?(0,b.jsx)("p",{className:"truncate text-xs text-text-muted",children:k}):null]}),(0,b.jsx)("button",{type:"button","aria-label":l.common.close,onClick:g,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:h})]})}),document.body):null},"ModalBody",0,function({children:a,gap:c=5}){return(0,b.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===c?"gap-4":6===c?"gap-6":"gap-5"}`,children:a})},"ModalFooter",0,function({children:a}){return(0,b.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:a})}])},81560,a=>{"use strict";let b=(0,a.i(70106).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);a.s(["Trash2",0,b],81560)},49134,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(81560);a.i(28130);var f=a.i(29457);a.s(["ActionMenu",0,function({items:a,label:g,trigger:h,align:i="right"}){let[j,k]=(0,c.useState)(!1),l=(0,c.useRef)(null),m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),{t:p}=(0,f.useTranslation)(),q=g??p.common.actions,[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(!1);(0,c.useEffect)(()=>u(!0),[]);let v=()=>{let a=m.current;if(!a)return;let b=a.getBoundingClientRect();s("right"===i?{top:b.bottom,right:window.innerWidth-b.right}:{top:b.bottom,left:b.left})},w=()=>{o.current&&(clearTimeout(o.current),o.current=null)},x=()=>{w(),o.current=setTimeout(()=>k(!1),160)},y=()=>{w(),v(),k(!0)};return(0,c.useEffect)(()=>{if(!j)return;let a=a=>{l.current?.contains(a.target)||n.current?.contains(a.target)||k(!1)},b=a=>{"Escape"===a.key&&k(!1)},c=()=>v();return document.addEventListener("mousedown",a),document.addEventListener("keydown",b),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",b),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[j]),(0,c.useEffect)(()=>()=>w(),[]),(0,b.jsxs)("div",{ref:l,className:"relative",onMouseEnter:y,onMouseLeave:x,children:[(0,b.jsx)("button",{ref:m,type:"button","aria-label":q,"aria-haspopup":"menu","aria-expanded":j,title:q,onClick:()=>j?k(!1):y(),className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-danger/60 text-danger transition-colors hover:bg-danger hover:text-white",style:{transitionDuration:"var(--motion-fast)"},children:h??(0,b.jsx)(e.Trash2,{size:15,"aria-hidden":!0})}),t&&j&&r&&(0,d.createPortal)((0,b.jsx)("div",{ref:n,role:"menu",onMouseEnter:w,onMouseLeave:x,className:"fixed z-[61] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-surface py-1.5",style:{top:r.top,left:r.left,right:r.right,boxShadow:"var(--shadow-raised)"},children:a.map(a=>{let c=a.icon,d="danger"===a.tone;return(0,b.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{k(!1),a.onSelect()},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm transition-colors ${d?"text-danger hover:bg-danger hover:text-white":"text-text hover:bg-elevated"}`,style:{transitionDuration:"var(--motion-fast)"},children:[c?(0,b.jsx)(c,{size:15,"aria-hidden":!0}):null,a.label]},a.label)})}),document.body)]})}])},17371,a=>{"use strict";let b=(0,a.i(70106).default)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);a.s(["UserPlus",0,b],17371)},70604,a=>{"use strict";var b=a.i(87924),c=a.i(70777),d=a.i(72131),e=a.i(60246),f=a.i(17371),g=a.i(81560),h=a.i(70106);let i=(0,h.default)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),j=(0,h.default)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var k=a.i(4416),l=a.i(34531),m=a.i(94392),n=a.i(76645),o=a.i(18517),p=a.i(68522),q=a.i(30067),r=a.i(89697),s=a.i(14800),t=a.i(34048),u=a.i(12466),v=a.i(18180),w=a.i(53876),x=a.i(88736),y=a.i(49134),z=a.i(7947),A=a.i(97222),B=a.i(9173);a.i(28130);var C=a.i(29457);function D({userId:a,projects:c}){let{t:d}=(0,C.useTranslation)(),e=(0,n.useUserProjects)(a),f=(0,o.useAssignProject)(),g=new Set(e.data??[]);return 0===c.length?null:(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] uppercase tracking-wide text-text-muted",children:[(0,b.jsx)(l.FolderGit2,{size:12,"aria-hidden":!0}),d.users.projects]}),c.map(c=>{let d=g.has(c.id);return(0,b.jsx)("button",{type:"button",onClick:()=>f.mutate({userId:a,projectId:c.id,currentlyAssigned:d}),disabled:f.isPending,className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${d?"border-accent bg-accent/15 text-accent":"border-border text-text-muted hover:bg-elevated"}`,children:c.slug},c.id)})]})}function E({user:a,globalExecs:c,custom:d}){let{t:e}=(0,C.useTranslation)(),f=(0,o.useUpdateUser)(),{toast:g}=(0,r.useToast)(),h=new Set(a.allowed_execs);return 0===c.length?null:(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] uppercase tracking-wide text-text-muted",children:[(0,b.jsx)(m.Cpu,{size:12,"aria-hidden":!0}),e.users.allowedModels]}),c.map(c=>{let i=h.has(c);return(0,b.jsxs)("button",{type:"button",onClick:()=>{let b;(b=new Set(h)).has(c)?b.delete(c):b.add(c),f.mutate({id:a.id,patch:{allowed_execs:[...b]}},{onSuccess:()=>g(e.users.modelsUpdated),onError:a=>g(String(a)||e.users.updateError,"error")})},disabled:f.isPending,className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs transition-colors ${i?"border-accent bg-accent/15 text-accent":"border-border text-text-muted hover:bg-elevated"}`,children:[(0,b.jsx)(z.ModelIcon,{name:c,size:14}),(0,p.allModels)(d).find(a=>a.exec===c)?.label??c]},c)}),0===h.size?(0,b.jsx)("span",{className:"text-[11px] italic text-text-muted",children:e.users.allModelsHint}):null]})}function F(){let a=(0,n.useUsers)(),c=(0,n.useMe)(),h=(0,n.useProjects)(),l=(0,o.useDeleteUser)(),m=(0,o.useCreateUser)(),p=(0,o.useUpdateUser)(),z=(0,o.useLogout)(),F=(0,n.useConfig)(),{toast:G}=(0,r.useToast)(),{t:H,locale:I}=(0,C.useTranslation)(),[J,K]=(0,d.useState)(!1),[L,M]=(0,d.useState)(""),[N,O]=(0,d.useState)(""),P=a.data??[],Q=c.data?.user?.is_admin??!1,R=F.data?.allowedExecs??[],S=F.data?.customModels??[];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(A.ModuleHeader,{title:H.page.users,count:a.data?.length,icon:e.Users,children:[(0,b.jsx)(u.Button,{variant:"ghost",icon:i,onClick:function(){z.mutate(void 0,{onSuccess:()=>{(0,q.clearToken)(),window.location.reload()},onError:()=>{(0,q.clearToken)(),window.location.reload()}})},disabled:z.isPending,children:H.users.logout}),(0,b.jsx)(u.Button,{variant:"accent",icon:f.UserPlus,onClick:()=>K(!0),children:H.users.newUser})]}),a.isLoading?(0,b.jsx)(B.LoadingState,{}):a.isError?(0,b.jsx)(B.ErrorState,{message:H.users.loadError,onRetry:()=>a.refetch()}):0===P.length?(0,b.jsx)(B.EmptyState,{title:H.users.empty,description:H.users.emptyDescription,icon:e.Users,action:(0,b.jsx)(u.Button,{variant:"accent",icon:f.UserPlus,onClick:()=>K(!0),children:H.users.newUser})}):(0,b.jsx)("ul",{className:"flex flex-col gap-2.5",children:P.map(a=>{var c;let d;return(0,b.jsxs)("li",{className:"card-interactive group flex items-center gap-3.5 rounded-lg border border-border bg-surface p-3.5",children:[(0,b.jsx)(s.Avatar,{user:a,size:48}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"truncate font-semibold text-text",children:a.name||a.username}),a.is_admin?(0,b.jsxs)(t.Badge,{tone:"accent",children:[(0,b.jsx)(k.ShieldCheck,{size:11,className:"mr-1","aria-hidden":!0}),H.users.admin]}):null]}),(0,b.jsxs)("span",{className:"truncate font-mono text-xs text-text-muted",children:["@",a.username," · ",(c=a.created_at,Number.isNaN((d=new Date(c.includes("T")?c:c.replace(" ","T")+"Z")).getTime())?c:d.toLocaleString(I,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}))]}),Q?(0,b.jsx)(D,{userId:a.id,projects:h.data??[]}):null,Q?(0,b.jsx)(E,{user:a,globalExecs:R,custom:S}):null]}),(0,b.jsx)("div",{className:"shrink-0 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:(0,b.jsx)(y.ActionMenu,{label:H.users.deleteLabel.replace("{username}",a.username),items:[...Q?[{label:a.is_admin?H.users.removeAdmin:H.users.makeAdmin,icon:a.is_admin?j:k.ShieldCheck,onSelect:()=>{p.isPending||p.mutate({id:a.id,patch:{is_admin:!a.is_admin}},{onSuccess:()=>G(H.users.roleUpdated),onError:a=>G(String(a)||H.users.updateError,"error")})}}]:[],{label:P.length<=1?H.users.lastUserHint:H.users.delete,icon:g.Trash2,tone:"danger",onSelect:()=>{var b;P.length>1&&!l.isPending&&(b=a.id,l.mutate(b,{onSuccess:()=>G(H.users.userDeleted),onError:a=>G(String(a),"error")}))}}]})})]},a.id)})}),J&&(0,b.jsx)(x.Modal,{title:H.users.addUser,onClose:()=>K(!1),size:"md",icon:f.UserPlus,children:(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),m.mutate({username:L,password:N},{onSuccess:()=>{G(H.users.userCreated),K(!1),M(""),O("")},onError:a=>G(String(a),"error")})},className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)(x.ModalBody,{gap:4,children:[(0,b.jsx)(w.Field,{label:H.users.fieldUsername,children:(0,b.jsx)(v.Input,{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:H.auth.usernamePlaceholder,autoFocus:!0})}),(0,b.jsx)(w.Field,{label:H.auth.passwordPlaceholder,children:(0,b.jsx)(v.Input,{type:"password",value:N,onChange:a=>O(a.target.value),placeholder:H.auth.passwordPlaceholder})})]}),(0,b.jsxs)(x.ModalFooter,{children:[(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:()=>K(!1),children:H.common.cancel}),(0,b.jsx)(u.Button,{type:"submit",variant:"accent",icon:f.UserPlus,disabled:m.isPending||!L.trim()||!N,children:H.users.create})]})]})})]})}a.s(["default",0,function(){return(0,b.jsx)(c.ModuleShell,{moduleId:"users",children:(0,b.jsx)(F,{})})},"dynamic",0,"force-dynamic"],70604)}];
|
|
1
|
+
module.exports=[4416,a=>{"use strict";let b=(0,a.i(70106).default)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);a.s(["ShieldCheck",0,b],4416)},53876,a=>{"use strict";var b=a.i(87924);a.s(["Field",0,function({label:a,htmlFor:c,children:d,hint:e}){return(0,b.jsxs)("label",{htmlFor:c,className:"flex flex-col gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:a}),d,e?(0,b.jsx)("span",{className:"text-xs text-text-muted",children:e}):null]})}])},68522,a=>{"use strict";let b=[{label:"GLM 5.2",exec:"ollama-cloud/glm-5.2"},{label:"GPT 5.5",exec:"codex:gpt-5.5"},{label:"Claude Sonnet 4.5",exec:"sonnet"},{label:"Claude Opus 4.8",exec:"opus"},{label:"DeepSeek V4 Pro",exec:"ollama-cloud/deepseek-v4-pro"},{label:"Kimi k2.7 Code",exec:"ollama/kimi-k2.7-code"},{label:"MiniMax M3",exec:"ollama-cloud/minimax-m3"},{label:"DeepSeek v4 Flash",exec:"ollama-cloud/deepseek-v4-flash"},{label:"MiniMax M2.7",exec:"ollama-cloud/minimax-m2.7"},{label:"GLM 5.1",exec:"ollama-cloud/glm-5.1"},{label:"QWEN 3.5",exec:"ollama-cloud/qwen3.5"}];a.s(["EXEC_PRESETS",0,b,"allModels",0,function(a=[],c=[]){let d=new Set(a.map(a=>a.exec)),e=new Set(c);return[...b.filter(a=>!d.has(a.exec)&&!e.has(a.exec)),...a]}])},97222,a=>{"use strict";var b=a.i(87924);a.s(["ModuleHeader",0,function({title:a,count:c,icon:d,children:e}){return(0,b.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,b.jsx)(d,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,b.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:a}),void 0!==c?(0,b.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:c}):null]}),e?(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:e}):null]})}])},70777,a=>{"use strict";var b=a.i(87924);a.s(["ModuleShell",0,function({moduleId:a,children:c}){return(0,b.jsx)("section",{"data-module":a,className:"module-root flex flex-col gap-4",children:c})}])},9173,a=>{"use strict";var b=a.i(87924),c=a.i(12466);a.i(28130);var d=a.i(29457);a.s(["EmptyState",0,function({title:a,description:c,icon:d,action:e}){return(0,b.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[d?(0,b.jsx)(d,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:a}),c&&(0,b.jsx)("p",{className:"text-xs text-text-muted",children:c})]}),e]})},"ErrorState",0,function({message:a,onRetry:e}){let{t:f}=(0,d.useTranslation)();return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-accent",children:a}),e&&(0,b.jsx)(c.Button,{onClick:e,children:f.common.retry})]})},"LoadingState",0,function({label:a,variant:c="list"}){let{t:e}=(0,d.useTranslation)();return a?(0,b.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:a}):"cards"===c?(0,b.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4,5].map(a=>(0,b.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,b.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,b.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,b.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},a))}):"kanban"===c?(0,b.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":e.common.loading,children:[0,1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,b.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(a=>(0,b.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},a))]},a))}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":e.common.loading,children:[88,72,80,64].map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,b.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${a}%`}})]},c))})}])},34048,a=>{"use strict";var b=a.i(87924);let c={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};a.s(["Badge",0,function({children:a,tone:d="default"}){return(0,b.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${c[d]}`,children:a})}])},88736,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112);a.i(28130);var e=a.i(29457);let f={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};a.s(["Modal",0,function({title:a,onClose:g,children:h,size:i="lg",icon:j,description:k}){let{t:l}=(0,e.useTranslation)(),[m,n]=(0,c.useState)(!1);return((0,c.useEffect)(()=>n(!0),[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&g()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[g]),m)?(0,d.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:g,children:(0,b.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${f[i]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[j?(0,b.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,b.jsx)(j,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:a}),k?(0,b.jsx)("p",{className:"truncate text-xs text-text-muted",children:k}):null]}),(0,b.jsx)("button",{type:"button","aria-label":l.common.close,onClick:g,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:h})]})}),document.body):null},"ModalBody",0,function({children:a,gap:c=5}){return(0,b.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===c?"gap-4":6===c?"gap-6":"gap-5"}`,children:a})},"ModalFooter",0,function({children:a}){return(0,b.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:a})}])},81560,a=>{"use strict";let b=(0,a.i(70106).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);a.s(["Trash2",0,b],81560)},49134,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(81560);a.i(28130);var f=a.i(29457);a.s(["ActionMenu",0,function({items:a,label:g,trigger:h,align:i="right"}){let[j,k]=(0,c.useState)(!1),l=(0,c.useRef)(null),m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),{t:p}=(0,f.useTranslation)(),q=g??p.common.actions,[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(!1);(0,c.useEffect)(()=>u(!0),[]);let v=()=>{let a=m.current;if(!a)return;let b=a.getBoundingClientRect();s("right"===i?{top:b.bottom,right:window.innerWidth-b.right}:{top:b.bottom,left:b.left})},w=()=>{o.current&&(clearTimeout(o.current),o.current=null)},x=()=>{w(),o.current=setTimeout(()=>k(!1),160)},y=()=>{w(),v(),k(!0)};return(0,c.useEffect)(()=>{if(!j)return;let a=a=>{l.current?.contains(a.target)||n.current?.contains(a.target)||k(!1)},b=a=>{"Escape"===a.key&&k(!1)},c=()=>v();return document.addEventListener("mousedown",a),document.addEventListener("keydown",b),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",b),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[j]),(0,c.useEffect)(()=>()=>w(),[]),(0,b.jsxs)("div",{ref:l,className:"relative",onMouseEnter:y,onMouseLeave:x,children:[(0,b.jsx)("button",{ref:m,type:"button","aria-label":q,"aria-haspopup":"menu","aria-expanded":j,title:q,onClick:()=>j?k(!1):y(),className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-danger/60 text-danger transition-colors hover:bg-danger hover:text-white",style:{transitionDuration:"var(--motion-fast)"},children:h??(0,b.jsx)(e.Trash2,{size:15,"aria-hidden":!0})}),t&&j&&r&&(0,d.createPortal)((0,b.jsx)("div",{ref:n,role:"menu",onMouseEnter:w,onMouseLeave:x,className:"fixed z-[61] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-surface py-1.5",style:{top:r.top,left:r.left,right:r.right,boxShadow:"var(--shadow-raised)"},children:a.map(a=>{let c=a.icon,d="danger"===a.tone;return(0,b.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{k(!1),a.onSelect()},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm transition-colors ${d?"text-danger hover:bg-danger hover:text-white":"text-text hover:bg-elevated"}`,style:{transitionDuration:"var(--motion-fast)"},children:[c?(0,b.jsx)(c,{size:15,"aria-hidden":!0}):null,a.label]},a.label)})}),document.body)]})}])},17371,a=>{"use strict";let b=(0,a.i(70106).default)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);a.s(["UserPlus",0,b],17371)},70604,a=>{"use strict";var b=a.i(87924),c=a.i(70777),d=a.i(72131),e=a.i(60246),f=a.i(17371),g=a.i(81560),h=a.i(70106);let i=(0,h.default)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),j=(0,h.default)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var k=a.i(4416),l=a.i(34531),m=a.i(94392),n=a.i(76645),o=a.i(18517),p=a.i(68522),q=a.i(30067),r=a.i(89697),s=a.i(14800),t=a.i(34048),u=a.i(12466),v=a.i(18180),w=a.i(53876),x=a.i(88736),y=a.i(49134),z=a.i(7947),A=a.i(97222),B=a.i(9173);a.i(28130);var C=a.i(29457),D=a.i(81926);function E({userId:a,projects:c}){let{t:d}=(0,C.useTranslation)(),e=(0,n.useUserProjects)(a),f=(0,o.useAssignProject)(),g=new Set(e.data??[]);return 0===c.length?null:(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] uppercase tracking-wide text-text-muted",children:[(0,b.jsx)(l.FolderGit2,{size:12,"aria-hidden":!0}),d.users.projects]}),c.map(c=>{let d=g.has(c.id);return(0,b.jsx)("button",{type:"button",onClick:()=>f.mutate({userId:a,projectId:c.id,currentlyAssigned:d}),disabled:f.isPending,className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${d?"border-accent bg-accent/15 text-accent":"border-border text-text-muted hover:bg-elevated"}`,children:c.slug},c.id)})]})}function F({user:a,globalExecs:c,custom:d}){let{t:e}=(0,C.useTranslation)(),f=(0,o.useUpdateUser)(),{toast:g}=(0,r.useToast)(),h=new Set(a.allowed_execs);return 0===c.length?null:(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] uppercase tracking-wide text-text-muted",children:[(0,b.jsx)(m.Cpu,{size:12,"aria-hidden":!0}),e.users.allowedModels]}),c.map(c=>{let i=h.has(c);return(0,b.jsxs)("button",{type:"button",onClick:()=>{let b;(b=new Set(h)).has(c)?b.delete(c):b.add(c),f.mutate({id:a.id,patch:{allowed_execs:[...b]}},{onSuccess:()=>g(e.users.modelsUpdated),onError:a=>g(String(a)||e.users.updateError,"error")})},disabled:f.isPending,className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs transition-colors ${i?"border-accent bg-accent/15 text-accent":"border-border text-text-muted hover:bg-elevated"}`,children:[(0,b.jsx)(z.ModelIcon,{name:c,size:14}),(0,p.allModels)(d).find(a=>a.exec===c)?.label??c]},c)}),0===h.size?(0,b.jsx)("span",{className:"text-[11px] italic text-text-muted",children:e.users.allModelsHint}):null]})}function G(){let a=(0,n.useUsers)(),c=(0,n.useMe)(),h=(0,n.useProjects)(),l=(0,o.useDeleteUser)(),m=(0,o.useCreateUser)(),p=(0,o.useUpdateUser)(),z=(0,o.useLogout)(),G=(0,n.useConfig)(),{toast:H}=(0,r.useToast)(),{t:I,locale:J}=(0,C.useTranslation)(),[K,L]=(0,d.useState)(!1),[M,N]=(0,d.useState)(""),[O,P]=(0,d.useState)(""),Q=a.data??[],R=c.data?.user?.is_admin??!1,S=G.data?.allowedExecs??[],T=G.data?.customModels??[];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(A.ModuleHeader,{title:I.page.users,count:a.data?.length,icon:e.Users,children:[(0,b.jsx)(u.Button,{variant:"ghost",icon:i,onClick:function(){z.mutate(void 0,{onSuccess:()=>{(0,q.clearToken)(),window.location.reload()},onError:()=>{(0,q.clearToken)(),window.location.reload()}})},disabled:z.isPending,children:I.users.logout}),(0,b.jsx)(u.Button,{variant:"accent",icon:f.UserPlus,onClick:()=>L(!0),children:I.users.newUser})]}),a.isLoading?(0,b.jsx)(B.LoadingState,{}):a.isError?(0,b.jsx)(B.ErrorState,{message:I.users.loadError,onRetry:()=>a.refetch()}):0===Q.length?(0,b.jsx)(B.EmptyState,{title:I.users.empty,description:I.users.emptyDescription,icon:e.Users,action:(0,b.jsx)(u.Button,{variant:"accent",icon:f.UserPlus,onClick:()=>L(!0),children:I.users.newUser})}):(0,b.jsx)("ul",{className:"flex flex-col gap-2.5",children:Q.map(a=>(0,b.jsxs)("li",{className:"card-interactive group flex items-center gap-3.5 rounded-lg border border-border bg-surface p-3.5",children:[(0,b.jsx)(s.Avatar,{user:a,size:48}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"truncate font-semibold text-text",children:a.name||a.username}),a.is_admin?(0,b.jsxs)(t.Badge,{tone:"accent",children:[(0,b.jsx)(k.ShieldCheck,{size:11,className:"mr-1","aria-hidden":!0}),I.users.admin]}):null]}),(0,b.jsxs)("span",{className:"truncate font-mono text-xs text-text-muted",children:["@",a.username," · ",(0,D.localDateTime)(a.created_at,J,!1)]}),R?(0,b.jsx)(E,{userId:a.id,projects:h.data??[]}):null,R?(0,b.jsx)(F,{user:a,globalExecs:S,custom:T}):null]}),(0,b.jsx)("div",{className:"shrink-0 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:(0,b.jsx)(y.ActionMenu,{label:I.users.deleteLabel.replace("{username}",a.username),items:[...R?[{label:a.is_admin?I.users.removeAdmin:I.users.makeAdmin,icon:a.is_admin?j:k.ShieldCheck,onSelect:()=>{p.isPending||p.mutate({id:a.id,patch:{is_admin:!a.is_admin}},{onSuccess:()=>H(I.users.roleUpdated),onError:a=>H(String(a)||I.users.updateError,"error")})}}]:[],{label:Q.length<=1?I.users.lastUserHint:I.users.delete,icon:g.Trash2,tone:"danger",onSelect:()=>{var b;Q.length>1&&!l.isPending&&(b=a.id,l.mutate(b,{onSuccess:()=>H(I.users.userDeleted),onError:a=>H(String(a),"error")}))}}]})})]},a.id))}),K&&(0,b.jsx)(x.Modal,{title:I.users.addUser,onClose:()=>L(!1),size:"md",icon:f.UserPlus,children:(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),m.mutate({username:M,password:O},{onSuccess:()=>{H(I.users.userCreated),L(!1),N(""),P("")},onError:a=>H(String(a),"error")})},className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)(x.ModalBody,{gap:4,children:[(0,b.jsx)(w.Field,{label:I.users.fieldUsername,children:(0,b.jsx)(v.Input,{type:"text",value:M,onChange:a=>N(a.target.value),placeholder:I.auth.usernamePlaceholder,autoFocus:!0})}),(0,b.jsx)(w.Field,{label:I.auth.passwordPlaceholder,children:(0,b.jsx)(v.Input,{type:"password",value:O,onChange:a=>P(a.target.value),placeholder:I.auth.passwordPlaceholder})})]}),(0,b.jsxs)(x.ModalFooter,{children:[(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:()=>L(!1),children:I.common.cancel}),(0,b.jsx)(u.Button,{type:"submit",variant:"accent",icon:f.UserPlus,disabled:m.isPending||!M.trim()||!O,children:I.users.create})]})]})})]})}a.s(["default",0,function(){return(0,b.jsx)(c.ModuleShell,{moduleId:"users",children:(0,b.jsx)(G,{})})},"dynamic",0,"force-dynamic"],70604)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0tc9z5_._.js.map
|