@hoknie/aip 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/application.js +7 -1
- package/dist/app/application.js.map +1 -1
- package/dist/feature/agents/clients/agy/guard.js +26 -8
- package/dist/feature/agents/clients/agy/guard.js.map +1 -1
- package/dist/feature/agents/clients/agy/permissions.js +9 -1
- package/dist/feature/agents/clients/agy/permissions.js.map +1 -1
- package/dist/feature/agents/clients/agy/runtime.js +7 -1
- package/dist/feature/agents/clients/agy/runtime.js.map +1 -1
- package/dist/feature/agents/clients/opencode/runtime.js +12 -1
- package/dist/feature/agents/clients/opencode/runtime.js.map +1 -1
- package/dist/feature/agents/types/index.js +1 -0
- package/dist/feature/agents/types/index.js.map +1 -1
- package/dist/feature/agents/types/mcp/env.js +54 -0
- package/dist/feature/agents/types/mcp/env.js.map +1 -0
- package/dist/feature/observers/services/observers.js +21 -3
- package/dist/feature/observers/services/observers.js.map +1 -1
- package/dist/feature/observers/types/plan-repairs.js +36 -11
- package/dist/feature/observers/types/plan-repairs.js.map +1 -1
- package/dist/feature/queue/repositories/queues.js +28 -4
- package/dist/feature/queue/repositories/queues.js.map +1 -1
- package/dist/feature/queue/services/control.js +23 -1
- package/dist/feature/queue/services/control.js.map +1 -1
- package/dist/feature/queue/services/store.js +4 -0
- package/dist/feature/queue/services/store.js.map +1 -1
- package/dist/feature/queue/services/task-tags.js +4 -1
- package/dist/feature/queue/services/task-tags.js.map +1 -1
- package/dist/feature/queue/types/advance.js +3 -1
- package/dist/feature/queue/types/advance.js.map +1 -1
- package/dist/feature/queue/types/filter.js +36 -0
- package/dist/feature/queue/types/filter.js.map +1 -0
- package/dist/feature/queue/types/index.js +1 -0
- package/dist/feature/queue/types/index.js.map +1 -1
- package/dist/feature/queue/types/items.js +1 -0
- package/dist/feature/queue/types/items.js.map +1 -1
- package/dist/feature/queue/types/settings.js +14 -3
- package/dist/feature/queue/types/settings.js.map +1 -1
- package/dist/feature/runs/machine/repair.js +5 -1
- package/dist/feature/runs/machine/repair.js.map +1 -1
- package/dist/feature/runs/machine/steps.js +4 -4
- package/dist/feature/runs/machine/steps.js.map +1 -1
- package/dist/feature/runs/machine/transition.js +11 -1
- package/dist/feature/runs/machine/transition.js.map +1 -1
- package/dist/feature/runs/repositories/write.js +1 -1
- package/dist/feature/runs/repositories/write.js.map +1 -1
- package/dist/feature/runs/services/effects/attempts.js +21 -13
- package/dist/feature/runs/services/effects/attempts.js.map +1 -1
- package/dist/feature/runs/services/effects/effects.js +5 -0
- package/dist/feature/runs/services/effects/effects.js.map +1 -1
- package/dist/feature/runs/services/effects/runtime-check.js +20 -0
- package/dist/feature/runs/services/effects/runtime-check.js.map +1 -0
- package/dist/feature/runs/services/requests.js +7 -1
- package/dist/feature/runs/services/requests.js.map +1 -1
- package/dist/feature/runs/types/attempt.js +4 -0
- package/dist/feature/runs/types/attempt.js.map +1 -1
- package/dist/feature/swarm-config/services/index.js +1 -0
- package/dist/feature/swarm-config/services/index.js.map +1 -1
- package/dist/feature/swarm-config/services/sections/mcp-servers.js +128 -0
- package/dist/feature/swarm-config/services/sections/mcp-servers.js.map +1 -0
- package/dist/feature/swarm-config/services/validate-runtimes.js +0 -50
- package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -1
- package/dist/feature/swarm-config/services/validate-specialists.js +5 -4
- package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -1
- package/dist/feature/swarm-config/services/validate.js +7 -6
- package/dist/feature/swarm-config/services/validate.js.map +1 -1
- package/dist/feature/swarm-config/types/index.js +1 -0
- package/dist/feature/swarm-config/types/index.js.map +1 -1
- package/dist/feature/swarm-config/types/mcp/reference.js +40 -0
- package/dist/feature/swarm-config/types/mcp/reference.js.map +1 -0
- package/dist/feature/swarm-config/types/merge.js +1 -0
- package/dist/feature/swarm-config/types/merge.js.map +1 -1
- package/dist/feature/swarm-config/types/settings.js +2 -0
- package/dist/feature/swarm-config/types/settings.js.map +1 -1
- package/dist/feature/swarm-config/types/specialist.js.map +1 -1
- package/dist/feature/swarm-edit/services/config-edits.js +12 -0
- package/dist/feature/swarm-edit/services/config-edits.js.map +1 -1
- package/dist/feature/swarm-edit/services/editor-view.js +2 -0
- package/dist/feature/swarm-edit/services/editor-view.js.map +1 -1
- package/dist/feature/swarm-edit/services/index.js +1 -0
- package/dist/feature/swarm-edit/services/index.js.map +1 -1
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js +51 -0
- package/dist/feature/swarm-edit/services/mcp/editor-mcp.js.map +1 -0
- package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js +93 -0
- package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js.map +1 -0
- package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -1
- package/dist/feature/swarm-edit/types/editor.js.map +1 -1
- package/dist/platform/sqlite/migrations.js +1 -0
- package/dist/platform/sqlite/migrations.js.map +1 -1
- package/dist/presentation/cli/commands/queue-edit.js +23 -1
- package/dist/presentation/cli/commands/queue-edit.js.map +1 -1
- package/dist/presentation/format/queue.js +14 -1
- package/dist/presentation/format/queue.js.map +1 -1
- package/dist/presentation/ipc/contract/config.js +22 -0
- package/dist/presentation/ipc/contract/config.js.map +1 -1
- package/dist/presentation/ipc/contract/queue.js +11 -1
- package/dist/presentation/ipc/contract/queue.js.map +1 -1
- package/dist/presentation/ipc/contract/runs.js +4 -0
- package/dist/presentation/ipc/contract/runs.js.map +1 -1
- package/dist/presentation/ipc/handlers/config.js +6 -0
- package/dist/presentation/ipc/handlers/config.js.map +1 -1
- package/dist/presentation/ipc/handlers/runs.js +1 -0
- package/dist/presentation/ipc/handlers/runs.js.map +1 -1
- package/dist/presentation/ipc/snapshots.js +2 -2
- package/dist/presentation/ipc/snapshots.js.map +1 -1
- package/dist/presentation/ipc/views/observers.js +2 -2
- package/dist/presentation/ipc/views/observers.js.map +1 -1
- package/dist/presentation/ipc/views/queue.js +4 -1
- package/dist/presentation/ipc/views/queue.js.map +1 -1
- package/dist/presentation/ipc/views/runs.js +3 -4
- package/dist/presentation/ipc/views/runs.js.map +1 -1
- package/dist/presentation/mcp/host-queue-control.js +11 -2
- package/dist/presentation/mcp/host-queue-control.js.map +1 -1
- package/dist/presentation/web/routes/catalog/mcp-servers.js +50 -0
- package/dist/presentation/web/routes/catalog/mcp-servers.js.map +1 -0
- package/dist/presentation/web/routes/runs.js +5 -0
- package/dist/presentation/web/routes/runs.js.map +1 -1
- package/dist/presentation/web/server.js +2 -0
- package/dist/presentation/web/server.js.map +1 -1
- package/dist/web/assets/{FilterColumn-BCMp-JO4.js → FilterColumn-BrQWIM5F.js} +1 -1
- package/dist/web/assets/{SharedPipelinesGroup-DJRGFtzx.js → SharedPipelinesGroup-WFngQrqI.js} +1 -1
- package/dist/web/assets/{badge-C_7kALlW.js → badge-B_khFsd6.js} +1 -1
- package/dist/web/assets/{card-C9eXOVuF.js → card-COXjnc-y.js} +1 -1
- package/dist/web/assets/empty-Eb-EZDPX.js +41 -0
- package/dist/web/assets/index-DEXoIe2a.js +21 -0
- package/dist/web/assets/index-DMlIe0VD.css +2 -0
- package/dist/web/assets/locales-BlBJo1PR.js +1 -0
- package/dist/web/assets/{pipelines-DQglwIkL.js → pipelines-B3cdeex_.js} +5 -5
- package/dist/web/assets/queue-HMUImu0E.js +16 -0
- package/dist/web/assets/{select-BSqaxwh1.js → select-MHus_Unr.js} +1 -1
- package/dist/web/assets/settings-CpeEsUXX.js +6 -0
- package/dist/web/assets/skeleton-CWY1nRvW.js +1 -0
- package/dist/web/assets/specialists-BkLXuqUd.js +1 -0
- package/dist/web/assets/stats-DRg_5vll.js +1 -0
- package/dist/web/assets/topology-DGTNdDHf.js +1 -0
- package/dist/web/assets/{trash-ChYI9ms1.js → trash-CFJeuRuc.js} +1 -1
- package/dist/web/assets/{useListDrag-0GPS1X83.js → useListDrag-B7Wlt2u9.js} +1 -1
- package/dist/web/index.html +7 -7
- package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/empty-ACC2KkXk.js +0 -41
- package/dist/web/assets/index-CsVQUXJH.js +0 -21
- package/dist/web/assets/index-Ds1nt_qm.css +0 -2
- package/dist/web/assets/locales-fB1w2oER.js +0 -1
- package/dist/web/assets/queue-CAuAo--6.js +0 -16
- package/dist/web/assets/settings-6eHKYbS7.js +0 -2
- package/dist/web/assets/skeleton-CfLYGtNX.js +0 -1
- package/dist/web/assets/specialists-Durm0DgK.js +0 -1
- package/dist/web/assets/stats-67akPa3A.js +0 -1
- package/dist/web/assets/topology-DQu3su19.js +0 -1
package/dist/web/index.html
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<meta name="color-scheme" content="light dark" />
|
|
7
7
|
<title>aip</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DEXoIe2a.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-C1iE8mnY.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/FilterColumn-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/empty-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/badge-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/locales-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/skeleton-CWY1nRvW.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/FilterColumn-BrQWIM5F.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/empty-Eb-EZDPX.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/badge-B_khFsd6.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/locales-BlBJo1PR.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/vendor-markdown-DwXfjc7L.js">
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DMlIe0VD.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|
|
20
20
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./vendor-react-C1iE8mnY.js";import{A as i,C as a,D as o,E as s,F as c,M as l,N as u,O as d,R as f,T as p,b as m,c as h,j as g,k as _,m as v,v as y,w as b,x,y as S,z as C}from"./skeleton-CfLYGtNX.js";var w=e(t(),1),T=e(n(),1);function E(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ee=e=>{switch(e){case`success`:return ne;case`info`:return re;case`warning`:return O;case`error`:return k;default:return null}},D=Array(12).fill(0),te=({visible:e,className:t})=>w.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},w.createElement(`div`,{className:`sonner-spinner`},D.map((e,t)=>w.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),ne=w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},w.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),O=w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},w.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),re=w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},w.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),k=w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},w.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ie=w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},w.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),w.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ae=()=>{let[e,t]=w.useState(document.hidden);return w.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},A=1,oe=100,j=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:A++,M=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-oe;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=j(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],w.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(se(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!w.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!w.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!w.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!w.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=j(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},N=(e,t)=>M.message(e,t),se=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ce=Object.assign(N,{success:M.success,info:M.info,warning:M.warning,error:M.error,custom:M.custom,message:M.message,promise:M.promise,dismiss:M.dismiss,loading:M.loading},{getHistory:()=>M.toasts,getToasts:()=>M.getActiveToasts()});E(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function le(e){return e.label!==void 0}var ue=3,de=`24px`,fe=`16px`,pe=4e3,me=356,he=14,ge=45,_e=200;function P(...e){return e.filter(Boolean).join(` `)}function ve(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ye=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,ne]=w.useState(null),[O,re]=w.useState(null),[k,A]=w.useState(!1),[oe,j]=w.useState(!1),[M,N]=w.useState(!1),[se,ce]=w.useState(!1),[ue,de]=w.useState(!1),[fe,me]=w.useState(0),[he,ye]=w.useState(0),F=w.useRef(n.duration||y||pe),be=w.useRef(null),I=w.useRef(null),L=c===0,xe=c+1<=o,R=n.type,Se=R??`default`,z=n.dismissible!==!1,Ce=n.className||``,we=n.descriptionClassName||``,Te=w.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ee=w.useMemo(()=>n.closeButton??p,[n.closeButton,p]),De=w.useMemo(()=>n.duration||y||pe,[n.duration,y]),Oe=w.useRef(0),B=w.useRef(0),ke=w.useRef(0),V=w.useRef(null),[Ae,je]=b.split(`-`),Me=w.useMemo(()=>s.reduce((e,t,n)=>n>=Te?e:e+t.height,0),[s,Te]),Ne=ae(),H=w.useMemo(()=>e.swipeDirections??ve(b),[e.swipeDirections,b]),Pe=n.invert||t,Fe=R===`loading`;B.current=w.useMemo(()=>Te*x+Me,[Te,Me]),w.useEffect(()=>{F.current=De},[De]),w.useEffect(()=>{A(!0)},[]),w.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return ye(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),w.useLayoutEffect(()=>{if(!k)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ye(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[k,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let U=w.useCallback(()=>{j(!0),me(B.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},_e)},[n,d,a,B]);w.useEffect(()=>{if(n.promise&&R===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ne?(()=>{if(ke.current<Oe.current){let e=new Date().getTime()-Oe.current;F.current-=e}ke.current=new Date().getTime()})():F.current!==1/0&&(Oe.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),U()},F.current)),()=>clearTimeout(e)},[u,i,n,R,Ne,U]),w.useEffect(()=>{n.delete&&(U(),n.onDismiss==null||n.onDismiss.call(n,n))},[U,n.delete]);function W(){return T?.loading?w.createElement(`div`,{className:P(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":R===`loading`},T.loading):w.createElement(te,{className:P(C?.loader,n?.classNames?.loader),visible:R===`loading`})}let G=n.icon||T?.[R]||ee(R);return w.createElement(`li`,{tabIndex:0,ref:I,className:P(_,Ce,C?.toast,n?.classNames?.toast,C?.[Se],n?.classNames?.[Se]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":k,"data-promise":!!n.promise,"data-swiped":ue,"data-removed":oe,"data-visible":xe,"data-y-position":Ae,"data-x-position":je,"data-index":c,"data-front":L,"data-swiping":M,"data-dismissible":z,"data-type":R,"data-invert":Pe,"data-swipe-out":se,"data-swipe-direction":O,"data-expanded":!!(u||S&&k),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${oe?fe:B.current}px`,"--initial-height":S?`auto`:`${he}px`,...m,...n.style},onDragEnd:()=>{N(!1),ne(null),V.current=null},onPointerDown:e=>{e.button!==2&&!Fe&&z&&(be.current=new Date,me(B.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(N(!0),V.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(se||!z)return;V.current=null;let e=Number(I.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-be.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?H.includes(e>0?`right`:`left`):H.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=ge||a>.11))me(B.current),n.onDismiss==null||n.onDismiss.call(n,n),re(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),U(),ce(!0);else{var o,s;(o=I.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=I.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),de(!1),N(!1),ne(null)}},onPointerMove:e=>{var t,n;if(!V.current||!z||window.getSelection()?.toString().length>0)return;let r=e.clientY-V.current.y,i=e.clientX-V.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&ne(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(H.includes(`top`)||H.includes(`bottom`)){if(H.includes(`top`)&&r<0||H.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(H.includes(`left`)||H.includes(`right`))){if(H.includes(`left`)&&i<0||H.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&de(!0),(t=I.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=I.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},Ee&&!n.jsx&&R!==`loading`?w.createElement(`button`,{"aria-label":E,"data-disabled":Fe,"data-close-button":!0,onClick:Fe||!z?()=>{}:()=>{U(),n.onDismiss==null||n.onDismiss.call(n,n)},className:P(C?.closeButton,n?.classNames?.closeButton)},T?.close??ie):null,(R||n.icon||n.promise)&&n.icon!==null&&(T?.[R]!==null||n.icon)?w.createElement(`div`,{"data-icon":``,className:P(C?.icon,n?.classNames?.icon)},R===`loading`?n.icon||W():n.promise?W():null,R===`loading`?null:G):null,w.createElement(`div`,{"data-content":``,className:P(C?.content,n?.classNames?.content)},w.createElement(`div`,{"data-title":``,className:P(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?w.createElement(`div`,{"data-description":``,className:P(v,we,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),w.isValidElement(n.cancel)?n.cancel:n.cancel&&le(n.cancel)?w.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{le(n.cancel)&&z&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),U())},className:P(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,w.isValidElement(n.action)?n.action:n.action&&le(n.action)?w.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{le(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||U())},className:P(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function F(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function be(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?fe:de;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var I=w.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=ue,toastOptions:g,dir:_=F(),gap:v=he,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=w.useState([]),E=w.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),ee=w.useMemo(()=>Array.from(new Set([i].concat(E.filter(e=>e.position).map(e=>e.position)))),[E,i]),[D,te]=w.useState([]),[ne,O]=w.useState(!1),[re,k]=w.useState(!1),[ie,ae]=w.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),A=w.useRef(null),oe=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),j=w.useRef(null),N=w.useRef(!1),se=w.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||M.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return w.useEffect(()=>M.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{T.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),w.useEffect(()=>{if(d!==`system`){ae(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ae(`dark`):ae(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ae(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ae(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),w.useEffect(()=>{S.length<=1&&O(!1)},[S]),w.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=A.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===A.current||A.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),w.useEffect(()=>{if(A.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,N.current=!1)}},[A.current]),w.createElement(`section`,{ref:t,"aria-label":b??`${x} ${oe}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},ee.map((t,n)=>{let[i,a]=t.split(`-`);return E.length?w.createElement(`ol`,{key:t,dir:_===`auto`?F():_,tabIndex:-1,ref:A,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ie,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${me}px`,"--gap":`${v}px`,...m,...be(l,u)},onBlur:e=>{N.current&&!e.currentTarget.contains(e.relatedTarget)&&(N.current=!1,j.current&&=(j.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.current||(N.current=!0,j.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{re||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||k(!0)},onPointerUp:()=>k(!1)},E.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>w.createElement(ye,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:re,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:se,toasts:E.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:te,expandByDefault:o,gap:v,expanded:ne,swipeDirections:e.swipeDirections}))):null}))}),L=r(),xe=Object.defineProperty,R=(e,t)=>xe(e,`name`,{value:t,configurable:!0});function Se(e){let t=e+`CollectionProvider`,[n,r]=l(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=R(e=>{let{scope:t,children:n}=e,r=w.useRef(null),a=w.useRef(new Map).current;return(0,L.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,u=c(s),d=w.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(s,n),o=f(t,i.collectionRef);return(0,L.jsx)(u,{ref:o,children:r})});d.displayName=s;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=c(p),g=w.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=w.useRef(null),s=f(t,o),c=a(p,n);return w.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,L.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=p;function _(t){let n=a(e+`CollectionConsumer`,t);return w.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return R(_,`useCollection`),[{Provider:o,Slot:d,ItemSlot:g},_,r]}R(Se,`createCollection`);var z=new WeakMap,Ce=class e extends Map{static{R(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],z.set(this,!0)}set(e,t){return z.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=Ee(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=we(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=we(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return we(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function we(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Te(e,t);return n===-1?void 0:e[n]}R(we,`at`);function Te(e,t){let n=e.length,r=Ee(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}R(Te,`toSafeIndex`);function Ee(e){return e!==e||e===0?0:Math.trunc(e)}R(Ee,`toSafeInteger`);function De(e){let t=e+`CollectionProvider`,[n,r]=l(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let u=R(({state:e,...t})=>e?(0,L.jsx)(p,{...t,state:e}):(0,L.jsx)(d,{...t}),`CollectionProvider`);u.displayName=t;let d=R(e=>{let t=x();return(0,L.jsx)(p,{...e,state:t})},`CollectionInit`);d.displayName=e+`CollectionInit`;let p=R(e=>{let{scope:t,children:n,state:r}=e,a=w.useRef(null),[s,c]=w.useState(null),l=f(a,c),[u,d]=r,p=w.useRef(new Ce),m=w.useCallback(()=>{let e=p.current;return ke(e)||e.sort(V),e},[]);return w.useEffect(()=>{if(!s)return;let e=Ae(()=>{d(e=>{let t=e.toSorted(V);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,L.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:m,setCollection:d,registryRef:p,children:(0,L.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);p.displayName=e+`CollectionProviderImpl`;let m=e+`CollectionSlot`,h=c(m),_=w.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(m,n),o=f(t,i.collectionElementRef);return(0,L.jsx)(h,{ref:o,children:r})});_.displayName=m;let v=e+`CollectionItemSlot`,y=c(v),b=w.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=w.useRef(null),{setCollection:s,registryRef:c}=a(v,n),l=w.useRef(i);Oe(l.current,i)||(l.current=i);let u=l.current,d=w.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),p=f(t,d,o);g(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let m=w.useRef(null);return w.useEffect(()=>{let e=o.current,t=m.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(m.current=e?{element:e,itemData:u}:null,s(n=>{let r=new Ce(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(V)}))}),w.useEffect(()=>()=>{let e=m.current;m.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new Ce(t);return n.delete(e.element),n})},[s]),(0,L.jsx)(y,{"data-radix-collection-item":``,ref:p,children:r})});b.displayName=v;function x(){return w.useState(new Ce)}R(x,`useInitCollection`);function S(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}R(S,`useCollection`);function C(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return R(C,`useGetCollection`),[{Provider:u,Slot:_,ItemSlot:b},{createCollectionScope:r,useCollection:S,useGetCollection:C,useInitCollection:x}]}R(De,`createCollection`);function Oe(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}R(Oe,`shallowEqual`);function B(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}R(B,`isElementPreceding`);function ke(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}R(ke,`isInDocumentOrder`);function V(e,t){return!e[1].element||!t[1].element?0:B(e[1].element,t[1].element)?-1:1}R(V,`sortByDocumentPosition`);function Ae(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}R(Ae,`getChildListObserver`);var je=Object.defineProperty,Me=(e,t)=>je(e,`name`,{value:t,configurable:!0}),Ne={LTR:`ltr`,RTL:`rtl`},H=w.createContext(void 0);function Pe(e){let t=w.useContext(H);return e||t||Ne.LTR}Me(Pe,`useDirection`);var Fe=Object.defineProperty,U=(e,t)=>Fe(e,`name`,{value:t,configurable:!0}),W=0,G=null;function Ie(e){return Le(),e.children}U(Ie,`FocusGuards`);function Le(){w.useEffect(()=>{G||={start:Re(),end:Re()};let{start:e,end:t}=G;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),W++,()=>{W===1&&(G?.start.remove(),G?.end.remove(),G=null),W=Math.max(0,W-1)}},[])}U(Le,`useFocusGuards`);function Re(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}U(Re,`createFocusGuard`);var K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},K.apply(this,arguments)};function ze(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Be(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ve=`right-scroll-bar-position`,He=`width-before-scroll-bar`,Ue=`with-scroll-bars-hidden`,We=`--removed-body-scroll-bar-size`;function Ge(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ke(e,t){var n=(0,w.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var qe=typeof window<`u`?w.useLayoutEffect:w.useEffect,Je=new WeakMap;function Ye(e,t){var n=Ke(t||null,function(t){return e.forEach(function(e){return Ge(e,t)})});return qe(function(){var t=Je.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ge(e,null)}),i.forEach(function(e){r.has(e)||Ge(e,a)})}Je.set(n,e)},[e]),n}function Xe(e){return e}function Ze(e,t){t===void 0&&(t=Xe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Qe(e){e===void 0&&(e={});var t=Ze(null);return t.options=K({async:!0,ssr:!1},e),t}var $e=function(e){var t=e.sideCar,n=ze(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return w.createElement(r,K({},n))};$e.isSideCarExport=!0;function et(e,t){return e.useMedium(t),$e}var tt=Qe(),nt=function(){},rt=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:nt,onWheelCapture:nt,onTouchMoveCapture:nt}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ze(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Ye([n,t]),C=K(K({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(x,{sideCar:tt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?w.cloneElement(w.Children.only(s),K(K({},C),{ref:S})):w.createElement(v,K({},C,{className:c,ref:S}),s))});rt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rt.classNames={fullWidth:He,zeroRight:Ve};var it=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function at(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=it();return t&&e.setAttribute(`nonce`,t),e}function ot(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function st(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ct=function(){var e=0,t=null;return{add:function(n){e==0&&(t=at())&&(ot(t,n),st(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lt=function(){var e=ct();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ut=function(){var e=lt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},dt={left:0,top:0,right:0,gap:0},ft=function(e){return parseInt(e||``,10)||0},pt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[ft(n),ft(r),ft(i)]},mt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return dt;var t=pt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ht=ut(),gt=`data-scroll-locked`,_t=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${Ue} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${gt}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${Ve} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${He} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Ve} .${Ve} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${He} .${He} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${gt}] {
|
|
36
|
-
${We}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},vt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},yt=function(){w.useEffect(function(){return document.body.setAttribute(gt,(vt()+1).toString()),function(){var e=vt()-1;e<=0?document.body.removeAttribute(gt):document.body.setAttribute(gt,e.toString())}},[])},bt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;yt();var a=w.useMemo(function(){return mt(i)},[i]);return w.createElement(ht,{styles:_t(a,!t,i,n?``:`!important`)})},xt=!1;if(typeof window<`u`)try{var St=Object.defineProperty({},"passive",{get:function(){return xt=!0,!0}});window.addEventListener(`test`,St,St),window.removeEventListener(`test`,St,St)}catch{xt=!1}var q=xt?{passive:!1}:!1,Ct=function(e){return e.tagName===`TEXTAREA`},wt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ct(e)&&n[t]===`visible`)},Tt=function(e){return wt(e,`overflowY`)},Et=function(e){return wt(e,`overflowX`)},Dt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),At(e,r)){var i=jt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ot=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},kt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},At=function(e,t){return e===`v`?Tt(t):Et(t)},jt=function(e,t){return e===`v`?Ot(t):kt(t)},Mt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Nt=function(e,t,n,r,i){var a=Mt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=jt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&At(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Pt=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ft=function(e){return[e.deltaX,e.deltaY]},It=function(e){return e&&`current`in e?e.current:e},Lt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rt=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},zt=0,Bt=[];function Vt(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(zt++)[0],a=w.useState(ut)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Be([e.lockRef.current],(e.shards||[]).map(It),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Pt(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Dt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Dt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Nt(h,t,e,h===`h`?s:c,!0)},[]),c=w.useCallback(function(e){var n=e;if(Bt.length&&Bt[Bt.length-1]===a){var r=`deltaY`in n?Ft(n):Pt(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Lt(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(It).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=w.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ht(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=w.useCallback(function(e){n.current=Pt(e),r.current=void 0},[]),d=w.useCallback(function(t){l(t.type,Ft(t),t.target,s(t,e.lockRef.current))},[]),f=w.useCallback(function(t){l(t.type,Pt(t),t.target,s(t,e.lockRef.current))},[]);w.useEffect(function(){return Bt.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,q),document.addEventListener(`touchmove`,c,q),document.addEventListener(`touchstart`,u,q),function(){Bt=Bt.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,q),document.removeEventListener(`touchmove`,c,q),document.removeEventListener(`touchstart`,u,q)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:Rt(i)}):null,p?w.createElement(bt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ht(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ut=et(tt,Vt),Wt=w.forwardRef(function(e,t){return w.createElement(rt,K({},e,{ref:t,sideCar:Ut}))});Wt.classNames=rt.classNames;var Gt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Kt=new WeakMap,qt=new WeakMap,Jt={},Yt=0,Xt=function(e){return e&&(e.host||Xt(e.parentNode))},Zt=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Xt(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Qt=function(e,t,n,r){var i=Zt(t,Array.isArray(e)?e:[e]);Jt[n]||(Jt[n]=new WeakMap);var a=Jt[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Kt.get(e)||0)+1,l=(a.get(e)||0)+1;Kt.set(e,c),a.set(e,l),o.push(e),c===1&&i&&qt.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Yt++,function(){o.forEach(function(e){var t=Kt.get(e)-1,i=a.get(e)-1;Kt.set(e,t),a.set(e,i),t||(qt.has(e)||e.removeAttribute(r),qt.delete(e)),i||e.removeAttribute(n)}),Yt--,Yt||(Kt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt={})}},$t=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Qt(r,i,n,`aria-hidden`)):function(){return null}},en=Object.defineProperty,J=(e,t)=>en(e,`name`,{value:t,configurable:!0}),tn=`Dialog`,[nn,rn]=l(tn),[an,Y]=nn(tn),on=J(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:c=!0}=e,l=w.useRef(null),u=w.useRef(null),{nodes:d,registry:f}=a(),[p,m]=_({prop:r,defaultProp:i??!1,onChange:s,caller:tn}),[h,g]=w.useState(0),[v,y]=w.useState(0);return(0,L.jsx)(an,{scope:t,triggerRef:l,contentRef:u,contentId:o(),titleId:o(),descriptionId:o(),titlePresent:h>0,descriptionPresent:v>0,setTitleCount:g,setDescriptionCount:y,open:p,onOpenChange:m,onOpenToggle:w.useCallback(()=>m(e=>!e),[m]),modal:c,branchNodes:d,branchRegistry:f,children:n})},`Dialog`),sn=`DialogTrigger`,cn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,...r}=e,a=Y(sn,n),o=f(t,a.triggerRef);return(0,L.jsx)(u.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Dn(a.open),...r,ref:o,onClick:i(e.onClick,a.onOpenToggle)})},`DialogTrigger`)),ln=`DialogPortal`,[un,dn]=nn(ln,{forceMount:void 0}),fn=J(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Y(ln,t);return(0,L.jsx)(un,{scope:t,forceMount:n,children:w.Children.map(r,e=>(0,L.jsx)(d,{present:n||a.open,children:(0,L.jsx)(S,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),pn=`DialogOverlay`,mn=w.forwardRef(J(function(e,t){let n=dn(pn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(pn,e.__scopeDialog);return a.modal?(0,L.jsx)(d,{present:r||a.open,children:(0,L.jsx)(gn,{...i,ref:t})}):null},`DialogOverlay`)),hn=c(`DialogOverlay.RemoveScroll`),gn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,...r}=e,i=Y(pn,n),a=p(),o=f(t,a);return(0,L.jsx)(Wt,{as:hn,allowPinchZoom:!0,shards:w.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,L.jsx)(u.div,{"data-state":Dn(i.open),...r,ref:o,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),_n=`DialogContent`,vn=w.forwardRef(J(function(e,t){let n=dn(_n,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(_n,e.__scopeDialog);return(0,L.jsx)(d,{present:r||a.open,children:a.modal?(0,L.jsx)(yn,{...i,ref:t}):(0,L.jsx)(bn,{...i,ref:t})})},`DialogContent`)),yn=w.forwardRef(J(function(e,t){let n=Y(_n,e.__scopeDialog),r=w.useRef(null),a=f(t,n.contentRef,r);return w.useEffect(()=>{let e=r.current;if(e)return $t(e)},[]),(0,L.jsx)(xn,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:i(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:i(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),bn=w.forwardRef(J(function(e,t){let n=Y(_n,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return(0,L.jsx)(xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),xn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Y(_n,n);return Le(),(0,L.jsx)(x,{registry:l.branchRegistry,children:(0,L.jsx)(m,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(b,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?En(o,l.descriptionId):o,"data-state":Dn(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),Sn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,...r}=e,i=Y(`DialogTitle`,n),{setTitleCount:a}=i;return g(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(u.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Cn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,...r}=e,i=Y(`DialogDescription`,n),{setDescriptionCount:a}=i;return g(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(u.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),wn=`DialogClose`,Tn=w.forwardRef(J(function(e,t){let{__scopeDialog:n,...r}=e,a=Y(wn,n);return(0,L.jsx)(u.button,{type:`button`,...r,ref:t,onClick:i(e.onClick,()=>a.onOpenChange(!1))})},`DialogClose`));function En(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}J(En,`concatAriaDescribedby`);function Dn(e){return e?`open`:`closed`}J(Dn,`getState`);var On=Object.defineProperty,X=(e,t)=>On(e,`name`,{value:t,configurable:!0}),[kn,An]=l(`AlertDialog`,[rn]),Z=rn(),jn=X(e=>{let{__scopeAlertDialog:t,...n}=e,r=Z(t);return(0,L.jsx)(on,{...r,...n,modal:!0})},`AlertDialog`);w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,L.jsx)(cn,{...i,...r,ref:t})},`AlertDialogTrigger`));var Mn=X(e=>{let{__scopeAlertDialog:t,...n}=e,r=Z(t);return(0,L.jsx)(fn,{...r,...n})},`AlertDialogPortal`),Nn=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,L.jsx)(mn,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Pn,Fn]=kn(`AlertDialogContent`),In=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,children:r,...a}=e,o=Z(n),s=w.useRef(null),c=f(t,s),l=w.useRef(null);return(0,L.jsx)(Pn,{scope:n,cancelRef:l,children:(0,L.jsx)(vn,{role:`alertdialog`,...o,...a,ref:c,onOpenAutoFocus:i(a.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Ln=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,L.jsx)(Sn,{...i,...r,ref:t})},`AlertDialogTitle`)),Rn=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,L.jsx)(Cn,{...i,...r,ref:t})},`AlertDialogDescription`)),zn=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,L.jsx)(Tn,{...i,...r,ref:t})},`AlertDialogAction`)),Bn=`AlertDialogCancel`,Vn=w.forwardRef(X(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Fn(Bn,n),a=Z(n),o=f(t,i);return(0,L.jsx)(Tn,{...a,...r,ref:o})},`AlertDialogCancel`)),Hn=Object.defineProperty,Un=(e,t)=>Hn(e,`name`,{value:t,configurable:!0}),Wn=!1;function Gn(){let[e,t]=w.useState(Wn);return w.useEffect(()=>{Wn||(Wn=!0,t(!0))},[]),e}Un(Gn,`useIsHydrated`);var Kn=w.useSyncExternalStore;function qn(){return()=>{}}Un(qn,`subscribe`);function Jn(){return Kn(qn,()=>!0,()=>!1)}Un(Jn,`useIsHydratedModern`);var Yn=typeof Kn==`function`?Jn:Gn,Xn=Object.defineProperty,Q=(e,t)=>Xn(e,`name`,{value:t,configurable:!0}),Zn=`rovingFocusGroup.onEntryFocus`,Qn={bubbles:!1,cancelable:!0},$n=`RovingFocusGroup`,[er,tr,nr]=Se($n),[rr,ir]=l($n,[nr]),ar={Vertical:`vertical`,Horizontal:`horizontal`},or={LTR:`ltr`,RTL:`rtl`},[sr,cr]=rr($n),lr=w.forwardRef(Q(function(e,t){return(0,L.jsx)(er.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(er.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(ur,{...e,ref:t})})})},`RovingFocusGroup`)),ur=w.forwardRef(Q(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,g=w.useRef(null),v=f(t,g),y=Pe(o),[b,x]=_({prop:c,defaultProp:l??null,onChange:d,caller:$n}),[S,C]=w.useState(!1),T=s(p),E=tr(n),ee=w.useRef(!1),[D,te]=w.useState(0);return w.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(Zn,T),()=>e.removeEventListener(Zn,T)},[T]),(0,L.jsx)(sr,{scope:n,orientation:r,dir:y,loop:a,currentTabStopId:b,onItemFocus:w.useCallback(e=>x(e),[x]),onItemShiftTab:w.useCallback(()=>C(!0),[]),onFocusableItemAdd:w.useCallback(()=>te(e=>e+1),[]),onFocusableItemRemove:w.useCallback(()=>te(e=>e-1),[]),children:(0,L.jsx)(u.div,{tabIndex:S||D===0?-1:0,"data-orientation":r,...h,ref:v,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{ee.current=!0}),onFocus:i(e.onFocus,e=>{let t=!ee.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(Zn,Qn);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);gr([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),m)}}ee.current=!1}),onBlur:i(e.onBlur,()=>C(!1))})})},`RovingFocusGroupImpl`)),dr=`RovingFocusGroupItem`,fr=w.forwardRef(Q(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:s,children:c,...l}=e,d=o(),f=s||d,p=cr(dr,n),m=p.currentTabStopId===f,h=tr(n),{onFocusableItemAdd:_,onFocusableItemRemove:v,currentTabStopId:y}=p,b=Yn();return g(()=>{if(b&&r)return _(),()=>v()},[b,r,_,v]),w.useEffect(()=>{if(!b&&r)return _(),()=>v()},[b,r,_,v]),(0,L.jsx)(er.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:(0,L.jsx)(u.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=hr(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?_r(n,r+1):n.slice(r+1)}setTimeout(()=>gr(n))}}),children:typeof c==`function`?c({isCurrentTabStop:m,hasTabStop:y!=null}):c})})},`RovingFocusGroupItem`)),pr={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function mr(e,t){return t===or.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Q(mr,`getDirectionAwareKey`);function hr(e,t,n){let r=mr(e.key,n);if(!(t===ar.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===ar.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return pr[r]}Q(hr,`getFocusIntent`);function gr(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Q(gr,`focusFirst`);function _r(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Q(_r,`wrapArray`);var vr=Object.defineProperty,yr=(e,t)=>vr(e,`name`,{value:t,configurable:!0}),br=`Toggle`,xr=w.forwardRef(yr(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:a,...o}=e,[s,c]=_({prop:n,onChange:a,defaultProp:r??!1,caller:br});return(0,L.jsx)(u.button,{type:`button`,"aria-pressed":s,"data-state":s?`on`:`off`,"data-disabled":e.disabled?``:void 0,...o,ref:t,onClick:i(e.onClick,()=>{e.disabled||c(!s)})})},`Toggle`)),Sr=Object.defineProperty,$=(e,t)=>Sr(e,`name`,{value:t,configurable:!0}),Cr=`ToggleGroup`,wr={Single:`single`,Multiple:`multiple`},[Tr,Er]=l(Cr,[ir]),Dr=ir(),Or=w.forwardRef($(function(e,t){let{type:n,...r}=e;if(n===wr.Single)return(0,L.jsx)(jr,{role:`radiogroup`,...r,ref:t});if(n===wr.Multiple)return(0,L.jsx)(Mr,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${Cr}\``)},`ToggleGroup`)),[kr,Ar]=Tr(Cr),jr=w.forwardRef($(function(e,t){let{value:n,defaultValue:r,onValueChange:i=$(()=>{},`onValueChange`),...a}=e,[o,s]=_({prop:n,defaultProp:r??``,onChange:i,caller:Cr});return(0,L.jsx)(kr,{scope:e.__scopeToggleGroup,type:wr.Single,value:w.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:w.useCallback(()=>s(``),[s]),children:(0,L.jsx)(Fr,{...a,ref:t})})},`ToggleGroupImplSingle`)),Mr=w.forwardRef($(function(e,t){let{value:n,defaultValue:r,onValueChange:i=$(()=>{},`onValueChange`),...a}=e,[o,s]=_({prop:n,defaultProp:r??[],onChange:i,caller:Cr}),c=w.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=w.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,L.jsx)(kr,{scope:e.__scopeToggleGroup,type:wr.Multiple,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,L.jsx)(Fr,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[Nr,Pr]=Tr(Cr),Fr=w.forwardRef($(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=Dr(n),d=Pe(o),f={dir:d,...c};return(0,L.jsx)(Nr,{scope:n,rovingFocus:i,disabled:r,children:i?(0,L.jsx)(lr,{asChild:!0,...l,orientation:a,dir:d,loop:s,children:(0,L.jsx)(u.div,{...f,ref:t})}):(0,L.jsx)(u.div,{...f,ref:t})})},`ToggleGroupImpl`)),Ir=`ToggleGroupItem`,Lr=w.forwardRef($(function(e,t){let n=Ar(Ir,e.__scopeToggleGroup),r=Pr(Ir,e.__scopeToggleGroup),i=Dr(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=w.useRef(null);return r.rovingFocus?(0,L.jsx)(fr,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,L.jsx)(Rr,{...s,ref:t})}):(0,L.jsx)(Rr,{...s,ref:t})},`ToggleGroupItem`)),Rr=w.forwardRef($(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=Ar(Ir,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===wr.Single?o:void 0;return(0,L.jsx)(xr,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),zr={gray:`bg-[#6b7280]`,red:`bg-[#ef4444]`,orange:`bg-[#f97316]`,yellow:`bg-[#eab308]`,green:`bg-[#22c55e]`,teal:`bg-[#14b8a6]`,blue:`bg-[#3b82f6]`,violet:`bg-[#8b5cf6]`,pink:`bg-[#ec4899]`,brown:`bg-[#b45309]`};function Br({path:e,color:t,className:n}){let r=t===void 0?e?h(e):null:t;return r===null||!(r in zr)?null:(0,L.jsx)(`span`,{"aria-hidden":`true`,"data-project-color":r,className:y(`inline-block size-2 shrink-0 rounded-full`,zr[r],n)})}var Vr=jn;function Hr({className:e,...t}){return(0,L.jsxs)(Mn,{children:[(0,L.jsx)(Nn,{className:`fixed inset-0 z-50 bg-black/50`}),(0,L.jsx)(In,{className:y(`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-3 rounded-lg border bg-card p-5 shadow-lg`,e),...t})]})}function Ur({className:e,...t}){return(0,L.jsx)(`div`,{className:y(`flex flex-col gap-1.5`,e),...t})}function Wr({className:e,...t}){return(0,L.jsx)(`div`,{className:y(`flex justify-end gap-2`,e),...t})}function Gr({className:e,...t}){return(0,L.jsx)(Ln,{className:y(`text-base font-semibold`,e),...t})}function Kr({className:e,...t}){return(0,L.jsx)(Rn,{className:y(`text-sm text-muted-foreground`,e),...t})}function qr({className:e,destructive:t,...n}){return(0,L.jsx)(zn,{className:y(v({variant:t?`destructive`:`default`}),e),...n})}function Jr({className:e,...t}){return(0,L.jsx)(Vn,{className:y(v({variant:`outline`}),e),...t})}var Yr=(0,w.createContext)(null);function Xr({children:e}){let{t}=C(),[n,r]=(0,w.useState)(null),i=(0,w.useRef)(null),a=(0,w.useRef)(null),o=(0,w.useCallback)(e=>(i.current?.(!1),a.current=document.activeElement instanceof HTMLElement?document.activeElement:null,new Promise(t=>{i.current=t,r(e)})),[]),s=e=>{i.current?.(e),i.current=null,r(null)};return(0,L.jsxs)(Yr,{value:o,children:[e,(0,L.jsx)(Vr,{open:n!==null,onOpenChange:e=>!e&&s(!1),children:(0,L.jsxs)(Hr,{onCloseAutoFocus:e=>{e.preventDefault(),a.current?.focus()},children:[(0,L.jsxs)(Ur,{children:[(0,L.jsx)(Gr,{children:n?.title}),n?.description?(0,L.jsx)(Kr,{children:n.description}):(0,L.jsx)(Kr,{className:`sr-only`,children:n?.title})]}),(0,L.jsxs)(Wr,{children:[(0,L.jsx)(Jr,{children:n?.cancelLabel??t(`common.cancel`)}),(0,L.jsx)(qr,{destructive:n?.destructive,onClick:()=>s(!0),children:n?.confirmLabel??t(`common.confirm`)})]})]})})]})}function Zr(){let e=(0,w.useContext)(Yr);if(!e)throw Error(`useConfirm needs a ConfirmProvider`);return e}function Qr(e){ce.success(e,{duration:4e3})}function $r(e){ce.error(e instanceof Error?e.message:String(e),{duration:1/0})}function ei({className:e,...t}){return(0,L.jsx)(Or,{className:y(`inline-flex w-fit items-center rounded-md border bg-muted p-0.5`,e),...t})}function ti({className:e,...t}){return(0,L.jsx)(Lr,{className:y(`inline-flex h-6 items-center gap-1 rounded-[5px] px-2 text-xs font-medium text-muted-foreground data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-xs`,e),...t})}function ni({icon:e,title:t,children:n,className:r,...i}){return(0,L.jsxs)(`div`,{className:y(`flex flex-col items-center gap-2 p-8 text-center text-sm text-muted-foreground`,r),...i,children:[e?(0,L.jsx)(`div`,{className:`text-muted-foreground [&_svg]:size-8`,children:e}):null,(0,L.jsx)(`p`,{className:`font-medium text-foreground`,children:t}),n]})}export{cn as C,Pe as D,Le as E,Se as O,Sn as S,Wt as T,Tn as _,Qr as a,mn as b,zr as c,Lr as d,Er as f,on as g,ir as h,$r as i,I as k,Br as l,fr as m,ei as n,Xr as o,lr as p,ti as r,Zr as s,ni as t,Or as u,vn as v,$t as w,fn as x,Cn as y};
|