"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5158],{61786:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,[t,r]){return Math.min(r,Math.max(t,e))}},4256:(e,t,r)=>{r.d(t,{jH:()=>o});var n=r(12115);r(95155);var l=n.createContext(void 0);function o(e){let t=n.useContext(l);return e||t||"ltr"}},65158:(e,t,r)=>{r.d(t,{UC:()=>tl,YJ:()=>ti,In:()=>tr,q7:()=>ts,VF:()=>td,p4:()=>tu,JU:()=>ta,ZL:()=>tn,bL:()=>e7,wn:()=>tp,PP:()=>tc,wv:()=>tf,l9:()=>te,WT:()=>tt,LM:()=>to});var n,l=r(12115),o=r(47650),i=r(61786),a=r(93610),s=r(18166),u=r(88068),d=r(12317),c=r(95155),p=r(4256),f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=l.forwardRef((e,r)=>{let{asChild:n,...l}=e,o=n?d.DX:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,c.jsx)(o,{...l,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),v=r(41524),m=r(95630),h="dismissableLayer.update",w=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y=l.forwardRef((e,t)=>{var r,o;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:s,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:y,onDismiss:b,...E}=e,S=l.useContext(w),[C,P]=l.useState(null),j=null!==(o=null==C?void 0:C.ownerDocument)&&void 0!==o?o:null===(r=globalThis)||void 0===r?void 0:r.document,[,R]=l.useState({}),N=(0,u.s)(t,e=>P(e)),T=Array.from(S.layers),[L]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),D=T.indexOf(L),k=C?T.indexOf(C):-1,I=S.layersWithOutsidePointerEventsDisabled.size>0,A=k>=D,M=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,n=(0,v.c)(e),o=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){x("dismissableLayer.pointerDownOutside",n,l,{discrete:!0})},l={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}},[r,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...S.branches].some(e=>e.contains(t));!A||r||(null==d||d(e),null==y||y(e),e.defaultPrevented||null==b||b())},j),O=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,n=(0,v.c)(e),o=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!o.current&&x("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...S.branches].some(e=>e.contains(t))||(null==p||p(e),null==y||y(e),e.defaultPrevented||null==b||b())},j);return(0,m.U)(e=>{k!==S.layers.size-1||(null==s||s(e),!e.defaultPrevented&&b&&(e.preventDefault(),b()))},j),l.useEffect(()=>{if(C)return i&&(0===S.layersWithOutsidePointerEventsDisabled.size&&(n=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(C)),S.layers.add(C),g(),()=>{i&&1===S.layersWithOutsidePointerEventsDisabled.size&&(j.body.style.pointerEvents=n)}},[C,j,i,S]),l.useEffect(()=>()=>{C&&(S.layers.delete(C),S.layersWithOutsidePointerEventsDisabled.delete(C),g())},[C,S]),l.useEffect(()=>{let e=()=>R({});return document.addEventListener(h,e),()=>document.removeEventListener(h,e)},[]),(0,c.jsx)(f.div,{...E,ref:N,style:{pointerEvents:I?A?"auto":"none":void 0,...e.style},onFocusCapture:(0,a.m)(e.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,a.m)(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,a.m)(e.onPointerDownCapture,M.onPointerDownCapture)})});function g(){let e=new CustomEvent(h);document.dispatchEvent(e)}function x(e,t,r,n){let{discrete:l}=n,i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});(t&&i.addEventListener(e,t,{once:!0}),l)?i&&o.flushSync(()=>i.dispatchEvent(a)):i.dispatchEvent(a)}y.displayName="DismissableLayer",l.forwardRef((e,t)=>{let r=l.useContext(w),n=l.useRef(null),o=(0,u.s)(t,n);return l.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,c.jsx)(f.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var b=r(62292),E="focusScope.autoFocusOnMount",S="focusScope.autoFocusOnUnmount",C={bubbles:!1,cancelable:!0},P=l.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,d]=l.useState(null),p=(0,v.c)(o),m=(0,v.c)(i),h=l.useRef(null),w=(0,u.s)(t,e=>d(e)),y=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let e=function(e){if(y.paused||!s)return;let t=e.target;s.contains(t)?h.current=t:N(h.current,{select:!0})},t=function(e){if(y.paused||!s)return;let t=e.relatedTarget;null===t||s.contains(t)||N(h.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&N(s)});return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,s,y.paused]),l.useEffect(()=>{if(s){T.add(y);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(E,C);s.addEventListener(E,p),s.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(N(n,{select:t}),document.activeElement!==r)return}(j(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&N(s))}return()=>{s.removeEventListener(E,p),setTimeout(()=>{let t=new CustomEvent(S,C);s.addEventListener(S,m),s.dispatchEvent(t),t.defaultPrevented||N(null!=e?e:document.body,{select:!0}),s.removeEventListener(S,m),T.remove(y)},0)}}},[s,p,m,y]);let g=l.useCallback(e=>{if(!r&&!n||y.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,l=document.activeElement;if(t&&l){let t=e.currentTarget,[n,o]=function(e){let t=j(e);return[R(t,e),R(t.reverse(),e)]}(t);n&&o?e.shiftKey||l!==o?e.shiftKey&&l===n&&(e.preventDefault(),r&&N(o,{select:!0})):(e.preventDefault(),r&&N(n,{select:!0})):l===t&&e.preventDefault()}},[r,n,y.paused]);return(0,c.jsx)(f.div,{tabIndex:-1,...a,ref:w,onKeyDown:g})});function j(e){let t=[],r=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(;r.nextNode();)t.push(r.currentNode);return t}function R(e,t){for(let r of e)if(!function(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function N(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}P.displayName="FocusScope";var T=function(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=L(e,t)).unshift(t)},remove(t){var r;null===(r=(e=L(e,t))[0])||void 0===r||r.resume()}}}();function L(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var D=r(67668),k=r(96932),I=r(57205),A=l.forwardRef((e,t)=>{let{children:r,width:n=10,height:l=5,...o}=e;return(0,c.jsx)(f.svg,{...o,ref:t,width:n,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,c.jsx)("polygon",{points:"0,0 30,0 15,10"})})});A.displayName="Arrow";var M=r(46611),O=r(7510),F="Popper",[H,B]=(0,s.A)(F),[_,W]=H(F),K=e=>{let{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return(0,c.jsx)(_,{scope:t,anchor:n,onAnchorChange:o,children:r})};K.displayName=F;var U="PopperAnchor",V=l.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,i=W(U,r),a=l.useRef(null),s=(0,u.s)(t,a);return l.useEffect(()=>{i.onAnchorChange((null==n?void 0:n.current)||a.current)}),n?null:(0,c.jsx)(f.div,{...o,ref:s})});V.displayName=U;var z="PopperContent",[X,q]=H(z),Y=l.forwardRef((e,t)=>{var r,n,o,i,a,s,d,p;let{__scopePopper:m,side:h="bottom",sideOffset:w=0,align:y="center",alignOffset:g=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:E=[],collisionPadding:S=0,sticky:C="partial",hideWhenDetached:P=!1,updatePositionStrategy:j="optimized",onPlaced:R,...N}=e,T=W(z,m),[L,D]=l.useState(null),A=(0,u.s)(t,e=>D(e)),[F,H]=l.useState(null),B=(0,O.X)(F),_=null!==(d=null==B?void 0:B.width)&&void 0!==d?d:0,K=null!==(p=null==B?void 0:B.height)&&void 0!==p?p:0,U="number"==typeof S?S:{top:0,right:0,bottom:0,left:0,...S},V=Array.isArray(E)?E:[E],q=V.length>0,Y={padding:U,boundary:V.filter($),altBoundary:q},{refs:Z,floatingStyles:J,placement:G,isPositioned:et,middlewareData:er}=(0,k.we)({strategy:"fixed",placement:h+("center"!==y?"-"+y:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),r=0;r{let{elements:t,rects:r,availableWidth:n,availableHeight:l}=e,{width:o,height:i}=r.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(n,"px")),a.setProperty("--radix-popper-available-height","".concat(l,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(i,"px"))}}),F&&(0,k.UE)({element:F,padding:x}),Q({arrowWidth:_,arrowHeight:K}),P&&(0,k.jD)({strategy:"referenceHidden",...Y})]}),[en,el]=ee(G),eo=(0,v.c)(R);(0,M.N)(()=>{et&&(null==eo||eo())},[et,eo]);let ei=null===(r=er.arrow)||void 0===r?void 0:r.x,ea=null===(n=er.arrow)||void 0===n?void 0:n.y,es=(null===(o=er.arrow)||void 0===o?void 0:o.centerOffset)!==0,[eu,ed]=l.useState();return(0,M.N)(()=>{L&&ed(window.getComputedStyle(L).zIndex)},[L]),(0,c.jsx)("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:et?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eu,"--radix-popper-transform-origin":[null===(i=er.transformOrigin)||void 0===i?void 0:i.x,null===(a=er.transformOrigin)||void 0===a?void 0:a.y].join(" "),...(null===(s=er.hide)||void 0===s?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,c.jsx)(X,{scope:m,placedSide:en,onArrowChange:H,arrowX:ei,arrowY:ea,shouldHideArrow:es,children:(0,c.jsx)(f.div,{"data-side":en,"data-align":el,...N,ref:A,style:{...N.style,animation:et?void 0:"none"}})})})});Y.displayName=z;var Z="PopperArrow",J={top:"bottom",right:"left",bottom:"top",left:"right"},G=l.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,l=q(Z,r),o=J[l.placedSide];return(0,c.jsx)("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:(0,c.jsx)(A,{...n,ref:t,style:{...n.style,display:"block"}})})});function $(e){return null!==e}G.displayName=Z;var Q=e=>({name:"transformOrigin",options:e,fn(t){var r,n,l,o,i;let{placement:a,rects:s,middlewareData:u}=t,d=(null===(r=u.arrow)||void 0===r?void 0:r.centerOffset)!==0,c=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[f,v]=ee(a),m={start:"0%",center:"50%",end:"100%"}[v],h=(null!==(o=null===(n=u.arrow)||void 0===n?void 0:n.x)&&void 0!==o?o:0)+c/2,w=(null!==(i=null===(l=u.arrow)||void 0===l?void 0:l.y)&&void 0!==i?i:0)+p/2,y="",g="";return"bottom"===f?(y=d?m:"".concat(h,"px"),g="".concat(-p,"px")):"top"===f?(y=d?m:"".concat(h,"px"),g="".concat(s.floating.height+p,"px")):"right"===f?(y="".concat(-p,"px"),g=d?m:"".concat(w,"px")):"left"===f&&(y="".concat(s.floating.width+p,"px"),g=d?m:"".concat(w,"px")),{data:{x:y,y:g}}}});function ee(e){let[t,r="center"]=e.split("-");return[t,r]}var et=l.forwardRef((e,t)=>{var r,n;let{container:i,...a}=e,[s,u]=l.useState(!1);(0,M.N)(()=>u(!0),[]);let d=i||s&&(null===(n=globalThis)||void 0===n?void 0:null===(r=n.document)||void 0===r?void 0:r.body);return d?o.createPortal((0,c.jsx)(f.div,{...a,ref:t}),d):null});et.displayName="Portal";var er=r(1488),en=r(50858),el=l.forwardRef((e,t)=>(0,c.jsx)(f.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));el.displayName="VisuallyHidden";var eo=r(15587),ei=r(2431),ea=[" ","Enter","ArrowUp","ArrowDown"],es=[" ","Enter"],eu="Select",[ed,ec,ep]=function(e){let t=e+"CollectionProvider",[r,n]=(0,s.A)(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:r}=e,n=l.useRef(null),i=l.useRef(new Map).current;return(0,c.jsx)(o,{scope:t,itemMap:i,collectionRef:n,children:r})};a.displayName=t;let p=e+"CollectionSlot",f=l.forwardRef((e,t)=>{let{scope:r,children:n}=e,l=i(p,r),o=(0,u.s)(t,l.collectionRef);return(0,c.jsx)(d.DX,{ref:o,children:n})});f.displayName=p;let v=e+"CollectionItemSlot",m="data-radix-collection-item",h=l.forwardRef((e,t)=>{let{scope:r,children:n,...o}=e,a=l.useRef(null),s=(0,u.s)(t,a),p=i(v,r);return l.useEffect(()=>(p.itemMap.set(a,{ref:a,...o}),()=>void p.itemMap.delete(a))),(0,c.jsx)(d.DX,{[m]:"",ref:s,children:n})});return h.displayName=v,[{Provider:a,Slot:f,ItemSlot:h},function(t){let r=i(e+"CollectionConsumer",t);return l.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}(eu),[ef,ev]=(0,s.A)(eu,[ep,B]),em=B(),[eh,ew]=ef(eu),[ey,eg]=ef(eu),ex=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:v,disabled:m,required:h,form:w}=e,y=em(t),[g,x]=l.useState(null),[b,E]=l.useState(null),[S,C]=l.useState(!1),P=(0,p.jH)(d),[j=!1,R]=(0,er.i)({prop:n,defaultProp:o,onChange:i}),[N,T]=(0,er.i)({prop:a,defaultProp:s,onChange:u}),L=l.useRef(null),k=!g||w||!!g.closest("form"),[I,A]=l.useState(new Set),M=Array.from(I).map(e=>e.props.value).join(";");return(0,c.jsx)(K,{...y,children:(0,c.jsxs)(eh,{required:h,scope:t,trigger:g,onTriggerChange:x,valueNode:b,onValueNodeChange:E,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:(0,D.B)(),value:N,onValueChange:T,open:j,onOpenChange:R,dir:P,triggerPointerDownPosRef:L,disabled:m,children:[(0,c.jsx)(ed.Provider,{scope:t,children:(0,c.jsx)(ey,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:l.useCallback(e=>{A(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),k?(0,c.jsxs)(e9,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:v,value:N,onChange:e=>T(e.target.value),disabled:m,form:w,children:[void 0===N?(0,c.jsx)("option",{value:""}):null,Array.from(I)]},M):null]})})};ex.displayName=eu;var eb="SelectTrigger",eE=l.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...o}=e,i=em(r),s=ew(eb,r),d=s.disabled||n,p=(0,u.s)(t,s.onTriggerChange),v=ec(r),m=l.useRef("touch"),[h,w,y]=e3(e=>{let t=v().filter(e=>!e.disabled),r=t.find(e=>e.value===s.value),n=e4(t,e,r);void 0!==n&&s.onValueChange(n.value)}),g=e=>{d||(s.onOpenChange(!0),y()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,c.jsx)(V,{asChild:!0,...i,children:(0,c.jsx)(f.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":e8(s.value)?"":void 0,...o,ref:p,onClick:(0,a.m)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&g(e)}),onPointerDown:(0,a.m)(o.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,a.m)(o.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||w(e.key),(!t||" "!==e.key)&&ea.includes(e.key)&&(g(),e.preventDefault())})})})});eE.displayName=eb;var eS="SelectValue",eC=l.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:l,children:o,placeholder:i="",...a}=e,s=ew(eS,r),{onValueNodeHasChildrenChange:d}=s,p=void 0!==o,v=(0,u.s)(t,s.onValueNodeChange);return(0,M.N)(()=>{d(p)},[d,p]),(0,c.jsx)(f.span,{...a,ref:v,style:{pointerEvents:"none"},children:e8(s.value)?(0,c.jsx)(c.Fragment,{children:i}):o})});eC.displayName=eS;var eP=l.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...l}=e;return(0,c.jsx)(f.span,{"aria-hidden":!0,...l,ref:t,children:n||"▼"})});eP.displayName="SelectIcon";var ej=e=>(0,c.jsx)(et,{asChild:!0,...e});ej.displayName="SelectPortal";var eR="SelectContent",eN=l.forwardRef((e,t)=>{let r=ew(eR,e.__scopeSelect),[n,i]=l.useState();return((0,M.N)(()=>{i(new DocumentFragment)},[]),r.open)?(0,c.jsx)(eD,{...e,ref:t}):n?o.createPortal((0,c.jsx)(eT,{scope:e.__scopeSelect,children:(0,c.jsx)(ed.Slot,{scope:e.__scopeSelect,children:(0,c.jsx)("div",{children:e.children})})}),n):null});eN.displayName=eR;var[eT,eL]=ef(eR),eD=l.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:p,sideOffset:f,align:v,alignOffset:m,arrowPadding:h,collisionBoundary:w,collisionPadding:g,sticky:x,hideWhenDetached:E,avoidCollisions:S,...C}=e,j=ew(eR,r),[R,N]=l.useState(null),[T,L]=l.useState(null),D=(0,u.s)(t,e=>N(e)),[k,I]=l.useState(null),[A,M]=l.useState(null),O=ec(r),[F,H]=l.useState(!1),B=l.useRef(!1);l.useEffect(()=>{if(R)return(0,eo.Eq)(R)},[R]),(0,b.Oh)();let _=l.useCallback(e=>{let[t,...r]=O().map(e=>e.ref.current),[n]=r.slice(-1),l=document.activeElement;for(let r of e)if(r===l||(null==r||r.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===n&&T&&(T.scrollTop=T.scrollHeight),null==r||r.focus(),document.activeElement!==l))return},[O,T]),W=l.useCallback(()=>_([k,R]),[_,k,R]);l.useEffect(()=>{F&&W()},[F,W]);let{onOpenChange:K,triggerPointerDownPosRef:U}=j;l.useEffect(()=>{if(R){let e={x:0,y:0},t=t=>{var r,n,l,o;e={x:Math.abs(Math.round(t.pageX)-(null!==(l=null===(r=U.current)||void 0===r?void 0:r.x)&&void 0!==l?l:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(n=U.current)||void 0===n?void 0:n.y)&&void 0!==o?o:0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():R.contains(r.target)||K(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[R,K,U]),l.useEffect(()=>{let e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[K]);let[V,z]=e3(e=>{let t=O().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=e4(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),X=l.useCallback((e,t,r)=>{let n=!B.current&&!r;(void 0!==j.value&&j.value===t||n)&&(I(e),n&&(B.current=!0))},[j.value]),q=l.useCallback(()=>null==R?void 0:R.focus(),[R]),Y=l.useCallback((e,t,r)=>{let n=!B.current&&!r;(void 0!==j.value&&j.value===t||n)&&M(e)},[j.value]),Z="popper"===n?eI:ek,J=Z===eI?{side:p,sideOffset:f,align:v,alignOffset:m,arrowPadding:h,collisionBoundary:w,collisionPadding:g,sticky:x,hideWhenDetached:E,avoidCollisions:S}:{};return(0,c.jsx)(eT,{scope:r,content:R,viewport:T,onViewportChange:L,itemRefCallback:X,selectedItem:k,onItemLeave:q,itemTextRefCallback:Y,focusSelectedItem:W,selectedItemText:A,position:n,isPositioned:F,searchRef:V,children:(0,c.jsx)(ei.A,{as:d.DX,allowPinchZoom:!0,children:(0,c.jsx)(P,{asChild:!0,trapped:j.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.m)(o,e=>{var t;null===(t=j.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,c.jsx)(y,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:(0,c.jsx)(Z,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:e=>e.preventDefault(),...C,...J,onPlaced:()=>H(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,a.m)(C.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=O().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 r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>_(t)),e.preventDefault()}})})})})})})});eD.displayName="SelectContentImpl";var ek=l.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...o}=e,a=ew(eR,r),s=eL(eR,r),[d,p]=l.useState(null),[v,m]=l.useState(null),h=(0,u.s)(t,e=>m(e)),w=ec(r),y=l.useRef(!1),g=l.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:E,focusSelectedItem:S}=s,C=l.useCallback(()=>{if(a.trigger&&a.valueNode&&d&&v&&x&&b&&E){let e=a.trigger.getBoundingClientRect(),t=v.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),l=E.getBoundingClientRect();if("rtl"!==a.dir){let n=l.left-t.left,o=r.left-n,a=e.left-o,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-10,p=(0,i.q)(o,[10,Math.max(10,c-u)]);d.style.minWidth=s+"px",d.style.left=p+"px"}else{let n=t.right-l.right,o=window.innerWidth-r.right-n,a=window.innerWidth-e.right-o,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-10,p=(0,i.q)(o,[10,Math.max(10,c-u)]);d.style.minWidth=s+"px",d.style.right=p+"px"}let o=w(),s=window.innerHeight-20,u=x.scrollHeight,c=window.getComputedStyle(v),p=parseInt(c.borderTopWidth,10),f=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),h=p+f+u+parseInt(c.paddingBottom,10)+m,g=Math.min(5*b.offsetHeight,h),S=window.getComputedStyle(x),C=parseInt(S.paddingTop,10),P=parseInt(S.paddingBottom,10),j=e.top+e.height/2-10,R=b.offsetHeight/2,N=p+f+(b.offsetTop+R);if(N<=j){let e=o.length>0&&b===o[o.length-1].ref.current;d.style.bottom="0px";let t=Math.max(s-j,R+(e?P:0)+(v.clientHeight-x.offsetTop-x.offsetHeight)+m);d.style.height=N+t+"px"}else{let e=o.length>0&&b===o[0].ref.current;d.style.top="0px";let t=Math.max(j,p+x.offsetTop+(e?C:0)+R);d.style.height=t+(h-N)+"px",x.scrollTop=N-j+x.offsetTop}d.style.margin="".concat(10,"px 0"),d.style.minHeight=g+"px",d.style.maxHeight=s+"px",null==n||n(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,d,v,x,b,E,a.dir,n]);(0,M.N)(()=>C(),[C]);let[P,j]=l.useState();(0,M.N)(()=>{v&&j(window.getComputedStyle(v).zIndex)},[v]);let R=l.useCallback(e=>{e&&!0===g.current&&(C(),null==S||S(),g.current=!1)},[C,S]);return(0,c.jsx)(eA,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:R,children:(0,c.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:(0,c.jsx)(f.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ek.displayName="SelectItemAlignedPosition";var eI=l.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:l=10,...o}=e,i=em(r);return(0,c.jsx)(Y,{...i,...o,ref:t,align:n,collisionPadding:l,style:{boxSizing:"border-box",...o.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)"}})});eI.displayName="SelectPopperPosition";var[eA,eM]=ef(eR,{}),eO="SelectViewport",eF=l.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...o}=e,i=eL(eO,r),s=eM(eO,r),d=(0,u.s)(t,i.onViewportChange),p=l.useRef(0);return(0,c.jsxs)(c.Fragment,{children:[(0,c.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:n}),(0,c.jsx)(ed.Slot,{scope:r,children:(0,c.jsx)(f.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,a.m)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if((null==n?void 0:n.current)&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,l=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(l0?a:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});eF.displayName=eO;var eH="SelectGroup",[eB,e_]=ef(eH),eW=l.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=(0,D.B)();return(0,c.jsx)(eB,{scope:r,id:l,children:(0,c.jsx)(f.div,{role:"group","aria-labelledby":l,...n,ref:t})})});eW.displayName=eH;var eK="SelectLabel",eU=l.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=e_(eK,r);return(0,c.jsx)(f.div,{id:l.id,...n,ref:t})});eU.displayName=eK;var eV="SelectItem",[ez,eX]=ef(eV),eq=l.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,d=ew(eV,r),p=eL(eV,r),v=d.value===n,[m,h]=l.useState(null!=i?i:""),[w,y]=l.useState(!1),g=(0,u.s)(t,e=>{var t;return null===(t=p.itemRefCallback)||void 0===t?void 0:t.call(p,e,n,o)}),x=(0,D.B)(),b=l.useRef("touch"),E=()=>{o||(d.onValueChange(n),d.onOpenChange(!1))};if(""===n)throw Error("A 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,c.jsx)(ez,{scope:r,value:n,disabled:o,textId:x,isSelected:v,onItemTextChange:l.useCallback(e=>{h(t=>{var r;return t||(null!==(r=null==e?void 0:e.textContent)&&void 0!==r?r:"").trim()})},[]),children:(0,c.jsx)(ed.ItemSlot,{scope:r,value:n,disabled:o,textValue:m,children:(0,c.jsx)(f.div,{role:"option","aria-labelledby":x,"data-highlighted":w?"":void 0,"aria-selected":v&&w,"data-state":v?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:(0,a.m)(s.onFocus,()=>y(!0)),onBlur:(0,a.m)(s.onBlur,()=>y(!1)),onClick:(0,a.m)(s.onClick,()=>{"mouse"!==b.current&&E()}),onPointerUp:(0,a.m)(s.onPointerUp,()=>{"mouse"===b.current&&E()}),onPointerDown:(0,a.m)(s.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,a.m)(s.onPointerMove,e=>{if(b.current=e.pointerType,o){var t;null===(t=p.onItemLeave)||void 0===t||t.call(p)}else"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.m)(s.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=p.onItemLeave)||void 0===t||t.call(p)}}),onKeyDown:(0,a.m)(s.onKeyDown,e=>{var t;(null===(t=p.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(es.includes(e.key)&&E()," "===e.key&&e.preventDefault())})})})})});eq.displayName=eV;var eY="SelectItemText",eZ=l.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,...a}=e,s=ew(eY,r),d=eL(eY,r),p=eX(eY,r),v=eg(eY,r),[m,h]=l.useState(null),w=(0,u.s)(t,e=>h(e),p.onItemTextChange,e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,p.value,p.disabled)}),y=null==m?void 0:m.textContent,g=l.useMemo(()=>(0,c.jsx)("option",{value:p.value,disabled:p.disabled,children:y},p.value),[p.disabled,p.value,y]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=v;return(0,M.N)(()=>(x(g),()=>b(g)),[x,b,g]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(f.span,{id:p.textId,...a,ref:w}),p.isSelected&&s.valueNode&&!s.valueNodeHasChildren?o.createPortal(a.children,s.valueNode):null]})});eZ.displayName=eY;var eJ="SelectItemIndicator",eG=l.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return eX(eJ,r).isSelected?(0,c.jsx)(f.span,{"aria-hidden":!0,...n,ref:t}):null});eG.displayName=eJ;var e$="SelectScrollUpButton",eQ=l.forwardRef((e,t)=>{let r=eL(e$,e.__scopeSelect),n=eM(e$,e.__scopeSelect),[o,i]=l.useState(!1),a=(0,u.s)(t,n.onScrollButtonChange);return(0,M.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){i(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,c.jsx)(e5,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eQ.displayName=e$;var e0="SelectScrollDownButton",e1=l.forwardRef((e,t)=>{let r=eL(e0,e.__scopeSelect),n=eM(e0,e.__scopeSelect),[o,i]=l.useState(!1),a=(0,u.s)(t,n.onScrollButtonChange);return(0,M.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,c.jsx)(e5,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});e1.displayName=e0;var e5=l.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...o}=e,i=eL("SelectScrollButton",r),s=l.useRef(null),u=ec(r),d=l.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return l.useEffect(()=>()=>d(),[d]),(0,M.N)(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[u]),(0,c.jsx)(f.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,a.m)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(n,50))}),onPointerMove:(0,a.m)(o.onPointerMove,()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===s.current&&(s.current=window.setInterval(n,50))}),onPointerLeave:(0,a.m)(o.onPointerLeave,()=>{d()})})}),e2=l.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,c.jsx)(f.div,{"aria-hidden":!0,...n,ref:t})});e2.displayName="SelectSeparator";var e6="SelectArrow";function e8(e){return""===e||void 0===e}l.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=em(r),o=ew(e6,r),i=eL(e6,r);return o.open&&"popper"===i.position?(0,c.jsx)(G,{...l,...n,ref:t}):null}).displayName=e6;var e9=l.forwardRef((e,t)=>{let{value:r,...n}=e,o=l.useRef(null),i=(0,u.s)(t,o),a=(0,en.Z)(r);return l.useEffect(()=>{let e=o.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(a!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[a,r]),(0,c.jsx)(el,{asChild:!0,children:(0,c.jsx)("select",{...n,ref:i,defaultValue:r})})});function e3(e){let t=(0,v.c)(e),r=l.useRef(""),n=l.useRef(0),o=l.useCallback(e=>{let l=r.current+e;t(l),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(l)},[t]),i=l.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function e4(e,t,r){var n;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===l.length&&(o=o.filter(e=>e!==r));let i=o.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return i!==r?i:void 0}e9.displayName="BubbleSelect";var e7=ex,te=eE,tt=eC,tr=eP,tn=ej,tl=eN,to=eF,ti=eW,ta=eU,ts=eq,tu=eZ,td=eG,tc=eQ,tp=e1,tf=e2},50858:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(12115);function l(e){let t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}}}]); //# sourceMappingURL=5158-ce2486e461934b50.js.map