PageSourceSearch

https://sprag.ai/assets/vendor-radix-BsK0AMKn.js

js sprag.ai collected 2026-10-05 12:42:48 UTC 220,505 bytes, 51 lines download raw bytes

vendor: 5,383 bytes, line 1
1import{i as e,t}from"./rolldown-runtime-DWdDZTNf.js";import{a as n,o as r}from"./vendor-markdown-BIxMb5FY.js";var i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),a=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=e(r(),1);typeof window<`u`&&window.document&&window.document.createElement;function s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function c(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function l(...e){return t=>{let n=!1,r=e.map(e=>{let r=c(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():c(e[t],null)}}}}function u(...e){return o.useCallback(l(...e),e)}var d=n();function f(e,t){let n=o.createContext(t),r=e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=o.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function p(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r),a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,l=o.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})};s.displayName=t+`Provider`;function c(n,s){let c=s?.[e]?.[a]||i,l=o.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,m(i,...t)]}function m(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var h=e(a(),1);
vendor: 6,070 bytes, line 1
1function g(e){let t=_(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(y);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function _(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=x(n),i=b(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v=Symbol(`radix.slottable`);function y(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===v}function b(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function x(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 S=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=g(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function C(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}function w(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}function T(e,t=globalThis?.document){let n=w(e);o.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var E=`DismissableLayer`,D=`dismissableLayer.update`,O=`dismissableLayer.pointerDownOutside`,k=`dismissableLayer.focusOutside`,A,j=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:l,...f}=e,p=o.useContext(j),[m,h]=o.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=o.useState({}),v=u(t,e=>h(e)),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),C=m?y.indexOf(m):-1,w=p.layersWithOutsidePointerEventsDisabled.size>0,E=C>=x,O=F(e=>{let t=e.target,n=[...p.branches].some(e=>e.contains(t));!E||n||(i?.(e),c?.(e),e.defaultPrevented||l?.())},g),k=I(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(a?.(e),c?.(e),e.defaultPrevented||l?.())},g);return T(e=>{C===p.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},g),o.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(A=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),ee(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=A)}},[m,g,n,p]),o.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),ee())},[m,p]),o.useEffect(()=>{let e=()=>_({});return document.addEventListener(D,e),()=>document.removeEventListener(D,e)},[]),(0,d.jsx)(S.div,{...f,ref:v,style:{pointerEvents:w?E?`auto`:`none`:void 0,...e.style},onFocusCapture:s(e.onFocusCapture,k.onFocusCapture),onBlurCapture:s(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:s(e.onPointerDownCapture,O.onPointerDownCapture)})});M.displayName=E;var N=`DismissableLayerBranch`,P=o.forwardRef((e,t)=>{let n=o.useContext(j),r=o.useRef(null),i=u(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(S.div,{...e,ref:i})});P.displayName=N;function F(e,t=globalThis?.document){let n=w(e),r=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){L(O,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function I(e,t=globalThis?.document){let n=w(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&L(k,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ee(){let e=new CustomEvent(D);document.dispatchEvent(e)}function L(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?C(i,a):i.dispatchEvent(a)}var R=globalThis?.document?o.useLayoutEffect:()=>{},z=o.useId||(()=>void 0),te=0;function B(e){let[t,n]=o.useState(z());return R(()=>{e||n(e=>e??String(te++))},[e]),e||(t?`radix-${t}`:``)}var ne=[`top`,`right`,`bottom`,`left`],V=Math.min,H=Math.max,re=Math.round,ie=Math.floor,U=e=>({x:e,y:e}),ae={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function oe(e,t,n){return H(e,V(t,n))}function se(e,t){return typeof e==`function`?e(t):e}function ce(e){return e.split(`-`)[0]}function le(e){return e.split(`-`)[1]}function ue(e){return e===`x`?`y`:`x`}function de(e){return e===`y`?`height`:`width`}function fe(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function pe(e){return ue(fe(e))}function me(e,t,n){n===void 0&&(n=!1);
vendor: 5,033 bytes, line 1
1let r=le(e),i=pe(e),a=de(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ce(o)),[o,Ce(o)]}function he(e){let t=Ce(e);return[ge(e),t,ge(t)]}function ge(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var _e=[`left`,`right`],ve=[`right`,`left`],ye=[`top`,`bottom`],be=[`bottom`,`top`];function xe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ve:_e:t?_e:ve;case`left`:case`right`:return t?ye:be;default:return[]}}function Se(e,t,n,r){let i=le(e),a=xe(ce(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ge)))),a}function Ce(e){let t=ce(e);return ae[t]+e.slice(t.length)}function we(e){return{top:0,right:0,bottom:0,left:0,...e}}function Te(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:we(e)}function Ee(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function De(e,t,n){let{reference:r,floating:i}=e,a=fe(t),o=pe(t),s=de(o),c=ce(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(le(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Oe(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=se(t,e),p=Te(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ee(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ee(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ke=50,Ae=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Oe},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=De(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ke&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=De(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},je=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=se(e,t)||{};if(l==null)return{};let d=Te(u),f={x:n,y:r},p=pe(i),m=de(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=V(d[_],T),D=V(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=oe(O,A,k),M=!c.arrow&&le(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Me=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=se(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ce(r),_=fe(o),v=ce(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ce(o)]:he(o)),x=p!==`none`;!d&&x&&b.push(...Se(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=me(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==fe(t))||T.every(e=>fe(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>
vendor: 5,949 bytes, line 1
1e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=fe(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pe(e){return ne.some(t=>e[t]>=0)}var Fe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=se(e,t);switch(i){case`referenceHidden`:{let e=Ne(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Pe(e)}}}case`escaped`:{let e=Ne(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Pe(e)}}}default:return{}}}}},Ie=new Set([`left`,`top`]);async function Le(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ce(n),s=le(n),c=fe(n)===`y`,l=Ie.has(o)?-1:1,u=a&&c?-1:1,d=se(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Re=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Le(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ze=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=se(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=fe(ce(i)),p=ue(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=oe(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=oe(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Be=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=se(e,t),u={x:n,y:r},d=fe(i),f=ue(d),p=u[f],m=u[d],h=se(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ie.has(ce(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ve=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=se(e,t),u=await o.detectOverflow(t,l),d=ce(i),f=le(i),p=fe(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=V(h-u[g],v),x=V(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=H(u.left,0),t=H(u.right,0),n=H(u.top,0),r=H(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:H(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:H(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function He(){return typeof window<`u`}function Ue(e){return Ge(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){return((Ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ge(e){return He()?e instanceof Node||e instanceof W(e).Node:!1}function Ke(e){return He()?e instanceof Element||e instanceof W(e).Element:!1}function qe(e){return He()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Je(e){return!He()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function Ye(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Xe(e){return/^(table|td|th)$/.test(Ue(e))}function Ze(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Qe=/transform|translate|scale|rotate|perspective|filter/,$e=/paint|layout|strict|content/,et=e=>!!e&&e!==`none`,tt;function nt(e){let t=Ke(e)?ot(e):e;return et(t.transform)||et(t.translate)||et(t.scale)||et(t.rotate)||et(t.perspective)||!it()&&(et(t.backdropFilter)||et(t.filter))||Qe.test(t.willChange||``)||$e.test(t.contain||``)}function rt(e){let t=ct(e);for(;qe(t)&&!at(t);){if(nt(t))return t;if(Ze(t))return null;t=ct(t)}return null}function it(){return tt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),tt}function at(e){return/^(html|body|#document)$/.test(Ue(e))}function ot(e){return W(e).getComputedStyle(e)}function st(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(Ue(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Je(e)&&e.host||We(e);return Je(t)?t.host:t}function lt(e){let t=ct(e);return at(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&Ye(t)?t:lt(t)}function ut(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=lt(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=dt(a);
vendor: 6,460 bytes, line 1
1return t.concat(a,a.visualViewport||[],Ye(r)?r:[],e&&n?ut(e):[])}else return t.concat(r,ut(r,[],n))}function dt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ft(e){let t=ot(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qe(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=re(n)!==a||re(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pt(e){return Ke(e)?e:e.contextElement}function mt(e){let t=pt(e);if(!qe(t))return U(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ft(t),o=(a?re(n.width):n.width)/r,s=(a?re(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ht=U(0);function gt(e){let t=W(e);return!it()||!t.visualViewport?ht:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _t(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function vt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pt(e),o=U(1);t&&(r?Ke(r)&&(o=mt(r)):o=mt(e));let s=_t(a,n,r)?gt(a):U(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=W(a),t=r&&Ke(r)?W(r):r,n=e,i=dt(n);for(;i&&r&&t!==n;){let e=mt(i),t=i.getBoundingClientRect(),r=ot(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=dt(n)}}return Ee({width:u,height:d,x:c,y:l})}function yt(e,t){let n=st(e).scrollLeft;return t?t.left+n:vt(We(e)).left+n}function bt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yt(e,n),y:n.top+t.scrollTop}}function xt(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=We(r),s=t?Ze(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=U(1),u=U(0),d=qe(r);if((d||!d&&!a)&&((Ue(r)!==`body`||Ye(o))&&(c=st(r)),d)){let e=vt(r);l=mt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?bt(o,c):U(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function St(e){return Array.from(e.getClientRects())}function Ct(e){let t=We(e),n=st(e),r=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+yt(e),s=-n.scrollTop;return ot(r).direction===`rtl`&&(o+=H(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var wt=25;function Tt(e,t){let n=W(e),r=We(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=it();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=yt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=wt&&(a-=o)}else l<=wt&&(a+=l);return{width:a,height:o,x:s,y:c}}function Et(e,t){let n=vt(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qe(e)?mt(e):U(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Dt(e,t,n){let r;if(t===`viewport`)r=Tt(e,n);else if(t===`document`)r=Ct(We(e));else if(Ke(t))r=Et(t,n);else{let n=gt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ee(r)}function Ot(e,t){let n=ct(e);return n===t||!Ke(n)||at(n)?!1:ot(n).position===`fixed`||Ot(n,t)}function kt(e,t){let n=t.get(e);if(n)return n;let r=ut(e,[],!1).filter(e=>Ke(e)&&Ue(e)!==`body`),i=null,a=ot(e).position===`fixed`,o=a?ct(e):e;for(;Ke(o)&&!at(o);){let t=ot(o),n=nt(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ye(o)&&!n&&Ot(e,o))?r=r.filter(e=>e!==o):i=t,o=ct(o)}return t.set(e,r),r}function At(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ze(t)?[]:kt(t,this._c):[].concat(n),r],o=Dt(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Dt(t,a[e],i);s=H(n.top,s),c=V(n.right,c),l=V(n.bottom,l),u=H(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function jt(e){let{width:t,height:n}=ft(e);return{width:t,height:n}}function Mt(e,t,n){let r=qe(t),i=We(t),a=n===`fixed`,o=vt(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=U(0);function l(){c.x=yt(i)}if(r||!r&&!a)if((Ue(t)!==`body`||Ye(i))&&(s=st(t)),r){let e=vt(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?bt(i,s):U(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Nt(e){return ot(e).position===`static`}function Pt(e,t){if(!qe(e)||ot(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return We(e)===n&&(n=n.ownerDocument.body),n}function Ft(e,t){let n=W(e);if(Ze(e))return n;if(!qe(e)){let t=ct(e);for(;t&&!at(t);){if(Ke(t)&&!Nt(t))return t;t=ct(t)}return n}let r=Pt(e,t);for(;r&&Xe(r)&&Nt(r);)r=Pt(r,t);return r&&at(r)&&Nt(r)&&!nt(r)?n:r||rt(e)||n}var It=async function(e){let t=this.getOffsetParent||Ft,n=this.getDimensions,r=await n(e.floating);return{reference:Mt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lt(e){return ot(e).direction===`rtl`}var Rt={convertOffsetParentRelativeRectToViewportRelativeRect:xt,getDocumentElement:We,getClippingRect:At,getOffsetParent:Ft,getElementRects:It,getClientRects:St,getDimensions:jt,getScale:mt,isElement:Ke,isRTL:Lt};function zt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bt(e,t){let n=null,r,i=We(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ie(d),h=ie(i.clientWidth-(u+f)),g=ie(i.clientHeight-(d+p)),_=ie(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:H(0,V(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!zt(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Vt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=pt(e),u=i||a?[...l?ut(l):[],...t?ut(t):[]]:[];
vendor: 8,618 bytes, line 1
1u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Bt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?vt(e):null;c&&g();function g(){let t=vt(e);h&&!zt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ht=Re,Ut=ze,Wt=Me,Gt=Ve,Kt=Fe,qt=je,Jt=Be,Yt=(e,t,n)=>{let r=new Map,i={platform:Rt,...n},a={...i.platform,_c:r};return Ae(e,t,{...i,platform:a})},Xt=typeof document<`u`?o.useLayoutEffect:function(){};function Zt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Zt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $t(e,t){let n=Qt(e);return Math.round(t*n)/n}function en(e){let t=o.useRef(e);return Xt(()=>{t.current=e}),t}function tn(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=o.useState(r);Zt(p,r)||m(r);let[g,_]=o.useState(null),[v,y]=o.useState(null),b=o.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=o.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=s||v,w=o.useRef(null),T=o.useRef(null),E=o.useRef(d),D=l!=null,O=en(l),k=en(i),A=en(u),j=o.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Yt(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Zt(E.current,t)&&(E.current=t,h.flushSync(()=>{f(t)}))})},[p,t,n,k,A]);Xt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let M=o.useRef(!1);Xt(()=>(M.current=!0,()=>{M.current=!1}),[]),Xt(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=o.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=o.useMemo(()=>({reference:S,floating:C}),[S,C]),F=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=$t(P.floating,d.x),r=$t(P.floating,d.y);return c?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qt(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,c,P.floating,d.x,d.y]);return o.useMemo(()=>({...d,update:j,refs:N,elements:P,floatingStyles:F}),[d,j,N,P,F])}var nn=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:qt({element:r.current,padding:i}).fn(n):r?qt({element:r,padding:i}).fn(n):{}}}},rn=(e,t)=>{let n=Ht(e);return{name:n.name,fn:n.fn,options:[e,t]}},an=(e,t)=>{let n=Ut(e);return{name:n.name,fn:n.fn,options:[e,t]}},on=(e,t)=>({fn:Jt(e).fn,options:[e,t]}),sn=(e,t)=>{let n=Wt(e);return{name:n.name,fn:n.fn,options:[e,t]}},cn=(e,t)=>{let n=Gt(e);return{name:n.name,fn:n.fn,options:[e,t]}},ln=(e,t)=>{let n=Kt(e);return{name:n.name,fn:n.fn,options:[e,t]}},un=(e,t)=>{let n=nn(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=`Arrow`,fn=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(S.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});fn.displayName=dn;var pn=fn;function mn(e){let[t,n]=o.useState(void 0);return R(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var hn=`Popper`,[gn,_n]=p(hn),[vn,yn]=gn(hn),bn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,d.jsx)(vn,{scope:t,anchor:r,onAnchorChange:i,children:n})};bn.displayName=hn;var xn=`PopperAnchor`,Sn=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=yn(xn,n),s=o.useRef(null),c=u(t,s),l=o.useRef(null);return o.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,d.jsx)(S.div,{...i,ref:c})});Sn.displayName=xn;var Cn=`PopperContent`,[wn,Tn]=gn(Cn),En=o.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=yn(Cn,n),[b,x]=o.useState(null),C=u(t,e=>x(e)),[T,E]=o.useState(null),D=mn(T),O=D?.width??0,k=D?.height??0,A=r+(a===`center`?``:`-`+a),j=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(f)?f:[f],N=M.length>0,P={padding:j,boundary:M.filter(An),altBoundary:N},{refs:F,floatingStyles:I,placement:ee,isPositioned:L,middlewareData:z}=tn({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>Vt(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[rn({mainAxis:i+k,alignmentAxis:s}),l&&an({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?on():void 0,...P}),l&&sn({...P}),cn({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&un({element:T,padding:c}),jn({arrowWidth:O,arrowHeight:k}),h&&ln({strategy:`referenceHidden`,...P})]}),[te,B]=Mn(ee),ne=w(_);R(()=>{L&&ne?.()},[L,ne]);let V=z.arrow?.x,H=z.arrow?.y,re=z.arrow?.centerOffset!==0,[ie,U]=o.useState();return R(()=>{b&&U(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:L?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(wn,{scope:n,placedSide:te,onArrowChange:E,arrowX:V,arrowY:H,shouldHideArrow:re,children:(0,d.jsx)(S.div,{"data-side":te,"data-align":B,...v,ref:C,style:{...v.style,animation:L?void 0:`none`}})})})});En.displayName=Cn;var Dn=`PopperArrow`,On={top:`bottom`,right:`left`,bottom:`top`,left:`right`},kn=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Tn(Dn,n),a=On[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(pn,{...r,ref:t,style:{...r.style,display:`block`}})})});kn.displayName=Dn;function An(e){return e!==null}var jn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Mn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Mn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Nn=bn,Pn=Sn,Fn=En,In=kn,Ln=`Portal`,Rn=o.forwardRef((e,t)=>
vendor: 4,106 bytes, line 1
1{let{container:n,...r}=e,[i,a]=o.useState(!1);R(()=>a(!0),[]);let s=n||i&&globalThis?.document?.body;return s?h.createPortal((0,d.jsx)(S.div,{...r,ref:t}),s):null});Rn.displayName=Ln;function zn(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}var G=e=>{let{present:t,children:n}=e,r=Bn(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),a=u(r.ref,Hn(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:a}):null};G.displayName=`Presence`;function Bn(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),[s,c]=zn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{let e=Vn(r.current);a.current=s===`mounted`?e:`none`},[s]),R(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Vn(t);e?c(`MOUNT`):o===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),R(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Vn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Vn(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:o.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Vn(e){return e?.animationName||`none`}function Hn(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 Un=Symbol(`radix.slottable`);function Wn(e){let t=({children:e})=>(0,d.jsx)(d.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Un,t}var Gn=o.useInsertionEffect||R;function Kn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=qn({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=o.useRef(e!==void 0);o.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`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.`),t.current=c},[c,r])}return[l,o.useCallback(t=>{if(c){let n=Jn(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}function qn({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return Gn(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Jn(e){return typeof e==`function`}var Yn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Xn=`VisuallyHidden`,Zn=o.forwardRef((e,t)=>(0,d.jsx)(S.span,{...e,ref:t,style:{...Yn,...e.style}}));Zn.displayName=Xn;var Qn=Zn,[$n,er]=p(`Tooltip`,[_n]),tr=_n(),nr=`TooltipProvider`,rr=700,ir=`tooltip.open`,[ar,or]=$n(nr),sr=e=>{let{__scopeTooltip:t,delayDuration:n=rr,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=o.useRef(!0),c=o.useRef(!1),l=o.useRef(0);return o.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,d.jsx)(ar,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:o.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:o.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:o.useCallback(e=>{c.current=e}
vendor: 5,134 bytes, line 1
1,[]),disableHoverableContent:i,children:a})};sr.displayName=nr;var cr=`Tooltip`,[lr,ur]=$n(cr),dr=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=or(cr,e.__scopeTooltip),u=tr(t),[f,p]=o.useState(null),m=B(),h=o.useRef(0),g=s??l.disableHoverableContent,_=c??l.delayDuration,v=o.useRef(!1),[y,b]=Kn({prop:r,defaultProp:i??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(ir))):l.onClose(),a?.(e)},caller:cr}),x=o.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=o.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return o.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,d.jsx)(Nn,{...u,children:(0,d.jsx)(lr,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:o.useCallback(()=>{l.isOpenDelayedRef.current?w():S()},[l.isOpenDelayedRef,w,S]),onTriggerLeave:o.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})};dr.displayName=cr;var fr=`TooltipTrigger`,pr=o.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ur(fr,n),a=or(fr,n),c=tr(n),l=u(t,o.useRef(null),i.onTriggerChange),f=o.useRef(!1),p=o.useRef(!1),m=o.useCallback(()=>f.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener(`pointerup`,m),[m]),(0,d.jsx)(Pn,{asChild:!0,...c,children:(0,d.jsx)(S.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:s(e.onPointerMove,e=>{e.pointerType!==`touch`&&!p.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:s(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:s(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener(`pointerup`,m,{once:!0})}),onFocus:s(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:s(e.onBlur,i.onClose),onClick:s(e.onClick,i.onClose)})})});pr.displayName=fr;var mr=`TooltipPortal`,[hr,gr]=$n(mr,{forceMount:void 0}),_r=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=ur(mr,t);return(0,d.jsx)(hr,{scope:t,forceMount:n,children:(0,d.jsx)(G,{present:n||a.open,children:(0,d.jsx)(Rn,{asChild:!0,container:i,children:r})})})};_r.displayName=mr;var vr=`TooltipContent`,yr=o.forwardRef((e,t)=>{let n=gr(vr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=ur(vr,e.__scopeTooltip);return(0,d.jsx)(G,{present:r||o.open,children:o.disableHoverableContent?(0,d.jsx)(wr,{side:i,...a,ref:t}):(0,d.jsx)(br,{side:i,...a,ref:t})})}),br=o.forwardRef((e,t)=>{let n=ur(vr,e.__scopeTooltip),r=or(vr,e.__scopeTooltip),i=o.useRef(null),a=u(t,i),[s,c]=o.useState(null),{trigger:l,onClose:f}=n,p=i.current,{onPointerInTransitChange:m}=r,h=o.useCallback(()=>{c(null),m(!1)},[m]),g=o.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Or(r,Dr(r,n.getBoundingClientRect())),a=kr(t.getBoundingClientRect());c(jr([...i,...a])),m(!0)},[m]);return o.useEffect(()=>()=>h(),[h]),o.useEffect(()=>{if(l&&p){let e=e=>g(e,p),t=e=>g(e,l);return l.addEventListener(`pointerleave`,e),p.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),p.removeEventListener(`pointerleave`,t)}}},[l,p,g,h]),o.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||p?.contains(t),i=!Ar(n,s);r?h():i&&(h(),f())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,p,s,f,h]),(0,d.jsx)(wr,{...e,ref:a})}),[xr,Sr]=$n(cr,{isInside:!1}),Cr=Wn(`TooltipContent`),wr=o.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...c}=e,l=ur(vr,n),u=tr(n),{onClose:f}=l;return o.useEffect(()=>(document.addEventListener(ir,f),()=>document.removeEventListener(ir,f)),[f]),o.useEffect(()=>{if(l.trigger){let e=e=>{e.target?.contains(l.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,f]),(0,d.jsx)(M,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,d.jsxs)(Fn,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,d.jsx)(Cr,{children:r}),(0,d.jsx)(xr,{scope:n,isInside:!0,children:(0,d.jsx)(Qn,{id:l.contentId,role:`tooltip`,children:i||r})})]})})});yr.displayName=vr;var Tr=`TooltipArrow`,Er=o.forwardRef((e,t)=>
vendor: 6,680 bytes, line 1
1{let{__scopeTooltip:n,...r}=e,i=tr(n);return Sr(Tr,n).isInside?null:(0,d.jsx)(In,{...i,...r,ref:t})});Er.displayName=Tr;function Dr(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Or(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function kr(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ar(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function jr(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Mr(t)}function Mr(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Nr=sr,Pr=dr,Fr=pr,Ir=yr,Lr=Symbol.for(`react.lazy`),Rr=o.use;function zr(e){return typeof e==`object`&&!!e&&`then`in e}function Br(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Lr&&`_payload`in e&&zr(e._payload)}function Vr(e){let t=Ur(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e;Br(r)&&typeof Rr==`function`&&(r=Rr(r._payload));let a=o.Children.toArray(r),s=a.find(Gr);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Hr=Vr(`Slot`);function Ur(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(Br(n)&&typeof Rr==`function`&&(n=Rr(n._payload)),o.isValidElement(n)){let e=qr(n),i=Kr(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wr=Symbol(`radix.slottable`);function Gr(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Wr}function Kr(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function qr(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 Jr=`focusScope.autoFocusOnMount`,Yr=`focusScope.autoFocusOnUnmount`,Xr={bubbles:!1,cancelable:!0},Zr=`FocusScope`,Qr=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[c,l]=o.useState(null),f=w(i),p=w(a),m=o.useRef(null),h=u(t,e=>l(e)),g=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:ai(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||ai(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ai(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused]),o.useEffect(()=>{if(c){oi.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Jr,Xr);c.addEventListener(Jr,f),c.dispatchEvent(t),t.defaultPrevented||($r(li(ti(c)),{select:!0}),document.activeElement===e&&ai(c))}return()=>{c.removeEventListener(Jr,f),setTimeout(()=>{let t=new CustomEvent(Yr,Xr);c.addEventListener(Yr,p),c.dispatchEvent(t),t.defaultPrevented||ai(e??document.body,{select:!0}),c.removeEventListener(Yr,p),oi.remove(g)},0)}}},[c,f,p,g]);let _=o.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ei(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ai(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ai(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,d.jsx)(S.div,{tabIndex:-1,...s,ref:h,onKeyDown:_})});Qr.displayName=Zr;function $r(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ai(r,{select:t}),document.activeElement!==n)return}function ei(e){let t=ti(e);return[ni(t,e),ni(t.reverse(),e)]}function ti(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ni(e,t){for(let n of e)if(!ri(n,{upTo:t}))return n}function ri(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 ii(e){return e instanceof HTMLInputElement&&`select`in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ii(e)&&t&&e.select()}}var oi=si();function si(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ci(e,t),e.unshift(t)},remove(t){e=ci(e,t),e[0]?.resume()}}}function ci(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function li(e){return e.filter(e=>e.tagName!==`A`)}var ui=0;function di(){o.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??fi()),document.body.insertAdjacentElement(`beforeend`,e[1]??fi()),ui++,()=>{ui===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e
vendor: 10,084 bytes, lines 1-41
1=>e.remove()),ui--}},[])}function fi(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var pi=function(){return pi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pi.apply(this,arguments)};function mi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function hi(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function gi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _i=`right-scroll-bar-position`,vi=`width-before-scroll-bar`,yi=`with-scroll-bars-hidden`,bi=`--removed-body-scroll-bar-size`;function xi(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Si(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ci=typeof window<`u`?o.useLayoutEffect:o.useEffect,wi=new WeakMap;function Ti(e,t){var n=Si(t||null,function(t){return e.forEach(function(e){return xi(e,t)})});return Ci(function(){var t=wi.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||xi(e,null)}),i.forEach(function(e){r.has(e)||xi(e,a)})}wi.set(n,e)},[e]),n}function Ei(e){return e}function Di(e,t){t===void 0&&(t=Ei);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Oi(e){e===void 0&&(e={});var t=Di(null);return t.options=pi({async:!0,ssr:!1},e),t}var ki=function(e){var t=e.sideCar,n=mi(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,pi({},n))};ki.isSideCarExport=!0;function Ai(e,t){return e.useMedium(t),ki}var ji=Oi(),Mi=function(){},Ni=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:Mi,onWheelCapture:Mi,onTouchMoveCapture:Mi}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=mi(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Ti([n,t]),w=pi(pi({},x),i);return o.createElement(o.Fragment,null,d&&o.createElement(S,{sideCar:ji,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),pi(pi({},w),{ref:C})):o.createElement(y,pi({},w,{className:l,ref:C}),c))});Ni.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ni.classNames={fullWidth:vi,zeroRight:_i};var Pi,Fi=function(){if(Pi)return Pi;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Ii(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Fi();return t&&e.setAttribute(`nonce`,t),e}function Li(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ri(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var zi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ii())&&(Li(t,n),Ri(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bi=function(){var e=zi();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vi=function(){var e=Bi();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Hi={left:0,top:0,right:0,gap:0},Ui=function(e){return parseInt(e||``,10)||0},Wi=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Ui(n),Ui(r),Ui(i)]},Gi=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Hi;var t=Wi(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])}},Ki=Vi(),qi=`data-scroll-locked`,Ji=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2  .${yi} {
3   overflow: hidden ${r};
4   padding-right: ${s}px ${r};
5  }
6  body[${qi}] {
7    overflow: hidden ${r};
8    overscroll-behavior: contain;
9    ${[t&&`position: relative ${r};`,n===`margin`&&`
10    padding-left: ${i}px;
11    padding-top: ${a}px;
12    padding-right: ${o}px;
13    margin-left:0;
14    margin-top:0;
15    margin-right: ${s}px ${r};
16    `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17  }
18  
19  .${_i} {
20    right: ${s}px ${r};
21  }
22  
23  .${vi} {
24    margin-right: ${s}px ${r};
25  }
26  
27  .${_i} .${_i} {
28    right: 0 ${r};
29  }
30  
31  .${vi} .${vi} {
32    margin-right: 0 ${r};
33  }
34  
35  body[${qi}] {
36    ${bi}: ${s}px;
37  }
38`},Yi=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Xi=function(){o.useEffect(function(){return document.body.setAttribute(qi,(Yi()+1).toString()),function(){var e=Yi()-1;e<=0?document.body.removeAttribute(qi):document.body.setAttribute(qi,e.toString())}},[])},Zi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Xi();var a=o.useMemo(function(){return Gi(i)},[i]);return o.createElement(Ki,{styles:Ji(a,!t,i,n?``:`!important`)})},Qi=!1;if(typeof window<`u`)try{var $i=Object.defineProperty({},`passive`,{get:function(){return Qi=!0,!0}});window.addEventListener(`test`,$i,$i),window.removeEventListener(`test`,$i,$i)}catch{Qi=!1}var ea=Qi?{passive:!1}:!1,ta=function(e){return e.tagName===`TEXTAREA`},na=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ta(e)&&n[t]===`visible`)},ra=function(e){return na(e,`overflowY`)},ia=function(e){return na(e,`overflowX`)},aa=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),ca(e,r)){var i=la(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},oa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},sa=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},ca=function(e,t){return e===`v`?ra(t):ia(t)},la=function(e,t){return e===`v`?oa(t):sa(t)},ua=function(e,t){return e===`h`&&t===`rtl`?-1:1},da=function(e,t,n,r,i){var a=ua(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=la(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&ca(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},fa=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pa=function(e){return[e.deltaX,e.deltaY]},ma=function(e){return e&&`current`in e?e.current:e},ha=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ga=function(e){return`
39  .block-interactivity-${e} {pointer-events: none;}
40  .allow-interactivity-${e} {pointer-events: all;}
41`},_a=0,va=[];function ya(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(_a++)[0],a=o.useState(Vi)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=gi([e.lockRef.current],(e.shards||[]).map(ma),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=fa(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=aa(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=aa(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return da(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!va.length||va[va.length-1]!==a)){var r=`deltaY`in n?pa(n):fa(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ha(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
vendor: 4,784 bytes, line 41
41if(!i){var o=(s.current.shards||[]).map(ma).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ba(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=fa(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,pa(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,fa(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return va.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,ea),document.addEventListener(`touchmove`,l,ea),document.addEventListener(`touchstart`,d,ea),function(){va=va.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,ea),document.removeEventListener(`touchmove`,l,ea),document.removeEventListener(`touchstart`,d,ea)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:ga(i)}):null,m?o.createElement(Zi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ba(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xa=Ai(ji,ya),Sa=o.forwardRef(function(e,t){return o.createElement(Ni,pi({},e,{ref:t,sideCar:xa}))});Sa.classNames=Ni.classNames;var Ca=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},wa=new WeakMap,Ta=new WeakMap,Ea={},Da=0,Oa=function(e){return e&&(e.host||Oa(e.parentNode))},ka=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Oa(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Aa=function(e,t,n,r){var i=ka(t,Array.isArray(e)?e:[e]);Ea[n]||(Ea[n]=new WeakMap);var a=Ea[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(wa.get(e)||0)+1,l=(a.get(e)||0)+1;wa.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ta.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Da++,function(){o.forEach(function(e){var t=wa.get(e)-1,i=a.get(e)-1;wa.set(e,t),a.set(e,i),t||(Ta.has(e)||e.removeAttribute(r),Ta.delete(e)),i||e.removeAttribute(n)}),Da--,Da||(wa=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea={})}},ja=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ca(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),Aa(r,i,n,`aria-hidden`)):function(){return null}};function Ma(e){let t=Na(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(Fa);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Na(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=La(n),i=Ia(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pa=Symbol(`radix.slottable`);function Fa(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Pa}function Ia(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function La(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 Ra=`Dialog`,[za,Ba]=p(Ra),[Va,Ha]=za(Ra),Ua=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),l=o.useRef(null),[u,f]=Kn({prop:r,defaultProp:i??!1,onChange:a,caller:Ra});return(0,d.jsx)(Va,{scope:t,triggerRef:c,contentRef:l,contentId:B(),titleId:B(),descriptionId:B(),open:u,onOpenChange:f,onOpenToggle:o.useCallback(()=>f(e=>!e),[f]),modal:s,children:n})};Ua.displayName=Ra;var Wa=`DialogTrigger`,Ga=o.forwardRef((e,t)=>
41{let{__scopeDialog:n,...r}=e,i=Ha(Wa,n),a=u(t,i.triggerRef);return(0,d.jsx)(S.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fo(i.open),...r,ref:a,onClick:s(e.onClick,i.onOpenToggle)})});Ga.displayName=Wa;var Ka=`DialogPortal`,[qa,Ja]=za(Ka,{forceMount:void 0}),Ya=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Ha(Ka,t);return(0,d.jsx)(qa,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,d.jsx)(G,{present:n||a.open,children:(0,d.jsx)(Rn,{asChild:!0,container:i,children:e})}))})};Ya.displayName=Ka;var Xa=`DialogOverlay`,Za=o.forwardRef((e,t)=>{let n=Ja(Xa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ha(Xa,e.__scopeDialog);return a.modal?(0,d.jsx)(G,{present:r||a.open,children:(0,d.jsx)($a,{...i,ref:t})}):null});Za.displayName=Xa;var Qa=Ma(`DialogOverlay.RemoveScroll`),$a=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ha(Xa,n);return(0,d.jsx)(Sa,{as:Qa,allowPinchZoom:!0,shards:[i.contentRef],children:(0,d.jsx)(S.div,{"data-state":fo(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),eo=`DialogContent`,to=o.forwardRef((e,t)=>{let n=Ja(eo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ha(eo,e.__scopeDialog);return(0,d.jsx)(G,{present:r||a.open,children:a.modal?(0,d.jsx)(no,{...i,ref:t}):(0,d.jsx)(ro,{...i,ref:t})})});to.displayName=eo;var no=o.forwardRef((e,t)=>{let n=Ha(eo,e.__scopeDialog),r=o.useRef(null),i=u(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return ja(e)},[]),(0,d.jsx)(io,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:s(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:s(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault())})}),ro=o.forwardRef((e,t)=>{let n=Ha(eo,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,d.jsx)(io,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),io=o.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,c=Ha(eo,n),l=o.useRef(null),f=u(t,l);return di(),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Qr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,d.jsx)(M,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":fo(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(go,{titleId:c.titleId}),(0,d.jsx)(vo,{contentRef:l,descriptionId:c.descriptionId})]})]})}),ao=`DialogTitle`,oo=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ha(ao,n);return(0,d.jsx)(S.h2,{id:i.titleId,...r,ref:t})});oo.displayName=ao;var so=`DialogDescription`,co=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ha(so,n);return(0,d.jsx)(S.p,{id:i.descriptionId,...r,ref:t})});co.displayName=so;var lo=`DialogClose`,uo=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ha(lo,n);return(0,d.jsx)(S.button,{type:`button`,...r,ref:t,onClick:s(e.onClick,()=>i.onOpenChange(!1))})});uo.displayName=lo;function fo(e){return e?`open`:`closed`}var po=`DialogTitleWarning`,[mo,ho]=f(po,{contentName:eo,titleName:ao,docsSlug:`dialog`}),go=({titleId:e})=>{let t=ho(po),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
43If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
45For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return o.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_o=`DialogDescriptionWarning`,vo=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ho(_o).contentName}}.`;return o.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},yo=Ua,bo=Ga,xo=Ya,So=Za,Co=to,wo=oo,To=co,Eo=uo,Do=Object.defineProperty,Oo=(e,t)=>Do(e,`name`,{value:t,configurable:!0});function ko(e,t){let n=o.createContext(t);n.displayName=e+`Context`;let r=Oo(e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,s=o.useContext(n);if(s)return s;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Oo(i,`useContext`),[r,i]}Oo(ko,`createContext`);function Ao(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let s=Oo(t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,l=o.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})},`Provider`);s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[a]||i,d=o.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return Oo(c,`useContext`),[s,c]}Oo(r,`createContext`);let i=Oo(()=>{let t=n.map(e=>o.createContext(e));return Oo(function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,jo(i,...t)]}Oo(Ao,`createContextScope`);function jo(...e){let t=e[0];if(e.length===1)return t;let n=Oo(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Oo(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Oo(jo,`composeContextScopes`);var Mo=Object.defineProperty,No=(e,t)=>Mo(e,`name`,{value:t,configurable:!0}),Po=!!(typeof window<`u`&&window.document&&window.document.createElement);function K(e,t,{checkForDefaultPrevented:n=!0}={}){return No(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}No(K,`composeEventHandlers`);function Fo(e){if(!Po)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}No(Fo,`getOwnerWindow`);function Io(e){if(!Po)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}No(Io,`getOwnerDocument`);function Lo(e,t=!1){let{activeElement:n}=Io(e);if(!n?.nodeName)return null;if(Ro(n)&&n.contentDocument)return Lo(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Io(n).getElementById(e);if(t)return t}}return n}No(Lo,`getActiveElement`);function Ro(e){return e.tagName===`IFRAME`}No(Ro,`isFrame`);var zo=Object.defineProperty,Bo=(e,t)=>zo(e,`name`,{value:t,configurable:!0});function Vo(e,t){if(typeof e==`function`)return e(t);
45e!=null&&(e.current=t)}Bo(Vo,`setRef`);function Ho(...e){return t=>{let n=!1,r=e.map(e=>{let r=Vo(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Vo(e[t],null)}}}}Bo(Ho,`composeRefs`);function q(...e){return o.useCallback(Ho(...e),e)}Bo(q,`useComposedRefs`);var Uo=Object.defineProperty,Wo=(e,t)=>Uo(e,`name`,{value:t,configurable:!0}),Go=Wo(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Ko(a,i))}return{...e,...n}}),`mergeProps`);function Ko(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Wo(Ko,`concatAriaDescribedby`);var qo=o.createContext(Go);qo.displayName=`SlotContext`;function Jo(e){let t=o.forwardRef((t,n)=>{let r=o.useContext(qo),{children:i,mergeProps:a=r,...s}=t,c=null,l=!1,u=[];ts(i)&&typeof as==`function`&&(i=as(i._payload)),o.Children.forEach(i,e=>{if($o(e)){l=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ts(n)&&typeof as==`function`&&(n=as(n._payload)),c=Zo(t,n),u.push(c?.props?.children)}else u.push(e)}),c?c=o.cloneElement(c,void 0,u):!l&&o.Children.count(i)===1&&o.isValidElement(i)&&(c=i);let d=c?Qo(c):void 0,f=q(n,d);if(!c){if(i||i===0)throw Error(l?is(e):rs(e));return i}let p=a(s,c.props??{});return c.type!==o.Fragment&&(p.ref=n?f:d),o.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}Wo(Jo,`createSlot`);var Yo=Symbol.for(`radix.slottable`);function Xo(e){let t=Wo(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Yo,t}Wo(Xo,`createSlottable`);var Zo=Wo((e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Qo(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)}Wo(Qo,`getElementRef`);function $o(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Yo}Wo($o,`isSlottable`);var es=Symbol.for(`react.lazy`);function ts(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===es&&`_payload`in e&&ns(e._payload)}Wo(ts,`isLazyComponent`);function ns(e){return typeof e==`object`&&!!e&&`then`in e}Wo(ns,`isPromiseLike`);var rs=Wo(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),is=Wo(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),as=o.use,os=Object.defineProperty,ss=(e,t)=>os(e,`name`,{value:t,configurable:!0}),cs=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Jo(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ls(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}ss(ls,`dispatchDiscreteCustomEvent`);var us=globalThis?.document?o.useLayoutEffect:()=>{},ds=Object.defineProperty,fs=(e,t)=>ds(e,`name`,{value:t,configurable:!0}),ps=o.useEffectEvent,ms=o.useInsertionEffect;function hs(e){if(typeof ps==`function`)return ps(e);let t=o.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ms==`function`?ms(()=>{t.current=e}):us(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}fs(hs,`useEffectEvent`);var gs=Object.defineProperty,_s=(e,t)=>gs(e,`name`,{value:t,configurable:!0}),vs=o.useInsertionEffect||us;function ys({prop:e,defaultProp:t,onChange:n=_s(()=>{},`onChange`),caller:r}){let[i,a,s]=bs({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:i,o.useCallback(t=>{if(c){let n=xs(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}_s(ys,`useControllableState`);function bs({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return vs(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}_s(bs,`useUncontrolledState`);function xs(e){return typeof e==`function`}_s(xs,`isFunction`);var Ss=Symbol(`RADIX:SYNC_STATE`);function Cs(e,t,n,r){let{prop:i,defaultProp:a,onChange:s,caller:c}=t,l=i!==void 0,u=hs(s),d=[{...n,state:a}];r&&d.push(r);let[f,p]=o.useReducer((t,n)=>{if(n.type===Ss)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=o.useRef(m);o.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=o.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return o.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:Ss,state:i})},[i,f.state,l]),[g,p]}_s(Cs,`useControllableStateReducer`);var ws=Object.defineProperty,Ts=(e,t)=>ws(e,`name`,{value:t,configurable:!0}),Es=o.createContext(void 0);function Ds(e){let t=o.useContext(Es);return e||t||`ltr`}Ts(Ds,`useDirection`);var Os=Object.defineProperty,ks=(e,t)=>Os(e,`name`,{value:t,configurable:!0});function As(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}ks(As,`useStateMachine`);var js=ks(e=>{let{present:t,children:n}=e,r=Ms(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),a=Ps(r.ref,Is(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:a}):null},`Presence`);function Ms(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),s=o.useRef(void 0),[c,l]=As(e?`mounted`:`unmounted`,{mou
45nted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{c===`mounted`?(a.current=s.current??Fs(r.current),s.current=void 0):a.current=`none`},[c]),us(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Fs(t);e?(s.current=o,l(`MOUNT`)):o===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),us(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ks(a=>{let o=Fs(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ks(e=>{e.target===t&&(a.current=Fs(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:o.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Fs(t)}else r.current=null;n(e)},[])}}ks(Ms,`usePresence`);function Ns(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ks(Ns,`setRef`);function Ps(...e){let t=o.useRef(e);return t.current=e,o.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ns(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ns(n[e],null)}}},[])}ks(Ps,`useStableComposedRefs`);function Fs(e){return e?.animationName||`none`}ks(Fs,`getAnimationName`);function Is(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)}ks(Is,`getElementRef`);var Ls=Object.defineProperty,Rs=(e,t)=>Ls(e,`name`,{value:t,configurable:!0}),zs=o.useId||(()=>void 0),Bs=0;function Vs(e){let[t,n]=o.useState(zs());return us(()=>{e||n(e=>e??String(Bs++))},[e]),e||(t?`radix-${t}`:``)}Rs(Vs,`useId`);var Hs=Object.defineProperty,Us=(e,t)=>Hs(e,`name`,{value:t,configurable:!0}),Ws=Us(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Gs(a,i))}return{...e,...n}}),`mergeProps`);function Gs(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Us(Gs,`concatAriaDescribedby`);var Ks=o.createContext(Ws);Ks.displayName=`SlotContext`;function qs(e){let t=o.forwardRef((t,n)=>{let r=o.useContext(Ks),{children:i,mergeProps:a=r,...s}=t,c=null,l=!1,u=[];ec(i)&&typeof ic==`function`&&(i=ic(i._payload)),o.Children.forEach(i,e=>{if(Qs(e)){l=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ec(n)&&typeof ic==`function`&&(n=ic(n._payload)),c=Xs(t,n),u.push(c?.props?.children)}else u.push(e)}),c?c=o.cloneElement(c,void 0,u):!l&&o.Children.count(i)===1&&o.isValidElement(i)&&(c=i);let d=c?Zs(c):void 0,f=q(n,d);if(!c){if(i||i===0)throw Error(l?rc(e):nc(e));return i}let p=a(s,c.props??{});return c.type!==o.Fragment&&(p.ref=n?f:d),o.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}Us(qs,`createSlot`);var Js=Symbol.for(`radix.slottable`);function Ys(e){let t=Us(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Js,t}Us(Ys,`createSlottable`);var Xs=Us((e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Zs(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)}Us(Zs,`getElementRef`);function Qs(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Js}Us(Qs,`isSlottable`);var $s=Symbol.for(`react.lazy`);function ec(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===$s&&`_payload`in e&&tc(e._payload)}Us(ec,`isLazyComponent`);function tc(e){return typeof e==`object`&&!!e&&`then`in e}Us(tc,`isPromiseLike`);var nc=Us(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),rc=Us(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ic=o.use,ac=Object.defineProperty,J=(e,t)=>
45ac(e,`name`,{value:t,configurable:!0});function oc(e){let t=e+`CollectionProvider`,[n,r]=Ao(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=J(e=>{let{scope:t,children:n}=e,r=o.useRef(null),a=o.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,l=qs(c),u=o.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,d.jsx)(l,{ref:q(t,a(c,n).collectionRef),children:r})});u.displayName=c;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=qs(f),h=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,s=o.useRef(null),c=q(t,s),l=a(f,n);return o.useEffect(()=>(l.itemMap.set(s,{ref:s,...i}),()=>void l.itemMap.delete(s))),(0,d.jsx)(m,{[p]:``,ref:c,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return J(g,`useCollection`),[{Provider:s,Slot:u,ItemSlot:h},g,r]}J(oc,`createCollection`);var sc=new WeakMap,cc=class e extends Map{static{J(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],sc.set(this,!0)}set(e,t){return sc.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=dc(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t===void 0?!1:this.delete(t)}at(e){let t=lc(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=lc(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return lc(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function lc(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=uc(e,t);return n===-1?void 0:e[n]}J(lc,`at`);function uc(e,t){let n=e.length,r=dc(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}J(uc,`toSafeIndex`);function dc(e){return e!==e||e===0?0:Math.trunc(e)}J(dc,`toSafeInteger`);function fc(e){let t=e+`CollectionProvider`,[n,r]=Ao(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cc,setItemMap:J(()=>void 0,`setItemMap`)}),s=J(({state:e,...t})=>e?(0,d.jsx)(l,{...t,state:e}):(0,d.jsx)(c,{...t}),`CollectionProvider`);s.displayName=t;let c=J(e=>{let t=_();return(0,d.jsx)(l,{...e,state:t})},`CollectionInit`);c.displayName=t+`Init`;let l=J(e=>{let{scope:t,children:n,state:r}=e,a=o.useRef(null),[s,c]=o.useState(null),l=q(a,c),[u,f]=r;return o.useEffect(()=>{if(!s)return;let e=gc(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,d.jsx)(i,{scope:t,itemMap:u,setItemMap:f,collectionRef:l,collectionRefObject:a,collectionElement:s,children:n})},`CollectionProviderImpl`);l.displayName=t+`Impl`;let u=e+`CollectionSlot`,f=qs(u),p=o.forwardRef((e,t)=>
45{let{scope:n,children:r}=e;return(0,d.jsx)(f,{ref:q(t,a(u,n).collectionRef),children:r})});p.displayName=u;let m=e+`CollectionItemSlot`,h=qs(m),g=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,s=o.useRef(null),[c,l]=o.useState(null),u=q(t,s,l),{setItemMap:f}=a(m,n),p=o.useRef(i);pc(p.current,i)||(p.current=i);let g=p.current;return o.useEffect(()=>{let e=g;return f(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(hc):(t.set(c,{...e,element:c}),t.toSorted(hc)):t),()=>{f(e=>!c||!e.has(c)?e:(e.delete(c),new cc(e)))}},[c,g,f]),(0,d.jsx)(h,{"data-radix-collection-item":``,ref:u,children:r})});g.displayName=m;function _(){return o.useState(new cc)}J(_,`useInitCollection`);function v(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return J(v,`useCollection`),[{Provider:s,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:_}]}J(fc,`createCollection`);function pc(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}J(pc,`shallowEqual`);function mc(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}J(mc,`isElementPreceding`);function hc(e,t){return!e[1].element||!t[1].element?0:mc(e[1].element,t[1].element)?-1:1}J(hc,`sortByDocumentPosition`);function gc(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}J(gc,`getChildListObserver`);var _c=Object.defineProperty,vc=(e,t)=>_c(e,`name`,{value:t,configurable:!0});function yc(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}vc(yc,`useCallbackRef`);var bc=Object.defineProperty,Y=(e,t)=>bc(e,`name`,{value:t,configurable:!0}),xc=`dismissableLayer.update`,Sc=`dismissableLayer.pointerDownOutside`,Cc=`dismissableLayer.focusOutside`,wc,Tc=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ec=o.forwardRef(Y(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,f=o.useContext(Tc),[p,m]=o.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=o.useState({}),_=q(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=o.useRef(!1),T=kc(e=>{a?.(e),c?.(e),e.defaultPrevented||l?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:o.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=Ac(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||l?.())},h),D=p?x===v.length-1:!1,O=yc(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return o.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),o.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(wc=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),jc(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=wc))}},[p,h,n,f]),o.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),jc())},[p,f]),o.useEffect(()=>{let e=Y(()=>g({}),`handleUpdate`);return document.addEventListener(xc,e),()=>document.removeEventListener(xc,e)},[]),(0,d.jsx)(cs.div,{...u,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,E.onFocusCapture),onBlurCapture:K(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function Dc(){let e=o.useContext(Tc),[t,n]=o.useState(null);return o.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Y(Dc,`useDismissableLayerSurface`);var Oc=Y(()=>!0,`IS_TRUE`);function kc(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=Oc}=t,c=yc(e),l=o.useRef(!1),u=o.useRef(!1),d=o.useRef(new Map),f=o.useRef(()=>{});return o.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}Y(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}Y(t,`isOutsideInteractionIntercepted`);function o(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}Y(o,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}Y(p,`handleInteractionBubble`);let m=Y(a=>{if(a.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||Mc(Sc,c,p,{discrete:!0})};if(Y(o,`handleAndDispatchPointerDownOutsideEvent`),!s(a.target)){n.removeEventListener(`click`,f.current),e(
45),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,o,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,o,!0),n.removeEventListener(e,p)}},[n,c,r,i,a,s]),{onPointerDownCapture:Y(()=>l.current=!0,`onPointerDownCapture`)}}Y(kc,`usePointerDownOutside`);function Ac(e,t=globalThis?.document){let n=yc(e),r=o.useRef(!1);return o.useEffect(()=>{let e=Y(e=>{e.target&&!r.current&&Mc(Cc,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Y(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Y(()=>r.current=!1,`onBlurCapture`)}}Y(Ac,`useFocusOutside`);function jc(){let e=new CustomEvent(xc);document.dispatchEvent(e)}Y(jc,`dispatchUpdate`);function Mc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ls(i,a):i.dispatchEvent(a)}Y(Mc,`handleAndDispatchCustomEvent`);var Nc=Object.defineProperty,Pc=(e,t)=>Nc(e,`name`,{value:t,configurable:!0});function Fc(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Pc(Fc,`usePrevious`);var Ic=Object.defineProperty,Lc=(e,t)=>Ic(e,`name`,{value:t,configurable:!0});function Rc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Lc(Rc,`setRef`);function zc(...e){return t=>{let n=!1,r=e.map(e=>{let r=Rc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Rc(e[t],null)}}}}Lc(zc,`composeRefs`);function Bc(...e){return o.useCallback(zc(...e),e)}Lc(Bc,`useComposedRefs`);var Vc=Object.defineProperty,Hc=(e,t)=>Vc(e,`name`,{value:t,configurable:!0}),Uc=Hc(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Wc(a,i))}return{...e,...n}}),`mergeProps`);function Wc(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Hc(Wc,`concatAriaDescribedby`);var Gc=o.createContext(Uc);Gc.displayName=`SlotContext`;function Kc(e){let t=o.forwardRef((t,n)=>{let r=o.useContext(Gc),{children:i,mergeProps:a=r,...s}=t,c=null,l=!1,u=[];$c(i)&&typeof rl==`function`&&(i=rl(i._payload)),o.Children.forEach(i,e=>{if(Zc(e)){l=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;$c(n)&&typeof rl==`function`&&(n=rl(n._payload)),c=Yc(t,n),u.push(c?.props?.children)}else u.push(e)}),c?c=o.cloneElement(c,void 0,u):!l&&o.Children.count(i)===1&&o.isValidElement(i)&&(c=i);let d=c?Xc(c):void 0,f=Bc(n,d);if(!c){if(i||i===0)throw Error(l?nl(e):tl(e));return i}let p=a(s,c.props??{});return c.type!==o.Fragment&&(p.ref=n?f:d),o.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}Hc(Kc,`createSlot`);var qc=Symbol.for(`radix.slottable`);function Jc(e){let t=Hc(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=qc,t}Hc(Jc,`createSlottable`);var Yc=Hc((e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Xc(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)}Hc(Xc,`getElementRef`);function Zc(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===qc}Hc(Zc,`isSlottable`);var Qc=Symbol.for(`react.lazy`);function $c(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Qc&&`_payload`in e&&el(e._payload)}Hc($c,`isLazyComponent`);function el(e){return typeof e==`object`&&!!e&&`then`in e}Hc(el,`isPromiseLike`);var tl=Hc(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),nl=Hc(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),rl=o.use,il=Object.defineProperty,al=(e,t)=>il(e,`name`,{value:t,configurable:!0}),ol=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>
vendor: 11,052 bytes, line 45
45{let n=Kc(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function sl(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}al(sl,`dispatchDiscreteCustomEvent`);var cl=Object.defineProperty,ll=(e,t)=>cl(e,`name`,{value:t,configurable:!0}),ul=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),dl=o.forwardRef(ll(function(e,t){return(0,d.jsx)(ol.span,{...e,ref:t,style:{...ul,...e.style}})},`VisuallyHidden`)),fl=Object.defineProperty,X=(e,t)=>fl(e,`name`,{value:t,configurable:!0}),pl=`NavigationMenu`,[ml,hl,gl]=oc(pl),[_l,vl,yl]=oc(pl),[bl,xl]=Ao(pl,[gl,yl]),[Sl,Cl]=bl(pl),[wl,Tl]=bl(pl),El=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:s=200,skipDelayDuration:c=300,orientation:l=`horizontal`,dir:u,...f}=e,[p,m]=o.useState(null),h=q(t,m),g=Ds(u),_=o.useRef(0),v=o.useRef(0),y=o.useRef(0),[b,x]=o.useState(!0),[S,C]=ys({prop:r,onChange:X(e=>{let t=e!==``,n=c>0;t?(window.clearTimeout(y.current),n&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),c)),i?.(e)},`onChange`),defaultProp:a??``,caller:pl}),w=o.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>C(``),150)},[C]),T=o.useCallback(e=>{window.clearTimeout(v.current),C(e)},[C]),E=o.useCallback(e=>{S===e?window.clearTimeout(v.current):_.current=window.setTimeout(()=>{window.clearTimeout(v.current),C(e)},s)},[S,C,s]);return o.useEffect(()=>()=>{window.clearTimeout(_.current),window.clearTimeout(v.current),window.clearTimeout(y.current)},[]),(0,d.jsx)(Dl,{scope:n,isRootMenu:!0,value:S,dir:g,orientation:l,rootNavigationMenu:p,onTriggerEnter:e=>{window.clearTimeout(_.current),b?E(e):T(e)},onTriggerLeave:()=>{window.clearTimeout(_.current),w()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:w,onItemSelect:e=>{C(t=>t===e?``:e)},onItemDismiss:()=>C(``),children:(0,d.jsx)(cs.nav,{"aria-label":`Main`,"data-orientation":l,dir:g,...f,ref:h})})},`NavigationMenu`)),Dl=X(e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:s,value:c,onItemSelect:l,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:m,onContentLeave:h}=e,[g,_]=o.useState(null),[v,y]=o.useState(new Map),[b,x]=o.useState(null);return(0,d.jsx)(Sl,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:c,previousValue:Fc(c),baseId:Vs(),dir:i,orientation:a,viewport:g,onViewportChange:_,indicatorTrack:b,onIndicatorTrackChange:x,onTriggerEnter:yc(f),onTriggerLeave:yc(p),onContentEnter:yc(m),onContentLeave:yc(h),onItemSelect:yc(l),onItemDismiss:yc(u),onViewportContentChange:o.useCallback((e,t)=>{y(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:o.useCallback(e=>{y(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,d.jsx)(ml.Provider,{scope:t,children:(0,d.jsx)(wl,{scope:t,items:v,children:s})})})},`NavigationMenuProvider`),Ol=`NavigationMenuList`,kl=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,...r}=e,i=Cl(Ol,n),a=(0,d.jsx)(cs.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,d.jsx)(cs.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,d.jsx)(ml.Slot,{scope:n,children:i.isRootMenu?(0,d.jsx)(Ul,{asChild:!0,children:a}):a})})},`NavigationMenuList`)),[Al,jl]=bl(`NavigationMenuItem`),Ml=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,value:r,...i}=e,a=Vs(),s=r||a||`LEGACY_REACT_AUTO_VALUE`,c=o.useRef(null),l=o.useRef(null),u=o.useRef(null),f=o.useRef(()=>{}),p=o.useRef(!1),m=o.useCallback((e=`start`)=>{if(c.current){f.current();let t=ql(c.current);t.length&&Jl(e===`start`?t:t.reverse())}},[]),h=o.useCallback(()=>{if(c.current){let e=ql(c.current);e.length&&(f.current=Yl(e))}},[]);return(0,d.jsx)(Al,{scope:n,value:s,triggerRef:l,contentRef:c,focusProxyRef:u,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:(0,d.jsx)(cs.li,{...i,ref:t})})},`NavigationMenuItem`)),Nl=`NavigationMenuTrigger`,Pl=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=Cl(Nl,e.__scopeNavigationMenu),s=jl(Nl,e.__scopeNavigationMenu),c=o.useRef(null),l=q(c,s.triggerRef,t),u=Ql(a.baseId,s.value),f=$l(a.baseId,s.value),p=o.useRef(!1),m=o.useRef(!1),h=s.value===a.value;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ml.ItemSlot,{scope:n,value:s.value,children:(0,d.jsx)(Kl,{asChild:!0,children:(0,d.jsx)(cs.button,{id:u,disabled:r,"data-disabled":r?``:void 0,"data-state":Zl(h),"aria-expanded":h,"aria-controls":h?f:void 0,...i,ref:l,onPointerEnter:K(e.onPointerEnter,()=>{m.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:K(e.onPointerMove,eu(()=>{r||m.current||s.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:K(e.onPointerLeave,eu(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:K(e.onClick,()=>{a.onItemSelect(s.value),m.current=h}),onKeyDown:K(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];h&&e.key===t&&(s.onEntryKeyDown(),e.preventDefault())})})})}),h&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(dl,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:e=>{let t=s.contentRef.current,n=e.relatedTarget,r=n===c.current,i=t?.contains(n);(r||!i)&&s.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,d.jsx)(`span`,{"aria-owns":f})]})]})},`NavigationMenuTrigger`)),Fl=`navigationMenu.linkSelect`,Il=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,d.jsx)(Kl,{asChild:!0,children:(0,d.jsx)(cs.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:K(e.onClick,e=>{let t=e.target,n=new CustomEvent(Fl,{bubbles:!0,cancelable:!0});t.addEventListener(Fl,e=>i?.(e),{once:!0}),ls(t,n),!n.defaultPrevented&&!e.metaKey&&ls(t,new CustomEvent(Bl,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})},`NavigationMenuLink`)),Ll=`NavigationMenuContent`,Rl=o.forwardRef(X(function(e,t){let{forceMount:n,...r}=e,i=Cl(Ll,e.__scopeNavigationMenu),a=jl(Ll,e.__scopeNavigationMenu),o=q(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,d.jsx)(zl,{forceMount:n,...c,ref:o}):(0,d.jsx)(js,{present:n||s,children:(0,d.jsx)(Vl,{"data-state":Zl(s),...c,ref:o,onPointerEnter:K(e.onPointerEnter,i.onContentEnter),onPointerLeave:K(e.onPointerLeave,eu(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})},`NavigationMenuContent`)),zl=o.forwardRef(X(function(e,t){let{onViewportContentChange:n,onViewportContentRemove:r}=Cl(Ll,e.__scopeNavigationMenu);return us(()=>{n(e.value,{ref:t,...e})},[e,t,n]),us(()=>()=>r(e.value),[e.value,r]),null},`ViewportContentMounter`)),Bl=`navigationMenu.rootContentDismiss`,Vl=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:c,onContentFocusOutside:l,...u}=e,f=Cl(Ll,n),p=o.useRef(null),m=q(p,t),h=Ql(f.baseId,r),g=$l(f.baseId,r),_=hl(n),v=o.useRef(null),{onItemDismiss:y}=f;return o.useEffect(()=>{let e=p.current;if(f.isRootMenu&&e){let t=X(()=>{y(),c(),e.contains(document.activeElement)&&i.current?.focus()},`handleClose`);return e.addEventListener(Bl,t),()=>e.removeEventListener(Bl,t)}},[f.isRootMenu,e.value,i,y,c]),(0,d.jsx)(Ul,{asChild:!0,children:(0,d.jsx)(Ec,{id:g,"aria-labelledby":h,"data-motion":o.useMemo(()=>{let e=_().map(e=>e.value);f.dir===`rtl`&&e.reverse();let t=e.indexOf(f.value),n=e.indexOf(f.previousValue),i=r===f.value,a=n===e.indexOf(r);if(!i&&!a)return v.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return v.current=o,o},[f.previousValue,f.value,f.dir,_,r]),"data-orientation":f.orientation,...u,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(Bl,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(e)},onFocusOutside:K(e.onFocusOutside,e=>{l();let t=e.target;f.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.target,n=_().some(e=>e.ref.current?.contains(t)),r=f.isRootMenu&&f.viewport?.contains(t);(n||r||!f.isRootMenu)&&e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=ql(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);Jl(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{s.current=!0})})})},`NavigationMenuContentImpl`)),Hl=`FocusGroup`,Ul=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,...r}=e,i=Cl(Hl,n);return(0,d.jsx)(_l.Provider,{scope:n,children:(0,d.jsx)(_l.Slot,{scope:n,children:(0,d.jsx)(cs.div,{dir:i.dir,...r,ref:t})})})},`FocusGroup`)),Wl=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Gl=`FocusGroupItem`,Kl=o.forwardRef(X(function(e,t){let{__scopeNavigationMenu:n,...r}=e,i=vl(n),a=Cl(Gl,n);return(0,d.jsx)(_l.ItemSlot,{scope:n,children:(0,d.jsx)(cs.button,{...r,ref:t,onKeyDown:K(e.onKeyDown,e=>{if([`Home`,`End`,...Wl].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),Wl.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>Jl(t)),e.preventDefault()}})})})},`FocusGroupItem`));function ql(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:X(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}X(ql,`getTabbableCandidates`);function Jl(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}X(Jl,`focusFirst`);function Yl(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}X(Yl,`removeFromTabOrder`);function Xl(e,t){let n=yc(t);us(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}X(Xl,`useResizeObserver`);function Zl(e){return e?`open`:`closed`}X(Zl,`getOpenState`);function Ql(e,t){return`${e}-trigger-${t}`}X(Ql,`makeTriggerId`);function $l(e,t){return`${e}-content-${t}`}X($l,`makeContentId`);function eu(e){return t=>t.pointerType===`mouse`?e(t):void 0}X(eu,`whenMouse`);function tu(e,[t,n]){return Math.min(n,Math.max(t,e))}
vendor: 12,760 bytes, line 45
45function nu(e){let t=ru(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(au);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ru(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=su(n),i=ou(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iu=Symbol(`radix.slottable`);function au(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===iu}function ou(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function su(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)}function cu(e){let t=e+`CollectionProvider`,[n,r]=p(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=o.useRef(null),a=o.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};s.displayName=t;let c=e+`CollectionSlot`,l=nu(c),f=o.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,d.jsx)(l,{ref:u(t,a(c,n).collectionRef),children:r})});f.displayName=c;let m=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=nu(m),_=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,s=o.useRef(null),c=u(t,s),l=a(m,n);return o.useEffect(()=>(l.itemMap.set(s,{ref:s,...i}),()=>void l.itemMap.delete(s))),(0,d.jsx)(g,{[h]:``,ref:c,children:r})});_.displayName=m;function v(t){let n=a(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:f,ItemSlot:_},v,r]}var lu=o.createContext(void 0);function uu(e){let t=o.useContext(lu);return e||t||`ltr`}var du=`Arrow`,fu=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(S.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});fu.displayName=du;var pu=fu,mu=`Popper`,[hu,gu]=p(mu),[_u,vu]=hu(mu),yu=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,d.jsx)(_u,{scope:t,anchor:r,onAnchorChange:i,children:n})};yu.displayName=mu;var bu=`PopperAnchor`,xu=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=vu(bu,n),s=o.useRef(null),c=u(t,s),l=o.useRef(null);return o.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,d.jsx)(S.div,{...i,ref:c})});xu.displayName=bu;var Su=`PopperContent`,[Cu,wu]=hu(Su),Tu=o.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=vu(Su,n),[b,x]=o.useState(null),C=u(t,e=>x(e)),[T,E]=o.useState(null),D=mn(T),O=D?.width??0,k=D?.height??0,A=r+(a===`center`?``:`-`+a),j=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(f)?f:[f],N=M.length>0,P={padding:j,boundary:M.filter(ku),altBoundary:N},{refs:F,floatingStyles:I,placement:ee,isPositioned:L,middlewareData:z}=tn({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>Vt(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[rn({mainAxis:i+k,alignmentAxis:s}),l&&an({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?on():void 0,...P}),l&&sn({...P}),cn({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&un({element:T,padding:c}),Au({arrowWidth:O,arrowHeight:k}),h&&ln({strategy:`referenceHidden`,...P})]}),[te,B]=ju(ee),ne=w(_);R(()=>{L&&ne?.()},[L,ne]);let V=z.arrow?.x,H=z.arrow?.y,re=z.arrow?.centerOffset!==0,[ie,U]=o.useState();return R(()=>{b&&U(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:L?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(Cu,{scope:n,placedSide:te,onArrowChange:E,arrowX:V,arrowY:H,shouldHideArrow:re,children:(0,d.jsx)(S.div,{"data-side":te,"data-align":B,...v,ref:C,style:{...v.style,animation:L?void 0:`none`}})})})});Tu.displayName=Su;var Eu=`PopperArrow`,Du={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ou=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=wu(Eu,n),a=Du[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(pu,{...r,ref:t,style:{...r.style,display:`block`}})})});Ou.displayName=Eu;function ku(e){return e!==null}var Au=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ju(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function ju(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Mu=yu,Nu=xu,Pu=Tu,Fu=Ou;function Iu(e){let t=Lu(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(zu);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Lu(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=Vu(n),i=Bu(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ru=Symbol(`radix.slottable`);function zu(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ru}function Bu(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Vu(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)}function Hu(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Uu=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Wu=`VisuallyHidden`,Gu=o.forwardRef((e,t)=>(0,d.jsx)(S.span,{...e,ref:t,style:{...Uu,...e.style}}));Gu.displayName=Wu;var Ku=[` `,`Enter`,`ArrowUp`,`ArrowDown`],qu=[` `,`Enter`],Ju=`Select`,[Yu,Xu,Zu]=cu(Ju),[Qu,$u]=p(Ju,[Zu,gu]),ed=gu(),[td,nd]=Qu(Ju),[rd,id]=Qu(Ju),ad=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=ed(t),[v,y]=o.useState(null),[b,x]=o.useState(null),[S,C]=o.useState(!1),w=uu(u),[T,E]=Kn({prop:r,defaultProp:i??!1,onChange:a,caller:Ju}),[D,O]=Kn({prop:s,defaultProp:c,onChange:l,caller:Ju}),k=o.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=o.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,d.jsx)(Mu,{..._,children:(0,d.jsxs)(td,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:B(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,d.jsx)(Yu.Provider,{scope:t,children:(0,d.jsx)(rd,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:o.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,d.jsxs)(ef,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,d.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};ad.displayName=Ju;var od=`SelectTrigger`,sd=o.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=ed(n),c=nd(od,n),l=c.disabled||r,f=u(t,c.onTriggerChange),p=Xu(n),m=o.useRef(`touch`),[h,g,_]=nf(e=>{let t=p().filter(e=>!e.disabled),n=rf(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),v=e=>{l||(c.onOpenChange(!0),_()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,d.jsx)(Nu,{asChild:!0,...a,children:(0,d.jsx)(S.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":tf(c.value)?``:void 0,...i,ref:f,onClick:s(i.onClick,e=>{e.currentTarget.focus(),m.current!==`mouse`&&v(e)}),onPointerDown:s(i.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(v(e),e.preventDefault())}),onKeyDown:s(i.onKeyDown,e=>{let t=h.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&g(e.key),!(t&&e.key===` `)&&Ku.includes(e.key)&&(v(),e.preventDefault())})})})});sd.displayName=od;var cd=`SelectValue`,ld=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=nd(cd,n),{onValueNodeHasChildrenChange:l}=c,f=a!==void 0,p=u(t,c.onValueNodeChange);return R(()=>{l(f)},[l,f]),(0,d.jsx)(S.span,{...s,ref:p,style:{pointerEvents:`none`},children:tf(c.value)?(0,d.jsx)(d.Fragment,{children:o}):a})});ld.displayName=cd;var ud=`SelectIcon`,dd=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,d.jsx)(S.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});dd.displayName=ud;var fd=`SelectPortal`,pd=e=>(0,d.jsx)(Rn,{asChild:!0,...e});pd.displayName=fd;var md=`SelectContent`,hd=o.forwardRef((e,t)=>{let n=nd(md,e.__scopeSelect),[r,i]=o.useState();if(R(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?h.createPortal((0,d.jsx)(_d,{scope:e.__scopeSelect,children:(0,d.jsx)(Yu.Slot,{scope:e.__scopeSelect,children:(0,d.jsx)(`div`,{children:e.children})})}),t):null}return(0,d.jsx)(xd,{...e,ref:t})});hd.displayName=md;var gd=10,[_d,vd]=Qu(md),yd=`SelectContentImpl`,bd=Iu(`SelectContent.RemoveScroll`),xd=o.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:c,side:l,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:_,sticky:v,hideWhenDetached:y,avoidCollisions:b,...x}=e,S=nd(md,n),[C,w]=o.useState(null),[T,E]=o.useState(null),D=u(t,e=>w(e)),[O,k]=o.useState(null),[A,j]=o.useState(null),N=Xu(n),[P,F]=o.use
vendor: 11,743 bytes, line 45
45State(!1),I=o.useRef(!1);o.useEffect(()=>{if(C)return ja(C)},[C]),di();let ee=o.useCallback(e=>{let[t,...n]=N().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&T&&(T.scrollTop=0),n===r&&T&&(T.scrollTop=T.scrollHeight),n?.focus(),document.activeElement!==i))return},[N,T]),L=o.useCallback(()=>ee([O,C]),[ee,O,C]);o.useEffect(()=>{P&&L()},[P,L]);let{onOpenChange:R,triggerPointerDownPosRef:z}=S;o.useEffect(()=>{if(C){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():C.contains(n.target)||R(!1),document.removeEventListener(`pointermove`,t),z.current=null};return z.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[C,R,z]),o.useEffect(()=>{let e=()=>R(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[R]);let[te,B]=nf(e=>{let t=N().filter(e=>!e.disabled),n=rf(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=o.useCallback((e,t,n)=>{let r=!I.current&&!n;(S.value!==void 0&&S.value===t||r)&&(k(e),r&&(I.current=!0))},[S.value]),V=o.useCallback(()=>C?.focus(),[C]),H=o.useCallback((e,t,n)=>{let r=!I.current&&!n;(S.value!==void 0&&S.value===t||r)&&j(e)},[S.value]),re=r===`popper`?Td:Cd,ie=re===Td?{side:l,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:_,sticky:v,hideWhenDetached:y,avoidCollisions:b}:{};return(0,d.jsx)(_d,{scope:n,content:C,viewport:T,onViewportChange:E,itemRefCallback:ne,selectedItem:O,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:L,selectedItemText:A,position:r,isPositioned:P,searchRef:te,children:(0,d.jsx)(Sa,{as:bd,allowPinchZoom:!0,children:(0,d.jsx)(Qr,{asChild:!0,trapped:S.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:s(i,e=>{S.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,d.jsx)(M,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:(0,d.jsx)(re,{role:`listbox`,id:S.contentId,"data-state":S.open?`open`:`closed`,dir:S.dir,onContextMenu:e=>e.preventDefault(),...x,...ie,onPlaced:()=>F(!0),ref:D,style:{display:`flex`,flexDirection:`column`,outline:`none`,...x.style},onKeyDown:s(x.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&B(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})});xd.displayName=yd;var Sd=`SelectItemAlignedPosition`,Cd=o.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=nd(md,n),s=vd(md,n),[c,l]=o.useState(null),[f,p]=o.useState(null),m=u(t,e=>p(e)),h=Xu(n),g=o.useRef(!1),_=o.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,C=o.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&f&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-gd,d=tu(a,[gd,Math.max(gd,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-gd,d=tu(a,[gd,Math.max(gd,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=h(),s=window.innerHeight-gd*2,l=v.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=d+p+l+_+m,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-gd,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=d+p+k,j=x-A;if(A<=E){let e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=f.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+m);c.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,d+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${gd}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,f,v,y,b,a.dir,r]);R(()=>C(),[C]);let[w,T]=o.useState();return R(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]),(0,d.jsx)(Ed,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:o.useCallback(e=>{e&&_.current===!0&&(C(),x?.(),_.current=!1)},[C,x]),children:(0,d.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:w},children:(0,d.jsx)(S.div,{...i,ref:m,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Cd.displayName=Sd;var wd=`SelectPopperPosition`,Td=o.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=gd,...a}=e,o=ed(n);return(0,d.jsx)(Pu,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Td.displayName=wd;var[Ed,Dd]=Qu(md,{}),Od=`SelectViewport`,kd=o.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=vd(Od,n),c=Dd(Od,n),l=u(t,a.onViewportChange),f=o.useRef(0);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,d.jsx)(Yu.Slot,{scope:n,children:(0,d.jsx)(S.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:s(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(f.current-t.scrollTop);if(e>0){let r=window.innerHeight-gd*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}f.current=t.scrollTop})})})]})});kd.displayName=Od;var Ad=`SelectGroup`,[jd,Md]=Qu(Ad),Nd=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=B();return(0,d.jsx)(jd,{scope:n,id:i,children:(0,d.jsx)(S.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Nd.displayName=Ad;var Pd=`SelectLabel`,Fd=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Md(Pd,n);return(0,d.jsx)(S.div,{id:i.id,...r,ref:t})});Fd.displayName=Pd;var Id=`SelectItem`,[Ld,Rd]=Qu(Id),zd=o.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...c}=e,l=nd(Id,n),f=vd(Id,n),p=l.value===r,[m,h]=o.useState(a??``),[g,_]=o.useState(!1),v=u(t,e=>f.itemRefCallback?.(e,r,i)),y=B(),b=o.useRef(`touch`),x=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,d.jsx)(Ld,{scope:n,value:r,disabled:i,textId:y,isSelected:p,onItemTextChange:o.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,d.jsx)(Yu.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,d.jsx)(S.div,{role:`option`,"aria-labelledby":y,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...c,ref:v,onFocus:s(c.onFocus,()=>_(!0)),onBlur:s(c.onBlur,()=>_(!1)),onClick:s(c.onClick,()=>{b.current!==`mouse`&&x()}),onPointerUp:s(c.onPointerUp,()=>{b.current===`mouse`&&x()}),onPointerDown:s(c.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:s(c.onPointerMove,e=>{b.current=e.pointerType,i?f.onItemLeave?.():b.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:s(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:s(c.onKeyDown,e=>{f.searchRef?.current!==``&&e.key===` `||(qu.includes(e.key)&&x(),e.key===` `&&e.preventDefault())})})})})});zd.displayName=Id;var Bd=`SelectItemText`,Vd=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,s=nd(Bd,n),c=vd(Bd,n),l=Rd(Bd,n),f=id(Bd,n),[p,m]=o.useState(null),g=u(t,e=>m(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),_=p?.textContent,v=o.useMemo(()=>(0,d.jsx)(`option`,{value:l.value,disabled:l.disabled,children:_},l.value),[l.disabled,l.value,_]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return R(()=>(y(v),()=>b(v)),[y,b,v]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(S.span,{id:l.textId,...a,ref:g}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?h.createPortal(a.children,s.valueNode):null]})});Vd.displayName=Bd;var Hd=`SelectItemIndicator`,Ud=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Rd(Hd,n).isSelected?(0,d.jsx)(S.span,{"aria-hidden":!0,...r,ref:t}):null});Ud.displayName=Hd;var Wd=`SelectScrollUpButton`,Gd=o.forwardRef((e,t)=>{let n=vd(Wd,e.__scopeSelect),r=Dd(Wd,e.__scopeSelect),[i,a]=o.useState(!1),s=u(t,r.onScrollButtonChange);return R(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,d.jsx)(Jd,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Gd.displayName=Wd;var Kd=`SelectScrollDownButton`,qd=o.forwardRef((e,t)=>{let n=vd(Kd,e.__scopeSelect),r=Dd(Kd,e.__scopeSelect),[i,a]=o.useState(!1),s=u(t,r.onScrollButtonChange);return R(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,d.jsx)(Jd,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});qd.displayName=Kd;var Jd=o.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=vd(`SelectScrollButton`,n),c=o.useRef(null),l=Xu(n),u=o.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return o.useEffect(()=>()=>u(),[u]),R(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,d.jsx)(S.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:s(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:s(i.onPointerMove,()=>{a.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:s(i.onPointerLeave,()=>{u()})})}),Yd=`SelectSeparator`,Xd=o.forwardRef((e,t)=>
45{let{__scopeSelect:n,...r}=e;return(0,d.jsx)(S.div,{"aria-hidden":!0,...r,ref:t})});Xd.displayName=Yd;var Zd=`SelectArrow`,Qd=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=ed(n),a=nd(Zd,n),o=vd(Zd,n);return a.open&&o.position===`popper`?(0,d.jsx)(Fu,{...i,...r,ref:t}):null});Qd.displayName=Zd;var $d=`SelectBubbleInput`,ef=o.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=o.useRef(null),a=u(r,i),s=Hu(t);return o.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(s!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,d.jsx)(S.select,{...n,style:{...Uu,...n.style},ref:a,defaultValue:t})});ef.displayName=$d;function tf(e){return e===``||e===void 0}function nf(e){let t=w(e),n=o.useRef(``),r=o.useRef(0),i=o.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=o.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function rf(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=af(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function af(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var of=ad,sf=sd,cf=ld,lf=dd,uf=pd,df=hd,ff=kd,pf=Fd,mf=zd,hf=Vd,gf=Ud,_f=Gd,vf=qd,yf=Xd;function bf(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,l=o.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})};s.displayName=t+`Provider`;function c(n,s){let c=s?.[e]?.[a]||i,l=o.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,xf(i,...t)]}function xf(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Sf=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Vr(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Cf=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),wf=t(((e,t)=>{t.exports=Cf()}))();function Tf(){return(0,wf.useSyncExternalStore)(Ef,()=>!0,()=>!1)}function Ef(){return()=>{}}var Df=`Avatar`,[Of,kf]=bf(Df),[Af,jf]=Of(Df),Mf=o.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=o.useState(`idle`);return(0,d.jsx)(Af,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,d.jsx)(Sf.span,{...r,ref:t})})});Mf.displayName=Df;var Nf=`AvatarImage`,Pf=o.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=jf(Nf,n),s=Rf(r,a),c=w(e=>{i(e),o.onImageLoadingStatusChange(e)}
45);return R(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,d.jsx)(Sf.img,{...a,ref:t,src:r}):null});Pf.displayName=Nf;var Ff=`AvatarFallback`,If=o.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=jf(Ff,n),[s,c]=o.useState(r===void 0);return o.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(e)}},[r]),s&&a.imageLoadingStatus!==`loaded`?(0,d.jsx)(Sf.span,{...i,ref:t}):null});If.displayName=Ff;function Lf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function Rf(e,{referrerPolicy:t,crossOrigin:n}){let r=Tf(),i=o.useRef(null),a=r?(i.current||=new window.Image,i.current):null,[s,c]=o.useState(()=>Lf(a,e));return R(()=>{c(Lf(a,e))},[a,e]),R(()=>{let e=e=>()=>{c(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),s}var zf=Mf,Bf=Pf,Vf=If,Hf=`Collapsible`,[Uf,Wf]=p(Hf),[Gf,Kf]=Uf(Hf),qf=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:s,...c}=e,[l,u]=Kn({prop:r,defaultProp:i??!1,onChange:s,caller:Hf});return(0,d.jsx)(Gf,{scope:n,disabled:a,contentId:B(),open:l,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:(0,d.jsx)(S.div,{"data-state":$f(l),"data-disabled":a?``:void 0,...c,ref:t})})});qf.displayName=Hf;var Jf=`CollapsibleTrigger`,Yf=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Kf(Jf,n);return(0,d.jsx)(S.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":$f(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:s(e.onClick,i.onOpenToggle)})});Yf.displayName=Jf;var Xf=`CollapsibleContent`,Zf=o.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Kf(Xf,e.__scopeCollapsible);return(0,d.jsx)(G,{present:n||i.open,children:({present:e})=>(0,d.jsx)(Qf,{...r,ref:t,present:e})})});Zf.displayName=Xf;var Qf=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,s=Kf(Xf,n),[c,l]=o.useState(r),f=o.useRef(null),p=u(t,f),m=o.useRef(0),h=m.current,g=o.useRef(0),_=g.current,v=s.open||c,y=o.useRef(v),b=o.useRef(void 0);return o.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),R(()=>{let e=f.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();m.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),l(r)}},[s.open,r]),(0,d.jsx)(S.div,{"data-state":$f(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!v,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:v&&i})});function $f(e){return e?`open`:`closed`}var ep=qf,tp=Yf,np=Zf,rp=`Accordion`,ip=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[ap,op,sp]=cu(rp),[cp,lp]=p(rp,[sp,Wf]),up=Wf(),dp=o.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,d.jsx)(ap.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,d.jsx)(_p,{...a,ref:t}):(0,d.jsx)(gp,{...i,ref:t})})});dp.displayName=rp;var[fp,pp]=cp(rp),[mp,hp]=cp(rp,{collapsible:!1}),gp=o.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...s}=e,[c,l]=Kn({prop:n,defaultProp:r??``,onChange:i,caller:rp});return(0,d.jsx)(fp,{scope:e.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:o.useCallback(()=>a&&l(``),[a,l]),children:(0,d.jsx)(mp,{scope:e.__scopeAccordion,collapsible:a,children:(0,d.jsx)(bp,{...s,ref:t})})})}),_p=o.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[s,c]=Kn({prop:n,defaultProp:r??[],onChange:i,caller:rp}),l=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,d.jsx)(fp,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:(0,d.jsx)(mp,{scope:e.__scopeAccordion,collapsible:!0,children:(0,d.jsx)(bp,{...a,ref:t})})})}),[vp,yp]=cp(rp),bp=o.forwardRef((e,t)=>
45{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...c}=e,l=u(o.useRef(null),t),f=op(n),p=uu(i)===`ltr`,m=s(e.onKeyDown,e=>{if(!ip.includes(e.key))return;let t=e.target,n=f().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,c=()=>{o=r+1,o>s&&(o=0)},l=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(p?c():l());break;case`ArrowDown`:a===`vertical`&&c();break;case`ArrowLeft`:a===`horizontal`&&(p?l():c());break;case`ArrowUp`:a===`vertical`&&l();break}n[o%i].ref.current?.focus()});return(0,d.jsx)(vp,{scope:n,disabled:r,direction:i,orientation:a,children:(0,d.jsx)(ap.Slot,{scope:n,children:(0,d.jsx)(S.div,{...c,"data-orientation":a,ref:l,onKeyDown:r?void 0:m})})})}),xp=`AccordionItem`,[Sp,Cp]=cp(xp),wp=o.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=yp(xp,n),o=pp(xp,n),s=up(n),c=B(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,d.jsx)(Sp,{scope:n,open:l,disabled:u,triggerId:c,children:(0,d.jsx)(ep,{"data-orientation":a.orientation,"data-state":jp(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});wp.displayName=xp;var Tp=`AccordionHeader`,Ep=o.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=yp(rp,n),a=Cp(Tp,n);return(0,d.jsx)(S.h3,{"data-orientation":i.orientation,"data-state":jp(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});Ep.displayName=Tp;var Dp=`AccordionTrigger`,Op=o.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=yp(rp,n),a=Cp(Dp,n),o=hp(Dp,n),s=up(n);return(0,d.jsx)(ap.ItemSlot,{scope:n,children:(0,d.jsx)(tp,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});Op.displayName=Dp;var kp=`AccordionContent`,Ap=o.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=yp(rp,n),a=Cp(kp,n),o=up(n);return(0,d.jsx)(np,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});Ap.displayName=kp;function jp(e){return e?`open`:`closed`}var Mp=dp,Np=wp,Pp=Ep,Fp=Op,Ip=Ap,Lp=`Arrow`,Rp=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(S.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Rp.displayName=Lp;var zp=Rp,Bp=`Popper`,[Vp,Hp]=p(Bp),[Up,Wp]=Vp(Bp),Gp=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,d.jsx)(Up,{scope:t,anchor:r,onAnchorChange:i,children:n})};Gp.displayName=Bp;var Kp=`PopperAnchor`,qp=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Wp(Kp,n),s=o.useRef(null),c=u(t,s),l=o.useRef(null);return o.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,d.jsx)(S.div,{...i,ref:c})});qp.displayName=Kp;var Jp=`PopperContent`,[Yp,Xp]=Vp(Jp),Zp=o.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=Wp(Jp,n),[b,x]=o.useState(null),C=u(t,e=>x(e)),[T,E]=o.useState(null),D=mn(T),O=D?.width??0,k=D?.height??0,A=r+(a===`center`?``:`-`+a),j=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(f)?f:[f],N=M.length>0,P={padding:j,boundary:M.filter(tm),altBoundary:N},{refs:F,floatingStyles:I,placement:ee,isPositioned:L,middlewareData:z}=tn({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>Vt(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[rn({mainAxis:i+k,alignmentAxis:s}),l&&an({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?on():void 0,...P}),l&&sn({...P}),cn({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&un({element:T,padding:c}),nm({arrowWidth:O,arrowHeight:k}),h&&ln({strategy:`referenceHidden`,...P})]}),[te,B]=rm(ee),ne=w(_);R(()=>{L&&ne?.()},[L,ne]);let V=z.arrow?.x,H=z.arrow?.y,re=z.arrow?.centerOffset!==0,[ie,U]=o.useState();return R(()=>{b&&U(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:L?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(Yp,{scope:n,placedSide:te,onArrowChange:E,arrowX:V,arrowY:H,shouldHideArrow:re,children:(0,d.jsx)(S.div,{"data-side":te,"data-align":B,...v,ref:C,style:{...v.style,animation:L?void 0:`none`}})})})});Zp.displayName=Jp;var Qp=`PopperArrow`,$p={top:`bottom`,right:`left`,bottom:`top`,left:`right`},em=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Xp(Qp,n),a=$p[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(zp,{...r,ref:t,style:{...r.style,display:`block`}})})});em.displayName=Qp;function tm(e){return e!==null}var nm=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=rm(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function rm(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var im=Gp,am=qp,om=Zp,sm=em,cm=`rovingFocusGroup.onEntryFocus`,lm={bubbles:!1,cancelable:!0},um=`RovingFocusGroup`,[dm,fm,pm]=cu(um),[mm,hm]=p(um,[pm]),[gm,_m]=mm(um),vm=o.forwardRef((e,t)=>
vendor: 4,197 bytes, line 45
45(0,d.jsx)(dm.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(dm.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(ym,{...e,ref:t})})}));vm.displayName=um;var ym=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,g=o.useRef(null),_=u(t,g),v=uu(a),[y,b]=Kn({prop:c,defaultProp:l??null,onChange:f,caller:um}),[x,C]=o.useState(!1),T=w(p),E=fm(n),D=o.useRef(!1),[O,k]=o.useState(0);return o.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(cm,T),()=>e.removeEventListener(cm,T)},[T]),(0,d.jsx)(gm,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:y,onItemFocus:o.useCallback(e=>b(e),[b]),onItemShiftTab:o.useCallback(()=>C(!0),[]),onFocusableItemAdd:o.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>k(e=>e-1),[]),children:(0,d.jsx)(S.div,{tabIndex:x||O===0?-1:0,"data-orientation":r,...h,ref:_,style:{outline:`none`,...e.style},onMouseDown:s(e.onMouseDown,()=>{D.current=!0}),onFocus:s(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(cm,lm);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);Tm([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),m)}}D.current=!1}),onBlur:s(e.onBlur,()=>C(!1))})})}),bm=`RovingFocusGroupItem`,xm=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:c,...l}=e,u=B(),f=a||u,p=_m(bm,n),m=p.currentTabStopId===f,h=fm(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p;return o.useEffect(()=>{if(r)return g(),()=>_()},[r,g,_]),(0,d.jsx)(dm.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,d.jsx)(S.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:s(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:s(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:s(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=wm(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?Em(n,r+1):n.slice(r+1)}setTimeout(()=>Tm(n))}}),children:typeof c==`function`?c({isCurrentTabStop:m,hasTabStop:v!=null}):c})})});xm.displayName=bm;var Sm={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Cm(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function wm(e,t,n){let r=Cm(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Sm[r]}function Tm(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Em(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Dm=vm,Om=xm;function km(e){let t=Am(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(Mm);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,d.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Am(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=Pm(n),i=Nm(r,n.props);return n.type!==o.Fragment&&(i.ref=t?l(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jm=Symbol(`radix.slottable`);function Mm(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===jm}function Nm(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}
vendor: 17,978 bytes, line 45
45:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Pm(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 Fm=[`Enter`,` `],Im=[`ArrowDown`,`PageUp`,`Home`],Lm=[`ArrowUp`,`PageDown`,`End`],Rm=[...Im,...Lm],zm={ltr:[...Fm,`ArrowRight`],rtl:[...Fm,`ArrowLeft`]},Bm={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Vm=`Menu`,[Hm,Um,Wm]=cu(Vm),[Gm,Km]=p(Vm,[Wm,Hp,hm]),qm=Hp(),Jm=hm(),[Ym,Xm]=Gm(Vm),[Zm,Qm]=Gm(Vm),$m=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:s=!0}=e,c=qm(t),[l,u]=o.useState(null),f=o.useRef(!1),p=w(a),m=uu(i);return o.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,d.jsx)(im,{...c,children:(0,d.jsx)(Ym,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u,children:(0,d.jsx)(Zm,{scope:t,onClose:o.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:r})})})};$m.displayName=Vm;var eh=`MenuAnchor`,th=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=qm(n);return(0,d.jsx)(am,{...i,...r,ref:t})});th.displayName=eh;var nh=`MenuPortal`,[rh,ih]=Gm(nh,{forceMount:void 0}),ah=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Xm(nh,t);return(0,d.jsx)(rh,{scope:t,forceMount:n,children:(0,d.jsx)(G,{present:n||a.open,children:(0,d.jsx)(Rn,{asChild:!0,container:i,children:r})})})};ah.displayName=nh;var oh=`MenuContent`,[sh,ch]=Gm(oh),lh=o.forwardRef((e,t)=>{let n=ih(oh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Xm(oh,e.__scopeMenu),o=Qm(oh,e.__scopeMenu);return(0,d.jsx)(Hm.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(G,{present:r||a.open,children:(0,d.jsx)(Hm.Slot,{scope:e.__scopeMenu,children:o.modal?(0,d.jsx)(uh,{...i,ref:t}):(0,d.jsx)(dh,{...i,ref:t})})})})}),uh=o.forwardRef((e,t)=>{let n=Xm(oh,e.__scopeMenu),r=o.useRef(null),i=u(t,r);return o.useEffect(()=>{let e=r.current;if(e)return ja(e)},[]),(0,d.jsx)(ph,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dh=o.forwardRef((e,t)=>{let n=Xm(oh,e.__scopeMenu);return(0,d.jsx)(ph,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),fh=km(`MenuContent.ScrollLock`),ph=o.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:_,disableOutsideScroll:v,...y}=e,b=Xm(oh,n),x=Qm(oh,n),S=qm(n),C=Jm(n),w=Um(n),[T,E]=o.useState(null),D=o.useRef(null),O=u(t,D,b.onContentChange),k=o.useRef(0),A=o.useRef(``),j=o.useRef(0),N=o.useRef(null),P=o.useRef(`right`),F=o.useRef(0),I=v?Sa:o.Fragment,ee=v?{as:fh,allowPinchZoom:!0}:void 0,L=e=>{let t=A.current+e,n=w().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Zh(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){A.current=t,window.clearTimeout(k.current),t!==``&&(k.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};o.useEffect(()=>()=>window.clearTimeout(k.current),[]),di();let R=o.useCallback(e=>P.current===N.current?.side&&$h(e,N.current?.area),[]);return(0,d.jsx)(sh,{scope:n,searchRef:A,onItemEnter:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:o.useCallback(e=>{R(e)||(D.current?.focus(),E(null))},[R]),onTriggerLeave:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:j,onPointerGraceIntentChange:o.useCallback(e=>{N.current=e},[]),children:(0,d.jsx)(I,{...ee,children:(0,d.jsx)(Qr,{asChild:!0,trapped:i,onMountAutoFocus:s(a,e=>{e.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,d.jsx)(M,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:_,children:(0,d.jsx)(Dm,{asChild:!0,...C,dir:x.dir,orientation:`vertical`,loop:r,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:s(f,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,d.jsx)(om,{role:`menu`,"aria-orientation":`vertical`,"data-state":Kh(b.open),"data-radix-menu-content":``,dir:x.dir,...S,...y,ref:O,style:{outline:`none`,...y.style},onKeyDown:s(y.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=D.current;if(e.target!==i||!Rm.includes(e.key))return;e.preventDefault();let a=w().filter(e=>!e.disabled).map(e=>e.ref.current);Lm.includes(e.key)&&a.reverse(),Yh(a)}),onBlur:s(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(k.current),A.current=``)}),onPointerMove:s(e.onPointerMove,eg(e=>{let t=e.target,n=F.current!==e.clientX;e.currentTarget.contains(t)&&n&&(P.current=e.clientX>F.current?`right`:`left`,F.current=e.clientX)}))})})})})})})});lh.displayName=oh;var mh=`MenuGroup`,hh=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(S.div,{role:`group`,...r,ref:t})});hh.displayName=mh;var gh=`MenuLabel`,_h=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(S.div,{...r,ref:t})});_h.displayName=gh;var vh=`MenuItem`,yh=`menu.itemSelect`,bh=o.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=o.useRef(null),c=Qm(vh,e.__scopeMenu),l=ch(vh,e.__scopeMenu),f=u(t,a),p=o.useRef(!1),m=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(yh,{bubbles:!0,cancelable:!0});e.addEventListener(yh,e=>r?.(e),{once:!0}),C(e,t),t.defaultPrevented?p.current=!1:c.onClose()}};return(0,d.jsx)(xh,{...i,ref:f,disabled:n,onClick:s(e.onClick,m),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:s(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:s(e.onKeyDown,e=>{let t=l.searchRef.current!==``;n||t&&e.key===` `||Fm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});bh.displayName=vh;var xh=o.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,c=ch(vh,n),l=Jm(n),f=o.useRef(null),p=u(t,f),[m,h]=o.useState(!1),[g,_]=o.useState(``);return o.useEffect(()=>{let e=f.current;e&&_((e.textContent??``).trim())},[a.children]),(0,d.jsx)(Hm.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:(0,d.jsx)(Om,{asChild:!0,...l,focusable:!r,children:(0,d.jsx)(S.div,{role:`menuitem`,"data-highlighted":m?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:p,onPointerMove:s(e.onPointerMove,eg(e=>{r?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:s(e.onPointerLeave,eg(e=>c.onItemLeave(e))),onFocus:s(e.onFocus,()=>h(!0)),onBlur:s(e.onBlur,()=>h(!1))})})})}),Sh=`MenuCheckboxItem`,Ch=o.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,d.jsx)(jh,{scope:e.__scopeMenu,checked:n,children:(0,d.jsx)(bh,{role:`menuitemcheckbox`,"aria-checked":qh(n)?`mixed`:n,...i,ref:t,"data-state":Jh(n),onSelect:s(i.onSelect,()=>r?.(qh(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ch.displayName=Sh;var wh=`MenuRadioGroup`,[Th,Eh]=Gm(wh,{value:void 0,onValueChange:()=>{}}),Dh=o.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=w(r);return(0,d.jsx)(Th,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,d.jsx)(hh,{...i,ref:t})})});Dh.displayName=wh;var Oh=`MenuRadioItem`,kh=o.forwardRef((e,t)=>{let{value:n,...r}=e,i=Eh(Oh,e.__scopeMenu),a=n===i.value;return(0,d.jsx)(jh,{scope:e.__scopeMenu,checked:a,children:(0,d.jsx)(bh,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Jh(a),onSelect:s(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});kh.displayName=Oh;var Ah=`MenuItemIndicator`,[jh,Mh]=Gm(Ah,{checked:!1}),Nh=o.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Mh(Ah,n);return(0,d.jsx)(G,{present:r||qh(a.checked)||a.checked===!0,children:(0,d.jsx)(S.span,{...i,ref:t,"data-state":Jh(a.checked)})})});Nh.displayName=Ah;var Ph=`MenuSeparator`,Fh=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(S.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Fh.displayName=Ph;var Ih=`MenuArrow`,Lh=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=qm(n);return(0,d.jsx)(sm,{...i,...r,ref:t})});Lh.displayName=Ih;var Rh=`MenuSub`,[zh,Bh]=Gm(Rh),Vh=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Xm(Rh,t),s=qm(t),[c,l]=o.useState(null),[u,f]=o.useState(null),p=w(i);return o.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,d.jsx)(im,{...s,children:(0,d.jsx)(Ym,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:f,children:(0,d.jsx)(zh,{scope:t,contentId:B(),triggerId:B(),trigger:c,onTriggerChange:l,children:n})})})};Vh.displayName=Rh;var Hh=`MenuSubTrigger`,Uh=o.forwardRef((e,t)=>{let n=Xm(Hh,e.__scopeMenu),r=Qm(Hh,e.__scopeMenu),i=Bh(Hh,e.__scopeMenu),a=ch(Hh,e.__scopeMenu),c=o.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=a,p={__scopeMenu:e.__scopeMenu},m=o.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return o.useEffect(()=>m,[m]),o.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),f(null)}},[u,f]),(0,d.jsx)(th,{asChild:!0,...p,children:(0,d.jsx)(xh,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Kh(n.open),...e,ref:l(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:s(e.onPointerMove,eg(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(a.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:s(e.onPointerLeave,eg(e=>{m();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,s=t[i?`left`:`right`],c=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:s(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||zm[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Uh.displayName=Hh;var Wh=`MenuSubContent`,Gh=o.forwardRef((e,t)=>{let n=ih(oh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Xm(oh,e.__scopeMenu),c=Qm(oh,e.__scopeMenu),l=Bh(Wh,e.__scopeMenu),f=o.useRef(null),p=u(t,f);return(0,d.jsx)(Hm.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(G,{present:r||a.open,children:(0,d.jsx)(Hm.Slot,{scope:e.__scopeMenu,children:(0,d.jsx)(ph,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:p,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&f.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:s(e.onFocusOutside,e=>{e.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:s(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Bm[c.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});Gh.displayName=Wh;function Kh(e){return e?`open`:`closed`}function qh(e){return e===`indeterminate`}function Jh(e){return qh(e)?`indeterminate`:e?`checked`:`unchecked`}function Yh(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Xh(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Qh(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function $h(e,t){return t?Qh({x:e.clientX,y:e.clientY},t):!1}function eg(e){return t=>t.pointerType===`mouse`?e(t):void 0}var tg=$m,ng=th,rg=ah,ig=lh,ag=hh,og=_h,sg=bh,cg=Ch,lg=Dh,ug=kh,dg=Nh,fg=Fh,pg=Lh,mg=Uh,hg=Gh,gg=`DropdownMenu`,[_g,vg]=p(gg,[Km]),Z=Km(),[yg,bg]=_g(gg),xg=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=Z(t),u=o.useRef(null),[f,p]=Kn({prop:i,defaultProp:a??!1,onChange:s,caller:gg});return(0,d.jsx)(yg,{scope:t,triggerId:B(),triggerRef:u,contentId:B(),open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),modal:c,children:(0,d.jsx)(tg,{...l,open:f,onOpenChange:p,dir:r,modal:c,children:n})})};xg.displayName=gg;var Sg=`DropdownMenuTrigger`,Cg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=bg(Sg,n),o=Z(n);return(0,d.jsx)(ng,{asChild:!0,...o,children:(0,d.jsx)(S.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:l(t,a.triggerRef),onPointerDown:s(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:s(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Cg.displayName=Sg;var wg=`DropdownMenuPortal`,Tg=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Z(t);return(0,d.jsx)(rg,{...r,...n})};Tg.displayName=wg;var Eg=`DropdownMenuContent`,Dg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=bg(Eg,n),a=Z(n),c=o.useRef(!1);return(0,d.jsx)(ig,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:s(e.onCloseAutoFocus,e=>{c.current||i.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:s(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Dg.displayName=Eg;var Og=`DropdownMenuGroup`,kg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(ag,{...i,...r,ref:t})});kg.displayName=Og;var Ag=`DropdownMenuLabel`,jg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(og,{...i,...r,ref:t})});jg.displayName=Ag;var Mg=`DropdownMenuItem`,Ng=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(sg,{...i,...r,ref:t})});Ng.displayName=Mg;var Pg=`DropdownMenuCheckboxItem`,Fg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(cg,{...i,...r,ref:t})});Fg.displayName=Pg;var Ig=`DropdownMenuRadioGroup`,Lg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(lg,{...i,...r,ref:t})});Lg.displayName=Ig;var Rg=`DropdownMenuRadioItem`,zg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(ug,{...i,...r,ref:t})});zg.displayName=Rg;var Bg=`DropdownMenuItemIndicator`,Vg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(dg,{...i,...r,ref:t})});Vg.displayName=Bg;var Hg=`DropdownMenuSeparator`,Ug=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(fg,{...i,...r,ref:t})});Ug.displayName=Hg;var Wg=`DropdownMenuArrow`,Gg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(pg,{...i,...r,ref:t})});Gg.displayName=Wg;var Kg=`DropdownMenuSubTrigger`,qg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(mg,{...i,...r,ref:t})});qg.displayName=Kg;var Jg=`DropdownMenuSubContent`,Yg=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,d.jsx)(hg,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Yg.displayName=Jg;var Xg=xg,Zg=Cg,Qg=Tg,$g=Dg,e_=jg,t_=Ng,n_=Fg,r_=Lg,i_=zg,a_=Vg,o_=Ug,s_=qg,c_=Yg,l_=`Tabs`,[u_,d_]=p(l_,[hm]),f_=hm(),[p_,m_]=u_(l_),h_=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=uu(s),[f,p]=Kn({prop:r,onChange:i,defaultProp:a??``,caller:l_});return(0,d.jsx)(p_,{scope:n,baseId:B(),value:f,onValueChange:p,orientation:o,dir:u,activationMode:c,children:(0,d.jsx)(S.div,{dir:u,"data-orientation":o,...l,ref:t})})});h_.displayName=l_;var g_=`TabsList`,__=o.forwardRef((e,t)=>
vendor: 6,982 bytes, line 45
45{let{__scopeTabs:n,loop:r=!0,...i}=e,a=m_(g_,n),o=f_(n);return(0,d.jsx)(Dm,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,d.jsx)(S.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});__.displayName=g_;var v_=`TabsTrigger`,y_=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=m_(v_,n),c=f_(n),l=S_(o.baseId,r),u=C_(o.baseId,r),f=r===o.value;return(0,d.jsx)(Om,{asChild:!0,...c,focusable:!i,active:f,children:(0,d.jsx)(S.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":u,"data-state":f?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:l,...a,ref:t,onMouseDown:s(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:s(e.onFocus,()=>{let e=o.activationMode!==`manual`;!f&&!i&&e&&o.onValueChange(r)})})})});y_.displayName=v_;var b_=`TabsContent`,x_=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=m_(b_,n),l=S_(c.baseId,r),u=C_(c.baseId,r),f=r===c.value,p=o.useRef(f);return o.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,d.jsx)(G,{present:i||f,children:({present:n})=>(0,d.jsx)(S.div,{"data-state":f?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&a})})});x_.displayName=b_;function S_(e,t){return`${e}-trigger-${t}`}function C_(e,t){return`${e}-content-${t}`}var w_=h_,T_=__,E_=y_,D_=x_;function O_(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var k_=[`PageUp`,`PageDown`],A_=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],j_={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},M_=`Slider`,[N_,P_,F_]=cu(M_),[I_,L_]=p(M_,[F_]),[R_,z_]=I_(M_),B_=o.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:c=`horizontal`,disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:_,...v}=e,y=o.useRef(new Set),b=o.useRef(0),x=c===`horizontal`?U_:W_,[S=[],C]=Kn({prop:p,defaultProp:f,onChange:e=>{[...y.current][b.current]?.focus(),m(e)}}),w=o.useRef(S);function T(e){O(e,iv(S,e))}function E(e){O(e,b.current)}function D(){let e=w.current[b.current];S[b.current]!==e&&h(S)}function O(e,t,{commit:n}={commit:!1}){let o=lv(a),s=tu(uv(Math.round((e-r)/a)*a+r,o),[r,i]);C((e=[])=>{let r=tv(e,s,t);if(sv(r,u*a)){b.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}else return e})}return(0,d.jsx)(R_,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:S,orientation:c,form:_,children:(0,d.jsx)(N_.Provider,{scope:e.__scopeSlider,children:(0,d.jsx)(N_.Slot,{scope:e.__scopeSlider,children:(0,d.jsx)(x,{"aria-disabled":l,"data-disabled":l?``:void 0,...v,ref:t,onPointerDown:s(v.onPointerDown,()=>{l||(w.current=S)}),min:r,max:i,inverted:g,onSlideStart:l?void 0:T,onSlideMove:l?void 0:E,onSlideEnd:l?void 0:D,onHomeKeyDown:()=>!l&&O(r,0,{commit:!0}),onEndKeyDown:()=>!l&&O(i,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){let n=k_.includes(e.key)||e.shiftKey&&A_.includes(e.key)?10:1,r=b.current,i=S[r];O(i+a*n*t,r,{commit:!0})}}})})})})});B_.displayName=M_;var[V_,H_]=I_(M_,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),U_=o.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:f,...p}=e,[m,h]=o.useState(null),g=u(t,e=>h(e)),_=o.useRef(void 0),v=uu(i),y=v===`ltr`,b=y&&!a||!y&&a;function x(e){let t=_.current||m.getBoundingClientRect(),i=cv([0,t.width],b?[n,r]:[r,n]);return _.current=t,i(e-t.left)}return(0,d.jsx)(V_,{scope:e.__scopeSlider,startEdge:b?`left`:`right`,endEdge:b?`right`:`left`,direction:b?1:-1,size:`width`,children:(0,d.jsx)(G_,{dir:v,"data-orientation":`horizontal`,...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=x(e.clientX);s?.(t)},onSlideMove:e=>{let t=x(e.clientX);c?.(t)},onSlideEnd:()=>{_.current=void 0,l?.()},onStepKeyDown:e=>{let t=j_[b?`from-left`:`from-right`].includes(e.key);f?.({event:e,direction:t?-1:1})}})})}),W_=o.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...f}=e,p=o.useRef(null),m=u(t,p),h=o.useRef(void 0),g=!i;function _(e){let t=h.current||p.current.getBoundingClientRect(),i=cv([0,t.height],g?[r,n]:[n,r]);return h.current=t,i(e-t.top)}return(0,d.jsx)(V_,{scope:e.__scopeSlider,startEdge:g?`bottom`:`top`,endEdge:g?`top`:`bottom`,size:`height`,direction:g?1:-1,children:(0,d.jsx)(G_,{"data-orientation":`vertical`,...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=_(e.clientY);a?.(t)},onSlideMove:e=>{let t=_(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=j_[g?`from-bottom`:`from-top`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),G_=o.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:c,onStepKeyDown:l,...u}=e,f=z_(M_,n);return(0,d.jsx)(S.span,{...u,ref:t,onKeyDown:s(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(c(e),e.preventDefault()):k_.concat(A_).includes(e.key)&&(l(e),e.preventDefault())}),onPointerDown:s(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),f.thumbs.has(t)?t.focus():r(e)}),onPointerMove:s(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:s(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),K_=`SliderTrack`,q_=o.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=z_(K_,n);return(0,d.jsx)(S.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});q_.displayName=K_;var J_=`SliderRange`,Y_=o.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=z_(J_,n),a=H_(J_,n),s=u(t,o.useRef(null)),c=i.values.length,l=i.values.map(e=>nv(e,i.min,i.max)),f=c>1?Math.min(...l):0,p=100-Math.max(...l);return(0,d.jsx)(S.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:f+`%`,[a.endEdge]:p+`%`}})});Y_.displayName=J_;var X_=`SliderThumb`,Z_=o.forwardRef((e,t)=>{let n=P_(e.__scopeSlider),[r,i]=o.useState(null),a=u(t,e=>i(e)),s=o.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,d.jsx)(Q_,{...e,ref:a,index:s})}),Q_=o.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}
45=e,c=z_(X_,n),l=H_(X_,n),[f,p]=o.useState(null),m=u(t,e=>p(e)),h=f?c.form||!!f.closest(`form`):!0,g=mn(f),_=c.values[r],v=_===void 0?0:nv(_,c.min,c.max),y=rv(r,c.values.length),b=g?.[l.size],x=b?av(b,v,l.direction):0;return o.useEffect(()=>{if(f)return c.thumbs.add(f),()=>{c.thumbs.delete(f)}},[f,c.thumbs]),(0,d.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[l.startEdge]:`calc(${v}% + ${x}px)`},children:[(0,d.jsx)(N_.ItemSlot,{scope:e.__scopeSlider,children:(0,d.jsx)(S.span,{role:`slider`,"aria-label":e[`aria-label`]||y,"aria-valuemin":c.min,"aria-valuenow":_,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?``:void 0,tabIndex:c.disabled?void 0:0,...a,ref:m,style:_===void 0?{display:`none`}:e.style,onFocus:s(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),h&&(0,d.jsx)(ev,{name:i??(c.name?c.name+(c.values.length>1?`[]`:``):void 0),form:c.form,value:_},r)]})});Z_.displayName=X_;var $_=`RadioBubbleInput`,ev=o.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=o.useRef(null),a=u(i,r),s=O_(t);return o.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(s!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,d.jsx)(S.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});ev.displayName=$_;function tv(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function nv(e,t,n){return tu(100/(n-t)*(e-t),[0,100])}function rv(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function iv(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function av(e,t,n){let r=e/2;return(r-cv([0,50],[0,r])(t)*n)*n}function ov(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function sv(e,t){if(t>0){let n=ov(e);return Math.min(...n)>=t}return!0}function cv(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function lv(e){return(String(e).split(`.`)[1]||``).length}function uv(e,t){let n=10**t;return Math.round(e*n)/n}var dv=B_,fv=q_,pv=Y_,mv=Z_,hv=Object.defineProperty,gv=(e,t)=>hv(e,`name`,{value:t,configurable:!0}),_v=!!(typeof window<`u`&&window.document&&window.document.createElement);function vv(e,t,{checkForDefaultPrevented:n=!0}={}){return gv(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}gv(vv,`composeEventHandlers`);function yv(e){if(!_v)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}gv(yv,`getOwnerWindow`);function bv(e){if(!_v)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}gv(bv,`getOwnerDocument`);function xv(e,t=!1){let{activeElement:n}=bv(e);if(!n?.nodeName)return null;if(Sv(n)&&n.contentDocument)return xv(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=bv(n).getElementById(e);if(t)return t}}return n}gv(xv,`getActiveElement`);function Sv(e){return e.tagName===`IFRAME`}gv(Sv,`isFrame`);function Cv(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wv(...e){return t=>{let n=!1,r=e.map(e=>{let r=Cv(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Cv(e[t],null)}}}}function Tv(...e){return o.useCallback(wv(...e),e)}function Ev(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,l=o.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})};s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[a]||i,d=o.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Dv(i,...t)]}function Dv(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}
45function Ov(e){let t=o.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];Fv(r)&&typeof zv==`function`&&(r=zv(r._payload)),o.Children.forEach(r,e=>{if(Nv(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Fv(n)&&typeof zv==`function`&&(n=zv(n._payload)),a=Av(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=o.cloneElement(a,void 0,c):!s&&o.Children.count(r)===1&&o.isValidElement(r)&&(a=r);let l=a?Mv(a):void 0,u=Tv(n,l);if(!a){if(r||r===0)throw Error(s?Rv(e):Lv(e));return r}let d=jv(i,a.props??{});return a.type!==o.Fragment&&(d.ref=n?u:l),o.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var kv=Symbol.for(`radix.slottable`),Av=(e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null};function jv(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Mv(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)}function Nv(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===kv}var Pv=Symbol.for(`react.lazy`);function Fv(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Pv&&`_payload`in e&&Iv(e._payload)}function Iv(e){return typeof e==`object`&&!!e&&`then`in e}var Lv=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Rv=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,zv=o.use,Bv=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ov(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vv(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}function Hv(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Uv=Object.defineProperty,Q=(e,t)=>Uv(e,`name`,{value:t,configurable:!0}),Wv=`dismissableLayer.update`,Gv=`dismissableLayer.pointerDownOutside`,Kv=`dismissableLayer.focusOutside`,qv,Jv=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Yv=o.forwardRef(Q(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,f=o.useContext(Jv),[p,m]=o.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=o.useState({}),_=Tv(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=o.useRef(!1),T=Qv(e=>{a?.(e),c?.(e),e.defaultPrevented||l?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:o.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=$v(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||l?.())},h),D=p?x===v.length-1:!1,O=Hv(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return o.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),o.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qv=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),ey(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=qv))}},[p,h,n,f]),o.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),ey())},[p,f]),o.useEffect(()=>{let e=Q(()=>g({}),`handleUpdate`);return document.addEventListener(Wv,e),()=>document.removeEventListener(Wv,e)},[]),(0,d.jsx)(Bv.div,{...u,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:vv(e.onFocusCapture,E.onFocusCapture),onBlurCapture:vv(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:vv(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function Xv(){let e=o.useContext(Jv),[t,n]=o.useState(null);return o.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Q(Xv,`useDismissableLayerSurface`);var Zv=Q(()=>!0,`IS_TRUE`);function Qv(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=Zv}=t,c=Hv(e),l=o.useRef(!1),u=o.useRef(!1),d=o.useRef(new Map),f=o.useRef(()=>{});return o.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}Q(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}Q(t,`isOutsideInteractionIntercepted`);function o(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}Q(o,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}Q(p,`handleInteractionBubble`);let m=Q(a=>{if(a.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||ty(Gv,c,p,{discrete:!0})};if(Q(o,`handleAndDispatchPointerDownOutsideEvent`),!s(a.target)){n.removeEventListener(`click`,f.current),e(
45),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,o,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,o,!0),n.removeEventListener(e,p)}},[n,c,r,i,a,s]),{onPointerDownCapture:Q(()=>l.current=!0,`onPointerDownCapture`)}}Q(Qv,`usePointerDownOutside`);function $v(e,t=globalThis?.document){let n=Hv(e),r=o.useRef(!1);return o.useEffect(()=>{let e=Q(e=>{e.target&&!r.current&&ty(Kv,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Q(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Q(()=>r.current=!1,`onBlurCapture`)}}Q($v,`useFocusOutside`);function ey(){let e=new CustomEvent(Wv);document.dispatchEvent(e)}Q(ey,`dispatchUpdate`);function ty(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Vv(i,a):i.dispatchEvent(a)}Q(ty,`handleAndDispatchCustomEvent`);var ny=0,ry=null;function iy(){o.useEffect(()=>{ry||={start:ay(),end:ay()};let{start:e,end:t}=ry;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ny++,()=>{ny===1&&(ry?.start.remove(),ry?.end.remove(),ry=null),ny=Math.max(0,ny-1)}},[])}function ay(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function oy(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var sy=Object.defineProperty,$=(e,t)=>sy(e,`name`,{value:t,configurable:!0}),cy=`focusScope.autoFocusOnMount`,ly=`focusScope.autoFocusOnUnmount`,uy={bubbles:!1,cancelable:!0},dy=o.forwardRef($(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[c,l]=o.useState(null),u=oy(i),f=oy(a),p=o.useRef(null),m=Tv(t,l),h=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?p.current=t:vy(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||vy(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&vy(c)};$(e,`handleFocusIn`),$(t,`handleFocusOut`),$(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,h.paused]),o.useEffect(()=>{if(c){yy.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(cy,uy);c.addEventListener(cy,u),c.dispatchEvent(t),t.defaultPrevented||(fy(Sy(my(c)),{select:!0}),document.activeElement===e&&vy(c))}return()=>{c.removeEventListener(cy,u),setTimeout(()=>{let t=new CustomEvent(ly,uy);c.addEventListener(ly,f),c.dispatchEvent(t),t.defaultPrevented||vy(e??document.body,{select:!0}),c.removeEventListener(ly,f),yy.remove(h)},0)}}},[c,u,f,h]);let g=o.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=py(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&vy(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&vy(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(Bv.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})},`FocusScope`));function fy(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(vy(r,{select:t}),document.activeElement!==n)return}$(fy,`focusFirst`);function py(e){let t=my(e);return[hy(t,e),hy(t.reverse(),e)]}$(py,`getTabbableEdges`);function my(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:$(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)}
45);for(;n.nextNode();)t.push(n.currentNode);return t}$(my,`getTabbableCandidates`);function hy(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):gy(r,{upTo:t})))return r}$(hy,`findVisible`);function gy(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}$(gy,`isHidden`);function _y(e){return e instanceof HTMLInputElement&&`select`in e}$(_y,`isSelectableInput`);function vy(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_y(e)&&t&&e.select()}}$(vy,`focus`);var yy=by();function by(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=xy(e,t),e.unshift(t)},remove(t){e=xy(e,t),e[0]?.resume()}}}$(by,`createFocusScopesStack`);function xy(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}$(xy,`arrayRemove`);function Sy(e){return e.filter(e=>e.tagName!==`A`)}$(Sy,`removeLinks`);var Cy=globalThis?.document?o.useLayoutEffect:()=>{},wy=o.useId||(()=>void 0),Ty=0;function Ey(e){let[t,n]=o.useState(wy());return Cy(()=>{e||n(e=>e??String(Ty++))},[e]),e||(t?`radix-${t}`:``)}function Dy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Oy(...e){return t=>{let n=!1,r=e.map(e=>{let r=Dy(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Dy(e[t],null)}}}}function ky(...e){return o.useCallback(Oy(...e),e)}function Ay(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,l=o.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})};s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[a]||i,d=o.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,jy(i,...t)]}function jy(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function My(e){let t=o.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];zy(r)&&typeof Uy==`function`&&(r=Uy(r._payload)),o.Children.forEach(r,e=>{if(Ly(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;zy(n)&&typeof Uy==`function`&&(n=Uy(n._payload)),a=Py(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=o.cloneElement(a,void 0,c):!s&&o.Children.count(r)===1&&o.isValidElement(r)&&(a=r);let l=a?Iy(a):void 0,u=ky(n,l);if(!a){if(r||r===0)throw Error(s?Hy(e):Vy(e));return r}let d=Fy(i,a.props??{});return a.type!==o.Fragment&&(d.ref=n?u:l),o.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var Ny=Symbol.for(`radix.slottable`),Py=(e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null};function Fy(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Iy(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)}function Ly(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ny}var Ry=Symbol.for(`react.lazy`);function zy(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ry&&`_payload`in e&&By(e._payload)}function By(e){return typeof e==`object`&&!!e&&`then`in e}var Vy=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Hy=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Uy=o.use,Wy=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>
45{let n=My(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gy(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Ky=globalThis?.document?o.useLayoutEffect:()=>{};function qy(e){let[t,n]=o.useState(void 0);return Ky(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Jy=Object.defineProperty,Yy=(e,t)=>Jy(e,`name`,{value:t,configurable:!0}),Xy=`Popper`,[Zy,Qy]=Ay(Xy),[$y,eb]=Zy(Xy),tb=Yy(e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null),[a,s]=o.useState(void 0);return(0,d.jsx)($y,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:s,children:n})},`Popper`),nb=`PopperAnchor`,rb=o.forwardRef(Yy(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=eb(nb,n),s=o.useRef(null),c=a.onAnchorChange,l=ky(t,o.useCallback(e=>{s.current=e,e&&c(e)},[c])),u=o.useRef(null);o.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let f=a.placementState&&ub(a.placementState),p=f?.[0],m=f?.[1];return r?null:(0,d.jsx)(Wy.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:l})},`PopperAnchor`)),ib=`PopperContent`,[ab,ob]=Zy(ib),sb=o.forwardRef(Yy(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=eb(ib,n),[y,b]=o.useState(null),x=ky(t,b),[S,C]=o.useState(null),w=qy(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],A=k.length>0,j={padding:O,boundary:k.filter(cb),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=tn({strategy:`fixed`,placement:D,whileElementsMounted:Yy((...e)=>Vt(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[rn({mainAxis:i+E,alignmentAxis:s}),l&&an({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?on():void 0,...j}),l&&sn({...j}),cn({...j,apply:Yy(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&un({element:S,padding:c}),lb({arrowWidth:T,arrowHeight:E}),m&&ln({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),ee=v.setPlacementState;Ky(()=>(ee(P),()=>{ee(void 0)}),[P,ee]);let[L,R]=ub(P),z=Gy(g);Ky(()=>{F&&z?.()},[F,z]);let te=I.arrow?.x,B=I.arrow?.y,ne=I.arrow?.centerOffset!==0,[V,H]=o.useState();return Ky(()=>{y&&H(window.getComputedStyle(y).zIndex)},[y]),(0,d.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(ab,{scope:n,placedSide:L,placedAlign:R,onArrowChange:C,arrowX:te,arrowY:B,shouldHideArrow:ne,children:(0,d.jsx)(Wy.div,{"data-side":L,"data-align":R,..._,ref:x,style:{..._.style,animation:F?_.style?.animation:`none`}})})})},`PopperContent`));function cb(e){return e!==null}Yy(cb,`isNotNull`);var lb=Yy(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ub(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function ub(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Yy(ub,`getSideAndAlignFromPlacement`);var db=tb,fb=rb,pb=sb,mb=globalThis?.document?o.useLayoutEffect:()=>{},hb=Object.defineProperty,gb=o.forwardRef(((e,t)=>hb(e,`name`,{value:t,configurable:!0}
45))(function(e,t){let{container:n,...r}=e,[i,a]=o.useState(!1);mb(()=>a(!0),[]);let s=n||i&&globalThis?.document?.body;return s?h.createPortal((0,d.jsx)(Bv.div,{...r,ref:t}),s):null},`Portal`)),_b=globalThis?.document?o.useLayoutEffect:()=>{},vb=Object.defineProperty,yb=(e,t)=>vb(e,`name`,{value:t,configurable:!0});function bb(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}yb(bb,`useStateMachine`);var xb=yb(e=>{let{present:t,children:n}=e,r=Sb(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),a=wb(r.ref,Eb(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:a}):null},`Presence`);function Sb(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),s=o.useRef(void 0),[c,l]=bb(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{c===`mounted`?(a.current=s.current??Tb(r.current),s.current=void 0):a.current=`none`},[c]),_b(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Tb(t);e?(s.current=o,l(`MOUNT`)):o===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),_b(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=yb(a=>{let o=Tb(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=yb(e=>{e.target===t&&(a.current=Tb(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:o.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Tb(t)}else r.current=null;n(e)},[])}}yb(Sb,`usePresence`);function Cb(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}yb(Cb,`setRef`);function wb(...e){let t=o.useRef(e);return t.current=e,o.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Cb(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Cb(n[e],null)}}},[])}yb(wb,`useStableComposedRefs`);function Tb(e){return e?.animationName||`none`}yb(Tb,`getAnimationName`);function Eb(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)}yb(Eb,`getElementRef`);var Db=globalThis?.document?o.useLayoutEffect:()=>{},Ob=o.useEffectEvent,kb=o.useInsertionEffect;function Ab(e){if(typeof Ob==`function`)return Ob(e);let t=o.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof kb==`function`?kb(()=>{t.current=e}):Db(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var jb=Object.defineProperty,Mb=(e,t)=>jb(e,`name`,{value:t,configurable:!0}),Nb=o.useInsertionEffect||Db;function Pb({prop:e,defaultProp:t,onChange:n=Mb(()=>{},`onChange`),caller:r}){let[i,a,s]=Fb({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:i,o.useCallback(t=>{if(c){let n=Ib(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}Mb(Pb,`useControllableState`);function Fb({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return Nb(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Mb(Fb,`useUncontrolledState`);function Ib(e){return typeof e==`function`}Mb(Ib,`isFunction`);var Lb=Symbol(`RADIX:SYNC_STATE`);function Rb(e,t,n,r){let{prop:i,defaultProp:a,onChange:s,caller:c}=t,l=i!==void 0,u=Ab(s),d=[{...n,state:a}];r&&d.push(r);let[f,p]=o.useReducer((t,n)=>{if(n.type===Lb)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=o.useRef(m);o.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=o.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return o.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:Lb,state:i})},[i,f.state,l]),[g,p]}Mb(Rb,`useControllableStateReducer`);var zb=Object.defineProperty,Bb=(e,t)=>
vendor: 4,193 bytes, line 45
45zb(e,`name`,{value:t,configurable:!0}),Vb=`Popover`,[Hb,Ub]=Ev(Vb,[Qy]),Wb=Qy(),[Gb,Kb]=Hb(Vb),qb=Bb(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=Wb(t),l=o.useRef(null),[u,f]=o.useState(!1),[p,m]=Pb({prop:r,defaultProp:i??!1,onChange:a,caller:Vb});return(0,d.jsx)(db,{...c,children:(0,d.jsx)(Gb,{scope:t,contentId:Ey(),triggerRef:l,open:p,onOpenChange:m,onOpenToggle:o.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback(()=>f(!0),[]),onCustomAnchorRemove:o.useCallback(()=>f(!1),[]),modal:s,children:n})})},`Popover`),Jb=`PopoverTrigger`,Yb=o.forwardRef(Bb(function(e,t){let{__scopePopover:n,...r}=e,i=Kb(Jb,n),a=Wb(n),o=Tv(t,i.triggerRef),s=(0,d.jsx)(Bv.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ox(i.open),...r,ref:o,onClick:vv(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,d.jsx)(fb,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Xb=`PopoverPortal`,[Zb,Qb]=Hb(Xb,{forceMount:void 0}),$b=Bb(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Kb(Xb,t);return(0,d.jsx)(Zb,{scope:t,forceMount:n,children:(0,d.jsx)(xb,{present:n||a.open,children:(0,d.jsx)(gb,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),ex=`PopoverContent`,tx=o.forwardRef(Bb(function(e,t){let n=Qb(ex,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Kb(ex,e.__scopePopover);return(0,d.jsx)(xb,{present:r||a.open,children:a.modal?(0,d.jsx)(rx,{...i,ref:t}):(0,d.jsx)(ix,{...i,ref:t})})},`PopoverContent`)),nx=Ov(`PopoverContent.RemoveScroll`),rx=o.forwardRef(Bb(function(e,t){let n=Kb(ex,e.__scopePopover),r=o.useRef(null),i=Tv(t,r),a=o.useRef(!1);return o.useEffect(()=>{let e=r.current;if(e)return ja(e)},[]),(0,d.jsx)(Sa,{as:nx,allowPinchZoom:!0,children:(0,d.jsx)(ax,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vv(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:vv(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:vv(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),ix=o.forwardRef(Bb(function(e,t){let n=Kb(ex,e.__scopePopover),r=o.useRef(!1),i=o.useRef(!1);return(0,d.jsx)(ax,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),ax=o.forwardRef(Bb(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=e,p=Kb(ex,n),m=Wb(n);return iy(),(0,d.jsx)(dy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,d.jsx)(Yv,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,d.jsx)(pb,{"data-state":ox(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function ox(e){return e?`open`:`closed`}Bb(ox,`getState`);var sx=qb,cx=Yb,lx=$b,ux=tx,dx=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>
45{let n=Vr(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fx=`Label`,px=o.forwardRef((e,t)=>(0,d.jsx)(dx.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));px.displayName=fx;var mx=px,hx=Symbol(`radix.slottable`);function gx(e){let t=({children:e})=>(0,d.jsx)(d.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=hx,t}var _x=`AlertDialog`,[vx,yx]=p(_x,[Ba]),bx=Ba(),xx=e=>{let{__scopeAlertDialog:t,...n}=e,r=bx(t);return(0,d.jsx)(yo,{...r,...n,modal:!0})};xx.displayName=_x;var Sx=`AlertDialogTrigger`,Cx=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=bx(n);return(0,d.jsx)(bo,{...i,...r,ref:t})});Cx.displayName=Sx;var wx=`AlertDialogPortal`,Tx=e=>{let{__scopeAlertDialog:t,...n}=e,r=bx(t);return(0,d.jsx)(xo,{...r,...n})};Tx.displayName=wx;var Ex=`AlertDialogOverlay`,Dx=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=bx(n);return(0,d.jsx)(So,{...i,...r,ref:t})});Dx.displayName=Ex;var Ox=`AlertDialogContent`,[kx,Ax]=vx(Ox),jx=gx(`AlertDialogContent`),Mx=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=bx(n),c=o.useRef(null),l=u(t,c),f=o.useRef(null);return(0,d.jsx)(mo,{contentName:Ox,titleName:Nx,docsSlug:`alert-dialog`,children:(0,d.jsx)(kx,{scope:n,cancelRef:f,children:(0,d.jsxs)(Co,{role:`alertdialog`,...a,...i,ref:l,onOpenAutoFocus:s(i.onOpenAutoFocus,e=>{e.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,d.jsx)(jx,{children:r}),(0,d.jsx)(Vx,{contentRef:c})]})})})});Mx.displayName=Ox;var Nx=`AlertDialogTitle`,Px=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=bx(n);return(0,d.jsx)(wo,{...i,...r,ref:t})});Px.displayName=Nx;var Fx=`AlertDialogDescription`,Ix=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=bx(n);return(0,d.jsx)(To,{...i,...r,ref:t})});Ix.displayName=Fx;var Lx=`AlertDialogAction`,Rx=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=bx(n);return(0,d.jsx)(Eo,{...i,...r,ref:t})});Rx.displayName=Lx;var zx=`AlertDialogCancel`,Bx=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Ax(zx,n),a=bx(n),o=u(t,i);return(0,d.jsx)(Eo,{...a,...r,ref:o})});Bx.displayName=zx;var Vx=({contentRef:e})=>{let t=`\`${Ox}\` requires a description for the component to be accessible for screen reader users.
46
47You can add a description to the \`${Ox}\` by passing a \`${Fx}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
49Alternatively, 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 \`${Ox}\`. 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.
50
51For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return o.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Hx=xx,Ux=Tx,Wx=Dx,Gx=Mx,Kx=Rx,qx=Bx,Jx=Px,Yx=Ix;export{yf as $,Xg as A,Vf as B,$g as C,Fr as Ct,Qg as D,a as Dt,e_ as E,l as Et,Ip as F,mf as G,zf as H,Pp as I,pf as J,gf as K,Np as L,c_ as M,s_ as N,r_ as O,Zg as P,_f as Q,Mp as R,n_ as S,Pr as St,a_ as T,S as Tt,df as U,Bf as V,lf as W,of as X,uf as Y,vf as Z,fv as _,hi as _t,Wx as a,Ml as at,w_ as b,Ir as bt,Jx as c,Pl as ct,lx as d,To as dt,sf as et,sx as f,So as ft,mv as g,bo as gt,dv as h,wo as ht,Yx as i,Rl as it,o_ as j,i_ as k,mx as l,Eo as lt,pv as m,yo as mt,qx as n,ff as nt,Ux as o,Il as ot,cx as p,xo as pt,hf as q,Gx as r,El as rt,Hx as s,kl as st,Kx as t,cf as tt,ux as u,Co as ut,D_ as v,mi as vt,t_ as w,B as wt,E_ as x,Nr as xt,T_ as y,Hr as yt,Fp as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.