@purpurds/modal 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/LICENSE.txt CHANGED
@@ -398,42 +398,42 @@ Homepage: https://radix-ui.com/primitives
398
398
  ---
399
399
 
400
400
  Name: @purpurds/button
401
- Version: 4.3.0
401
+ Version: 4.4.0
402
402
  License: AGPL-3.0-only
403
403
  Private: false
404
404
 
405
405
  ---
406
406
 
407
407
  Name: @purpurds/heading
408
- Version: 4.3.0
408
+ Version: 4.4.0
409
409
  License: AGPL-3.0-only
410
410
  Private: false
411
411
 
412
412
  ---
413
413
 
414
414
  Name: @purpurds/icon
415
- Version: 4.3.0
415
+ Version: 4.4.0
416
416
  License: AGPL-3.0-only
417
417
  Private: false
418
418
 
419
419
  ---
420
420
 
421
421
  Name: @purpurds/paragraph
422
- Version: 4.3.0
422
+ Version: 4.4.0
423
423
  License: AGPL-3.0-only
424
424
  Private: false
425
425
 
426
426
  ---
427
427
 
428
428
  Name: @purpurds/tokens
429
- Version: 4.3.0
429
+ Version: 4.4.0
430
430
  License: AGPL-3.0-only
431
431
  Private: false
432
432
 
433
433
  ---
434
434
 
435
435
  Name: @purpurds/visually-hidden
436
- Version: 4.3.0
436
+ Version: 4.4.0
437
437
  License: AGPL-3.0-only
438
438
  Private: false
439
439
 
package/dist/modal.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),c=require("react"),we=require("react-dom");function _t(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const _=_t(c);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},C.apply(this,arguments)}function M(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function bt(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function ze(...e){return n=>e.forEach(t=>bt(t,n))}function V(...e){return c.useCallback(ze(...e),e)}function yt(e,n=[]){let t=[];function o(r,u){const i=c.createContext(u),l=t.length;t=[...t,u];function p(d){const{scope:h,children:v,...E}=d,s=(h==null?void 0:h[e][l])||i,m=c.useMemo(()=>E,Object.values(E));return c.createElement(s.Provider,{value:m},v)}function f(d,h){const v=(h==null?void 0:h[e][l])||i,E=c.useContext(v);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${r}\``)}return p.displayName=r+"Provider",[p,f]}const a=()=>{const r=t.map(u=>c.createContext(u));return function(i){const l=(i==null?void 0:i[e])||r;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[o,$t(a,...n)]}function $t(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const u=o.reduce((i,{useScope:l,scopeName:p})=>{const d=l(r)[`__scope${p}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return t.scopeName=n.scopeName,t}const ge=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Et=_.useId||(()=>{});let wt=0;function le(e){const[n,t]=_.useState(Et());return ge(()=>{e||t(o=>o??String(wt++))},[e]),e||(n?`radix-${n}`:"")}function B(e){const n=c.useRef(e);return c.useEffect(()=>{n.current=e}),c.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function xt({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=St({defaultProp:n,onChange:t}),r=e!==void 0,u=r?e:o,i=B(t),l=c.useCallback(p=>{if(r){const d=typeof p=="function"?p(e):p;d!==e&&i(d)}else a(p)},[r,e,a,i]);return[u,l]}function St({defaultProp:e,onChange:n}){const t=c.useState(e),[o]=t,a=c.useRef(o),r=B(n);return c.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const xe=c.forwardRef((e,n)=>{const{children:t,...o}=e,a=c.Children.toArray(t),r=a.find(Ot);if(r){const u=r.props.children,i=a.map(l=>l===r?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:l);return c.createElement(_e,C({},o,{ref:n}),c.isValidElement(u)?c.cloneElement(u,void 0,i):null)}return c.createElement(_e,C({},o,{ref:n}),t)});xe.displayName="Slot";const _e=c.forwardRef((e,n)=>{const{children:t,...o}=e;return c.isValidElement(t)?c.cloneElement(t,{...Pt(o,t.props),ref:n?ze(n,t.ref):t.ref}):c.Children.count(t)>1?c.Children.only(null):null});_e.displayName="SlotClone";const Ct=({children:e})=>c.createElement(c.Fragment,null,e);function Ot(e){return c.isValidElement(e)&&e.type===Ct}function Pt(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Nt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=Nt.reduce((e,n)=>{const t=c.forwardRef((o,a)=>{const{asChild:r,...u}=o,i=r?xe:n;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(i,C({},u,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Rt(e,n){e&&we.flushSync(()=>e.dispatchEvent(n))}function At(e,n=globalThis==null?void 0:globalThis.document){const t=B(e);c.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const be="dismissableLayer.update",Tt="dismissableLayer.pointerDownOutside",Dt="dismissableLayer.focusOutside";let Oe;const It=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mt=c.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:u,onInteractOutside:i,onDismiss:l,...p}=e,f=c.useContext(It),[d,h]=c.useState(null),v=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=c.useState({}),s=V(n,w=>h(w)),m=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=m.indexOf(b),y=d?m.indexOf(d):-1,$=f.layersWithOutsidePointerEventsDisabled.size>0,x=y>=S,j=Lt(w=>{const R=w.target,X=[...f.branches].some(A=>A.contains(R));!x||X||(r==null||r(w),i==null||i(w),w.defaultPrevented||l==null||l())},v),P=jt(w=>{const R=w.target;[...f.branches].some(A=>A.contains(R))||(u==null||u(w),i==null||i(w),w.defaultPrevented||l==null||l())},v);return At(w=>{y===f.layers.size-1&&(a==null||a(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},v),c.useEffect(()=>{if(d)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Pe(),()=>{o&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Oe)}},[d,v,o,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Pe())},[d,f]),c.useEffect(()=>{const w=()=>E({});return document.addEventListener(be,w),()=>document.removeEventListener(be,w)},[]),c.createElement(L.div,C({},p,{ref:s,style:{pointerEvents:$?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,j.onPointerDownCapture)}))});function Lt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=c.useRef(!1),a=c.useRef(()=>{});return c.useEffect(()=>{const r=i=>{if(i.target&&!o.current){let p=function(){Ve(Tt,t,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=p,n.addEventListener("click",a.current,{once:!0})):p()}else n.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function jt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=c.useRef(!1);return c.useEffect(()=>{const a=r=>{r.target&&!o.current&&Ve(Dt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function Ve(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Rt(a,r):a.dispatchEvent(r)}const de="focusScope.autoFocusOnMount",pe="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Ft=c.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...u}=e,[i,l]=c.useState(null),p=B(a),f=B(r),d=c.useRef(null),h=V(n,s=>l(s)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let s=function(y){if(v.paused||!i)return;const $=y.target;i.contains($)?d.current=$:I(d.current,{select:!0})},m=function(y){if(v.paused||!i)return;const $=y.relatedTarget;$!==null&&(i.contains($)||I(d.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const x of y)x.removedNodes.length>0&&I(i)};document.addEventListener("focusin",s),document.addEventListener("focusout",m);const S=new MutationObserver(b);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",m),S.disconnect()}}},[o,i,v.paused]),c.useEffect(()=>{if(i){Ae.add(v);const s=document.activeElement;if(!i.contains(s)){const b=new CustomEvent(de,Ne);i.addEventListener(de,p),i.dispatchEvent(b),b.defaultPrevented||(kt(zt(He(i)),{select:!0}),document.activeElement===s&&I(i))}return()=>{i.removeEventListener(de,p),setTimeout(()=>{const b=new CustomEvent(pe,Ne);i.addEventListener(pe,f),i.dispatchEvent(b),b.defaultPrevented||I(s??document.body,{select:!0}),i.removeEventListener(pe,f),Ae.remove(v)},0)}}},[i,p,f,v]);const E=c.useCallback(s=>{if(!t&&!o||v.paused)return;const m=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(m&&b){const S=s.currentTarget,[y,$]=Bt(S);y&&$?!s.shiftKey&&b===$?(s.preventDefault(),t&&I(y,{select:!0})):s.shiftKey&&b===y&&(s.preventDefault(),t&&I($,{select:!0})):b===S&&s.preventDefault()}},[t,o,v.paused]);return c.createElement(L.div,C({tabIndex:-1},u,{ref:h,onKeyDown:E}))});function kt(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(I(o,{select:n}),document.activeElement!==t)return}function Bt(e){const n=He(e),t=Re(n,e),o=Re(n.reverse(),e);return[t,o]}function He(e){const n=[],t=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(;t.nextNode();)n.push(t.currentNode);return n}function Re(e,n){for(const t of e)if(!Wt(t,{upTo:n}))return t}function Wt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ut(e){return e instanceof HTMLInputElement&&"select"in e}function I(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Ut(e)&&n&&e.select()}}const Ae=qt();function qt(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Te(e,n),e.unshift(n)},remove(n){var t;e=Te(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Te(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function zt(e){return e.filter(n=>n.tagName!=="A")}const Vt=c.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?we.createPortal(c.createElement(L.div,C({},a,{ref:n})),o):null});function Ht(e,n){return c.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ie=e=>{const{present:n,children:t}=e,o=Gt(n),a=typeof t=="function"?t({present:o.isPresent}):c.Children.only(t),r=V(o.ref,a.ref);return typeof t=="function"||o.isPresent?c.cloneElement(a,{ref:r}):null};ie.displayName="Presence";function Gt(e){const[n,t]=c.useState(),o=c.useRef({}),a=c.useRef(e),r=c.useRef("none"),u=e?"mounted":"unmounted",[i,l]=Ht(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const p=Y(o.current);r.current=i==="mounted"?p:"none"},[i]),ge(()=>{const p=o.current,f=a.current;if(f!==e){const h=r.current,v=Y(p);e?l("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?l("UNMOUNT"):l(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),ge(()=>{if(n){const p=d=>{const v=Y(o.current).includes(d.animationName);d.target===n&&v&&we.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===n&&(r.current=Y(o.current))};return n.addEventListener("animationstart",f),n.addEventListener("animationcancel",p),n.addEventListener("animationend",p),()=>{n.removeEventListener("animationstart",f),n.removeEventListener("animationcancel",p),n.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(p=>{p&&(o.current=getComputedStyle(p)),t(p)},[])}}function Y(e){return(e==null?void 0:e.animationName)||"none"}let fe=0;function Kt(){c.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:De()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:De()),fe++,()=>{fe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),fe--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function Ge(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Xt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var ae="right-scroll-bar-position",ue="width-before-scroll-bar",Yt="with-scroll-bars-hidden",Zt="--removed-body-scroll-bar-size";function Qt(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Jt(e,n){var t=c.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function en(e,n){return Jt(null,function(t){return e.forEach(function(o){return Qt(o,t)})})}function tn(e){return e}function nn(e,n){n===void 0&&(n=tn);var t=[],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 t.length?t[t.length-1]:e},useMedium:function(r){var u=n(r,o);return t.push(u),function(){t=t.filter(function(i){return i!==u})}},assignSyncMedium:function(r){for(o=!0;t.length;){var u=t;t=[],u.forEach(r)}t={push:function(i){return r(i)},filter:function(){return t}}},assignMedium:function(r){o=!0;var u=[];if(t.length){var i=t;t=[],i.forEach(r),u=t}var l=function(){var f=u;u=[],f.forEach(r)},p=function(){return Promise.resolve().then(l)};p(),t={push:function(f){u.push(f),p()},filter:function(f){return u=u.filter(f),t}}}};return a}function rn(e){e===void 0&&(e={});var n=nn(null);return n.options=D({async:!0,ssr:!1},e),n}var Ke=function(e){var n=e.sideCar,t=Ge(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return _.createElement(o,D({},t))};Ke.isSideCarExport=!0;function on(e,n){return e.useMedium(n),Ke}var Xe=rn(),ve=function(){},ce=_.forwardRef(function(e,n){var t=_.useRef(null),o=_.useState({onScrollCapture:ve,onWheelCapture:ve,onTouchMoveCapture:ve}),a=o[0],r=o[1],u=e.forwardProps,i=e.children,l=e.className,p=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,S=Ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=h,$=en([t,n]),x=D(D({},S),a);return _.createElement(_.Fragment,null,f&&_.createElement(y,{sideCar:Xe,removeScrollBar:p,shards:d,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),u?_.cloneElement(_.Children.only(i),D(D({},x),{ref:$})):_.createElement(b,D({},x,{className:l,ref:$}),i))});ce.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ce.classNames={fullWidth:ue,zeroRight:ae};var an=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=an();return n&&e.setAttribute("nonce",n),e}function cn(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sn(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var ln=function(){var e=0,n=null;return{add:function(t){e==0&&(n=un())&&(cn(n,t),sn(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},dn=function(){var e=ln();return function(n,t){_.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Ye=function(){var e=dn(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},pn={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},fn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[me(t),me(o),me(a)]},vn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pn;var n=fn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},mn=Ye(),hn=function(e,n,t,o){var a=e.left,r=e.top,u=e.right,i=e.gap;return t===void 0&&(t="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),c=require("react"),we=require("react-dom");function _t(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const _=_t(c);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},C.apply(this,arguments)}function M(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function bt(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Ve(...e){return n=>e.forEach(t=>bt(t,n))}function H(...e){return c.useCallback(Ve(...e),e)}function yt(e,n=[]){let t=[];function o(r,u){const i=c.createContext(u),l=t.length;t=[...t,u];function p(d){const{scope:m,children:v,...E}=d,s=(m==null?void 0:m[e][l])||i,h=c.useMemo(()=>E,Object.values(E));return c.createElement(s.Provider,{value:h},v)}function f(d,m){const v=(m==null?void 0:m[e][l])||i,E=c.useContext(v);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${r}\``)}return p.displayName=r+"Provider",[p,f]}const a=()=>{const r=t.map(u=>c.createContext(u));return function(i){const l=(i==null?void 0:i[e])||r;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[o,$t(a,...n)]}function $t(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const u=o.reduce((i,{useScope:l,scopeName:p})=>{const d=l(r)[`__scope${p}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return t.scopeName=n.scopeName,t}const ge=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Et=_.useId||(()=>{});let wt=0;function le(e){const[n,t]=_.useState(Et());return ge(()=>{e||t(o=>o??String(wt++))},[e]),e||(n?`radix-${n}`:"")}function B(e){const n=c.useRef(e);return c.useEffect(()=>{n.current=e}),c.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function xt({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=St({defaultProp:n,onChange:t}),r=e!==void 0,u=r?e:o,i=B(t),l=c.useCallback(p=>{if(r){const d=typeof p=="function"?p(e):p;d!==e&&i(d)}else a(p)},[r,e,a,i]);return[u,l]}function St({defaultProp:e,onChange:n}){const t=c.useState(e),[o]=t,a=c.useRef(o),r=B(n);return c.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const xe=c.forwardRef((e,n)=>{const{children:t,...o}=e,a=c.Children.toArray(t),r=a.find(Ot);if(r){const u=r.props.children,i=a.map(l=>l===r?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:l);return c.createElement(_e,C({},o,{ref:n}),c.isValidElement(u)?c.cloneElement(u,void 0,i):null)}return c.createElement(_e,C({},o,{ref:n}),t)});xe.displayName="Slot";const _e=c.forwardRef((e,n)=>{const{children:t,...o}=e;return c.isValidElement(t)?c.cloneElement(t,{...Pt(o,t.props),ref:n?Ve(n,t.ref):t.ref}):c.Children.count(t)>1?c.Children.only(null):null});_e.displayName="SlotClone";const Ct=({children:e})=>c.createElement(c.Fragment,null,e);function Ot(e){return c.isValidElement(e)&&e.type===Ct}function Pt(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Nt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=Nt.reduce((e,n)=>{const t=c.forwardRef((o,a)=>{const{asChild:r,...u}=o,i=r?xe:n;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(i,C({},u,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Rt(e,n){e&&we.flushSync(()=>e.dispatchEvent(n))}function At(e,n=globalThis==null?void 0:globalThis.document){const t=B(e);c.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const be="dismissableLayer.update",Tt="dismissableLayer.pointerDownOutside",Dt="dismissableLayer.focusOutside";let Oe;const It=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mt=c.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:u,onInteractOutside:i,onDismiss:l,...p}=e,f=c.useContext(It),[d,m]=c.useState(null),v=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=c.useState({}),s=H(n,w=>m(w)),h=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=h.indexOf(b),y=d?h.indexOf(d):-1,$=f.layersWithOutsidePointerEventsDisabled.size>0,x=y>=S,j=Lt(w=>{const R=w.target,X=[...f.branches].some(A=>A.contains(R));!x||X||(r==null||r(w),i==null||i(w),w.defaultPrevented||l==null||l())},v),P=jt(w=>{const R=w.target;[...f.branches].some(A=>A.contains(R))||(u==null||u(w),i==null||i(w),w.defaultPrevented||l==null||l())},v);return At(w=>{y===f.layers.size-1&&(a==null||a(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},v),c.useEffect(()=>{if(d)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Pe(),()=>{o&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Oe)}},[d,v,o,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Pe())},[d,f]),c.useEffect(()=>{const w=()=>E({});return document.addEventListener(be,w),()=>document.removeEventListener(be,w)},[]),c.createElement(L.div,C({},p,{ref:s,style:{pointerEvents:$?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,j.onPointerDownCapture)}))});function Lt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=c.useRef(!1),a=c.useRef(()=>{});return c.useEffect(()=>{const r=i=>{if(i.target&&!o.current){let p=function(){He(Tt,t,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=p,n.addEventListener("click",a.current,{once:!0})):p()}else n.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function jt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=c.useRef(!1);return c.useEffect(()=>{const a=r=>{r.target&&!o.current&&He(Dt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function He(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Rt(a,r):a.dispatchEvent(r)}const de="focusScope.autoFocusOnMount",pe="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},kt=c.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...u}=e,[i,l]=c.useState(null),p=B(a),f=B(r),d=c.useRef(null),m=H(n,s=>l(s)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let s=function(y){if(v.paused||!i)return;const $=y.target;i.contains($)?d.current=$:I(d.current,{select:!0})},h=function(y){if(v.paused||!i)return;const $=y.relatedTarget;$!==null&&(i.contains($)||I(d.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const x of y)x.removedNodes.length>0&&I(i)};document.addEventListener("focusin",s),document.addEventListener("focusout",h);const S=new MutationObserver(b);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",h),S.disconnect()}}},[o,i,v.paused]),c.useEffect(()=>{if(i){Ae.add(v);const s=document.activeElement;if(!i.contains(s)){const b=new CustomEvent(de,Ne);i.addEventListener(de,p),i.dispatchEvent(b),b.defaultPrevented||(Ft(Vt(Ge(i)),{select:!0}),document.activeElement===s&&I(i))}return()=>{i.removeEventListener(de,p),setTimeout(()=>{const b=new CustomEvent(pe,Ne);i.addEventListener(pe,f),i.dispatchEvent(b),b.defaultPrevented||I(s??document.body,{select:!0}),i.removeEventListener(pe,f),Ae.remove(v)},0)}}},[i,p,f,v]);const E=c.useCallback(s=>{if(!t&&!o||v.paused)return;const h=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(h&&b){const S=s.currentTarget,[y,$]=Bt(S);y&&$?!s.shiftKey&&b===$?(s.preventDefault(),t&&I(y,{select:!0})):s.shiftKey&&b===y&&(s.preventDefault(),t&&I($,{select:!0})):b===S&&s.preventDefault()}},[t,o,v.paused]);return c.createElement(L.div,C({tabIndex:-1},u,{ref:m,onKeyDown:E}))});function Ft(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(I(o,{select:n}),document.activeElement!==t)return}function Bt(e){const n=Ge(e),t=Re(n,e),o=Re(n.reverse(),e);return[t,o]}function Ge(e){const n=[],t=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(;t.nextNode();)n.push(t.currentNode);return n}function Re(e,n){for(const t of e)if(!qt(t,{upTo:n}))return t}function qt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wt(e){return e instanceof HTMLInputElement&&"select"in e}function I(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Wt(e)&&n&&e.select()}}const Ae=Ut();function Ut(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Te(e,n),e.unshift(n)},remove(n){var t;e=Te(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Te(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Vt(e){return e.filter(n=>n.tagName!=="A")}const Ht=c.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?we.createPortal(c.createElement(L.div,C({},a,{ref:n})),o):null});function Gt(e,n){return c.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ie=e=>{const{present:n,children:t}=e,o=zt(n),a=typeof t=="function"?t({present:o.isPresent}):c.Children.only(t),r=H(o.ref,a.ref);return typeof t=="function"||o.isPresent?c.cloneElement(a,{ref:r}):null};ie.displayName="Presence";function zt(e){const[n,t]=c.useState(),o=c.useRef({}),a=c.useRef(e),r=c.useRef("none"),u=e?"mounted":"unmounted",[i,l]=Gt(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const p=Y(o.current);r.current=i==="mounted"?p:"none"},[i]),ge(()=>{const p=o.current,f=a.current;if(f!==e){const m=r.current,v=Y(p);e?l("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),ge(()=>{if(n){const p=d=>{const v=Y(o.current).includes(d.animationName);d.target===n&&v&&we.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===n&&(r.current=Y(o.current))};return n.addEventListener("animationstart",f),n.addEventListener("animationcancel",p),n.addEventListener("animationend",p),()=>{n.removeEventListener("animationstart",f),n.removeEventListener("animationcancel",p),n.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(p=>{p&&(o.current=getComputedStyle(p)),t(p)},[])}}function Y(e){return(e==null?void 0:e.animationName)||"none"}let fe=0;function Kt(){c.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:De()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:De()),fe++,()=>{fe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),fe--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function ze(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Xt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var ae="right-scroll-bar-position",ue="width-before-scroll-bar",Yt="with-scroll-bars-hidden",Zt="--removed-body-scroll-bar-size";function Qt(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Jt(e,n){var t=c.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function en(e,n){return Jt(null,function(t){return e.forEach(function(o){return Qt(o,t)})})}function tn(e){return e}function nn(e,n){n===void 0&&(n=tn);var t=[],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 t.length?t[t.length-1]:e},useMedium:function(r){var u=n(r,o);return t.push(u),function(){t=t.filter(function(i){return i!==u})}},assignSyncMedium:function(r){for(o=!0;t.length;){var u=t;t=[],u.forEach(r)}t={push:function(i){return r(i)},filter:function(){return t}}},assignMedium:function(r){o=!0;var u=[];if(t.length){var i=t;t=[],i.forEach(r),u=t}var l=function(){var f=u;u=[],f.forEach(r)},p=function(){return Promise.resolve().then(l)};p(),t={push:function(f){u.push(f),p()},filter:function(f){return u=u.filter(f),t}}}};return a}function rn(e){e===void 0&&(e={});var n=nn(null);return n.options=D({async:!0,ssr:!1},e),n}var Ke=function(e){var n=e.sideCar,t=ze(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return _.createElement(o,D({},t))};Ke.isSideCarExport=!0;function on(e,n){return e.useMedium(n),Ke}var Xe=rn(),ve=function(){},ce=_.forwardRef(function(e,n){var t=_.useRef(null),o=_.useState({onScrollCapture:ve,onWheelCapture:ve,onTouchMoveCapture:ve}),a=o[0],r=o[1],u=e.forwardProps,i=e.children,l=e.className,p=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,h=e.as,b=h===void 0?"div":h,S=ze(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=m,$=en([t,n]),x=D(D({},S),a);return _.createElement(_.Fragment,null,f&&_.createElement(y,{sideCar:Xe,removeScrollBar:p,shards:d,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),u?_.cloneElement(_.Children.only(i),D(D({},x),{ref:$})):_.createElement(b,D({},x,{className:l,ref:$}),i))});ce.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ce.classNames={fullWidth:ue,zeroRight:ae};var an=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=an();return n&&e.setAttribute("nonce",n),e}function cn(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sn(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var ln=function(){var e=0,n=null;return{add:function(t){e==0&&(n=un())&&(cn(n,t),sn(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},dn=function(){var e=ln();return function(n,t){_.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Ye=function(){var e=dn(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},pn={left:0,top:0,right:0,gap:0},he=function(e){return parseInt(e||"",10)||0},fn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[he(t),he(o),he(a)]},vn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pn;var n=fn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},hn=Ye(),mn=function(e,n,t,o){var a=e.left,r=e.top,u=e.right,i=e.gap;return t===void 0&&(t="margin"),`
2
2
  .`.concat(Yt,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
@@ -35,22 +35,22 @@
35
35
  body {
36
36
  `).concat(Zt,": ").concat(i,`px;
37
37
  }
38
- `)},gn=function(e){var n=e.noRelative,t=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,r=_.useMemo(function(){return vn(a)},[a]);return _.createElement(mn,{styles:hn(r,!n,a,t?"":"!important")})},ye=!1;if(typeof window<"u")try{var Z=Object.defineProperty({},"passive",{get:function(){return ye=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch{ye=!1}var W=ye?{passive:!1}:!1,_n=function(e){return e.tagName==="TEXTAREA"},Ze=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!_n(e)&&t[n]==="visible")},bn=function(e){return Ze(e,"overflowY")},yn=function(e){return Ze(e,"overflowX")},Ie=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Qe(e,t);if(o){var a=Je(e,t),r=a[1],u=a[2];if(r>u)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},$n=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},En=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Qe=function(e,n){return e==="v"?bn(n):yn(n)},Je=function(e,n){return e==="v"?$n(n):En(n)},wn=function(e,n){return e==="h"&&n==="rtl"?-1:1},xn=function(e,n,t,o,a){var r=wn(e,window.getComputedStyle(n).direction),u=r*o,i=t.target,l=n.contains(i),p=!1,f=u>0,d=0,h=0;do{var v=Je(e,i),E=v[0],s=v[1],m=v[2],b=s-m-r*E;(E||b)&&Qe(e,i)&&(d+=b,h+=E),i=i.parentNode}while(!l&&i!==document.body||l&&(n.contains(i)||n===i));return(f&&(d===0||!a)||!f&&(h===0||!a))&&(p=!0),p},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Me=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},Sn=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Cn=function(e){return`
38
+ `)},gn=function(e){var n=e.noRelative,t=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,r=_.useMemo(function(){return vn(a)},[a]);return _.createElement(hn,{styles:mn(r,!n,a,t?"":"!important")})},ye=!1;if(typeof window<"u")try{var Z=Object.defineProperty({},"passive",{get:function(){return ye=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch{ye=!1}var q=ye?{passive:!1}:!1,_n=function(e){return e.tagName==="TEXTAREA"},Ze=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!_n(e)&&t[n]==="visible")},bn=function(e){return Ze(e,"overflowY")},yn=function(e){return Ze(e,"overflowX")},Ie=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Qe(e,t);if(o){var a=Je(e,t),r=a[1],u=a[2];if(r>u)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},$n=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},En=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Qe=function(e,n){return e==="v"?bn(n):yn(n)},Je=function(e,n){return e==="v"?$n(n):En(n)},wn=function(e,n){return e==="h"&&n==="rtl"?-1:1},xn=function(e,n,t,o,a){var r=wn(e,window.getComputedStyle(n).direction),u=r*o,i=t.target,l=n.contains(i),p=!1,f=u>0,d=0,m=0;do{var v=Je(e,i),E=v[0],s=v[1],h=v[2],b=s-h-r*E;(E||b)&&Qe(e,i)&&(d+=b,m+=E),i=i.parentNode}while(!l&&i!==document.body||l&&(n.contains(i)||n===i));return(f&&(d===0||!a)||!f&&(m===0||!a))&&(p=!0),p},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Me=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},Sn=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Cn=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},On=0,U=[];function Pn(e){var n=_.useRef([]),t=_.useRef([0,0]),o=_.useRef(),a=_.useState(On++)[0],r=_.useState(function(){return Ye()})[0],u=_.useRef(e);_.useEffect(function(){u.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var s=Xt([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),s.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=_.useCallback(function(s,m){if("touches"in s&&s.touches.length===2)return!u.current.allowPinchZoom;var b=Q(s),S=t.current,y="deltaX"in s?s.deltaX:S[0]-b[0],$="deltaY"in s?s.deltaY:S[1]-b[1],x,j=s.target,P=Math.abs(y)>Math.abs($)?"h":"v";if("touches"in s&&P==="h"&&j.type==="range")return!1;var w=Ie(P,j);if(!w)return!0;if(w?x=P:(x=P==="v"?"h":"v",w=Ie(P,j)),!w)return!1;if(!o.current&&"changedTouches"in s&&(y||$)&&(o.current=x),!x)return!0;var R=o.current||x;return xn(R,m,s,R==="h"?y:$,!0)},[]),l=_.useCallback(function(s){var m=s;if(!(!U.length||U[U.length-1]!==r)){var b="deltaY"in m?Me(m):Q(m),S=n.current.filter(function(x){return x.name===m.type&&x.target===m.target&&Sn(x.delta,b)})[0];if(S&&S.should){m.cancelable&&m.preventDefault();return}if(!S){var y=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(x){return x.contains(m.target)}),$=y.length>0?i(m,y[0]):!u.current.noIsolation;$&&m.cancelable&&m.preventDefault()}}},[]),p=_.useCallback(function(s,m,b,S){var y={name:s,delta:m,target:b,should:S};n.current.push(y),setTimeout(function(){n.current=n.current.filter(function($){return $!==y})},1)},[]),f=_.useCallback(function(s){t.current=Q(s),o.current=void 0},[]),d=_.useCallback(function(s){p(s.type,Me(s),s.target,i(s,e.lockRef.current))},[]),h=_.useCallback(function(s){p(s.type,Q(s),s.target,i(s,e.lockRef.current))},[]);_.useEffect(function(){return U.push(r),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,W),document.addEventListener("touchmove",l,W),document.addEventListener("touchstart",f,W),function(){U=U.filter(function(s){return s!==r}),document.removeEventListener("wheel",l,W),document.removeEventListener("touchmove",l,W),document.removeEventListener("touchstart",f,W)}},[]);var v=e.removeScrollBar,E=e.inert;return _.createElement(_.Fragment,null,E?_.createElement(r,{styles:Cn(a)}):null,v?_.createElement(gn,{gapMode:"margin"}):null)}const Nn=on(Xe,Pn);var et=_.forwardRef(function(e,n){return _.createElement(ce,D({},e,{ref:n,sideCar:Nn}))});et.classNames=ce.classNames;var Rn=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},q=new WeakMap,J=new WeakMap,ee={},he=0,tt=function(e){return e&&(e.host||tt(e.parentNode))},An=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=tt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Tn=function(e,n,t,o){var a=An(n,Array.isArray(e)?e:[e]);ee[t]||(ee[t]=new WeakMap);var r=ee[t],u=[],i=new Set,l=new Set(a),p=function(d){!d||i.has(d)||(i.add(d),p(d.parentNode))};a.forEach(p);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))f(h);else{var v=h.getAttribute(o),E=v!==null&&v!=="false",s=(q.get(h)||0)+1,m=(r.get(h)||0)+1;q.set(h,s),r.set(h,m),u.push(h),s===1&&E&&J.set(h,!0),m===1&&h.setAttribute(t,"true"),E||h.setAttribute(o,"true")}})};return f(n),i.clear(),he++,function(){u.forEach(function(d){var h=q.get(d)-1,v=r.get(d)-1;q.set(d,h),r.set(d,v),h||(J.has(d)||d.removeAttribute(o),J.delete(d)),v||d.removeAttribute(t)}),he--,he||(q=new WeakMap,q=new WeakMap,J=new WeakMap,ee={})}},Dn=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=Rn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),Tn(o,a,t,"aria-hidden")):function(){return null}};const nt="Dialog",[rt,to]=yt(nt),[In,T]=rt(nt),Mn=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:r,modal:u=!0}=e,i=c.useRef(null),l=c.useRef(null),[p=!1,f]=xt({prop:o,defaultProp:a,onChange:r});return c.createElement(In,{scope:n,triggerRef:i,contentRef:l,contentId:le(),titleId:le(),descriptionId:le(),open:p,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:u},t)},Ln="DialogTrigger",jn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Ln,t),r=V(n,a.triggerRef);return c.createElement(L.button,C({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open)},o,{ref:r,onClick:M(e.onClick,a.onOpenToggle)}))}),ot="DialogPortal",[Fn,at]=rt(ot,{forceMount:void 0}),kn=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,r=T(ot,n);return c.createElement(Fn,{scope:n,forceMount:t},c.Children.map(o,u=>c.createElement(ie,{present:t||r.open},c.createElement(Vt,{asChild:!0,container:a},u))))},$e="DialogOverlay",Bn=c.forwardRef((e,n)=>{const t=at($e,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T($e,e.__scopeDialog);return r.modal?c.createElement(ie,{present:o||r.open},c.createElement(Wn,C({},a,{ref:n}))):null}),Wn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T($e,t);return c.createElement(et,{as:xe,allowPinchZoom:!0,shards:[a.contentRef]},c.createElement(L.div,C({"data-state":Se(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),K="DialogContent",Un=c.forwardRef((e,n)=>{const t=at(K,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(K,e.__scopeDialog);return c.createElement(ie,{present:o||r.open},r.modal?c.createElement(qn,C({},a,{ref:n})):c.createElement(zn,C({},a,{ref:n})))}),qn=c.forwardRef((e,n)=>{const t=T(K,e.__scopeDialog),o=c.useRef(null),a=V(n,t.contentRef,o);return c.useEffect(()=>{const r=o.current;if(r)return Dn(r)},[]),c.createElement(ut,C({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,r=>{var u;r.preventDefault(),(u=t.triggerRef.current)===null||u===void 0||u.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,r=>{const u=r.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&r.preventDefault()}),onFocusOutside:M(e.onFocusOutside,r=>r.preventDefault())}))}),zn=c.forwardRef((e,n)=>{const t=T(K,e.__scopeDialog),o=c.useRef(!1),a=c.useRef(!1);return c.createElement(ut,C({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var u;if((u=e.onCloseAutoFocus)===null||u===void 0||u.call(e,r),!r.defaultPrevented){var i;o.current||(i=t.triggerRef.current)===null||i===void 0||i.focus(),r.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:r=>{var u,i;(u=e.onInteractOutside)===null||u===void 0||u.call(e,r),r.defaultPrevented||(o.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=r.target;((i=t.triggerRef.current)===null||i===void 0?void 0:i.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}}))}),ut=c.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:r,...u}=e,i=T(K,t),l=c.useRef(null),p=V(n,l);return Kt(),c.createElement(c.Fragment,null,c.createElement(Ft,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:r},c.createElement(Mt,C({role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open)},u,{ref:p,onDismiss:()=>i.onOpenChange(!1)}))),!1)}),Vn="DialogTitle",Hn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Vn,t);return c.createElement(L.h2,C({id:a.titleId},o,{ref:n}))}),Gn="DialogDescription",Kn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Gn,t);return c.createElement(L.p,C({id:a.descriptionId},o,{ref:n}))}),Xn="DialogClose",Yn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Xn,t);return c.createElement(L.button,C({type:"button"},o,{ref:n,onClick:M(e.onClick,()=>a.onOpenChange(!1))}))});function Se(e){return e?"open":"closed"}const Zn=Mn,Qn=jn,Jn=kn,er=Bn,tr=Un,nr=Hn,je=Kn,rr=Yn,Fe={SM:"sm",MD:"md",LG:"lg"};function or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}};/*!
41
+ `)},On=0,W=[];function Pn(e){var n=_.useRef([]),t=_.useRef([0,0]),o=_.useRef(),a=_.useState(On++)[0],r=_.useState(function(){return Ye()})[0],u=_.useRef(e);_.useEffect(function(){u.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var s=Xt([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=_.useCallback(function(s,h){if("touches"in s&&s.touches.length===2)return!u.current.allowPinchZoom;var b=Q(s),S=t.current,y="deltaX"in s?s.deltaX:S[0]-b[0],$="deltaY"in s?s.deltaY:S[1]-b[1],x,j=s.target,P=Math.abs(y)>Math.abs($)?"h":"v";if("touches"in s&&P==="h"&&j.type==="range")return!1;var w=Ie(P,j);if(!w)return!0;if(w?x=P:(x=P==="v"?"h":"v",w=Ie(P,j)),!w)return!1;if(!o.current&&"changedTouches"in s&&(y||$)&&(o.current=x),!x)return!0;var R=o.current||x;return xn(R,h,s,R==="h"?y:$,!0)},[]),l=_.useCallback(function(s){var h=s;if(!(!W.length||W[W.length-1]!==r)){var b="deltaY"in h?Me(h):Q(h),S=n.current.filter(function(x){return x.name===h.type&&x.target===h.target&&Sn(x.delta,b)})[0];if(S&&S.should){h.cancelable&&h.preventDefault();return}if(!S){var y=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(x){return x.contains(h.target)}),$=y.length>0?i(h,y[0]):!u.current.noIsolation;$&&h.cancelable&&h.preventDefault()}}},[]),p=_.useCallback(function(s,h,b,S){var y={name:s,delta:h,target:b,should:S};n.current.push(y),setTimeout(function(){n.current=n.current.filter(function($){return $!==y})},1)},[]),f=_.useCallback(function(s){t.current=Q(s),o.current=void 0},[]),d=_.useCallback(function(s){p(s.type,Me(s),s.target,i(s,e.lockRef.current))},[]),m=_.useCallback(function(s){p(s.type,Q(s),s.target,i(s,e.lockRef.current))},[]);_.useEffect(function(){return W.push(r),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,q),document.addEventListener("touchmove",l,q),document.addEventListener("touchstart",f,q),function(){W=W.filter(function(s){return s!==r}),document.removeEventListener("wheel",l,q),document.removeEventListener("touchmove",l,q),document.removeEventListener("touchstart",f,q)}},[]);var v=e.removeScrollBar,E=e.inert;return _.createElement(_.Fragment,null,E?_.createElement(r,{styles:Cn(a)}):null,v?_.createElement(gn,{gapMode:"margin"}):null)}const Nn=on(Xe,Pn);var et=_.forwardRef(function(e,n){return _.createElement(ce,D({},e,{ref:n,sideCar:Nn}))});et.classNames=ce.classNames;var Rn=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},U=new WeakMap,J=new WeakMap,ee={},me=0,tt=function(e){return e&&(e.host||tt(e.parentNode))},An=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=tt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Tn=function(e,n,t,o){var a=An(n,Array.isArray(e)?e:[e]);ee[t]||(ee[t]=new WeakMap);var r=ee[t],u=[],i=new Set,l=new Set(a),p=function(d){!d||i.has(d)||(i.add(d),p(d.parentNode))};a.forEach(p);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))f(m);else{var v=m.getAttribute(o),E=v!==null&&v!=="false",s=(U.get(m)||0)+1,h=(r.get(m)||0)+1;U.set(m,s),r.set(m,h),u.push(m),s===1&&E&&J.set(m,!0),h===1&&m.setAttribute(t,"true"),E||m.setAttribute(o,"true")}})};return f(n),i.clear(),me++,function(){u.forEach(function(d){var m=U.get(d)-1,v=r.get(d)-1;U.set(d,m),r.set(d,v),m||(J.has(d)||d.removeAttribute(o),J.delete(d)),v||d.removeAttribute(t)}),me--,me||(U=new WeakMap,U=new WeakMap,J=new WeakMap,ee={})}},Dn=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=Rn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),Tn(o,a,t,"aria-hidden")):function(){return null}};const nt="Dialog",[rt,to]=yt(nt),[In,T]=rt(nt),Mn=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:r,modal:u=!0}=e,i=c.useRef(null),l=c.useRef(null),[p=!1,f]=xt({prop:o,defaultProp:a,onChange:r});return c.createElement(In,{scope:n,triggerRef:i,contentRef:l,contentId:le(),titleId:le(),descriptionId:le(),open:p,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:u},t)},Ln="DialogTrigger",jn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Ln,t),r=H(n,a.triggerRef);return c.createElement(L.button,C({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open)},o,{ref:r,onClick:M(e.onClick,a.onOpenToggle)}))}),ot="DialogPortal",[kn,at]=rt(ot,{forceMount:void 0}),Fn=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,r=T(ot,n);return c.createElement(kn,{scope:n,forceMount:t},c.Children.map(o,u=>c.createElement(ie,{present:t||r.open},c.createElement(Ht,{asChild:!0,container:a},u))))},$e="DialogOverlay",Bn=c.forwardRef((e,n)=>{const t=at($e,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T($e,e.__scopeDialog);return r.modal?c.createElement(ie,{present:o||r.open},c.createElement(qn,C({},a,{ref:n}))):null}),qn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T($e,t);return c.createElement(et,{as:xe,allowPinchZoom:!0,shards:[a.contentRef]},c.createElement(L.div,C({"data-state":Se(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),K="DialogContent",Wn=c.forwardRef((e,n)=>{const t=at(K,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(K,e.__scopeDialog);return c.createElement(ie,{present:o||r.open},r.modal?c.createElement(Un,C({},a,{ref:n})):c.createElement(Vn,C({},a,{ref:n})))}),Un=c.forwardRef((e,n)=>{const t=T(K,e.__scopeDialog),o=c.useRef(null),a=H(n,t.contentRef,o);return c.useEffect(()=>{const r=o.current;if(r)return Dn(r)},[]),c.createElement(ut,C({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,r=>{var u;r.preventDefault(),(u=t.triggerRef.current)===null||u===void 0||u.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,r=>{const u=r.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&r.preventDefault()}),onFocusOutside:M(e.onFocusOutside,r=>r.preventDefault())}))}),Vn=c.forwardRef((e,n)=>{const t=T(K,e.__scopeDialog),o=c.useRef(!1),a=c.useRef(!1);return c.createElement(ut,C({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var u;if((u=e.onCloseAutoFocus)===null||u===void 0||u.call(e,r),!r.defaultPrevented){var i;o.current||(i=t.triggerRef.current)===null||i===void 0||i.focus(),r.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:r=>{var u,i;(u=e.onInteractOutside)===null||u===void 0||u.call(e,r),r.defaultPrevented||(o.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=r.target;((i=t.triggerRef.current)===null||i===void 0?void 0:i.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}}))}),ut=c.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:r,...u}=e,i=T(K,t),l=c.useRef(null),p=H(n,l);return Kt(),c.createElement(c.Fragment,null,c.createElement(kt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:r},c.createElement(Mt,C({role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open)},u,{ref:p,onDismiss:()=>i.onOpenChange(!1)}))),!1)}),Hn="DialogTitle",Gn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Hn,t);return c.createElement(L.h2,C({id:a.titleId},o,{ref:n}))}),zn="DialogDescription",Kn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(zn,t);return c.createElement(L.p,C({id:a.descriptionId},o,{ref:n}))}),Xn="DialogClose",Yn=c.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Xn,t);return c.createElement(L.button,C({type:"button"},o,{ref:n,onClick:M(e.onClick,()=>a.onOpenChange(!1))}))});function Se(e){return e?"open":"closed"}const Zn=Mn,Qn=jn,Jn=Fn,er=Bn,tr=Wn,nr=Gn,je=Kn,rr=Yn,ke={SM:"sm",MD:"md",LG:"lg"};function or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}};/*!
42
42
  Copyright (c) 2018 Jed Watson.
43
43
  Licensed under the MIT License (MIT), see
44
44
  http://jedwatson.github.io/classnames
45
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(it);var ar=it.exports;const ke=or(ar),ur="_rotate_7s2g1_1",ir="_dash_7s2g1_1",te={"purpur-spinner":"_purpur-spinner_7s2g1_1",rotate:ur,"purpur-spinner--xxs":"_purpur-spinner--xxs_7s2g1_4","purpur-spinner--xs":"_purpur-spinner--xs_7s2g1_8","purpur-spinner--sm":"_purpur-spinner--sm_7s2g1_12","purpur-spinner--md":"_purpur-spinner--md_7s2g1_16","purpur-spinner--lg":"_purpur-spinner--lg_7s2g1_20","purpur-spinner__circle":"_purpur-spinner__circle_7s2g1_24",dash:ir,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_7s2g1_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_7s2g1_36","purpur-spinner__circle--negative-disabled":"_purpur-spinner__circle--negative-disabled_7s2g1_39"},ne="purpur-spinner",cr={PRIMARY:"primary",DISABLED:"disabled",NEGATIVE:"negative",NEGATIVE_DISABLED:"negative-disabled"},sr={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},lr=({["data-testid"]:e,size:n=sr.SM,variant:t=cr.PRIMARY,...o})=>g.jsx("div",{className:ke([te[ne],te[`${ne}--${n}`]]),"data-testid":e,...o,children:g.jsx("svg",{viewBox:"0 0 50 50",children:g.jsx("circle",{className:ke(te[`${ne}__circle`],te[`${ne}__circle--${t}`]),cx:"25",cy:"25",r:"20"})})});function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}};/*!
45
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(it);var ar=it.exports;const Fe=or(ar),ur="_rotate_7s2g1_1",ir="_dash_7s2g1_1",te={"purpur-spinner":"_purpur-spinner_7s2g1_1",rotate:ur,"purpur-spinner--xxs":"_purpur-spinner--xxs_7s2g1_4","purpur-spinner--xs":"_purpur-spinner--xs_7s2g1_8","purpur-spinner--sm":"_purpur-spinner--sm_7s2g1_12","purpur-spinner--md":"_purpur-spinner--md_7s2g1_16","purpur-spinner--lg":"_purpur-spinner--lg_7s2g1_20","purpur-spinner__circle":"_purpur-spinner__circle_7s2g1_24",dash:ir,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_7s2g1_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_7s2g1_36","purpur-spinner__circle--negative-disabled":"_purpur-spinner__circle--negative-disabled_7s2g1_39"},ne="purpur-spinner",cr={PRIMARY:"primary",DISABLED:"disabled",NEGATIVE:"negative",NEGATIVE_DISABLED:"negative-disabled"},sr={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},lr=({["data-testid"]:e,size:n=sr.SM,variant:t=cr.PRIMARY,...o})=>g.jsx("div",{className:Fe([te[ne],te[`${ne}--${n}`]]),"data-testid":e,...o,children:g.jsx("svg",{viewBox:"0 0 50 50",children:g.jsx("circle",{className:Fe(te[`${ne}__circle`],te[`${ne}__circle--${t}`]),cx:"25",cy:"25",r:"20"})})});function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}};/*!
46
46
  Copyright (c) 2018 Jed Watson.
47
47
  Licensed under the MIT License (MIT), see
48
48
  http://jedwatson.github.io/classnames
49
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ct);var pr=ct.exports;const fr=dr(pr),F={"purpur-button":"_purpur-button_1fna2_1","purpur-button--sm":"_purpur-button--sm_1fna2_33","purpur-button--icon-only":"_purpur-button--icon-only_1fna2_36","purpur-button--md":"_purpur-button--md_1fna2_39","purpur-button--lg":"_purpur-button--lg_1fna2_45","purpur-button--full-width":"_purpur-button--full-width_1fna2_51","purpur-button--primary":"_purpur-button--primary_1fna2_54","purpur-button--disabled":"_purpur-button--disabled_1fna2_58","purpur-button--primary-negative":"_purpur-button--primary-negative_1fna2_64","purpur-button--secondary":"_purpur-button--secondary_1fna2_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1fna2_87","purpur-button--expressive":"_purpur-button--expressive_1fna2_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1fna2_108","purpur-button--negative":"_purpur-button--negative_1fna2_120","purpur-button--destructive":"_purpur-button--destructive_1fna2_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1fna2_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1fna2_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1fna2_160","purpur-button--text-negative":"_purpur-button--text-negative_1fna2_175","purpur-button--text":"_purpur-button--text_1fna2_175"},k="purpur-button",vr=({children:e,className:n,["data-testid"]:t,disabled:o=!1,fullWidth:a=!1,iconOnly:r,loading:u=!1,onClick:i,size:l=Fe.MD,variant:p,type:f="button",...d},h)=>{if(r&&p==="destructive")return null;const v=fr([F[k],F[`${k}--${p}`],F[`${k}--${l}`]],{[F[`${k}--icon-only`]]:r,[F[`${k}--negative`]]:p.endsWith("negative"),[F[`${k}--full-width`]]:a,[F[`${k}--disabled`]]:o||u},n),E=m=>{o||u?m.preventDefault():i&&i(m)},s=()=>p.endsWith("negative")?"negative-disabled":"disabled";return g.jsxs("button",{className:v,"data-testid":t,type:f,ref:h,"aria-disabled":d["aria-disabled"]||o||u,onClick:E,...d,children:[u&&g.jsx(lr,{size:l===Fe.LG?"xs":"xxs",variant:s()})," ",e]})},Ce=c.forwardRef(vr);Ce.displayName="Button";function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
49
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ct);var pr=ct.exports;const fr=dr(pr),k={"purpur-button":"_purpur-button_u2yv5_1","purpur-button--sm":"_purpur-button--sm_u2yv5_33","purpur-button--icon-only":"_purpur-button--icon-only_u2yv5_36","purpur-button--md":"_purpur-button--md_u2yv5_39","purpur-button--lg":"_purpur-button--lg_u2yv5_45","purpur-button--full-width":"_purpur-button--full-width_u2yv5_51","purpur-button--primary":"_purpur-button--primary_u2yv5_54","purpur-button--disabled":"_purpur-button--disabled_u2yv5_58","purpur-button--primary-negative":"_purpur-button--primary-negative_u2yv5_64","purpur-button--secondary":"_purpur-button--secondary_u2yv5_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_u2yv5_87","purpur-button--expressive":"_purpur-button--expressive_u2yv5_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_u2yv5_108","purpur-button--negative":"_purpur-button--negative_u2yv5_120","purpur-button--destructive":"_purpur-button--destructive_u2yv5_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_u2yv5_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_u2yv5_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_u2yv5_160","purpur-button--text-negative":"_purpur-button--text-negative_u2yv5_175","purpur-button--text":"_purpur-button--text_u2yv5_175"},F="purpur-button",vr=({children:e,className:n,["data-testid"]:t,disabled:o=!1,fullWidth:a=!1,iconOnly:r,loading:u=!1,onClick:i,size:l=ke.MD,variant:p,type:f="button",...d},m)=>{if(r&&p==="destructive")return null;const v=fr([k[F],k[`${F}--${p}`],k[`${F}--${l}`]],{[k[`${F}--icon-only`]]:r,[k[`${F}--negative`]]:p.endsWith("negative"),[k[`${F}--full-width`]]:a,[k[`${F}--disabled`]]:o||u},n),E=h=>{o||u?h.preventDefault():i&&i(h)},s=()=>p.endsWith("negative")?"negative-disabled":"disabled";return g.jsxs("button",{className:v,"data-testid":t,type:f,ref:m,"aria-disabled":d["aria-disabled"]||o||u,onClick:E,...d,children:[u&&g.jsx(lr,{size:l===ke.LG?"xs":"xxs",variant:s()})," ",e]})},Ce=c.forwardRef(vr);Ce.displayName="Button";function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
50
50
  Copyright (c) 2018 Jed Watson.
51
51
  Licensed under the MIT License (MIT), see
52
52
  http://jedwatson.github.io/classnames
53
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(st);var hr=st.exports;const gr=mr(hr),re={"purpur-heading":"_purpur-heading_1g237_1","purpur-heading--hyphens":"_purpur-heading--hyphens_1g237_8","purpur-heading--negative":"_purpur-heading--negative_1g237_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_1g237_14","purpur-heading--title-100":"_purpur-heading--title-100_1g237_20","purpur-heading--title-200":"_purpur-heading--title-200_1g237_26","purpur-heading--title-300":"_purpur-heading--title-300_1g237_32","purpur-heading--title-400":"_purpur-heading--title-400_1g237_38","purpur-heading--title-500":"_purpur-heading--title-500_1g237_44","purpur-heading--title-600":"_purpur-heading--title-600_1g237_50","purpur-heading--title-700":"_purpur-heading--title-700_1g237_56","purpur-heading--display-25":"_purpur-heading--display-25_1g237_62","purpur-heading--display-50":"_purpur-heading--display-50_1g237_68","purpur-heading--display-100":"_purpur-heading--display-100_1g237_74","purpur-heading--display-200":"_purpur-heading--display-200_1g237_80"},_r={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},oe="purpur-heading",br=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:a=!1,tag:r,variant:u=_r.TITLE100,...i})=>{const l=r,p=gr([t,re[oe],re[`${oe}--${u}`],{[re[`${oe}--hyphens`]]:o,[re[`${oe}--negative`]]:a}]);return g.jsx(l,{...i,className:p,"data-testid":e,children:n})};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}};/*!
53
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(st);var mr=st.exports;const gr=hr(mr),re={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},_r={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},oe="purpur-heading",br=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:a=!1,tag:r,variant:u=_r.TITLE100,...i})=>{const l=r,p=gr([t,re[oe],re[`${oe}--${u}`],{[re[`${oe}--hyphens`]]:o,[re[`${oe}--negative`]]:a}]);return g.jsx(l,{...i,className:p,"data-testid":e,children:n})};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}};/*!
54
54
  Copyright (c) 2018 Jed Watson.
55
55
  Licensed under the MIT License (MIT), see
56
56
  http://jedwatson.github.io/classnames
@@ -58,9 +58,9 @@
58
58
  Copyright (c) 2018 Jed Watson.
59
59
  Licensed under the MIT License (MIT), see
60
60
  http://jedwatson.github.io/classnames
61
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(pt);var Tr=pt.exports;const Dr=Ar(Tr),H={"purpur-paragraph":"_purpur-paragraph_15yuz_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_15yuz_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_15yuz_10","purpur-paragraph--negative":"_purpur-paragraph--negative_15yuz_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_15yuz_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_15yuz_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_15yuz_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_15yuz_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_15yuz_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_15yuz_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_15yuz_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_15yuz_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_15yuz_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_15yuz_75"},Ir={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},G="purpur-paragraph",Mr=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:a=!1,negative:r=!1,variant:u=Ir.PARAGRAPH100,...i})=>{const l=Dr([t,H[G],H[`${G}--${u}`],{[H[`${G}--hyphens`]]:a,[H[`${G}--disabled`]]:o,[H[`${G}--negative`]]:r}]);return g.jsx("p",{...i,className:l,"data-testid":e,children:n})},Lr="600px";function z(){return z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},z.apply(this,arguments)}function jr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Fr(...e){return n=>e.forEach(t=>jr(t,n))}const ft=c.forwardRef((e,n)=>{const{children:t,...o}=e,a=c.Children.toArray(t),r=a.find(Br);if(r){const u=r.props.children,i=a.map(l=>l===r?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:l);return c.createElement(Ee,z({},o,{ref:n}),c.isValidElement(u)?c.cloneElement(u,void 0,i):null)}return c.createElement(Ee,z({},o,{ref:n}),t)});ft.displayName="Slot";const Ee=c.forwardRef((e,n)=>{const{children:t,...o}=e;return c.isValidElement(t)?c.cloneElement(t,{...Wr(o,t.props),ref:n?Fr(n,t.ref):t.ref}):c.Children.count(t)>1?c.Children.only(null):null});Ee.displayName="SlotClone";const kr=({children:e})=>c.createElement(c.Fragment,null,e);function Br(e){return c.isValidElement(e)&&e.type===kr}function Wr(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...u)=>{r(...u),a(...u)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],qr=Ur.reduce((e,n)=>{const t=c.forwardRef((o,a)=>{const{asChild:r,...u}=o,i=r?ft:n;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(i,z({},u,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),zr=c.forwardRef((e,n)=>c.createElement(qr.span,z({},e,{ref:n,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}}))),Vr=zr,Hr=({asChild:e,children:n,className:t="",["data-testid"]:o})=>g.jsx(Vr,{asChild:e,"data-testid":o,className:t,children:n});function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}};/*!
61
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o(i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(pt);var Tr=pt.exports;const Dr=Ar(Tr),G={"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"},Ir={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},z="purpur-paragraph",Mr=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:a=!1,negative:r=!1,variant:u=Ir.PARAGRAPH100,...i})=>{const l=Dr([t,G[z],G[`${z}--${u}`],{[G[`${z}--hyphens`]]:a,[G[`${z}--disabled`]]:o,[G[`${z}--negative`]]:r}]);return g.jsx("p",{...i,className:l,"data-testid":e,children:n})},Lr="600px";function V(){return V=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},V.apply(this,arguments)}function jr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function kr(...e){return n=>e.forEach(t=>jr(t,n))}const ft=c.forwardRef((e,n)=>{const{children:t,...o}=e,a=c.Children.toArray(t),r=a.find(Br);if(r){const u=r.props.children,i=a.map(l=>l===r?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:l);return c.createElement(Ee,V({},o,{ref:n}),c.isValidElement(u)?c.cloneElement(u,void 0,i):null)}return c.createElement(Ee,V({},o,{ref:n}),t)});ft.displayName="Slot";const Ee=c.forwardRef((e,n)=>{const{children:t,...o}=e;return c.isValidElement(t)?c.cloneElement(t,{...qr(o,t.props),ref:n?kr(n,t.ref):t.ref}):c.Children.count(t)>1?c.Children.only(null):null});Ee.displayName="SlotClone";const Fr=({children:e})=>c.createElement(c.Fragment,null,e);function Br(e){return c.isValidElement(e)&&e.type===Fr}function qr(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...u)=>{r(...u),a(...u)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Wr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ur=Wr.reduce((e,n)=>{const t=c.forwardRef((o,a)=>{const{asChild:r,...u}=o,i=r?ft:n;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(i,V({},u,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),Vr=c.forwardRef((e,n)=>c.createElement(Ur.span,V({},e,{ref:n,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}}))),Hr=Vr,Gr=({asChild:e,children:n,className:t="",["data-testid"]:o})=>g.jsx(Hr,{asChild:e,"data-testid":o,className:t,children:n});function zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}};/*!
62
62
  Copyright (c) 2018 Jed Watson.
63
63
  Licensed under the MIT License (MIT), see
64
64
  http://jedwatson.github.io/classnames
65
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,this&&this[i]||i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(vt);var Kr=vt.exports;const Xr=Gr(Kr),Yr="_fadeIn_1qmv6_1",Zr={"purpur-modal-content":"_purpur-modal-content_1qmv6_1",fadeIn:Yr,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1qmv6_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1qmv6_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1qmv6_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1qmv6_59","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1qmv6_68","purpur-modal-content__header":"_purpur-modal-content__header_1qmv6_91","purpur-modal-content__title":"_purpur-modal-content__title_1qmv6_104","purpur-modal-content__description":"_purpur-modal-content__description_1qmv6_107","purpur-modal-content__body":"_purpur-modal-content__body_1qmv6_110","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1qmv6_120","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_1qmv6_132","purpur-modal-content__actions-button":"_purpur-modal-content__actions-button_1qmv6_132","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1qmv6_155","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1qmv6_155","purpur-modal-content__actions":"_purpur-modal-content__actions_1qmv6_132","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_1qmv6_186","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1qmv6_196"},We=e=>e.showCloseButton===!0,N=Xr.bind(Zr),O="purpur-modal-content",Qr=c.forwardRef(({["data-testid"]:e,actions:n,children:t,className:o,description:a,disableCloseOnClickOutside:r,hideDescription:u,image:i,primaryActionVariant:l="primary",stickyButtons:p=!0,title:f,...d},h)=>{const{closeButtonAllyLabel:v,showCloseButton:E,...s}=d,[m,b]=c.useState(!1),S=c.useRef(null),y=c.useRef(null),$=c.useRef(null),x=c.useRef(null),j=N([O,{[`${O}--with-image`]:!!i},{[`${O}--overflow`]:m},{[`${O}--sticky-footer`]:p},o]),P=A=>e?`${e} ${A}`:void 0,w=A=>{r&&A.preventDefault()},R=c.useCallback(()=>{if(!S.current||!y.current||!$.current||!x.current)return;const A=window.innerWidth<parseInt(Lr),mt=window.getComputedStyle(A?S.current:$.current,null),ht=parseFloat(mt.getPropertyValue("height")),gt=A?y.current.offsetHeight:x.current.offsetHeight;b(ht<gt)},[]),X=A=>{r&&!E&&A.preventDefault()};return c.useEffect(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R]),g.jsxs(Jn,{children:[g.jsx(er,{className:N(`${O}__overlay`)}),g.jsxs(tr,{...s,className:j,"data-testid":e,ref:h,...!a&&{"aria-describedby":void 0},onPointerDownOutside:w,onOpenAutoFocus:R,onEscapeKeyDown:X,children:[g.jsxs("div",{ref:S,className:N(`${O}__wrapper`),children:[We(d)&&v&&i&&g.jsx(Ue,{allyLabel:v,hasImage:!0,"data-testid":P("close-button")}),g.jsxs("div",{ref:y,className:N(`${O}__wrapper-inner`),children:[g.jsxs("div",{className:N(`${O}__header`),children:[We(d)&&v&&!i&&g.jsx(Ue,{allyLabel:v,"data-testid":P("close-button")}),g.jsx(nr,{asChild:!0,className:N(`${O}__title`),"data-testid":P("title"),children:g.jsx(br,{tag:"h2",variant:"title-200",children:f})})]}),i&&g.jsx("div",{className:N(`${O}__image-wrapper`),"data-testid":P("image"),children:i}),g.jsx("div",{ref:$,className:N(`${O}__body`),children:g.jsxs("div",{ref:x,className:N(`${O}__body-inner`),children:[a&&u&&g.jsx(Hr,{asChild:!0,children:g.jsx(je,{"data-testid":P("description"),children:a})}),a&&!u&&g.jsx(je,{asChild:!0,className:N(`${O}__description`),"data-testid":P("description"),children:g.jsx(Mr,{variant:"paragraph-100",children:a})}),g.jsx("div",{children:t}),!p&&g.jsx(qe,{actions:n,primaryActionVariant:l})]})})]})]}),p&&g.jsx(qe,{actions:n,primaryActionVariant:l})]})]})}),Ue=({allyLabel:e,hasImage:n,["data-testid"]:t})=>g.jsx(rr,{asChild:!0,children:g.jsx(Ce,{variant:n?"primary-negative":"tertiary-purple",size:"sm",iconOnly:!0,"aria-label":e,className:N(`${O}__close-button`),"data-testid":t,children:g.jsx(dt,{})})}),Jr=3,qe=({actions:e,primaryActionVariant:n})=>{const t=[n,"secondary","text"];return e&&e.length>0?g.jsxs("div",{className:N(`${O}__actions`),children:[g.jsx("div",{className:N(`${O}__actions-buttons`),"data-testid":"modal actions",children:e.slice(0,Jr).map(({label:o,onClick:a},r)=>g.jsx(Ce,{"data-testid":"modal actions button",variant:t[r]||"",onClick:a,className:N(`${O}__actions-button`),children:o},o))}),g.jsx("span",{className:N(`${O}__actions-separator`)})]}):null},eo=c.forwardRef(({["data-testid"]:e,children:n,className:t,...o},a)=>g.jsx(Qn,{asChild:!0,ref:a,"data-testid":e,className:t,...o,children:n})),se=({["data-testid"]:e,children:n,open:t,onOpenChange:o})=>g.jsx(Zn,{open:t,onOpenChange:o,"data-testid":e,children:n});se.Trigger=eo;se.Content=Qr;se.displayName="Modal";exports.Modal=se;
65
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=a(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)n.call(r,i)&&r[i]&&(u=a(u,this&&this[i]||i));return u}function a(r,u){return u?r?r+" "+u:r+u:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(vt);var Kr=vt.exports;const Xr=zr(Kr),Yr="_fadeIn_1qmv6_1",Zr={"purpur-modal-content":"_purpur-modal-content_1qmv6_1",fadeIn:Yr,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1qmv6_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1qmv6_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1qmv6_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1qmv6_59","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1qmv6_68","purpur-modal-content__header":"_purpur-modal-content__header_1qmv6_91","purpur-modal-content__title":"_purpur-modal-content__title_1qmv6_104","purpur-modal-content__description":"_purpur-modal-content__description_1qmv6_107","purpur-modal-content__body":"_purpur-modal-content__body_1qmv6_110","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1qmv6_120","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_1qmv6_132","purpur-modal-content__actions-button":"_purpur-modal-content__actions-button_1qmv6_132","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1qmv6_155","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1qmv6_155","purpur-modal-content__actions":"_purpur-modal-content__actions_1qmv6_132","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_1qmv6_186","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1qmv6_196"},qe=e=>e.showCloseButton===!0,N=Xr.bind(Zr),O="purpur-modal-content",Qr=c.forwardRef(({["data-testid"]:e,actions:n,children:t,className:o,description:a,disableCloseOnClickOutside:r,hideDescription:u,image:i,primaryActionVariant:l="primary",stickyButtons:p=!0,title:f,...d},m)=>{const{closeButtonAllyLabel:v,showCloseButton:E,...s}=d,[h,b]=c.useState(!1),S=c.useRef(null),y=c.useRef(null),$=c.useRef(null),x=c.useRef(null),j=N([O,{[`${O}--with-image`]:!!i},{[`${O}--overflow`]:h},{[`${O}--sticky-footer`]:p},o]),P=A=>e?`${e} ${A}`:void 0,w=A=>{r&&A.preventDefault()},R=c.useCallback(()=>{if(!S.current||!y.current||!$.current||!x.current)return;const A=window.innerWidth<parseInt(Lr),ht=window.getComputedStyle(A?S.current:$.current,null),mt=parseFloat(ht.getPropertyValue("height")),gt=A?y.current.offsetHeight:x.current.offsetHeight;b(mt<gt)},[]),X=A=>{r&&!E&&A.preventDefault()};return c.useEffect(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R]),g.jsxs(Jn,{children:[g.jsx(er,{className:N(`${O}__overlay`)}),g.jsxs(tr,{...s,className:j,"data-testid":e,ref:m,...!a&&{"aria-describedby":void 0},onPointerDownOutside:w,onOpenAutoFocus:R,onEscapeKeyDown:X,children:[g.jsxs("div",{ref:S,className:N(`${O}__wrapper`),children:[qe(d)&&v&&i&&g.jsx(We,{allyLabel:v,hasImage:!0,"data-testid":P("close-button")}),g.jsxs("div",{ref:y,className:N(`${O}__wrapper-inner`),children:[g.jsxs("div",{className:N(`${O}__header`),children:[qe(d)&&v&&!i&&g.jsx(We,{allyLabel:v,"data-testid":P("close-button")}),g.jsx(nr,{asChild:!0,className:N(`${O}__title`),"data-testid":P("title"),children:g.jsx(br,{tag:"h2",variant:"title-200",children:f})})]}),i&&g.jsx("div",{className:N(`${O}__image-wrapper`),"data-testid":P("image"),children:i}),g.jsx("div",{ref:$,className:N(`${O}__body`),children:g.jsxs("div",{ref:x,className:N(`${O}__body-inner`),children:[a&&u&&g.jsx(Gr,{asChild:!0,children:g.jsx(je,{"data-testid":P("description"),children:a})}),a&&!u&&g.jsx(je,{asChild:!0,className:N(`${O}__description`),"data-testid":P("description"),children:g.jsx(Mr,{variant:"paragraph-100",children:a})}),g.jsx("div",{children:t}),!p&&g.jsx(Ue,{actions:n,primaryActionVariant:l})]})})]})]}),p&&g.jsx(Ue,{actions:n,primaryActionVariant:l})]})]})}),We=({allyLabel:e,hasImage:n,["data-testid"]:t})=>g.jsx(rr,{asChild:!0,children:g.jsx(Ce,{variant:n?"primary-negative":"tertiary-purple",size:"sm",iconOnly:!0,"aria-label":e,className:N(`${O}__close-button`),"data-testid":t,children:g.jsx(dt,{})})}),Jr=3,Ue=({actions:e,primaryActionVariant:n})=>{const t=[n,"secondary","text"];return e&&e.length>0?g.jsxs("div",{className:N(`${O}__actions`),children:[g.jsx("div",{className:N(`${O}__actions-buttons`),"data-testid":"modal actions",children:e.slice(0,Jr).map(({label:o,onClick:a},r)=>g.jsx(Ce,{"data-testid":"modal actions button",variant:t[r]||"",onClick:a,className:N(`${O}__actions-button`),children:o},o))}),g.jsx("span",{className:N(`${O}__actions-separator`)})]}):null},eo=c.forwardRef(({["data-testid"]:e,children:n,className:t,...o},a)=>g.jsx(Qn,{asChild:!0,ref:a,"data-testid":e,className:t,...o,children:n})),se=({["data-testid"]:e,children:n,open:t,onOpenChange:o})=>g.jsx(Zn,{open:t,onOpenChange:o,"data-testid":e,children:n});se.Trigger=eo;se.Content=Qr;se.displayName="Modal";exports.Modal=se;
66
66
  //# sourceMappingURL=modal.cjs.js.map