libre-webui 0.37.0 → 0.37.2
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/README.md +6 -0
- package/backend/dist/cordis/dsh/engine-plugin.d.ts.map +1 -1
- package/backend/dist/cordis/dsh/engine-plugin.js +4 -1
- package/backend/dist/cordis/dsh/engine-plugin.js.map +1 -1
- package/backend/dist/cordis/host/config.d.ts.map +1 -1
- package/backend/dist/cordis/host/config.js +14 -4
- package/backend/dist/cordis/host/config.js.map +1 -1
- package/backend/dist/cordis/host/host.d.ts.map +1 -1
- package/backend/dist/cordis/host/host.js +7 -2
- package/backend/dist/cordis/host/host.js.map +1 -1
- package/backend/dist/cordis/host/privacy.d.ts +8 -0
- package/backend/dist/cordis/host/privacy.d.ts.map +1 -0
- package/backend/dist/cordis/host/privacy.js +73 -0
- package/backend/dist/cordis/host/privacy.js.map +1 -0
- package/backend/dist/cordis/runtime.d.ts.map +1 -1
- package/backend/dist/cordis/runtime.js +12 -1
- package/backend/dist/cordis/runtime.js.map +1 -1
- package/backend/dist/services/agentCliService.d.ts.map +1 -1
- package/backend/dist/services/agentCliService.js +3 -0
- package/backend/dist/services/agentCliService.js.map +1 -1
- package/backend/dist/utils/pluginDefinitionTrust.js +1 -1
- package/backend/package.json +2 -2
- package/frontend/dist/artifact-runtime/.build-fingerprint +1 -1
- package/frontend/dist/artifact-runtime/framer-motion.js +3 -3
- package/frontend/dist/artifact-runtime/lucide-react.js +1 -1
- package/frontend/dist/artifact-runtime/react.js +5 -5
- package/frontend/dist/artifact-runtime/recharts.js +45 -45
- package/frontend/dist/assets/index-DWLnkKwj.js +16 -0
- package/frontend/dist/index.html +30 -30
- package/frontend/dist/js/{ArtifactContainer-Bd0IrnmH.js → ArtifactContainer-D4v4l15L.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-CL_ROEDy.js → ArtifactDemoPage-B2uaVpsi.js} +1 -1
- package/frontend/dist/js/{ArtifactSandboxFrame-Dv32Q7Q9.js → ArtifactSandboxFrame-DlWJHI-r.js} +1 -1
- package/frontend/dist/js/{ArtifactSlideOutPanel-BIeQrdzE.js → ArtifactSlideOutPanel-laZ98QKB.js} +1 -1
- package/frontend/dist/js/{AutomationModal-Dy42OlIk.js → AutomationModal-CjjiEZFA.js} +1 -1
- package/frontend/dist/js/{AutomationsPage-DWtmeftv.js → AutomationsPage-jnWmD58y.js} +1 -1
- package/frontend/dist/js/{AvatarUpload-ClO6yGZX.js → AvatarUpload-KaBaTKoG.js} +1 -1
- package/frontend/dist/js/{Button-ZQ6BePid.js → Button-CGMYia4g.js} +1 -1
- package/frontend/dist/js/{CalendarPage-ChZgPFIy.js → CalendarPage-Dc7r-86c.js} +1 -1
- package/frontend/dist/js/ChannelsPage-DHPabX1e.js +1 -0
- package/frontend/dist/js/ChatPage-ZvGp-iqV.js +14 -0
- package/frontend/dist/js/{ConnectModels-S4NOCxtb.js → ConnectModels-aUTD6s9B.js} +1 -1
- package/frontend/dist/js/{CordisPage-BN6AcgVv.js → CordisPage-DZKcpPVj.js} +1 -1
- package/frontend/dist/js/{EvaluationsPage-DsGvkOBY.js → EvaluationsPage-BB7sPhIR.js} +1 -1
- package/frontend/dist/js/{FirstTimeSetup-DOHfNdJo.js → FirstTimeSetup-elqSi9JH.js} +1 -1
- package/frontend/dist/js/{GalleryPage-Fndn6_oZ.js → GalleryPage-CrlNRnkn.js} +1 -1
- package/frontend/dist/js/{HomePage-DPoIA-VC.js → HomePage-lR9h7_a1.js} +1 -1
- package/frontend/dist/js/{LanguageSwitcher-DAkaWEHB.js → LanguageSwitcher-CWkbzpxT.js} +1 -1
- package/frontend/dist/js/{LibreClawPage-CdFXe8Mg.js → LibreClawPage-P19FnNlu.js} +1 -1
- package/frontend/dist/js/{Logo-C9fsEUaY.js → Logo-HZvdAk2c.js} +1 -1
- package/frontend/dist/js/{LogoMark-Cvu5CQOW.js → LogoMark-GJnfMXsk.js} +1 -1
- package/frontend/dist/js/{ModelManagerModals-oO3ygVfy.js → ModelManagerModals-Bk6OQzJI.js} +1 -1
- package/frontend/dist/js/{NotesPage-44VKCZNH.js → NotesPage-DopG0M4B.js} +2 -2
- package/frontend/dist/js/{OptimizedSyntaxHighlighter-aKWyHj_c.js → OptimizedSyntaxHighlighter-CzzV6ONG.js} +1 -1
- package/frontend/dist/js/OptimizedSyntaxHighlighter-ajqwyBQm.js +1 -0
- package/frontend/dist/js/{PasswordStrengthMeter-BZF8U24d.js → PasswordStrengthMeter-DasfJa4P.js} +1 -1
- package/frontend/dist/js/{PersonasPage-DoHAgNb3.js → PersonasPage-CIJINcQK.js} +1 -1
- package/frontend/dist/js/{PluginUsagePage-BfkgiWdb.js → PluginUsagePage-Cj0mUxD8.js} +1 -1
- package/frontend/dist/js/RichMessageContent-BZndQSJU.js +1 -0
- package/frontend/dist/js/{RichMessageContent-B3V8vNPB.js → RichMessageContent-DxCHlUlY.js} +2 -2
- package/frontend/dist/js/SettingsModal-wAuFQOE4.js +19 -0
- package/frontend/dist/js/{SettingsToggle-CKLHOUt-.js → SettingsToggle-oxvw7ulA.js} +1 -1
- package/frontend/dist/js/{ShareDialog-DFCFk_5o.js → ShareDialog-Bhpt_Y1N.js} +1 -1
- package/frontend/dist/js/{SystemPage-CqZLDXog.js → SystemPage-BfhVXqar.js} +1 -1
- package/frontend/dist/js/{TurnstileWidget-BO2ceTt8.js → TurnstileWidget-CVepEMEQ.js} +1 -1
- package/frontend/dist/js/{UserManagementPage-Ch-PvYQ9.js → UserManagementPage-2yHv89ZA.js} +1 -1
- package/frontend/dist/js/{UserManagementPanel-D7TNSA3i.js → UserManagementPanel-BU95ZPOv.js} +1 -1
- package/frontend/dist/js/{WhatsNewModal-5hfNdmEV.js → WhatsNewModal-Dl69bG2T.js} +1 -1
- package/frontend/dist/js/WorkPage-CSderbeT.js +8 -0
- package/frontend/dist/js/api-CU-JXx2u.js +1 -0
- package/frontend/dist/js/{api-jEschMu2.js → api-DPXCtanG.js} +1 -1
- package/frontend/dist/js/{appNavigation-Dr7gFa_n.js → appNavigation-R8iKverf.js} +1 -1
- package/frontend/dist/js/{appStore-DglPGdPW.js → appStore-BD70bvas.js} +2 -2
- package/frontend/dist/js/appVersion-C7sxqgMd.js +1 -0
- package/frontend/dist/js/{authStore-BSn9e-LG.js → authStore-D8fc-Hl0.js} +3 -3
- package/frontend/dist/js/authStore-FNKLFUQp.js +1 -0
- package/frontend/dist/js/{chatStore-BtjmZY_D.js → chatStore-CK5ojwft.js} +3 -3
- package/frontend/dist/js/{client-CUuh7qtw.js → client-BeJbHHWx.js} +2 -2
- package/frontend/dist/js/{config-CBGiqPGG.js → config-D6Kcp5n3.js} +1 -1
- package/frontend/dist/js/{cordisApi-c6Um_474.js → cordisApi-BS8QMSV4.js} +1 -1
- package/frontend/dist/js/{estree-DCT3Jm65.js → estree-DGmLqopC.js} +17 -17
- package/frontend/dist/js/{evaluationsApi-_U24Slqu.js → evaluationsApi-2YwZBPk5.js} +1 -1
- package/frontend/dist/js/{html-CBXMuS97.js → html-BryNQ_yx.js} +6 -6
- package/frontend/dist/js/{markdown-Bo71X2X2.js → markdown-CZ1tYEW8.js} +17 -17
- package/frontend/dist/js/{markdown-core-BFkBYv2v.js → markdown-core-KjS96SYW.js} +1 -1
- package/frontend/dist/js/{markdown-html-CwjnwJbl.js → markdown-html-DQEwrWcf.js} +1 -1
- package/frontend/dist/js/{markdown-math-CJvHdD1l.js → markdown-math-CKi32S5d.js} +1 -1
- package/frontend/dist/js/{markdownHtml-egpK3_YY.js → markdownHtml-lrXhxBhK.js} +1 -1
- package/frontend/dist/js/markdownMath-B0BpyFBS.js +1 -0
- package/frontend/dist/js/{messageCodeStyles-BuSENDg_.js → messageCodeStyles-D4haBw80.js} +1 -1
- package/frontend/dist/js/react-vendor-wiHys0m2.js +9 -0
- package/frontend/dist/js/router-vendor-HZm4FR0A.js +1 -0
- package/frontend/dist/js/{standalone-6z5x8CWe.js → standalone-DbyFjvTU.js} +1 -1
- package/frontend/dist/js/{syntax-highlight-7t8DGG2n.js → syntax-highlight-DNc3FFCa.js} +1 -1
- package/frontend/dist/js/{teamEventStream-B37335ai.js → teamEventStream-omPy51va.js} +1 -1
- package/frontend/dist/js/{typescript-CslHIgIJ.js → typescript-DUM5niRM.js} +1 -1
- package/frontend/dist/js/{ui-CwzgKeUQ.js → ui-D5-4niRk.js} +2 -2
- package/frontend/dist/js/ui-vendor-BhHHyHk3.js +1 -0
- package/frontend/dist/js/{useChat-yWCeS8Rw.js → useChat-DnGClJeX.js} +1 -1
- package/frontend/dist/js/{useDialogFocus-BQLdAGYH.js → useDialogFocus-BPTG_Zmy.js} +1 -1
- package/frontend/dist/js/{useDictation-a98XeJii.js → useDictation-D7zVBjDJ.js} +1 -1
- package/frontend/dist/js/useQuery-hWmQjdLu.js +1 -0
- package/frontend/dist/js/{useTranslation-Kn7_iLGj.js → useTranslation-B9kflK9S.js} +1 -1
- package/frontend/dist/js/{utils-Dq1w7K0c.js → utils-p8Gt72YP.js} +1 -1
- package/frontend/dist/js/{utils-vendor-dx9vGAt3.js → utils-vendor-DISWt2y9.js} +1 -1
- package/frontend/dist/js/{workApi-Xmj4wmPi.js → workApi-C5InfT8x.js} +1 -1
- package/frontend/dist/js/workApi-FV75LKJn.js +1 -0
- package/package.json +5 -5
- package/plugins/codex-oauth.json +2 -0
- package/frontend/dist/assets/index-C1SuPfNL.js +0 -71
- package/frontend/dist/js/ChannelsPage-zN03cSNe.js +0 -1
- package/frontend/dist/js/ChatPage-8miRtYkQ.js +0 -14
- package/frontend/dist/js/OptimizedSyntaxHighlighter-BFjOBavF.js +0 -1
- package/frontend/dist/js/RichMessageContent-Cm-Sw-ux.js +0 -1
- package/frontend/dist/js/SettingsModal-DhBjTuR7.js +0 -19
- package/frontend/dist/js/WorkPage-CTd_UrET.js +0 -8
- package/frontend/dist/js/api-D7VJAMui.js +0 -1
- package/frontend/dist/js/appVersion-BQ7RP6kt.js +0 -1
- package/frontend/dist/js/authStore-DSIpfiYd.js +0 -1
- package/frontend/dist/js/markdownMath-mesq3ZcY.js +0 -1
- package/frontend/dist/js/react-vendor-D0Ec-185.js +0 -9
- package/frontend/dist/js/router-vendor-CM0PhOMl.js +0 -1
- package/frontend/dist/js/ui-vendor-wayYH9Nf.js +0 -177
- package/frontend/dist/js/useQuery-C3O4CZ54.js +0 -1
- package/frontend/dist/js/workApi-DXie0wBj.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/OptimizedSyntaxHighlighter-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,r as n,t as r}from"./react-vendor-D0Ec-185.js";import{o as i}from"./logger-BR4forr_.js";import{t as a}from"./useTranslation-Kn7_iLGj.js";import{t as o}from"./utils-Dq1w7K0c.js";import{Lt as s,n as c}from"./ui-vendor-wayYH9Nf.js";import{t as l}from"./appStore-DglPGdPW.js";import{a as u,c as d,i as f,n as p,o as m,r as h,t as g}from"./messageCodeStyles-BuSENDg_.js";import"./Button-ZQ6BePid.js";import{t as _}from"./useDialogFocus-BQLdAGYH.js";var v=e(t(),1),y=r(),b=({label:e,error:t,helper:n,className:r,id:i,...a})=>{let s=(0,v.useId)(),c=i||`input-${s}`,l=`${c}-feedback`,u=[a[`aria-describedby`],(t||n)&&l].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`input`,{id:c,className:o(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...a,"aria-invalid":t?!0:a[`aria-invalid`],"aria-describedby":u}),t&&(0,y.jsx)(`p`,{id:l,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:l,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},x=v.forwardRef(({label:e,error:t,helper:n,className:r,id:i,...a},s)=>{let c=(0,v.useId)(),l=i||`textarea-${c}`,u=`${l}-feedback`,d=[a[`aria-describedby`],(t||n)&&u].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:l,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`textarea`,{ref:s,id:l,className:o(`block w-full resize-none rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...a,"aria-invalid":t?!0:a[`aria-invalid`],"aria-describedby":d}),t&&(0,y.jsx)(`p`,{id:u,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:u,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})});x.displayName=`Textarea`;var S=({label:e,error:t,helper:n,options:r,className:i,id:a,...s})=>{let c=(0,v.useId)(),l=a||`select-${c}`,u=`${l}-feedback`,d=[s[`aria-describedby`],(t||n)&&u].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:l,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`select`,{id:l,className:o(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,i),...s,"aria-invalid":t?!0:s[`aria-invalid`],"aria-describedby":d,children:r.map((e,t)=>(0,y.jsx)(`option`,{value:e.value,children:e.label},e.key??`${e.value}-${t}`))}),t&&(0,y.jsx)(`p`,{id:u,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:u,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},C=({className:e,...t})=>(0,y.jsx)(s,{...t,"aria-hidden":`true`,className:o(`h-3.5 w-3.5 shrink-0 animate-spin text-ink-subtle motion-reduce:animate-none`,e)}),w=v.lazy(()=>i(()=>import(`./OptimizedSyntaxHighlighter-BFjOBavF.js`),__vite__mapDeps([0,1,2,3,4,5]))),T=8e4;function E({content:e}){return e?(0,y.jsx)(`div`,{dir:`auto`,className:`whitespace-pre-wrap break-words leading-relaxed`,children:e}):null}function D({content:e,language:t,complete:n}){let r=n?e.replace(/\r?\n$/,``):e,i=l(e=>e.theme.mode!==`light`),a=v.useRef(null),o=v.useRef(!0),s=v.useDeferredValue(r),c=r.length<=T,d=v.useCallback(e=>{a.current=e,e&&o.current&&(e.scrollTop=e.scrollHeight)},[]);v.useLayoutEffect(()=>{let e=a.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[r,s]);let m=v.useCallback(()=>{let e=a.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;o.current=t<24},[]),_=v.useMemo(()=>({children:e,...t})=>(0,y.jsx)(`pre`,{...t,ref:d,onScroll:e=>{m(),t.onScroll?.(e)},children:e}),[d,m]),b=(0,y.jsx)(`pre`,{ref:d,onScroll:m,className:h,children:(0,y.jsx)(`code`,{children:r})});return(0,y.jsx)(u,{code:r,language:t,state:n?`complete`:`streaming`,children:c?(0,y.jsx)(v.Suspense,{fallback:b,children:(0,y.jsx)(w,{language:t||`text`,isDark:i,codeTheme:`night`,backgroundColor:i?g:p,borderRadius:0,customStyle:f,className:`!m-0 !rounded-none !border-none`,showLineNumbers:!0,preTag:_,children:s})}):b})}var O=v.memo(({content:e,className:t,segments:n,isStreaming:r=!0})=>{let i=v.useMemo(()=>n??m(e),[e,n]),a=i[i.length-1],s=a?.type===`code`&&!a.complete;return(0,y.jsxs)(`div`,{className:o(`text-sm leading-relaxed text-ink`,t),children:[i.map((e,t)=>e.type===`code`?(0,y.jsx)(D,{...e},`${e.type}-${t}`):(0,y.jsx)(E,{content:e.content},`${e.type}-${t}`)),r&&!s&&(0,y.jsx)(C,{"data-testid":`message-streaming-cursor`,className:`ms-1 inline-block align-text-bottom`})]})});O.displayName=`StreamingMessageContent`;var k=v.lazy(()=>i(()=>import(`./RichMessageContent-Cm-Sw-ux.js`),__vite__mapDeps([6,7,2,3,8,9,10,11,12,13,14,15,5])));function A({content:e,className:t}){return(0,y.jsx)(`div`,{dir:`auto`,className:o(`text-sm leading-relaxed text-ink whitespace-pre-wrap break-words`,t),children:e})}var j=v.memo(({content:e,className:t,isStreaming:n=!1})=>{let r=v.useMemo(()=>n?m(e):[],[e,n]),i=r.some(e=>e.type===`code`);if(n&&i)return(0,y.jsx)(O,{content:e,className:t,segments:r});let a;return a=d(e)?(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(O,{content:e,className:t,isStreaming:!1}),children:(0,y.jsx)(k,{content:e,className:t})}):(0,y.jsx)(A,{content:e,className:t}),(0,y.jsxs)(y.Fragment,{children:[a,n&&(0,y.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})});j.displayName=`MessageContent`;var M=({children:e,htmlFor:t,className:n=``})=>(0,y.jsx)(`label`,{htmlFor:t,className:o(`text-sm font-medium tracking-[-0.005em] text-ink-muted`,n),children:e}),N=({checked:e,onChange:t,disabled:n=!1,className:r=``})=>(0,y.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-disabled":n||void 0,disabled:n,onClick:()=>t(!e),className:o(`relative inline-flex h-6 w-11 flex-shrink-0 items-center justify-center rounded-full bg-transparent`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas dark:focus-visible:ring-primary-400`,n?`cursor-not-allowed opacity-50`:`cursor-pointer`,r),children:(0,y.jsx)(`span`,{"aria-hidden":`true`,className:o(`relative inline-flex h-6 w-11 items-center rounded-full border shadow-inner`,`transition-[background-color,border-color] duration-150 ease-out motion-reduce:transition-none`,e?`border-primary-600/70 bg-primary-600`:`border-line-strong bg-surface-subtle`),children:(0,y.jsx)(`span`,{className:o(`inline-block h-4 w-4 rounded-full bg-white shadow-subtle ring-1 ring-black/5`,`transform transition-transform duration-150 ease-out motion-reduce:transition-none`,e?`translate-x-6 rtl:-translate-x-6`:`translate-x-1 rtl:-translate-x-1`)})})}),P={narrow:`max-w-4xl`,default:`max-w-6xl`,wide:`max-w-7xl`},F=({children:e,width:t=`default`,className:n,contentClassName:r,...i})=>(0,y.jsx)(`div`,{"data-testid":`page-scroll-region`,className:o(`scroll-region h-full min-h-0 scrollbar-thin`,n),...i,children:(0,y.jsx)(`div`,{className:o(`mx-auto w-full px-4 pb-16 pt-7 sm:px-6 sm:pb-20 sm:pt-10 lg:px-8`,P[t],r),children:e})}),I=({title:e,description:t,eyebrow:n,actions:r,meta:i,className:a,...s})=>(0,y.jsxs)(`header`,{className:o(`mb-8 flex flex-col gap-6 border-b border-gray-200/70 pb-7 text-start dark:border-white/[0.08] sm:mb-10 sm:pb-9 md:flex-row md:items-end md:justify-between`,a),...s,children:[(0,y.jsxs)(`div`,{className:`min-w-0 max-w-3xl`,children:[n&&(0,y.jsx)(`div`,{className:`mb-3 text-[11px] font-medium uppercase tracking-[0.18em] text-gray-500 dark:text-dark-500 rtl:tracking-normal`,children:n}),(0,y.jsx)(`h1`,{className:`text-balance text-3xl font-normal leading-[1.02] tracking-[-0.04em] text-gray-950 dark:text-dark-950 sm:text-5xl rtl:leading-[1.15] rtl:tracking-normal`,children:e}),t&&(0,y.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-6 text-gray-600 dark:text-dark-600 sm:text-base sm:leading-7`,children:t}),i&&(0,y.jsx)(`div`,{className:`mt-4`,children:i})]}),r&&(0,y.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 md:justify-end`,children:r})]}),L=n(),R=`w-full rounded-lg border border-black/[0.08] bg-white px-2.5 py-1.5 text-[13px] text-gray-900 focus:border-primary-500/40 focus:outline-none dark:border-white/[0.08] dark:bg-dark-100 dark:text-dark-900`,z=`mb-1 block text-[11px] font-medium uppercase tracking-wide text-gray-400 dark:text-dark-500`,B=({titleId:e,title:t,subtitle:n,onClose:r,children:i,footer:a,widthClassName:s=`max-w-lg`,testId:c})=>{let l=(0,v.useRef)(null);return _(l,{onClose:r}),(0,L.createPortal)((0,y.jsx)(`div`,{className:`fixed inset-0 z-[2147483647] flex items-center justify-center bg-gray-950/55 p-4 backdrop-blur-md`,onClick:r,children:(0,y.jsx)(`div`,{ref:l,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":e,"data-testid":c,className:o(`flex max-h-[90vh] w-full flex-col overflow-hidden rounded-3xl border border-black/[0.07] bg-white shadow-[0_24px_80px_rgba(0,0,0,0.24)] animate-scale-in dark:border-white/[0.08] dark:bg-dark-25`,s),onClick:e=>e.stopPropagation(),children:(0,y.jsxs)(`div`,{"data-testid":`modal-scroll-region`,className:`min-h-0 overflow-y-auto p-6 scrollbar-thin`,children:[(0,y.jsx)(V,{titleId:e,title:t,subtitle:n,onClose:r}),i&&(0,y.jsx)(`div`,{className:`space-y-4`,children:i}),a&&(0,y.jsx)(`div`,{className:`mt-5 flex justify-end gap-3 border-t border-gray-200 pt-4 dark:border-dark-300`,children:a})]})})}),document.body)},V=({titleId:e,title:t,subtitle:n,onClose:r})=>{let{t:i}=a();return(0,y.jsxs)(`div`,{className:`mb-4 flex items-start justify-between gap-4`,children:[(0,y.jsxs)(`div`,{className:`min-w-0`,children:[(0,y.jsx)(`h3`,{id:e,className:`text-lg font-medium tracking-[-0.02em] text-gray-950 dark:text-dark-950`,children:t}),n&&(0,y.jsx)(`p`,{className:`mt-1 text-[12px] leading-5 text-gray-500 dark:text-dark-500`,children:n})]}),(0,y.jsx)(`button`,{type:`button`,onClick:r,"aria-label":i(`common.close`),className:`shrink-0 rounded-xl p-2 transition-colors hover:bg-gray-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 dark:hover:bg-dark-200`,children:(0,y.jsx)(c,{size:20,className:`text-gray-500`})})]})},H=({icon:e,label:t,destructive:n,disabled:r,testId:i,onClick:a})=>(0,y.jsx)(`button`,{type:`button`,onClick:a,disabled:r,title:t,"aria-label":t,"data-testid":i,className:o(`rounded-lg p-1.5 text-gray-400 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,n?`hover:bg-red-500/10 hover:text-red-500`:`hover:bg-black/[0.04] hover:text-gray-700 dark:hover:bg-white/[0.06] dark:hover:text-dark-800`),children:(0,y.jsx)(e,{className:`h-3.5 w-3.5`})});export{I as a,M as c,C as d,S as f,z as i,j as l,b as m,B as n,F as o,x as p,R as r,N as s,H as t,O as u};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/OptimizedSyntaxHighlighter-ajqwyBQm.js","js/OptimizedSyntaxHighlighter-CzzV6ONG.js","js/rolldown-runtime-hePW80VL.js","js/react-vendor-wiHys0m2.js","js/syntax-highlight-DNc3FFCa.js","js/markdown-core-KjS96SYW.js","js/RichMessageContent-BZndQSJU.js","js/RichMessageContent-DxCHlUlY.js","js/logger-BR4forr_.js","js/utils-p8Gt72YP.js","js/utils-vendor-DISWt2y9.js","js/appStore-BD70bvas.js","js/messageCodeStyles-D4haBw80.js","js/useTranslation-B9kflK9S.js","js/ui-vendor-BhHHyHk3.js","js/goober.modern-BaHbaW3_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,r as n,t as r}from"./react-vendor-wiHys0m2.js";import{o as i}from"./logger-BR4forr_.js";import{t as a}from"./useTranslation-B9kflK9S.js";import{t as o}from"./utils-p8Gt72YP.js";import{Lt as s,n as c}from"./ui-vendor-BhHHyHk3.js";import{t as l}from"./appStore-BD70bvas.js";import{a as u,c as d,i as f,n as p,o as m,r as h,t as g}from"./messageCodeStyles-D4haBw80.js";import"./Button-CGMYia4g.js";import{t as _}from"./useDialogFocus-BPTG_Zmy.js";var v=e(t(),1),y=r(),b=({label:e,error:t,helper:n,className:r,id:i,...a})=>{let s=(0,v.useId)(),c=i||`input-${s}`,l=`${c}-feedback`,u=[a[`aria-describedby`],(t||n)&&l].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`input`,{id:c,className:o(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...a,"aria-invalid":t?!0:a[`aria-invalid`],"aria-describedby":u}),t&&(0,y.jsx)(`p`,{id:l,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:l,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},x=v.forwardRef(({label:e,error:t,helper:n,className:r,id:i,...a},s)=>{let c=(0,v.useId)(),l=i||`textarea-${c}`,u=`${l}-feedback`,d=[a[`aria-describedby`],(t||n)&&u].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:l,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`textarea`,{ref:s,id:l,className:o(`block w-full resize-none rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...a,"aria-invalid":t?!0:a[`aria-invalid`],"aria-describedby":d}),t&&(0,y.jsx)(`p`,{id:u,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:u,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})});x.displayName=`Textarea`;var S=({label:e,error:t,helper:n,options:r,className:i,id:a,...s})=>{let c=(0,v.useId)(),l=a||`select-${c}`,u=`${l}-feedback`,d=[s[`aria-describedby`],(t||n)&&u].filter(Boolean).join(` `)||void 0;return(0,y.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,y.jsx)(`label`,{htmlFor:l,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,y.jsx)(`select`,{id:l,className:o(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,i),...s,"aria-invalid":t?!0:s[`aria-invalid`],"aria-describedby":d,children:r.map((e,t)=>(0,y.jsx)(`option`,{value:e.value,children:e.label},e.key??`${e.value}-${t}`))}),t&&(0,y.jsx)(`p`,{id:u,role:`alert`,className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,y.jsx)(`p`,{id:u,className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},C=({className:e,...t})=>(0,y.jsx)(s,{...t,"aria-hidden":`true`,className:o(`h-3.5 w-3.5 shrink-0 animate-spin text-ink-subtle motion-reduce:animate-none`,e)}),w=v.lazy(()=>i(()=>import(`./OptimizedSyntaxHighlighter-ajqwyBQm.js`),__vite__mapDeps([0,1,2,3,4,5]))),T=8e4;function E({content:e}){return e?(0,y.jsx)(`div`,{dir:`auto`,className:`whitespace-pre-wrap break-words leading-relaxed`,children:e}):null}function D({content:e,language:t,complete:n}){let r=n?e.replace(/\r?\n$/,``):e,i=l(e=>e.theme.mode!==`light`),a=v.useRef(null),o=v.useRef(!0),s=v.useDeferredValue(r),c=r.length<=T,d=v.useCallback(e=>{a.current=e,e&&o.current&&(e.scrollTop=e.scrollHeight)},[]);v.useLayoutEffect(()=>{let e=a.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[r,s]);let m=v.useCallback(()=>{let e=a.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;o.current=t<24},[]),_=v.useMemo(()=>({children:e,...t})=>(0,y.jsx)(`pre`,{...t,ref:d,onScroll:e=>{m(),t.onScroll?.(e)},children:e}),[d,m]),b=(0,y.jsx)(`pre`,{ref:d,onScroll:m,className:h,children:(0,y.jsx)(`code`,{children:r})});return(0,y.jsx)(u,{code:r,language:t,state:n?`complete`:`streaming`,children:c?(0,y.jsx)(v.Suspense,{fallback:b,children:(0,y.jsx)(w,{language:t||`text`,isDark:i,codeTheme:`night`,backgroundColor:i?g:p,borderRadius:0,customStyle:f,className:`!m-0 !rounded-none !border-none`,showLineNumbers:!0,preTag:_,children:s})}):b})}var O=v.memo(({content:e,className:t,segments:n,isStreaming:r=!0})=>{let i=v.useMemo(()=>n??m(e),[e,n]),a=i[i.length-1],s=a?.type===`code`&&!a.complete;return(0,y.jsxs)(`div`,{className:o(`text-sm leading-relaxed text-ink`,t),children:[i.map((e,t)=>e.type===`code`?(0,y.jsx)(D,{...e},`${e.type}-${t}`):(0,y.jsx)(E,{content:e.content},`${e.type}-${t}`)),r&&!s&&(0,y.jsx)(C,{"data-testid":`message-streaming-cursor`,className:`ms-1 inline-block align-text-bottom`})]})});O.displayName=`StreamingMessageContent`;var k=v.lazy(()=>i(()=>import(`./RichMessageContent-BZndQSJU.js`),__vite__mapDeps([6,7,2,3,8,9,10,11,12,13,14,15,5])));function A({content:e,className:t}){return(0,y.jsx)(`div`,{dir:`auto`,className:o(`text-sm leading-relaxed text-ink whitespace-pre-wrap break-words`,t),children:e})}var j=v.memo(({content:e,className:t,isStreaming:n=!1})=>{let r=v.useMemo(()=>n?m(e):[],[e,n]),i=r.some(e=>e.type===`code`);if(n&&i)return(0,y.jsx)(O,{content:e,className:t,segments:r});let a;return a=d(e)?(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(O,{content:e,className:t,isStreaming:!1}),children:(0,y.jsx)(k,{content:e,className:t})}):(0,y.jsx)(A,{content:e,className:t}),(0,y.jsxs)(y.Fragment,{children:[a,n&&(0,y.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})});j.displayName=`MessageContent`;var M=({children:e,htmlFor:t,className:n=``})=>(0,y.jsx)(`label`,{htmlFor:t,className:o(`text-sm font-medium tracking-[-0.005em] text-ink-muted`,n),children:e}),N=({checked:e,onChange:t,disabled:n=!1,className:r=``})=>(0,y.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-disabled":n||void 0,disabled:n,onClick:()=>t(!e),className:o(`relative inline-flex h-6 w-11 flex-shrink-0 items-center justify-center rounded-full bg-transparent`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas dark:focus-visible:ring-primary-400`,n?`cursor-not-allowed opacity-50`:`cursor-pointer`,r),children:(0,y.jsx)(`span`,{"aria-hidden":`true`,className:o(`relative inline-flex h-6 w-11 items-center rounded-full border shadow-inner`,`transition-[background-color,border-color] duration-150 ease-out motion-reduce:transition-none`,e?`border-primary-600/70 bg-primary-600`:`border-line-strong bg-surface-subtle`),children:(0,y.jsx)(`span`,{className:o(`inline-block h-4 w-4 rounded-full bg-white shadow-subtle ring-1 ring-black/5`,`transform transition-transform duration-150 ease-out motion-reduce:transition-none`,e?`translate-x-6 rtl:-translate-x-6`:`translate-x-1 rtl:-translate-x-1`)})})}),P={narrow:`max-w-4xl`,default:`max-w-6xl`,wide:`max-w-7xl`},F=({children:e,width:t=`default`,className:n,contentClassName:r,...i})=>(0,y.jsx)(`div`,{"data-testid":`page-scroll-region`,className:o(`scroll-region h-full min-h-0 scrollbar-thin`,n),...i,children:(0,y.jsx)(`div`,{className:o(`mx-auto w-full px-4 pb-16 pt-7 sm:px-6 sm:pb-20 sm:pt-10 lg:px-8`,P[t],r),children:e})}),I=({title:e,description:t,eyebrow:n,actions:r,meta:i,className:a,...s})=>(0,y.jsxs)(`header`,{className:o(`mb-8 flex flex-col gap-6 border-b border-gray-200/70 pb-7 text-start dark:border-white/[0.08] sm:mb-10 sm:pb-9 md:flex-row md:items-end md:justify-between`,a),...s,children:[(0,y.jsxs)(`div`,{className:`min-w-0 max-w-3xl`,children:[n&&(0,y.jsx)(`div`,{className:`mb-3 text-[11px] font-medium uppercase tracking-[0.18em] text-gray-500 dark:text-dark-500 rtl:tracking-normal`,children:n}),(0,y.jsx)(`h1`,{className:`text-balance text-3xl font-normal leading-[1.02] tracking-[-0.04em] text-gray-950 dark:text-dark-950 sm:text-5xl rtl:leading-[1.15] rtl:tracking-normal`,children:e}),t&&(0,y.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-6 text-gray-600 dark:text-dark-600 sm:text-base sm:leading-7`,children:t}),i&&(0,y.jsx)(`div`,{className:`mt-4`,children:i})]}),r&&(0,y.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 md:justify-end`,children:r})]}),L=n(),R=`w-full rounded-lg border border-black/[0.08] bg-white px-2.5 py-1.5 text-[13px] text-gray-900 focus:border-primary-500/40 focus:outline-none dark:border-white/[0.08] dark:bg-dark-100 dark:text-dark-900`,z=`mb-1 block text-[11px] font-medium uppercase tracking-wide text-gray-400 dark:text-dark-500`,B=({titleId:e,title:t,subtitle:n,onClose:r,children:i,footer:a,widthClassName:s=`max-w-lg`,testId:c})=>{let l=(0,v.useRef)(null);return _(l,{onClose:r}),(0,L.createPortal)((0,y.jsx)(`div`,{className:`fixed inset-0 z-[2147483647] flex items-center justify-center bg-gray-950/55 p-4 backdrop-blur-md`,onClick:r,children:(0,y.jsx)(`div`,{ref:l,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":e,"data-testid":c,className:o(`flex max-h-[90vh] w-full flex-col overflow-hidden rounded-3xl border border-black/[0.07] bg-white shadow-[0_24px_80px_rgba(0,0,0,0.24)] animate-scale-in dark:border-white/[0.08] dark:bg-dark-25`,s),onClick:e=>e.stopPropagation(),children:(0,y.jsxs)(`div`,{"data-testid":`modal-scroll-region`,className:`min-h-0 overflow-y-auto p-6 scrollbar-thin`,children:[(0,y.jsx)(V,{titleId:e,title:t,subtitle:n,onClose:r}),i&&(0,y.jsx)(`div`,{className:`space-y-4`,children:i}),a&&(0,y.jsx)(`div`,{className:`mt-5 flex justify-end gap-3 border-t border-gray-200 pt-4 dark:border-dark-300`,children:a})]})})}),document.body)},V=({titleId:e,title:t,subtitle:n,onClose:r})=>{let{t:i}=a();return(0,y.jsxs)(`div`,{className:`mb-4 flex items-start justify-between gap-4`,children:[(0,y.jsxs)(`div`,{className:`min-w-0`,children:[(0,y.jsx)(`h3`,{id:e,className:`text-lg font-medium tracking-[-0.02em] text-gray-950 dark:text-dark-950`,children:t}),n&&(0,y.jsx)(`p`,{className:`mt-1 text-[12px] leading-5 text-gray-500 dark:text-dark-500`,children:n})]}),(0,y.jsx)(`button`,{type:`button`,onClick:r,"aria-label":i(`common.close`),className:`shrink-0 rounded-xl p-2 transition-colors hover:bg-gray-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 dark:hover:bg-dark-200`,children:(0,y.jsx)(c,{size:20,className:`text-gray-500`})})]})},H=({icon:e,label:t,destructive:n,disabled:r,testId:i,onClick:a})=>(0,y.jsx)(`button`,{type:`button`,onClick:a,disabled:r,title:t,"aria-label":t,"data-testid":i,className:o(`rounded-lg p-1.5 text-gray-400 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,n?`hover:bg-red-500/10 hover:text-red-500`:`hover:bg-black/[0.04] hover:text-gray-700 dark:hover:bg-white/[0.06] dark:hover:text-dark-800`),children:(0,y.jsx)(e,{className:`h-3.5 w-3.5`})});export{I as a,M as c,C as d,S as f,z as i,j as l,b as m,B as n,F as o,x as p,R as r,N as s,H as t,O as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-vendor-wiHys0m2.js";import{i as n,n as r,r as i,t as a}from"./goober.modern-BaHbaW3_.js";var o=e(t(),1),s=e=>typeof e==`function`,c=(e,t)=>s(e)?e(t):e,l=(()=>{let e=0;return()=>(++e).toString()})(),u=(()=>{let e;return()=>{if(e===void 0&&typeof window<`u`){let t=matchMedia(`(prefers-reduced-motion: reduce)`);e=!t||t.matches}return e}})(),d=20,f=`default`,p=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return p(e,{type:+!!e.toasts.find(e=>e.id===r.id),toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(e=>e.id===i||i===void 0?{...e,dismissed:!0,visible:!1}:e)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+a}))}}},m=[],h={toasts:[],pausedAt:void 0,settings:{toastLimit:d}},g={},_=(e,t=f)=>{g[t]=p(g[t]||h,e),m.forEach(([e,n])=>{e===t&&n(g[t])})},v=e=>Object.keys(g).forEach(t=>_(e,t)),y=e=>Object.keys(g).find(t=>g[t].toasts.some(t=>t.id===e)),b=(e=f)=>t=>{_(t,e)},x={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},S=(e={},t=f)=>{let[n,r]=(0,o.useState)(g[t]||h),i=(0,o.useRef)(g[t]);(0,o.useEffect)(()=>(i.current!==g[t]&&r(g[t]),m.push([t,r]),()=>{let e=m.findIndex(([e])=>e===t);e>-1&&m.splice(e,1)}),[t]);let a=n.toasts.map(t=>({...e,...e[t.type],...t,removeDelay:t.removeDelay||e[t.type]?.removeDelay||e?.removeDelay,duration:t.duration||e[t.type]?.duration||e?.duration||x[t.type],style:{...e.style,...e[t.type]?.style,...t.style}}));return{...n,toasts:a}},C=(e,t=`blank`,n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:`status`,"aria-live":`polite`},message:e,pauseDuration:0,...n,id:n?.id||l()}),w=e=>(t,n)=>{let r=C(t,e,n);return b(r.toasterId||y(r.id))({type:2,toast:r}),r.id},T=(e,t)=>w(`blank`)(e,t);T.error=w(`error`),T.success=w(`success`),T.loading=w(`loading`),T.custom=w(`custom`),T.dismiss=(e,t)=>{let n={type:3,toastId:e};t?b(t)(n):v(n)},T.dismissAll=e=>T.dismiss(void 0,e),T.remove=(e,t)=>{let n={type:4,toastId:e};t?b(t)(n):v(n)},T.removeAll=e=>T.remove(void 0,e),T.promise=(e,t,n)=>{let r=T.loading(t.loading,{...n,...n?.loading});return typeof e==`function`&&(e=e()),e.then(e=>{let i=t.success?c(t.success,e):void 0;return i?T.success(i,{id:r,...n,...n?.success}):T.dismiss(r),e}).catch(e=>{let i=t.error?c(t.error,e):void 0;i?T.error(i,{id:r,...n,...n?.error}):T.dismiss(r)}),e};var ee=1e3,te=(e,t=`default`)=>{let{toasts:n,pausedAt:r}=S(e,t),i=(0,o.useRef)(new Map).current,a=(0,o.useCallback)((e,t=ee)=>{if(i.has(e))return;let n=setTimeout(()=>{i.delete(e),s({type:4,toastId:e})},t);i.set(e,n)},[]);(0,o.useEffect)(()=>{if(r)return;let e=Date.now(),i=n.map(n=>{if(n.duration===1/0)return;let r=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(r<0){n.visible&&T.dismiss(n.id);return}return setTimeout(()=>T.dismiss(n.id,t),r)});return()=>{i.forEach(e=>e&&clearTimeout(e))}},[n,r,t]);let s=(0,o.useCallback)(b(t),[t]),c=(0,o.useCallback)(()=>{s({type:5,time:Date.now()})},[s]),l=(0,o.useCallback)((e,t)=>{s({type:1,toast:{id:e,height:t}})},[s]),u=(0,o.useCallback)(()=>{r&&s({type:6,time:Date.now()})},[r,s]),d=(0,o.useCallback)((e,t)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:a}=t||{},o=n.filter(t=>(t.position||a)===(e.position||a)&&t.height),s=o.findIndex(t=>t.id===e.id),c=o.filter((e,t)=>t<s&&e.visible).length;return o.filter(e=>e.visible).slice(...r?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+i,0)},[n]);return(0,o.useEffect)(()=>{n.forEach(e=>{if(e.dismissed)a(e.id,e.removeDelay);else{let t=i.get(e.id);t&&(clearTimeout(t),i.delete(e.id))}})},[n,a]),{toasts:n,handlers:{updateHeight:l,startPause:c,endPause:u,calculateOffset:d}}},ne=a` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,re=a` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,ie=a` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,ae=n(`div`)` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||`#ff4b4b`}; position: relative; transform: rotate(45deg); animation: ${ne} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${re} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||`#fff`}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${ie} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,oe=a` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,se=n(`div`)` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||`#e0e0e0`}; border-right-color: ${e=>e.primary||`#616161`}; animation: ${oe} 1s linear infinite; `,ce=a` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,le=a` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,ue=n(`div`)` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||`#61d345`}; position: relative; transform: rotate(45deg); animation: ${ce} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${le} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||`#fff`}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,de=n(`div`)` position: absolute; `,fe=n(`div`)` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,pe=a` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,me=n(`div`)` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${pe} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,he=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t===void 0?n===`blank`?null:o.createElement(fe,null,o.createElement(se,{...r}),n!==`loading`&&o.createElement(de,null,n===`error`?o.createElement(ae,{...r}):o.createElement(ue,{...r}))):typeof t==`string`?o.createElement(me,null,t):t},ge=e=>` 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,_e=e=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} `,ve=`0%{opacity:0;} 100%{opacity:1;}`,ye=`0%{opacity:1;} 100%{opacity:0;}`,be=n(`div`)` :where(&) { display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; } `,xe=n(`div`)` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,Se=(e,t)=>{let n=e.includes(`top`)?1:-1,[r,i]=u()?[ve,ye]:[ge(n),_e(n)];return{animation:t?`${a(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${a(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ce=o.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Se(e.position||t||`top-center`,e.visible):{opacity:0},a=o.createElement(he,{toast:e}),s=o.createElement(xe,{...e.ariaProps},c(e.message,e));return o.createElement(be,{className:e.className,style:{...i,...n,...e.style}},typeof r==`function`?r({icon:a,message:s}):o.createElement(o.Fragment,null,a,s))});r(o.createElement);var we=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=o.useCallback(t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return o.createElement(`div`,{ref:a,className:t,style:n},i)},Te=(e,t)=>{let n=e.includes(`top`),r=n?{top:0}:{bottom:0},i=e.includes(`center`)?{justifyContent:`center`}:e.includes(`right`)?{justifyContent:`flex-end`}:{};return{left:0,right:0,display:`flex`,position:`absolute`,transition:u()?void 0:`all 230ms cubic-bezier(.21,1.02,.73,1)`,transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Ee=i` z-index: 9999; > * { pointer-events: auto; } `,E=16,De=({reverseOrder:e,position:t=`top-center`,toastOptions:n,gutter:r,children:i,toasterId:a,containerStyle:s,containerClassName:l})=>{let{toasts:u,handlers:d}=te(n,a);return o.createElement(`div`,{"data-rht-toaster":a||``,style:{position:`fixed`,zIndex:9999,top:E,left:E,right:E,bottom:E,pointerEvents:`none`,...s},className:l,onMouseEnter:d.startPause,onMouseLeave:d.endPause},u.map(n=>{let a=n.position||t,s=Te(a,d.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return o.createElement(we,{id:n.id,key:n.id,onHeightUpdate:d.updateHeight,className:n.visible?Ee:``,style:s},n.type===`custom`?c(n.message,n):i?i(n):o.createElement(Ce,{toast:n,position:a}))}))},Oe=T,ke=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ae(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:ke(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var je=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Me=e=>{let t=je(e);return t.charAt(0).toUpperCase()+t.slice(1)},D=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),O={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function k(e){return e!=null}function Ne(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??O.width,a=e.size??e.height??O.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?D(...c):D(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??O[`stroke-width`])*Number(e.size??e.width??O.width)/Number(t.size??t.width??O.width):t.strokeWidth??O[`stroke-width`];return[`svg`,{...Object.entries(O).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&k(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&k(t.width)&&{[r(`width`)]:t.width},...`height`in t&&k(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Pe(e,t={}){return Ne(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Fe=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ie=(0,o.createContext)({}),Le=()=>(0,o.useContext)(Ie),Re=(0,o.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Le()??{},b=!!l||Fe(f),[x,S,C=[]]=Pe(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:s??_,className:D(y,c),hasA11yProp:b,attributes:f});return(0,o.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function A(e,t=[],n=[]){let r=typeof e==`string`?Ae(e,t,n):e,i=(0,o.forwardRef)(({className:e,...t},n)=>(0,o.createElement)(Re,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Me(r.name)),i}var j={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};j.node;var ze=A(j),M={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};M.node;var Be=A(M),N={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};N.node;var Ve=A(N),P={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};P.node;var He=A(P),F={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};F.node;var Ue=A(F),I={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};I.node;var We=A(I),L={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};L.node;var Ge=A(L),R={name:`audio-lines`,size:24,node:[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]};R.node;var Ke=A(R),z={name:`bell-ring`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]};z.node;var qe=A(z),B={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};B.node;var Je=A(B),V={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};V.node;var Ye=A(V),H={name:`book-text`,size:24,node:[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`M8 11h8`,key:`vwpz6n`}],[`path`,{d:`M8 7h6`,key:`1f0q6e`}]]};H.node;var Xe=A(H),U={name:`bot`,size:24,node:[[`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`}]]};U.node;var Ze=A(U),W={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};W.node;var Qe=A(W),G={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};G.node;var $e=A(G),K={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};K.node;var et=A(K),q={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};q.node;var tt=A(q),J={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};J.node;var nt=A(J),Y={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};Y.node;var rt=A(Y),X={name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]};X.node;var it=A(X),Z={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]};Z.node;var at=A(Z),Q={name:`chart-no-axes-combined`,size:24,node:[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]};Q.node;var ot=A(Q),st={name:`check-check`,size:24,node:[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]};st.node;var ct=A(st),lt={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};lt.node;var ut=A(lt),dt={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};dt.node;var ft=A(dt),pt={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};pt.node;var mt=A(pt),ht={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};ht.node;var gt=A(ht),_t={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};_t.node;var vt=A(_t),yt={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]};yt.node;var bt=A(yt),xt={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};xt.node;var St=A(xt),Ct={name:`circle-alert`,size:24,node:[[`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`}]],aliases:[`alert-circle`]};Ct.node;var wt=A(Ct),Tt={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};Tt.node;var Et=A(Tt),Dt={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Dt.node;var Ot=A(Dt),kt={name:`circle-slash`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]};kt.node;var At=A(kt),jt={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};jt.node;var Mt=A(jt),Nt={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Nt.node;var Pt=A(Nt),Ft={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};Ft.node;var It=A(Ft),Lt={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Lt.node;var Rt=A(Lt),zt={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};zt.node;var Bt=A(zt),Vt={name:`code-xml`,size:24,node:[[`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`}]],aliases:[`code-2`]};Vt.node;var Ht=A(Vt),Ut={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Ut.node;var Wt=A(Ut),Gt={name:`columns-2`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]],aliases:[`columns`]};Gt.node;var Kt=A(Gt),qt={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};qt.node;var Jt=A(qt),Yt={name:`container`,size:24,node:[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]};Yt.node;var Xt=A(Yt),Zt={name:`copy`,size:24,node:[[`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`}]]};Zt.node;var Qt=A(Zt),$t={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};$t.node;var en=A($t),tn={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};tn.node;var nn=A(tn),rn={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};rn.node;var an=A(rn),on={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};on.node;var sn=A(on),cn={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};cn.node;var ln=A(cn),un={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};un.node;var dn=A(un),fn={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};fn.node;var pn=A(fn),mn={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};mn.node;var hn=A(mn),gn={name:`face-slightly-smiling-plus`,size:24,node:[[`path`,{d:`M13.267 2.08a10 10 0 108.653 8.653`,key:`1wbpyh`}],[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}]],aliases:[`smile-plus`]};gn.node;var _n=A(gn),vn={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};vn.node;var yn=A(vn),bn={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};bn.node;var xn=A(bn),Sn={name:`file-down`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]};Sn.node;var Cn=A(Sn),wn={name:`file-plus-corner`,size:24,node:[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],aliases:[`file-plus-2`]};wn.node;var Tn=A(wn),En={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};En.node;var Dn=A(En),On={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};On.node;var kn=A(On),An={name:`files`,size:24,node:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]};An.node;var jn=A(An),Mn={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};Mn.node;var Nn=A(Mn),Pn={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Pn.node;var Fn=A(Pn),In={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`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`}]]};In.node;var Ln=A(In),Rn={name:`folder-up`,size:24,node:[[`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`}],[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`m9 13 3-3 3 3`,key:`1pxg3c`}]]};Rn.node;var zn=A(Rn),Bn={name:`folder`,size:24,node:[[`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`}]]};Bn.node;var Vn=A(Bn),Hn={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};Hn.node;var Un=A(Hn),Wn={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};Wn.node;var Gn=A(Wn),Kn={name:`ghost`,size:24,node:[[`path`,{d:`M15 10v1`,key:`oj8wfp`}],[`path`,{d:`M7.528 20.472a1.6 1.6 0 012.277 0l1.057 1.056a1.6 1.6 0 002.276 0l1.057-1.056a1.6 1.6 0 012.277 0l1.114 1.114a1.4 1.4 0 002.414-1V10a8 8 0 00-16 0v10.586a1.4 1.4 0 002.414 1z`,key:`13lou3`}],[`path`,{d:`M9 10v1`,key:`1e14fa`}]]};Kn.node;var qn=A(Kn),Jn={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Jn.node;var Yn=A(Jn),Xn={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};Xn.node;var Zn=A(Xn),Qn={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};Qn.node;var $n=A(Qn),er={name:`git-fork`,size:24,node:[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]};er.node;var tr=A(er),nr={name:`git-merge`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]};nr.node;var rr=A(nr),ir={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};ir.node;var ar=A(ir),or={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};or.node;var sr=A(or),cr={name:`grip-vertical`,size:24,node:[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]};cr.node;var lr=A(cr),ur={name:`hand`,size:24,node:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]};ur.node;var dr=A(ur),fr={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};fr.node;var pr=A(fr),mr={name:`hash`,size:24,node:[[`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`}]]};mr.node;var hr=A(mr),gr={name:`heart`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]};gr.node;var _r=A(gr),vr={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};vr.node;var yr=A(vr),br={name:`image-off`,size:24,node:[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]};br.node;var xr=A(br),Sr={name:`image`,size:24,node:[[`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`}]]};Sr.node;var Cr=A(Sr),wr={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};wr.node;var Tr=A(wr),Er={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Er.node;var Dr=A(Er),Or={name:`key`,size:24,node:[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]};Or.node;var kr=A(Or),Ar={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Ar.node;var jr=A(Ar),Mr={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Mr.node;var Nr=A(Mr),Pr={name:`link-2`,size:24,node:[[`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`}]]};Pr.node;var Fr=A(Pr),Ir={name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]};Ir.node;var Lr=A(Ir),Rr={name:`list-x`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`m15.5 9.5 5 5`,key:`ytk86i`}],[`path`,{d:`m20.5 9.5-5 5`,key:`17o44f`}]]};Rr.node;var zr=A(Rr),Br={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Br.node;var Vr=A(Br),Hr={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};Hr.node;var Ur=A(Hr),Wr={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Wr.node;var Gr=A(Wr),Kr={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};Kr.node;var qr=A(Kr),Jr={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};Jr.node;var Yr=A(Jr),Xr={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};Xr.node;var Zr=A(Xr),Qr={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Qr.node;var $r=A(Qr),ei={name:`memory-stick`,size:24,node:[[`path`,{d:`M12 12v-2`,key:`fwoke6`}],[`path`,{d:`M12 18v-2`,key:`qj6yno`}],[`path`,{d:`M16 12v-2`,key:`heuere`}],[`path`,{d:`M16 18v-2`,key:`s1ct0w`}],[`path`,{d:`M2 11h1.5`,key:`15p63e`}],[`path`,{d:`M20 18v-2`,key:`12ehxp`}],[`path`,{d:`M20.5 11H22`,key:`khsy7a`}],[`path`,{d:`M4 18v-2`,key:`1c3oqr`}],[`path`,{d:`M8 12v-2`,key:`1mwtfd`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`10`,rx:`2`,key:`1qcswk`}]]};ei.node;var ti=A(ei),ni={name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]};ni.node;var ri=A(ni),ii={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};ii.node;var ai=A(ii),oi={name:`message-square-text`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]};oi.node;var si=A(oi),ci={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};ci.node;var li=A(ci),ui={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};ui.node;var di=A(ui),fi={name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]};fi.node;var pi=A(fi),mi={name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]};mi.node;var hi=A(mi),gi={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};gi.node;var _i=A(gi),vi={name:`monitor-play`,size:24,node:[[`path`,{d:`M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z`,key:`vbtd3f`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,key:`x3v2xh`}]]};vi.node;var yi=A(vi),bi={name:`monitor-smartphone`,size:24,node:[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]};bi.node;var xi=A(bi),Si={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Si.node;var Ci=A(Si),wi={name:`moon-star`,size:24,node:[[`path`,{d:`M18 5h4`,key:`1lhgn2`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};wi.node;var Ti=A(wi),Ei={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Ei.node;var Di=A(Ei),Oi={name:`mouse-pointer-click`,size:24,node:[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]};Oi.node;var ki=A(Oi),Ai={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};Ai.node;var ji=A(Ai),Mi={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]};Mi.node;var Ni=A(Mi),Pi={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};Pi.node;var Fi=A(Pi),Ii={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Ii.node;var Li=A(Ii),Ri={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};Ri.node;var zi=A(Ri),Bi={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};Bi.node;var Vi=A(Bi),Hi={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Hi.node;var Ui=A(Hi),Wi={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};Wi.node;var Gi=A(Wi),Ki={name:`pen-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`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`}]],aliases:[`edit-3`]};Ki.node;var qi=A(Ki),Ji={name:`pencil`,size:24,node:[[`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`}]]};Ji.node;var Yi=A(Ji),Xi={name:`pin-off`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]};Xi.node;var Zi=A(Xi),Qi={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};Qi.node;var $i=A(Qi),ea={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};ea.node;var ta=A(ea),na={name:`plug-zap`,size:24,node:[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]],aliases:[`plug-zap-2`]};na.node;var ra=A(na),ia={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};ia.node;var aa=A(ia),oa={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};oa.node;var sa=A(oa),ca={name:`power-off`,size:24,node:[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};ca.node;var la=A(ca),ua={name:`puzzle`,size:24,node:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]};ua.node;var da=A(ua),fa={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};fa.node;var pa=A(fa),ma={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};ma.node;var ha=A(ma),ga={name:`rotate-ccw-clock`,size:24,node:[[`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`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};ga.node;var _a=A(ga),va={name:`rotate-ccw`,size:24,node:[[`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`}]]};va.node;var ya=A(va),ba={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};ba.node;var xa=A(ba),Sa={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Sa.node;var Ca=A(Sa),wa={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};wa.node;var Ta=A(wa),Ea={name:`send`,size:24,node:[[`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`}]]};Ea.node;var Da=A(Ea),Oa={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Oa.node;var ka=A(Oa),Aa={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Aa.node;var ja=A(Aa),Ma={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Ma.node;var Na=A(Ma),Pa={name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]};Pa.node;var Fa=A(Pa),Ia={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Ia.node;var La=A(Ia),Ra={name:`shield-off`,size:24,node:[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]};Ra.node;var za=A(Ra),Ba={name:`shield-question-mark`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`shield-question`]};Ba.node;var Va=A(Ba),Ha={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};Ha.node;var Ua=A(Ha),Wa={name:`skip-forward`,size:24,node:[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]};Wa.node;var Ga=A(Wa),Ka={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};Ka.node;var qa=A(Ka),Ja={name:`sliders-vertical`,size:24,node:[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]],aliases:[`sliders`]};Ja.node;var Ya=A(Ja),Xa={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Xa.node;var Za=A(Xa),Qa={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Qa.node;var $a=A(Qa),eo={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};eo.node;var to=A(eo),no={name:`square-x`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-square`]};no.node;var ro=A(no),io={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};io.node;var ao=A(io),oo={name:`star`,size:24,node:[[`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`}]]};oo.node;var so=A(oo),co={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};co.node;var lo=A(co),uo={name:`sunrise`,size:24,node:[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]};uo.node;var fo=A(uo),po={name:`sunset`,size:24,node:[[`path`,{d:`M12 10V2`,key:`16sf7g`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m16 6-4 4-4-4`,key:`6wukr`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]};po.node;var mo=A(po),ho={name:`swords`,size:24,node:[[`path`,{d:`m13 19 6-6`,key:`gj6q8g`}],[`path`,{d:`M14.5 17.5 3.586 6.586A2 2 0 013 5.172V3h2.172a2 2 0 011.414.586L17.5 14.5`,key:`uwfxh8`}],[`path`,{d:`m14.828 6.172 2.586-2.586A2 2 0 0118.828 3H21v2.172a2 2 0 01-.586 1.414l-2.586 2.586`,key:`1f17hx`}],[`path`,{d:`m16 16 4 4`,key:`up5ibb`}],[`path`,{d:`m19 21 2-2`,key:`1phfkn`}],[`path`,{d:`m5 14 4 4`,key:`1gk0qx`}],[`path`,{d:`m5 21-2-2`,key:`1kw20b`}],[`path`,{d:`M7.5 16.5 4 20`,key:`14nozp`}]]};ho.node;var go=A(ho),_o={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};_o.node;var vo=A(_o),yo={name:`test-tube`,size:24,node:[[`path`,{d:`M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2`,key:`125lnx`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}],[`path`,{d:`M14.5 16h-5`,key:`1ox875`}]]};yo.node;var bo=A(yo),xo={name:`thumbs-down`,size:24,node:[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]};xo.node;var So=A(xo),Co={name:`thumbs-up`,size:24,node:[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]};Co.node;var wo=A(Co),To={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};To.node;var Eo=A(To),$={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};$.node;var Do=A($),Oo={name:`triangle-alert`,size:24,node:[[`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`}]],aliases:[`alert-triangle`]};Oo.node;var ko=A(Oo),Ao={name:`trophy`,size:24,node:[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]};Ao.node;var jo=A(Ao),Mo={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Mo.node;var No=A(Mo),Po={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Po.node;var Fo=A(Po),Io={name:`user-check`,size:24,node:[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Io.node;var Lo=A(Io),Ro={name:`user-minus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};Ro.node;var zo=A(Ro),Bo={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};Bo.node;var Vo=A(Bo),Ho={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};Ho.node;var Uo=A(Ho),Wo={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};Wo.node;var Go=A(Wo),Ko={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Ko.node;var qo=A(Ko),Jo={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Jo.node;var Yo=A(Jo),Xo={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Xo.node;var Zo=A(Xo),Qo={name:`wand-sparkles`,size:24,node:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]],aliases:[`wand-2`]};Qo.node;var $o=A(Qo),es={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};es.node;var ts=A(es),ns={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};ns.node;var rs=A(ns),is={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};is.node;var as=A(is);export{la as $,ct as $n,lr as $t,to as A,en as An,ti as At,Fa as B,Pt as Bn,Fr as Bt,go as C,hn as Cn,T as Cr,hi as Ct,so as D,sn as Dn,si as Dt,lo as E,ln as En,li as Et,Ga as F,Wt as Fn,Gr as Ft,Ta as G,wt as Gn,Tr as Gt,ja as H,At as Hn,jr as Ht,Ua as I,Ht as In,Ur as It,ya as J,vt as Jn,yr as Jt,Ca as K,St as Kn,Cr as Kt,Va as L,Bt as Ln,Vr as Lt,Za as M,Xt as Mn,Zr as Mt,Ya as N,Jt as Nn,Yr as Nt,ao as O,an as On,ai as Ot,qa as P,Kt as Pn,qr as Pt,da as Q,ut as Qn,dr as Qt,za as R,Rt as Rn,zr as Rt,vo as S,_n as Sn,De as Sr,_i as St,fo as T,dn as Tn,di as Tt,ka as U,Ot as Un,kr as Ut,Na as V,Mt as Vn,Nr as Vt,Da as W,Et as Wn,Dr as Wt,ha as X,mt as Xn,hr as Xt,_a as Y,gt as Yn,_r as Yt,pa as Z,ft as Zn,pr as Zt,Do as _,Dn as _n,Ue as _r,Di as _t,Zo as a,Zn as an,tt as ar,Zi as at,So as b,xn as bn,Be as br,xi as bt,Go as c,Gn as cn,Qe as cr,Gi as ct,zo as d,zn as dn,Ye as dr,zi as dt,sr as en,ot as er,sa as et,Lo as f,Ln as fn,Je as fr,Li as ft,ko as g,kn as gn,We as gr,ki as gt,jo as h,jn as hn,Ge as hr,ji as ht,$o as i,$n as in,nt as ir,$i as it,$a as j,Qt as jn,$r as jt,ro as k,nn as kn,ri as kt,Uo as l,Un as ln,Ze as lr,Ui as lt,No as m,Nn as mn,Ke as mr,Ni as mt,rs as n,rr as nn,it as nr,ra as nt,Yo as o,Yn as on,et as or,Yi as ot,Fo as p,Fn as pn,qe as pr,Fi as pt,xa as q,bt as qn,xr as qt,ts as r,tr as rn,rt as rr,ta as rt,qo as s,qn as sn,$e as sr,qi as st,as as t,ar as tn,at as tr,aa as tt,Vo as u,Vn as un,Xe as ur,Vi as ut,Eo as v,Tn as vn,He as vr,Ti as vt,mo as w,pn as wn,Oe as wr,pi as wt,bo as x,yn as xn,ze as xr,yi as xt,wo as y,Cn as yn,Ve as yr,Ci as yt,La as z,It as zn,Lr as zt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-vendor-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-vendor-wiHys0m2.js";import{a as n,t as r}from"./logger-BR4forr_.js";import{t as i}from"./useTranslation-B9kflK9S.js";import{a,c as o,s}from"./utils-p8Gt72YP.js";import{g as c,t as l}from"./chatStore-CK5ojwft.js";import{wr as u}from"./ui-vendor-BhHHyHk3.js";import{t as d}from"./config-D6Kcp5n3.js";import{P as f,d as p}from"./api-DPXCtanG.js";import{n as m}from"./authStore-D8fc-Hl0.js";import{t as h}from"./appStore-BD70bvas.js";import{c as g,s as _}from"./artifactHtml-DDmfpcB0.js";var v=e(t(),1),y=/```([^\n`]*)\n([\s\S]*?)\n```/g,b=/^(?:%%|flowchart|graph|sequenceDiagram|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|gantt|pie|mindmap|timeline|gitGraph|quadrantChart|requirementDiagram|sankey-beta|xychart-beta|block-beta|architecture-beta|packet-beta|kanban|radar-beta|treemap-beta|C4Context)\b/i,x=/[\w@./-]+\.(?:html?|css|mjs|js|jsx|ts|tsx|svg|json|py)/i,ee=[`html`,`react`,`svg`,`mermaid`,`chart`,`code`,`text`,`json`],S=[{regex:/<artifact\s+type="([^"]+)"\s+title="([^"]+)"[^>]*>([\s\S]*?)<\/artifact>/gi,extract:e=>({type:A(e[1]),title:C(e[2]).trim()||`Artifact`,content:e[3].trim()})},{regex:/<artifact\s+type="([^"]+)"[^>]*>([\s\S]*?)<\/artifact>/gi,extract:e=>{let t=A(e[1]);return{type:t,title:`${t.toUpperCase()} Artifact`,content:e[2].trim()}}}];function C(e){if(typeof document<`u`){let t=document.createElement(`div`);return t.innerHTML=e,t.textContent||t.innerText||``}return T(w(e))}function w(e){return e.replace(/&(lt|gt|quot|apos|#39);/gi,(e,t)=>{switch(t.toLowerCase()){case`lt`:return`<`;case`gt`:return`>`;case`quot`:return`"`;case`apos`:case`#39`:return`'`;default:return``}}).replace(/&/gi,`&`)}function T(e){let t=``,n=!1,r=null;for(let i=0;i<e.length;i+=1){let a=e[i];if(n){if(r){a===r&&(r=null);continue}if(a===`"`||a===`'`){r=a;continue}a===`>`&&(n=!1);continue}if(a===`<`){let t=e[i+1];if(t&&/[!/A-Za-z?]/.test(t)){n=!0;continue}}t+=a}return t}function E(e){let t=e.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(t)return C(t[1]).trim()||null;let n=e.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i);return n&&C(n[1]).trim()||null}function D(e){for(let t of[/export\s+default\s+(?:function|class)\s+([A-Z]\w*)/,/export\s+default\s+([A-Z]\w*)\s*(?:;|$)/m,/(?:function|class)\s+([A-Z]\w*)/,/const\s+([A-Z]\w*)\s*[:=]/,/(?:function|const|class)\s+(\w+)/]){let n=e.match(t);if(n)return n[1]}return null}function O(e){let t=e.match(/^\s*title\s+(.+)$/im);if(t)return t[1].trim();let n=e.trim().match(/^([A-Za-z][\w-]*)/);if(!n)return null;let r=n[1].replace(/-(?:beta|v2)$/i,``).replace(/([a-z])([A-Z])/g,`$1 $2`);return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function k(e){if(e.includes(`def main(`))return`Python Script`;let t=e.match(/class\s+(\w+)/);if(t)return`${t[1]} Class`;let n=e.match(/def\s+(\w+)/);return n&&n[1]!==`__init__`?`${n[1]} Function`:null}function te(e){let t=e.match(/function\s+(\w+)/);if(t)return`${t[1]} Function`;let n=e.match(/(?:const|let)\s+(\w+)\s*=/);return n?n[1]:null}function A(e){let t=e.trim().toLowerCase();return ee.includes(t)?t:`text`}function j(e){if(!e)return;let t=e.trim().toLowerCase().replace(/^\./,``).replace(/[,:;]+$/,``);switch(t){case`htm`:case`html`:return`html`;case`js`:case`mjs`:case`javascript`:return`javascript`;case`jsx`:case`tsx`:case`react`:return`react`;case`ts`:case`typescript`:return`typescript`;case`py`:case`python`:return`python`;case`css`:case`svg`:case`json`:return t;default:return t||void 0}}function M(e){let t=[],n=new RegExp(y),r;for(;(r=n.exec(e))!==null;){let n=r[1].trim(),i=ne(n,N(e,r.index));t.push({raw:r[0],info:n,content:r[2].trim(),start:r.index,end:r.index+r[0].length,language:i.language,fileName:i.fileName})}return t}function ne(e,t){let n=re(e)||t,r=e.split(/\s+/).filter(Boolean)[0]?.replace(/[{}[\]()]/g,``);return{language:(r&&!x.test(r)&&!r.includes(`=`)?j(r):void 0)||j(F(n)),fileName:n}}function re(e){let t=e.match(/(?:file(?:name)?|path|name)\s*=\s*["']?([^"'\s]+)["']?/i);if(t&&x.test(t[1]))return P(t[1]);let n=e.match(x);return n?P(n[0]):void 0}function N(e,t){let n=e.slice(Math.max(0,t-180),t).split(`
|
|
2
2
|
`).slice(-3).reverse();for(let e of n){let t=e.trim().replace(/^#{1,6}\s*/,``).replace(/^[-*]\s*/,``).replace(/[::]\s*$/,``).match(x);if(t)return P(t[0])}}function P(e){return e.replace(/^["'`]+|["'`:]+$/g,``)}function F(e){return e?.match(/\.([a-z0-9]+)$/i)?.[1]}function I(e){return e?.split(/[\\/]/).pop()}function L(e){let t=I(e);if(!t)return null;let n=t.replace(/\.[^.]+$/,``);return/^(index|main|app)$/i.test(n)?null:n.replace(/[-_]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function R(e){let t=Date.now();return{...e,id:`artifact-${t}-${o(9)}`,createdAt:t,updatedAt:t}}function z(e){let t=j(e.language)||j(F(e.fileName));switch(t){case`html`:return{type:`html`,title:E(e.content)||L(e.fileName)||`HTML Document`};case`svg`:return{type:`svg`,title:L(e.fileName)||`SVG Image`};case`react`:return{type:`react`,title:D(e.content)||L(e.fileName)||`React Component`,language:`jsx`};case`mermaid`:return{type:`mermaid`,title:O(e.content)||`Diagram`,language:`mermaid`};case`json`:return{type:`json`,title:L(e.fileName)||`JSON Data`};case`python`:return{type:`code`,title:k(e.content)||L(e.fileName)||`Python Code`,language:`python`};case`css`:return{type:`code`,title:L(e.fileName)||`CSS Styles`,language:`css`};case`javascript`:return{type:`code`,title:te(e.content)||L(e.fileName)||`JavaScript Code`,language:`javascript`};case`typescript`:return{type:`code`,title:L(e.fileName)||`TypeScript Code`,language:`typescript`};default:return t?{type:`code`,title:L(e.fileName)||`${t.toUpperCase()} Code`,language:t}:null}}function B(e){return(j(e.language)||j(F(e.fileName)))===`html`}function V(e){return(j(e.language)||j(F(e.fileName)))===`css`}function ie(e){return(j(e.language)||j(F(e.fileName)))===`javascript`}function H(e){let t=M(e),n=t.filter(B);if(n.length===0)return null;let r=t.filter(V),i=t.filter(ie);if(r.length===0&&i.length===0)return null;let a=n.find(e=>/(^|[/\\])index\.html?$/i.test(e.fileName||``))||n[0],o=U(a.content,r,i),s=g(o,r.map(e=>e.content),i.map(e=>e.content));return q(s,`html`)?{artifact:R({type:`html`,title:E(s)||L(a.fileName)||`Interactive HTML App`,description:`Bundled generated HTML, CSS, and JavaScript files into one runnable artifact.`,content:s}),ranges:[a,...r,...i]}:null}function U(e,t,n){let r=e;for(let e of t){let t=I(e.fileName);t&&(r=r.replace(RegExp(`<link\\b[^>]*href=["'][^"']*${K(t)}["'][^>]*>`,`gi`),``))}for(let e of n){let t=I(e.fileName);t&&(r=r.replace(RegExp(`<script\\b[^>]*src=["'][^"']*${K(t)}["'][^>]*>\\s*<\\/script>`,`gi`),``))}return r}function ae(e){let t=/<!doctype\s+html|<html[\s>]/i.exec(e);if(!t||t.index===void 0)return null;let n=M(e);if(W(t.index,n))return null;let r=t.index,i=/<\/html>/gi;i.lastIndex=r;let a=i.exec(e),o=a?a.index+a[0].length:e.length,s=e.slice(r,o).trim();return q(s,`html`)?{artifact:R({type:`html`,title:E(s)||`HTML Document`,content:s}),ranges:[{start:r,end:o}]}:null}function W(e,t){return t.some(t=>e>=t.start&&e<=t.end)}function G(e,t){return[...t].sort((e,t)=>t.start-e.start).reduce((e,t)=>`${e.slice(0,t.start)}${e.slice(t.end)}`,e)}function K(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function q(e,t){if(t===`html`){let t=e.trim(),n=/<[^>]+>/.test(t),r=/<(canvas|script|style|button|form|input|select|textarea|video|audio)\b/i.test(t)||/\bon(?:click|input|submit|keydown|keyup|mousemove)=/i.test(t);return n&&(_(t)||t.length>160||r)}if(t===`svg`)return/<svg[^>]*>/.test(e);if(t===`react`)return/<[A-Za-z][^>]*>/.test(e)&&/\b(?:export\s+default|return\s*[(<]|=>\s*[(<]|createRoot|render\s*\()/.test(e);if(t===`mermaid`)return b.test(e.trim());if(t===`json`)try{return JSON.parse(e),e.trim().length>100}catch{return!1}if(t===`code`){let t=e.split(`
|
|
3
3
|
`).length,n=e.trim().length,r=/function|class|def |import |from |const |let |var |if |for |while |try |catch/.test(e);return(n>500||t>15)&&r}return e.trim().length>200}function oe(e){let t=[],n=e;for(let e of S){e.regex.lastIndex=0;let r=[],i;for(;(i=e.regex.exec(n))!==null;){let n=e.extract(i);q(n.content,n.type)&&(t.push(R({type:n.type,title:n.title,content:n.content})),r.push({start:i.index,end:i.index+i[0].length}))}n=G(n,r)}let r=H(n);for(;r;)t.push(r.artifact),n=G(n,r.ranges),r=H(n);let i=ae(n);i&&(t.push(i.artifact),n=G(n,i.ranges));let a=M(n),o=[];for(let e of a){let n=z(e);n&&q(e.content,n.type)&&(t.push(R({type:n.type,title:n.title,content:e.content,language:n.language})),o.push(e))}return n=G(n,o),{content:n.trim(),artifacts:t}}var J=new Map;function se(e,t,n=``){let r=J.get(e);if(n){if((!r||r.state===`none`)&&(J.set(e,{state:`open`,startedAt:Date.now()}),!t))return;let n=J.get(e);t&&n?.state===`open`&&J.set(e,{state:`done`,durationMs:Date.now()-n.startedAt});return}if(r&&r.state!==`open`||!t)return;let i=s(t);if(!r){i.thinkingComplete?J.set(e,{state:`none`}):J.set(e,{state:`open`,startedAt:Date.now()});return}i.thinkingComplete&&J.set(e,{state:`done`,durationMs:Date.now()-r.startedAt})}function Y(e){let t=J.get(e);if(t){if(t.state===`done`)return t.durationMs;if(t.state===`open`)return Date.now()-t.startedAt}}function ce(e){let t=J.get(e);if(J.delete(e),t){if(t.state===`done`)return t.durationMs;if(t.state===`open`)return Date.now()-t.startedAt}}function le(e){let t=e/1e3;if(t<.95)return`${Math.max(.1,Math.round(t*10)/10)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return r>0?`${n}m ${r}s`:`${n}m`}var ue=(e,t)=>{l.setState(n=>{let r=n=>n&&n.id===e?{...n,settings:{...n.settings,...t.length>0?{promptQueue:t}:{promptQueue:void 0}}}:n;return{currentSession:r(n.currentSession),sessions:n.sessions.map(e=>r(e))}})},de=(e,t)=>{t?.add(e.assistantMessageId),e.cancelRequested=!0,e.jobId&&e.abort.abort()},fe=async e=>{if(!e.cancelledMessageIds.has(e.assistantMessageId))return!1;try{let t=await(e.cancelByIdentity??Q)(e.sessionId,e.assistantMessageId);await e.settle(t)}catch(t){e.onError?.(t)}return!0},pe=e=>{e.retainForContinuation||e.cancelledMessageIds.delete(e.assistantMessageId)},me=async(e,t,n={})=>{if(e.jobId=t.jobId,!e.cancelRequested)return`stream`;e.abort.abort();let[,r]=await Promise.allSettled([(n.byJob??ye)(t.jobId),(n.byIdentity??Q)(e.sessionId,e.assistantMessageId)]);if(r.status===`rejected`)throw r.reason;return r.value.completed?`completed`:`cancelled`},he=async e=>{let t=await e.loadSession(e.sessionId);if(t.id!==e.sessionId)throw Error(`Reloaded chat session does not match the completed turn.`);if(!t.messages.find(t=>t.id===e.assistantMessageId&&t.role===`assistant`))throw Error(`Completed assistant message is absent from chat storage.`);return e.applySession(t),t},X=async e=>{try{let t=await e.json(),n=typeof t.error==`string`?t.error:typeof t.message==`string`?t.message:void 0;if(n)return Error(n)}catch{}return Error(`Chat event request failed with status ${e.status}.`)},Z=()=>{let e=localStorage.getItem(`auth-token`);return e?{Authorization:`Bearer ${e}`}:{}},ge=async e=>{let t=await fetch(`${d}/chat/sessions/${encodeURIComponent(e.sessionId)}/generations`,{method:`POST`,headers:{"Content-Type":`application/json`,...Z()},credentials:`same-origin`,signal:e.signal,body:JSON.stringify({message:e.message,images:e.images,userMessageId:e.userMessageId,assistantMessageId:e.assistantMessageId,options:e.options,webSearch:e.webSearch,tools:e.tools===!0,...e.toolSelection?{toolSelection:e.toolSelection}:{},regenerate:e.regenerate===!0,originalMessageId:e.originalMessageId,...e.modelOverride?{modelOverride:e.modelOverride}:{},...e.compare?{compare:!0}:{}})});if(!t.ok)throw await X(t);let n=await t.json();if(!n.data?.jobId)throw Error(`Chat generation response did not include a durable job.`);return n.data},_e=async(e,t)=>{if(!e.body)throw Error(`Chat event stream has no response body.`);let n=e.body.getReader(),r=new TextDecoder,i=``,a=0,o=!1,s=e=>{let n,r=[];for(let t of e.split(`
|
|
4
4
|
`))t.startsWith(`id:`)&&(n=Number(t.slice(3).trim())),t.startsWith(`data:`)&&r.push(t.slice(5).trimStart());if(!Number.isSafeInteger(n)||!r.length)return;let i=JSON.parse(r.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-vendor-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-vendor-wiHys0m2.js";var n=e(t(),1),r=`button, [href], input, select, textarea, [tabindex], [contenteditable="true"]`;function i(e,{onClose:t,enabled:i=!0,initialFocusRef:a}){let[o]=(0,n.useState)(()=>document.activeElement),s=(0,n.useRef)(null),c=(0,n.useRef)(t);(0,n.useEffect)(()=>{c.current=t},[t]),(0,n.useEffect)(()=>{let t=e.current;if(!i||!t)return;let n=document.activeElement,l=t.contains(n)?o:n,u=e=>e.getClientRects().length>0&&getComputedStyle(e).visibility!==`hidden`&&!e.closest(`[inert], [aria-hidden="true"]`),d=()=>Array.from(t.querySelectorAll(r)).filter(e=>e.tabIndex>=0&&!e.matches(`:disabled`)&&u(e)),f=()=>{let e=Array.from(document.querySelectorAll(`[role="dialog"][aria-modal="true"]`)).filter(u);return e[e.length-1]===t},p=a?.current;if(p&&t.contains(p)&&u(p)&&!p.matches(`:disabled`))s.current=p,p.focus({preventScroll:!0});else if(n instanceof HTMLElement&&t.contains(n))s.current=n;else{let e=s.current;(e&&t.contains(e)&&u(e)&&!e.matches(`:disabled`)?e:d()[0]??t).focus({preventScroll:!0})}let m=e=>{if(!(e.defaultPrevented||!f()||e.isComposing)){if(e.key===`Escape`&&c.current)e.preventDefault(),e.stopPropagation(),c.current();else if(e.key===`Tab`){let n=d(),r=n[0],i=n[n.length-1];r?(!t.contains(document.activeElement)||e.shiftKey&&(document.activeElement===r||document.activeElement===t)||!e.shiftKey&&document.activeElement===i)&&(e.preventDefault(),(e.shiftKey?i:r)?.focus()):(e.preventDefault(),t.focus())}}};return document.addEventListener(`keydown`,m),()=>{document.removeEventListener(`keydown`,m),l instanceof HTMLElement&&l.isConnected&&l.focus({preventScroll:!0})}},[e,i,o,a])}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,r as n,t as r}from"./react-vendor-D0Ec-185.js";import{t as i}from"./useQuery-C3O4CZ54.js";import{d as a}from"./router-vendor-CM0PhOMl.js";import{t as o}from"./logger-BR4forr_.js";import{t as s}from"./useTranslation-Kn7_iLGj.js";import{t as c}from"./utils-Dq1w7K0c.js";import{h as l,s as u,t as d}from"./chatStore-BtjmZY_D.js";import{An as f,G as p,It as m,Kt as h,Ln as g,M as _,On as v,Qn as y,S as b,Tn as x,Yt as S,Z as C,Zn as ee,Zt as w,ar as T,c as te,et as E,lr as D,n as O,t as k,wr as A}from"./ui-vendor-wayYH9Nf.js";import{C as ne,g as re,t as ie,y as j}from"./api-jEschMu2.js";import{t as ae}from"./authStore-BSn9e-LG.js";var M=e(t(),1),oe=n(),N=r();function P(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function se({hfTask:e,hfSort:t,canInstallModels:n,loadingHf:r,hfModels:i,expandedHfModel:a,hfGgufFiles:o,loadingGguf:l,pullingModel:u,pullProgress:d,setHfTask:f,setHfSort:p,onToggleHfModel:h,onPullHfGguf:g,onCancelPull:_,onRefreshHfModels:y}){let{t:b}=s();return(0,N.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 border-b border-gray-200 dark:border-dark-300 flex-shrink-0 space-y-2`,children:(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsxs)(`select`,{value:e,onChange:e=>f(e.target.value),onMouseDown:e=>e.stopPropagation(),className:`flex-1 px-2 py-1.5 rounded-lg border text-xs bg-gray-50 dark:bg-dark-50 border-gray-200 dark:border-dark-300 text-gray-900 dark:text-gray-100`,children:[(0,N.jsx)(`option`,{value:`text-generation`,children:b(`modelManager.huggingface.taskTextGeneration`)}),(0,N.jsx)(`option`,{value:`text-to-speech`,children:b(`modelManager.huggingface.taskTextToSpeech`)}),(0,N.jsx)(`option`,{value:`text-to-image`,children:b(`modelManager.huggingface.taskTextToImage`)}),(0,N.jsx)(`option`,{value:`automatic-speech-recognition`,children:b(`modelManager.huggingface.taskSpeechRecognition`)})]}),(0,N.jsxs)(`select`,{value:t,onChange:e=>p(e.target.value),onMouseDown:e=>e.stopPropagation(),className:`px-2 py-1.5 rounded-lg border text-xs bg-gray-50 dark:bg-dark-50 border-gray-200 dark:border-dark-300 text-gray-900 dark:text-gray-100`,children:[(0,N.jsx)(`option`,{value:`downloads`,children:b(`modelManager.huggingface.sortDownloads`)}),(0,N.jsx)(`option`,{value:`likes`,children:b(`modelManager.huggingface.sortLikes`)}),(0,N.jsx)(`option`,{value:`lastModified`,children:b(`modelManager.huggingface.sortRecent`)})]})]})}),(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin`,children:[!n&&(0,N.jsx)(`div`,{className:`mx-3 mb-1 mt-3 rounded-lg border border-amber-200 bg-amber-500/10 px-3 py-2 text-xs text-ink dark:border-amber-800 dark:bg-amber-900/20`,children:b(`modelSelector.pullRestricted`)}),r?(0,N.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,N.jsx)(m,{className:`h-6 w-6 animate-spin text-gray-400`})}):i.length===0?(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(k,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:b(`modelManager.huggingface.noModelsFound`)})]}):(0,N.jsx)(`div`,{className:`divide-y divide-gray-100 dark:divide-dark-200`,children:i.map(e=>{let t=a===e.id,r=o[e.id]||[],i=l===e.id;return(0,N.jsxs)(`div`,{className:`bg-white dark:bg-dark-100`,children:[(0,N.jsx)(`div`,{className:`px-3 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-dark-200`,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),h(e.id)},children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`flex-shrink-0 rounded-lg bg-yellow-500/20 p-2 dark:bg-yellow-900/30`,children:(0,N.jsx)(k,{className:`h-4 w-4 text-yellow-600 dark:text-yellow-400`})}),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`h4`,{dir:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:e.id}),e.gated&&(0,N.jsx)(`span`,{className:`rounded bg-yellow-500/20 px-1.5 py-0.5 text-xs text-ink dark:bg-yellow-900/30`,children:`Gated`})]}),(0,N.jsxs)(`p`,{className:`text-xs text-gray-500 dark:text-gray-400 mt-0.5`,children:[`by `,e.author]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 mt-1.5 text-xs text-gray-400 dark:text-gray-500`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(v,{className:`h-3 w-3`}),P(e.downloads)]}),(0,N.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(S,{className:`h-3 w-3`}),P(e.likes)]}),e.pipeline_tag&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-gray-100 dark:bg-dark-200`,children:e.pipeline_tag})]})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 flex-shrink-0`,children:[(0,N.jsx)(`a`,{href:`https://huggingface.co/${e.id}`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(x,{className:`h-4 w-4 text-gray-400`})}),(0,N.jsx)(ee,{className:c(`h-4 w-4 text-gray-400 transition-transform`,t&&`rotate-180`)})]})]})}),t&&(0,N.jsx)(`div`,{className:`px-3 pb-3 pt-1 border-t border-gray-100 dark:border-dark-200 bg-gray-50 dark:bg-dark-200`,children:i?(0,N.jsxs)(`div`,{className:`flex items-center justify-center py-4`,children:[(0,N.jsx)(m,{className:`h-4 w-4 animate-spin text-gray-400`}),(0,N.jsx)(`span`,{className:`ml-2 text-xs text-gray-500`,children:b(`modelManager.huggingface.checkingGguf`)})]}):r.length===0?(0,N.jsx)(`div`,{className:`py-4 text-center text-xs text-gray-500 dark:text-gray-400`,children:b(`modelManager.huggingface.noGgufAvailable`)}):(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`div`,{className:`text-xs font-medium text-gray-600 dark:text-gray-300 mb-2`,children:b(`modelManager.huggingface.ggufFilesCount`,{count:r.length})}),r.map(e=>{let t=u===e.ollamaCommand;return(0,N.jsxs)(`div`,{className:`flex items-center gap-2 p-2 rounded-lg bg-white dark:bg-dark-100 border border-gray-200 dark:border-dark-300`,children:[(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsx)(`div`,{className:`text-xs font-medium text-gray-800 dark:text-gray-200 truncate`,children:e.filename}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 mt-0.5 text-xs text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(`span`,{children:e.sizeFormatted}),e.quantization&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400`,children:e.quantization})]})]}),t?(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`div`,{className:`text-xs text-gray-500 w-12 text-right`,children:d?.percent===void 0?`...`:`${d.percent}%`}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),_()},className:`p-1.5 rounded-lg text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20`,children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}):n?(0,N.jsxs)(`button`,{onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),g(e.ollamaCommand,e.filename)},disabled:!!u,className:c(`px-3 py-1.5 rounded-lg text-xs font-medium`,`bg-primary-100 dark:bg-primary-900/30`,`text-primary-700 dark:text-primary-400`,`hover:bg-primary-200 dark:hover:bg-primary-900/50`,`disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,N.jsx)(v,{className:`h-3 w-3 inline mr-1`}),b(`models.pull`)]}):(0,N.jsx)(`span`,{className:`rounded bg-amber-500/20 px-2 py-1 text-[11px] font-medium text-ink dark:bg-amber-900/30`,children:b(`modelSelector.adminOnlyPull`)})]},e.filename)}),u?.startsWith(`hf.co/`)&&u.includes(e.id)&&d?.percent!==void 0&&(0,N.jsx)(`div`,{className:`w-full bg-gray-200 dark:bg-dark-300 rounded-full h-1.5 overflow-hidden mt-2`,children:(0,N.jsx)(`div`,{className:`h-1.5 rounded-full bg-primary-500 transition-all duration-300`,style:{width:`${d.percent}%`}})})]})})]},e.id)})})]}),(0,N.jsxs)(`div`,{className:`px-3 py-2 border-t border-gray-200 dark:border-dark-300 flex items-center justify-between flex-shrink-0`,children:[(0,N.jsxs)(`a`,{href:`https://huggingface.co/models`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`text-xs text-primary-600 dark:text-primary-400 hover:underline flex items-center gap-1`,children:[(0,N.jsx)(x,{className:`h-3 w-3`}),b(`modelManager.huggingface.browseAllLink`)]}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),y()},className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(C,{className:c(`h-3.5 w-3.5 text-gray-400`,r&&`animate-spin`)})})]})]})}function ce({filteredGroups:e,selectedModel:t,showImageGen:n,getModelValue:r,getModelIcon:i,getModelLabel:a,getModelSubLabel:o,onModelSelect:l,onOpenGallery:u}){let{t:d}=s();return(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-dark-400`,children:[e.length>0?e.map(e=>(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-dark-300 border-b border-gray-200 dark:border-dark-400 sticky top-0`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon,e.label,` (`,e.models.length,`)`]})}),e.models.map(e=>{let n=r(e);return(0,N.jsx)(`button`,{type:`button`,"data-testid":`model-selector-option`,"data-model-value":n,"aria-pressed":t===n,onClick:()=>l(n),className:c(`block w-full cursor-pointer border-b border-gray-100 px-3 py-3 text-start last:border-b-0 dark:border-dark-200`,`hover:bg-gray-50 dark:hover:bg-dark-200`,`bg-white dark:bg-dark-100 transition-colors`,`focus-visible:relative focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500/50`,t===n&&`bg-primary-50 dark:bg-primary-900/30`),children:(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i(e),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsx)(`div`,{dir:e.isPersona?`auto`:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:a(e)}),o(e)&&(0,N.jsx)(`div`,{dir:`auto`,className:`text-xs text-gray-500 dark:text-gray-400 truncate`,children:o(e)})]}),t===n&&(0,N.jsx)(y,{className:`h-4 w-4 text-primary-600 dark:text-primary-400 flex-shrink-0`})]})},n)})]},e.type)):(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(f,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:d(`models.noModelsFound`)})]}),n&&(0,N.jsxs)(`div`,{className:`border-t border-gray-200 dark:border-dark-300`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-dark-300`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(E,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`}),d(`modelSelector.actions`)]})}),(0,N.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),u()},className:`px-3 py-3 cursor-pointer hover:bg-blue-50 dark:hover:bg-blue-900/20 bg-white dark:bg-dark-100`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(h,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`}),(0,N.jsxs)(`div`,{className:`flex-1`,children:[(0,N.jsx)(`div`,{className:`text-sm font-medium text-gray-900 dark:text-gray-100`,children:d(`gallery.generate`)}),(0,N.jsx)(`div`,{className:`text-xs text-gray-500 dark:text-gray-400`,children:d(`gallery.generateDescription`)})]})]})})]})]})}function le({libraryCategories:e,libraryCategory:t,canInstallModels:n,loadingLibrary:r,filteredLibraryModels:i,pullingModel:a,pullProgress:o,setLibraryCategory:l,isModelInstalled:u,onModelSelect:d,onPullModel:f,onCancelPull:p,onRefreshLibrary:h}){let{t:_}=s();return(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 border-b border-gray-200 dark:border-dark-300 flex-shrink-0`,children:(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,N.jsx)(`button`,{onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),l(e)},className:c(`px-2.5 py-1 rounded-full text-xs font-medium transition-colors`,t===e?`bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-400`:`bg-gray-100 dark:bg-dark-200 text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-dark-300`),children:e.charAt(0).toUpperCase()+e.slice(1)},e))})}),(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin`,children:[!n&&(0,N.jsx)(`div`,{className:`mx-3 mb-1 mt-3 rounded-lg border border-amber-200 bg-amber-500/10 px-3 py-2 text-xs text-ink dark:border-amber-800 dark:bg-amber-900/20`,children:_(`modelSelector.pullRestricted`)}),r?(0,N.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,N.jsx)(m,{className:`h-6 w-6 animate-spin text-gray-400`})}):i.length===0?(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(g,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:_(`models.noModelsFound`)})]}):(0,N.jsx)(`div`,{className:`divide-y divide-gray-100 dark:divide-dark-200`,children:i.map(e=>{let t=u(e.name),r=a===e.name;return(0,N.jsxs)(`div`,{className:c(`px-3 py-3 bg-white dark:bg-dark-100`,t&&`bg-green-50/50 dark:bg-green-900/10`),children:[(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`p-2 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex-shrink-0`,children:(0,N.jsx)(g,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`})}),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`h4`,{dir:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:e.name}),t&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400`,children:_(`modelSelector.installed`)}),(e.category===`cloud`||e.tags?.includes(`cloud`))&&(0,N.jsxs)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 flex items-center gap-1`,children:[(0,N.jsx)(g,{className:`h-3 w-3`}),`Cloud`]})]}),(0,N.jsx)(`p`,{className:`text-xs text-gray-500 dark:text-gray-400 line-clamp-1 mt-0.5`,children:e.description}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[e.sizes.slice(0,3).map(e=>(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-gray-100 dark:bg-dark-200 text-gray-600 dark:text-gray-400`,children:e},e)),e.pulls&&(0,N.jsxs)(`span`,{className:`text-xs text-gray-400 dark:text-gray-500 flex items-center gap-1`,children:[(0,N.jsx)(v,{className:`h-3 w-3`}),e.pulls]})]})]}),(0,N.jsx)(`div`,{className:`flex-shrink-0`,children:r?(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`div`,{className:`text-xs text-gray-500 w-12 text-right`,children:o?.percent===void 0?`...`:`${o.percent}%`}),(0,N.jsx)(`button`,{onClick:p,className:`p-1.5 rounded-lg text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20`,children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}):t?(0,N.jsx)(`button`,{onClick:()=>d(e.name),className:`px-3 py-1.5 rounded-lg text-xs font-medium bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 hover:bg-green-200 dark:hover:bg-green-900/50`,children:_(`modelSelector.use`)}):n?(0,N.jsxs)(`button`,{onClick:()=>f(e.name),className:`px-3 py-1.5 rounded-lg text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-400 hover:bg-primary-200 dark:hover:bg-primary-900/50`,children:[(0,N.jsx)(v,{className:`h-3 w-3 inline mr-1`}),_(`modelSelector.pull`)]}):(0,N.jsx)(`span`,{className:`rounded bg-amber-500/20 px-2 py-1 text-[11px] font-medium text-ink dark:bg-amber-900/30`,children:_(`modelSelector.adminOnlyPull`)})})]}),r&&o?.percent!==void 0&&(0,N.jsx)(`div`,{className:`mt-2 w-full bg-gray-200 dark:bg-dark-300 rounded-full h-1.5 overflow-hidden`,children:(0,N.jsx)(`div`,{className:`h-1.5 rounded-full bg-primary-500 transition-all duration-300`,style:{width:`${o.percent}%`}})})]},e.name)})})]}),(0,N.jsxs)(`div`,{className:`px-3 py-2 border-t border-gray-200 dark:border-dark-300 flex items-center justify-between flex-shrink-0`,children:[(0,N.jsxs)(`a`,{href:`https://ollama.com/library`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`text-xs text-primary-600 dark:text-primary-400 hover:underline flex items-center gap-1`,children:[(0,N.jsx)(x,{className:`h-3 w-3`}),_(`modelManager.huggingface.browseAllLink`)]}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),h()},className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(C,{className:c(`h-3.5 w-3.5 text-gray-400`,r&&`animate-spin`)})})]})]})}var ue=o(`components:model-selector`),F=({models:e,selectedModel:t,onModelChange:n,currentPersona:r,className:o,disabled:f=!1,compact:m=!1,showImageGen:h=!1,onModelsRefresh:v,getModelValue:y,getModelLabel:x,getModelTitle:S,triggerRef:C,triggerTestId:E,selectTestId:ie,ariaLabel:P})=>{let{t:F}=s(),[I,L]=(0,M.useState)(!1),[R,z]=(0,M.useState)(``),[B,V]=(0,M.useState)(`installed`),de=(0,M.useRef)(null),H=(0,M.useRef)(null),fe=(0,M.useRef)(null),pe=(0,M.useRef)(null),me=a(),{user:he,systemInfo:ge}=ae(),U=he?.role===`admin`||ge?.requiresAuth===!1,[W,_e]=(0,M.useState)(`all`),[ve,ye]=(0,M.useState)(``),[be,xe]=(0,M.useState)(`text-generation`),[Se,Ce]=(0,M.useState)(`downloads`),[we,Te]=(0,M.useState)(``),[Ee,De]=(0,M.useState)(null),[Oe,ke]=(0,M.useState)({}),[Ae,je]=(0,M.useState)(null),[G,K]=(0,M.useState)(null),[Me,q]=(0,M.useState)(null),[Ne,J]=(0,M.useState)(null),Pe=[`all`,`general`,`coding`,`reasoning`,`vision`,`embedding`,`cloud`],Fe=[{type:`legacy`,label:F(`modelSelector.providerNotRecorded`,`Provider not recorded`),icon:(0,N.jsx)(T,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isLegacySelection),color:`gray`},{type:`unavailable`,label:F(`modelSelector.unavailableSelections`,`Unavailable selections`),icon:(0,N.jsx)(O,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isUnavailable&&!e.isLegacySelection),color:`gray`},{type:`personas`,label:F(`modelSelector.personas`),icon:(0,N.jsx)(te,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isPersona&&!e.isUnavailable),color:`purple`},{type:`agents`,label:F(`modelSelector.agentModels`,`Agents`),icon:(0,N.jsx)(b,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isAgent&&!e.isUnavailable),color:`green`},{type:`ollama`,label:F(`modelSelector.ollamaModels`),icon:(0,N.jsx)(D,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>l(e)&&!e.name.includes(`embed`)),color:`green`},{type:`plugins`,label:F(`modelSelector.pluginModels`),icon:(0,N.jsx)(k,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isPlugin&&!e.isUnavailable),color:`green`}].filter(e=>e.models.length>0).map(e=>({...e,models:e.models.filter(e=>e.name.toLowerCase().includes(R.toLowerCase())||e.personaName&&e.personaName.toLowerCase().includes(R.toLowerCase())||e.pluginName&&e.pluginName.toLowerCase().includes(R.toLowerCase()))})).filter(e=>e.models.length>0),Y=e=>y?.(e)??e.name,Ie=d(e=>e.modelMetadata),X=d(e=>e.personas),Z=e.find(e=>Y(e)===t),Le=e=>{if(!e.name.startsWith(`persona:`))return;let t=e.name.slice(8),n=t;try{n=decodeURIComponent(t)}catch{}let r=X[t]??X[n];if(r?.name)return r.name;if(e.personaName&&e.personaName!==t)return e.personaName},Re=e=>{if(!e.name.startsWith(`persona:`))return;let t=e.name.slice(8),n=t;try{n=decodeURIComponent(t)}catch{}return X[t]??X[n]};(0,M.useImperativeHandle)(C,()=>fe.current);let Q=(0,M.useCallback)((e=!0)=>{L(!1),z(``),e&&window.requestAnimationFrame(()=>fe.current?.focus())},[]),{data:ze=[],isLoading:Be,refetch:Ve}=i({queryKey:[`ollama-library-selector`,ve,W===`cloud`?`cloud`:`all`],queryFn:async()=>{let e=await j.getLibraryModels({search:ve||void 0,sort:`popular`,category:W===`cloud`?`cloud`:void 0});return e.success&&e.data?e.data:[]},enabled:I&&B===`ollama`}),{data:He=[],isLoading:Ue,refetch:We}=i({queryKey:[`hf-models-selector`,be,we,Se],queryFn:async()=>{let e=await ne.getModels({task:be,search:we||void 0,sort:Se,limit:30});return e.success&&e.data?e.data:[]},enabled:I&&B===`huggingface`}),Ge=ze.filter(e=>{let t=!R||e.name.toLowerCase().includes(R.toLowerCase())||e.description.toLowerCase().includes(R.toLowerCase()),n=W===`all`||e.category===W;return t&&n}),Ke=(0,M.useCallback)(async e=>{let[t,n]=e.split(`/`);if(t&&n){je(e);try{let r=await ne.getGgufFiles(t,n);r.success&&r.data&&ke(t=>({...t,[e]:r.data}))}catch(e){ue.error(`Failed to load GGUF files:`,e)}finally{je(null)}}},[]),qe=(0,M.useCallback)(e=>{Ee===e?De(null):(De(e),Oe[e]||Ke(e))},[Ee,Oe,Ke]),Je=(0,M.useCallback)((e,t)=>{if(!U){A.error(F(`modelSelector.pullRestricted`));return}if(!G){K(e),q({status:`starting`});try{let n=j.pullModelStream(e,e=>{q(e)},()=>{q(null),K(null),J(null),A.success(F(`modelDownload.success`,{name:t})),v?.()},e=>{q(null),K(null),J(null),A.error(F(`modelDownload.failed`,{error:e}))});J(()=>n)}catch{q(null),K(null),A.error(F(`modelDownload.startFailed`))}}},[U,v,G,F]);(0,M.useEffect)(()=>{let e=setTimeout(()=>{B===`huggingface`?Te(R):B===`ollama`&&ye(R)},300);return()=>clearTimeout(e)},[R,B]),(0,M.useEffect)(()=>{if(!I)return;let e=e=>{if(e.key===`Escape`){e.preventDefault(),Q();return}if(e.key===`Tab`&&H.current){let t=Array.from(H.current.querySelectorAll(`button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>e.offsetParent!==null),n=t[0],r=t[t.length-1];if(!n||!r)return;e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Q,I]),(0,M.useEffect)(()=>{I&&pe.current&&pe.current.focus()},[I]);let Ye=async t=>{let r=e.find(e=>Y(e)===t)??e.find(e=>!e.isPlugin&&!e.isPersona&&e.name===t),i=r?Y(r):t,a=r?.name??t;Q();try{let e=await j.listRunningModels();if(e.success&&e.data){let t=e.data;t.length>0&&(r?.isPlugin!==!0&&t.some(e=>e.name===a||a.startsWith(`persona:`))||await j.unloadAllModels())}}catch(e){ue.warn(`Failed to unload models before switch:`,e)}n({target:{value:i}})},Xe=async e=>{if(!U){A.error(F(`modelSelector.pullRestricted`));return}if(!G){K(e),q({status:`starting`});try{let t=j.pullModelStream(e,e=>{q(e)},()=>{q(null),K(null),J(null),A.success(F(`modelDownload.success`,{name:e})),v?.()},e=>{q(null),K(null),J(null),A.error(F(`modelDownload.failed`,{error:e}))});J(()=>t)}catch{q(null),K(null),A.error(F(`modelDownload.startFailed`))}}},Ze=()=>{Ne&&(Ne(),J(null),K(null),q(null),A.success(F(`modelDownload.cancelled`)))},Qe=t=>e.some(e=>l(e)&&(e.name===t||e.name.startsWith(t+`:`))),$e=e=>{let t=Ie[u(e)]?.avatar;if(t&&!e.isPersona)return(0,N.jsx)(`img`,{src:t,alt:``,className:`h-4 w-4 shrink-0 rounded-full object-cover`});if(e.isPersona||e.isLegacySelection){let t=Re(e);if(t)return(0,N.jsx)(`img`,{src:re(t,64),alt:``,className:`h-4 w-4 shrink-0 rounded object-cover`})}return e.isLegacySelection?(0,N.jsx)(T,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):e.isPersona?(0,N.jsx)(te,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):e.isPlugin?(0,N.jsx)(k,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):(0,N.jsx)(D,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`})},$=e=>{if(x)return x(e);let t=Ie[u(e)]?.label;return t&&!e.isPersona?t:e.isLegacySelection?`${Le(e)??e.name} (${F(`modelSelector.legacyProvider`,`provider not recorded`)})`:e.isPersona?Le(e)||e.personaName||e.name:e.isAgent?e.isUnavailable?`${e.agentName||e.name} (${F(`modelSelector.unavailable`,`unavailable`)})`:e.agentName||e.name:(e.isPlugin,e.isUnavailable?`${e.name} (${F(`modelSelector.unavailable`,`unavailable`)})`:e.name)},et=e=>e.isLegacySelection?e.isUnavailable?F(`modelSelector.providerUnavailable`,`provider unavailable`):F(`modelSelector.reselectProvider`,`reselect a provider to pin this model`):e.isPersona?`via ${e.model}`:e.isPlugin?e.isUnavailable?`via ${e.pluginName||e.pluginId} · ${F(`modelSelector.providerUnavailable`,`provider unavailable`)}`:`via ${e.pluginName}`:e.isUnavailable?F(`modelSelector.providerUnavailable`,`provider unavailable`):null;return(0,N.jsxs)(`div`,{className:c(`relative min-w-0`,o),ref:de,children:[(0,N.jsxs)(`button`,{ref:fe,"data-testid":E,type:`button`,onClick:()=>!f&&L(!I),disabled:f,"aria-haspopup":`dialog`,"aria-expanded":I,"aria-label":P&&Z?`${P}: ${$(Z)}`:P,className:c(m?`flex h-9 w-full min-w-0 items-center justify-between gap-2 px-2.5 text-start`:`w-full flex items-center justify-between gap-2 px-3 py-2.5 text-start`,`rounded-xl border border-line bg-surface-subtle text-sm text-ink hover:bg-hover-solid`,`transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500/40`,f?`opacity-50 cursor-not-allowed`:`cursor-pointer`),title:m?Z?S?.(Z)??$(Z):F(`modelSelector.selectModel`):void 0,children:[(()=>{if(!Z)return m?(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,N.jsx)(D,{className:`h-4 w-4 shrink-0`}),(0,N.jsx)(`span`,{className:`truncate text-xs font-medium text-ink-subtle`,children:F(`modelSelector.selectModel`)})]}):F(`modelSelector.selectModel`);if(m){let e=$(Z);return(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`shrink-0`,children:$e(Z)}),(0,N.jsx)(`span`,{dir:Z.isPersona?`auto`:`ltr`,className:`truncate text-xs font-medium text-ink`,children:e})]})}let e=$(Z),t=et(Z);return(0,N.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[$e(Z),(0,N.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,N.jsx)(`span`,{dir:Z.isPersona?`auto`:`ltr`,className:`text-sm font-medium truncate`,children:e}),t&&(0,N.jsx)(`span`,{dir:`auto`,className:`text-xs text-gray-500 dark:text-gray-400 truncate`,children:t})]}),Z.isPersona&&r&&(0,N.jsxs)(`div`,{className:`flex items-center gap-1 ms-auto`,children:[(0,N.jsx)(T,{className:`h-3 w-3 text-gray-500 dark:text-dark-600`}),r.embedding_model&&(0,N.jsx)(_,{className:`h-3 w-3 text-gray-400 dark:text-dark-500`})]})]})})(),(0,N.jsx)(ee,{className:c(m?`h-3 w-3`:`h-4 w-4`,`shrink-0 text-ink-subtle transition-transform duration-150 motion-reduce:transition-none`,I&&`rotate-180`)})]}),I&&(0,oe.createPortal)((0,N.jsxs)(`div`,{className:`fixed inset-0 z-[999999] flex items-center justify-center p-3 sm:p-6`,children:[(0,N.jsx)(`div`,{className:`absolute inset-0 bg-gray-950/55 backdrop-blur-md`,onClick:()=>Q()}),(0,N.jsxs)(`div`,{ref:H,role:`dialog`,"aria-modal":`true`,"aria-label":F(`modelSelector.selectModel`),className:c(`relative flex w-full max-w-xl flex-col overflow-hidden bg-white/[0.98] dark:bg-dark-25/[0.98]`,`h-[min(620px,88vh)] rounded-[1.5rem] border border-black/[0.08] dark:border-white/[0.09]`,`shadow-[0_30px_100px_rgba(0,0,0,0.28)] backdrop-blur-xl animate-scale-in`),onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{className:`flex-shrink-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between px-4 pb-2 pt-4 sm:px-5 sm:pt-5`,children:[(0,N.jsx)(`h2`,{className:`text-lg font-medium tracking-[-0.025em] text-gray-950 dark:text-dark-950 rtl:tracking-normal`,children:F(`modelSelector.selectModel`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>Q(),className:`flex h-9 w-9 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-950 dark:text-dark-500 dark:hover:bg-dark-200 dark:hover:text-dark-950`,title:F(`common.close`),children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}),(0,N.jsx)(`div`,{className:`px-4 pb-3 sm:px-5`,children:(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(p,{className:`absolute start-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,N.jsx)(`input`,{ref:pe,type:`text`,placeholder:F(B===`installed`?`modelSelector.searchInstalled`:B===`ollama`?`modelSelector.searchOllama`:`modelSelector.searchHuggingFace`),value:R,onChange:e=>z(e.target.value),className:c(`w-full rounded-xl border border-black/[0.07] bg-gray-100/70 py-2.5 ps-10 pe-4 text-sm dark:border-white/[0.07] dark:bg-dark-200/70`,`focus:outline-none focus:ring-2 focus:ring-primary-500/20`,`text-gray-900 dark:text-dark-900 placeholder:text-gray-400 dark:placeholder:text-dark-500`)})]})}),(0,N.jsxs)(`div`,{className:`mx-4 mb-3 flex rounded-xl bg-gray-100/70 p-1 dark:bg-dark-200/70 sm:mx-5`,children:[(0,N.jsxs)(`button`,{onClick:()=>{V(`installed`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`installed`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`installed`,children:[(0,N.jsx)(w,{className:`h-4 w-4 inline me-1.5`}),F(`modelSelector.installed`)]}),(0,N.jsxs)(`button`,{onClick:()=>{V(`ollama`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`ollama`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`ollama`,children:[(0,N.jsx)(g,{className:`h-4 w-4 inline me-1.5`}),`Ollama`]}),(0,N.jsxs)(`button`,{onClick:()=>{V(`huggingface`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`huggingface`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`huggingface`,children:[(0,N.jsx)(k,{className:`h-4 w-4 inline me-1.5`}),`HuggingFace`]})]})]}),B===`installed`&&(0,N.jsx)(ce,{filteredGroups:Fe,selectedModel:t,showImageGen:h,getModelValue:Y,getModelIcon:$e,getModelLabel:$,getModelSubLabel:et,onModelSelect:Ye,onOpenGallery:()=>{Q(!1),me(`/gallery`)}}),B===`ollama`&&(0,N.jsx)(le,{libraryCategories:Pe,libraryCategory:W,canInstallModels:U,loadingLibrary:Be,filteredLibraryModels:Ge,pullingModel:G,pullProgress:Me,setLibraryCategory:_e,isModelInstalled:Qe,onModelSelect:Ye,onPullModel:Xe,onCancelPull:Ze,onRefreshLibrary:()=>{Ve()}}),B===`huggingface`&&(0,N.jsx)(se,{hfTask:be,hfSort:Se,canInstallModels:U,loadingHf:Ue,hfModels:He,expandedHfModel:Ee,hfGgufFiles:Oe,loadingGguf:Ae,pullingModel:G,pullProgress:Me,setHfTask:xe,setHfSort:Ce,onToggleHfModel:qe,onPullHfGguf:Je,onCancelPull:Ze,onRefreshHfModels:()=>{We()}})]})]}),document.body),(0,N.jsx)(`select`,{"data-testid":ie,"aria-label":P,"aria-hidden":`true`,dir:`ltr`,value:t,onChange:n,className:`hidden`,tabIndex:-1,children:e.map(e=>(0,N.jsx)(`option`,{value:Y(e),children:$(e)},`${e.isLegacySelection?`legacy`:e.isPersona?`persona`:e.isPlugin?`plugin`:`ollama`}:${e.pluginId||``}:${Y(e)}`))})]})},I=o(`hooks:dictation`),L=()=>{if(typeof window>`u`)return;let e=window;return e.SpeechRecognition||e.webkitSpeechRecognition},R=[{mimeType:`audio/webm;codecs=opus`,format:`webm`}],z=300,B=.25,V=e=>`${encodeURIComponent(e.plugin)}:${encodeURIComponent(e.model)}`;function de(e){if(typeof MediaRecorder>`u`)return;let t=new Set((e.config?.formats||[]).map(e=>e.toLowerCase()));return R.find(e=>(t.size===0||t.has(e.format))&&(typeof MediaRecorder.isTypeSupported!=`function`||MediaRecorder.isTypeSupported(e.mimeType)))?.mimeType}function H({onStart:e,onText:t,ownerKey:n}){let{t:r,i18n:i}=s(),[a,o]=(0,M.useState)(`idle`),[c,l]=(0,M.useState)([]),u=(0,M.useRef)(null),d=(0,M.useRef)(null),f=(0,M.useRef)(null),p=(0,M.useRef)(null),m=(0,M.useRef)(null),h=(0,M.useRef)(0),g=(0,M.useRef)(`idle`),_=(0,M.useRef)(void 0),v=(0,M.useRef)(e),y=(0,M.useRef)(t);(0,M.useEffect)(()=>{v.current=e,y.current=t},[e,t]),(0,M.useEffect)(()=>{let e=!1;return ie.getModels().then(t=>{!e&&t.success&&t.data&&l(t.data)}).catch(()=>{e||l([])}),()=>{e=!0}},[]);let b=(0,M.useMemo)(()=>typeof window<`u`&&window.isSecureContext&&typeof navigator<`u`&&!!navigator.mediaDevices&&!!L(),[]),x=typeof window<`u`&&window.isSecureContext&&typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia,S=(0,M.useMemo)(()=>[...b?[{key:`browser`,kind:`browser`}]:[],...x?c.filter(e=>!!de(e)).map(e=>({key:V(e),kind:`provider`,model:e})):[]],[b,x,c]),[C,ee]=(0,M.useState)(``),w=(0,M.useMemo)(()=>S.find(e=>e.key===C)??S[0],[C,S]),T=w?.kind===`provider`?w.model:void 0,te=S.length>0,E=(0,M.useCallback)(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),D=(0,M.useCallback)(e=>{g.current=e,o(e)},[]),O=(0,M.useCallback)(()=>{h.current+=1,E(),u.current?.stop(),u.current=null,p.current?.abort(),p.current=null;let e=d.current;d.current=null,e&&(e.ondataavailable=null,e.onerror=null,e.onstop=null,e.state===`recording`&&e.stop()),f.current?.getTracks().forEach(e=>e.stop()),f.current=null,D(`idle`)},[E,D]);return(0,M.useEffect)(()=>(_.current=n,O),[O,n]),{supported:te,phase:a,toggle:(0,M.useCallback)(async()=>{let e=g.current;if(e===`starting`||e===`transcribing`){O();return}if(e===`recording`){d.current?.state===`recording`?(D(`transcribing`),d.current.stop()):O();return}if(T){let e=h.current+1;h.current=e;let t=_.current;v.current(),D(`starting`);try{let n=await navigator.mediaDevices.getUserMedia({audio:!0});if(h.current!==e||_.current!==t){n.getTracks().forEach(e=>e.stop());return}f.current=n;let a=de(T),o=a?new MediaRecorder(n,{mimeType:a}):new MediaRecorder(n),s=[];o.ondataavailable=e=>{e.data.size>0&&s.push(e.data)},o.onerror=()=>{n.getTracks().forEach(e=>e.stop()),E(),h.current===e&&(d.current=null,f.current=null,D(`idle`),A.error(r(`voiceMode.transcriptionFailed`)))},o.onstop=()=>{if(n.getTracks().forEach(e=>e.stop()),E(),h.current!==e||_.current!==t)return;if(d.current=null,f.current=null,s.length===0){D(`idle`);return}let a=new Blob(s,{type:o.mimeType||s[0].type||`audio/webm`}),c=new AbortController;p.current=c,D(`transcribing`),ie.transcribe(a,T,{language:i.language,signal:c.signal,fallbackMessage:r(`voiceMode.transcriptionFailed`)}).then(n=>{h.current!==e||_.current!==t||c.signal.aborted||y.current(n.text.trim())}).catch(e=>{c.signal.aborted||(I.error(`Provider transcription failed:`,e),A.error(e instanceof Error?e.message:r(`voiceMode.transcriptionFailed`)))}).finally(()=>{p.current===c&&h.current===e&&(p.current=null,D(`idle`))})},d.current=o,o.start(250);let c=T.config?.max_duration_seconds,l=typeof c==`number`&&c>0?Math.min(c,z):z;m.current=window.setTimeout(()=>{h.current===e&&o.state===`recording`&&o.stop()},Math.max(.1,l-B)*1e3),D(`recording`);return}catch(t){if(h.current!==e)return;I.error(`Failed to start provider dictation:`,t),E(),f.current?.getTracks().forEach(e=>e.stop()),f.current=null,d.current=null,D(`idle`),A.error(r(`voiceMode.transcriptionFailed`));return}}let t=L();if(!t)return;let n=h.current+1;h.current=n;let a=_.current,o=new t;o.lang=i.language,o.continuous=!0,o.interimResults=!0,v.current(),o.onresult=e=>{if(h.current!==n||_.current!==a||u.current!==o)return;let t=``;for(let n=0;n<e.results.length;n++)t+=e.results[n][0]?.transcript??``;y.current(t.trim())},o.onend=()=>{h.current===n&&(u.current=null,D(`idle`))},o.onerror=()=>{h.current===n&&(u.current=null,D(`idle`))},u.current=o,D(`recording`);try{o.start()}catch(e){I.error(`Failed to start dictation:`,e),u.current=null,D(`idle`)}},[O,E,i.language,T,D,r]),cancel:O,sources:S,activeSourceKey:w?.key??``,setSourceKey:ee,providerModel:T}}export{F as n,H as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,r as n,t as r}from"./react-vendor-wiHys0m2.js";import{t as i}from"./useQuery-hWmQjdLu.js";import{d as a}from"./router-vendor-HZm4FR0A.js";import{t as o}from"./logger-BR4forr_.js";import{t as s}from"./useTranslation-B9kflK9S.js";import{t as c}from"./utils-p8Gt72YP.js";import{h as l,s as u,t as d}from"./chatStore-CK5ojwft.js";import{An as f,G as p,It as m,Kt as h,Ln as g,M as _,On as v,Qn as y,S as b,Tn as x,Yt as S,Z as C,Zn as ee,Zt as w,ar as T,c as te,et as E,lr as D,n as O,t as k,wr as A}from"./ui-vendor-BhHHyHk3.js";import{C as ne,g as re,t as ie,y as j}from"./api-DPXCtanG.js";import{t as ae}from"./authStore-D8fc-Hl0.js";var M=e(t(),1),oe=n(),N=r();function P(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function se({hfTask:e,hfSort:t,canInstallModels:n,loadingHf:r,hfModels:i,expandedHfModel:a,hfGgufFiles:o,loadingGguf:l,pullingModel:u,pullProgress:d,setHfTask:f,setHfSort:p,onToggleHfModel:h,onPullHfGguf:g,onCancelPull:_,onRefreshHfModels:y}){let{t:b}=s();return(0,N.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 border-b border-gray-200 dark:border-dark-300 flex-shrink-0 space-y-2`,children:(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsxs)(`select`,{value:e,onChange:e=>f(e.target.value),onMouseDown:e=>e.stopPropagation(),className:`flex-1 px-2 py-1.5 rounded-lg border text-xs bg-gray-50 dark:bg-dark-50 border-gray-200 dark:border-dark-300 text-gray-900 dark:text-gray-100`,children:[(0,N.jsx)(`option`,{value:`text-generation`,children:b(`modelManager.huggingface.taskTextGeneration`)}),(0,N.jsx)(`option`,{value:`text-to-speech`,children:b(`modelManager.huggingface.taskTextToSpeech`)}),(0,N.jsx)(`option`,{value:`text-to-image`,children:b(`modelManager.huggingface.taskTextToImage`)}),(0,N.jsx)(`option`,{value:`automatic-speech-recognition`,children:b(`modelManager.huggingface.taskSpeechRecognition`)})]}),(0,N.jsxs)(`select`,{value:t,onChange:e=>p(e.target.value),onMouseDown:e=>e.stopPropagation(),className:`px-2 py-1.5 rounded-lg border text-xs bg-gray-50 dark:bg-dark-50 border-gray-200 dark:border-dark-300 text-gray-900 dark:text-gray-100`,children:[(0,N.jsx)(`option`,{value:`downloads`,children:b(`modelManager.huggingface.sortDownloads`)}),(0,N.jsx)(`option`,{value:`likes`,children:b(`modelManager.huggingface.sortLikes`)}),(0,N.jsx)(`option`,{value:`lastModified`,children:b(`modelManager.huggingface.sortRecent`)})]})]})}),(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin`,children:[!n&&(0,N.jsx)(`div`,{className:`mx-3 mb-1 mt-3 rounded-lg border border-amber-200 bg-amber-500/10 px-3 py-2 text-xs text-ink dark:border-amber-800 dark:bg-amber-900/20`,children:b(`modelSelector.pullRestricted`)}),r?(0,N.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,N.jsx)(m,{className:`h-6 w-6 animate-spin text-gray-400`})}):i.length===0?(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(k,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:b(`modelManager.huggingface.noModelsFound`)})]}):(0,N.jsx)(`div`,{className:`divide-y divide-gray-100 dark:divide-dark-200`,children:i.map(e=>{let t=a===e.id,r=o[e.id]||[],i=l===e.id;return(0,N.jsxs)(`div`,{className:`bg-white dark:bg-dark-100`,children:[(0,N.jsx)(`div`,{className:`px-3 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-dark-200`,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),h(e.id)},children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`flex-shrink-0 rounded-lg bg-yellow-500/20 p-2 dark:bg-yellow-900/30`,children:(0,N.jsx)(k,{className:`h-4 w-4 text-yellow-600 dark:text-yellow-400`})}),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`h4`,{dir:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:e.id}),e.gated&&(0,N.jsx)(`span`,{className:`rounded bg-yellow-500/20 px-1.5 py-0.5 text-xs text-ink dark:bg-yellow-900/30`,children:`Gated`})]}),(0,N.jsxs)(`p`,{className:`text-xs text-gray-500 dark:text-gray-400 mt-0.5`,children:[`by `,e.author]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 mt-1.5 text-xs text-gray-400 dark:text-gray-500`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(v,{className:`h-3 w-3`}),P(e.downloads)]}),(0,N.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(S,{className:`h-3 w-3`}),P(e.likes)]}),e.pipeline_tag&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-gray-100 dark:bg-dark-200`,children:e.pipeline_tag})]})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 flex-shrink-0`,children:[(0,N.jsx)(`a`,{href:`https://huggingface.co/${e.id}`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(x,{className:`h-4 w-4 text-gray-400`})}),(0,N.jsx)(ee,{className:c(`h-4 w-4 text-gray-400 transition-transform`,t&&`rotate-180`)})]})]})}),t&&(0,N.jsx)(`div`,{className:`px-3 pb-3 pt-1 border-t border-gray-100 dark:border-dark-200 bg-gray-50 dark:bg-dark-200`,children:i?(0,N.jsxs)(`div`,{className:`flex items-center justify-center py-4`,children:[(0,N.jsx)(m,{className:`h-4 w-4 animate-spin text-gray-400`}),(0,N.jsx)(`span`,{className:`ml-2 text-xs text-gray-500`,children:b(`modelManager.huggingface.checkingGguf`)})]}):r.length===0?(0,N.jsx)(`div`,{className:`py-4 text-center text-xs text-gray-500 dark:text-gray-400`,children:b(`modelManager.huggingface.noGgufAvailable`)}):(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`div`,{className:`text-xs font-medium text-gray-600 dark:text-gray-300 mb-2`,children:b(`modelManager.huggingface.ggufFilesCount`,{count:r.length})}),r.map(e=>{let t=u===e.ollamaCommand;return(0,N.jsxs)(`div`,{className:`flex items-center gap-2 p-2 rounded-lg bg-white dark:bg-dark-100 border border-gray-200 dark:border-dark-300`,children:[(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsx)(`div`,{className:`text-xs font-medium text-gray-800 dark:text-gray-200 truncate`,children:e.filename}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 mt-0.5 text-xs text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(`span`,{children:e.sizeFormatted}),e.quantization&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400`,children:e.quantization})]})]}),t?(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`div`,{className:`text-xs text-gray-500 w-12 text-right`,children:d?.percent===void 0?`...`:`${d.percent}%`}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),_()},className:`p-1.5 rounded-lg text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20`,children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}):n?(0,N.jsxs)(`button`,{onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),g(e.ollamaCommand,e.filename)},disabled:!!u,className:c(`px-3 py-1.5 rounded-lg text-xs font-medium`,`bg-primary-100 dark:bg-primary-900/30`,`text-primary-700 dark:text-primary-400`,`hover:bg-primary-200 dark:hover:bg-primary-900/50`,`disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,N.jsx)(v,{className:`h-3 w-3 inline mr-1`}),b(`models.pull`)]}):(0,N.jsx)(`span`,{className:`rounded bg-amber-500/20 px-2 py-1 text-[11px] font-medium text-ink dark:bg-amber-900/30`,children:b(`modelSelector.adminOnlyPull`)})]},e.filename)}),u?.startsWith(`hf.co/`)&&u.includes(e.id)&&d?.percent!==void 0&&(0,N.jsx)(`div`,{className:`w-full bg-gray-200 dark:bg-dark-300 rounded-full h-1.5 overflow-hidden mt-2`,children:(0,N.jsx)(`div`,{className:`h-1.5 rounded-full bg-primary-500 transition-all duration-300`,style:{width:`${d.percent}%`}})})]})})]},e.id)})})]}),(0,N.jsxs)(`div`,{className:`px-3 py-2 border-t border-gray-200 dark:border-dark-300 flex items-center justify-between flex-shrink-0`,children:[(0,N.jsxs)(`a`,{href:`https://huggingface.co/models`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`text-xs text-primary-600 dark:text-primary-400 hover:underline flex items-center gap-1`,children:[(0,N.jsx)(x,{className:`h-3 w-3`}),b(`modelManager.huggingface.browseAllLink`)]}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),y()},className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(C,{className:c(`h-3.5 w-3.5 text-gray-400`,r&&`animate-spin`)})})]})]})}function ce({filteredGroups:e,selectedModel:t,showImageGen:n,getModelValue:r,getModelIcon:i,getModelLabel:a,getModelSubLabel:o,onModelSelect:l,onOpenGallery:u}){let{t:d}=s();return(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-dark-400`,children:[e.length>0?e.map(e=>(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-dark-300 border-b border-gray-200 dark:border-dark-400 sticky top-0`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon,e.label,` (`,e.models.length,`)`]})}),e.models.map(e=>{let n=r(e);return(0,N.jsx)(`button`,{type:`button`,"data-testid":`model-selector-option`,"data-model-value":n,"aria-pressed":t===n,onClick:()=>l(n),className:c(`block w-full cursor-pointer border-b border-gray-100 px-3 py-3 text-start last:border-b-0 dark:border-dark-200`,`hover:bg-gray-50 dark:hover:bg-dark-200`,`bg-white dark:bg-dark-100 transition-colors`,`focus-visible:relative focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500/50`,t===n&&`bg-primary-50 dark:bg-primary-900/30`),children:(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i(e),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsx)(`div`,{dir:e.isPersona?`auto`:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:a(e)}),o(e)&&(0,N.jsx)(`div`,{dir:`auto`,className:`text-xs text-gray-500 dark:text-gray-400 truncate`,children:o(e)})]}),t===n&&(0,N.jsx)(y,{className:`h-4 w-4 text-primary-600 dark:text-primary-400 flex-shrink-0`})]})},n)})]},e.type)):(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(f,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:d(`models.noModelsFound`)})]}),n&&(0,N.jsxs)(`div`,{className:`border-t border-gray-200 dark:border-dark-300`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-dark-300`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(E,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`}),d(`modelSelector.actions`)]})}),(0,N.jsx)(`div`,{onMouseDown:e=>{e.preventDefault(),u()},className:`px-3 py-3 cursor-pointer hover:bg-blue-50 dark:hover:bg-blue-900/20 bg-white dark:bg-dark-100`,children:(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(h,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`}),(0,N.jsxs)(`div`,{className:`flex-1`,children:[(0,N.jsx)(`div`,{className:`text-sm font-medium text-gray-900 dark:text-gray-100`,children:d(`gallery.generate`)}),(0,N.jsx)(`div`,{className:`text-xs text-gray-500 dark:text-gray-400`,children:d(`gallery.generateDescription`)})]})]})})]})]})}function le({libraryCategories:e,libraryCategory:t,canInstallModels:n,loadingLibrary:r,filteredLibraryModels:i,pullingModel:a,pullProgress:o,setLibraryCategory:l,isModelInstalled:u,onModelSelect:d,onPullModel:f,onCancelPull:p,onRefreshLibrary:h}){let{t:_}=s();return(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,N.jsx)(`div`,{className:`px-3 py-2 border-b border-gray-200 dark:border-dark-300 flex-shrink-0`,children:(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,N.jsx)(`button`,{onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),l(e)},className:c(`px-2.5 py-1 rounded-full text-xs font-medium transition-colors`,t===e?`bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-400`:`bg-gray-100 dark:bg-dark-200 text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-dark-300`),children:e.charAt(0).toUpperCase()+e.slice(1)},e))})}),(0,N.jsxs)(`div`,{className:`scroll-region min-h-0 flex-1 scrollbar-thin`,children:[!n&&(0,N.jsx)(`div`,{className:`mx-3 mb-1 mt-3 rounded-lg border border-amber-200 bg-amber-500/10 px-3 py-2 text-xs text-ink dark:border-amber-800 dark:bg-amber-900/20`,children:_(`modelSelector.pullRestricted`)}),r?(0,N.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,N.jsx)(m,{className:`h-6 w-6 animate-spin text-gray-400`})}):i.length===0?(0,N.jsxs)(`div`,{className:`px-4 py-8 text-center text-gray-500 dark:text-gray-400`,children:[(0,N.jsx)(g,{className:`h-8 w-8 mx-auto mb-2 text-gray-300 dark:text-gray-600`}),(0,N.jsx)(`p`,{className:`text-sm`,children:_(`models.noModelsFound`)})]}):(0,N.jsx)(`div`,{className:`divide-y divide-gray-100 dark:divide-dark-200`,children:i.map(e=>{let t=u(e.name),r=a===e.name;return(0,N.jsxs)(`div`,{className:c(`px-3 py-3 bg-white dark:bg-dark-100`,t&&`bg-green-50/50 dark:bg-green-900/10`),children:[(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`p-2 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex-shrink-0`,children:(0,N.jsx)(g,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`})}),(0,N.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`h4`,{dir:`ltr`,className:`text-sm font-medium text-gray-900 dark:text-gray-100 truncate`,children:e.name}),t&&(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400`,children:_(`modelSelector.installed`)}),(e.category===`cloud`||e.tags?.includes(`cloud`))&&(0,N.jsxs)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 flex items-center gap-1`,children:[(0,N.jsx)(g,{className:`h-3 w-3`}),`Cloud`]})]}),(0,N.jsx)(`p`,{className:`text-xs text-gray-500 dark:text-gray-400 line-clamp-1 mt-0.5`,children:e.description}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[e.sizes.slice(0,3).map(e=>(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-xs bg-gray-100 dark:bg-dark-200 text-gray-600 dark:text-gray-400`,children:e},e)),e.pulls&&(0,N.jsxs)(`span`,{className:`text-xs text-gray-400 dark:text-gray-500 flex items-center gap-1`,children:[(0,N.jsx)(v,{className:`h-3 w-3`}),e.pulls]})]})]}),(0,N.jsx)(`div`,{className:`flex-shrink-0`,children:r?(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`div`,{className:`text-xs text-gray-500 w-12 text-right`,children:o?.percent===void 0?`...`:`${o.percent}%`}),(0,N.jsx)(`button`,{onClick:p,className:`p-1.5 rounded-lg text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20`,children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}):t?(0,N.jsx)(`button`,{onClick:()=>d(e.name),className:`px-3 py-1.5 rounded-lg text-xs font-medium bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 hover:bg-green-200 dark:hover:bg-green-900/50`,children:_(`modelSelector.use`)}):n?(0,N.jsxs)(`button`,{onClick:()=>f(e.name),className:`px-3 py-1.5 rounded-lg text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-400 hover:bg-primary-200 dark:hover:bg-primary-900/50`,children:[(0,N.jsx)(v,{className:`h-3 w-3 inline mr-1`}),_(`modelSelector.pull`)]}):(0,N.jsx)(`span`,{className:`rounded bg-amber-500/20 px-2 py-1 text-[11px] font-medium text-ink dark:bg-amber-900/30`,children:_(`modelSelector.adminOnlyPull`)})})]}),r&&o?.percent!==void 0&&(0,N.jsx)(`div`,{className:`mt-2 w-full bg-gray-200 dark:bg-dark-300 rounded-full h-1.5 overflow-hidden`,children:(0,N.jsx)(`div`,{className:`h-1.5 rounded-full bg-primary-500 transition-all duration-300`,style:{width:`${o.percent}%`}})})]},e.name)})})]}),(0,N.jsxs)(`div`,{className:`px-3 py-2 border-t border-gray-200 dark:border-dark-300 flex items-center justify-between flex-shrink-0`,children:[(0,N.jsxs)(`a`,{href:`https://ollama.com/library`,target:`_blank`,rel:`noopener noreferrer`,onMouseDown:e=>e.stopPropagation(),className:`text-xs text-primary-600 dark:text-primary-400 hover:underline flex items-center gap-1`,children:[(0,N.jsx)(x,{className:`h-3 w-3`}),_(`modelManager.huggingface.browseAllLink`)]}),(0,N.jsx)(`button`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),h()},className:`p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200`,children:(0,N.jsx)(C,{className:c(`h-3.5 w-3.5 text-gray-400`,r&&`animate-spin`)})})]})]})}var ue=o(`components:model-selector`),F=({models:e,selectedModel:t,onModelChange:n,currentPersona:r,className:o,disabled:f=!1,compact:m=!1,showImageGen:h=!1,onModelsRefresh:v,getModelValue:y,getModelLabel:x,getModelTitle:S,triggerRef:C,triggerTestId:E,selectTestId:ie,ariaLabel:P})=>{let{t:F}=s(),[I,L]=(0,M.useState)(!1),[R,z]=(0,M.useState)(``),[B,V]=(0,M.useState)(`installed`),de=(0,M.useRef)(null),H=(0,M.useRef)(null),fe=(0,M.useRef)(null),pe=(0,M.useRef)(null),me=a(),{user:he,systemInfo:ge}=ae(),U=he?.role===`admin`||ge?.requiresAuth===!1,[W,_e]=(0,M.useState)(`all`),[ve,ye]=(0,M.useState)(``),[be,xe]=(0,M.useState)(`text-generation`),[Se,Ce]=(0,M.useState)(`downloads`),[we,Te]=(0,M.useState)(``),[Ee,De]=(0,M.useState)(null),[Oe,ke]=(0,M.useState)({}),[Ae,je]=(0,M.useState)(null),[G,K]=(0,M.useState)(null),[Me,q]=(0,M.useState)(null),[Ne,J]=(0,M.useState)(null),Pe=[`all`,`general`,`coding`,`reasoning`,`vision`,`embedding`,`cloud`],Fe=[{type:`legacy`,label:F(`modelSelector.providerNotRecorded`,`Provider not recorded`),icon:(0,N.jsx)(T,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isLegacySelection),color:`gray`},{type:`unavailable`,label:F(`modelSelector.unavailableSelections`,`Unavailable selections`),icon:(0,N.jsx)(O,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isUnavailable&&!e.isLegacySelection),color:`gray`},{type:`personas`,label:F(`modelSelector.personas`),icon:(0,N.jsx)(te,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isPersona&&!e.isUnavailable),color:`purple`},{type:`agents`,label:F(`modelSelector.agentModels`,`Agents`),icon:(0,N.jsx)(b,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isAgent&&!e.isUnavailable),color:`green`},{type:`ollama`,label:F(`modelSelector.ollamaModels`),icon:(0,N.jsx)(D,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>l(e)&&!e.name.includes(`embed`)),color:`green`},{type:`plugins`,label:F(`modelSelector.pluginModels`),icon:(0,N.jsx)(k,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}),models:e.filter(e=>e.isPlugin&&!e.isUnavailable),color:`green`}].filter(e=>e.models.length>0).map(e=>({...e,models:e.models.filter(e=>e.name.toLowerCase().includes(R.toLowerCase())||e.personaName&&e.personaName.toLowerCase().includes(R.toLowerCase())||e.pluginName&&e.pluginName.toLowerCase().includes(R.toLowerCase()))})).filter(e=>e.models.length>0),Y=e=>y?.(e)??e.name,Ie=d(e=>e.modelMetadata),X=d(e=>e.personas),Z=e.find(e=>Y(e)===t),Le=e=>{if(!e.name.startsWith(`persona:`))return;let t=e.name.slice(8),n=t;try{n=decodeURIComponent(t)}catch{}let r=X[t]??X[n];if(r?.name)return r.name;if(e.personaName&&e.personaName!==t)return e.personaName},Re=e=>{if(!e.name.startsWith(`persona:`))return;let t=e.name.slice(8),n=t;try{n=decodeURIComponent(t)}catch{}return X[t]??X[n]};(0,M.useImperativeHandle)(C,()=>fe.current);let Q=(0,M.useCallback)((e=!0)=>{L(!1),z(``),e&&window.requestAnimationFrame(()=>fe.current?.focus())},[]),{data:ze=[],isLoading:Be,refetch:Ve}=i({queryKey:[`ollama-library-selector`,ve,W===`cloud`?`cloud`:`all`],queryFn:async()=>{let e=await j.getLibraryModels({search:ve||void 0,sort:`popular`,category:W===`cloud`?`cloud`:void 0});return e.success&&e.data?e.data:[]},enabled:I&&B===`ollama`}),{data:He=[],isLoading:Ue,refetch:We}=i({queryKey:[`hf-models-selector`,be,we,Se],queryFn:async()=>{let e=await ne.getModels({task:be,search:we||void 0,sort:Se,limit:30});return e.success&&e.data?e.data:[]},enabled:I&&B===`huggingface`}),Ge=ze.filter(e=>{let t=!R||e.name.toLowerCase().includes(R.toLowerCase())||e.description.toLowerCase().includes(R.toLowerCase()),n=W===`all`||e.category===W;return t&&n}),Ke=(0,M.useCallback)(async e=>{let[t,n]=e.split(`/`);if(t&&n){je(e);try{let r=await ne.getGgufFiles(t,n);r.success&&r.data&&ke(t=>({...t,[e]:r.data}))}catch(e){ue.error(`Failed to load GGUF files:`,e)}finally{je(null)}}},[]),qe=(0,M.useCallback)(e=>{Ee===e?De(null):(De(e),Oe[e]||Ke(e))},[Ee,Oe,Ke]),Je=(0,M.useCallback)((e,t)=>{if(!U){A.error(F(`modelSelector.pullRestricted`));return}if(!G){K(e),q({status:`starting`});try{let n=j.pullModelStream(e,e=>{q(e)},()=>{q(null),K(null),J(null),A.success(F(`modelDownload.success`,{name:t})),v?.()},e=>{q(null),K(null),J(null),A.error(F(`modelDownload.failed`,{error:e}))});J(()=>n)}catch{q(null),K(null),A.error(F(`modelDownload.startFailed`))}}},[U,v,G,F]);(0,M.useEffect)(()=>{let e=setTimeout(()=>{B===`huggingface`?Te(R):B===`ollama`&&ye(R)},300);return()=>clearTimeout(e)},[R,B]),(0,M.useEffect)(()=>{if(!I)return;let e=e=>{if(e.key===`Escape`){e.preventDefault(),Q();return}if(e.key===`Tab`&&H.current){let t=Array.from(H.current.querySelectorAll(`button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>e.offsetParent!==null),n=t[0],r=t[t.length-1];if(!n||!r)return;e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Q,I]),(0,M.useEffect)(()=>{I&&pe.current&&pe.current.focus()},[I]);let Ye=async t=>{let r=e.find(e=>Y(e)===t)??e.find(e=>!e.isPlugin&&!e.isPersona&&e.name===t),i=r?Y(r):t,a=r?.name??t;Q();try{let e=await j.listRunningModels();if(e.success&&e.data){let t=e.data;t.length>0&&(r?.isPlugin!==!0&&t.some(e=>e.name===a||a.startsWith(`persona:`))||await j.unloadAllModels())}}catch(e){ue.warn(`Failed to unload models before switch:`,e)}n({target:{value:i}})},Xe=async e=>{if(!U){A.error(F(`modelSelector.pullRestricted`));return}if(!G){K(e),q({status:`starting`});try{let t=j.pullModelStream(e,e=>{q(e)},()=>{q(null),K(null),J(null),A.success(F(`modelDownload.success`,{name:e})),v?.()},e=>{q(null),K(null),J(null),A.error(F(`modelDownload.failed`,{error:e}))});J(()=>t)}catch{q(null),K(null),A.error(F(`modelDownload.startFailed`))}}},Ze=()=>{Ne&&(Ne(),J(null),K(null),q(null),A.success(F(`modelDownload.cancelled`)))},Qe=t=>e.some(e=>l(e)&&(e.name===t||e.name.startsWith(t+`:`))),$e=e=>{let t=Ie[u(e)]?.avatar;if(t&&!e.isPersona)return(0,N.jsx)(`img`,{src:t,alt:``,className:`h-4 w-4 shrink-0 rounded-full object-cover`});if(e.isPersona||e.isLegacySelection){let t=Re(e);if(t)return(0,N.jsx)(`img`,{src:re(t,64),alt:``,className:`h-4 w-4 shrink-0 rounded object-cover`})}return e.isLegacySelection?(0,N.jsx)(T,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):e.isPersona?(0,N.jsx)(te,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):e.isPlugin?(0,N.jsx)(k,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`}):(0,N.jsx)(D,{className:`h-4 w-4 text-gray-500 dark:text-dark-600`})},$=e=>{if(x)return x(e);let t=Ie[u(e)]?.label;return t&&!e.isPersona?t:e.isLegacySelection?`${Le(e)??e.name} (${F(`modelSelector.legacyProvider`,`provider not recorded`)})`:e.isPersona?Le(e)||e.personaName||e.name:e.isAgent?e.isUnavailable?`${e.agentName||e.name} (${F(`modelSelector.unavailable`,`unavailable`)})`:e.agentName||e.name:(e.isPlugin,e.isUnavailable?`${e.name} (${F(`modelSelector.unavailable`,`unavailable`)})`:e.name)},et=e=>e.isLegacySelection?e.isUnavailable?F(`modelSelector.providerUnavailable`,`provider unavailable`):F(`modelSelector.reselectProvider`,`reselect a provider to pin this model`):e.isPersona?`via ${e.model}`:e.isPlugin?e.isUnavailable?`via ${e.pluginName||e.pluginId} · ${F(`modelSelector.providerUnavailable`,`provider unavailable`)}`:`via ${e.pluginName}`:e.isUnavailable?F(`modelSelector.providerUnavailable`,`provider unavailable`):null;return(0,N.jsxs)(`div`,{className:c(`relative min-w-0`,o),ref:de,children:[(0,N.jsxs)(`button`,{ref:fe,"data-testid":E,type:`button`,onClick:()=>!f&&L(!I),disabled:f,"aria-haspopup":`dialog`,"aria-expanded":I,"aria-label":P&&Z?`${P}: ${$(Z)}`:P,className:c(m?`flex h-9 w-full min-w-0 items-center justify-between gap-2 px-2.5 text-start`:`w-full flex items-center justify-between gap-2 px-3 py-2.5 text-start`,`rounded-xl border border-line bg-surface-subtle text-sm text-ink hover:bg-hover-solid`,`transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500/40`,f?`opacity-50 cursor-not-allowed`:`cursor-pointer`),title:m?Z?S?.(Z)??$(Z):F(`modelSelector.selectModel`):void 0,children:[(()=>{if(!Z)return m?(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,N.jsx)(D,{className:`h-4 w-4 shrink-0`}),(0,N.jsx)(`span`,{className:`truncate text-xs font-medium text-ink-subtle`,children:F(`modelSelector.selectModel`)})]}):F(`modelSelector.selectModel`);if(m){let e=$(Z);return(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`shrink-0`,children:$e(Z)}),(0,N.jsx)(`span`,{dir:Z.isPersona?`auto`:`ltr`,className:`truncate text-xs font-medium text-ink`,children:e})]})}let e=$(Z),t=et(Z);return(0,N.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[$e(Z),(0,N.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,N.jsx)(`span`,{dir:Z.isPersona?`auto`:`ltr`,className:`text-sm font-medium truncate`,children:e}),t&&(0,N.jsx)(`span`,{dir:`auto`,className:`text-xs text-gray-500 dark:text-gray-400 truncate`,children:t})]}),Z.isPersona&&r&&(0,N.jsxs)(`div`,{className:`flex items-center gap-1 ms-auto`,children:[(0,N.jsx)(T,{className:`h-3 w-3 text-gray-500 dark:text-dark-600`}),r.embedding_model&&(0,N.jsx)(_,{className:`h-3 w-3 text-gray-400 dark:text-dark-500`})]})]})})(),(0,N.jsx)(ee,{className:c(m?`h-3 w-3`:`h-4 w-4`,`shrink-0 text-ink-subtle transition-transform duration-150 motion-reduce:transition-none`,I&&`rotate-180`)})]}),I&&(0,oe.createPortal)((0,N.jsxs)(`div`,{className:`fixed inset-0 z-[999999] flex items-center justify-center p-3 sm:p-6`,children:[(0,N.jsx)(`div`,{className:`absolute inset-0 bg-gray-950/55 backdrop-blur-md`,onClick:()=>Q()}),(0,N.jsxs)(`div`,{ref:H,role:`dialog`,"aria-modal":`true`,"aria-label":F(`modelSelector.selectModel`),className:c(`relative flex w-full max-w-xl flex-col overflow-hidden bg-white/[0.98] dark:bg-dark-25/[0.98]`,`h-[min(620px,88vh)] rounded-[1.5rem] border border-black/[0.08] dark:border-white/[0.09]`,`shadow-[0_30px_100px_rgba(0,0,0,0.28)] backdrop-blur-xl animate-scale-in`),onClick:e=>e.stopPropagation(),children:[(0,N.jsxs)(`div`,{className:`flex-shrink-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between px-4 pb-2 pt-4 sm:px-5 sm:pt-5`,children:[(0,N.jsx)(`h2`,{className:`text-lg font-medium tracking-[-0.025em] text-gray-950 dark:text-dark-950 rtl:tracking-normal`,children:F(`modelSelector.selectModel`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>Q(),className:`flex h-9 w-9 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-950 dark:text-dark-500 dark:hover:bg-dark-200 dark:hover:text-dark-950`,title:F(`common.close`),children:(0,N.jsx)(O,{className:`h-4 w-4`})})]}),(0,N.jsx)(`div`,{className:`px-4 pb-3 sm:px-5`,children:(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(p,{className:`absolute start-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400`}),(0,N.jsx)(`input`,{ref:pe,type:`text`,placeholder:F(B===`installed`?`modelSelector.searchInstalled`:B===`ollama`?`modelSelector.searchOllama`:`modelSelector.searchHuggingFace`),value:R,onChange:e=>z(e.target.value),className:c(`w-full rounded-xl border border-black/[0.07] bg-gray-100/70 py-2.5 ps-10 pe-4 text-sm dark:border-white/[0.07] dark:bg-dark-200/70`,`focus:outline-none focus:ring-2 focus:ring-primary-500/20`,`text-gray-900 dark:text-dark-900 placeholder:text-gray-400 dark:placeholder:text-dark-500`)})]})}),(0,N.jsxs)(`div`,{className:`mx-4 mb-3 flex rounded-xl bg-gray-100/70 p-1 dark:bg-dark-200/70 sm:mx-5`,children:[(0,N.jsxs)(`button`,{onClick:()=>{V(`installed`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`installed`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`installed`,children:[(0,N.jsx)(w,{className:`h-4 w-4 inline me-1.5`}),F(`modelSelector.installed`)]}),(0,N.jsxs)(`button`,{onClick:()=>{V(`ollama`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`ollama`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`ollama`,children:[(0,N.jsx)(g,{className:`h-4 w-4 inline me-1.5`}),`Ollama`]}),(0,N.jsxs)(`button`,{onClick:()=>{V(`huggingface`)},className:c(`flex-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors sm:px-4`,B===`huggingface`?`bg-white text-gray-950 shadow-sm dark:bg-dark-300 dark:text-dark-950`:`text-gray-500 hover:text-gray-800 dark:text-dark-500 dark:hover:text-dark-800`),"aria-pressed":B===`huggingface`,children:[(0,N.jsx)(k,{className:`h-4 w-4 inline me-1.5`}),`HuggingFace`]})]})]}),B===`installed`&&(0,N.jsx)(ce,{filteredGroups:Fe,selectedModel:t,showImageGen:h,getModelValue:Y,getModelIcon:$e,getModelLabel:$,getModelSubLabel:et,onModelSelect:Ye,onOpenGallery:()=>{Q(!1),me(`/gallery`)}}),B===`ollama`&&(0,N.jsx)(le,{libraryCategories:Pe,libraryCategory:W,canInstallModels:U,loadingLibrary:Be,filteredLibraryModels:Ge,pullingModel:G,pullProgress:Me,setLibraryCategory:_e,isModelInstalled:Qe,onModelSelect:Ye,onPullModel:Xe,onCancelPull:Ze,onRefreshLibrary:()=>{Ve()}}),B===`huggingface`&&(0,N.jsx)(se,{hfTask:be,hfSort:Se,canInstallModels:U,loadingHf:Ue,hfModels:He,expandedHfModel:Ee,hfGgufFiles:Oe,loadingGguf:Ae,pullingModel:G,pullProgress:Me,setHfTask:xe,setHfSort:Ce,onToggleHfModel:qe,onPullHfGguf:Je,onCancelPull:Ze,onRefreshHfModels:()=>{We()}})]})]}),document.body),(0,N.jsx)(`select`,{"data-testid":ie,"aria-label":P,"aria-hidden":`true`,dir:`ltr`,value:t,onChange:n,className:`hidden`,tabIndex:-1,children:e.map(e=>(0,N.jsx)(`option`,{value:Y(e),children:$(e)},`${e.isLegacySelection?`legacy`:e.isPersona?`persona`:e.isPlugin?`plugin`:`ollama`}:${e.pluginId||``}:${Y(e)}`))})]})},I=o(`hooks:dictation`),L=()=>{if(typeof window>`u`)return;let e=window;return e.SpeechRecognition||e.webkitSpeechRecognition},R=[{mimeType:`audio/webm;codecs=opus`,format:`webm`}],z=300,B=.25,V=e=>`${encodeURIComponent(e.plugin)}:${encodeURIComponent(e.model)}`;function de(e){if(typeof MediaRecorder>`u`)return;let t=new Set((e.config?.formats||[]).map(e=>e.toLowerCase()));return R.find(e=>(t.size===0||t.has(e.format))&&(typeof MediaRecorder.isTypeSupported!=`function`||MediaRecorder.isTypeSupported(e.mimeType)))?.mimeType}function H({onStart:e,onText:t,ownerKey:n}){let{t:r,i18n:i}=s(),[a,o]=(0,M.useState)(`idle`),[c,l]=(0,M.useState)([]),u=(0,M.useRef)(null),d=(0,M.useRef)(null),f=(0,M.useRef)(null),p=(0,M.useRef)(null),m=(0,M.useRef)(null),h=(0,M.useRef)(0),g=(0,M.useRef)(`idle`),_=(0,M.useRef)(void 0),v=(0,M.useRef)(e),y=(0,M.useRef)(t);(0,M.useEffect)(()=>{v.current=e,y.current=t},[e,t]),(0,M.useEffect)(()=>{let e=!1;return ie.getModels().then(t=>{!e&&t.success&&t.data&&l(t.data)}).catch(()=>{e||l([])}),()=>{e=!0}},[]);let b=(0,M.useMemo)(()=>typeof window<`u`&&window.isSecureContext&&typeof navigator<`u`&&!!navigator.mediaDevices&&!!L(),[]),x=typeof window<`u`&&window.isSecureContext&&typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia,S=(0,M.useMemo)(()=>[...b?[{key:`browser`,kind:`browser`}]:[],...x?c.filter(e=>!!de(e)).map(e=>({key:V(e),kind:`provider`,model:e})):[]],[b,x,c]),[C,ee]=(0,M.useState)(``),w=(0,M.useMemo)(()=>S.find(e=>e.key===C)??S[0],[C,S]),T=w?.kind===`provider`?w.model:void 0,te=S.length>0,E=(0,M.useCallback)(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),D=(0,M.useCallback)(e=>{g.current=e,o(e)},[]),O=(0,M.useCallback)(()=>{h.current+=1,E(),u.current?.stop(),u.current=null,p.current?.abort(),p.current=null;let e=d.current;d.current=null,e&&(e.ondataavailable=null,e.onerror=null,e.onstop=null,e.state===`recording`&&e.stop()),f.current?.getTracks().forEach(e=>e.stop()),f.current=null,D(`idle`)},[E,D]);return(0,M.useEffect)(()=>(_.current=n,O),[O,n]),{supported:te,phase:a,toggle:(0,M.useCallback)(async()=>{let e=g.current;if(e===`starting`||e===`transcribing`){O();return}if(e===`recording`){d.current?.state===`recording`?(D(`transcribing`),d.current.stop()):O();return}if(T){let e=h.current+1;h.current=e;let t=_.current;v.current(),D(`starting`);try{let n=await navigator.mediaDevices.getUserMedia({audio:!0});if(h.current!==e||_.current!==t){n.getTracks().forEach(e=>e.stop());return}f.current=n;let a=de(T),o=a?new MediaRecorder(n,{mimeType:a}):new MediaRecorder(n),s=[];o.ondataavailable=e=>{e.data.size>0&&s.push(e.data)},o.onerror=()=>{n.getTracks().forEach(e=>e.stop()),E(),h.current===e&&(d.current=null,f.current=null,D(`idle`),A.error(r(`voiceMode.transcriptionFailed`)))},o.onstop=()=>{if(n.getTracks().forEach(e=>e.stop()),E(),h.current!==e||_.current!==t)return;if(d.current=null,f.current=null,s.length===0){D(`idle`);return}let a=new Blob(s,{type:o.mimeType||s[0].type||`audio/webm`}),c=new AbortController;p.current=c,D(`transcribing`),ie.transcribe(a,T,{language:i.language,signal:c.signal,fallbackMessage:r(`voiceMode.transcriptionFailed`)}).then(n=>{h.current!==e||_.current!==t||c.signal.aborted||y.current(n.text.trim())}).catch(e=>{c.signal.aborted||(I.error(`Provider transcription failed:`,e),A.error(e instanceof Error?e.message:r(`voiceMode.transcriptionFailed`)))}).finally(()=>{p.current===c&&h.current===e&&(p.current=null,D(`idle`))})},d.current=o,o.start(250);let c=T.config?.max_duration_seconds,l=typeof c==`number`&&c>0?Math.min(c,z):z;m.current=window.setTimeout(()=>{h.current===e&&o.state===`recording`&&o.stop()},Math.max(.1,l-B)*1e3),D(`recording`);return}catch(t){if(h.current!==e)return;I.error(`Failed to start provider dictation:`,t),E(),f.current?.getTracks().forEach(e=>e.stop()),f.current=null,d.current=null,D(`idle`),A.error(r(`voiceMode.transcriptionFailed`));return}}let t=L();if(!t)return;let n=h.current+1;h.current=n;let a=_.current,o=new t;o.lang=i.language,o.continuous=!0,o.interimResults=!0,v.current(),o.onresult=e=>{if(h.current!==n||_.current!==a||u.current!==o)return;let t=``;for(let n=0;n<e.results.length;n++)t+=e.results[n][0]?.transcript??``;y.current(t.trim())},o.onend=()=>{h.current===n&&(u.current=null,D(`idle`))},o.onerror=()=>{h.current===n&&(u.current=null,D(`idle`))},u.current=o,D(`recording`);try{o.start()}catch(e){I.error(`Failed to start dictation:`,e),u.current=null,D(`idle`)}},[O,E,i.language,T,D,r]),cancel:O,sources:S,activeSourceKey:w?.key??``,setSourceKey:ee,providerModel:T}}export{F as n,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-vendor-wiHys0m2.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t})),c={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=c;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function u(e){setTimeout(e,0)}var d=typeof window>`u`||`Deno`in globalThis;function f(){}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return typeof e==`number`&&e>=0&&e!==1/0}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!x(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!x(e[r],t[r]))return!1;return!0}return!1}var ee=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!E(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{l.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ae=()=>d,j=()=>ae(),M=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},N=new class extends M{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},oe=u;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends M{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)!==`online`||F.isOnline()}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(f);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new L(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},p=()=>N.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),m=()=>I(e.networkMode)&&e.canRun(),h=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=()=>new Promise(t=>{r=e=>{(c()||p())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(h).catch(r=>{if(c())return;let i=e.retry??(j()?0:3),a=e.retryDelay??ce,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){g(r);return}n++,e.onFail?.(n,r),te(o).then(()=>p()?void 0:_()).then(()=>{t?g(r):v()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?v():_().then(v),s)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#e=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(l.clearTimeout(this.#e),this.#e=void 0)}};function le(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ie(e,()=>t.signal,()=>n=!0)},u=k(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ue(e,t){return t?B(e,t)!=null:!1}function H(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var de=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=G(this.options);e.data!==void 0&&(this.setState(W(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(f).catch(f):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>g(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!h(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=k(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?le(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...U(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...W(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function U(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function G(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var K=class extends M{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),q(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return J(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return J(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Y(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return C(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f)),t}#h(e){return!j()&&g(this.options.enabled,this.#t)!==!1&&m(e)}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=h(this.#r.dataUpdatedAt,e)+1;this.#u=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return g(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(l.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&q(e,t),o=i&&Y(e,n,t,r);(a||o)&&(l={...l,...U(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=D(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:X(e,t),refetch:this.refetch,isEnabled:g(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),C(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function fe(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||g(t.retryOnMount,e)!==!1)}function q(e,t){return fe(e,t)||e.state.data!==void 0&&J(e,t,t.refetchOnMount)}function J(e,t,n){if(g(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=g(n,e);return r===`always`||r!==!1&&X(e,t)}return!1}function Y(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&X(e,n)}function X(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}var Z=r.createContext(!1),pe=()=>r.useContext(Z);Z.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=r.createContext(me()),ge=()=>r.useContext(he),_e=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Q=e=>{r.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e?.suspense&&t.isPending,xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $(e,t,n){let i=pe(),a=ge(),s=o(n),c=s.defaultQueryOptions(e),l=s.getQueryCache().get(c.queryHash),u=e.subscribed!==!1;c._optimisticResults=i?`isRestoring`:u?`optimistic`:void 0,ye(c),_e(c,a,l),Q(a);let[d]=r.useState(()=>new t(s,c)),p=d.getOptimisticResult(c),m=!i&&u;if(r.useSyncExternalStore(r.useCallback(e=>{let t=m?d.subscribe(P.batchCalls(e)):f;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),r.useEffect(()=>{d.setOptions(c)},[c,d]),be(c,p))throw xe(c,d,a);if(ve({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;return c.notifyOnChangeProps?p:d.trackResult(p)}function Se(e,t){return $(e,K,t)}export{o as C,s as S,_,ue as a,g as b,R as c,N as d,M as f,v as g,y as h,de as i,F as l,b as m,$ as n,H as o,p,K as r,z as s,Se as t,P as u,f as v,O as x,x as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./react-vendor-
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./react-vendor-wiHys0m2.js";import{f as r,u as i}from"./utils-p8Gt72YP.js";var a=e(n()),o=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);p(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},s={},c=(e,t,n,r)=>{p(n)&&s[n]||(p(n)&&(s[n]=new Date),o(e,t,n,r))},l=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},u=(e,t,n)=>{e.loadNamespaces(t,l(e,n))},d=(e,t,n,r)=>{if(p(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return u(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,l(e,r))},f=(e,t,n={})=>!t.languages||!t.languages.length?(c(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),p=e=>typeof e==`string`,m=e=>typeof e==`object`&&!!e,h=(0,a.createContext)(),g=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},_=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),v=t(((e,t)=>{t.exports=_()}))(),y={t:(e,t)=>{if(p(t))return t;if(m(t)&&p(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},b=()=>()=>{},x=(e,t={})=>{let{i18n:n}=t,{i18n:o,defaultNS:s}=(0,a.useContext)(h)||{},l=n||o||i();l&&!l.reportNamespaces&&(l.reportNamespaces=new g),l||c(l,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let m=(0,a.useMemo)(()=>({...r(),...l?.options?.react,...t}),[l,t]),{useSuspense:_,keyPrefix:x}=m,S=e||s||l?.options?.defaultNS,C=p(S)?[S]:S||[`translation`],w=(0,a.useMemo)(()=>C,C);l?.reportNamespaces?.addUsedNamespaces?.(w);let T=(0,a.useRef)(0),E=(0,a.useCallback)(e=>{if(!l)return b;let{bindI18n:t,bindI18nStore:n}=m,r=()=>{T.current+=1,e()};return t&&l.on(t,r),n&&l.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>l.off(e,r)),n&&n.split(` `).forEach(e=>l.store.off(e,r))}},[l,m]),D=(0,a.useRef)(),O=(0,a.useCallback)(()=>{if(!l)return y;let e=!!(l.isInitialized||l.initializedStoreOnce)&&w.every(e=>f(e,l,m)),n=t.lng||l.language,r=T.current,i=D.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===x&&i.revision===r)return i;let a={t:l.getFixedT(n,m.nsMode===`fallback`?w:w[0],x,{scopeNs:w}),ready:e,lng:n,keyPrefix:x,revision:r};return D.current=a,a},[l,w,x,m,t.lng]),[k,A]=(0,a.useState)(0),{t:j,ready:M}=(0,v.useSyncExternalStore)(E,O,O);(0,a.useEffect)(()=>{if(l&&!M&&!_){let e=()=>A(e=>e+1);t.lng?d(l,t.lng,w,e):u(l,w,e)}},[l,t.lng,w,M,_,k]);let N=l||{},P=(0,a.useRef)(null),F=(0,a.useRef)(),I=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,L=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},R=(0,a.useMemo)(()=>{let e=N,t=e&&I(e),n=e;e&&(P.current&&P.current.__original===e&&F.current===t?n=P.current:(n=L(e),P.current=n,F.current=t));let r=!M&&!_?(...e)=>(c(l,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),j(...e)):j,i=[r,n,M];return i.t=r,i.i18n=n,i.ready=M,i},[j,N,M,N.resolvedLanguage,N.language,N.languages]);if(l&&_&&!M){let e=!1;try{e=!1}catch{}throw e&&c(l,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?d(l,t.lng,w,n):u(l,w,n)})}return R};export{o as a,p as i,h as n,c as o,m as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t}from"./utils-vendor-
|
|
1
|
+
import{n as e,r as t}from"./utils-vendor-DISWt2y9.js";var n=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,r={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},i=e=>r[e],a=e=>e.replace(n,i),o={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:a,transDefaultProps:void 0},s=(e={})=>{o={...o,...e}},c=()=>o,l,u=e=>{l=e},d=()=>l;function f(...n){return e(t(n))}function p(){return typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform)}var m=new Map,h=new Map,g=e=>{let t=m.get(e);return t||(t=new Intl.RelativeTimeFormat(e,{numeric:`auto`,style:`narrow`}),m.set(e,t)),t},_=e=>{let t=h.get(e);return t||(t=new Intl.DateTimeFormat(e),h.set(e,t)),t};function v(e,t=`en`){let n=new Date(e),r=Math.max(0,new Date().getTime()-n.getTime()),i=Math.floor(r/6e4),a=Math.floor(r/36e5),o=Math.floor(r/864e5);if(t.toLowerCase().split(`-`)[0]===`en`)return i<1?`Just now`:i<60?`${i}m ago`:a<24?`${a}h ago`:o<7?`${o}d ago`:_(t).format(n);let s=g(t);return i<1?s.format(0,`second`):i<60?s.format(-i,`minute`):a<24?s.format(-a,`hour`):o<7?s.format(-o,`day`):_(t).format(n)}function y(e,t=`en`,n=Date.now()){let r=Math.round((e-n)/1e3),i=Math.abs(r),a=g(t);return i<60?a.format(r,`second`):i<3600?a.format(Math.round(r/60),`minute`):i<86400?a.format(Math.round(r/3600),`hour`):a.format(Math.round(r/86400),`day`)}function b(e){let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(1)} ${t[r]}`}function x(e=12){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let n=``;for(let e of t)n+=`0123456789abcdefghijklmnopqrstuvwxyz`[e%36];return n}function S(){return x(11)+Date.now().toString(36)}function C(e,t){return e.length<=t?e:e.substring(0,t)+`...`}function w(e){for(let t of[/^\[Thinking:\s*([\s\S]*?)\]\s*/i,/^<thinking>([\s\S]*?)<\/thinking>\s*/i,/^<think>([\s\S]*?)<\/think>\s*/i]){let n=e.match(t);if(n)return{thinking:n[1].trim(),content:e.slice(n[0].length).trim(),thinkingComplete:!0}}for(let[t,n]of[[/^\[Thinking:\s*/i,`]`],[/^<thinking>\s*/i,`</thinking>`],[/^<think>\s*/i,`</think>`]]){let r=e.match(t);if(r&&!e.toLowerCase().includes(n))return{thinking:e.slice(r[0].length).trim()||null,content:``,thinkingComplete:!1}}return{thinking:null,content:e,thinkingComplete:!0}}export{S as a,x as c,u as d,c as f,v as i,C as l,a as m,b as n,p as o,s as p,y as r,w as s,f as t,d as u};
|