texlite 0.19.0 → 0.19.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/DESIGN.md +127 -14
- package/OPERATIONS.md +47 -5
- package/README.md +4 -0
- package/README.zh-CN.md +3 -0
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js +1 -0
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js.br +0 -0
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js.gz +0 -0
- package/dist/client/assets/{AgentIcon-BlHvdrRo.js → AgentIcon-C97W4Mt-.js} +1 -1
- package/dist/client/assets/AgentIcon-C97W4Mt-.js.br +0 -0
- package/dist/client/assets/AgentIcon-C97W4Mt-.js.gz +0 -0
- package/dist/client/assets/{AgentIcon-DE7FEpRY.css → AgentIcon-DxrC-zx_.css} +1 -1
- package/dist/client/assets/AgentIcon-DxrC-zx_.css.br +0 -0
- package/dist/client/assets/AgentIcon-DxrC-zx_.css.gz +0 -0
- package/dist/client/assets/AgentManagement-D6I_GDL_.js +1 -0
- package/dist/client/assets/AgentManagement-D6I_GDL_.js.br +0 -0
- package/dist/client/assets/AgentManagement-D6I_GDL_.js.gz +0 -0
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js +2 -0
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js.br +0 -0
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js.gz +0 -0
- package/dist/client/assets/{AgentTerminalSurface-D0MLcJmw.js → AgentTerminalSurface-C11baRxh.js} +2 -2
- package/dist/client/assets/AgentTerminalSurface-C11baRxh.js.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-C11baRxh.js.gz +0 -0
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js +1 -0
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js.gz +0 -0
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js +1 -0
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js.gz +0 -0
- package/dist/client/assets/Dashboard-DAPwKNNH.js +5 -0
- package/dist/client/assets/Dashboard-DAPwKNNH.js.br +0 -0
- package/dist/client/assets/Dashboard-DAPwKNNH.js.gz +0 -0
- package/dist/client/assets/GitDialog-BzyA_IgU.js +3 -0
- package/dist/client/assets/GitDialog-BzyA_IgU.js.br +0 -0
- package/dist/client/assets/GitDialog-BzyA_IgU.js.gz +0 -0
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js +1 -0
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js.gz +0 -0
- package/dist/client/assets/{GitHubIcon-BPTVKTrM.js → GitHubIcon-BqDow-CN.js} +1 -1
- package/dist/client/assets/HistoryDialog-407q3Fe6.js +8 -0
- package/dist/client/assets/HistoryDialog-407q3Fe6.js.br +0 -0
- package/dist/client/assets/HistoryDialog-407q3Fe6.js.gz +0 -0
- package/dist/client/assets/{LatexEditor-BDpqgoOa.js → LatexEditor-BYiVPD_b.js} +26 -26
- package/dist/client/assets/LatexEditor-BYiVPD_b.js.br +0 -0
- package/dist/client/assets/LatexEditor-BYiVPD_b.js.gz +0 -0
- package/dist/client/assets/{PdfPreview-C2puKgCh.js → PdfPreview-Bbzop29j.js} +1 -1
- package/dist/client/assets/PdfPreview-Bbzop29j.js.br +0 -0
- package/dist/client/assets/PdfPreview-Bbzop29j.js.gz +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js +1 -0
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js +4 -0
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js.br +0 -0
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js +30 -0
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js.gz +0 -0
- package/dist/client/assets/{QuickOpenDialog-CEYxIk4l.js → QuickOpenDialog-DKq9iNJ5.js} +1 -1
- package/dist/client/assets/QuickOpenDialog-DKq9iNJ5.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-DKq9iNJ5.js.gz +0 -0
- package/dist/client/assets/SaveButton-C8W1DGzx.js +1 -0
- package/dist/client/assets/{SelectionHistoryDialog-DBL6vVD4.js → SelectionHistoryDialog-cDxbuXmO.js} +2 -2
- package/dist/client/assets/SelectionHistoryDialog-cDxbuXmO.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-cDxbuXmO.js.gz +0 -0
- package/dist/client/assets/SuccessNotice-ubBtzzi_.js +1 -0
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js +1 -0
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js.gz +0 -0
- package/dist/client/assets/TagColorSelect-D-zwdawC.js +1 -0
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js +1 -0
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js.gz +0 -0
- package/dist/client/assets/{WordCountDialog-DaHxqArj.js → WordCountDialog-C4okQWS3.js} +1 -1
- package/dist/client/assets/WordCountDialog-C4okQWS3.js.br +0 -0
- package/dist/client/assets/WordCountDialog-C4okQWS3.js.gz +0 -0
- package/dist/client/assets/{arrow-down-BySB1dS6.js → arrow-down-BiIGj4-X.js} +1 -1
- package/dist/client/assets/check-DfWHdQ1s.js +1 -0
- package/dist/client/assets/chevron-up-lyMKml7P.js +1 -0
- package/dist/client/assets/{chktex-B2-niLAo.js → chktex-Dm6IIkcR.js} +1 -1
- package/dist/client/assets/{circle-check-CfK-oqlC.js → circle-check-DjXwnxuR.js} +1 -1
- package/dist/client/assets/{clock-3-C_8q2yLj.js → clock-3-D-XeFtkK.js} +1 -1
- package/dist/client/assets/{dist-CIxSPQK5.js → dist-ByqeNQqT.js} +1 -1
- package/dist/client/assets/dist-ByqeNQqT.js.br +0 -0
- package/dist/client/assets/dist-ByqeNQqT.js.gz +0 -0
- package/dist/client/assets/{eye-DpIOhQ2p.js → eye-BvCLgqrq.js} +1 -1
- package/dist/client/assets/{hard-drive-DRbINIYf.js → hard-drive-Crh-l_oh.js} +1 -1
- package/dist/client/assets/i18n-O9QnEo2t.js +13 -0
- package/dist/client/assets/i18n-O9QnEo2t.js.br +0 -0
- package/dist/client/assets/i18n-O9QnEo2t.js.gz +0 -0
- package/dist/client/assets/index-7d5TfVNx.css +1 -0
- package/dist/client/assets/index-7d5TfVNx.css.br +0 -0
- package/dist/client/assets/index-7d5TfVNx.css.gz +0 -0
- package/dist/client/assets/index-DFEpXxLs.js +42 -0
- package/dist/client/assets/index-DFEpXxLs.js.br +0 -0
- package/dist/client/assets/index-DFEpXxLs.js.gz +0 -0
- package/dist/client/assets/{info-DB-RajXx.js → info-g1IBvVg6.js} +1 -1
- package/dist/client/assets/{minimize-2-DtsKyo4M.js → minimize-2-BHKmubQs.js} +1 -1
- package/dist/client/assets/{minus-CdwrG9Yo.js → minus-BmWzkFwz.js} +1 -1
- package/dist/client/assets/plus-CoYCCEFJ.js +1 -0
- package/dist/client/assets/{refresh-cw-c6Tzy-hb.js → refresh-cw-Di6Huxb4.js} +1 -1
- package/dist/client/assets/relativeTime-CFNodf1I.js +1 -0
- package/dist/client/assets/relativeTime-CFNodf1I.js.br +0 -0
- package/dist/client/assets/relativeTime-CFNodf1I.js.gz +0 -0
- package/dist/client/assets/{search-Cy8DgYGb.js → search-l36unLLS.js} +1 -1
- package/dist/client/assets/{spellCheck-DEQIFH7w.js → spellCheck-DiNvmZKv.js} +1 -1
- package/dist/client/assets/spellCheck-DiNvmZKv.js.br +0 -0
- package/dist/client/assets/spellCheck-DiNvmZKv.js.gz +0 -0
- package/dist/client/assets/tags-yjr9KRc8.js +1 -0
- package/dist/client/assets/{terminal-DaAc1558.js → terminal-P09ZGT83.js} +1 -1
- package/dist/client/assets/{type-Cm3TiSO6.js → type-C7rzXWVU.js} +1 -1
- package/dist/client/assets/{user-plus-BLC3_SFQ.js → user-plus-CqyV7OV4.js} +1 -1
- package/dist/client/index.html +3 -3
- package/dist/server/agents/adapters/claude.js +170 -9
- package/dist/server/agents/adapters/opencode.js +15 -3
- package/dist/server/agents/sessions.js +18 -8
- package/dist/server/collaboration.js +2 -1
- package/dist/server/db.js +5 -0
- package/dist/server/projects.js +2 -1
- package/dist/server/routes/projectShared.js +7 -1
- package/dist/server/routes/projects.js +15 -9
- package/dist/server/routes/users.js +7 -1
- package/dist/shared/projectCatalog.js +1 -0
- package/dist/shared/sourceCommentAnchors.js +52 -4
- package/dist/shared/userManagement.js +1 -0
- package/package.json +1 -1
- package/dist/client/assets/AdminUsers-DXWi8wl0.js +0 -1
- package/dist/client/assets/AdminUsers-DXWi8wl0.js.br +0 -0
- package/dist/client/assets/AdminUsers-DXWi8wl0.js.gz +0 -0
- package/dist/client/assets/AgentIcon-BlHvdrRo.js.br +0 -0
- package/dist/client/assets/AgentIcon-BlHvdrRo.js.gz +0 -0
- package/dist/client/assets/AgentIcon-DE7FEpRY.css.br +0 -0
- package/dist/client/assets/AgentIcon-DE7FEpRY.css.gz +0 -0
- package/dist/client/assets/AgentManagement-CDWaxEmP.js +0 -1
- package/dist/client/assets/AgentManagement-CDWaxEmP.js.br +0 -0
- package/dist/client/assets/AgentManagement-CDWaxEmP.js.gz +0 -0
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js +0 -2
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js.br +0 -0
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js.gz +0 -0
- package/dist/client/assets/AgentTerminalSurface-D0MLcJmw.js.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-D0MLcJmw.js.gz +0 -0
- package/dist/client/assets/AvatarSettingsDialog-CtbzavqH.js +0 -1
- package/dist/client/assets/AvatarSettingsDialog-CtbzavqH.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-CtbzavqH.js.gz +0 -0
- package/dist/client/assets/CitationLibraryDialog-CnQVjovw.js +0 -1
- package/dist/client/assets/CitationLibraryDialog-CnQVjovw.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-CnQVjovw.js.gz +0 -0
- package/dist/client/assets/Dashboard-Dzq1oMZU.js +0 -5
- package/dist/client/assets/Dashboard-Dzq1oMZU.js.br +0 -0
- package/dist/client/assets/Dashboard-Dzq1oMZU.js.gz +0 -0
- package/dist/client/assets/GitDialog-CzgguGGW.js +0 -3
- package/dist/client/assets/GitDialog-CzgguGGW.js.br +0 -0
- package/dist/client/assets/GitDialog-CzgguGGW.js.gz +0 -0
- package/dist/client/assets/GitHubAccountDialog-lRAWfkKP.js +0 -1
- package/dist/client/assets/GitHubAccountDialog-lRAWfkKP.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-lRAWfkKP.js.gz +0 -0
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js +0 -8
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js.br +0 -0
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js.gz +0 -0
- package/dist/client/assets/LatexEditor-BDpqgoOa.js.br +0 -0
- package/dist/client/assets/LatexEditor-BDpqgoOa.js.gz +0 -0
- package/dist/client/assets/PdfPreview-C2puKgCh.js.br +0 -0
- package/dist/client/assets/PdfPreview-C2puKgCh.js.gz +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-BzNdyAz6.js +0 -1
- package/dist/client/assets/ProjectIconPickerDialog-BzNdyAz6.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-BzNdyAz6.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js +0 -4
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js.br +0 -0
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js +0 -30
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js.gz +0 -0
- package/dist/client/assets/QuickOpenDialog-CEYxIk4l.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-CEYxIk4l.js.gz +0 -0
- package/dist/client/assets/SelectionHistoryDialog-DBL6vVD4.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-DBL6vVD4.js.gz +0 -0
- package/dist/client/assets/SuccessNotice-C8XV7MAJ.js +0 -1
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js +0 -1
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js.gz +0 -0
- package/dist/client/assets/TagColorSelect-CfJaFovr.js +0 -1
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js +0 -1
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js.gz +0 -0
- package/dist/client/assets/WordCountDialog-DaHxqArj.js.br +0 -0
- package/dist/client/assets/WordCountDialog-DaHxqArj.js.gz +0 -0
- package/dist/client/assets/binary-B57nBiwS.js +0 -1
- package/dist/client/assets/check-B-GEn6vk.js +0 -1
- package/dist/client/assets/chevron-up-B0yLKMZJ.js +0 -1
- package/dist/client/assets/dist-CIxSPQK5.js.br +0 -0
- package/dist/client/assets/dist-CIxSPQK5.js.gz +0 -0
- package/dist/client/assets/i18n-BzlyqR_B.js +0 -13
- package/dist/client/assets/i18n-BzlyqR_B.js.br +0 -0
- package/dist/client/assets/i18n-BzlyqR_B.js.gz +0 -0
- package/dist/client/assets/index-BHHBwQuG.css +0 -1
- package/dist/client/assets/index-BHHBwQuG.css.br +0 -0
- package/dist/client/assets/index-BHHBwQuG.css.gz +0 -0
- package/dist/client/assets/index-h0BVkT8k.js +0 -42
- package/dist/client/assets/index-h0BVkT8k.js.br +0 -0
- package/dist/client/assets/index-h0BVkT8k.js.gz +0 -0
- package/dist/client/assets/plus-PHvPlka_.js +0 -1
- package/dist/client/assets/relativeTime-Cf5dzFc9.js +0 -1
- package/dist/client/assets/relativeTime-Cf5dzFc9.js.br +0 -0
- package/dist/client/assets/relativeTime-Cf5dzFc9.js.gz +0 -0
- package/dist/client/assets/spellCheck-DEQIFH7w.js.br +0 -0
- package/dist/client/assets/spellCheck-DEQIFH7w.js.gz +0 -0
- package/dist/client/assets/tags-BQ0exG-g.js +0 -1
- package/dist/client/assets/terminalPreferences-CgacIg2F.js +0 -1
- package/dist/client/assets/terminalPreferences-CgacIg2F.js.br +0 -0
- package/dist/client/assets/terminalPreferences-CgacIg2F.js.gz +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PdfPreview-C2puKgCh.js","./rolldown-runtime-XKyaHtl9.js","./react-DUEFWlB7.js","./basePath-B5-c90eh.js","./minus-CdwrG9Yo.js","./plus-PHvPlka_.js","./refresh-cw-c6Tzy-hb.js","./pdf-DNPdInaJ.js","./vite-runtime-CRzLMJPS.js","./pdf-viewer-D6ryBmMb.js","./pdf-viewer-3Ft6T6NK.css","./ProjectWorkspace-BnT5JPTA.js","./i18nInstance-CIMFwH0l.js","./i18n-BzlyqR_B.js","./arrow-down-BySB1dS6.js","./relativeTime-Cf5dzFc9.js","./check-B-GEn6vk.js","./chevron-up-B0yLKMZJ.js","./circle-check-CfK-oqlC.js","./user-plus-BLC3_SFQ.js","./dist-CIxSPQK5.js","./binary-B57nBiwS.js","./Dashboard-Dzq1oMZU.js","./GitHubIcon-BPTVKTrM.js","./hard-drive-DRbINIYf.js","./terminal-DaAc1558.js","./tags-BQ0exG-g.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{i as n,n as r,r as i,t as a}from"./react-DUEFWlB7.js";import{r as o,s,t as c}from"./i18nInstance-CIMFwH0l.js";import{n as l,t as u}from"./i18n-BzlyqR_B.js";import{i as d,n as f,r as p,t as m}from"./basePath-B5-c90eh.js";import{t as h}from"./vite-runtime-CRzLMJPS.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var g=(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);C(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_={},v=(e,t,n,r)=>{C(n)&&_[n]||(C(n)&&(_[n]=new Date),g(e,t,n,r))},y=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},b=(e,t,n)=>{e.loadNamespaces(t,y(e,n))},x=(e,t,n,r)=>{if(C(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return b(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,y(e,r))},S=(e,t,n={})=>!t.languages||!t.languages.length?(v(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}}),C=e=>typeof e==`string`,w=e=>typeof e==`object`&&!!e,T=e(n()),ee=(0,T.createContext)(),te=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},ne=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})),re=t(((e,t)=>{t.exports=ne()}))(),ie={t:(e,t)=>{if(C(t))return t;if(w(t)&&C(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},ae=()=>()=>{},E=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,T.useContext)(ee)||{},a=n||r||c();a&&!a.reportNamespaces&&(a.reportNamespaces=new te),a||v(a,`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 l=(0,T.useMemo)(()=>({...o(),...a?.options?.react,...t}),[a,t]),{useSuspense:u,keyPrefix:d,bindI18n:f,bindI18nStore:p}=l,m=e||i||a?.options?.defaultNS,h=C(m)?[m]:m||[`translation`],g=(0,T.useMemo)(()=>h,h);a?.reportNamespaces?.addUsedNamespaces?.(g);let _=(0,T.useRef)(0),y=(0,T.useCallback)(e=>{if(!a)return ae;let t=()=>{_.current+=1,e()};return f&&a.on(f,t),p&&a.store.on(p,t),()=>{f&&f.split(` `).forEach(e=>a.off(e,t)),p&&p.split(` `).forEach(e=>a.store.off(e,t))}},[a,f,p]),w=(0,T.useRef)(),ne=(0,T.useCallback)(()=>{if(!a)return ie;let e=!!(a.isInitialized||a.initializedStoreOnce)&&g.every(e=>S(e,a,l)),n=t.lng||a.language,r=_.current,i=typeof d==`function`?s(d,{...a.options,ns:g}):d,o=w.current;if(o&&o.i18n===a&&o.ready===e&&o.lng===n&&o.namespaces===g&&o.keyPrefix===i&&o.revision===r)return o;let c={t:a.getFixedT(n,l.nsMode===`fallback`?g:g[0],d,{scopeNs:g}),i18n:a,ready:e,lng:n,namespaces:g,keyPrefix:i,revision:r};return w.current=c,c},[a,g,d,l,t.lng]),[E,oe]=(0,T.useState)(0),{t:D,ready:O}=(0,re.useSyncExternalStore)(y,ne,ne),se;a&&u&&!O&&(se=new Promise(e=>{let n=()=>e();t.lng?x(a,t.lng,g,n):b(a,g,n)}),{t:D,ready:O}=ne()),(0,T.useEffect)(()=>{if(a&&!O&&!u){let e=()=>oe(e=>e+1);t.lng?x(a,t.lng,g,e):b(a,g,e)}},[a,t.lng,g,O,u,E]);let k=a||{},A=(0,T.useRef)(null),ce=(0,T.useRef)(),le=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,ue=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},de=(0,T.useMemo)(()=>{let e=k,t=e&&le(e),n=e;e&&(A.current&&A.current.__original===e&&ce.current===t?n=A.current:(n=ue(e),A.current=n,ce.current=t));let r=!O&&!u?(...e)=>(v(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),D(...e)):D,i=[r,n,O];return i.t=r,i.i18n=n,i.ready=O,i},[D,k,O,k.resolvedLanguage,k.language,k.languages]);if(a&&u&&!O){let e=!1;try{e=!1}catch{}throw e&&v(a,`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`),se}return de},oe=r(),D=class extends Error{status;code;constructor(e,t,n=null){super(e),this.status=t,this.code=n}};function O(e){return e instanceof Error&&e.name===`AbortError`}function se(e){return O(e)||e instanceof D?e:new D(u.t(`network.requestFailed`),0,`NETWORK_ERROR`)}function k(e){return typeof FormData<`u`&&e instanceof FormData}async function A(e,t={}){let{suppressSessionExpired:n=!1,...r}=t,i=new Headers(r.headers);i.has(`Accept-Language`)||i.set(`Accept-Language`,l(u.resolvedLanguage)),r.body&&!k(r.body)&&!i.has(`Content-Type`)&&i.set(`Content-Type`,`application/json`);let a;try{a=await fetch(m(e),{...r,headers:i})}catch(e){throw se(e)}let o=a.headers.get(`content-type`)??``,s=null;if(o.includes(`application/json`))try{s=await a.json()}catch(e){throw O(e)?e:new D(u.t(`network.invalidResponse`),a.status,`INVALID_RESPONSE`)}else if(a.ok)throw new D(u.t(`network.invalidResponse`),a.status,`INVALID_RESPONSE`);if(!a.ok)throw a.status===401&&!n&&typeof window<`u`&&window.dispatchEvent(new Event(`texlite:session-expired`)),new D(le(s,a.status),a.status,ue(s));return s}function ce(e,t,n={}){return new Promise((r,i)=>{let a=new XMLHttpRequest,o=n.signal,s=()=>o?.removeEventListener(`abort`,c),c=()=>a.abort();o?.aborted?i(o.reason instanceof Error?o.reason:new DOMException(`The operation was aborted`,`AbortError`)):(a.open(`POST`,m(e),!0),a.withCredentials=!0,a.setRequestHeader(`Accept-Language`,l(u.resolvedLanguage)),a.upload.addEventListener(`progress`,e=>{n.onProgress?.(e.loaded,e.lengthComputable?e.total:null)}),a.upload.addEventListener(`load`,()=>n.onUploadComplete?.()),a.addEventListener(`load`,()=>{s();let e=a.getResponseHeader(`content-type`)??``,t=null;if(e.includes(`application/json`))try{t=JSON.parse(a.responseText)}catch{i(new D(u.t(`network.invalidResponse`),a.status,`INVALID_RESPONSE`));return}else if(a.status>=200&&a.status<300){i(new D(u.t(`network.invalidResponse`),a.status,`INVALID_RESPONSE`));return}a.status<200||a.status>=300?(a.status===401&&typeof window<`u`&&window.dispatchEvent(new Event(`texlite:session-expired`)),i(new D(le(t,a.status),a.status,ue(t)))):r(t)}),a.addEventListener(`error`,()=>{s(),i(se(Error(`Upload failed`)))}),a.addEventListener(`abort`,()=>{s(),i(o?.reason instanceof Error?o.reason:new DOMException(`The operation was aborted`,`AbortError`))}),o?.addEventListener(`abort`,c,{once:!0}),a.send(t))})}function le(e,t,n=`errors.request`){let r=typeof e==`object`&&e&&`error`in e&&typeof e.error==`string`?e.error:``,i=ue(e);if(i){let n={AUTH_REQUIRED:`auth.sessionExpired`,ADMIN_REQUIRED:`users.adminRequired`,HISTORY_VERSION_NOT_FOUND:`apiErrors.historyVersionNotFound`,HISTORY_FILE_NOT_FOUND:`apiErrors.historyFileNotFound`,HISTORY_OBJECT_MISSING:`apiErrors.historyObjectMissing`,HISTORY_TARGET_CONFLICT:`apiErrors.historyTargetConflict`,HISTORY_FILE_PREVIEW_UNSUPPORTED:`apiErrors.historyPreviewUnsupported`,GIT_UNAVAILABLE:`apiErrors.gitUnavailable`,FORMAT_FAILED:`apiErrors.formatFailed`,PROJECT_TRANSFER_FORBIDDEN:`projects.transferForbidden`,PROJECT_TRANSFER_TARGET_INVALID:`projects.transferTargetInvalid`,PROJECT_TRANSFER_SELF:`projects.transferSelf`,MAIN_DOCUMENT_INVALID:`apiErrors.mainDocumentInvalid`,COMPILE_SNAPSHOT_BUSY:`apiErrors.compileSnapshotBusy`,COMPILE_CLEAN_BUSY:`editor.cleanBusy`,CITATION_INVALID:`citationErrors.invalid`,CITATION_TOO_LARGE:`citationErrors.tooLarge`,CITATION_NOT_FOUND:`citationErrors.notFound`,CITATION_KEY_EXISTS:`citationErrors.keyExists`,CITATION_TAG_NOT_FOUND:`citationErrors.tagNotFound`,CITATION_CONFLICT:`citationErrors.conflict`,WORD_COUNT_FAILED:`editor.wordCountFailed`,WORD_COUNT_SOURCE_INVALID:`editor.wordCountSourceInvalid`,WORD_COUNT_SOURCE_TOO_LARGE:`editor.wordCountSourceTooLarge`,WORD_COUNT_UNAVAILABLE:`editor.wordCountUnavailable`,CHK_TEX_UNAVAILABLE:`chktex.unavailable`}[i]??`errors.codes.${i}`;if(u.exists(n))return u.t(n,{status:t,...typeof e==`object`&&e?e:{}})}return r||u.t(n,{status:t})}function ue(e){return typeof e!=`object`||!e||!(`code`in e)||typeof e.code!=`string`?null:e.code}var de=/^\/projects?\/([^/]+)\/?$/;function j(e,t,n=f()){let r=m(`/project/${encodeURIComponent(e)}`,n);return t?`${r}?${new URLSearchParams({mention:t}).toString()}`:r}function fe(e){let t=new URLSearchParams(e).get(`mention`);return t&&t.length<=128?t:null}function M(e,t=f()){let n=d(e,t),r=n?de.exec(n):null;if(!r)return null;try{let e=decodeURIComponent(r[1]);return e&&!e.includes(`/`)?e:null}catch{return null}}function pe(e,t,n=f()){let r=new URLSearchParams({return:j(e,t,n)});return m(`/`,n)+`?`+r.toString()}function me(e){let t=new URLSearchParams(e).get(`return`);if(!t||!t.startsWith(`/`)||t.startsWith(`//`))return null;try{return new URL(t,`https://texlite.invalid`)}catch{return null}}function he(e,t=f()){let n=me(e);return n?M(n.pathname,t):null}function ge(e,t=f()){let n=me(e);return n&&M(n.pathname,t)?fe(n.search):null}function _e(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.texliteRoute===`project`&&typeof t.projectId==`string`&&typeof t.fromDashboard==`boolean`}var ve=()=>h(()=>import(`./PdfPreview-C2puKgCh.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),ye=()=>h(()=>import(`./ProjectWorkspace-BnT5JPTA.js`).then(e=>e.t),__vite__mapDeps([11,1,2,12,13,3,8,14,15,16,17,18,6,19,20,21]),import.meta.url),be=new Map,xe=2e3;function Se(e,t={}){let n=Date.now(),r=be.get(e);if(!t.force&&r&&n-r.createdAt<xe)return r.preload;let i=A(`/api/projects/${e}`,{suppressSessionExpired:!0}),a=A(`/api/projects/${e}/compile/latest`,{suppressSessionExpired:!0}),o=ve(),s={projectId:e,project:i,latestCompile:a};return be.set(e,{preload:s,createdAt:n}),i.catch(()=>void 0),Promise.all([o,a]).then(([e,t])=>{t.pdfUrl&&e.preloadPdf(t.pdfUrl,t.pdfLoadingMode??`full`)}).catch(()=>void 0),window.setTimeout(()=>{be.get(e)?.preload===s&&be.delete(e)},xe),s}function Ce(e){return e instanceof Error?e.message:u.t(`errors.generic`)}var N=a();function we(){let{i18n:e,t}=E(),n=l(e.resolvedLanguage);return(0,N.jsxs)(`label`,{className:`language-switcher`,title:t(`common.language`),children:[(0,N.jsx)(`span`,{children:`文/A`}),(0,N.jsxs)(`select`,{value:n,"aria-label":t(`common.language`),onChange:t=>void e.changeLanguage(t.target.value),children:[(0,N.jsx)(`option`,{value:`en`,children:t(`common.languageEnglish`)}),(0,N.jsx)(`option`,{value:`zh`,children:t(`common.languageChinese`)}),(0,N.jsx)(`option`,{value:`zh-Hant`,children:t(`common.languageTraditionalChinese`)})]})]})}var Te=`0.19.0`;function Ee({siteName:e,compact:t=!1,auth:n=!1}){return(0,N.jsx)(`span`,{className:`site-logo${t?` compact`:``}${n?` auth-logo`:``}`,children:(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 64 64`,role:`img`,"aria-label":e,children:[(0,N.jsx)(`rect`,{width:`64`,height:`64`,rx:`15`,fill:`#E9F5EE`}),(0,N.jsxs)(`g`,{fill:`none`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,N.jsx)(`path`,{stroke:`#133D2B`,d:`M13.5 16.5H31.5M22.5 16.5V41.5`}),(0,N.jsx)(`path`,{stroke:`#1B8A57`,d:`M42.5 23.5V48.5M42.5 23.5H50.5M42.5 36H48.5M42.5 48.5H50.5`})]})]})})}function De(){let{t:e}=E();return(0,N.jsxs)(`footer`,{className:`site-footer`,children:[(0,N.jsx)(`span`,{className:`site-footer-tagline`,children:e(`footer.tagline`)}),(0,N.jsxs)(`span`,{children:[e(`footer.copyright`,{year:new Date().getFullYear()}),` `,(0,N.jsxs)(`a`,{href:`https://github.com/SWUFE-DB-Group/TexLite`,target:`_blank`,rel:`noreferrer`,children:[`TexLite v`,Te]})]})]})}function Oe({site:e,user:t,onChanged:n}){let{t:r}=E(),[i,a]=(0,T.useState)(``),[o,s]=(0,T.useState)(``),[c,l]=(0,T.useState)(``),[u,d]=(0,T.useState)(``);return(0,N.jsxs)(`main`,{className:`login-page`,children:[(0,N.jsx)(we,{}),(0,N.jsxs)(`form`,{className:`login-card`,onSubmit:async a=>{if(a.preventDefault(),o!==c)return d(r(`auth.mismatch`));if(o.length<e.minPasswordLength)return d(r(`auth.passwordMinimum`,{count:e.minPasswordLength}));try{await A(`/api/me/password`,{method:`PUT`,body:JSON.stringify({currentPassword:i,newPassword:o})}),n({...t,mustChangePassword:!1})}catch(e){d(Ce(e))}},children:[(0,N.jsx)(Ee,{siteName:e.siteName,auth:!0}),(0,N.jsx)(`h1`,{className:`sr-only`,children:e.siteName}),(0,N.jsx)(`p`,{className:`muted`,children:r(`auth.firstLogin`)}),(0,N.jsxs)(`label`,{children:[r(`auth.currentPassword`),(0,N.jsx)(`input`,{type:`password`,value:i,onChange:e=>a(e.target.value)})]}),(0,N.jsxs)(`label`,{children:[r(`auth.newPassword`),(0,N.jsx)(`input`,{type:`password`,minLength:e.minPasswordLength,autoComplete:`new-password`,value:o,onChange:e=>s(e.target.value)}),(0,N.jsx)(`small`,{className:`field-hint`,children:r(`auth.passwordMinimum`,{count:e.minPasswordLength})})]}),(0,N.jsxs)(`label`,{children:[r(`auth.confirmPassword`),(0,N.jsx)(`input`,{type:`password`,minLength:e.minPasswordLength,autoComplete:`new-password`,value:c,onChange:e=>l(e.target.value)})]}),u&&(0,N.jsx)(`p`,{className:`error`,children:u}),(0,N.jsx)(`button`,{className:`primary`,children:r(`auth.updatePassword`)})]}),(0,N.jsx)(De,{})]})}function ke({site:e,onLogin:t}){let{t:n}=E(),[r,i]=(0,T.useState)(``),[a,o]=(0,T.useState)(``),[s,c]=(0,T.useState)(``);return(0,N.jsxs)(`main`,{className:`login-page`,children:[(0,N.jsx)(we,{}),(0,N.jsxs)(`form`,{className:`login-card`,onSubmit:async e=>{e.preventDefault(),c(``);try{t((await A(`/api/auth/login`,{method:`POST`,body:JSON.stringify({username:r,password:a}),suppressSessionExpired:!0})).user)}catch(e){c(Ce(e))}},children:[(0,N.jsx)(Ee,{siteName:e.siteName,auth:!0}),(0,N.jsx)(`h1`,{className:`sr-only`,children:e.siteName}),(0,N.jsx)(`p`,{className:`muted`,children:n(`auth.tagline`)}),(0,N.jsxs)(`label`,{children:[n(`auth.username`),(0,N.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value)})]}),(0,N.jsxs)(`label`,{children:[n(`auth.password`),(0,N.jsx)(`input`,{type:`password`,value:a,onChange:e=>o(e.target.value)})]}),s&&(0,N.jsx)(`p`,{className:`error`,children:s}),(0,N.jsx)(`button`,{className:`primary`,type:`submit`,children:n(`auth.login`)}),e.adminEmail&&(0,N.jsx)(`small`,{className:`support`,children:n(`auth.contact`,{email:e.adminEmail})})]}),(0,N.jsx)(De,{})]})}var Ae=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function je(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ae(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Me=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ne=e=>{let t=Me(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pe=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),P={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 Fe(e){return e!=null}function Ie(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??P.width,a=e.size??e.height??P.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?Pe(...c):Pe(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??P[`stroke-width`])*Number(e.size??e.width??P.width)/Number(t.size??t.width??P.width):t.strokeWidth??P[`stroke-width`];return[`svg`,{...Object.entries(P).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Fe(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Fe(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Fe(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 Le(e,t={}){return Ie(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Re=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ze=(0,T.createContext)({}),Be=()=>(0,T.useContext)(ze),Ve=(0,T.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Be()??{},y=!!c||Re(d),[b,x,S=[]]=Le(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Pe(v,s),hasA11yProp:y,attributes:d});return(0,T.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,T.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function He(e,t=[],n=[]){let r=typeof e==`string`?je(e,t,n):e,i=(0,T.forwardRef)(({className:e,...t},n)=>(0,T.createElement)(Ve,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ne(r.name)),i}var Ue={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Ue.node;var We=He(Ue),Ge=Object.defineProperty,F=(e,t)=>Ge(e,`name`,{value:t,configurable:!0}),Ke=!!(typeof window<`u`&&window.document&&window.document.createElement);function I(e,t,{checkForDefaultPrevented:n=!0}={}){return F(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}F(I,`composeEventHandlers`);function qe(e){if(!Ke)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}F(qe,`getOwnerWindow`);function Je(e){if(!Ke)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}F(Je,`getOwnerDocument`);function Ye(e,t=!1){let{activeElement:n}=Je(e);if(!n?.nodeName)return null;if(Xe(n)&&n.contentDocument)return Ye(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Je(n).getElementById(e);if(t)return t}}return n}F(Ye,`getActiveElement`);function Xe(e){return e.tagName===`IFRAME`}F(Xe,`isFrame`);var Ze=Object.defineProperty,Qe=(e,t)=>Ze(e,`name`,{value:t,configurable:!0});function $e(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Qe($e,`setRef`);function et(...e){return t=>{let n=!1,r=e.map(e=>{let r=$e(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():$e(e[t],null)}}}}Qe(et,`composeRefs`);function L(...e){return T.useCallback(et(...e),e)}Qe(L,`useComposedRefs`);var tt=Object.defineProperty,R=(e,t)=>tt(e,`name`,{value:t,configurable:!0});function nt(e,t){let n=T.createContext(t);n.displayName=e+`Context`;let r=R(e=>{let{children:t,...r}=e,i=T.useMemo(()=>r,Object.values(r));return(0,N.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=T.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return R(i,`useContext`),[r,i]}R(nt,`createContext`);function rt(e,t=[]){let n=[];function r(t,r){let i=T.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=R(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=T.useMemo(()=>o,Object.values(o));return(0,N.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=T.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return R(s,`useContext`),[o,s]}R(r,`createContext`);let i=R(()=>{let t=n.map(e=>T.createContext(e));return R(function(n){let r=n?.[e]||t;return T.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,it(i,...t)]}R(rt,`createContextScope`);function it(...e){let t=e[0];if(e.length===1)return t;let n=R(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return R(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}R(it,`composeContextScopes`);var z=globalThis?.document?T.useLayoutEffect:()=>{},at=Object.defineProperty,ot=(e,t)=>at(e,`name`,{value:t,configurable:!0}),st=T.useId||(()=>void 0),ct=0;function lt(e){let[t,n]=T.useState(st());return z(()=>{e||n(e=>e??String(ct++))},[e]),e||(t?`radix-${t}`:``)}ot(lt,`useId`);var ut=Object.defineProperty,dt=(e,t)=>ut(e,`name`,{value:t,configurable:!0}),ft=T.useEffectEvent,pt=T.useInsertionEffect;function mt(e){if(typeof ft==`function`)return ft(e);let t=T.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof pt==`function`?pt(()=>{t.current=e}):z(()=>{t.current=e}),T.useMemo(()=>((...e)=>t.current?.(...e)),[])}dt(mt,`useEffectEvent`);var ht=Object.defineProperty,gt=(e,t)=>ht(e,`name`,{value:t,configurable:!0}),_t=T.useInsertionEffect||z;function vt({prop:e,defaultProp:t,onChange:n=gt(()=>{},`onChange`),caller:r}){let[i,a,o]=yt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,T.useCallback(t=>{if(s){let n=bt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}gt(vt,`useControllableState`);function yt({defaultProp:e,onChange:t}){let[n,r]=T.useState(e),i=T.useRef(n),a=T.useRef(t);return _t(()=>{a.current=t},[t]),T.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}gt(yt,`useUncontrolledState`);function bt(e){return typeof e==`function`}gt(bt,`isFunction`);var xt=Symbol(`RADIX:SYNC_STATE`);function St(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=mt(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=T.useReducer((t,n)=>{if(n.type===xt)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=T.useRef(p);T.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=T.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return T.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:xt,state:i})},[i,d.state,c]),[h,f]}gt(St,`useControllableStateReducer`);var Ct=e(i(),1),wt=Object.defineProperty,B=(e,t)=>wt(e,`name`,{value:t,configurable:!0});function Tt(e){let t=T.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Nt(r)&&typeof Lt==`function`&&(r=Lt(r._payload)),T.Children.forEach(r,e=>{if(jt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Nt(n)&&typeof Lt==`function`&&(n=Lt(n._payload)),a=Ot(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=T.cloneElement(a,void 0,s):!o&&T.Children.count(r)===1&&T.isValidElement(r)&&(a=r);let c=a?At(a):void 0,l=L(n,c);if(!a){if(r||r===0)throw Error(o?It(e):Ft(e));return r}let u=kt(i,a.props??{});return a.type!==T.Fragment&&(u.ref=n?l:c),T.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}B(Tt,`createSlot`);var Et=Symbol.for(`radix.slottable`);function Dt(e){let t=B(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Et,t}B(Dt,`createSlottable`);var Ot=B((e,t)=>{if(`child`in e.props){let t=e.props.child;return T.isValidElement(t)?T.cloneElement(t,void 0,e.props.children(t.props.children)):null}return T.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function kt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}B(kt,`mergeProps`);function At(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}B(At,`getElementRef`);function jt(e){return T.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Et}B(jt,`isSlottable`);var Mt=Symbol.for(`react.lazy`);function Nt(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Mt&&`_payload`in e&&Pt(e._payload)}B(Nt,`isLazyComponent`);function Pt(e){return typeof e==`object`&&!!e&&`then`in e}B(Pt,`isPromiseLike`);var Ft=B(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),It=B(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Lt=T.use,Rt=Object.defineProperty,zt=(e,t)=>Rt(e,`name`,{value:t,configurable:!0}),V=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Tt(`Primitive.${t}`),r=T.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,N.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bt(e,t){e&&Ct.flushSync(()=>e.dispatchEvent(t))}zt(Bt,`dispatchDiscreteCustomEvent`);var Vt=Object.defineProperty,Ht=(e,t)=>Vt(e,`name`,{value:t,configurable:!0});function H(e){let t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ht(H,`useCallbackRef`);var Ut=Object.defineProperty,U=(e,t)=>Ut(e,`name`,{value:t,configurable:!0}),Wt=`dismissableLayer.update`,Gt=`dismissableLayer.pointerDownOutside`,Kt=`dismissableLayer.focusOutside`,qt,Jt=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Yt=T.forwardRef(U(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=T.useContext(Jt),[d,f]=T.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=T.useState({}),h=L(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=T.useRef(!1),C=Qt(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:T.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=$t(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),ee=d?y===g.length-1:!1,te=H(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return T.useEffect(()=>{if(ee)return p.addEventListener(`keydown`,te,{capture:!0}),()=>p.removeEventListener(`keydown`,te,{capture:!0})},[p,ee,te]),T.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qt=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),en(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=qt))}},[d,p,n,u]),T.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),en())},[d,u]),T.useEffect(()=>{let e=U(()=>m({}),`handleUpdate`);return document.addEventListener(Wt,e),()=>document.removeEventListener(Wt,e)},[]),(0,N.jsx)(V.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:I(e.onFocusCapture,w.onFocusCapture),onBlurCapture:I(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Xt(){let e=T.useContext(Jt),[t,n]=T.useState(null);return T.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}U(Xt,`useDismissableLayerSurface`);var Zt=U(()=>!0,`IS_TRUE`);function Qt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Zt}=t,s=H(e),c=T.useRef(!1),l=T.useRef(!1),u=T.useRef(new Map),d=T.useRef(()=>{});return T.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}U(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}U(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}U(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}U(p,`handleInteractionBubble`);let m=U(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||tn(Gt,s,p,{discrete:!0})};if(U(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:U(()=>c.current=!0,`onPointerDownCapture`)}}U(Qt,`usePointerDownOutside`);function $t(e,t=globalThis?.document){let n=H(e),r=T.useRef(!1);return T.useEffect(()=>{let e=U(e=>{e.target&&!r.current&&tn(Kt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:U(()=>r.current=!0,`onFocusCapture`),onBlurCapture:U(()=>r.current=!1,`onBlurCapture`)}}U($t,`useFocusOutside`);function en(){let e=new CustomEvent(Wt);document.dispatchEvent(e)}U(en,`dispatchUpdate`);function tn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Bt(i,a):i.dispatchEvent(a)}U(tn,`handleAndDispatchCustomEvent`);var nn=Object.defineProperty,W=(e,t)=>nn(e,`name`,{value:t,configurable:!0}),rn=`focusScope.autoFocusOnMount`,an=`focusScope.autoFocusOnUnmount`,on={bubbles:!1,cancelable:!0},sn=T.forwardRef(W(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=T.useState(null),l=H(i),u=H(a),d=T.useRef(null),f=L(t,c),p=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:G(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||G(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&G(s)};W(e,`handleFocusIn`),W(t,`handleFocusOut`),W(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),T.useEffect(()=>{if(s){mn.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(rn,on);s.addEventListener(rn,l),s.dispatchEvent(t),t.defaultPrevented||(cn(_n(un(s)),{select:!0}),document.activeElement===e&&G(s))}return()=>{s.removeEventListener(rn,l),setTimeout(()=>{let t=new CustomEvent(an,on);s.addEventListener(an,u),s.dispatchEvent(t),t.defaultPrevented||G(e??document.body,{select:!0}),s.removeEventListener(an,u),mn.remove(p)},0)}}},[s,l,u,p]);let m=T.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ln(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&G(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&G(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,N.jsx)(V.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function cn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(G(r,{select:t}),document.activeElement!==n)return}W(cn,`focusFirst`);function ln(e){let t=un(e);return[dn(t,e),dn(t.reverse(),e)]}W(ln,`getTabbableEdges`);function un(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:W(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}W(un,`getTabbableCandidates`);function dn(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):fn(r,{upTo:t})))return r}W(dn,`findVisible`);function fn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}W(fn,`isHidden`);function pn(e){return e instanceof HTMLInputElement&&`select`in e}W(pn,`isSelectableInput`);function G(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pn(e)&&t&&e.select()}}W(G,`focus`);var mn=hn();function hn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gn(e,t),e.unshift(t)},remove(t){e=gn(e,t),e[0]?.resume()}}}W(hn,`createFocusScopesStack`);function gn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}W(gn,`arrayRemove`);function _n(e){return e.filter(e=>e.tagName!==`A`)}W(_n,`removeLinks`);var vn=Object.defineProperty,yn=T.forwardRef(((e,t)=>vn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=T.useState(!1);z(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Ct.createPortal((0,N.jsx)(V.div,{...r,ref:t}),o):null},`Portal`)),bn=Object.defineProperty,K=(e,t)=>bn(e,`name`,{value:t,configurable:!0});function xn(e,t){return T.useReducer((e,n)=>t[e][n]??e,e)}K(xn,`useStateMachine`);var Sn=K(e=>{let{present:t,children:n}=e,r=Cn(t),i=typeof n==`function`?n({present:r.isPresent}):T.Children.only(n),a=Tn(r.ref,En(i));return typeof n==`function`||r.isPresent?T.cloneElement(i,{ref:a}):null},`Presence`);function Cn(e){let[t,n]=T.useState(),r=T.useRef(null),i=T.useRef(e),a=T.useRef(`none`),o=T.useRef(void 0),[s,c]=xn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return T.useEffect(()=>{s===`mounted`?(a.current=o.current??q(r.current),o.current=void 0):a.current=`none`},[s]),z(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=q(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),z(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=K(a=>{let o=q(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=K(e=>{e.target===t&&(a.current=q(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:T.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=q(t)}else r.current=null;n(e)},[])}}K(Cn,`usePresence`);function wn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}K(wn,`setRef`);function Tn(...e){let t=T.useRef(e);return t.current=e,T.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=wn(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():wn(n[e],null)}}},[])}K(Tn,`useStableComposedRefs`);function q(e){return e?.animationName||`none`}K(q,`getAnimationName`);function En(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}K(En,`getElementRef`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0}),kn=0,An=null;function jn(e){return Mn(),e.children}On(jn,`FocusGuards`);function Mn(){T.useEffect(()=>{An||={start:Nn(),end:Nn()};let{start:e,end:t}=An;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),kn++,()=>{kn===1&&(An?.start.remove(),An?.end.remove(),An=null),kn=Math.max(0,kn-1)}},[])}On(Mn,`useFocusGuards`);function Nn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}On(Nn,`createFocusGuard`);var J=function(){return J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},J.apply(this,arguments)};function Pn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Fn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var In=`right-scroll-bar-position`,Ln=`width-before-scroll-bar`,Rn=`with-scroll-bars-hidden`,zn=`--removed-body-scroll-bar-size`;function Bn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Vn(e,t){var n=(0,T.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Hn=typeof window<`u`?T.useLayoutEffect:T.useEffect,Un=new WeakMap;function Wn(e,t){var n=Vn(t||null,function(t){return e.forEach(function(e){return Bn(e,t)})});return Hn(function(){var t=Un.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Bn(e,null)}),i.forEach(function(e){r.has(e)||Bn(e,a)})}Un.set(n,e)},[e]),n}function Gn(e){return e}function Kn(e,t){t===void 0&&(t=Gn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function qn(e){e===void 0&&(e={});var t=Kn(null);return t.options=J({async:!0,ssr:!1},e),t}var Jn=function(e){var t=e.sideCar,n=Pn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return T.createElement(r,J({},n))};Jn.isSideCarExport=!0;function Yn(e,t){return e.useMedium(t),Jn}var Xn=qn(),Zn=function(){},Qn=T.forwardRef(function(e,t){var n=T.useRef(null),r=T.useState({onScrollCapture:Zn,onWheelCapture:Zn,onTouchMoveCapture:Zn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Pn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Wn([n,t]),C=J(J({},b),i);return T.createElement(T.Fragment,null,u&&T.createElement(x,{sideCar:Xn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?T.cloneElement(T.Children.only(s),J(J({},C),{ref:S})):T.createElement(v,J({},C,{className:c,ref:S}),s))});Qn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qn.classNames={fullWidth:Ln,zeroRight:In};var $n=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function er(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=$n();return t&&e.setAttribute(`nonce`,t),e}function tr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var rr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=er())&&(tr(t,n),nr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ir=function(){var e=rr();return function(t,n){T.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ar=function(){var e=ir();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},or={left:0,top:0,right:0,gap:0},sr=function(e){return parseInt(e||``,10)||0},cr=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[sr(n),sr(r),sr(i)]},lr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return or;var t=cr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ur=ar(),dr=`data-scroll-locked`,fr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
|
-
.${Rn} {
|
|
4
|
-
overflow: hidden ${r};
|
|
5
|
-
padding-right: ${s}px ${r};
|
|
6
|
-
}
|
|
7
|
-
body[${dr}] {
|
|
8
|
-
overflow: hidden ${r};
|
|
9
|
-
overscroll-behavior: contain;
|
|
10
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
11
|
-
padding-left: ${i}px;
|
|
12
|
-
padding-top: ${a}px;
|
|
13
|
-
padding-right: ${o}px;
|
|
14
|
-
margin-left:0;
|
|
15
|
-
margin-top:0;
|
|
16
|
-
margin-right: ${s}px ${r};
|
|
17
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.${In} {
|
|
21
|
-
right: ${s}px ${r};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.${Ln} {
|
|
25
|
-
margin-right: ${s}px ${r};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.${In} .${In} {
|
|
29
|
-
right: 0 ${r};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.${Ln} .${Ln} {
|
|
33
|
-
margin-right: 0 ${r};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
body[${dr}] {
|
|
37
|
-
${zn}: ${s}px;
|
|
38
|
-
}
|
|
39
|
-
`},pr=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mr=function(){T.useEffect(function(){return document.body.setAttribute(dr,(pr()+1).toString()),function(){var e=pr()-1;e<=0?document.body.removeAttribute(dr):document.body.setAttribute(dr,e.toString())}},[])},hr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mr();var a=T.useMemo(function(){return lr(i)},[i]);return T.createElement(ur,{styles:fr(a,!t,i,n?``:`!important`)})},gr=!1;if(typeof window<`u`)try{var _r=Object.defineProperty({},"passive",{get:function(){return gr=!0,!0}});window.addEventListener(`test`,_r,_r),window.removeEventListener(`test`,_r,_r)}catch{gr=!1}var Y=gr?{passive:!1}:!1,vr=function(e){return e.tagName===`TEXTAREA`},yr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!vr(e)&&n[t]===`visible`)},br=function(e){return yr(e,`overflowY`)},xr=function(e){return yr(e,`overflowX`)},Sr=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Tr(e,r)){var i=Er(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Cr=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},wr=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Tr=function(e,t){return e===`v`?br(t):xr(t)},Er=function(e,t){return e===`v`?Cr(t):wr(t)},Dr=function(e,t){return e===`h`&&t===`rtl`?-1:1},Or=function(e,t,n,r,i){var a=Dr(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Er(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Tr(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},kr=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ar=function(e){return[e.deltaX,e.deltaY]},jr=function(e){return e&&`current`in e?e.current:e},Mr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nr=function(e){return`
|
|
40
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
41
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
42
|
-
`},Pr=0,X=[];function Fr(e){var t=T.useRef([]),n=T.useRef([0,0]),r=T.useRef(),i=T.useState(Pr++)[0],a=T.useState(ar)[0],o=T.useRef(e);T.useEffect(function(){o.current=e},[e]),T.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Fn([e.lockRef.current],(e.shards||[]).map(jr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=T.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=kr(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Sr(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Sr(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Or(h,t,e,h===`h`?s:c,!0)},[]),c=T.useCallback(function(e){var n=e;if(X.length&&X[X.length-1]===a){var r=`deltaY`in n?Ar(n):kr(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Mr(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(jr).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=T.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ir(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=T.useCallback(function(e){n.current=kr(e),r.current=void 0},[]),d=T.useCallback(function(t){l(t.type,Ar(t),t.target,s(t,e.lockRef.current))},[]),f=T.useCallback(function(t){l(t.type,kr(t),t.target,s(t,e.lockRef.current))},[]);T.useEffect(function(){return X.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Y),document.addEventListener(`touchmove`,c,Y),document.addEventListener(`touchstart`,u,Y),function(){X=X.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Y),document.removeEventListener(`touchmove`,c,Y),document.removeEventListener(`touchstart`,u,Y)}},[]);var p=e.removeScrollBar,m=e.inert;return T.createElement(T.Fragment,null,m?T.createElement(a,{styles:Nr(i)}):null,p?T.createElement(hr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ir(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Lr=Yn(Xn,Fr),Rr=T.forwardRef(function(e,t){return T.createElement(Qn,J({},e,{ref:t,sideCar:Lr}))});Rr.classNames=Qn.classNames;var zr=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Z=new WeakMap,Br=new WeakMap,Vr={},Hr=0,Ur=function(e){return e&&(e.host||Ur(e.parentNode))},Wr=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ur(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Gr=function(e,t,n,r){var i=Wr(t,Array.isArray(e)?e:[e]);Vr[n]||(Vr[n]=new WeakMap);var a=Vr[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Z.get(e)||0)+1,l=(a.get(e)||0)+1;Z.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Br.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Hr++,function(){o.forEach(function(e){var t=Z.get(e)-1,i=a.get(e)-1;Z.set(e,t),a.set(e,i),t||(Br.has(e)||e.removeAttribute(r),Br.delete(e)),i||e.removeAttribute(n)}),Hr--,Hr||(Z=new WeakMap,Z=new WeakMap,Br=new WeakMap,Vr={})}},Kr=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zr(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Gr(r,i,n,`aria-hidden`)):function(){return null}},qr=Object.defineProperty,Q=(e,t)=>qr(e,`name`,{value:t,configurable:!0}),Jr=`Dialog`,[Yr,Xr]=rt(Jr),[Zr,$]=Yr(Jr),Qr=Q(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=T.useRef(null),c=T.useRef(null),[l,u]=vt({prop:r,defaultProp:i??!1,onChange:a,caller:Jr}),[d,f]=T.useState(0),[p,m]=T.useState(0);return(0,N.jsx)(Zr,{scope:t,triggerRef:s,contentRef:c,contentId:lt(),titleId:lt(),descriptionId:lt(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:T.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),$r=`DialogPortal`,[ei,ti]=Yr($r,{forceMount:void 0}),ni=Q(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$($r,t);return(0,N.jsx)(ei,{scope:t,forceMount:n,children:T.Children.map(r,e=>(0,N.jsx)(Sn,{present:n||a.open,children:(0,N.jsx)(yn,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ri=`DialogOverlay`,ii=T.forwardRef(Q(function(e,t){let n=ti(ri,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$(ri,e.__scopeDialog);return a.modal?(0,N.jsx)(Sn,{present:r||a.open,children:(0,N.jsx)(oi,{...i,ref:t})}):null},`DialogOverlay`)),ai=Tt(`DialogOverlay.RemoveScroll`),oi=T.forwardRef(Q(function(e,t){let{__scopeDialog:n,...r}=e,i=$(ri,n),a=L(t,Xt());return(0,N.jsx)(Rr,{as:ai,allowPinchZoom:!0,shards:[i.contentRef],children:(0,N.jsx)(V.div,{"data-state":vi(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),si=`DialogContent`,ci=T.forwardRef(Q(function(e,t){let n=ti(si,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$(si,e.__scopeDialog);return(0,N.jsx)(Sn,{present:r||a.open,children:a.modal?(0,N.jsx)(li,{...i,ref:t}):(0,N.jsx)(ui,{...i,ref:t})})},`DialogContent`)),li=T.forwardRef(Q(function(e,t){let n=$(si,e.__scopeDialog),r=T.useRef(null),i=L(t,n.contentRef,r);return T.useEffect(()=>{let e=r.current;if(e)return Kr(e)},[]),(0,N.jsx)(di,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:I(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:I(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ui=T.forwardRef(Q(function(e,t){let n=$(si,e.__scopeDialog),r=T.useRef(!1),i=T.useRef(!1);return(0,N.jsx)(di,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),di=T.forwardRef(Q(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$(si,n);return Mn(),(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,N.jsx)(Yt,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":vi(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),fi=`DialogTitle`,pi=T.forwardRef(Q(function(e,t){let{__scopeDialog:n,...r}=e,i=$(fi,n),{setTitleCount:a}=i;return z(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,N.jsx)(V.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),mi=`DialogDescription`,hi=T.forwardRef(Q(function(e,t){let{__scopeDialog:n,...r}=e,i=$(mi,n),{setDescriptionCount:a}=i;return z(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,N.jsx)(V.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),gi=`DialogClose`,_i=T.forwardRef(Q(function(e,t){let{__scopeDialog:n,...r}=e,i=$(gi,n);return(0,N.jsx)(V.button,{type:`button`,...r,ref:t,onClick:I(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function vi(e){return e?`open`:`closed`}Q(vi,`getState`);function yi({open:e,title:t,description:n,onOpenChange:r,children:i,footer:a,wide:o,extraWide:s,className:c,draggable:l=!1}){let{t:u}=E(),d=(0,T.useRef)(null),f=(0,T.useRef)(null),[p,m]=(0,T.useState)({x:0,y:0}),[h,g]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e||(f.current=null,g(!1),m({x:0,y:0}))},[e]);let _=e=>{l&&e.button===0&&e.pointerType!==`touch`&&!bi(e.target)&&(f.current={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,...p},e.currentTarget.setPointerCapture(e.pointerId),g(!0),e.preventDefault())},v=e=>{let t=f.current;if(!t||t.pointerId!==e.pointerId)return;let n=d.current;if(!n)return;let r=n.getBoundingClientRect(),i=Math.max(0,(window.innerWidth-r.width)/2-12),a=Math.max(0,(window.innerHeight-r.height)/2-12);m({x:xi(t.x+e.clientX-t.clientX,-i,i),y:xi(t.y+e.clientY-t.clientY,-a,a)})},y=e=>{f.current?.pointerId===e.pointerId&&(f.current=null,g(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},b=l?{"--dialog-drag-x":`${p.x}px`,"--dialog-drag-y":`${p.y}px`}:void 0;return(0,N.jsx)(Qr,{open:e,onOpenChange:r,children:(0,N.jsxs)(ni,{children:[(0,N.jsx)(ii,{className:`dialog-overlay`}),(0,N.jsxs)(ci,{ref:d,style:b,"data-dragging":h||void 0,className:`dialog-content${o?` dialog-wide`:``}${s?` dialog-extra-wide`:``}${l?` dialog-draggable`:``}${c?` ${c}`:``}`,children:[(0,N.jsxs)(`div`,{className:`dialog-header${l?` dialog-drag-handle`:``}`,onPointerDown:_,onPointerMove:v,onPointerUp:y,onPointerCancel:y,onLostPointerCapture:y,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(pi,{children:t}),n&&(0,N.jsx)(hi,{children:n})]}),(0,N.jsx)(_i,{className:`dialog-close`,"aria-label":u(`common.close`),children:`×`})]}),(0,N.jsx)(`div`,{className:`dialog-body`,children:i}),a&&(0,N.jsx)(`div`,{className:`dialog-footer`,children:a})]})]})})}function bi(e){return e instanceof Element&&!!e.closest(`button, a, input, select, textarea, [data-dialog-no-drag]`)}function xi(e,t,n){return Math.max(t,Math.min(n,e))}function Si({open:e,title:t,description:n,confirmLabel:r,danger:i,onCancel:a,onConfirm:o,error:s,busy:c=!1}){let{t:l}=E();return(0,N.jsx)(yi,{open:e,title:t,description:n,onOpenChange:e=>{!e&&!c&&a()},footer:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{disabled:c,onClick:a,children:l(`common.cancel`)}),(0,N.jsxs)(`button`,{className:i?`danger`:`primary`,disabled:c,"aria-busy":c,onClick:o,children:[c&&(0,N.jsx)(We,{className:`spin`,size:14}),r??l(`common.remove`)]})]}),children:(0,N.jsxs)(N.Fragment,{children:[s&&(0,N.jsx)(`p`,{className:`error dialog-error`,children:s}),(0,N.jsx)(`div`,{})]})})}var Ci=class extends T.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in component tree:`,e,t)}handleReset=()=>{this.setState({hasError:!1,error:null}),this.props.onReset?.()};render(){return this.state.hasError?typeof this.props.fallback==`function`?this.props.fallback(this.state.error??Error(`Unknown error`),this.handleReset):this.props.fallback?this.props.fallback:(0,N.jsxs)(`div`,{role:`alert`,style:{padding:`2rem`,margin:`1rem`,borderRadius:`8px`,backgroundColor:`var(--ui-surface, #f8f9fa)`,border:`1px solid var(--ui-border, #e9ecef)`,color:`var(--ui-text, #212529)`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,N.jsx)(`h2`,{style:{fontSize:`1.25rem`,fontWeight:600,marginBottom:`0.5rem`,color:`var(--ui-danger, #dc3545)`},children:this.props.title??u.t(`errors.boundaryTitle`)}),(0,N.jsx)(`p`,{style:{fontSize:`0.9rem`,color:`var(--ui-muted, #6c757d)`,marginBottom:`1rem`},children:u.t(`errors.boundaryDescription`)}),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:`0.5rem`},children:[(0,N.jsx)(`button`,{type:`button`,onClick:this.handleReset,className:`primary`,style:{padding:`0.4rem 0.8rem`,borderRadius:`4px`,cursor:`pointer`},children:u.t(`errors.boundaryRetry`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),style:{padding:`0.4rem 0.8rem`,borderRadius:`4px`,cursor:`pointer`},children:u.t(`errors.boundaryReload`)})]})]}):this.props.children}};function wi({compact:e=!1}){let{t}=E();return(0,N.jsxs)(`div`,{className:`lazy-load-state${e?` compact`:``}`,role:`status`,"aria-live":`polite`,children:[(0,N.jsx)(We,{className:`spin`,size:e?15:18}),(0,N.jsx)(`span`,{children:t(`common.loading`)})]})}function Ti({onClose:e,compact:t=!1}){let{t:n}=E();return(0,N.jsxs)(`div`,{className:`lazy-load-state lazy-load-error${t?` compact`:``}`,role:`alert`,children:[(0,N.jsx)(`span`,{children:n(`errors.boundaryDescription`)}),(0,N.jsxs)(`div`,{className:`lazy-load-actions`,children:[e&&(0,N.jsx)(`button`,{type:`button`,onClick:e,children:n(`common.close`)}),(0,N.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>window.location.reload(),children:n(`common.reload`)})]})]})}function Ei({title:e,onClose:t}){return(0,N.jsx)(yi,{open:!0,title:e,onOpenChange:e=>{e||t()},children:(0,N.jsx)(Ti,{onClose:t})})}function Di({children:e,onClose:t}){return(0,N.jsx)(Ci,{fallback:(0,N.jsx)(Ti,{onClose:t}),children:(0,N.jsx)(T.Suspense,{fallback:(0,N.jsx)(wi,{}),children:e})})}function Oi({title:e,onClose:t,children:n}){return(0,N.jsx)(Ci,{fallback:(0,N.jsx)(Ei,{title:e,onClose:t}),children:(0,N.jsx)(T.Suspense,{fallback:(0,N.jsx)(yi,{open:!0,title:e,onOpenChange:e=>{e||t()},children:(0,N.jsx)(wi,{})}),children:n})})}function ki({children:e,onClose:t}){return(0,N.jsx)(Ci,{fallback:(0,N.jsx)(Ti,{onClose:t,compact:!0}),children:(0,N.jsx)(T.Suspense,{fallback:(0,N.jsx)(wi,{compact:!0}),children:e})})}var Ai=()=>h(()=>import(`./Dashboard-Dzq1oMZU.js`).then(e=>e.t),__vite__mapDeps([22,1,2,13,12,3,8,15,23,24,25,26]),import.meta.url),ji=(0,T.lazy)(()=>Ai().then(e=>({default:e.Dashboard}))),Mi=(0,T.lazy)(()=>ye().then(e=>({default:e.ProjectWorkspace})));function Ni(e){e().catch(()=>void 0)}function Pi(){let{t:e}=E(),[t,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(),a=(0,T.useRef)(r);a.current=r;let[o,s]=(0,T.useState)(()=>typeof window>`u`?null:M(window.location.pathname)),[c,l]=(0,T.useState)(()=>typeof window>`u`?null:fe(window.location.search)),[u,d]=(0,T.useState)(null),[f,p]=(0,T.useState)(null),h=()=>{let e=M(window.location.pathname);e&&(window.history.replaceState({texliteRoute:`dashboard`},``,pe(e,fe(window.location.search))),s(null),l(null),d(null))},g=e=>{let t=!e.mustChangePassword,n=he(window.location.search),r=ge(window.location.search),a=null;if(n){let e={texliteRoute:`project`,projectId:n,fromDashboard:!1};window.history.replaceState(e,``,j(n,r)),s(n),l(r),a=n}else new URLSearchParams(window.location.search).has(`return`)?(window.history.replaceState({texliteRoute:`dashboard`},``,m(`/`)),s(null),l(null)):M(window.location.pathname)&&(a=M(window.location.pathname));t&&a?(Ni(ye),d(Se(a))):t?Ni(Ai):d(null),i(e)};(0,T.useEffect)(()=>{let e=M(window.location.pathname),t=fe(window.location.search);if(e&&`${window.location.pathname}${window.location.search}`!==j(e,t)){let n={texliteRoute:`project`,projectId:e,fromDashboard:!1};window.history.replaceState(n,``,j(e,t))}let n=()=>{let e=M(window.location.pathname);s(e),l(e?fe(window.location.search):null);let t=a.current;e&&t&&!t.mustChangePassword?(Ni(ye),d(Se(e))):d(null)},r=()=>{p(null),i(null),h()};return window.addEventListener(`popstate`,n),window.addEventListener(`texlite:session-expired`,r),()=>{window.removeEventListener(`popstate`,n),window.removeEventListener(`texlite:session-expired`,r)}},[]);let _=(e,t)=>{let n=j(e,t);if(`${window.location.pathname}${window.location.search}`!==n){let t={texliteRoute:`project`,projectId:e,fromDashboard:!0};window.history.pushState(t,``,n)}Ni(ye),d(Se(e)),s(e),l(t??null)},v=()=>{let e=window.history.state;_e(e)&&e.fromDashboard?window.history.back():(window.history.replaceState({texliteRoute:`dashboard`},``,m(`/`)),s(null),l(null),d(null))};if((0,T.useEffect)(()=>{A(`/api/config`).then(e=>{n(e),document.title=e.siteName}),A(`/api/me`,{suppressSessionExpired:!0}).then(({user:e})=>g(e)).catch(()=>{h(),i(null)})},[]),(0,T.useEffect)(()=>{if(!r||r.mustChangePassword||o)return;let e=!1,t=null,n=null,i=()=>{e||ve().then(e=>e.preloadPdfRuntime()).catch(()=>void 0)},a=window;return a.requestIdleCallback?n=a.requestIdleCallback(i,{timeout:1200}):t=window.setTimeout(i,400),()=>{e=!0,t!==null&&window.clearTimeout(t),n!==null&&a.cancelIdleCallback?.(n)}},[r?.id,r?.mustChangePassword,o]),r===void 0||!t)return(0,N.jsx)(`div`,{className:`center-card`,children:e(`common.loading`)});if(!r)return(0,N.jsx)(ke,{site:t,onLogin:g});if(r.mustChangePassword)return(0,N.jsx)(Oe,{site:t,user:r,onChanged:e=>i(e)});if(o)return(0,N.jsx)(Di,{onClose:v,children:(0,N.jsx)(Mi,{site:t,user:r,projectId:o,preload:u?.projectId===o?u:null,mentionId:c,onMentionTargeted:()=>{let e=window.history.state,t=_e(e)?{...e,projectId:o}:{texliteRoute:`project`,projectId:o,fromDashboard:!1};window.history.replaceState(t,``,j(o)),l(null)},onMentionsRead:(e,t)=>p(n=>n&&n.userId===r.id?{...n,projects:n.projects.map(n=>n.id===o?{...n,unreadMentionCount:t?0:Math.max(0,(n.unreadMentionCount??0)-e)}:n)}:n),onBack:v},o)},`project:${o}`);let y=f?.userId===r.id?f:null;return(0,N.jsx)(Di,{children:(0,N.jsx)(ji,{site:t,user:r,initialData:y?{projects:y.projects,tags:y.tags,pagination:y.pagination}:null,onDataChange:(e,t,n)=>p({userId:r.id,projects:e,tags:t,pagination:n}),onUser:e=>{(!e||e.id!==r.id)&&p(null),i(e),e||v()},onOpenProject:_})},`dashboard`)}var Fi=`data-texlite-tooltip-title`,Ii=`[data-tooltip], [title], [${Fi}]`,Li=`[data-texlite-tooltips="off"]`,Ri=`[data-texlite-tooltip-always]`;function zi(e,t,n=0){let r=Math.min(n,Math.max(0,t-16))/2,i=e.left+e.width/2;return{left:Math.max(r+8,Math.min(i,t-r-8)),top:e.top-8,placement:`above`}}function Bi(e){return(e.getAttribute(`data-tooltip`)??e.getAttribute(`title`)??e.getAttribute(Fi))?.trim()||null}function Vi(e){if(!(e instanceof Element))return null;let t=e.closest(Ii);return t&&Bi(t)?t:null}function Hi(e){return!!e?.closest(Li)&&!e?.closest(Ri)}function Ui(e){return Hi(e)}function Wi(e){let t=e.getAttribute(`title`);t===null||e.hasAttribute(Fi)||(e.setAttribute(Fi,t),e.removeAttribute(`title`))}function Gi(e){if(!e||Ui(e))return;let t=e.getAttribute(Fi);t!==null&&(e.hasAttribute(`title`)||e.setAttribute(`title`,t),e.removeAttribute(Fi))}function Ki(){let e=(0,T.useRef)(null),t=(0,T.useRef)(null),[n,r]=(0,T.useState)(null);return(0,T.useLayoutEffect)(()=>{if(!n||!t.current||!e.current)return;let i=t.current.getBoundingClientRect(),a=zi(e.current.getBoundingClientRect(),window.innerWidth,i.width),o=Math.max(a.top,i.height+8);(n.left!==a.left||n.top!==o)&&r(e=>e===n?{...n,...a,top:o}:e)},[n]),(0,T.useEffect)(()=>{let t=null,n=null,i=()=>{t=null,n=null,Gi(e.current),e.current=null,r(null)},a=()=>{let i=t??n;if(i&&Ui(i)){i!==e.current&&Gi(e.current),e.current=i,Wi(i),r(null);return}if(i===e.current){if(!i)return;let e=Bi(i);if(!e)return;r({text:e,...zi(i.getBoundingClientRect(),window.innerWidth)});return}if(Gi(e.current),e.current=i,!i){r(null);return}let a=Bi(i);a?(Wi(i),r({text:a,...zi(i.getBoundingClientRect(),window.innerWidth)})):r(null)},o=()=>{let t=e.current;if(!t)return;if(Ui(t)){Wi(t),r(null);return}let n=Bi(t);n&&r({text:n,...zi(t.getBoundingClientRect(),window.innerWidth)})},s=(e,t)=>t instanceof Node&&e.contains(t),c=e=>{t=Vi(e.target),a()},l=e=>{let n=Vi(e.target);n&&n===t&&(Vi(e.relatedTarget)===n||s(n,e.relatedTarget)||(t=null,a()))},u=e=>{n=Vi(e.target),a()},d=e=>{let t=Vi(e.target);t&&t===n&&!s(t,e.relatedTarget)&&(n=null,a())};document.addEventListener(`pointerover`,c,!0),document.addEventListener(`pointerout`,l,!0),document.addEventListener(`focusin`,u,!0),document.addEventListener(`focusout`,d,!0),document.addEventListener(`click`,i,!0),window.addEventListener(`resize`,o),window.addEventListener(`scroll`,o,!0),window.addEventListener(`blur`,i),window.addEventListener(`pagehide`,i),window.addEventListener(`popstate`,i);let f=new MutationObserver(a);return f.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-texlite-tooltips`]}),()=>{document.removeEventListener(`pointerover`,c,!0),document.removeEventListener(`pointerout`,l,!0),document.removeEventListener(`focusin`,u,!0),document.removeEventListener(`focusout`,d,!0),document.removeEventListener(`click`,i,!0),window.removeEventListener(`resize`,o),window.removeEventListener(`scroll`,o,!0),window.removeEventListener(`blur`,i),window.removeEventListener(`pagehide`,i),window.removeEventListener(`popstate`,i),f.disconnect(),Gi(e.current),e.current=null}},[]),n?(0,N.jsx)(`div`,{ref:t,id:`texlite-global-tooltip`,role:`tooltip`,className:`global-tooltip ${n.placement}`,style:{left:n.left,top:n.top},children:n.text}):null}var qi={ink:`#1F2328`,"editor-bg":`#FFFFFF`,cmd:`#1F55C4`,structure:`#0B7A5E`,env:`#0B7A5E`,math:`#6D28D9`,key:`#9A5B00`,task:`#9A5B00`,special:`#B0307A`,comment:`#6B7280`,bracket:`#6B7280`,"comment-selected":`#6B7280`,"literal-bg":`#F4F5F6`,gutter:`#9CA3AF`,"gutter-active":`#4B5563`,"active-line":`#69A5D71A`,"match-bg":`#BDE5D8`,"match-fg":`#075940`,"selection-bg":`#C8DCF0`,"selection-inactive-bg":`#C8DCF0`,"search-bg":`#FFE9A8`,"search-outline":`#D9A91C88`,error:`#D92D20`,warning:`#C77700`,hint:`#5B7C99`,cursor:`#1F2328`,"code-meta":`#404740`,"code-keyword":`#708`,"code-atom":`#219`,"code-literal":`#164`,"code-string":`#A11`,"code-escape":`#E40`,"code-definition":`#00F`,"code-local":`#30A`,"code-type":`#085`,"code-class":`#167`,"code-macro":`#256`,"code-property":`#00C`,"code-comment":`#940`,"code-invalid":`#F00`,"bib-command":`#176B8F`,"bib-protected":`#8A5A16`,"panel-bg":`#F7F9F7`,"panel-fg":`#35443A`,"panel-muted":`#59665D`,border:`#CCD5CF`,"input-bg":`#FFFFFF`,"input-fg":`#202B24`,"input-border":`#BCC8C0`,"control-border":`#BDC8C0`,"control-fg":`#31513D`,"hover-border":`#7C9F89`,"hover-bg":`#E9F1EC`,"hover-fg":`#244D36`,focus:`#3D8A60`,"focus-ring":`#3D8A6025`,accent:`#176B44`,"muted-fg":`#647069`,"close-hover-bg":`#E3E9E5`,"secondary-fg":`#506057`,"vim-bg":`#F1F6F2`,"vim-fg":`#31523E`,"vim-border":`#CBD8CE`,"spell-active-bg":`#F6D66F`,"spell-active-border":`#C99324`,"spell-active-fg":`#3F3010`,"spell-active-line":`#9B6715`,"tooltip-bg":`#FFFFFF`,"tooltip-fg":`#1D3025`,"tooltip-border":`#BFD0C3`,"tooltip-muted":`#607067`,"tooltip-detail":`#58685E`,"tooltip-separator":`#E2E8E3`,"tooltip-example-bg":`#F3F7F4`,"tooltip-shadow":`#1B34261F`,"tooltip-action":`#214F37`,"tooltip-hover-border":`#A9C9B3`,"tooltip-hover-bg":`#EDF6EF`,"tooltip-disabled":`#78847D`,"completion-bg":`#F5F5F5`,"completion-border":`#BBBBBB`,"completion-active-bg":`#17C`,"completion-active-fg":`#FFFFFF`,"comment-bg":`#FFE49B99`,"comment-border":`#D68B00`,"comment-hover-bg":`#FFE49B`,"comment-hover-fg":`#965E00`,"selection-action-bg":`#E1F2E7`,"selection-action-fg":`#12653D`,"selection-action-hover-bg":`#CDEBD6`,"selection-action-hover-fg":`#0B532F`,"history-action-bg":`#E7EDF6`,"history-action-fg":`#385F89`,"history-action-hover-bg":`#D4E2F2`,"history-action-hover-fg":`#274D75`,"reference-bg":`#FFFFFF`},Ji={ink:`#D7DAE0`,"editor-bg":`#282C34`,cmd:`#9CC6F4`,structure:`#92CEB9`,env:`#92CEB9`,math:`#D5B5F7`,key:`#E5C07B`,task:`#E5C07B`,special:`#EDB1D1`,comment:`#8B95A7`,bracket:`#BCC3CF`,"comment-selected":`#BCC3CF`,"literal-bg":`#303640`,gutter:`#6B7487`,"gutter-active":`#D7DAE0`,"active-line":`#6699FF1C`,"match-bg":`#294D44`,"match-fg":`#BDEED8`,"selection-bg":`#3B506D`,"selection-inactive-bg":`#39414E`,"search-bg":`#433C2A`,"search-outline":`#C9A45E99`,error:`#F28B82`,warning:`#E5B06C`,hint:`#8FB5D6`,cursor:`#BDD6FF`,"code-meta":`#BDC2CC`,"code-keyword":`#D5B5F7`,"code-atom":`#A2C4FB`,"code-literal":`#A6D189`,"code-string":`#A6D189`,"code-escape":`#E7BA87`,"code-definition":`#9CC6F4`,"code-local":`#CAB9F5`,"code-type":`#92CEB9`,"code-class":`#87CDD9`,"code-macro":`#9CC6F4`,"code-property":`#9CC6F4`,"code-comment":`#8B95A7`,"code-invalid":`#F8B0AA`,"bib-command":`#87CDD9`,"bib-protected":`#E5C07B`,"panel-bg":`#242831`,"panel-fg":`#D7DAE0`,"panel-muted":`#ABB5C5`,border:`#444C5A`,"input-bg":`#303640`,"input-fg":`#E0E4EC`,"input-border":`#566174`,"control-border":`#566174`,"control-fg":`#C5D9CE`,"hover-border":`#7BAF9A`,"hover-bg":`#35463F`,"hover-fg":`#D4F0E1`,focus:`#82C7AF`,"focus-ring":`#82C7AF30`,accent:`#82C7AF`,"muted-fg":`#ABB5C5`,"close-hover-bg":`#3B4250`,"secondary-fg":`#B7C3D3`,"vim-bg":`#242B30`,"vim-fg":`#A9D6C1`,"vim-border":`#444C5A`,"spell-active-bg":`#E5C07B`,"spell-active-border":`#F2D9A0`,"spell-active-fg":`#282C34`,"spell-active-line":`#6A4512`,"tooltip-bg":`#303640`,"tooltip-fg":`#E0E4EC`,"tooltip-border":`#566174`,"tooltip-muted":`#ABB5C5`,"tooltip-detail":`#BAC5D3`,"tooltip-separator":`#485160`,"tooltip-example-bg":`#262B33`,"tooltip-shadow":`#00000040`,"tooltip-action":`#A9D6C1`,"tooltip-hover-border":`#7BAF9A`,"tooltip-hover-bg":`#35463F`,"tooltip-disabled":`#929EAE`,"completion-bg":`#303640`,"completion-border":`#566174`,"completion-active-bg":`#3A4D69`,"completion-active-fg":`#EDF3FF`,"comment-bg":`#E5C07B1F`,"comment-border":`#E5C07B`,"comment-hover-bg":`#57482C`,"comment-hover-fg":`#FFE2A3`,"selection-action-bg":`#2C483E`,"selection-action-fg":`#BDEED8`,"selection-action-hover-bg":`#365B4C`,"selection-action-hover-fg":`#E2FFF0`,"history-action-bg":`#2E405A`,"history-action-fg":`#B6D3FA`,"history-action-hover-bg":`#3B5272`,"history-action-hover-fg":`#E0EDFF`,"reference-bg":`#282C34`};function Yi(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[`--tl-${e}`,t]))}var Xi={light:Yi(qi),dark:Yi(Ji)};function Zi(e){return Xi[e]}var Qi=p(`texlite-theme`),$i=new Set,ea=`light`,ta=`system`,na=!1,ra=null;function ia(){try{let e=window.localStorage.getItem(Qi);return e===`light`||e===`dark`?e:`system`}catch{return`system`}}function aa(){try{return(ra??window.matchMedia?.(`(prefers-color-scheme: dark)`))?.matches?`dark`:`light`}catch{return`light`}}function oa(e){ta=e,sa(e===`system`?aa():e)}function sa(e){if(ea=e,typeof document>`u`)return;let t=document.documentElement;t.dataset.theme=e,t.style.colorScheme=e;for(let[n,r]of Object.entries(Zi(e)))t.style.setProperty(n,r)}function ca(){if(na||typeof window>`u`)return;na=!0;try{ra=window.matchMedia?.(`(prefers-color-scheme: dark)`)??null}catch{}let e=()=>{if(ta!==`system`)return;let e=aa();if(e!==ea){sa(e);for(let e of $i)e()}};ra?.addEventListener?ra.addEventListener(`change`,e):ra?.addListener?.(e),oa(ia()),window.addEventListener(`storage`,e=>{if(e.key!==null&&e.key!==Qi)return;try{if(e.storageArea!==window.localStorage)return}catch{return}let t=ia();if(t!==ta){oa(t);for(let e of $i)e()}})}function la(){return ea}function ua(){return ta}function da(e){oa(e);try{window.localStorage.setItem(Qi,e)}catch{}for(let e of $i)e()}function fa(e){return $i.add(e),()=>{$i.delete(e)}}function pa(){return(0,T.useSyncExternalStore)(fa,la,()=>`light`)}function ma(){return(0,T.useSyncExternalStore)(fa,ua,()=>`system`)}ca(),(0,oe.createRoot)(document.getElementById(`root`)).render((0,N.jsxs)(T.StrictMode,{children:[(0,N.jsx)(Ki,{}),(0,N.jsx)(Ci,{children:(0,N.jsx)(Pi,{})})]}));export{ue as A,Ce as C,ce as D,A as E,g as F,v as I,ee as M,w as N,le as O,C as P,Ee as S,D as T,L as _,Di as a,He as b,yi as c,Mn as d,H as f,rt as g,z as h,Oi as i,E as j,se as k,Kr as l,lt as m,pa as n,ki as o,vt as p,ma as r,Si as s,da as t,Rr as u,I as v,ve as w,De as x,We as y};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./index-h0BVkT8k.js";var t={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./react-DUEFWlB7.js";import{t as i}from"./basePath-B5-c90eh.js";import{E as a,_ as o,b as s,d as c,f as l,g as u,h as d,l as f,m as p,p as m,u as h,v as g}from"./index-h0BVkT8k.js";var _={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};_.node;var v=s(_),y={name:`at-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]};y.node;var b=s(y),x={name:`book-bookmark`,size:24,node:[[`path`,{d:`M10 2v7.751a.25.25 0 00.407.195l2.28-1.834a.5.5 0 01.627 0l2.28 1.834A.25.25 0 0016 9.751V2`,key:`x9x4jl`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 016.5 2H19a1 1 0 011 1v18a1 1 0 01-1 1H6.5a1 1 0 010-5H20`,key:`1889un`}]],aliases:[`book-marked`]};x.node;var S=s(x),C={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`}]]};C.node;var w=s(C),T={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};T.node;var E=s(T),D={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};D.node;var O=s(D),k={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};k.node;var A=s(k),j={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`}]]};j.node;var M=s(j),ee={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`]};ee.node;var te=s(ee),ne={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};ne.node;var re=s(ne),N={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 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 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};N.node;var ie=s(N),ae={name:`file-search`,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`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]};ae.node;var oe=s(ae),se={name:`file-spreadsheet`,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:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]};se.node;var ce=s(se),le={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`}]]};le.node;var ue=s(le),de={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`}]]};de.node;var fe=s(de),pe={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`}]]};pe.node;var me=s(pe),he={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`}]]};he.node;var ge=s(he),_e={name:`list-tree`,size:24,node:[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]};_e.node;var ve=s(_e),ye={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`}]]};ye.node;var be=s(ye),xe={name:`notepad-text`,size:24,node:[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`16`,height:`18`,x:`4`,y:`4`,rx:`2`,key:`1u9h20`}],[`path`,{d:`M8 10h6`,key:`3oa6kw`}],[`path`,{d:`M8 14h8`,key:`1fgep2`}],[`path`,{d:`M8 18h5`,key:`17enja`}]]};xe.node;var Se=s(xe),Ce={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`}]]};Ce.node;var we=s(Ce),Te={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`}]]};Te.node;var Ee=s(Te),De={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`]};De.node;var Oe=s(De),ke={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`]};ke.node;var Ae=s(ke),je={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`]};je.node;var Me=s(je),Ne={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`}]]};Ne.node;var Pe=s(Ne),Fe={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`}]]};Fe.node;var Ie=s(Fe),Le={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Le.node;var Re=s(Le),ze=e(n(),1),P=e(t(),1),Be=Object.defineProperty,F=(e,t)=>Be(e,`name`,{value:t,configurable:!0});function Ve(e){let t=P.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];Ye(r)&&typeof et==`function`&&(r=et(r._payload)),P.Children.forEach(r,e=>{if(qe(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ye(n)&&typeof et==`function`&&(n=et(n._payload)),a=We(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=P.cloneElement(a,void 0,c):!s&&P.Children.count(r)===1&&P.isValidElement(r)&&(a=r);let l=a?Ke(a):void 0,u=o(n,l);if(!a){if(r||r===0)throw Error(s?$e(e):Qe(e));return r}let d=Ge(i,a.props??{});return a.type!==P.Fragment&&(d.ref=n?u:l),P.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}F(Ve,`createSlot`);var He=Symbol.for(`radix.slottable`);function Ue(e){let t=F(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=He,t}F(Ue,`createSlottable`);var We=F((e,t)=>{if(`child`in e.props){let t=e.props.child;return P.isValidElement(t)?P.cloneElement(t,void 0,e.props.children(t.props.children)):null}return P.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Ge(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Ze(a,i))}return{...e,...n}}F(Ge,`mergeProps`);function Ke(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}F(Ke,`getElementRef`);function qe(e){return P.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===He}F(qe,`isSlottable`);var Je=Symbol.for(`react.lazy`);function Ye(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Je&&`_payload`in e&&Xe(e._payload)}F(Ye,`isLazyComponent`);function Xe(e){return typeof e==`object`&&!!e&&`then`in e}F(Xe,`isPromiseLike`);function Ze(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}F(Ze,`concatAriaDescribedby`);var Qe=F(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),$e=F(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),et=P.use,I=r(),tt=Object.defineProperty,nt=(e,t)=>tt(e,`name`,{value:t,configurable:!0}),rt=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ve(`Primitive.${t}`),r=P.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function it(e,t){e&&ze.flushSync(()=>e.dispatchEvent(t))}nt(it,`dispatchDiscreteCustomEvent`);var at=Object.defineProperty,L=(e,t)=>at(e,`name`,{value:t,configurable:!0}),ot=`dismissableLayer.update`,st=`dismissableLayer.pointerDownOutside`,ct=`dismissableLayer.focusOutside`,lt,ut=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),dt=P.forwardRef(L(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...d}=e,f=P.useContext(ut),[p,m]=P.useState(null),h=p?.ownerDocument??globalThis?.document,[,_]=P.useState({}),v=o(t,m),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=b?y.indexOf(b):-1,S=p?y.indexOf(p):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=P.useRef(!1),E=mt(e=>{a?.(e),c?.(e),e.defaultPrevented||u?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:P.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return w&&!t},[f.branches,w])}),D=ht(e=>{if(r&&T.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||u?.())},h),O=p?S===y.length-1:!1,k=l(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return P.useEffect(()=>{if(O)return h.addEventListener(`keydown`,k,{capture:!0}),()=>h.removeEventListener(`keydown`,k,{capture:!0})},[h,O,k]),P.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(lt=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),gt(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=lt))}},[p,h,n,f]),P.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),gt())},[p,f]),P.useEffect(()=>{let e=L(()=>_({}),`handleUpdate`);return document.addEventListener(ot,e),()=>document.removeEventListener(ot,e)},[]),(0,I.jsx)(rt.div,{...d,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:g(e.onFocusCapture,D.onFocusCapture),onBlurCapture:g(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function ft(){let e=P.useContext(ut),[t,n]=P.useState(null);return P.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}L(ft,`useDismissableLayerSurface`);var pt=L(()=>!0,`IS_TRUE`);function mt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=pt}=t,s=l(e),c=P.useRef(!1),u=P.useRef(!1),d=P.useRef(new Map),f=P.useRef(()=>{});return P.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}L(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}L(t,`isOutsideInteractionIntercepted`);function l(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}L(l,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}L(p,`handleInteractionBubble`);let m=L(a=>{if(a.target&&!c.current){let l=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||_t(st,s,p,{discrete:!0})};if(L(l,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?l():(n.removeEventListener(`click`,f.current),f.current=l,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,l,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,l,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:L(()=>c.current=!0,`onPointerDownCapture`)}}L(mt,`usePointerDownOutside`);function ht(e,t=globalThis?.document){let n=l(e),r=P.useRef(!1);return P.useEffect(()=>{let e=L(e=>{e.target&&!r.current&&_t(ct,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:L(()=>r.current=!0,`onFocusCapture`),onBlurCapture:L(()=>r.current=!1,`onBlurCapture`)}}L(ht,`useFocusOutside`);function gt(){let e=new CustomEvent(ot);document.dispatchEvent(e)}L(gt,`dispatchUpdate`);function _t(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?it(i,a):i.dispatchEvent(a)}L(_t,`handleAndDispatchCustomEvent`);var vt=Object.defineProperty,R=(e,t)=>vt(e,`name`,{value:t,configurable:!0}),yt=`focusScope.autoFocusOnMount`,bt=`focusScope.autoFocusOnUnmount`,xt={bubbles:!1,cancelable:!0},St=P.forwardRef(R(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:s,...c}=e,[u,d]=P.useState(null),f=l(a),p=l(s),m=P.useRef(null),h=o(t,d),g=P.useRef(i);P.useEffect(()=>{g.current=i});let _=P.useCallback(e=>e?u?.contains(e)?!0:!!g.current?.some(t=>t.contains(e)):!1,[u]),v=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let e=function(e){if(v.paused||!u)return;let t=e.target;_(t)?m.current=t:z(m.current,{select:!0})},t=function(e){if(v.paused||!u)return;let t=e.relatedTarget;t!==null&&(_(t)||z(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&z(u)};R(e,`handleFocusIn`),R(t,`handleFocusOut`),R(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,u,v.paused,_]),P.useEffect(()=>{if(u){Nt.add(v);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(yt,xt);u.addEventListener(yt,f),u.dispatchEvent(t),t.defaultPrevented||(Dt(It(kt(u)),{select:!0}),document.activeElement===e&&z(u))}return()=>{u.removeEventListener(yt,f),setTimeout(()=>{let t=new CustomEvent(bt,xt);u.addEventListener(bt,p),u.dispatchEvent(t),t.defaultPrevented||z(e??document.body,{select:!0}),u.removeEventListener(bt,p),Nt.remove(v)},0)}}},[u,f,p,v]);let y=P.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ot(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&z(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&z(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,I.jsx)(rt.div,{tabIndex:-1,...c,ref:h,onKeyDown:y})},`FocusScope`)),Ct=P.createContext(null);function wt({registry:e,children:t}){return e?(0,I.jsx)(Ct.Provider,{value:e,children:t}):t}R(wt,`FocusScopeBranchProvider`);function Tt(){let[e,t]=P.useState([]);return{nodes:e,registry:P.useMemo(()=>({add:R(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:R(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}R(Tt,`useFocusScopeBranchRegistry`);function Et(e){let t=P.useContext(Ct);P.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}R(Et,`useFocusScopeBranch`);function Dt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(z(r,{select:t}),document.activeElement!==n)return}R(Dt,`focusFirst`);function Ot(e){let t=kt(e);return[At(t,e),At(t.reverse(),e)]}R(Ot,`getTabbableEdges`);function kt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:R(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}R(kt,`getTabbableCandidates`);function At(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):jt(r,{upTo:t})))return r}R(At,`findVisible`);function jt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}R(jt,`isHidden`);function Mt(e){return e instanceof HTMLInputElement&&`select`in e}R(Mt,`isSelectableInput`);function z(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}R(z,`focus`);var Nt=Pt();function Pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ft(e,t),e.unshift(t)},remove(t){e=Ft(e,t),e[0]?.resume()}}}R(Pt,`createFocusScopesStack`);function Ft(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}R(Ft,`arrayRemove`);function It(e){return e.filter(e=>e.tagName!==`A`)}R(It,`removeLinks`);var Lt=[`top`,`right`,`bottom`,`left`],B=Math.min,V=Math.max,Rt=Math.round,zt=Math.floor,H=e=>({x:e,y:e}),Bt={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vt(e,t,n){return V(e,B(t,n))}function U(e,t){return typeof e==`function`?e(t):e}function W(e){return e.split(`-`)[0]}function Ht(e){return e.split(`-`)[1]}function Ut(e){return e===`x`?`y`:`x`}function Wt(e){return e===`y`?`height`:`width`}function G(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gt(e){return Ut(G(e))}function Kt(e,t,n){n===void 0&&(n=!1);let r=Ht(e),i=Gt(e),a=Wt(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=tn(o)),[o,tn(o)]}function qt(e){let t=tn(e);return[Jt(e),t,Jt(t)]}function Jt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yt=[`left`,`right`],Xt=[`right`,`left`],Zt=[`top`,`bottom`],Qt=[`bottom`,`top`];function $t(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xt:Yt:t?Yt:Xt;case`left`:case`right`:return t?Zt:Qt;default:return[]}}function en(e,t,n,r){let i=Ht(e),a=$t(W(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jt)))),a}function tn(e){let t=W(e);return Bt[t]+e.slice(t.length)}function nn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function rn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:nn(e)}function an(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function on(e,t,n){let{reference:r,floating:i}=e,a=G(t),o=Gt(t),s=Wt(o),c=W(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ht(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function sn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=U(t,e),p=rn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=an(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=an(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var cn=50,ln=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:sn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=on(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<cn&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=on(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},un=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=U(e,t)||{};if(l==null)return{};let d=rn(u),f={x:n,y:r},p=Gt(i),m=Wt(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=B(d[_],T),D=B(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Vt(E,k,O),j=!c.arrow&&Ht(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),dn=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=U(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=W(r),_=G(o),v=W(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[tn(o)]:qt(o)),x=p!==`none`;!d&&x&&b.push(...en(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===G(t)||T.every(e=>G(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=G(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function fn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pn(e){return Lt.some(t=>e[t]>=0)}var mn=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=U(e,t);switch(i){case`referenceHidden`:{let e=fn(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:pn(e)}}}case`escaped`:{let e=fn(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:pn(e)}}}default:return{}}}}},hn=new Set([`left`,`top`]);async function gn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=W(n),s=Ht(n),c=G(n)===`y`,l=hn.has(o)?-1:1,u=a&&c?-1:1,d=U(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var _n=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await gn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},vn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=U(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=G(i),p=Ut(f),m=u[p],h=u[f],g=(e,t)=>Vt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},yn=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=U(e,t),u={x:n,y:r},d=G(i),f=Ut(d),p=u[f],m=u[d],h=U(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=hn.has(W(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},bn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=U(e,t),c=await i.detectOverflow(t,s),l=W(n),u=Ht(n),d=G(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=B(p-c[m],g),y=B(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*V(c.left,c.right):S=p-2*V(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function xn(){return typeof window<`u`}function Sn(e){return Cn(e)?(e.nodeName||``).toLowerCase():`#document`}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){return((Cn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Cn(e){return xn()?e instanceof Node||e instanceof K(e).Node:!1}function J(e){return xn()?e instanceof Element||e instanceof K(e).Element:!1}function Y(e){return xn()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function wn(e){return!xn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}function Tn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function En(e){return/^(table|td|th)$/.test(Sn(e))}function Dn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var On=/transform|translate|scale|rotate|perspective|filter/,kn=/paint|layout|strict|content/,An=e=>!!e&&e!==`none`,jn;function Mn(e){let t=J(e)?X(e):e;return An(t.transform)||An(t.translate)||An(t.scale)||An(t.rotate)||An(t.perspective)||!Pn()&&(An(t.backdropFilter)||An(t.filter))||On.test(t.willChange||``)||kn.test(t.contain||``)}function Nn(e){let t=Ln(e);for(;Y(t)&&!Fn(t);){if(Mn(t))return t;if(Dn(t))return null;t=Ln(t)}return null}function Pn(){return jn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),jn}function Fn(e){return/^(html|body|#document)$/.test(Sn(e))}function X(e){return K(e).getComputedStyle(e)}function In(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(Sn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||wn(e)&&e.host||q(e);return wn(t)?t.host:t}function Rn(e){let t=Ln(e);return Fn(t)?(e.ownerDocument||e).body:Y(t)&&Tn(t)?t:Rn(t)}function zn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Rn(e),i=r===e.ownerDocument?.body,a=K(r);if(i){let e=Bn(a);return t.concat(a,a.visualViewport||[],Tn(r)?r:[],e&&n?zn(e):[])}return t.concat(r,zn(r,[],n))}function Bn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vn(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Y(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rt(n)!==a||Rt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Hn(e){return J(e)?e:e.contextElement}function Un(e){let t=Hn(e);if(!Y(t))return H(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Vn(t),o=(a?Rt(n.width):n.width)/r,s=(a?Rt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Wn=H(0);function Gn(e){let t=K(e);return!Pn()||!t.visualViewport?Wn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===K(e)}function qn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Hn(e),o=H(1);t&&(r?J(r)&&(o=Un(r)):o=Un(e));let s=Kn(a,n,r)?Gn(a):H(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=K(a),t=J(r)?K(r):r,n=e,i=Bn(n);for(;i&&t!==n;){let e=Un(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=K(i),i=Bn(n)}}return an({width:u,height:d,x:c,y:l})}function Jn(e,t){let n=In(e).scrollLeft;return t?t.left+n:qn(q(e)).left+n}function Yn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Jn(e,n),y:n.top+t.scrollTop}}function Xn(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=q(r),s=t?Dn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=H(1),u=H(0),d=Y(r);if((d||!a)&&((Sn(r)!==`body`||Tn(o))&&(c=In(r)),d)){let e=qn(r);l=Un(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Yn(o,c):H(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Zn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Qn(e){let t=In(e),n=e.ownerDocument.body,r=V(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=V(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Jn(e),o=-t.scrollTop;return X(n).direction===`rtl`&&(a+=V(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var $n=25;function er(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=K(e),a=q(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Pn()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Jn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=$n&&(s-=o)}return{width:s,height:c,x:l,y:u}}function tr(e,t){let n=qn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Un(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function nr(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=er(e,n,t);else if(t===`document`)r=Qn(q(e));else if(J(t))r=tr(t,n);else{let n=Gn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return an(r)}function rr(e,t){let n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(e=>J(e)&&Sn(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Ln(e):e;for(;J(o)&&!Fn(o);){let e=X(o),t=Mn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Ln(o)}return t.set(e,r),r}function ir(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Dn(t)?[]:rr(t,this._c):[].concat(n),r],o=nr(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=nr(t,a[e],i);s=V(n.top,s),c=B(n.right,c),l=B(n.bottom,l),u=V(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ar(e){let{width:t,height:n}=Vn(e);return{width:t,height:n}}function or(e,t,n){let r=Y(t),i=q(t),a=n===`fixed`,o=qn(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=H(0);if((r||!a)&&((Sn(t)!==`body`||Tn(i))&&(s=In(t)),r)){let e=qn(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Jn(i));let l=i&&!r&&!a?Yn(i,s):H(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function sr(e){return X(e).position===`static`}function cr(e,t){if(!Y(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function lr(e,t){let n=K(e);if(Dn(e))return n;if(!Y(e)){let t=Ln(e);for(;t&&!Fn(t);){if(J(t)&&!sr(t))return t;t=Ln(t)}return n}let r=cr(e,t);for(;r&&En(r)&&sr(r);)r=cr(r,t);return r&&Fn(r)&&sr(r)&&!Mn(r)?n:r||Nn(e)||n}var ur=async function(e){let t=this.getOffsetParent||lr,n=this.getDimensions,r=await n(e.floating);return{reference:or(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dr(e){return X(e).direction===`rtl`}var fr={convertOffsetParentRelativeRectToViewportRelativeRect:Xn,getDocumentElement:q,getClippingRect:ir,getOffsetParent:lr,getElementRects:ur,getClientRects:Zn,getDimensions:ar,getScale:Un,isElement:J,isRTL:dr};function pr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mr(e,t,n){let r=null,i,a=q(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=zt(d),h=zt(a.clientWidth-(u+f)),g=zt(a.clientHeight-(d+p)),_=zt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:V(0,B(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!pr(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=K(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function hr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Hn(e),u=i||a?[...l?zn(l):[],...t?zn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?mr(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?qn(e):null;c&&g();function g(){let t=qn(e);h&&!pr(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var gr=_n,_r=vn,vr=dn,yr=bn,br=mn,xr=un,Sr=yn,Cr=(e,t,n)=>{let r=new Map,i=n??{},a={...fr,...i.platform,_c:r};return ln(e,t,{...i,platform:a})},wr=typeof document<`u`?P.useLayoutEffect:function(){};function Tr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Tr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Er(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dr(e,t){let n=Er(e);return Math.round(t*n)/n}function Or(e){let t=P.useRef(e);return wr(()=>{t.current=e}),t}function kr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Tr(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=Or(c),D=Or(i),O=Or(l),k=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Cr(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Tr(w.current,t)&&(w.current=t,ze.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);wr(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=P.useRef(!1);wr(()=>(A.current=!0,()=>{A.current=!1}),[]),wr(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=P.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Dr(M.floating,u.x),r=Dr(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Er(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var Ar=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:xr({element:r.current,padding:i}).fn(n):r?xr({element:r,padding:i}).fn(n):{}}}},jr=(e,t)=>{let n=gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mr=(e,t)=>{let n=_r(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nr=(e,t)=>({fn:Sr(e).fn,options:[e,t]}),Pr=(e,t)=>{let n=vr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fr=(e,t)=>{let n=yr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ir=(e,t)=>{let n=br(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lr=(e,t)=>{let n=Ar(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rr=Object.defineProperty,Z=(e,t)=>Rr(e,`name`,{value:t,configurable:!0});function zr(e){let t=P.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];qr(r)&&typeof Qr==`function`&&(r=Qr(r._payload)),P.Children.forEach(r,e=>{if(Gr(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;qr(n)&&typeof Qr==`function`&&(n=Qr(n._payload)),a=Hr(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=P.cloneElement(a,void 0,c):!s&&P.Children.count(r)===1&&P.isValidElement(r)&&(a=r);let l=a?Wr(a):void 0,u=o(n,l);if(!a){if(r||r===0)throw Error(s?Zr(e):Xr(e));return r}let d=Ur(i,a.props??{});return a.type!==P.Fragment&&(d.ref=n?u:l),P.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Z(zr,`createSlot`);var Br=Symbol.for(`radix.slottable`);function Vr(e){let t=Z(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Br,t}Z(Vr,`createSlottable`);var Hr=Z((e,t)=>{if(`child`in e.props){let t=e.props.child;return P.isValidElement(t)?P.cloneElement(t,void 0,e.props.children(t.props.children)):null}return P.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Ur(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Yr(a,i))}return{...e,...n}}Z(Ur,`mergeProps`);function Wr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Z(Wr,`getElementRef`);function Gr(e){return P.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Br}Z(Gr,`isSlottable`);var Kr=Symbol.for(`react.lazy`);function qr(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Kr&&`_payload`in e&&Jr(e._payload)}Z(qr,`isLazyComponent`);function Jr(e){return typeof e==`object`&&!!e&&`then`in e}Z(Jr,`isPromiseLike`);function Yr(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Z(Yr,`concatAriaDescribedby`);var Xr=Z(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Zr=Z(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Qr=P.use,$r=Object.defineProperty,ei=(e,t)=>$r(e,`name`,{value:t,configurable:!0}),ti=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=zr(`Primitive.${t}`),r=P.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ni(e,t){e&&ze.flushSync(()=>e.dispatchEvent(t))}ei(ni,`dispatchDiscreteCustomEvent`);var ri=Object.defineProperty,ii=(e,t)=>ri(e,`name`,{value:t,configurable:!0});function ai(e){let[t,n]=P.useState(void 0);return d(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}ii(ai,`useSize`);var oi=Object.defineProperty,si=(e,t)=>oi(e,`name`,{value:t,configurable:!0}),ci={Partial:`partial`,Always:`always`},li={Optimized:`optimized`,Always:`always`},ui=`Popper`,[di,fi]=u(ui),[pi,mi]=di(ui),hi=si(e=>{let{__scopePopper:t,children:n}=e,[r,i]=P.useState(null),[a,o]=P.useState(void 0);return(0,I.jsx)(pi,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),gi=`PopperAnchor`,_i=P.forwardRef(si(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=mi(gi,n),s=P.useRef(null),c=a.onAnchorChange,l=P.useCallback(e=>{s.current=e,e&&c(e)},[c]),u=o(t,l),d=P.useRef(null);P.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&c(d.current)});let f=a.placementState&&wi(a.placementState),p=f?.[0],m=f?.[1];return r?null:(0,I.jsx)(ti.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:u})},`PopperAnchor`)),vi=`PopperContent`,[yi,bi]=di(vi),xi=P.forwardRef(si(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=ci.Partial,hideWhenDetached:h=!1,updatePositionStrategy:g=li.Optimized,onPlaced:_,...v}=e,y=mi(vi,n),[b,x]=P.useState(null),S=o(t,x),[C,w]=P.useState(null),T=ai(C),E=T?.width??0,D=T?.height??0,O=r+(a===`center`?``:`-`+a),k=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},A=Array.isArray(f)?f:[f],j=A.length>0,M={padding:k,boundary:A.filter(Si),altBoundary:j},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:N}=kr({strategy:`fixed`,placement:O,whileElementsMounted:si((...e)=>hr(...e,{animationFrame:g===li.Always}),`whileElementsMounted`),elements:{reference:y.anchor},middleware:[jr({mainAxis:i+D,alignmentAxis:s}),u&&Mr({mainAxis:!0,crossAxis:!1,limiter:m===ci.Partial?Nr():void 0,...M}),u&&Pr({...M}),Fr({...M,apply:si(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),C&&Lr({element:C,padding:c}),Ci({arrowWidth:E,arrowHeight:D}),h&&Ir({strategy:`referenceHidden`,...M,boundary:j?M.boundary:void 0})]}),ie=y.setPlacementState;d(()=>(ie(ne),()=>{ie(void 0)}),[ne,ie]);let[ae,oe]=wi(ne),se=l(_);d(()=>{re&&se?.()},[re,se]);let ce=N.arrow?.x,le=N.arrow?.y,ue=N.arrow?.centerOffset!==0,[de,fe]=P.useState();return d(()=>{b&&fe(window.getComputedStyle(b).zIndex)},[b]),(0,I.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(yi,{scope:n,placedSide:ae,placedAlign:oe,onArrowChange:w,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,I.jsx)(ti.div,{"data-side":ae,"data-align":oe,...v,ref:S,style:{...v.style,animation:re?v.style?.animation:`none`}})})})},`PopperContent`));function Si(e){return e!==null}si(Si,`isNotNull`);var Ci=si(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=wi(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function wi(e){let[t,n=`center`]=e.split(`-`);return[t,n]}si(wi,`getSideAndAlignFromPlacement`);var Ti=Object.defineProperty,Ei=P.forwardRef(((e,t)=>Ti(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=P.useState(!1);d(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ze.createPortal((0,I.jsx)(rt.div,{...r,ref:t}),o):null},`Portal`)),Di=Object.defineProperty,Q=(e,t)=>Di(e,`name`,{value:t,configurable:!0});function Oi(e,t){return P.useReducer((e,n)=>t[e][n]??e,e)}Q(Oi,`useStateMachine`);var ki=Q(e=>{let{present:t,children:n}=e,r=Ai(t),i=typeof n==`function`?n({present:r.isPresent}):P.Children.only(n),a=Mi(r.ref,Pi(i));return typeof n==`function`||r.isPresent?P.cloneElement(i,{ref:a}):null},`Presence`);function Ai(e){let[t,n]=P.useState(),r=P.useRef(null),i=P.useRef(e),a=P.useRef(`none`),o=P.useRef(void 0),[s,c]=Oi(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return P.useEffect(()=>{s===`mounted`?(a.current=o.current??Ni(r.current),o.current=void 0):a.current=`none`},[s]),d(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ni(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),d(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Q(a=>{let o=Ni(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Q(e=>{e.target===t&&(a.current=Ni(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:P.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ni(t)}else r.current=null;n(e)},[])}}Q(Ai,`usePresence`);function ji(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Q(ji,`setRef`);function Mi(...e){let t=P.useRef(e);return t.current=e,P.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ji(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():ji(n[e],null)}}},[])}Q(Mi,`useStableComposedRefs`);function Ni(e){return e?.animationName||`none`}Q(Ni,`getAnimationName`);function Pi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Q(Pi,`getElementRef`);var Fi=Object.defineProperty,$=(e,t)=>Fi(e,`name`,{value:t,configurable:!0}),Ii=`Popover`,[Li,Ri]=u(Ii,[fi]),zi=fi(),[Bi,Vi]=Li(Ii),Hi=$(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=zi(t),c=P.useRef(null),[l,u]=P.useState(!1),[d,f]=P.useState(0),[h,g]=P.useState(0),[_,v]=m({prop:r,defaultProp:i??!1,onChange:a,caller:Ii});return(0,I.jsx)(hi,{...s,children:(0,I.jsx)(Bi,{scope:t,contentId:p(),titleId:p(),descriptionId:p(),titlePresent:d>0,descriptionPresent:h>0,setTitleCount:f,setDescriptionCount:g,triggerRef:c,open:_,onOpenChange:v,onOpenToggle:P.useCallback(()=>v(e=>!e),[v]),hasCustomAnchor:l,onCustomAnchorAdd:P.useCallback(()=>u(!0),[]),onCustomAnchorRemove:P.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),Ui=`PopoverTrigger`,Wi=P.forwardRef($(function(e,t){let{__scopePopover:n,...r}=e,i=Vi(Ui,n),a=zi(n),s=o(t,i.triggerRef),c=(0,I.jsx)(rt.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":na(i.open),...r,ref:s,onClick:g(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:(0,I.jsx)(_i,{asChild:!0,...a,children:c})},`PopoverTrigger`)),Gi=`PopoverPortal`,[Ki,qi]=Li(Gi,{forceMount:void 0}),Ji=$(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Vi(Gi,t);return(0,I.jsx)(Ki,{scope:t,forceMount:n,children:(0,I.jsx)(ki,{present:n||a.open,children:(0,I.jsx)(Ei,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Yi=`PopoverContent`,Xi=P.forwardRef($(function(e,t){let n=qi(Yi,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Vi(Yi,e.__scopePopover);return(0,I.jsx)(ki,{present:r||a.open,children:a.modal?(0,I.jsx)(Qi,{...i,ref:t}):(0,I.jsx)($i,{...i,ref:t})})},`PopoverContent`)),Zi=Ve(`PopoverContent.RemoveScroll`),Qi=P.forwardRef($(function(e,t){let n=Vi(Yi,e.__scopePopover),r=P.useRef(null),i=o(t,r),a=P.useRef(!1),{nodes:s,registry:c}=Tt();return P.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,I.jsx)(h,{as:Zi,allowPinchZoom:!0,shards:P.useMemo(()=>[r,...s.map(e=>({current:e}))],[r,s]),children:(0,I.jsx)(ea,{...e,ref:i,branchNodes:s,branchRegistry:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:g(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),$i=P.forwardRef($(function(e,t){let n=Vi(Yi,e.__scopePopover),r=P.useRef(!1),i=P.useRef(!1);return(0,I.jsx)(ea,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),ea=P.forwardRef($(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,"aria-describedby":p,branchNodes:m,branchRegistry:h,...g}=e,_=Vi(Yi,n),v=zi(n),[y,b]=P.useState(null),x=o(t,b);return Et(y),c(),(0,I.jsx)(wt,{registry:h,children:(0,I.jsx)(St,{asChild:!0,loop:!0,trapped:r,branches:m,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(dt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>_.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,I.jsx)(xi,{"data-state":na(_.open),role:`dialog`,id:_.contentId,"aria-labelledby":_.titlePresent?_.titleId:void 0,"aria-describedby":_.descriptionPresent?ra(p,_.descriptionId):p,...v,...g,ref:x,style:{...g.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`)),ta=P.forwardRef($(function(e,t){let{__scopePopover:n,...r}=e,i=Vi(`PopoverTitle`,n),{setTitleCount:a}=i;return d(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,I.jsx)(rt.h2,{id:i.titleId,...r,ref:t})},`PopoverTitle`));function na(e){return e?`open`:`closed`}$(na,`getState`);function ra(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}$(ra,`concatAriaDescribedby`);var ia=`adventurer.adventurer-neutral.avataaars.avataaars-neutral.big-ears.big-ears-neutral.big-smile.bottts.bottts-neutral.cameo.clay.critters.croodles.croodles-neutral.cutouts.dylan.fun-emoji.gaze.line-face.lorelei.lorelei-neutral.marbles.micah.miniavs.moods.notionists.notionists-neutral.open-peeps.personas.pixel-art.pixel-art-neutral.pixelbot.shadows.sprouts.thumbs.toon-head.voxel-art.voxel-bot`.split(`.`);function aa(e){return typeof e==`string`&&ia.includes(e)}function oa(e,t){return Array.from(e?.trim()||t?.trim()||`?`)[0]?.toLocaleUpperCase()??`?`}function sa(e,t,n=!1){return e&&aa(t)?i(`/api/users/${encodeURIComponent(e)}/avatar.svg?style=${t}&v=2${n?`&preview=1`:``}`):null}function ca({userId:e,name:t,username:n,avatarStyle:r,className:i=``,preview:a=!1}){let o=sa(e,r,a),s=oa(t,n);return(0,I.jsx)(`span`,{className:`user-avatar ${i}`.trim(),"aria-hidden":`true`,children:o?(0,I.jsx)(la,{source:o,initial:s,lazy:a},o):s})}function la({source:e,initial:t,lazy:n}){let[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(!1);return(0,I.jsxs)(I.Fragment,{children:[(!r||a)&&t,!a&&(0,I.jsx)(`img`,{src:e,alt:``,decoding:`async`,loading:n?`lazy`:`eager`,style:{visibility:r?`visible`:`hidden`},onLoad:()=>i(!0),onError:()=>o(!0)})]})}function ua(e){return e.replace(/(\p{Script=Han})(\d)/gu,`$1 $2`).replace(/(\d)(\p{Script=Han})/gu,`$1 $2`)}function da(e,t,n){let r=typeof e==`string`?new Date(e):e;return Number.isFinite(r.getTime())?ua(r.toLocaleString(t,n)):typeof e==`string`?e:r.toString()}function fa(){window.dispatchEvent(new Event(`texlite:agent-tasks`))}var pa={visible:!1,activeCount:0};function ma(e,t){let[n,r]=(0,P.useState)(null);return(0,P.useEffect)(()=>{let n,i=!1,o=()=>{if(document.visibilityState===`hidden`)return;n?.abort(),n=new AbortController;let o=n,s=t?`/api/agents/access?${new URLSearchParams({project:t})}`:`/api/agents/access`;a(s,{signal:o.signal}).then(n=>{!i&&!o.signal.aborted&&r({scope:e,projectId:t,access:n})}).catch(()=>void 0)};o();let s=window.setInterval(o,5e3);return window.addEventListener(`focus`,o),window.addEventListener(`texlite:agents-policy`,o),window.addEventListener(`texlite:agent-tasks`,o),document.addEventListener(`visibilitychange`,o),()=>{i=!0,n?.abort(),window.clearInterval(s),window.removeEventListener(`focus`,o),window.removeEventListener(`texlite:agents-policy`,o),window.removeEventListener(`texlite:agent-tasks`,o),document.removeEventListener(`visibilitychange`,o)}},[e,t]),n?.scope===e&&n.projectId===t?n.access:pa}function ha(e,t,n,r){let{deletedKey:i,keyOf:a,contains:o=(e,t)=>e===t,duration:s}=n,c=t.map(e=>({item:e,removeAt:null})),l=new Set(t.map(a));return e.forEach((e,t)=>{let n=a(e.item);l.has(n)||(e.removeAt===null?!i||!o(i,n):e.removeAt<=r)||c.splice(Math.min(t,c.length),0,{item:e.item,removeAt:e.removeAt??r+s+50})}),c}function ga(e,t){let{scopeKey:n,deletedKey:r,keyOf:i}=t,[a,o]=(0,P.useState)(()=>({items:e,scopeKey:n,deletedKey:r,entries:e.map(e=>({item:e,removeAt:null}))}));if(a.items!==e||a.scopeKey!==n||a.deletedKey!==r){let i=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;o({items:e,scopeKey:n,deletedKey:r,entries:a.scopeKey!==n||i?e.map(e=>({item:e,removeAt:null})):ha(a.entries,e,t,Date.now())})}let s=(0,P.useCallback)(e=>{o(t=>({...t,entries:t.entries.filter(t=>i(t.item)!==e||t.removeAt===null)}))},[i]);return(0,P.useEffect)(()=>{let e=a.entries.flatMap(e=>e.removeAt===null?[]:[e.removeAt]);if(!e.length)return;let t=window.setTimeout(()=>{let e=Date.now();o(t=>({...t,entries:t.entries.filter(t=>t.removeAt===null||t.removeAt>e)}))},Math.max(0,Math.min(...e)-Date.now()));return()=>window.clearTimeout(t)},[a.entries]),{entries:a.entries,finishExit:s}}function _a(e){e&&e.style.setProperty(`--deletion-height`,`${e.getBoundingClientRect().height}px`)}function va(){let[e,t]=(0,P.useState)(()=>Date.now());return(0,P.useEffect)(()=>{let e=window.setInterval(()=>t(Date.now()),6e4);return()=>window.clearInterval(e)},[]),e}function ya(e,t,n,r){let i=new Date(e).getTime();if(!Number.isFinite(i))return e;let a=i-n,o=Math.abs(a),s=6e4,c=60*s,l=24*c;if(o<s)return ua(new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(0,`second`));if(o>2592e5){let e=Math.floor(o/l);return r(`projects.relativeDays${a<0?`Past`:`Future`}`,{days:e,hours:0,minutes:0})}if(o>=l){let e=Math.floor(o/l),t=Math.floor(o%l/c);return r(`projects.relative${t>0?`DaysHours`:`Days`}${a<0?`Past`:`Future`}`,{days:e,hours:t,minutes:0})}if(o>=c){let e=Math.floor(o/c),t=Math.floor(o%c/s);return r(`projects.relative${t>0?`HoursMinutes`:`Hours`}${a<0?`Past`:`Future`}`,{days:0,hours:e,minutes:t})}let u=Math.sign(a)*Math.max(1,Math.floor(o/s));return ua(new Intl.RelativeTimeFormat(t,{numeric:`always`}).format(u,`minute`))}export{ve as A,M as B,Me as C,we as D,Ee as E,ce as F,S as G,O as H,oe as I,b as K,ie as L,me as M,fe as N,Se as O,ue as P,re as R,Pe as S,Oe as T,E as U,A as V,w as W,_i as _,fa as a,Re as b,ca as c,Hi as d,Xi as f,hi as g,Wi as h,ga as i,ge as j,be as k,ia as l,ta as m,va as n,ma as o,Ji as p,v as q,_a as r,da as s,ya as t,aa as u,xi as v,Ae as w,Ie as x,fi as y,te as z};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./index-h0BVkT8k.js";var t={name:`tags`,size:24,node:[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t}from"./react-DUEFWlB7.js";import{r as n}from"./basePath-B5-c90eh.js";import{w as r}from"./ProjectWorkspace-BnT5JPTA.js";var i=e(t(),1),a={background:`#1e1e2e`,foreground:`#cdd6f4`,cursor:`#f5e0dc`,cursorAccent:`#1e1e2e`,selectionBackground:`#45475a`,selectionForeground:`#cdd6f4`,selectionInactiveBackground:`#313244`,scrollbarSliderBackground:`#45475a`,scrollbarSliderHoverBackground:`#585b70`,scrollbarSliderActiveBackground:`#6c7086`,black:`#45475a`,red:`#f38ba8`,green:`#a6e3a1`,yellow:`#f9e2af`,blue:`#89b4fa`,magenta:`#cba6f7`,cyan:`#94e2d5`,white:`#bac2de`,brightBlack:`#9399b2`,brightRed:`#f38ba8`,brightGreen:`#a6e3a1`,brightYellow:`#f9e2af`,brightBlue:`#89b4fa`,brightMagenta:`#cba6f7`,brightCyan:`#94e2d5`,brightWhite:`#cdd6f4`},o={background:`#eff1f5`,foreground:`#4c4f69`,cursor:`#4c4f69`,cursorAccent:`#eff1f5`,selectionBackground:`#ccd0da`,selectionForeground:`#4c4f69`,selectionInactiveBackground:`#e6e9ef`,scrollbarSliderBackground:`#bcc0cc`,scrollbarSliderHoverBackground:`#9ca0b0`,scrollbarSliderActiveBackground:`#8c8fa1`,black:`#5c5f77`,red:`#d20f39`,green:`#40a02b`,yellow:`#df8e1d`,blue:`#1e66f5`,magenta:`#ea76cb`,cyan:`#179299`,white:`#acb0be`,brightBlack:`#acb0be`,brightRed:`#d20f39`,brightGreen:`#40a02b`,brightYellow:`#df8e1d`,brightBlue:`#1e66f5`,brightMagenta:`#ea76cb`,brightCyan:`#179299`,brightWhite:`#bcc0cc`},s={background:`#282828`,foreground:`#ebdbb2`,cursor:`#ebdbb2`,cursorAccent:`#282828`,selectionBackground:`#504945`,selectionForeground:`#fbf1c7`,selectionInactiveBackground:`#3c3836`,scrollbarSliderBackground:`#504945`,scrollbarSliderHoverBackground:`#665c54`,scrollbarSliderActiveBackground:`#7c6f64`,black:`#282828`,red:`#cc241d`,green:`#98971a`,yellow:`#d79921`,blue:`#458588`,magenta:`#b16286`,cyan:`#689d6a`,white:`#a89984`,brightBlack:`#928374`,brightRed:`#fb4934`,brightGreen:`#b8bb26`,brightYellow:`#fabd2f`,brightBlue:`#83a598`,brightMagenta:`#d3869b`,brightCyan:`#8ec07c`,brightWhite:`#ebdbb2`},c={default:{labelKey:`projectSettings.terminalThemeDefault`,colorScheme:`dark`,colors:a,muted:a.brightBlack,preview:{green:a.brightGreen,blue:a.brightBlue,purple:a.brightMagenta}},"catppuccin-latte":{labelKey:`projectSettings.terminalThemeCatppuccin`,colorScheme:`light`,colors:o,muted:`#5c5f77`,preview:{green:`#2d7b20`,blue:`#1b60e8`,purple:`#8839ef`}},"gruvbox-dark":{labelKey:`projectSettings.terminalThemeGruvbox`,colorScheme:`dark`,colors:s,muted:`#a89984`,preview:{green:s.brightGreen,blue:s.brightBlue,purple:s.brightMagenta}}};function l(e){let{colors:t,muted:n,colorScheme:r,preview:i}=c[e];return{colorScheme:r,"--terminal-bg":t.background,"--terminal-fg":t.foreground,"--terminal-border":t.scrollbarSliderBackground,"--terminal-muted":n,"--terminal-green":i.green,"--terminal-blue":i.blue,"--terminal-purple":i.purple}}var u=[...r,{id:`system`,labelKey:`projectSettings.fontSystem`,stack:`ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace`}],d=[11,12,13,14,15,16,18,20],f=1.2,p={font:`jetbrains`,fontSize:13,theme:`default`},m=n(`texlite-terminal-preferences`);function h(e){return(u.find(t=>t.id===e)??u[0]).stack}function g(e){let t=e&&typeof e==`object`?e:{};return{font:u.some(e=>e.id===t.font)?t.font:p.font,fontSize:d.includes(t.fontSize)?t.fontSize:p.fontSize,theme:typeof t.theme==`string`&&Object.hasOwn(c,t.theme)?t.theme:p.theme}}function _(){try{return g(JSON.parse(window.localStorage.getItem(m)??`{}`))}catch{return{...p}}}var v,y=new Set;function b(){for(let e of y)e()}function x(){return v||(v=_(),typeof window<`u`&&window.addEventListener(`storage`,e=>{if(e.key===null||e.key===m){try{if(e.storageArea!==window.localStorage)return}catch{return}v=_(),b()}})),v}function S(e){x(),v=g(e);let t=!1;try{window.localStorage.setItem(m,JSON.stringify(v)),t=!0}catch{}return b(),t}function C(e){return y.add(e),()=>{y.delete(e)}}function w(){return(0,i.useSyncExternalStore)(C,x,()=>p)}export{f as a,c,u as i,d as n,w as o,h as r,l as s,S as t};
|
|
Binary file
|
|
Binary file
|