mobigrid-module 1.1.25-beta.20 → 1.1.25-beta.21

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.js CHANGED
@@ -23,7 +23,7 @@ const Pi=(...e)=>e.filter(((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t)
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */function Hi(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ui(...t){return e.useCallback(Hi(...t),t)}function $i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gi,Yi={exports:{}},qi={};var Ki,Xi,Ji={};function Zi(){return Ki||(Ki=1,"production"!==gt.env.NODE_ENV&&function(){var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),h=Symbol.iterator;var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=y.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var m;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return b(e)+".Consumer";case l:return b(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case p:var r=e,g=r._payload,h=r._init;try{return w(h(g))}catch(e){return null}}return null}m=Symbol.for("react.module.reference");var O,x,E,j,k,S,P,C=Object.assign,z=0;function T(){}T.__reactDisabledLog=!0;var L,N=y.ReactCurrentDispatcher;function R(e,t,r){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+e}var M,I=!1,_="function"==typeof WeakMap?WeakMap:Map;function A(e,t){if(!e||I)return"";var r,n=M.get(e);if(void 0!==n)return n;I=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=N.current,N.current=null,function(){if(0===z){O=console.log,x=console.info,E=console.warn,j=console.error,k=console.group,S=console.groupCollapsed,P=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=r.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{I=!1,N.current=o,function(){if(0==--z){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:O}),info:C({},e,{value:x}),warn:C({},e,{value:E}),error:C({},e,{value:j}),group:C({},e,{value:k}),groupCollapsed:C({},e,{value:S}),groupEnd:C({},e,{value:P})})}z<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=e?e.displayName||e.name:"",p=d?R(d):"";return"function"==typeof e&&M.set(e,p),p}function D(e,t,r){if(null==e)return"";if("function"==typeof e)return A(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return R(e);switch(e){case u:return R("Suspense");case f:return R("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return A(e.render,!1);case d:return D(e.type,t,r);case p:var n=e,o=n._payload,i=n._init;try{return D(i(o),t,r)}catch(e){}}return""}M=new _;var B=Object.prototype.hasOwnProperty,F={},W=y.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);W.setExtraStackFrame(r)}else W.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function $(e){return""+e}function G(e){if(function(e){try{return $(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),$(e)}var Y,q,K,X=y.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};K={};function Z(e,t,n,o,i){var a,l={},s=null,c=null;for(a in void 0!==n&&(G(n),s=""+n),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(G(t.key),s=""+t.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&X.current&&t&&X.current.stateNode!==t){var r=w(X.current.type);K[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(X.current.type),e.ref),K[r]=!0)}}(t,i)),t)B.call(t,a)&&!J.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){Y||(Y=!0,v("%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://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(l,f),c&&function(e,t){var r=function(){q||(q=!0,v("%s: `ref` 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://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(l,f)}return function(e,t,n,o,i,a,l){var s={$$typeof:r,type:e,key:t,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,X.current,l)}var Q,ee=y.ReactCurrentOwner,te=y.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);te.setExtraStackFrame(r)}else te.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=w(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ie[r]){ie[r]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&ae(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ne(i.value)&&ae(i.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==d)return;t=r.propTypes}if(t){var n=w(r);!function(e,t,r,n,o){var i=Function.call.bind(B);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof l),V(null)),l instanceof Error&&!(l.message in F)&&(F[l.message]=!0,V(o),v("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ce={};function ue(e,t,n,h,y,b){var O=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===l||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||void 0!==e.getModuleId)}(e);if(!O){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E;x+=oe(),null===e?E="null":U(e)?E="array":void 0!==e&&e.$$typeof===r?(E="<"+(w(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,x)}var j=Z(e,t,n,y,b);if(null==j)return j;if(O){var k=t.children;if(void 0!==k)if(h)if(U(k)){for(var S=0;S<k.length;S++)le(k[S],e);Object.freeze&&Object.freeze(k)}else v("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 le(k,e)}if(B.call(t,"key")){var P=w(e),C=Object.keys(t).filter((function(e){return"key"!==e})),z=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+z])v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',z,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+z]=!0}return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(j):se(j),j}var fe=function(e,t,r){return ue(e,t,r,!1)},de=function(e,t,r){return ue(e,t,r,!0)};Ji.Fragment=o,Ji.jsx=fe,Ji.jsxs=de}()),Ji}var Qi=(Xi||(Xi=1,"production"===gt.env.NODE_ENV?Yi.exports=function(){if(Gi)return qi;Gi=1;var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var l,s={},c=null,u=null;for(l in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,l)&&!a.hasOwnProperty(l)&&(s[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps)void 0===s[l]&&(s[l]=t[l]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}return qi.Fragment=n,qi.jsx=l,qi.jsxs=l,qi}():Yi.exports=Zi()),Yi.exports),ea=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(na);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Qi.jsx(ta,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Qi.jsx(ta,{...o,ref:r,children:n})}));ea.displayName="Slot";var ta=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n);return e.cloneElement(n,{...oa(o,n.props),ref:r?Hi(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));ta.displayName="SlotClone";var ra=({children:e})=>Qi.jsx(Qi.Fragment,{children:e});function na(t){return e.isValidElement(t)&&t.type===ra}function oa(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}var ia=zo("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),aa=e.forwardRef((function(t,r){var n=t.className,o=t.variant,i=t.size,a=t.asChild,l=void 0!==a&&a,s=O(t,["className","variant","size","asChild"]),c=l?ea:"button";return e.createElement(c,w({className:xi(ia({variant:o,size:i,className:n})),ref:r},s))}));aa.displayName="Button";var la=function(){return la=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},la.apply(this,arguments)};function sa(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function ca(e){return"multiple"===e.mode}function ua(e){return"range"===e.mode}function fa(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var da={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var pa=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ie(e,"LLLL y",t)},formatDay:function(e,t){return Ie(e,"d",t)},formatMonthCaption:function(e,t){return Ie(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ie(e,"cccccc",t)},formatYearCaption:function(e,t){return Ie(e,"yyyy",t)}}),ga=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Ie(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Ie(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ha=o(void 0);function ya(e){var t,r,n,o,i,a=e.initialProps,l=(r=da,n=se,o=new Date,{captionLayout:"buttons",classNames:r,formatters:pa,labels:ga,locale:n,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),s=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=q(n):t&&(i=new Date(t,0,1)),o?a=Y(o):r&&(a=new Date(r,11,31)),{fromDate:i?D(i):void 0,toDate:a?D(a):void 0}}(a),c=s.fromDate,u=s.toDate,f=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===f||c&&u||(f="buttons"),(fa(a)||ca(a)||ua(a))&&(i=a.onSelect);var d=la(la(la({},l),a),{captionLayout:f,classNames:la(la({},l.classNames),a.classNames),components:la({},a.components),formatters:la(la({},l.formatters),a.formatters),fromDate:c,labels:la(la({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:la(la({},l.modifiers),a.modifiers),modifiersClassNames:la(la({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:la(la({},l.styles),a.styles),toDate:u});return Qi.jsx(ha.Provider,{value:d,children:e.children})}function va(){var e=i(ha);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function ma(e){var t=va(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Qi.jsx("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function ba(e){return Qi.jsx("svg",la({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Qi.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function wa(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=va(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ba;return Qi.jsxs("div",{className:l,style:s,children:[Qi.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Qi.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Qi.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Qi.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Oa(e){var t,r=va(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return Qi.jsx(Qi.Fragment,{});if(!o)return Qi.jsx(Qi.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=A(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var d=q(n),p=n.getMonth();p<=o.getMonth();p++)f.push(Ve(d,p));else for(d=q(new Date),p=0;p<=11;p++)f.push(Ve(d,p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:wa;return Qi.jsx(g,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Ve(q(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Qi.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function xa(e){var t,r=e.displayMonth,n=va(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,d=[];if(!o)return Qi.jsx(Qi.Fragment,{});if(!i)return Qi.jsx(Qi.Fragment,{});for(var p=o.getFullYear(),g=i.getFullYear(),h=p;h<=g;h++)d.push(He(X(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:wa;return Qi.jsx(y,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=He(q(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:d.map((function(e){return Qi.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function Ea(){var e=va(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&G(i,o)<0&&(o=T(i,-1*(s-1))),a&&G(o,a)<0&&(o=a),q(o)}(e),r=function(e,t){var r=a(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=q(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var ja=o(void 0);function ka(e){var t=va(),r=Ea(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=q(e),i=G(q(T(o,n)),o),a=[],l=0;l<i;l++){var s=T(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=q(e);if(!r)return T(l,a);if(!(G(r,e)<i))return T(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=q(e);if(!r)return T(a,-i);if(!(G(a,r)<=0))return T(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Fe(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Be(e,r)?o(T(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Qi.jsx(ja.Provider,{value:c,children:e.children})}function Sa(){var e=i(ja);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Pa(e){var t,r=va(),n=r.classNames,o=r.styles,i=r.components,a=Sa().goToMonth,l=function(t){a(T(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:ma,c=Qi.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Qi.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Qi.jsx("div",{className:n.vhidden,children:c}),Qi.jsx(Oa,{onChange:l,displayMonth:e.displayMonth}),Qi.jsx(xa,{onChange:l,displayMonth:e.displayMonth})]})}function Ca(e){return Qi.jsx("svg",la({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Qi.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function za(e){return Qi.jsx("svg",la({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Qi.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Ta=r((function(e,t){var r=va(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=la(la({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Qi.jsx("button",la({},e,{ref:t,type:"button",className:a,style:l}))}));function La(e){var t,r,n=va(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return Qi.jsx(Qi.Fragment,{});var d=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),g=u(e.nextMonth,{locale:i}),h=[a.nav_button,a.nav_button_next].join(" "),y=null!==(t=null==f?void 0:f.IconRight)&&void 0!==t?t:za,v=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:Ca;return Qi.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Qi.jsx(Ta,{name:"previous-month","aria-label":d,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Qi.jsx(y,{className:a.nav_icon,style:l.nav_icon}):Qi.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Qi.jsx(Ta,{name:"next-month","aria-label":g,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Qi.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Qi.jsx(y,{className:a.nav_icon,style:l.nav_icon})})]})}function Na(e){var t=va().numberOfMonths,r=Sa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Fe(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Qi.jsx(La,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function Ra(e){var t,r,n=va(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:ma;return r=i?Qi.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Qi.jsx(Pa,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Pa,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Qi.jsx(Na,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Qi.jsx(Na,{displayMonth:e.displayMonth,id:e.id})]}),Qi.jsx("div",{className:o.caption,style:a.caption,children:r})}function Ma(e){var t=va(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Qi.jsx("tfoot",{className:o,style:n.tfoot,children:Qi.jsx("tr",{children:Qi.jsx("td",{colSpan:8,children:r})})}):Qi.jsx(Qi.Fragment,{})}function Ia(){var e=va(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?M(new Date):R(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=z(n,i);o.push(a)}return o}(o,i,a);return Qi.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Qi.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Qi.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function _a(){var e,t=va(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Ia;return Qi.jsx("thead",{style:n.head,className:r.head,children:Qi.jsx(i,{})})}function Aa(e){var t=va(),r=t.locale,n=t.formatters.formatDay;return Qi.jsx(Qi.Fragment,{children:n(e.date,{locale:r})})}var Da=o(void 0);function Ba(e){if(!ca(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Qi.jsx(Da.Provider,{value:t,children:e.children})}return Qi.jsx(Fa,{initialProps:e.initialProps,children:e.children})}function Fa(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return U(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?sa([],n):[];if(r.selected){var u=c.findIndex((function(t){return U(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return Qi.jsx(Da.Provider,{value:l,children:r})}function Wa(){var e=i(Da);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Va,Ha=o(void 0);function Ua(e){if(!ua(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Qi.jsx(Ha.Provider,{value:t,children:e.children})}return Qi.jsx($a,{initialProps:e.initialProps,children:e.children})}function $a(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],U(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:We(i,l-1),before:z(i,l-1)}),i&&a&&c.disabled.push({after:i,before:z(i,l-1)}),!i&&a&&c.disabled.push({after:We(a,l-1),before:z(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:z(i,1-s)}),c.disabled.push({after:z(i,s-1)})),i&&a){var u=s-(B(a,i)+1);c.disabled.push({before:We(i,u)}),c.disabled.push({after:z(a,u)})}!i&&a&&(c.disabled.push({before:z(a,1-s)}),c.disabled.push({after:z(a,s-1)}))}return Qi.jsx(Ha.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(U(o,e)&&U(n,e))return;if(U(o,e))return{from:o,to:void 0};if(U(n,e))return;return De(n,e)?{from:e,to:o}:{from:n,to:e}}return o?De(e,o)?{from:o,to:e}:{from:e,to:o}:n?Be(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Ga(){var e=i(Ha);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Ya(e){return Array.isArray(e)?sa([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(Va||(Va={}));var qa=Va.Selected,Ka=Va.Disabled,Xa=Va.Hidden,Ja=Va.Today,Za=Va.RangeEnd,Qa=Va.RangeMiddle,el=Va.RangeStart,tl=Va.Outside;var rl=o(void 0);function nl(e){var t=va(),r=function(e,t,r){var n,o=((n={})[qa]=Ya(e.selected),n[Ka]=Ya(e.disabled),n[Xa]=Ya(e.hidden),n[Ja]=[e.today],n[Za]=[],n[Qa]=[],n[el]=[],n[tl]=[],n);return e.fromDate&&o[Ka].push({before:e.fromDate}),e.toDate&&o[Ka].push({after:e.toDate}),ca(e)?o[Ka]=o[Ka].concat(t.modifiers[Ka]):ua(e)&&(o[Ka]=o[Ka].concat(r.modifiers[Ka]),o[el]=r.modifiers[el],o[Qa]=r.modifiers[Qa],o[Za]=r.modifiers[Za]),o}(t,Wa(),Ga()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=Ya(n)})),t}(t.modifiers),o=la(la({},r),n);return Qi.jsx(rl.Provider,{value:o,children:e.children})}function ol(){var e=i(rl);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function il(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if($(t))return U(e,t);if(function(e){return Array.isArray(e)&&e.every($)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(B(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),B(e,n)>=0&&B(o,e)>=0):o?U(o,e):!!n&&U(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=B(t.before,e)>0,n=B(t.after,e)<0;return De(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?B(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?B(t.before,e)>0:"function"==typeof t&&t(e)}))}function al(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return il(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Fe(e,r)&&(o.outside=!0),o}function ll(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,f=o.locale,d={day:z,week:F,month:T,year:W,startOfWeek:function(e){return o.ISOWeek?M(e):R(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?Z(e):J(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?d=V([c,d]):"after"===n&&u&&(d=H([u,d]));var p=!0;if(i){var g=al(d,i);p=!g.disabled&&!g.hidden}return p?d:l.count>365?l.lastFocused:ll(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:la(la({},l),{count:l.count+1})})}var sl=o(void 0);function cl(e){var t=Sa(),r=ol(),n=a(),o=n[0],i=n[1],l=a(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=q(e[0]),i=Y(e[e.length-1]),a=o;a<=i;){var l=al(a,t);if(l.disabled||l.hidden)a=z(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=z(a,1)}}return n||r}(t.displayMonths,r),f=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,d=function(e){i(e)},p=va(),g=function(e,n){if(o){var i=ll(o,{moveBy:e,direction:n,context:p,modifiers:r});U(o,i)||(t.goToDate(i,o),d(i))}},h={focusedDay:o,focusTarget:f,blur:function(){c(o),i(void 0)},focus:d,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return Qi.jsx(sl.Provider,{value:h,children:e.children})}function ul(){var e=i(sl);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var fl=o(void 0);function dl(e){if(!fa(e.initialProps)){var t={selected:void 0};return Qi.jsx(fl.Provider,{value:t,children:e.children})}return Qi.jsx(pl,{initialProps:e.initialProps,children:e.children})}function pl(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return Qi.jsx(fl.Provider,{value:n,children:r})}function gl(){var e=i(fl);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hl(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(Va).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function yl(e,t,r){var n,o,i,a=va(),s=ul(),c=function(e,t){return al(e,ol(),t)}(e,t),u=function(e,t){var r=va(),n=gl(),o=Wa(),i=Ga(),a=ul(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,f=a.blur,d=a.focus,p=a.focusMonthBefore,g=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,v=a.focusStartOfWeek,m=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;fa(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):ca(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):ua(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;d(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;f(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():p();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():g();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),m()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),f=function(){var e=va(),t=gl(),r=Wa(),n=Ga();return fa(e)?t.selected:ca(e)?r.selected:ua(e)?n.selected:void 0}(),d=Boolean(a.onDayClick||"default"!==a.mode);l((function(){var t;c.outside||s.focusedDay&&d&&U(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,d,c.outside]);var p=hl(a,c).join(" "),g=function(e,t){var r=la({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=la(la({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(a,c),h=Boolean(c.outside&&!a.showOutsideDays||c.hidden),y=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Aa,v={style:g,className:p,children:Qi.jsx(y,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&U(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&U(s.focusedDay,e),w=la(la(la({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||m?0:-1,n)),u);return{isButton:d,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:v}}function vl(e){var t=c(null),r=yl(e.date,e.displayMonth,t);return r.isHidden?Qi.jsx("div",{role:"gridcell"}):r.isButton?Qi.jsx(Ta,la({name:"day",ref:t},r.buttonProps)):Qi.jsx("div",la({},r.divProps))}function ml(e){var t=e.number,r=e.dates,n=va(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return Qi.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Qi.jsx(Ta,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function bl(e){var t,r,n,o=va(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:vl,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:ml;return l&&(n=Qi.jsx("td",{className:a.cell,style:i.cell,children:Qi.jsx(u,{number:e.weekNumber,dates:e.dates})})),Qi.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Qi.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Qi.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+C(e)/1e3)}(t))}))]})}function wl(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?Z(t):J(t,r),o=(null==r?void 0:r.ISOWeek)?M(e):R(e,r),i=B(n,o),a=[],l=0;l<=i;l++)a.push(z(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?ce(t):fe(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function Ol(e){var t,r,n,o=va(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,f=o.weekStartsOn,d=o.firstWeekContainsDate,p=o.ISOWeek,g=function(e,t){var r=wl(q(e),Y(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Ae(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=F(i,6-n),l=wl(F(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:p,locale:i,weekStartsOn:f,firstWeekContainsDate:d}),h=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:_a,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:bl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:Ma;return Qi.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Qi.jsx(h,{}),Qi.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Qi.jsx(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Qi.jsx(v,{displayMonth:e.displayMonth})]})}var xl="undefined"!=typeof window&&window.document&&window.document.createElement?s:l,El=!1,jl=0;function kl(){return"react-day-picker-".concat(++jl)}function Sl(e){var t,r,n=va(),o=n.dir,i=n.classNames,s=n.styles,c=n.components,u=Sa().displayMonths,f=function(e){var t,r=null!=e?e:El?kl():null,n=a(r),o=n[0],i=n[1];return xl((function(){null===o&&i(kl())}),[]),l((function(){!1===El&&(El=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,p=[i.month],g=s.month,h=0===e.displayIndex,y=e.displayIndex===u.length-1,v=!h&&!y;"rtl"===o&&(y=(t=[h,y])[0],h=t[1]),h&&(p.push(i.caption_start),g=la(la({},g),s.caption_start)),y&&(p.push(i.caption_end),g=la(la({},g),s.caption_end)),v&&(p.push(i.caption_between),g=la(la({},g),s.caption_between));var m=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:Ra;return Qi.jsxs("div",{className:p.join(" "),style:g,children:[Qi.jsx(m,{id:f,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Qi.jsx(Ol,{id:d,"aria-labelledby":f,displayMonth:e.displayMonth})]},e.displayIndex)}function Pl(e){var t=va(),r=t.classNames,n=t.styles;return Qi.jsx("div",{className:r.months,style:n.months,children:e.children})}function Cl(e){var t,r,n=e.initialProps,o=va(),i=ul(),s=Sa(),c=a(!1),u=c[0],f=c[1];l((function(){o.initialFocus&&i.focusTarget&&(u||(i.focus(i.focusTarget),f(!0)))}),[o.initialFocus,u,i.focus,i.focusTarget,i]);var d=[o.classNames.root,o.className];o.numberOfMonths>1&&d.push(o.classNames.multiple_months),o.showWeekNumber&&d.push(o.classNames.with_weeknumber);var p=la(la({},o.styles.root),o.style),g=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return la(la({},e),((r={})[t]=n[t],r))}),{}),h=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:Pl;return Qi.jsx("div",la({className:d.join(" "),style:p,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},g,{children:Qi.jsx(h,{children:s.displayMonths.map((function(e,t){return Qi.jsx(Sl,{displayIndex:t,displayMonth:e},t)}))})}))}function zl(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return Qi.jsx(ya,{initialProps:r,children:Qi.jsx(ka,{children:Qi.jsx(dl,{initialProps:r,children:Qi.jsx(Ba,{initialProps:r,children:Qi.jsx(Ua,{initialProps:r,children:Qi.jsx(nl,{children:Qi.jsx(cl,{children:t})})})})})})})}function Tl(e){return Qi.jsx(zl,la({},e,{children:Qi.jsx(Cl,{initialProps:e})}))}function Ll(t){var r=t.className,n=t.classNames,o=t.showOutsideDays,i=void 0===o||o,a=O(t,["className","classNames","showOutsideDays"]);return e.createElement(Tl,w({showOutsideDays:i,className:xi("p-3",r),classNames:w({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:xi(ia({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:xi("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===a.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:xi(ia({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},n),components:{IconLeft:function(){return e.createElement(Mi,{className:"h-4 w-4"})},IconRight:function(){return e.createElement(Ii,{className:"h-4 w-4"})}}},a))}function Nl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Rl(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Ml(o,...r)]}function Ml(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Ll.displayName="Calendar";var Il=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?ea:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Qi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function _l(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function Al(t,r=globalThis?.document){const n=_l(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}var Dl,Bl="dismissableLayer.update",Fl="dismissableLayer.pointerDownOutside",Wl="dismissableLayer.focusOutside",Vl=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hl=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Vl),[f,d]=e.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=e.useState({}),h=Ui(r,(e=>d(e))),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(v),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){$l(Fl,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),E=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){$l(Wl,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return Al((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(f)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Dl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ul(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dl)}}),[f,p,n,u]),e.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ul())}),[f,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Bl,e),()=>document.removeEventListener(Bl,e)}),[]),Qi.jsx(Il.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:Nl(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Nl(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Nl(t.onPointerDownCapture,x.onPointerDownCapture)})}));Hl.displayName="DismissableLayer";function Ul(){const e=new CustomEvent(Bl);document.dispatchEvent(e)}function $l(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&v.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Vl),o=e.useRef(null),i=Ui(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Qi.jsx(Il.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Gl=0;function Yl(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ql()),document.body.insertAdjacentElement("beforeend",e[1]??ql()),Gl++,()=>{1===Gl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Gl--}}),[])}function ql(){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 Kl="focusScope.autoFocusOnMount",Xl="focusScope.autoFocusOnUnmount",Jl={bubbles:!1,cancelable:!0},Zl=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=_l(i),f=_l(a),d=e.useRef(null),p=Ui(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:rs(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||rs(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&rs(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),e.useEffect((()=>{if(s){ns.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Kl,Jl);s.addEventListener(Kl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(rs(n,{select:t}),document.activeElement!==r)return}((e=Ql(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&rs(s))}return()=>{s.removeEventListener(Kl,u),setTimeout((()=>{const e=new CustomEvent(Xl,Jl);s.addEventListener(Xl,f),s.dispatchEvent(e),e.defaultPrevented||rs(t??document.body,{select:!0}),s.removeEventListener(Xl,f),ns.remove(g)}),0)}}var e}),[s,u,f,g]);const h=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Ql(e),r=es(t,e),n=es(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&rs(i,{select:!0})):(e.preventDefault(),n&&rs(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Qi.jsx(Il.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Ql(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function es(e,t){for(const r of e)if(!ts(r,{upTo:t}))return r}function ts(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function rs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Zl.displayName="FocusScope";var ns=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=os(e,t),e.unshift(t)},remove(t){e=os(e,t),e[0]?.resume()}}}();function os(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var is=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},as=e["useId".toString()]||(()=>{}),ls=0;function ss(t){const[r,n]=e.useState(as());return is((()=>{n((e=>e??String(ls++)))}),[t]),r?`radix-${r}`:""}const cs=["top","right","bottom","left"],us=Math.min,fs=Math.max,ds=Math.round,ps=Math.floor,gs=e=>({x:e,y:e}),hs={left:"right",right:"left",bottom:"top",top:"bottom"},ys={start:"end",end:"start"};function vs(e,t,r){return fs(e,us(t,r))}function ms(e,t){return"function"==typeof e?e(t):e}function bs(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function Os(e){return"x"===e?"y":"x"}function xs(e){return"y"===e?"height":"width"}function Es(e){return["top","bottom"].includes(bs(e))?"y":"x"}function js(e){return Os(Es(e))}function ks(e){return e.replace(/start|end/g,(e=>ys[e]))}function Ss(e){return e.replace(/left|right|bottom|top/g,(e=>hs[e]))}function Ps(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function zs(e,t,r){let{reference:n,floating:o}=e;const i=Es(t),a=js(t),l=xs(a),s=bs(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(ws(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}async function Ts(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=ms(t,e),g=Ps(p),h=l[d?"floating"===f?"reference":"floating":f],y=Cs(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=Cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:s}):v);return{top:(y.top-w.top+g.top)/b.y,bottom:(w.bottom-y.bottom+g.bottom)/b.y,left:(y.left-w.left+g.left)/b.x,right:(w.right-y.right+g.right)/b.x}}function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ns(e){return cs.some((t=>e[t]>=0))}function Rs(){return"undefined"!=typeof window}function Ms(e){return As(e)?(e.nodeName||"").toLowerCase():"#document"}function Is(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _s(e){var t;return null==(t=(As(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function As(e){return!!Rs()&&(e instanceof Node||e instanceof Is(e).Node)}function Ds(e){return!!Rs()&&(e instanceof Element||e instanceof Is(e).Element)}function Bs(e){return!!Rs()&&(e instanceof HTMLElement||e instanceof Is(e).HTMLElement)}function Fs(e){return!(!Rs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot)}function Ws(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Vs(e){return["table","td","th"].includes(Ms(e))}function Hs(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Us(e){const t=$s(),r=Ds(e)?Ys(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function $s(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Gs(e){return["html","body","#document"].includes(Ms(e))}function Ys(e){return Is(e).getComputedStyle(e)}function qs(e){return Ds(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Fs(e)&&e.host||_s(e);return Fs(t)?t.host:t}function Xs(e){const t=Ks(e);return Gs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&Ws(t)?t:Xs(t)}function Js(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Xs(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=Is(o);if(i){const e=Zs(a);return t.concat(a,a.visualViewport||[],Ws(o)?o:[],e&&r?Js(e):[])}return t.concat(o,Js(o,[],r))}function Zs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Bs(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ds(r)!==i||ds(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function ec(e){return Ds(e)?e:e.contextElement}function tc(e){const t=ec(e);if(!Bs(t))return gs(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Qs(t);let a=(i?ds(r.width):r.width)/n,l=(i?ds(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const rc=gs(0);function nc(e){const t=Is(e);return $s()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:rc}function oc(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=ec(e);let a=gs(1);t&&(n?Ds(n)&&(a=tc(n)):a=tc(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Is(e))&&t}(i,r,n)?nc(i):gs(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=Is(i),t=n&&Ds(n)?Is(n):n;let r=e,o=Zs(r);for(;o&&n&&t!==r;){const e=tc(o),t=o.getBoundingClientRect(),n=Ys(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,r=Is(o),o=Zs(r)}}return Cs({width:u,height:f,x:s,y:c})}function ic(e,t){const r=qs(e).scrollLeft;return t?t.left+r:oc(_s(e)).left+r}function ac(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:ic(e,n)),y:n.top+t.scrollTop}}function lc(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Is(e),n=_s(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=$s();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=_s(e),r=qs(e),n=e.ownerDocument.body,o=fs(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=fs(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+ic(e);const l=-r.scrollTop;return"rtl"===Ys(n).direction&&(a+=fs(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(_s(e));else if(Ds(t))n=function(e,t){const r=oc(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Bs(e)?tc(e):gs(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=nc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Cs(n)}function sc(e,t){const r=Ks(e);return!(r===t||!Ds(r)||Gs(r))&&("fixed"===Ys(r).position||sc(r,t))}function cc(e,t,r){const n=Bs(t),o=_s(t),i="fixed"===r,a=oc(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=gs(0);if(n||!n&&!i)if(("body"!==Ms(t)||Ws(o))&&(l=qs(t)),n){const e=oc(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=ic(o));const c=!o||n||i?gs(0):ac(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function uc(e){return"static"===Ys(e).position}function fc(e,t){if(!Bs(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let r=e.offsetParent;return _s(e)===r&&(r=r.ownerDocument.body),r}function dc(e,t){const r=Is(e);if(Hs(e))return r;if(!Bs(e)){let t=Ks(e);for(;t&&!Gs(t);){if(Ds(t)&&!uc(t))return t;t=Ks(t)}return r}let n=fc(e,t);for(;n&&Vs(n)&&uc(n);)n=fc(n,t);return n&&Gs(n)&&uc(n)&&!Us(n)?r:n||function(e){let t=Ks(e);for(;Bs(t)&&!Gs(t);){if(Us(t))return t;if(Hs(t))return null;t=Ks(t)}return null}(e)||r}const pc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=_s(n),l=!!t&&Hs(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=gs(1);const u=gs(0),f=Bs(n);if((f||!f&&!i)&&(("body"!==Ms(n)||Ws(a))&&(s=qs(n)),Bs(n))){const e=oc(n);c=tc(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const d=!a||f||i?gs(0):ac(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-s.scrollTop*c.y+u.y+d.y}},getDocumentElement:_s,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Hs(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Js(e,[],!1).filter((e=>Ds(e)&&"body"!==Ms(e))),o=null;const i="fixed"===Ys(e).position;let a=i?Ks(e):e;for(;Ds(a)&&!Gs(a);){const t=Ys(a),r=Us(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ws(a)&&!r&&sc(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ks(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=lc(t,r,o);return e.top=fs(n.top,e.top),e.right=us(n.right,e.right),e.bottom=us(n.bottom,e.bottom),e.left=fs(n.left,e.left),e}),lc(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:dc,getElementRects:async function(e){const t=this.getOffsetParent||dc,r=this.getDimensions,n=await r(e.floating);return{reference:cc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Qs(e);return{width:t,height:r}},getScale:tc,isElement:Ds,isRTL:function(e){return"rtl"===Ys(e).direction}};function gc(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=ec(e),u=o||i?[...c?Js(c):[],...Js(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const f=c&&l?function(e,t){let r,n=null;const o=_s(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(l||t(),!f||!d)return;const p={rootMargin:-ps(u)+"px "+-ps(o.clientWidth-(c+f))+"px "+-ps(o.clientHeight-(u+d))+"px "+-ps(c)+"px",threshold:fs(0,us(1,s))||1};let g=!0;function h(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}g=!1}try{n=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(h,p)}n.observe(e)}(!0),i}(c,r):null;let d,p=-1,g=null;a&&(g=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),r()})),c&&!s&&g.observe(c),g.observe(t));let h=s?oc(e):null;return s&&function t(){const n=oc(e);!h||n.x===h.x&&n.y===h.y&&n.width===h.width&&n.height===h.height||r();h=n,d=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==f||f(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(d)}}const hc=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=bs(r),l=ws(r),s="y"===Es(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=ms(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof g&&(p="end"===l?-1*g:g),s?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},yc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=ms(e,t),c={x:r,y:n},u=await Ts(t,s),f=Es(bs(o)),d=Os(f);let p=c[d],g=c[f];if(i){const e="y"===d?"bottom":"right";p=vs(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";g=vs(g+u["y"===f?"top":"left"],g,g-u[e])}const h=l.fn({...t,[d]:p,[f]:g});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[d]:i,[f]:a}}}}}},vc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=ms(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=bs(o),m=Es(l),b=bs(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=d||(b||!h?[Ss(l)]:function(e){const t=Ss(e);return[ks(e),t,ks(t)]}(l)),x="none"!==g;!d&&x&&O.push(...function(e,t,r,n){const o=ws(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(bs(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ks)))),i}(l,h,g,w));const E=[l,...O],j=await Ts(t,y),k=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(j[v]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=ws(e),o=js(e),i=xs(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}(o,a,w);k.push(j[e[0]],j[e[1]])}if(S=[...S,{placement:o,overflows:k}],!k.every((e=>e<=0))){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let r=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!r)switch(p){case"bestFit":{var z;const e=null==(z=S.filter((e=>{if(x){const t=Es(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:z[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},mc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=ms(e,t),u=await Ts(t,c),f=bs(o),d=ws(o),p="y"===Es(o),{width:g,height:h}=i.floating;let y,v;"top"===f||"bottom"===f?(y=f,v=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,y="end"===d?"top":"bottom");const m=h-u.top-u.bottom,b=g-u.left-u.right,w=us(h-u[y],m),O=us(g-u[v],b),x=!t.middlewareData.shift;let E=w,j=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(j=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=m),x&&!d){const e=fs(u.left,0),t=fs(u.right,0),r=fs(u.top,0),n=fs(u.bottom,0);p?j=g-2*(0!==e||0!==t?e+t:fs(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:fs(u.top,u.bottom))}await s({...t,availableWidth:j,availableHeight:E});const k=await a.getDimensions(l.floating);return g!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}},bc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ms(e,t);switch(n){case"referenceHidden":{const e=Ls(await Ts(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ns(e)}}}case"escaped":{const e=Ls(await Ts(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Ns(e)}}}default:return{}}}}},wc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=ms(e,t)||{};if(null==c)return{};const f=Ps(u),d={x:r,y:n},p=js(o),g=xs(p),h=await a.getDimensions(c),y="y"===p,v=y?"top":"left",m=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[p]-d[p]-i.floating[g],O=d[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=x?x[b]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=l.floating[b]||i.floating[g]);const j=w/2-O/2,k=E/2-h[g]/2-1,S=us(f[v],k),P=us(f[m],k),C=S,z=E-h[g]-P,T=E/2-h[g]/2+j,L=vs(C,T,z),N=!s.arrow&&null!=ws(o)&&T!==L&&i.reference[g]/2-(T<C?S:P)-h[g]/2<0,R=N?T<C?T-C:T-z:0;return{[p]:d[p]+R,data:{[p]:L,centerOffset:T-L-R,...N&&{alignmentOffset:R}},reset:N}}}),Oc=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=ms(e,t),u={x:r,y:n},f=Es(o),d=Os(f);let p=u[d],g=u[f];const h=ms(l,t),y="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+y.mainAxis,r=i.reference[d]+i.reference[e]-y.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,m;const e="y"===d?"width":"height",t=["top","left"].includes(bs(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[f])||0)+(t?0:y.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[f])||0)-(t?y.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[d]:p,[f]:g}}}},xc=(e,t,r)=>{const n=new Map,o={platform:pc,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=zs(c,n,s),d=n,p={},g=0;for(let r=0;r<l.length;r++){const{name:i,fn:h}=l[r],{x:y,y:v,data:m,reset:b}=await h({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=v?v:f,p={...p,[i]:{...p[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=zs(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ec="undefined"!=typeof document?s:l;function jc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!jc(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!jc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function kc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sc(e,t){const r=kc(e);return Math.round(t*r)/r}function Pc(t){const r=e.useRef(t);return Ec((()=>{r.current=t})),r}const Cc=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?wc({element:r.current,padding:n}).fn(t):{}:r?wc({element:r,padding:n}).fn(t):{};var o}}),zc=(e,t)=>({...hc(e),options:[e,t]}),Tc=(e,t)=>({...yc(e),options:[e,t]}),Lc=(e,t)=>({...Oc(e),options:[e,t]}),Nc=(e,t)=>({...vc(e),options:[e,t]}),Rc=(e,t)=>({...mc(e),options:[e,t]}),Mc=(e,t)=>({...bc(e),options:[e,t]}),Ic=(e,t)=>({...Cc(e),options:[e,t]});var _c=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Qi.jsx(Il.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Qi.jsx("polygon",{points:"0,0 30,0 15,10"})})}));_c.displayName="Arrow";var Ac=_c;function Dc(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var Bc="Popper",[Fc,Wc]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Dc(o,...r)]}(Bc),[Vc,Hc]=Fc(Bc),Uc=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return Qi.jsx(Vc,{scope:r,anchor:o,onAnchorChange:i,children:n})};Uc.displayName=Bc;var $c="PopperAnchor",Gc=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=Hc($c,n),l=e.useRef(null),s=Ui(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Qi.jsx(Il.div,{...i,ref:s})}));Gc.displayName=$c;var Yc="PopperContent",[qc,Kc]=Fc(Yc),Xc=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:h,...y}=t,m=Hc(Yc,n),[b,w]=e.useState(null),O=Ui(r,(e=>w(e))),[x,E]=e.useState(null),j=function(t){const[r,n]=e.useState(void 0);return is((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}(x),k=j?.width??0,S=j?.height??0,P=o+("center"!==a?"-"+a:""),C="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(eu),altBoundary:T},{refs:N,floatingStyles:R,placement:M,isPositioned:I,middlewareData:_}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[f,d]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,g]=e.useState(o);jc(p,o)||g(o);const[h,y]=e.useState(null),[m,b]=e.useState(null),w=e.useCallback((e=>{e!==j.current&&(j.current=e,y(e))}),[]),O=e.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),x=a||h,E=l||m,j=e.useRef(null),k=e.useRef(null),S=e.useRef(f),P=null!=c,C=Pc(c),z=Pc(i),T=Pc(u),L=e.useCallback((()=>{if(!j.current||!k.current)return;const e={placement:r,strategy:n,middleware:p};z.current&&(e.platform=z.current),xc(j.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};N.current&&!jc(S.current,t)&&(S.current=t,v.flushSync((()=>{d(t)})))}))}),[p,r,n,z,T]);Ec((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);Ec((()=>(N.current=!0,()=>{N.current=!1})),[]),Ec((()=>{if(x&&(j.current=x),E&&(k.current=E),x&&E){if(C.current)return C.current(x,E,L);L()}}),[x,E,L,C,P]);const R=e.useMemo((()=>({reference:j,floating:k,setReference:w,setFloating:O})),[w,O]),M=e.useMemo((()=>({reference:x,floating:E})),[x,E]),I=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=Sc(M.floating,f.x),r=Sc(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...kc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,M.floating,f.x,f.y]);return e.useMemo((()=>({...f,update:L,refs:R,elements:M,floatingStyles:I})),[f,L,R,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>gc(...e,{animationFrame:"always"===g}),elements:{reference:m.anchor},middleware:[zc({mainAxis:i+S,alignmentAxis:l}),c&&Tc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?Lc():void 0,...L}),c&&Nc({...L}),Rc({...L,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&Ic({element:x,padding:s}),tu({arrowWidth:k,arrowHeight:S}),p&&Mc({strategy:"referenceHidden",...L})]}),[A,D]=ru(M),B=_l(h);is((()=>{I&&B?.()}),[I,B]);const F=_.arrow?.x,W=_.arrow?.y,V=0!==_.arrow?.centerOffset,[H,U]=e.useState();return is((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Qi.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Qi.jsx(qc,{scope:n,placedSide:A,onArrowChange:E,arrowX:F,arrowY:W,shouldHideArrow:V,children:Qi.jsx(Il.div,{"data-side":A,"data-align":D,...y,ref:O,style:{...y.style,animation:I?void 0:"none"}})})})}));Xc.displayName=Yc;var Jc="PopperArrow",Zc={top:"bottom",right:"left",bottom:"top",left:"right"},Qc=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Kc(Jc,r),i=Zc[o.placedSide];return Qi.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Qi.jsx(Ac,{...n,ref:t,style:{...n.style,display:"block"}})})}));function eu(e){return null!==e}Qc.displayName=Jc;var tu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=ru(r),u={start:"0%",center:"50%",end:"100%"}[c],f=(o.arrow?.x??0)+a/2,d=(o.arrow?.y??0)+l/2;let p="",g="";return"bottom"===s?(p=i?u:`${f}px`,g=-l+"px"):"top"===s?(p=i?u:`${f}px`,g=`${n.floating.height+l}px`):"right"===s?(p=-l+"px",g=i?u:`${d}px`):"left"===s&&(p=`${n.floating.width+l}px`,g=i?u:`${d}px`),{data:{x:p,y:g}}}});function ru(e){const[t,r="center"]=e.split("-");return[t,r]}var nu=Uc,ou=Gc,iu=Xc,au=Qc,lu=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);is((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?m.createPortal(Qi.jsx(Il.div,{...o,ref:r}),l):null}));lu.displayName="Portal";var su=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=cu(o.current);a.current="mounted"===s?e:"none"}),[s]),is((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=cu(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),is((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=cu(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=cu(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Ui(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function cu(e){return e?.animationName||"none"}function uu({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=_l(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=_l(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}su.displayName="Presence";var fu=new WeakMap,du=new WeakMap,pu={},gu=0,hu=function(e){return e&&(e.host||hu(e.parentNode))},yu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=hu(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);pu[r]||(pu[r]=new WeakMap);var i=pu[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(fu.get(e)||0)+1,c=(i.get(e)||0)+1;fu.set(e,s),i.set(e,c),a.push(e),1===s&&o&&du.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),gu++,function(){a.forEach((function(e){var t=fu.get(e)-1,o=i.get(e)-1;fu.set(e,t),i.set(e,o),t||(du.has(e)||e.removeAttribute(n),du.delete(e)),o||e.removeAttribute(r)})),--gu||(fu=new WeakMap,fu=new WeakMap,du=new WeakMap,pu={})}},vu=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),yu(n,o,r,"aria-hidden")):function(){return null}},mu="right-scroll-bar-position",bu="width-before-scroll-bar";function wu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ou="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,xu=new WeakMap;function Eu(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return wu(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return Ou((function(){var t=xu.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||wu(e,null)})),n.forEach((function(e){r.has(e)||wu(e,o)}))}xu.set(i,e)}),[e]),i}function ju(e){return e}function ku(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=ju);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=w({async:!0,ssr:!1},e),t}var Su=function(t){var r=t.sideCar,n=O(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,w({},n))};function Pu(e,t){return e.useMedium(t),Su}Su.isSideCarExport=!0;var Cu=ku(),zu=function(){},Tu=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:zu,onWheelCapture:zu,onTouchMoveCapture:zu}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=t.gapMode,x=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,j=Eu([n,r]),k=w(w({},x),i);return e.createElement(e.Fragment,null,f&&e.createElement(E,{sideCar:Cu,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),w(w({},k),{ref:j})):e.createElement(m,w({},k,{className:c,ref:j}),s))}));Tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tu.classNames={fullWidth:bu,zeroRight:mu};var Lu=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__};var Nu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ru=function(){var t,r=(t=Nu(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},Mu={left:0,top:0,right:0,gap:0},Iu=function(e){return parseInt(e||"",10)||0},_u=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Mu;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Iu(r),Iu(n),Iu(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Au=Ru(),Du="data-scroll-locked",Bu=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(Du,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(mu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(bu," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(mu," .").concat(mu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(bu," .").concat(bu," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Du,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Fu=function(){var e=parseInt(document.body.getAttribute(Du)||"0",10);return isFinite(e)?e:0},Wu=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Du,(Fu()+1).toString()),function(){var e=Fu()-1;e<=0?document.body.removeAttribute(Du):document.body.setAttribute(Du,e.toString())}}),[]);var a=e.useMemo((function(){return _u(i)}),[i]);return e.createElement(Au,{styles:Bu(a,!r,i,n?"":"!important")})},Vu=!1;if("undefined"!=typeof window)try{var Hu=Object.defineProperty({},"passive",{get:function(){return Vu=!0,!0}});window.addEventListener("test",Hu,Hu),window.removeEventListener("test",Hu,Hu)}catch(e){Vu=!1}var Uu=!!Vu&&{passive:!1},$u=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},Gu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Yu(e,n)){var o=qu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Yu=function(e,t){return"v"===e?function(e){return $u(e,"overflowY")}(t):function(e){return $u(e,"overflowX")}(t)},qu=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Ku=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xu=function(e){return[e.deltaX,e.deltaY]},Ju=function(e){return e&&"current"in e?e.current:e},Zu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qu=0,ef=[];function tf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var rf=Pu(Cu,(function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Qu++)[0],a=e.useState(Ru)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(Ju),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Ku(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=Gu(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=Gu(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=qu(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Yu(e,l)&&(f+=h,d+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(d)<1)&&o||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(ef.length&&ef[ef.length-1]===a){var n="deltaY"in t?Xu(t):Ku(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Ju).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:tf(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Ku(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,Xu(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Ku(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return ef.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Uu),document.addEventListener("touchmove",c,Uu),document.addEventListener("touchstart",f,Uu),function(){ef=ef.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Uu),document.removeEventListener("touchmove",c,Uu),document.removeEventListener("touchstart",f,Uu)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:Zu(i)}):null,g?e.createElement(Wu,{gapMode:t.gapMode}):null)})),nf=e.forwardRef((function(t,r){return e.createElement(Tu,w({},t,{ref:r,sideCar:rf}))}));nf.classNames=Tu.classNames;var of="Popover",[af,lf]=Rl(of,[Wc]),sf=Wc(),[cf,uf]=af(of),ff=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=sf(r),c=e.useRef(null),[u,f]=e.useState(!1),[d=!1,p]=uu({prop:o,defaultProp:i,onChange:a});return Qi.jsx(nu,{...s,children:Qi.jsx(cf,{scope:r,contentId:ss(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>f(!1)),[]),modal:l,children:n})})};ff.displayName=of;var df="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=uf(df,n),a=sf(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),Qi.jsx(ou,{...a,...o,ref:r})})).displayName=df;var pf="PopoverTrigger",gf=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=uf(pf,r),i=sf(r),a=Ui(t,o.triggerRef),l=Qi.jsx(Il.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kf(o.open),...n,ref:a,onClick:Nl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Qi.jsx(ou,{asChild:!0,...i,children:l})}));gf.displayName=pf;var hf="PopoverPortal",[yf,vf]=af(hf,{forceMount:void 0}),mf=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=uf(hf,t);return Qi.jsx(yf,{scope:t,forceMount:r,children:Qi.jsx(su,{present:r||i.open,children:Qi.jsx(lu,{asChild:!0,container:o,children:n})})})};mf.displayName=hf;var bf="PopoverContent",wf=e.forwardRef(((e,t)=>{const r=vf(bf,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=uf(bf,e.__scopePopover);return Qi.jsx(su,{present:n||i.open,children:i.modal?Qi.jsx(Of,{...o,ref:t}):Qi.jsx(xf,{...o,ref:t})})}));wf.displayName=bf;var Of=e.forwardRef(((t,r)=>{const n=uf(bf,t.__scopePopover),o=e.useRef(null),i=Ui(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return vu(e)}),[]),Qi.jsx(nf,{as:ea,allowPinchZoom:!0,children:Qi.jsx(Ef,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nl(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:Nl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:Nl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),xf=e.forwardRef(((t,r)=>{const n=uf(bf,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return Qi.jsx(Ef,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Ef=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...f}=e,d=uf(bf,r),p=sf(r);return Yl(),Qi.jsx(Zl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Qi.jsx(Hl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:Qi.jsx(iu,{"data-state":kf(d.open),role:"dialog",id:d.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),jf="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=uf(jf,r);return Qi.jsx(Il.button,{type:"button",...n,ref:t,onClick:Nl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=jf;function kf(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=sf(r);return Qi.jsx(au,{...o,...n,ref:t})})).displayName="PopoverArrow";var Sf=mf,Pf=wf,Cf=ff,zf=gf,Tf=e.forwardRef((function(t,r){var n=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,l=void 0===a?4:a,s=O(t,["className","align","sideOffset"]);return e.createElement(Sf,null,e.createElement(Pf,w({ref:r,align:i,sideOffset:l,className:xi("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},s)))}));function Lf(e,[t,r]){return Math.min(r,Math.max(t,e))}function Nf(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Tf.displayName=Pf.displayName;var Rf=e.createContext(void 0);var Mf=e.forwardRef(((e,t)=>Qi.jsx(Il.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));Mf.displayName="VisuallyHidden";var If=[" ","Enter","ArrowUp","ArrowDown"],_f=[" ","Enter"],Af="Select",[Df,Bf,Ff]=function(r){const n=r+"CollectionProvider",[o,i]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Nf(o,...r)]}(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:r,children:n}=e,o=t.useRef(null),i=t.useRef(new Map).current;return Qi.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=n;const c=r+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Ui(t,l(c,r).collectionRef);return Qi.jsx(ea,{ref:o,children:n})}));u.displayName=c;const f=r+"CollectionItemSlot",d="data-radix-collection-item",p=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,a=t.useRef(null),s=Ui(r,a),c=l(f,n);return t.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Qi.jsx(ea,{[d]:"",ref:s,children:o})}));return p.displayName=f,[{Provider:s,Slot:u,ItemSlot:p},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(Af),[Wf,Vf]=Rl(Af,[Ff,Wc]),Hf=Wc(),[Uf,$f]=Wf(Af),[Gf,Yf]=Wf(Af),qf=t=>{const{__scopeSelect:r,children:n,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:g,form:h}=t,y=Hf(r),[v,m]=e.useState(null),[b,w]=e.useState(null),[O,x]=e.useState(!1),E=function(t){const r=e.useContext(Rf);return t||r||"ltr"}(u),[j=!1,k]=uu({prop:o,defaultProp:i,onChange:a}),[S,P]=uu({prop:l,defaultProp:s,onChange:c}),C=e.useRef(null),z=!v||(h||!!v.closest("form")),[T,L]=e.useState(new Set),N=Array.from(T).map((e=>e.props.value)).join(";");return Qi.jsx(nu,{...y,children:Qi.jsxs(Uf,{required:g,scope:r,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:ss(),value:S,onValueChange:P,open:j,onOpenChange:k,dir:E,triggerPointerDownPosRef:C,disabled:p,children:[Qi.jsx(Df.Provider,{scope:r,children:Qi.jsx(Gf,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{L((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{L((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:n})}),z?Qi.jsxs(Md,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:d,value:S,onChange:e=>P(e.target.value),disabled:p,form:h,children:[void 0===S?Qi.jsx("option",{value:""}):null,Array.from(T)]},N):null]})})};qf.displayName=Af;var Kf="SelectTrigger",Xf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,disabled:o=!1,...i}=t,a=Hf(n),l=$f(Kf,n),s=l.disabled||o,c=Ui(r,l.onTriggerChange),u=Bf(n),f=e.useRef("touch"),[d,p,g]=Id((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=_d(t,e,r);void 0!==n&&l.onValueChange(n.value)})),h=e=>{s||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return Qi.jsx(ou,{asChild:!0,...a,children:Qi.jsx(Il.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Rd(l.value)?"":void 0,...i,ref:c,onClick:Nl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&h(e)})),onPointerDown:Nl(i.onPointerDown,(e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:Nl(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||If.includes(e.key)&&(h(),e.preventDefault())}))})})}));Xf.displayName=Kf;var Jf="SelectValue",Zf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=$f(Jf,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Ui(t,s.onValueNodeChange);return is((()=>{c(u)}),[c,u]),Qi.jsx(Il.span,{...l,ref:f,style:{pointerEvents:"none"},children:Rd(s.value)?Qi.jsx(Qi.Fragment,{children:a}):i})}));Zf.displayName=Jf;var Qf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Qi.jsx(Il.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Qf.displayName="SelectIcon";var ed=e=>Qi.jsx(lu,{asChild:!0,...e});ed.displayName="SelectPortal";var td="SelectContent",rd=e.forwardRef(((t,r)=>{const n=$f(td,t.__scopeSelect),[o,i]=e.useState();if(is((()=>{i(new DocumentFragment)}),[]),!n.open){const e=o;return e?v.createPortal(Qi.jsx(od,{scope:t.__scopeSelect,children:Qi.jsx(Df.Slot,{scope:t.__scopeSelect,children:Qi.jsx("div",{children:t.children})})}),e):null}return Qi.jsx(ad,{...t,ref:r})}));rd.displayName=td;var nd=10,[od,id]=Wf(td),ad=e.forwardRef(((t,r)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:v,...m}=t,b=$f(td,n),[w,O]=e.useState(null),[x,E]=e.useState(null),j=Ui(r,(e=>O(e))),[k,S]=e.useState(null),[P,C]=e.useState(null),z=Bf(n),[T,L]=e.useState(!1),N=e.useRef(!1);e.useEffect((()=>{if(w)return vu(w)}),[w]),Yl();const R=e.useCallback((e=>{const[t,...r]=z().map((e=>e.ref.current)),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&x&&(x.scrollTop=0),r===n&&x&&(x.scrollTop=x.scrollHeight),r?.focus(),document.activeElement!==o)return}}),[z,x]),M=e.useCallback((()=>R([k,w])),[R,k,w]);e.useEffect((()=>{T&&M()}),[T,M]);const{onOpenChange:I,triggerPointerDownPosRef:_}=b;e.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(_.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():w.contains(r.target)||I(!1),document.removeEventListener("pointermove",t),_.current=null};return null!==_.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}}),[w,I,_]),e.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[A,D]=Id((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=_d(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(N.current=!0))}),[b.value]),F=e.useCallback((()=>w?.focus()),[w]),W=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?sd:ld,H=V===sd?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:v}:{};return Qi.jsx(od,{scope:n,content:w,viewport:x,onViewportChange:E,itemRefCallback:B,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:T,searchRef:A,children:Qi.jsx(nf,{as:ea,allowPinchZoom:!0,children:Qi.jsx(Zl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Nl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Qi.jsx(Hl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Qi.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>L(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:Nl(m.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||D(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));ad.displayName="SelectContentImpl";var ld=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onPlaced:o,...i}=t,a=$f(td,n),l=id(td,n),[s,c]=e.useState(null),[u,f]=e.useState(null),d=Ui(r,(e=>f(e))),p=Bf(n),g=e.useRef(!1),h=e.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=e.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&y&&v&&m){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=m.getBoundingClientRect();if("rtl"!==a.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-nd,f=Lf(i,[nd,Math.max(nd,u-c)]);s.style.minWidth=l+"px",s.style.left=f+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-nd,f=Lf(i,[nd,Math.max(nd,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=p(),l=window.innerHeight-2*nd,c=y.scrollHeight,f=window.getComputedStyle(u),d=parseInt(f.borderTopWidth,10),h=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),w=d+h+c+parseInt(f.paddingBottom,10)+b,O=Math.min(5*v.offsetHeight,w),x=window.getComputedStyle(y),E=parseInt(x.paddingTop,10),j=parseInt(x.paddingBottom,10),k=e.top+e.height/2-nd,S=l-k,P=v.offsetHeight/2,C=d+h+(v.offsetTop+P),z=w-C;if(C<=k){const e=i.length>0&&v===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-y.offsetTop-y.offsetHeight,r=C+Math.max(S,P+(e?j:0)+t+b);s.style.height=r+"px"}else{const e=i.length>0&&v===i[0].ref.current;s.style.top="0px";const t=Math.max(k,d+y.offsetTop+(e?E:0)+P)+z;s.style.height=t+"px",y.scrollTop=C-k+y.offsetTop}s.style.margin=`${nd}px 0`,s.style.minHeight=O+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame((()=>g.current=!0))}}),[p,a.trigger,a.valueNode,s,u,y,v,m,a.dir,o]);is((()=>w()),[w]);const[O,x]=e.useState();is((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=e.useCallback((e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)}),[w,b]);return Qi.jsx(cd,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:Qi.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Qi.jsx(Il.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));ld.displayName="SelectItemAlignedPosition";var sd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=nd,...i}=e,a=Hf(r);return Qi.jsx(iu,{...a,...i,ref:t,align:n,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)"}})}));sd.displayName="SelectPopperPosition";var[cd,ud]=Wf(td,{}),fd="SelectViewport",dd=e.forwardRef(((t,r)=>{const{__scopeSelect:n,nonce:o,...i}=t,a=id(fd,n),l=ud(fd,n),s=Ui(r,a.onViewportChange),c=e.useRef(0);return Qi.jsxs(Qi.Fragment,{children:[Qi.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:o}),Qi.jsx(Df.Slot,{scope:n,children:Qi.jsx(Il.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Nl(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=l;if(n?.current&&r){const e=Math.abs(c.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*nd,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));dd.displayName=fd;var pd="SelectGroup",[gd,hd]=Wf(pd);e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=ss();return Qi.jsx(gd,{scope:r,id:o,children:Qi.jsx(Il.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=pd;var yd="SelectLabel",vd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=hd(yd,r);return Qi.jsx(Il.div,{id:o.id,...n,ref:t})}));vd.displayName=yd;var md="SelectItem",[bd,wd]=Wf(md),Od=e.forwardRef(((t,r)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...l}=t,s=$f(md,n),c=id(md,n),u=s.value===o,[f,d]=e.useState(a??""),[p,g]=e.useState(!1),h=Ui(r,(e=>c.itemRefCallback?.(e,o,i))),y=ss(),v=e.useRef("touch"),m=()=>{i||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)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 Qi.jsx(bd,{scope:n,value:o,disabled:i,textId:y,isSelected:u,onItemTextChange:e.useCallback((e=>{d((t=>t||(e?.textContent??"").trim()))}),[]),children:Qi.jsx(Df.ItemSlot,{scope:n,value:o,disabled:i,textValue:f,children:Qi.jsx(Il.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:h,onFocus:Nl(l.onFocus,(()=>g(!0))),onBlur:Nl(l.onBlur,(()=>g(!1))),onClick:Nl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:Nl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:Nl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Nl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Nl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Nl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(_f.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));Od.displayName=md;var xd="SelectItemText",Ed=e.forwardRef(((t,r)=>{const{__scopeSelect:n,className:o,style:i,...a}=t,l=$f(xd,n),s=id(xd,n),c=wd(xd,n),u=Yf(xd,n),[f,d]=e.useState(null),p=Ui(r,(e=>d(e)),c.onItemTextChange,(e=>s.itemTextRefCallback?.(e,c.value,c.disabled))),g=f?.textContent,h=e.useMemo((()=>Qi.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value)),[c.disabled,c.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=u;return is((()=>(y(h),()=>m(h))),[y,m,h]),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Il.span,{id:c.textId,...a,ref:p}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?v.createPortal(a.children,l.valueNode):null]})}));Ed.displayName=xd;var jd="SelectItemIndicator",kd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return wd(jd,r).isSelected?Qi.jsx(Il.span,{"aria-hidden":!0,...n,ref:t}):null}));kd.displayName=jd;var Sd="SelectScrollUpButton",Pd=e.forwardRef(((t,r)=>{const n=id(Sd,t.__scopeSelect),o=ud(Sd,t.__scopeSelect),[i,a]=e.useState(!1),l=Ui(r,o.onScrollButtonChange);return is((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Qi.jsx(Td,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Pd.displayName=Sd;var Cd="SelectScrollDownButton",zd=e.forwardRef(((t,r)=>{const n=id(Cd,t.__scopeSelect),o=ud(Cd,t.__scopeSelect),[i,a]=e.useState(!1),l=Ui(r,o.onScrollButtonChange);return is((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Qi.jsx(Td,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));zd.displayName=Cd;var Td=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=t,a=id("SelectScrollButton",n),l=e.useRef(null),s=Bf(n),c=e.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),is((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Qi.jsx(Il.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:Nl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:Nl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:Nl(i.onPointerLeave,(()=>{c()}))})})),Ld=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Qi.jsx(Il.div,{"aria-hidden":!0,...n,ref:t})}));Ld.displayName="SelectSeparator";var Nd="SelectArrow";function Rd(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Hf(r),i=$f(Nd,r),a=id(Nd,r);return i.open&&"popper"===a.position?Qi.jsx(au,{...o,...n,ref:t}):null})).displayName=Nd;var Md=e.forwardRef(((t,r)=>{const{value:n,...o}=t,i=e.useRef(null),a=Ui(r,i),l=function(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}(n);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),Qi.jsx(Mf,{asChild:!0,children:Qi.jsx("select",{...o,ref:a,defaultValue:n})})}));function Id(t){const r=_l(t),n=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=n.current+e;r(t),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[r]),a=e.useCallback((()=>{n.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[n,i,a]}function _d(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===n.length&&(i=i.filter((e=>e!==r)));const s=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return s!==r?s:void 0}Md.displayName="BubbleSelect";var Ad=Xf,Dd=Qf,Bd=ed,Fd=rd,Wd=dd,Vd=vd,Hd=Od,Ud=Ed,$d=kd,Gd=Pd,Yd=zd,qd=Ld,Kd=qf,Xd=Zf,Jd=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(Ad,w({ref:r,className:xi("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n)},i),o,e.createElement(Dd,{asChild:!0},e.createElement(Ri,{className:"h-4 w-4 opacity-50"})))}));Jd.displayName=Ad.displayName;var Zd=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Gd,w({ref:r,className:xi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(_i,{className:"h-4 w-4"}))}));Zd.displayName=Gd.displayName;var Qd=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Yd,w({ref:r,className:xi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(Ri,{className:"h-4 w-4"}))}));Qd.displayName=Yd.displayName;var ep=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,l=O(t,["className","children","position"]);return e.createElement(Bd,null,e.createElement(Fd,w({ref:r,className:xi("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a},l),e.createElement(Zd,null),e.createElement(Wd,{className:xi("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),e.createElement(Qd,null)))}));ep.displayName=Fd.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Vd,w({ref:r,className:xi("px-2 py-1.5 text-sm font-semibold",n)},o))})).displayName=Vd.displayName;var tp=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(Hd,w({ref:r,className:xi("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},i),e.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement($d,null,e.createElement(Ni,{className:"h-4 w-4"}))),e.createElement(Ud,null,o))}));function rp(t){var r=t.className,n=t.dateFrom,o=t.dateTo,i=t.handleDateChange,a=e.useState({from:n||new Date(2022,0,20),to:o||z(new Date(2022,0,20),20)}),l=a[0],s=a[1],c=[{label:"Hier",getValue:function(){var e=new Date;return e.setDate(e.getDate()-1),{from:e,to:e}}},{label:"Cette semaine",getValue:function(){var e=new Date;return{from:R(e),to:J(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:q(e),to:Y(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return T(e,-t,r)}(new Date,1);return{from:q(e),to:Y(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:X(e),to:K(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return W(e,-t,r)}(new Date,1);return{from:X(e),to:K(e)}}}];return e.createElement("div",{className:xi("grid gap-2",r)},e.createElement(Cf,null,e.createElement(zf,{asChild:!0},e.createElement(aa,{id:"date",variant:"outline",className:xi("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},e.createElement(Li,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?e.createElement(e.Fragment,null,Ie(l.from,"LLL dd, y")," -"," ",Ie(l.to,"LLL dd, y")):Ie(l.from,"LLL dd, y"):e.createElement("span",null,"Choisissez une date"))),e.createElement(Tf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},e.createElement(Kd,{onValueChange:function(e){var t=c.find((function(t){return t.label===e}));if(t){var r=t.getValue();s(r),null==i||i(r)}}},e.createElement(Jd,{className:"w-[300px]"},e.createElement(Xd,{placeholder:"Sélectionnez un préréglage"})),e.createElement(ep,{position:"popper"},c.map((function(t){return e.createElement(tp,{key:t.label,value:t.label},t.label)})))),e.createElement("div",{className:"rounded-md border"},e.createElement(Ll,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}tp.displayName=Hd.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(qd,w({ref:r,className:xi("-mx-1 my-1 h-px bg-muted",n)},o))})).displayName=qd.displayName;var np=e.forwardRef((function(t,r){var n=t.className,o=t.type,i=O(t,["className","type"]);return e.createElement("input",w({type:o,className:xi("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r},i))}));np.displayName="Input";var op=.999,ip=/[\\\/_+.#"@\[\(\{&]/,ap=/[\\\/_+.#"@\[\(\{&]/g,lp=/[\s-]/,sp=/[\s-]/g;function cp(e,t,r,n,o,i,a){if(i===t.length)return o===e.length?1:.99;var l=`${o},${i}`;if(void 0!==a[l])return a[l];for(var s,c,u,f,d=n.charAt(i),p=r.indexOf(d,o),g=0;p>=0;)(s=cp(e,t,r,n,p+1,i+1,a))>g&&(p===o?s*=1:ip.test(e.charAt(p-1))?(s*=.8,(u=e.slice(o,p-1).match(ap))&&o>0&&(s*=Math.pow(op,u.length))):lp.test(e.charAt(p-1))?(s*=.9,(f=e.slice(o,p-1).match(sp))&&o>0&&(s*=Math.pow(op,f.length))):(s*=.17,o>0&&(s*=Math.pow(op,p-o))),e.charAt(p)!==t.charAt(i)&&(s*=.9999)),(s<.1&&r.charAt(p-1)===n.charAt(i+1)||n.charAt(i+1)===n.charAt(i)&&r.charAt(p-1)!==n.charAt(i))&&(.1*(c=cp(e,t,r,n,p+1,i+2,a))>s&&(s=.1*c)),s>g&&(g=s),p=r.indexOf(d,p+1);return a[l]=g,g}function up(e){return e.toLowerCase().replace(sp," ")}function fp(e,t,r){return cp(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,up(e),up(t),0,0,{})}function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dp.apply(null,arguments)}function pp(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function gp(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function hp(...e){return u(gp(...e),e)}function yp(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return f((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}const vp=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s:()=>{},mp=e["useId".toString()]||(()=>{});let bp=0;function wp(t){const[r,n]=e.useState(mp());return vp((()=>{t||n((e=>null!=e?e:String(bp++)))}),[t]),t||(r?`radix-${r}`:"")}function Op(e){const t=c(e);return l((()=>{t.current=e})),f((()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}function xp({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=function({defaultProp:e,onChange:t}){const r=a(e),[n]=r,o=c(n),i=Op(t);return l((()=>{o.current!==n&&(i(n),o.current=n)}),[n,o,i]),r}({defaultProp:t,onChange:r}),i=void 0!==e,s=i?e:n,f=Op(r);return[s,u((t=>{if(i){const r="function"==typeof t?t(e):t;r!==e&&f(r)}else o(t)}),[i,e,o,f])]}const Ep=r(((e,t)=>{const{children:r,...o}=e,i=d.toArray(r),a=i.find(Sp);if(a){const e=a.props.children,r=i.map((t=>t===a?d.count(e)>1?d.only(null):p(e)?e.props.children:null:t));return n(jp,dp({},o,{ref:t}),p(e)?g(e,void 0,r):null)}return n(jp,dp({},o,{ref:t}),r)}));Ep.displayName="Slot";const jp=r(((e,t)=>{const{children:r,...n}=e;return p(r)?g(r,{...Pp(n,r.props),ref:t?gp(t,r.ref):r.ref}):d.count(r)>1?d.only(null):null}));jp.displayName="SlotClone";const kp=({children:e})=>n(h,null,e);function Sp(e){return p(e)&&e.type===kp}function Pp(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const o=r(((e,r)=>{const{asChild:o,...i}=e,a=o?Ep:t;return l((()=>{window[Symbol.for("radix-ui")]=!0}),[]),n(a,dp({},i,{ref:r}))}));return o.displayName=`Primitive.${t}`,{...e,[t]:o}}),{});const zp="dismissableLayer.update",Tp="dismissableLayer.pointerDownOutside",Lp="dismissableLayer.focusOutside";let Np;const Rp=o({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mp=r(((e,t)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p,...g}=e,h=i(Rp),[y,v]=a(null),m=null!==(r=null==y?void 0:y.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,b]=a({}),w=hp(t,(e=>v(e))),O=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=O.indexOf(x),j=y?O.indexOf(y):-1,k=h.layersWithOutsidePointerEventsDisabled.size>0,S=j>=E,P=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e),n=c(!1),o=c((()=>{}));return l((()=>{const e=e=>{if(e.target&&!n.current){const i={originalEvent:e};function a(){_p(Tp,r,i,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...h.branches].some((e=>e.contains(t)));S&&!r&&(null==u||u(e),null==d||d(e),e.defaultPrevented||null==p||p())}),m),C=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e),n=c(!1);return l((()=>{const e=e=>{if(e.target&&!n.current){_p(Lp,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...h.branches].some((e=>e.contains(t)))||(null==f||f(e),null==d||d(e),e.defaultPrevented||null==p||p())}),m);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e);l((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[r,t])}((e=>{j===h.layers.size-1&&(null==s||s(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))}),m),l((()=>{if(y)return o&&(0===h.layersWithOutsidePointerEventsDisabled.size&&(Np=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(y)),h.layers.add(y),Ip(),()=>{o&&1===h.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Np)}}),[y,m,o,h]),l((()=>()=>{y&&(h.layers.delete(y),h.layersWithOutsidePointerEventsDisabled.delete(y),Ip())}),[y,h]),l((()=>{const e=()=>b({});return document.addEventListener(zp,e),()=>document.removeEventListener(zp,e)}),[]),n(Cp.div,dp({},g,{ref:w,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:pp(e.onFocusCapture,C.onFocusCapture),onBlurCapture:pp(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:pp(e.onPointerDownCapture,P.onPointerDownCapture)}))}));function Ip(){const e=new CustomEvent(zp);document.dispatchEvent(e)}function _p(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&b((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}const Ap="focusScope.autoFocusOnMount",Dp="focusScope.autoFocusOnUnmount",Bp={bubbles:!1,cancelable:!0},Fp=r(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...f}=e,[d,p]=a(null),g=Op(i),h=Op(s),y=c(null),v=hp(t,(e=>p(e))),m=c({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l((()=>{if(o){function e(e){if(m.paused||!d)return;const t=e.target;d.contains(t)?y.current=t:Up(y.current,{select:!0})}function t(e){if(m.paused||!d)return;const t=e.relatedTarget;null!==t&&(d.contains(t)||Up(y.current,{select:!0}))}function r(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Up(d)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return d&&n.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,d,m.paused]),l((()=>{if(d){$p.add(m);const t=document.activeElement;if(!d.contains(t)){const r=new CustomEvent(Ap,Bp);d.addEventListener(Ap,g),d.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Up(n,{select:t}),document.activeElement!==r)return}((e=Wp(d),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Up(d))}return()=>{d.removeEventListener(Ap,g),setTimeout((()=>{const e=new CustomEvent(Dp,Bp);d.addEventListener(Dp,h),d.dispatchEvent(e),e.defaultPrevented||Up(null!=t?t:document.body,{select:!0}),d.removeEventListener(Dp,h),$p.remove(m)}),0)}}var e}),[d,g,h,m]);const b=u((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Wp(e),r=Vp(t,e),n=Vp(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Up(i,{select:!0})):(e.preventDefault(),r&&Up(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return n(Cp.div,dp({tabIndex:-1},f,{ref:v,onKeyDown:b}))}));function Wp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Vp(e,t){for(const r of e)if(!Hp(r,{upTo:t}))return r}function Hp(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Up(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const $p=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Gp(e,t),e.unshift(t)},remove(t){var r;e=Gp(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Gp(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Yp=r(((e,t)=>{var r;const{container:o=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...i}=e;return o?m.createPortal(n(Cp.div,dp({},i,{ref:t})),o):null}));const qp=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=a(),n=c({}),o=c(e),i=c("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return y(((e,r)=>{const n=t[e][r];return null!=n?n:e}),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l((()=>{const e=Kp(n.current);i.current="mounted"===f?e:"none"}),[f]),vp((()=>{const t=n.current,r=o.current;if(r!==e){const n=i.current,a=Kp(t);if(e)d("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))d("UNMOUNT");else{d(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,d]),vp((()=>{if(t){const e=e=>{const r=Kp(n.current).includes(e.animationName);e.target===t&&r&&b((()=>d("ANIMATION_END")))},r=e=>{e.target===t&&(i.current=Kp(n.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")}),[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:u((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),o="function"==typeof r?r({present:n.isPresent}):d.only(r),i=hp(n.ref,o.ref);return"function"==typeof r||n.isPresent?g(o,{ref:i}):null};function Kp(e){return(null==e?void 0:e.animationName)||"none"}qp.displayName="Presence";let Xp=0;function Jp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Zp="right-scroll-bar-position",Qp="width-before-scroll-bar",eg=ku(),tg=function(){},rg=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:tg,onWheelCapture:tg,onTouchMoveCapture:tg}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,E=Eu([n,r]),j=w(w({},b),i);return e.createElement(e.Fragment,null,f&&e.createElement(x,{sideCar:eg,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n}),l?e.cloneElement(e.Children.only(s),w(w({},j),{ref:E})):e.createElement(m,w({},j,{className:c,ref:E}),s))}));rg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rg.classNames={fullWidth:Qp,zeroRight:Zp};var ng,og,ig=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ag={left:0,top:0,right:0,gap:0},lg=function(e){return parseInt(e||"",10)||0},sg=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ag;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[lg(r),lg(n),lg(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cg=(ng=ig(),og=function(t,r){e.useEffect((function(){return ng.add(t),function(){ng.remove()}}),[t&&r])},function(e){var t=e.styles,r=e.dynamic;return og(t,r),null}),ug="data-scroll-locked",fg=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(ug,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Zp," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Qp," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Zp," .").concat(Zp," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Qp," .").concat(Qp," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ug,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},dg=function(){var e=parseInt(document.body.getAttribute(ug)||"0",10);return isFinite(e)?e:0},pg=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(ug,(dg()+1).toString()),function(){var e=dg()-1;e<=0?document.body.removeAttribute(ug):document.body.setAttribute(ug,e.toString())}}),[]);var a=e.useMemo((function(){return sg(i)}),[i]);return e.createElement(cg,{styles:fg(a,!r,i,n?"":"!important")})},gg=!1;if("undefined"!=typeof window)try{var hg=Object.defineProperty({},"passive",{get:function(){return gg=!0,!0}});window.addEventListener("test",hg,hg),window.removeEventListener("test",hg,hg)}catch(e){gg=!1}var yg=!!gg&&{passive:!1},vg=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},mg=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),bg(e,r)){var n=wg(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bg=function(e,t){return"v"===e?function(e){return vg(e,"overflowY")}(t):function(e){return vg(e,"overflowX")}(t)},wg=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Og=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xg=function(e){return[e.deltaX,e.deltaY]},Eg=function(e){return e&&"current"in e?e.current:e},jg=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},kg=0,Sg=[];var Pg=Pu(eg,(function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(kg++)[0],a=e.useState((function(){return Ru()}))[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(Eg),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var r,i=Og(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=mg(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=mg(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=wg(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&bg(e,l)&&(f+=h,d+=g),l=l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(!u||0!==f&&o)&&(u||0!==d&&o)||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Sg.length&&Sg[Sg.length-1]===a){var n="deltaY"in t?xg(t):Og(t),o=r.current.filter((function(e){return e.name===t.type&&e.target===t.target&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Eg).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Og(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,xg(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Og(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Sg.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,yg),document.addEventListener("touchmove",c,yg),document.addEventListener("touchstart",f,yg),function(){Sg=Sg.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,yg),document.removeEventListener("touchmove",c,yg),document.removeEventListener("touchstart",f,yg)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:jg(i)}):null,g?e.createElement(pg,{gapMode:"margin"}):null)})),Cg=e.forwardRef((function(t,r){return e.createElement(rg,w({},t,{ref:r,sideCar:Pg}))}));Cg.classNames=rg.classNames;const zg="Dialog",[Tg,Lg]=function(e,t=[]){let r=[];const a=()=>{const t=r.map((e=>o(e)));return function(r){const n=(null==r?void 0:r[e])||t;return f((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(t,a){const l=o(a),s=r.length;function c(t){const{scope:r,children:o,...i}=t,a=(null==r?void 0:r[e][s])||l,c=f((()=>i),Object.values(i));return n(a.Provider,{value:c},o)}return r=[...r,a],c.displayName=t+"Provider",[c,function(r,n){const o=(null==n?void 0:n[e][s])||l,c=i(o);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},yp(a,...t)]}(zg),[Ng,Rg]=Tg(zg),Mg="DialogPortal",[Ig,_g]=Tg(Mg,{forceMount:void 0}),Ag="DialogOverlay",Dg=r(((e,t)=>{const r=_g(Ag,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=Rg(Ag,e.__scopeDialog);return a.modal?n(qp,{present:o||a.open},n(Bg,dp({},i,{ref:t}))):null})),Bg=r(((e,t)=>{const{__scopeDialog:r,...o}=e,i=Rg(Ag,r);return n(Cg,{as:Ep,allowPinchZoom:!0,shards:[i.contentRef]},n(Cp.div,dp({"data-state":$g(i.open)},o,{ref:t,style:{pointerEvents:"auto",...o.style}})))})),Fg="DialogContent",Wg=r(((e,t)=>{const r=_g(Fg,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=Rg(Fg,e.__scopeDialog);return n(qp,{present:o||a.open},a.modal?n(Vg,dp({},i,{ref:t})):n(Hg,dp({},i,{ref:t})))})),Vg=r(((e,t)=>{const r=Rg(Fg,e.__scopeDialog),o=c(null),i=hp(t,r.contentRef,o);return l((()=>{const e=o.current;if(e)return vu(e)}),[]),n(Ug,dp({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pp(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:pp(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:pp(e.onFocusOutside,(e=>e.preventDefault()))}))})),Hg=r(((e,t)=>{const r=Rg(Fg,e.__scopeDialog),o=c(!1),i=c(!1);return n(Ug,dp({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,a;(null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented)||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());o.current=!1,i.current=!1},onInteractOutside:t=>{var n,a;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const l=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))})),Ug=r(((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=Rg(Fg,r),f=hp(t,c(null));return l((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:Jp()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:Jp()),Xp++,()=>{1===Xp&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Xp--}}),[]),n(h,null,n(Fp,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},n(Mp,dp({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":$g(u.open)},s,{ref:f,onDismiss:()=>u.onOpenChange(!1)}))),!1)}));function $g(e){return e?"open":"closed"}const Gg=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,s=c(null),f=c(null),[d=!1,p]=xp({prop:o,defaultProp:i,onChange:a});return n(Ng,{scope:t,triggerRef:s,contentRef:f,contentId:wp(),titleId:wp(),descriptionId:wp(),open:d,onOpenChange:p,onOpenToggle:u((()=>p((e=>!e))),[p]),modal:l},r)},Yg=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:i}=e,a=Rg(Mg,t);return n(Ig,{scope:t,forceMount:r},d.map(o,(e=>n(qp,{present:r||a.open},n(Yp,{asChild:!0,container:i},e)))))},qg=Dg,Kg=Wg;var Xg='[cmdk-group=""]',Jg='[cmdk-group-items=""]',Zg='[cmdk-item=""]',Qg=`${Zg}:not([aria-disabled="true"])`,eh="cmdk-item-select",th="data-value",rh=(e,t,r)=>fp(e,t,r),nh=e.createContext(void 0),oh=()=>e.useContext(nh),ih=e.createContext(void 0),ah=()=>e.useContext(ih),lh=e.createContext(void 0),sh=e.forwardRef(((t,r)=>{let n=xh((()=>{var e,r;return{search:"",value:null!=(r=null!=(e=t.value)?e:t.defaultValue)?r:"",filtered:{count:0,items:new Map,groups:new Set}}})),o=xh((()=>new Set)),i=xh((()=>new Map)),a=xh((()=>new Map)),l=xh((()=>new Set)),s=wh(t),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:g,loop:h,disablePointerSelection:y=!1,vimBindings:v=!0,...m}=t,b=e.useId(),w=e.useId(),O=e.useId(),x=e.useRef(null),E=Sh();Oh((()=>{if(void 0!==f){let e=f.trim();n.current.value=e,j.emit()}}),[f]),Oh((()=>{E(6,T)}),[]);let j=e.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)z(),P(),E(1,C);else if("value"===e&&(r||E(5,T),void 0!==(null==(o=s.current)?void 0:o.value))){let e=null!=t?t:"";return void(null==(a=(i=s.current).onValueChange)||a.call(i,e))}j.emit()}},emit:()=>{l.current.forEach((e=>e()))}})),[]),k=e.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,S(t,r)),E(2,(()=>{P(),j.emit()})))},item:(e,t)=>(o.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),E(3,(()=>{z(),P(),n.current.value||C(),j.emit()})),()=>{a.current.delete(e),o.current.delete(e),n.current.filtered.items.delete(e);let t=L();E(4,(()=>{z(),(null==t?void 0:t.getAttribute("id"))===e&&C(),j.emit()}))}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||t["aria-label"],disablePointerSelection:y,listId:b,inputId:O,labelId:w,listInnerRef:x})),[]);function S(e,t){var r,o;let i=null!=(o=null==(r=s.current)?void 0:r.filter)?o:rh;return e?i(e,n.current.search,t):0}function P(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((r=>{let n=i.current.get(r),o=0;n.forEach((t=>{let r=e.get(t);o=Math.max(r,o)})),t.push([r,o])}));let r=x.current;N().sort(((t,r)=>{var n,o;let i=t.getAttribute("id"),a=r.getAttribute("id");return(null!=(n=e.get(a))?n:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(Jg);t?t.appendChild(e.parentElement===t?e:e.closest(`${Jg} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Jg} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Xg}[${th}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=N().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(th);j.setState("value",t||void 0)}function z(){var e,t,r,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=o.current.size);n.current.filtered.groups=new Set;let c=0;for(let i of o.current){let o=S(null!=(t=null==(e=a.current.get(i))?void 0:e.value)?t:"",null!=(l=null==(r=a.current.get(i))?void 0:r.keywords)?l:[]);n.current.filtered.items.set(i,o),o>0&&c++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=c}function T(){var e,t,r;let n=L();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Xg))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function L(){var e;return null==(e=x.current)?void 0:e.querySelector(`${Zg}[aria-selected="true"]`)}function N(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(Qg))}function R(e){let t=N()[e];t&&j.setState("value",t.getAttribute(th))}function M(e){var t;let r=L(),n=N(),o=n.findIndex((e=>e===r)),i=n[o+e];null!=(t=s.current)&&t.loop&&(i=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),i&&j.setState("value",i.getAttribute(th))}function I(e){let t,r=L(),n=null==r?void 0:r.closest(Xg);for(;n&&!t;)n=e>0?mh(n,Xg):bh(n,Xg),t=null==n?void 0:n.querySelector(Qg);t?j.setState("value",t.getAttribute(th)):M(e)}let _=()=>R(N().length-1),A=e=>{e.preventDefault(),e.metaKey?_():e.altKey?I(1):M(1)},D=e=>{e.preventDefault(),e.metaKey?R(0):e.altKey?I(-1):M(-1)};return e.createElement(Cp.div,{ref:r,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=m.onKeyDown)||t.call(m,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&A(e);break;case"ArrowDown":A(e);break;case"p":case"k":v&&e.ctrlKey&&D(e);break;case"ArrowUp":D(e);break;case"Home":e.preventDefault(),R(0);break;case"End":e.preventDefault(),_();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=L();if(t){let e=new Event(eh);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Ch},c),Ph(t,(t=>e.createElement(ih.Provider,{value:j},e.createElement(nh.Provider,{value:k},t)))))})),ch=e.forwardRef(((t,r)=>{var n,o;let i=e.useId(),a=e.useRef(null),l=e.useContext(lh),s=oh(),c=wh(t),u=null!=(o=null==(n=c.current)?void 0:n.forceMount)?o:null==l?void 0:l.forceMount;Oh((()=>{if(!u)return s.item(i,null==l?void 0:l.id)}),[u]);let f=kh(i,a,[t.value,t.children,a],t.keywords),d=ah(),p=jh((e=>e.value&&e.value===f.current)),g=jh((e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(i)>0)));function h(){var e,t;y(),null==(t=(e=c.current).onSelect)||t.call(e,f.current)}function y(){d.setState("value",f.current,!0)}if(e.useEffect((()=>{let e=a.current;if(e&&!t.disabled)return e.addEventListener(eh,h),()=>e.removeEventListener(eh,h)}),[g,t.onSelect,t.disabled]),!g)return null;let{disabled:v,value:m,onSelect:b,forceMount:w,keywords:O,...x}=t;return e.createElement(Cp.div,{ref:Eh([a,r]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.disablePointerSelection?void 0:y,onClick:v?void 0:h},t.children)})),uh=e.forwardRef(((t,r)=>{let{heading:n,children:o,forceMount:i,...a}=t,l=e.useId(),s=e.useRef(null),c=e.useRef(null),u=e.useId(),f=oh(),d=jh((e=>!(!i&&!1!==f.filter())||(!e.search||e.filtered.groups.has(l))));Oh((()=>f.group(l)),[]),kh(l,s,[t.value,t.heading,c]);let p=e.useMemo((()=>({id:l,forceMount:i})),[i]);return e.createElement(Cp.div,{ref:Eh([s,r]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&e.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Ph(t,(t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},e.createElement(lh.Provider,{value:p},t)))))})),fh=e.forwardRef(((t,r)=>{let{alwaysRender:n,...o}=t,i=e.useRef(null),a=jh((e=>!e.search));return n||a?e.createElement(Cp.div,{ref:Eh([i,r]),...o,"cmdk-separator":"",role:"separator"}):null})),dh=e.forwardRef(((t,r)=>{let{onValueChange:n,...o}=t,i=null!=t.value,a=ah(),l=jh((e=>e.search)),s=jh((e=>e.value)),c=oh(),u=e.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${Zg}[${th}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return e.useEffect((()=>{null!=t.value&&a.setState("search",t.value)}),[t.value]),e.createElement(Cp.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":u,id:c.inputId,type:"text",value:i?t.value:l,onChange:e=>{i||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),ph=e.forwardRef(((t,r)=>{let{children:n,label:o="Suggestions",...i}=t,a=e.useRef(null),l=e.useRef(null),s=oh();return e.useEffect((()=>{if(l.current&&a.current){let e,t=l.current,r=a.current,n=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}}),[]),e.createElement(Cp.div,{ref:Eh([a,r]),...i,"cmdk-list":"",role:"listbox","aria-label":o,id:s.listId},Ph(t,(t=>e.createElement("div",{ref:Eh([l,s.listInnerRef]),"cmdk-list-sizer":""},t))))})),gh=e.forwardRef(((t,r)=>{let{open:n,onOpenChange:o,overlayClassName:i,contentClassName:a,container:l,...s}=t;return e.createElement(Gg,{open:n,onOpenChange:o},e.createElement(Yg,{container:l},e.createElement(qg,{"cmdk-overlay":"",className:i}),e.createElement(Kg,{"aria-label":t.label,"cmdk-dialog":"",className:a},e.createElement(sh,{ref:r,...s}))))})),hh=e.forwardRef(((t,r)=>jh((e=>0===e.filtered.count))?e.createElement(Cp.div,{ref:r,...t,"cmdk-empty":"",role:"presentation"}):null)),yh=e.forwardRef(((t,r)=>{let{progress:n,children:o,label:i="Loading...",...a}=t;return e.createElement(Cp.div,{ref:r,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Ph(t,(t=>e.createElement("div",{"aria-hidden":!0},t))))})),vh=Object.assign(sh,{List:ph,Item:ch,Input:dh,Group:uh,Separator:fh,Dialog:gh,Empty:hh,Loading:yh});function mh(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function bh(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function wh(t){let r=e.useRef(t);return Oh((()=>{r.current=t})),r}var Oh="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function xh(t){let r=e.useRef();return void 0===r.current&&(r.current=t()),r}function Eh(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function jh(t){let r=ah(),n=()=>t(r.snapshot());return e.useSyncExternalStore(r.subscribe,n,n)}function kh(t,r,n,o=[]){let i=e.useRef(),a=oh();return Oh((()=>{var e;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),s=o.map((e=>e.trim()));a.value(t,l,s),null==(e=r.current)||e.setAttribute(th,l),i.current=l})),i}var Sh=()=>{let[t,r]=e.useState(),n=xh((()=>new Map));return Oh((()=>{n.current.forEach((e=>e())),n.current=new Map}),[t]),(e,t)=>{n.current.set(e,t),r({})}};function Ph({asChild:t,children:r},n){return t&&e.isValidElement(r)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(r),{ref:r.ref},n(r.props.children)):n(r)}var Ch={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function zh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Th(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Lh(...e){return t=>{let r=!1;const n=e.map((e=>{const n=Th(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Th(e[t],null)}}}}function Nh(...t){return e.useCallback(Lh(...t),t)}var Rh=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(_h);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Qi.jsx(Mh,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Qi.jsx(Mh,{...o,ref:r,children:n})}));Rh.displayName="Slot";var Mh=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Lh(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null}));Mh.displayName="SlotClone";var Ih=({children:e})=>Qi.jsx(Qi.Fragment,{children:e});function _h(t){return e.isValidElement(t)&&t.type===Ih}var Ah=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?Rh:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Qi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});var Dh,Bh="dismissableLayer.update",Fh="dismissableLayer.pointerDownOutside",Wh="dismissableLayer.focusOutside",Vh=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hh=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Vh),[f,d]=e.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=e.useState({}),h=Nh(r,(e=>d(e))),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(v),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){$h(Fh,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),E=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){$h(Wh,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return Al((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(f)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Dh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Uh(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dh)}}),[f,p,n,u]),e.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Uh())}),[f,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Bh,e),()=>document.removeEventListener(Bh,e)}),[]),Qi.jsx(Ah.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:zh(t.onFocusCapture,E.onFocusCapture),onBlurCapture:zh(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:zh(t.onPointerDownCapture,x.onPointerDownCapture)})}));Hh.displayName="DismissableLayer";function Uh(){const e=new CustomEvent(Bh);document.dispatchEvent(e)}function $h(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&v.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Vh),o=e.useRef(null),i=Nh(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Qi.jsx(Ah.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Gh="focusScope.autoFocusOnMount",Yh="focusScope.autoFocusOnUnmount",qh={bubbles:!1,cancelable:!0},Kh=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=_l(i),f=_l(a),d=e.useRef(null),p=Nh(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Qh(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Qh(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Qh(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),e.useEffect((()=>{if(s){ey.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Gh,qh);s.addEventListener(Gh,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qh(n,{select:t}),document.activeElement!==r)return}((e=Xh(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Qh(s))}return()=>{s.removeEventListener(Gh,u),setTimeout((()=>{const e=new CustomEvent(Yh,qh);s.addEventListener(Yh,f),s.dispatchEvent(e),e.defaultPrevented||Qh(t??document.body,{select:!0}),s.removeEventListener(Yh,f),ey.remove(g)}),0)}}var e}),[s,u,f,g]);const h=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Xh(e),r=Jh(t,e),n=Jh(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Qh(i,{select:!0})):(e.preventDefault(),n&&Qh(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Qi.jsx(Ah.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Xh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Jh(e,t){for(const r of e)if(!Zh(r,{upTo:t}))return r}function Zh(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Qh(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Kh.displayName="FocusScope";var ey=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ty(e,t),e.unshift(t)},remove(t){e=ty(e,t),e[0]?.resume()}}}();function ty(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ry=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);is((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?m.createPortal(Qi.jsx(Ah.div,{...o,ref:r}),l):null}));ry.displayName="Portal";var ny=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=oy(o.current);a.current="mounted"===s?e:"none"}),[s]),is((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=oy(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),is((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=oy(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=oy(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Nh(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function oy(e){return e?.animationName||"none"}function iy(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}ny.displayName="Presence";var ay="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,ly=new WeakMap;function sy(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return iy(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return ay((function(){var t=ly.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||iy(e,null)})),n.forEach((function(e){r.has(e)||iy(e,o)}))}ly.set(i,e)}),[e]),i}function cy(e){return e}var uy=function(t){var r=t.sideCar,n=O(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,w({},n))};uy.isSideCarExport=!0;var fy=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=cy);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=w({async:!0,ssr:!1},e),t}(),dy=function(){},py=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:dy,onWheelCapture:dy,onTouchMoveCapture:dy}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=t.gapMode,x=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,j=sy([n,r]),k=w(w({},x),i);return e.createElement(e.Fragment,null,f&&e.createElement(E,{sideCar:fy,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),w(w({},k),{ref:j})):e.createElement(m,w({},k,{className:c,ref:j}),s))}));py.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},py.classNames={fullWidth:Qp,zeroRight:Zp};var gy=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hy=function(){var t=function(){var t=gy();return function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])}}();return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},yy=!1;if("undefined"!=typeof window)try{var vy=Object.defineProperty({},"passive",{get:function(){return yy=!0,!0}});window.addEventListener("test",vy,vy),window.removeEventListener("test",vy,vy)}catch(e){yy=!1}var my=!!yy&&{passive:!1},by=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},wy=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Oy(e,n)){var o=xy(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Oy=function(e,t){return"v"===e?function(e){return by(e,"overflowY")}(t):function(e){return by(e,"overflowX")}(t)},xy=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Ey=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jy=function(e){return[e.deltaX,e.deltaY]},ky=function(e){return e&&"current"in e?e.current:e},Sy=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Py=0,Cy=[];function zy(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ty,Ly=(Ty=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Py++)[0],a=e.useState(hy)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(ky),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Ey(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=wy(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=wy(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=xy(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Oy(e,l)&&(f+=h,d+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(d)<1)&&o||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Cy.length&&Cy[Cy.length-1]===a){var n="deltaY"in t?jy(t):Ey(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(ky).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:zy(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Ey(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,jy(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Ey(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Cy.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,my),document.addEventListener("touchmove",c,my),document.addEventListener("touchstart",f,my),function(){Cy=Cy.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,my),document.removeEventListener("touchmove",c,my),document.removeEventListener("touchstart",f,my)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:Sy(i)}):null,g?e.createElement(pg,{gapMode:t.gapMode}):null)},fy.useMedium(Ty),uy),Ny=e.forwardRef((function(t,r){return e.createElement(py,w({},t,{ref:r,sideCar:Ly}))}));Ny.classNames=py.classNames;var Ry="Dialog",[My,Iy]=Rl(Ry),[_y,Ay]=My(Ry),Dy="DialogTrigger";e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Dy,r),i=Nh(t,o.triggerRef);return Qi.jsx(Ah.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":nv(o.open),...n,ref:i,onClick:zh(e.onClick,o.onOpenToggle)})})).displayName=Dy;var By="DialogPortal",[Fy,Wy]=My(By,{forceMount:void 0}),Vy=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=Ay(By,r);return Qi.jsx(Fy,{scope:r,forceMount:n,children:e.Children.map(o,(e=>Qi.jsx(ny,{present:n||a.open,children:Qi.jsx(ry,{asChild:!0,container:i,children:e})})))})};Vy.displayName=By;var Hy="DialogOverlay",Uy=e.forwardRef(((e,t)=>{const r=Wy(Hy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ay(Hy,e.__scopeDialog);return i.modal?Qi.jsx(ny,{present:n||i.open,children:Qi.jsx($y,{...o,ref:t})}):null}));Uy.displayName=Hy;var $y=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Hy,r);return Qi.jsx(Ny,{as:Rh,allowPinchZoom:!0,shards:[o.contentRef],children:Qi.jsx(Ah.div,{"data-state":nv(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),Gy="DialogContent",Yy=e.forwardRef(((e,t)=>{const r=Wy(Gy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ay(Gy,e.__scopeDialog);return Qi.jsx(ny,{present:n||i.open,children:i.modal?Qi.jsx(qy,{...o,ref:t}):Qi.jsx(Ky,{...o,ref:t})})}));Yy.displayName=Gy;var qy=e.forwardRef(((t,r)=>{const n=Ay(Gy,t.__scopeDialog),o=e.useRef(null),i=Nh(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return vu(e)}),[]),Qi.jsx(Xy,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zh(t.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:zh(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:zh(t.onFocusOutside,(e=>e.preventDefault()))})})),Ky=e.forwardRef(((t,r)=>{const n=Ay(Gy,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return Qi.jsx(Xy,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Xy=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=Ay(Gy,n),c=e.useRef(null),u=Nh(r,c);return Yl(),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Kh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Qi.jsx(Hh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":nv(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(lv,{titleId:s.titleId}),Qi.jsx(sv,{contentRef:c,descriptionId:s.descriptionId})]})]})})),Jy="DialogTitle",Zy=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Jy,r);return Qi.jsx(Ah.h2,{id:o.titleId,...n,ref:t})}));Zy.displayName=Jy;var Qy="DialogDescription",ev=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Qy,r);return Qi.jsx(Ah.p,{id:o.descriptionId,...n,ref:t})}));ev.displayName=Qy;var tv="DialogClose",rv=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(tv,r);return Qi.jsx(Ah.button,{type:"button",...n,ref:t,onClick:zh(e.onClick,(()=>o.onOpenChange(!1)))})}));function nv(e){return e?"open":"closed"}rv.displayName=tv;var ov="DialogTitleWarning",[iv,av]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo((()=>o),Object.values(o));return Qi.jsx(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(ov,{contentName:Gy,titleName:Jy,docsSlug:"dialog"}),lv=({titleId:t})=>{const r=av(ov),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(n)}}),[n,t]),null},sv=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${av("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}}),[n,t,r]),null},cv=Uy,uv=Yy,fv=Zy,dv=ev,pv=rv,gv=Vy,hv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(cv,w({ref:r,className:xi("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},o))}));hv.displayName=cv.displayName,e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(gv,null,e.createElement(hv,null),e.createElement(uv,w({ref:r,className:xi("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n)},i),o,e.createElement(pv,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},e.createElement(Vi,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))})).displayName=uv.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(fv,w({ref:r,className:xi("text-lg font-semibold leading-none tracking-tight",n)},o))})).displayName=fv.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(dv,w({ref:r,className:xi("text-sm text-muted-foreground",n)},o))})).displayName=dv.displayName;var yv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh,w({ref:r,className:xi("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",n)},o))}));yv.displayName=vh.displayName;var vv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},e.createElement(Wi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.createElement(vh.Input,w({ref:r,className:xi("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",n)},o)))}));vv.displayName=vh.Input.displayName;var mv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.List,w({ref:r,className:xi("max-h-[300px] overflow-y-auto overflow-x-hidden",n)},o))}));mv.displayName=vh.List.displayName;var bv=e.forwardRef((function(t,r){return e.createElement(vh.Empty,w({ref:r,className:"py-6 text-center text-sm"},t))}));bv.displayName=vh.Empty.displayName;var wv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Group,w({ref:r,className:xi("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",n)},o))}));wv.displayName=vh.Group.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Separator,w({ref:r,className:xi("-mx-1 h-px bg-border",n)},o))})).displayName=vh.Separator.displayName;var Ov=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Item,w({ref:r,className:xi("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n)},o))}));function xv(t){var r,n=t.value,o=t.onSearch,i=t.onValueChange,a=t.disabled,l=t.placeholder,s=t.options,c=t.loading,u=e.useState(!1),f=u[0],d=u[1],p=e.useState(""),g=p[0],h=p[1],y=function(t,r){var n=e.useState(t),o=n[0],i=n[1];return e.useEffect((function(){var e=setTimeout((function(){i(t)}),r);return function(){clearTimeout(e)}}),[t,r]),o}(g,400),v=e.useRef("");return e.useEffect((function(){y!==v.current&&(v.current=y,o(y))}),[y,o]),e.createElement("div",{className:"w-full max-w-md mx-auto"},e.createElement(Cf,{open:f,onOpenChange:function(e){a||d(e)}},e.createElement(zf,{asChild:!0},e.createElement(aa,{variant:"outline",role:"combobox","aria-expanded":f,disabled:a,className:xi("w-full justify-between",a&&"opacity-70 cursor-not-allowed")},n?null===(r=s.find((function(e){return e.value===n})))||void 0===r?void 0:r.label:l,e.createElement(Ai,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"}))),e.createElement(Tf,{className:"w-full p-0"},e.createElement(yv,null,e.createElement(vv,{placeholder:l,onValueChange:function(e){return h(e)}}),c?e.createElement("div",{className:"flex items-center justify-center py-4"},e.createElement("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-primary border-t-transparent"})):e.createElement(mv,null,e.createElement(bv,null,"No ",l," found."),e.createElement(wv,null,s.map((function(t,r){return e.createElement(Ov,{key:r,value:t.value,onSelect:function(){console.log("option",t),i(t.value),d(!1)}},e.createElement(Ni,{className:xi("mr-2 h-4 w-4",n===t.value?"opacity-100":"opacity-0")}),t.label)}))))))))}function Ev(t){var r=this,n=t.title,o=t.filters,i=t.setFilters,l=t.configFilters,s=t.onSearch,c=t.count,u=t.isLoading,d=t.setCurrentPage,p=t.handleOptionsSearch,g=t.optionsLoading,h=e.useState(o),y=h[0],v=h[1],m=a(!1),b=m[0],O=m[1],j=e.useMemo((function(){return JSON.stringify(y)!==JSON.stringify(o)}),[y,o]),k=function(){return x(r,void 0,void 0,(function(){return E(this,(function(e){switch(e.label){case 0:return v(o),j?[4,d(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return s(),[2]}}))}))};return e.createElement("div",{className:"flex flex-col gap-2"},e.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(0, 137, 149)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"inline-block mr-2"},e.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),n,e.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},c)),e.createElement("div",{className:"border-b border-gray-100 mb-4"}),e.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},e.createElement(rp,{dateFrom:o.fromDate,dateTo:o.toDate,handleDateChange:function(e){i(w(w({},o),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),l&&l.map((function(t,r){return e.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&e.createElement(np,{type:"text",placeholder:t.placeholder,value:o[t.name],onChange:function(e){var r;e.target.value?i(w(w({},o),((r={})[t.name]=e.target.value,r))):(delete o[t.name],i(w({},o)))},onKeyDown:function(e){"Enter"===e.key&&k()}}),"Select_old"===t.type&&e.createElement(Kd,{disabled:t.disabled||0===t.options.length,value:o[t.name],onValueChange:function(e){var r;i(w(w({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}},e.createElement(Jd,null,e.createElement(Xd,{placeholder:t.placeholder})),e.createElement(ep,null,f((function(){return t.options.map((function(t,r){return e.createElement(tp,{key:"".concat(t.VALUE,"-").concat(r),value:t.VALUE||"_empty"},t.NAME)}))}),[t.options]))),"Select"===t.type&&e.createElement(xv,{loading:g,onSearch:function(e){e&&e.length>0&&!0===t.searchable&&p(t,e)},disabled:t.disabled||0===t.options.length,value:o[t.name],placeholder:t.placeholder,options:f((function(){return t.options.map((function(e){var r,n;return{value:null!==(r=e[t.codeAttribute])&&void 0!==r?r:e.VALUE,label:null!==(n=e[t.nameAttribute])&&void 0!==n?n:e.NAME}}))}),[t.options]),onValueChange:function(e){var r;i(w(w({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}}))})),e.createElement("div",{className:"flex gap-2 ml-auto"},l.some((function(e){return"Export"===e.type}))&&e.createElement(aa,{disabled:b,onClick:function(){return x(r,void 0,void 0,(function(){var e,t;return E(this,(function(i){switch(i.label){case 0:return O(!0),"POST"!==(null==(e=l.find((function(e){return"Export"===e.type})))?void 0:e.method)?[3,2]:[4,(s=null==e?void 0:e.url,c=o,x(r,void 0,void 0,(function(){var e,t,r,i;return E(this,(function(a){switch(a.label){case 0:return[4,fetch(s,{method:"POST",body:JSON.stringify(c)})];case 1:return[4,a.sent().blob()];case 2:return e=a.sent(),t=window.URL.createObjectURL(e),(r=document.createElement("a")).href=t,i="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),r.download=i,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r),[2]}}))})))];case 1:return i.sent(),[3,4];case 2:return[4,(a=null==e?void 0:e.ctx,x(r,void 0,void 0,(function(){var e,t,r,i,l,s;return E(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(a),t=0,r=Object.entries(o);t<r.length;t++){var n=r[t],i=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===i||"toDate"===i){var s=new Date(l);e+="&".concat(i,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(i,"=").concat(l)}}return e}())];case 1:if(!(e=c.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=c.sent(),r=window.URL.createObjectURL(t),(i=document.createElement("a")).href=r,l="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),i.download=l,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i),[3,4];case 3:return s=c.sent(),console.error("Export error:",s),[3,4];case 4:return[2]}}))})))];case 3:i.sent(),i.label=4;case 4:return t=setInterval((function(){O(!1),clearInterval(t)}),3e4),[2]}var a,s,c}))}))},size:"sm"},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"7 10 12 15 17 10"}),e.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),e.createElement(aa,{size:"sm",onClick:k,disabled:u},j?e.createElement(e.Fragment,null,e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):e.createElement(e.Fragment,null,e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"reload-icon","aria-hidden":"true"},e.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),e.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
26
+ */function Hi(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ui(...t){return e.useCallback(Hi(...t),t)}function $i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gi,Yi={exports:{}},qi={};var Ki,Xi,Ji={};function Zi(){return Ki||(Ki=1,"production"!==gt.env.NODE_ENV&&function(){var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),h=Symbol.iterator;var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=y.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var m;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return b(e)+".Consumer";case l:return b(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case p:var r=e,g=r._payload,h=r._init;try{return w(h(g))}catch(e){return null}}return null}m=Symbol.for("react.module.reference");var O,x,E,j,k,S,P,C=Object.assign,z=0;function T(){}T.__reactDisabledLog=!0;var L,N=y.ReactCurrentDispatcher;function R(e,t,r){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+e}var M,I=!1,_="function"==typeof WeakMap?WeakMap:Map;function A(e,t){if(!e||I)return"";var r,n=M.get(e);if(void 0!==n)return n;I=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=N.current,N.current=null,function(){if(0===z){O=console.log,x=console.info,E=console.warn,j=console.error,k=console.group,S=console.groupCollapsed,P=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=r.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{I=!1,N.current=o,function(){if(0==--z){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:O}),info:C({},e,{value:x}),warn:C({},e,{value:E}),error:C({},e,{value:j}),group:C({},e,{value:k}),groupCollapsed:C({},e,{value:S}),groupEnd:C({},e,{value:P})})}z<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=e?e.displayName||e.name:"",p=d?R(d):"";return"function"==typeof e&&M.set(e,p),p}function D(e,t,r){if(null==e)return"";if("function"==typeof e)return A(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return R(e);switch(e){case u:return R("Suspense");case f:return R("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return A(e.render,!1);case d:return D(e.type,t,r);case p:var n=e,o=n._payload,i=n._init;try{return D(i(o),t,r)}catch(e){}}return""}M=new _;var B=Object.prototype.hasOwnProperty,F={},W=y.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);W.setExtraStackFrame(r)}else W.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function $(e){return""+e}function G(e){if(function(e){try{return $(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),$(e)}var Y,q,K,X=y.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};K={};function Z(e,t,n,o,i){var a,l={},s=null,c=null;for(a in void 0!==n&&(G(n),s=""+n),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(G(t.key),s=""+t.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&X.current&&t&&X.current.stateNode!==t){var r=w(X.current.type);K[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(X.current.type),e.ref),K[r]=!0)}}(t,i)),t)B.call(t,a)&&!J.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){Y||(Y=!0,v("%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://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(l,f),c&&function(e,t){var r=function(){q||(q=!0,v("%s: `ref` 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://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(l,f)}return function(e,t,n,o,i,a,l){var s={$$typeof:r,type:e,key:t,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,X.current,l)}var Q,ee=y.ReactCurrentOwner,te=y.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);te.setExtraStackFrame(r)}else te.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=w(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ie[r]){ie[r]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&ae(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ne(i.value)&&ae(i.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==d)return;t=r.propTypes}if(t){var n=w(r);!function(e,t,r,n,o){var i=Function.call.bind(B);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof l),V(null)),l instanceof Error&&!(l.message in F)&&(F[l.message]=!0,V(o),v("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ce={};function ue(e,t,n,h,y,b){var O=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===l||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||void 0!==e.getModuleId)}(e);if(!O){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E;x+=oe(),null===e?E="null":U(e)?E="array":void 0!==e&&e.$$typeof===r?(E="<"+(w(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,x)}var j=Z(e,t,n,y,b);if(null==j)return j;if(O){var k=t.children;if(void 0!==k)if(h)if(U(k)){for(var S=0;S<k.length;S++)le(k[S],e);Object.freeze&&Object.freeze(k)}else v("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 le(k,e)}if(B.call(t,"key")){var P=w(e),C=Object.keys(t).filter((function(e){return"key"!==e})),z=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+z])v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',z,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+z]=!0}return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(j):se(j),j}var fe=function(e,t,r){return ue(e,t,r,!1)},de=function(e,t,r){return ue(e,t,r,!0)};Ji.Fragment=o,Ji.jsx=fe,Ji.jsxs=de}()),Ji}var Qi=(Xi||(Xi=1,"production"===gt.env.NODE_ENV?Yi.exports=function(){if(Gi)return qi;Gi=1;var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var l,s={},c=null,u=null;for(l in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,l)&&!a.hasOwnProperty(l)&&(s[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps)void 0===s[l]&&(s[l]=t[l]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}return qi.Fragment=n,qi.jsx=l,qi.jsxs=l,qi}():Yi.exports=Zi()),Yi.exports),ea=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(na);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Qi.jsx(ta,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Qi.jsx(ta,{...o,ref:r,children:n})}));ea.displayName="Slot";var ta=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n);return e.cloneElement(n,{...oa(o,n.props),ref:r?Hi(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));ta.displayName="SlotClone";var ra=({children:e})=>Qi.jsx(Qi.Fragment,{children:e});function na(t){return e.isValidElement(t)&&t.type===ra}function oa(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}var ia=zo("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),aa=e.forwardRef((function(t,r){var n=t.className,o=t.variant,i=t.size,a=t.asChild,l=void 0!==a&&a,s=O(t,["className","variant","size","asChild"]),c=l?ea:"button";return e.createElement(c,w({className:xi(ia({variant:o,size:i,className:n})),ref:r},s))}));aa.displayName="Button";var la=function(){return la=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},la.apply(this,arguments)};function sa(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function ca(e){return"multiple"===e.mode}function ua(e){return"range"===e.mode}function fa(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var da={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var pa=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ie(e,"LLLL y",t)},formatDay:function(e,t){return Ie(e,"d",t)},formatMonthCaption:function(e,t){return Ie(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ie(e,"cccccc",t)},formatYearCaption:function(e,t){return Ie(e,"yyyy",t)}}),ga=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Ie(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Ie(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ha=o(void 0);function ya(e){var t,r,n,o,i,a=e.initialProps,l=(r=da,n=se,o=new Date,{captionLayout:"buttons",classNames:r,formatters:pa,labels:ga,locale:n,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),s=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=q(n):t&&(i=new Date(t,0,1)),o?a=Y(o):r&&(a=new Date(r,11,31)),{fromDate:i?D(i):void 0,toDate:a?D(a):void 0}}(a),c=s.fromDate,u=s.toDate,f=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===f||c&&u||(f="buttons"),(fa(a)||ca(a)||ua(a))&&(i=a.onSelect);var d=la(la(la({},l),a),{captionLayout:f,classNames:la(la({},l.classNames),a.classNames),components:la({},a.components),formatters:la(la({},l.formatters),a.formatters),fromDate:c,labels:la(la({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:la(la({},l.modifiers),a.modifiers),modifiersClassNames:la(la({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:la(la({},l.styles),a.styles),toDate:u});return Qi.jsx(ha.Provider,{value:d,children:e.children})}function va(){var e=i(ha);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function ma(e){var t=va(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Qi.jsx("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function ba(e){return Qi.jsx("svg",la({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Qi.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function wa(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=va(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ba;return Qi.jsxs("div",{className:l,style:s,children:[Qi.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Qi.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Qi.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Qi.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Oa(e){var t,r=va(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return Qi.jsx(Qi.Fragment,{});if(!o)return Qi.jsx(Qi.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=A(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var d=q(n),p=n.getMonth();p<=o.getMonth();p++)f.push(Ve(d,p));else for(d=q(new Date),p=0;p<=11;p++)f.push(Ve(d,p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:wa;return Qi.jsx(g,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Ve(q(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Qi.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function xa(e){var t,r=e.displayMonth,n=va(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,d=[];if(!o)return Qi.jsx(Qi.Fragment,{});if(!i)return Qi.jsx(Qi.Fragment,{});for(var p=o.getFullYear(),g=i.getFullYear(),h=p;h<=g;h++)d.push(He(X(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:wa;return Qi.jsx(y,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=He(q(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:d.map((function(e){return Qi.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function Ea(){var e=va(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&G(i,o)<0&&(o=T(i,-1*(s-1))),a&&G(o,a)<0&&(o=a),q(o)}(e),r=function(e,t){var r=a(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=q(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var ja=o(void 0);function ka(e){var t=va(),r=Ea(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=q(e),i=G(q(T(o,n)),o),a=[],l=0;l<i;l++){var s=T(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=q(e);if(!r)return T(l,a);if(!(G(r,e)<i))return T(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=q(e);if(!r)return T(a,-i);if(!(G(a,r)<=0))return T(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Fe(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Be(e,r)?o(T(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Qi.jsx(ja.Provider,{value:c,children:e.children})}function Sa(){var e=i(ja);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Pa(e){var t,r=va(),n=r.classNames,o=r.styles,i=r.components,a=Sa().goToMonth,l=function(t){a(T(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:ma,c=Qi.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Qi.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Qi.jsx("div",{className:n.vhidden,children:c}),Qi.jsx(Oa,{onChange:l,displayMonth:e.displayMonth}),Qi.jsx(xa,{onChange:l,displayMonth:e.displayMonth})]})}function Ca(e){return Qi.jsx("svg",la({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Qi.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function za(e){return Qi.jsx("svg",la({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Qi.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Ta=r((function(e,t){var r=va(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=la(la({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Qi.jsx("button",la({},e,{ref:t,type:"button",className:a,style:l}))}));function La(e){var t,r,n=va(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return Qi.jsx(Qi.Fragment,{});var d=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),g=u(e.nextMonth,{locale:i}),h=[a.nav_button,a.nav_button_next].join(" "),y=null!==(t=null==f?void 0:f.IconRight)&&void 0!==t?t:za,v=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:Ca;return Qi.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Qi.jsx(Ta,{name:"previous-month","aria-label":d,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Qi.jsx(y,{className:a.nav_icon,style:l.nav_icon}):Qi.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Qi.jsx(Ta,{name:"next-month","aria-label":g,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Qi.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Qi.jsx(y,{className:a.nav_icon,style:l.nav_icon})})]})}function Na(e){var t=va().numberOfMonths,r=Sa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Fe(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Qi.jsx(La,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function Ra(e){var t,r,n=va(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:ma;return r=i?Qi.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Qi.jsx(Pa,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Pa,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Qi.jsx(Na,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Qi.jsx(Na,{displayMonth:e.displayMonth,id:e.id})]}),Qi.jsx("div",{className:o.caption,style:a.caption,children:r})}function Ma(e){var t=va(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Qi.jsx("tfoot",{className:o,style:n.tfoot,children:Qi.jsx("tr",{children:Qi.jsx("td",{colSpan:8,children:r})})}):Qi.jsx(Qi.Fragment,{})}function Ia(){var e=va(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?M(new Date):R(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=z(n,i);o.push(a)}return o}(o,i,a);return Qi.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Qi.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Qi.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function _a(){var e,t=va(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Ia;return Qi.jsx("thead",{style:n.head,className:r.head,children:Qi.jsx(i,{})})}function Aa(e){var t=va(),r=t.locale,n=t.formatters.formatDay;return Qi.jsx(Qi.Fragment,{children:n(e.date,{locale:r})})}var Da=o(void 0);function Ba(e){if(!ca(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Qi.jsx(Da.Provider,{value:t,children:e.children})}return Qi.jsx(Fa,{initialProps:e.initialProps,children:e.children})}function Fa(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return U(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?sa([],n):[];if(r.selected){var u=c.findIndex((function(t){return U(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return Qi.jsx(Da.Provider,{value:l,children:r})}function Wa(){var e=i(Da);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Va,Ha=o(void 0);function Ua(e){if(!ua(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Qi.jsx(Ha.Provider,{value:t,children:e.children})}return Qi.jsx($a,{initialProps:e.initialProps,children:e.children})}function $a(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],U(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:We(i,l-1),before:z(i,l-1)}),i&&a&&c.disabled.push({after:i,before:z(i,l-1)}),!i&&a&&c.disabled.push({after:We(a,l-1),before:z(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:z(i,1-s)}),c.disabled.push({after:z(i,s-1)})),i&&a){var u=s-(B(a,i)+1);c.disabled.push({before:We(i,u)}),c.disabled.push({after:z(a,u)})}!i&&a&&(c.disabled.push({before:z(a,1-s)}),c.disabled.push({after:z(a,s-1)}))}return Qi.jsx(Ha.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(U(o,e)&&U(n,e))return;if(U(o,e))return{from:o,to:void 0};if(U(n,e))return;return De(n,e)?{from:e,to:o}:{from:n,to:e}}return o?De(e,o)?{from:o,to:e}:{from:e,to:o}:n?Be(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Ga(){var e=i(Ha);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Ya(e){return Array.isArray(e)?sa([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(Va||(Va={}));var qa=Va.Selected,Ka=Va.Disabled,Xa=Va.Hidden,Ja=Va.Today,Za=Va.RangeEnd,Qa=Va.RangeMiddle,el=Va.RangeStart,tl=Va.Outside;var rl=o(void 0);function nl(e){var t=va(),r=function(e,t,r){var n,o=((n={})[qa]=Ya(e.selected),n[Ka]=Ya(e.disabled),n[Xa]=Ya(e.hidden),n[Ja]=[e.today],n[Za]=[],n[Qa]=[],n[el]=[],n[tl]=[],n);return e.fromDate&&o[Ka].push({before:e.fromDate}),e.toDate&&o[Ka].push({after:e.toDate}),ca(e)?o[Ka]=o[Ka].concat(t.modifiers[Ka]):ua(e)&&(o[Ka]=o[Ka].concat(r.modifiers[Ka]),o[el]=r.modifiers[el],o[Qa]=r.modifiers[Qa],o[Za]=r.modifiers[Za]),o}(t,Wa(),Ga()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=Ya(n)})),t}(t.modifiers),o=la(la({},r),n);return Qi.jsx(rl.Provider,{value:o,children:e.children})}function ol(){var e=i(rl);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function il(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if($(t))return U(e,t);if(function(e){return Array.isArray(e)&&e.every($)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(B(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),B(e,n)>=0&&B(o,e)>=0):o?U(o,e):!!n&&U(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=B(t.before,e)>0,n=B(t.after,e)<0;return De(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?B(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?B(t.before,e)>0:"function"==typeof t&&t(e)}))}function al(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return il(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Fe(e,r)&&(o.outside=!0),o}function ll(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,f=o.locale,d={day:z,week:F,month:T,year:W,startOfWeek:function(e){return o.ISOWeek?M(e):R(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?Z(e):J(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?d=V([c,d]):"after"===n&&u&&(d=H([u,d]));var p=!0;if(i){var g=al(d,i);p=!g.disabled&&!g.hidden}return p?d:l.count>365?l.lastFocused:ll(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:la(la({},l),{count:l.count+1})})}var sl=o(void 0);function cl(e){var t=Sa(),r=ol(),n=a(),o=n[0],i=n[1],l=a(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=q(e[0]),i=Y(e[e.length-1]),a=o;a<=i;){var l=al(a,t);if(l.disabled||l.hidden)a=z(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=z(a,1)}}return n||r}(t.displayMonths,r),f=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,d=function(e){i(e)},p=va(),g=function(e,n){if(o){var i=ll(o,{moveBy:e,direction:n,context:p,modifiers:r});U(o,i)||(t.goToDate(i,o),d(i))}},h={focusedDay:o,focusTarget:f,blur:function(){c(o),i(void 0)},focus:d,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return Qi.jsx(sl.Provider,{value:h,children:e.children})}function ul(){var e=i(sl);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var fl=o(void 0);function dl(e){if(!fa(e.initialProps)){var t={selected:void 0};return Qi.jsx(fl.Provider,{value:t,children:e.children})}return Qi.jsx(pl,{initialProps:e.initialProps,children:e.children})}function pl(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return Qi.jsx(fl.Provider,{value:n,children:r})}function gl(){var e=i(fl);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hl(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(Va).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function yl(e,t,r){var n,o,i,a=va(),s=ul(),c=function(e,t){return al(e,ol(),t)}(e,t),u=function(e,t){var r=va(),n=gl(),o=Wa(),i=Ga(),a=ul(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,f=a.blur,d=a.focus,p=a.focusMonthBefore,g=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,v=a.focusStartOfWeek,m=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;fa(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):ca(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):ua(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;d(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;f(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():p();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():g();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),m()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),f=function(){var e=va(),t=gl(),r=Wa(),n=Ga();return fa(e)?t.selected:ca(e)?r.selected:ua(e)?n.selected:void 0}(),d=Boolean(a.onDayClick||"default"!==a.mode);l((function(){var t;c.outside||s.focusedDay&&d&&U(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,d,c.outside]);var p=hl(a,c).join(" "),g=function(e,t){var r=la({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=la(la({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(a,c),h=Boolean(c.outside&&!a.showOutsideDays||c.hidden),y=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Aa,v={style:g,className:p,children:Qi.jsx(y,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&U(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&U(s.focusedDay,e),w=la(la(la({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||m?0:-1,n)),u);return{isButton:d,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:v}}function vl(e){var t=c(null),r=yl(e.date,e.displayMonth,t);return r.isHidden?Qi.jsx("div",{role:"gridcell"}):r.isButton?Qi.jsx(Ta,la({name:"day",ref:t},r.buttonProps)):Qi.jsx("div",la({},r.divProps))}function ml(e){var t=e.number,r=e.dates,n=va(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return Qi.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Qi.jsx(Ta,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function bl(e){var t,r,n,o=va(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:vl,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:ml;return l&&(n=Qi.jsx("td",{className:a.cell,style:i.cell,children:Qi.jsx(u,{number:e.weekNumber,dates:e.dates})})),Qi.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Qi.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Qi.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+C(e)/1e3)}(t))}))]})}function wl(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?Z(t):J(t,r),o=(null==r?void 0:r.ISOWeek)?M(e):R(e,r),i=B(n,o),a=[],l=0;l<=i;l++)a.push(z(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?ce(t):fe(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function Ol(e){var t,r,n,o=va(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,f=o.weekStartsOn,d=o.firstWeekContainsDate,p=o.ISOWeek,g=function(e,t){var r=wl(q(e),Y(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Ae(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=F(i,6-n),l=wl(F(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:p,locale:i,weekStartsOn:f,firstWeekContainsDate:d}),h=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:_a,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:bl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:Ma;return Qi.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Qi.jsx(h,{}),Qi.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Qi.jsx(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Qi.jsx(v,{displayMonth:e.displayMonth})]})}var xl="undefined"!=typeof window&&window.document&&window.document.createElement?s:l,El=!1,jl=0;function kl(){return"react-day-picker-".concat(++jl)}function Sl(e){var t,r,n=va(),o=n.dir,i=n.classNames,s=n.styles,c=n.components,u=Sa().displayMonths,f=function(e){var t,r=null!=e?e:El?kl():null,n=a(r),o=n[0],i=n[1];return xl((function(){null===o&&i(kl())}),[]),l((function(){!1===El&&(El=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,p=[i.month],g=s.month,h=0===e.displayIndex,y=e.displayIndex===u.length-1,v=!h&&!y;"rtl"===o&&(y=(t=[h,y])[0],h=t[1]),h&&(p.push(i.caption_start),g=la(la({},g),s.caption_start)),y&&(p.push(i.caption_end),g=la(la({},g),s.caption_end)),v&&(p.push(i.caption_between),g=la(la({},g),s.caption_between));var m=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:Ra;return Qi.jsxs("div",{className:p.join(" "),style:g,children:[Qi.jsx(m,{id:f,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Qi.jsx(Ol,{id:d,"aria-labelledby":f,displayMonth:e.displayMonth})]},e.displayIndex)}function Pl(e){var t=va(),r=t.classNames,n=t.styles;return Qi.jsx("div",{className:r.months,style:n.months,children:e.children})}function Cl(e){var t,r,n=e.initialProps,o=va(),i=ul(),s=Sa(),c=a(!1),u=c[0],f=c[1];l((function(){o.initialFocus&&i.focusTarget&&(u||(i.focus(i.focusTarget),f(!0)))}),[o.initialFocus,u,i.focus,i.focusTarget,i]);var d=[o.classNames.root,o.className];o.numberOfMonths>1&&d.push(o.classNames.multiple_months),o.showWeekNumber&&d.push(o.classNames.with_weeknumber);var p=la(la({},o.styles.root),o.style),g=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return la(la({},e),((r={})[t]=n[t],r))}),{}),h=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:Pl;return Qi.jsx("div",la({className:d.join(" "),style:p,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},g,{children:Qi.jsx(h,{children:s.displayMonths.map((function(e,t){return Qi.jsx(Sl,{displayIndex:t,displayMonth:e},t)}))})}))}function zl(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return Qi.jsx(ya,{initialProps:r,children:Qi.jsx(ka,{children:Qi.jsx(dl,{initialProps:r,children:Qi.jsx(Ba,{initialProps:r,children:Qi.jsx(Ua,{initialProps:r,children:Qi.jsx(nl,{children:Qi.jsx(cl,{children:t})})})})})})})}function Tl(e){return Qi.jsx(zl,la({},e,{children:Qi.jsx(Cl,{initialProps:e})}))}function Ll(t){var r=t.className,n=t.classNames,o=t.showOutsideDays,i=void 0===o||o,a=O(t,["className","classNames","showOutsideDays"]);return e.createElement(Tl,w({showOutsideDays:i,className:xi("p-3",r),classNames:w({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:xi(ia({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:xi("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===a.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:xi(ia({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},n),components:{IconLeft:function(){return e.createElement(Mi,{className:"h-4 w-4"})},IconRight:function(){return e.createElement(Ii,{className:"h-4 w-4"})}}},a))}function Nl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Rl(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Ml(o,...r)]}function Ml(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Ll.displayName="Calendar";var Il=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?ea:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Qi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function _l(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function Al(t,r=globalThis?.document){const n=_l(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}var Dl,Bl="dismissableLayer.update",Fl="dismissableLayer.pointerDownOutside",Wl="dismissableLayer.focusOutside",Vl=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hl=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Vl),[f,d]=e.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=e.useState({}),h=Ui(r,(e=>d(e))),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(v),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){$l(Fl,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),E=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){$l(Wl,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return Al((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(f)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Dl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ul(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dl)}}),[f,p,n,u]),e.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ul())}),[f,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Bl,e),()=>document.removeEventListener(Bl,e)}),[]),Qi.jsx(Il.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:Nl(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Nl(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Nl(t.onPointerDownCapture,x.onPointerDownCapture)})}));Hl.displayName="DismissableLayer";function Ul(){const e=new CustomEvent(Bl);document.dispatchEvent(e)}function $l(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&v.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Vl),o=e.useRef(null),i=Ui(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Qi.jsx(Il.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Gl=0;function Yl(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ql()),document.body.insertAdjacentElement("beforeend",e[1]??ql()),Gl++,()=>{1===Gl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Gl--}}),[])}function ql(){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 Kl="focusScope.autoFocusOnMount",Xl="focusScope.autoFocusOnUnmount",Jl={bubbles:!1,cancelable:!0},Zl=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=_l(i),f=_l(a),d=e.useRef(null),p=Ui(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:rs(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||rs(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&rs(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),e.useEffect((()=>{if(s){ns.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Kl,Jl);s.addEventListener(Kl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(rs(n,{select:t}),document.activeElement!==r)return}((e=Ql(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&rs(s))}return()=>{s.removeEventListener(Kl,u),setTimeout((()=>{const e=new CustomEvent(Xl,Jl);s.addEventListener(Xl,f),s.dispatchEvent(e),e.defaultPrevented||rs(t??document.body,{select:!0}),s.removeEventListener(Xl,f),ns.remove(g)}),0)}}var e}),[s,u,f,g]);const h=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Ql(e),r=es(t,e),n=es(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&rs(i,{select:!0})):(e.preventDefault(),n&&rs(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Qi.jsx(Il.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Ql(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function es(e,t){for(const r of e)if(!ts(r,{upTo:t}))return r}function ts(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function rs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Zl.displayName="FocusScope";var ns=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=os(e,t),e.unshift(t)},remove(t){e=os(e,t),e[0]?.resume()}}}();function os(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var is=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},as=e["useId".toString()]||(()=>{}),ls=0;function ss(t){const[r,n]=e.useState(as());return is((()=>{n((e=>e??String(ls++)))}),[t]),r?`radix-${r}`:""}const cs=["top","right","bottom","left"],us=Math.min,fs=Math.max,ds=Math.round,ps=Math.floor,gs=e=>({x:e,y:e}),hs={left:"right",right:"left",bottom:"top",top:"bottom"},ys={start:"end",end:"start"};function vs(e,t,r){return fs(e,us(t,r))}function ms(e,t){return"function"==typeof e?e(t):e}function bs(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function Os(e){return"x"===e?"y":"x"}function xs(e){return"y"===e?"height":"width"}function Es(e){return["top","bottom"].includes(bs(e))?"y":"x"}function js(e){return Os(Es(e))}function ks(e){return e.replace(/start|end/g,(e=>ys[e]))}function Ss(e){return e.replace(/left|right|bottom|top/g,(e=>hs[e]))}function Ps(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function zs(e,t,r){let{reference:n,floating:o}=e;const i=Es(t),a=js(t),l=xs(a),s=bs(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(ws(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}async function Ts(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=ms(t,e),g=Ps(p),h=l[d?"floating"===f?"reference":"floating":f],y=Cs(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=Cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:s}):v);return{top:(y.top-w.top+g.top)/b.y,bottom:(w.bottom-y.bottom+g.bottom)/b.y,left:(y.left-w.left+g.left)/b.x,right:(w.right-y.right+g.right)/b.x}}function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ns(e){return cs.some((t=>e[t]>=0))}function Rs(){return"undefined"!=typeof window}function Ms(e){return As(e)?(e.nodeName||"").toLowerCase():"#document"}function Is(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _s(e){var t;return null==(t=(As(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function As(e){return!!Rs()&&(e instanceof Node||e instanceof Is(e).Node)}function Ds(e){return!!Rs()&&(e instanceof Element||e instanceof Is(e).Element)}function Bs(e){return!!Rs()&&(e instanceof HTMLElement||e instanceof Is(e).HTMLElement)}function Fs(e){return!(!Rs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot)}function Ws(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Vs(e){return["table","td","th"].includes(Ms(e))}function Hs(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Us(e){const t=$s(),r=Ds(e)?Ys(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function $s(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Gs(e){return["html","body","#document"].includes(Ms(e))}function Ys(e){return Is(e).getComputedStyle(e)}function qs(e){return Ds(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Fs(e)&&e.host||_s(e);return Fs(t)?t.host:t}function Xs(e){const t=Ks(e);return Gs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&Ws(t)?t:Xs(t)}function Js(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Xs(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=Is(o);if(i){const e=Zs(a);return t.concat(a,a.visualViewport||[],Ws(o)?o:[],e&&r?Js(e):[])}return t.concat(o,Js(o,[],r))}function Zs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Bs(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ds(r)!==i||ds(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function ec(e){return Ds(e)?e:e.contextElement}function tc(e){const t=ec(e);if(!Bs(t))return gs(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Qs(t);let a=(i?ds(r.width):r.width)/n,l=(i?ds(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const rc=gs(0);function nc(e){const t=Is(e);return $s()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:rc}function oc(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=ec(e);let a=gs(1);t&&(n?Ds(n)&&(a=tc(n)):a=tc(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Is(e))&&t}(i,r,n)?nc(i):gs(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=Is(i),t=n&&Ds(n)?Is(n):n;let r=e,o=Zs(r);for(;o&&n&&t!==r;){const e=tc(o),t=o.getBoundingClientRect(),n=Ys(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,r=Is(o),o=Zs(r)}}return Cs({width:u,height:f,x:s,y:c})}function ic(e,t){const r=qs(e).scrollLeft;return t?t.left+r:oc(_s(e)).left+r}function ac(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:ic(e,n)),y:n.top+t.scrollTop}}function lc(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Is(e),n=_s(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=$s();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=_s(e),r=qs(e),n=e.ownerDocument.body,o=fs(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=fs(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+ic(e);const l=-r.scrollTop;return"rtl"===Ys(n).direction&&(a+=fs(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(_s(e));else if(Ds(t))n=function(e,t){const r=oc(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Bs(e)?tc(e):gs(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=nc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Cs(n)}function sc(e,t){const r=Ks(e);return!(r===t||!Ds(r)||Gs(r))&&("fixed"===Ys(r).position||sc(r,t))}function cc(e,t,r){const n=Bs(t),o=_s(t),i="fixed"===r,a=oc(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=gs(0);if(n||!n&&!i)if(("body"!==Ms(t)||Ws(o))&&(l=qs(t)),n){const e=oc(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=ic(o));const c=!o||n||i?gs(0):ac(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function uc(e){return"static"===Ys(e).position}function fc(e,t){if(!Bs(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let r=e.offsetParent;return _s(e)===r&&(r=r.ownerDocument.body),r}function dc(e,t){const r=Is(e);if(Hs(e))return r;if(!Bs(e)){let t=Ks(e);for(;t&&!Gs(t);){if(Ds(t)&&!uc(t))return t;t=Ks(t)}return r}let n=fc(e,t);for(;n&&Vs(n)&&uc(n);)n=fc(n,t);return n&&Gs(n)&&uc(n)&&!Us(n)?r:n||function(e){let t=Ks(e);for(;Bs(t)&&!Gs(t);){if(Us(t))return t;if(Hs(t))return null;t=Ks(t)}return null}(e)||r}const pc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=_s(n),l=!!t&&Hs(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=gs(1);const u=gs(0),f=Bs(n);if((f||!f&&!i)&&(("body"!==Ms(n)||Ws(a))&&(s=qs(n)),Bs(n))){const e=oc(n);c=tc(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const d=!a||f||i?gs(0):ac(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-s.scrollTop*c.y+u.y+d.y}},getDocumentElement:_s,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Hs(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Js(e,[],!1).filter((e=>Ds(e)&&"body"!==Ms(e))),o=null;const i="fixed"===Ys(e).position;let a=i?Ks(e):e;for(;Ds(a)&&!Gs(a);){const t=Ys(a),r=Us(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ws(a)&&!r&&sc(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ks(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=lc(t,r,o);return e.top=fs(n.top,e.top),e.right=us(n.right,e.right),e.bottom=us(n.bottom,e.bottom),e.left=fs(n.left,e.left),e}),lc(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:dc,getElementRects:async function(e){const t=this.getOffsetParent||dc,r=this.getDimensions,n=await r(e.floating);return{reference:cc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Qs(e);return{width:t,height:r}},getScale:tc,isElement:Ds,isRTL:function(e){return"rtl"===Ys(e).direction}};function gc(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=ec(e),u=o||i?[...c?Js(c):[],...Js(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const f=c&&l?function(e,t){let r,n=null;const o=_s(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(l||t(),!f||!d)return;const p={rootMargin:-ps(u)+"px "+-ps(o.clientWidth-(c+f))+"px "+-ps(o.clientHeight-(u+d))+"px "+-ps(c)+"px",threshold:fs(0,us(1,s))||1};let g=!0;function h(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}g=!1}try{n=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(h,p)}n.observe(e)}(!0),i}(c,r):null;let d,p=-1,g=null;a&&(g=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),r()})),c&&!s&&g.observe(c),g.observe(t));let h=s?oc(e):null;return s&&function t(){const n=oc(e);!h||n.x===h.x&&n.y===h.y&&n.width===h.width&&n.height===h.height||r();h=n,d=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==f||f(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(d)}}const hc=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=bs(r),l=ws(r),s="y"===Es(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=ms(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof g&&(p="end"===l?-1*g:g),s?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},yc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=ms(e,t),c={x:r,y:n},u=await Ts(t,s),f=Es(bs(o)),d=Os(f);let p=c[d],g=c[f];if(i){const e="y"===d?"bottom":"right";p=vs(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";g=vs(g+u["y"===f?"top":"left"],g,g-u[e])}const h=l.fn({...t,[d]:p,[f]:g});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[d]:i,[f]:a}}}}}},vc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=ms(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=bs(o),m=Es(l),b=bs(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=d||(b||!h?[Ss(l)]:function(e){const t=Ss(e);return[ks(e),t,ks(t)]}(l)),x="none"!==g;!d&&x&&O.push(...function(e,t,r,n){const o=ws(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(bs(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ks)))),i}(l,h,g,w));const E=[l,...O],j=await Ts(t,y),k=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(j[v]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=ws(e),o=js(e),i=xs(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}(o,a,w);k.push(j[e[0]],j[e[1]])}if(S=[...S,{placement:o,overflows:k}],!k.every((e=>e<=0))){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let r=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!r)switch(p){case"bestFit":{var z;const e=null==(z=S.filter((e=>{if(x){const t=Es(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:z[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},mc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=ms(e,t),u=await Ts(t,c),f=bs(o),d=ws(o),p="y"===Es(o),{width:g,height:h}=i.floating;let y,v;"top"===f||"bottom"===f?(y=f,v=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,y="end"===d?"top":"bottom");const m=h-u.top-u.bottom,b=g-u.left-u.right,w=us(h-u[y],m),O=us(g-u[v],b),x=!t.middlewareData.shift;let E=w,j=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(j=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=m),x&&!d){const e=fs(u.left,0),t=fs(u.right,0),r=fs(u.top,0),n=fs(u.bottom,0);p?j=g-2*(0!==e||0!==t?e+t:fs(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:fs(u.top,u.bottom))}await s({...t,availableWidth:j,availableHeight:E});const k=await a.getDimensions(l.floating);return g!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}},bc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ms(e,t);switch(n){case"referenceHidden":{const e=Ls(await Ts(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ns(e)}}}case"escaped":{const e=Ls(await Ts(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Ns(e)}}}default:return{}}}}},wc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=ms(e,t)||{};if(null==c)return{};const f=Ps(u),d={x:r,y:n},p=js(o),g=xs(p),h=await a.getDimensions(c),y="y"===p,v=y?"top":"left",m=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[p]-d[p]-i.floating[g],O=d[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=x?x[b]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=l.floating[b]||i.floating[g]);const j=w/2-O/2,k=E/2-h[g]/2-1,S=us(f[v],k),P=us(f[m],k),C=S,z=E-h[g]-P,T=E/2-h[g]/2+j,L=vs(C,T,z),N=!s.arrow&&null!=ws(o)&&T!==L&&i.reference[g]/2-(T<C?S:P)-h[g]/2<0,R=N?T<C?T-C:T-z:0;return{[p]:d[p]+R,data:{[p]:L,centerOffset:T-L-R,...N&&{alignmentOffset:R}},reset:N}}}),Oc=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=ms(e,t),u={x:r,y:n},f=Es(o),d=Os(f);let p=u[d],g=u[f];const h=ms(l,t),y="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+y.mainAxis,r=i.reference[d]+i.reference[e]-y.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,m;const e="y"===d?"width":"height",t=["top","left"].includes(bs(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[f])||0)+(t?0:y.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[f])||0)-(t?y.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[d]:p,[f]:g}}}},xc=(e,t,r)=>{const n=new Map,o={platform:pc,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=zs(c,n,s),d=n,p={},g=0;for(let r=0;r<l.length;r++){const{name:i,fn:h}=l[r],{x:y,y:v,data:m,reset:b}=await h({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=v?v:f,p={...p,[i]:{...p[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=zs(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ec="undefined"!=typeof document?s:l;function jc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!jc(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!jc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function kc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sc(e,t){const r=kc(e);return Math.round(t*r)/r}function Pc(t){const r=e.useRef(t);return Ec((()=>{r.current=t})),r}const Cc=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?wc({element:r.current,padding:n}).fn(t):{}:r?wc({element:r,padding:n}).fn(t):{};var o}}),zc=(e,t)=>({...hc(e),options:[e,t]}),Tc=(e,t)=>({...yc(e),options:[e,t]}),Lc=(e,t)=>({...Oc(e),options:[e,t]}),Nc=(e,t)=>({...vc(e),options:[e,t]}),Rc=(e,t)=>({...mc(e),options:[e,t]}),Mc=(e,t)=>({...bc(e),options:[e,t]}),Ic=(e,t)=>({...Cc(e),options:[e,t]});var _c=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Qi.jsx(Il.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Qi.jsx("polygon",{points:"0,0 30,0 15,10"})})}));_c.displayName="Arrow";var Ac=_c;function Dc(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var Bc="Popper",[Fc,Wc]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Dc(o,...r)]}(Bc),[Vc,Hc]=Fc(Bc),Uc=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return Qi.jsx(Vc,{scope:r,anchor:o,onAnchorChange:i,children:n})};Uc.displayName=Bc;var $c="PopperAnchor",Gc=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=Hc($c,n),l=e.useRef(null),s=Ui(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Qi.jsx(Il.div,{...i,ref:s})}));Gc.displayName=$c;var Yc="PopperContent",[qc,Kc]=Fc(Yc),Xc=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:h,...y}=t,m=Hc(Yc,n),[b,w]=e.useState(null),O=Ui(r,(e=>w(e))),[x,E]=e.useState(null),j=function(t){const[r,n]=e.useState(void 0);return is((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}(x),k=j?.width??0,S=j?.height??0,P=o+("center"!==a?"-"+a:""),C="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(eu),altBoundary:T},{refs:N,floatingStyles:R,placement:M,isPositioned:I,middlewareData:_}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[f,d]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,g]=e.useState(o);jc(p,o)||g(o);const[h,y]=e.useState(null),[m,b]=e.useState(null),w=e.useCallback((e=>{e!==j.current&&(j.current=e,y(e))}),[]),O=e.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),x=a||h,E=l||m,j=e.useRef(null),k=e.useRef(null),S=e.useRef(f),P=null!=c,C=Pc(c),z=Pc(i),T=Pc(u),L=e.useCallback((()=>{if(!j.current||!k.current)return;const e={placement:r,strategy:n,middleware:p};z.current&&(e.platform=z.current),xc(j.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};N.current&&!jc(S.current,t)&&(S.current=t,v.flushSync((()=>{d(t)})))}))}),[p,r,n,z,T]);Ec((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);Ec((()=>(N.current=!0,()=>{N.current=!1})),[]),Ec((()=>{if(x&&(j.current=x),E&&(k.current=E),x&&E){if(C.current)return C.current(x,E,L);L()}}),[x,E,L,C,P]);const R=e.useMemo((()=>({reference:j,floating:k,setReference:w,setFloating:O})),[w,O]),M=e.useMemo((()=>({reference:x,floating:E})),[x,E]),I=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=Sc(M.floating,f.x),r=Sc(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...kc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,M.floating,f.x,f.y]);return e.useMemo((()=>({...f,update:L,refs:R,elements:M,floatingStyles:I})),[f,L,R,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>gc(...e,{animationFrame:"always"===g}),elements:{reference:m.anchor},middleware:[zc({mainAxis:i+S,alignmentAxis:l}),c&&Tc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?Lc():void 0,...L}),c&&Nc({...L}),Rc({...L,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&Ic({element:x,padding:s}),tu({arrowWidth:k,arrowHeight:S}),p&&Mc({strategy:"referenceHidden",...L})]}),[A,D]=ru(M),B=_l(h);is((()=>{I&&B?.()}),[I,B]);const F=_.arrow?.x,W=_.arrow?.y,V=0!==_.arrow?.centerOffset,[H,U]=e.useState();return is((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Qi.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Qi.jsx(qc,{scope:n,placedSide:A,onArrowChange:E,arrowX:F,arrowY:W,shouldHideArrow:V,children:Qi.jsx(Il.div,{"data-side":A,"data-align":D,...y,ref:O,style:{...y.style,animation:I?void 0:"none"}})})})}));Xc.displayName=Yc;var Jc="PopperArrow",Zc={top:"bottom",right:"left",bottom:"top",left:"right"},Qc=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Kc(Jc,r),i=Zc[o.placedSide];return Qi.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Qi.jsx(Ac,{...n,ref:t,style:{...n.style,display:"block"}})})}));function eu(e){return null!==e}Qc.displayName=Jc;var tu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=ru(r),u={start:"0%",center:"50%",end:"100%"}[c],f=(o.arrow?.x??0)+a/2,d=(o.arrow?.y??0)+l/2;let p="",g="";return"bottom"===s?(p=i?u:`${f}px`,g=-l+"px"):"top"===s?(p=i?u:`${f}px`,g=`${n.floating.height+l}px`):"right"===s?(p=-l+"px",g=i?u:`${d}px`):"left"===s&&(p=`${n.floating.width+l}px`,g=i?u:`${d}px`),{data:{x:p,y:g}}}});function ru(e){const[t,r="center"]=e.split("-");return[t,r]}var nu=Uc,ou=Gc,iu=Xc,au=Qc,lu=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);is((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?m.createPortal(Qi.jsx(Il.div,{...o,ref:r}),l):null}));lu.displayName="Portal";var su=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=cu(o.current);a.current="mounted"===s?e:"none"}),[s]),is((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=cu(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),is((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=cu(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=cu(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Ui(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function cu(e){return e?.animationName||"none"}function uu({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=_l(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=_l(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}su.displayName="Presence";var fu=new WeakMap,du=new WeakMap,pu={},gu=0,hu=function(e){return e&&(e.host||hu(e.parentNode))},yu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=hu(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);pu[r]||(pu[r]=new WeakMap);var i=pu[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(fu.get(e)||0)+1,c=(i.get(e)||0)+1;fu.set(e,s),i.set(e,c),a.push(e),1===s&&o&&du.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),gu++,function(){a.forEach((function(e){var t=fu.get(e)-1,o=i.get(e)-1;fu.set(e,t),i.set(e,o),t||(du.has(e)||e.removeAttribute(n),du.delete(e)),o||e.removeAttribute(r)})),--gu||(fu=new WeakMap,fu=new WeakMap,du=new WeakMap,pu={})}},vu=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),yu(n,o,r,"aria-hidden")):function(){return null}},mu="right-scroll-bar-position",bu="width-before-scroll-bar";function wu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ou="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,xu=new WeakMap;function Eu(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return wu(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return Ou((function(){var t=xu.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||wu(e,null)})),n.forEach((function(e){r.has(e)||wu(e,o)}))}xu.set(i,e)}),[e]),i}function ju(e){return e}function ku(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=ju);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=w({async:!0,ssr:!1},e),t}var Su=function(t){var r=t.sideCar,n=O(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,w({},n))};function Pu(e,t){return e.useMedium(t),Su}Su.isSideCarExport=!0;var Cu=ku(),zu=function(){},Tu=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:zu,onWheelCapture:zu,onTouchMoveCapture:zu}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=t.gapMode,x=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,j=Eu([n,r]),k=w(w({},x),i);return e.createElement(e.Fragment,null,f&&e.createElement(E,{sideCar:Cu,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),w(w({},k),{ref:j})):e.createElement(m,w({},k,{className:c,ref:j}),s))}));Tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tu.classNames={fullWidth:bu,zeroRight:mu};var Lu=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__};var Nu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ru=function(){var t,r=(t=Nu(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},Mu={left:0,top:0,right:0,gap:0},Iu=function(e){return parseInt(e||"",10)||0},_u=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Mu;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Iu(r),Iu(n),Iu(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Au=Ru(),Du="data-scroll-locked",Bu=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(Du,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(mu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(bu," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(mu," .").concat(mu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(bu," .").concat(bu," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Du,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Fu=function(){var e=parseInt(document.body.getAttribute(Du)||"0",10);return isFinite(e)?e:0},Wu=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Du,(Fu()+1).toString()),function(){var e=Fu()-1;e<=0?document.body.removeAttribute(Du):document.body.setAttribute(Du,e.toString())}}),[]);var a=e.useMemo((function(){return _u(i)}),[i]);return e.createElement(Au,{styles:Bu(a,!r,i,n?"":"!important")})},Vu=!1;if("undefined"!=typeof window)try{var Hu=Object.defineProperty({},"passive",{get:function(){return Vu=!0,!0}});window.addEventListener("test",Hu,Hu),window.removeEventListener("test",Hu,Hu)}catch(e){Vu=!1}var Uu=!!Vu&&{passive:!1},$u=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},Gu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Yu(e,n)){var o=qu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Yu=function(e,t){return"v"===e?function(e){return $u(e,"overflowY")}(t):function(e){return $u(e,"overflowX")}(t)},qu=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Ku=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xu=function(e){return[e.deltaX,e.deltaY]},Ju=function(e){return e&&"current"in e?e.current:e},Zu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qu=0,ef=[];function tf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var rf=Pu(Cu,(function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Qu++)[0],a=e.useState(Ru)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(Ju),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Ku(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=Gu(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=Gu(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=qu(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Yu(e,l)&&(f+=h,d+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(d)<1)&&o||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(ef.length&&ef[ef.length-1]===a){var n="deltaY"in t?Xu(t):Ku(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Ju).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:tf(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Ku(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,Xu(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Ku(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return ef.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Uu),document.addEventListener("touchmove",c,Uu),document.addEventListener("touchstart",f,Uu),function(){ef=ef.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Uu),document.removeEventListener("touchmove",c,Uu),document.removeEventListener("touchstart",f,Uu)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:Zu(i)}):null,g?e.createElement(Wu,{gapMode:t.gapMode}):null)})),nf=e.forwardRef((function(t,r){return e.createElement(Tu,w({},t,{ref:r,sideCar:rf}))}));nf.classNames=Tu.classNames;var of="Popover",[af,lf]=Rl(of,[Wc]),sf=Wc(),[cf,uf]=af(of),ff=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=sf(r),c=e.useRef(null),[u,f]=e.useState(!1),[d=!1,p]=uu({prop:o,defaultProp:i,onChange:a});return Qi.jsx(nu,{...s,children:Qi.jsx(cf,{scope:r,contentId:ss(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>f(!1)),[]),modal:l,children:n})})};ff.displayName=of;var df="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=uf(df,n),a=sf(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),Qi.jsx(ou,{...a,...o,ref:r})})).displayName=df;var pf="PopoverTrigger",gf=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=uf(pf,r),i=sf(r),a=Ui(t,o.triggerRef),l=Qi.jsx(Il.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kf(o.open),...n,ref:a,onClick:Nl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Qi.jsx(ou,{asChild:!0,...i,children:l})}));gf.displayName=pf;var hf="PopoverPortal",[yf,vf]=af(hf,{forceMount:void 0}),mf=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=uf(hf,t);return Qi.jsx(yf,{scope:t,forceMount:r,children:Qi.jsx(su,{present:r||i.open,children:Qi.jsx(lu,{asChild:!0,container:o,children:n})})})};mf.displayName=hf;var bf="PopoverContent",wf=e.forwardRef(((e,t)=>{const r=vf(bf,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=uf(bf,e.__scopePopover);return Qi.jsx(su,{present:n||i.open,children:i.modal?Qi.jsx(Of,{...o,ref:t}):Qi.jsx(xf,{...o,ref:t})})}));wf.displayName=bf;var Of=e.forwardRef(((t,r)=>{const n=uf(bf,t.__scopePopover),o=e.useRef(null),i=Ui(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return vu(e)}),[]),Qi.jsx(nf,{as:ea,allowPinchZoom:!0,children:Qi.jsx(Ef,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nl(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:Nl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:Nl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),xf=e.forwardRef(((t,r)=>{const n=uf(bf,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return Qi.jsx(Ef,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Ef=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...f}=e,d=uf(bf,r),p=sf(r);return Yl(),Qi.jsx(Zl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Qi.jsx(Hl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:Qi.jsx(iu,{"data-state":kf(d.open),role:"dialog",id:d.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),jf="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=uf(jf,r);return Qi.jsx(Il.button,{type:"button",...n,ref:t,onClick:Nl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=jf;function kf(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=sf(r);return Qi.jsx(au,{...o,...n,ref:t})})).displayName="PopoverArrow";var Sf=mf,Pf=wf,Cf=ff,zf=gf,Tf=e.forwardRef((function(t,r){var n=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,l=void 0===a?4:a,s=O(t,["className","align","sideOffset"]);return e.createElement(Sf,null,e.createElement(Pf,w({ref:r,align:i,sideOffset:l,className:xi("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},s)))}));function Lf(e,[t,r]){return Math.min(r,Math.max(t,e))}function Nf(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Tf.displayName=Pf.displayName;var Rf=e.createContext(void 0);var Mf=e.forwardRef(((e,t)=>Qi.jsx(Il.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));Mf.displayName="VisuallyHidden";var If=[" ","Enter","ArrowUp","ArrowDown"],_f=[" ","Enter"],Af="Select",[Df,Bf,Ff]=function(r){const n=r+"CollectionProvider",[o,i]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Qi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Nf(o,...r)]}(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:r,children:n}=e,o=t.useRef(null),i=t.useRef(new Map).current;return Qi.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=n;const c=r+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Ui(t,l(c,r).collectionRef);return Qi.jsx(ea,{ref:o,children:n})}));u.displayName=c;const f=r+"CollectionItemSlot",d="data-radix-collection-item",p=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,a=t.useRef(null),s=Ui(r,a),c=l(f,n);return t.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Qi.jsx(ea,{[d]:"",ref:s,children:o})}));return p.displayName=f,[{Provider:s,Slot:u,ItemSlot:p},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(Af),[Wf,Vf]=Rl(Af,[Ff,Wc]),Hf=Wc(),[Uf,$f]=Wf(Af),[Gf,Yf]=Wf(Af),qf=t=>{const{__scopeSelect:r,children:n,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:g,form:h}=t,y=Hf(r),[v,m]=e.useState(null),[b,w]=e.useState(null),[O,x]=e.useState(!1),E=function(t){const r=e.useContext(Rf);return t||r||"ltr"}(u),[j=!1,k]=uu({prop:o,defaultProp:i,onChange:a}),[S,P]=uu({prop:l,defaultProp:s,onChange:c}),C=e.useRef(null),z=!v||(h||!!v.closest("form")),[T,L]=e.useState(new Set),N=Array.from(T).map((e=>e.props.value)).join(";");return Qi.jsx(nu,{...y,children:Qi.jsxs(Uf,{required:g,scope:r,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:ss(),value:S,onValueChange:P,open:j,onOpenChange:k,dir:E,triggerPointerDownPosRef:C,disabled:p,children:[Qi.jsx(Df.Provider,{scope:r,children:Qi.jsx(Gf,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{L((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{L((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:n})}),z?Qi.jsxs(Md,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:d,value:S,onChange:e=>P(e.target.value),disabled:p,form:h,children:[void 0===S?Qi.jsx("option",{value:""}):null,Array.from(T)]},N):null]})})};qf.displayName=Af;var Kf="SelectTrigger",Xf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,disabled:o=!1,...i}=t,a=Hf(n),l=$f(Kf,n),s=l.disabled||o,c=Ui(r,l.onTriggerChange),u=Bf(n),f=e.useRef("touch"),[d,p,g]=Id((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=_d(t,e,r);void 0!==n&&l.onValueChange(n.value)})),h=e=>{s||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return Qi.jsx(ou,{asChild:!0,...a,children:Qi.jsx(Il.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Rd(l.value)?"":void 0,...i,ref:c,onClick:Nl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&h(e)})),onPointerDown:Nl(i.onPointerDown,(e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:Nl(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||If.includes(e.key)&&(h(),e.preventDefault())}))})})}));Xf.displayName=Kf;var Jf="SelectValue",Zf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=$f(Jf,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Ui(t,s.onValueNodeChange);return is((()=>{c(u)}),[c,u]),Qi.jsx(Il.span,{...l,ref:f,style:{pointerEvents:"none"},children:Rd(s.value)?Qi.jsx(Qi.Fragment,{children:a}):i})}));Zf.displayName=Jf;var Qf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Qi.jsx(Il.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Qf.displayName="SelectIcon";var ed=e=>Qi.jsx(lu,{asChild:!0,...e});ed.displayName="SelectPortal";var td="SelectContent",rd=e.forwardRef(((t,r)=>{const n=$f(td,t.__scopeSelect),[o,i]=e.useState();if(is((()=>{i(new DocumentFragment)}),[]),!n.open){const e=o;return e?v.createPortal(Qi.jsx(od,{scope:t.__scopeSelect,children:Qi.jsx(Df.Slot,{scope:t.__scopeSelect,children:Qi.jsx("div",{children:t.children})})}),e):null}return Qi.jsx(ad,{...t,ref:r})}));rd.displayName=td;var nd=10,[od,id]=Wf(td),ad=e.forwardRef(((t,r)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:v,...m}=t,b=$f(td,n),[w,O]=e.useState(null),[x,E]=e.useState(null),j=Ui(r,(e=>O(e))),[k,S]=e.useState(null),[P,C]=e.useState(null),z=Bf(n),[T,L]=e.useState(!1),N=e.useRef(!1);e.useEffect((()=>{if(w)return vu(w)}),[w]),Yl();const R=e.useCallback((e=>{const[t,...r]=z().map((e=>e.ref.current)),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&x&&(x.scrollTop=0),r===n&&x&&(x.scrollTop=x.scrollHeight),r?.focus(),document.activeElement!==o)return}}),[z,x]),M=e.useCallback((()=>R([k,w])),[R,k,w]);e.useEffect((()=>{T&&M()}),[T,M]);const{onOpenChange:I,triggerPointerDownPosRef:_}=b;e.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(_.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():w.contains(r.target)||I(!1),document.removeEventListener("pointermove",t),_.current=null};return null!==_.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}}),[w,I,_]),e.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[A,D]=Id((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=_d(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(N.current=!0))}),[b.value]),F=e.useCallback((()=>w?.focus()),[w]),W=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?sd:ld,H=V===sd?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:v}:{};return Qi.jsx(od,{scope:n,content:w,viewport:x,onViewportChange:E,itemRefCallback:B,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:T,searchRef:A,children:Qi.jsx(nf,{as:ea,allowPinchZoom:!0,children:Qi.jsx(Zl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Nl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Qi.jsx(Hl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Qi.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>L(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:Nl(m.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||D(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));ad.displayName="SelectContentImpl";var ld=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onPlaced:o,...i}=t,a=$f(td,n),l=id(td,n),[s,c]=e.useState(null),[u,f]=e.useState(null),d=Ui(r,(e=>f(e))),p=Bf(n),g=e.useRef(!1),h=e.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=e.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&y&&v&&m){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=m.getBoundingClientRect();if("rtl"!==a.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-nd,f=Lf(i,[nd,Math.max(nd,u-c)]);s.style.minWidth=l+"px",s.style.left=f+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-nd,f=Lf(i,[nd,Math.max(nd,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=p(),l=window.innerHeight-2*nd,c=y.scrollHeight,f=window.getComputedStyle(u),d=parseInt(f.borderTopWidth,10),h=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),w=d+h+c+parseInt(f.paddingBottom,10)+b,O=Math.min(5*v.offsetHeight,w),x=window.getComputedStyle(y),E=parseInt(x.paddingTop,10),j=parseInt(x.paddingBottom,10),k=e.top+e.height/2-nd,S=l-k,P=v.offsetHeight/2,C=d+h+(v.offsetTop+P),z=w-C;if(C<=k){const e=i.length>0&&v===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-y.offsetTop-y.offsetHeight,r=C+Math.max(S,P+(e?j:0)+t+b);s.style.height=r+"px"}else{const e=i.length>0&&v===i[0].ref.current;s.style.top="0px";const t=Math.max(k,d+y.offsetTop+(e?E:0)+P)+z;s.style.height=t+"px",y.scrollTop=C-k+y.offsetTop}s.style.margin=`${nd}px 0`,s.style.minHeight=O+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame((()=>g.current=!0))}}),[p,a.trigger,a.valueNode,s,u,y,v,m,a.dir,o]);is((()=>w()),[w]);const[O,x]=e.useState();is((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=e.useCallback((e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)}),[w,b]);return Qi.jsx(cd,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:Qi.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Qi.jsx(Il.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));ld.displayName="SelectItemAlignedPosition";var sd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=nd,...i}=e,a=Hf(r);return Qi.jsx(iu,{...a,...i,ref:t,align:n,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)"}})}));sd.displayName="SelectPopperPosition";var[cd,ud]=Wf(td,{}),fd="SelectViewport",dd=e.forwardRef(((t,r)=>{const{__scopeSelect:n,nonce:o,...i}=t,a=id(fd,n),l=ud(fd,n),s=Ui(r,a.onViewportChange),c=e.useRef(0);return Qi.jsxs(Qi.Fragment,{children:[Qi.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:o}),Qi.jsx(Df.Slot,{scope:n,children:Qi.jsx(Il.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Nl(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=l;if(n?.current&&r){const e=Math.abs(c.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*nd,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));dd.displayName=fd;var pd="SelectGroup",[gd,hd]=Wf(pd);e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=ss();return Qi.jsx(gd,{scope:r,id:o,children:Qi.jsx(Il.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=pd;var yd="SelectLabel",vd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=hd(yd,r);return Qi.jsx(Il.div,{id:o.id,...n,ref:t})}));vd.displayName=yd;var md="SelectItem",[bd,wd]=Wf(md),Od=e.forwardRef(((t,r)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...l}=t,s=$f(md,n),c=id(md,n),u=s.value===o,[f,d]=e.useState(a??""),[p,g]=e.useState(!1),h=Ui(r,(e=>c.itemRefCallback?.(e,o,i))),y=ss(),v=e.useRef("touch"),m=()=>{i||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)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 Qi.jsx(bd,{scope:n,value:o,disabled:i,textId:y,isSelected:u,onItemTextChange:e.useCallback((e=>{d((t=>t||(e?.textContent??"").trim()))}),[]),children:Qi.jsx(Df.ItemSlot,{scope:n,value:o,disabled:i,textValue:f,children:Qi.jsx(Il.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:h,onFocus:Nl(l.onFocus,(()=>g(!0))),onBlur:Nl(l.onBlur,(()=>g(!1))),onClick:Nl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:Nl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:Nl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Nl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Nl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Nl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(_f.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));Od.displayName=md;var xd="SelectItemText",Ed=e.forwardRef(((t,r)=>{const{__scopeSelect:n,className:o,style:i,...a}=t,l=$f(xd,n),s=id(xd,n),c=wd(xd,n),u=Yf(xd,n),[f,d]=e.useState(null),p=Ui(r,(e=>d(e)),c.onItemTextChange,(e=>s.itemTextRefCallback?.(e,c.value,c.disabled))),g=f?.textContent,h=e.useMemo((()=>Qi.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value)),[c.disabled,c.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=u;return is((()=>(y(h),()=>m(h))),[y,m,h]),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Il.span,{id:c.textId,...a,ref:p}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?v.createPortal(a.children,l.valueNode):null]})}));Ed.displayName=xd;var jd="SelectItemIndicator",kd=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return wd(jd,r).isSelected?Qi.jsx(Il.span,{"aria-hidden":!0,...n,ref:t}):null}));kd.displayName=jd;var Sd="SelectScrollUpButton",Pd=e.forwardRef(((t,r)=>{const n=id(Sd,t.__scopeSelect),o=ud(Sd,t.__scopeSelect),[i,a]=e.useState(!1),l=Ui(r,o.onScrollButtonChange);return is((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Qi.jsx(Td,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Pd.displayName=Sd;var Cd="SelectScrollDownButton",zd=e.forwardRef(((t,r)=>{const n=id(Cd,t.__scopeSelect),o=ud(Cd,t.__scopeSelect),[i,a]=e.useState(!1),l=Ui(r,o.onScrollButtonChange);return is((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Qi.jsx(Td,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));zd.displayName=Cd;var Td=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=t,a=id("SelectScrollButton",n),l=e.useRef(null),s=Bf(n),c=e.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),is((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Qi.jsx(Il.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:Nl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:Nl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:Nl(i.onPointerLeave,(()=>{c()}))})})),Ld=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Qi.jsx(Il.div,{"aria-hidden":!0,...n,ref:t})}));Ld.displayName="SelectSeparator";var Nd="SelectArrow";function Rd(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Hf(r),i=$f(Nd,r),a=id(Nd,r);return i.open&&"popper"===a.position?Qi.jsx(au,{...o,...n,ref:t}):null})).displayName=Nd;var Md=e.forwardRef(((t,r)=>{const{value:n,...o}=t,i=e.useRef(null),a=Ui(r,i),l=function(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}(n);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),Qi.jsx(Mf,{asChild:!0,children:Qi.jsx("select",{...o,ref:a,defaultValue:n})})}));function Id(t){const r=_l(t),n=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=n.current+e;r(t),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[r]),a=e.useCallback((()=>{n.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[n,i,a]}function _d(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===n.length&&(i=i.filter((e=>e!==r)));const s=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return s!==r?s:void 0}Md.displayName="BubbleSelect";var Ad=Xf,Dd=Qf,Bd=ed,Fd=rd,Wd=dd,Vd=vd,Hd=Od,Ud=Ed,$d=kd,Gd=Pd,Yd=zd,qd=Ld,Kd=qf,Xd=Zf,Jd=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(Ad,w({ref:r,className:xi("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n)},i),o,e.createElement(Dd,{asChild:!0},e.createElement(Ri,{className:"h-4 w-4 opacity-50"})))}));Jd.displayName=Ad.displayName;var Zd=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Gd,w({ref:r,className:xi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(_i,{className:"h-4 w-4"}))}));Zd.displayName=Gd.displayName;var Qd=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Yd,w({ref:r,className:xi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(Ri,{className:"h-4 w-4"}))}));Qd.displayName=Yd.displayName;var ep=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,l=O(t,["className","children","position"]);return e.createElement(Bd,null,e.createElement(Fd,w({ref:r,className:xi("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a},l),e.createElement(Zd,null),e.createElement(Wd,{className:xi("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),e.createElement(Qd,null)))}));ep.displayName=Fd.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(Vd,w({ref:r,className:xi("px-2 py-1.5 text-sm font-semibold",n)},o))})).displayName=Vd.displayName;var tp=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(Hd,w({ref:r,className:xi("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},i),e.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement($d,null,e.createElement(Ni,{className:"h-4 w-4"}))),e.createElement(Ud,null,o))}));function rp(t){var r=t.className,n=t.dateFrom,o=t.dateTo,i=t.handleDateChange,a=e.useState({from:n||new Date(2022,0,20),to:o||z(new Date(2022,0,20),20)}),l=a[0],s=a[1],c=[{label:"Hier",getValue:function(){var e=new Date;return e.setDate(e.getDate()-1),{from:e,to:e}}},{label:"Cette semaine",getValue:function(){var e=new Date;return{from:R(e),to:J(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:q(e),to:Y(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return T(e,-t,r)}(new Date,1);return{from:q(e),to:Y(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:X(e),to:K(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return W(e,-t,r)}(new Date,1);return{from:X(e),to:K(e)}}}];return e.createElement("div",{className:xi("grid gap-2",r)},e.createElement(Cf,null,e.createElement(zf,{asChild:!0},e.createElement(aa,{id:"date",variant:"outline",className:xi("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},e.createElement(Li,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?e.createElement(e.Fragment,null,Ie(l.from,"LLL dd, y")," -"," ",Ie(l.to,"LLL dd, y")):Ie(l.from,"LLL dd, y"):e.createElement("span",null,"Choisissez une date"))),e.createElement(Tf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},e.createElement(Kd,{onValueChange:function(e){var t=c.find((function(t){return t.label===e}));if(t){var r=t.getValue();s(r),null==i||i(r)}}},e.createElement(Jd,{className:"w-[300px]"},e.createElement(Xd,{placeholder:"Sélectionnez un préréglage"})),e.createElement(ep,{position:"popper"},c.map((function(t){return e.createElement(tp,{key:t.label,value:t.label},t.label)})))),e.createElement("div",{className:"rounded-md border"},e.createElement(Ll,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}tp.displayName=Hd.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(qd,w({ref:r,className:xi("-mx-1 my-1 h-px bg-muted",n)},o))})).displayName=qd.displayName;var np=e.forwardRef((function(t,r){var n=t.className,o=t.type,i=O(t,["className","type"]);return e.createElement("input",w({type:o,className:xi("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r},i))}));np.displayName="Input";var op=.999,ip=/[\\\/_+.#"@\[\(\{&]/,ap=/[\\\/_+.#"@\[\(\{&]/g,lp=/[\s-]/,sp=/[\s-]/g;function cp(e,t,r,n,o,i,a){if(i===t.length)return o===e.length?1:.99;var l=`${o},${i}`;if(void 0!==a[l])return a[l];for(var s,c,u,f,d=n.charAt(i),p=r.indexOf(d,o),g=0;p>=0;)(s=cp(e,t,r,n,p+1,i+1,a))>g&&(p===o?s*=1:ip.test(e.charAt(p-1))?(s*=.8,(u=e.slice(o,p-1).match(ap))&&o>0&&(s*=Math.pow(op,u.length))):lp.test(e.charAt(p-1))?(s*=.9,(f=e.slice(o,p-1).match(sp))&&o>0&&(s*=Math.pow(op,f.length))):(s*=.17,o>0&&(s*=Math.pow(op,p-o))),e.charAt(p)!==t.charAt(i)&&(s*=.9999)),(s<.1&&r.charAt(p-1)===n.charAt(i+1)||n.charAt(i+1)===n.charAt(i)&&r.charAt(p-1)!==n.charAt(i))&&(.1*(c=cp(e,t,r,n,p+1,i+2,a))>s&&(s=.1*c)),s>g&&(g=s),p=r.indexOf(d,p+1);return a[l]=g,g}function up(e){return e.toLowerCase().replace(sp," ")}function fp(e,t,r){return cp(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,up(e),up(t),0,0,{})}function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dp.apply(null,arguments)}function pp(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function gp(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function hp(...e){return u(gp(...e),e)}function yp(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return f((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}const vp=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s:()=>{},mp=e["useId".toString()]||(()=>{});let bp=0;function wp(t){const[r,n]=e.useState(mp());return vp((()=>{t||n((e=>null!=e?e:String(bp++)))}),[t]),t||(r?`radix-${r}`:"")}function Op(e){const t=c(e);return l((()=>{t.current=e})),f((()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}function xp({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=function({defaultProp:e,onChange:t}){const r=a(e),[n]=r,o=c(n),i=Op(t);return l((()=>{o.current!==n&&(i(n),o.current=n)}),[n,o,i]),r}({defaultProp:t,onChange:r}),i=void 0!==e,s=i?e:n,f=Op(r);return[s,u((t=>{if(i){const r="function"==typeof t?t(e):t;r!==e&&f(r)}else o(t)}),[i,e,o,f])]}const Ep=r(((e,t)=>{const{children:r,...o}=e,i=d.toArray(r),a=i.find(Sp);if(a){const e=a.props.children,r=i.map((t=>t===a?d.count(e)>1?d.only(null):p(e)?e.props.children:null:t));return n(jp,dp({},o,{ref:t}),p(e)?g(e,void 0,r):null)}return n(jp,dp({},o,{ref:t}),r)}));Ep.displayName="Slot";const jp=r(((e,t)=>{const{children:r,...n}=e;return p(r)?g(r,{...Pp(n,r.props),ref:t?gp(t,r.ref):r.ref}):d.count(r)>1?d.only(null):null}));jp.displayName="SlotClone";const kp=({children:e})=>n(h,null,e);function Sp(e){return p(e)&&e.type===kp}function Pp(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const o=r(((e,r)=>{const{asChild:o,...i}=e,a=o?Ep:t;return l((()=>{window[Symbol.for("radix-ui")]=!0}),[]),n(a,dp({},i,{ref:r}))}));return o.displayName=`Primitive.${t}`,{...e,[t]:o}}),{});const zp="dismissableLayer.update",Tp="dismissableLayer.pointerDownOutside",Lp="dismissableLayer.focusOutside";let Np;const Rp=o({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mp=r(((e,t)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p,...g}=e,h=i(Rp),[y,v]=a(null),m=null!==(r=null==y?void 0:y.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,b]=a({}),w=hp(t,(e=>v(e))),O=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=O.indexOf(x),j=y?O.indexOf(y):-1,k=h.layersWithOutsidePointerEventsDisabled.size>0,S=j>=E,P=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e),n=c(!1),o=c((()=>{}));return l((()=>{const e=e=>{if(e.target&&!n.current){const i={originalEvent:e};function a(){_p(Tp,r,i,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...h.branches].some((e=>e.contains(t)));S&&!r&&(null==u||u(e),null==d||d(e),e.defaultPrevented||null==p||p())}),m),C=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e),n=c(!1);return l((()=>{const e=e=>{if(e.target&&!n.current){_p(Lp,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...h.branches].some((e=>e.contains(t)))||(null==f||f(e),null==d||d(e),e.defaultPrevented||null==p||p())}),m);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Op(e);l((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[r,t])}((e=>{j===h.layers.size-1&&(null==s||s(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))}),m),l((()=>{if(y)return o&&(0===h.layersWithOutsidePointerEventsDisabled.size&&(Np=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(y)),h.layers.add(y),Ip(),()=>{o&&1===h.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Np)}}),[y,m,o,h]),l((()=>()=>{y&&(h.layers.delete(y),h.layersWithOutsidePointerEventsDisabled.delete(y),Ip())}),[y,h]),l((()=>{const e=()=>b({});return document.addEventListener(zp,e),()=>document.removeEventListener(zp,e)}),[]),n(Cp.div,dp({},g,{ref:w,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:pp(e.onFocusCapture,C.onFocusCapture),onBlurCapture:pp(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:pp(e.onPointerDownCapture,P.onPointerDownCapture)}))}));function Ip(){const e=new CustomEvent(zp);document.dispatchEvent(e)}function _p(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&b((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}const Ap="focusScope.autoFocusOnMount",Dp="focusScope.autoFocusOnUnmount",Bp={bubbles:!1,cancelable:!0},Fp=r(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...f}=e,[d,p]=a(null),g=Op(i),h=Op(s),y=c(null),v=hp(t,(e=>p(e))),m=c({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l((()=>{if(o){function e(e){if(m.paused||!d)return;const t=e.target;d.contains(t)?y.current=t:Up(y.current,{select:!0})}function t(e){if(m.paused||!d)return;const t=e.relatedTarget;null!==t&&(d.contains(t)||Up(y.current,{select:!0}))}function r(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Up(d)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return d&&n.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,d,m.paused]),l((()=>{if(d){$p.add(m);const t=document.activeElement;if(!d.contains(t)){const r=new CustomEvent(Ap,Bp);d.addEventListener(Ap,g),d.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Up(n,{select:t}),document.activeElement!==r)return}((e=Wp(d),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Up(d))}return()=>{d.removeEventListener(Ap,g),setTimeout((()=>{const e=new CustomEvent(Dp,Bp);d.addEventListener(Dp,h),d.dispatchEvent(e),e.defaultPrevented||Up(null!=t?t:document.body,{select:!0}),d.removeEventListener(Dp,h),$p.remove(m)}),0)}}var e}),[d,g,h,m]);const b=u((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Wp(e),r=Vp(t,e),n=Vp(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Up(i,{select:!0})):(e.preventDefault(),r&&Up(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return n(Cp.div,dp({tabIndex:-1},f,{ref:v,onKeyDown:b}))}));function Wp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Vp(e,t){for(const r of e)if(!Hp(r,{upTo:t}))return r}function Hp(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Up(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const $p=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Gp(e,t),e.unshift(t)},remove(t){var r;e=Gp(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Gp(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Yp=r(((e,t)=>{var r;const{container:o=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...i}=e;return o?m.createPortal(n(Cp.div,dp({},i,{ref:t})),o):null}));const qp=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=a(),n=c({}),o=c(e),i=c("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return y(((e,r)=>{const n=t[e][r];return null!=n?n:e}),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l((()=>{const e=Kp(n.current);i.current="mounted"===f?e:"none"}),[f]),vp((()=>{const t=n.current,r=o.current;if(r!==e){const n=i.current,a=Kp(t);if(e)d("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))d("UNMOUNT");else{d(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,d]),vp((()=>{if(t){const e=e=>{const r=Kp(n.current).includes(e.animationName);e.target===t&&r&&b((()=>d("ANIMATION_END")))},r=e=>{e.target===t&&(i.current=Kp(n.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")}),[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:u((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),o="function"==typeof r?r({present:n.isPresent}):d.only(r),i=hp(n.ref,o.ref);return"function"==typeof r||n.isPresent?g(o,{ref:i}):null};function Kp(e){return(null==e?void 0:e.animationName)||"none"}qp.displayName="Presence";let Xp=0;function Jp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Zp="right-scroll-bar-position",Qp="width-before-scroll-bar",eg=ku(),tg=function(){},rg=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:tg,onWheelCapture:tg,onTouchMoveCapture:tg}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,E=Eu([n,r]),j=w(w({},b),i);return e.createElement(e.Fragment,null,f&&e.createElement(x,{sideCar:eg,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n}),l?e.cloneElement(e.Children.only(s),w(w({},j),{ref:E})):e.createElement(m,w({},j,{className:c,ref:E}),s))}));rg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rg.classNames={fullWidth:Qp,zeroRight:Zp};var ng,og,ig=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ag={left:0,top:0,right:0,gap:0},lg=function(e){return parseInt(e||"",10)||0},sg=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ag;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[lg(r),lg(n),lg(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cg=(ng=ig(),og=function(t,r){e.useEffect((function(){return ng.add(t),function(){ng.remove()}}),[t&&r])},function(e){var t=e.styles,r=e.dynamic;return og(t,r),null}),ug="data-scroll-locked",fg=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(ug,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Zp," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Qp," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Zp," .").concat(Zp," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Qp," .").concat(Qp," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ug,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},dg=function(){var e=parseInt(document.body.getAttribute(ug)||"0",10);return isFinite(e)?e:0},pg=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(ug,(dg()+1).toString()),function(){var e=dg()-1;e<=0?document.body.removeAttribute(ug):document.body.setAttribute(ug,e.toString())}}),[]);var a=e.useMemo((function(){return sg(i)}),[i]);return e.createElement(cg,{styles:fg(a,!r,i,n?"":"!important")})},gg=!1;if("undefined"!=typeof window)try{var hg=Object.defineProperty({},"passive",{get:function(){return gg=!0,!0}});window.addEventListener("test",hg,hg),window.removeEventListener("test",hg,hg)}catch(e){gg=!1}var yg=!!gg&&{passive:!1},vg=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},mg=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),bg(e,r)){var n=wg(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bg=function(e,t){return"v"===e?function(e){return vg(e,"overflowY")}(t):function(e){return vg(e,"overflowX")}(t)},wg=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Og=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xg=function(e){return[e.deltaX,e.deltaY]},Eg=function(e){return e&&"current"in e?e.current:e},jg=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},kg=0,Sg=[];var Pg=Pu(eg,(function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(kg++)[0],a=e.useState((function(){return Ru()}))[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(Eg),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var r,i=Og(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=mg(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=mg(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=wg(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&bg(e,l)&&(f+=h,d+=g),l=l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(!u||0!==f&&o)&&(u||0!==d&&o)||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Sg.length&&Sg[Sg.length-1]===a){var n="deltaY"in t?xg(t):Og(t),o=r.current.filter((function(e){return e.name===t.type&&e.target===t.target&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Eg).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Og(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,xg(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Og(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Sg.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,yg),document.addEventListener("touchmove",c,yg),document.addEventListener("touchstart",f,yg),function(){Sg=Sg.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,yg),document.removeEventListener("touchmove",c,yg),document.removeEventListener("touchstart",f,yg)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:jg(i)}):null,g?e.createElement(pg,{gapMode:"margin"}):null)})),Cg=e.forwardRef((function(t,r){return e.createElement(rg,w({},t,{ref:r,sideCar:Pg}))}));Cg.classNames=rg.classNames;const zg="Dialog",[Tg,Lg]=function(e,t=[]){let r=[];const a=()=>{const t=r.map((e=>o(e)));return function(r){const n=(null==r?void 0:r[e])||t;return f((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(t,a){const l=o(a),s=r.length;function c(t){const{scope:r,children:o,...i}=t,a=(null==r?void 0:r[e][s])||l,c=f((()=>i),Object.values(i));return n(a.Provider,{value:c},o)}return r=[...r,a],c.displayName=t+"Provider",[c,function(r,n){const o=(null==n?void 0:n[e][s])||l,c=i(o);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},yp(a,...t)]}(zg),[Ng,Rg]=Tg(zg),Mg="DialogPortal",[Ig,_g]=Tg(Mg,{forceMount:void 0}),Ag="DialogOverlay",Dg=r(((e,t)=>{const r=_g(Ag,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=Rg(Ag,e.__scopeDialog);return a.modal?n(qp,{present:o||a.open},n(Bg,dp({},i,{ref:t}))):null})),Bg=r(((e,t)=>{const{__scopeDialog:r,...o}=e,i=Rg(Ag,r);return n(Cg,{as:Ep,allowPinchZoom:!0,shards:[i.contentRef]},n(Cp.div,dp({"data-state":$g(i.open)},o,{ref:t,style:{pointerEvents:"auto",...o.style}})))})),Fg="DialogContent",Wg=r(((e,t)=>{const r=_g(Fg,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=Rg(Fg,e.__scopeDialog);return n(qp,{present:o||a.open},a.modal?n(Vg,dp({},i,{ref:t})):n(Hg,dp({},i,{ref:t})))})),Vg=r(((e,t)=>{const r=Rg(Fg,e.__scopeDialog),o=c(null),i=hp(t,r.contentRef,o);return l((()=>{const e=o.current;if(e)return vu(e)}),[]),n(Ug,dp({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pp(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:pp(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:pp(e.onFocusOutside,(e=>e.preventDefault()))}))})),Hg=r(((e,t)=>{const r=Rg(Fg,e.__scopeDialog),o=c(!1),i=c(!1);return n(Ug,dp({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,a;(null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented)||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());o.current=!1,i.current=!1},onInteractOutside:t=>{var n,a;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const l=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))})),Ug=r(((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=Rg(Fg,r),f=hp(t,c(null));return l((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:Jp()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:Jp()),Xp++,()=>{1===Xp&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Xp--}}),[]),n(h,null,n(Fp,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},n(Mp,dp({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":$g(u.open)},s,{ref:f,onDismiss:()=>u.onOpenChange(!1)}))),!1)}));function $g(e){return e?"open":"closed"}const Gg=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,s=c(null),f=c(null),[d=!1,p]=xp({prop:o,defaultProp:i,onChange:a});return n(Ng,{scope:t,triggerRef:s,contentRef:f,contentId:wp(),titleId:wp(),descriptionId:wp(),open:d,onOpenChange:p,onOpenToggle:u((()=>p((e=>!e))),[p]),modal:l},r)},Yg=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:i}=e,a=Rg(Mg,t);return n(Ig,{scope:t,forceMount:r},d.map(o,(e=>n(qp,{present:r||a.open},n(Yp,{asChild:!0,container:i},e)))))},qg=Dg,Kg=Wg;var Xg='[cmdk-group=""]',Jg='[cmdk-group-items=""]',Zg='[cmdk-item=""]',Qg=`${Zg}:not([aria-disabled="true"])`,eh="cmdk-item-select",th="data-value",rh=(e,t,r)=>fp(e,t,r),nh=e.createContext(void 0),oh=()=>e.useContext(nh),ih=e.createContext(void 0),ah=()=>e.useContext(ih),lh=e.createContext(void 0),sh=e.forwardRef(((t,r)=>{let n=xh((()=>{var e,r;return{search:"",value:null!=(r=null!=(e=t.value)?e:t.defaultValue)?r:"",filtered:{count:0,items:new Map,groups:new Set}}})),o=xh((()=>new Set)),i=xh((()=>new Map)),a=xh((()=>new Map)),l=xh((()=>new Set)),s=wh(t),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:g,loop:h,disablePointerSelection:y=!1,vimBindings:v=!0,...m}=t,b=e.useId(),w=e.useId(),O=e.useId(),x=e.useRef(null),E=Sh();Oh((()=>{if(void 0!==f){let e=f.trim();n.current.value=e,j.emit()}}),[f]),Oh((()=>{E(6,T)}),[]);let j=e.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)z(),P(),E(1,C);else if("value"===e&&(r||E(5,T),void 0!==(null==(o=s.current)?void 0:o.value))){let e=null!=t?t:"";return void(null==(a=(i=s.current).onValueChange)||a.call(i,e))}j.emit()}},emit:()=>{l.current.forEach((e=>e()))}})),[]),k=e.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,S(t,r)),E(2,(()=>{P(),j.emit()})))},item:(e,t)=>(o.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),E(3,(()=>{z(),P(),n.current.value||C(),j.emit()})),()=>{a.current.delete(e),o.current.delete(e),n.current.filtered.items.delete(e);let t=L();E(4,(()=>{z(),(null==t?void 0:t.getAttribute("id"))===e&&C(),j.emit()}))}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||t["aria-label"],disablePointerSelection:y,listId:b,inputId:O,labelId:w,listInnerRef:x})),[]);function S(e,t){var r,o;let i=null!=(o=null==(r=s.current)?void 0:r.filter)?o:rh;return e?i(e,n.current.search,t):0}function P(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((r=>{let n=i.current.get(r),o=0;n.forEach((t=>{let r=e.get(t);o=Math.max(r,o)})),t.push([r,o])}));let r=x.current;N().sort(((t,r)=>{var n,o;let i=t.getAttribute("id"),a=r.getAttribute("id");return(null!=(n=e.get(a))?n:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(Jg);t?t.appendChild(e.parentElement===t?e:e.closest(`${Jg} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Jg} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Xg}[${th}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=N().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(th);j.setState("value",t||void 0)}function z(){var e,t,r,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=o.current.size);n.current.filtered.groups=new Set;let c=0;for(let i of o.current){let o=S(null!=(t=null==(e=a.current.get(i))?void 0:e.value)?t:"",null!=(l=null==(r=a.current.get(i))?void 0:r.keywords)?l:[]);n.current.filtered.items.set(i,o),o>0&&c++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=c}function T(){var e,t,r;let n=L();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Xg))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function L(){var e;return null==(e=x.current)?void 0:e.querySelector(`${Zg}[aria-selected="true"]`)}function N(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(Qg))}function R(e){let t=N()[e];t&&j.setState("value",t.getAttribute(th))}function M(e){var t;let r=L(),n=N(),o=n.findIndex((e=>e===r)),i=n[o+e];null!=(t=s.current)&&t.loop&&(i=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),i&&j.setState("value",i.getAttribute(th))}function I(e){let t,r=L(),n=null==r?void 0:r.closest(Xg);for(;n&&!t;)n=e>0?mh(n,Xg):bh(n,Xg),t=null==n?void 0:n.querySelector(Qg);t?j.setState("value",t.getAttribute(th)):M(e)}let _=()=>R(N().length-1),A=e=>{e.preventDefault(),e.metaKey?_():e.altKey?I(1):M(1)},D=e=>{e.preventDefault(),e.metaKey?R(0):e.altKey?I(-1):M(-1)};return e.createElement(Cp.div,{ref:r,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=m.onKeyDown)||t.call(m,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&A(e);break;case"ArrowDown":A(e);break;case"p":case"k":v&&e.ctrlKey&&D(e);break;case"ArrowUp":D(e);break;case"Home":e.preventDefault(),R(0);break;case"End":e.preventDefault(),_();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=L();if(t){let e=new Event(eh);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Ch},c),Ph(t,(t=>e.createElement(ih.Provider,{value:j},e.createElement(nh.Provider,{value:k},t)))))})),ch=e.forwardRef(((t,r)=>{var n,o;let i=e.useId(),a=e.useRef(null),l=e.useContext(lh),s=oh(),c=wh(t),u=null!=(o=null==(n=c.current)?void 0:n.forceMount)?o:null==l?void 0:l.forceMount;Oh((()=>{if(!u)return s.item(i,null==l?void 0:l.id)}),[u]);let f=kh(i,a,[t.value,t.children,a],t.keywords),d=ah(),p=jh((e=>e.value&&e.value===f.current)),g=jh((e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(i)>0)));function h(){var e,t;y(),null==(t=(e=c.current).onSelect)||t.call(e,f.current)}function y(){d.setState("value",f.current,!0)}if(e.useEffect((()=>{let e=a.current;if(e&&!t.disabled)return e.addEventListener(eh,h),()=>e.removeEventListener(eh,h)}),[g,t.onSelect,t.disabled]),!g)return null;let{disabled:v,value:m,onSelect:b,forceMount:w,keywords:O,...x}=t;return e.createElement(Cp.div,{ref:Eh([a,r]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.disablePointerSelection?void 0:y,onClick:v?void 0:h},t.children)})),uh=e.forwardRef(((t,r)=>{let{heading:n,children:o,forceMount:i,...a}=t,l=e.useId(),s=e.useRef(null),c=e.useRef(null),u=e.useId(),f=oh(),d=jh((e=>!(!i&&!1!==f.filter())||(!e.search||e.filtered.groups.has(l))));Oh((()=>f.group(l)),[]),kh(l,s,[t.value,t.heading,c]);let p=e.useMemo((()=>({id:l,forceMount:i})),[i]);return e.createElement(Cp.div,{ref:Eh([s,r]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&e.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Ph(t,(t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},e.createElement(lh.Provider,{value:p},t)))))})),fh=e.forwardRef(((t,r)=>{let{alwaysRender:n,...o}=t,i=e.useRef(null),a=jh((e=>!e.search));return n||a?e.createElement(Cp.div,{ref:Eh([i,r]),...o,"cmdk-separator":"",role:"separator"}):null})),dh=e.forwardRef(((t,r)=>{let{onValueChange:n,...o}=t,i=null!=t.value,a=ah(),l=jh((e=>e.search)),s=jh((e=>e.value)),c=oh(),u=e.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${Zg}[${th}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return e.useEffect((()=>{null!=t.value&&a.setState("search",t.value)}),[t.value]),e.createElement(Cp.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":u,id:c.inputId,type:"text",value:i?t.value:l,onChange:e=>{i||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),ph=e.forwardRef(((t,r)=>{let{children:n,label:o="Suggestions",...i}=t,a=e.useRef(null),l=e.useRef(null),s=oh();return e.useEffect((()=>{if(l.current&&a.current){let e,t=l.current,r=a.current,n=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}}),[]),e.createElement(Cp.div,{ref:Eh([a,r]),...i,"cmdk-list":"",role:"listbox","aria-label":o,id:s.listId},Ph(t,(t=>e.createElement("div",{ref:Eh([l,s.listInnerRef]),"cmdk-list-sizer":""},t))))})),gh=e.forwardRef(((t,r)=>{let{open:n,onOpenChange:o,overlayClassName:i,contentClassName:a,container:l,...s}=t;return e.createElement(Gg,{open:n,onOpenChange:o},e.createElement(Yg,{container:l},e.createElement(qg,{"cmdk-overlay":"",className:i}),e.createElement(Kg,{"aria-label":t.label,"cmdk-dialog":"",className:a},e.createElement(sh,{ref:r,...s}))))})),hh=e.forwardRef(((t,r)=>jh((e=>0===e.filtered.count))?e.createElement(Cp.div,{ref:r,...t,"cmdk-empty":"",role:"presentation"}):null)),yh=e.forwardRef(((t,r)=>{let{progress:n,children:o,label:i="Loading...",...a}=t;return e.createElement(Cp.div,{ref:r,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Ph(t,(t=>e.createElement("div",{"aria-hidden":!0},t))))})),vh=Object.assign(sh,{List:ph,Item:ch,Input:dh,Group:uh,Separator:fh,Dialog:gh,Empty:hh,Loading:yh});function mh(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function bh(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function wh(t){let r=e.useRef(t);return Oh((()=>{r.current=t})),r}var Oh="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function xh(t){let r=e.useRef();return void 0===r.current&&(r.current=t()),r}function Eh(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function jh(t){let r=ah(),n=()=>t(r.snapshot());return e.useSyncExternalStore(r.subscribe,n,n)}function kh(t,r,n,o=[]){let i=e.useRef(),a=oh();return Oh((()=>{var e;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),s=o.map((e=>e.trim()));a.value(t,l,s),null==(e=r.current)||e.setAttribute(th,l),i.current=l})),i}var Sh=()=>{let[t,r]=e.useState(),n=xh((()=>new Map));return Oh((()=>{n.current.forEach((e=>e())),n.current=new Map}),[t]),(e,t)=>{n.current.set(e,t),r({})}};function Ph({asChild:t,children:r},n){return t&&e.isValidElement(r)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(r),{ref:r.ref},n(r.props.children)):n(r)}var Ch={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function zh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Th(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Lh(...e){return t=>{let r=!1;const n=e.map((e=>{const n=Th(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Th(e[t],null)}}}}function Nh(...t){return e.useCallback(Lh(...t),t)}var Rh=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(_h);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Qi.jsx(Mh,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Qi.jsx(Mh,{...o,ref:r,children:n})}));Rh.displayName="Slot";var Mh=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?Lh(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null}));Mh.displayName="SlotClone";var Ih=({children:e})=>Qi.jsx(Qi.Fragment,{children:e});function _h(t){return e.isValidElement(t)&&t.type===Ih}var Ah=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?Rh:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Qi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});var Dh,Bh="dismissableLayer.update",Fh="dismissableLayer.pointerDownOutside",Wh="dismissableLayer.focusOutside",Vh=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hh=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Vh),[f,d]=e.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=e.useState({}),h=Nh(r,(e=>d(e))),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(v),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){$h(Fh,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),E=function(t,r=globalThis?.document){const n=_l(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){$h(Wh,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return Al((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(f)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Dh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Uh(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dh)}}),[f,p,n,u]),e.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Uh())}),[f,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Bh,e),()=>document.removeEventListener(Bh,e)}),[]),Qi.jsx(Ah.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:zh(t.onFocusCapture,E.onFocusCapture),onBlurCapture:zh(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:zh(t.onPointerDownCapture,x.onPointerDownCapture)})}));Hh.displayName="DismissableLayer";function Uh(){const e=new CustomEvent(Bh);document.dispatchEvent(e)}function $h(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&v.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Vh),o=e.useRef(null),i=Nh(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Qi.jsx(Ah.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Gh="focusScope.autoFocusOnMount",Yh="focusScope.autoFocusOnUnmount",qh={bubbles:!1,cancelable:!0},Kh=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=_l(i),f=_l(a),d=e.useRef(null),p=Nh(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Qh(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Qh(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Qh(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),e.useEffect((()=>{if(s){ey.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Gh,qh);s.addEventListener(Gh,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qh(n,{select:t}),document.activeElement!==r)return}((e=Xh(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Qh(s))}return()=>{s.removeEventListener(Gh,u),setTimeout((()=>{const e=new CustomEvent(Yh,qh);s.addEventListener(Yh,f),s.dispatchEvent(e),e.defaultPrevented||Qh(t??document.body,{select:!0}),s.removeEventListener(Yh,f),ey.remove(g)}),0)}}var e}),[s,u,f,g]);const h=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Xh(e),r=Jh(t,e),n=Jh(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Qh(i,{select:!0})):(e.preventDefault(),n&&Qh(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Qi.jsx(Ah.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Xh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Jh(e,t){for(const r of e)if(!Zh(r,{upTo:t}))return r}function Zh(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Qh(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Kh.displayName="FocusScope";var ey=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ty(e,t),e.unshift(t)},remove(t){e=ty(e,t),e[0]?.resume()}}}();function ty(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ry=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);is((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?m.createPortal(Qi.jsx(Ah.div,{...o,ref:r}),l):null}));ry.displayName="Portal";var ny=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=oy(o.current);a.current="mounted"===s?e:"none"}),[s]),is((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=oy(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),is((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=oy(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=oy(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Nh(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function oy(e){return e?.animationName||"none"}function iy(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}ny.displayName="Presence";var ay="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,ly=new WeakMap;function sy(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return iy(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return ay((function(){var t=ly.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||iy(e,null)})),n.forEach((function(e){r.has(e)||iy(e,o)}))}ly.set(i,e)}),[e]),i}function cy(e){return e}var uy=function(t){var r=t.sideCar,n=O(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,w({},n))};uy.isSideCarExport=!0;var fy=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=cy);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=w({async:!0,ssr:!1},e),t}(),dy=function(){},py=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:dy,onWheelCapture:dy,onTouchMoveCapture:dy}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,p=t.sideCar,g=t.noIsolation,h=t.inert,y=t.allowPinchZoom,v=t.as,m=void 0===v?"div":v,b=t.gapMode,x=O(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,j=sy([n,r]),k=w(w({},x),i);return e.createElement(e.Fragment,null,f&&e.createElement(E,{sideCar:fy,removeScrollBar:u,shards:d,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),w(w({},k),{ref:j})):e.createElement(m,w({},k,{className:c,ref:j}),s))}));py.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},py.classNames={fullWidth:Qp,zeroRight:Zp};var gy=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lu();return t&&e.setAttribute("nonce",t),e}())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hy=function(){var t=function(){var t=gy();return function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])}}();return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},yy=!1;if("undefined"!=typeof window)try{var vy=Object.defineProperty({},"passive",{get:function(){return yy=!0,!0}});window.addEventListener("test",vy,vy),window.removeEventListener("test",vy,vy)}catch(e){yy=!1}var my=!!yy&&{passive:!1},by=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},wy=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Oy(e,n)){var o=xy(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Oy=function(e,t){return"v"===e?function(e){return by(e,"overflowY")}(t):function(e){return by(e,"overflowX")}(t)},xy=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Ey=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jy=function(e){return[e.deltaX,e.deltaY]},ky=function(e){return e&&"current"in e?e.current:e},Sy=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Py=0,Cy=[];function zy(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ty,Ly=(Ty=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Py++)[0],a=e.useState(hy)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=j([t.lockRef.current],(t.shards||[]).map(ky),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Ey(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=wy(f,u);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=wy(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,d=0;do{var p=xy(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Oy(e,l)&&(f+=h,d+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(d)<1)&&o||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Cy.length&&Cy[Cy.length-1]===a){var n="deltaY"in t?jy(t):Ey(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(ky).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:zy(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),f=e.useCallback((function(e){n.current=Ey(e),o.current=void 0}),[]),d=e.useCallback((function(e){u(e.type,jy(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,Ey(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Cy.push(a),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,my),document.addEventListener("touchmove",c,my),document.addEventListener("touchstart",f,my),function(){Cy=Cy.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,my),document.removeEventListener("touchmove",c,my),document.removeEventListener("touchstart",f,my)}}),[]);var g=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:Sy(i)}):null,g?e.createElement(pg,{gapMode:t.gapMode}):null)},fy.useMedium(Ty),uy),Ny=e.forwardRef((function(t,r){return e.createElement(py,w({},t,{ref:r,sideCar:Ly}))}));Ny.classNames=py.classNames;var Ry="Dialog",[My,Iy]=Rl(Ry),[_y,Ay]=My(Ry),Dy="DialogTrigger";e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Dy,r),i=Nh(t,o.triggerRef);return Qi.jsx(Ah.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":nv(o.open),...n,ref:i,onClick:zh(e.onClick,o.onOpenToggle)})})).displayName=Dy;var By="DialogPortal",[Fy,Wy]=My(By,{forceMount:void 0}),Vy=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=Ay(By,r);return Qi.jsx(Fy,{scope:r,forceMount:n,children:e.Children.map(o,(e=>Qi.jsx(ny,{present:n||a.open,children:Qi.jsx(ry,{asChild:!0,container:i,children:e})})))})};Vy.displayName=By;var Hy="DialogOverlay",Uy=e.forwardRef(((e,t)=>{const r=Wy(Hy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ay(Hy,e.__scopeDialog);return i.modal?Qi.jsx(ny,{present:n||i.open,children:Qi.jsx($y,{...o,ref:t})}):null}));Uy.displayName=Hy;var $y=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Hy,r);return Qi.jsx(Ny,{as:Rh,allowPinchZoom:!0,shards:[o.contentRef],children:Qi.jsx(Ah.div,{"data-state":nv(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),Gy="DialogContent",Yy=e.forwardRef(((e,t)=>{const r=Wy(Gy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ay(Gy,e.__scopeDialog);return Qi.jsx(ny,{present:n||i.open,children:i.modal?Qi.jsx(qy,{...o,ref:t}):Qi.jsx(Ky,{...o,ref:t})})}));Yy.displayName=Gy;var qy=e.forwardRef(((t,r)=>{const n=Ay(Gy,t.__scopeDialog),o=e.useRef(null),i=Nh(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return vu(e)}),[]),Qi.jsx(Xy,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zh(t.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:zh(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:zh(t.onFocusOutside,(e=>e.preventDefault()))})})),Ky=e.forwardRef(((t,r)=>{const n=Ay(Gy,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return Qi.jsx(Xy,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Xy=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=Ay(Gy,n),c=e.useRef(null),u=Nh(r,c);return Yl(),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(Kh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Qi.jsx(Hh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":nv(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(lv,{titleId:s.titleId}),Qi.jsx(sv,{contentRef:c,descriptionId:s.descriptionId})]})]})})),Jy="DialogTitle",Zy=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Jy,r);return Qi.jsx(Ah.h2,{id:o.titleId,...n,ref:t})}));Zy.displayName=Jy;var Qy="DialogDescription",ev=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(Qy,r);return Qi.jsx(Ah.p,{id:o.descriptionId,...n,ref:t})}));ev.displayName=Qy;var tv="DialogClose",rv=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ay(tv,r);return Qi.jsx(Ah.button,{type:"button",...n,ref:t,onClick:zh(e.onClick,(()=>o.onOpenChange(!1)))})}));function nv(e){return e?"open":"closed"}rv.displayName=tv;var ov="DialogTitleWarning",[iv,av]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo((()=>o),Object.values(o));return Qi.jsx(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(ov,{contentName:Gy,titleName:Jy,docsSlug:"dialog"}),lv=({titleId:t})=>{const r=av(ov),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(n)}}),[n,t]),null},sv=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${av("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}}),[n,t,r]),null},cv=Uy,uv=Yy,fv=Zy,dv=ev,pv=rv,gv=Vy,hv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(cv,w({ref:r,className:xi("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},o))}));hv.displayName=cv.displayName,e.forwardRef((function(t,r){var n=t.className,o=t.children,i=O(t,["className","children"]);return e.createElement(gv,null,e.createElement(hv,null),e.createElement(uv,w({ref:r,className:xi("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n)},i),o,e.createElement(pv,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},e.createElement(Vi,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))})).displayName=uv.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(fv,w({ref:r,className:xi("text-lg font-semibold leading-none tracking-tight",n)},o))})).displayName=fv.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(dv,w({ref:r,className:xi("text-sm text-muted-foreground",n)},o))})).displayName=dv.displayName;var yv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh,w({ref:r,className:xi("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",n)},o))}));yv.displayName=vh.displayName;var vv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},e.createElement(Wi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.createElement(vh.Input,w({ref:r,className:xi("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",n)},o)))}));vv.displayName=vh.Input.displayName;var mv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.List,w({ref:r,className:xi("max-h-[300px] overflow-y-auto overflow-x-hidden",n)},o))}));mv.displayName=vh.List.displayName;var bv=e.forwardRef((function(t,r){return e.createElement(vh.Empty,w({ref:r,className:"py-6 text-center text-sm"},t))}));bv.displayName=vh.Empty.displayName;var wv=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Group,w({ref:r,className:xi("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",n)},o))}));wv.displayName=vh.Group.displayName,e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Separator,w({ref:r,className:xi("-mx-1 h-px bg-border",n)},o))})).displayName=vh.Separator.displayName;var Ov=e.forwardRef((function(t,r){var n=t.className,o=O(t,["className"]);return e.createElement(vh.Item,w({ref:r,className:xi("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n)},o))}));function xv(t){var r,n=t.value,o=t.onSearch,i=t.onValueChange,a=t.disabled,l=t.placeholder,s=t.options,c=t.loading,u=e.useState(!1),f=u[0],d=u[1],p=e.useState(""),g=p[0],h=p[1],y=function(t,r){var n=e.useState(t),o=n[0],i=n[1];return e.useEffect((function(){var e=setTimeout((function(){i(t)}),r);return function(){clearTimeout(e)}}),[t,r]),o}(g,400),v=e.useRef("");return e.useEffect((function(){y!==v.current&&(v.current=y,o(y))}),[y,o]),e.createElement("div",{className:"w-full max-w-md mx-auto"},e.createElement(Cf,{open:f,onOpenChange:function(e){a||d(e)}},e.createElement(zf,{asChild:!0},e.createElement(aa,{variant:"outline",role:"combobox","aria-expanded":f,disabled:a,className:xi("w-full justify-between",a&&"opacity-70 cursor-not-allowed")},n?null===(r=s.find((function(e){return e.value===n})))||void 0===r?void 0:r.label:l,e.createElement(Ai,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"}))),e.createElement(Tf,{className:"w-full p-0"},e.createElement(yv,null,e.createElement(vv,{placeholder:l,onValueChange:function(e){return h(e)}}),c?e.createElement("div",{className:"flex items-center justify-center py-4"},e.createElement("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-primary border-t-transparent"})):e.createElement(mv,null,e.createElement(bv,null,"No ",l," found."),e.createElement(wv,null,s.map((function(t,r){return e.createElement(Ov,{key:r,value:t.value,onSelect:function(){console.log("option",t),i(t.value),d(!1)}},e.createElement(Ni,{className:xi("mr-2 h-4 w-4",n===t.value?"opacity-100":"opacity-0")}),t.label)}))))))))}function Ev(t){var r=this,n=t.title,o=t.filters,i=t.setFilters,l=t.configFilters,s=t.onSearch,c=t.count,u=t.isLoading,d=t.setCurrentPage,p=t.handleOptionsSearch,g=t.optionsLoading,h=e.useState(o),y=h[0],v=h[1],m=a(!1),b=m[0],O=m[1],j=e.useMemo((function(){return JSON.stringify(y)!==JSON.stringify(o)}),[y,o]),k=function(){return x(r,void 0,void 0,(function(){return E(this,(function(e){switch(e.label){case 0:return v(o),j?[4,d(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return s(),[2]}}))}))};return e.createElement("div",{className:"flex flex-col gap-2"},e.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(0, 137, 149)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"inline-block mr-2"},e.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),n,e.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},c)),e.createElement("div",{className:"border-b border-gray-100 mb-4"}),e.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},e.createElement(rp,{dateFrom:o.fromDate,dateTo:o.toDate,handleDateChange:function(e){i(w(w({},o),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),l&&l.map((function(t,r){return e.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&e.createElement(np,{type:"text",placeholder:t.placeholder,value:o[t.name],onChange:function(e){var r;e.target.value?i(w(w({},o),((r={})[t.name]=e.target.value,r))):(delete o[t.name],i(w({},o)))},onKeyDown:function(e){"Enter"===e.key&&k()}}),"Select_old"===t.type&&e.createElement(Kd,{disabled:t.disabled||0===t.options.length,value:o[t.name],onValueChange:function(e){var r;i(w(w({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}},e.createElement(Jd,null,e.createElement(Xd,{placeholder:t.placeholder})),e.createElement(ep,null,f((function(){return t.options.map((function(t,r){return e.createElement(tp,{key:"".concat(t.VALUE,"-").concat(r),value:t.VALUE||"_empty"},t.NAME)}))}),[t.options]))),"Select"===t.type&&e.createElement(xv,{loading:g,onSearch:function(e){e&&e.length>0&&!0===t.searchable&&p(t,e)},disabled:t.disabled||0===t.options.length,value:o[t.name],placeholder:t.placeholder,options:f((function(){return t.options.map((function(e){var r,n;return{value:null!==(r=e[t.codeAttribute])&&void 0!==r?r:e.VALUE,label:null!==(n=e[t.nameAttribute])&&void 0!==n?n:e.NAME}}))}),[t.options]),onValueChange:function(e){var r;i(w(w({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}}))})),e.createElement("div",{className:"flex gap-2 ml-auto"},l.some((function(e){return"Export"===e.type}))&&e.createElement(aa,{disabled:b,onClick:function(){return x(r,void 0,void 0,(function(){var e,t;return E(this,(function(i){switch(i.label){case 0:return O(!0),"POST"!==(null==(e=l.find((function(e){return"Export"===e.type})))?void 0:e.method)?[3,2]:[4,(s=null==e?void 0:e.url,c=o,x(r,void 0,void 0,(function(){var e,t,r,i;return E(this,(function(a){switch(a.label){case 0:return[4,fetch(s,{method:"POST",body:JSON.stringify({filters:c})})];case 1:return[4,a.sent().blob()];case 2:return e=a.sent(),t=window.URL.createObjectURL(e),(r=document.createElement("a")).href=t,i="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),r.download=i,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r),[2]}}))})))];case 1:return i.sent(),[3,4];case 2:return[4,(a=null==e?void 0:e.ctx,x(r,void 0,void 0,(function(){var e,t,r,i,l,s;return E(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(a),t=0,r=Object.entries(o);t<r.length;t++){var n=r[t],i=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===i||"toDate"===i){var s=new Date(l);e+="&".concat(i,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(i,"=").concat(l)}}return e}())];case 1:if(!(e=c.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=c.sent(),r=window.URL.createObjectURL(t),(i=document.createElement("a")).href=r,l="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),i.download=l,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i),[3,4];case 3:return s=c.sent(),console.error("Export error:",s),[3,4];case 4:return[2]}}))})))];case 3:i.sent(),i.label=4;case 4:return t=setInterval((function(){O(!1),clearInterval(t)}),3e4),[2]}var a,s,c}))}))},size:"sm"},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"7 10 12 15 17 10"}),e.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),e.createElement(aa,{size:"sm",onClick:k,disabled:u},j?e.createElement(e.Fragment,null,e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):e.createElement(e.Fragment,null,e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"reload-icon","aria-hidden":"true"},e.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),e.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
27
27
  /**
28
28
  * table-core
29
29
  *