triangulo-digital-components
Version:
Triângulo Digital Components Library - Design System do Triângulo Digital
131 lines (121 loc) • 562 kB
JavaScript
(function(M,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("clsx"),require("tailwind-merge"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","clsx","tailwind-merge","react-dom"],w):(M=typeof globalThis<"u"?globalThis:M||self,w(M["triangulo-digital-components"]={},M.React,M.clsx,M.tailwindMerge,M.ReactDOM))})(this,(function(M,w,Yt,QE,Ho){"use strict";function sp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=sp(w),Vo=sp(Ho);function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Li={exports:{}},Or={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var lp;function eP(){if(lp)return Or;lp=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var i=null;if(a!==void 0&&(i=""+a),o.key!==void 0&&(i=""+o.key),"key"in o){a={};for(var s in o)s!=="key"&&(a[s]=o[s])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:a}}return Or.Fragment=t,Or.jsx=n,Or.jsxs=n,Or}var cp;function tP(){return cp||(cp=1,Li.exports=eP()),Li.exports}var f=tP();const up=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dp=Yt.clsx,_n=(e,t)=>n=>{var r;if(t?.variants==null)return dp(e,n?.class,n?.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const d=n?.[u],c=a?.[u];if(d===null)return null;const m=up(d)||up(c);return o[u][m]}),s=n&&Object.entries(n).reduce((u,d)=>{let[c,m]=d;return m===void 0||(u[c]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:m,...h}=d;return Object.entries(h).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...a,...s}[g]):{...a,...s}[g]===b})?[...u,c,m]:u},[]);return dp(e,i,l,n?.class,n?.className)};function T(...e){return QE.twMerge(Yt.clsx(e))}const nP=_n("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function rP({className:e,variant:t,...n}){return f.jsx("div",{"data-slot":"alert",role:"alert",className:T(nP({variant:t}),e),...n})}function oP({className:e,...t}){return f.jsx("div",{"data-slot":"alert-title",className:T("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function aP({className:e,...t}){return f.jsx("div",{"data-slot":"alert-description",className:T("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function iP(e,t){const n=p.createContext(t),r=a=>{const{children:i,...s}=a,l=p.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(a){const i=p.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ae(e,t=[]){let n=[];function r(a,i){const s=p.createContext(i),l=n.length;n=[...n,i];const u=c=>{const{scope:m,children:h,...v}=c,g=m?.[e]?.[l]||s,b=p.useMemo(()=>v,Object.values(v));return f.jsx(g.Provider,{value:b,children:h})};u.displayName=a+"Provider";function d(c,m){const h=m?.[e]?.[l]||s,v=p.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,d]}const o=()=>{const a=n.map(i=>p.createContext(i));return function(s){const l=s?.[e]||a;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,sP(o,...t)]}function sP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...s,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function fp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function It(...e){return t=>{let n=!1;const r=e.map(o=>{const a=fp(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():fp(e[o],null)}}}}function se(...e){return p.useCallback(It(...e),e)}function H(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Ie=globalThis?.document?p.useLayoutEffect:()=>{},lP=p[" useId ".trim().toString()]||(()=>{}),cP=0;function Oe(e){const[t,n]=p.useState(lP());return Ie(()=>{n(r=>r??String(cP++))},[e]),e||(t?`radix-${t}`:"")}var uP=p[" useInsertionEffect ".trim().toString()]||Ie;function ke({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=dP({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const c=d.current;c!==s&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,r])}const u=p.useCallback(d=>{if(s){const c=fP(d)?d(e):d;c!==e&&i.current?.(c)}else a(d)},[s,e,a,i]);return[l,u]}function dP({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),a=p.useRef(t);return uP(()=>{a.current=t},[t]),p.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function fP(e){return typeof e=="function"}function sn(e){const t=pP(e),n=p.forwardRef((r,o)=>{const{children:a,...i}=r,s=p.Children.toArray(a),l=s.find(mP);if(l){const u=l.props.children,d=s.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return f.jsx(t,{...i,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Xt=sn("Slot");function pP(e){const t=p.forwardRef((n,r)=>{const{children:o,...a}=n;if(p.isValidElement(o)){const i=gP(o),s=hP(a,o.props);return o.type!==p.Fragment&&(s.ref=r?It(r,i):i),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pp=Symbol("radix.slottable");function mp(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pp,t}function mP(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pp}function hP(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function gP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Z=vP.reduce((e,t)=>{const n=sn(`Primitive.${t}`),r=p.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Go(e,t){e&&Vo.flushSync(()=>e.dispatchEvent(t))}function Te(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function bP(e,t=globalThis?.document){const n=Te(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yP="DismissableLayer",Fi="dismissableLayer.update",wP="dismissableLayer.pointerDownOutside",xP="dismissableLayer.focusOutside",hp,gp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ln=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=p.useContext(gp),[d,c]=p.useState(null),m=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=se(t,_=>c(_)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),x=d?g.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,E=_P(_=>{const O=_.target,N=[...u.branches].some(R=>R.contains(O));!C||N||(o?.(_),i?.(_),_.defaultPrevented||s?.())},m),P=EP(_=>{const O=_.target;[...u.branches].some(R=>R.contains(O))||(a?.(_),i?.(_),_.defaultPrevented||s?.())},m);return bP(_=>{x===u.layers.size-1&&(r?.(_),!_.defaultPrevented&&s&&(_.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hp=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),vp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=hp)}},[d,m,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),vp())},[d,u]),p.useEffect(()=>{const _=()=>h({});return document.addEventListener(Fi,_),()=>document.removeEventListener(Fi,_)},[]),f.jsx(Z.div,{...l,ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,P.onFocusCapture),onBlurCapture:H(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,E.onPointerDownCapture)})});ln.displayName=yP;var SP="DismissableLayerBranch",CP=p.forwardRef((e,t)=>{const n=p.useContext(gp),r=p.useRef(null),o=se(t,r);return p.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Z.div,{...e,ref:o})});CP.displayName=SP;function _P(e,t=globalThis?.document){const n=Te(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){bp(wP,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function EP(e,t=globalThis?.document){const n=Te(e),r=p.useRef(!1);return p.useEffect(()=>{const o=a=>{a.target&&!r.current&&bp(xP,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vp(){const e=new CustomEvent(Fi);document.dispatchEvent(e)}function bp(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Go(o,a):o.dispatchEvent(a)}var Bi="focusScope.autoFocusOnMount",zi="focusScope.autoFocusOnUnmount",yp={bubbles:!1,cancelable:!0},PP="FocusScope",Nr=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=p.useState(null),u=Te(o),d=Te(a),c=p.useRef(null),m=se(t,g=>l(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(S){if(h.paused||!s)return;const C=S.target;s.contains(C)?c.current=C:cn(c.current,{select:!0})},b=function(S){if(h.paused||!s)return;const C=S.relatedTarget;C!==null&&(s.contains(C)||cn(c.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&cn(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){Sp.add(h);const g=document.activeElement;if(!s.contains(g)){const y=new CustomEvent(Bi,yp);s.addEventListener(Bi,u),s.dispatchEvent(y),y.defaultPrevented||(MP(AP(wp(s)),{select:!0}),document.activeElement===g&&cn(s))}return()=>{s.removeEventListener(Bi,u),setTimeout(()=>{const y=new CustomEvent(zi,yp);s.addEventListener(zi,d),s.dispatchEvent(y),y.defaultPrevented||cn(g??document.body,{select:!0}),s.removeEventListener(zi,d),Sp.remove(h)},0)}}},[s,u,d,h]);const v=p.useCallback(g=>{if(!n&&!r||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const x=g.currentTarget,[S,C]=TP(x);S&&C?!g.shiftKey&&y===C?(g.preventDefault(),n&&cn(S,{select:!0})):g.shiftKey&&y===S&&(g.preventDefault(),n&&cn(C,{select:!0})):y===x&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(Z.div,{tabIndex:-1,...i,ref:m,onKeyDown:v})});Nr.displayName=PP;function MP(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cn(r,{select:t}),document.activeElement!==n)return}function TP(e){const t=wp(e),n=xp(t,e),r=xp(t.reverse(),e);return[n,r]}function wp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xp(e,t){for(const n of e)if(!OP(n,{upTo:t}))return n}function OP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function NP(e){return e instanceof HTMLInputElement&&"select"in e}function cn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&NP(e)&&t&&e.select()}}var Sp=DP();function DP(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Cp(e,t),e.unshift(t)},remove(t){e=Cp(e,t),e[0]?.resume()}}}function Cp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AP(e){return e.filter(t=>t.tagName!=="A")}var IP="Portal",En=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=p.useState(!1);Ie(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ho.createPortal(f.jsx(Z.div,{...r,ref:t}),i):null});En.displayName=IP;function kP(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ne=e=>{const{present:t,children:n}=e,r=RP(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),a=se(r.ref,jP(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:a}):null};Ne.displayName="Presence";function RP(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[s,l]=kP(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Uo(r.current);a.current=s==="mounted"?u:"none"},[s]),Ie(()=>{const u=r.current,d=o.current;if(d!==e){const m=a.current,h=Uo(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ie(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=h=>{const g=Uo(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=h=>{h.target===t&&(a.current=Uo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Uo(e){return e?.animationName||"none"}function jP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qi=0;function Ko(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_p()),document.body.insertAdjacentElement("beforeend",e[1]??_p()),qi++,()=>{qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qi--}},[])}function _p(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var kt=function(){return kt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},kt.apply(this,arguments)};function Ep(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function $P(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Yo="right-scroll-bar-position",Xo="width-before-scroll-bar",LP="with-scroll-bars-hidden",FP="--removed-body-scroll-bar-size";function Wi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function BP(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var zP=typeof window<"u"?p.useLayoutEffect:p.useEffect,Pp=new WeakMap;function qP(e,t){var n=BP(null,function(r){return e.forEach(function(o){return Wi(o,r)})});return zP(function(){var r=Pp.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||Wi(s,null)}),a.forEach(function(s){o.has(s)||Wi(s,i)})}Pp.set(n,e)},[e]),n}function WP(e){return e}function HP(e,t){t===void 0&&(t=WP);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var l=function(){var d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function VP(e){e===void 0&&(e={});var t=HP(null);return t.options=kt({async:!0,ssr:!1},e),t}var Mp=function(e){var t=e.sideCar,n=Ep(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,kt({},n))};Mp.isSideCarExport=!0;function GP(e,t){return e.useMedium(t),Mp}var Tp=VP(),Hi=function(){},Zo=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Hi,onWheelCapture:Hi,onTouchMoveCapture:Hi}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,S=e.gapMode,C=Ep(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,P=qP([n,t]),_=kt(kt({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(E,{sideCar:Tp,removeScrollBar:u,shards:c,noRelative:h,noIsolation:v,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:S}),i?p.cloneElement(p.Children.only(s),kt(kt({},_),{ref:P})):p.createElement(x,kt({},_,{className:l,ref:P}),s))});Zo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zo.classNames={fullWidth:Xo,zeroRight:Yo};var UP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KP(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UP();return t&&e.setAttribute("nonce",t),e}function YP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function XP(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ZP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KP())&&(YP(t,n),XP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},JP=function(){var e=ZP();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Op=function(){var e=JP(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},QP={left:0,top:0,right:0,gap:0},Vi=function(e){return parseInt(e||"",10)||0},eM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vi(n),Vi(r),Vi(o)]},tM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return QP;var t=eM(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nM=Op(),Zn="data-scroll-locked",rM=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(LP,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body[`).concat(Zn,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(a,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Yo,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(Xo,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(Yo," .").concat(Yo,` {
right: 0 `).concat(r,`;
}
.`).concat(Xo," .").concat(Xo,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Zn,`] {
`).concat(FP,": ").concat(s,`px;
}
`)},Np=function(){var e=parseInt(document.body.getAttribute(Zn)||"0",10);return isFinite(e)?e:0},oM=function(){p.useEffect(function(){return document.body.setAttribute(Zn,(Np()+1).toString()),function(){var e=Np()-1;e<=0?document.body.removeAttribute(Zn):document.body.setAttribute(Zn,e.toString())}},[])},aM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;oM();var a=p.useMemo(function(){return tM(o)},[o]);return p.createElement(nM,{styles:rM(a,!t,o,n?"":"!important")})},Gi=!1;if(typeof window<"u")try{var Jo=Object.defineProperty({},"passive",{get:function(){return Gi=!0,!0}});window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo)}catch{Gi=!1}var Jn=Gi?{passive:!1}:!1,iM=function(e){return e.tagName==="TEXTAREA"},Dp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!iM(e)&&n[t]==="visible")},sM=function(e){return Dp(e,"overflowY")},lM=function(e){return Dp(e,"overflowX")},Ap=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ip(e,r);if(o){var a=kp(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cM=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uM=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ip=function(e,t){return e==="v"?sM(t):lM(t)},kp=function(e,t){return e==="v"?cM(t):uM(t)},dM=function(e,t){return e==="h"&&t==="rtl"?-1:1},fM=function(e,t,n,r,o){var a=dM(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),u=!1,d=i>0,c=0,m=0;do{if(!s)break;var h=kp(e,s),v=h[0],g=h[1],b=h[2],y=g-b-a*v;(v||y)&&Ip(e,s)&&(c+=y,m+=v);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&Math.abs(c)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Qo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rp=function(e){return[e.deltaX,e.deltaY]},jp=function(e){return e&&"current"in e?e.current:e},pM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mM=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},hM=0,Qn=[];function gM(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(hM++)[0],a=p.useState(Op)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=$P([e.lockRef.current],(e.shards||[]).map(jp),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Qo(g),x=n.current,S="deltaX"in g?g.deltaX:x[0]-y[0],C="deltaY"in g?g.deltaY:x[1]-y[1],E,P=g.target,_=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in g&&_==="h"&&P.type==="range")return!1;var O=Ap(_,P);if(!O)return!0;if(O?E=_:(E=_==="v"?"h":"v",O=Ap(_,P)),!O)return!1;if(!r.current&&"changedTouches"in g&&(S||C)&&(r.current=E),!E)return!0;var N=r.current||E;return fM(N,b,g,N==="h"?S:C)},[]),l=p.useCallback(function(g){var b=g;if(!(!Qn.length||Qn[Qn.length-1]!==a)){var y="deltaY"in b?Rp(b):Qo(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&pM(E.delta,y)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(i.current.shards||[]).map(jp).filter(Boolean).filter(function(E){return E.contains(b.target)}),C=S.length>0?s(b,S[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(g,b,y,x){var S={name:g,delta:b,target:y,should:x,shadowParent:vM(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),d=p.useCallback(function(g){n.current=Qo(g),r.current=void 0},[]),c=p.useCallback(function(g){u(g.type,Rp(g),g.target,s(g,e.lockRef.current))},[]),m=p.useCallback(function(g){u(g.type,Qo(g),g.target,s(g,e.lockRef.current))},[]);p.useEffect(function(){return Qn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Jn),document.addEventListener("touchmove",l,Jn),document.addEventListener("touchstart",d,Jn),function(){Qn=Qn.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,Jn),document.removeEventListener("touchmove",l,Jn),document.removeEventListener("touchstart",d,Jn)}},[]);var h=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(a,{styles:mM(o)}):null,h?p.createElement(aM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bM=GP(Tp,gM);var Dr=p.forwardRef(function(e,t){return p.createElement(Zo,kt({},e,{ref:t,sideCar:bM}))});Dr.classNames=Zo.classNames;var yM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},er=new WeakMap,ea=new WeakMap,ta={},Ui=0,$p=function(e){return e&&(e.host||$p(e.parentNode))},wM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$p(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xM=function(e,t,n,r){var o=wM(t,Array.isArray(e)?e:[e]);ta[n]||(ta[n]=new WeakMap);var a=ta[n],i=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(m){if(s.has(m))d(m);else try{var h=m.getAttribute(r),v=h!==null&&h!=="false",g=(er.get(m)||0)+1,b=(a.get(m)||0)+1;er.set(m,g),a.set(m,b),i.push(m),g===1&&v&&ea.set(m,!0),b===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return d(t),s.clear(),Ui++,function(){i.forEach(function(c){var m=er.get(c)-1,h=a.get(c)-1;er.set(c,m),a.set(c,h),m||(ea.has(c)||c.removeAttribute(r),ea.delete(c)),h||c.removeAttribute(n)}),Ui--,Ui||(er=new WeakMap,er=new WeakMap,ea=new WeakMap,ta={})}},na=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yM(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),xM(r,o,n,"aria-hidden")):function(){return null}},ra="Dialog",[Lp,Fp]=Ae(ra),[SM,wt]=Lp(ra),Bp=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=p.useRef(null),l=p.useRef(null),[u,d]=ke({prop:r,defaultProp:o??!1,onChange:a,caller:ra});return f.jsx(SM,{scope:t,triggerRef:s,contentRef:l,contentId:Oe(),titleId:Oe(),descriptionId:Oe(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(c=>!c),[d]),modal:i,children:n})};Bp.displayName=ra;var zp="DialogTrigger",qp=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wt(zp,n),a=se(t,o.triggerRef);return f.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xi(o.open),...r,ref:a,onClick:H(e.onClick,o.onOpenToggle)})});qp.displayName=zp;var Ki="DialogPortal",[CM,Wp]=Lp(Ki,{forceMount:void 0}),Hp=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=wt(Ki,t);return f.jsx(CM,{scope:t,forceMount:n,children:p.Children.map(r,i=>f.jsx(Ne,{present:n||a.open,children:f.jsx(En,{asChild:!0,container:o,children:i})}))})};Hp.displayName=Ki;var oa="DialogOverlay",Vp=p.forwardRef((e,t)=>{const n=Wp(oa,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=wt(oa,e.__scopeDialog);return a.modal?f.jsx(Ne,{present:r||a.open,children:f.jsx(EM,{...o,ref:t})}):null});Vp.displayName=oa;var _M=sn("DialogOverlay.RemoveScroll"),EM=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wt(oa,n);return f.jsx(Dr,{as:_M,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(Z.div,{"data-state":Xi(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pn="DialogContent",Gp=p.forwardRef((e,t)=>{const n=Wp(Pn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=wt(Pn,e.__scopeDialog);return f.jsx(Ne,{present:r||a.open,children:a.modal?f.jsx(PM,{...o,ref:t}):f.jsx(MM,{...o,ref:t})})});Gp.displayName=Pn;var PM=p.forwardRef((e,t)=>{const n=wt(Pn,e.__scopeDialog),r=p.useRef(null),o=se(t,n.contentRef,r);return p.useEffect(()=>{const a=r.current;if(a)return na(a)},[]),f.jsx(Up,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault())})}),MM=p.forwardRef((e,t)=>{const n=wt(Pn,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return f.jsx(Up,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Up=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=wt(Pn,n),l=p.useRef(null),u=se(t,l);return Ko(),f.jsxs(f.Fragment,{children:[f.jsx(Nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(ln,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Xi(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(OM,{titleId:s.titleId}),f.jsx(DM,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Yi="DialogTitle",Kp=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wt(Yi,n);return f.jsx(Z.h2,{id:o.titleId,...r,ref:t})});Kp.displayName=Yi;var Yp="DialogDescription",Xp=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wt(Yp,n);return f.jsx(Z.p,{id:o.descriptionId,...r,ref:t})});Xp.displayName=Yp;var Zp="DialogClose",Jp=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wt(Zp,n);return f.jsx(Z.button,{type:"button",...r,ref:t,onClick:H(e.onClick,()=>o.onOpenChange(!1))})});Jp.displayName=Zp;function Xi(e){return e?"open":"closed"}var Qp="DialogTitleWarning",[TM,em]=iP(Qp,{contentName:Pn,titleName:Yi,docsSlug:"dialog"}),OM=({titleId:e})=>{const t=em(Qp),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},NM="DialogDescriptionWarning",DM=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${em(NM).contentName}}.`;return p.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ar=Bp,aa=qp,Ir=Hp,kr=Vp,Rr=Gp,ia=Kp,sa=Xp,Mn=Jp,tm="AlertDialog",[AM,i3]=Ae(tm,[Fp]),Zt=Fp(),nm=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zt(t);return f.jsx(Ar,{...r,...n,modal:!0})};nm.displayName=tm;var IM="AlertDialogTrigger",rm=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return f.jsx(aa,{...o,...r,ref:t})});rm.displayName=IM;var kM="AlertDialogPortal",om=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zt(t);return f.jsx(Ir,{...r,...n})};om.displayName=kM;var RM="AlertDialogOverlay",am=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return f.jsx(kr,{...o,...r,ref:t})});am.displayName=RM;var tr="AlertDialogContent",[jM,$M]=AM(tr),LM=mp("AlertDialogContent"),im=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=Zt(n),i=p.useRef(null),s=se(t,i),l=p.useRef(null);return f.jsx(TM,{contentName:tr,titleName:sm,docsSlug:"alert-dialog",children:f.jsx(jM,{scope:n,cancelRef:l,children:f.jsxs(Rr,{role:"alertdialog",...a,...o,ref:s,onOpenAutoFocus:H(o.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[f.jsx(LM,{children:r}),f.jsx(BM,{contentRef:i})]})})})});im.displayName=tr;var sm="AlertDialogTitle",lm=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return f.jsx(ia,{...o,...r,ref:t})});lm.displayName=sm;var cm="AlertDialogDescription",um=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return f.jsx(sa,{...o,...r,ref:t})});um.displayName=cm;var FM="AlertDialogAction",dm=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return f.jsx(Mn,{...o,...r,ref:t})});dm.displayName=FM;var fm="AlertDialogCancel",pm=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=$M(fm,n),a=Zt(n),i=se(t,o);return f.jsx(Mn,{...a,...r,ref:i})});pm.displayName=fm;var BM=({contentRef:e})=>{const t=`\`${tr}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${tr}\` by passing a \`${cm}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${tr}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},zM=nm,qM=rm,WM=om,HM=am,VM=im,GM=dm,UM=pm,KM=lm,YM=um;const Tn=_n("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 dark:hover:bg-primary/80",destructive:"bg-destructive text-white hover:bg-destructive/90 dark:bg-destructive/60 dark:hover:bg-destructive/70 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-secondary/60 dark:hover:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function jr({className:e,variant:t,size:n,asChild:r=!1,...o}){const a=r?Xt:"button";return f.jsx(a,{"data-slot":"button",className:T(Tn({variant:t,size:n,className:e})),...o})}function XM({...e}){return f.jsx(zM,{"data-slot":"alert-dialog",...e})}function ZM({...e}){return f.jsx(qM,{"data-slot":"alert-dialog-trigger",...e})}function mm({...e}){return f.jsx(WM,{"data-slot":"alert-dialog-portal",...e})}function hm({className:e,...t}){return f.jsx(HM,{"data-slot":"alert-dialog-overlay",className:T("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function JM({className:e,...t}){return f.jsxs(mm,{children:[f.jsx(hm,{}),f.jsx(VM,{"data-slot":"alert-dialog-content",className:T("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function QM({className:e,...t}){return f.jsx("div",{"data-slot":"alert-dialog-header",className:T("flex flex-col gap-2 text-center sm:text-left",e),...t})}function e1({className:e,...t}){return f.jsx("div",{"data-slot":"alert-dialog-footer",className:T("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function t1({className:e,...t}){return f.jsx(KM,{"data-slot":"alert-dialog-title",className:T("text-lg font-semibold",e),...t})}function n1({className:e,...t}){return f.jsx(YM,{"data-slot":"alert-dialog-description",className:T("text-muted-foreground text-sm",e),...t})}function r1({className:e,...t}){return f.jsx(GM,{className:T(Tn(),e),...t})}function o1({className:e,...t}){return f.jsx(UM,{className:T(Tn({variant:"outline"}),e),...t})}var a1="AspectRatio",gm=p.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return f.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:f.jsx(Z.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});gm.displayName=a1;var i1=gm;function s1({...e}){return f.jsx(i1,{"data-slot":"aspect-ratio",...e})}var Zi={exports:{}},Ji={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var vm;function l1(){if(vm)return Ji;vm=1;var e=w;function t(c,m){return c===m&&(c!==0||1/c===1/m)||c!==c&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(c,m){var h=m(),v=r({inst:{value:h,getSnapshot:m}}),g=v[0].inst,b=v[1];return a(function(){g.value=h,g.getSnapshot=m,l(g)&&b({inst:g})},[c,h,m]),o(function(){return l(g)&&b({inst:g}),c(function(){l(g)&&b({inst:g})})},[c]),i(h),h}function l(c){var m=c.getSnapshot;c=c.value;try{var h=m();return!n(c,h)}catch{return!0}}function u(c,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Ji.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ji}var bm;function c1(){return bm||(bm=1,Zi.exports=l1()),Zi.exports}var u1=c1();function d1(){return u1.useSyncExternalStore(f1,()=>!0,()=>!1)}function f1(){return()=>{}}var Qi="Avatar",[p1,s3]=Ae(Qi),[m1,ym]=p1(Qi),wm=p.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=p.useState("idle");return f.jsx(m1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:f.jsx(Z.span,{...r,ref:t})})});wm.displayName=Qi;var xm="AvatarImage",Sm=p.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=ym(xm,n),s=h1(r,a),l=Te(u=>{o(u),i.onImageLoadingStatusChange(u)});return Ie(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?f.jsx(Z.img,{...a,ref:t,src:r}):null});Sm.displayName=xm;var Cm="AvatarFallback",_m=p.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=ym(Cm,n),[i,s]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?f.jsx(Z.span,{...o,ref:t}):null});_m.displayName=Cm;function Em(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function h1(e,{referrerPolicy:t,crossOrigin:n}){const r=d1(),o=p.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=p.useState(()=>Em(a,e));return Ie(()=>{s(Em(a,e))},[a,e]),Ie(()=>{const l=c=>()=>{s(c)};if(!a)return;const u=l("loaded"),d=l("error");return a.addEventListener("load",u),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",d)}},[a,n,t]),i}var g1=wm,v1=Sm,b1=_m;function y1({className:e,...t}){return f.jsx(g1,{"data-slot":"avatar",className:T("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function w1({className:e,...t}){return f.jsx(v1,{"data-slot":"avatar-image",className:T("aspect-square size-full",e),...t})}function x1({className:e,...t}){return f.jsx(b1,{"data-slot":"avatar-fallback",className:T("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const Pm=_n("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function S1({className:e,variant:t,asChild:n=!1,...r}){const o=n?Xt:"span";return f.jsx(o,{"data-slot":"badge",className:T(Pm({variant:t}),e),...r})}/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Mm=e=>{const t=_1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Tm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),E1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var P1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M1=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>w.createElement("svg",{ref:l,...P1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Tm("lucide",o),...!a&&!E1(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,d])=>w.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nt=(e,t)=>{const n=w.forwardRef(({className:r,...o},a)=>w.createElement(M1,{ref:a,iconNode:t,className:Tm(`lucide-${C1(Mm(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Mm(e),n};/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T1=nt("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O1=nt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $r=nt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const la=nt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Om=nt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nr=nt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N1=nt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ca=nt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.544.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of t