@purpurds/modal 8.11.0 → 8.12.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/LICENSE.txt CHANGED
@@ -627,35 +627,35 @@ SOFTWARE.
627
627
  ---
628
628
 
629
629
  Name: @purpurds/button
630
- Version: 8.10.2
630
+ Version: 8.12.0
631
631
  License: AGPL-3.0-only
632
632
  Private: false
633
633
 
634
634
  ---
635
635
 
636
636
  Name: @purpurds/heading
637
- Version: 8.10.2
637
+ Version: 8.12.0
638
638
  License: AGPL-3.0-only
639
639
  Private: false
640
640
 
641
641
  ---
642
642
 
643
643
  Name: @purpurds/icon
644
- Version: 8.10.2
644
+ Version: 8.12.0
645
645
  License: AGPL-3.0-only
646
646
  Private: false
647
647
 
648
648
  ---
649
649
 
650
650
  Name: @purpurds/paragraph
651
- Version: 8.10.2
651
+ Version: 8.12.0
652
652
  License: AGPL-3.0-only
653
653
  Private: false
654
654
 
655
655
  ---
656
656
 
657
657
  Name: @purpurds/visually-hidden
658
- Version: 8.10.2
658
+ Version: 8.12.0
659
659
  License: AGPL-3.0-only
660
660
  Private: false
661
661
 
@@ -1,6 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { BaseProps } from '@purpurds/common-types';
3
-
4
3
  export type DefaultProps = Omit<BaseProps, "children"> & {
5
4
  /**
6
5
  * One or several CTA links or buttons
@@ -1,6 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { BaseProps } from '@purpurds/common-types';
3
-
4
3
  export type ModalTriggerProps = Omit<BaseProps<"button">, "children"> & {
5
4
  children: ReactNode;
6
5
  };
package/dist/modal.cjs.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),R=require("react"),nt=require("react-dom");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=ot(R),Gt=ot(nt);function L(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function at(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ce(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ce(e[a],null)}}}}function k(...e){return s.useCallback(at(...e),e)}function Yt(e,t){const r=s.createContext(t),o=n=>{const{children:u,...i}=n,p=s.useMemo(()=>i,Object.values(i));return c.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function a(n){const u=s.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Xt(e,t=[]){let r=[];function o(n,u){const i=s.createContext(u),p=r.length;r=[...r,u];const l=v=>{const{scope:h,children:g,...b}=v,d=h?.[e]?.[p]||i,m=s.useMemo(()=>b,Object.values(b));return c.jsx(d.Provider,{value:m,children:g})};l.displayName=n+"Provider";function f(v,h){const g=h?.[e]?.[p]||i,b=s.useContext(g);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[l,f]}const a=()=>{const n=r.map(u=>s.createContext(u));return function(i){const p=i?.[e]||n;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return a.scopeName=e,[o,Zt(a,...t)]}function Zt(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const u=o.reduce((i,{useScope:p,scopeName:l})=>{const v=p(n)[`__scope${l}`];return{...i,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var G=globalThis?.document?s.useLayoutEffect:()=>{},Qt=s[" useId ".trim().toString()]||(()=>{}),Jt=0;function de(e){const[t,r]=s.useState(Qt());return G(()=>{r(o=>o??String(Jt++))},[e]),e||(t?`radix-${t}`:"")}var er=s[" useInsertionEffect ".trim().toString()]||G;function tr({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,n,u]=rr({defaultProp:t,onChange:r}),i=e!==void 0,p=i?e:a;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const v=f.current;v!==i&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,o])}const l=s.useCallback(f=>{if(i){const v=nr(f)?f(e):f;v!==e&&u.current?.(v)}else n(f)},[i,e,n,u]);return[p,l]}function rr({defaultProp:e,onChange:t}){const[r,o]=s.useState(e),a=s.useRef(r),n=s.useRef(t);return er(()=>{n.current=t},[t]),s.useEffect(()=>{a.current!==r&&(n.current?.(r),a.current=r)},[r,a]),[r,o,n]}function nr(e){return typeof e=="function"}function it(e){const t=or(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(ir);if(p){const l=p.props.children,f=i.map(v=>v===p?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:v);return c.jsx(t,{...u,ref:a,children:s.isValidElement(l)?s.cloneElement(l,void 0,f):null})}return c.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function or(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=sr(a),i=ur(n,a.props);return a.type!==s.Fragment&&(i.ref=o?at(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ar=Symbol("radix.slottable");function ir(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ar}function ur(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{const p=n(...i);return a(...i),p}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function sr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=cr.reduce((e,t)=>{const r=it(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function lr(e,t){e&&Gt.flushSync(()=>e.dispatchEvent(t))}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>t.current?.(...r),[])}function dr(e,t=globalThis?.document){const r=Y(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var pr="DismissableLayer",be="dismissableLayer.update",fr="dismissableLayer.pointerDownOutside",vr="dismissableLayer.focusOutside",Ne,ut=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),st=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:u,onDismiss:i,...p}=e,l=s.useContext(ut),[f,v]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),b=k(t,y=>v(y)),d=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=d.indexOf(m),E=f?d.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,x=E>=_,S=gr(y=>{const j=y.target,P=[...l.branches].some(K=>K.contains(j));!x||P||(a?.(y),u?.(y),y.defaultPrevented||i?.())},h),N=_r(y=>{const j=y.target;[...l.branches].some(K=>K.contains(j))||(n?.(y),u?.(y),y.defaultPrevented||i?.())},h);return dr(y=>{E===l.layers.size-1&&(o?.(y),!y.defaultPrevented&&i&&(y.preventDefault(),i()))},h),s.useEffect(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ne=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Oe(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ne)}},[f,h,r,l]),s.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,l]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),c.jsx($.div,{...p,ref:b,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:L(e.onFocusCapture,N.onFocusCapture),onBlurCapture:L(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:L(e.onPointerDownCapture,S.onPointerDownCapture)})});st.displayName=pr;var hr="DismissableLayerBranch",mr=s.forwardRef((e,t)=>{const r=s.useContext(ut),o=s.useRef(null),a=k(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx($.div,{...e,ref:a})});mr.displayName=hr;function gr(e,t=globalThis?.document){const r=Y(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=i=>{if(i.target&&!o.current){let p=function(){ct(fr,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function _r(e,t=globalThis?.document){const r=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&ct(vr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Oe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function ct(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?lr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",Re={bubbles:!1,cancelable:!0},yr="FocusScope",lt=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...u}=e,[i,p]=s.useState(null),l=Y(a),f=Y(n),v=s.useRef(null),h=k(t,d=>p(d)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let d=function(w){if(g.paused||!i)return;const x=w.target;i.contains(x)?v.current=x:I(v.current,{select:!0})},m=function(w){if(g.paused||!i)return;const x=w.relatedTarget;x!==null&&(i.contains(x)||I(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&I(i)};document.addEventListener("focusin",d),document.addEventListener("focusout",m);const E=new MutationObserver(_);return i&&E.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",m),E.disconnect()}}},[o,i,g.paused]),s.useEffect(()=>{if(i){je.add(g);const d=document.activeElement;if(!i.contains(d)){const _=new CustomEvent(pe,Re);i.addEventListener(pe,l),i.dispatchEvent(_),_.defaultPrevented||(br(Cr(dt(i)),{select:!0}),document.activeElement===d&&I(i))}return()=>{i.removeEventListener(pe,l),setTimeout(()=>{const _=new CustomEvent(fe,Re);i.addEventListener(fe,f),i.dispatchEvent(_),_.defaultPrevented||I(d??document.body,{select:!0}),i.removeEventListener(fe,f),je.remove(g)},0)}}},[i,l,f,g]);const b=s.useCallback(d=>{if(!r&&!o||g.paused)return;const m=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,_=document.activeElement;if(m&&_){const E=d.currentTarget,[w,x]=Er(E);w&&x?!d.shiftKey&&_===x?(d.preventDefault(),r&&I(w,{select:!0})):d.shiftKey&&_===w&&(d.preventDefault(),r&&I(x,{select:!0})):_===E&&d.preventDefault()}},[r,o,g.paused]);return c.jsx($.div,{tabIndex:-1,...u,ref:h,onKeyDown:b})});lt.displayName=yr;function br(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(I(o,{select:t}),document.activeElement!==r)return}function Er(e){const t=dt(e),r=Pe(t,e),o=Pe(t.reverse(),e);return[r,o]}function dt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pe(e,t){for(const r of e)if(!wr(r,{upTo:t}))return r}function wr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xr(e){return e instanceof HTMLInputElement&&"select"in e}function I(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xr(e)&&t&&e.select()}}var je=Sr();function Sr(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=De(e,t),e.unshift(t)},remove(t){e=De(e,t),e[0]?.resume()}}}function De(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Cr(e){return e.filter(t=>t.tagName!=="A")}var Nr="Portal",pt=s.forwardRef((e,t)=>{const{container:r,...o}=e,[a,n]=s.useState(!1);G(()=>n(!0),[]);const u=r||a&&globalThis?.document?.body;return u?nt.createPortal(c.jsx($.div,{...o,ref:t}),u):null});pt.displayName=Nr;function Or(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Rr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=k(o.ref,Pr(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Rr(e){const[t,r]=s.useState(),o=s.useRef(null),a=s.useRef(e),n=s.useRef("none"),u=e?"mounted":"unmounted",[i,p]=Or(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Z(o.current);n.current=i==="mounted"?l:"none"},[i]),G(()=>{const l=o.current,f=a.current;if(f!==e){const h=n.current,g=Z(l);e?p("MOUNT"):g==="none"||l?.display==="none"?p("UNMOUNT"):p(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),G(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=g=>{const d=Z(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&d&&(p("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(n.current=Z(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,r(l)},[])}}function Z(e){return e?.animationName||"none"}function Pr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ve=0;function jr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ae()),document.body.insertAdjacentElement("beforeend",e[1]??Ae()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function Ae(){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 T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function ft(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Dr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Ar="with-scroll-bars-hidden",Tr="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $r(e,t){var r=R.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Mr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Te=new WeakMap;function Ir(e,t){var r=$r(null,function(o){return e.forEach(function(a){return he(a,o)})});return Mr(function(){var o=Te.get(r);if(o){var a=new Set(o),n=new Set(e),u=r.current;a.forEach(function(i){n.has(i)||he(i,null)}),n.forEach(function(i){a.has(i)||he(i,u)})}Te.set(r,e)},[e]),r}function Lr(e){return e}function Fr(e,t){t===void 0&&(t=Lr);var r=[],o=!1,a={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(n){var u=t(n,o);return r.push(u),function(){r=r.filter(function(i){return i!==u})}},assignSyncMedium:function(n){for(o=!0;r.length;){var u=r;r=[],u.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var u=[];if(r.length){var i=r;r=[],i.forEach(n),u=r}var p=function(){var f=u;u=[],f.forEach(n)},l=function(){return Promise.resolve().then(p)};l(),r={push:function(f){u.push(f),l()},filter:function(f){return u=u.filter(f),r}}}};return a}function kr(e){e===void 0&&(e={});var t=Fr(null);return t.options=T({async:!0,ssr:!1},e),t}var vt=function(e){var t=e.sideCar,r=ft(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};vt.isSideCarExport=!0;function Wr(e,t){return e.useMedium(t),vt}var ht=kr(),me=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:me,onWheelCapture:me,onTouchMoveCapture:me}),a=o[0],n=o[1],u=e.forwardProps,i=e.children,p=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,d=e.inert,m=e.allowPinchZoom,_=e.as,E=_===void 0?"div":_,w=e.gapMode,x=ft(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=Ir([r,t]),y=T(T({},x),a);return s.createElement(s.Fragment,null,f&&s.createElement(S,{sideCar:ht,removeScrollBar:l,shards:v,noRelative:g,noIsolation:b,inert:d,setCallbacks:n,allowPinchZoom:!!m,lockRef:r,gapMode:w}),u?s.cloneElement(s.Children.only(i),T(T({},y),{ref:N})):s.createElement(E,T({},y,{className:p,ref:N}),i))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ae,zeroRight:oe};var Br=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ur(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Br();return t&&e.setAttribute("nonce",t),e}function Hr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ur())&&(Hr(t,r),Vr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qr=function(){var e=Kr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},mt=function(){var e=qr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},zr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},Gr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ge(r),ge(o),ge(a)]},Yr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zr;var t=Gr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Xr=mt(),V="data-scroll-locked",Zr=function(e,t,r,o){var a=e.left,n=e.top,u=e.right,i=e.gap;return r===void 0&&(r="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),R=require("react"),nt=require("react-dom");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=ot(R),Gt=ot(nt);function L(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function at(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ce(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ce(e[a],null)}}}}function k(...e){return s.useCallback(at(...e),e)}function Yt(e,t){const r=s.createContext(t),o=n=>{const{children:u,...i}=n,p=s.useMemo(()=>i,Object.values(i));return c.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function a(n){const u=s.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Xt(e,t=[]){let r=[];function o(n,u){const i=s.createContext(u),p=r.length;r=[...r,u];const l=v=>{const{scope:h,children:g,...b}=v,d=h?.[e]?.[p]||i,m=s.useMemo(()=>b,Object.values(b));return c.jsx(d.Provider,{value:m,children:g})};l.displayName=n+"Provider";function f(v,h){const g=h?.[e]?.[p]||i,b=s.useContext(g);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[l,f]}const a=()=>{const n=r.map(u=>s.createContext(u));return function(i){const p=i?.[e]||n;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return a.scopeName=e,[o,Zt(a,...t)]}function Zt(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const u=o.reduce((i,{useScope:p,scopeName:l})=>{const v=p(n)[`__scope${l}`];return{...i,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var G=globalThis?.document?s.useLayoutEffect:()=>{},Qt=s[" useId ".trim().toString()]||(()=>{}),Jt=0;function de(e){const[t,r]=s.useState(Qt());return G(()=>{r(o=>o??String(Jt++))},[e]),e||(t?`radix-${t}`:"")}var er=s[" useInsertionEffect ".trim().toString()]||G;function tr({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,n,u]=rr({defaultProp:t,onChange:r}),i=e!==void 0,p=i?e:a;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const v=f.current;v!==i&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,o])}const l=s.useCallback(f=>{if(i){const v=nr(f)?f(e):f;v!==e&&u.current?.(v)}else n(f)},[i,e,n,u]);return[p,l]}function rr({defaultProp:e,onChange:t}){const[r,o]=s.useState(e),a=s.useRef(r),n=s.useRef(t);return er(()=>{n.current=t},[t]),s.useEffect(()=>{a.current!==r&&(n.current?.(r),a.current=r)},[r,a]),[r,o,n]}function nr(e){return typeof e=="function"}function it(e){const t=or(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(ir);if(p){const l=p.props.children,f=i.map(v=>v===p?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:v);return c.jsx(t,{...u,ref:a,children:s.isValidElement(l)?s.cloneElement(l,void 0,f):null})}return c.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function or(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=sr(a),i=ur(n,a.props);return a.type!==s.Fragment&&(i.ref=o?at(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ar=Symbol("radix.slottable");function ir(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ar}function ur(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{const p=n(...i);return a(...i),p}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function sr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=cr.reduce((e,t)=>{const r=it(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function lr(e,t){e&&Gt.flushSync(()=>e.dispatchEvent(t))}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>t.current?.(...r),[])}function dr(e,t=globalThis?.document){const r=Y(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var pr="DismissableLayer",be="dismissableLayer.update",fr="dismissableLayer.pointerDownOutside",vr="dismissableLayer.focusOutside",Ne,ut=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),st=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:u,onDismiss:i,...p}=e,l=s.useContext(ut),[f,v]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),b=k(t,y=>v(y)),d=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=d.indexOf(m),E=f?d.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,x=E>=_,S=gr(y=>{const j=y.target,P=[...l.branches].some(V=>V.contains(j));!x||P||(a?.(y),u?.(y),y.defaultPrevented||i?.())},h),N=_r(y=>{const j=y.target;[...l.branches].some(V=>V.contains(j))||(n?.(y),u?.(y),y.defaultPrevented||i?.())},h);return dr(y=>{E===l.layers.size-1&&(o?.(y),!y.defaultPrevented&&i&&(y.preventDefault(),i()))},h),s.useEffect(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ne=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Oe(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ne)}},[f,h,r,l]),s.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,l]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),c.jsx($.div,{...p,ref:b,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:L(e.onFocusCapture,N.onFocusCapture),onBlurCapture:L(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:L(e.onPointerDownCapture,S.onPointerDownCapture)})});st.displayName=pr;var hr="DismissableLayerBranch",mr=s.forwardRef((e,t)=>{const r=s.useContext(ut),o=s.useRef(null),a=k(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx($.div,{...e,ref:a})});mr.displayName=hr;function gr(e,t=globalThis?.document){const r=Y(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=i=>{if(i.target&&!o.current){let p=function(){ct(fr,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function _r(e,t=globalThis?.document){const r=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&ct(vr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Oe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function ct(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?lr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",Re={bubbles:!1,cancelable:!0},yr="FocusScope",lt=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...u}=e,[i,p]=s.useState(null),l=Y(a),f=Y(n),v=s.useRef(null),h=k(t,d=>p(d)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let d=function(w){if(g.paused||!i)return;const x=w.target;i.contains(x)?v.current=x:I(v.current,{select:!0})},m=function(w){if(g.paused||!i)return;const x=w.relatedTarget;x!==null&&(i.contains(x)||I(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&I(i)};document.addEventListener("focusin",d),document.addEventListener("focusout",m);const E=new MutationObserver(_);return i&&E.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",m),E.disconnect()}}},[o,i,g.paused]),s.useEffect(()=>{if(i){je.add(g);const d=document.activeElement;if(!i.contains(d)){const _=new CustomEvent(pe,Re);i.addEventListener(pe,l),i.dispatchEvent(_),_.defaultPrevented||(br(Cr(dt(i)),{select:!0}),document.activeElement===d&&I(i))}return()=>{i.removeEventListener(pe,l),setTimeout(()=>{const _=new CustomEvent(fe,Re);i.addEventListener(fe,f),i.dispatchEvent(_),_.defaultPrevented||I(d??document.body,{select:!0}),i.removeEventListener(fe,f),je.remove(g)},0)}}},[i,l,f,g]);const b=s.useCallback(d=>{if(!r&&!o||g.paused)return;const m=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,_=document.activeElement;if(m&&_){const E=d.currentTarget,[w,x]=Er(E);w&&x?!d.shiftKey&&_===x?(d.preventDefault(),r&&I(w,{select:!0})):d.shiftKey&&_===w&&(d.preventDefault(),r&&I(x,{select:!0})):_===E&&d.preventDefault()}},[r,o,g.paused]);return c.jsx($.div,{tabIndex:-1,...u,ref:h,onKeyDown:b})});lt.displayName=yr;function br(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(I(o,{select:t}),document.activeElement!==r)return}function Er(e){const t=dt(e),r=Pe(t,e),o=Pe(t.reverse(),e);return[r,o]}function dt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pe(e,t){for(const r of e)if(!wr(r,{upTo:t}))return r}function wr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xr(e){return e instanceof HTMLInputElement&&"select"in e}function I(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xr(e)&&t&&e.select()}}var je=Sr();function Sr(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=De(e,t),e.unshift(t)},remove(t){e=De(e,t),e[0]?.resume()}}}function De(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Cr(e){return e.filter(t=>t.tagName!=="A")}var Nr="Portal",pt=s.forwardRef((e,t)=>{const{container:r,...o}=e,[a,n]=s.useState(!1);G(()=>n(!0),[]);const u=r||a&&globalThis?.document?.body;return u?nt.createPortal(c.jsx($.div,{...o,ref:t}),u):null});pt.displayName=Nr;function Or(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Rr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=k(o.ref,Pr(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Rr(e){const[t,r]=s.useState(),o=s.useRef(null),a=s.useRef(e),n=s.useRef("none"),u=e?"mounted":"unmounted",[i,p]=Or(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Z(o.current);n.current=i==="mounted"?l:"none"},[i]),G(()=>{const l=o.current,f=a.current;if(f!==e){const h=n.current,g=Z(l);e?p("MOUNT"):g==="none"||l?.display==="none"?p("UNMOUNT"):p(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),G(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=g=>{const d=Z(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&d&&(p("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(n.current=Z(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,r(l)},[])}}function Z(e){return e?.animationName||"none"}function Pr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ve=0;function jr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ae()),document.body.insertAdjacentElement("beforeend",e[1]??Ae()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function Ae(){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 T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function ft(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Dr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Ar="with-scroll-bars-hidden",Tr="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $r(e,t){var r=R.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Mr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Te=new WeakMap;function Ir(e,t){var r=$r(null,function(o){return e.forEach(function(a){return he(a,o)})});return Mr(function(){var o=Te.get(r);if(o){var a=new Set(o),n=new Set(e),u=r.current;a.forEach(function(i){n.has(i)||he(i,null)}),n.forEach(function(i){a.has(i)||he(i,u)})}Te.set(r,e)},[e]),r}function Lr(e){return e}function Fr(e,t){t===void 0&&(t=Lr);var r=[],o=!1,a={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(n){var u=t(n,o);return r.push(u),function(){r=r.filter(function(i){return i!==u})}},assignSyncMedium:function(n){for(o=!0;r.length;){var u=r;r=[],u.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var u=[];if(r.length){var i=r;r=[],i.forEach(n),u=r}var p=function(){var f=u;u=[],f.forEach(n)},l=function(){return Promise.resolve().then(p)};l(),r={push:function(f){u.push(f),l()},filter:function(f){return u=u.filter(f),r}}}};return a}function kr(e){e===void 0&&(e={});var t=Fr(null);return t.options=T({async:!0,ssr:!1},e),t}var vt=function(e){var t=e.sideCar,r=ft(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};vt.isSideCarExport=!0;function Wr(e,t){return e.useMedium(t),vt}var ht=kr(),me=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:me,onWheelCapture:me,onTouchMoveCapture:me}),a=o[0],n=o[1],u=e.forwardProps,i=e.children,p=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,d=e.inert,m=e.allowPinchZoom,_=e.as,E=_===void 0?"div":_,w=e.gapMode,x=ft(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=Ir([r,t]),y=T(T({},x),a);return s.createElement(s.Fragment,null,f&&s.createElement(S,{sideCar:ht,removeScrollBar:l,shards:v,noRelative:g,noIsolation:b,inert:d,setCallbacks:n,allowPinchZoom:!!m,lockRef:r,gapMode:w}),u?s.cloneElement(s.Children.only(i),T(T({},y),{ref:N})):s.createElement(E,T({},y,{className:p,ref:N}),i))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ae,zeroRight:oe};var Br=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ur(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Br();return t&&e.setAttribute("nonce",t),e}function zr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ur())&&(zr(t,r),Hr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kr=function(){var e=Vr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},mt=function(){var e=Kr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},qr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},Gr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ge(r),ge(o),ge(a)]},Yr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qr;var t=Gr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Xr=mt(),H="data-scroll-locked",Zr=function(e,t,r,o){var a=e.left,n=e.top,u=e.right,i=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(Ar,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
5
5
  }
6
- body[`).concat(V,`] {
6
+ body[`).concat(H,`] {
7
7
  overflow: hidden `).concat(o,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
@@ -32,15 +32,15 @@
32
32
  margin-right: 0 `).concat(o,`;
33
33
  }
34
34
 
35
- body[`).concat(V,`] {
35
+ body[`).concat(H,`] {
36
36
  `).concat(Tr,": ").concat(i,`px;
37
37
  }
38
- `)},$e=function(){var e=parseInt(document.body.getAttribute(V)||"0",10);return isFinite(e)?e:0},Qr=function(){s.useEffect(function(){return document.body.setAttribute(V,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(V):document.body.setAttribute(V,e.toString())}},[])},Jr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Qr();var n=s.useMemo(function(){return Yr(a)},[a]);return s.createElement(Xr,{styles:Zr(n,!t,a,r?"":"!important")})},Ee=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return Ee=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{Ee=!1}var B=Ee?{passive:!1}:!1,en=function(e){return e.tagName==="TEXTAREA"},gt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!en(e)&&r[t]==="visible")},tn=function(e){return gt(e,"overflowY")},rn=function(e){return gt(e,"overflowX")},Me=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=_t(e,o);if(a){var n=yt(e,o),u=n[1],i=n[2];if(u>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},nn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},on=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},_t=function(e,t){return e==="v"?tn(t):rn(t)},yt=function(e,t){return e==="v"?nn(t):on(t)},an=function(e,t){return e==="h"&&t==="rtl"?-1:1},un=function(e,t,r,o,a){var n=an(e,window.getComputedStyle(t).direction),u=n*o,i=r.target,p=t.contains(i),l=!1,f=u>0,v=0,h=0;do{if(!i)break;var g=yt(e,i),b=g[0],d=g[1],m=g[2],_=d-m-n*b;(b||_)&&_t(e,i)&&(v+=_,h+=b);var E=i.parentNode;i=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!p&&i!==document.body||p&&(t.contains(i)||t===i));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(l=!0),l},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},sn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cn=function(e){return`
38
+ `)},$e=function(){var e=parseInt(document.body.getAttribute(H)||"0",10);return isFinite(e)?e:0},Qr=function(){s.useEffect(function(){return document.body.setAttribute(H,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},Jr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Qr();var n=s.useMemo(function(){return Yr(a)},[a]);return s.createElement(Xr,{styles:Zr(n,!t,a,r?"":"!important")})},Ee=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return Ee=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{Ee=!1}var B=Ee?{passive:!1}:!1,en=function(e){return e.tagName==="TEXTAREA"},gt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!en(e)&&r[t]==="visible")},tn=function(e){return gt(e,"overflowY")},rn=function(e){return gt(e,"overflowX")},Me=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=_t(e,o);if(a){var n=yt(e,o),u=n[1],i=n[2];if(u>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},nn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},on=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},_t=function(e,t){return e==="v"?tn(t):rn(t)},yt=function(e,t){return e==="v"?nn(t):on(t)},an=function(e,t){return e==="h"&&t==="rtl"?-1:1},un=function(e,t,r,o,a){var n=an(e,window.getComputedStyle(t).direction),u=n*o,i=r.target,p=t.contains(i),l=!1,f=u>0,v=0,h=0;do{if(!i)break;var g=yt(e,i),b=g[0],d=g[1],m=g[2],_=d-m-n*b;(b||_)&&_t(e,i)&&(v+=_,h+=b);var E=i.parentNode;i=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!p&&i!==document.body||p&&(t.contains(i)||t===i));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(l=!0),l},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},sn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cn=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},ln=0,U=[];function dn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(ln++)[0],n=s.useState(mt)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var d=Dr([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return d.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(d,m){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!u.current.allowPinchZoom;var _=J(d),E=r.current,w="deltaX"in d?d.deltaX:E[0]-_[0],x="deltaY"in d?d.deltaY:E[1]-_[1],S,N=d.target,y=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in d&&y==="h"&&N.type==="range")return!1;var j=Me(y,N);if(!j)return!0;if(j?S=y:(S=y==="v"?"h":"v",j=Me(y,N)),!j)return!1;if(!o.current&&"changedTouches"in d&&(w||x)&&(o.current=S),!S)return!0;var P=o.current||S;return un(P,m,d,P==="h"?w:x)},[]),p=s.useCallback(function(d){var m=d;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?Ie(m):J(m),E=t.current.filter(function(S){return S.name===m.type&&(S.target===m.target||m.target===S.shadowParent)&&sn(S.delta,_)})[0];if(E&&E.should){m.cancelable&&m.preventDefault();return}if(!E){var w=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(S){return S.contains(m.target)}),x=w.length>0?i(m,w[0]):!u.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=s.useCallback(function(d,m,_,E){var w={name:d,delta:m,target:_,should:E,shadowParent:pn(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(x){return x!==w})},1)},[]),f=s.useCallback(function(d){r.current=J(d),o.current=void 0},[]),v=s.useCallback(function(d){l(d.type,Ie(d),d.target,i(d,e.lockRef.current))},[]),h=s.useCallback(function(d){l(d.type,J(d),d.target,i(d,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,B),document.addEventListener("touchmove",p,B),document.addEventListener("touchstart",f,B),function(){U=U.filter(function(d){return d!==n}),document.removeEventListener("wheel",p,B),document.removeEventListener("touchmove",p,B),document.removeEventListener("touchstart",f,B)}},[]);var g=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:cn(a)}):null,g?s.createElement(Jr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fn=Wr(ht,dn);var bt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:fn}))});bt.classNames=se.classNames;var vn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},H=new WeakMap,ee=new WeakMap,te={},_e=0,Et=function(e){return e&&(e.host||Et(e.parentNode))},hn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Et(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})},mn=function(e,t,r,o){var a=hn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],u=[],i=new Set,p=new Set(a),l=function(v){!v||i.has(v)||(i.add(v),l(v.parentNode))};a.forEach(l);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",d=(H.get(h)||0)+1,m=(n.get(h)||0)+1;H.set(h,d),n.set(h,m),u.push(h),d===1&&b&&ee.set(h,!0),m===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),i.clear(),_e++,function(){u.forEach(function(v){var h=H.get(v)-1,g=n.get(v)-1;H.set(v,h),n.set(v,g),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),g||v.removeAttribute(r)}),_e--,_e||(H=new WeakMap,H=new WeakMap,ee=new WeakMap,te={})}},gn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=vn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),mn(o,a,r,"aria-hidden")):function(){return null}},ce="Dialog",[wt]=Xt(ce),[_n,D]=wt(ce),xt=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:u=!0}=e,i=s.useRef(null),p=s.useRef(null),[l,f]=tr({prop:o,defaultProp:a??!1,onChange:n,caller:ce});return c.jsx(_n,{scope:t,triggerRef:i,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:u,children:r})};xt.displayName=ce;var St="DialogTrigger",Ct=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(St,r),n=k(t,a.triggerRef);return c.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open),...o,ref:n,onClick:L(e.onClick,a.onOpenToggle)})});Ct.displayName=St;var we="DialogPortal",[yn,Nt]=wt(we,{forceMount:void 0}),Ot=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(we,t);return c.jsx(yn,{scope:t,forceMount:r,children:s.Children.map(o,u=>c.jsx(ue,{present:r||n.open,children:c.jsx(pt,{asChild:!0,container:a,children:u})}))})};Ot.displayName=we;var ie="DialogOverlay",Rt=s.forwardRef((e,t)=>{const r=Nt(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ie,e.__scopeDialog);return n.modal?c.jsx(ue,{present:o||n.open,children:c.jsx(En,{...a,ref:t})}):null});Rt.displayName=ie;var bn=it("DialogOverlay.RemoveScroll"),En=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ie,r);return c.jsx(bt,{as:bn,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx($.div,{"data-state":Se(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Pt=s.forwardRef((e,t)=>{const r=Nt(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(F,e.__scopeDialog);return c.jsx(ue,{present:o||n.open,children:n.modal?c.jsx(wn,{...a,ref:t}):c.jsx(xn,{...a,ref:t})})});Pt.displayName=F;var wn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(null),a=k(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return gn(n)},[]),c.jsx(jt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,n=>{n.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,n=>{const u=n.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&n.preventDefault()}),onFocusOutside:L(e.onFocusOutside,n=>n.preventDefault())})}),xn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return c.jsx(jt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||r.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=n.target;r.triggerRef.current?.contains(u)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...u}=e,i=D(F,r),p=s.useRef(null),l=k(t,p);return jr(),c.jsxs(c.Fragment,{children:[c.jsx(lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(st,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open),...u,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Sn,{titleId:i.titleId}),c.jsx(Nn,{contentRef:p,descriptionId:i.descriptionId})]})]})}),xe="DialogTitle",Dt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xe,r);return c.jsx($.h2,{id:a.titleId,...o,ref:t})});Dt.displayName=xe;var At="DialogDescription",Tt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(At,r);return c.jsx($.p,{id:a.descriptionId,...o,ref:t})});Tt.displayName=At;var $t="DialogClose",Mt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D($t,r);return c.jsx($.button,{type:"button",...o,ref:t,onClick:L(e.onClick,()=>a.onOpenChange(!1))})});Mt.displayName=$t;function Se(e){return e?"open":"closed"}var It="DialogTitleWarning",[Bo,Lt]=Yt(It,{contentName:F,titleName:xe,docsSlug:"dialog"}),Sn=({titleId:e})=>{const t=Lt(It),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},ln=0,U=[];function dn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(ln++)[0],n=s.useState(mt)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var d=Dr([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return d.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(d,m){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!u.current.allowPinchZoom;var _=J(d),E=r.current,w="deltaX"in d?d.deltaX:E[0]-_[0],x="deltaY"in d?d.deltaY:E[1]-_[1],S,N=d.target,y=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in d&&y==="h"&&N.type==="range")return!1;var j=Me(y,N);if(!j)return!0;if(j?S=y:(S=y==="v"?"h":"v",j=Me(y,N)),!j)return!1;if(!o.current&&"changedTouches"in d&&(w||x)&&(o.current=S),!S)return!0;var P=o.current||S;return un(P,m,d,P==="h"?w:x)},[]),p=s.useCallback(function(d){var m=d;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?Ie(m):J(m),E=t.current.filter(function(S){return S.name===m.type&&(S.target===m.target||m.target===S.shadowParent)&&sn(S.delta,_)})[0];if(E&&E.should){m.cancelable&&m.preventDefault();return}if(!E){var w=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(S){return S.contains(m.target)}),x=w.length>0?i(m,w[0]):!u.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=s.useCallback(function(d,m,_,E){var w={name:d,delta:m,target:_,should:E,shadowParent:pn(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(x){return x!==w})},1)},[]),f=s.useCallback(function(d){r.current=J(d),o.current=void 0},[]),v=s.useCallback(function(d){l(d.type,Ie(d),d.target,i(d,e.lockRef.current))},[]),h=s.useCallback(function(d){l(d.type,J(d),d.target,i(d,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,B),document.addEventListener("touchmove",p,B),document.addEventListener("touchstart",f,B),function(){U=U.filter(function(d){return d!==n}),document.removeEventListener("wheel",p,B),document.removeEventListener("touchmove",p,B),document.removeEventListener("touchstart",f,B)}},[]);var g=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:cn(a)}):null,g?s.createElement(Jr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fn=Wr(ht,dn);var bt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:fn}))});bt.classNames=se.classNames;var vn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},z=new WeakMap,ee=new WeakMap,te={},_e=0,Et=function(e){return e&&(e.host||Et(e.parentNode))},hn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Et(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})},mn=function(e,t,r,o){var a=hn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],u=[],i=new Set,p=new Set(a),l=function(v){!v||i.has(v)||(i.add(v),l(v.parentNode))};a.forEach(l);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",d=(z.get(h)||0)+1,m=(n.get(h)||0)+1;z.set(h,d),n.set(h,m),u.push(h),d===1&&b&&ee.set(h,!0),m===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),i.clear(),_e++,function(){u.forEach(function(v){var h=z.get(v)-1,g=n.get(v)-1;z.set(v,h),n.set(v,g),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),g||v.removeAttribute(r)}),_e--,_e||(z=new WeakMap,z=new WeakMap,ee=new WeakMap,te={})}},gn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=vn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),mn(o,a,r,"aria-hidden")):function(){return null}},ce="Dialog",[wt]=Xt(ce),[_n,D]=wt(ce),xt=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:u=!0}=e,i=s.useRef(null),p=s.useRef(null),[l,f]=tr({prop:o,defaultProp:a??!1,onChange:n,caller:ce});return c.jsx(_n,{scope:t,triggerRef:i,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:u,children:r})};xt.displayName=ce;var St="DialogTrigger",Ct=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(St,r),n=k(t,a.triggerRef);return c.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open),...o,ref:n,onClick:L(e.onClick,a.onOpenToggle)})});Ct.displayName=St;var we="DialogPortal",[yn,Nt]=wt(we,{forceMount:void 0}),Ot=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(we,t);return c.jsx(yn,{scope:t,forceMount:r,children:s.Children.map(o,u=>c.jsx(ue,{present:r||n.open,children:c.jsx(pt,{asChild:!0,container:a,children:u})}))})};Ot.displayName=we;var ie="DialogOverlay",Rt=s.forwardRef((e,t)=>{const r=Nt(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ie,e.__scopeDialog);return n.modal?c.jsx(ue,{present:o||n.open,children:c.jsx(En,{...a,ref:t})}):null});Rt.displayName=ie;var bn=it("DialogOverlay.RemoveScroll"),En=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ie,r);return c.jsx(bt,{as:bn,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx($.div,{"data-state":Se(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Pt=s.forwardRef((e,t)=>{const r=Nt(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(F,e.__scopeDialog);return c.jsx(ue,{present:o||n.open,children:n.modal?c.jsx(wn,{...a,ref:t}):c.jsx(xn,{...a,ref:t})})});Pt.displayName=F;var wn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(null),a=k(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return gn(n)},[]),c.jsx(jt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,n=>{n.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,n=>{const u=n.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&n.preventDefault()}),onFocusOutside:L(e.onFocusOutside,n=>n.preventDefault())})}),xn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return c.jsx(jt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||r.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=n.target;r.triggerRef.current?.contains(u)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...u}=e,i=D(F,r),p=s.useRef(null),l=k(t,p);return jr(),c.jsxs(c.Fragment,{children:[c.jsx(lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(st,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open),...u,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Sn,{titleId:i.titleId}),c.jsx(Nn,{contentRef:p,descriptionId:i.descriptionId})]})]})}),xe="DialogTitle",Dt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xe,r);return c.jsx($.h2,{id:a.titleId,...o,ref:t})});Dt.displayName=xe;var At="DialogDescription",Tt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(At,r);return c.jsx($.p,{id:a.descriptionId,...o,ref:t})});Tt.displayName=At;var $t="DialogClose",Mt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D($t,r);return c.jsx($.button,{type:"button",...o,ref:t,onClick:L(e.onClick,()=>a.onOpenChange(!1))})});Mt.displayName=$t;function Se(e){return e?"open":"closed"}var It="DialogTitleWarning",[Bo,Lt]=Yt(It,{contentName:F,titleName:xe,docsSlug:"dialog"}),Sn=({titleId:e})=>{const t=Lt(It),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Cn="DialogDescriptionWarning",Nn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lt(Cn).contentName}}.`;return s.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},On=xt,Rn=Ct,Pn=Ot,jn=Rt,Dn=Pt,An=Dt,Fe=Tt,Tn=Mt;const $n={LG:"lg"};function Mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}},We;function In(){return We||(We=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ke)),ke.exports}var Ln=In();const Fn=Mn(Ln),kn="_rotate_12t9p_1",Wn="_dash_12t9p_1",Bn={"purpur-spinner":"_purpur-spinner_12t9p_2",rotate:kn,"purpur-spinner--xxs":"_purpur-spinner--xxs_12t9p_6","purpur-spinner--xs":"_purpur-spinner--xs_12t9p_10","purpur-spinner--sm":"_purpur-spinner--sm_12t9p_14","purpur-spinner--md":"_purpur-spinner--md_12t9p_18","purpur-spinner--lg":"_purpur-spinner--lg_12t9p_22","purpur-spinner__circle":"_purpur-spinner__circle_12t9p_26",dash:Wn,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_12t9p_41","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_12t9p_44"},Be=Fn.bind(Bn),q="purpur-spinner",Un={SM:"sm"},Ft=({disabled:e=!1,negative:t=!1,size:r=Un.SM,className:o,...a})=>c.jsx("div",{className:Be(q,`${q}--${r}`,o),...a,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:Be(`${q}__circle`,{[`${q}__circle--disabled`]:e,[`${q}__circle--negative`]:t}),cx:"25",cy:"25",r:"20"})})});Ft.displayName="Spinner";function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}},He;function Vn(){return He||(He=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ue)),Ue.exports}var Kn=Vn();const qn=Hn(Kn),zn={"purpur-button":"_purpur-button_10jh0_1","purpur-button--xs":"_purpur-button--xs_10jh0_22","purpur-button--icon-only":"_purpur-button--icon-only_10jh0_25","purpur-button--sm":"_purpur-button--sm_10jh0_28","purpur-button--md":"_purpur-button--md_10jh0_34","purpur-button--lg":"_purpur-button--lg_10jh0_40","purpur-button--full-width":"_purpur-button--full-width_10jh0_46","purpur-button--primary":"_purpur-button--primary_10jh0_64","purpur-button--disabled":"_purpur-button--disabled_10jh0_68","purpur-button--primary-negative":"_purpur-button--primary-negative_10jh0_74","purpur-button--secondary":"_purpur-button--secondary_10jh0_86","purpur-button--secondary-negative":"_purpur-button--secondary-negative_10jh0_97","purpur-button--expressive":"_purpur-button--expressive_10jh0_108","purpur-button--expressive-negative":"_purpur-button--expressive-negative_10jh0_118","purpur-button--negative":"_purpur-button--negative_10jh0_130","purpur-button--destructive":"_purpur-button--destructive_10jh0_137","purpur-button--destructive-negative":"_purpur-button--destructive-negative_10jh0_147","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_10jh0_157","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_10jh0_170","purpur-button--text-negative":"_purpur-button--text-negative_10jh0_185","purpur-button--text":"_purpur-button--text_10jh0_185","purpur-button__spinner":"_purpur-button__spinner_10jh0_235"},Ve=qn.bind(zn),M="purpur-button",kt=R.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:u=!1,onClick:i,size:p="md",variant:l,type:f="button",...v},h)=>{if(a&&l==="destructive")return null;const g=Ve([M,`${M}--${u?`${l}-negative`:l}`,`${M}--${p}`],{[`${M}--icon-only`]:a,[`${M}--negative`]:u,[`${M}--full-width`]:o,[`${M}--disabled`]:r||n},t),b=m=>{r||n?m.preventDefault():i&&i(m)},d=!!v["aria-disabled"]||r||n;return c.jsxs("button",{className:g,type:f,ref:h,"aria-disabled":d,onClick:b,...v,children:[n&&c.jsx(Ft,{size:p===$n.LG?"xs":"xxs",negative:u,disabled:d,className:Ve(`${M}__spinner`)})," ",e]})});kt.displayName="Button";function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}},qe;function Yn(){return qe||(qe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o(i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ke)),Ke.exports}var Xn=Yn();const Zn=Gn(Xn),re={"purpur-heading":"_purpur-heading_vo751_1","purpur-heading--hyphens":"_purpur-heading--hyphens_vo751_8","purpur-heading--negative":"_purpur-heading--negative_vo751_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_vo751_14","purpur-heading--title-100":"_purpur-heading--title-100_vo751_20","purpur-heading--title-200":"_purpur-heading--title-200_vo751_26","purpur-heading--title-300":"_purpur-heading--title-300_vo751_32","purpur-heading--title-400":"_purpur-heading--title-400_vo751_38","purpur-heading--title-500":"_purpur-heading--title-500_vo751_44","purpur-heading--title-600":"_purpur-heading--title-600_vo751_50","purpur-heading--title-700":"_purpur-heading--title-700_vo751_56","purpur-heading--display-5":"_purpur-heading--display-5_vo751_62","purpur-heading--display-10":"_purpur-heading--display-10_vo751_68","purpur-heading--display-15":"_purpur-heading--display-15_vo751_74","purpur-heading--display-20":"_purpur-heading--display-20_vo751_80","purpur-heading--display-25":"_purpur-heading--display-25_vo751_86","purpur-heading--display-50":"_purpur-heading--display-50_vo751_92","purpur-heading--display-100":"_purpur-heading--display-100_vo751_98","purpur-heading--display-200":"_purpur-heading--display-200_vo751_104"},Qn={TITLE100:"title-100"},ne="purpur-heading",Wt=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Qn.TITLE100,...u})=>{const i=a,p=Zn([t,re[ne],re[`${ne}--${n}`],{[re[`${ne}--hyphens`]]:r,[re[`${ne}--negative`]]:o}]);return c.jsx(i,{className:p,...u,children:e})};Wt.displayName="Heading";function Jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ze={exports:{}},Ge;function eo(){return Ge||(Ge=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ze)),ze.exports}var to=eo();const ro=Jn(to),no={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},oo=ro.bind(no),Ye="purpur-icon",ao="md",io=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),uo=({content:e="",title:t}={})=>{const r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${io(r)}>${o}${e}</svg>`},so=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Bt=({svg:e,allyTitle:t,className:r,size:o=ao,...a})=>{const n=uo({content:so(e.svg),title:t}),u=oo(Ye,`${Ye}--${o}`,r);return c.jsx("span",{className:u,dangerouslySetInnerHTML:{__html:n},...a})};Bt.displayName="Icon";const co={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},Ut=e=>c.jsx(Bt,{...e,svg:co});Ut.displayName="IconClose";function lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}},Ze;function po(){return Ze||(Ze=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Xe)),Xe.exports}var fo=po();const vo=lo(fo),ho={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},mo=vo.bind(ho),go={PARAGRAPH100:"paragraph-100"},z="purpur-paragraph",Ht=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=go.PARAGRAPH100,...u})=>{const i=mo(t,z,`${z}--${n}`,{[`${z}--hyphens`]:o,[`${z}--disabled`]:r,[`${z}--negative`]:a});return c.jsx("p",{...u,className:i,children:e})};Ht.displayName="Paragraph";function Qe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Qe(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Qe(e[a],null)}}}}function yo(e){const t=bo(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(wo);if(p){const l=p.props.children,f=i.map(v=>v===p?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:v);return c.jsx(t,{...u,ref:a,children:s.isValidElement(l)?s.cloneElement(l,void 0,f):null})}return c.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bo(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=So(a),i=xo(n,a.props);return a.type!==s.Fragment&&(i.ref=o?_o(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Eo=Symbol("radix.slottable");function wo(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Eo}function xo(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...u)=>{n(...u),a(...u)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function So(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],No=Co.reduce((e,t)=>{const r=yo(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Oo="VisuallyHidden",Vt=s.forwardRef((e,t)=>c.jsx(No.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Vt.displayName=Oo;var Ro=Vt;const Po=({asChild:e,children:t,...r})=>c.jsx(Ro,{asChild:e,...r,children:t});function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};var Je;function Do(){return Je||(Je=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ye)),ye.exports}var Ao=Do();const To=jo(Ao),$o="_fadeIn_slvdi_1",Mo="_fadeOut_slvdi_1",Io="_slideUp_slvdi_1",Lo="_slideDown_slvdi_1",Fo={"purpur-modal-content":"_purpur-modal-content_slvdi_1",fadeIn:$o,fadeOut:Mo,slideUp:Io,slideDown:Lo,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_slvdi_49","purpur-modal-content__close-button":"_purpur-modal-content__close-button_slvdi_65","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_slvdi_75","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_slvdi_85","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_slvdi_89","purpur-modal-content__header":"_purpur-modal-content__header_slvdi_112","purpur-modal-content__title":"_purpur-modal-content__title_slvdi_125","purpur-modal-content__description":"_purpur-modal-content__description_slvdi_128","purpur-modal-content__body":"_purpur-modal-content__body_slvdi_131","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_slvdi_139","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_slvdi_151","purpur-modal-content__notification":"_purpur-modal-content__notification_slvdi_169","purpur-modal-content--with-image":"_purpur-modal-content--with-image_slvdi_172","purpur-modal-content--overflow":"_purpur-modal-content--overflow_slvdi_172","purpur-modal-content__actions":"_purpur-modal-content__actions_slvdi_151","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_slvdi_203","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_slvdi_213"},et=e=>e.showCloseButton===!0,O=To.bind(Fo),C="purpur-modal-content",ko=R.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:u,image:i,stickyButtons:p=!0,title:l,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...g},b)=>{const{closeButtonAriaLabel:d,showCloseButton:m,..._}=g,[E,w]=R.useState(!1),[x,S]=R.useState(0),N=R.useRef(null),y=R.useRef(null),j=O(C,{[`${C}--with-image`]:!!i},{[`${C}--overflow`]:E},{[`${C}--sticky-footer`]:p},o),P=A=>e?`${e} ${A}`:void 0,K=A=>{n&&A.preventDefault()},W=R.useCallback(()=>{if(!N.current||!y.current)return;const A=window.getComputedStyle(N.current,null),X=parseFloat(A.getPropertyValue("height")),zt=y.current.offsetHeight;w(X<zt),S((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Kt=()=>{const A=y.current;if(A){const X=A.querySelector("h2");X&&setTimeout(()=>{X.focus()})}},qt=A=>{n&&!m&&A.preventDefault()};return R.useEffect(()=>(window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}),[W]),R.useEffect(()=>{W()},[f,r,W]),c.jsxs(Pn,{children:[c.jsx(jn,{className:O(`${C}__overlay`),style:{zIndex:v}}),c.jsxs(Dn,{..._,className:j,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:K,onOpenAutoFocus:()=>{W(),Kt()},onEscapeKeyDown:qt,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[c.jsxs("div",{ref:N,className:O(`${C}__wrapper`),children:[et(g)&&d&&i&&c.jsx(tt,{"aria-label":d,hasImage:!0,scrollbarWidth:x,"data-testid":P("close-button")}),c.jsxs("div",{ref:y,className:O(`${C}__wrapper-inner`),children:[c.jsxs("div",{className:O(`${C}__header`),children:[et(g)&&d&&!i&&c.jsx(tt,{"aria-label":d,"data-testid":P("close-button")}),c.jsx(An,{asChild:!0,className:O(`${C}__title`),"data-testid":P("title"),children:c.jsx(Wt,{tag:"h2",variant:"title-200",tabIndex:-1,children:l})})]}),i&&c.jsx("div",{className:O(`${C}__image-wrapper`),"data-testid":P("image"),children:i}),c.jsx("div",{className:O(`${C}__body`),children:c.jsxs("div",{className:O(`${C}__body-inner`),children:[a&&u&&c.jsx(Po,{asChild:!0,children:c.jsx(Fe,{"data-testid":P("description"),children:a})}),a&&!u&&c.jsx(Fe,{asChild:!0,className:O(`${C}__description`),"data-testid":P("description"),children:c.jsx(Ht,{variant:"paragraph-100",children:a})}),c.jsx("div",{children:r}),!p&&c.jsx(rt,{actions:t,notification:f})]})})]})]}),p&&c.jsx(rt,{actions:t,notification:f})]})]})}),tt=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>c.jsx(Tn,{asChild:!0,children:c.jsx(kt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:O(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:c.jsx(Ut,{})})}),rt=({actions:e,notification:t})=>{const r=R.useRef(null);return R.useEffect(()=>{t&&r?.current?.scrollIntoView?.(!1)},[t]),e?c.jsxs("div",{className:O(`${C}__actions`),children:[c.jsx("div",{className:O(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&c.jsx("div",{className:O(`${C}__notification`),ref:r,children:t}),c.jsx("span",{className:O(`${C}__actions-separator`)})]}):null},Wo=R.forwardRef(({children:e,...t},r)=>c.jsx(Rn,{asChild:!0,ref:r,...t,children:e})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(On,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Wo;le.Content=ko;le.displayName="Modal";exports.Modal=le;
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Cn="DialogDescriptionWarning",Nn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lt(Cn).contentName}}.`;return s.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},On=xt,Rn=Ct,Pn=Ot,jn=Rt,Dn=Pt,An=Dt,Fe=Tt,Tn=Mt;const $n={LG:"lg"};function Mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}},We;function In(){return We||(We=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ke)),ke.exports}var Ln=In();const Fn=Mn(Ln),kn="_rotate_12t9p_1",Wn="_dash_12t9p_1",Bn={"purpur-spinner":"_purpur-spinner_12t9p_2",rotate:kn,"purpur-spinner--xxs":"_purpur-spinner--xxs_12t9p_6","purpur-spinner--xs":"_purpur-spinner--xs_12t9p_10","purpur-spinner--sm":"_purpur-spinner--sm_12t9p_14","purpur-spinner--md":"_purpur-spinner--md_12t9p_18","purpur-spinner--lg":"_purpur-spinner--lg_12t9p_22","purpur-spinner__circle":"_purpur-spinner__circle_12t9p_26",dash:Wn,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_12t9p_41","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_12t9p_44"},Be=Fn.bind(Bn),K="purpur-spinner",Un={SM:"sm"},Ft=({disabled:e=!1,negative:t=!1,size:r=Un.SM,className:o,...a})=>c.jsx("div",{className:Be(K,`${K}--${r}`,o),...a,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:Be(`${K}__circle`,{[`${K}__circle--disabled`]:e,[`${K}__circle--negative`]:t}),cx:"25",cy:"25",r:"20"})})});Ft.displayName="Spinner";function zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}},ze;function Hn(){return ze||(ze=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ue)),Ue.exports}var Vn=Hn();const Kn=zn(Vn),qn={"purpur-button":"_purpur-button_10jh0_1","purpur-button--xs":"_purpur-button--xs_10jh0_22","purpur-button--icon-only":"_purpur-button--icon-only_10jh0_25","purpur-button--sm":"_purpur-button--sm_10jh0_28","purpur-button--md":"_purpur-button--md_10jh0_34","purpur-button--lg":"_purpur-button--lg_10jh0_40","purpur-button--full-width":"_purpur-button--full-width_10jh0_46","purpur-button--primary":"_purpur-button--primary_10jh0_64","purpur-button--disabled":"_purpur-button--disabled_10jh0_68","purpur-button--primary-negative":"_purpur-button--primary-negative_10jh0_74","purpur-button--secondary":"_purpur-button--secondary_10jh0_86","purpur-button--secondary-negative":"_purpur-button--secondary-negative_10jh0_97","purpur-button--expressive":"_purpur-button--expressive_10jh0_108","purpur-button--expressive-negative":"_purpur-button--expressive-negative_10jh0_118","purpur-button--negative":"_purpur-button--negative_10jh0_130","purpur-button--destructive":"_purpur-button--destructive_10jh0_137","purpur-button--destructive-negative":"_purpur-button--destructive-negative_10jh0_147","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_10jh0_157","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_10jh0_170","purpur-button--text-negative":"_purpur-button--text-negative_10jh0_185","purpur-button--text":"_purpur-button--text_10jh0_185","purpur-button__spinner":"_purpur-button__spinner_10jh0_235"},He=Kn.bind(qn),M="purpur-button",kt=R.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:u=!1,onClick:i,size:p="md",variant:l,type:f="button",...v},h)=>{if(a&&l==="destructive")return null;const g=He([M,`${M}--${u?`${l}-negative`:l}`,`${M}--${p}`],{[`${M}--icon-only`]:a,[`${M}--negative`]:u,[`${M}--full-width`]:o,[`${M}--disabled`]:r||n},t),b=m=>{r||n?m.preventDefault():i&&i(m)},d=!!v["aria-disabled"]||r||n;return c.jsxs("button",{className:g,type:f,ref:h,"aria-disabled":d,onClick:b,...v,children:[n&&c.jsx(Ft,{size:p===$n.LG?"xs":"xxs",negative:u,disabled:d,className:He(`${M}__spinner`)})," ",e]})});kt.displayName="Button";function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve={exports:{}},Ke;function Yn(){return Ke||(Ke=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o(i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ve)),Ve.exports}var Xn=Yn();const Zn=Gn(Xn),re={"purpur-heading":"_purpur-heading_vo751_1","purpur-heading--hyphens":"_purpur-heading--hyphens_vo751_8","purpur-heading--negative":"_purpur-heading--negative_vo751_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_vo751_14","purpur-heading--title-100":"_purpur-heading--title-100_vo751_20","purpur-heading--title-200":"_purpur-heading--title-200_vo751_26","purpur-heading--title-300":"_purpur-heading--title-300_vo751_32","purpur-heading--title-400":"_purpur-heading--title-400_vo751_38","purpur-heading--title-500":"_purpur-heading--title-500_vo751_44","purpur-heading--title-600":"_purpur-heading--title-600_vo751_50","purpur-heading--title-700":"_purpur-heading--title-700_vo751_56","purpur-heading--display-5":"_purpur-heading--display-5_vo751_62","purpur-heading--display-10":"_purpur-heading--display-10_vo751_68","purpur-heading--display-15":"_purpur-heading--display-15_vo751_74","purpur-heading--display-20":"_purpur-heading--display-20_vo751_80","purpur-heading--display-25":"_purpur-heading--display-25_vo751_86","purpur-heading--display-50":"_purpur-heading--display-50_vo751_92","purpur-heading--display-100":"_purpur-heading--display-100_vo751_98","purpur-heading--display-200":"_purpur-heading--display-200_vo751_104"},Qn={TITLE100:"title-100"},ne="purpur-heading",Wt=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Qn.TITLE100,...u})=>{const i=a,p=Zn([t,re[ne],re[`${ne}--${n}`],{[re[`${ne}--hyphens`]]:r,[re[`${ne}--negative`]]:o}]);return c.jsx(i,{className:p,...u,children:e})};Wt.displayName="Heading";function Jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={exports:{}},Ge;function eo(){return Ge||(Ge=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(qe)),qe.exports}var to=eo();const ro=Jn(to),no={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},oo=ro.bind(no),Ye="purpur-icon",ao="md",io=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),uo=({content:e="",title:t}={})=>{const r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${io(r)}>${o}${e}</svg>`},so=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Bt=({svg:e,allyTitle:t,className:r,size:o=ao,...a})=>{const n=uo({content:so(e.svg),title:t}),u=oo(Ye,`${Ye}--${o}`,r);return c.jsx("span",{className:u,dangerouslySetInnerHTML:{__html:n},...a})};Bt.displayName="Icon";const co={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},Ut=e=>c.jsx(Bt,{...e,svg:co});Ut.displayName="IconClose";function lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}},Ze;function po(){return Ze||(Ze=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Xe)),Xe.exports}var fo=po();const vo=lo(fo),ho={"purpur-paragraph":"_purpur-paragraph_1vz75_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1vz75_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1vz75_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1vz75_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1vz75_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1vz75_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1vz75_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1vz75_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1vz75_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1vz75_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1vz75_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1vz75_60","purpur-paragraph--additional-100-bold":"_purpur-paragraph--additional-100-bold_1vz75_67","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1vz75_74","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1vz75_82"},mo=vo.bind(ho),go={PARAGRAPH100:"paragraph-100"},q="purpur-paragraph",zt=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=go.PARAGRAPH100,...u})=>{const i=mo(t,q,`${q}--${n}`,{[`${q}--hyphens`]:o,[`${q}--disabled`]:r,[`${q}--negative`]:a});return c.jsx("p",{...u,className:i,children:e})};zt.displayName="Paragraph";function Qe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Qe(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Qe(e[a],null)}}}}function yo(e){const t=bo(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(wo);if(p){const l=p.props.children,f=i.map(v=>v===p?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:v);return c.jsx(t,{...u,ref:a,children:s.isValidElement(l)?s.cloneElement(l,void 0,f):null})}return c.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bo(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=So(a),i=xo(n,a.props);return a.type!==s.Fragment&&(i.ref=o?_o(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Eo=Symbol("radix.slottable");function wo(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Eo}function xo(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...u)=>{n(...u),a(...u)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function So(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],No=Co.reduce((e,t)=>{const r=yo(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Oo="VisuallyHidden",Ht=s.forwardRef((e,t)=>c.jsx(No.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ht.displayName=Oo;var Ro=Ht;const Po=({asChild:e,children:t,...r})=>c.jsx(Ro,{asChild:e,...r,children:t});function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};var Je;function Do(){return Je||(Je=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ye)),ye.exports}var Ao=Do();const To=jo(Ao),$o="_fadeIn_slvdi_1",Mo="_fadeOut_slvdi_1",Io="_slideUp_slvdi_1",Lo="_slideDown_slvdi_1",Fo={"purpur-modal-content":"_purpur-modal-content_slvdi_1",fadeIn:$o,fadeOut:Mo,slideUp:Io,slideDown:Lo,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_slvdi_49","purpur-modal-content__close-button":"_purpur-modal-content__close-button_slvdi_65","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_slvdi_75","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_slvdi_85","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_slvdi_89","purpur-modal-content__header":"_purpur-modal-content__header_slvdi_112","purpur-modal-content__title":"_purpur-modal-content__title_slvdi_125","purpur-modal-content__description":"_purpur-modal-content__description_slvdi_128","purpur-modal-content__body":"_purpur-modal-content__body_slvdi_131","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_slvdi_139","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_slvdi_151","purpur-modal-content__notification":"_purpur-modal-content__notification_slvdi_169","purpur-modal-content--with-image":"_purpur-modal-content--with-image_slvdi_172","purpur-modal-content--overflow":"_purpur-modal-content--overflow_slvdi_172","purpur-modal-content__actions":"_purpur-modal-content__actions_slvdi_151","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_slvdi_203","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_slvdi_213"},et=e=>e.showCloseButton===!0,O=To.bind(Fo),C="purpur-modal-content",ko=R.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:u,image:i,stickyButtons:p=!0,title:l,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...g},b)=>{const{closeButtonAriaLabel:d,showCloseButton:m,..._}=g,[E,w]=R.useState(!1),[x,S]=R.useState(0),N=R.useRef(null),y=R.useRef(null),j=O(C,{[`${C}--with-image`]:!!i},{[`${C}--overflow`]:E},{[`${C}--sticky-footer`]:p},o),P=A=>e?`${e} ${A}`:void 0,V=A=>{n&&A.preventDefault()},W=R.useCallback(()=>{if(!N.current||!y.current)return;const A=window.getComputedStyle(N.current,null),X=parseFloat(A.getPropertyValue("height")),qt=y.current.offsetHeight;w(X<qt),S((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Vt=()=>{const A=y.current;if(A){const X=A.querySelector("h2");X&&setTimeout(()=>{X.focus()})}},Kt=A=>{n&&!m&&A.preventDefault()};return R.useEffect(()=>(window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}),[W]),R.useEffect(()=>{W()},[f,r,W]),c.jsxs(Pn,{children:[c.jsx(jn,{className:O(`${C}__overlay`),style:{zIndex:v}}),c.jsxs(Dn,{..._,className:j,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:V,onOpenAutoFocus:()=>{W(),Vt()},onEscapeKeyDown:Kt,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[c.jsxs("div",{ref:N,className:O(`${C}__wrapper`),children:[et(g)&&d&&i&&c.jsx(tt,{"aria-label":d,hasImage:!0,scrollbarWidth:x,"data-testid":P("close-button")}),c.jsxs("div",{ref:y,className:O(`${C}__wrapper-inner`),children:[c.jsxs("div",{className:O(`${C}__header`),children:[et(g)&&d&&!i&&c.jsx(tt,{"aria-label":d,"data-testid":P("close-button")}),c.jsx(An,{asChild:!0,className:O(`${C}__title`),"data-testid":P("title"),children:c.jsx(Wt,{tag:"h2",variant:"title-200",tabIndex:-1,children:l})})]}),i&&c.jsx("div",{className:O(`${C}__image-wrapper`),"data-testid":P("image"),children:i}),c.jsx("div",{className:O(`${C}__body`),children:c.jsxs("div",{className:O(`${C}__body-inner`),children:[a&&u&&c.jsx(Po,{asChild:!0,children:c.jsx(Fe,{"data-testid":P("description"),children:a})}),a&&!u&&c.jsx(Fe,{asChild:!0,className:O(`${C}__description`),"data-testid":P("description"),children:c.jsx(zt,{variant:"paragraph-100",children:a})}),c.jsx("div",{children:r}),!p&&c.jsx(rt,{actions:t,notification:f})]})})]})]}),p&&c.jsx(rt,{actions:t,notification:f})]})]})}),tt=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>c.jsx(Tn,{asChild:!0,children:c.jsx(kt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:O(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:c.jsx(Ut,{})})}),rt=({actions:e,notification:t})=>{const r=R.useRef(null);return R.useEffect(()=>{t&&r?.current?.scrollIntoView?.(!1)},[t]),e?c.jsxs("div",{className:O(`${C}__actions`),children:[c.jsx("div",{className:O(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&c.jsx("div",{className:O(`${C}__notification`),ref:r,children:t}),c.jsx("span",{className:O(`${C}__actions-separator`)})]}):null},Wo=R.forwardRef(({children:e,...t},r)=>c.jsx(Rn,{asChild:!0,ref:r,...t,children:e})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(On,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Wo;le.Content=ko;le.displayName="Modal";exports.Modal=le;
46
46
  //# sourceMappingURL=modal.cjs.js.map