@indxsearch/systm 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js DELETED
@@ -1,102 +0,0 @@
1
- (function(Z,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Y):(Z=typeof globalThis<"u"?globalThis:Z||self,Y(Z.IndxSystem={},Z.React,Z.ReactDOM))})(this,(function(Z,Y,$n){"use strict";function Dr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Dr(Y),rt=Dr($n);var Ft={exports:{}},Pt={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Lr;function Ks(){if(Lr)return Pt;Lr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Pt.Fragment=t,Pt.jsx=n,Pt.jsxs=n,Pt}var Ot={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var jr;function Zs(){return jr||(jr=1,process.env.NODE_ENV!=="production"&&(function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===F?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case g:return"Fragment";case w:return"Profiler";case y:return"StrictMode";case R:return"Suspense";case C:return"SuspenseList";case D:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case c:return"Portal";case S:return _.displayName||"Context";case b:return(_._context.displayName||"Context")+".Consumer";case E:var B=_.render;return _=_.displayName,_||(_=B.displayName||B.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case M:return B=_.displayName||null,B!==null?B:e(_.type)||"Memo";case N:B=_._payload,_=_._init;try{return e(_(B))}catch{}}return null}function t(_){return""+_}function n(_){try{t(_);var B=!1}catch{B=!0}if(B){B=console;var V=B.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return V.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(_)}}function r(_){if(_===g)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===N)return"<...>";try{var B=e(_);return B?"<"+B+">":"<...>"}catch{return"<...>"}}function o(){var _=P.A;return _===null?null:_.getOwner()}function i(){return Error("react-stack-top-frame")}function a(_){if(O.call(_,"key")){var B=Object.getOwnPropertyDescriptor(_,"key").get;if(B&&B.isReactWarning)return!1}return _.key!==void 0}function s(_,B){function V(){k||(k=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}V.isReactWarning=!0,Object.defineProperty(_,"key",{get:V,configurable:!0})}function u(){var _=e(this.type);return $[_]||($[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function d(_,B,V,H,K,J){var j=V.ref;return _={$$typeof:l,type:_,key:B,props:V,_owner:H},(j!==void 0?j:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:u}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function p(_,B,V,H,K,J){var j=B.children;if(j!==void 0)if(H)if(T(j)){for(H=0;H<j.length;H++)h(j[H]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(j);if(O.call(B,"key")){j=e(_);var z=Object.keys(B).filter(function(U){return U!=="key"});H=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",W[j+H]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
- let props = %s;
19
- <%s {...props} />
20
- React keys must be passed directly to JSX without using spread:
21
- let props = %s;
22
- <%s key={someKey} {...props} />`,H,j,z,j),W[j+H]=!0)}if(j=null,V!==void 0&&(n(V),j=""+V),a(B)&&(n(B.key),j=""+B.key),"key"in B){V={};for(var G in B)G!=="key"&&(V[G]=B[G])}else V=B;return j&&s(V,typeof _=="function"?_.displayName||_.name||"Unknown":_),d(_,j,V,o(),K,J)}function h(_){v(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===N&&(_._payload.status==="fulfilled"?v(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function v(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}var m=Y,l=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),S=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),P=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,T=Array.isArray,I=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(_){return _()}};var k,$={},A=m.react_stack_bottom_frame.bind(m,i)(),L=I(r(i)),W={};Ot.Fragment=g,Ot.jsx=function(_,B,V){var H=1e4>P.recentlyCreatedOwnerStacks++;return p(_,B,V,!1,H?Error("react-stack-top-frame"):A,H?I(r(_)):L)},Ot.jsxs=function(_,B,V){var H=1e4>P.recentlyCreatedOwnerStacks++;return p(_,B,V,!0,H?Error("react-stack-top-frame"):A,H?I(r(_)):L)}})()),Ot}var Fr;function Gs(){return Fr||(Fr=1,process.env.NODE_ENV==="production"?Ft.exports=Ks():Ft.exports=Zs()),Ft.exports}var x=Gs();const Nn={button:"_button_1sns4_1",micro:"_micro_1sns4_22",default:"_default_1sns4_30",large:"_large_1sns4_38",primary:"_primary_1sns4_47",secondary:"_secondary_1sns4_57",ghost:"_ghost_1sns4_67"};function Js(e){const{size:t="default",variant:n="primary",iconLeft:r,iconRight:o,className:i,children:a,...s}=e,{href:u}=s,d="disabled"in s?s.disabled:!1,p=t==="micro"?"14px":t==="large"?"21px":"14px",h=[Nn.button,Nn[t],Nn[n],d?"cursor-not-allowed":"cursor-pointer",i].filter(Boolean).join(" ");if(process.env.NODE_ENV!=="production"){const c=(r||o)&&!a,g=s["aria-label"]||s["aria-labelledby"];c&&!g&&console.warn("Button: Icon-only buttons should have an aria-label or aria-labelledby for accessibility.")}const v=x.jsxs(x.Fragment,{children:[r&&Y.cloneElement(r,{size:p,color:"currentColor"}),a,o&&Y.cloneElement(o,{size:p,color:"currentColor"})]});if(u){const{type:c,disabled:g,...y}=s;return x.jsx("a",{className:h,href:u,...y,"aria-disabled":d?"true":void 0,onClick:d?w=>w.preventDefault():y.onClick,children:v})}const{type:m="button",...l}=s;return x.jsx("button",{className:h,type:m,...l,children:v})}const ot={checkboxWrapper:"_checkboxWrapper_1vygn_1",checkbox:"_checkbox_1vygn_1",label:"_label_1vygn_44",score:"_score_1vygn_48",disabled:"_disabled_1vygn_55"},Qs=({label:e,score:t,className:n="",id:r,"aria-label":o,...i})=>{const a=Y.useId(),s=r||a,u=t?`${s}-score`:void 0,d=i.disabled;return e||t?x.jsxs("label",{htmlFor:s,className:`${ot.checkboxWrapper} ${n} ${d?ot.disabled:""} ${d?"cursor-not-allowed":"cursor-pointer"}`,children:[x.jsx("input",{id:s,type:"checkbox",className:ot.checkbox,"aria-describedby":u,"aria-label":o,...i}),e&&x.jsx("span",{className:ot.label,children:e}),t&&x.jsx("span",{id:u,className:ot.score,children:t})]}):x.jsx("input",{id:s,type:"checkbox",className:`${ot.checkbox} ${n}`,"aria-label":o,disabled:d,...i})},Br={container:"_container_dlzj1_1",default:"_default_dlzj1_5"};function ea({children:e,className:t}){return x.jsx("div",{className:`${Br.container} ${Br.default} ${t||""}`,children:e})}const it={container:"_container_10bfq_1",header:"_header_10bfq_11",title:"_title_10bfq_31",body:"_body_10bfq_49"},ta=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 1H2V2H1V1ZM3 3H2V2H3V3ZM4 3V4H3V3H4ZM5 2H4V3H5V2ZM5 2V1H6V2H5Z",fill:e})})},na=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M6 2V3L1 3L1 2L6 2Z",fill:e})})},ra=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M4 5H3V3L1 3L1 2L3 2L3 0L4 0V2L6 2V3H4V5Z",fill:e})})},oa=({color:e="black",size:t=21})=>{const n=.7142857142857143,r=t,o=typeof t=="number"?t*n:`calc(${t} * 0.7142857142857143)`;return x.jsx("svg",{width:r,height:o,viewBox:"0 0 7 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0H2V1H1V3H2V4H4V3H5V1H4V0ZM4 1V3H2V1H4ZM6 4H5V5H6V4Z",fill:e})})};function ia({title:e,children:t,className:n="",collapsible:r=!0,collapsed:o=!1}){const[i,a]=Y.useState(()=>!o),s=Y.useId();Y.useEffect(()=>{r&&a(!o)},[o,r]);const u=()=>{r&&a(d=>!d)};return x.jsxs("div",{className:`${it.container} ${n}`,children:[e&&(r?x.jsxs("button",{type:"button",className:it.header,onClick:u,"aria-label":`${e}: ${i?"Collapse panel":"Expand panel"}`,"aria-expanded":i,"aria-controls":s,children:[x.jsx("div",{className:it.title,children:e}),x.jsx("span",{"aria-hidden":"true",children:i?x.jsx(na,{color:"var(--lv5)",size:14}):x.jsx(ra,{color:"var(--lv5)",size:14})})]}):x.jsx("div",{className:it.header,children:x.jsx("div",{className:it.title,children:e})})),(!r||i)&&x.jsx("div",{id:s,className:it.body,role:"region","aria-label":e||"Filter panel content",children:t})]})}const de={wrapper:"_wrapper_tf1yl_1",label:"_label_tf1yl_7",inputContainer:"_inputContainer_tf1yl_12",input:"_input_tf1yl_12",focus:"_focus_tf1yl_35",searchIcon:"_searchIcon_tf1yl_52",rightContent:"_rightContent_tf1yl_67",sizeMicro:"_sizeMicro_tf1yl_78",sizeDefault:"_sizeDefault_tf1yl_87",error:"_error_tf1yl_110",errorText:"_errorText_tf1yl_114"},sa={micro:14,default:21};function aa({label:e,error:t,className:n="",showSearchIcon:r=!0,searchIcon:o,searchIconColor:i,inputSize:a="default",showFocusBorder:s=!1,children:u,id:d,type:p="search",...h}){const v=Y.useRef(null),m=Y.useId(),l=d||m,c=`${l}-error`,g=sa[a],y={};i&&(y["--search-icon-color"]=i);const w="var(--search-icon-color)",b=o??x.jsx(oa,{}),S=a==="micro"?de.sizeMicro:de.sizeDefault;return x.jsxs("div",{className:`${de.wrapper} ${n}`,children:[e&&x.jsx("label",{htmlFor:l,className:de.label,children:e}),x.jsxs("div",{className:`${de.inputContainer} ${S}`,children:[r&&x.jsx("span",{className:de.searchIcon,"aria-hidden":"true",children:Y.cloneElement(b,{size:g,color:i??w})}),x.jsx("input",{ref:v,id:l,type:p,className:`${de.input} ${s?de.focus:""} ${t?de.error:""}`,style:y,"aria-invalid":t?"true":"false","aria-describedby":t?c:void 0,...h}),u&&x.jsx("div",{className:de.rightContent,children:u})]}),t&&x.jsx("span",{id:c,className:de.errorText,role:"alert",children:t})]})}const st={wrapper:"_wrapper_su5p5_1",label:"_label_su5p5_7",input:"_input_su5p5_12",error:"_error_su5p5_61",errorText:"_errorText_su5p5_69",borderBottom:"_borderBottom_su5p5_75"};function ca({label:e,error:t,className:n="",isValid:r=!0,variant:o="default",id:i,...a}){const s=Y.useId(),u=i||s,d=`${u}-error`,p=t||!r;return x.jsxs("div",{className:`${st.wrapper} ${n}`,children:[e&&x.jsxs("label",{htmlFor:u,className:st.label,children:[e,a.required&&x.jsx("span",{"aria-label":"required",children:" *"})]}),x.jsx("input",{id:u,className:`${st.input} ${o==="borderBottom"?st.borderBottom:""} ${p?st.error:""}`,"aria-invalid":p?"true":"false","aria-describedby":t?d:void 0,...a}),t&&x.jsx("span",{id:d,className:st.errorText,role:"alert",children:t})]})}const At={radioWrapper:"_radioWrapper_1faq0_1",radioInput:"_radioInput_1faq0_9",customRadio:"_customRadio_1faq0_23",labelText:"_labelText_1faq0_57",disabled:"_disabled_1faq0_63"},la=({id:e,name:t,value:n,label:r,checked:o=!1,onChange:i,disabled:a=!1,"aria-label":s})=>x.jsxs("label",{htmlFor:e,className:`${At.radioWrapper} ${a?At.disabled:""} ${a?"cursor-not-allowed":"cursor-pointer"}`,children:[x.jsx("input",{id:e,type:"radio",name:t,value:n,checked:o,onChange:i,disabled:a,"aria-label":s,className:At.radioInput}),x.jsx("span",{className:At.customRadio}),x.jsx("span",{className:At.labelText,children:r})]}),Bt={switch:"_switch_1xsea_1",slider:"_slider_1xsea_23",label:"_label_1xsea_28",disabled:"_disabled_1xsea_43"},ua=({id:e,checked:t,onChange:n,disabled:r=!1,label:o,"aria-label":i})=>{const a=Y.useId(),s=e||a;return x.jsxs("label",{htmlFor:s,className:`${Bt.switch} ${r?Bt.disabled:""} ${r?"cursor-not-allowed":"cursor-pointer"}`,children:[x.jsx("input",{id:s,type:"checkbox",role:"switch","aria-checked":t,"aria-label":i,checked:t,onChange:u=>n(u.target.checked),disabled:r}),x.jsx("span",{className:Bt.slider,"aria-hidden":"true"}),o&&x.jsx("span",{className:Bt.label,children:o})]})},re={label:"_label_12as9_1",basetrack:"_basetrack_12as9_8",selectedtrack:"_selectedtrack_12as9_36",livetrack:"_livetrack_12as9_43",livetrackFaceted:"_livetrackFaceted_12as9_49",livetrackDefault:"_livetrackDefault_12as9_52",thumbs:"_thumbs_12as9_55",disabled:"_disabled_12as9_89"};var Tt={},ie={},$t={},Nt={},Wr;function kn(){if(Wr)return Nt;Wr=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Direction=void 0;var e;return(function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"})(e||(Nt.Direction=e={})),Nt}var Vr;function Hr(){return Vr||(Vr=1,(function(e){var t=$t&&$t.__spreadArray||function(P,O,T){if(T||arguments.length===2)for(var I=0,k=O.length,$;I<k;I++)($||!(I in O))&&($||($=Array.prototype.slice.call(O,0,I)),$[I]=O[I]);return P.concat($||Array.prototype.slice.call(O))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Y,r=kn(),o=function(P){var O=P.toString().split(".")[1];return O?O.length:0};e.getStepDecimals=o;function i(P){return P.touches&&P.touches.length||P.changedTouches&&P.changedTouches.length}e.isTouchEvent=i;function a(P,O,T){var I=(O-P)/T,k=8,$=Number(I.toFixed(k));return parseInt($.toString(),10)===$}e.isStepDivisible=a;function s(P,O,T,I,k,$,A){var L=1e11;if(P=Math.round(P*L)/L,!$){var W=A[O-1],_=A[O+1];if(W&&W>P)return W;if(_&&_<P)return _}if(P>I)return I;if(P<T)return T;var B=Math.floor(P*L-T*L)%Math.floor(k*L),V=Math.floor(P*L-Math.abs(B)),H=B===0?P:V/L,K=Math.abs(B/L)<k/2?H:H+k,J=(0,e.getStepDecimals)(k);return parseFloat(K.toFixed(J))}e.normalizeValue=s;function u(P,O,T){return(P-O)/(T-O)}e.relativeValue=u;function d(P){return P===r.Direction.Up||P===r.Direction.Down}e.isVertical=d;function p(P,O,T){if(O>=T)throw new RangeError("min (".concat(O,") is equal/bigger than max (").concat(T,")"));if(P<O)throw new RangeError("value (".concat(P,") is smaller than min (").concat(O,")"));if(P>T)throw new RangeError("value (".concat(P,") is bigger than max (").concat(T,")"))}e.checkBoundaries=p;function h(P,O,T){return P<O?O:P>T?T:P}e.checkValuesAgainstBoundaries=h;function v(P){if(!(P.length<2)&&!P.slice(1).every(function(O,T){return P[T]<=O}))throw new RangeError("values={[".concat(P,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=v;function m(P){var O=window.getComputedStyle(P);return{top:parseInt(O["margin-top"],10),bottom:parseInt(O["margin-bottom"],10),left:parseInt(O["margin-left"],10),right:parseInt(O["margin-right"],10)}}e.getMargin=m;function l(P){var O=window.getComputedStyle(P);return{top:parseInt(O["padding-top"],10)+parseInt(O["border-top-width"],10),bottom:parseInt(O["padding-bottom"],10)+parseInt(O["border-bottom-width"],10),left:parseInt(O["padding-left"],10)+parseInt(O["border-left-width"],10),right:parseInt(O["padding-right"],10)+parseInt(O["border-right-width"],10)}}e.getPaddingAndBorder=l;function c(P,O,T){var I=T?-1:1;P.forEach(function(k,$){return y(k,I*O[$].x,O[$].y)})}e.translateThumbs=c;function g(P,O,T,I){for(var k=0,$=D(P[0],O,T,I),A=1;A<P.length;A++){var L=D(P[A],O,T,I);L<$&&($=L,k=A)}return k}e.getClosestThumbIndex=g;function y(P,O,T){P.style.transform="translate(".concat(O,"px, ").concat(T,"px)")}e.translate=y;var w=function(P){var O=[],T=null,I=function(){for(var k=[],$=0;$<arguments.length;$++)k[$]=arguments[$];O=k,!T&&(T=requestAnimationFrame(function(){T=null,P.apply(void 0,O)}))};return I};e.schd=w;function b(P,O,T){var I=P.slice(0);return I[O]=T,I}e.replaceAt=b;function S(P){var O=P.values,T=P.colors,I=P.min,k=P.max,$=P.direction,A=$===void 0?r.Direction.Right:$,L=P.rtl,W=L===void 0?!1:L;W&&A===r.Direction.Right?A=r.Direction.Left:W&&r.Direction.Left&&(A=r.Direction.Right);var _=O.slice(0).sort(function(V,H){return V-H}).map(function(V){return(V-I)/(k-I)*100}),B=_.reduce(function(V,H,K){return"".concat(V,", ").concat(T[K]," ").concat(H,"%, ").concat(T[K+1]," ").concat(H,"%")},"");return"linear-gradient(".concat(A,", ").concat(T[0]," 0%").concat(B,", ").concat(T[T.length-1]," 100%)")}e.getTrackBackground=S;function E(){}e.voidFn=E;function R(P){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var C=function(P,O,T,I,k){k===void 0&&(k=function(A){return A});var $=Math.ceil(t([P],Array.from(P.children),!0).reduce(function(A,L){var W=Math.ceil(L.getBoundingClientRect().width);if(L.innerText&&L.innerText.includes(T)&&L.childElementCount===0){var _=L.cloneNode(!0);_.innerHTML=k(O.toFixed(I)),_.style.visibility="hidden",document.body.appendChild(_),W=Math.ceil(_.getBoundingClientRect().width),document.body.removeChild(_)}return W>A?W:A},P.getBoundingClientRect().width));return $},M=function(P,O,T,I,k,$,A){A===void 0&&(A=function(_){return _});var L=[],W=function(_){var B=C(T[_],I[_],k,$,A),V=O[_].x;O.forEach(function(H,K){var J=H.x,j=C(T[K],I[K],k,$,A);_!==K&&(V>=J&&V<=J+j||V+B>=J&&V+B<=J+j)&&(L.includes(K)||(L.push(_),L.push(K),L=t(t([],L,!0),[_,K],!1),W(K)))})};return W(P),Array.from(new Set(L.sort()))},N=function(P,O,T,I,k,$){I===void 0&&(I=.1),k===void 0&&(k=" - "),$===void 0&&($=function(K){return K});var A=(0,e.getStepDecimals)(I),L=(0,n.useState)({}),W=L[0],_=L[1],B=(0,n.useState)($(O[T].toFixed(A))),V=B[0],H=B[1];return(0,n.useEffect)(function(){if(P){var K=P.getThumbs();if(K.length<1)return;var J={},j=P.getOffsets(),z=M(T,j,K,O,k,A,$),G=$(O[T].toFixed(A));if(z.length){var U=z.reduce(function(ae,_e,Pe,_t){return ae.length?t(t([],ae,!0),[j[_t[Pe]].x],!1):[j[_t[Pe]].x]},[]);if(Math.min.apply(Math,U)===j[T].x){var q=[];z.forEach(function(ae){q.push(O[ae].toFixed(A))}),G=Array.from(new Set(q.sort(function(ae,_e){return parseFloat(ae)-parseFloat(_e)}))).map($).join(k);var X=Math.min.apply(Math,U),Q=Math.max.apply(Math,U),oe=K[z[U.indexOf(Q)]].getBoundingClientRect().width;J.left="".concat(Math.abs(X-(Q+oe))/2,"px"),J.transform="translate(-50%, 0)"}else J.visibility="hidden"}H(G),_(J)}},[P,O]),[V,W]};e.useThumbOverlap=N;function D(P,O,T,I){var k=P.getBoundingClientRect(),$=k.left,A=k.top,L=k.width,W=k.height;return d(I)?Math.abs(T-(A+W/2)):Math.abs(O-($+L/2))}var F=function(){var P,O=((P=navigator.userAgentData)===null||P===void 0?void 0:P.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(O)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=F})($t)),$t}var zr;function fa(){if(zr)return ie;zr=1;var e=ie&&ie.__extends||(function(){var h=function(v,m){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var g in c)Object.prototype.hasOwnProperty.call(c,g)&&(l[g]=c[g])},h(v,m)};return function(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");h(v,m);function l(){this.constructor=v}v.prototype=m===null?Object.create(m):(l.prototype=m.prototype,new l)}})(),t=ie&&ie.__createBinding||(Object.create?(function(h,v,m,l){l===void 0&&(l=m);var c=Object.getOwnPropertyDescriptor(v,m);(!c||("get"in c?!v.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return v[m]}}),Object.defineProperty(h,l,c)}):(function(h,v,m,l){l===void 0&&(l=m),h[l]=v[m]})),n=ie&&ie.__setModuleDefault||(Object.create?(function(h,v){Object.defineProperty(h,"default",{enumerable:!0,value:v})}):function(h,v){h.default=v}),r=ie&&ie.__importStar||function(h){if(h&&h.__esModule)return h;var v={};if(h!=null)for(var m in h)m!=="default"&&Object.prototype.hasOwnProperty.call(h,m)&&t(v,h,m);return n(v,h),v},o=ie&&ie.__spreadArray||function(h,v,m){if(m||arguments.length===2)for(var l=0,c=v.length,g;l<c;l++)(g||!(l in v))&&(g||(g=Array.prototype.slice.call(v,0,l)),g[l]=v[l]);return h.concat(g||Array.prototype.slice.call(v))};Object.defineProperty(ie,"__esModule",{value:!0});var i=r(Y),a=Hr(),s=kn(),u=["ArrowRight","ArrowUp","k","PageUp"],d=["ArrowLeft","ArrowDown","j","PageDown"],p=(function(h){e(v,h);function v(m){var l=h.call(this,m)||this;if(l.trackRef=i.createRef(),l.thumbRefs=[],l.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(l.props.values.length).fill(0).map(function(c,g){return g}),isChanged:!1,markOffsets:[]},l.getOffsets=function(){var c=l.props,g=c.direction,y=c.values,w=c.min,b=c.max,S=l.trackRef.current;if(!S)return console.warn("No track element found."),[];var E=S.getBoundingClientRect(),R=(0,a.getPaddingAndBorder)(S);return l.getThumbs().map(function(C,M){var N={x:0,y:0},D=C.getBoundingClientRect(),F=(0,a.getMargin)(C);switch(g){case s.Direction.Right:return N.x=(F.left+R.left)*-1,N.y=((D.height-E.height)/2+R.top)*-1,N.x+=E.width*(0,a.relativeValue)(y[M],w,b)-D.width/2,N;case s.Direction.Left:return N.x=(F.right+R.right)*-1,N.y=((D.height-E.height)/2+R.top)*-1,N.x+=E.width-E.width*(0,a.relativeValue)(y[M],w,b)-D.width/2,N;case s.Direction.Up:return N.x=((D.width-E.width)/2+F.left+R.left)*-1,N.y=-R.left,N.y+=E.height-E.height*(0,a.relativeValue)(y[M],w,b)-D.height/2,N;case s.Direction.Down:return N.x=((D.width-E.width)/2+F.left+R.left)*-1,N.y=-R.left,N.y+=E.height*(0,a.relativeValue)(y[M],w,b)-D.height/2,N;default:return(0,a.assertUnreachable)(g)}})},l.getThumbs=function(){return l.trackRef&&l.trackRef.current?Array.from(l.trackRef.current.children).filter(function(c){return c.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},l.getTargetIndex=function(c){return l.getThumbs().findIndex(function(g){return g===c.target||g.contains(c.target)})},l.addTouchEvents=function(c){document.addEventListener("touchmove",l.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",l.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",l.schdOnEnd,{passive:!1})},l.addMouseEvents=function(c){document.addEventListener("mousemove",l.schdOnMouseMove),document.addEventListener("mouseup",l.schdOnEnd)},l.onMouseDownTrack=function(c){var g;if(!(c.button!==0||(0,a.isIOS)()))if(c.persist(),c.preventDefault(),l.addMouseEvents(c.nativeEvent),l.props.values.length>1&&l.props.draggableTrack){if(l.thumbRefs.some(function(w){var b;return(b=w.current)===null||b===void 0?void 0:b.contains(c.target)}))return;l.setState({draggedTrackPos:[c.clientX,c.clientY]},function(){return l.onMove(c.clientX,c.clientY)})}else{var y=(0,a.getClosestThumbIndex)(l.thumbRefs.map(function(w){return w.current}),c.clientX,c.clientY,l.props.direction);(g=l.thumbRefs[y].current)===null||g===void 0||g.focus(),l.setState({draggedThumbIndex:y},function(){return l.onMove(c.clientX,c.clientY)})}},l.onResize=function(){(0,a.translateThumbs)(l.getThumbs(),l.getOffsets(),l.props.rtl),l.calculateMarkOffsets()},l.onTouchStartTrack=function(c){var g;if(c.persist(),l.addTouchEvents(c.nativeEvent),l.props.values.length>1&&l.props.draggableTrack){if(l.thumbRefs.some(function(w){var b;return(b=w.current)===null||b===void 0?void 0:b.contains(c.target)}))return;l.setState({draggedTrackPos:[c.touches[0].clientX,c.touches[0].clientY]},function(){return l.onMove(c.touches[0].clientX,c.touches[0].clientY)})}else{var y=(0,a.getClosestThumbIndex)(l.thumbRefs.map(function(w){return w.current}),c.touches[0].clientX,c.touches[0].clientY,l.props.direction);(g=l.thumbRefs[y].current)===null||g===void 0||g.focus(),l.setState({draggedThumbIndex:y},function(){return l.onMove(c.touches[0].clientX,c.touches[0].clientY)})}},l.onMouseOrTouchStart=function(c){if(!l.props.disabled){var g=(0,a.isTouchEvent)(c);if(!(!g&&c.button!==0)){var y=l.getTargetIndex(c);y!==-1&&(g?l.addTouchEvents(c):l.addMouseEvents(c),l.setState({draggedThumbIndex:y,thumbZIndexes:l.state.thumbZIndexes.map(function(w,b){return b===y?Math.max.apply(Math,l.state.thumbZIndexes):w<=l.state.thumbZIndexes[y]?w:w-1})}))}}},l.onMouseMove=function(c){c.preventDefault(),l.onMove(c.clientX,c.clientY)},l.onTouchMove=function(c){c.preventDefault(),l.onMove(c.touches[0].clientX,c.touches[0].clientY)},l.onKeyDown=function(c){var g=l.props,y=g.values,w=g.onChange,b=g.step,S=g.rtl,E=g.direction,R=l.state.isChanged,C=l.getTargetIndex(c.nativeEvent),M=S||E===s.Direction.Left||E===s.Direction.Down?-1:1;C!==-1&&(u.includes(c.key)?(c.preventDefault(),l.setState({draggedThumbIndex:C,isChanged:!0}),w((0,a.replaceAt)(y,C,l.normalizeValue(y[C]+M*(c.key==="PageUp"?b*10:b),C)))):d.includes(c.key)?(c.preventDefault(),l.setState({draggedThumbIndex:C,isChanged:!0}),w((0,a.replaceAt)(y,C,l.normalizeValue(y[C]-M*(c.key==="PageDown"?b*10:b),C)))):c.key==="Tab"?l.setState({draggedThumbIndex:-1},function(){R&&l.fireOnFinalChange()}):R&&l.fireOnFinalChange())},l.onKeyUp=function(c){var g=l.state.isChanged;l.setState({draggedThumbIndex:-1},function(){g&&l.fireOnFinalChange()})},l.onMove=function(c,g){var y=l.state,w=y.draggedThumbIndex,b=y.draggedTrackPos,S=l.props,E=S.direction,R=S.min,C=S.max,M=S.onChange,N=S.values,D=S.step,F=S.rtl;if(w===-1&&b[0]===-1&&b[1]===-1)return null;var P=l.trackRef.current;if(!P)return null;var O=P.getBoundingClientRect(),T=(0,a.isVertical)(E)?O.height:O.width;if(b[0]!==-1&&b[1]!==-1){var I=c-b[0],k=g-b[1],$=0;switch(E){case s.Direction.Right:case s.Direction.Left:$=I/T*(C-R);break;case s.Direction.Down:case s.Direction.Up:$=k/T*(C-R);break;default:(0,a.assertUnreachable)(E)}if(F&&($*=-1),Math.abs($)>=D/2){for(var A=0;A<l.thumbRefs.length;A++){if(N[A]===C&&Math.sign($)===1||N[A]===R&&Math.sign($)===-1)return;var L=N[A]+$;L>C?$=C-N[A]:L<R&&($=R-N[A])}for(var W=N.slice(0),A=0;A<l.thumbRefs.length;A++)W=(0,a.replaceAt)(W,A,l.normalizeValue(N[A]+$,A));l.setState({draggedTrackPos:[c,g]}),M(W)}}else{var _=0;switch(E){case s.Direction.Right:_=(c-O.left)/T*(C-R)+R;break;case s.Direction.Left:_=(T-(c-O.left))/T*(C-R)+R;break;case s.Direction.Down:_=(g-O.top)/T*(C-R)+R;break;case s.Direction.Up:_=(T-(g-O.top))/T*(C-R)+R;break;default:(0,a.assertUnreachable)(E)}F&&(_=C+R-_),Math.abs(N[w]-_)>=D/2&&M((0,a.replaceAt)(N,w,l.normalizeValue(_,w)))}},l.normalizeValue=function(c,g){var y=l.props,w=y.min,b=y.max,S=y.step,E=y.allowOverlap,R=y.values;return(0,a.normalizeValue)(c,g,w,b,S,E,R)},l.onEnd=function(c){if(c.preventDefault(),document.removeEventListener("mousemove",l.schdOnMouseMove),document.removeEventListener("touchmove",l.schdOnTouchMove),document.removeEventListener("mouseup",l.schdOnEnd),document.removeEventListener("touchend",l.schdOnEnd),document.removeEventListener("touchcancel",l.schdOnEnd),l.state.draggedThumbIndex===-1&&l.state.draggedTrackPos[0]===-1&&l.state.draggedTrackPos[1]===-1)return null;l.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){l.fireOnFinalChange()})},l.fireOnFinalChange=function(){l.setState({isChanged:!1});var c=l.props,g=c.onFinalChange,y=c.values;g&&g(y)},l.updateMarkRefs=function(c){if(!c.renderMark){l.numOfMarks=void 0,l.markRefs=void 0;return}l.numOfMarks=(c.max-c.min)/l.props.step,l.markRefs=[];for(var g=0;g<l.numOfMarks+1;g++)l.markRefs[g]=i.createRef()},l.calculateMarkOffsets=function(){if(!(!l.props.renderMark||!l.trackRef||!l.numOfMarks||!l.markRefs||l.trackRef.current===null)){for(var c=window.getComputedStyle(l.trackRef.current),g=parseInt(c.width,10),y=parseInt(c.height,10),w=parseInt(c.paddingLeft,10),b=parseInt(c.paddingTop,10),S=[],E=0;E<l.numOfMarks+1;E++){var R=9999,C=9999;if(l.markRefs[E].current){var M=l.markRefs[E].current.getBoundingClientRect();R=M.height,C=M.width}l.props.direction===s.Direction.Left||l.props.direction===s.Direction.Right?S.push([Math.round(g/l.numOfMarks*E+w-C/2),-Math.round((R-y)/2)]):S.push([Math.round(y/l.numOfMarks*E+b-R/2),-Math.round((C-g)/2)])}l.setState({markOffsets:S})}},m.step===0)throw new Error('"step" property should be a positive number');return l.schdOnMouseMove=(0,a.schd)(l.onMouseMove),l.schdOnTouchMove=(0,a.schd)(l.onTouchMove),l.schdOnEnd=(0,a.schd)(l.onEnd),l.thumbRefs=m.values.map(function(){return i.createRef()}),l.updateMarkRefs(m),l}return v.prototype.componentDidMount=function(){var m=this,l=this.props,c=l.values,g=l.min,y=l.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",m.onResize)},unobserve:function(){return window.removeEventListener("resize",m.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,a.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(w){return(0,a.checkBoundaries)(w,m.props.min,m.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,a.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),c.forEach(function(w){(0,a.isStepDivisible)(g,w,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},v.prototype.componentDidUpdate=function(m,l){var c=this.props,g=c.max,y=c.min,w=c.step,b=c.values,S=c.rtl;(m.max!==g||m.min!==y||m.step!==w)&&this.updateMarkRefs(this.props),(0,a.translateThumbs)(this.getThumbs(),this.getOffsets(),S),(m.max!==g||m.min!==y||m.step!==w||l.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),b.forEach(function(E){(0,a.isStepDivisible)(y,E,w)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},v.prototype.componentWillUnmount=function(){var m={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,m),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},v.prototype.render=function(){var m=this,l=this.props,c=l.label,g=l.labelledBy,y=l.renderTrack,w=l.renderThumb,b=l.renderMark,S=b===void 0?function(){return null}:b,E=l.values,R=l.min,C=l.max,M=l.allowOverlap,N=l.disabled,D=this.state,F=D.draggedThumbIndex,P=D.thumbZIndexes,O=D.markOffsets;return y({props:{style:{transform:"scale(1)",cursor:F>-1?"grabbing":this.props.draggableTrack?(0,a.isVertical)(this.props.direction)?"ns-resize":"ew-resize":E.length===1&&!N?"pointer":"inherit"},onMouseDown:N?a.voidFn:this.onMouseDownTrack,onTouchStart:N?a.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:N,children:o(o([],O.map(function(T,I,k){return S({props:{style:m.props.direction===s.Direction.Left||m.props.direction===s.Direction.Right?{position:"absolute",left:"".concat(T[0],"px"),marginTop:"".concat(T[1],"px")}:{position:"absolute",top:"".concat(T[0],"px"),marginLeft:"".concat(T[1],"px")},key:"mark".concat(I),ref:m.markRefs[I]},index:I})}),!0),E.map(function(T,I){var k=m.state.draggedThumbIndex===I;return w({index:I,value:T,isDragged:k,props:{style:{position:"absolute",zIndex:P[I],cursor:N?"inherit":k?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:I,tabIndex:N?void 0:0,"aria-valuemax":M?C:E[I+1]||C,"aria-valuemin":M?R:E[I-1]||R,"aria-valuenow":T,draggable:!1,ref:m.thumbRefs[I],"aria-label":c,"aria-labelledby":g,role:"slider",onKeyDown:N?a.voidFn:m.onKeyDown,onKeyUp:N?a.voidFn:m.onKeyUp}})}),!0)})},v.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:s.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},v})(i.Component);return ie.default=p,ie}var Ur;function da(){return Ur||(Ur=1,(function(e){var t=Tt&&Tt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=t(fa());e.Range=n.default;var r=Hr();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return r.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return r.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return r.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return r.checkValuesAgainstBoundaries}});var o=kn();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return o.Direction}})})(Tt)),Tt}var Yr=da();const ha=e=>{const{min:t,max:n,step:r=1,disabled:o=!1,className:i,activeMin:a,activeMax:s,isFaceted:u=!1,highlightFaceted:d=!0,onChange:p,onFinalChange:h,label:v,"aria-label":m,id:l}=e,c=Y.useId(),g=l||c;if(process.env.NODE_ENV!=="production"&&!v&&!m&&console.warn("Slider: Component should have either a label or aria-label for accessibility."),"isRange"in e&&e.isRange){const y=e.value,[w,b]=y;return x.jsxs("div",{className:i,children:[v&&x.jsx("label",{htmlFor:g,className:re.label,children:v}),x.jsx(Yr.Range,{step:r,min:t,max:n,values:y,onChange:S=>p(S),onFinalChange:S=>h==null?void 0:h(S),disabled:o,renderTrack:({props:S,children:E})=>{const{key:R,...C}=S,M=n-t,N=(w-t)/M*100,D=(b-w)/M*100;let F=0,P=0;const O=typeof a=="number"&&typeof s=="number"&&s>a&&(a>t||s<n);return O&&(F=(a-t)/M*100,P=(s-a)/M*100),x.jsxs("div",{...C,className:re.basetrack,style:{...C.style},children:[!O&&x.jsx("div",{className:re.selectedtrack,style:{left:`${N}%`,width:`${D}%`,zIndex:"1"}}),O&&x.jsx("div",{className:`${re.livetrack} ${u?re.livetrackFaceted:re.livetrackDefault}`,style:{left:`${F}%`,width:`${P}%`,zIndex:"2"}}),E]},R)},renderThumb:({props:S,index:E})=>{const{key:R,...C}=S,M=E===0?w:b;return x.jsx("div",{...C,id:E===0?g:void 0,className:`${re.thumbs} ${o?re.disabled:""} ${o?"cursor-not-allowed":"cursor-resize-col"}`,style:{...C.style,zIndex:"3"},"aria-label":m||(E===0?"Minimum value":"Maximum value"),"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":M},R)}})]})}else{const y=e.value;return x.jsxs("div",{className:i,children:[v&&x.jsx("label",{htmlFor:g,className:re.label,children:v}),x.jsx(Yr.Range,{step:r,min:t,max:n,values:[y],onChange:w=>p(w[0]),onFinalChange:w=>h==null?void 0:h(w[0]),disabled:o,renderTrack:({props:w,children:b})=>{const{key:S,...E}=w,R=n-t,C=(y-t)/R*100;let M=0,N=0;const D=typeof a=="number"&&typeof s=="number"&&s>a&&(a>t||s<n);return D&&(M=(a-t)/R*100,N=(s-a)/R*100),x.jsxs("div",{...E,className:re.basetrack,style:{...E.style},children:[!D&&x.jsx("div",{className:re.selectedtrack,style:{left:"0%",width:`${C}%`,zIndex:"1"}}),D&&x.jsx("div",{className:`${re.livetrack} ${u?re.livetrackFaceted:re.livetrackDefault}`,style:{left:`${M}%`,width:`${N}%`,zIndex:"2"}}),b]},S)},renderThumb:({props:w})=>{const{key:b,...S}=w;return x.jsx("div",{...S,id:g,className:`${re.thumbs} ${o?re.disabled:""} ${o?"cursor-not-allowed":"cursor-resize-col"}`,style:{...S.style,zIndex:"3"},"aria-label":m,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":y},b)}})]})}};function qr(e,[t,n]){return Math.min(n,Math.max(t,e))}function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mn(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];const d=h=>{var y;const{scope:v,children:m,...l}=h,c=((y=v==null?void 0:v[e])==null?void 0:y[u])||s,g=f.useMemo(()=>l,Object.values(l));return x.jsx(c.Provider,{value:g,children:m})};d.displayName=i+"Provider";function p(h,v){var c;const m=((c=v==null?void 0:v[e])==null?void 0:c[u])||s,l=f.useContext(m);if(l)return l;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[d,p]}const o=()=>{const i=n.map(a=>f.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,pa(o,...t)]}function pa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:d})=>{const h=u(i)[`__scope${d}`];return{...s,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Xr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Xr(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Xr(e[o],null)}}}}function ne(...e){return f.useCallback(Kr(...e),e)}function Wt(e){const t=ma(e),n=f.forwardRef((r,o)=>{const{children:i,...a}=r,s=f.Children.toArray(i),u=s.find(ga);if(u){const d=u.props.children,p=s.map(h=>h===u?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:h);return x.jsx(t,{...a,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ma(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const a=wa(o),s=ya(i,o.props);return o.type!==f.Fragment&&(s.ref=r?Kr(r,a):a),f.cloneElement(o,s)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var va=Symbol("radix.slottable");function ga(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===va}function ya(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const u=i(...s);return o(...s),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wa(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ba(e){const t=e+"CollectionProvider",[n,r]=Mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=c=>{const{scope:g,children:y}=c,w=Y.useRef(null),b=Y.useRef(new Map).current;return x.jsx(o,{scope:g,itemMap:b,collectionRef:w,children:y})};a.displayName=t;const s=e+"CollectionSlot",u=Wt(s),d=Y.forwardRef((c,g)=>{const{scope:y,children:w}=c,b=i(s,y),S=ne(g,b.collectionRef);return x.jsx(u,{ref:S,children:w})});d.displayName=s;const p=e+"CollectionItemSlot",h="data-radix-collection-item",v=Wt(p),m=Y.forwardRef((c,g)=>{const{scope:y,children:w,...b}=c,S=Y.useRef(null),E=ne(g,S),R=i(p,y);return Y.useEffect(()=>(R.itemMap.set(S,{ref:S,...b}),()=>void R.itemMap.delete(S))),x.jsx(v,{[h]:"",ref:E,children:w})});m.displayName=p;function l(c){const g=i(e+"CollectionConsumer",c);return Y.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(g.itemMap.values()).sort((R,C)=>b.indexOf(R.ref.current)-b.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:d,ItemSlot:m},l,r]}var xa=f.createContext(void 0);function Sa(e){const t=f.useContext(xa);return e||t||"ltr"}var Ea=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=Ea.reduce((e,t)=>{const n=Wt(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:a,...s}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(u,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ca(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function Ke(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ra(e,t=globalThis==null?void 0:globalThis.document){const n=Ke(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _a="DismissableLayer",In="dismissableLayer.update",Pa="dismissableLayer.pointerDownOutside",Oa="dismissableLayer.focusOutside",Zr,Gr=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,d=f.useContext(Gr),[p,h]=f.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),l=ne(t,C=>h(C)),c=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=c.indexOf(g),w=p?c.indexOf(p):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,E=$a(C=>{const M=C.target,N=[...d.branches].some(D=>D.contains(M));!S||N||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},v),R=Na(C=>{const M=C.target;[...d.branches].some(D=>D.contains(M))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},v);return Ra(C=>{w===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},v),f.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Qr(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Zr)}},[p,v,n,d]),f.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Qr())},[p,d]),f.useEffect(()=>{const C=()=>m({});return document.addEventListener(In,C),()=>document.removeEventListener(In,C)},[]),x.jsx(ee.div,{...u,ref:l,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,R.onFocusCapture),onBlurCapture:te(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,E.onPointerDownCapture)})});Jr.displayName=_a;var Aa="DismissableLayerBranch",Ta=f.forwardRef((e,t)=>{const n=f.useContext(Gr),r=f.useRef(null),o=ne(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(ee.div,{...e,ref:o})});Ta.displayName=Aa;function $a(e,t=globalThis==null?void 0:globalThis.document){const n=Ke(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){eo(Pa,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Na(e,t=globalThis==null?void 0:globalThis.document){const n=Ke(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&eo(Oa,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qr(){const e=new CustomEvent(In);document.dispatchEvent(e)}function eo(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ca(o,i):o.dispatchEvent(i)}var Dn=0;function ka(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??to()),document.body.insertAdjacentElement("beforeend",e[1]??to()),Dn++,()=>{Dn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Dn--}},[])}function to(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ln="focusScope.autoFocusOnMount",jn="focusScope.autoFocusOnUnmount",no={bubbles:!1,cancelable:!0},Ma="FocusScope",ro=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=f.useState(null),d=Ke(o),p=Ke(i),h=f.useRef(null),v=ne(t,c=>u(c)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let c=function(b){if(m.paused||!s)return;const S=b.target;s.contains(S)?h.current=S:Le(h.current,{select:!0})},g=function(b){if(m.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||Le(h.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Le(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",g);const w=new MutationObserver(y);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",g),w.disconnect()}}},[r,s,m.paused]),f.useEffect(()=>{if(s){so.add(m);const c=document.activeElement;if(!s.contains(c)){const y=new CustomEvent(Ln,no);s.addEventListener(Ln,d),s.dispatchEvent(y),y.defaultPrevented||(Ia(Ba(oo(s)),{select:!0}),document.activeElement===c&&Le(s))}return()=>{s.removeEventListener(Ln,d),setTimeout(()=>{const y=new CustomEvent(jn,no);s.addEventListener(jn,p),s.dispatchEvent(y),y.defaultPrevented||Le(c??document.body,{select:!0}),s.removeEventListener(jn,p),so.remove(m)},0)}}},[s,d,p,m]);const l=f.useCallback(c=>{if(!n&&!r||m.paused)return;const g=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,y=document.activeElement;if(g&&y){const w=c.currentTarget,[b,S]=Da(w);b&&S?!c.shiftKey&&y===S?(c.preventDefault(),n&&Le(b,{select:!0})):c.shiftKey&&y===b&&(c.preventDefault(),n&&Le(S,{select:!0})):y===w&&c.preventDefault()}},[n,r,m.paused]);return x.jsx(ee.div,{tabIndex:-1,...a,ref:v,onKeyDown:l})});ro.displayName=Ma;function Ia(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Le(r,{select:t}),document.activeElement!==n)return}function Da(e){const t=oo(e),n=io(t,e),r=io(t.reverse(),e);return[n,r]}function oo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function io(e,t){for(const n of e)if(!La(n,{upTo:t}))return n}function La(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ja(e){return e instanceof HTMLInputElement&&"select"in e}function Le(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ja(e)&&t&&e.select()}}var so=Fa();function Fa(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ao(e,t),e.unshift(t)},remove(t){var n;e=ao(e,t),(n=e[0])==null||n.resume()}}}function ao(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ba(e){return e.filter(t=>t.tagName!=="A")}var se=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Wa=f[" useId ".trim().toString()]||(()=>{}),Va=0;function Fn(e){const[t,n]=f.useState(Wa());return se(()=>{n(r=>r??String(Va++))},[e]),e||(t?`radix-${t}`:"")}const Ha=["top","right","bottom","left"],je=Math.min,ce=Math.max,Vt=Math.round,Ht=Math.floor,ye=e=>({x:e,y:e}),za={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(e,t,n){return ce(e,je(t,n))}function Oe(e,t){return typeof e=="function"?e(t):e}function Ae(e){return e.split("-")[0]}function at(e){return e.split("-")[1]}function Wn(e){return e==="x"?"y":"x"}function Vn(e){return e==="y"?"height":"width"}function we(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Hn(e){return Wn(we(e))}function Ua(e,t,n){n===void 0&&(n=!1);const r=at(e),o=Hn(e),i=Vn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=zt(a)),[a,zt(a)]}function Ya(e){const t=zt(e);return[zn(e),t,zn(t)]}function zn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const co=["left","right"],lo=["right","left"],qa=["top","bottom"],Xa=["bottom","top"];function Ka(e,t,n){switch(e){case"top":case"bottom":return n?t?lo:co:t?co:lo;case"left":case"right":return t?qa:Xa;default:return[]}}function Za(e,t,n,r){const o=at(e);let i=Ka(Ae(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(zn)))),i}function zt(e){const t=Ae(e);return za[t]+e.slice(t.length)}function Ga(e){return{top:0,right:0,bottom:0,left:0,...e}}function uo(e){return typeof e!="number"?Ga(e):{top:e,right:e,bottom:e,left:e}}function Ut(e){const{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 fo(e,t,n){let{reference:r,floating:o}=e;const i=we(t),a=Hn(t),s=Vn(a),u=Ae(t),d=i==="y",p=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,v=r[s]/2-o[s]/2;let m;switch(u){case"top":m={x:p,y:r.y-o.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(at(t)){case"start":m[a]-=v*(n&&d?-1:1);break;case"end":m[a]+=v*(n&&d?-1:1);break}return m}async function Ja(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Oe(t,e),l=uo(m),g=s[v?h==="floating"?"reference":"floating":h],y=Ut(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:p,strategy:u})),w=h==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Ut(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:u}):w);return{top:(y.top-E.top+l.top)/S.y,bottom:(E.bottom-y.bottom+l.bottom)/S.y,left:(y.left-E.left+l.left)/S.x,right:(E.right-y.right+l.right)/S.x}}const Qa=50,ec=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Ja},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:h}=fo(d,r,u),v=r,m=0;const l={};for(let c=0;c<i.length;c++){const g=i[c];if(!g)continue;const{name:y,fn:w}=g,{x:b,y:S,data:E,reset:R}=await w({x:p,y:h,initialPlacement:r,placement:v,strategy:o,middlewareData:l,rects:d,platform:s,elements:{reference:e,floating:t}});p=b??p,h=S??h,l[y]={...l[y],...E},R&&m<Qa&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:h}=fo(d,v,u)),c=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:l}},tc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:d,padding:p=0}=Oe(e,t)||{};if(d==null)return{};const h=uo(p),v={x:n,y:r},m=Hn(o),l=Vn(m),c=await a.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",S=i.reference[l]+i.reference[m]-v[m]-i.floating[l],E=v[m]-i.reference[m],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=R?R[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(R)))&&(C=s.floating[b]||i.floating[l]);const M=S/2-E/2,N=C/2-c[l]/2-1,D=je(h[y],N),F=je(h[w],N),P=D,O=C-c[l]-F,T=C/2-c[l]/2+M,I=Bn(P,T,O),k=!u.arrow&&at(o)!=null&&T!==I&&i.reference[l]/2-(T<P?D:F)-c[l]/2<0,$=k?T<P?T-P:T-O:0;return{[m]:v[m]+$,data:{[m]:I,centerOffset:T-I-$,...k&&{alignmentOffset:$}},reset:k}}}),nc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:l="none",flipAlignment:c=!0,...g}=Oe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Ae(o),w=we(s),b=Ae(s)===s,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=v||(b||!c?[zt(s)]:Ya(s)),R=l!=="none";!v&&R&&E.push(...Za(s,c,l,S));const C=[s,...E],M=await u.detectOverflow(t,g),N=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&N.push(M[y]),h){const T=Ua(o,a,S);N.push(M[T[0]],M[T[1]])}if(D=[...D,{placement:o,overflows:N}],!N.every(T=>T<=0)){var F,P;const T=(((F=i.flip)==null?void 0:F.index)||0)+1,I=C[T];if(I&&(!(h==="alignment"?w!==we(I):!1)||D.every(A=>we(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:T,overflows:D},reset:{placement:I}};let k=(P=D.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:P.placement;if(!k)switch(m){case"bestFit":{var O;const $=(O=D.filter(A=>{if(R){const L=we(A.placement);return L===w||L==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((A,L)=>A[1]-L[1])[0])==null?void 0:O[0];$&&(k=$);break}case"initialPlacement":k=s;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function ho(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function po(e){return Ha.some(t=>e[t]>=0)}const rc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Oe(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=ho(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:po(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=ho(a,n.floating);return{data:{escapedOffsets:s,escaped:po(s)}}}default:return{}}}}},mo=new Set(["left","top"]);async function oc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ae(n),s=at(n),u=we(n)==="y",d=mo.has(a)?-1:1,p=i&&u?-1:1,h=Oe(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:l}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof l=="number"&&(m=s==="end"?l*-1:l),u?{x:m*p,y:v*d}:{x:v*d,y:m*p}}const ic=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await oc(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},sc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...d}=Oe(e,t),p={x:n,y:r},h=await i.detectOverflow(t,d),v=we(Ae(o)),m=Wn(v);let l=p[m],c=p[v];if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=l+h[y],S=l-h[w];l=Bn(b,l,S)}if(s){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",b=c+h[y],S=c-h[w];c=Bn(b,c,S)}const g=u.fn({...t,[m]:l,[v]:c});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:a,[v]:s}}}}}},ac=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:d=!0}=Oe(e,t),p={x:n,y:r},h=we(o),v=Wn(h);let m=p[v],l=p[h];const c=Oe(s,t),g=typeof c=="number"?{mainAxis:c,crossAxis:0}:{mainAxis:0,crossAxis:0,...c};if(u){const b=v==="y"?"height":"width",S=i.reference[v]-i.floating[b]+g.mainAxis,E=i.reference[v]+i.reference[b]-g.mainAxis;m<S?m=S:m>E&&(m=E)}if(d){var y,w;const b=v==="y"?"width":"height",S=mo.has(Ae(o)),E=i.reference[h]-i.floating[b]+(S&&((y=a.offset)==null?void 0:y[h])||0)+(S?0:g.crossAxis),R=i.reference[h]+i.reference[b]+(S?0:((w=a.offset)==null?void 0:w[h])||0)-(S?g.crossAxis:0);l<E?l=E:l>R&&(l=R)}return{[v]:m,[h]:l}}}},cc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...d}=Oe(e,t),p=await a.detectOverflow(t,d),h=Ae(o),v=at(o),m=we(o)==="y",{width:l,height:c}=i.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=v===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=h,g=v==="end"?"top":"bottom");const w=c-p.top-p.bottom,b=l-p.left-p.right,S=je(c-p[g],w),E=je(l-p[y],b),R=!t.middlewareData.shift;let C=S,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!v){const D=ce(p.left,0),F=ce(p.right,0),P=ce(p.top,0),O=ce(p.bottom,0);m?M=l-2*(D!==0||F!==0?D+F:ce(p.left,p.right)):C=c-2*(P!==0||O!==0?P+O:ce(p.top,p.bottom))}await u({...t,availableWidth:M,availableHeight:C});const N=await a.getDimensions(s.floating);return l!==N.width||c!==N.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ct(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return Yt()?e instanceof Node||e instanceof le(e).Node:!1}function he(e){return Yt()?e instanceof Element||e instanceof le(e).Element:!1}function Te(e){return Yt()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function go(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function kt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function lc(e){return/^(table|td|th)$/.test(ct(e))}function qt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const uc=/transform|translate|scale|rotate|perspective|filter/,fc=/paint|layout|strict|content/,Ze=e=>!!e&&e!=="none";let Un;function Yn(e){const t=he(e)?pe(e):e;return Ze(t.transform)||Ze(t.translate)||Ze(t.scale)||Ze(t.rotate)||Ze(t.perspective)||!qn()&&(Ze(t.backdropFilter)||Ze(t.filter))||uc.test(t.willChange||"")||fc.test(t.contain||"")}function dc(e){let t=Fe(e);for(;Te(t)&&!lt(t);){if(Yn(t))return t;if(qt(t))return null;t=Fe(t)}return null}function qn(){return Un==null&&(Un=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Un}function lt(e){return/^(html|body|#document)$/.test(ct(e))}function pe(e){return le(e).getComputedStyle(e)}function Xt(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fe(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||be(e);return go(t)?t.host:t}function yo(e){const t=Fe(e);return lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&kt(t)?t:yo(t)}function Mt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yo(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=le(o);if(i){const s=Xn(a);return t.concat(a,a.visualViewport||[],kt(o)?o:[],s&&n?Mt(s):[])}else return t.concat(o,Mt(o,[],n))}function Xn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wo(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Te(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Vt(n)!==i||Vt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Kn(e){return he(e)?e:e.contextElement}function ut(e){const t=Kn(e);if(!Te(t))return ye(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wo(t);let a=(i?Vt(n.width):n.width)/r,s=(i?Vt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const hc=ye(0);function bo(e){const t=le(e);return!qn()||!t.visualViewport?hc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function Ge(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Kn(e);let a=ye(1);t&&(r?he(r)&&(a=ut(r)):a=ut(e));const s=pc(i,n,r)?bo(i):ye(0);let u=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,p=o.width/a.x,h=o.height/a.y;if(i){const v=le(i),m=r&&he(r)?le(r):r;let l=v,c=Xn(l);for(;c&&r&&m!==l;){const g=ut(c),y=c.getBoundingClientRect(),w=pe(c),b=y.left+(c.clientLeft+parseFloat(w.paddingLeft))*g.x,S=y.top+(c.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,p*=g.x,h*=g.y,u+=b,d+=S,l=le(c),c=Xn(l)}}return Ut({width:p,height:h,x:u,y:d})}function Kt(e,t){const n=Xt(e).scrollLeft;return t?t.left+n:Ge(be(e)).left+n}function xo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Kt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function mc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=be(r),s=t?qt(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},d=ye(1);const p=ye(0),h=Te(r);if((h||!h&&!i)&&((ct(r)!=="body"||kt(a))&&(u=Xt(r)),h)){const m=Ge(r);d=ut(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const v=a&&!h&&!i?xo(a,u):ye(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+p.x+v.x,y:n.y*d.y-u.scrollTop*d.y+p.y+v.y}}function vc(e){return Array.from(e.getClientRects())}function gc(e){const t=be(e),n=Xt(e),r=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Kt(e);const s=-n.scrollTop;return pe(r).direction==="rtl"&&(a+=ce(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const So=25;function yc(e,t){const n=le(e),r=be(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const p=qn();(!p||p&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}const d=Kt(r);if(d<=0){const p=r.ownerDocument,h=p.body,v=getComputedStyle(h),m=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,l=Math.abs(r.clientWidth-h.clientWidth-m);l<=So&&(i-=l)}else d<=So&&(i+=d);return{width:i,height:a,x:s,y:u}}function wc(e,t){const n=Ge(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Te(e)?ut(e):ye(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,d=r*i.y;return{width:a,height:s,x:u,y:d}}function Eo(e,t,n){let r;if(t==="viewport")r=yc(e,n);else if(t==="document")r=gc(be(e));else if(he(t))r=wc(t,n);else{const o=bo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ut(r)}function Co(e,t){const n=Fe(e);return n===t||!he(n)||lt(n)?!1:pe(n).position==="fixed"||Co(n,t)}function bc(e,t){const n=t.get(e);if(n)return n;let r=Mt(e,[],!1).filter(s=>he(s)&&ct(s)!=="body"),o=null;const i=pe(e).position==="fixed";let a=i?Fe(e):e;for(;he(a)&&!lt(a);){const s=pe(a),u=Yn(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||kt(a)&&!u&&Co(e,a))?r=r.filter(p=>p!==a):o=s,a=Fe(a)}return t.set(e,r),r}function xc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qt(t)?[]:bc(t,this._c):[].concat(n),r],s=Eo(t,a[0],o);let u=s.top,d=s.right,p=s.bottom,h=s.left;for(let v=1;v<a.length;v++){const m=Eo(t,a[v],o);u=ce(m.top,u),d=je(m.right,d),p=je(m.bottom,p),h=ce(m.left,h)}return{width:d-h,height:p-u,x:h,y:u}}function Sc(e){const{width:t,height:n}=wo(e);return{width:t,height:n}}function Ec(e,t,n){const r=Te(t),o=be(t),i=n==="fixed",a=Ge(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=ye(0);function d(){u.x=Kt(o)}if(r||!r&&!i)if((ct(t)!=="body"||kt(o))&&(s=Xt(t)),r){const m=Ge(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&d();i&&!r&&o&&d();const p=o&&!r&&!i?xo(o,s):ye(0),h=a.left+s.scrollLeft-u.x-p.x,v=a.top+s.scrollTop-u.y-p.y;return{x:h,y:v,width:a.width,height:a.height}}function Zn(e){return pe(e).position==="static"}function Ro(e,t){if(!Te(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function _o(e,t){const n=le(e);if(qt(e))return n;if(!Te(e)){let o=Fe(e);for(;o&&!lt(o);){if(he(o)&&!Zn(o))return o;o=Fe(o)}return n}let r=Ro(e,t);for(;r&&lc(r)&&Zn(r);)r=Ro(r,t);return r&&lt(r)&&Zn(r)&&!Yn(r)?n:r||dc(e)||n}const Cc=async function(e){const t=this.getOffsetParent||_o,n=this.getDimensions,r=await n(e.floating);return{reference:Ec(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rc(e){return pe(e).direction==="rtl"}const _c={convertOffsetParentRelativeRectToViewportRelativeRect:mc,getDocumentElement:be,getClippingRect:xc,getOffsetParent:_o,getElementRects:Cc,getClientRects:vc,getDimensions:Sc,getScale:ut,isElement:he,isRTL:Rc};function Po(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pc(e,t){let n=null,r;const o=be(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const d=e.getBoundingClientRect(),{left:p,top:h,width:v,height:m}=d;if(s||t(),!v||!m)return;const l=Ht(h),c=Ht(o.clientWidth-(p+v)),g=Ht(o.clientHeight-(h+m)),y=Ht(p),b={rootMargin:-l+"px "+-c+"px "+-g+"px "+-y+"px",threshold:ce(0,je(1,u))||1};let S=!0;function E(R){const C=R[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!Po(d,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function Oc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Kn(e),p=o||i?[...d?Mt(d):[],...t?Mt(t):[]]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=d&&s?Pc(d,n):null;let v=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let l,c=u?Ge(e):null;u&&g();function g(){const y=Ge(e);c&&!Po(c,y)&&n(),c=y,l=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h==null||h(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(l)}}const Ac=ic,Tc=sc,$c=nc,Nc=cc,kc=rc,Oo=tc,Mc=ac,Ic=(e,t,n)=>{const r=new Map,o={platform:_c,...n},i={...o.platform,_c:r};return ec(e,t,{...o,platform:i})};var Dc=typeof document<"u",Lc=function(){},Zt=Dc?Y.useLayoutEffect:Lc;function Gt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Gt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Gt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ao(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function To(e,t){const n=Ao(e);return Math.round(t*n)/n}function Gn(e){const t=f.useRef(e);return Zt(()=>{t.current=e}),t}function jc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=f.useState(r);Gt(v,r)||m(r);const[l,c]=f.useState(null),[g,y]=f.useState(null),w=f.useCallback(A=>{A!==R.current&&(R.current=A,c(A))},[]),b=f.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),S=i||l,E=a||g,R=f.useRef(null),C=f.useRef(null),M=f.useRef(p),N=u!=null,D=Gn(u),F=Gn(o),P=Gn(d),O=f.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:v};F.current&&(A.platform=F.current),Ic(R.current,C.current,A).then(L=>{const W={...L,isPositioned:P.current!==!1};T.current&&!Gt(M.current,W)&&(M.current=W,rt.flushSync(()=>{h(W)}))})},[v,t,n,F,P]);Zt(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[d]);const T=f.useRef(!1);Zt(()=>(T.current=!0,()=>{T.current=!1}),[]),Zt(()=>{if(S&&(R.current=S),E&&(C.current=E),S&&E){if(D.current)return D.current(S,E,O);O()}},[S,E,O,D,N]);const I=f.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),k=f.useMemo(()=>({reference:S,floating:E}),[S,E]),$=f.useMemo(()=>{const A={position:n,left:0,top:0};if(!k.floating)return A;const L=To(k.floating,p.x),W=To(k.floating,p.y);return s?{...A,transform:"translate("+L+"px, "+W+"px)",...Ao(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:W}},[n,s,k.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:O,refs:I,elements:k,floatingStyles:$}),[p,O,I,k,$])}const Fc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Oo({element:r.current,padding:o}).fn(n):{}:r?Oo({element:r,padding:o}).fn(n):{}}}},Bc=(e,t)=>{const n=Ac(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wc=(e,t)=>{const n=Tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vc=(e,t)=>({fn:Mc(e).fn,options:[e,t]}),Hc=(e,t)=>{const n=$c(e);return{name:n.name,fn:n.fn,options:[e,t]}},zc=(e,t)=>{const n=Nc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uc=(e,t)=>{const n=kc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yc=(e,t)=>{const n=Fc(e);return{name:n.name,fn:n.fn,options:[e,t]}};var qc="Arrow",$o=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.jsx(ee.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});$o.displayName=qc;var Xc=$o;function Kc(e){const[t,n]=f.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,s=d.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Jn="Popper",[No,ko]=Mn(Jn),[Zc,Mo]=No(Jn),Io=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return x.jsx(Zc,{scope:t,anchor:r,onAnchorChange:o,children:n})};Io.displayName=Jn;var Do="PopperAnchor",Lo=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Mo(Do,n),a=f.useRef(null),s=ne(t,a),u=f.useRef(null);return f.useEffect(()=>{const d=u.current;u.current=(r==null?void 0:r.current)||a.current,d!==u.current&&i.onAnchorChange(u.current)}),r?null:x.jsx(ee.div,{...o,ref:s})});Lo.displayName=Do;var Qn="PopperContent",[Gc,Jc]=No(Qn),jo=f.forwardRef((e,t)=>{var j,z,G,U,q,X;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:l,...c}=e,g=Mo(Qn,n),[y,w]=f.useState(null),b=ne(t,Q=>w(Q)),[S,E]=f.useState(null),R=Kc(S),C=(R==null?void 0:R.width)??0,M=(R==null?void 0:R.height)??0,N=r+(i!=="center"?"-"+i:""),D=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(d)?d:[d],P=F.length>0,O={padding:D,boundary:F.filter(el),altBoundary:P},{refs:T,floatingStyles:I,placement:k,isPositioned:$,middlewareData:A}=jc({strategy:"fixed",placement:N,whileElementsMounted:(...Q)=>Oc(...Q,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Bc({mainAxis:o+M,alignmentAxis:a}),u&&Wc({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Vc():void 0,...O}),u&&Hc({...O}),zc({...O,apply:({elements:Q,rects:oe,availableWidth:ae,availableHeight:_e})=>{const{width:Pe,height:_t}=oe.reference,De=Q.floating.style;De.setProperty("--radix-popper-available-width",`${ae}px`),De.setProperty("--radix-popper-available-height",`${_e}px`),De.setProperty("--radix-popper-anchor-width",`${Pe}px`),De.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),S&&Yc({element:S,padding:s}),tl({arrowWidth:C,arrowHeight:M}),v&&Uc({strategy:"referenceHidden",...O})]}),[L,W]=Wo(k),_=Ke(l);se(()=>{$&&(_==null||_())},[$,_]);const B=(j=A.arrow)==null?void 0:j.x,V=(z=A.arrow)==null?void 0:z.y,H=((G=A.arrow)==null?void 0:G.centerOffset)!==0,[K,J]=f.useState();return se(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:$?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(U=A.transformOrigin)==null?void 0:U.x,(q=A.transformOrigin)==null?void 0:q.y].join(" "),...((X=A.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Gc,{scope:n,placedSide:L,onArrowChange:E,arrowX:B,arrowY:V,shouldHideArrow:H,children:x.jsx(ee.div,{"data-side":L,"data-align":W,...c,ref:b,style:{...c.style,animation:$?void 0:"none"}})})})});jo.displayName=Qn;var Fo="PopperArrow",Qc={top:"bottom",right:"left",bottom:"top",left:"right"},Bo=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Jc(Fo,r),a=Qc[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(Xc,{...o,ref:n,style:{...o.style,display:"block"}})})});Bo.displayName=Fo;function el(e){return e!==null}var tl=e=>({name:"transformOrigin",options:e,fn(t){var g,y,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,p]=Wo(n),h={start:"0%",center:"50%",end:"100%"}[p],v=(((y=o.arrow)==null?void 0:y.x)??0)+s/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let l="",c="";return d==="bottom"?(l=a?h:`${v}px`,c=`${-u}px`):d==="top"?(l=a?h:`${v}px`,c=`${r.floating.height+u}px`):d==="right"?(l=`${-u}px`,c=a?h:`${m}px`):d==="left"&&(l=`${r.floating.width+u}px`,c=a?h:`${m}px`),{data:{x:l,y:c}}}});function Wo(e){const[t,n="center"]=e.split("-");return[t,n]}var nl=Io,rl=Lo,ol=jo,il=Bo,sl="Portal",Vo=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);se(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?$n.createPortal(x.jsx(ee.div,{...r,ref:t}),a):null});Vo.displayName=sl;var al=f[" useInsertionEffect ".trim().toString()]||se;function Ho({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=cl({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const h=p.current;h!==s&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=s},[s,r])}const d=f.useCallback(p=>{var h;if(s){const v=ll(p)?p(e):p;v!==e&&((h=a.current)==null||h.call(a,v))}else i(p)},[s,e,i,a]);return[u,d]}function cl({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return al(()=>{i.current=t},[t]),f.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function ll(e){return typeof e=="function"}function ul(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zo=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"}),fl="VisuallyHidden",dl=f.forwardRef((e,t)=>x.jsx(ee.span,{...e,ref:t,style:{...zo,...e.style}}));dl.displayName=fl;var hl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ft=new WeakMap,Jt=new WeakMap,Qt={},er=0,Uo=function(e){return e&&(e.host||Uo(e.parentNode))},pl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Uo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ml=function(e,t,n,r){var o=pl(t,Array.isArray(e)?e:[e]);Qt[n]||(Qt[n]=new WeakMap);var i=Qt[n],a=[],s=new Set,u=new Set(o),d=function(h){!h||s.has(h)||(s.add(h),d(h.parentNode))};o.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(s.has(v))p(v);else try{var m=v.getAttribute(r),l=m!==null&&m!=="false",c=(ft.get(v)||0)+1,g=(i.get(v)||0)+1;ft.set(v,c),i.set(v,g),a.push(v),c===1&&l&&Jt.set(v,!0),g===1&&v.setAttribute(n,"true"),l||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return p(t),s.clear(),er++,function(){a.forEach(function(h){var v=ft.get(h)-1,m=i.get(h)-1;ft.set(h,v),i.set(h,m),v||(Jt.has(h)||h.removeAttribute(r),Jt.delete(h)),m||h.removeAttribute(n)}),er--,er||(ft=new WeakMap,ft=new WeakMap,Jt=new WeakMap,Qt={})}},vl=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=hl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ml(r,o,n,"aria-hidden")):function(){return null}},xe=function(){return xe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xe.apply(this,arguments)};function Yo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function gl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var en="right-scroll-bar-position",tn="width-before-scroll-bar",yl="with-scroll-bars-hidden",wl="--removed-body-scroll-bar-size";function tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bl(e,t){var n=Y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var xl=typeof window<"u"?f.useLayoutEffect:f.useEffect,qo=new WeakMap;function Sl(e,t){var n=bl(null,function(r){return e.forEach(function(o){return tr(o,r)})});return xl(function(){var r=qo.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||tr(s,null)}),i.forEach(function(s){o.has(s)||tr(s,a)})}qo.set(n,e)},[e]),n}function El(e){return e}function Cl(e,t){t===void 0&&(t=El);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var p=a;a=[],p.forEach(i)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){a.push(p),d()},filter:function(p){return a=a.filter(p),n}}}};return o}function Rl(e){e===void 0&&(e={});var t=Cl(null);return t.options=xe({async:!0,ssr:!1},e),t}var Xo=function(e){var t=e.sideCar,n=Yo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,xe({},n))};Xo.isSideCarExport=!0;function _l(e,t){return e.useMedium(t),Xo}var Ko=Rl(),nr=function(){},nn=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:nr,onWheelCapture:nr,onTouchMoveCapture:nr}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noRelative,l=e.noIsolation,c=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,S=Yo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,R=Sl([n,t]),C=xe(xe({},S),o);return f.createElement(f.Fragment,null,p&&f.createElement(E,{sideCar:Ko,removeScrollBar:d,shards:h,noRelative:m,noIsolation:l,inert:c,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?f.cloneElement(f.Children.only(s),xe(xe({},C),{ref:R})):f.createElement(w,xe({},C,{className:u,ref:R}),s))});nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nn.classNames={fullWidth:tn,zeroRight:en};var Pl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ol(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pl();return t&&e.setAttribute("nonce",t),e}function Al(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Tl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $l=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ol())&&(Al(t,n),Tl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nl=function(){var e=$l();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zo=function(){var e=Nl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},kl={left:0,top:0,right:0,gap:0},rr=function(e){return parseInt(e||"",10)||0},Ml=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rr(n),rr(r),rr(o)]},Il=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kl;var t=Ml(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])}},Dl=Zo(),dt="data-scroll-locked",Ll=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
23
- .`.concat(yl,` {
24
- overflow: hidden `).concat(r,`;
25
- padding-right: `).concat(s,"px ").concat(r,`;
26
- }
27
- body[`).concat(dt,`] {
28
- overflow: hidden `).concat(r,`;
29
- overscroll-behavior: contain;
30
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
31
- padding-left: `.concat(o,`px;
32
- padding-top: `).concat(i,`px;
33
- padding-right: `).concat(a,`px;
34
- margin-left:0;
35
- margin-top:0;
36
- margin-right: `).concat(s,"px ").concat(r,`;
37
- `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
38
- }
39
-
40
- .`).concat(en,` {
41
- right: `).concat(s,"px ").concat(r,`;
42
- }
43
-
44
- .`).concat(tn,` {
45
- margin-right: `).concat(s,"px ").concat(r,`;
46
- }
47
-
48
- .`).concat(en," .").concat(en,` {
49
- right: 0 `).concat(r,`;
50
- }
51
-
52
- .`).concat(tn," .").concat(tn,` {
53
- margin-right: 0 `).concat(r,`;
54
- }
55
-
56
- body[`).concat(dt,`] {
57
- `).concat(wl,": ").concat(s,`px;
58
- }
59
- `)},Go=function(){var e=parseInt(document.body.getAttribute(dt)||"0",10);return isFinite(e)?e:0},jl=function(){f.useEffect(function(){return document.body.setAttribute(dt,(Go()+1).toString()),function(){var e=Go()-1;e<=0?document.body.removeAttribute(dt):document.body.setAttribute(dt,e.toString())}},[])},Fl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;jl();var i=f.useMemo(function(){return Il(o)},[o]);return f.createElement(Dl,{styles:Ll(i,!t,o,n?"":"!important")})},or=!1;if(typeof window<"u")try{var rn=Object.defineProperty({},"passive",{get:function(){return or=!0,!0}});window.addEventListener("test",rn,rn),window.removeEventListener("test",rn,rn)}catch{or=!1}var ht=or?{passive:!1}:!1,Bl=function(e){return e.tagName==="TEXTAREA"},Jo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Bl(e)&&n[t]==="visible")},Wl=function(e){return Jo(e,"overflowY")},Vl=function(e){return Jo(e,"overflowX")},Qo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ei(e,r);if(o){var i=ti(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Hl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ei=function(e,t){return e==="v"?Wl(t):Vl(t)},ti=function(e,t){return e==="v"?Hl(t):zl(t)},Ul=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yl=function(e,t,n,r,o){var i=Ul(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),d=!1,p=a>0,h=0,v=0;do{if(!s)break;var m=ti(e,s),l=m[0],c=m[1],g=m[2],y=c-g-i*l;(l||y)&&ei(e,s)&&(h+=y,v+=l);var w=s.parentNode;s=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(p&&Math.abs(h)<1||!p&&Math.abs(v)<1)&&(d=!0),d},on=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ni=function(e){return[e.deltaX,e.deltaY]},ri=function(e){return e&&"current"in e?e.current:e},ql=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xl=function(e){return`
60
- .block-interactivity-`.concat(e,` {pointer-events: none;}
61
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
62
- `)},Kl=0,pt=[];function Zl(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Kl++)[0],i=f.useState(Zo)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=gl([e.lockRef.current],(e.shards||[]).map(ri),!0).filter(Boolean);return c.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(c,g){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!a.current.allowPinchZoom;var y=on(c),w=n.current,b="deltaX"in c?c.deltaX:w[0]-y[0],S="deltaY"in c?c.deltaY:w[1]-y[1],E,R=c.target,C=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in c&&C==="h"&&R.type==="range")return!1;var M=window.getSelection(),N=M&&M.anchorNode,D=N?N===R||N.contains(R):!1;if(D)return!1;var F=Qo(C,R);if(!F)return!0;if(F?E=C:(E=C==="v"?"h":"v",F=Qo(C,R)),!F)return!1;if(!r.current&&"changedTouches"in c&&(b||S)&&(r.current=E),!E)return!0;var P=r.current||E;return Yl(P,g,c,P==="h"?b:S)},[]),u=f.useCallback(function(c){var g=c;if(!(!pt.length||pt[pt.length-1]!==i)){var y="deltaY"in g?ni(g):on(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&ql(E.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(ri).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=b.length>0?s(g,b[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),d=f.useCallback(function(c,g,y,w){var b={name:c,delta:g,target:y,should:w,shadowParent:Gl(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),p=f.useCallback(function(c){n.current=on(c),r.current=void 0},[]),h=f.useCallback(function(c){d(c.type,ni(c),c.target,s(c,e.lockRef.current))},[]),v=f.useCallback(function(c){d(c.type,on(c),c.target,s(c,e.lockRef.current))},[]);f.useEffect(function(){return pt.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,ht),document.addEventListener("touchmove",u,ht),document.addEventListener("touchstart",p,ht),function(){pt=pt.filter(function(c){return c!==i}),document.removeEventListener("wheel",u,ht),document.removeEventListener("touchmove",u,ht),document.removeEventListener("touchstart",p,ht)}},[]);var m=e.removeScrollBar,l=e.inert;return f.createElement(f.Fragment,null,l?f.createElement(i,{styles:Xl(o)}):null,m?f.createElement(Fl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jl=_l(Ko,Zl);var oi=f.forwardRef(function(e,t){return f.createElement(nn,xe({},e,{ref:t,sideCar:Jl}))});oi.classNames=nn.classNames;var Ql=[" ","Enter","ArrowUp","ArrowDown"],eu=[" ","Enter"],Je="Select",[sn,an,tu]=ba(Je),[mt]=Mn(Je,[tu,ko]),cn=ko(),[nu,Be]=mt(Je),[ru,ou]=mt(Je),ii=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:u,dir:d,name:p,autoComplete:h,disabled:v,required:m,form:l}=e,c=cn(t),[g,y]=f.useState(null),[w,b]=f.useState(null),[S,E]=f.useState(!1),R=Sa(d),[C,M]=Ho({prop:r,defaultProp:o??!1,onChange:i,caller:Je}),[N,D]=Ho({prop:a,defaultProp:s,onChange:u,caller:Je}),F=f.useRef(null),P=g?l||!!g.closest("form"):!0,[O,T]=f.useState(new Set),I=Array.from(O).map(k=>k.props.value).join(";");return x.jsx(nl,{...c,children:x.jsxs(nu,{required:m,scope:t,trigger:g,onTriggerChange:y,valueNode:w,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Fn(),value:N,onValueChange:D,open:C,onOpenChange:M,dir:R,triggerPointerDownPosRef:F,disabled:v,children:[x.jsx(sn.Provider,{scope:t,children:x.jsx(ru,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(k=>{T($=>new Set($).add(k))},[]),onNativeOptionRemove:f.useCallback(k=>{T($=>{const A=new Set($);return A.delete(k),A})},[]),children:n})}),P?x.jsxs(Ci,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:h,value:N,onChange:k=>D(k.target.value),disabled:v,form:l,children:[N===void 0?x.jsx("option",{value:""}):null,Array.from(O)]},I):null]})})};ii.displayName=Je;var si="SelectTrigger",ai=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=cn(n),a=Be(si,n),s=a.disabled||r,u=ne(t,a.onTriggerChange),d=an(n),p=f.useRef("touch"),[h,v,m]=_i(c=>{const g=d().filter(b=>!b.disabled),y=g.find(b=>b.value===a.value),w=Pi(g,c,y);w!==void 0&&a.onValueChange(w.value)}),l=c=>{s||(a.onOpenChange(!0),m()),c&&(a.triggerPointerDownPosRef.current={x:Math.round(c.pageX),y:Math.round(c.pageY)})};return x.jsx(rl,{asChild:!0,...i,children:x.jsx(ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Ri(a.value)?"":void 0,...o,ref:u,onClick:te(o.onClick,c=>{c.currentTarget.focus(),p.current!=="mouse"&&l(c)}),onPointerDown:te(o.onPointerDown,c=>{p.current=c.pointerType;const g=c.target;g.hasPointerCapture(c.pointerId)&&g.releasePointerCapture(c.pointerId),c.button===0&&c.ctrlKey===!1&&c.pointerType==="mouse"&&(l(c),c.preventDefault())}),onKeyDown:te(o.onKeyDown,c=>{const g=h.current!=="";!(c.ctrlKey||c.altKey||c.metaKey)&&c.key.length===1&&v(c.key),!(g&&c.key===" ")&&Ql.includes(c.key)&&(l(),c.preventDefault())})})})});ai.displayName=si;var ci="SelectValue",li=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,u=Be(ci,n),{onValueNodeHasChildrenChange:d}=u,p=i!==void 0,h=ne(t,u.onValueNodeChange);return se(()=>{d(p)},[d,p]),x.jsx(ee.span,{...s,ref:h,style:{pointerEvents:"none"},children:Ri(u.value)?x.jsx(x.Fragment,{children:a}):i})});li.displayName=ci;var iu="SelectIcon",ui=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return x.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ui.displayName=iu;var su="SelectPortal",fi=e=>x.jsx(Vo,{asChild:!0,...e});fi.displayName=su;var Qe="SelectContent",di=f.forwardRef((e,t)=>{const n=Be(Qe,e.__scopeSelect),[r,o]=f.useState();if(se(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?rt.createPortal(x.jsx(hi,{scope:e.__scopeSelect,children:x.jsx(sn.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),i):null}return x.jsx(pi,{...e,ref:t})});di.displayName=Qe;var me=10,[hi,We]=mt(Qe),au="SelectContentImpl",cu=Wt("SelectContent.RemoveScroll"),pi=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:m,sticky:l,hideWhenDetached:c,avoidCollisions:g,...y}=e,w=Be(Qe,n),[b,S]=f.useState(null),[E,R]=f.useState(null),C=ne(t,j=>S(j)),[M,N]=f.useState(null),[D,F]=f.useState(null),P=an(n),[O,T]=f.useState(!1),I=f.useRef(!1);f.useEffect(()=>{if(b)return vl(b)},[b]),ka();const k=f.useCallback(j=>{const[z,...G]=P().map(X=>X.ref.current),[U]=G.slice(-1),q=document.activeElement;for(const X of j)if(X===q||(X==null||X.scrollIntoView({block:"nearest"}),X===z&&E&&(E.scrollTop=0),X===U&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==q))return},[P,E]),$=f.useCallback(()=>k([M,b]),[k,M,b]);f.useEffect(()=>{O&&$()},[O,$]);const{onOpenChange:A,triggerPointerDownPosRef:L}=w;f.useEffect(()=>{if(b){let j={x:0,y:0};const z=U=>{var q,X;j={x:Math.abs(Math.round(U.pageX)-(((q=L.current)==null?void 0:q.x)??0)),y:Math.abs(Math.round(U.pageY)-(((X=L.current)==null?void 0:X.y)??0))}},G=U=>{j.x<=10&&j.y<=10?U.preventDefault():b.contains(U.target)||A(!1),document.removeEventListener("pointermove",z),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",G,{capture:!0})}}},[b,A,L]),f.useEffect(()=>{const j=()=>A(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[A]);const[W,_]=_i(j=>{const z=P().filter(q=>!q.disabled),G=z.find(q=>q.ref.current===document.activeElement),U=Pi(z,j,G);U&&setTimeout(()=>U.ref.current.focus())}),B=f.useCallback((j,z,G)=>{const U=!I.current&&!G;(w.value!==void 0&&w.value===z||U)&&(N(j),U&&(I.current=!0))},[w.value]),V=f.useCallback(()=>b==null?void 0:b.focus(),[b]),H=f.useCallback((j,z,G)=>{const U=!I.current&&!G;(w.value!==void 0&&w.value===z||U)&&F(j)},[w.value]),K=r==="popper"?ir:mi,J=K===ir?{side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:m,sticky:l,hideWhenDetached:c,avoidCollisions:g}:{};return x.jsx(hi,{scope:n,content:b,viewport:E,onViewportChange:R,itemRefCallback:B,selectedItem:M,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:$,selectedItemText:D,position:r,isPositioned:O,searchRef:W,children:x.jsx(oi,{as:cu,allowPinchZoom:!0,children:x.jsx(ro,{asChild:!0,trapped:w.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:te(o,j=>{var z;(z=w.trigger)==null||z.focus({preventScroll:!0}),j.preventDefault()}),children:x.jsx(Jr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:x.jsx(K,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:j=>j.preventDefault(),...y,...J,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,j=>{const z=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!z&&j.key.length===1&&_(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let U=P().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(j.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const q=j.target,X=U.indexOf(q);U=U.slice(X+1)}setTimeout(()=>k(U)),j.preventDefault()}})})})})})})});pi.displayName=au;var lu="SelectItemAlignedPosition",mi=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Be(Qe,n),a=We(Qe,n),[s,u]=f.useState(null),[d,p]=f.useState(null),h=ne(t,C=>p(C)),v=an(n),m=f.useRef(!1),l=f.useRef(!0),{viewport:c,selectedItem:g,selectedItemText:y,focusSelectedItem:w}=a,b=f.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&d&&c&&g&&y){const C=i.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(i.dir!=="rtl"){const q=D.left-M.left,X=N.left-q,Q=C.left-X,oe=C.width+Q,ae=Math.max(oe,M.width),_e=window.innerWidth-me,Pe=qr(X,[me,Math.max(me,_e-ae)]);s.style.minWidth=oe+"px",s.style.left=Pe+"px"}else{const q=M.right-D.right,X=window.innerWidth-N.right-q,Q=window.innerWidth-C.right-X,oe=C.width+Q,ae=Math.max(oe,M.width),_e=window.innerWidth-me,Pe=qr(X,[me,Math.max(me,_e-ae)]);s.style.minWidth=oe+"px",s.style.right=Pe+"px"}const F=v(),P=window.innerHeight-me*2,O=c.scrollHeight,T=window.getComputedStyle(d),I=parseInt(T.borderTopWidth,10),k=parseInt(T.paddingTop,10),$=parseInt(T.borderBottomWidth,10),A=parseInt(T.paddingBottom,10),L=I+k+O+A+$,W=Math.min(g.offsetHeight*5,L),_=window.getComputedStyle(c),B=parseInt(_.paddingTop,10),V=parseInt(_.paddingBottom,10),H=C.top+C.height/2-me,K=P-H,J=g.offsetHeight/2,j=g.offsetTop+J,z=I+k+j,G=L-z;if(z<=H){const q=F.length>0&&g===F[F.length-1].ref.current;s.style.bottom="0px";const X=d.clientHeight-c.offsetTop-c.offsetHeight,Q=Math.max(K,J+(q?V:0)+X+$),oe=z+Q;s.style.height=oe+"px"}else{const q=F.length>0&&g===F[0].ref.current;s.style.top="0px";const Q=Math.max(H,I+c.offsetTop+(q?B:0)+J)+G;s.style.height=Q+"px",c.scrollTop=z-H+c.offsetTop}s.style.margin=`${me}px 0`,s.style.minHeight=W+"px",s.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[v,i.trigger,i.valueNode,s,d,c,g,y,i.dir,r]);se(()=>b(),[b]);const[S,E]=f.useState();se(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const R=f.useCallback(C=>{C&&l.current===!0&&(b(),w==null||w(),l.current=!1)},[b,w]);return x.jsx(fu,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:x.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:x.jsx(ee.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});mi.displayName=lu;var uu="SelectPopperPosition",ir=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=me,...i}=e,a=cn(n);return x.jsx(ol,{...a,...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)"}})});ir.displayName=uu;var[fu,sr]=mt(Qe,{}),ar="SelectViewport",vi=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=We(ar,n),a=sr(ar,n),s=ne(t,i.onViewportChange),u=f.useRef(0);return x.jsxs(x.Fragment,{children:[x.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}),x.jsx(sn.Slot,{scope:n,children:x.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,d=>{const p=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=a;if(v!=null&&v.current&&h){const m=Math.abs(u.current-p.scrollTop);if(m>0){const l=window.innerHeight-me*2,c=parseFloat(h.style.minHeight),g=parseFloat(h.style.height),y=Math.max(c,g);if(y<l){const w=y+m,b=Math.min(l,w),S=w-b;h.style.height=b+"px",h.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});vi.displayName=ar;var gi="SelectGroup",[du,hu]=mt(gi),pu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Fn();return x.jsx(du,{scope:n,id:o,children:x.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});pu.displayName=gi;var yi="SelectLabel",mu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hu(yi,n);return x.jsx(ee.div,{id:o.id,...r,ref:t})});mu.displayName=yi;var ln="SelectItem",[vu,wi]=mt(ln),bi=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Be(ln,n),u=We(ln,n),d=s.value===r,[p,h]=f.useState(i??""),[v,m]=f.useState(!1),l=ne(t,w=>{var b;return(b=u.itemRefCallback)==null?void 0:b.call(u,w,r,o)}),c=Fn(),g=f.useRef("touch"),y=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(vu,{scope:n,value:r,disabled:o,textId:c,isSelected:d,onItemTextChange:f.useCallback(w=>{h(b=>b||((w==null?void 0:w.textContent)??"").trim())},[]),children:x.jsx(sn.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:x.jsx(ee.div,{role:"option","aria-labelledby":c,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:l,onFocus:te(a.onFocus,()=>m(!0)),onBlur:te(a.onBlur,()=>m(!1)),onClick:te(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:te(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:te(a.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:te(a.onPointerMove,w=>{var b;g.current=w.pointerType,o?(b=u.onItemLeave)==null||b.call(u):g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(a.onPointerLeave,w=>{var b;w.currentTarget===document.activeElement&&((b=u.onItemLeave)==null||b.call(u))}),onKeyDown:te(a.onKeyDown,w=>{var S;((S=u.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(eu.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});bi.displayName=ln;var It="SelectItemText",xi=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Be(It,n),s=We(It,n),u=wi(It,n),d=ou(It,n),[p,h]=f.useState(null),v=ne(t,y=>h(y),u.onItemTextChange,y=>{var w;return(w=s.itemTextRefCallback)==null?void 0:w.call(s,y,u.value,u.disabled)}),m=p==null?void 0:p.textContent,l=f.useMemo(()=>x.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:c,onNativeOptionRemove:g}=d;return se(()=>(c(l),()=>g(l)),[c,g,l]),x.jsxs(x.Fragment,{children:[x.jsx(ee.span,{id:u.textId,...i,ref:v}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?rt.createPortal(i.children,a.valueNode):null]})});xi.displayName=It;var Si="SelectItemIndicator",gu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wi(Si,n).isSelected?x.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});gu.displayName=Si;var cr="SelectScrollUpButton",yu=f.forwardRef((e,t)=>{const n=We(cr,e.__scopeSelect),r=sr(cr,e.__scopeSelect),[o,i]=f.useState(!1),a=ne(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollTop>0;i(d)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?x.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});yu.displayName=cr;var lr="SelectScrollDownButton",wu=f.forwardRef((e,t)=>{const n=We(lr,e.__scopeSelect),r=sr(lr,e.__scopeSelect),[o,i]=f.useState(!1),a=ne(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;i(p)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?x.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});wu.displayName=lr;var Ei=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=We("SelectScrollButton",n),a=f.useRef(null),s=an(n),u=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>u(),[u]),se(()=>{var p;const d=s().find(h=>h.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[s]),x.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:te(o.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:te(o.onPointerLeave,()=>{u()})})}),bu="SelectSeparator",xu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});xu.displayName=bu;var ur="SelectArrow",Su=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cn(n),i=Be(ur,n),a=We(ur,n);return i.open&&a.position==="popper"?x.jsx(il,{...o,...r,ref:t}):null});Su.displayName=ur;var Eu="SelectBubbleInput",Ci=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),i=ne(r,o),a=ul(t);return f.useEffect(()=>{const s=o.current;if(!s)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&p){const h=new Event("change",{bubbles:!0});p.call(s,t),s.dispatchEvent(h)}},[a,t]),x.jsx(ee.select,{...n,style:{...zo,...n.style},ref:i,defaultValue:t})});Ci.displayName=Eu;function Ri(e){return e===""||e===void 0}function _i(e){const t=Ke(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(a=>{const s=n.current+a;t(s),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(s)},[t]),i=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Pi(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Cu(e,Math.max(i,0));o.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Cu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ru=ii,_u=ai,Pu=li,Ou=ui,Au=fi,Tu=di,$u=vi,Nu=bi,ku=xi;const et={wrapper:"_wrapper_1uqw5_1",label:"_label_1uqw5_7",trigger:"_trigger_1uqw5_12",icon:"_icon_1uqw5_44",content:"_content_1uqw5_50",viewport:"_viewport_1uqw5_58",item:"_item_1uqw5_62"},Mu=({value:e,onValueChange:t,options:n,placeholder:r="Select...",className:o="",disabled:i=!1,label:a,"aria-label":s,id:u})=>{const d=Y.useId(),p=u||d,h=`${p}-label`,v=x.jsxs(Ru,{value:e,onValueChange:t,disabled:i,children:[x.jsxs(_u,{id:p,className:`${et.trigger} ${o} cursor-pointer`,...a?{"aria-labelledby":h}:s?{"aria-label":s}:{},children:[x.jsx(Pu,{placeholder:r}),x.jsx(Ou,{className:et.icon,"aria-hidden":"true",children:x.jsx(ta,{size:14,color:"currentColor"})})]}),x.jsx(Au,{children:x.jsx(Tu,{className:et.content,position:"popper",side:"bottom",align:"start",sideOffset:4,children:x.jsx($u,{className:et.viewport,children:n.map(m=>x.jsx(Nu,{value:m.value,className:et.item,children:x.jsx(ku,{children:m.label})},m.value))})})})]});return a?x.jsxs("div",{className:et.wrapper,children:[x.jsx("label",{id:h,htmlFor:p,className:et.label,children:a}),v]}):v};function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Oi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ai(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Oi(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Oi(e[o],null)}}}}function He(...e){return f.useCallback(Ai(...e),e)}function Ti(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];const d=h=>{var y;const{scope:v,children:m,...l}=h,c=((y=v==null?void 0:v[e])==null?void 0:y[u])||s,g=f.useMemo(()=>l,Object.values(l));return x.jsx(c.Provider,{value:g,children:m})};d.displayName=i+"Provider";function p(h,v){var c;const m=((c=v==null?void 0:v[e])==null?void 0:c[u])||s,l=f.useContext(m);if(l)return l;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[d,p]}const o=()=>{const i=n.map(a=>f.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,Iu(o,...t)]}function Iu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:d})=>{const h=u(i)[`__scope${d}`];return{...s,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function $i(e){const t=Du(e),n=f.forwardRef((r,o)=>{const{children:i,...a}=r,s=f.Children.toArray(i),u=s.find(ju);if(u){const d=u.props.children,p=s.map(h=>h===u?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:h);return x.jsx(t,{...a,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Du(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const a=Bu(o),s=Fu(i,o.props);return o.type!==f.Fragment&&(s.ref=r?Ai(r,a):a),f.cloneElement(o,s)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lu=Symbol("radix.slottable");function ju(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lu}function Fu(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const u=i(...s);return o(...s),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Bu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Wu.reduce((e,t)=>{const n=$i(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:a,...s}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(u,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vu(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function vt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Hu(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zu="DismissableLayer",fr="dismissableLayer.update",Uu="dismissableLayer.pointerDownOutside",Yu="dismissableLayer.focusOutside",Ni,ki=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mi=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,d=f.useContext(ki),[p,h]=f.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),l=He(t,C=>h(C)),c=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=c.indexOf(g),w=p?c.indexOf(p):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,E=Ku(C=>{const M=C.target,N=[...d.branches].some(D=>D.contains(M));!S||N||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},v),R=Zu(C=>{const M=C.target;[...d.branches].some(D=>D.contains(M))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},v);return Hu(C=>{w===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},v),f.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ni=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Ii(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ni)}},[p,v,n,d]),f.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Ii())},[p,d]),f.useEffect(()=>{const C=()=>m({});return document.addEventListener(fr,C),()=>document.removeEventListener(fr,C)},[]),x.jsx($e.div,{...u,ref:l,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,E.onPointerDownCapture)})});Mi.displayName=zu;var qu="DismissableLayerBranch",Xu=f.forwardRef((e,t)=>{const n=f.useContext(ki),r=f.useRef(null),o=He(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx($e.div,{...e,ref:o})});Xu.displayName=qu;function Ku(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Di(Uu,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zu(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Di(Yu,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ii(){const e=new CustomEvent(fr);document.dispatchEvent(e)}function Di(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Vu(o,i):o.dispatchEvent(i)}var dr=0;function Gu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Li()),document.body.insertAdjacentElement("beforeend",e[1]??Li()),dr++,()=>{dr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),dr--}},[])}function Li(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var hr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",ji={bubbles:!1,cancelable:!0},Ju="FocusScope",Fi=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=f.useState(null),d=vt(o),p=vt(i),h=f.useRef(null),v=He(t,c=>u(c)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let c=function(b){if(m.paused||!s)return;const S=b.target;s.contains(S)?h.current=S:ze(h.current,{select:!0})},g=function(b){if(m.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||ze(h.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&ze(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",g);const w=new MutationObserver(y);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",g),w.disconnect()}}},[r,s,m.paused]),f.useEffect(()=>{if(s){Vi.add(m);const c=document.activeElement;if(!s.contains(c)){const y=new CustomEvent(hr,ji);s.addEventListener(hr,d),s.dispatchEvent(y),y.defaultPrevented||(Qu(of(Bi(s)),{select:!0}),document.activeElement===c&&ze(s))}return()=>{s.removeEventListener(hr,d),setTimeout(()=>{const y=new CustomEvent(pr,ji);s.addEventListener(pr,p),s.dispatchEvent(y),y.defaultPrevented||ze(c??document.body,{select:!0}),s.removeEventListener(pr,p),Vi.remove(m)},0)}}},[s,d,p,m]);const l=f.useCallback(c=>{if(!n&&!r||m.paused)return;const g=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,y=document.activeElement;if(g&&y){const w=c.currentTarget,[b,S]=ef(w);b&&S?!c.shiftKey&&y===S?(c.preventDefault(),n&&ze(b,{select:!0})):c.shiftKey&&y===b&&(c.preventDefault(),n&&ze(S,{select:!0})):y===w&&c.preventDefault()}},[n,r,m.paused]);return x.jsx($e.div,{tabIndex:-1,...a,ref:v,onKeyDown:l})});Fi.displayName=Ju;function Qu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ze(r,{select:t}),document.activeElement!==n)return}function ef(e){const t=Bi(e),n=Wi(t,e),r=Wi(t.reverse(),e);return[n,r]}function Bi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Wi(e,t){for(const n of e)if(!tf(n,{upTo:t}))return n}function tf(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nf(e){return e instanceof HTMLInputElement&&"select"in e}function ze(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nf(e)&&t&&e.select()}}var Vi=rf();function rf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hi(e,t),e.unshift(t)},remove(t){var n;e=Hi(e,t),(n=e[0])==null||n.resume()}}}function Hi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function of(e){return e.filter(t=>t.tagName!=="A")}var Ue=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},sf=f[" useId ".trim().toString()]||(()=>{}),af=0;function cf(e){const[t,n]=f.useState(sf());return Ue(()=>{n(r=>r??String(af++))},[e]),e||(t?`radix-${t}`:"")}const lf=["top","right","bottom","left"],Ye=Math.min,ue=Math.max,un=Math.round,fn=Math.floor,Se=e=>({x:e,y:e}),uf={left:"right",right:"left",bottom:"top",top:"bottom"};function mr(e,t,n){return ue(e,Ye(t,n))}function Ne(e,t){return typeof e=="function"?e(t):e}function ke(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function vr(e){return e==="x"?"y":"x"}function gr(e){return e==="y"?"height":"width"}function Ee(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function yr(e){return vr(Ee(e))}function ff(e,t,n){n===void 0&&(n=!1);const r=gt(e),o=yr(e),i=gr(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=dn(a)),[a,dn(a)]}function df(e){const t=dn(e);return[wr(e),t,wr(t)]}function wr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zi=["left","right"],Ui=["right","left"],hf=["top","bottom"],pf=["bottom","top"];function mf(e,t,n){switch(e){case"top":case"bottom":return n?t?Ui:zi:t?zi:Ui;case"left":case"right":return t?hf:pf;default:return[]}}function vf(e,t,n,r){const o=gt(e);let i=mf(ke(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(wr)))),i}function dn(e){const t=ke(e);return uf[t]+e.slice(t.length)}function gf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yi(e){return typeof e!="number"?gf(e):{top:e,right:e,bottom:e,left:e}}function hn(e){const{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 qi(e,t,n){let{reference:r,floating:o}=e;const i=Ee(t),a=yr(t),s=gr(a),u=ke(t),d=i==="y",p=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,v=r[s]/2-o[s]/2;let m;switch(u){case"top":m={x:p,y:r.y-o.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(gt(t)){case"start":m[a]-=v*(n&&d?-1:1);break;case"end":m[a]+=v*(n&&d?-1:1);break}return m}async function yf(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Ne(t,e),l=Yi(m),g=s[v?h==="floating"?"reference":"floating":h],y=hn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:p,strategy:u})),w=h==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=hn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:u}):w);return{top:(y.top-E.top+l.top)/S.y,bottom:(E.bottom-y.bottom+l.bottom)/S.y,left:(y.left-E.left+l.left)/S.x,right:(E.right-y.right+l.right)/S.x}}const wf=50,bf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:yf},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:h}=qi(d,r,u),v=r,m=0;const l={};for(let c=0;c<i.length;c++){const g=i[c];if(!g)continue;const{name:y,fn:w}=g,{x:b,y:S,data:E,reset:R}=await w({x:p,y:h,initialPlacement:r,placement:v,strategy:o,middlewareData:l,rects:d,platform:s,elements:{reference:e,floating:t}});p=b??p,h=S??h,l[y]={...l[y],...E},R&&m<wf&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:h}=qi(d,v,u)),c=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:l}},xf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:d,padding:p=0}=Ne(e,t)||{};if(d==null)return{};const h=Yi(p),v={x:n,y:r},m=yr(o),l=gr(m),c=await a.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",S=i.reference[l]+i.reference[m]-v[m]-i.floating[l],E=v[m]-i.reference[m],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=R?R[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(R)))&&(C=s.floating[b]||i.floating[l]);const M=S/2-E/2,N=C/2-c[l]/2-1,D=Ye(h[y],N),F=Ye(h[w],N),P=D,O=C-c[l]-F,T=C/2-c[l]/2+M,I=mr(P,T,O),k=!u.arrow&&gt(o)!=null&&T!==I&&i.reference[l]/2-(T<P?D:F)-c[l]/2<0,$=k?T<P?T-P:T-O:0;return{[m]:v[m]+$,data:{[m]:I,centerOffset:T-I-$,...k&&{alignmentOffset:$}},reset:k}}}),Sf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:l="none",flipAlignment:c=!0,...g}=Ne(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ke(o),w=Ee(s),b=ke(s)===s,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=v||(b||!c?[dn(s)]:df(s)),R=l!=="none";!v&&R&&E.push(...vf(s,c,l,S));const C=[s,...E],M=await u.detectOverflow(t,g),N=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&N.push(M[y]),h){const T=ff(o,a,S);N.push(M[T[0]],M[T[1]])}if(D=[...D,{placement:o,overflows:N}],!N.every(T=>T<=0)){var F,P;const T=(((F=i.flip)==null?void 0:F.index)||0)+1,I=C[T];if(I&&(!(h==="alignment"?w!==Ee(I):!1)||D.every(A=>Ee(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:T,overflows:D},reset:{placement:I}};let k=(P=D.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:P.placement;if(!k)switch(m){case"bestFit":{var O;const $=(O=D.filter(A=>{if(R){const L=Ee(A.placement);return L===w||L==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((A,L)=>A[1]-L[1])[0])==null?void 0:O[0];$&&(k=$);break}case"initialPlacement":k=s;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function Xi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ki(e){return lf.some(t=>e[t]>=0)}const Ef=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Ne(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=Xi(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ki(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=Xi(a,n.floating);return{data:{escapedOffsets:s,escaped:Ki(s)}}}default:return{}}}}},Zi=new Set(["left","top"]);async function Cf(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ke(n),s=gt(n),u=Ee(n)==="y",d=Zi.has(a)?-1:1,p=i&&u?-1:1,h=Ne(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:l}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof l=="number"&&(m=s==="end"?l*-1:l),u?{x:m*p,y:v*d}:{x:v*d,y:m*p}}const Rf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await Cf(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},_f=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...d}=Ne(e,t),p={x:n,y:r},h=await i.detectOverflow(t,d),v=Ee(ke(o)),m=vr(v);let l=p[m],c=p[v];if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=l+h[y],S=l-h[w];l=mr(b,l,S)}if(s){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",b=c+h[y],S=c-h[w];c=mr(b,c,S)}const g=u.fn({...t,[m]:l,[v]:c});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:a,[v]:s}}}}}},Pf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:d=!0}=Ne(e,t),p={x:n,y:r},h=Ee(o),v=vr(h);let m=p[v],l=p[h];const c=Ne(s,t),g=typeof c=="number"?{mainAxis:c,crossAxis:0}:{mainAxis:0,crossAxis:0,...c};if(u){const b=v==="y"?"height":"width",S=i.reference[v]-i.floating[b]+g.mainAxis,E=i.reference[v]+i.reference[b]-g.mainAxis;m<S?m=S:m>E&&(m=E)}if(d){var y,w;const b=v==="y"?"width":"height",S=Zi.has(ke(o)),E=i.reference[h]-i.floating[b]+(S&&((y=a.offset)==null?void 0:y[h])||0)+(S?0:g.crossAxis),R=i.reference[h]+i.reference[b]+(S?0:((w=a.offset)==null?void 0:w[h])||0)-(S?g.crossAxis:0);l<E?l=E:l>R&&(l=R)}return{[v]:m,[h]:l}}}},Of=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...d}=Ne(e,t),p=await a.detectOverflow(t,d),h=ke(o),v=gt(o),m=Ee(o)==="y",{width:l,height:c}=i.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=v===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=h,g=v==="end"?"top":"bottom");const w=c-p.top-p.bottom,b=l-p.left-p.right,S=Ye(c-p[g],w),E=Ye(l-p[y],b),R=!t.middlewareData.shift;let C=S,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!v){const D=ue(p.left,0),F=ue(p.right,0),P=ue(p.top,0),O=ue(p.bottom,0);m?M=l-2*(D!==0||F!==0?D+F:ue(p.left,p.right)):C=c-2*(P!==0||O!==0?P+O:ue(p.top,p.bottom))}await u({...t,availableWidth:M,availableHeight:C});const N=await a.getDimensions(s.floating);return l!==N.width||c!==N.height?{reset:{rects:!0}}:{}}}};function pn(){return typeof window<"u"}function yt(e){return Gi(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gi(e){return pn()?e instanceof Node||e instanceof fe(e).Node:!1}function ve(e){return pn()?e instanceof Element||e instanceof fe(e).Element:!1}function Me(e){return pn()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function Ji(e){return!pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}function Dt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Af(e){return/^(table|td|th)$/.test(yt(e))}function mn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Tf=/transform|translate|scale|rotate|perspective|filter/,$f=/paint|layout|strict|content/,tt=e=>!!e&&e!=="none";let br;function xr(e){const t=ve(e)?ge(e):e;return tt(t.transform)||tt(t.translate)||tt(t.scale)||tt(t.rotate)||tt(t.perspective)||!Sr()&&(tt(t.backdropFilter)||tt(t.filter))||Tf.test(t.willChange||"")||$f.test(t.contain||"")}function Nf(e){let t=qe(e);for(;Me(t)&&!wt(t);){if(xr(t))return t;if(mn(t))return null;t=qe(t)}return null}function Sr(){return br==null&&(br=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),br}function wt(e){return/^(html|body|#document)$/.test(yt(e))}function ge(e){return fe(e).getComputedStyle(e)}function vn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if(yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ji(e)&&e.host||Ce(e);return Ji(t)?t.host:t}function Qi(e){const t=qe(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Me(t)&&Dt(t)?t:Qi(t)}function Lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Qi(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=fe(o);if(i){const s=Er(a);return t.concat(a,a.visualViewport||[],Dt(o)?o:[],s&&n?Lt(s):[])}else return t.concat(o,Lt(o,[],n))}function Er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function es(e){const t=ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Me(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=un(n)!==i||un(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Cr(e){return ve(e)?e:e.contextElement}function bt(e){const t=Cr(e);if(!Me(t))return Se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=es(t);let a=(i?un(n.width):n.width)/r,s=(i?un(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const kf=Se(0);function ts(e){const t=fe(e);return!Sr()||!t.visualViewport?kf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fe(e)?!1:t}function nt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Cr(e);let a=Se(1);t&&(r?ve(r)&&(a=bt(r)):a=bt(e));const s=Mf(i,n,r)?ts(i):Se(0);let u=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,p=o.width/a.x,h=o.height/a.y;if(i){const v=fe(i),m=r&&ve(r)?fe(r):r;let l=v,c=Er(l);for(;c&&r&&m!==l;){const g=bt(c),y=c.getBoundingClientRect(),w=ge(c),b=y.left+(c.clientLeft+parseFloat(w.paddingLeft))*g.x,S=y.top+(c.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,p*=g.x,h*=g.y,u+=b,d+=S,l=fe(c),c=Er(l)}}return hn({width:p,height:h,x:u,y:d})}function gn(e,t){const n=vn(e).scrollLeft;return t?t.left+n:nt(Ce(e)).left+n}function ns(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function If(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ce(r),s=t?mn(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},d=Se(1);const p=Se(0),h=Me(r);if((h||!h&&!i)&&((yt(r)!=="body"||Dt(a))&&(u=vn(r)),h)){const m=nt(r);d=bt(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const v=a&&!h&&!i?ns(a,u):Se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+p.x+v.x,y:n.y*d.y-u.scrollTop*d.y+p.y+v.y}}function Df(e){return Array.from(e.getClientRects())}function Lf(e){const t=Ce(e),n=vn(e),r=e.ownerDocument.body,o=ue(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ue(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+gn(e);const s=-n.scrollTop;return ge(r).direction==="rtl"&&(a+=ue(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const rs=25;function jf(e,t){const n=fe(e),r=Ce(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const p=Sr();(!p||p&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}const d=gn(r);if(d<=0){const p=r.ownerDocument,h=p.body,v=getComputedStyle(h),m=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,l=Math.abs(r.clientWidth-h.clientWidth-m);l<=rs&&(i-=l)}else d<=rs&&(i+=d);return{width:i,height:a,x:s,y:u}}function Ff(e,t){const n=nt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Me(e)?bt(e):Se(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,d=r*i.y;return{width:a,height:s,x:u,y:d}}function os(e,t,n){let r;if(t==="viewport")r=jf(e,n);else if(t==="document")r=Lf(Ce(e));else if(ve(t))r=Ff(t,n);else{const o=ts(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hn(r)}function is(e,t){const n=qe(e);return n===t||!ve(n)||wt(n)?!1:ge(n).position==="fixed"||is(n,t)}function Bf(e,t){const n=t.get(e);if(n)return n;let r=Lt(e,[],!1).filter(s=>ve(s)&&yt(s)!=="body"),o=null;const i=ge(e).position==="fixed";let a=i?qe(e):e;for(;ve(a)&&!wt(a);){const s=ge(a),u=xr(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Dt(a)&&!u&&is(e,a))?r=r.filter(p=>p!==a):o=s,a=qe(a)}return t.set(e,r),r}function Wf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?mn(t)?[]:Bf(t,this._c):[].concat(n),r],s=os(t,a[0],o);let u=s.top,d=s.right,p=s.bottom,h=s.left;for(let v=1;v<a.length;v++){const m=os(t,a[v],o);u=ue(m.top,u),d=Ye(m.right,d),p=Ye(m.bottom,p),h=ue(m.left,h)}return{width:d-h,height:p-u,x:h,y:u}}function Vf(e){const{width:t,height:n}=es(e);return{width:t,height:n}}function Hf(e,t,n){const r=Me(t),o=Ce(t),i=n==="fixed",a=nt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=Se(0);function d(){u.x=gn(o)}if(r||!r&&!i)if((yt(t)!=="body"||Dt(o))&&(s=vn(t)),r){const m=nt(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&d();i&&!r&&o&&d();const p=o&&!r&&!i?ns(o,s):Se(0),h=a.left+s.scrollLeft-u.x-p.x,v=a.top+s.scrollTop-u.y-p.y;return{x:h,y:v,width:a.width,height:a.height}}function Rr(e){return ge(e).position==="static"}function ss(e,t){if(!Me(e)||ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function as(e,t){const n=fe(e);if(mn(e))return n;if(!Me(e)){let o=qe(e);for(;o&&!wt(o);){if(ve(o)&&!Rr(o))return o;o=qe(o)}return n}let r=ss(e,t);for(;r&&Af(r)&&Rr(r);)r=ss(r,t);return r&&wt(r)&&Rr(r)&&!xr(r)?n:r||Nf(e)||n}const zf=async function(e){const t=this.getOffsetParent||as,n=this.getDimensions,r=await n(e.floating);return{reference:Hf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Uf(e){return ge(e).direction==="rtl"}const Yf={convertOffsetParentRelativeRectToViewportRelativeRect:If,getDocumentElement:Ce,getClippingRect:Wf,getOffsetParent:as,getElementRects:zf,getClientRects:Df,getDimensions:Vf,getScale:bt,isElement:ve,isRTL:Uf};function cs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qf(e,t){let n=null,r;const o=Ce(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const d=e.getBoundingClientRect(),{left:p,top:h,width:v,height:m}=d;if(s||t(),!v||!m)return;const l=fn(h),c=fn(o.clientWidth-(p+v)),g=fn(o.clientHeight-(h+m)),y=fn(p),b={rootMargin:-l+"px "+-c+"px "+-g+"px "+-y+"px",threshold:ue(0,Ye(1,u))||1};let S=!0;function E(R){const C=R[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!cs(d,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function Xf(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Cr(e),p=o||i?[...d?Lt(d):[],...t?Lt(t):[]]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=d&&s?qf(d,n):null;let v=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let l,c=u?nt(e):null;u&&g();function g(){const y=nt(e);c&&!cs(c,y)&&n(),c=y,l=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h==null||h(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(l)}}const Kf=Rf,Zf=_f,Gf=Sf,Jf=Of,Qf=Ef,ls=xf,ed=Pf,td=(e,t,n)=>{const r=new Map,o={platform:Yf,...n},i={...o.platform,_c:r};return bf(e,t,{...o,platform:i})};var nd=typeof document<"u",rd=function(){},yn=nd?Y.useLayoutEffect:rd;function wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!wn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function us(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fs(e,t){const n=us(e);return Math.round(t*n)/n}function _r(e){const t=f.useRef(e);return yn(()=>{t.current=e}),t}function od(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=f.useState(r);wn(v,r)||m(r);const[l,c]=f.useState(null),[g,y]=f.useState(null),w=f.useCallback(A=>{A!==R.current&&(R.current=A,c(A))},[]),b=f.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),S=i||l,E=a||g,R=f.useRef(null),C=f.useRef(null),M=f.useRef(p),N=u!=null,D=_r(u),F=_r(o),P=_r(d),O=f.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:v};F.current&&(A.platform=F.current),td(R.current,C.current,A).then(L=>{const W={...L,isPositioned:P.current!==!1};T.current&&!wn(M.current,W)&&(M.current=W,rt.flushSync(()=>{h(W)}))})},[v,t,n,F,P]);yn(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[d]);const T=f.useRef(!1);yn(()=>(T.current=!0,()=>{T.current=!1}),[]),yn(()=>{if(S&&(R.current=S),E&&(C.current=E),S&&E){if(D.current)return D.current(S,E,O);O()}},[S,E,O,D,N]);const I=f.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),k=f.useMemo(()=>({reference:S,floating:E}),[S,E]),$=f.useMemo(()=>{const A={position:n,left:0,top:0};if(!k.floating)return A;const L=fs(k.floating,p.x),W=fs(k.floating,p.y);return s?{...A,transform:"translate("+L+"px, "+W+"px)",...us(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:W}},[n,s,k.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:O,refs:I,elements:k,floatingStyles:$}),[p,O,I,k,$])}const id=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ls({element:r.current,padding:o}).fn(n):{}:r?ls({element:r,padding:o}).fn(n):{}}}},sd=(e,t)=>{const n=Kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},ad=(e,t)=>{const n=Zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},cd=(e,t)=>({fn:ed(e).fn,options:[e,t]}),ld=(e,t)=>{const n=Gf(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>{const n=Jf(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{const n=Qf(e);return{name:n.name,fn:n.fn,options:[e,t]}},dd=(e,t)=>{const n=id(e);return{name:n.name,fn:n.fn,options:[e,t]}};var hd="Arrow",ds=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.jsx($e.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});ds.displayName=hd;var pd=ds;function md(e){const[t,n]=f.useState(void 0);return Ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,s=d.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Pr="Popper",[hs,ps]=Ti(Pr),[vd,ms]=hs(Pr),vs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return x.jsx(vd,{scope:t,anchor:r,onAnchorChange:o,children:n})};vs.displayName=Pr;var gs="PopperAnchor",ys=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ms(gs,n),a=f.useRef(null),s=He(t,a),u=f.useRef(null);return f.useEffect(()=>{const d=u.current;u.current=(r==null?void 0:r.current)||a.current,d!==u.current&&i.onAnchorChange(u.current)}),r?null:x.jsx($e.div,{...o,ref:s})});ys.displayName=gs;var Or="PopperContent",[gd,yd]=hs(Or),ws=f.forwardRef((e,t)=>{var j,z,G,U,q,X;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:l,...c}=e,g=ms(Or,n),[y,w]=f.useState(null),b=He(t,Q=>w(Q)),[S,E]=f.useState(null),R=md(S),C=(R==null?void 0:R.width)??0,M=(R==null?void 0:R.height)??0,N=r+(i!=="center"?"-"+i:""),D=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(d)?d:[d],P=F.length>0,O={padding:D,boundary:F.filter(bd),altBoundary:P},{refs:T,floatingStyles:I,placement:k,isPositioned:$,middlewareData:A}=od({strategy:"fixed",placement:N,whileElementsMounted:(...Q)=>Xf(...Q,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[sd({mainAxis:o+M,alignmentAxis:a}),u&&ad({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?cd():void 0,...O}),u&&ld({...O}),ud({...O,apply:({elements:Q,rects:oe,availableWidth:ae,availableHeight:_e})=>{const{width:Pe,height:_t}=oe.reference,De=Q.floating.style;De.setProperty("--radix-popper-available-width",`${ae}px`),De.setProperty("--radix-popper-available-height",`${_e}px`),De.setProperty("--radix-popper-anchor-width",`${Pe}px`),De.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),S&&dd({element:S,padding:s}),xd({arrowWidth:C,arrowHeight:M}),v&&fd({strategy:"referenceHidden",...O})]}),[L,W]=Ss(k),_=vt(l);Ue(()=>{$&&(_==null||_())},[$,_]);const B=(j=A.arrow)==null?void 0:j.x,V=(z=A.arrow)==null?void 0:z.y,H=((G=A.arrow)==null?void 0:G.centerOffset)!==0,[K,J]=f.useState();return Ue(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:$?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(U=A.transformOrigin)==null?void 0:U.x,(q=A.transformOrigin)==null?void 0:q.y].join(" "),...((X=A.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(gd,{scope:n,placedSide:L,onArrowChange:E,arrowX:B,arrowY:V,shouldHideArrow:H,children:x.jsx($e.div,{"data-side":L,"data-align":W,...c,ref:b,style:{...c.style,animation:$?void 0:"none"}})})})});ws.displayName=Or;var bs="PopperArrow",wd={top:"bottom",right:"left",bottom:"top",left:"right"},xs=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=yd(bs,r),a=wd[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(pd,{...o,ref:n,style:{...o.style,display:"block"}})})});xs.displayName=bs;function bd(e){return e!==null}var xd=e=>({name:"transformOrigin",options:e,fn(t){var g,y,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,p]=Ss(n),h={start:"0%",center:"50%",end:"100%"}[p],v=(((y=o.arrow)==null?void 0:y.x)??0)+s/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let l="",c="";return d==="bottom"?(l=a?h:`${v}px`,c=`${-u}px`):d==="top"?(l=a?h:`${v}px`,c=`${r.floating.height+u}px`):d==="right"?(l=`${-u}px`,c=a?h:`${m}px`):d==="left"&&(l=`${r.floating.width+u}px`,c=a?h:`${m}px`),{data:{x:l,y:c}}}});function Ss(e){const[t,n="center"]=e.split("-");return[t,n]}var Sd=vs,Es=ys,Ed=ws,Cd=xs,Rd="Portal",Cs=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);Ue(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?$n.createPortal(x.jsx($e.div,{...r,ref:t}),a):null});Cs.displayName=Rd;function _d(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ar=e=>{const{present:t,children:n}=e,r=Pd(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=He(r.ref,Od(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Ar.displayName="Presence";function Pd(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=_d(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=bn(r.current);i.current=s==="mounted"?d:"none"},[s]),Ue(()=>{const d=r.current,p=o.current;if(p!==e){const v=i.current,m=bn(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ue(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=m=>{const c=bn(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&c&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(i.current=bn(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function bn(e){return(e==null?void 0:e.animationName)||"none"}function Od(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ad=f[" useInsertionEffect ".trim().toString()]||Ue;function Td({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=$d({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const h=p.current;h!==s&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=s},[s,r])}const d=f.useCallback(p=>{var h;if(s){const v=Nd(p)?p(e):p;v!==e&&((h=a.current)==null||h.call(a,v))}else i(p)},[s,e,i,a]);return[u,d]}function $d({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return Ad(()=>{i.current=t},[t]),f.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Nd(e){return typeof e=="function"}var kd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,xn=new WeakMap,Sn={},Tr=0,Rs=function(e){return e&&(e.host||Rs(e.parentNode))},Md=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Rs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Id=function(e,t,n,r){var o=Md(t,Array.isArray(e)?e:[e]);Sn[n]||(Sn[n]=new WeakMap);var i=Sn[n],a=[],s=new Set,u=new Set(o),d=function(h){!h||s.has(h)||(s.add(h),d(h.parentNode))};o.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(s.has(v))p(v);else try{var m=v.getAttribute(r),l=m!==null&&m!=="false",c=(xt.get(v)||0)+1,g=(i.get(v)||0)+1;xt.set(v,c),i.set(v,g),a.push(v),c===1&&l&&xn.set(v,!0),g===1&&v.setAttribute(n,"true"),l||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return p(t),s.clear(),Tr++,function(){a.forEach(function(h){var v=xt.get(h)-1,m=i.get(h)-1;xt.set(h,v),i.set(h,m),v||(xn.has(h)||h.removeAttribute(r),xn.delete(h)),m||h.removeAttribute(n)}),Tr--,Tr||(xt=new WeakMap,xt=new WeakMap,xn=new WeakMap,Sn={})}},Dd=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=kd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Id(r,o,n,"aria-hidden")):function(){return null}},Re=function(){return Re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Re.apply(this,arguments)};function _s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ld(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var En="right-scroll-bar-position",Cn="width-before-scroll-bar",jd="with-scroll-bars-hidden",Fd="--removed-body-scroll-bar-size";function $r(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bd(e,t){var n=Y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Wd=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ps=new WeakMap;function Vd(e,t){var n=Bd(null,function(r){return e.forEach(function(o){return $r(o,r)})});return Wd(function(){var r=Ps.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||$r(s,null)}),i.forEach(function(s){o.has(s)||$r(s,a)})}Ps.set(n,e)},[e]),n}function Hd(e){return e}function zd(e,t){t===void 0&&(t=Hd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var p=a;a=[],p.forEach(i)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){a.push(p),d()},filter:function(p){return a=a.filter(p),n}}}};return o}function Ud(e){e===void 0&&(e={});var t=zd(null);return t.options=Re({async:!0,ssr:!1},e),t}var Os=function(e){var t=e.sideCar,n=_s(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Re({},n))};Os.isSideCarExport=!0;function Yd(e,t){return e.useMedium(t),Os}var As=Ud(),Nr=function(){},Rn=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Nr,onWheelCapture:Nr,onTouchMoveCapture:Nr}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noRelative,l=e.noIsolation,c=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,S=_s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,R=Vd([n,t]),C=Re(Re({},S),o);return f.createElement(f.Fragment,null,p&&f.createElement(E,{sideCar:As,removeScrollBar:d,shards:h,noRelative:m,noIsolation:l,inert:c,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?f.cloneElement(f.Children.only(s),Re(Re({},C),{ref:R})):f.createElement(w,Re({},C,{className:u,ref:R}),s))});Rn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Rn.classNames={fullWidth:Cn,zeroRight:En};var qd=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qd();return t&&e.setAttribute("nonce",t),e}function Kd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xd())&&(Kd(t,n),Zd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Jd=function(){var e=Gd();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ts=function(){var e=Jd(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Qd={left:0,top:0,right:0,gap:0},kr=function(e){return parseInt(e||"",10)||0},eh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[kr(n),kr(r),kr(o)]},th=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qd;var t=eh(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])}},nh=Ts(),St="data-scroll-locked",rh=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
63
- .`.concat(jd,` {
64
- overflow: hidden `).concat(r,`;
65
- padding-right: `).concat(s,"px ").concat(r,`;
66
- }
67
- body[`).concat(St,`] {
68
- overflow: hidden `).concat(r,`;
69
- overscroll-behavior: contain;
70
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
71
- padding-left: `.concat(o,`px;
72
- padding-top: `).concat(i,`px;
73
- padding-right: `).concat(a,`px;
74
- margin-left:0;
75
- margin-top:0;
76
- margin-right: `).concat(s,"px ").concat(r,`;
77
- `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
78
- }
79
-
80
- .`).concat(En,` {
81
- right: `).concat(s,"px ").concat(r,`;
82
- }
83
-
84
- .`).concat(Cn,` {
85
- margin-right: `).concat(s,"px ").concat(r,`;
86
- }
87
-
88
- .`).concat(En," .").concat(En,` {
89
- right: 0 `).concat(r,`;
90
- }
91
-
92
- .`).concat(Cn," .").concat(Cn,` {
93
- margin-right: 0 `).concat(r,`;
94
- }
95
-
96
- body[`).concat(St,`] {
97
- `).concat(Fd,": ").concat(s,`px;
98
- }
99
- `)},$s=function(){var e=parseInt(document.body.getAttribute(St)||"0",10);return isFinite(e)?e:0},oh=function(){f.useEffect(function(){return document.body.setAttribute(St,($s()+1).toString()),function(){var e=$s()-1;e<=0?document.body.removeAttribute(St):document.body.setAttribute(St,e.toString())}},[])},ih=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;oh();var i=f.useMemo(function(){return th(o)},[o]);return f.createElement(nh,{styles:rh(i,!t,o,n?"":"!important")})},Mr=!1;if(typeof window<"u")try{var _n=Object.defineProperty({},"passive",{get:function(){return Mr=!0,!0}});window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch{Mr=!1}var Et=Mr?{passive:!1}:!1,sh=function(e){return e.tagName==="TEXTAREA"},Ns=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sh(e)&&n[t]==="visible")},ah=function(e){return Ns(e,"overflowY")},ch=function(e){return Ns(e,"overflowX")},ks=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ms(e,r);if(o){var i=Is(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ms=function(e,t){return e==="v"?ah(t):ch(t)},Is=function(e,t){return e==="v"?lh(t):uh(t)},fh=function(e,t){return e==="h"&&t==="rtl"?-1:1},dh=function(e,t,n,r,o){var i=fh(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),d=!1,p=a>0,h=0,v=0;do{if(!s)break;var m=Is(e,s),l=m[0],c=m[1],g=m[2],y=c-g-i*l;(l||y)&&Ms(e,s)&&(h+=y,v+=l);var w=s.parentNode;s=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(p&&Math.abs(h)<1||!p&&Math.abs(v)<1)&&(d=!0),d},Pn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ds=function(e){return[e.deltaX,e.deltaY]},Ls=function(e){return e&&"current"in e?e.current:e},hh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ph=function(e){return`
100
- .block-interactivity-`.concat(e,` {pointer-events: none;}
101
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
102
- `)},mh=0,Ct=[];function vh(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(mh++)[0],i=f.useState(Ts)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=Ld([e.lockRef.current],(e.shards||[]).map(Ls),!0).filter(Boolean);return c.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(c,g){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!a.current.allowPinchZoom;var y=Pn(c),w=n.current,b="deltaX"in c?c.deltaX:w[0]-y[0],S="deltaY"in c?c.deltaY:w[1]-y[1],E,R=c.target,C=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in c&&C==="h"&&R.type==="range")return!1;var M=window.getSelection(),N=M&&M.anchorNode,D=N?N===R||N.contains(R):!1;if(D)return!1;var F=ks(C,R);if(!F)return!0;if(F?E=C:(E=C==="v"?"h":"v",F=ks(C,R)),!F)return!1;if(!r.current&&"changedTouches"in c&&(b||S)&&(r.current=E),!E)return!0;var P=r.current||E;return dh(P,g,c,P==="h"?b:S)},[]),u=f.useCallback(function(c){var g=c;if(!(!Ct.length||Ct[Ct.length-1]!==i)){var y="deltaY"in g?Ds(g):Pn(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&hh(E.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(Ls).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=b.length>0?s(g,b[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),d=f.useCallback(function(c,g,y,w){var b={name:c,delta:g,target:y,should:w,shadowParent:gh(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),p=f.useCallback(function(c){n.current=Pn(c),r.current=void 0},[]),h=f.useCallback(function(c){d(c.type,Ds(c),c.target,s(c,e.lockRef.current))},[]),v=f.useCallback(function(c){d(c.type,Pn(c),c.target,s(c,e.lockRef.current))},[]);f.useEffect(function(){return Ct.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Et),document.addEventListener("touchmove",u,Et),document.addEventListener("touchstart",p,Et),function(){Ct=Ct.filter(function(c){return c!==i}),document.removeEventListener("wheel",u,Et),document.removeEventListener("touchmove",u,Et),document.removeEventListener("touchstart",p,Et)}},[]);var m=e.removeScrollBar,l=e.inert;return f.createElement(f.Fragment,null,l?f.createElement(i,{styles:ph(o)}):null,m?f.createElement(ih,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yh=Yd(As,vh);var js=f.forwardRef(function(e,t){return f.createElement(Rn,Re({},e,{ref:t,sideCar:yh}))});js.classNames=Rn.classNames;var On="Popover",[Fs]=Ti(On,[ps]),jt=ps(),[wh,Xe]=Fs(On),Bs=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=jt(t),u=f.useRef(null),[d,p]=f.useState(!1),[h,v]=Td({prop:r,defaultProp:o??!1,onChange:i,caller:On});return x.jsx(Sd,{...s,children:x.jsx(wh,{scope:t,contentId:cf(),triggerRef:u,open:h,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:a,children:n})})};Bs.displayName=On;var Ws="PopoverAnchor",bh=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Xe(Ws,n),i=jt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return f.useEffect(()=>(a(),()=>s()),[a,s]),x.jsx(Es,{...i,...r,ref:t})});bh.displayName=Ws;var Vs="PopoverTrigger",Hs=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Xe(Vs,n),i=jt(n),a=He(t,o.triggerRef),s=x.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xs(o.open),...r,ref:a,onClick:Ve(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:x.jsx(Es,{asChild:!0,...i,children:s})});Hs.displayName=Vs;var Ir="PopoverPortal",[xh,Sh]=Fs(Ir,{forceMount:void 0}),zs=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Xe(Ir,t);return x.jsx(xh,{scope:t,forceMount:n,children:x.jsx(Ar,{present:n||i.open,children:x.jsx(Cs,{asChild:!0,container:o,children:r})})})};zs.displayName=Ir;var Rt="PopoverContent",Us=f.forwardRef((e,t)=>{const n=Sh(Rt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Xe(Rt,e.__scopePopover);return x.jsx(Ar,{present:r||i.open,children:i.modal?x.jsx(Ch,{...o,ref:t}):x.jsx(Rh,{...o,ref:t})})});Us.displayName=Rt;var Eh=$i("PopoverContent.RemoveScroll"),Ch=f.forwardRef((e,t)=>{const n=Xe(Rt,e.__scopePopover),r=f.useRef(null),o=He(t,r),i=f.useRef(!1);return f.useEffect(()=>{const a=r.current;if(a)return Dd(a)},[]),x.jsx(js,{as:Eh,allowPinchZoom:!0,children:x.jsx(Ys,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,d=s.button===2||u;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Ve(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rh=f.forwardRef((e,t)=>{const n=Xe(Rt,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return x.jsx(Ys,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Ys=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,...h}=e,v=Xe(Rt,n),m=jt(n);return Gu(),x.jsx(Fi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:x.jsx(Mi,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:p,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:x.jsx(Ed,{"data-state":Xs(v.open),role:"dialog",id:v.contentId,...m,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),qs="PopoverClose",_h=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Xe(qs,n);return x.jsx($e.button,{type:"button",...r,ref:t,onClick:Ve(e.onClick,()=>o.onOpenChange(!1))})});_h.displayName=qs;var Ph="PopoverArrow",Oh=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(n);return x.jsx(Cd,{...o,...r,ref:t})});Oh.displayName=Ph;function Xs(e){return e?"open":"closed"}var Ah=Bs,Th=Hs,$h=zs,Nh=Us;const kh={content:"_content_1qahr_1"},Mh=({trigger:e,children:t,open:n,onOpenChange:r,align:o="end",side:i="bottom",sideOffset:a=5,className:s="","aria-label":u,"aria-describedby":d})=>x.jsxs(Ah,{open:n,onOpenChange:r,children:[x.jsx(Th,{asChild:!0,children:e}),x.jsx($h,{children:x.jsx(Nh,{className:`${kh.content} ${s}`,align:o,side:i,sideOffset:a,"aria-label":u,"aria-describedby":d,children:t})})]}),Ie={table:"_table_1b0iq_1",caption:"_caption_1b0iq_8",headerRow:"_headerRow_1b0iq_25",dataRow:"_dataRow_1b0iq_33",cellInner:"_cellInner_1b0iq_41",cellLabel:"_cellLabel_1b0iq_47",cellContent:"_cellContent_1b0iq_52",value:"_value_1b0iq_58",icon:"_icon_1b0iq_64"};function Ih({children:e,caption:t,"aria-label":n}){return process.env.NODE_ENV!=="production"&&!t&&!n&&console.warn("Table: Component should have either a caption or aria-label for accessibility."),x.jsxs("table",{className:Ie.table,"aria-label":n,children:[t&&x.jsx("caption",{className:Ie.caption,children:t}),e]})}function Dh({children:e}){const t=Y.Children.map(e,n=>Y.isValidElement(n)&&n.type==="td"?x.jsx("th",{scope:"col",...n.props}):n);return x.jsx("thead",{children:x.jsx("tr",{className:Ie.headerRow,children:t})})}function Lh({children:e}){return x.jsx("tr",{className:Ie.dataRow,children:e})}function jh({label:e,children:t,isHeader:n=!1,scope:r}){const o=n?"th":"td",i=n&&r?{scope:r}:{};return e||t?x.jsx(o,{...i,children:x.jsxs("div",{className:Ie.cellInner,children:[e&&x.jsx("span",{className:Ie.cellLabel,children:e}),t&&x.jsx("div",{className:Ie.cellContent,children:t})]})}):x.jsx(o,{...i,children:t})}function Fh({children:e}){return x.jsx("span",{className:Ie.value,children:e})}function Bh({children:e,"aria-label":t}){const n=!t;return x.jsx("span",{className:Ie.icon,"aria-hidden":n?"true":void 0,"aria-label":t,children:Y.cloneElement(e,{size:"14px",color:"currentColor"})})}const An={tabs:"_tabs_qrelf_1",tab:"_tab_qrelf_1",active:"_active_qrelf_23",micro:"_micro_qrelf_29",default:"_default_qrelf_36",large:"_large_qrelf_43"};function Wh({items:e,value:t,onValueChange:n,size:r="default"}){return x.jsx("div",{className:An.tabs,role:"tablist",children:e.map(o=>x.jsx("button",{role:"tab",type:"button","aria-selected":t===o.value,className:`${An.tab} ${An[r]} ${t===o.value?An.active:""}`,onClick:()=>n(o.value),children:o.label},o.value))})}const Tn={wrapper:"_wrapper_1a9jo_1",track:"_track_1a9jo_8",fill:"_fill_1a9jo_36",label:"_label_1a9jo_46"};function Vh({value:e,showLabel:t=!1,fulfilledColor:n=!1,className:r=""}){const o=Math.min(100,Math.max(0,e)),i=`${Math.round(o)}%`,a=n&&o>=100?"var(--CPureBlue)":void 0;return x.jsxs("div",{className:`${Tn.wrapper} ${r}`,role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,children:[x.jsx("div",{className:Tn.track,children:x.jsx("div",{className:Tn.fill,style:{width:`${o}%`,backgroundColor:a}})}),t&&x.jsx("span",{className:Tn.label,"aria-hidden":"true",children:i})]})}const Hh={chip:"_chip_1xnqt_1"};function zh({children:e,color:t,textColor:n,className:r}){const o={};return t&&(o.backgroundColor=t),n&&(o.color=n),x.jsx("span",{className:[Hh.chip,r].filter(Boolean).join(" "),style:o,children:e})}Z.Base=ea,Z.Button=Js,Z.Checkbox=Qs,Z.Chip=zh,Z.FilterPanelBase=ia,Z.InputField=ca,Z.Popover=Mh,Z.ProgressBar=Vh,Z.RadioButton=la,Z.SearchField=aa,Z.Select=Mu,Z.Slider=ha,Z.Table=Ih,Z.TableCell=jh,Z.TableHeader=Dh,Z.TableIcon=Bh,Z.TableRow=Lh,Z.TableValue=Fh,Z.Tabs=Wh,Z.ToggleSwitch=ua,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})}));