"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[303],{7461:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(4090),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),l=(e,t)=>{let n=(0,r.forwardRef)((n,l)=>{let{color:a="currentColor",size:u=24,strokeWidth:c=2,absoluteStrokeWidth:s,className:d="",children:f,...p}=n;return(0,r.createElement)("svg",{ref:l,...o,width:u,height:u,stroke:a,strokeWidth:s?24*Number(c)/Number(u):c,className:["lucide","lucide-".concat(i(e)),d].join(" "),...p},[...t.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(f)?f:[f]])});return n.displayName="".concat(e),n}},9259:function(e,t,n){n.d(t,{Z:function(){return r}});/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let r=(0,n(7461).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},3441:function(e,t,n){n.d(t,{Z:function(){return r}});/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let r=(0,n(7461).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},1266:function(e,t,n){n.d(t,{e:function(){return i}});var r=n(4090);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(){for(var e=arguments.length,t=Array(e),n=0;n{let n=!1,r=t.map(t=>{let r=o(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e(0,i.jsx)(o.WV.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";var a=l},9586:function(e,t,n){n.d(t,{WV:function(){return a},jH:function(){return u}});var r=n(4090),o=n(9542),i=n(9143),l=n(3827),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,i.Z8)("Primitive.".concat(t)),o=r.forwardRef((e,r)=>{let{asChild:o,...i}=e,a=o?n:t;return window[Symbol.for("radix-ui")]=!0,(0,l.jsx)(a,{...i,ref:r})});return o.displayName="Primitive.".concat(t),{...e,[t]:o}},{});function u(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},8961:function(e,t,n){let r,o;n.d(t,{VY:function(){return nF},ZA:function(){return nQ},JO:function(){return nM},ck:function(){return n5},wU:function(){return n8},eT:function(){return n6},h_:function(){return nW},fC:function(){return nA},xz:function(){return nL},B4:function(){return nk},l_:function(){return n$}});var i,l,a,u,c,s,d,f,p=n(4090),v=n.t(p,2),m=n(9542);function h(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}function g(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}window.document&&window.document.createElement;var y=n(3827);function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=()=>{let t=n.map(e=>p.createContext(e));return function(n){let r=(null==n?void 0:n[e])||t;return p.useMemo(()=>({["__scope".concat(e)]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=p.createContext(r);o.displayName=t+"Context";let i=n.length;n=[...n,r];let l=t=>{var n;let{scope:r,children:l,...a}=t,u=(null==r?void 0:null===(n=r[e])||void 0===n?void 0:n[i])||o,c=p.useMemo(()=>a,Object.values(a));return(0,y.jsx)(u.Provider,{value:c,children:l})};return l.displayName=t+"Provider",[l,function(n,l){var a;let u=(null==l?void 0:null===(a=l[e])||void 0===a?void 0:a[i])||o,c=p.useContext(u);if(c)return c;if(void 0!==r)return r;throw Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),n=0;n{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let n=e.reduce((e,n)=>{let{useScope:r,scopeName:o}=n,i=r(t)["__scope".concat(o)];return{...e,...i}},{});return p.useMemo(()=>({["__scope".concat(r.scopeName)]:n}),[n])}};return o.scopeName=r.scopeName,o}(r,...t)]}var b=n(1266),x=n(9143);Map;var E=p.createContext(void 0),S=n(9586);function C(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>function(){for(var e,n=arguments.length,r=Array(n),o=0;o{var n,r;let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...f}=e,v=p.useContext(T),[m,h]=p.useState(null),w=null!==(r=null==m?void 0:m.ownerDocument)&&void 0!==r?r:null===(n=globalThis)||void 0===n?void 0:n.document,[,x]=p.useState({}),E=(0,b.e)(t,e=>h(e)),A=Array.from(v.layers),[P]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(P),M=m?A.indexOf(m):-1,O=v.layersWithOutsidePointerEventsDisabled.size>0,j=M>=k,D=p.useRef(!1),W=function(e,t){var n;let{ownerDocument:r=null===(n=globalThis)||void 0===n?void 0:n.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:l}=t,a=C(e),u=p.useRef(!1),c=p.useRef(!1),s=p.useRef(new Map),d=p.useRef(()=>{});return p.useEffect(()=>{function e(){c.current=!1,i.current=!1,s.current.clear()}function t(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...l].some(e=>e.contains(t))||s.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{c.current&&d.current()},0)}function n(e){c.current&&s.current.set(e.type,!1)}let f=t=>{if(t.target&&!u.current){let n=function(){r.removeEventListener("click",d.current);let t=Array.from(s.current.values()).some(Boolean);e(),t||L("dismissableLayer.pointerDownOutside",a,l,{discrete:!0})},l={originalEvent:t};c.current=!0,i.current=o&&0===t.button,s.current.clear(),o&&0===t.button?(r.removeEventListener("click",d.current),d.current=n,r.addEventListener("click",d.current,{once:!0})):n()}else r.removeEventListener("click",d.current),e();u.current=!1},p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of p)r.addEventListener(e,t,!0),r.addEventListener(e,n);let v=window.setTimeout(()=>{r.addEventListener("pointerdown",f)},0);return()=>{for(let e of(window.clearTimeout(v),r.removeEventListener("pointerdown",f),r.removeEventListener("click",d.current),p))r.removeEventListener(e,t,!0),r.removeEventListener(e,n)}},[r,a,o,i,l]),{onPointerDownCapture:()=>u.current=!0}}(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...v.branches].some(e=>e.contains(t));!j||n||(null==a||a(e),null==c||c(e),e.defaultPrevented||null==d||d())},{ownerDocument:w,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:v.dismissableSurfaces}),I=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e),o=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!o.current&&L("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{if(i&&D.current)return;let t=e.target;[...v.branches].some(e=>e.contains(t))||(null==u||u(e),null==c||c(e),e.defaultPrevented||null==d||d())},w);return!function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e);p.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{M!==v.layers.size-1||(null==l||l(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},w),p.useEffect(()=>{if(m)return o&&(0===v.layersWithOutsidePointerEventsDisabled.size&&(s=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(m)),v.layers.add(m),N(),()=>{o&&(v.layersWithOutsidePointerEventsDisabled.delete(m),0===v.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=s))}},[m,w,o,v]),p.useEffect(()=>()=>{m&&(v.layers.delete(m),v.layersWithOutsidePointerEventsDisabled.delete(m),N())},[m,v]),p.useEffect(()=>{let e=()=>x({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),(0,y.jsx)(S.WV.div,{...f,ref:E,style:{pointerEvents:O?j?"auto":"none":void 0,...e.style},onFocusCapture:g(e.onFocusCapture,I.onFocusCapture),onBlurCapture:g(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,W.onPointerDownCapture)})});function N(){let e=new CustomEvent(R);document.dispatchEvent(e)}function L(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,S.jH)(i,l):i.dispatchEvent(l)}A.displayName="DismissableLayer",p.forwardRef((e,t)=>{let n=p.useContext(T),r=p.useRef(null),o=(0,b.e)(t,r);return p.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,y.jsx)(S.WV.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var P=0,k=null;function M(){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 O="focusScope.autoFocusOnMount",j="focusScope.autoFocusOnUnmount",D={bubbles:!1,cancelable:!0},W=p.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,u]=p.useState(null),c=C(o),s=C(i),d=p.useRef(null),f=(0,b.e)(t,e=>u(e)),v=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let e=function(e){if(v.paused||!a)return;let t=e.target;a.contains(t)?d.current=t:V(d.current,{select:!0})},t=function(e){if(v.paused||!a)return;let t=e.relatedTarget;null===t||a.contains(t)||V(d.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&V(a)});return a&&n.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,a,v.paused]),p.useEffect(()=>{if(a){_.add(v);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(O,D);a.addEventListener(O,c),a.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(V(r,{select:t}),document.activeElement!==n)return}(I(a).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&V(a))}return()=>{a.removeEventListener(O,c),setTimeout(()=>{let t=new CustomEvent(j,D);a.addEventListener(j,s),a.dispatchEvent(t),t.defaultPrevented||V(null!=e?e:document.body,{select:!0}),a.removeEventListener(j,s),_.remove(v)},0)}}},[a,c,s,v]);let m=p.useCallback(e=>{if(!n&&!r||v.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=I(e);return[F(t,e),F(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&V(i,{select:!0})):(e.preventDefault(),n&&V(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,v.paused]);return(0,y.jsx)(S.WV.div,{tabIndex:-1,...l,ref:f,onKeyDown:m})});function I(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;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 F(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function V(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}W.displayName="FocusScope";var _=(o=[],{add(e){let t=o[0];e!==t&&(null==t||t.pause()),(o=H(o,e)).unshift(e)},remove(e){var t;null===(t=(o=H(o,e))[0])||void 0===t||t.resume()}});function H(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var B=(null===(d=globalThis)||void 0===d?void 0:d.document)?p.useLayoutEffect:()=>{},z=v[" useId ".trim().toString()]||(()=>void 0),U=0;function K(e){let[t,n]=p.useState(z());return B(()=>{e||n(e=>null!=e?e:String(U++))},[e]),e||(t?"radix-".concat(t):"")}let Z=["top","right","bottom","left"],Y=Math.min,X=Math.max,$=Math.round,q=Math.floor,G=e=>({x:e,y:e}),J={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(e,t){return"function"==typeof e?e(t):e}function ee(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function en(e){return"x"===e?"y":"x"}function er(e){return"y"===e?"height":"width"}function eo(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function ei(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let el=["left","right"],ea=["right","left"],eu=["top","bottom"],ec=["bottom","top"];function es(e){let t=ee(e);return J[t]+e.slice(t.length)}function ed(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function ef(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ep(e,t,n){let r,{reference:o,floating:i}=e,l=eo(t),a=en(eo(t)),u=er(a),c=ee(t),s="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(et(t)){case"start":r[a]-=p*(n&&s?-1:1);break;case"end":r[a]+=p*(n&&s?-1:1)}return r}async function ev(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Q(t,e),v=ed(p),m=a[f?"floating"===d?"reference":"floating":d],h=ef(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=ef(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-b.top+v.top)/w.y,bottom:(b.bottom-h.bottom+v.bottom)/w.y,left:(h.left-b.left+v.left)/w.x,right:(b.right-h.right+v.right)/w.x}}let em=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:ev},u=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=ep(c,r,u),f=r,p=0,v={};for(let n=0;ne[t]>=0)}let ey=new Set(["left","top"]);async function ew(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=ee(n),a=et(n),u="y"===eo(n),c=ey.has(l)?-1:1,s=i&&u?-1:1,d=Q(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),u?{x:p*s,y:f*c}:{x:f*c,y:p*s}}function eb(e){return eS(e)?(e.nodeName||"").toLowerCase():"#document"}function ex(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eE(e){var t;return null==(t=(eS(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function eS(e){return e instanceof Node||e instanceof ex(e).Node}function eC(e){return e instanceof Element||e instanceof ex(e).Element}function eR(e){return e instanceof HTMLElement||e instanceof ex(e).HTMLElement}function eT(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ex(e).ShadowRoot)}function eA(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=eD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function eN(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let eL=/transform|translate|scale|rotate|perspective|filter/,eP=/paint|layout|strict|content/,ek=e=>!!e&&"none"!==e;function eM(e){let t=eC(e)?eD(e):e;return ek(t.transform)||ek(t.translate)||ek(t.scale)||ek(t.rotate)||ek(t.perspective)||!eO()&&(ek(t.backdropFilter)||ek(t.filter))||eL.test(t.willChange||"")||eP.test(t.contain||"")}function eO(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function ej(e){return/^(html|body|#document)$/.test(eb(e))}function eD(e){return ex(e).getComputedStyle(e)}function eW(e){return eC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eI(e){if("html"===eb(e))return e;let t=e.assignedSlot||e.parentNode||eT(e)&&e.host||eE(e);return eT(t)?t.host:t}function eF(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=eI(t);return ej(n)?t.ownerDocument?t.ownerDocument.body:t.body:eR(n)&&eA(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=ex(o);if(!i)return t.concat(o,eF(o,[],n));{let e=eV(l);return t.concat(l,l.visualViewport||[],eA(o)?o:[],e&&n?eF(e):[])}}function eV(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function e_(e){let t=eD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=eR(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=$(n)!==i||$(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function eH(e){return eC(e)?e:e.contextElement}function eB(e){let t=eH(e);if(!eR(t))return G(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=e_(t),l=(i?$(n.width):n.width)/r,a=(i?$(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}let ez=G(0);function eU(e){let t=ex(e);return eO()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ez}function eK(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eH(e),a=G(1);t&&(r?eC(r)&&(a=eB(r)):a=eB(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===ex(l))&&o)?eU(l):G(0),c=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(l){let e=ex(l),t=r&&eC(r)?ex(r):r,n=e,o=eV(n);for(;o&&r&&t!==n;){let e=eB(o),t=o.getBoundingClientRect(),r=eD(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,f*=e.y,c+=i,s+=l,o=eV(n=ex(o))}}return ef({width:d,height:f,x:c,y:s})}function eZ(e,t){let n=eW(e).scrollLeft;return t?t.left+n:eK(eE(e)).left+n}function eY(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eZ(e,n),y:n.top+t.scrollTop}}function eX(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=ex(e),r=eE(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=eO();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}let c=eZ(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=eE(e),n=eW(e),r=e.ownerDocument.body,o=X(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=X(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+eZ(e),a=-n.scrollTop;return"rtl"===eD(r).direction&&(l+=X(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(eE(e));else if(eC(t))r=function(e,t){let n=eK(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=eR(e)?eB(e):G(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=eU(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ef(r)}function e$(e){return"static"===eD(e).position}function eq(e,t){if(!eR(e)||"fixed"===eD(e).position)return null;if(t)return t(e);let n=e.offsetParent;return eE(e)===n&&(n=n.ownerDocument.body),n}function eG(e,t){var n;let r=ex(e);if(eN(e))return r;if(!eR(e)){let t=eI(e);for(;t&&!ej(t);){if(eC(t)&&!e$(t))return t;t=eI(t)}return r}let o=eq(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(eb(n)))&&e$(o);)o=eq(o,t);return o&&ej(o)&&e$(o)&&!eM(o)?r:o||function(e){let t=eI(e);for(;eR(t)&&!ej(t);){if(eM(t))return t;if(eN(t))break;t=eI(t)}return null}(e)||r}let eJ=async function(e){let t=this.getOffsetParent||eG,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=eR(t),o=eE(t),i="fixed"===n,l=eK(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=G(0);if(r||!r&&!i){if(("body"!==eb(t)||eA(o))&&(a=eW(t)),r){let e=eK(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=eZ(o))}i&&!r&&o&&(u.x=eZ(o));let c=!o||r||i?G(0):eY(o,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eQ={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=eE(r),a=!!t&&eN(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=G(1),s=G(0),d=eR(r);if((d||!d&&!i)&&(("body"!==eb(r)||eA(l))&&(u=eW(r)),d)){let e=eK(r);c=eB(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let f=!l||d||i?G(0):eY(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+f.x,y:n.y*c.y-u.scrollTop*c.y+s.y+f.y}},getDocumentElement:eE,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?eN(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eF(e,[],!1).filter(e=>eC(e)&&"body"!==eb(e)),o=null,i="fixed"===eD(e).position,l=i?eI(e):e;for(;eC(l)&&!ej(l);){let t=eD(l),n=eM(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||eA(l)&&!n&&function e(t,n){let r=eI(t);return!(r===n||!eC(r)||ej(r))&&("fixed"===eD(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=eI(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=eX(t,i[0],o),a=l.top,u=l.right,c=l.bottom,s=l.left;for(let e=1;e({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:u}=t,{element:c,padding:s=0}=Q(e,t)||{};if(null==c)return{};let d=ed(s),f={x:n,y:r},p=en(eo(o)),v=er(p),m=await l.getDimensions(c),h="y"===p,g=h?"clientHeight":"clientWidth",y=i.reference[v]+i.reference[p]-f[p]-i.floating[v],w=f[p]-i.reference[p],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(c)),x=b?b[g]:0;x&&await (null==l.isElement?void 0:l.isElement(b))||(x=a.floating[g]||i.floating[v]);let E=x/2-m[v]/2-1,S=Y(d[h?"top":"left"],E),C=Y(d[h?"bottom":"right"],E),R=x-m[v]-C,T=x/2-m[v]/2+(y/2-w/2),A=X(S,Y(T,R)),N=!u.arrow&&null!=et(o)&&T!==A&&i.reference[v]/2-(T{let r=new Map,o={platform:eQ,...n},i={...o.platform,_c:r};return em(e,t,{...o,platform:i})};var e4="undefined"!=typeof document?p.useLayoutEffect:function(){};function e5(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!e5(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!e5(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function e9(e){return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e6(e,t){let n=e9(e);return Math.round(t*n)/n}function e3(e){let t=p.useRef(e);return e4(()=>{t.current=e}),t}let e8=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?e1({element:n.current,padding:r}).fn(t):{}:n?e1({element:n,padding:r}).fn(t):{}}}),e7=(e,t)=>{var n;let r=(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:l,middlewareData:a}=e,u=await ew(e,n);return l===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}});return{name:r.name,fn:r.fn,options:[e,t]}},te=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o,platform:i}=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Q(n,e),s={x:t,y:r},d=await i.detectOverflow(e,c),f=eo(ee(o)),p=en(f),v=s[p],m=s[f];if(l){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=v+d[e],r=v-d[t];v=X(n,Y(v,r))}if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=m+d[e],r=m-d[t];m=X(n,Y(m,r))}let h=u.fn({...e,[p]:v,[f]:m});return{...h,data:{x:h.x-t,y:h.y-r,enabled:{[p]:l,[f]:a}}}}});return{name:r.name,fn:r.fn,options:[e,t]}},tt=(e,t)=>{var n;return{fn:(void 0===(n=e)&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=Q(n,e),s={x:t,y:r},d=eo(o),f=en(d),p=s[f],v=s[d],m=Q(a,e),h="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,n=i.reference[f]+i.reference[e]-h.mainAxis;pn&&(p=n)}if(c){var g,y;let e="y"===f?"width":"height",t=ey.has(ee(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=l.offset)?void 0:g[d])||0)+(t?0:h.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[d])||0)-(t?h.crossAxis:0);vr&&(v=r)}return{[f]:p,[d]:v}}}).fn,options:[e,t]}},tn=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,o,i,l;let{placement:a,middlewareData:u,rects:c,initialPlacement:s,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:v=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=Q(n,e);if(null!=(t=u.arrow)&&t.alignmentOffset)return{};let b=ee(a),x=eo(s),E=ee(s)===s,S=await (null==d.isRTL?void 0:d.isRTL(f.floating)),C=m||(E||!y?[es(s)]:function(e){let t=es(e);return[ei(e),t,ei(t)]}(s)),R="none"!==g;!m&&R&&C.push(...function(e,t,n,r){let o=et(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?ea:el;return t?el:ea;case"left":case"right":return t?eu:ec;default:return[]}}(ee(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ei)))),i}(s,y,g,S));let T=[s,...C],A=await d.detectOverflow(e,w),N=[],L=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&N.push(A[b]),v){let e=function(e,t,n){void 0===n&&(n=!1);let r=et(e),o=en(eo(e)),i=er(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=es(l)),[l,es(l)]}(a,c,S);N.push(A[e[0]],A[e[1]])}if(L=[...L,{placement:a,overflows:N}],!N.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=T[e];if(t&&(!("alignment"===v&&x!==eo(t))||L.every(e=>eo(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(i=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(h){case"bestFit":{let e=null==(l=L.filter(e=>{if(R){let t=eo(e.placement);return t===x||"y"===t}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])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}});return{name:r.name,fn:r.fn,options:[e,t]}},tr=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){var t,r;let o,i;let{placement:l,rects:a,platform:u,elements:c}=e,{apply:s=()=>{},...d}=Q(n,e),f=await u.detectOverflow(e,d),p=ee(l),v=et(l),m="y"===eo(l),{width:h,height:g}=a.floating;"top"===p||"bottom"===p?(o=p,i=v===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=p,o="end"===v?"top":"bottom");let y=g-f.top-f.bottom,w=h-f.left-f.right,b=Y(g-f[o],y),x=Y(h-f[i],w),E=!e.middlewareData.shift,S=b,C=x;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=w),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=y),E&&!v){let e=X(f.left,0),t=X(f.right,0),n=X(f.top,0),r=X(f.bottom,0);m?C=h-2*(0!==e||0!==t?e+t:X(f.left,f.right)):S=g-2*(0!==n||0!==r?n+r:X(f.top,f.bottom))}await s({...e,availableWidth:C,availableHeight:S});let R=await u.getDimensions(c.floating);return h!==R.width||g!==R.height?{reset:{rects:!0}}:{}}});return{name:r.name,fn:r.fn,options:[e,t]}},to=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t,platform:r}=e,{strategy:o="referenceHidden",...i}=Q(n,e);switch(o){case"referenceHidden":{let n=eh(await r.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:eg(n)}}}case"escaped":{let n=eh(await r.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:eg(n)}}}default:return{}}}});return{name:r.name,fn:r.fn,options:[e,t]}},ti=(e,t)=>{let n=e8(e);return{name:n.name,fn:n.fn,options:[e,t]}};var tl=p.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,y.jsx)(S.WV.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,y.jsx)("polygon",{points:"0,0 30,0 15,10"})})});tl.displayName="Arrow";var ta="Popper",[tu,tc]=w(ta),[ts,td]=tu(ta),tf=e=>{let{__scopePopper:t,children:n}=e,[r,o]=p.useState(null),[i,l]=p.useState(void 0);return(0,y.jsx)(ts,{scope:t,anchor:r,onAnchorChange:o,placementState:i,setPlacementState:l,children:n})};tf.displayName=ta;var tp="PopperAnchor",tv=p.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,i=td(tp,n),l=p.useRef(null),a=i.onAnchorChange,u=p.useCallback(e=>{l.current=e,e&&a(e)},[a]),c=(0,b.e)(t,u),s=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=s.current;s.current=r.current,e!==s.current&&a(s.current)});let d=i.placementState&&tC(i.placementState),f=null==d?void 0:d[0],v=null==d?void 0:d[1];return r?null:(0,y.jsx)(S.WV.div,{"data-radix-popper-side":f,"data-radix-popper-align":v,...o,ref:c})});tv.displayName=tp;var tm="PopperContent",[th,tg]=tu(tm),ty=p.forwardRef((e,t)=>{var n,r,o,i,l,a,u,c;let{__scopePopper:s,side:d="bottom",sideOffset:f=0,align:v="center",alignOffset:h=0,arrowPadding:g=0,avoidCollisions:w=!0,collisionBoundary:x=[],collisionPadding:E=0,sticky:R="partial",hideWhenDetached:T=!1,updatePositionStrategy:A="optimized",onPlaced:N,...L}=e,P=td(tm,s),[k,M]=p.useState(null),O=(0,b.e)(t,e=>M(e)),[j,D]=p.useState(null),W=function(e){let[t,n]=p.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(j),I=null!==(u=null==W?void 0:W.width)&&void 0!==u?u:0,F=null!==(c=null==W?void 0:W.height)&&void 0!==c?c:0,V="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},_=Array.isArray(x)?x:[x],H=_.length>0,z={padding:V,boundary:_.filter(tE),altBoundary:H},{refs:U,floatingStyles:K,placement:Z,isPositioned:$,middlewareData:G}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[s,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=p.useState(r);e5(f,r)||v(r);let[h,g]=p.useState(null),[y,w]=p.useState(null),b=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),x=p.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),E=i||h,S=l||y,C=p.useRef(null),R=p.useRef(null),T=p.useRef(s),A=null!=u,N=e3(u),L=e3(o),P=e3(c),k=p.useCallback(()=>{if(!C.current||!R.current)return;let e={placement:t,strategy:n,middleware:f};L.current&&(e.platform=L.current),e2(C.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};M.current&&!e5(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[f,t,n,L,P]);e4(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let M=p.useRef(!1);e4(()=>(M.current=!0,()=>{M.current=!1}),[]),e4(()=>{if(E&&(C.current=E),S&&(R.current=S),E&&S){if(N.current)return N.current(E,S,k);k()}},[E,S,k,N,A]);let O=p.useMemo(()=>({reference:C,floating:R,setReference:b,setFloating:x}),[b,x]),j=p.useMemo(()=>({reference:E,floating:S}),[E,S]),D=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=e6(j.floating,s.x),r=e6(j.floating,s.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...e9(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,j.floating,s.x,s.y]);return p.useMemo(()=>({...s,update:k,refs:O,elements:j,floatingStyles:D}),[s,k,O,j,D])}({strategy:"fixed",placement:d+("center"!==v?"-"+v:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=s&&u?function(e,t){let n,r=null,o=eE(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=q(d),m=q(o.clientWidth-(s+f)),h={rootMargin:-v+"px "+-m+"px "+-q(o.clientHeight-(d+p))+"px "+-q(s)+"px",threshold:X(0,Y(1,u))||1},g=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!g)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||e0(c,e.getBoundingClientRect())||l(),g=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),i}(s,n):null,p=-1,v=null;a&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),s&&!c&&v.observe(s),t&&v.observe(t));let m=c?eK(e):null;return c&&function t(){let r=eK(e);m&&!e0(m,r)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=v)||e.disconnect(),v=null,c&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===A})},elements:{reference:P.anchor},middleware:[e7({mainAxis:f+F,alignmentAxis:h}),w&&te({mainAxis:!0,crossAxis:!1,limiter:"partial"===R?tt():void 0,...z}),w&&tn({...z}),tr({...z,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),j&&ti({element:j,padding:g}),tS({arrowWidth:I,arrowHeight:F}),T&&to({strategy:"referenceHidden",...z,boundary:H?z.boundary:void 0})]}),J=P.setPlacementState;B(()=>(J(Z),()=>{J(void 0)}),[Z,J]);let[Q,ee]=tC(Z),et=C(N);B(()=>{$&&(null==et||et())},[$,et]);let en=null===(n=G.arrow)||void 0===n?void 0:n.x,er=null===(r=G.arrow)||void 0===r?void 0:r.y,eo=(null===(o=G.arrow)||void 0===o?void 0:o.centerOffset)!==0,[ei,el]=p.useState();return B(()=>{k&&el(window.getComputedStyle(k).zIndex)},[k]),(0,y.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:$?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ei,"--radix-popper-transform-origin":[null===(i=G.transformOrigin)||void 0===i?void 0:i.x,null===(l=G.transformOrigin)||void 0===l?void 0:l.y].join(" "),...(null===(a=G.hide)||void 0===a?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,y.jsx)(th,{scope:s,placedSide:Q,placedAlign:ee,onArrowChange:D,arrowX:en,arrowY:er,shouldHideArrow:eo,children:(0,y.jsx)(S.WV.div,{"data-side":Q,"data-align":ee,...L,ref:O,style:{...L.style,animation:$?void 0:"none"}})})})});ty.displayName=tm;var tw="PopperArrow",tb={top:"bottom",right:"left",bottom:"top",left:"right"},tx=p.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=tg(tw,n),i=tb[o.placedSide];return(0,y.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,y.jsx)(tl,{...r,ref:t,style:{...r.style,display:"block"}})})});function tE(e){return null!==e}tx.displayName=tw;var tS=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[p,v]=tC(a),m={start:"0%",center:"50%",end:"100%"}[v],h=(null!==(i=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(l=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==l?l:0)+f/2,y="",w="";return"bottom"===p?(y=s?m:"".concat(h,"px"),w="".concat(-f,"px")):"top"===p?(y=s?m:"".concat(h,"px"),w="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=s?m:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),w=s?m:"".concat(g,"px")),{data:{x:y,y:w}}}});function tC(e){let[t,n="center"]=e.split("-");return[t,n]}var tR=p.forwardRef((e,t)=>{var n,r;let{container:o,...i}=e,[l,a]=p.useState(!1);B(()=>a(!0),[]);let u=o||l&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return u?m.createPortal((0,y.jsx)(S.WV.div,{...i,ref:t}),u):null});tR.displayName="Portal";var tT=e=>{var t,n;let r,o;let{present:i,children:l}=e,a=function(e){var t,n;let[r,o]=p.useState(),i=p.useRef(null),l=p.useRef(e),a=p.useRef("none"),[u,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},p.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return p.useEffect(()=>{let e=tN(i.current);a.current="mounted"===u?e:"none"},[u]),B(()=>{let t=i.current,n=l.current;if(n!==e){let r=a.current,o=tN(t);e?c("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?c("UNMOUNT"):n&&r!==o?c("ANIMATION_OUT"):c("UNMOUNT"),l.current=e}},[e,c]),B(()=>{if(r){var e;let t;let n=null!==(e=r.ownerDocument.defaultView)&&void 0!==e?e:window,o=e=>{let o=tN(i.current).includes(CSS.escape(e.animationName));if(e.target===r&&o&&(c("ANIMATION_END"),!l.current)){let e=r.style.animationFillMode;r.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=e)})}},u=e=>{e.target===r&&(a.current=tN(i.current))};return r.addEventListener("animationstart",u),r.addEventListener("animationcancel",o),r.addEventListener("animationend",o),()=>{n.clearTimeout(t),r.removeEventListener("animationstart",u),r.removeEventListener("animationcancel",o),r.removeEventListener("animationend",o)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:p.useCallback(e=>{i.current=e?getComputedStyle(e):null,o(e)},[])}}(i),u="function"==typeof l?l({present:a.isPresent}):p.Children.only(l),c=function(){for(var e=arguments.length,t=Array(e),n=0;n{let t=r.current,n=!1,o=t.map(t=>{let r=tA(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e{},caller:o}=e,[i,l,a]=function(e){let{defaultProp:t,onChange:n}=e,[r,o]=p.useState(t),i=p.useRef(r),l=p.useRef(n);return tL(()=>{l.current=n},[n]),p.useEffect(()=>{if(i.current!==r){var e;null===(e=l.current)||void 0===e||e.call(l,r),i.current=r}},[r,i]),[r,o,l]}({defaultProp:n,onChange:r}),u=void 0!==t,c=u?t:i;{let e=p.useRef(void 0!==t);p.useEffect(()=>{let t=e.current;if(t!==u){let e=u?"controlled":"uncontrolled";console.warn("".concat(o," is changing from ").concat(t?"controlled":"uncontrolled"," to ").concat(e,". 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."))}e.current=u},[u,o])}return[c,p.useCallback(e=>{if(u){let r="function"==typeof e?e(t):e;if(r!==t){var n;null===(n=a.current)||void 0===n||n.call(a,r)}}else l(e)},[u,t,l,a])]}Symbol("RADIX:SYNC_STATE");var tk=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"});p.forwardRef((e,t)=>(0,y.jsx)(S.WV.span,{...e,ref:t,style:{...tk,...e.style}})).displayName="VisuallyHidden";var tM=new WeakMap,tO=new WeakMap,tj={},tD=0,tW=function(e){return e&&(e.host||tW(e.parentNode))},tI=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tW(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tj[n]||(tj[n]=new WeakMap);var i=tj[n],l=[],a=new Set,u=new Set(o),c=function(e){!e||a.has(e)||(a.add(e),c(e.parentNode))};o.forEach(c);var s=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))s(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(tM.get(e)||0)+1,c=(i.get(e)||0)+1;tM.set(e,u),i.set(e,c),l.push(e),1===u&&o&&tO.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return s(t),a.clear(),tD++,function(){l.forEach(function(e){var t=tM.get(e)-1,o=i.get(e)-1;tM.set(e,t),i.set(e,o),t||(tO.has(e)||e.removeAttribute(r),tO.delete(e)),o||e.removeAttribute(n)}),--tD||(tM=new WeakMap,tM=new WeakMap,tO=new WeakMap,tj={})}},tF=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tI(r,o,n,"aria-hidden")):function(){return null}},tV=function(){return(tV=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}"function"==typeof SuppressedError&&SuppressedError;var tH="right-scroll-bar-position",tB="width-before-scroll-bar";function tz(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tU=p.useLayoutEffect,tK=new WeakMap,tZ=(void 0===i&&(i={}),(void 0===l&&(l=function(e){return e}),a=[],u=!1,c={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:null},useMedium:function(e){var t=l(e,u);return a.push(t),function(){a=a.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(u=!0;a.length;){var t=a;a=[],t.forEach(e)}a={push:function(t){return e(t)},filter:function(){return a}}},assignMedium:function(e){u=!0;var t=[];if(a.length){var n=a;a=[],n.forEach(e),t=a}var r=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(r)};o(),a={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),a}}}}).options=tV({async:!0,ssr:!1},i),c),tY=function(){},tX=p.forwardRef(function(e,t){var n,r,o,i,l=p.useRef(null),a=p.useState({onScrollCapture:tY,onWheelCapture:tY,onTouchMoveCapture:tY}),u=a[0],c=a[1],s=e.forwardProps,d=e.children,f=e.className,v=e.removeScrollBar,m=e.enabled,h=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,S=e.gapMode,C=t_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=(n=[l,t],r=function(e){return n.forEach(function(t){return tz(t,e)})},(o=(0,p.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,tU(function(){var e=tK.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||tz(e,null)}),r.forEach(function(e){t.has(e)||tz(e,o)})}tK.set(i,n)},[n]),i),T=tV(tV({},C),u);return p.createElement(p.Fragment,null,m&&p.createElement(g,{sideCar:tZ,removeScrollBar:v,shards:h,noRelative:y,noIsolation:w,inert:b,setCallbacks:c,allowPinchZoom:!!x,lockRef:l,gapMode:S}),s?p.cloneElement(p.Children.only(d),tV(tV({},T),{ref:R})):p.createElement(void 0===E?"div":E,tV({},T,{className:f,ref:R}),d))});tX.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tX.classNames={fullWidth:tB,zeroRight:tH};var t$=function(e){var t=e.sideCar,n=t_(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 p.createElement(r,tV({},n))};t$.isSideCarExport=!0;var tq=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=f||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tG=function(){var e=tq();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tJ=function(){var e=tG();return function(t){return e(t.styles,t.dynamic),null}},tQ=function(e){return parseInt(e||"",10)||0},t0=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[tQ(n),tQ(r),tQ(o)]},t1=function(e){void 0===e&&(e="margin");var t=t0(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])}},t2=tJ(),t4="data-scroll-locked",t5=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(t4,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tH," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(tB," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(tH," .").concat(tH," {\n right: 0 ").concat(r,";\n }\n \n .").concat(tB," .").concat(tB," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(t4,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},t9=function(){var e=parseInt(document.body.getAttribute(t4)||"0",10);return isFinite(e)?e:0},t6=function(){p.useEffect(function(){return document.body.setAttribute(t4,(t9()+1).toString()),function(){var e=t9()-1;e<=0?document.body.removeAttribute(t4):document.body.setAttribute(t4,e.toString())}},[])},t3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;t6();var i=p.useMemo(function(){return t1(o)},[o]);return p.createElement(t2,{styles:t5(i,!t,o,n?"":"!important")})},t8=!1;try{var t7=Object.defineProperty({},"passive",{get:function(){return t8=!0,!0}});window.addEventListener("test",t7,t7),window.removeEventListener("test",t7,t7)}catch(e){t8=!1}var ne=!!t8&&{passive:!1},nt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},nn=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),nr(e,r)){var o=no(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nr=function(e,t){return"v"===e?nt(t,"overflowY"):nt(t,"overflowX")},no=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ni=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,u=n.target,c=t.contains(u),s=!1,d=a>0,f=0,p=0;do{if(!u)break;var v=no(e,u),m=v[0],h=v[1]-v[2]-l*m;(m||h)&&nr(e,u)&&(f+=h,p+=m);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&a>f)?s=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(s=!0),s},nl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},na=function(e){return[e.deltaX,e.deltaY]},nu=function(e){return e&&"current"in e?e.current:e},nc=0,ns=[],nd=(tZ.useMedium(function(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(nc++)[0],i=p.useState(tJ)[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;oMath.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===s||p.contains(s)))return!1;var v=nn(d,s);if(!v)return!0;if(v?o=d:(o="v"===d?"h":"v",v=nn(d,s)),!v)return!1;if(!r.current&&"changedTouches"in e&&(u||c)&&(r.current=o),!o)return!0;var m=r.current||o;return ni(m,t,e,"h"===m?u:c,!0)},[]),u=p.useCallback(function(e){if(ns.length&&ns[ns.length-1]===i){var n="deltaY"in e?na(e):nl(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(nu).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=p.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),s=p.useCallback(function(e){n.current=nl(e),r.current=void 0},[]),d=p.useCallback(function(t){c(t.type,na(t),t.target,a(t,e.lockRef.current))},[]),f=p.useCallback(function(t){c(t.type,nl(t),t.target,a(t,e.lockRef.current))},[]);p.useEffect(function(){return ns.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,ne),document.addEventListener("touchmove",u,ne),document.addEventListener("touchstart",s,ne),function(){ns=ns.filter(function(e){return e!==i}),document.removeEventListener("wheel",u,ne),document.removeEventListener("touchmove",u,ne),document.removeEventListener("touchstart",s,ne)}},[]);var v=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,v?p.createElement(t3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),t$),nf=p.forwardRef(function(e,t){return p.createElement(tX,tV({},e,{ref:t,sideCar:nd}))});nf.classNames=tX.classNames;var np=[" ","Enter","ArrowUp","ArrowDown"],nv=[" ","Enter"],nm="Select",[nh,ng,ny]=function(e){let t=e+"CollectionProvider",[n,r]=w(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:n}=e,r=p.useRef(null),i=p.useRef(new Map).current;return(0,y.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})};l.displayName=t;let a=e+"CollectionSlot",u=(0,x.Z8)(a),c=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=i(a,n),l=(0,b.e)(t,o.collectionRef);return(0,y.jsx)(u,{ref:l,children:r})});c.displayName=a;let s=e+"CollectionItemSlot",d="data-radix-collection-item",f=(0,x.Z8)(s),v=p.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,l=p.useRef(null),a=(0,b.e)(t,l),u=i(s,n);return p.useEffect(()=>(u.itemMap.set(l,{ref:l,...o}),()=>void u.itemMap.delete(l))),(0,y.jsx)(f,{[d]:"",ref:a,children:r})});return v.displayName=s,[{Provider:l,Slot:c,ItemSlot:v},function(t){let n=i(e+"CollectionConsumer",t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(d,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(nm),[nw,nb]=w(nm,[ny,tc]),nx=tc(),[nE,nS]=nw(nm),[nC,nR]=nw(nm);function nT(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:a,onValueChange:u,dir:c,name:s,autoComplete:d,disabled:f,required:v,form:m,internal_do_not_use_render:h}=e,g=nx(t),[w,b]=p.useState(null),[x,S]=p.useState(null),[C,R]=p.useState(!1),T=function(e){let t=p.useContext(E);return e||t||"ltr"}(c),[A,N]=tP({prop:r,defaultProp:null!=o&&o,onChange:i,caller:nm}),[L,P]=tP({prop:l,defaultProp:a,onChange:u,caller:nm}),k=p.useRef(null),M=!w||!!m||!!w.closest("form"),[O,j]=p.useState(new Set),D=K(),W=Array.from(O).map(e=>e.props.value).join(";"),I=p.useCallback(e=>{j(t=>new Set(t).add(e))},[]),F=p.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),V={required:v,trigger:w,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:R,contentId:D,value:L,onValueChange:P,open:A,onOpenChange:N,dir:T,triggerPointerDownPosRef:k,disabled:f,name:s,autoComplete:d,form:m,nativeOptions:O,nativeSelectKey:W,isFormControl:M};return(0,y.jsx)(tf,{...g,children:(0,y.jsx)(nE,{scope:t,...V,children:(0,y.jsx)(nh.Provider,{scope:t,children:(0,y.jsx)(nC,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:F,children:"function"==typeof h?h(V):n})})})})}nT.displayName="SelectProvider";var nA=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,y.jsx)(nT,{__scopeSelect:t,...r,internal_do_not_use_render:e=>{let{isFormControl:r}=e;return(0,y.jsxs)(y.Fragment,{children:[n,r?(0,y.jsx)(ro,{__scopeSelect:t}):null]})}})};nA.displayName=nm;var nN="SelectTrigger",nL=p.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,i=nx(n),l=nS(nN,n),a=l.disabled||r,u=(0,b.e)(t,l.onTriggerChange),c=ng(n),s=p.useRef("touch"),[d,f,v]=rl(e=>{let t=c().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=ra(t,e,n);void 0!==r&&l.onValueChange(r.value)}),m=e=>{a||(l.onOpenChange(!0),v()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,y.jsx)(tv,{asChild:!0,...i,children:(0,y.jsx)(S.WV.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ri(l.value)?"":void 0,...o,ref:u,onClick:g(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==s.current&&m(e)}),onPointerDown:g(o.onPointerDown,e=>{s.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:g(o.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&np.includes(e.key)&&(m(),e.preventDefault())})})})});nL.displayName=nN;var nP="SelectValue",nk=p.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,u=nS(nP,n),{onValueNodeHasChildrenChange:c}=u,s=void 0!==i,d=(0,b.e)(t,u.onValueNodeChange);B(()=>{c(s)},[c,s]);let f=ri(u.value);return(0,y.jsx)(S.WV.span,{...a,asChild:!f&&a.asChild,ref:d,style:{pointerEvents:"none"},children:(0,y.jsx)(p.Fragment,{children:f?l:i},f?"placeholder":"value")})});nk.displayName=nP;var nM=p.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,y.jsx)(S.WV.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nM.displayName="SelectIcon";var nO="SelectPortal",[nj,nD]=nw(nO,{forceMount:void 0}),nW=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,y.jsx)(nj,{scope:e.__scopeSelect,forceMount:n,children:(0,y.jsx)(tR,{asChild:!0,...r})})};nW.displayName=nO;var nI="SelectContent",nF=p.forwardRef((e,t)=>{let n=nD(nI,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,i=nS(nI,e.__scopeSelect),[l,a]=p.useState();return B(()=>{a(new DocumentFragment)},[]),(0,y.jsx)(tT,{present:r||i.open,children:e=>{let{present:n}=e;return n?(0,y.jsx)(nz,{...o,ref:t}):(0,y.jsx)(nV,{...o,fragment:l})}})});nF.displayName=nI;var nV=p.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:o}=e;return o?m.createPortal((0,y.jsx)(n_,{scope:n,children:(0,y.jsx)(nh.Slot,{scope:n,children:(0,y.jsx)("div",{ref:t,children:r})})}),o):null});nV.displayName="SelectContentFragment";var[n_,nH]=nw(nI),nB=(0,x.Z8)("SelectContent.RemoveScroll"),nz=p.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:a,sideOffset:u,align:c,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:v,sticky:m,hideWhenDetached:h,avoidCollisions:w,...x}=e,E=nS(nI,n),[S,C]=p.useState(null),[R,T]=p.useState(null),N=(0,b.e)(t,e=>C(e)),[L,O]=p.useState(null),[j,D]=p.useState(null),I=ng(n),[F,V]=p.useState(!1),_=p.useRef(!1);p.useEffect(()=>{if(S)return tF(S)},[S]),p.useEffect(()=>{k||(k={start:M(),end:M()});let{start:e,end:t}=k;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),P++,()=>{1===P&&(null==k||k.start.remove(),null==k||k.end.remove(),k=null),P=Math.max(0,P-1)}},[]);let H=p.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&R&&(R.scrollTop=0),n===r&&R&&(R.scrollTop=R.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[I,R]),B=p.useCallback(()=>H([L,S]),[H,L,S]);p.useEffect(()=>{F&&B()},[F,B]);let{onOpenChange:z,triggerPointerDownPosRef:U}=E;p.useEffect(()=>{if(S){let e={x:0,y:0},t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(o=null===(n=U.current)||void 0===n?void 0:n.x)&&void 0!==o?o:0)),y:Math.abs(Math.round(t.pageY)-(null!==(i=null===(r=U.current)||void 0===r?void 0:r.y)&&void 0!==i?i:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(S)||z(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[S,z,U]),p.useEffect(()=>{let e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);let[K,Z]=rl(e=>{let t=I().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ra(t,e,n);r&&setTimeout(()=>{var e;return null===(e=r.ref.current)||void 0===e?void 0:e.focus()})}),Y=p.useCallback((e,t,n)=>{let r=!_.current&&!n;(void 0!==E.value&&E.value===t||r)&&(O(e),r&&(_.current=!0))},[E.value]),X=p.useCallback(()=>null==S?void 0:S.focus(),[S]),$=p.useCallback((e,t,n)=>{let r=!_.current&&!n;(void 0!==E.value&&E.value===t||r)&&D(e)},[E.value]),q="popper"===r?nK:nU,G=q===nK?{side:a,sideOffset:u,align:c,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:v,sticky:m,hideWhenDetached:h,avoidCollisions:w}:{};return(0,y.jsx)(n_,{scope:n,content:S,viewport:R,onViewportChange:T,itemRefCallback:Y,selectedItem:L,onItemLeave:X,itemTextRefCallback:$,focusSelectedItem:B,selectedItemText:j,position:r,isPositioned:F,searchRef:K,children:(0,y.jsx)(nf,{as:nB,allowPinchZoom:!0,children:(0,y.jsx)(W,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:g(o,e=>{var t;null===(t=E.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,y.jsx)(A,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,y.jsx)(q,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...x,...G,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:g(x.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().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(()=>H(t)),e.preventDefault()}})})})})})})});nz.displayName="SelectContentImpl";var nU=p.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,i=nS(nI,n),l=nH(nI,n),[a,u]=p.useState(null),[c,s]=p.useState(null),d=(0,b.e)(t,e=>s(e)),f=ng(n),v=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:x,focusSelectedItem:E}=l,C=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&w&&x){let e=i.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==i.dir){let r=o.left-t.left,i=n.left-r,l=e.left-i,u=e.width+l,c=Math.max(u,t.width),s=h(i,[10,Math.max(10,window.innerWidth-10-c)]);a.style.minWidth=u+"px",a.style.left=s+"px"}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,u=e.width+l,c=Math.max(u,t.width),s=h(i,[10,Math.max(10,window.innerWidth-10-c)]);a.style.minWidth=u+"px",a.style.right=s+"px"}let l=f(),u=window.innerHeight-20,s=g.scrollHeight,d=window.getComputedStyle(c),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=p+m+s+parseInt(d.paddingBottom,10)+y,E=Math.min(5*w.offsetHeight,b),S=window.getComputedStyle(g),C=parseInt(S.paddingTop,10),R=parseInt(S.paddingBottom,10),T=e.top+e.height/2-10,A=w.offsetHeight/2,N=p+m+(w.offsetTop+A);if(N<=T){let e=l.length>0&&w===l[l.length-1].ref.current;a.style.bottom="0px";let t=c.clientHeight-g.offsetTop-g.offsetHeight;a.style.height=N+Math.max(u-T,A+(e?R:0)+t+y)+"px"}else{let e=l.length>0&&w===l[0].ref.current;a.style.top="0px";let t=Math.max(T,p+g.offsetTop+(e?C:0)+A);a.style.height=t+(b-N)+"px",g.scrollTop=N-T+g.offsetTop}a.style.margin="".concat(10,"px 0"),a.style.minHeight=E+"px",a.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame(()=>v.current=!0)}},[f,i.trigger,i.valueNode,a,c,g,w,x,i.dir,r]);B(()=>C(),[C]);let[R,T]=p.useState();B(()=>{c&&T(window.getComputedStyle(c).zIndex)},[c]);let A=p.useCallback(e=>{e&&!0===m.current&&(C(),null==E||E(),m.current=!1)},[C,E]);return(0,y.jsx)(nZ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:(0,y.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,y.jsx)(S.WV.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});nU.displayName="SelectItemAlignedPosition";var nK=p.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...i}=e,l=nx(n);return(0,y.jsx)(ty,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});nK.displayName="SelectPopperPosition";var[nZ,nY]=nw(nI,{}),nX="SelectViewport",n$=p.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,i=nH(nX,n),l=nY(nX,n),a=(0,b.e)(t,i.onViewportChange),u=p.useRef(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.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,y.jsx)(nh.Slot,{scope:n,children:(0,y.jsx)(S.WV.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:g(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if((null==r?void 0:r.current)&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o0?a:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});n$.displayName=nX;var nq="SelectGroup",[nG,nJ]=nw(nq),nQ=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=K();return(0,y.jsx)(nG,{scope:n,id:o,children:(0,y.jsx)(S.WV.div,{role:"group","aria-labelledby":o,...r,ref:t})})});nQ.displayName=nq;var n0="SelectLabel";p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nJ(n0,n);return(0,y.jsx)(S.WV.div,{id:o.id,...r,ref:t})}).displayName=n0;var n1="SelectItem",[n2,n4]=nw(n1),n5=p.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,a=nS(n1,n),u=nH(n1,n),c=a.value===r,[s,d]=p.useState(null!=i?i:""),[f,v]=p.useState(!1),m=(0,b.e)(t,e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)}),h=K(),w=p.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};return(0,y.jsx)(n2,{scope:n,value:r,disabled:o,textId:h,isSelected:c,onItemTextChange:p.useCallback(e=>{d(t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[]),children:(0,y.jsx)(nh.ItemSlot,{scope:n,value:r,disabled:o,textValue:s,children:(0,y.jsx)(S.WV.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:m,onFocus:g(l.onFocus,()=>v(!0)),onBlur:g(l.onBlur,()=>v(!1)),onClick:g(l.onClick,()=>{"mouse"!==w.current&&x()}),onPointerUp:g(l.onPointerUp,()=>{"mouse"===w.current&&x()}),onPointerDown:g(l.onPointerDown,e=>{w.current=e.pointerType}),onPointerMove:g(l.onPointerMove,e=>{if(w.current=e.pointerType,o){var t;null===(t=u.onItemLeave)||void 0===t||t.call(u)}else"mouse"===w.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:g(l.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=u.onItemLeave)||void 0===t||t.call(u)}}),onKeyDown:g(l.onKeyDown,e=>{var t;(null===(t=u.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(nv.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});n5.displayName=n1;var n9="SelectItemText",n6=p.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...i}=e,l=nS(n9,n),a=nH(n9,n),u=n4(n9,n),c=nR(n9,n),[s,d]=p.useState(null),f=(0,b.e)(t,e=>d(e),u.onItemTextChange,e=>{var t;return null===(t=a.itemTextRefCallback)||void 0===t?void 0:t.call(a,e,u.value,u.disabled)}),v=null==s?void 0:s.textContent,h=p.useMemo(()=>(0,y.jsx)("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=c;return B(()=>(g(h),()=>w(h)),[g,w,h]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S.WV.span,{id:u.textId,...i,ref:f}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!ri(l.value)?m.createPortal(i.children,l.valueNode):null]})});n6.displayName=n9;var n3="SelectItemIndicator",n8=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return n4(n3,n).isSelected?(0,y.jsx)(S.WV.span,{"aria-hidden":!0,...r,ref:t}):null});n8.displayName=n3;var n7="SelectScrollUpButton";p.forwardRef((e,t)=>{let n=nH(n7,e.__scopeSelect),r=nY(n7,e.__scopeSelect),[o,i]=p.useState(!1),l=(0,b.e)(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){i(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(rt,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}).displayName=n7;var re="SelectScrollDownButton";p.forwardRef((e,t)=>{let n=nH(re,e.__scopeSelect),r=nY(re,e.__scopeSelect),[o,i]=p.useState(!1),l=(0,b.e)(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(rt,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}).displayName=re;var rt=p.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,i=nH("SelectScrollButton",n),l=p.useRef(null),a=ng(n),u=p.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return p.useEffect(()=>()=>u(),[u]),B(()=>{var e;let t=a().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[a]),(0,y.jsx)(S.WV.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:g(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(r,50))}),onPointerMove:g(o.onPointerMove,()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===l.current&&(l.current=window.setInterval(r,50))}),onPointerLeave:g(o.onPointerLeave,()=>{u()})})});p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,y.jsx)(S.WV.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var rn="SelectArrow";p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nx(n);return"popper"===nH(rn,n).position?(0,y.jsx)(tx,{...o,...r,ref:t}):null}).displayName=rn;var rr="SelectBubbleInput",ro=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nS(rr,n),{value:i,onValueChange:l,required:a,disabled:u,name:c,autoComplete:s,form:d}=o,{nativeOptions:f,nativeSelectKey:v}=o,m=p.useRef(null),h=(0,b.e)(t,m),g=null!=i?i:"",w=function(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(g),x=Array.from(f).some(e=>{var t;return(null!==(t=e.props.value)&&void 0!==t?t:"")===""});return p.useEffect(()=>{let e=m.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(w!==g&&t){let n=new Event("change",{bubbles:!0});t.call(e,g),e.dispatchEvent(n)}},[w,g]),(0,y.jsxs)(S.WV.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:c,autoComplete:s,disabled:u,form:d,onChange:e=>l(e.target.value),...r,style:{...tk,...r.style},ref:h,defaultValue:g,children:[ri(i)&&!x?(0,y.jsx)("option",{value:""}):null,Array.from(f)]},v)});function ri(e){return""===e||void 0===e}function rl(e){let t=C(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ra(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(i=i.filter(e=>e!==n));let l=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}ro.displayName=rr},9143:function(e,t,n){n.d(t,{Z8:function(){return l},g7:function(){return a}});var r,o=n(4090),i=n(1266);function l(e){let t=o.forwardRef((t,n)=>{var r,l,a,s;let m,h;let{children:g,...y}=t,w=null,b=!1,x=[];d(g)&&"function"==typeof v&&(g=v(g._payload)),o.Children.forEach(g,e=>{var t;if(o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u){b=!0;let n="child"in e.props?e.props.child:e.props.children;d(n)&&"function"==typeof v&&(n=v(n._payload)),w=c(e,n),x.push(null==w?void 0:null===(t=w.props)||void 0===t?void 0:t.children)}else x.push(e)}),w?w=o.cloneElement(w,void 0,x):!b&&1===o.Children.count(g)&&o.isValidElement(g)&&(w=g);let E=w?(m=null===(a=Object.getOwnPropertyDescriptor((l=w).props,"ref"))||void 0===a?void 0:a.get)&&"isReactWarning"in m&&m.isReactWarning?l.ref:(m=null===(s=Object.getOwnPropertyDescriptor(l,"ref"))||void 0===s?void 0:s.get)&&"isReactWarning"in m&&m.isReactWarning?l.props.ref:l.props.ref||l.ref:void 0,S=(0,i.e)(n,E);if(!w){if(g||0===g)throw Error(b?p(e):f(e));return g}let C=function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n{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},s=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),v=(r||(r=n.t(o,2)))[" use ".trim().toString()]}}]);