@powerhousedao/connect 5.1.0-dev.9 → 5.1.0-staging.0

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.
Files changed (54) hide show
  1. package/dist/assets/{AddDriveModal-sL0hSfwK.js → AddDriveModal-CGnuKCkz.js} +1 -1
  2. package/dist/assets/ClearStorageModal-tHn6sdVv.js +1 -0
  3. package/dist/assets/{CookiesPolicyModal-8Ea1bpuS.js → CookiesPolicyModal-D5y1O9wD.js} +1 -1
  4. package/dist/assets/CreateDocumentModal-DU4C2Y6P.js +1 -0
  5. package/dist/assets/{DebugSettingsModal-BN0vka2j.js → DebugSettingsModal-BLV4d9N1.js} +1 -1
  6. package/dist/assets/{DeleteDriveModal-BkMiD-at.js → DeleteDriveModal-CQq-0aWd.js} +1 -1
  7. package/dist/assets/DeleteItemModal-JV0AvuwF.js +1 -0
  8. package/dist/assets/DisclaimerModal-DQZyl_zf.js +1 -0
  9. package/dist/assets/DriveSettingsModal-yXsOiCLy.js +1 -0
  10. package/dist/assets/{ExportDocumentWithErrorsModal--MRX9RA5.js → ExportDocumentWithErrorsModal-CPfizBgB.js} +1 -1
  11. package/dist/assets/SettingsModal-GeNqOEFN.js +1 -0
  12. package/dist/assets/{UpgradeDriveModal-RsikHBVp.js → UpgradeDriveModal-BCRmp5F4.js} +1 -1
  13. package/dist/assets/{design_system-BtrDHANm.js → design_system-pnKFY6jM.js} +1 -1
  14. package/dist/assets/design_system_connect-BrlN-7x3.js +104 -0
  15. package/dist/assets/{design_system_ui-CXZVaXzt.js → design_system_ui-Cz-kMJRJ.js} +1 -1
  16. package/dist/assets/{document_drive-N2jFG7-p.js → document_drive-CVkeqJ3l.js} +1 -1
  17. package/dist/assets/{document_engineering-CZ8g9riq.js → document_engineering-BAszqzBd.js} +1 -1
  18. package/dist/assets/{document_model_editor-C2QDzIWG.js → document_model_editor-D5oPro82.js} +4 -4
  19. package/dist/assets/{drive_explorer-DHMI_z5h.js → drive_explorer-C6clT2Df.js} +2 -2
  20. package/dist/assets/{graphql-editor-B_sLuXTF.js → graphql-editor-C6f63OmN.js} +1 -1
  21. package/dist/assets/{hooks-CrcQ2Zxj.js → hooks-BySGfjQp.js} +1 -1
  22. package/dist/assets/index-BYfBva47.js +20 -0
  23. package/dist/assets/index-XUlAOLkX.css +1 -0
  24. package/dist/assets/{json-editor-xWjFAcl1.js → json-editor-D27WLv4C.js} +1 -1
  25. package/dist/assets/nodefs-AYr2EwM_.js +1 -0
  26. package/dist/assets/opfs-ahp-rEGVoJkP.js +3 -0
  27. package/dist/assets/reactor_browser-D4maXKS-.js +25 -0
  28. package/dist/assets/state-schemas-DGMOULa-.js +2 -0
  29. package/dist/index.html +9 -9
  30. package/lib/package.copy.json +1 -1
  31. package/lib/src/feature-flags.d.ts +17 -3
  32. package/lib/src/feature-flags.d.ts.map +1 -1
  33. package/lib/src/feature-flags.js +32 -3
  34. package/lib/src/feature-flags.js.map +1 -1
  35. package/lib/src/store/reactor.d.ts.map +1 -1
  36. package/lib/src/store/reactor.js +5 -5
  37. package/lib/src/store/reactor.js.map +1 -1
  38. package/lib/tsconfig.tsbuildinfo +1 -1
  39. package/nginx.conf +7 -0
  40. package/package.copy.json +1 -1
  41. package/package.json +10 -10
  42. package/dist/assets/ClearStorageModal-taO2ME0w.js +0 -1
  43. package/dist/assets/CreateDocumentModal-CSVg8ZHf.js +0 -1
  44. package/dist/assets/DeleteItemModal-DYfBVcdK.js +0 -1
  45. package/dist/assets/DisclaimerModal-orJjo4Cr.js +0 -1
  46. package/dist/assets/DriveSettingsModal-DghD5DLg.js +0 -1
  47. package/dist/assets/SettingsModal-DyKVA0Ca.js +0 -1
  48. package/dist/assets/design_system_connect-CDNGzuLc.js +0 -45
  49. package/dist/assets/index-Br7E7qjt.css +0 -1
  50. package/dist/assets/index-DCLcMalw.js +0 -78
  51. package/dist/assets/nodefs-DTI9wPNC.js +0 -1
  52. package/dist/assets/opfs-ahp-gTaseGJ8.js +0 -3
  53. package/dist/assets/reactor_browser-h6aSTneX.js +0 -25
  54. package/dist/assets/state-schemas-DRj4Gqo5.js +0 -2
@@ -1 +1 @@
1
- import{j as D}from"./document_model_editor-C2QDzIWG.js";import{t as s,a as c}from"./index-DCLcMalw.js";import{V as b,E as g,D as w,av as A,aw as i,as as T,s as d,ax as x}from"./reactor_browser-h6aSTneX.js";import{o as M}from"./design_system_connect-CDNGzuLc.js";import{x as l}from"./document_drive-N2jFG7-p.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-BtrDHANm.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-9RNJ00DB.js";import"./config-CU-aFfVJ.js";function N(){const p=b()?.type==="addDrive",n=g(),a=w(),t=A(),m=async e=>{try{const r=t?.find(h=>h.id===e.appId),o=await x({id:"",slug:"",global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},r?.id);if(s(c("notifications.addDriveSuccess"),{type:"connect-success"}),!o)return;d(o)}catch(r){console.error(r)}},u=async e=>{try{const r=await T(e.url,{sharingType:e.sharingType,availableOffline:e.availableOffline,listeners:[{block:!0,callInfo:{data:e.url,name:"switchboard-push",transmitterType:"SwitchboardPush"},filter:{branch:["main"],documentId:["*"],documentType:["*"],scope:["global"]},label:"Switchboard Sync",listenerId:"1",system:!0}],triggers:[]});if(s(c("notifications.addDriveSuccess"),{type:"connect-success"}),!r)return;d(r)}catch(r){console.error(r)}};async function v(e){await m(e),i()}async function f(e){await u(e),i()}const y=!!t?.length;return D.jsx(M,{open:p&&y,onAddLocalDrive:v,onAddRemoteDrive:f,requestPublicDrive:async e=>{try{const r=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${r}`})}catch(r){console.error(r);const o=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${o}`})}},onOpenChange:e=>{if(!e)return i()},appOptions:t?.map(e=>({id:e.id,name:e.name,driveEditor:e.id}))||[]})}export{N as AddDriveModal};
1
+ import{j as D}from"./document_model_editor-D5oPro82.js";import{t as s,a as c}from"./index-BYfBva47.js";import{V as b,E as g,D as w,aw as A,ax as i,at as T,s as d,ay as x}from"./reactor_browser-D4maXKS-.js";import{r as M}from"./design_system_connect-BrlN-7x3.js";import{x as l}from"./document_drive-CVkeqJ3l.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-9RNJ00DB.js";import"./config-CU-aFfVJ.js";function N(){const p=b()?.type==="addDrive",n=g(),a=w(),t=A(),m=async e=>{try{const r=t?.find(h=>h.id===e.appId),o=await x({id:"",slug:"",global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},r?.id);if(s(c("notifications.addDriveSuccess"),{type:"connect-success"}),!o)return;d(o)}catch(r){console.error(r)}},u=async e=>{try{const r=await T(e.url,{sharingType:e.sharingType,availableOffline:e.availableOffline,listeners:[{block:!0,callInfo:{data:e.url,name:"switchboard-push",transmitterType:"SwitchboardPush"},filter:{branch:["main"],documentId:["*"],documentType:["*"],scope:["global"]},label:"Switchboard Sync",listenerId:"1",system:!0}],triggers:[]});if(s(c("notifications.addDriveSuccess"),{type:"connect-success"}),!r)return;d(r)}catch(r){console.error(r)}};async function v(e){await m(e),i()}async function f(e){await u(e),i()}const y=!!t?.length;return D.jsx(M,{open:p&&y,onAddLocalDrive:v,onAddRemoteDrive:f,requestPublicDrive:async e=>{try{const r=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${r}`})}catch(r){console.error(r);const o=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${o}`})}},onOpenChange:e=>{if(!e)return i()},appOptions:t?.map(e=>({id:e.id,name:e.name,driveEditor:e.id}))||[]})}export{N as AddDriveModal};
@@ -0,0 +1 @@
1
+ import{j as s}from"./document_model_editor-D5oPro82.js";import{r as l}from"./sentry_react-cODD7zWc.js";import{u as c,c as m}from"./index-BYfBva47.js";import{s as p}from"./design_system_connect-BrlN-7x3.js";import{V as d,w as g,ax as f,s as u,f as S}from"./reactor_browser-D4maXKS-.js";import{t as h}from"./document_drive-CVkeqJ3l.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-9RNJ00DB.js";import"./config-CU-aFfVJ.js";const r=h(["ClearStorage"]);function z(){const a=d()?.type==="clearStorage",{t:o}=c(),[n,e]=l.useState(!1);function i(){e(!0),m().then(()=>{r.info("Storage cleared"),u(void 0),S(void 0),window.location.reload()}).catch(t=>{r.error("Error clearing storage",t),e(!1)})}return s.jsx(p,{open:a,header:o("modals.clearStorage.title"),title:o("modals.clearStorage.title"),body:o("modals.connectSettings.clearStorage.confirmation.body"),cancelLabel:o("common.cancel"),continueLabel:o("modals.connectSettings.clearStorage.confirmation.clearButton"),onCancel:()=>g({type:"settings"}),onContinue:i,onOpenChange:t=>{if(!t)return f()},continueButtonProps:{disabled:n}})}export{z as ClearStorageModal};
@@ -1 +1 @@
1
- import{j as o}from"./document_model_editor-C2QDzIWG.js";import{u as i,T as e}from"./index-DCLcMalw.js";import{q as l}from"./design_system_connect-CDNGzuLc.js";import{V as m,aw as r}from"./reactor_browser-h6aSTneX.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-BtrDHANm.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-N2jFG7-p.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const g=()=>{const s=m()?.type==="cookiesPolicy",{t}=i();return o.jsx(l,{open:s,header:t("modals.cookiesPolicy.title"),body:o.jsx(e,{i18nKey:"modals.cookiesPolicy.body",components:{subtitle:o.jsx("h2",{className:"mb-4 text-lg font-bold"}),p:o.jsx("p",{className:"mb-2"}),list:o.jsx("ul",{className:"mb-4 list-disc pl-6"}),bullet:o.jsx("li",{})}}),bodyProps:{className:"text-left"},closeLabel:"Close",onContinue:()=>r(),overlayProps:{style:{zIndex:1e4}}})};export{g as CookiesPolicyModal};
1
+ import{j as o}from"./document_model_editor-D5oPro82.js";import{u as i,T as e}from"./index-BYfBva47.js";import{v as l}from"./design_system_connect-BrlN-7x3.js";import{V as m,ax as r}from"./reactor_browser-D4maXKS-.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const g=()=>{const s=m()?.type==="cookiesPolicy",{t}=i();return o.jsx(l,{open:s,header:t("modals.cookiesPolicy.title"),body:o.jsx(e,{i18nKey:"modals.cookiesPolicy.body",components:{subtitle:o.jsx("h2",{className:"mb-4 text-lg font-bold"}),p:o.jsx("p",{className:"mb-2"}),list:o.jsx("ul",{className:"mb-4 list-disc pl-6"}),bullet:o.jsx("li",{})}}),bodyProps:{className:"text-left"},closeLabel:"Close",onContinue:()=>r(),overlayProps:{style:{zIndex:1e4}}})};export{g as CookiesPolicyModal};
@@ -0,0 +1 @@
1
+ import{j as p}from"./document_model_editor-D5oPro82.js";import{V as l,Q as u,c as M,_ as D,az as f,ax as d,aA as x,f as y}from"./reactor_browser-D4maXKS-.js";import{w as C}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";const O=()=>{const t=l(),r=t?.type==="createDocument",a=r?t.documentType:void 0,e=u(a),[n]=M(),m=D(),s=f(),c=async o=>{if(d(),!n||!e)return;const i=await x(n.header.id,o||`New ${e.documentModel.global.name}`,e.documentModel.global.id,m?.id??s?.id);y(i)};return p.jsx(C,{open:r,onContinue:c,onOpenChange:o=>{if(!o)return d()}})};export{O as CreateDocumentModal};
@@ -1 +1 @@
1
- import{j as e}from"./document_model_editor-C2QDzIWG.js";import{b as R,s as d}from"./index-DCLcMalw.js";import{r}from"./sentry_react-cODD7zWc.js";import{s as c,v as D}from"./design_system_connect-CDNGzuLc.js";import{V as M,aq as k,aw as S,aA as U,aB as V,aC as T}from"./reactor_browser-h6aSTneX.js";import{M as z,I as m,l as x}from"./design_system-BtrDHANm.js";import{g as _}from"./document_model-LXEZCDPq.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./react/jsx-runtime-DldvXD6N.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-N2jFG7-p.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";import"./sentry_browser-B4YoBIIG.js";const ne=()=>{const w=M()?.type==="debugSettings",g=localStorage.getItem("AUTO_REGISTER_PULL_RESPONDER")!=="false",[a,v]=r.useState(R.appVersion),[u,y]=r.useState({label:d.debug?"Enabled":"Disabled",value:d.debug}),[l,h]=r.useState(),[t,n]=r.useState(null),[i,p]=r.useState(""),[C,E]=r.useState({label:g?"Enabled":"Disabled",value:g?"true":"false"}),b=k();r.useEffect(()=>{d.setDebug(u.value)},[u]);const P=b?.find(s=>s.header.id===l)?.state.local.triggers||[],o=!l||i==="",A=async()=>{!t||!l||(await U(l,t.value),n(null))},j=async(s=!1)=>{if(!i||i===""||!l)return;if(!s){const N=await V(l,i,{pullInterval:3e3});if(!N)return;await T(l,N),p("");return}const f=_();await T(l,{id:`invalid-trigger-${f}`,type:"PullResponder",data:{interval:"3000",listenerId:`invalid-listener-${f}`,url:i}}),p("")},I=s=>{E(s),localStorage.setItem("AUTO_REGISTER_PULL_RESPONDER",s.value)};return e.jsx(z,{open:w,onOpenChange:s=>{if(!s)return S()},contentProps:{className:"rounded-2xl"},children:e.jsxs("div",{className:"w-[700px] rounded-2xl p-6",children:[e.jsxs("div",{className:"mb-6 flex justify-between",children:[e.jsx("div",{className:"text-xl font-bold",children:"Debug Tools"}),e.jsx("button",{id:"close-modal",onClick:()=>S(),children:e.jsx(m,{name:"Xmark",size:28})})]}),e.jsxs("div",{className:"flex text-sm font-bold",children:[e.jsx(m,{name:"Ring",size:22}),e.jsxs("span",{className:"ml-2",children:["App Version: ",R.appVersion]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Hdd",size:22}),e.jsx("span",{className:"ml-2",children:"Drive Tools:"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"selectedDrive",className:"text-xs",children:"Selected Drive:"}),e.jsx(c,{id:"selectedDrive",onChange:s=>{if(!s||typeof s!="object"||!("value"in s)){h(void 0),n(null);return}h(s.value),n(null)},options:b?.map(s=>({label:s.header.name,value:s.header.id}))})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"autoRegisterPullResponder",className:"text-xs",children:"Auto register pull responder:"}),e.jsx(c,{id:"autoRegisterPullResponder",onChange:s=>{I(s)},value:C,options:[{label:"Enabled",value:"true"},{label:"Disabled",value:"false"}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveTrigger",className:"text-xs",children:"Drive trigger:"}),e.jsx(c,{id:"driveTrigger",onChange:s=>{n(s)},value:t,options:P.map(s=>({label:`${s.id} - ${s.type}`,value:s.id}))})]}),e.jsx("div",{children:e.jsx(x,{onClick:A,color:t?"red":"light",disabled:!t,size:"small",children:"Remove Trigger"})})]}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveUrl",className:"text-xs",children:"Add drive trigger:"}),e.jsx(D,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"driveUrl",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"URL:"}),value:i,onChange:s=>p(s.target.value)})]}),e.jsxs("div",{className:"mb-1 flex items-center justify-center",children:[e.jsx(x,{className:"mr-2",color:o?"light":"blue",size:"small",disabled:o,onClick:()=>j(),children:"Add Trigger"}),e.jsx(x,{color:o?"light":"red",size:"small",disabled:o,onClick:()=>j(!0),children:"Add Invalid Trigger"})]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Gear",size:22}),e.jsx("span",{className:"ml-2",children:"Service Worker Tools:"})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"serviceWorkerDebugMode",className:"text-xs",children:"Service Worker Debug Mode:"}),e.jsx(c,{id:"serviceWorkerDebugMode",onChange:s=>{y(s)},value:u,options:[{label:"Enabled",value:!0},{label:"Disabled",value:!1}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"appVersion",className:"text-xs",children:"Set invalid app version:"}),e.jsx(D,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"appVersion",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"Version:"}),value:a,onChange:s=>v(s.target.value)})]}),e.jsx("div",{className:"mb-1 flex items-center justify-center",children:e.jsx(x,{color:a===""?"light":"red",size:"small",disabled:a==="",onClick:()=>{d.sendMessage({type:"SET_APP_VERSION",version:a}),v("")},children:"Add Invalid App Version"})})]})]})})};export{ne as DebugSettingsModal};
1
+ import{j as e}from"./document_model_editor-D5oPro82.js";import{b as R,s as d}from"./index-BYfBva47.js";import{r}from"./sentry_react-cODD7zWc.js";import{x as c,y as D}from"./design_system_connect-BrlN-7x3.js";import{V as k,ar as A,ax as S,aB as U,aC as V,aD as T}from"./reactor_browser-D4maXKS-.js";import{M as z,I as m,l as x}from"./design_system-pnKFY6jM.js";import{g as _}from"./document_model-LXEZCDPq.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";import"./sentry_browser-B4YoBIIG.js";const ne=()=>{const w=k()?.type==="debugSettings",g=localStorage.getItem("AUTO_REGISTER_PULL_RESPONDER")!=="false",[a,v]=r.useState(R.appVersion),[u,y]=r.useState({label:d.debug?"Enabled":"Disabled",value:d.debug}),[l,h]=r.useState(),[t,n]=r.useState(null),[i,p]=r.useState(""),[C,E]=r.useState({label:g?"Enabled":"Disabled",value:g?"true":"false"}),b=A();r.useEffect(()=>{d.setDebug(u.value)},[u]);const P=b?.find(s=>s.header.id===l)?.state.local.triggers||[],o=!l||i==="",I=async()=>{!t||!l||(await U(l,t.value),n(null))},j=async(s=!1)=>{if(!i||i===""||!l)return;if(!s){const N=await V(l,i,{pullInterval:3e3});if(!N)return;await T(l,N),p("");return}const f=_();await T(l,{id:`invalid-trigger-${f}`,type:"PullResponder",data:{interval:"3000",listenerId:`invalid-listener-${f}`,url:i}}),p("")},M=s=>{E(s),localStorage.setItem("AUTO_REGISTER_PULL_RESPONDER",s.value)};return e.jsx(z,{open:w,onOpenChange:s=>{if(!s)return S()},contentProps:{className:"rounded-2xl"},children:e.jsxs("div",{className:"w-[700px] rounded-2xl p-6",children:[e.jsxs("div",{className:"mb-6 flex justify-between",children:[e.jsx("div",{className:"text-xl font-bold",children:"Debug Tools"}),e.jsx("button",{id:"close-modal",onClick:()=>S(),children:e.jsx(m,{name:"Xmark",size:28})})]}),e.jsxs("div",{className:"flex text-sm font-bold",children:[e.jsx(m,{name:"Ring",size:22}),e.jsxs("span",{className:"ml-2",children:["App Version: ",R.appVersion]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Hdd",size:22}),e.jsx("span",{className:"ml-2",children:"Drive Tools:"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"selectedDrive",className:"text-xs",children:"Selected Drive:"}),e.jsx(c,{id:"selectedDrive",onChange:s=>{if(!s||typeof s!="object"||!("value"in s)){h(void 0),n(null);return}h(s.value),n(null)},options:b?.map(s=>({label:s.header.name,value:s.header.id}))})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"autoRegisterPullResponder",className:"text-xs",children:"Auto register pull responder:"}),e.jsx(c,{id:"autoRegisterPullResponder",onChange:s=>{M(s)},value:C,options:[{label:"Enabled",value:"true"},{label:"Disabled",value:"false"}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveTrigger",className:"text-xs",children:"Drive trigger:"}),e.jsx(c,{id:"driveTrigger",onChange:s=>{n(s)},value:t,options:P.map(s=>({label:`${s.id} - ${s.type}`,value:s.id}))})]}),e.jsx("div",{children:e.jsx(x,{onClick:I,color:t?"red":"light",disabled:!t,size:"small",children:"Remove Trigger"})})]}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveUrl",className:"text-xs",children:"Add drive trigger:"}),e.jsx(D,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"driveUrl",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"URL:"}),value:i,onChange:s=>p(s.target.value)})]}),e.jsxs("div",{className:"mb-1 flex items-center justify-center",children:[e.jsx(x,{className:"mr-2",color:o?"light":"blue",size:"small",disabled:o,onClick:()=>j(),children:"Add Trigger"}),e.jsx(x,{color:o?"light":"red",size:"small",disabled:o,onClick:()=>j(!0),children:"Add Invalid Trigger"})]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Gear",size:22}),e.jsx("span",{className:"ml-2",children:"Service Worker Tools:"})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"serviceWorkerDebugMode",className:"text-xs",children:"Service Worker Debug Mode:"}),e.jsx(c,{id:"serviceWorkerDebugMode",onChange:s=>{y(s)},value:u,options:[{label:"Enabled",value:!0},{label:"Disabled",value:!1}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"appVersion",className:"text-xs",children:"Set invalid app version:"}),e.jsx(D,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"appVersion",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"Version:"}),value:a,onChange:s=>v(s.target.value)})]}),e.jsx("div",{className:"mb-1 flex items-center justify-center",children:e.jsx(x,{color:a===""?"light":"red",size:"small",disabled:a==="",onClick:()=>{d.sendMessage({type:"SET_APP_VERSION",version:a}),v("")},children:"Add Invalid App Version"})})]})]})})};export{ne as DebugSettingsModal};
@@ -1 +1 @@
1
- import{j as m}from"./document_model_editor-C2QDzIWG.js";import{V as d,aD as p,aq as c,aw as r,aE as v,s as u}from"./reactor_browser-h6aSTneX.js";import{u as D,t as f}from"./index-DCLcMalw.js";import{w as h}from"./design_system_connect-CDNGzuLc.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-BtrDHANm.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-N2jFG7-p.js";import"./config-CU-aFfVJ.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-9RNJ00DB.js";const V=()=>{const i=d(),a=i?.type==="deleteDrive",t=a?i.driveId:void 0,[o]=p(t),n=c();if(!o)return null;async function s(){t&&(await v(t),u(n?.[0]),r(),f(e("notifications.deleteDriveSuccess"),{type:"connect-deleted"}))}const{t:e}=D();return m.jsx(h,{open:a,driveName:o.header.name,onCancel:r,header:e("modals.deleteDrive.title",{label:o.header.name}),body:e("modals.deleteDrive.body"),inputPlaceholder:e("modals.deleteDrive.inputPlaceholder"),cancelLabel:e("common.cancel"),continueLabel:e("common.delete"),onContinue:()=>s(),onOpenChange:l=>{if(!l)return r()}})};export{V as DeleteDriveModal};
1
+ import{j as m}from"./document_model_editor-D5oPro82.js";import{V as d,aE as p,ar as c,ax as r,aF as v,s as u}from"./reactor_browser-D4maXKS-.js";import{u as D,t as f}from"./index-BYfBva47.js";import{z as h}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-9RNJ00DB.js";const T=()=>{const i=d(),a=i?.type==="deleteDrive",t=a?i.driveId:void 0,[o]=p(t),n=c();if(!o)return null;async function s(){t&&(await v(t),u(n?.[0]),r(),f(e("notifications.deleteDriveSuccess"),{type:"connect-deleted"}))}const{t:e}=D();return m.jsx(h,{open:a,driveName:o.header.name,onCancel:r,header:e("modals.deleteDrive.title",{label:o.header.name}),body:e("modals.deleteDrive.body"),inputPlaceholder:e("modals.deleteDrive.inputPlaceholder"),cancelLabel:e("common.cancel"),continueLabel:e("common.delete"),onContinue:()=>s(),onOpenChange:l=>{if(!l)return r()}})};export{T as DeleteDriveModal};
@@ -0,0 +1 @@
1
+ import{j as p}from"./document_model_editor-D5oPro82.js";import"./sentry_react-cODD7zWc.js";import{u,t as f}from"./index-BYfBva47.js";import{V as I,aG as y,d as D,j as x,ax as d,aH as F,f as L}from"./reactor_browser-D4maXKS-.js";import{E as M}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const g=()=>{const s=I(),r=s?.type==="deleteItem",o=r?s.id:void 0,{t:e}=u(),t=y(o),i=t?.name,n=t?.kind,a=D(),m=x(t?.parentFolder);async function l(){if(!a||!o)return;d();const c=n==="FOLDER"?"notifications.deleteFolderSuccess":"notifications.fileDeleteSuccess";await F(a,o),L(m),f(e(c),{type:"connect-deleted"})}return p.jsx(M,{open:r,onDelete:()=>l(),onCancel:()=>d(),header:e(`modals.deleteItem.${n?.toLowerCase()}.header`,{item:i}),body:e(`modals.deleteItem.${n?.toLowerCase()}.body`),cancelLabel:e("common.cancel"),deleteLabel:e("common.delete")})};export{g as DeleteItemModal};
@@ -0,0 +1 @@
1
+ import{j as t}from"./document_model_editor-D5oPro82.js";import"./sentry_react-cODD7zWc.js";import{u as i}from"./index-BYfBva47.js";import{V as m,ax as p}from"./reactor_browser-D4maXKS-.js";import{v as s}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const E=()=>{const r=m()?.type==="disclaimer",{t:o}=i();return t.jsx(s,{open:r,header:o("modals.disclaimer.title"),body:o("modals.disclaimer.body"),closeLabel:"Close",onContinue:()=>p()})};export{E as DisclaimerModal};
@@ -0,0 +1 @@
1
+ import{j as d}from"./document_model_editor-D5oPro82.js";import{V as v,aE as f,L as c,aI as g,w as h,ax as D,aJ as u,aK as y,aL as M}from"./reactor_browser-D4maXKS-.js";import{I as O}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";function $(){const t=v(),o=t?.type==="driveSettings",r=o?t.driveId:void 0,[a]=f(r),n=c(a),s=g(a);if(!r||!a)return null;async function p(e,i){await M(e.header.id,i)}async function m(e,i){await u(e.header.id,i)}async function l(e,i){await y(e.header.id,i)}return d.jsx(O,{drive:a,sharingType:n??"LOCAL",availableOffline:s,open:o,onRenameDrive:p,onDeleteDrive:()=>h({type:"deleteDrive",driveId:r}),onChangeAvailableOffline:l,onChangeSharingType:m,onOpenChange:e=>{if(!e)return D()}})}export{$ as DriveSettingsModal};
@@ -1 +1 @@
1
- import{j as r}from"./document_model_editor-C2QDzIWG.js";import{u as l}from"./index-DCLcMalw.js";import{V as p,h as d,G as u,aw as i,H as x}from"./reactor_browser-h6aSTneX.js";import{p as h}from"./design_system_connect-CDNGzuLc.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-BtrDHANm.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-N2jFG7-p.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";function O(){const n=p(),m=n?.type==="exportDocumentWithErrors",s=m?n.documentId:void 0,[e]=d(s),{t:o}=l();if(!e)return null;const a=u(e);return r.jsx(h,{header:o("modals.exportDocumentWithErrors.title"),title:o("modals.exportDocumentWithErrors.title"),body:r.jsxs("div",{children:[r.jsx("p",{children:o("modals.exportDocumentWithErrors.body")}),r.jsx("ul",{className:"mt-4 flex list-disc flex-col items-start px-4 text-xs",children:a.map((t,c)=>r.jsx("li",{children:t.message},c))})]}),cancelLabel:o("common.cancel"),continueLabel:o("common.export"),onCancel:()=>i(),onContinue:async()=>{try{await x(e)}catch(t){console.error(t)}finally{i()}},open:m,onOpenChange:t=>{if(!t)return i()}})}export{O as ExportDocumentWithErrorsModal};
1
+ import{j as r}from"./document_model_editor-D5oPro82.js";import{u as l}from"./index-BYfBva47.js";import{V as p,h as d,G as u,ax as i,H as x}from"./reactor_browser-D4maXKS-.js";import{s as h}from"./design_system_connect-BrlN-7x3.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./sentry_react-cODD7zWc.js";import"./react-DQSxOgtG.js";import"./sentry_browser-B4YoBIIG.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";function O(){const n=p(),m=n?.type==="exportDocumentWithErrors",s=m?n.documentId:void 0,[e]=d(s),{t:o}=l();if(!e)return null;const a=u(e);return r.jsx(h,{header:o("modals.exportDocumentWithErrors.title"),title:o("modals.exportDocumentWithErrors.title"),body:r.jsxs("div",{children:[r.jsx("p",{children:o("modals.exportDocumentWithErrors.body")}),r.jsx("ul",{className:"mt-4 flex list-disc flex-col items-start px-4 text-xs",children:a.map((t,c)=>r.jsx("li",{children:t.message},c))})]}),cancelLabel:o("common.cancel"),continueLabel:o("common.export"),onCancel:()=>i(),onContinue:async()=>{try{await x(e)}catch(t){console.error(t)}finally{i()}},open:m,onOpenChange:t=>{if(!t)return i()}})}export{O as ExportDocumentWithErrorsModal};
@@ -0,0 +1 @@
1
+ import{j as t}from"./document_model_editor-D5oPro82.js";import{b as g,d as k,r as j,a as E}from"./index-BYfBva47.js";import{r as n}from"./sentry_react-cODD7zWc.js";import{P as C}from"./config-CU-aFfVJ.js";import{ar as b,w as P,aF as M,s as D,aM as A,aN as S,V as L,ax as O}from"./reactor_browser-D4maXKS-.js";import{J as _,K as R,L as V,M as H,N as z}from"./design_system_connect-BrlN-7x3.js";import{I as d}from"./design_system-pnKFY6jM.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./graphql_request-9RNJ00DB.js";import"./sentry_browser-B4YoBIIG.js";const N="@powerhousedao/connect",U="Powerhouse-Connect",q="5.1.0-dev.14",I="Powerhouse Connect",T="dist/index.html",$="module",B={node:">=22.0.0"},G=["dist","lib","nginx.conf","nginx.sh","scripts","assets","public","heroku",".env","./src/index.css","./package.copy.json"],Z={".":{source:"./src/index.ts",import:"./lib/src/index.js",types:"./lib/src/index.d.ts"},"./package.json":"./package.copy.json","./main.js":{source:"./src/main.tsx",import:"./lib/src/main.js",types:"./lib/src/main.d.ts"},"./*.js":{source:"./src/*.ts",import:"./lib/src/*.js",types:"./lib/src/*.d.ts"},"./components":{source:"./src/components/index.ts",import:"./lib/src/components/index.js",types:"./lib/src/components/index.d.ts"},"./pages":{source:"./src/pages/index.ts",import:"./lib/src/pages/index.js",types:"./lib/src/pages/index.d.ts"},"./services":{source:"./src/services/index.ts",import:"./lib/src/services/index.js",types:"./lib/src/services/index.d.ts"},"./context":{source:"./src/context/index.ts",import:"./lib/src/context/index.js",types:"./lib/src/context/index.d.ts"},"./hooks":{source:"./src/hooks/index.ts",import:"./lib/src/hooks/index.js",types:"./lib/src/hooks/index.d.ts"},"./store":{source:"./src/store/index.ts",import:"./lib/src/store/index.js",types:"./lib/src/store/index.d.ts"},"./utils":{source:"./src/utils/index.ts",import:"./lib/src/utils/index.js",types:"./lib/src/utils/index.d.ts"},"./config":{source:"./src/connect.config.ts",import:"./lib/src/connect.config.js",types:"./lib/src/connect.config.d.ts"},"./i18n":{source:"./src/i18n/index.ts",import:"./lib/src/i18n/index.js",types:"./lib/src/i18n/index.d.ts"},"./custom.d.ts":"./lib/custom.d.ts","./style.css":"./src/index.css","./assets/*.mp4":"./assets/*.mp4","./assets/*.png":"./assets/*.png","./assets/*.svg":"./assets/*.svg","./assets/*.jpg":"./assets/*.jpg","./assets/*.jpeg":"./assets/*.jpeg","./assets/*.gif":"./assets/*.gif","./assets/*.webp":"./assets/*.webp","./assets/*.avif":"./assets/*.avif","./public/icon.ico":"./public/icon.ico"},J=["lib/src/main.js","src/main.tsx"],K="AGPL-3.0-only",F="powerhouse.inc",Q={type:"git",url:"https://github.com/powerhouse-inc/powerhouse"},W={url:"https://github.com/powerhouse-inc/powerhouse/issues"},X="https://github.com/powerhouse-inc/powerhouse#readme",Y={tsc:"tsc",lint:"eslint",test:"vitest run",postinstall:"cp ./package.json ./package.copy.json",dev:"vite dev","build:vite":"vite build","build:debug":"PH_DEBUG_BUILD=true vite build",preview:"vite preview","cy:open":"cypress open","docker:build":"docker build -f ./Dockerfile --tag connect-test-dev --build-arg TAG=dev .","docker:run":"docker run -it -p 4000:4000 -v $(realpath ../../../monorepo):/monorepo -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf.template -e PH_USE_LOCAL=true -e PH_CONNECT_BASE_PATH=/develop/powerhouse/connect -e PORT=4000 connect-test-dev"},ee={"@electric-sql/pglite":"0.2.17","@openfeature/core":"^1.9.1","@openfeature/web-sdk":"^1.6.2","@powerhousedao/analytics-engine-core":"^0.5.0","@powerhousedao/common":"workspace:*","@powerhousedao/config":"workspace:*","@powerhousedao/design-system":"workspace:*","@powerhousedao/reactor":"workspace:*","@powerhousedao/reactor-browser":"workspace:*","@renown/sdk":"workspace:*","@sentry/browser":"^10.17.0","@sentry/react":"^10.17.0","@sentry/vite-plugin":"^4.3.0","@tailwindcss/vite":"^4.1.14","@types/node":"^24.7.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0","@types/wicg-file-system-access":"^2023.10.7","@vitejs/plugin-react":"^5.0.4","document-drive":"workspace:*","document-model":"workspace:*","fast-deep-equal":"^3.1.3",graphql:"^16.11.0","graphql-request":"^7.2.0",i18next:"^25.5.3",kysely:"^0.28.2","kysely-pglite-dialect":"^1.1.1",react:"^19.2.0","react-dom":"^19.2.0","react-error-boundary":"^4.0.11","react-hotkeys-hook":"^4.5.0","react-i18next":"^16.0.0","react-router-dom":"^6.11.2","tailwind-merge":"^3.0.2",tailwindcss:"^4.1.14",vite:"^7.1.9","vite-plugin-html":"^3.2.2","vite-plugin-node-polyfills":"^0.24.0","vite-plugin-svgr":"^4.5.0",zod:"^3.24.3","@powerhousedao/builder-tools":"workspace:*","@powerhousedao/document-engineering":"^1.39.0","@types/cypress":"^1.1.6",cypress:"^14.5.4","vite-bundle-analyzer":"^1.2.3"},se={name:N,productName:U,version:q,description:I,main:T,type:$,engines:B,files:G,exports:Z,sideEffects:J,license:K,author:F,repository:Q,bugs:W,homepage:X,scripts:Y,dependencies:ee},te=()=>t.jsx(_,{packageJson:se,phCliVersion:typeof g.phCliVersion=="string"?g.phCliVersion:void 0}),oe=()=>{const c=b(),r=async a=>{await M(a.header.id),D(void 0)},s=()=>{P({type:"clearStorage"})};return t.jsx(R,{drives:c??[],onDeleteDrive:r,onClearStorage:s})},u=[{label:"V1",value:"document-model-editor"},{label:"V2",value:"document-model-editor-v2"}],ne=()=>{const[c,r]=n.useState(u[1]),s=n.useCallback(a=>{const o=u.find(p=>p.value==a);o&&r(o)},[]);return t.jsx(V,{documentModelEditor:c.value,setDocumentModelEditor:s,documentModelEditorOptions:u})},m="local-reactor",re="Local Reactor",ae=()=>{const c=A(),r=b(),[s,a]=n.useState(""),o=n.useMemo(()=>r?.reduce((e,l)=>{const i=l.state.local.triggers.find(y=>y.data?.url);if(!i?.data?.url)return e;const f=i.data.url,w=l.state.global.name;return e.push({value:f,label:w,disabled:!0}),e},[{value:m,label:re,disabled:!1}]),[r]);n.useEffect(()=>{a(e=>{const l=o?.find(i=>!i.disabled);return e&&o?.find(i=>i.value===e)?e:l?.value??""})},[s,o]);const p=c?.map(e=>S(e)),x=n.useCallback(e=>a(e??""),[]),h=n.useCallback(e=>{if(s!==m)throw new Error("Cannot install external package on a remote reactor");return k(e)},[s]),v=n.useCallback(e=>{if(s!==m)throw new Error("Cannot delete external package on a remote reactor");return j(e)},[s]);return t.jsx(H,{mutable:!0,reactorOptions:o??[],reactor:s,packages:p?.map(e=>({id:e.id,name:e.name,description:e.description,category:e.category,publisher:e.author.name,publisherUrl:e.author.website??"",modules:Object.values(e.modules).flatMap(l=>l.map(i=>i.name)),removable:!0}))??[],onReactorChange:x,onInstall:h,onUninstall:v,packageOptions:C})},Me=()=>{const r=L()?.type==="settings";function s(){window.location.reload()}const a=n.useMemo(()=>[{id:"package-manager",icon:t.jsx(d,{name:"PackageManager",size:12}),label:"Package Manager",content:ae},{id:"default-editors",icon:t.jsx(d,{name:"Edit",size:12}),label:"Default Editors",content:ne},{id:"danger-zone",icon:t.jsx(d,{name:"Danger",size:12,className:"text-red-900"}),label:t.jsx("span",{className:"text-red-900",children:"Danger Zone"}),content:()=>t.jsx(oe,{})},{id:"about",icon:t.jsx(d,{name:"QuestionSquare",size:12}),label:"About",content:te}],[s]);return t.jsx(z,{open:r,title:E("modals.connectSettings.title"),onOpenChange:o=>{if(!o)return O()},tabs:a})};export{Me as SettingsModal};
@@ -1 +1 @@
1
- import{j as n}from"./document_model_editor-C2QDzIWG.js";import"./sentry_react-cODD7zWc.js";import{u as a}from"./index-DCLcMalw.js";import{K as d}from"./design_system_connect-CDNGzuLc.js";import{V as s,aw as t}from"./reactor_browser-h6aSTneX.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-DHMI_z5h.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./design_system-BtrDHANm.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-CXZVaXzt.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-N2jFG7-p.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const E=()=>{const r=s(),e=r?.type==="upgradeDrive",i=e?r.driveId:void 0,{t:o}=a(),p=()=>{console.log("Upgrade drive: ",i),t()};return n.jsx(d,{open:e,onContinue:p,header:o("modals.upgradeDrive.header"),body:o("modals.upgradeDrive.body"),cancelLabel:o("common.cancel"),continueLabel:o("common.continue"),onOpenChange:m=>{if(!m)return t()}})};export{E as UpgradeDriveModal};
1
+ import{j as n}from"./document_model_editor-D5oPro82.js";import"./sentry_react-cODD7zWc.js";import{u as a}from"./index-BYfBva47.js";import{O as d}from"./design_system_connect-BrlN-7x3.js";import{V as s,ax as t}from"./reactor_browser-D4maXKS-.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-C6clT2Df.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-LXEZCDPq.js";import"./zod-C6yxFxyo.js";import"./react-DQSxOgtG.js";import"./design_system-pnKFY6jM.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-Cz-kMJRJ.js";import"./react-dom/client-BVPiT_FE.js";import"./document_drive-CVkeqJ3l.js";import"./config-CU-aFfVJ.js";import"./graphql_request-9RNJ00DB.js";const E=()=>{const r=s(),e=r?.type==="upgradeDrive",i=e?r.driveId:void 0,{t:o}=a(),p=()=>{console.log("Upgrade drive: ",i),t()};return n.jsx(d,{open:e,onContinue:p,header:o("modals.upgradeDrive.header"),body:o("modals.upgradeDrive.body"),cancelLabel:o("common.cancel"),continueLabel:o("common.continue"),onOpenChange:m=>{if(!m)return t()}})};export{E as UpgradeDriveModal};
@@ -1,4 +1,4 @@
1
- import{r as c,R as R3,a as f1}from"./sentry_react-cODD7zWc.js";import{j as t,c as k2,r as H3,u as T,R as x0,P as g0,a as v0}from"./document_model_editor-C2QDzIWG.js";import{a as m0,t as e1}from"./tailwind_merge-Dr4f9Rms.js";const w0=c.forwardRef(function(n,r){const{color:o="dark",size:i="medium",className:s="",children:a,icon:l,iconPosition:f="left",...C}=n,u={small:"px-2 py-1.5 text-xs rounded-md font-medium",medium:"px-6 py-3 text-base rounded-xl font-semibold tracking-wide"},h=m0({light:"bg-gray-200 text-gray-600 hover:text-gray-700 hover:border-gray-300 active:border-slate-100 active:text-gray-600 disabled:text-gray-400",dark:"bg-gray-800 text-slate-50 hover:bg-slate-800 active:border-slate-700 disabled:bg-gray-300 disabled:text-slate-100",red:"bg-red-900 text-slate-50 hover:opacity-80 active:border-red-800 disabled:text-red-400 disabled:opacity-100",blue:"bg-blue-900 text-slate-50 hover:opacity-80 active:border-blue-800 disabled:text-blue-400 disabled:opacity-100"}[o],u[i]),x=e1("flex items-center justify-center gap-2 border border-none outline-none transition disabled:cursor-not-allowed",h,s);return t.jsxs("button",{className:x,ref:r,...C,children:[f==="left"&&l,a,f==="right"&&l]})});function V(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return n?.(i)}}function L0(e,n){const r=c.createContext(n),o=s=>{const{children:a,...l}=s,f=c.useMemo(()=>l,Object.values(l));return t.jsx(r.Provider,{value:f,children:a})};o.displayName=e+"Provider";function i(s){const a=c.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function y1(e,n=[]){let r=[];function o(s,a){const l=c.createContext(a),f=r.length;r=[...r,a];const C=d=>{const{scope:h,children:x,...g}=d,p=h?.[e]?.[f]||l,v=c.useMemo(()=>g,Object.values(g));return t.jsx(p.Provider,{value:v,children:x})};C.displayName=s+"Provider";function u(d,h){const x=h?.[e]?.[f]||l,g=c.useContext(x);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[C,u]}const i=()=>{const s=r.map(a=>c.createContext(a));return function(l){const f=l?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return i.scopeName=e,[o,M0(i,...n)]}function M0(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:f,scopeName:C})=>{const d=f(s)[`__scope${C}`];return{...l,...d}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var l1=globalThis?.document?c.useLayoutEffect:()=>{},j0=R3[" useInsertionEffect ".trim().toString()]||l1;function P2({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=A0({defaultProp:n,onChange:r}),l=e!==void 0,f=l?e:i;{const u=c.useRef(e!==void 0);c.useEffect(()=>{const d=u.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=l},[l,o])}const C=c.useCallback(u=>{if(l){const d=y0(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[l,e,s,a]);return[f,C]}function A0({defaultProp:e,onChange:n}){const[r,o]=c.useState(e),i=c.useRef(r),s=c.useRef(n);return j0(()=>{s.current=n},[n]),c.useEffect(()=>{i.current!==r&&(s.current?.(r),i.current=r)},[r,i]),[r,o,s]}function y0(e){return typeof e=="function"}function P1(e){const n=S0(e),r=c.forwardRef((o,i)=>{const{children:s,...a}=o,l=c.Children.toArray(s),f=l.find(R0);if(f){const C=f.props.children,u=l.map(d=>d===f?c.Children.count(C)>1?c.Children.only(null):c.isValidElement(C)?C.props.children:null:d);return t.jsx(n,{...a,ref:i,children:c.isValidElement(C)?c.cloneElement(C,void 0,u):null})}return t.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function S0(e){const n=c.forwardRef((r,o)=>{const{children:i,...s}=r;if(c.isValidElement(i)){const a=V0(i),l=H0(s,i.props);return i.type!==c.Fragment&&(l.ref=o?k2(o,a):a),c.cloneElement(i,l)}return c.Children.count(i)>1?c.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var V3=Symbol("radix.slottable");function Rt(e){const n=({children:r})=>t.jsx(t.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=V3,n}function R0(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===V3}function H0(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const f=s(...l);return i(...l),f}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function V0(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=b0.reduce((e,n)=>{const r=P1(`Primitive.${n}`),o=c.forwardRef((i,s)=>{const{asChild:a,...l}=i,f=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),t.jsx(f,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function b3(e,n){e&&H3.flushSync(()=>e.dispatchEvent(n))}function E3(e){const n=e+"CollectionProvider",[r,o]=y1(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:v,children:m}=p,M=f1.useRef(null),w=f1.useRef(new Map).current;return t.jsx(i,{scope:v,itemMap:w,collectionRef:M,children:m})};a.displayName=n;const l=e+"CollectionSlot",f=P1(l),C=f1.forwardRef((p,v)=>{const{scope:m,children:M}=p,w=s(l,m),L=T(v,w.collectionRef);return t.jsx(f,{ref:L,children:M})});C.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=P1(u),x=f1.forwardRef((p,v)=>{const{scope:m,children:M,...w}=p,L=f1.useRef(null),j=T(v,L),S=s(u,m);return f1.useEffect(()=>(S.itemMap.set(L,{ref:L,...w}),()=>void S.itemMap.delete(L))),t.jsx(h,{[d]:"",ref:j,children:M})});x.displayName=u;function g(p){const v=s(e+"CollectionConsumer",p);return f1.useCallback(()=>{const M=v.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((S,A)=>w.indexOf(S.ref.current)-w.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:C,ItemSlot:x},g,o]}var E0=c.createContext(void 0);function k3(e){const n=c.useContext(E0);return e||n||"ltr"}function r1(e){const n=c.useRef(e);return c.useEffect(()=>{n.current=e}),c.useMemo(()=>(...r)=>n.current?.(...r),[])}function k0(e,n=globalThis?.document){const r=r1(e);c.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var P0="DismissableLayer",y2="dismissableLayer.update",D0="dismissableLayer.pointerDownOutside",F0="dismissableLayer.focusOutside",n3,P3=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),D2=c.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...f}=e,C=c.useContext(P3),[u,d]=c.useState(null),h=u?.ownerDocument??globalThis?.document,[,x]=c.useState({}),g=T(n,A=>d(A)),p=Array.from(C.layers),[v]=[...C.layersWithOutsidePointerEventsDisabled].slice(-1),m=p.indexOf(v),M=u?p.indexOf(u):-1,w=C.layersWithOutsidePointerEventsDisabled.size>0,L=M>=m,j=O0(A=>{const R=A.target,k=[...C.branches].some(b=>b.contains(R));!L||k||(i?.(A),a?.(A),A.defaultPrevented||l?.())},h),S=_0(A=>{const R=A.target;[...C.branches].some(b=>b.contains(R))||(s?.(A),a?.(A),A.defaultPrevented||l?.())},h);return k0(A=>{M===C.layers.size-1&&(o?.(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),c.useEffect(()=>{if(u)return r&&(C.layersWithOutsidePointerEventsDisabled.size===0&&(n3=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),C.layersWithOutsidePointerEventsDisabled.add(u)),C.layers.add(u),r3(),()=>{r&&C.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=n3)}},[u,h,r,C]),c.useEffect(()=>()=>{u&&(C.layers.delete(u),C.layersWithOutsidePointerEventsDisabled.delete(u),r3())},[u,C]),c.useEffect(()=>{const A=()=>x({});return document.addEventListener(y2,A),()=>document.removeEventListener(y2,A)},[]),t.jsx(O.div,{...f,ref:g,style:{pointerEvents:w?L?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,j.onPointerDownCapture)})});D2.displayName=P0;var B0="DismissableLayerBranch",Z0=c.forwardRef((e,n)=>{const r=c.useContext(P3),o=c.useRef(null),i=T(n,o);return c.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),t.jsx(O.div,{...e,ref:i})});Z0.displayName=B0;function O0(e,n=globalThis?.document){const r=r1(e),o=c.useRef(!1),i=c.useRef(()=>{});return c.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let f=function(){D3(D0,r,C,{discrete:!0})};const C={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=f,n.addEventListener("click",i.current,{once:!0})):f()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function _0(e,n=globalThis?.document){const r=r1(e),o=c.useRef(!1);return c.useEffect(()=>{const i=s=>{s.target&&!o.current&&D3(F0,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function r3(){const e=new CustomEvent(y2);document.dispatchEvent(e)}function D3(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?b3(i,s):i.dispatchEvent(s)}var p2=0;function F3(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o3()),document.body.insertAdjacentElement("beforeend",e[1]??o3()),p2++,()=>{p2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),p2--}},[])}function o3(){const 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}var x2="focusScope.autoFocusOnMount",g2="focusScope.autoFocusOnUnmount",i3={bubbles:!1,cancelable:!0},I0="FocusScope",F2=c.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,f]=c.useState(null),C=r1(i),u=r1(s),d=c.useRef(null),h=T(n,p=>f(p)),x=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(w){if(x.paused||!l)return;const L=w.target;l.contains(L)?d.current=L:s1(d.current,{select:!0})},v=function(w){if(x.paused||!l)return;const L=w.relatedTarget;L!==null&&(l.contains(L)||s1(d.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&s1(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const M=new MutationObserver(m);return l&&M.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),M.disconnect()}}},[o,l,x.paused]),c.useEffect(()=>{if(l){l3.add(x);const p=document.activeElement;if(!l.contains(p)){const m=new CustomEvent(x2,i3);l.addEventListener(x2,C),l.dispatchEvent(m),m.defaultPrevented||(N0(X0(B3(l)),{select:!0}),document.activeElement===p&&s1(l))}return()=>{l.removeEventListener(x2,C),setTimeout(()=>{const m=new CustomEvent(g2,i3);l.addEventListener(g2,u),l.dispatchEvent(m),m.defaultPrevented||s1(p??document.body,{select:!0}),l.removeEventListener(g2,u),l3.remove(x)},0)}}},[l,C,u,x]);const g=c.useCallback(p=>{if(!r&&!o||x.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,m=document.activeElement;if(v&&m){const M=p.currentTarget,[w,L]=T0(M);w&&L?!p.shiftKey&&m===L?(p.preventDefault(),r&&s1(w,{select:!0})):p.shiftKey&&m===w&&(p.preventDefault(),r&&s1(L,{select:!0})):m===M&&p.preventDefault()}},[r,o,x.paused]);return t.jsx(O.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});F2.displayName=I0;function N0(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(s1(o,{select:n}),document.activeElement!==r)return}function T0(e){const n=B3(e),r=s3(n,e),o=s3(n.reverse(),e);return[r,o]}function B3(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function s3(e,n){for(const r of e)if(!J0(r,{upTo:n}))return r}function J0(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function W0(e){return e instanceof HTMLInputElement&&"select"in e}function s1(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&W0(e)&&n&&e.select()}}var l3=G0();function G0(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=a3(e,n),e.unshift(n)},remove(n){e=a3(e,n),e[0]?.resume()}}}function a3(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function X0(e){return e.filter(n=>n.tagName!=="A")}var U0=R3[" useId ".trim().toString()]||(()=>{}),z0=0;function L1(e){const[n,r]=c.useState(U0());return l1(()=>{r(o=>o??String(z0++))},[e]),e||(n?`radix-${n}`:"")}const q0=["top","right","bottom","left"],a1=Math.min,W=Math.max,$1=Math.round,W1=Math.floor,$=e=>({x:e,y:e}),K0={left:"right",right:"left",bottom:"top",top:"bottom"},Y0={start:"end",end:"start"};function S2(e,n,r){return W(e,a1(n,r))}function o1(e,n){return typeof e=="function"?e(n):e}function i1(e){return e.split("-")[0]}function S1(e){return e.split("-")[1]}function B2(e){return e==="x"?"y":"x"}function Z2(e){return e==="y"?"height":"width"}const Q0=new Set(["top","bottom"]);function Q(e){return Q0.has(i1(e))?"y":"x"}function O2(e){return B2(Q(e))}function $0(e,n,r){r===void 0&&(r=!1);const o=S1(e),i=O2(e),s=Z2(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=e2(a)),[a,e2(a)]}function e4(e){const n=e2(e);return[R2(e),n,R2(n)]}function R2(e){return e.replace(/start|end/g,n=>Y0[n])}const c3=["left","right"],C3=["right","left"],t4=["top","bottom"],n4=["bottom","top"];function r4(e,n,r){switch(e){case"top":case"bottom":return r?n?C3:c3:n?c3:C3;case"left":case"right":return n?t4:n4;default:return[]}}function o4(e,n,r,o){const i=S1(e);let s=r4(i1(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(R2)))),s}function e2(e){return e.replace(/left|right|bottom|top/g,n=>K0[n])}function i4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z3(e){return typeof e!="number"?i4(e):{top:e,right:e,bottom:e,left:e}}function t2(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function u3(e,n,r){let{reference:o,floating:i}=e;const s=Q(n),a=O2(n),l=Z2(a),f=i1(n),C=s==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let x;switch(f){case"top":x={x:u,y:o.y-i.height};break;case"bottom":x={x:u,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:d};break;case"left":x={x:o.x-i.width,y:d};break;default:x={x:o.x,y:o.y}}switch(S1(n)){case"start":x[a]-=h*(r&&C?-1:1);break;case"end":x[a]+=h*(r&&C?-1:1);break}return x}const s4=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=s.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(n));let C=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=u3(C,o,f),h=o,x={},g=0;for(let p=0;p<l.length;p++){const{name:v,fn:m}=l[p],{x:M,y:w,data:L,reset:j}=await m({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:x,rects:C,platform:a,elements:{reference:e,floating:n}});u=M??u,d=w??d,x={...x,[v]:{...x[v],...L}},j&&g<=50&&(g++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(C=j.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):j.rects),{x:u,y:d}=u3(C,h,f)),p=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:x}};async function D1(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:f}=e,{boundary:C="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:x=0}=o1(n,e),g=Z3(x),v=l[h?d==="floating"?"reference":"floating":d],m=t2(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:C,rootBoundary:u,strategy:f})),M=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),L=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},j=t2(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:M,offsetParent:w,strategy:f}):M);return{top:(m.top-j.top+g.top)/L.y,bottom:(j.bottom-m.bottom+g.bottom)/L.y,left:(m.left-j.left+g.left)/L.x,right:(j.right-m.right+g.right)/L.x}}const l4=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:f}=n,{element:C,padding:u=0}=o1(e,n)||{};if(C==null)return{};const d=Z3(u),h={x:r,y:o},x=O2(i),g=Z2(x),p=await a.getDimensions(C),v=x==="y",m=v?"top":"left",M=v?"bottom":"right",w=v?"clientHeight":"clientWidth",L=s.reference[g]+s.reference[x]-h[x]-s.floating[g],j=h[x]-s.reference[x],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(C));let A=S?S[w]:0;(!A||!await(a.isElement==null?void 0:a.isElement(S)))&&(A=l.floating[w]||s.floating[g]);const R=L/2-j/2,k=A/2-p[g]/2-1,b=a1(d[m],k),F=a1(d[M],k),B=b,D=A-p[g]-F,P=A/2-p[g]/2+R,I=S2(B,P,D),E=!f.arrow&&S1(i)!=null&&P!==I&&s.reference[g]/2-(P<B?b:F)-p[g]/2<0,Z=E?P<B?P-B:P-D:0;return{[x]:h[x]+Z,data:{[x]:I,centerOffset:P-I-Z,...E&&{alignmentOffset:Z}},reset:E}}}),a4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:f,elements:C}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...v}=o1(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const m=i1(i),M=Q(l),w=i1(l)===l,L=await(f.isRTL==null?void 0:f.isRTL(C.floating)),j=h||(w||!p?[e2(l)]:e4(l)),S=g!=="none";!h&&S&&j.push(...o4(l,p,g,L));const A=[l,...j],R=await D1(n,v),k=[];let b=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&k.push(R[m]),d){const P=$0(i,a,L);k.push(R[P[0]],R[P[1]])}if(b=[...b,{placement:i,overflows:k}],!k.every(P=>P<=0)){var F,B;const P=(((F=s.flip)==null?void 0:F.index)||0)+1,I=A[P];if(I&&(!(d==="alignment"?M!==Q(I):!1)||b.every(H=>Q(H.placement)===M?H.overflows[0]>0:!0)))return{data:{index:P,overflows:b},reset:{placement:I}};let E=(B=b.filter(Z=>Z.overflows[0]<=0).sort((Z,H)=>Z.overflows[1]-H.overflows[1])[0])==null?void 0:B.placement;if(!E)switch(x){case"bestFit":{var D;const Z=(D=b.filter(H=>{if(S){const y=Q(H.placement);return y===M||y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(y=>y>0).reduce((y,N)=>y+N,0)]).sort((H,y)=>H[1]-y[1])[0])==null?void 0:D[0];Z&&(E=Z);break}case"initialPlacement":E=l;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function d3(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function f3(e){return q0.some(n=>e[n]>=0)}const c4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:o="referenceHidden",...i}=o1(e,n);switch(o){case"referenceHidden":{const s=await D1(n,{...i,elementContext:"reference"}),a=d3(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:f3(a)}}}case"escaped":{const s=await D1(n,{...i,altBoundary:!0}),a=d3(s,r.floating);return{data:{escapedOffsets:a,escaped:f3(a)}}}default:return{}}}}},O3=new Set(["left","top"]);async function C4(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=i1(r),l=S1(r),f=Q(r)==="y",C=O3.has(a)?-1:1,u=s&&f?-1:1,d=o1(n,e);let{mainAxis:h,crossAxis:x,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(x=l==="end"?g*-1:g),f?{x:x*u,y:h*C}:{x:h*C,y:x*u}}const u4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,f=await C4(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:a}}}}},d4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i}=n,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:m,y:M}=v;return{x:m,y:M}}},...f}=o1(e,n),C={x:r,y:o},u=await D1(n,f),d=Q(i1(i)),h=B2(d);let x=C[h],g=C[d];if(s){const v=h==="y"?"top":"left",m=h==="y"?"bottom":"right",M=x+u[v],w=x-u[m];x=S2(M,x,w)}if(a){const v=d==="y"?"top":"left",m=d==="y"?"bottom":"right",M=g+u[v],w=g-u[m];g=S2(M,g,w)}const p=l.fn({...n,[h]:x,[d]:g});return{...p,data:{x:p.x-r,y:p.y-o,enabled:{[h]:s,[d]:a}}}}}},f4=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:f=!0,crossAxis:C=!0}=o1(e,n),u={x:r,y:o},d=Q(i),h=B2(d);let x=u[h],g=u[d];const p=o1(l,n),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(f){const w=h==="y"?"height":"width",L=s.reference[h]-s.floating[w]+v.mainAxis,j=s.reference[h]+s.reference[w]-v.mainAxis;x<L?x=L:x>j&&(x=j)}if(C){var m,M;const w=h==="y"?"width":"height",L=O3.has(i1(i)),j=s.reference[d]-s.floating[w]+(L&&((m=a.offset)==null?void 0:m[d])||0)+(L?0:v.crossAxis),S=s.reference[d]+s.reference[w]+(L?0:((M=a.offset)==null?void 0:M[d])||0)-(L?v.crossAxis:0);g<j?g=j:g>S&&(g=S)}return{[h]:x,[d]:g}}}},h4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:f=()=>{},...C}=o1(e,n),u=await D1(n,C),d=i1(i),h=S1(i),x=Q(i)==="y",{width:g,height:p}=s.floating;let v,m;d==="top"||d==="bottom"?(v=d,m=h===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,v=h==="end"?"top":"bottom");const M=p-u.top-u.bottom,w=g-u.left-u.right,L=a1(p-u[v],M),j=a1(g-u[m],w),S=!n.middlewareData.shift;let A=L,R=j;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(R=w),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(A=M),S&&!h){const b=W(u.left,0),F=W(u.right,0),B=W(u.top,0),D=W(u.bottom,0);x?R=g-2*(b!==0||F!==0?b+F:W(u.left,u.right)):A=p-2*(B!==0||D!==0?B+D:W(u.top,u.bottom))}await f({...n,availableWidth:R,availableHeight:A});const k=await a.getDimensions(l.floating);return g!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function s2(){return typeof window<"u"}function R1(e){return _3(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function n1(e){var n;return(n=(_3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function _3(e){return s2()?e instanceof Node||e instanceof G(e).Node:!1}function U(e){return s2()?e instanceof Element||e instanceof G(e).Element:!1}function t1(e){return s2()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function h3(e){return!s2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const p4=new Set(["inline","contents"]);function O1(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=z(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!p4.has(i)}const x4=new Set(["table","td","th"]);function g4(e){return x4.has(R1(e))}const v4=[":popover-open",":modal"];function l2(e){return v4.some(n=>{try{return e.matches(n)}catch{return!1}})}const m4=["transform","translate","scale","rotate","perspective"],w4=["transform","translate","scale","rotate","perspective","filter"],L4=["paint","layout","strict","content"];function _2(e){const n=I2(),r=U(e)?z(e):e;return m4.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||w4.some(o=>(r.willChange||"").includes(o))||L4.some(o=>(r.contain||"").includes(o))}function M4(e){let n=c1(e);for(;t1(n)&&!A1(n);){if(_2(n))return n;if(l2(n))return null;n=c1(n)}return null}function I2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j4=new Set(["html","body","#document"]);function A1(e){return j4.has(R1(e))}function z(e){return G(e).getComputedStyle(e)}function a2(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function c1(e){if(R1(e)==="html")return e;const n=e.assignedSlot||e.parentNode||h3(e)&&e.host||n1(e);return h3(n)?n.host:n}function I3(e){const n=c1(e);return A1(n)?e.ownerDocument?e.ownerDocument.body:e.body:t1(n)&&O1(n)?n:I3(n)}function F1(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=I3(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=G(i);if(s){const l=H2(a);return n.concat(a,a.visualViewport||[],O1(i)?i:[],l&&r?F1(l):[])}return n.concat(i,F1(i,[],r))}function H2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N3(e){const n=z(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=t1(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=$1(r)!==s||$1(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function N2(e){return U(e)?e:e.contextElement}function M1(e){const n=N2(e);if(!t1(n))return $(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=N3(n);let a=(s?$1(r.width):r.width)/o,l=(s?$1(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const A4=$(0);function T3(e){const n=G(e);return!I2()||!n.visualViewport?A4:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function y4(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==G(e)?!1:n}function h1(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=N2(e);let a=$(1);n&&(o?U(o)&&(a=M1(o)):a=M1(e));const l=y4(s,r,o)?T3(s):$(0);let f=(i.left+l.x)/a.x,C=(i.top+l.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(s){const h=G(s),x=o&&U(o)?G(o):o;let g=h,p=H2(g);for(;p&&o&&x!==g;){const v=M1(p),m=p.getBoundingClientRect(),M=z(p),w=m.left+(p.clientLeft+parseFloat(M.paddingLeft))*v.x,L=m.top+(p.clientTop+parseFloat(M.paddingTop))*v.y;f*=v.x,C*=v.y,u*=v.x,d*=v.y,f+=w,C+=L,g=G(p),p=H2(g)}}return t2({width:u,height:d,x:f,y:C})}function c2(e,n){const r=a2(e).scrollLeft;return n?n.left+r:h1(n1(e)).left+r}function J3(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-c2(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function S4(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=n1(o),l=n?l2(n.floating):!1;if(o===a||l&&s)return r;let f={scrollLeft:0,scrollTop:0},C=$(1);const u=$(0),d=t1(o);if((d||!d&&!s)&&((R1(o)!=="body"||O1(a))&&(f=a2(o)),t1(o))){const x=h1(o);C=M1(o),u.x=x.x+o.clientLeft,u.y=x.y+o.clientTop}const h=a&&!d&&!s?J3(a,f):$(0);return{width:r.width*C.x,height:r.height*C.y,x:r.x*C.x-f.scrollLeft*C.x+u.x+h.x,y:r.y*C.y-f.scrollTop*C.y+u.y+h.y}}function R4(e){return Array.from(e.getClientRects())}function H4(e){const n=n1(e),r=a2(e),o=e.ownerDocument.body,i=W(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=W(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+c2(e);const l=-r.scrollTop;return z(o).direction==="rtl"&&(a+=W(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const p3=25;function V4(e,n){const r=G(e),o=n1(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,f=0;if(i){s=i.width,a=i.height;const u=I2();(!u||u&&n==="fixed")&&(l=i.offsetLeft,f=i.offsetTop)}const C=c2(o);if(C<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),x=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-x);g<=p3&&(s-=g)}else C<=p3&&(s+=C);return{width:s,height:a,x:l,y:f}}const b4=new Set(["absolute","fixed"]);function E4(e,n){const r=h1(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=t1(e)?M1(e):$(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,f=i*s.x,C=o*s.y;return{width:a,height:l,x:f,y:C}}function x3(e,n,r){let o;if(n==="viewport")o=V4(e,r);else if(n==="document")o=H4(n1(e));else if(U(n))o=E4(n,r);else{const i=T3(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return t2(o)}function W3(e,n){const r=c1(e);return r===n||!U(r)||A1(r)?!1:z(r).position==="fixed"||W3(r,n)}function k4(e,n){const r=n.get(e);if(r)return r;let o=F1(e,[],!1).filter(l=>U(l)&&R1(l)!=="body"),i=null;const s=z(e).position==="fixed";let a=s?c1(e):e;for(;U(a)&&!A1(a);){const l=z(a),f=_2(a);!f&&l.position==="fixed"&&(i=null),(s?!f&&!i:!f&&l.position==="static"&&!!i&&b4.has(i.position)||O1(a)&&!f&&W3(e,a))?o=o.filter(u=>u!==a):i=l,a=c1(a)}return n.set(e,o),o}function P4(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?l2(n)?[]:k4(n,this._c):[].concat(r),o],l=a[0],f=a.reduce((C,u)=>{const d=x3(n,u,i);return C.top=W(d.top,C.top),C.right=a1(d.right,C.right),C.bottom=a1(d.bottom,C.bottom),C.left=W(d.left,C.left),C},x3(n,l,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function D4(e){const{width:n,height:r}=N3(e);return{width:n,height:r}}function F4(e,n,r){const o=t1(n),i=n1(n),s=r==="fixed",a=h1(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const f=$(0);function C(){f.x=c2(i)}if(o||!o&&!s)if((R1(n)!=="body"||O1(i))&&(l=a2(n)),o){const x=h1(n,!0,s,n);f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}else i&&C();s&&!o&&i&&C();const u=i&&!o&&!s?J3(i,l):$(0),d=a.left+l.scrollLeft-f.x-u.x,h=a.top+l.scrollTop-f.y-u.y;return{x:d,y:h,width:a.width,height:a.height}}function v2(e){return z(e).position==="static"}function g3(e,n){if(!t1(e)||z(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return n1(e)===r&&(r=r.ownerDocument.body),r}function G3(e,n){const r=G(e);if(l2(e))return r;if(!t1(e)){let i=c1(e);for(;i&&!A1(i);){if(U(i)&&!v2(i))return i;i=c1(i)}return r}let o=g3(e,n);for(;o&&g4(o)&&v2(o);)o=g3(o,n);return o&&A1(o)&&v2(o)&&!_2(o)?r:o||M4(e)||r}const B4=async function(e){const n=this.getOffsetParent||G3,r=this.getDimensions,o=await r(e.floating);return{reference:F4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Z4(e){return z(e).direction==="rtl"}const O4={convertOffsetParentRelativeRectToViewportRelativeRect:S4,getDocumentElement:n1,getClippingRect:P4,getOffsetParent:G3,getElementRects:B4,getClientRects:R4,getDimensions:D4,getScale:M1,isElement:U,isRTL:Z4};function X3(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function _4(e,n){let r=null,o;const i=n1(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),s();const C=e.getBoundingClientRect(),{left:u,top:d,width:h,height:x}=C;if(l||n(),!h||!x)return;const g=W1(d),p=W1(i.clientWidth-(u+h)),v=W1(i.clientHeight-(d+x)),m=W1(u),w={rootMargin:-g+"px "+-p+"px "+-v+"px "+-m+"px",threshold:W(0,a1(1,f))||1};let L=!0;function j(S){const A=S[0].intersectionRatio;if(A!==f){if(!L)return a();A?a(!1,A):o=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!X3(C,e.getBoundingClientRect())&&a(),L=!1}try{r=new IntersectionObserver(j,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(j,w)}r.observe(e)}return a(!0),s}function I4(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,C=N2(e),u=i||s?[...C?F1(C):[],...F1(n)]:[];u.forEach(m=>{i&&m.addEventListener("scroll",r,{passive:!0}),s&&m.addEventListener("resize",r)});const d=C&&l?_4(C,r):null;let h=-1,x=null;a&&(x=new ResizeObserver(m=>{let[M]=m;M&&M.target===C&&x&&(x.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(n)})),r()}),C&&!f&&x.observe(C),x.observe(n));let g,p=f?h1(e):null;f&&v();function v(){const m=h1(e);p&&!X3(p,m)&&r(),p=m,g=requestAnimationFrame(v)}return r(),()=>{var m;u.forEach(M=>{i&&M.removeEventListener("scroll",r),s&&M.removeEventListener("resize",r)}),d?.(),(m=x)==null||m.disconnect(),x=null,f&&cancelAnimationFrame(g)}}const N4=u4,T4=d4,J4=a4,W4=h4,G4=c4,v3=l4,X4=f4,U4=(e,n,r)=>{const o=new Map,i={platform:O4,...r},s={...i.platform,_c:o};return s4(e,n,{...i,platform:s})};var z4=typeof document<"u",q4=function(){},K1=z4?c.useLayoutEffect:q4;function n2(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!n2(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!n2(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function U3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function m3(e,n){const r=U3(e);return Math.round(n*r)/r}function m2(e){const n=c.useRef(e);return K1(()=>{n.current=e}),n}function K4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:f,open:C}=e,[u,d]=c.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,x]=c.useState(o);n2(h,o)||x(o);const[g,p]=c.useState(null),[v,m]=c.useState(null),M=c.useCallback(H=>{H!==S.current&&(S.current=H,p(H))},[]),w=c.useCallback(H=>{H!==A.current&&(A.current=H,m(H))},[]),L=s||g,j=a||v,S=c.useRef(null),A=c.useRef(null),R=c.useRef(u),k=f!=null,b=m2(f),F=m2(i),B=m2(C),D=c.useCallback(()=>{if(!S.current||!A.current)return;const H={placement:n,strategy:r,middleware:h};F.current&&(H.platform=F.current),U4(S.current,A.current,H).then(y=>{const N={...y,isPositioned:B.current!==!1};P.current&&!n2(R.current,N)&&(R.current=N,H3.flushSync(()=>{d(N)}))})},[h,n,r,F,B]);K1(()=>{C===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[C]);const P=c.useRef(!1);K1(()=>(P.current=!0,()=>{P.current=!1}),[]),K1(()=>{if(L&&(S.current=L),j&&(A.current=j),L&&j){if(b.current)return b.current(L,j,D);D()}},[L,j,D,b,k]);const I=c.useMemo(()=>({reference:S,floating:A,setReference:M,setFloating:w}),[M,w]),E=c.useMemo(()=>({reference:L,floating:j}),[L,j]),Z=c.useMemo(()=>{const H={position:r,left:0,top:0};if(!E.floating)return H;const y=m3(E.floating,u.x),N=m3(E.floating,u.y);return l?{...H,transform:"translate("+y+"px, "+N+"px)",...U3(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:y,top:N}},[r,l,E.floating,u.x,u.y]);return c.useMemo(()=>({...u,update:D,refs:I,elements:E,floatingStyles:Z}),[u,D,I,E,Z])}const Y4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?v3({element:o.current,padding:i}).fn(r):{}:o?v3({element:o,padding:i}).fn(r):{}}}},Q4=(e,n)=>({...N4(e),options:[e,n]}),$4=(e,n)=>({...T4(e),options:[e,n]}),e6=(e,n)=>({...X4(e),options:[e,n]}),t6=(e,n)=>({...J4(e),options:[e,n]}),n6=(e,n)=>({...W4(e),options:[e,n]}),r6=(e,n)=>({...G4(e),options:[e,n]}),o6=(e,n)=>({...Y4(e),options:[e,n]});var i6="Arrow",z3=c.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return t.jsx(O.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});z3.displayName=i6;var s6=z3;function l6(e){const[n,r]=c.useState(void 0);return l1(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const f=s.borderBoxSize,C=Array.isArray(f)?f[0]:f;a=C.inlineSize,l=C.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}var T2="Popper",[q3,K3]=y1(T2),[a6,Y3]=q3(T2),Q3=e=>{const{__scopePopper:n,children:r}=e,[o,i]=c.useState(null);return t.jsx(a6,{scope:n,anchor:o,onAnchorChange:i,children:r})};Q3.displayName=T2;var $3="PopperAnchor",e9=c.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=Y3($3,r),a=c.useRef(null),l=T(n,a),f=c.useRef(null);return c.useEffect(()=>{const C=f.current;f.current=o?.current||a.current,C!==f.current&&s.onAnchorChange(f.current)}),o?null:t.jsx(O.div,{...i,ref:l})});e9.displayName=$3;var J2="PopperContent",[c6,C6]=q3(J2),t9=c.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:f=!0,collisionBoundary:C=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:x="optimized",onPlaced:g,...p}=e,v=Y3(J2,r),[m,M]=c.useState(null),w=T(n,_=>M(_)),[L,j]=c.useState(null),S=l6(L),A=S?.width??0,R=S?.height??0,k=o+(s!=="center"?"-"+s:""),b=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},F=Array.isArray(C)?C:[C],B=F.length>0,D={padding:b,boundary:F.filter(d6),altBoundary:B},{refs:P,floatingStyles:I,placement:E,isPositioned:Z,middlewareData:H}=K4({strategy:"fixed",placement:k,whileElementsMounted:(..._)=>I4(..._,{animationFrame:x==="always"}),elements:{reference:v.anchor},middleware:[Q4({mainAxis:i+R,alignmentAxis:a}),f&&$4({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?e6():void 0,...D}),f&&t6({...D}),n6({...D,apply:({elements:_,rects:b1,availableWidth:d0,availableHeight:f0})=>{const{width:h0,height:p0}=b1.reference,J1=_.floating.style;J1.setProperty("--radix-popper-available-width",`${d0}px`),J1.setProperty("--radix-popper-available-height",`${f0}px`),J1.setProperty("--radix-popper-anchor-width",`${h0}px`),J1.setProperty("--radix-popper-anchor-height",`${p0}px`)}}),L&&o6({element:L,padding:l}),f6({arrowWidth:A,arrowHeight:R}),h&&r6({strategy:"referenceHidden",...D})]}),[y,N]=o9(E),K=r1(g);l1(()=>{Z&&K?.()},[Z,K]);const u1=H.arrow?.x,H1=H.arrow?.y,V1=H.arrow?.centerOffset!==0,[T1,d1]=c.useState();return l1(()=>{m&&d1(window.getComputedStyle(m).zIndex)},[m]),t.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:Z?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T1,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(c6,{scope:r,placedSide:y,onArrowChange:j,arrowX:u1,arrowY:H1,shouldHideArrow:V1,children:t.jsx(O.div,{"data-side":y,"data-align":N,...p,ref:w,style:{...p.style,animation:Z?void 0:"none"}})})})});t9.displayName=J2;var n9="PopperArrow",u6={top:"bottom",right:"left",bottom:"top",left:"right"},r9=c.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=C6(n9,o),a=u6[s.placedSide];return t.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:t.jsx(s6,{...i,ref:r,style:{...i.style,display:"block"}})})});r9.displayName=n9;function d6(e){return e!==null}var f6=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:o,middlewareData:i}=n,a=i.arrow?.centerOffset!==0,l=a?0:e.arrowWidth,f=a?0:e.arrowHeight,[C,u]=o9(r),d={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,x=(i.arrow?.y??0)+f/2;let g="",p="";return C==="bottom"?(g=a?d:`${h}px`,p=`${-f}px`):C==="top"?(g=a?d:`${h}px`,p=`${o.floating.height+f}px`):C==="right"?(g=`${-f}px`,p=a?d:`${x}px`):C==="left"&&(g=`${o.floating.width+f}px`,p=a?d:`${x}px`),{data:{x:g,y:p}}}});function o9(e){const[n,r="center"]=e.split("-");return[n,r]}var h6=Q3,p6=e9,x6=t9,g6=r9,v6="Portal",W2=c.forwardRef((e,n)=>{const{container:r,...o}=e,[i,s]=c.useState(!1);l1(()=>s(!0),[]);const a=r||i&&globalThis?.document?.body;return a?x0.createPortal(t.jsx(O.div,{...o,ref:n}),a):null});W2.displayName=v6;function m6(e,n){return c.useReducer((r,o)=>n[r][o]??r,e)}var C1=e=>{const{present:n,children:r}=e,o=w6(n),i=typeof r=="function"?r({present:o.isPresent}):c.Children.only(r),s=T(o.ref,L6(i));return typeof r=="function"||o.isPresent?c.cloneElement(i,{ref:s}):null};C1.displayName="Presence";function w6(e){const[n,r]=c.useState(),o=c.useRef(null),i=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[l,f]=m6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const C=G1(o.current);s.current=l==="mounted"?C:"none"},[l]),l1(()=>{const C=o.current,u=i.current;if(u!==e){const h=s.current,x=G1(C);e?f("MOUNT"):x==="none"||C?.display==="none"?f("UNMOUNT"):f(u&&h!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),l1(()=>{if(n){let C;const u=n.ownerDocument.defaultView??window,d=x=>{const p=G1(o.current).includes(CSS.escape(x.animationName));if(x.target===n&&p&&(f("ANIMATION_END"),!i.current)){const v=n.style.animationFillMode;n.style.animationFillMode="forwards",C=u.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=v)})}},h=x=>{x.target===n&&(s.current=G1(o.current))};return n.addEventListener("animationstart",h),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{u.clearTimeout(C),n.removeEventListener("animationstart",h),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(C=>{o.current=C?getComputedStyle(C):null,r(C)},[])}}function G1(e){return e?.animationName||"none"}function L6(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var w2="rovingFocusGroup.onEntryFocus",M6={bubbles:!1,cancelable:!0},_1="RovingFocusGroup",[V2,i9,j6]=E3(_1),[A6,s9]=y1(_1,[j6]),[y6,S6]=A6(_1),l9=c.forwardRef((e,n)=>t.jsx(V2.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(V2.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(R6,{...e,ref:n})})}));l9.displayName=_1;var R6=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:f,onEntryFocus:C,preventScrollOnEntryFocus:u=!1,...d}=e,h=c.useRef(null),x=T(n,h),g=k3(s),[p,v]=P2({prop:a,defaultProp:l??null,onChange:f,caller:_1}),[m,M]=c.useState(!1),w=r1(C),L=i9(r),j=c.useRef(!1),[S,A]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(w2,w),()=>R.removeEventListener(w2,w)},[w]),t.jsx(y6,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:p,onItemFocus:c.useCallback(R=>v(R),[v]),onItemShiftTab:c.useCallback(()=>M(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:t.jsx(O.div,{tabIndex:m||S===0?-1:0,"data-orientation":o,...d,ref:x,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{j.current=!0}),onFocus:V(e.onFocus,R=>{const k=!j.current;if(R.target===R.currentTarget&&k&&!m){const b=new CustomEvent(w2,M6);if(R.currentTarget.dispatchEvent(b),!b.defaultPrevented){const F=L().filter(E=>E.focusable),B=F.find(E=>E.active),D=F.find(E=>E.id===p),I=[B,D,...F].filter(Boolean).map(E=>E.ref.current);C9(I,u)}}j.current=!1}),onBlur:V(e.onBlur,()=>M(!1))})})}),a9="RovingFocusGroupItem",c9=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,f=L1(),C=s||f,u=S6(a9,r),d=u.currentTabStopId===C,h=i9(r),{onFocusableItemAdd:x,onFocusableItemRemove:g,currentTabStopId:p}=u;return c.useEffect(()=>{if(o)return x(),()=>g()},[o,x,g]),t.jsx(V2.ItemSlot,{scope:r,id:C,focusable:o,active:i,children:t.jsx(O.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:V(e.onMouseDown,v=>{o?u.onItemFocus(C):v.preventDefault()}),onFocus:V(e.onFocus,()=>u.onItemFocus(C)),onKeyDown:V(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=b6(v,u.orientation,u.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=h().filter(L=>L.focusable).map(L=>L.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const L=w.indexOf(v.currentTarget);w=u.loop?E6(w,L+1):w.slice(L+1)}setTimeout(()=>C9(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:p!=null}):a})})});c9.displayName=a9;var H6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V6(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function b6(e,n,r){const o=V6(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return H6[o]}function C9(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function E6(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var k6=l9,P6=c9,D6=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},v1=new WeakMap,X1=new WeakMap,U1={},L2=0,u9=function(e){return e&&(e.host||u9(e.parentNode))},F6=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=u9(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},B6=function(e,n,r,o){var i=F6(n,Array.isArray(e)?e:[e]);U1[r]||(U1[r]=new WeakMap);var s=U1[r],a=[],l=new Set,f=new Set(i),C=function(d){!d||l.has(d)||(l.add(d),C(d.parentNode))};i.forEach(C);var u=function(d){!d||f.has(d)||Array.prototype.forEach.call(d.children,function(h){if(l.has(h))u(h);else try{var x=h.getAttribute(o),g=x!==null&&x!=="false",p=(v1.get(h)||0)+1,v=(s.get(h)||0)+1;v1.set(h,p),s.set(h,v),a.push(h),p===1&&g&&X1.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(o,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return u(n),l.clear(),L2++,function(){a.forEach(function(d){var h=v1.get(d)-1,x=s.get(d)-1;v1.set(d,h),s.set(d,x),h||(X1.has(d)||d.removeAttribute(o),X1.delete(d)),x||d.removeAttribute(r)}),L2--,L2||(v1=new WeakMap,v1=new WeakMap,X1=new WeakMap,U1={})}},d9=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=D6(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),B6(o,i,r,"aria-hidden")):function(){return null}},Y=function(){return Y=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Y.apply(this,arguments)};function f9(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function Z6(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var Y1="right-scroll-bar-position",Q1="width-before-scroll-bar",O6="with-scroll-bars-hidden",_6="--removed-body-scroll-bar-size";function M2(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function I6(e,n){var r=c.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var N6=typeof window<"u"?c.useLayoutEffect:c.useEffect,w3=new WeakMap;function T6(e,n){var r=I6(null,function(o){return e.forEach(function(i){return M2(i,o)})});return N6(function(){var o=w3.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||M2(l,null)}),s.forEach(function(l){i.has(l)||M2(l,a)})}w3.set(r,e)},[e]),r}function J6(e){return e}function W6(e,n){n===void 0&&(n=J6);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var f=function(){var u=a;a=[],u.forEach(s)},C=function(){return Promise.resolve().then(f)};C(),r={push:function(u){a.push(u),C()},filter:function(u){return a=a.filter(u),r}}}};return i}function G6(e){e===void 0&&(e={});var n=W6(null);return n.options=Y({async:!0,ssr:!1},e),n}var h9=function(e){var n=e.sideCar,r=f9(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,Y({},r))};h9.isSideCarExport=!0;function X6(e,n){return e.useMedium(n),h9}var p9=G6(),j2=function(){},C2=c.forwardRef(function(e,n){var r=c.useRef(null),o=c.useState({onScrollCapture:j2,onWheelCapture:j2,onTouchMoveCapture:j2}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,f=e.className,C=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,x=e.noRelative,g=e.noIsolation,p=e.inert,v=e.allowPinchZoom,m=e.as,M=m===void 0?"div":m,w=e.gapMode,L=f9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,S=T6([r,n]),A=Y(Y({},L),i);return c.createElement(c.Fragment,null,u&&c.createElement(j,{sideCar:p9,removeScrollBar:C,shards:d,noRelative:x,noIsolation:g,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:w}),a?c.cloneElement(c.Children.only(l),Y(Y({},A),{ref:S})):c.createElement(M,Y({},A,{className:f,ref:S}),l))});C2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};C2.classNames={fullWidth:Q1,zeroRight:Y1};var U6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function z6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=U6();return n&&e.setAttribute("nonce",n),e}function q6(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function K6(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Y6=function(){var e=0,n=null;return{add:function(r){e==0&&(n=z6())&&(q6(n,r),K6(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Q6=function(){var e=Y6();return function(n,r){c.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},x9=function(){var e=Q6(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},$6={left:0,top:0,right:0,gap:0},A2=function(e){return parseInt(e||"",10)||0},e5=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[A2(r),A2(o),A2(i)]},t5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $6;var n=e5(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},n5=x9(),j1="data-scroll-locked",r5=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
1
+ import{r as c,R as R3,a as f1}from"./sentry_react-cODD7zWc.js";import{j as t,c as k2,r as H3,u as T,R as x0,P as g0,a as v0}from"./document_model_editor-D5oPro82.js";import{a as m0,t as e1}from"./tailwind_merge-Dr4f9Rms.js";const w0=c.forwardRef(function(n,r){const{color:o="dark",size:i="medium",className:s="",children:a,icon:l,iconPosition:f="left",...C}=n,u={small:"px-2 py-1.5 text-xs rounded-md font-medium",medium:"px-6 py-3 text-base rounded-xl font-semibold tracking-wide"},h=m0({light:"bg-gray-200 text-gray-600 hover:text-gray-700 hover:border-gray-300 active:border-slate-100 active:text-gray-600 disabled:text-gray-400",dark:"bg-gray-800 text-slate-50 hover:bg-slate-800 active:border-slate-700 disabled:bg-gray-300 disabled:text-slate-100",red:"bg-red-900 text-slate-50 hover:opacity-80 active:border-red-800 disabled:text-red-400 disabled:opacity-100",blue:"bg-blue-900 text-slate-50 hover:opacity-80 active:border-blue-800 disabled:text-blue-400 disabled:opacity-100"}[o],u[i]),x=e1("flex items-center justify-center gap-2 border border-none outline-none transition disabled:cursor-not-allowed",h,s);return t.jsxs("button",{className:x,ref:r,...C,children:[f==="left"&&l,a,f==="right"&&l]})});function V(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return n?.(i)}}function L0(e,n){const r=c.createContext(n),o=s=>{const{children:a,...l}=s,f=c.useMemo(()=>l,Object.values(l));return t.jsx(r.Provider,{value:f,children:a})};o.displayName=e+"Provider";function i(s){const a=c.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function y1(e,n=[]){let r=[];function o(s,a){const l=c.createContext(a),f=r.length;r=[...r,a];const C=d=>{const{scope:h,children:x,...g}=d,p=h?.[e]?.[f]||l,v=c.useMemo(()=>g,Object.values(g));return t.jsx(p.Provider,{value:v,children:x})};C.displayName=s+"Provider";function u(d,h){const x=h?.[e]?.[f]||l,g=c.useContext(x);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[C,u]}const i=()=>{const s=r.map(a=>c.createContext(a));return function(l){const f=l?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return i.scopeName=e,[o,M0(i,...n)]}function M0(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:f,scopeName:C})=>{const d=f(s)[`__scope${C}`];return{...l,...d}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var l1=globalThis?.document?c.useLayoutEffect:()=>{},j0=R3[" useInsertionEffect ".trim().toString()]||l1;function P2({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=A0({defaultProp:n,onChange:r}),l=e!==void 0,f=l?e:i;{const u=c.useRef(e!==void 0);c.useEffect(()=>{const d=u.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=l},[l,o])}const C=c.useCallback(u=>{if(l){const d=y0(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[l,e,s,a]);return[f,C]}function A0({defaultProp:e,onChange:n}){const[r,o]=c.useState(e),i=c.useRef(r),s=c.useRef(n);return j0(()=>{s.current=n},[n]),c.useEffect(()=>{i.current!==r&&(s.current?.(r),i.current=r)},[r,i]),[r,o,s]}function y0(e){return typeof e=="function"}function P1(e){const n=S0(e),r=c.forwardRef((o,i)=>{const{children:s,...a}=o,l=c.Children.toArray(s),f=l.find(R0);if(f){const C=f.props.children,u=l.map(d=>d===f?c.Children.count(C)>1?c.Children.only(null):c.isValidElement(C)?C.props.children:null:d);return t.jsx(n,{...a,ref:i,children:c.isValidElement(C)?c.cloneElement(C,void 0,u):null})}return t.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function S0(e){const n=c.forwardRef((r,o)=>{const{children:i,...s}=r;if(c.isValidElement(i)){const a=V0(i),l=H0(s,i.props);return i.type!==c.Fragment&&(l.ref=o?k2(o,a):a),c.cloneElement(i,l)}return c.Children.count(i)>1?c.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var V3=Symbol("radix.slottable");function Rt(e){const n=({children:r})=>t.jsx(t.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=V3,n}function R0(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===V3}function H0(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const f=s(...l);return i(...l),f}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function V0(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=b0.reduce((e,n)=>{const r=P1(`Primitive.${n}`),o=c.forwardRef((i,s)=>{const{asChild:a,...l}=i,f=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),t.jsx(f,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function b3(e,n){e&&H3.flushSync(()=>e.dispatchEvent(n))}function E3(e){const n=e+"CollectionProvider",[r,o]=y1(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:v,children:m}=p,M=f1.useRef(null),w=f1.useRef(new Map).current;return t.jsx(i,{scope:v,itemMap:w,collectionRef:M,children:m})};a.displayName=n;const l=e+"CollectionSlot",f=P1(l),C=f1.forwardRef((p,v)=>{const{scope:m,children:M}=p,w=s(l,m),L=T(v,w.collectionRef);return t.jsx(f,{ref:L,children:M})});C.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=P1(u),x=f1.forwardRef((p,v)=>{const{scope:m,children:M,...w}=p,L=f1.useRef(null),j=T(v,L),S=s(u,m);return f1.useEffect(()=>(S.itemMap.set(L,{ref:L,...w}),()=>void S.itemMap.delete(L))),t.jsx(h,{[d]:"",ref:j,children:M})});x.displayName=u;function g(p){const v=s(e+"CollectionConsumer",p);return f1.useCallback(()=>{const M=v.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((S,A)=>w.indexOf(S.ref.current)-w.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:C,ItemSlot:x},g,o]}var E0=c.createContext(void 0);function k3(e){const n=c.useContext(E0);return e||n||"ltr"}function r1(e){const n=c.useRef(e);return c.useEffect(()=>{n.current=e}),c.useMemo(()=>(...r)=>n.current?.(...r),[])}function k0(e,n=globalThis?.document){const r=r1(e);c.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var P0="DismissableLayer",y2="dismissableLayer.update",D0="dismissableLayer.pointerDownOutside",F0="dismissableLayer.focusOutside",n3,P3=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),D2=c.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...f}=e,C=c.useContext(P3),[u,d]=c.useState(null),h=u?.ownerDocument??globalThis?.document,[,x]=c.useState({}),g=T(n,A=>d(A)),p=Array.from(C.layers),[v]=[...C.layersWithOutsidePointerEventsDisabled].slice(-1),m=p.indexOf(v),M=u?p.indexOf(u):-1,w=C.layersWithOutsidePointerEventsDisabled.size>0,L=M>=m,j=O0(A=>{const R=A.target,k=[...C.branches].some(b=>b.contains(R));!L||k||(i?.(A),a?.(A),A.defaultPrevented||l?.())},h),S=_0(A=>{const R=A.target;[...C.branches].some(b=>b.contains(R))||(s?.(A),a?.(A),A.defaultPrevented||l?.())},h);return k0(A=>{M===C.layers.size-1&&(o?.(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),c.useEffect(()=>{if(u)return r&&(C.layersWithOutsidePointerEventsDisabled.size===0&&(n3=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),C.layersWithOutsidePointerEventsDisabled.add(u)),C.layers.add(u),r3(),()=>{r&&C.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=n3)}},[u,h,r,C]),c.useEffect(()=>()=>{u&&(C.layers.delete(u),C.layersWithOutsidePointerEventsDisabled.delete(u),r3())},[u,C]),c.useEffect(()=>{const A=()=>x({});return document.addEventListener(y2,A),()=>document.removeEventListener(y2,A)},[]),t.jsx(O.div,{...f,ref:g,style:{pointerEvents:w?L?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,j.onPointerDownCapture)})});D2.displayName=P0;var B0="DismissableLayerBranch",Z0=c.forwardRef((e,n)=>{const r=c.useContext(P3),o=c.useRef(null),i=T(n,o);return c.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),t.jsx(O.div,{...e,ref:i})});Z0.displayName=B0;function O0(e,n=globalThis?.document){const r=r1(e),o=c.useRef(!1),i=c.useRef(()=>{});return c.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let f=function(){D3(D0,r,C,{discrete:!0})};const C={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=f,n.addEventListener("click",i.current,{once:!0})):f()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function _0(e,n=globalThis?.document){const r=r1(e),o=c.useRef(!1);return c.useEffect(()=>{const i=s=>{s.target&&!o.current&&D3(F0,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function r3(){const e=new CustomEvent(y2);document.dispatchEvent(e)}function D3(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?b3(i,s):i.dispatchEvent(s)}var p2=0;function F3(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o3()),document.body.insertAdjacentElement("beforeend",e[1]??o3()),p2++,()=>{p2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),p2--}},[])}function o3(){const 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}var x2="focusScope.autoFocusOnMount",g2="focusScope.autoFocusOnUnmount",i3={bubbles:!1,cancelable:!0},I0="FocusScope",F2=c.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,f]=c.useState(null),C=r1(i),u=r1(s),d=c.useRef(null),h=T(n,p=>f(p)),x=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(w){if(x.paused||!l)return;const L=w.target;l.contains(L)?d.current=L:s1(d.current,{select:!0})},v=function(w){if(x.paused||!l)return;const L=w.relatedTarget;L!==null&&(l.contains(L)||s1(d.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&s1(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const M=new MutationObserver(m);return l&&M.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),M.disconnect()}}},[o,l,x.paused]),c.useEffect(()=>{if(l){l3.add(x);const p=document.activeElement;if(!l.contains(p)){const m=new CustomEvent(x2,i3);l.addEventListener(x2,C),l.dispatchEvent(m),m.defaultPrevented||(N0(X0(B3(l)),{select:!0}),document.activeElement===p&&s1(l))}return()=>{l.removeEventListener(x2,C),setTimeout(()=>{const m=new CustomEvent(g2,i3);l.addEventListener(g2,u),l.dispatchEvent(m),m.defaultPrevented||s1(p??document.body,{select:!0}),l.removeEventListener(g2,u),l3.remove(x)},0)}}},[l,C,u,x]);const g=c.useCallback(p=>{if(!r&&!o||x.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,m=document.activeElement;if(v&&m){const M=p.currentTarget,[w,L]=T0(M);w&&L?!p.shiftKey&&m===L?(p.preventDefault(),r&&s1(w,{select:!0})):p.shiftKey&&m===w&&(p.preventDefault(),r&&s1(L,{select:!0})):m===M&&p.preventDefault()}},[r,o,x.paused]);return t.jsx(O.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});F2.displayName=I0;function N0(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(s1(o,{select:n}),document.activeElement!==r)return}function T0(e){const n=B3(e),r=s3(n,e),o=s3(n.reverse(),e);return[r,o]}function B3(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function s3(e,n){for(const r of e)if(!J0(r,{upTo:n}))return r}function J0(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function W0(e){return e instanceof HTMLInputElement&&"select"in e}function s1(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&W0(e)&&n&&e.select()}}var l3=G0();function G0(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=a3(e,n),e.unshift(n)},remove(n){e=a3(e,n),e[0]?.resume()}}}function a3(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function X0(e){return e.filter(n=>n.tagName!=="A")}var U0=R3[" useId ".trim().toString()]||(()=>{}),z0=0;function L1(e){const[n,r]=c.useState(U0());return l1(()=>{r(o=>o??String(z0++))},[e]),e||(n?`radix-${n}`:"")}const q0=["top","right","bottom","left"],a1=Math.min,W=Math.max,$1=Math.round,W1=Math.floor,$=e=>({x:e,y:e}),K0={left:"right",right:"left",bottom:"top",top:"bottom"},Y0={start:"end",end:"start"};function S2(e,n,r){return W(e,a1(n,r))}function o1(e,n){return typeof e=="function"?e(n):e}function i1(e){return e.split("-")[0]}function S1(e){return e.split("-")[1]}function B2(e){return e==="x"?"y":"x"}function Z2(e){return e==="y"?"height":"width"}const Q0=new Set(["top","bottom"]);function Q(e){return Q0.has(i1(e))?"y":"x"}function O2(e){return B2(Q(e))}function $0(e,n,r){r===void 0&&(r=!1);const o=S1(e),i=O2(e),s=Z2(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=e2(a)),[a,e2(a)]}function e4(e){const n=e2(e);return[R2(e),n,R2(n)]}function R2(e){return e.replace(/start|end/g,n=>Y0[n])}const c3=["left","right"],C3=["right","left"],t4=["top","bottom"],n4=["bottom","top"];function r4(e,n,r){switch(e){case"top":case"bottom":return r?n?C3:c3:n?c3:C3;case"left":case"right":return n?t4:n4;default:return[]}}function o4(e,n,r,o){const i=S1(e);let s=r4(i1(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(R2)))),s}function e2(e){return e.replace(/left|right|bottom|top/g,n=>K0[n])}function i4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z3(e){return typeof e!="number"?i4(e):{top:e,right:e,bottom:e,left:e}}function t2(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function u3(e,n,r){let{reference:o,floating:i}=e;const s=Q(n),a=O2(n),l=Z2(a),f=i1(n),C=s==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let x;switch(f){case"top":x={x:u,y:o.y-i.height};break;case"bottom":x={x:u,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:d};break;case"left":x={x:o.x-i.width,y:d};break;default:x={x:o.x,y:o.y}}switch(S1(n)){case"start":x[a]-=h*(r&&C?-1:1);break;case"end":x[a]+=h*(r&&C?-1:1);break}return x}const s4=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=s.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(n));let C=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=u3(C,o,f),h=o,x={},g=0;for(let p=0;p<l.length;p++){const{name:v,fn:m}=l[p],{x:M,y:w,data:L,reset:j}=await m({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:x,rects:C,platform:a,elements:{reference:e,floating:n}});u=M??u,d=w??d,x={...x,[v]:{...x[v],...L}},j&&g<=50&&(g++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(C=j.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):j.rects),{x:u,y:d}=u3(C,h,f)),p=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:x}};async function D1(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:f}=e,{boundary:C="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:x=0}=o1(n,e),g=Z3(x),v=l[h?d==="floating"?"reference":"floating":d],m=t2(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:C,rootBoundary:u,strategy:f})),M=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),L=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},j=t2(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:M,offsetParent:w,strategy:f}):M);return{top:(m.top-j.top+g.top)/L.y,bottom:(j.bottom-m.bottom+g.bottom)/L.y,left:(m.left-j.left+g.left)/L.x,right:(j.right-m.right+g.right)/L.x}}const l4=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:f}=n,{element:C,padding:u=0}=o1(e,n)||{};if(C==null)return{};const d=Z3(u),h={x:r,y:o},x=O2(i),g=Z2(x),p=await a.getDimensions(C),v=x==="y",m=v?"top":"left",M=v?"bottom":"right",w=v?"clientHeight":"clientWidth",L=s.reference[g]+s.reference[x]-h[x]-s.floating[g],j=h[x]-s.reference[x],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(C));let A=S?S[w]:0;(!A||!await(a.isElement==null?void 0:a.isElement(S)))&&(A=l.floating[w]||s.floating[g]);const R=L/2-j/2,k=A/2-p[g]/2-1,b=a1(d[m],k),F=a1(d[M],k),B=b,D=A-p[g]-F,P=A/2-p[g]/2+R,I=S2(B,P,D),E=!f.arrow&&S1(i)!=null&&P!==I&&s.reference[g]/2-(P<B?b:F)-p[g]/2<0,Z=E?P<B?P-B:P-D:0;return{[x]:h[x]+Z,data:{[x]:I,centerOffset:P-I-Z,...E&&{alignmentOffset:Z}},reset:E}}}),a4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:f,elements:C}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...v}=o1(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const m=i1(i),M=Q(l),w=i1(l)===l,L=await(f.isRTL==null?void 0:f.isRTL(C.floating)),j=h||(w||!p?[e2(l)]:e4(l)),S=g!=="none";!h&&S&&j.push(...o4(l,p,g,L));const A=[l,...j],R=await D1(n,v),k=[];let b=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&k.push(R[m]),d){const P=$0(i,a,L);k.push(R[P[0]],R[P[1]])}if(b=[...b,{placement:i,overflows:k}],!k.every(P=>P<=0)){var F,B;const P=(((F=s.flip)==null?void 0:F.index)||0)+1,I=A[P];if(I&&(!(d==="alignment"?M!==Q(I):!1)||b.every(H=>Q(H.placement)===M?H.overflows[0]>0:!0)))return{data:{index:P,overflows:b},reset:{placement:I}};let E=(B=b.filter(Z=>Z.overflows[0]<=0).sort((Z,H)=>Z.overflows[1]-H.overflows[1])[0])==null?void 0:B.placement;if(!E)switch(x){case"bestFit":{var D;const Z=(D=b.filter(H=>{if(S){const y=Q(H.placement);return y===M||y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(y=>y>0).reduce((y,N)=>y+N,0)]).sort((H,y)=>H[1]-y[1])[0])==null?void 0:D[0];Z&&(E=Z);break}case"initialPlacement":E=l;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function d3(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function f3(e){return q0.some(n=>e[n]>=0)}const c4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:o="referenceHidden",...i}=o1(e,n);switch(o){case"referenceHidden":{const s=await D1(n,{...i,elementContext:"reference"}),a=d3(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:f3(a)}}}case"escaped":{const s=await D1(n,{...i,altBoundary:!0}),a=d3(s,r.floating);return{data:{escapedOffsets:a,escaped:f3(a)}}}default:return{}}}}},O3=new Set(["left","top"]);async function C4(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=i1(r),l=S1(r),f=Q(r)==="y",C=O3.has(a)?-1:1,u=s&&f?-1:1,d=o1(n,e);let{mainAxis:h,crossAxis:x,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(x=l==="end"?g*-1:g),f?{x:x*u,y:h*C}:{x:h*C,y:x*u}}const u4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,f=await C4(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:a}}}}},d4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i}=n,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:m,y:M}=v;return{x:m,y:M}}},...f}=o1(e,n),C={x:r,y:o},u=await D1(n,f),d=Q(i1(i)),h=B2(d);let x=C[h],g=C[d];if(s){const v=h==="y"?"top":"left",m=h==="y"?"bottom":"right",M=x+u[v],w=x-u[m];x=S2(M,x,w)}if(a){const v=d==="y"?"top":"left",m=d==="y"?"bottom":"right",M=g+u[v],w=g-u[m];g=S2(M,g,w)}const p=l.fn({...n,[h]:x,[d]:g});return{...p,data:{x:p.x-r,y:p.y-o,enabled:{[h]:s,[d]:a}}}}}},f4=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:f=!0,crossAxis:C=!0}=o1(e,n),u={x:r,y:o},d=Q(i),h=B2(d);let x=u[h],g=u[d];const p=o1(l,n),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(f){const w=h==="y"?"height":"width",L=s.reference[h]-s.floating[w]+v.mainAxis,j=s.reference[h]+s.reference[w]-v.mainAxis;x<L?x=L:x>j&&(x=j)}if(C){var m,M;const w=h==="y"?"width":"height",L=O3.has(i1(i)),j=s.reference[d]-s.floating[w]+(L&&((m=a.offset)==null?void 0:m[d])||0)+(L?0:v.crossAxis),S=s.reference[d]+s.reference[w]+(L?0:((M=a.offset)==null?void 0:M[d])||0)-(L?v.crossAxis:0);g<j?g=j:g>S&&(g=S)}return{[h]:x,[d]:g}}}},h4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:f=()=>{},...C}=o1(e,n),u=await D1(n,C),d=i1(i),h=S1(i),x=Q(i)==="y",{width:g,height:p}=s.floating;let v,m;d==="top"||d==="bottom"?(v=d,m=h===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,v=h==="end"?"top":"bottom");const M=p-u.top-u.bottom,w=g-u.left-u.right,L=a1(p-u[v],M),j=a1(g-u[m],w),S=!n.middlewareData.shift;let A=L,R=j;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(R=w),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(A=M),S&&!h){const b=W(u.left,0),F=W(u.right,0),B=W(u.top,0),D=W(u.bottom,0);x?R=g-2*(b!==0||F!==0?b+F:W(u.left,u.right)):A=p-2*(B!==0||D!==0?B+D:W(u.top,u.bottom))}await f({...n,availableWidth:R,availableHeight:A});const k=await a.getDimensions(l.floating);return g!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function s2(){return typeof window<"u"}function R1(e){return _3(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function n1(e){var n;return(n=(_3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function _3(e){return s2()?e instanceof Node||e instanceof G(e).Node:!1}function U(e){return s2()?e instanceof Element||e instanceof G(e).Element:!1}function t1(e){return s2()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function h3(e){return!s2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const p4=new Set(["inline","contents"]);function O1(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=z(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!p4.has(i)}const x4=new Set(["table","td","th"]);function g4(e){return x4.has(R1(e))}const v4=[":popover-open",":modal"];function l2(e){return v4.some(n=>{try{return e.matches(n)}catch{return!1}})}const m4=["transform","translate","scale","rotate","perspective"],w4=["transform","translate","scale","rotate","perspective","filter"],L4=["paint","layout","strict","content"];function _2(e){const n=I2(),r=U(e)?z(e):e;return m4.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||w4.some(o=>(r.willChange||"").includes(o))||L4.some(o=>(r.contain||"").includes(o))}function M4(e){let n=c1(e);for(;t1(n)&&!A1(n);){if(_2(n))return n;if(l2(n))return null;n=c1(n)}return null}function I2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j4=new Set(["html","body","#document"]);function A1(e){return j4.has(R1(e))}function z(e){return G(e).getComputedStyle(e)}function a2(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function c1(e){if(R1(e)==="html")return e;const n=e.assignedSlot||e.parentNode||h3(e)&&e.host||n1(e);return h3(n)?n.host:n}function I3(e){const n=c1(e);return A1(n)?e.ownerDocument?e.ownerDocument.body:e.body:t1(n)&&O1(n)?n:I3(n)}function F1(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=I3(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=G(i);if(s){const l=H2(a);return n.concat(a,a.visualViewport||[],O1(i)?i:[],l&&r?F1(l):[])}return n.concat(i,F1(i,[],r))}function H2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N3(e){const n=z(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=t1(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=$1(r)!==s||$1(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function N2(e){return U(e)?e:e.contextElement}function M1(e){const n=N2(e);if(!t1(n))return $(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=N3(n);let a=(s?$1(r.width):r.width)/o,l=(s?$1(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const A4=$(0);function T3(e){const n=G(e);return!I2()||!n.visualViewport?A4:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function y4(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==G(e)?!1:n}function h1(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=N2(e);let a=$(1);n&&(o?U(o)&&(a=M1(o)):a=M1(e));const l=y4(s,r,o)?T3(s):$(0);let f=(i.left+l.x)/a.x,C=(i.top+l.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(s){const h=G(s),x=o&&U(o)?G(o):o;let g=h,p=H2(g);for(;p&&o&&x!==g;){const v=M1(p),m=p.getBoundingClientRect(),M=z(p),w=m.left+(p.clientLeft+parseFloat(M.paddingLeft))*v.x,L=m.top+(p.clientTop+parseFloat(M.paddingTop))*v.y;f*=v.x,C*=v.y,u*=v.x,d*=v.y,f+=w,C+=L,g=G(p),p=H2(g)}}return t2({width:u,height:d,x:f,y:C})}function c2(e,n){const r=a2(e).scrollLeft;return n?n.left+r:h1(n1(e)).left+r}function J3(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-c2(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function S4(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=n1(o),l=n?l2(n.floating):!1;if(o===a||l&&s)return r;let f={scrollLeft:0,scrollTop:0},C=$(1);const u=$(0),d=t1(o);if((d||!d&&!s)&&((R1(o)!=="body"||O1(a))&&(f=a2(o)),t1(o))){const x=h1(o);C=M1(o),u.x=x.x+o.clientLeft,u.y=x.y+o.clientTop}const h=a&&!d&&!s?J3(a,f):$(0);return{width:r.width*C.x,height:r.height*C.y,x:r.x*C.x-f.scrollLeft*C.x+u.x+h.x,y:r.y*C.y-f.scrollTop*C.y+u.y+h.y}}function R4(e){return Array.from(e.getClientRects())}function H4(e){const n=n1(e),r=a2(e),o=e.ownerDocument.body,i=W(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=W(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+c2(e);const l=-r.scrollTop;return z(o).direction==="rtl"&&(a+=W(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const p3=25;function V4(e,n){const r=G(e),o=n1(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,f=0;if(i){s=i.width,a=i.height;const u=I2();(!u||u&&n==="fixed")&&(l=i.offsetLeft,f=i.offsetTop)}const C=c2(o);if(C<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),x=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-x);g<=p3&&(s-=g)}else C<=p3&&(s+=C);return{width:s,height:a,x:l,y:f}}const b4=new Set(["absolute","fixed"]);function E4(e,n){const r=h1(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=t1(e)?M1(e):$(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,f=i*s.x,C=o*s.y;return{width:a,height:l,x:f,y:C}}function x3(e,n,r){let o;if(n==="viewport")o=V4(e,r);else if(n==="document")o=H4(n1(e));else if(U(n))o=E4(n,r);else{const i=T3(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return t2(o)}function W3(e,n){const r=c1(e);return r===n||!U(r)||A1(r)?!1:z(r).position==="fixed"||W3(r,n)}function k4(e,n){const r=n.get(e);if(r)return r;let o=F1(e,[],!1).filter(l=>U(l)&&R1(l)!=="body"),i=null;const s=z(e).position==="fixed";let a=s?c1(e):e;for(;U(a)&&!A1(a);){const l=z(a),f=_2(a);!f&&l.position==="fixed"&&(i=null),(s?!f&&!i:!f&&l.position==="static"&&!!i&&b4.has(i.position)||O1(a)&&!f&&W3(e,a))?o=o.filter(u=>u!==a):i=l,a=c1(a)}return n.set(e,o),o}function P4(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?l2(n)?[]:k4(n,this._c):[].concat(r),o],l=a[0],f=a.reduce((C,u)=>{const d=x3(n,u,i);return C.top=W(d.top,C.top),C.right=a1(d.right,C.right),C.bottom=a1(d.bottom,C.bottom),C.left=W(d.left,C.left),C},x3(n,l,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function D4(e){const{width:n,height:r}=N3(e);return{width:n,height:r}}function F4(e,n,r){const o=t1(n),i=n1(n),s=r==="fixed",a=h1(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const f=$(0);function C(){f.x=c2(i)}if(o||!o&&!s)if((R1(n)!=="body"||O1(i))&&(l=a2(n)),o){const x=h1(n,!0,s,n);f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}else i&&C();s&&!o&&i&&C();const u=i&&!o&&!s?J3(i,l):$(0),d=a.left+l.scrollLeft-f.x-u.x,h=a.top+l.scrollTop-f.y-u.y;return{x:d,y:h,width:a.width,height:a.height}}function v2(e){return z(e).position==="static"}function g3(e,n){if(!t1(e)||z(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return n1(e)===r&&(r=r.ownerDocument.body),r}function G3(e,n){const r=G(e);if(l2(e))return r;if(!t1(e)){let i=c1(e);for(;i&&!A1(i);){if(U(i)&&!v2(i))return i;i=c1(i)}return r}let o=g3(e,n);for(;o&&g4(o)&&v2(o);)o=g3(o,n);return o&&A1(o)&&v2(o)&&!_2(o)?r:o||M4(e)||r}const B4=async function(e){const n=this.getOffsetParent||G3,r=this.getDimensions,o=await r(e.floating);return{reference:F4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Z4(e){return z(e).direction==="rtl"}const O4={convertOffsetParentRelativeRectToViewportRelativeRect:S4,getDocumentElement:n1,getClippingRect:P4,getOffsetParent:G3,getElementRects:B4,getClientRects:R4,getDimensions:D4,getScale:M1,isElement:U,isRTL:Z4};function X3(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function _4(e,n){let r=null,o;const i=n1(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),s();const C=e.getBoundingClientRect(),{left:u,top:d,width:h,height:x}=C;if(l||n(),!h||!x)return;const g=W1(d),p=W1(i.clientWidth-(u+h)),v=W1(i.clientHeight-(d+x)),m=W1(u),w={rootMargin:-g+"px "+-p+"px "+-v+"px "+-m+"px",threshold:W(0,a1(1,f))||1};let L=!0;function j(S){const A=S[0].intersectionRatio;if(A!==f){if(!L)return a();A?a(!1,A):o=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!X3(C,e.getBoundingClientRect())&&a(),L=!1}try{r=new IntersectionObserver(j,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(j,w)}r.observe(e)}return a(!0),s}function I4(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,C=N2(e),u=i||s?[...C?F1(C):[],...F1(n)]:[];u.forEach(m=>{i&&m.addEventListener("scroll",r,{passive:!0}),s&&m.addEventListener("resize",r)});const d=C&&l?_4(C,r):null;let h=-1,x=null;a&&(x=new ResizeObserver(m=>{let[M]=m;M&&M.target===C&&x&&(x.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(n)})),r()}),C&&!f&&x.observe(C),x.observe(n));let g,p=f?h1(e):null;f&&v();function v(){const m=h1(e);p&&!X3(p,m)&&r(),p=m,g=requestAnimationFrame(v)}return r(),()=>{var m;u.forEach(M=>{i&&M.removeEventListener("scroll",r),s&&M.removeEventListener("resize",r)}),d?.(),(m=x)==null||m.disconnect(),x=null,f&&cancelAnimationFrame(g)}}const N4=u4,T4=d4,J4=a4,W4=h4,G4=c4,v3=l4,X4=f4,U4=(e,n,r)=>{const o=new Map,i={platform:O4,...r},s={...i.platform,_c:o};return s4(e,n,{...i,platform:s})};var z4=typeof document<"u",q4=function(){},K1=z4?c.useLayoutEffect:q4;function n2(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!n2(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!n2(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function U3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function m3(e,n){const r=U3(e);return Math.round(n*r)/r}function m2(e){const n=c.useRef(e);return K1(()=>{n.current=e}),n}function K4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:f,open:C}=e,[u,d]=c.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,x]=c.useState(o);n2(h,o)||x(o);const[g,p]=c.useState(null),[v,m]=c.useState(null),M=c.useCallback(H=>{H!==S.current&&(S.current=H,p(H))},[]),w=c.useCallback(H=>{H!==A.current&&(A.current=H,m(H))},[]),L=s||g,j=a||v,S=c.useRef(null),A=c.useRef(null),R=c.useRef(u),k=f!=null,b=m2(f),F=m2(i),B=m2(C),D=c.useCallback(()=>{if(!S.current||!A.current)return;const H={placement:n,strategy:r,middleware:h};F.current&&(H.platform=F.current),U4(S.current,A.current,H).then(y=>{const N={...y,isPositioned:B.current!==!1};P.current&&!n2(R.current,N)&&(R.current=N,H3.flushSync(()=>{d(N)}))})},[h,n,r,F,B]);K1(()=>{C===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[C]);const P=c.useRef(!1);K1(()=>(P.current=!0,()=>{P.current=!1}),[]),K1(()=>{if(L&&(S.current=L),j&&(A.current=j),L&&j){if(b.current)return b.current(L,j,D);D()}},[L,j,D,b,k]);const I=c.useMemo(()=>({reference:S,floating:A,setReference:M,setFloating:w}),[M,w]),E=c.useMemo(()=>({reference:L,floating:j}),[L,j]),Z=c.useMemo(()=>{const H={position:r,left:0,top:0};if(!E.floating)return H;const y=m3(E.floating,u.x),N=m3(E.floating,u.y);return l?{...H,transform:"translate("+y+"px, "+N+"px)",...U3(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:y,top:N}},[r,l,E.floating,u.x,u.y]);return c.useMemo(()=>({...u,update:D,refs:I,elements:E,floatingStyles:Z}),[u,D,I,E,Z])}const Y4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?v3({element:o.current,padding:i}).fn(r):{}:o?v3({element:o,padding:i}).fn(r):{}}}},Q4=(e,n)=>({...N4(e),options:[e,n]}),$4=(e,n)=>({...T4(e),options:[e,n]}),e6=(e,n)=>({...X4(e),options:[e,n]}),t6=(e,n)=>({...J4(e),options:[e,n]}),n6=(e,n)=>({...W4(e),options:[e,n]}),r6=(e,n)=>({...G4(e),options:[e,n]}),o6=(e,n)=>({...Y4(e),options:[e,n]});var i6="Arrow",z3=c.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return t.jsx(O.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});z3.displayName=i6;var s6=z3;function l6(e){const[n,r]=c.useState(void 0);return l1(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const f=s.borderBoxSize,C=Array.isArray(f)?f[0]:f;a=C.inlineSize,l=C.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}var T2="Popper",[q3,K3]=y1(T2),[a6,Y3]=q3(T2),Q3=e=>{const{__scopePopper:n,children:r}=e,[o,i]=c.useState(null);return t.jsx(a6,{scope:n,anchor:o,onAnchorChange:i,children:r})};Q3.displayName=T2;var $3="PopperAnchor",e9=c.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=Y3($3,r),a=c.useRef(null),l=T(n,a),f=c.useRef(null);return c.useEffect(()=>{const C=f.current;f.current=o?.current||a.current,C!==f.current&&s.onAnchorChange(f.current)}),o?null:t.jsx(O.div,{...i,ref:l})});e9.displayName=$3;var J2="PopperContent",[c6,C6]=q3(J2),t9=c.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:f=!0,collisionBoundary:C=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:x="optimized",onPlaced:g,...p}=e,v=Y3(J2,r),[m,M]=c.useState(null),w=T(n,_=>M(_)),[L,j]=c.useState(null),S=l6(L),A=S?.width??0,R=S?.height??0,k=o+(s!=="center"?"-"+s:""),b=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},F=Array.isArray(C)?C:[C],B=F.length>0,D={padding:b,boundary:F.filter(d6),altBoundary:B},{refs:P,floatingStyles:I,placement:E,isPositioned:Z,middlewareData:H}=K4({strategy:"fixed",placement:k,whileElementsMounted:(..._)=>I4(..._,{animationFrame:x==="always"}),elements:{reference:v.anchor},middleware:[Q4({mainAxis:i+R,alignmentAxis:a}),f&&$4({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?e6():void 0,...D}),f&&t6({...D}),n6({...D,apply:({elements:_,rects:b1,availableWidth:d0,availableHeight:f0})=>{const{width:h0,height:p0}=b1.reference,J1=_.floating.style;J1.setProperty("--radix-popper-available-width",`${d0}px`),J1.setProperty("--radix-popper-available-height",`${f0}px`),J1.setProperty("--radix-popper-anchor-width",`${h0}px`),J1.setProperty("--radix-popper-anchor-height",`${p0}px`)}}),L&&o6({element:L,padding:l}),f6({arrowWidth:A,arrowHeight:R}),h&&r6({strategy:"referenceHidden",...D})]}),[y,N]=o9(E),K=r1(g);l1(()=>{Z&&K?.()},[Z,K]);const u1=H.arrow?.x,H1=H.arrow?.y,V1=H.arrow?.centerOffset!==0,[T1,d1]=c.useState();return l1(()=>{m&&d1(window.getComputedStyle(m).zIndex)},[m]),t.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:Z?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T1,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(c6,{scope:r,placedSide:y,onArrowChange:j,arrowX:u1,arrowY:H1,shouldHideArrow:V1,children:t.jsx(O.div,{"data-side":y,"data-align":N,...p,ref:w,style:{...p.style,animation:Z?void 0:"none"}})})})});t9.displayName=J2;var n9="PopperArrow",u6={top:"bottom",right:"left",bottom:"top",left:"right"},r9=c.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=C6(n9,o),a=u6[s.placedSide];return t.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:t.jsx(s6,{...i,ref:r,style:{...i.style,display:"block"}})})});r9.displayName=n9;function d6(e){return e!==null}var f6=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:o,middlewareData:i}=n,a=i.arrow?.centerOffset!==0,l=a?0:e.arrowWidth,f=a?0:e.arrowHeight,[C,u]=o9(r),d={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,x=(i.arrow?.y??0)+f/2;let g="",p="";return C==="bottom"?(g=a?d:`${h}px`,p=`${-f}px`):C==="top"?(g=a?d:`${h}px`,p=`${o.floating.height+f}px`):C==="right"?(g=`${-f}px`,p=a?d:`${x}px`):C==="left"&&(g=`${o.floating.width+f}px`,p=a?d:`${x}px`),{data:{x:g,y:p}}}});function o9(e){const[n,r="center"]=e.split("-");return[n,r]}var h6=Q3,p6=e9,x6=t9,g6=r9,v6="Portal",W2=c.forwardRef((e,n)=>{const{container:r,...o}=e,[i,s]=c.useState(!1);l1(()=>s(!0),[]);const a=r||i&&globalThis?.document?.body;return a?x0.createPortal(t.jsx(O.div,{...o,ref:n}),a):null});W2.displayName=v6;function m6(e,n){return c.useReducer((r,o)=>n[r][o]??r,e)}var C1=e=>{const{present:n,children:r}=e,o=w6(n),i=typeof r=="function"?r({present:o.isPresent}):c.Children.only(r),s=T(o.ref,L6(i));return typeof r=="function"||o.isPresent?c.cloneElement(i,{ref:s}):null};C1.displayName="Presence";function w6(e){const[n,r]=c.useState(),o=c.useRef(null),i=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[l,f]=m6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const C=G1(o.current);s.current=l==="mounted"?C:"none"},[l]),l1(()=>{const C=o.current,u=i.current;if(u!==e){const h=s.current,x=G1(C);e?f("MOUNT"):x==="none"||C?.display==="none"?f("UNMOUNT"):f(u&&h!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),l1(()=>{if(n){let C;const u=n.ownerDocument.defaultView??window,d=x=>{const p=G1(o.current).includes(CSS.escape(x.animationName));if(x.target===n&&p&&(f("ANIMATION_END"),!i.current)){const v=n.style.animationFillMode;n.style.animationFillMode="forwards",C=u.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=v)})}},h=x=>{x.target===n&&(s.current=G1(o.current))};return n.addEventListener("animationstart",h),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{u.clearTimeout(C),n.removeEventListener("animationstart",h),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(C=>{o.current=C?getComputedStyle(C):null,r(C)},[])}}function G1(e){return e?.animationName||"none"}function L6(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var w2="rovingFocusGroup.onEntryFocus",M6={bubbles:!1,cancelable:!0},_1="RovingFocusGroup",[V2,i9,j6]=E3(_1),[A6,s9]=y1(_1,[j6]),[y6,S6]=A6(_1),l9=c.forwardRef((e,n)=>t.jsx(V2.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(V2.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(R6,{...e,ref:n})})}));l9.displayName=_1;var R6=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:f,onEntryFocus:C,preventScrollOnEntryFocus:u=!1,...d}=e,h=c.useRef(null),x=T(n,h),g=k3(s),[p,v]=P2({prop:a,defaultProp:l??null,onChange:f,caller:_1}),[m,M]=c.useState(!1),w=r1(C),L=i9(r),j=c.useRef(!1),[S,A]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(w2,w),()=>R.removeEventListener(w2,w)},[w]),t.jsx(y6,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:p,onItemFocus:c.useCallback(R=>v(R),[v]),onItemShiftTab:c.useCallback(()=>M(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:t.jsx(O.div,{tabIndex:m||S===0?-1:0,"data-orientation":o,...d,ref:x,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{j.current=!0}),onFocus:V(e.onFocus,R=>{const k=!j.current;if(R.target===R.currentTarget&&k&&!m){const b=new CustomEvent(w2,M6);if(R.currentTarget.dispatchEvent(b),!b.defaultPrevented){const F=L().filter(E=>E.focusable),B=F.find(E=>E.active),D=F.find(E=>E.id===p),I=[B,D,...F].filter(Boolean).map(E=>E.ref.current);C9(I,u)}}j.current=!1}),onBlur:V(e.onBlur,()=>M(!1))})})}),a9="RovingFocusGroupItem",c9=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,f=L1(),C=s||f,u=S6(a9,r),d=u.currentTabStopId===C,h=i9(r),{onFocusableItemAdd:x,onFocusableItemRemove:g,currentTabStopId:p}=u;return c.useEffect(()=>{if(o)return x(),()=>g()},[o,x,g]),t.jsx(V2.ItemSlot,{scope:r,id:C,focusable:o,active:i,children:t.jsx(O.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:V(e.onMouseDown,v=>{o?u.onItemFocus(C):v.preventDefault()}),onFocus:V(e.onFocus,()=>u.onItemFocus(C)),onKeyDown:V(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=b6(v,u.orientation,u.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=h().filter(L=>L.focusable).map(L=>L.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const L=w.indexOf(v.currentTarget);w=u.loop?E6(w,L+1):w.slice(L+1)}setTimeout(()=>C9(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:p!=null}):a})})});c9.displayName=a9;var H6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V6(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function b6(e,n,r){const o=V6(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return H6[o]}function C9(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function E6(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var k6=l9,P6=c9,D6=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},v1=new WeakMap,X1=new WeakMap,U1={},L2=0,u9=function(e){return e&&(e.host||u9(e.parentNode))},F6=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=u9(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},B6=function(e,n,r,o){var i=F6(n,Array.isArray(e)?e:[e]);U1[r]||(U1[r]=new WeakMap);var s=U1[r],a=[],l=new Set,f=new Set(i),C=function(d){!d||l.has(d)||(l.add(d),C(d.parentNode))};i.forEach(C);var u=function(d){!d||f.has(d)||Array.prototype.forEach.call(d.children,function(h){if(l.has(h))u(h);else try{var x=h.getAttribute(o),g=x!==null&&x!=="false",p=(v1.get(h)||0)+1,v=(s.get(h)||0)+1;v1.set(h,p),s.set(h,v),a.push(h),p===1&&g&&X1.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(o,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return u(n),l.clear(),L2++,function(){a.forEach(function(d){var h=v1.get(d)-1,x=s.get(d)-1;v1.set(d,h),s.set(d,x),h||(X1.has(d)||d.removeAttribute(o),X1.delete(d)),x||d.removeAttribute(r)}),L2--,L2||(v1=new WeakMap,v1=new WeakMap,X1=new WeakMap,U1={})}},d9=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=D6(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),B6(o,i,r,"aria-hidden")):function(){return null}},Y=function(){return Y=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Y.apply(this,arguments)};function f9(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function Z6(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var Y1="right-scroll-bar-position",Q1="width-before-scroll-bar",O6="with-scroll-bars-hidden",_6="--removed-body-scroll-bar-size";function M2(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function I6(e,n){var r=c.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var N6=typeof window<"u"?c.useLayoutEffect:c.useEffect,w3=new WeakMap;function T6(e,n){var r=I6(null,function(o){return e.forEach(function(i){return M2(i,o)})});return N6(function(){var o=w3.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||M2(l,null)}),s.forEach(function(l){i.has(l)||M2(l,a)})}w3.set(r,e)},[e]),r}function J6(e){return e}function W6(e,n){n===void 0&&(n=J6);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var f=function(){var u=a;a=[],u.forEach(s)},C=function(){return Promise.resolve().then(f)};C(),r={push:function(u){a.push(u),C()},filter:function(u){return a=a.filter(u),r}}}};return i}function G6(e){e===void 0&&(e={});var n=W6(null);return n.options=Y({async:!0,ssr:!1},e),n}var h9=function(e){var n=e.sideCar,r=f9(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,Y({},r))};h9.isSideCarExport=!0;function X6(e,n){return e.useMedium(n),h9}var p9=G6(),j2=function(){},C2=c.forwardRef(function(e,n){var r=c.useRef(null),o=c.useState({onScrollCapture:j2,onWheelCapture:j2,onTouchMoveCapture:j2}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,f=e.className,C=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,x=e.noRelative,g=e.noIsolation,p=e.inert,v=e.allowPinchZoom,m=e.as,M=m===void 0?"div":m,w=e.gapMode,L=f9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,S=T6([r,n]),A=Y(Y({},L),i);return c.createElement(c.Fragment,null,u&&c.createElement(j,{sideCar:p9,removeScrollBar:C,shards:d,noRelative:x,noIsolation:g,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:w}),a?c.cloneElement(c.Children.only(l),Y(Y({},A),{ref:S})):c.createElement(M,Y({},A,{className:f,ref:S}),l))});C2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};C2.classNames={fullWidth:Q1,zeroRight:Y1};var U6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function z6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=U6();return n&&e.setAttribute("nonce",n),e}function q6(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function K6(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Y6=function(){var e=0,n=null;return{add:function(r){e==0&&(n=z6())&&(q6(n,r),K6(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Q6=function(){var e=Y6();return function(n,r){c.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},x9=function(){var e=Q6(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},$6={left:0,top:0,right:0,gap:0},A2=function(e){return parseInt(e||"",10)||0},e5=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[A2(r),A2(o),A2(i)]},t5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $6;var n=e5(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},n5=x9(),j1="data-scroll-locked",r5=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(O6,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(l,"px ").concat(o,`;