@nextclaw/ui 0.27.2 → 0.27.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/CHANGELOG.md +6 -0
- package/dist/.vite/manifest.json +415 -415
- package/dist/assets/{account-panel-svU9I6E6.js → account-panel-DiKpSvqS.js} +1 -1
- package/dist/assets/{agents-CtI89gpb.js → agents-lT-bDFex.js} +1 -1
- package/dist/assets/agents-nyTxTl89.js +1 -0
- package/dist/assets/{api-CI6_8Qt1.js → api-BaML_txv.js} +1 -1
- package/dist/assets/{app-presenter-provider-_UK6sArj.js → app-presenter-provider-DSlY9Lz6.js} +6 -6
- package/dist/assets/{appearance-settings-page-BhedtMx9.js → appearance-settings-page-BNIxFwEY.js} +1 -1
- package/dist/assets/apps-D7Se5AXs.js +1 -0
- package/dist/assets/{book-open-i_BjUBqL.js → book-open-oG0GrLyy.js} +1 -1
- package/dist/assets/{card-DokH7OBp.js → card-DxCOCY_7.js} +1 -1
- package/dist/assets/{channels-list-page-B7G9lHUm.js → channels-list-page-UQ1xjKw9.js} +1 -1
- package/dist/assets/{circle-dashed-Cx8CIEbg.js → circle-dashed-pgOOTUik.js} +1 -1
- package/dist/assets/{client-CUJUci3r.js → client-C1Z8ITVa.js} +1 -1
- package/dist/assets/{config-split-page-hY1xug28.js → config-split-page-Cfozkh5B.js} +1 -1
- package/dist/assets/{confirm-dialog-B-ejV666.js → confirm-dialog-BdEQiFoD.js} +1 -1
- package/dist/assets/{context-menu-dGVv8klA.js → context-menu-DVgLoPqH.js} +1 -1
- package/dist/assets/{createLucideIcon-reFMl-W-.js → createLucideIcon-D-7Sxfw7.js} +1 -1
- package/dist/assets/cron-wSJKKm6g.js +1 -0
- package/dist/assets/{desktop-capabilities-page-CYJTQ3nC.js → desktop-capabilities-page-gakZ5UKX.js} +1 -1
- package/dist/assets/{desktop-update-config-guKAozXO.js → desktop-update-config-CVUwJyV-.js} +1 -1
- package/dist/assets/{dialog-DLOwdjT1.js → dialog-InO6RVpm.js} +1 -1
- package/dist/assets/{dist-ZaFFmAGl.js → dist-BxOjfeaD.js} +1 -1
- package/dist/assets/doc-browser-Cuedjp9j.js +1 -0
- package/dist/assets/{doc-browser-context-CTmOmuqa.js → doc-browser-context-Bs122rxO.js} +1 -1
- package/dist/assets/{download-DovI3Yvf.js → download-BN4aCzSx.js} +1 -1
- package/dist/assets/{extensions-BZ3qrM8M.js → extensions-hxS830nS.js} +1 -1
- package/dist/assets/{external-link-DUD3AbsF.js → external-link-NwtWKzE2.js} +1 -1
- package/dist/assets/{form-actions-B8VniHts.js → form-actions-XP38NiPw.js} +1 -1
- package/dist/assets/{i18n-IGQbjBqS.js → i18n-Bzo4IocH.js} +2 -2
- package/dist/assets/inbox-CnpKPeFb.js +1 -0
- package/dist/assets/{inbox-ClAG7SI_.js → inbox-DofXi7Xv.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-settings-page-B5oxyPS2.js → keyboard-shortcuts-settings-page-Cn3zyBq_.js} +1 -1
- package/dist/assets/login-page-3Yv6FU7k.js +1 -0
- package/dist/assets/{login-page-DYaozpzz.js → login-page-CkfjjXD2.js} +1 -1
- package/dist/assets/{main-gFUvLF57.js → main-BI7BtvLx.js} +2 -2
- package/dist/assets/main-i18n-catalog.config-ykBbOfNP.js +1 -0
- package/dist/assets/marketplace-BkdTZexc.js +1 -0
- package/dist/assets/mcp-marketplace-page-BqFum360.js +1 -0
- package/dist/assets/{model-config-page-Cduyz2Hy.js → model-config-page-BCGCP2Wc.js} +1 -1
- package/dist/assets/{navigation-link-D-JSWFxj.js → navigation-link-tawg3qi2.js} +1 -1
- package/dist/assets/panel-app-i18n-catalog.config-DEFg3R5S.js +1 -0
- package/dist/assets/panel-apps-CRjFqZZD.js +1 -0
- package/dist/assets/{panelStandalone-oHxbXvYt.js → panelStandalone-smtUeY2k.js} +2 -2
- package/dist/assets/plus-v29lPO18.js +1 -0
- package/dist/assets/{privacy-settings-page-DG9E8N-F.js → privacy-settings-page-D4TI_vdw.js} +1 -1
- package/dist/assets/{projects-DvHyoKIF.js → projects-Rm2oKUPt.js} +1 -1
- package/dist/assets/{provider-models-COzjYl29.js → provider-models-CWtoV3BJ.js} +1 -1
- package/dist/assets/{provider-scoped-model-input-Cvy74uj8.js → provider-scoped-model-input-DJzdGBE8.js} +1 -1
- package/dist/assets/{providers-config-page-7rCwVnhh.js → providers-config-page-gzLkTzMP.js} +1 -1
- package/dist/assets/{puzzle-C5Wfpjk_.js → puzzle-CXL_z0vz.js} +1 -1
- package/dist/assets/{pwa-CAg_9zFs.js → pwa-Blsqtn1m.js} +1 -1
- package/dist/assets/{refresh-cw-OhwaPDn1.js → refresh-cw-CqsHJPqR.js} +1 -1
- package/dist/assets/remote-DTe4pS7P.js +1 -0
- package/dist/assets/{rotate-cw-aBponvp7.js → rotate-cw-DS-Gca0a.js} +1 -1
- package/dist/assets/{runtime-config-page-FI2pk3HH.js → runtime-config-page-B5CCnrei.js} +1 -1
- package/dist/assets/{save-394QCMXn.js → save-CwxRo7hc.js} +1 -1
- package/dist/assets/{search-BG2qAlNZ.js → search-Drx-sMCE.js} +1 -1
- package/dist/assets/{search-config-page-D4LeiB9y.js → search-config-page-BjVONAIH.js} +1 -1
- package/dist/assets/{secrets-config-page-BzGcr5Vw.js → secrets-config-page-BB32noHT.js} +1 -1
- package/dist/assets/security-config--ilpaAEr.js +1 -0
- package/dist/assets/{select-xUXYV0Gr.js → select-DHYR109w.js} +1 -1
- package/dist/assets/{service-apps-panel-BTqXn0pg.js → service-apps-panel-DOKGtwsR.js} +1 -1
- package/dist/assets/{settings-2-CWOGRRaA.js → settings-2-DAPjKYtK.js} +1 -1
- package/dist/assets/{status-dot-CYifnSnt.js → status-dot-xxVxbdQr.js} +1 -1
- package/dist/assets/{tag-chip-CjM6lyeh.js → tag-chip-0lQj9HFa.js} +1 -1
- package/dist/assets/{theme-provider-BToFZGZG.js → theme-provider-DDJOlUxn.js} +1 -1
- package/dist/assets/{trash-2-DvJ6duOW.js → trash-2-B8mbrtCx.js} +1 -1
- package/dist/assets/{use-config-COusaY5p.js → use-config-BpKXDcM_.js} +1 -1
- package/dist/assets/{use-desktop-capabilities-B-u6ojjW.js → use-desktop-capabilities-C1bXk7fx.js} +1 -1
- package/dist/assets/{use-viewport-layout-IKKGpjzF.js → use-viewport-layout-D6seoW0Z.js} +1 -1
- package/dist/assets/{x-E9VB4HQx.js → x-DLvS4xvV.js} +1 -1
- package/dist/index.html +36 -36
- package/dist/panel-standalone.html +14 -14
- package/package.json +3 -3
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-input-top-slot.test.tsx +71 -0
- package/src/features/chat/features/conversation/components/session-conversation-input-top-slot.tsx +6 -7
- package/src/shared/lib/i18n/locales/en-US/chat.json +0 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +0 -1
- package/dist/assets/agents-DWygCmAK.js +0 -1
- package/dist/assets/apps-C4c4NXqB.js +0 -1
- package/dist/assets/cron-DkYSmE-f.js +0 -1
- package/dist/assets/doc-browser-B0zg0EXA.js +0 -1
- package/dist/assets/inbox-CJBCLB1X.js +0 -1
- package/dist/assets/login-page-BxSMwUsc.js +0 -1
- package/dist/assets/main-i18n-catalog.config-itg3Gvzp.js +0 -1
- package/dist/assets/marketplace-DsAf_rnt.js +0 -1
- package/dist/assets/mcp-marketplace-page-BqUz09cj.js +0 -1
- package/dist/assets/panel-app-i18n-catalog.config-BfLHr1tc.js +0 -1
- package/dist/assets/panel-apps-Bg5Fzm3T.js +0 -1
- package/dist/assets/plus-DUdl68Eo.js +0 -1
- package/dist/assets/remote-Dhr4K1oK.js +0 -1
- package/dist/assets/security-config-vD_V0BQF.js +0 -1
package/dist/assets/{appearance-settings-page-BhedtMx9.js → appearance-settings-page-BNIxFwEY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{n as t,o as n,w as r}from"./theme-provider-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{n as t,o as n,w as r}from"./theme-provider-DDJOlUxn.js";import{Jt as i,Kt as a,Ut as o,Zt as s,_n as c,qt as l,ur as u,xr as d}from"./api-BaML_txv.js";import{o as f,tt as p}from"./app-presenter-provider-DSlY9Lz6.js";import{B as m}from"./dist-BxOjfeaD.js";import{c as h,s as g}from"./i18n-Bzo4IocH.js";import{a as _,i as v,n as y,r as b,t as x}from"./select-DHYR109w.js";var S=e(d(),1);function C(){let{language:e,setLanguage:t}=n();return{currentLanguage:e,currentLanguageLabel:h.find(t=>t.value===e)?.label??e,languageOptions:h,selectLanguage:(0,S.useCallback)(n=>{e!==n&&(t(n),window.location.reload())},[e,t])}}var w=u(),T=[{value:`card`,labelKey:`chatMessageLayoutCard`,descriptionKey:`chatMessageLayoutCardDescription`},{value:`flat`,labelKey:`chatMessageLayoutFlat`,descriptionKey:`chatMessageLayoutFlatDescription`}];function E(){let{theme:e,setTheme:n}=t(),{currentLanguage:u,languageOptions:d,selectLanguage:h}=C(),S=p(e=>e.layout),E=p(e=>e.setLayout),D=f(e=>e.isVisible),O=f(e=>e.setVisible);return(0,w.jsx)(s,{title:g(`appearance`),children:(0,w.jsx)(i,{children:(0,w.jsxs)(l,{children:[(0,w.jsx)(a,{title:g(`theme`),control:(0,w.jsxs)(x,{value:e,onValueChange:e=>n(e),children:[(0,w.jsx)(v,{"aria-label":g(`theme`),className:`w-36 sm:w-44`,children:(0,w.jsx)(_,{})}),(0,w.jsx)(y,{children:r.map(e=>(0,w.jsx)(b,{value:e.value,children:g(e.labelKey)},e.value))})]})}),(0,w.jsx)(a,{title:g(`language`),control:(0,w.jsxs)(x,{value:u,onValueChange:e=>h(e),children:[(0,w.jsx)(v,{"aria-label":g(`language`),className:`w-36 sm:w-44`,children:(0,w.jsx)(_,{})}),(0,w.jsx)(y,{children:d.map(e=>(0,w.jsx)(b,{value:e.value,children:e.label},e.value))})]})}),(0,w.jsx)(a,{title:g(`chatMessageLayoutTitle`),description:g(`chatMessageLayoutDescription`),layout:`stacked`,children:(0,w.jsx)(`div`,{role:`radiogroup`,"aria-label":g(`chatMessageLayoutTitle`),className:`grid gap-1 rounded-xl bg-background/65 p-1 sm:grid-cols-2`,children:T.map(e=>{let t=e.value===S;return(0,w.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>E(e.value),className:c(`flex min-w-0 items-start gap-3 rounded-lg px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,t?`bg-[var(--interaction-selection)] text-foreground`:`text-muted-foreground hover:bg-[var(--interaction-hover)] hover:text-foreground`),children:[(0,w.jsx)(`span`,{className:c(`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full ring-1`,t?`bg-primary text-primary-foreground ring-primary`:`bg-background ring-border`),children:t?(0,w.jsx)(m,{className:`h-2.5 w-2.5`,strokeWidth:3}):null}),(0,w.jsxs)(`span`,{className:`min-w-0`,children:[(0,w.jsx)(`span`,{className:`block text-sm font-medium`,children:g(e.labelKey)}),(0,w.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-muted-foreground`,children:g(e.descriptionKey)})]})]},e.value)})})}),(0,w.jsx)(a,{title:g(`sideDockVisibilityTitle`),description:g(`sideDockVisibilityDescription`),control:(0,w.jsx)(o,{id:`appearance-side-dock-visible`,"aria-label":g(`sideDockVisibilityTitle`),checked:D,onCheckedChange:O})})]})})})}export{E as AppearanceSettingsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{st as e}from"./app-presenter-provider-DSlY9Lz6.js";export{e as AppsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-D-7Sxfw7.js";var t=e(`BookOpen`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-BaML_txv.js";var i=e(r(),1),a=n(),o=i.forwardRef(({className:e,hover:n=!0,surface:r=`raised`,...i},o)=>(0,a.jsx)(`div`,{ref:o,className:t(`rounded-2xl border bg-card text-card-foreground transition-colors duration-base`,r===`raised`?`border-border shadow-card`:`border-border/75 shadow-none`,n&&r===`raised`&&`hover:border-primary/25 hover:shadow-card-hover`,n&&r===`flat`&&`hover:bg-[var(--interaction-hover)]`,e),...i}));o.displayName=`Card`;var s=i.forwardRef(({className:e,...n},r)=>(0,a.jsx)(`div`,{ref:r,className:t(`flex flex-col space-y-1.5 p-6`,e),...n}));s.displayName=`CardHeader`;var c=i.forwardRef(({className:e,...n},r)=>(0,a.jsx)(`h3`,{ref:r,className:t(`text-[15px] font-semibold leading-tight tracking-tight text-foreground`,e),...n}));c.displayName=`CardTitle`;var l=i.forwardRef(({className:e,...n},r)=>(0,a.jsx)(`p`,{ref:r,className:t(`text-[13px] text-muted-foreground leading-relaxed`,e),...n}));l.displayName=`CardDescription`;var u=i.forwardRef(({className:e,...n},r)=>(0,a.jsx)(`div`,{ref:r,className:t(`p-6 pt-0`,e),...n}));u.displayName=`CardContent`;var d=i.forwardRef(({className:e,...n},r)=>(0,a.jsx)(`div`,{ref:r,className:t(`flex items-center justify-between p-6 pt-0`,e),...n}));d.displayName=`CardFooter`;export{c as a,s as i,u as n,l as r,o as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./chunk-DF37yw5_.js";import{Gt as n,Lt as r,Mt as i,Nt as a,Qn as o,Ut as s,Wt as c,Xn as l,Yt as u,Zn as d,Zt as f,_n as p,jt as m,lr as h,qn as g,ur as _,xr as v}from"./api-CI6_8Qt1.js";import{t as y}from"./navigation-link-D-JSWFxj.js";import{t as b}from"./createLucideIcon-reFMl-W-.js";import{t as x}from"./search-BG2qAlNZ.js";import{t as S}from"./book-open-i_BjUBqL.js";import{z as C}from"./dist-ZaFFmAGl.js";import{t as w}from"./external-link-DUD3AbsF.js";import{a as ee,i as T,n as E,r as te,t as ne}from"./x-E9VB4HQx.js";import{i as re,t as ie}from"./use-viewport-layout-IKKGpjzF.js";import{l as ae,n as oe,s as D}from"./i18n-IGQbjBqS.js";import{a as O,i as se,n as k,o as ce,r as le,t as ue}from"./tag-chip-CjM6lyeh.js";import{n as de,t as fe}from"./status-dot-CYifnSnt.js";import{a as A,i as j,n as M,r as N,t as P}from"./select-xUXYV0Gr.js";import{g as pe,n as F,r as me,s as he,t as I}from"./use-config-COusaY5p.js";import{t as ge}from"./form-actions-B8VniHts.js";import{t as L}from"./config-hints-CaB3I7KP.js";import{a as _e,c as R,i as ve,l as ye,n as be,o as z,r as xe,s as Se,t as Ce}from"./config-split-page-hY1xug28.js";var we=b(`Hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Te=b(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),B=b(`MessageCircleMore`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}]]),V=b(`QrCode`,[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]),Ee=b(`ToggleLeft`,[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`6`,ry:`6`,key:`f2vt7d`}],[`circle`,{cx:`8`,cy:`12`,r:`2`,key:`1nvbw3`}]]),H=e(v(),1),U=_();function De({value:e,onChange:t,className:n,placeholder:r=``}){let[i,a]=(0,H.useState)(``),o=n=>{n.key===`Enter`&&i.trim()?(n.preventDefault(),t([...e,i.trim()]),a(``)):n.key===`Backspace`&&!i&&e.length>0&&t(e.slice(0,-1))},s=n=>{t(e.filter((e,t)=>t!==n))};return(0,U.jsxs)(`div`,{className:p(`flex min-h-[42px] flex-wrap gap-2 rounded-xl border border-gray-200/80 bg-white p-2`,n),children:[e.map((e,t)=>(0,U.jsxs)(ue,{tone:`info`,className:`gap-1 px-2 py-1 text-sm`,children:[e,(0,U.jsx)(`button`,{type:`button`,onClick:()=>s(t),className:`transition-colors hover:text-rose-200`,children:(0,U.jsx)(ne,{className:`h-3 w-3`})})]},t)),(0,U.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onKeyDown:o,className:`flex-1 outline-none min-w-[100px] bg-transparent text-sm`,placeholder:r||D(`enterTag`)})]})}function Oe(e){return e.includes(`token`)||e.includes(`secret`)||e.includes(`password`)?(0,U.jsx)(re,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`url`)||e.includes(`host`)?(0,U.jsx)(ee,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`email`)||e.includes(`mail`)?(0,U.jsx)(Te,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`id`)||e.includes(`from`)?(0,U.jsx)(we,{className:`h-3.5 w-3.5 text-gray-500`}):e===`enabled`||e===`consentGranted`?(0,U.jsx)(Ee,{className:`h-3.5 w-3.5 text-gray-500`}):(0,U.jsx)(E,{className:`h-3.5 w-3.5 text-gray-500`})}function ke({channelName:e,fields:t,formData:r,jsonDrafts:i,setJsonDrafts:a,updateField:o,uiHints:l}){return(0,U.jsx)(U.Fragment,{children:t.map(t=>{let u=L(`channels.${e}.${t.name}`,l),d=u?.label??t.label,f=u?.placeholder;return(0,U.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,U.jsxs)(c,{htmlFor:t.name,className:`flex items-center gap-2 text-sm font-medium text-gray-900`,children:[Oe(t.name),d]}),t.type===`boolean`&&(0,U.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl bg-gray-50 p-3`,children:[(0,U.jsx)(`span`,{className:`text-sm text-gray-500`,children:r[t.name]?D(`enabled`):D(`disabled`)}),(0,U.jsx)(s,{id:t.name,checked:r[t.name]||!1,onCheckedChange:e=>o(t.name,e),className:`data-[state=checked]:bg-emerald-500`})]}),(t.type===`text`||t.type===`email`)&&(0,U.jsx)(n,{id:t.name,type:t.type,value:r[t.name]||``,onChange:e=>o(t.name,e.target.value),placeholder:f,className:`rounded-xl`}),t.type===`password`&&(0,U.jsx)(n,{id:t.name,type:`password`,value:r[t.name]||``,onChange:e=>o(t.name,e.target.value),placeholder:f??D(`leaveBlankToKeepUnchanged`),className:`rounded-xl`}),t.type===`number`&&(0,U.jsx)(n,{id:t.name,type:`number`,value:r[t.name]||0,onChange:e=>o(t.name,parseInt(e.target.value,10)||0),placeholder:f,className:`rounded-xl`}),t.type===`tags`&&(0,U.jsx)(De,{value:r[t.name]||[],onChange:e=>o(t.name,e)}),t.type===`select`&&(0,U.jsxs)(P,{value:r[t.name]||``,onValueChange:e=>o(t.name,e),children:[(0,U.jsx)(j,{className:`rounded-xl`,children:(0,U.jsx)(A,{})}),(0,U.jsx)(M,{children:(t.options??[]).map(e=>(0,U.jsx)(N,{value:e.value,children:e.label},e.value))})]}),t.type===`json`&&(0,U.jsx)(`textarea`,{id:t.name,value:i[t.name]??`{}`,onChange:e=>a(n=>({...n,[t.name]:e.target.value})),className:`min-h-[120px] w-full resize-none rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono`})]},t.name)})})}var Ae=t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),W=t((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),G=t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),je=t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),Me=t(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),Ne=t((e=>{var t=W().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),Pe=t((e=>{var t=W().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),Fe=t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),K=t((e=>{var t=G(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),Ie=t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),Le=t((e=>{var t=Ie();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),Re=t(((e,t)=>{var n=Le();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),q=t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),ze=t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
1
|
+
import{i as e,t}from"./chunk-DF37yw5_.js";import{Gt as n,Lt as r,Mt as i,Nt as a,Qn as o,Ut as s,Wt as c,Xn as l,Yt as u,Zn as d,Zt as f,_n as p,jt as m,lr as h,qn as g,ur as _,xr as v}from"./api-BaML_txv.js";import{t as y}from"./navigation-link-tawg3qi2.js";import{t as b}from"./createLucideIcon-D-7Sxfw7.js";import{t as x}from"./search-Drx-sMCE.js";import{t as S}from"./book-open-oG0GrLyy.js";import{z as C}from"./dist-BxOjfeaD.js";import{t as w}from"./external-link-NwtWKzE2.js";import{a as ee,i as T,n as E,r as te,t as ne}from"./x-DLvS4xvV.js";import{i as re,t as ie}from"./use-viewport-layout-D6seoW0Z.js";import{l as ae,n as oe,s as D}from"./i18n-Bzo4IocH.js";import{a as O,i as se,n as k,o as ce,r as le,t as ue}from"./tag-chip-0lQj9HFa.js";import{n as de,t as fe}from"./status-dot-xxVxbdQr.js";import{a as A,i as j,n as M,r as N,t as P}from"./select-DHYR109w.js";import{g as pe,n as F,r as me,s as he,t as I}from"./use-config-BpKXDcM_.js";import{t as ge}from"./form-actions-XP38NiPw.js";import{t as L}from"./config-hints-CaB3I7KP.js";import{a as _e,c as R,i as ve,l as ye,n as be,o as z,r as xe,s as Se,t as Ce}from"./config-split-page-Cfozkh5B.js";var we=b(`Hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Te=b(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),B=b(`MessageCircleMore`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}]]),V=b(`QrCode`,[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]),Ee=b(`ToggleLeft`,[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`6`,ry:`6`,key:`f2vt7d`}],[`circle`,{cx:`8`,cy:`12`,r:`2`,key:`1nvbw3`}]]),H=e(v(),1),U=_();function De({value:e,onChange:t,className:n,placeholder:r=``}){let[i,a]=(0,H.useState)(``),o=n=>{n.key===`Enter`&&i.trim()?(n.preventDefault(),t([...e,i.trim()]),a(``)):n.key===`Backspace`&&!i&&e.length>0&&t(e.slice(0,-1))},s=n=>{t(e.filter((e,t)=>t!==n))};return(0,U.jsxs)(`div`,{className:p(`flex min-h-[42px] flex-wrap gap-2 rounded-xl border border-gray-200/80 bg-white p-2`,n),children:[e.map((e,t)=>(0,U.jsxs)(ue,{tone:`info`,className:`gap-1 px-2 py-1 text-sm`,children:[e,(0,U.jsx)(`button`,{type:`button`,onClick:()=>s(t),className:`transition-colors hover:text-rose-200`,children:(0,U.jsx)(ne,{className:`h-3 w-3`})})]},t)),(0,U.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onKeyDown:o,className:`flex-1 outline-none min-w-[100px] bg-transparent text-sm`,placeholder:r||D(`enterTag`)})]})}function Oe(e){return e.includes(`token`)||e.includes(`secret`)||e.includes(`password`)?(0,U.jsx)(re,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`url`)||e.includes(`host`)?(0,U.jsx)(ee,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`email`)||e.includes(`mail`)?(0,U.jsx)(Te,{className:`h-3.5 w-3.5 text-gray-500`}):e.includes(`id`)||e.includes(`from`)?(0,U.jsx)(we,{className:`h-3.5 w-3.5 text-gray-500`}):e===`enabled`||e===`consentGranted`?(0,U.jsx)(Ee,{className:`h-3.5 w-3.5 text-gray-500`}):(0,U.jsx)(E,{className:`h-3.5 w-3.5 text-gray-500`})}function ke({channelName:e,fields:t,formData:r,jsonDrafts:i,setJsonDrafts:a,updateField:o,uiHints:l}){return(0,U.jsx)(U.Fragment,{children:t.map(t=>{let u=L(`channels.${e}.${t.name}`,l),d=u?.label??t.label,f=u?.placeholder;return(0,U.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,U.jsxs)(c,{htmlFor:t.name,className:`flex items-center gap-2 text-sm font-medium text-gray-900`,children:[Oe(t.name),d]}),t.type===`boolean`&&(0,U.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl bg-gray-50 p-3`,children:[(0,U.jsx)(`span`,{className:`text-sm text-gray-500`,children:r[t.name]?D(`enabled`):D(`disabled`)}),(0,U.jsx)(s,{id:t.name,checked:r[t.name]||!1,onCheckedChange:e=>o(t.name,e),className:`data-[state=checked]:bg-emerald-500`})]}),(t.type===`text`||t.type===`email`)&&(0,U.jsx)(n,{id:t.name,type:t.type,value:r[t.name]||``,onChange:e=>o(t.name,e.target.value),placeholder:f,className:`rounded-xl`}),t.type===`password`&&(0,U.jsx)(n,{id:t.name,type:`password`,value:r[t.name]||``,onChange:e=>o(t.name,e.target.value),placeholder:f??D(`leaveBlankToKeepUnchanged`),className:`rounded-xl`}),t.type===`number`&&(0,U.jsx)(n,{id:t.name,type:`number`,value:r[t.name]||0,onChange:e=>o(t.name,parseInt(e.target.value,10)||0),placeholder:f,className:`rounded-xl`}),t.type===`tags`&&(0,U.jsx)(De,{value:r[t.name]||[],onChange:e=>o(t.name,e)}),t.type===`select`&&(0,U.jsxs)(P,{value:r[t.name]||``,onValueChange:e=>o(t.name,e),children:[(0,U.jsx)(j,{className:`rounded-xl`,children:(0,U.jsx)(A,{})}),(0,U.jsx)(M,{children:(t.options??[]).map(e=>(0,U.jsx)(N,{value:e.value,children:e.label},e.value))})]}),t.type===`json`&&(0,U.jsx)(`textarea`,{id:t.name,value:i[t.name]??`{}`,onChange:e=>a(n=>({...n,[t.name]:e.target.value})),className:`min-h-[120px] w-full resize-none rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono`})]},t.name)})})}var Ae=t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),W=t((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),G=t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),je=t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),Me=t(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),Ne=t((e=>{var t=W().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),Pe=t((e=>{var t=W().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),Fe=t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),K=t((e=>{var t=G(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),Ie=t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),Le=t((e=>{var t=Ie();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),Re=t(((e,t)=>{var n=Le();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),q=t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),ze=t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
2
2
|
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),J=t((e=>{var t=q(),n=ze();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),Be=t((e=>{var t=W(),n=K(),r=G(),i=J(),a=q(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),Ve=t((e=>{var t=W(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),He=t(((e,t)=>{var n=J();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),Ue=t(((e,t)=>{var n=J(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),We=t(((e,t)=>{var n=J();function r(e){this.mode=n.BYTE,typeof e==`string`?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),Ge=t(((e,t)=>{var n=J(),r=W();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
|
3
3
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Ke=t(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),qe=t((e=>{var t=J(),n=He(),r=Ue(),i=We(),a=Ge(),o=ze(),s=W(),c=Ke();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
|
4
4
|
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Je=t((e=>{var t=W(),n=G(),r=je(),i=Me(),a=Ne(),o=Pe(),s=Fe(),c=K(),l=Re(),u=Be(),d=Ve(),f=J(),p=qe();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-D-7Sxfw7.js";var t=e(`CircleDashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./chunk-DF37yw5_.js";import{br as t}from"./api-
|
|
1
|
+
import{t as e}from"./chunk-DF37yw5_.js";import{br as t}from"./api-BaML_txv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=e((e=>{var n=t();e.createRoot=n.createRoot,e.hydrateRoot=n.hydrateRoot}));export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-BaML_txv.js";import{n as i}from"./search-Drx-sMCE.js";import{s as a}from"./i18n-Bzo4IocH.js";var o=e(r(),1),s=n(),c=`min-w-0 overflow-hidden bg-card/70 text-card-foreground md:h-[calc(100vh-180px)] md:max-h-[860px]`,l=`min-h-0 overflow-hidden rounded-2xl bg-muted/30 ring-1 ring-border/45`,u=640;function d({className:e,children:n,compactView:r,onMobileBack:c,mobileListLabel:d,...f}){let p=(0,o.useRef)(null),[m,h]=(0,o.useState)(!1),[g,_,...v]=o.Children.toArray(n);(0,o.useEffect)(()=>{let e=p.current;if(!e||!r||typeof ResizeObserver>`u`)return;let t=()=>h(e.clientWidth>0&&e.clientWidth<u),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[r]);let y=!!(m&&r&&g&&_);return(0,s.jsx)(`div`,{ref:p,className:t(`min-h-0 md:flex-1`,e),...f,children:y?(0,s.jsxs)(`div`,{className:`space-y-3`,children:[r===`detail`?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`button`,{type:`button`,onClick:c,className:`inline-flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,children:[(0,s.jsx)(i,{className:`h-4 w-4`}),(0,s.jsx)(`span`,{children:d??a(`backToMain`)})]}),(0,s.jsx)(`div`,{className:l,children:_})]}):(0,s.jsx)(`div`,{className:l,children:g}),v]}):(0,s.jsx)(`div`,{className:t(l,`grid grid-cols-1 md:grid-cols-[minmax(240px,30%)_minmax(0,1fr)]`),children:n})})}function f({className:e,...n}){return(0,s.jsx)(`section`,{className:t(c,`flex flex-col md:border-r md:border-border/55`,e),...n})}function p({className:e,...n}){return(0,s.jsx)(`section`,{className:t(c,`flex flex-col`,e),...n})}function m({className:e,...n}){return(0,s.jsx)(`section`,{className:t(c,`flex items-center justify-center px-6 py-12 text-center`,e),...n})}function h({className:e,...n}){return(0,s.jsx)(`div`,{className:t(`shrink-0 border-b border-border/70`,e),...n})}function g({className:e,scrollOnDesktop:n=!0,...r}){return(0,s.jsx)(`div`,{className:t(`min-h-0 flex-1`,n&&`overflow-visible md:overflow-y-auto md:overscroll-contain`,e),...r})}function _({className:e,...n}){return(0,s.jsx)(`div`,{className:t(`shrink-0 border-t border-border/70 px-4 py-2.5`,e),...n})}function v({active:e=!1,className:n,type:r=`button`,...i}){return(0,s.jsx)(`button`,{type:r,className:t(`w-full rounded-xl p-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,e?`bg-[var(--interaction-selection)] text-foreground`:`bg-transparent text-muted-foreground hover:bg-[var(--interaction-hover)] hover:text-foreground`,n),...i})}function y({icon:e,title:n,description:r,className:i,...a}){return(0,s.jsxs)(`div`,{className:t(`flex min-h-[220px] flex-col items-center justify-center rounded-xl bg-background/55 px-4 py-10 text-center`,i),...a,children:[(0,s.jsx)(`div`,{className:`mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-card`,children:(0,s.jsx)(e,{className:`h-5 w-5 text-muted-foreground/45`})}),(0,s.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:n}),r?(0,s.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:r}):null]})}export{d as a,h as c,y as i,f as l,p as n,g as o,m as r,_ as s,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{Yt as t,ur as n,xr as r}from"./api-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{Yt as t,ur as n,xr as r}from"./api-BaML_txv.js";import{s as i}from"./i18n-Bzo4IocH.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./dialog-InO6RVpm.js";var d=e(r(),1),f=n(),p=({open:e,onOpenChange:n,title:r,description:p,confirmLabel:m=i(`confirm`),cancelLabel:h=i(`cancel`),variant:g=`default`,onConfirm:_,onCancel:v})=>{let y=d.useRef(null);return(0,f.jsx)(u,{open:e,onOpenChange:n,children:(0,f.jsxs)(s,{onOpenAutoFocus:e=>{e.preventDefault(),y.current?.focus()},onCloseAutoFocus:e=>e.preventDefault(),children:[(0,f.jsxs)(a,{showClose:!1,children:[(0,f.jsx)(c,{children:r}),p?(0,f.jsx)(l,{children:p}):null]}),(0,f.jsxs)(o,{className:`gap-2 sm:gap-0`,children:[(0,f.jsx)(t,{type:`button`,variant:`outline`,onClick:()=>{v(),n(!1)},children:h}),(0,f.jsx)(t,{ref:y,type:`button`,variant:g===`destructive`?`destructive`:`default`,onClick:()=>{_(),n(!1)},children:m})]})]})})};export{p as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-GWlaVWz1.js","assets/preload-helper-DWTEM3RW.js","assets/chunk-HOUHSVGY-Dd_Ycn9Z.js","assets/src-zrGbZsfc.js","assets/chunk-DF37yw5_.js","assets/chunk-Y2CYZVJY-CHjSjwoV.js","assets/chunk-WYO6CB5R-B30N3ZP8.js","assets/chunk-ICXQ74PX-BRPUu3ff.js","assets/dist-DwLj1Wg5.js","assets/chunk-Q4XR5HBZ-UYxXzi7_.js","assets/chunk-52WLFC77-aJoxU2Ow.js","assets/line-Biw8iEUz.js","assets/path-4azsBPZv.js","assets/array-DsNX3jRj.js","assets/chunk-7BUUIJ7U-CgDQOLnC.js","assets/chunk-C7G6YPKG-CNGFAFYL.js","assets/chunk-OGEWGWER-BetLLyJt.js","assets/chunk-ZGVPDNZ5-BN5NX5qA.js","assets/rough.esm-w1lBArN6.js","assets/chunk-FWX5IMBZ-BdHymAs0.js","assets/chunk-VAUOI2AC-CsTIB8qD.js","assets/chunk-ZIRB5QZD-DcDXK29L.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,n as t,t as n}from"./chunk-DF37yw5_.js";import{_n as r,br as i,gn as a,ur as o,vn as s,xr as c,yn as l}from"./api-CI6_8Qt1.js";import{t as u}from"./preload-helper-DWTEM3RW.js";import{t as d}from"./createLucideIcon-reFMl-W-.js";import{n as f,t as p}from"./search-BG2qAlNZ.js";import{A as m,B as h,C as g,D as _,E as v,F as y,I as b,L as x,M as S,N as C,O as w,P as T,R as ee,S as te,T as E,_ as ne,a as D,b as re,c as O,d as ie,f as ae,g as oe,h as se,i as ce,j as le,k as ue,l as de,m as fe,n as pe,o as me,p as he,r as ge,s as _e,t as ve,u as ye,v as be,w as xe,x as Se,y as Ce,z as we}from"./dist-ZaFFmAGl.js";import{t as Te}from"./external-link-DUD3AbsF.js";import{n as Ee,t as De}from"./inbox-ClAG7SI_.js";import{a as Oe,i as ke,n as Ae,r as je,t as Me}from"./x-E9VB4HQx.js";import{t as Ne}from"./plus-DUdl68Eo.js";import{c as Pe}from"./katex-BzT-4KBu.js";var Fe=d(`AppWindow`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Ie=d(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Le=d(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Re=d(`Blocks`,[[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`path`,{d:`M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3`,key:`1fpvtg`}]]),ze=d(`BookOpenText`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M16 12h2`,key:`7q9ll5`}],[`path`,{d:`M16 8h2`,key:`msurwy`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}],[`path`,{d:`M6 12h2`,key:`32wvfc`}],[`path`,{d:`M6 8h2`,key:`30oboj`}]]),Be=d(`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`}]]),Ve=d(`Brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),He=d(`CalendarClock`,[[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M17.5 17.5 16 16.3V14`,key:`akvzfd`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Ue=d(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),We=d(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ge=d(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ke=d(`CirclePlay`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polygon`,{points:`10 8 16 12 10 16 10 8`,key:`1cimsy`}]]),qe=d(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Je=d(`Command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Ye=d(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Xe=d(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=d(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Qe=d(`Expand`,[[`path`,{d:`m21 21-6-6m6 6v-4.8m0 4.8h-4.8`,key:`1c15vz`}],[`path`,{d:`M3 16.2V21m0 0h4.8M3 21l6-6`,key:`1fsnz2`}],[`path`,{d:`M21 7.8V3m0 0h-4.8M21 3l-6 6`,key:`hawz9i`}],[`path`,{d:`M3 7.8V3m0 0h4.8M3 3l6 6`,key:`u9ee12`}]]),$e=d(`FileArchive`,[[`path`,{d:`M10 12v-1`,key:`v7bkov`}],[`path`,{d:`M10 18v-2`,key:`1cjy8d`}],[`path`,{d:`M10 7V6`,key:`dljcrl`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01`,key:`gkbcor`}],[`circle`,{cx:`10`,cy:`20`,r:`2`,key:`1xzdoj`}]]),et=d(`FileAudio2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2`,key:`17k7jt`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`3`,cy:`17`,r:`1`,key:`vo6nti`}],[`path`,{d:`M2 17v-3a4 4 0 0 1 8 0v3`,key:`1ggdre`}],[`circle`,{cx:`9`,cy:`17`,r:`1`,key:`bc1fq4`}]]),tt=d(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),nt=d(`FileImage`,[[`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`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),rt=d(`FileJson2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`fq0c9t`}],[`path`,{d:`M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`4gibmv`}]]),it=d(`FileSpreadsheet`,[[`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:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),at=d(`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`}]]),ot=d(`FileVideo2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`rect`,{width:`8`,height:`6`,x:`2`,y:`12`,rx:`1`,key:`1a6c1e`}],[`path`,{d:`m10 15.5 4 2.5v-6l-4 2.5`,key:`t7cp39`}]]),st=d(`File`,[[`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`}]]),ct=d(`Files`,[[`path`,{d:`M20 7h-3a2 2 0 0 1-2-2V2`,key:`x099mo`}],[`path`,{d:`M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z`,key:`18t6ie`}],[`path`,{d:`M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8`,key:`1nja0z`}]]),lt=d(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),ut=d(`FolderTree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),dt=d(`Folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ft=d(`Image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),pt=d(`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`}]]),mt=d(`ListCollapse`,[[`path`,{d:`m3 10 2.5-2.5L3 5`,key:`i6eama`}],[`path`,{d:`m3 19 2.5-2.5L3 14`,key:`w2gmor`}],[`path`,{d:`M10 6h11`,key:`c7qv1k`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 18h11`,key:`11hvi2`}]]),ht=d(`ListTodo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),gt=d(`MessageSquarePlus`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}]]),_t=d(`MessageSquareQuote`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M8 12a2 2 0 0 0 2-2V8H8`,key:`1jfesj`}],[`path`,{d:`M14 12a2 2 0 0 0 2-2V8h-2`,key:`1dq9mh`}]]),vt=d(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),yt=d(`Paperclip`,[[`path`,{d:`m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48`,key:`1u3ebp`}]]),bt=d(`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`}]]),xt=d(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),St=d(`Plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Ct=d(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),wt=d(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Tt=d(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Et=d(`Star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Dt=d(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Ot=d(`TextQuote`,[[`path`,{d:`M17 6H3`,key:`16j9eg`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 18H8`,key:`1wfozv`}],[`path`,{d:`M3 12v6`,key:`fv4c87`}]]),kt=d(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),At=d(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),jt=d(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),k=e(c(),1);function Mt(e,t){return k.useReducer((e,n)=>t[e][n]??e,e)}var Nt=e=>{let{present:t,children:n}=e,r=Pt(t),i=typeof n==`function`?n({present:r.isPresent}):k.Children.only(n),a=b(r.ref,It(i));return typeof n==`function`||r.isPresent?k.cloneElement(i,{ref:a}):null};Nt.displayName=`Presence`;function Pt(e){let[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),a=k.useRef(`none`),[o,s]=Mt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return k.useEffect(()=>{let e=Ft(r.current);a.current=o===`mounted`?e:`none`},[o]),ue(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ft(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),ue(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ft(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ft(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:k.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ft(e){return e?.animationName||`none`}function It(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var A=o(),[Lt,Rt]=y(`Tooltip`,[_]),zt=_(),Bt=`TooltipProvider`,Vt=700,Ht=`tooltip.open`,[Ut,Wt]=Lt(Bt),Gt=e=>{let{__scopeTooltip:t,delayDuration:n=Vt,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=k.useRef(!0),s=k.useRef(!1),c=k.useRef(0);return k.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,A.jsx)(Ut,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:k.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:k.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:k.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Gt.displayName=Bt;var Kt=`Tooltip`,[qt,Jt]=Lt(Kt),Yt=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Wt(Kt,e.__scopeTooltip),l=zt(t),[u,d]=k.useState(null),f=w(),p=k.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=k.useRef(!1),[_,y]=Se({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ht))):c.onClose(),a?.(e)},caller:Kt}),b=k.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),x=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),S=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=k.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return k.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,A.jsx)(v,{...l,children:(0,A.jsx)(qt,{scope:t,contentId:f,open:_,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:k.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:k.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};Yt.displayName=Kt;var Xt=`TooltipTrigger`,Zt=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Jt(Xt,n),a=Wt(Xt,n),o=zt(n),s=b(t,k.useRef(null),i.onTriggerChange),c=k.useRef(!1),l=k.useRef(!1),u=k.useCallback(()=>c.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,A.jsx)(g,{asChild:!0,...o,children:(0,A.jsx)(le.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:x(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:x(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:x(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:x(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:x(e.onBlur,i.onClose),onClick:x(e.onClick,i.onClose)})})});Zt.displayName=Xt;var Qt=`TooltipPortal`,[$t,en]=Lt(Qt,{forceMount:void 0}),tn=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Jt(Qt,t);return(0,A.jsx)($t,{scope:t,forceMount:n,children:(0,A.jsx)(Nt,{present:n||a.open,children:(0,A.jsx)(te,{asChild:!0,container:i,children:r})})})};tn.displayName=Qt;var nn=`TooltipContent`,rn=k.forwardRef((e,t)=>{let n=en(nn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Jt(nn,e.__scopeTooltip);return(0,A.jsx)(Nt,{present:r||o.open,children:o.disableHoverableContent?(0,A.jsx)(ln,{side:i,...a,ref:t}):(0,A.jsx)(an,{side:i,...a,ref:t})})}),an=k.forwardRef((e,t)=>{let n=Jt(nn,e.__scopeTooltip),r=Wt(nn,e.__scopeTooltip),i=k.useRef(null),a=b(t,i),[o,s]=k.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=k.useCallback(()=>{s(null),d(!1)},[d]),p=k.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=pn(r,fn(r,n.getBoundingClientRect())),a=mn(t.getBoundingClientRect());s(gn([...i,...a])),d(!0)},[d]);return k.useEffect(()=>()=>f(),[f]),k.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),k.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!hn(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,A.jsx)(ln,{...e,ref:a})}),[on,sn]=Lt(Kt,{isInside:!1}),cn=C(`TooltipContent`),ln=k.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Jt(nn,n),l=zt(n),{onClose:u}=c;return k.useEffect(()=>(document.addEventListener(Ht,u),()=>document.removeEventListener(Ht,u)),[u]),k.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,A.jsx)(m,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,A.jsxs)(E,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,A.jsx)(cn,{children:r}),(0,A.jsx)(on,{scope:n,isInside:!0,children:(0,A.jsx)(re,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});rn.displayName=nn;var un=`TooltipArrow`,dn=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=zt(n);return sn(un,n).isInside?null:(0,A.jsx)(xe,{...i,...r,ref:t})});dn.displayName=un;function fn(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function pn(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mn(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hn(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function gn(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),_n(t)}function _n(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vn=Gt,yn=Yt,bn=Zt,xn=tn,Sn=rn,Cn={key:`slash`,marker:`/`};function wn(){return`composer-${Math.random().toString(36).slice(2,10)}`}function Tn(e=``){return{id:wn(),type:`text`,text:e}}function En(e){let{data:t,label:n,previewUrl:r,tokenKey:i,tokenKind:a}=e;return{id:wn(),type:`token`,tokenKind:a,tokenKey:i,label:n,previewUrl:r,data:t}}function Dn(e){return e.type===`text`?e.text.length:1}function On(){return[Tn(``)]}function kn(e){return[Tn(e)]}function An(e){let t=[];for(let n of e){if(n.type===`text`){if(n.text.length===0)continue;let e=t[t.length-1];if(e?.type===`text`){t[t.length-1]={...e,text:e.text+n.text};continue}}t.push(n)}return t.length===0?On():t}function jn(e){return e.map(e=>e.type===`text`?e.text:``).join(``)}function Mn(e){return e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Nn(e,t){let n=[],r=new Set;for(let i of e)i.type!==`token`||i.tokenKind!==t||r.has(i.tokenKey)||(r.add(i.tokenKey),n.push(i.tokenKey));return n}function Pn(e,t,n,r){let i=Math.max(0,n-t),a=Math.max(0,t+e.text.length-r);return[i>0?{...e,text:e.text.slice(0,i)}:null,a>0?{...e,text:e.text.slice(e.text.length-a)}:null]}function Fn(e,t,n,r){return t<=n||e>=r}function In(e,t,n,r,i){return!n&&r>=i?(e.push(...t),!0):n}function Ln(e,t,n,r,i,a,o){let s=Pn(t,n,r,i);s[0]&&e.push(s[0]);let c=o;return c||=(e.push(...a),!0),s[1]&&e.push(s[1]),c}function Rn(e,t,n,r,i,a){return!r&&i<=a?(e.push(...n),!0):(e.push(t),r)}function zn(e,t,n,r){let i=Math.max(0,t),a=Math.max(i,n),o=[],s=0,c=!1;for(let t of e){let e=Dn(t),n=s,l=s+e;if(Fn(n,l,i,a)){c=In(o,r,c,n,a),o.push(t),s=l;continue}c=t.type===`text`?Ln(o,t,n,i,a,r,c):Rn(o,t,r,c,i,n),s=l}return c||o.push(...r),An(o)}function Bn(e,t){return An(e.filter(e=>e.type!==`token`||!t(e)))}function Vn(e,t){return t===0||/\s/.test(e[t-1]??``)}function Hn(e,t,n){if(!t||t.start!==t.end)return null;let r=jn(e),i=t.end,a=r.slice(0,i),o=a.lastIndexOf(n.marker);if(o<0||!Vn(a,o))return null;let s=a.slice(o+n.marker.length);return/[\s\uFFFC]/.test(s)?null:{key:n.key,marker:n.marker,query:s.trim().toLowerCase(),start:o,end:i}}function Un(e,t,n=[Cn]){let r=null;for(let i of n){let n=Hn(e,t,i);n&&(!r||n.start>r.start)&&(r=n)}return r}function Wn(e,t){let n=Hn(e,t,Cn);return n?{query:n.query,start:n.start,end:n.end}:null}var Gn=e=>`[data-item-index="${e}"]`;function Kn(e){let{activeIndex:t,containerRef:n,getItemSelector:r,isEnabled:i,itemCount:a}=e,o=r??Gn;(0,k.useEffect)(()=>{if(!i||a===0)return;let e=n.current;if(!e)return;let r=e.querySelector(o(t));typeof r?.scrollIntoView==`function`&&r.scrollIntoView({block:`nearest`,inline:`nearest`})},[t,n,o,i,a])}function qn(){let e=(0,k.useRef)(null),[t,n]=(0,k.useState)(null);return(0,k.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=()=>{n(t.getBoundingClientRect().width)};r();let i=new ResizeObserver(()=>r());return i.observe(t),()=>i.disconnect()},[]),{elementRef:e,width:t}}function j(...e){return s(l(e))}var Jn=k.forwardRef(({className:e,type:t,...n},r)=>(0,A.jsx)(`input`,{type:t,className:j(`flex h-9 w-full rounded-xl border border-border bg-card px-3.5 py-2 text-sm text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/55 placeholder:font-normal focus:outline-none focus:ring-0 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,`max-md:min-h-[var(--control-touch-size,2.75rem)] max-md:text-base`,e),ref:r,...n}));Jn.displayName=`ChatInput`;var Yn=`Dialog`,[Xn,Zn]=y(Yn),[Qn,$n]=Xn(Yn),er=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=k.useRef(null),c=k.useRef(null),[l,u]=Se({prop:r,defaultProp:i??!1,onChange:a,caller:Yn});return(0,A.jsx)(Qn,{scope:t,triggerRef:s,contentRef:c,contentId:w(),titleId:w(),descriptionId:w(),open:l,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};er.displayName=Yn;var tr=`DialogTrigger`,nr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(tr,n),a=b(t,i.triggerRef);return(0,A.jsx)(le.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Sr(i.open),...r,ref:a,onClick:x(e.onClick,i.onOpenToggle)})});nr.displayName=tr;var rr=`DialogPortal`,[ir,ar]=Xn(rr,{forceMount:void 0}),or=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$n(rr,t);return(0,A.jsx)(ir,{scope:t,forceMount:n,children:k.Children.map(r,e=>(0,A.jsx)(Nt,{present:n||a.open,children:(0,A.jsx)(te,{asChild:!0,container:i,children:e})}))})};or.displayName=rr;var sr=`DialogOverlay`,cr=k.forwardRef((e,t)=>{let n=ar(sr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$n(sr,e.__scopeDialog);return a.modal?(0,A.jsx)(Nt,{present:r||a.open,children:(0,A.jsx)(ur,{...i,ref:t})}):null});cr.displayName=sr;var lr=S(`DialogOverlay.RemoveScroll`),ur=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(sr,n);return(0,A.jsx)(ne,{as:lr,allowPinchZoom:!0,shards:[i.contentRef],children:(0,A.jsx)(le.div,{"data-state":Sr(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),dr=`DialogContent`,fr=k.forwardRef((e,t)=>{let n=ar(dr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$n(dr,e.__scopeDialog);return(0,A.jsx)(Nt,{present:r||a.open,children:a.modal?(0,A.jsx)(pr,{...i,ref:t}):(0,A.jsx)(mr,{...i,ref:t})})});fr.displayName=dr;var pr=k.forwardRef((e,t)=>{let n=$n(dr,e.__scopeDialog),r=k.useRef(null),i=b(t,n.contentRef,r);return k.useEffect(()=>{let e=r.current;if(e)return oe(e)},[]),(0,A.jsx)(hr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:x(e.onFocusOutside,e=>e.preventDefault())})}),mr=k.forwardRef((e,t)=>{let n=$n(dr,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(hr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),hr=k.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$n(dr,n),c=k.useRef(null),l=b(t,c);return be(),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Ce,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(m,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sr(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Er,{titleId:s.titleId}),(0,A.jsx)(Or,{contentRef:c,descriptionId:s.descriptionId})]})]})}),gr=`DialogTitle`,_r=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(gr,n);return(0,A.jsx)(le.h2,{id:i.titleId,...r,ref:t})});_r.displayName=gr;var vr=`DialogDescription`,yr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(vr,n);return(0,A.jsx)(le.p,{id:i.descriptionId,...r,ref:t})});yr.displayName=vr;var br=`DialogClose`,xr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(br,n);return(0,A.jsx)(le.button,{type:`button`,...r,ref:t,onClick:x(e.onClick,()=>i.onOpenChange(!1))})});xr.displayName=br;function Sr(e){return e?`open`:`closed`}var Cr=`DialogTitleWarning`,[wr,Tr]=T(Cr,{contentName:dr,titleName:gr,docsSlug:`dialog`}),Er=({titleId:e})=>{let t=Tr(Cr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
import{i as e,n as t,t as n}from"./chunk-DF37yw5_.js";import{_n as r,br as i,gn as a,ur as o,vn as s,xr as c,yn as l}from"./api-BaML_txv.js";import{t as u}from"./preload-helper-DWTEM3RW.js";import{t as d}from"./createLucideIcon-D-7Sxfw7.js";import{n as f,t as p}from"./search-Drx-sMCE.js";import{A as m,B as h,C as g,D as _,E as v,F as y,I as b,L as x,M as S,N as C,O as w,P as T,R as ee,S as te,T as E,_ as ne,a as D,b as re,c as O,d as ie,f as ae,g as oe,h as se,i as ce,j as le,k as ue,l as de,m as fe,n as pe,o as me,p as he,r as ge,s as _e,t as ve,u as ye,v as be,w as xe,x as Se,y as Ce,z as we}from"./dist-BxOjfeaD.js";import{t as Te}from"./external-link-NwtWKzE2.js";import{n as Ee,t as De}from"./inbox-DofXi7Xv.js";import{a as Oe,i as ke,n as Ae,r as je,t as Me}from"./x-DLvS4xvV.js";import{t as Ne}from"./plus-v29lPO18.js";import{c as Pe}from"./katex-BzT-4KBu.js";var Fe=d(`AppWindow`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Ie=d(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Le=d(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Re=d(`Blocks`,[[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`path`,{d:`M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3`,key:`1fpvtg`}]]),ze=d(`BookOpenText`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M16 12h2`,key:`7q9ll5`}],[`path`,{d:`M16 8h2`,key:`msurwy`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}],[`path`,{d:`M6 12h2`,key:`32wvfc`}],[`path`,{d:`M6 8h2`,key:`30oboj`}]]),Be=d(`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`}]]),Ve=d(`Brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),He=d(`CalendarClock`,[[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M17.5 17.5 16 16.3V14`,key:`akvzfd`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Ue=d(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),We=d(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ge=d(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ke=d(`CirclePlay`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polygon`,{points:`10 8 16 12 10 16 10 8`,key:`1cimsy`}]]),qe=d(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Je=d(`Command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Ye=d(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Xe=d(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=d(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Qe=d(`Expand`,[[`path`,{d:`m21 21-6-6m6 6v-4.8m0 4.8h-4.8`,key:`1c15vz`}],[`path`,{d:`M3 16.2V21m0 0h4.8M3 21l6-6`,key:`1fsnz2`}],[`path`,{d:`M21 7.8V3m0 0h-4.8M21 3l-6 6`,key:`hawz9i`}],[`path`,{d:`M3 7.8V3m0 0h4.8M3 3l6 6`,key:`u9ee12`}]]),$e=d(`FileArchive`,[[`path`,{d:`M10 12v-1`,key:`v7bkov`}],[`path`,{d:`M10 18v-2`,key:`1cjy8d`}],[`path`,{d:`M10 7V6`,key:`dljcrl`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01`,key:`gkbcor`}],[`circle`,{cx:`10`,cy:`20`,r:`2`,key:`1xzdoj`}]]),et=d(`FileAudio2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2`,key:`17k7jt`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`3`,cy:`17`,r:`1`,key:`vo6nti`}],[`path`,{d:`M2 17v-3a4 4 0 0 1 8 0v3`,key:`1ggdre`}],[`circle`,{cx:`9`,cy:`17`,r:`1`,key:`bc1fq4`}]]),tt=d(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),nt=d(`FileImage`,[[`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`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),rt=d(`FileJson2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`fq0c9t`}],[`path`,{d:`M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`4gibmv`}]]),it=d(`FileSpreadsheet`,[[`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:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),at=d(`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`}]]),ot=d(`FileVideo2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`rect`,{width:`8`,height:`6`,x:`2`,y:`12`,rx:`1`,key:`1a6c1e`}],[`path`,{d:`m10 15.5 4 2.5v-6l-4 2.5`,key:`t7cp39`}]]),st=d(`File`,[[`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`}]]),ct=d(`Files`,[[`path`,{d:`M20 7h-3a2 2 0 0 1-2-2V2`,key:`x099mo`}],[`path`,{d:`M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z`,key:`18t6ie`}],[`path`,{d:`M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8`,key:`1nja0z`}]]),lt=d(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),ut=d(`FolderTree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),dt=d(`Folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ft=d(`Image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),pt=d(`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`}]]),mt=d(`ListCollapse`,[[`path`,{d:`m3 10 2.5-2.5L3 5`,key:`i6eama`}],[`path`,{d:`m3 19 2.5-2.5L3 14`,key:`w2gmor`}],[`path`,{d:`M10 6h11`,key:`c7qv1k`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 18h11`,key:`11hvi2`}]]),ht=d(`ListTodo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),gt=d(`MessageSquarePlus`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}]]),_t=d(`MessageSquareQuote`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M8 12a2 2 0 0 0 2-2V8H8`,key:`1jfesj`}],[`path`,{d:`M14 12a2 2 0 0 0 2-2V8h-2`,key:`1dq9mh`}]]),vt=d(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),yt=d(`Paperclip`,[[`path`,{d:`m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48`,key:`1u3ebp`}]]),bt=d(`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`}]]),xt=d(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),St=d(`Plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Ct=d(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),wt=d(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Tt=d(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Et=d(`Star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Dt=d(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Ot=d(`TextQuote`,[[`path`,{d:`M17 6H3`,key:`16j9eg`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 18H8`,key:`1wfozv`}],[`path`,{d:`M3 12v6`,key:`fv4c87`}]]),kt=d(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),At=d(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),jt=d(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),k=e(c(),1);function Mt(e,t){return k.useReducer((e,n)=>t[e][n]??e,e)}var Nt=e=>{let{present:t,children:n}=e,r=Pt(t),i=typeof n==`function`?n({present:r.isPresent}):k.Children.only(n),a=b(r.ref,It(i));return typeof n==`function`||r.isPresent?k.cloneElement(i,{ref:a}):null};Nt.displayName=`Presence`;function Pt(e){let[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),a=k.useRef(`none`),[o,s]=Mt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return k.useEffect(()=>{let e=Ft(r.current);a.current=o===`mounted`?e:`none`},[o]),ue(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ft(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),ue(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ft(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ft(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:k.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ft(e){return e?.animationName||`none`}function It(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var A=o(),[Lt,Rt]=y(`Tooltip`,[_]),zt=_(),Bt=`TooltipProvider`,Vt=700,Ht=`tooltip.open`,[Ut,Wt]=Lt(Bt),Gt=e=>{let{__scopeTooltip:t,delayDuration:n=Vt,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=k.useRef(!0),s=k.useRef(!1),c=k.useRef(0);return k.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,A.jsx)(Ut,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:k.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:k.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:k.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Gt.displayName=Bt;var Kt=`Tooltip`,[qt,Jt]=Lt(Kt),Yt=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Wt(Kt,e.__scopeTooltip),l=zt(t),[u,d]=k.useState(null),f=w(),p=k.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=k.useRef(!1),[_,y]=Se({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ht))):c.onClose(),a?.(e)},caller:Kt}),b=k.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),x=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),S=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=k.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return k.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,A.jsx)(v,{...l,children:(0,A.jsx)(qt,{scope:t,contentId:f,open:_,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:k.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:k.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};Yt.displayName=Kt;var Xt=`TooltipTrigger`,Zt=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Jt(Xt,n),a=Wt(Xt,n),o=zt(n),s=b(t,k.useRef(null),i.onTriggerChange),c=k.useRef(!1),l=k.useRef(!1),u=k.useCallback(()=>c.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,A.jsx)(g,{asChild:!0,...o,children:(0,A.jsx)(le.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:x(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:x(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:x(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:x(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:x(e.onBlur,i.onClose),onClick:x(e.onClick,i.onClose)})})});Zt.displayName=Xt;var Qt=`TooltipPortal`,[$t,en]=Lt(Qt,{forceMount:void 0}),tn=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Jt(Qt,t);return(0,A.jsx)($t,{scope:t,forceMount:n,children:(0,A.jsx)(Nt,{present:n||a.open,children:(0,A.jsx)(te,{asChild:!0,container:i,children:r})})})};tn.displayName=Qt;var nn=`TooltipContent`,rn=k.forwardRef((e,t)=>{let n=en(nn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Jt(nn,e.__scopeTooltip);return(0,A.jsx)(Nt,{present:r||o.open,children:o.disableHoverableContent?(0,A.jsx)(ln,{side:i,...a,ref:t}):(0,A.jsx)(an,{side:i,...a,ref:t})})}),an=k.forwardRef((e,t)=>{let n=Jt(nn,e.__scopeTooltip),r=Wt(nn,e.__scopeTooltip),i=k.useRef(null),a=b(t,i),[o,s]=k.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=k.useCallback(()=>{s(null),d(!1)},[d]),p=k.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=pn(r,fn(r,n.getBoundingClientRect())),a=mn(t.getBoundingClientRect());s(gn([...i,...a])),d(!0)},[d]);return k.useEffect(()=>()=>f(),[f]),k.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),k.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!hn(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,A.jsx)(ln,{...e,ref:a})}),[on,sn]=Lt(Kt,{isInside:!1}),cn=C(`TooltipContent`),ln=k.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Jt(nn,n),l=zt(n),{onClose:u}=c;return k.useEffect(()=>(document.addEventListener(Ht,u),()=>document.removeEventListener(Ht,u)),[u]),k.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,A.jsx)(m,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,A.jsxs)(E,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,A.jsx)(cn,{children:r}),(0,A.jsx)(on,{scope:n,isInside:!0,children:(0,A.jsx)(re,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});rn.displayName=nn;var un=`TooltipArrow`,dn=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=zt(n);return sn(un,n).isInside?null:(0,A.jsx)(xe,{...i,...r,ref:t})});dn.displayName=un;function fn(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function pn(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mn(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hn(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function gn(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),_n(t)}function _n(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vn=Gt,yn=Yt,bn=Zt,xn=tn,Sn=rn,Cn={key:`slash`,marker:`/`};function wn(){return`composer-${Math.random().toString(36).slice(2,10)}`}function Tn(e=``){return{id:wn(),type:`text`,text:e}}function En(e){let{data:t,label:n,previewUrl:r,tokenKey:i,tokenKind:a}=e;return{id:wn(),type:`token`,tokenKind:a,tokenKey:i,label:n,previewUrl:r,data:t}}function Dn(e){return e.type===`text`?e.text.length:1}function On(){return[Tn(``)]}function kn(e){return[Tn(e)]}function An(e){let t=[];for(let n of e){if(n.type===`text`){if(n.text.length===0)continue;let e=t[t.length-1];if(e?.type===`text`){t[t.length-1]={...e,text:e.text+n.text};continue}}t.push(n)}return t.length===0?On():t}function jn(e){return e.map(e=>e.type===`text`?e.text:``).join(``)}function Mn(e){return e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Nn(e,t){let n=[],r=new Set;for(let i of e)i.type!==`token`||i.tokenKind!==t||r.has(i.tokenKey)||(r.add(i.tokenKey),n.push(i.tokenKey));return n}function Pn(e,t,n,r){let i=Math.max(0,n-t),a=Math.max(0,t+e.text.length-r);return[i>0?{...e,text:e.text.slice(0,i)}:null,a>0?{...e,text:e.text.slice(e.text.length-a)}:null]}function Fn(e,t,n,r){return t<=n||e>=r}function In(e,t,n,r,i){return!n&&r>=i?(e.push(...t),!0):n}function Ln(e,t,n,r,i,a,o){let s=Pn(t,n,r,i);s[0]&&e.push(s[0]);let c=o;return c||=(e.push(...a),!0),s[1]&&e.push(s[1]),c}function Rn(e,t,n,r,i,a){return!r&&i<=a?(e.push(...n),!0):(e.push(t),r)}function zn(e,t,n,r){let i=Math.max(0,t),a=Math.max(i,n),o=[],s=0,c=!1;for(let t of e){let e=Dn(t),n=s,l=s+e;if(Fn(n,l,i,a)){c=In(o,r,c,n,a),o.push(t),s=l;continue}c=t.type===`text`?Ln(o,t,n,i,a,r,c):Rn(o,t,r,c,i,n),s=l}return c||o.push(...r),An(o)}function Bn(e,t){return An(e.filter(e=>e.type!==`token`||!t(e)))}function Vn(e,t){return t===0||/\s/.test(e[t-1]??``)}function Hn(e,t,n){if(!t||t.start!==t.end)return null;let r=jn(e),i=t.end,a=r.slice(0,i),o=a.lastIndexOf(n.marker);if(o<0||!Vn(a,o))return null;let s=a.slice(o+n.marker.length);return/[\s\uFFFC]/.test(s)?null:{key:n.key,marker:n.marker,query:s.trim().toLowerCase(),start:o,end:i}}function Un(e,t,n=[Cn]){let r=null;for(let i of n){let n=Hn(e,t,i);n&&(!r||n.start>r.start)&&(r=n)}return r}function Wn(e,t){let n=Hn(e,t,Cn);return n?{query:n.query,start:n.start,end:n.end}:null}var Gn=e=>`[data-item-index="${e}"]`;function Kn(e){let{activeIndex:t,containerRef:n,getItemSelector:r,isEnabled:i,itemCount:a}=e,o=r??Gn;(0,k.useEffect)(()=>{if(!i||a===0)return;let e=n.current;if(!e)return;let r=e.querySelector(o(t));typeof r?.scrollIntoView==`function`&&r.scrollIntoView({block:`nearest`,inline:`nearest`})},[t,n,o,i,a])}function qn(){let e=(0,k.useRef)(null),[t,n]=(0,k.useState)(null);return(0,k.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=()=>{n(t.getBoundingClientRect().width)};r();let i=new ResizeObserver(()=>r());return i.observe(t),()=>i.disconnect()},[]),{elementRef:e,width:t}}function j(...e){return s(l(e))}var Jn=k.forwardRef(({className:e,type:t,...n},r)=>(0,A.jsx)(`input`,{type:t,className:j(`flex h-9 w-full rounded-xl border border-border bg-card px-3.5 py-2 text-sm text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/55 placeholder:font-normal focus:outline-none focus:ring-0 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,`max-md:min-h-[var(--control-touch-size,2.75rem)] max-md:text-base`,e),ref:r,...n}));Jn.displayName=`ChatInput`;var Yn=`Dialog`,[Xn,Zn]=y(Yn),[Qn,$n]=Xn(Yn),er=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=k.useRef(null),c=k.useRef(null),[l,u]=Se({prop:r,defaultProp:i??!1,onChange:a,caller:Yn});return(0,A.jsx)(Qn,{scope:t,triggerRef:s,contentRef:c,contentId:w(),titleId:w(),descriptionId:w(),open:l,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};er.displayName=Yn;var tr=`DialogTrigger`,nr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(tr,n),a=b(t,i.triggerRef);return(0,A.jsx)(le.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Sr(i.open),...r,ref:a,onClick:x(e.onClick,i.onOpenToggle)})});nr.displayName=tr;var rr=`DialogPortal`,[ir,ar]=Xn(rr,{forceMount:void 0}),or=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$n(rr,t);return(0,A.jsx)(ir,{scope:t,forceMount:n,children:k.Children.map(r,e=>(0,A.jsx)(Nt,{present:n||a.open,children:(0,A.jsx)(te,{asChild:!0,container:i,children:e})}))})};or.displayName=rr;var sr=`DialogOverlay`,cr=k.forwardRef((e,t)=>{let n=ar(sr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$n(sr,e.__scopeDialog);return a.modal?(0,A.jsx)(Nt,{present:r||a.open,children:(0,A.jsx)(ur,{...i,ref:t})}):null});cr.displayName=sr;var lr=S(`DialogOverlay.RemoveScroll`),ur=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(sr,n);return(0,A.jsx)(ne,{as:lr,allowPinchZoom:!0,shards:[i.contentRef],children:(0,A.jsx)(le.div,{"data-state":Sr(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),dr=`DialogContent`,fr=k.forwardRef((e,t)=>{let n=ar(dr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$n(dr,e.__scopeDialog);return(0,A.jsx)(Nt,{present:r||a.open,children:a.modal?(0,A.jsx)(pr,{...i,ref:t}):(0,A.jsx)(mr,{...i,ref:t})})});fr.displayName=dr;var pr=k.forwardRef((e,t)=>{let n=$n(dr,e.__scopeDialog),r=k.useRef(null),i=b(t,n.contentRef,r);return k.useEffect(()=>{let e=r.current;if(e)return oe(e)},[]),(0,A.jsx)(hr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:x(e.onFocusOutside,e=>e.preventDefault())})}),mr=k.forwardRef((e,t)=>{let n=$n(dr,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(hr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),hr=k.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$n(dr,n),c=k.useRef(null),l=b(t,c);return be(),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Ce,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(m,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sr(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Er,{titleId:s.titleId}),(0,A.jsx)(Or,{contentRef:c,descriptionId:s.descriptionId})]})]})}),gr=`DialogTitle`,_r=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(gr,n);return(0,A.jsx)(le.h2,{id:i.titleId,...r,ref:t})});_r.displayName=gr;var vr=`DialogDescription`,yr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(vr,n);return(0,A.jsx)(le.p,{id:i.descriptionId,...r,ref:t})});yr.displayName=vr;var br=`DialogClose`,xr=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$n(br,n);return(0,A.jsx)(le.button,{type:`button`,...r,ref:t,onClick:x(e.onClick,()=>i.onOpenChange(!1))})});xr.displayName=br;function Sr(e){return e?`open`:`closed`}var Cr=`DialogTitleWarning`,[wr,Tr]=T(Cr,{contentName:dr,titleName:gr,docsSlug:`dialog`}),Er=({titleId:e})=>{let t=Tr(Cr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
3
3
|
|
|
4
4
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{xr as t}from"./api-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{xr as t}from"./api-BaML_txv.js";var n=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},a=e(t()),o=(0,a.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:s=``,children:c,iconNode:l,...u},d)=>(0,a.createElement)(`svg`,{ref:d,...i,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:r(`lucide`,s),...u},[...l.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(c)?c:[c]])),s=(e,t)=>{let i=(0,a.forwardRef)(({className:i,...s},c)=>(0,a.createElement)(o,{ref:c,iconNode:t,className:r(`lucide-${n(e)}`,i),...s}));return i.displayName=`${e}`,i};export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as e}from"./app-presenter-provider-DSlY9Lz6.js";export{e as CronJobResource};
|
package/dist/assets/{desktop-capabilities-page-CYJTQ3nC.js → desktop-capabilities-page-gakZ5UKX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jt as e,Kt as t,Yt as n,Zt as r,qt as i,ur as a}from"./api-
|
|
1
|
+
import{Jt as e,Kt as t,Yt as n,Zt as r,qt as i,ur as a}from"./api-BaML_txv.js";import{s as o}from"./i18n-Bzo4IocH.js";import{a as s,i as c,n as l,o as u,r as d}from"./use-desktop-capabilities-C1bXk7fx.js";var f=a();function p(){let a=d(),p=l(),h=s(),v=c(),y=u(),b=a.data,x=h.isPending||v.isPending;return(0,f.jsxs)(r,{title:o(`desktopCapabilitiesPageTitle`),description:o(`desktopCapabilitiesPageDescription`),children:[(0,f.jsx)(e,{title:o(`desktopCapabilitiesSystemTitle`),description:o(`desktopCapabilitiesSystemDescription`),children:(0,f.jsxs)(i,{children:[(0,f.jsx)(t,{title:o(`desktopCapabilitiesHostStatus`),description:a.isLoading?o(`loading`):b?.online?o(`desktopCapabilitiesHostOnline`):o(`desktopCapabilitiesHostOffline`),control:(0,f.jsx)(n,{type:`button`,variant:`outline`,size:`sm`,disabled:a.isFetching,onClick:()=>void a.refetch(),children:o(`desktopCapabilitiesRecheck`)})}),(0,f.jsx)(t,{title:o(`desktopCapabilitiesAccessibility`),description:g(b?.permissions.accessibility),control:(0,f.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,f.jsx)(n,{type:`button`,variant:`outline`,size:`sm`,disabled:x,onClick:()=>v.mutate(),children:o(`desktopCapabilitiesOpenSettings`)}),(0,f.jsx)(n,{type:`button`,size:`sm`,disabled:x,onClick:()=>h.mutate(),children:o(`desktopCapabilitiesRequestPermission`)})]})})]})}),(0,f.jsx)(e,{title:o(`desktopCapabilitiesGrantsTitle`),description:o(`desktopCapabilitiesGrantsDescription`),children:(0,f.jsx)(i,{children:p.isLoading?(0,f.jsx)(t,{title:o(`loading`)}):p.data?.length?p.data.map(e=>(0,f.jsx)(m,{grant:e,disabled:y.isPending,onRevoke:()=>y.mutate(e)},_(e))):(0,f.jsx)(t,{title:o(`desktopCapabilitiesNoGrants`),description:o(`desktopCapabilitiesNoGrantsDescription`)})})})]})}function m({disabled:e,grant:r,onRevoke:i}){let a=h(r.resource.target);return(0,f.jsx)(t,{title:r.subject.type===`agent`?`${o(`desktopCapabilitiesAgent`)} · ${r.subject.id}`:`${o(`desktopCapabilitiesExtension`)} · ${r.subject.id}`,description:`${a} · ${r.access.join(`, `)}`,control:(0,f.jsx)(n,{type:`button`,variant:`destructive`,size:`sm`,disabled:e,onClick:i,children:o(`desktopCapabilitiesRevoke`)})})}function h(e){if(!e||typeof e!=`object`||Array.isArray(e))return o(`desktopCapabilitiesUnknownApplication`);let{applicationId:t}=e;return typeof t==`string`&&t.trim()?t.trim():o(`desktopCapabilitiesUnknownApplication`)}function g(e){switch(e){case`granted`:return o(`desktopCapabilitiesPermissionGranted`);case`not_granted`:return o(`desktopCapabilitiesPermissionNotGranted`);case`not_supported`:return o(`desktopCapabilitiesPermissionNotSupported`);default:return o(`desktopCapabilitiesPermissionUnknown`)}}function _(e){return`${e.subject.type}:${e.subject.id}:${JSON.stringify(e.resource.target)}:${e.access.join(`,`)}`}export{p as DesktopCapabilitiesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jt as e,Kt as t,Qn as n,Yt as r,Zt as i,_n as a,an as o,nn as s,on as c,qt as l,rn as u,tn as d,ur as f}from"./api-CI6_8Qt1.js";import{t as p}from"./navigation-link-D-JSWFxj.js";import{t as m}from"./download-DovI3Yvf.js";import{t as h}from"./refresh-cw-OhwaPDn1.js";import{t as g}from"./rotate-cw-aBponvp7.js";import{l as _,n as v,s as y}from"./i18n-IGQbjBqS.js";import{a as b,i as x,n as S,r as C,t as w}from"./select-xUXYV0Gr.js";import{a as T,i as E,n as D,r as O,t as k}from"./card-DokH7OBp.js";var A=f(),j=`https://github.com/Peiiii/nextclaw/releases`,M={checking:`desktopUpdatesStatusChecking`,"update-available":`desktopUpdatesStatusAvailable`,downloading:`desktopUpdatesStatusDownloading`,downloaded:`desktopUpdatesStatusDownloaded`,applying:`desktopUpdatesStatusApplying`,"restart-required":`desktopUpdatesStatusRestartRequired`,"up-to-date":`desktopUpdatesStatusUpToDate`,blocked:`desktopUpdatesStatusBlocked`,failed:`desktopUpdatesStatusFailed`},N={feature:`desktopUpdatesReleaseNotesFeature`,enhancement:`desktopUpdatesReleaseNotesEnhancement`,fix:`desktopUpdatesReleaseNotesFix`,compatibility:`desktopUpdatesReleaseNotesCompatibility`};function P({snapshot:e}){return(0,A.jsx)(`span`,{className:a(`inline-flex rounded-full px-3 py-1 text-xs font-medium ring-1`,U(e.status)),children:H(e)})}function F({label:e,value:t}){return(0,A.jsxs)(`div`,{className:`rounded-lg bg-background/70 p-3`,children:[(0,A.jsx)(`p`,{className:`text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,A.jsx)(`p`,{className:`mt-1 text-sm font-semibold text-foreground`,children:t})]})}function I({snapshot:e}){if(e.status!==`downloading`)return null;let t=e.progress?.percent,n=t==null?y(`desktopUpdatesDownloadProgressUnknown`):y(`desktopUpdatesDownloadProgressPercent`).replace(`{percent}`,String(t)),r=z(e.progress?.downloadedBytes??0,e.progress?.totalBytes??null);return(0,A.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:n}),(0,A.jsx)(`p`,{className:`text-xs font-medium text-amber-700`,children:r})]}),(0,A.jsx)(`div`,{className:`mt-3 h-2 overflow-hidden rounded-full bg-amber-100`,children:(0,A.jsx)(`div`,{className:`h-full rounded-full bg-amber-500 transition-[width]`,style:{width:`${t??0}%`}})})]})}function L(e){return e?.trim()||`-`}function R(e){return e?v(e):`-`}function z(e,t){let n=B(e);return t&&t>0?`${n} / ${B(t)}`:n}function B(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=10||r===0?n.toFixed(0):n.toFixed(1)} ${t[r]}`}function V(e){return y(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}function H(e){return e.status===`failed`&&e.failureStage?y(`desktopUpdatesFailureStage.${e.failureStage}`):y(M[e.status]??`desktopUpdatesStatusIdle`)}function U(e){return e===`downloaded`||e===`restart-required`?`bg-emerald-50 text-emerald-700 ring-emerald-100`:e===`update-available`||e===`downloading`||e===`checking`?`bg-amber-50 text-amber-700 ring-amber-100`:e===`failed`||e===`blocked`?`bg-red-50 text-red-700 ring-red-100`:`bg-gray-100 text-gray-700 ring-gray-200`}function W(e){return e.status===`blocked`&&e.installationKind===`desktop-bundle`&&e.blockReason===`unsupported-installation`}function G(){return _()===`zh`?`zh-CN`:`en-US`}function K(e,t){return s(e.title,t)??y(N[e.kind]??`desktopUpdatesReleaseNotesEnhancement`)}function q({snapshot:e}){let t=u(e),r=G(),i=n({queryKey:[`runtime-release-notes`,t],queryFn:async()=>await d(t??``),enabled:!!t,retry:!1,staleTime:300*1e3}),a=i.data,o=s(a?.title,r)??y(`desktopUpdatesReleaseNotesPreviewTitle`),c=s(a?.summary,r)??y(`desktopUpdatesReleaseNotesPreviewDescription`);return e.releaseNotesUrl?(0,A.jsxs)(k,{children:[(0,A.jsx)(E,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(T,{children:o}),(0,A.jsx)(O,{children:c})]}),(0,A.jsx)(p,{href:e.releaseNotesUrl,external:!0,children:y(`desktopUpdatesReleaseNotes`)})]})}),(0,A.jsxs)(D,{className:`space-y-4`,children:[i.isLoading?(0,A.jsx)(`p`,{className:`text-sm text-gray-500`,children:y(`desktopUpdatesReleaseNotesPreviewLoading`)}):null,!t||i.isError?(0,A.jsx)(`p`,{className:`text-sm text-gray-500`,children:y(`desktopUpdatesReleaseNotesPreviewUnavailable`)}):null,a?(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:a.sections.map(e=>(0,A.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:K(e,r)}),(0,A.jsx)(`ul`,{className:`mt-3 space-y-3`,children:e.items.map((t,n)=>{let i=s(t.title,r),a=s(t.body,r);return(0,A.jsxs)(`li`,{className:`space-y-1`,children:[i?(0,A.jsx)(`p`,{className:`text-sm font-medium text-gray-800`,children:i}):null,a?(0,A.jsx)(`p`,{className:`text-sm leading-5 text-gray-600`,children:a}):null]},`${i??e.kind}-${n}`)})})]},e.kind))}):null]})]}):null}function J(){return(0,A.jsx)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),children:(0,A.jsx)(e,{title:y(`runtimeUpdatesUnavailableTitle`),description:y(`runtimeUpdatesUnavailableDescription`),children:(0,A.jsx)(l,{children:(0,A.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:y(`runtimeUpdatesUnavailableHint`)})})})})}function Y(){let{supported:n,initialized:s,busyAction:u,snapshot:d}=c();if(!s)return(0,A.jsx)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),children:(0,A.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:y(`loading`)})});if(!n||!d)return(0,A.jsx)(J,{});let f=u===`checking`,_=u===`downloading`,v=u===`applying`,T=u===`updating`,E=u===`switching-channel`,D=(d.status===`update-available`||d.status===`downloaded`)&&!_&&!v&&!T,O=[[y(`runtimeUpdatesHostVersion`),L(d.hostVersion)],[y(`desktopUpdatesCurrentBundleVersion`),L(d.currentVersion)],[y(`desktopUpdatesAvailableVersion`),L(d.availableVersion)],[y(`desktopUpdatesLastCheckedAt`),R(d.lastCheckedAt)],[y(`desktopUpdatesCurrentChannel`),V(d.channel)]];return(0,A.jsxs)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),actions:(0,A.jsxs)(r,{variant:`outline`,onClick:()=>void o.checkForUpdates(),disabled:f||_||v||T,children:[(0,A.jsx)(h,{className:a(`mr-2 h-4 w-4`,f&&`animate-spin`)}),y(`desktopUpdatesCheckNow`)]}),children:[(0,A.jsx)(e,{title:y(`desktopUpdatesOverviewTitle`),description:y(`desktopUpdatesOverviewDescription`),children:(0,A.jsx)(l,{children:(0,A.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,A.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:y(`desktopUpdatesStatusLabel`)}),(0,A.jsx)(P,{snapshot:d})]}),(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:O.map(([e,t])=>(0,A.jsx)(F,{label:e,value:t},e))}),d.channel===`beta`?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:y(`desktopUpdatesBetaBadgeTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-amber-700`,children:y(`desktopUpdatesBetaBadgeDescription`)})]}):null,d.downloadedVersion?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-emerald-800`,children:y(`desktopUpdatesDownloadedBannerTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-emerald-700`,children:y(`runtimeUpdatesDownloadedBannerDescription`).replace(`{version}`,d.downloadedVersion)})]}):null,(0,A.jsx)(I,{snapshot:d}),d.status===`blocked`?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-red-800`,children:y(`desktopUpdatesBlockedTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-red-700`,children:d.errorMessage??y(`desktopUpdatesBlockedDescription`)}),d.recoveryCommand?(0,A.jsx)(`code`,{className:`mt-3 block rounded-lg bg-white/70 px-3 py-2 text-xs text-red-800`,children:d.recoveryCommand}):null,W(d)?(0,A.jsx)(p,{href:j,external:!0,icon:m,className:`mt-3 rounded-full border border-red-300 bg-white/70 px-3 py-2 text-red-800 no-underline hover:bg-white hover:text-red-900 hover:no-underline`,children:y(`desktopUpdatesManualPortableDownload`)}):null]}):null,d.errorMessage&&d.status!==`blocked`?(0,A.jsx)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4 text-sm text-red-700`,children:d.errorMessage}):null]})})}),(0,A.jsx)(q,{snapshot:d}),(0,A.jsx)(e,{title:y(`desktopUpdatesChannelSettingsTitle`),description:y(`desktopUpdatesChannelSettingsDescription`),children:(0,A.jsx)(l,{children:(0,A.jsx)(t,{title:y(`desktopUpdatesReleaseChannel`),description:y(`desktopUpdatesReleaseChannelHelp`),layout:`stacked`,children:(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsxs)(w,{value:d.channel,disabled:E||f||_||v||T,onValueChange:e=>void o.updateChannel(e),children:[(0,A.jsx)(x,{className:`w-full max-w-sm`,children:(0,A.jsx)(b,{placeholder:y(`desktopUpdatesReleaseChannel`)})}),(0,A.jsxs)(S,{children:[(0,A.jsx)(C,{value:`stable`,children:y(`desktopUpdatesChannelStable`)}),(0,A.jsx)(C,{value:`beta`,children:y(`desktopUpdatesChannelBeta`)})]})]}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:y(`desktopUpdatesReleaseChannelDowngradeHint`)})]})})})}),(0,A.jsx)(e,{title:y(`desktopUpdatesActionsTitle`),description:y(`runtimeUpdatesActionsDescription`),children:(0,A.jsx)(l,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4`,children:[(0,A.jsxs)(r,{variant:`outline`,onClick:()=>void o.checkForUpdates(),disabled:f||_||v||T,children:[(0,A.jsx)(h,{className:a(`mr-2 h-4 w-4`,f&&`animate-spin`)}),y(`desktopUpdatesCheckNow`)]}),(0,A.jsxs)(r,{onClick:()=>void o.updateNow(),disabled:!D,children:[(0,A.jsx)(g,{className:a(`mr-2 h-4 w-4`,T&&`animate-spin`)}),y(`runtimeUpdatesApplyNow`)]})]})})})]})}export{Y as DesktopUpdateConfig};
|
|
1
|
+
import{Jt as e,Kt as t,Qn as n,Yt as r,Zt as i,_n as a,an as o,nn as s,on as c,qt as l,rn as u,tn as d,ur as f}from"./api-BaML_txv.js";import{t as p}from"./navigation-link-tawg3qi2.js";import{t as m}from"./download-BN4aCzSx.js";import{t as h}from"./refresh-cw-CqsHJPqR.js";import{t as g}from"./rotate-cw-DS-Gca0a.js";import{l as _,n as v,s as y}from"./i18n-Bzo4IocH.js";import{a as b,i as x,n as S,r as C,t as w}from"./select-DHYR109w.js";import{a as T,i as E,n as D,r as O,t as k}from"./card-DxCOCY_7.js";var A=f(),j=`https://github.com/Peiiii/nextclaw/releases`,M={checking:`desktopUpdatesStatusChecking`,"update-available":`desktopUpdatesStatusAvailable`,downloading:`desktopUpdatesStatusDownloading`,downloaded:`desktopUpdatesStatusDownloaded`,applying:`desktopUpdatesStatusApplying`,"restart-required":`desktopUpdatesStatusRestartRequired`,"up-to-date":`desktopUpdatesStatusUpToDate`,blocked:`desktopUpdatesStatusBlocked`,failed:`desktopUpdatesStatusFailed`},N={feature:`desktopUpdatesReleaseNotesFeature`,enhancement:`desktopUpdatesReleaseNotesEnhancement`,fix:`desktopUpdatesReleaseNotesFix`,compatibility:`desktopUpdatesReleaseNotesCompatibility`};function P({snapshot:e}){return(0,A.jsx)(`span`,{className:a(`inline-flex rounded-full px-3 py-1 text-xs font-medium ring-1`,U(e.status)),children:H(e)})}function F({label:e,value:t}){return(0,A.jsxs)(`div`,{className:`rounded-lg bg-background/70 p-3`,children:[(0,A.jsx)(`p`,{className:`text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,A.jsx)(`p`,{className:`mt-1 text-sm font-semibold text-foreground`,children:t})]})}function I({snapshot:e}){if(e.status!==`downloading`)return null;let t=e.progress?.percent,n=t==null?y(`desktopUpdatesDownloadProgressUnknown`):y(`desktopUpdatesDownloadProgressPercent`).replace(`{percent}`,String(t)),r=z(e.progress?.downloadedBytes??0,e.progress?.totalBytes??null);return(0,A.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:n}),(0,A.jsx)(`p`,{className:`text-xs font-medium text-amber-700`,children:r})]}),(0,A.jsx)(`div`,{className:`mt-3 h-2 overflow-hidden rounded-full bg-amber-100`,children:(0,A.jsx)(`div`,{className:`h-full rounded-full bg-amber-500 transition-[width]`,style:{width:`${t??0}%`}})})]})}function L(e){return e?.trim()||`-`}function R(e){return e?v(e):`-`}function z(e,t){let n=B(e);return t&&t>0?`${n} / ${B(t)}`:n}function B(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=10||r===0?n.toFixed(0):n.toFixed(1)} ${t[r]}`}function V(e){return y(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}function H(e){return e.status===`failed`&&e.failureStage?y(`desktopUpdatesFailureStage.${e.failureStage}`):y(M[e.status]??`desktopUpdatesStatusIdle`)}function U(e){return e===`downloaded`||e===`restart-required`?`bg-emerald-50 text-emerald-700 ring-emerald-100`:e===`update-available`||e===`downloading`||e===`checking`?`bg-amber-50 text-amber-700 ring-amber-100`:e===`failed`||e===`blocked`?`bg-red-50 text-red-700 ring-red-100`:`bg-gray-100 text-gray-700 ring-gray-200`}function W(e){return e.status===`blocked`&&e.installationKind===`desktop-bundle`&&e.blockReason===`unsupported-installation`}function G(){return _()===`zh`?`zh-CN`:`en-US`}function K(e,t){return s(e.title,t)??y(N[e.kind]??`desktopUpdatesReleaseNotesEnhancement`)}function q({snapshot:e}){let t=u(e),r=G(),i=n({queryKey:[`runtime-release-notes`,t],queryFn:async()=>await d(t??``),enabled:!!t,retry:!1,staleTime:300*1e3}),a=i.data,o=s(a?.title,r)??y(`desktopUpdatesReleaseNotesPreviewTitle`),c=s(a?.summary,r)??y(`desktopUpdatesReleaseNotesPreviewDescription`);return e.releaseNotesUrl?(0,A.jsxs)(k,{children:[(0,A.jsx)(E,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(T,{children:o}),(0,A.jsx)(O,{children:c})]}),(0,A.jsx)(p,{href:e.releaseNotesUrl,external:!0,children:y(`desktopUpdatesReleaseNotes`)})]})}),(0,A.jsxs)(D,{className:`space-y-4`,children:[i.isLoading?(0,A.jsx)(`p`,{className:`text-sm text-gray-500`,children:y(`desktopUpdatesReleaseNotesPreviewLoading`)}):null,!t||i.isError?(0,A.jsx)(`p`,{className:`text-sm text-gray-500`,children:y(`desktopUpdatesReleaseNotesPreviewUnavailable`)}):null,a?(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:a.sections.map(e=>(0,A.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:K(e,r)}),(0,A.jsx)(`ul`,{className:`mt-3 space-y-3`,children:e.items.map((t,n)=>{let i=s(t.title,r),a=s(t.body,r);return(0,A.jsxs)(`li`,{className:`space-y-1`,children:[i?(0,A.jsx)(`p`,{className:`text-sm font-medium text-gray-800`,children:i}):null,a?(0,A.jsx)(`p`,{className:`text-sm leading-5 text-gray-600`,children:a}):null]},`${i??e.kind}-${n}`)})})]},e.kind))}):null]})]}):null}function J(){return(0,A.jsx)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),children:(0,A.jsx)(e,{title:y(`runtimeUpdatesUnavailableTitle`),description:y(`runtimeUpdatesUnavailableDescription`),children:(0,A.jsx)(l,{children:(0,A.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:y(`runtimeUpdatesUnavailableHint`)})})})})}function Y(){let{supported:n,initialized:s,busyAction:u,snapshot:d}=c();if(!s)return(0,A.jsx)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),children:(0,A.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:y(`loading`)})});if(!n||!d)return(0,A.jsx)(J,{});let f=u===`checking`,_=u===`downloading`,v=u===`applying`,T=u===`updating`,E=u===`switching-channel`,D=(d.status===`update-available`||d.status===`downloaded`)&&!_&&!v&&!T,O=[[y(`runtimeUpdatesHostVersion`),L(d.hostVersion)],[y(`desktopUpdatesCurrentBundleVersion`),L(d.currentVersion)],[y(`desktopUpdatesAvailableVersion`),L(d.availableVersion)],[y(`desktopUpdatesLastCheckedAt`),R(d.lastCheckedAt)],[y(`desktopUpdatesCurrentChannel`),V(d.channel)]];return(0,A.jsxs)(i,{title:y(`runtimeUpdatesPageTitle`),description:y(`runtimeUpdatesPageDescription`),actions:(0,A.jsxs)(r,{variant:`outline`,onClick:()=>void o.checkForUpdates(),disabled:f||_||v||T,children:[(0,A.jsx)(h,{className:a(`mr-2 h-4 w-4`,f&&`animate-spin`)}),y(`desktopUpdatesCheckNow`)]}),children:[(0,A.jsx)(e,{title:y(`desktopUpdatesOverviewTitle`),description:y(`desktopUpdatesOverviewDescription`),children:(0,A.jsx)(l,{children:(0,A.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,A.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:y(`desktopUpdatesStatusLabel`)}),(0,A.jsx)(P,{snapshot:d})]}),(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:O.map(([e,t])=>(0,A.jsx)(F,{label:e,value:t},e))}),d.channel===`beta`?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:y(`desktopUpdatesBetaBadgeTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-amber-700`,children:y(`desktopUpdatesBetaBadgeDescription`)})]}):null,d.downloadedVersion?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-emerald-800`,children:y(`desktopUpdatesDownloadedBannerTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-emerald-700`,children:y(`runtimeUpdatesDownloadedBannerDescription`).replace(`{version}`,d.downloadedVersion)})]}):null,(0,A.jsx)(I,{snapshot:d}),d.status===`blocked`?(0,A.jsxs)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm font-semibold text-red-800`,children:y(`desktopUpdatesBlockedTitle`)}),(0,A.jsx)(`p`,{className:`mt-1 text-sm text-red-700`,children:d.errorMessage??y(`desktopUpdatesBlockedDescription`)}),d.recoveryCommand?(0,A.jsx)(`code`,{className:`mt-3 block rounded-lg bg-white/70 px-3 py-2 text-xs text-red-800`,children:d.recoveryCommand}):null,W(d)?(0,A.jsx)(p,{href:j,external:!0,icon:m,className:`mt-3 rounded-full border border-red-300 bg-white/70 px-3 py-2 text-red-800 no-underline hover:bg-white hover:text-red-900 hover:no-underline`,children:y(`desktopUpdatesManualPortableDownload`)}):null]}):null,d.errorMessage&&d.status!==`blocked`?(0,A.jsx)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4 text-sm text-red-700`,children:d.errorMessage}):null]})})}),(0,A.jsx)(q,{snapshot:d}),(0,A.jsx)(e,{title:y(`desktopUpdatesChannelSettingsTitle`),description:y(`desktopUpdatesChannelSettingsDescription`),children:(0,A.jsx)(l,{children:(0,A.jsx)(t,{title:y(`desktopUpdatesReleaseChannel`),description:y(`desktopUpdatesReleaseChannelHelp`),layout:`stacked`,children:(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsxs)(w,{value:d.channel,disabled:E||f||_||v||T,onValueChange:e=>void o.updateChannel(e),children:[(0,A.jsx)(x,{className:`w-full max-w-sm`,children:(0,A.jsx)(b,{placeholder:y(`desktopUpdatesReleaseChannel`)})}),(0,A.jsxs)(S,{children:[(0,A.jsx)(C,{value:`stable`,children:y(`desktopUpdatesChannelStable`)}),(0,A.jsx)(C,{value:`beta`,children:y(`desktopUpdatesChannelBeta`)})]})]}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:y(`desktopUpdatesReleaseChannelDowngradeHint`)})]})})})}),(0,A.jsx)(e,{title:y(`desktopUpdatesActionsTitle`),description:y(`runtimeUpdatesActionsDescription`),children:(0,A.jsx)(l,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4`,children:[(0,A.jsxs)(r,{variant:`outline`,onClick:()=>void o.checkForUpdates(),disabled:f||_||v||T,children:[(0,A.jsx)(h,{className:a(`mr-2 h-4 w-4`,f&&`animate-spin`)}),y(`desktopUpdatesCheckNow`)]}),(0,A.jsxs)(r,{onClick:()=>void o.updateNow(),disabled:!D,children:[(0,A.jsx)(g,{className:a(`mr-2 h-4 w-4`,T&&`animate-spin`)}),y(`runtimeUpdatesApplyNow`)]})]})})})]})}export{Y as DesktopUpdateConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-
|
|
1
|
+
import{i as e}from"./chunk-DF37yw5_.js";import{_n as t,ur as n,xr as r}from"./api-BaML_txv.js";import{B as i,C as a,D as o,E as s,H as c,O as l,T as u,U as d,V as f,h as p,k as m,r as h,w as g,z as _}from"./context-menu-DVgLoPqH.js";import{t as v}from"./x-DLvS4xvV.js";import{s as y}from"./i18n-Bzo4IocH.js";var b=e(r(),1),x=n(),S=f,C=c,w=b.forwardRef(({onFocus:e,...t},n)=>(0,x.jsx)(d,{ref:n,onFocus:t=>{e?.(t),!t.defaultPrevented&&!t.currentTarget.matches(`:focus-visible`)&&t.preventDefault()},...t}));w.displayName=d.displayName;var T=b.forwardRef(({className:e,side:n=`top`,sideOffset:r=4,...a},o)=>(0,x.jsx)(i,{children:(0,x.jsx)(_,{ref:o,"data-theme-overlay":`tooltip`,sideOffset:r,side:n,className:t(`z-[var(--z-tooltip,10150)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...a})}));T.displayName=_.displayName;var E={sm:`h-6 w-6 rounded-md p-1`,md:`h-7 w-7 rounded-md p-1.5`,lg:`h-8 w-8 rounded-lg p-1.5`};function D({children:e,className:n,...r}){return(0,x.jsx)(`div`,{...r,className:t(`flex shrink-0 items-center gap-1 max-md:gap-0`,n),children:e})}var O=b.forwardRef(({className:e,disabled:n=!1,icon:r,label:i,size:a=`md`,tone:o=`default`,tooltip:s,tooltipSide:c,...l},u)=>{let d=(0,x.jsx)(`button`,{...l,ref:u,type:`button`,disabled:n,"aria-label":i,"data-tone":o,className:t(`relative inline-flex shrink-0 items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border disabled:cursor-not-allowed`,E[a],`text-muted-foreground hover:text-accent-foreground disabled:text-muted-foreground/45 disabled:hover:text-muted-foreground/45`,p.icon,a===`sm`?`max-md:h-8 max-md:w-8`:`max-md:h-[var(--icon-control-size)] max-md:w-[var(--icon-control-size)]`,`before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:transition-colors before:content-[''] max-md:before:inset-auto max-md:before:h-[var(--icon-feedback-size)] max-md:before:w-[var(--icon-feedback-size)]`,a===`sm`&&`max-md:before:h-7 max-md:before:w-7`,e),children:(0,x.jsx)(`span`,{className:`relative inline-flex items-center justify-center`,children:r})}),f=s===!1?null:s??i;return f?(0,x.jsx)(S,{delayDuration:250,children:(0,x.jsxs)(C,{disableHoverableContent:!0,children:[(0,x.jsx)(w,{asChild:!0,children:n?(0,x.jsx)(`span`,{className:`inline-flex`,children:d}):d}),(0,x.jsx)(T,{side:c,className:`text-xs`,children:f})]})}):d});O.displayName=`IconActionButton`;var k=l,A=o,j=b.forwardRef(({className:e,...n},r)=>(0,x.jsx)(s,{ref:r,"data-theme-overlay":`modal-backdrop`,className:t(`fixed inset-0 z-[var(--z-modal-backdrop,10000)] bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...n}));j.displayName=s.displayName;var M=b.forwardRef(({className:e,children:n,...r},i)=>(0,x.jsxs)(A,{children:[(0,x.jsx)(j,{}),(0,x.jsx)(g,{ref:i,"data-theme-overlay":`dialog`,className:t(`fixed left-[50%] top-[50%] z-[var(--z-modal,10050)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-border bg-popover p-6 text-popover-foreground shadow-xl duration-base data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]`,`max-md:max-w-[calc(100vw-1.5rem)] max-h-[calc(100dvh-1.5rem)] max-md:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px)-1.5rem)] overflow-y-auto overscroll-contain`,e),...r,onEscapeKeyDown:e=>{h(e)||r.onEscapeKeyDown?.(e)},children:n})]}));M.displayName=g.displayName;var N=({className:e,children:n,actions:r,showClose:i=!0,...o})=>(0,x.jsxs)(`div`,{"data-slot":`dialog-header`,className:t(`grid shrink-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-3 text-left`,e),...o,children:[(0,x.jsx)(`div`,{className:`min-w-0 space-y-2 break-words`,children:n}),(0,x.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,"data-slot":`dialog-header-controls`,children:[r?(0,x.jsx)(`div`,{className:`flex items-center gap-1`,"data-slot":`dialog-header-actions`,children:r}):null,i?(0,x.jsx)(`div`,{className:t(`flex shrink-0`,r&&`pl-2`),children:(0,x.jsx)(a,{asChild:!0,children:(0,x.jsx)(O,{size:`sm`,label:y(`close`),icon:(0,x.jsx)(v,{className:`h-4 w-4`}),className:`max-md:h-11 max-md:w-11`})})}):null]})]});N.displayName=`DialogHeader`;var P=({className:e,...n})=>(0,x.jsx)(`div`,{className:t(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-3`,e),...n});P.displayName=`DialogFooter`;var F=b.forwardRef(({className:e,...n},r)=>(0,x.jsx)(m,{ref:r,className:t(`text-lg font-semibold leading-tight tracking-tight text-foreground`,e),...n}));F.displayName=m.displayName;var I=b.forwardRef(({className:e,...n},r)=>(0,x.jsx)(u,{ref:r,className:t(`text-sm text-muted-foreground leading-relaxed`,e),...n}));I.displayName=u.displayName;export{N as a,D as c,S as d,w as f,P as i,C as l,M as n,F as o,I as r,O as s,k as t,T as u};
|