@xopcai/xopc 0.0.28 → 0.0.29
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/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/agents-CkgFSiCY.js +216 -0
- package/dist/gateway/static/root/assets/agents-CkgFSiCY.js.map +1 -0
- package/dist/gateway/static/root/assets/{apps-page-Co95hLOJ.js → apps-page-Bmq19MS-.js} +2 -2
- package/dist/gateway/static/root/assets/{apps-page-Co95hLOJ.js.map → apps-page-Bmq19MS-.js.map} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-CE7jrdkO.js +9 -0
- package/dist/gateway/static/root/assets/channels-settings-CE7jrdkO.js.map +1 -0
- package/dist/gateway/static/root/assets/cron-page-BpPPcykJ.js +2 -0
- package/dist/gateway/static/root/assets/cron-page-BpPPcykJ.js.map +1 -0
- package/dist/gateway/static/root/assets/{cron-utils-BmzF4m1y.js → cron-utils-N1PqD2DB.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-utils-BmzF4m1y.js.map → cron-utils-N1PqD2DB.js.map} +1 -1
- package/dist/gateway/static/root/assets/{dist-Dn-ufXyc.js → dist--p2HQ2QF.js} +2 -2
- package/dist/gateway/static/root/assets/{dist-Dn-ufXyc.js.map → dist--p2HQ2QF.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BZ8xQ74_.js → extension-debug-page-DwHCB_6T.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-debug-page-BZ8xQ74_.js.map → extension-debug-page-DwHCB_6T.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BlNgKxwW.js → extension-page-BsYwQIex.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-page-BlNgKxwW.js.map → extension-page-BsYwQIex.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CWTdW_oY.js → extension-settings-page-nsisEgjB.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-settings-page-CWTdW_oY.js.map → extension-settings-page-nsisEgjB.js.map} +1 -1
- package/dist/gateway/static/root/assets/index-CR8zUHGR.js +4734 -0
- package/dist/gateway/static/root/assets/{index-lV8FGWlt.js.map → index-CR8zUHGR.js.map} +1 -1
- package/dist/gateway/static/root/assets/index-Dnfha4O2.css +1 -0
- package/dist/gateway/static/root/assets/logs-page-CQwdV_Xw.js +2 -0
- package/dist/gateway/static/root/assets/{logs-page-DG31RpvG.js.map → logs-page-CQwdV_Xw.js.map} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-Be5kIGl_.js +2 -0
- package/dist/gateway/static/root/assets/sessions-page-Be5kIGl_.js.map +1 -0
- package/dist/gateway/static/root/assets/settings-page-PodSlNwr.js +2 -0
- package/dist/gateway/static/root/assets/settings-page-PodSlNwr.js.map +1 -0
- package/dist/gateway/static/root/assets/skills-page-Clg8deH0.js +3 -0
- package/dist/gateway/static/root/assets/{skills-page-lb7vYtlP.js.map → skills-page-Clg8deH0.js.map} +1 -1
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/lifecycle/hook-handler.d.ts +2 -0
- package/dist/src/agent/lifecycle/hook-handler.js +24 -0
- package/dist/src/agent/lifecycle/hook-handler.js.map +1 -1
- package/dist/src/agent/messaging/command-handler.js +10 -2
- package/dist/src/agent/messaging/command-handler.js.map +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +77 -20
- package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
- package/dist/src/agent/service.d.ts +15 -0
- package/dist/src/agent/service.js +21 -1
- package/dist/src/agent/service.js.map +1 -1
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/manager.js +2 -2
- package/dist/src/cli/agent-chat-log-level-preset.d.ts +3 -2
- package/dist/src/cli/agent-chat-log-level-preset.js +6 -3
- package/dist/src/cli/agent-chat-log-level-preset.js.map +1 -1
- package/dist/src/cli/index.js +4 -3
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/config/schema.js +5 -2
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/extensions/hooks.js +5 -1
- package/dist/src/extensions/hooks.js.map +1 -1
- package/dist/src/extensions/loader.d.ts +1 -0
- package/dist/src/extensions/loader.js +3 -1
- package/dist/src/extensions/loader.js.map +1 -1
- package/dist/src/extensions/sdk/index.d.ts +1 -1
- package/dist/src/extensions/sdk/index.js.map +1 -1
- package/dist/src/extensions/types/core.d.ts +8 -0
- package/dist/src/extensions/types/hooks.d.ts +16 -1
- package/dist/src/extensions/types/hooks.js +1 -0
- package/dist/src/extensions/types/hooks.js.map +1 -1
- package/dist/src/gateway/agents-admin.d.ts +19 -1
- package/dist/src/gateway/agents-admin.js +164 -3
- package/dist/src/gateway/agents-admin.js.map +1 -1
- package/dist/src/gateway/hono/app.js +1 -0
- package/dist/src/gateway/hono/app.js.map +1 -1
- package/dist/src/gateway/hono/routes/agents.js +59 -5
- package/dist/src/gateway/hono/routes/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/config.js +2 -2
- package/dist/src/gateway/hono/routes/config.js.map +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +1 -0
- package/dist/src/gateway/hono/routes/public-gateway.js.map +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +17 -0
- package/dist/src/gateway/hono/routes/sessions.js.map +1 -1
- package/dist/src/gateway/service.d.ts +2 -0
- package/dist/src/gateway/service.js +31 -4
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/session/client-history.d.ts +21 -0
- package/dist/src/session/client-history.js +89 -0
- package/dist/src/session/client-history.js.map +1 -0
- package/dist/src/session/index.d.ts +1 -0
- package/dist/src/session/index.js +2 -1
- package/dist/src/session/manager.d.ts +2 -0
- package/dist/src/session/manager.js +5 -0
- package/dist/src/session/manager.js.map +1 -1
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/session/thinking-resolve.js.map +1 -1
- package/dist/src/tui/backends/embedded-backend.d.ts +1 -1
- package/dist/src/tui/backends/embedded-backend.js +15 -2
- package/dist/src/tui/backends/embedded-backend.js.map +1 -1
- package/dist/src/tui/backends/gateway-sse-backend.d.ts +4 -0
- package/dist/src/tui/backends/gateway-sse-backend.js +34 -4
- package/dist/src/tui/backends/gateway-sse-backend.js.map +1 -1
- package/dist/src/tui/chat-history.d.ts +4 -0
- package/dist/src/tui/chat-history.js +29 -0
- package/dist/src/tui/chat-history.js.map +1 -0
- package/dist/src/tui/components/chat-log.d.ts +3 -1
- package/dist/src/tui/components/chat-log.js +17 -3
- package/dist/src/tui/components/chat-log.js.map +1 -1
- package/dist/src/tui/components/custom-editor.d.ts +1 -0
- package/dist/src/tui/components/custom-editor.js +8 -2
- package/dist/src/tui/components/custom-editor.js.map +1 -1
- package/dist/src/tui/components/fuzzy-filter.d.ts +17 -0
- package/dist/src/tui/components/fuzzy-filter.js +85 -0
- package/dist/src/tui/components/fuzzy-filter.js.map +1 -0
- package/dist/src/tui/components/searchable-select-list.d.ts +39 -0
- package/dist/src/tui/components/searchable-select-list.js +257 -0
- package/dist/src/tui/components/searchable-select-list.js.map +1 -0
- package/dist/src/tui/theme.d.ts +2 -0
- package/dist/src/tui/theme.js +7 -1
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/tui-agent-events.d.ts +7 -0
- package/dist/src/tui/tui-agent-events.js +103 -0
- package/dist/src/tui/tui-agent-events.js.map +1 -0
- package/dist/src/tui/tui-backend.d.ts +8 -12
- package/dist/src/tui/tui-commands.d.ts +23 -0
- package/dist/src/tui/tui-commands.js +165 -0
- package/dist/src/tui/tui-commands.js.map +1 -0
- package/dist/src/tui/tui-lifecycle.d.ts +26 -0
- package/dist/src/tui/tui-lifecycle.js +57 -0
- package/dist/src/tui/tui-lifecycle.js.map +1 -0
- package/dist/src/tui/tui-local-shell.d.ts +28 -0
- package/dist/src/tui/tui-local-shell.js +147 -0
- package/dist/src/tui/tui-local-shell.js.map +1 -0
- package/dist/src/tui/tui-overlays.d.ts +8 -0
- package/dist/src/tui/tui-overlays.js +22 -0
- package/dist/src/tui/tui-overlays.js.map +1 -0
- package/dist/src/tui/tui-picker-overlay.d.ts +26 -0
- package/dist/src/tui/tui-picker-overlay.js +69 -0
- package/dist/src/tui/tui-picker-overlay.js.map +1 -0
- package/dist/src/tui/tui-stdio-filter.d.ts +17 -0
- package/dist/src/tui/tui-stdio-filter.js +96 -0
- package/dist/src/tui/tui-stdio-filter.js.map +1 -0
- package/dist/src/tui/tui-submit.d.ts +25 -0
- package/dist/src/tui/tui-submit.js +102 -0
- package/dist/src/tui/tui-submit.js.map +1 -0
- package/dist/src/tui/tui-suspend.d.ts +10 -0
- package/dist/src/tui/tui-suspend.js +18 -0
- package/dist/src/tui/tui-suspend.js.map +1 -0
- package/dist/src/tui/tui-types.d.ts +1 -0
- package/dist/src/tui/tui-types.js.map +1 -1
- package/dist/src/tui/tui.d.ts +2 -0
- package/dist/src/tui/tui.js +175 -312
- package/dist/src/tui/tui.js.map +1 -1
- package/package.json +2 -6
- package/dist/gateway/static/root/assets/agents-DplaQYS2.js +0 -216
- package/dist/gateway/static/root/assets/agents-DplaQYS2.js.map +0 -1
- package/dist/gateway/static/root/assets/channels-settings-CkfSST0k.js +0 -9
- package/dist/gateway/static/root/assets/channels-settings-CkfSST0k.js.map +0 -1
- package/dist/gateway/static/root/assets/cron-page-D9q6KqL8.js +0 -2
- package/dist/gateway/static/root/assets/cron-page-D9q6KqL8.js.map +0 -1
- package/dist/gateway/static/root/assets/index-OT4cGzon.css +0 -1
- package/dist/gateway/static/root/assets/index-lV8FGWlt.js +0 -4734
- package/dist/gateway/static/root/assets/logs-page-DG31RpvG.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-CdmjxDEM.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-CdmjxDEM.js.map +0 -1
- package/dist/gateway/static/root/assets/settings-page-DU2XLf5s.js +0 -2
- package/dist/gateway/static/root/assets/settings-page-DU2XLf5s.js.map +0 -1
- package/dist/gateway/static/root/assets/skills-page-lb7vYtlP.js +0 -3
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-CL3dfyxs.js","assets/rolldown-runtime-DWdDZTNf.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-DWdDZTNf.js";import{i as t,t as n}from"./vendor-react-DbimaAId.js";import{Cn as r}from"./vendor-codemirror-CXAvob9m.js";import{t as i}from"./cn-BMCV0OMB.js";import{$r as a,$t as ee,B as te,F as ne,Fn as o,Fr as re,H as s,Hr as ie,I as ae,In as c,Ir as oe,Jt as se,L as ce,Ln as le,Lr as ue,M as de,N as fe,P as pe,Pn as me,R as he,U as ge,Un as l,Xr as _e,cn as u,dt as d,fn as ve,ft as ye,gr as be,hr as xe,jn as Se,lt as Ce,mr as f,ot as we,qt as Te,sn as Ee,sr as De,st as Oe,ur as ke,ut as p,vn as Ae,wn as m,xn as h,xr as je,z as Me}from"./index-lV8FGWlt.js";import{a as g,i as _,n as v,r as y,t as b}from"./dist-Dn-ufXyc.js";var x=e(t(),1),S=n();function Ne(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function Pe(e){let t=e.toLowerCase().replace(/_/g,`-`);return t.includes(`find-skill`)?Se:t.includes(`install`)&&(t.includes(`depend`)||t.includes(`dependency`))?l:t.includes(`create-skill`)?m:t===`docx`||t.endsWith(`-docx`)?xe:t===`pdf`||t.endsWith(`-pdf`)?f:t===`pptx`||t.includes(`pptx`)?c:t===`xlsx`||t.includes(`xlsx`)?h:t.includes(`markdown`)||t.includes(`md`)?ie:o}function Fe({name:e,className:t}){let n=Pe(e);return(0,S.jsx)(`div`,{className:i(`flex size-11 shrink-0 items-center justify-center rounded-xl`,`bg-surface-hover/90 shadow-surface ring-1 ring-inset ring-edge/35 dark:bg-surface-active/80 dark:ring-edge/50`,`transition-[transform,box-shadow] duration-200 ease-out group-hover:ring-edge/55 dark:group-hover:ring-edge/65`,`group-hover:-translate-y-px`,t),"aria-hidden":!0,children:(0,S.jsx)(n,{className:`size-[1.35rem] text-fg-muted transition-colors duration-200 group-hover:text-fg`,strokeWidth:1.75})})}var Ie=new Set([`builtin`,`user`,`marketplace`]),Le=new Set([`all`,`global`,`workspace`,`extra`]);function Re(e){return{...e,enabled:e.enabled??!0,disableModelInvocation:e.disableModelInvocation??!1}}function ze({checked:e,onChange:t}){return(0,S.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,className:i(`relative h-6 w-10 shrink-0 overflow-hidden rounded-full border border-edge p-0.5`,`transition-[border-color,background-color] duration-200 ease-out`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base`,`active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100`,e?`bg-accent`:`bg-surface-hover`),onClick:()=>t(!e),children:(0,S.jsx)(`span`,{className:i(`pointer-events-none absolute left-0.5 top-1/2 block size-4 -translate-y-1/2 rounded-full bg-surface-panel shadow-surface ring-1 ring-edge/40 dark:ring-edge/55`,`transition-transform duration-200 ease-out motion-reduce:transition-none`,e?`translate-x-5`:`translate-x-0`),"aria-hidden":!0})})}async function Be(t){let n=t.name.toLowerCase();if(n.endsWith(`.zip`))return t;if(n.endsWith(`skill.md`)){let n=(await r(async()=>{let{default:t}=await import(`./jszip.min-CL3dfyxs.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([0,1]))).default,i=new n;i.file(`SKILL.md`,await t.arrayBuffer());let a=await i.generateAsync({type:`blob`,compression:`DEFLATE`}),ee=t.name.replace(/\.md$/i,``).replace(/\s+/g,`-`)||`skill`;return new File([a],`${ee}.zip`,{type:`application/zip`})}throw Error(`invalid`)}var Ve=6;function He(){let e=`animate-pulse motion-reduce:animate-none rounded-md bg-surface-hover dark:bg-surface-active/50`;return(0,S.jsxs)(`div`,{className:`flex items-center gap-4 px-4 py-3.5`,"aria-hidden":!0,children:[(0,S.jsx)(`div`,{className:i(`size-11 shrink-0 rounded-xl`,e)}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,S.jsx)(`div`,{className:i(`h-4 max-w-[10rem]`,e)}),(0,S.jsx)(`div`,{className:i(`h-3 w-full max-w-xl rounded`,e)})]}),(0,S.jsx)(`div`,{className:i(`h-6 w-10 shrink-0 rounded-full`,e)})]})}function Ue(){let e=Ee(ee(e=>e.language)).skills,t=!!se(e=>e.token),[n,r]=a(),[o,ie]=(0,x.useState)([]),[c,l]=(0,x.useState)(!1),[xe,f]=(0,x.useState)(null),[m,h]=(0,x.useState)(!1),Pe=n.get(`q`)??``,Ue=n.get(`tab`),We=n.get(`source`),Ge=Ie.has(Ue)?Ue:`builtin`,Ke=Le.has(We)?We:`all`,[C,w]=(0,x.useState)(Pe),[T,E]=(0,x.useState)(null),[D,O]=(0,x.useState)(Ge),[k,qe]=(0,x.useState)(Ke),[Je,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(null),[Ye,N]=(0,x.useState)(!1),[Xe,P]=(0,x.useState)(!1),[F,I]=(0,x.useState)(null),[Ze,Qe]=(0,x.useState)(null),[L,R]=(0,x.useState)({}),[$e,z]=(0,x.useState)(!1),[et,tt]=(0,x.useState)(`catalog`),[B,V]=(0,x.useState)(``),[nt,H]=(0,x.useState)(``),[rt,U]=(0,x.useState)(!1),[it,W]=(0,x.useState)(null),[G,at]=(0,x.useState)(`downloads`),[K,ot]=(0,x.useState)(1),[q,st]=(0,x.useState)(!1),[ct,lt]=(0,x.useState)(null),[J,ut]=(0,x.useState)(null),[dt,ft]=(0,x.useState)(null),Y=(0,x.useCallback)(async t=>{let n=t?.silent===!0;n||l(!0),f(null);try{return ie((await ae()).catalog.map(Re)),{ok:!0}}catch(t){let n=t instanceof Error?t.message:e.loadFailed;return f(n),{ok:!1,message:n}}finally{n||l(!1)}},[e.loadFailed]);(0,x.useEffect)(()=>{t&&Y()},[t,Y]),(0,x.useEffect)(()=>{let e=n.get(`q`)??``,t=n.get(`tab`),r=n.get(`source`),i=Ie.has(t)?t:`builtin`,a=Le.has(r)?r:`all`;w(t=>t===e?t:e),O(e=>e===i?e:i),qe(e=>e===a?e:a)},[n]),(0,x.useEffect)(()=>{D===`marketplace`&&ot(1)},[C,G,D]),(0,x.useEffect)(()=>{if(!t||D!==`marketplace`)return;let n=!1;return st(!0),lt(null),pe({q:C.trim()||void 0,page:K,pageSize:20,sort:G}).then(e=>{n||ut(e)}).catch(t=>{n||(lt(t instanceof Error?t.message:e.marketplaceLoadFailed),ut(null))}).finally(()=>{n||st(!1)}),()=>{n=!0}},[t,D,K,G,C,e.marketplaceLoadFailed]),(0,x.useEffect)(()=>{let e=new URLSearchParams(n),t=C.trim();t?e.set(`q`,t):e.delete(`q`),D===`builtin`?e.delete(`tab`):e.set(`tab`,D),k===`all`?e.delete(`source`):e.set(`source`,k),e.toString()!==n.toString()&&r(e,{replace:!0})},[D,n,C,r,k]);let X=(0,x.useCallback)((e,t,n=5e3)=>{E({kind:e,message:t}),window.setTimeout(()=>E(null),n)},[]),pt=(0,x.useCallback)(async t=>{tt(`catalog`),z(!0),V(t.name),H(``),W(null),U(!0);try{let{markdown:e,name:n}=await ne(t.name);H(e),V(n)}catch(t){W(t instanceof Error?t.message:e.detailLoadFailed)}finally{U(!1)}},[e.detailLoadFailed]),mt=(0,x.useCallback)(async t=>{tt(`store`),z(!0),V(t),H(``),W(null),U(!0);try{let n=await fe(t);V(n.name);let r=n.readme?.trim();r?H(r):n.description?.trim()?H(`## ${n.name}\n\n${n.description.trim()}`):H(`*${e.marketplaceNoReadme}*`)}catch(t){W(t instanceof Error?t.message:e.detailLoadFailed)}finally{U(!1)}},[e.detailLoadFailed,e.marketplaceNoReadme]),ht=(0,x.useCallback)(async(t,n)=>{Qe(t),R(e=>({...e,[t]:n})),E(null);try{return await he(t,n),await Y({silent:!0}),!0}catch(n){return R(e=>{let{[t]:n,...r}=e;return r}),X(`error`,n instanceof Error?n.message:e.skillToggleFailed),!1}finally{Qe(null),R(e=>{let{[t]:n,...r}=e;return r})}},[Y,X,e.skillToggleFailed]),gt=(0,x.useCallback)(async()=>{E(null),l(!0),f(null);try{await Me()}catch(t){f(t instanceof Error?t.message:e.reloadFailed),l(!1);return}await Y()},[Y,e.reloadFailed]),_t=(0,x.useMemo)(()=>{let e=o.filter(e=>e.source===`builtin`);return{total:e.length,enabled:e.filter(e=>L[e.name]??e.enabled).length}},[o,L]),vt=(0,x.useMemo)(()=>{let e=o.filter(e=>e.source!==`builtin`);return{total:e.length,enabled:e.filter(e=>L[e.name]??e.enabled).length}},[o,L]),yt=(0,x.useMemo)(()=>B?o.find(e=>e.name===B):void 0,[o,B]),bt=yt==null?!0:L[B]??yt.enabled,xt=(0,x.useMemo)(()=>{let e=C.trim().toLowerCase(),t=o;return D===`builtin`?t=t.filter(e=>e.source===`builtin`):(t=t.filter(e=>e.source!==`builtin`),k!==`all`&&(t=t.filter(e=>e.source===k))),e?t.filter(t=>[t.name,t.description,t.directoryId,t.path,t.source,t.hub?.source,t.hub?.ref].filter(Boolean).join(` `).toLowerCase().includes(e)):t},[o,C,D,k]),St=async t=>{E(null),h(!0),f(null);try{let n;try{n=await Be(t)}catch{f(e.invalidFile),X(`error`,e.invalidFile);return}await te(n,{overwrite:!0}),await Y(),X(`success`,e.installSuccess),A(!1),M(null),O(`user`)}catch(t){f(t instanceof Error?t.message:e.uploadFailed),X(`error`,t instanceof Error?t.message:e.uploadFailed)}finally{h(!1)}},Ct=()=>{j&&St(j)},wt=e=>{let t=e.target.files?.[0];e.target.value=``,t&&M(t)},Tt=e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer.types.includes(`Files`)&&(N(!0),e.dataTransfer.dropEffect=`copy`)},Et=e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||N(!1)},Dt=e=>{e.preventDefault(),e.stopPropagation(),N(!1);let t=e.dataTransfer?.files?.[0];t&&M(t)},Ot=t=>{switch(t){case`builtin`:return e.source.builtin;case`workspace`:return e.source.workspace;case`global`:return e.source.global;case`extra`:return e.source.extra;default:return t}},kt=async()=>{let t=F;if(P(!1),I(null),t){E(null);try{await de(t),await Y()}catch(t){f(t instanceof Error?t.message:e.deleteFailed)}}},Z=(0,x.useCallback)(e=>o.some(t=>t.name===e),[o]),At=(0,x.useCallback)(async t=>{let n=Z(t);if(!(n&&!window.confirm(e.marketplaceReinstallConfirm))){E(null),ft(t);try{await ce({name:t,overwrite:n}),await Y({silent:!0}),X(`success`,e.installSuccess),z(!1),O(`user`)}catch(t){X(`error`,t instanceof Error?t.message:e.uploadFailed)}finally{ft(null)}}},[Z,Y,X,e.installSuccess,e.marketplaceReinstallConfirm,e.uploadFailed]),jt=k===`all`?e.filterAll:k===`global`?e.filterGlobal:k===`workspace`?e.filterWorkspace:e.filterExtra,Mt=Te(e=>e.setPageHeader),Q=Te(e=>e.clearPageHeader),{pathname:Nt}=_e(),Pt=Nt.startsWith(`/settings/`),$=(0,x.useMemo)(()=>(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2`,children:[(0,S.jsx)(u,{type:`button`,variant:`ghost`,className:`h-9 w-9 shrink-0 p-0`,disabled:c,title:e.reloadRuntime,"aria-label":e.reloadDiskAria,onClick:()=>void gt(),children:(0,S.jsx)(me,{className:i(`size-4`,c&&`animate-spin`),strokeWidth:1.75})}),(0,S.jsxs)(`label`,{className:`relative flex min-h-9 min-w-0 max-w-sm cursor-text items-center rounded-pill border border-edge bg-surface-base py-1.5 pl-9 pr-3 shadow-surface dark:bg-surface-hover/40 sm:max-w-md`,children:[(0,S.jsx)(Se,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-disabled`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`input`,{type:`text`,role:`searchbox`,enterKeyHint:`search`,value:C,onChange:e=>w(e.target.value),placeholder:e.searchPlaceholder,autoComplete:`off`,spellCheck:!1,className:`min-w-0 flex-1 appearance-none border-0 bg-transparent py-0.5 text-sm leading-normal text-fg caret-current placeholder:text-fg-disabled focus:border-0 focus:shadow-none focus:outline-none focus:ring-0 focus-visible:outline-none`})]}),(0,S.jsxs)(u,{type:`button`,variant:`primary`,className:`shrink-0 gap-2`,onClick:()=>{M(null),A(!0)},children:[(0,S.jsx)(le,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),e.installCta]})]}),[c,gt,C,A,M,w,e.installCta,e.reloadDiskAria,e.reloadRuntime,e.searchPlaceholder]);return(0,x.useLayoutEffect)(()=>!t||Pt?(Q(),()=>Q()):(Mt({startExtra:null,main:null,end:$}),()=>Q()),[Q,t,Pt,Mt,$]),t?(0,S.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto bg-surface-panel`,children:[(0,S.jsxs)(`div`,{className:`mx-auto flex w-full max-w-app-main flex-col gap-6 px-4 py-6 sm:px-8`,children:[T?(0,S.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:i(`rounded-xl border px-3 py-2 text-sm`,T.kind===`success`?`border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-900/40 dark:bg-emerald-950/40 dark:text-emerald-200`:`border-red-200 bg-red-50 text-red-800 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-200`),children:T.message}):xe?(0,S.jsx)(`div`,{className:`rounded-xl border border-edge bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-edge dark:bg-red-950/40 dark:text-red-300`,role:`alert`,children:xe}):null,(0,S.jsx)(`header`,{className:`flex flex-col gap-4`,children:(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-fg`,children:e.title}),(0,S.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm text-fg-muted`,children:e.tagline})]})}),Pt?(0,S.jsx)(`div`,{className:`flex flex-col gap-3 border-b border-edge-subtle pb-4 dark:border-edge-subtle sm:flex-row sm:flex-wrap sm:items-center sm:justify-end`,children:$}):null,(0,S.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-edge-subtle pb-3 sm:flex-row sm:items-center sm:justify-between dark:border-edge-subtle`,children:[(0,S.jsxs)(`div`,{className:`flex gap-1`,role:`tablist`,"aria-label":e.skillsNavAria,children:[(0,S.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":D===`builtin`,className:i(`relative rounded-md px-3 py-2 text-sm font-medium transition-colors`,D===`builtin`?`text-fg`:`text-fg-muted hover:text-fg`,D===`builtin`&&`after:absolute after:bottom-0 after:left-1/2 after:h-0.5 after:w-9 after:-translate-x-1/2 after:rounded-full after:bg-accent`),onClick:()=>O(`builtin`),children:[e.tabBuiltin,(0,S.jsxs)(`span`,{className:`ml-1 tabular-nums text-fg-muted`,children:[`(`,_t.enabled,`/`,_t.total,`)`]})]}),(0,S.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":D===`user`,className:i(`relative rounded-md px-3 py-2 text-sm font-medium transition-colors`,D===`user`?`text-fg`:`text-fg-muted hover:text-fg`,D===`user`&&`after:absolute after:bottom-0 after:left-1/2 after:h-0.5 after:w-9 after:-translate-x-1/2 after:rounded-full after:bg-accent`),onClick:()=>O(`user`),children:[e.tabUser,(0,S.jsxs)(`span`,{className:`ml-1 tabular-nums text-fg-muted`,children:[`(`,vt.enabled,`/`,vt.total,`)`]})]}),(0,S.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":D===`marketplace`,className:i(`relative rounded-md px-3 py-2 text-sm font-medium transition-colors`,D===`marketplace`?`text-fg`:`text-fg-muted hover:text-fg`,D===`marketplace`&&`after:absolute after:bottom-0 after:left-1/2 after:h-0.5 after:w-9 after:-translate-x-1/2 after:rounded-full after:bg-accent`),onClick:()=>O(`marketplace`),children:e.tabMarketplace})]}),(0,S.jsxs)(`div`,{className:i(`flex min-w-0 items-center gap-2`,D===`user`?`flex-nowrap overflow-x-auto pb-0.5 sm:justify-end`:`flex-wrap sm:justify-end`),children:[D===`user`?(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,className:i(`inline-flex h-9 min-h-9 min-w-[9rem] shrink-0 items-center gap-1.5 rounded-lg border border-edge bg-surface-panel px-2.5 text-xs font-medium text-fg shadow-surface`,s.transition,s.focusRingPanel),children:[(0,S.jsx)(ke,{className:`size-3.5 text-fg-muted`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`span`,{children:jt}),(0,S.jsx)(ue,{className:`size-3.5 text-fg-subtle`,strokeWidth:1.75,"aria-hidden":!0})]})}),(0,S.jsx)(y,{children:(0,S.jsx)(b,{className:`z-50 min-w-[10rem] rounded-xl border border-edge bg-surface-panel p-1 shadow-popover dark:border-edge`,sideOffset:6,align:`end`,children:[`all`,`global`,`workspace`,`extra`].map(t=>(0,S.jsx)(v,{className:i(`cursor-pointer rounded-lg px-3 py-2 text-sm text-fg outline-none`,`hover:bg-surface-hover data-[highlighted]:bg-surface-hover`),onSelect:()=>qe(t),children:t===`all`?e.filterAll:t===`global`?e.filterGlobal:t===`workspace`?e.filterWorkspace:e.filterExtra},t))})})]}):null,D===`marketplace`?(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,className:i(`inline-flex h-9 min-h-9 min-w-[9rem] shrink-0 items-center gap-1.5 rounded-lg border border-edge bg-surface-panel px-2.5 text-xs font-medium text-fg shadow-surface`,s.transition,s.focusRingPanel),children:[(0,S.jsx)(ke,{className:`size-3.5 text-fg-muted`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`span`,{children:G===`newest`?e.marketplaceSortNewest:e.marketplaceSortDownloads}),(0,S.jsx)(ue,{className:`size-3.5 text-fg-subtle`,strokeWidth:1.75,"aria-hidden":!0})]})}),(0,S.jsx)(y,{children:(0,S.jsxs)(b,{className:`z-50 min-w-[10rem] rounded-xl border border-edge bg-surface-panel p-1 shadow-popover dark:border-edge`,sideOffset:6,align:`end`,children:[(0,S.jsx)(v,{className:i(`cursor-pointer rounded-lg px-3 py-2 text-sm text-fg outline-none`,`hover:bg-surface-hover data-[highlighted]:bg-surface-hover`),onSelect:()=>at(`downloads`),children:e.marketplaceSortDownloads}),(0,S.jsx)(v,{className:i(`cursor-pointer rounded-lg px-3 py-2 text-sm text-fg outline-none`,`hover:bg-surface-hover data-[highlighted]:bg-surface-hover`),onSelect:()=>at(`newest`),children:e.marketplaceSortNewest})]})})]}):null]})]}),D===`marketplace`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-fg-subtle`,children:e.sectionMarketplace}),q?(0,S.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base dark:border-edge-subtle`,"aria-busy":`true`,"aria-label":e.loading,children:Array.from({length:Ve},(e,t)=>(0,S.jsx)(He,{},t))}):ct?(0,S.jsx)(`div`,{className:`rounded-xl border border-edge bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-edge dark:bg-red-950/40 dark:text-red-300`,role:`alert`,children:ct}):!J||J.items.length===0?(0,S.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:e.marketplaceEmpty}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base dark:border-edge-subtle`,children:J.items.map(t=>{let n=Z(t.name),r=dt===t.name;return(0,S.jsxs)(`article`,{className:i(`group relative flex flex-col gap-3 border-b border-edge-subtle px-4 py-3.5 last:border-b-0 sm:flex-row sm:items-center`,`transition-colors hover:bg-surface-hover/50 dark:hover:bg-surface-hover/25`),children:[(0,S.jsxs)(`button`,{type:`button`,className:i(`flex min-w-0 flex-1 cursor-pointer items-start gap-4 rounded-xl text-left outline-none`,s.focusRingPanel),onClick:()=>void mt(t.name),children:[(0,S.jsx)(Fe,{name:t.name}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1 pr-2`,children:[(0,S.jsx)(`h3`,{className:`text-[15px] font-semibold leading-snug tracking-tight text-fg`,children:t.name}),(0,S.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-sm leading-relaxed text-fg-muted`,title:t.description||void 0,children:t.description||`—`}),(0,S.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap gap-1.5 text-[11px] text-fg-subtle`,children:[(0,S.jsxs)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:[e.marketplaceAuthor,`: `,t.author.username]}),(0,S.jsxs)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:[e.marketplaceDownloads,`: `,t.downloads]}),t.latestVersion?(0,S.jsxs)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 font-mono text-[10px] dark:bg-surface-active/50`,children:[e.marketplaceVersion,`: `,t.latestVersion]}):null,n?(0,S.jsx)(`span`,{className:`rounded-md bg-emerald-500/15 px-2 py-0.5 text-emerald-800 dark:text-emerald-200`,children:e.marketplaceInstalled}):null]})]})]}),(0,S.jsx)(`div`,{className:`flex shrink-0 justify-end sm:pl-2`,children:(0,S.jsx)(u,{type:`button`,variant:n?`secondary`:`primary`,className:`min-w-[6.5rem]`,disabled:r||q,onClick:()=>void At(t.name),children:r?e.uploading:n?e.marketplaceReinstall:e.marketplaceInstall})})]},t.id)})}),(0,S.jsxs)(`div`,{className:`flex flex-col items-center justify-between gap-3 sm:flex-row`,children:[(0,S.jsx)(`p`,{className:`text-center text-xs text-fg-muted sm:text-left`,children:Ne(e.marketplacePageStatus,{page:J.meta.page,totalPages:J.meta.totalPages,total:J.meta.total})}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(u,{type:`button`,variant:`ghost`,className:`h-9 gap-1 px-2`,disabled:q||K<=1,"aria-label":e.marketplacePagePrev,onClick:()=>ot(e=>Math.max(1,e-1)),children:[(0,S.jsx)(oe,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:e.marketplacePagePrev})]}),(0,S.jsxs)(u,{type:`button`,variant:`ghost`,className:`h-9 gap-1 px-2`,disabled:q||K>=J.meta.totalPages,"aria-label":e.marketplacePageNext,onClick:()=>ot(e=>Math.min(J.meta.totalPages,e+1)),children:[(0,S.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:e.marketplacePageNext}),(0,S.jsx)(re,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0})]})]})]})]})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wide text-fg-subtle`,children:D===`builtin`?e.sectionBuiltinList:e.sectionUser}),c?(0,S.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base dark:border-edge-subtle`,"aria-busy":`true`,"aria-label":e.loading,children:Array.from({length:Ve},(e,t)=>(0,S.jsx)(He,{},t))}):o.length===0?(0,S.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:e.empty}):xt.length===0?(0,S.jsx)(`div`,{className:`rounded-2xl border border-dashed border-edge py-16 text-center text-sm text-fg-muted`,children:e.noSearchResults}):(0,S.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base dark:border-edge-subtle`,children:xt.map(t=>(0,S.jsxs)(`article`,{className:i(`group relative flex items-center gap-4 border-b border-edge-subtle px-4 py-3.5 last:border-b-0`,`transition-colors hover:bg-surface-hover/50 dark:hover:bg-surface-hover/25`),children:[(0,S.jsxs)(`button`,{type:`button`,className:i(`flex min-w-0 flex-1 cursor-pointer items-center gap-4 rounded-lg text-left outline-none`,s.focusRingPanel),onClick:()=>void pt(t),children:[(0,S.jsx)(Fe,{name:t.name}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1 pr-2`,children:[(0,S.jsx)(`h3`,{className:`text-[15px] font-semibold leading-snug tracking-tight text-fg`,children:t.name}),(0,S.jsx)(`p`,{className:`mt-0.5 truncate text-sm leading-relaxed text-fg-muted`,title:t.description?t.description:void 0,children:t.description||`—`}),D!==`builtin`||t.managed?(0,S.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap gap-1.5 text-[11px] text-fg-subtle`,children:[D===`builtin`?null:(0,S.jsx)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:Ot(t.source)}),t.managed?(0,S.jsxs)(`span`,{className:`rounded-md bg-surface-hover/60 px-2 py-0.5 dark:bg-surface-active/50`,children:[e.col.managed,`: `,e.yes]}):null,t.hub?(0,S.jsxs)(`span`,{className:`max-w-full truncate rounded-md bg-surface-hover/60 px-2 py-0.5 font-mono text-[10px] dark:bg-surface-active/50`,title:`${t.hub.source}${t.hub.ref?`\nref: ${t.hub.ref}`:``}\nupdated: ${t.hub.updatedAt}`,children:[e.hubRemote,` ·`,` `,t.hub.kind===`git`?e.hubKindGit:e.hubKindArchive,` ·`,` `,t.hub.source.length>48?`${t.hub.source.slice(0,48)}…`:t.hub.source]}):null]}):null]})]}),(0,S.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,onClick:e=>e.stopPropagation(),role:`presentation`,children:[t.managed?(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,className:i(`flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg`,s.focusRingPanel),"aria-label":e.col.actions,children:(0,S.jsx)(je,{className:`size-4`,strokeWidth:1.75})})}),(0,S.jsx)(y,{children:(0,S.jsx)(b,{className:`z-50 min-w-[8rem] rounded-xl border border-edge bg-surface-panel p-1 shadow-popover dark:border-edge`,sideOffset:4,align:`end`,children:(0,S.jsxs)(v,{className:i(`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-red-600 outline-none`,`hover:bg-red-50 data-[highlighted]:bg-red-50 dark:text-red-400 dark:hover:bg-red-950/40`),onSelect:()=>{I(t.directoryId),P(!0)},children:[(0,S.jsx)(Ae,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),e.delete]})})})]}):null,(0,S.jsx)(ze,{checked:L[t.name]??t.enabled,onChange:e=>void ht(t.name,e)})]})]},`${t.directoryId}-${t.path}`))})]})]})]}),(0,S.jsx)(d,{open:$e,onOpenChange:e=>{z(e),e||(tt(`catalog`),H(``),W(null),V(``))},children:(0,S.jsxs)(p,{children:[(0,S.jsx)(Ce,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),(0,S.jsxs)(Oe,{className:i(`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] flex max-h-[min(90vh,56rem)] w-[min(100%-2rem,min(92vw,56rem))] -translate-x-1/2 -translate-y-1/2 flex-col`,`rounded-2xl border border-edge bg-surface-panel shadow-float dark:border-edge`),children:[(0,S.jsxs)(`div`,{className:`group flex shrink-0 items-center gap-3 border-b border-edge px-4 py-3`,children:[(0,S.jsx)(Fe,{name:B||`?`}),(0,S.jsx)(ye,{className:`min-w-0 flex-1 truncate text-base font-semibold text-fg`,children:B||`—`}),(0,S.jsx)(we,{asChild:!0,children:(0,S.jsx)(`button`,{type:`button`,className:i(`rounded-lg p-1.5 text-fg-muted hover:bg-surface-hover hover:text-fg`,s.focusRingPanel),"aria-label":e.detailCloseAria,children:(0,S.jsx)(ve,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0})})})]}),(0,S.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2 border-b border-blue-200/80 bg-blue-50/95 px-4 py-2.5 text-sm text-fg dark:border-blue-900/50 dark:bg-blue-950/45`,children:[(0,S.jsx)(De,{className:`mt-0.5 size-4 shrink-0 text-blue-600 dark:text-blue-400`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`p`,{className:`leading-relaxed`,children:et===`store`?e.detailModalBannerStore:e.detailModalBanner})]}),(0,S.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4`,children:rt?(0,S.jsxs)(`div`,{className:`space-y-2`,"aria-busy":`true`,children:[(0,S.jsx)(`div`,{className:`h-4 w-2/3 animate-pulse rounded bg-surface-hover`}),(0,S.jsx)(`div`,{className:`h-4 w-full animate-pulse rounded bg-surface-hover`}),(0,S.jsx)(`div`,{className:`h-4 w-5/6 animate-pulse rounded bg-surface-hover`})]}):it?(0,S.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:it}):(0,S.jsx)(`div`,{className:`markdown-content min-w-0`,children:(0,S.jsx)(ge,{content:nt})})}),(0,S.jsx)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-4 py-3`,children:et===`store`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(u,{type:`button`,variant:`ghost`,onClick:()=>z(!1),children:e.cancel}),(0,S.jsx)(u,{type:`button`,variant:Z(B)?`secondary`:`primary`,disabled:!B||dt===B,onClick:()=>{B&&At(B)},children:dt===B?e.uploading:Z(B)?e.marketplaceReinstall:e.marketplaceInstall})]}):(0,S.jsx)(u,{type:`button`,variant:`primary`,disabled:!B||Ze===B,onClick:async()=>{B&&await ht(B,!bt)&&z(!1)},children:bt?e.detailModalDisable:e.detailModalEnable})})]})]})}),(0,S.jsx)(d,{open:Je,onOpenChange:e=>{A(e),e||(M(null),N(!1))},children:(0,S.jsxs)(p,{children:[(0,S.jsx)(Ce,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),(0,S.jsxs)(Oe,{className:i(`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] max-h-[min(100vh-2rem,44rem)] w-[min(100%-2rem,min(92vw,48rem))] -translate-x-1/2 -translate-y-1/2 overflow-y-auto`,`rounded-2xl border border-edge bg-surface-panel p-6 shadow-float dark:border-edge`),children:[(0,S.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,S.jsx)(ye,{className:`text-base font-semibold text-fg`,children:e.installModalTitle}),(0,S.jsx)(we,{asChild:!0,children:(0,S.jsxs)(`button`,{type:`button`,className:i(`rounded-lg p-1.5 text-fg-muted hover:bg-surface-hover hover:text-fg`,s.focusRingPanel),"aria-label":e.installClose,children:[(0,S.jsx)(ve,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0}),(0,S.jsx)(`span`,{className:`sr-only`,children:e.installClose})]})})]}),(0,S.jsxs)(`label`,{className:i(`mt-4 flex min-h-[11rem] cursor-pointer flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-12 text-center transition-colors`,Ye?`border-accent bg-accent-soft/60 dark:bg-blue-950/40`:`border-edge bg-surface-base dark:bg-surface-hover/30`),onDragLeave:Et,onDragOver:Tt,onDrop:Dt,children:[(0,S.jsx)(`input`,{type:`file`,accept:`.zip,.md,application/zip,text/markdown`,className:`sr-only`,"aria-label":e.installModalDropHint,disabled:m,onChange:wt}),(0,S.jsx)(be,{className:`size-12 text-fg-subtle`,strokeWidth:1.25,"aria-hidden":!0}),(0,S.jsx)(`span`,{className:`text-sm text-fg-muted`,children:e.installModalDropHint}),j?(0,S.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:j.name}):null]}),(0,S.jsxs)(`div`,{className:`mt-5 space-y-2`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:e.installModalReqTitle}),(0,S.jsxs)(`ul`,{className:`list-inside list-disc space-y-1 text-sm text-fg-muted`,children:[(0,S.jsx)(`li`,{children:e.installModalReq1}),(0,S.jsx)(`li`,{children:e.installModalReq2})]})]}),(0,S.jsx)(`button`,{type:`button`,disabled:!j||m,className:i(`mt-6 flex w-full items-center justify-center rounded-xl py-3 text-sm font-semibold`,`transition-colors`,!j||m?`cursor-not-allowed bg-surface-active text-fg-disabled`:`bg-accent text-white hover:bg-accent-hover`,s.focusRingPanel),onClick:()=>void Ct(),children:m?e.uploading:e.installAction})]})]})}),(0,S.jsx)(d,{open:Xe,onOpenChange:e=>{P(e),e||I(null)},children:(0,S.jsxs)(p,{children:[(0,S.jsx)(Ce,{className:`xopc-dialog-overlay fixed inset-0 z-[60] bg-scrim`}),(0,S.jsxs)(Oe,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[60] w-[min(100%-2rem,24rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-edge bg-surface-panel p-4 shadow-popover dark:border-edge`,children:[(0,S.jsx)(ye,{className:`text-base font-semibold text-fg`,children:e.deleteTitle}),(0,S.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:F?Ne(e.deleteMessage,{id:F}):``}),(0,S.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,S.jsx)(u,{type:`button`,variant:`secondary`,onClick:()=>P(!1),children:e.cancel}),(0,S.jsx)(u,{type:`button`,variant:`primary`,className:`bg-red-600 hover:bg-red-700`,onClick:()=>void kt(),children:e.deleteConfirm})]})]})]})})]}):(0,S.jsx)(`div`,{className:`mx-auto w-full max-w-app-main px-4 py-16 text-center text-sm text-fg-muted sm:px-8`,children:e.needToken})}export{Ue as SkillsPage};
|
|
3
|
-
//# sourceMappingURL=skills-page-lb7vYtlP.js.map
|